summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes3
-rw-r--r--.gitignore62
-rw-r--r--.travis.yml24
-rwxr-xr-x.travis/webhook.sh15
-rw-r--r--INSTALL.md153
-rw-r--r--Makefile85
-rw-r--r--README.md33
-rw-r--r--audio.asm254
-rw-r--r--audio/alternate_tempo.asm53
-rw-r--r--audio/engine_1.asm131
-rw-r--r--audio/engine_2.asm69
-rw-r--r--audio/engine_3.asm6
-rw-r--r--audio/engine_4.asm4
-rw-r--r--audio/low_health_alarm.asm80
-rw-r--r--audio/notes.asm14
-rw-r--r--audio/play_battle_music.asm32
-rw-r--r--audio/poke_flute.asm18
-rw-r--r--audio/pokedex_rating_sfx.asm34
-rw-r--r--audio/wave_instruments.asm4
-rw-r--r--charmap.asm651
-rw-r--r--constants.asm25
-rw-r--r--constants/audio_constants.asm67
-rw-r--r--constants/battle_constants.asm75
-rwxr-xr-xconstants/connection_constants.asm9
-rw-r--r--constants/credits_constants.asm15
-rw-r--r--constants/event_constants.asm3354
-rwxr-xr-xconstants/evolution_constants.asm9
-rw-r--r--constants/gfx_constants.asm43
-rw-r--r--constants/hardware_constants.asm29
-rwxr-xr-xconstants/hide_show_constants.asm5
-rw-r--r--constants/icon_constants.asm18
-rw-r--r--constants/input_constants.asm20
-rwxr-xr-xconstants/item_constants.asm182
-rwxr-xr-xconstants/list_constants.asm40
-rw-r--r--constants/map_constants.asm17
-rwxr-xr-xconstants/map_data_constants.asm16
-rw-r--r--constants/map_object_constants.asm57
-rw-r--r--constants/menu_constants.asm88
-rw-r--r--constants/misc_constants.asm222
-rw-r--r--constants/move_animation_constants.asm424
-rw-r--r--constants/move_constants.asm14
-rw-r--r--constants/move_effect_constants.asm26
-rw-r--r--constants/music_constants.asm63
-rwxr-xr-xconstants/oam_constants.asm7
-rwxr-xr-xconstants/palette_constants.asm39
-rw-r--r--constants/pokedex_constants.asm10
-rw-r--r--constants/pokemon_constants.asm396
-rwxr-xr-xconstants/pokemon_data_constants.asm41
-rw-r--r--constants/script_constants.asm63
-rw-r--r--constants/serial_constants.asm27
-rwxr-xr-xconstants/sprite_constants.asm198
-rw-r--r--constants/sprite_data_constants.asm26
-rwxr-xr-xconstants/starter_mons.asm3
-rwxr-xr-xconstants/status_constants.asm32
-rwxr-xr-xconstants/text_constants.asm25
-rw-r--r--constants/tileset_constants.asm28
-rw-r--r--constants/tilesets.asm27
-rwxr-xr-xconstants/trainer_constants.asm111
-rwxr-xr-xconstants/type_constants.asm40
-rwxr-xr-xdata/animations.asm3623
-rw-r--r--data/baseStats/abra.asm28
-rw-r--r--data/baseStats/aerodactyl.asm28
-rw-r--r--data/baseStats/alakazam.asm28
-rw-r--r--data/baseStats/arbok.asm28
-rw-r--r--data/baseStats/arcanine.asm28
-rw-r--r--data/baseStats/articuno.asm28
-rw-r--r--data/baseStats/beedrill.asm28
-rw-r--r--data/baseStats/bellsprout.asm28
-rw-r--r--data/baseStats/blastoise.asm28
-rw-r--r--data/baseStats/bulbasaur.asm30
-rw-r--r--data/baseStats/butterfree.asm28
-rw-r--r--data/baseStats/caterpie.asm28
-rw-r--r--data/baseStats/chansey.asm28
-rw-r--r--data/baseStats/charizard.asm28
-rw-r--r--data/baseStats/charmander.asm28
-rw-r--r--data/baseStats/charmeleon.asm28
-rw-r--r--data/baseStats/clefable.asm28
-rw-r--r--data/baseStats/clefairy.asm28
-rw-r--r--data/baseStats/cloyster.asm28
-rw-r--r--data/baseStats/cubone.asm28
-rw-r--r--data/baseStats/dewgong.asm28
-rw-r--r--data/baseStats/diglett.asm28
-rw-r--r--data/baseStats/ditto.asm28
-rw-r--r--data/baseStats/dodrio.asm28
-rw-r--r--data/baseStats/doduo.asm28
-rw-r--r--data/baseStats/dragonair.asm28
-rw-r--r--data/baseStats/dragonite.asm28
-rw-r--r--data/baseStats/dratini.asm28
-rw-r--r--data/baseStats/drowzee.asm28
-rw-r--r--data/baseStats/dugtrio.asm28
-rw-r--r--data/baseStats/eevee.asm28
-rw-r--r--data/baseStats/ekans.asm28
-rw-r--r--data/baseStats/electabuzz.asm28
-rw-r--r--data/baseStats/electrode.asm28
-rw-r--r--data/baseStats/exeggcute.asm28
-rw-r--r--data/baseStats/exeggutor.asm28
-rw-r--r--data/baseStats/farfetchd.asm28
-rw-r--r--data/baseStats/fearow.asm28
-rw-r--r--data/baseStats/flareon.asm28
-rw-r--r--data/baseStats/gastly.asm28
-rw-r--r--data/baseStats/gengar.asm28
-rw-r--r--data/baseStats/geodude.asm28
-rw-r--r--data/baseStats/gloom.asm28
-rw-r--r--data/baseStats/golbat.asm28
-rw-r--r--data/baseStats/goldeen.asm28
-rw-r--r--data/baseStats/golduck.asm28
-rw-r--r--data/baseStats/golem.asm28
-rw-r--r--data/baseStats/graveler.asm28
-rw-r--r--data/baseStats/grimer.asm28
-rw-r--r--data/baseStats/growlithe.asm28
-rw-r--r--data/baseStats/gyarados.asm28
-rw-r--r--data/baseStats/haunter.asm28
-rw-r--r--data/baseStats/hitmonchan.asm28
-rw-r--r--data/baseStats/hitmonlee.asm28
-rw-r--r--data/baseStats/horsea.asm28
-rw-r--r--data/baseStats/hypno.asm28
-rw-r--r--data/baseStats/ivysaur.asm28
-rw-r--r--data/baseStats/jigglypuff.asm28
-rw-r--r--data/baseStats/jolteon.asm28
-rw-r--r--data/baseStats/jynx.asm28
-rw-r--r--data/baseStats/kabuto.asm28
-rw-r--r--data/baseStats/kabutops.asm28
-rw-r--r--data/baseStats/kadabra.asm28
-rw-r--r--data/baseStats/kakuna.asm28
-rw-r--r--data/baseStats/kangaskhan.asm28
-rw-r--r--data/baseStats/kingler.asm28
-rw-r--r--data/baseStats/koffing.asm28
-rw-r--r--data/baseStats/krabby.asm28
-rw-r--r--data/baseStats/lapras.asm28
-rw-r--r--data/baseStats/lickitung.asm28
-rw-r--r--data/baseStats/machamp.asm28
-rw-r--r--data/baseStats/machoke.asm28
-rw-r--r--data/baseStats/machop.asm28
-rw-r--r--data/baseStats/magikarp.asm28
-rw-r--r--data/baseStats/magmar.asm28
-rw-r--r--data/baseStats/magnemite.asm28
-rw-r--r--data/baseStats/magneton.asm28
-rw-r--r--data/baseStats/mankey.asm28
-rw-r--r--data/baseStats/marowak.asm28
-rw-r--r--data/baseStats/meowth.asm28
-rw-r--r--data/baseStats/metapod.asm28
-rw-r--r--data/baseStats/mew.asm28
-rw-r--r--data/baseStats/mewtwo.asm28
-rw-r--r--data/baseStats/moltres.asm28
-rw-r--r--data/baseStats/mrmime.asm28
-rw-r--r--data/baseStats/muk.asm28
-rw-r--r--data/baseStats/nidoking.asm28
-rw-r--r--data/baseStats/nidoqueen.asm28
-rw-r--r--data/baseStats/nidoranf.asm28
-rw-r--r--data/baseStats/nidoranm.asm28
-rw-r--r--data/baseStats/nidorina.asm28
-rw-r--r--data/baseStats/nidorino.asm28
-rw-r--r--data/baseStats/ninetales.asm28
-rw-r--r--data/baseStats/oddish.asm28
-rw-r--r--data/baseStats/omanyte.asm28
-rw-r--r--data/baseStats/omastar.asm28
-rw-r--r--data/baseStats/onix.asm28
-rw-r--r--data/baseStats/paras.asm28
-rw-r--r--data/baseStats/parasect.asm28
-rw-r--r--data/baseStats/persian.asm28
-rw-r--r--data/baseStats/pidgeot.asm28
-rw-r--r--data/baseStats/pidgeotto.asm28
-rw-r--r--data/baseStats/pidgey.asm28
-rw-r--r--data/baseStats/pikachu.asm28
-rw-r--r--data/baseStats/pinsir.asm28
-rw-r--r--data/baseStats/poliwag.asm28
-rw-r--r--data/baseStats/poliwhirl.asm28
-rw-r--r--data/baseStats/poliwrath.asm28
-rw-r--r--data/baseStats/ponyta.asm28
-rw-r--r--data/baseStats/porygon.asm28
-rw-r--r--data/baseStats/primeape.asm28
-rw-r--r--data/baseStats/psyduck.asm28
-rw-r--r--data/baseStats/raichu.asm28
-rw-r--r--data/baseStats/rapidash.asm28
-rw-r--r--data/baseStats/raticate.asm28
-rw-r--r--data/baseStats/rattata.asm28
-rw-r--r--data/baseStats/rhydon.asm28
-rw-r--r--data/baseStats/rhyhorn.asm28
-rw-r--r--data/baseStats/sandshrew.asm28
-rw-r--r--data/baseStats/sandslash.asm28
-rw-r--r--data/baseStats/scyther.asm28
-rw-r--r--data/baseStats/seadra.asm28
-rw-r--r--data/baseStats/seaking.asm28
-rw-r--r--data/baseStats/seel.asm28
-rw-r--r--data/baseStats/shellder.asm28
-rw-r--r--data/baseStats/slowbro.asm28
-rw-r--r--data/baseStats/slowpoke.asm28
-rw-r--r--data/baseStats/snorlax.asm28
-rw-r--r--data/baseStats/spearow.asm28
-rw-r--r--data/baseStats/squirtle.asm28
-rw-r--r--data/baseStats/starmie.asm28
-rw-r--r--data/baseStats/staryu.asm28
-rw-r--r--data/baseStats/tangela.asm28
-rw-r--r--data/baseStats/tauros.asm28
-rw-r--r--data/baseStats/tentacool.asm28
-rw-r--r--data/baseStats/tentacruel.asm28
-rw-r--r--data/baseStats/vaporeon.asm28
-rw-r--r--data/baseStats/venomoth.asm28
-rw-r--r--data/baseStats/venonat.asm28
-rw-r--r--data/baseStats/venusaur.asm28
-rw-r--r--data/baseStats/victreebel.asm28
-rw-r--r--data/baseStats/vileplume.asm28
-rw-r--r--data/baseStats/voltorb.asm28
-rw-r--r--data/baseStats/vulpix.asm28
-rw-r--r--data/baseStats/wartortle.asm28
-rw-r--r--data/baseStats/weedle.asm28
-rw-r--r--data/baseStats/weepinbell.asm28
-rw-r--r--data/baseStats/weezing.asm28
-rw-r--r--data/baseStats/wigglytuff.asm28
-rw-r--r--data/baseStats/zapdos.asm28
-rw-r--r--data/baseStats/zubat.asm28
-rwxr-xr-xdata/base_stats.asm151
-rw-r--r--data/battle/always_happen_effects.asm13
-rw-r--r--data/battle/critical_hit_moves.asm6
-rw-r--r--data/battle/residual_effects_1.asm20
-rw-r--r--data/battle/residual_effects_2.asm32
-rw-r--r--data/battle/set_damage_effects.asm6
-rw-r--r--data/battle/special_effects.asm24
-rw-r--r--data/battle/stat_modifiers.asm15
-rw-r--r--data/battle/stat_names.asm7
-rw-r--r--data/battle/unused_critical_hit_moves.asm6
-rw-r--r--data/battle_anims/base_coords.asm178
-rw-r--r--data/battle_anims/frame_blocks.asm1238
-rw-r--r--data/battle_anims/special_effect_pointers.asm47
-rw-r--r--data/battle_anims/special_effects.asm32
-rw-r--r--data/battle_anims/subanimations.asm954
-rwxr-xr-xdata/bike_riding_tilesets.asm2
-rw-r--r--data/collision.asm25
-rwxr-xr-xdata/credits/credits_mons.asm (renamed from data/credit_mons.asm)0
-rwxr-xr-xdata/credits/credits_order.asm37
-rwxr-xr-xdata/credits/credits_text.asm265
-rwxr-xr-xdata/credits_order.asm38
-rwxr-xr-xdata/cries.asm192
-rwxr-xr-xdata/dungeon_tilesets.asm2
-rw-r--r--data/events/bench_guys.asm23
-rw-r--r--data/events/card_key_coords.asm36
-rw-r--r--data/events/card_key_maps.asm12
-rwxr-xr-xdata/events/hidden_coins.asm19
-rwxr-xr-xdata/events/hidden_item_coords.asm62
-rwxr-xr-xdata/events/hidden_objects.asm560
-rwxr-xr-xdata/events/prize_mon_levels.asm8
-rwxr-xr-xdata/events/prizes.asm40
-rwxr-xr-xdata/events/slot_machine_wheels.asm (renamed from data/slot_machine_wheels.asm)0
-rwxr-xr-xdata/events/trades.asm13
-rwxr-xr-xdata/evos_moves.asm2161
-rw-r--r--data/facing.asm133
-rwxr-xr-xdata/force_bike_surf.asm11
-rwxr-xr-xdata/good_rod.asm3
-rw-r--r--data/growth_rates.asm19
-rwxr-xr-xdata/hidden_coins.asm14
-rwxr-xr-xdata/hidden_item_coords.asm58
-rwxr-xr-xdata/hidden_objects.asm545
-rwxr-xr-xdata/hide_show_data.asm593
-rw-r--r--data/icon_pointers.asm39
-rwxr-xr-xdata/item_prices.asm98
-rw-r--r--data/items/guard_drink_items.asm5
-rwxr-xr-xdata/items/key_items.asm103
-rwxr-xr-xdata/items/marts.asm64
-rwxr-xr-xdata/items/names.asm98
-rwxr-xr-xdata/items/prices.asm98
-rwxr-xr-xdata/items/tm_prices.asm27
-rw-r--r--data/items/use_overworld.asm9
-rw-r--r--data/items/use_party.asm39
-rw-r--r--data/items/vending_prices.asm10
-rwxr-xr-xdata/key_items.asm12
-rwxr-xr-xdata/mapHeaders/AgathasRoom.asm8
-rwxr-xr-xdata/mapHeaders/BikeShop.asm8
-rwxr-xr-xdata/mapHeaders/BillsHouse.asm8
-rwxr-xr-xdata/mapHeaders/BluesHouse.asm8
-rwxr-xr-xdata/mapHeaders/BrunosRoom.asm8
-rwxr-xr-xdata/mapHeaders/CeladonChiefHouse.asm8
-rwxr-xr-xdata/mapHeaders/CeladonCity.asm10
-rwxr-xr-xdata/mapHeaders/CeladonDiner.asm8
-rwxr-xr-xdata/mapHeaders/CeladonGym.asm8
-rwxr-xr-xdata/mapHeaders/CeladonHotel.asm8
-rwxr-xr-xdata/mapHeaders/CeladonMansion1F.asm8
-rwxr-xr-xdata/mapHeaders/CeladonMansion2F.asm8
-rwxr-xr-xdata/mapHeaders/CeladonMansion3F.asm8
-rwxr-xr-xdata/mapHeaders/CeladonMansionRoof.asm8
-rwxr-xr-xdata/mapHeaders/CeladonMansionRoofHouse.asm8
-rwxr-xr-xdata/mapHeaders/CeladonMart1F.asm8
-rwxr-xr-xdata/mapHeaders/CeladonMart2F.asm8
-rwxr-xr-xdata/mapHeaders/CeladonMart3F.asm8
-rwxr-xr-xdata/mapHeaders/CeladonMart4F.asm8
-rwxr-xr-xdata/mapHeaders/CeladonMart5F.asm8
-rwxr-xr-xdata/mapHeaders/CeladonMartElevator.asm8
-rwxr-xr-xdata/mapHeaders/CeladonMartRoof.asm8
-rwxr-xr-xdata/mapHeaders/CeladonPokecenter.asm8
-rwxr-xr-xdata/mapHeaders/CeruleanBadgeHouse.asm8
-rwxr-xr-xdata/mapHeaders/CeruleanCave1F.asm8
-rwxr-xr-xdata/mapHeaders/CeruleanCave2F.asm8
-rwxr-xr-xdata/mapHeaders/CeruleanCaveB1F.asm8
-rwxr-xr-xdata/mapHeaders/CeruleanCity.asm12
-rwxr-xr-xdata/mapHeaders/CeruleanGym.asm8
-rwxr-xr-xdata/mapHeaders/CeruleanMart.asm8
-rwxr-xr-xdata/mapHeaders/CeruleanPokecenter.asm8
-rwxr-xr-xdata/mapHeaders/CeruleanTradeHouse.asm8
-rwxr-xr-xdata/mapHeaders/CeruleanTrashedHouse.asm8
-rwxr-xr-xdata/mapHeaders/ChampionsRoom.asm8
-rwxr-xr-xdata/mapHeaders/CinnabarGym.asm8
-rwxr-xr-xdata/mapHeaders/CinnabarIsland.asm10
-rwxr-xr-xdata/mapHeaders/CinnabarLab.asm8
-rwxr-xr-xdata/mapHeaders/CinnabarLabFossilRoom.asm8
-rwxr-xr-xdata/mapHeaders/CinnabarLabMetronomeRoom.asm8
-rwxr-xr-xdata/mapHeaders/CinnabarLabTradeRoom.asm8
-rwxr-xr-xdata/mapHeaders/CinnabarMart.asm8
-rwxr-xr-xdata/mapHeaders/CinnabarPokecenter.asm8
-rwxr-xr-xdata/mapHeaders/Colosseum.asm8
-rwxr-xr-xdata/mapHeaders/CopycatsHouse1F.asm8
-rwxr-xr-xdata/mapHeaders/CopycatsHouse2F.asm8
-rwxr-xr-xdata/mapHeaders/Daycare.asm8
-rwxr-xr-xdata/mapHeaders/DiglettsCave.asm8
-rwxr-xr-xdata/mapHeaders/DiglettsCaveRoute11.asm8
-rwxr-xr-xdata/mapHeaders/DiglettsCaveRoute2.asm8
-rwxr-xr-xdata/mapHeaders/FightingDojo.asm8
-rwxr-xr-xdata/mapHeaders/FuchsiaBillsGrandpasHouse.asm8
-rwxr-xr-xdata/mapHeaders/FuchsiaCity.asm11
-rwxr-xr-xdata/mapHeaders/FuchsiaGoodRodHouse.asm8
-rwxr-xr-xdata/mapHeaders/FuchsiaGym.asm8
-rwxr-xr-xdata/mapHeaders/FuchsiaMart.asm8
-rwxr-xr-xdata/mapHeaders/FuchsiaMeetingRoom.asm8
-rwxr-xr-xdata/mapHeaders/FuchsiaPokecenter.asm8
-rwxr-xr-xdata/mapHeaders/GameCorner.asm8
-rwxr-xr-xdata/mapHeaders/GameCornerPrizeRoom.asm8
-rwxr-xr-xdata/mapHeaders/HallOfFame.asm8
-rwxr-xr-xdata/mapHeaders/IndigoPlateau.asm9
-rwxr-xr-xdata/mapHeaders/IndigoPlateauLobby.asm8
-rwxr-xr-xdata/mapHeaders/LancesRoom.asm8
-rwxr-xr-xdata/mapHeaders/LavenderCuboneHouse.asm8
-rwxr-xr-xdata/mapHeaders/LavenderMart.asm8
-rwxr-xr-xdata/mapHeaders/LavenderPokecenter.asm8
-rwxr-xr-xdata/mapHeaders/LavenderTown.asm11
-rwxr-xr-xdata/mapHeaders/LoreleisRoom.asm8
-rwxr-xr-xdata/mapHeaders/MrFujisHouse.asm8
-rwxr-xr-xdata/mapHeaders/MrPsychicsHouse.asm8
-rwxr-xr-xdata/mapHeaders/MtMoon1F.asm8
-rwxr-xr-xdata/mapHeaders/MtMoonB1F.asm8
-rwxr-xr-xdata/mapHeaders/MtMoonB2F.asm8
-rwxr-xr-xdata/mapHeaders/MtMoonPokecenter.asm8
-rwxr-xr-xdata/mapHeaders/Museum1F.asm8
-rwxr-xr-xdata/mapHeaders/Museum2F.asm8
-rwxr-xr-xdata/mapHeaders/NameRatersHouse.asm8
-rwxr-xr-xdata/mapHeaders/OaksLab.asm8
-rwxr-xr-xdata/mapHeaders/PalletTown.asm10
-rwxr-xr-xdata/mapHeaders/PewterCity.asm10
-rwxr-xr-xdata/mapHeaders/PewterGym.asm8
-rwxr-xr-xdata/mapHeaders/PewterMart.asm8
-rwxr-xr-xdata/mapHeaders/PewterNidoranHouse.asm8
-rwxr-xr-xdata/mapHeaders/PewterPokecenter.asm8
-rwxr-xr-xdata/mapHeaders/PewterSpeechHouse.asm8
-rwxr-xr-xdata/mapHeaders/PokemonFanClub.asm8
-rwxr-xr-xdata/mapHeaders/PokemonMansion1F.asm8
-rwxr-xr-xdata/mapHeaders/PokemonMansion2F.asm8
-rwxr-xr-xdata/mapHeaders/PokemonMansion3F.asm8
-rwxr-xr-xdata/mapHeaders/PokemonMansionB1F.asm8
-rwxr-xr-xdata/mapHeaders/PokemonTower1F.asm8
-rwxr-xr-xdata/mapHeaders/PokemonTower2F.asm8
-rwxr-xr-xdata/mapHeaders/PokemonTower3F.asm8
-rwxr-xr-xdata/mapHeaders/PokemonTower4F.asm8
-rwxr-xr-xdata/mapHeaders/PokemonTower5F.asm8
-rwxr-xr-xdata/mapHeaders/PokemonTower6F.asm8
-rwxr-xr-xdata/mapHeaders/PokemonTower7F.asm8
-rwxr-xr-xdata/mapHeaders/PowerPlant.asm8
-rwxr-xr-xdata/mapHeaders/RedsHouse1F.asm8
-rwxr-xr-xdata/mapHeaders/RedsHouse2F.asm8
-rwxr-xr-xdata/mapHeaders/RockTunnel1F.asm8
-rwxr-xr-xdata/mapHeaders/RockTunnelB1F.asm8
-rwxr-xr-xdata/mapHeaders/RockTunnelPokecenter.asm8
-rwxr-xr-xdata/mapHeaders/RocketHideoutB1F.asm8
-rwxr-xr-xdata/mapHeaders/RocketHideoutB2F.asm8
-rwxr-xr-xdata/mapHeaders/RocketHideoutB3F.asm8
-rwxr-xr-xdata/mapHeaders/RocketHideoutB4F.asm8
-rwxr-xr-xdata/mapHeaders/RocketHideoutElevator.asm8
-rwxr-xr-xdata/mapHeaders/Route1.asm10
-rwxr-xr-xdata/mapHeaders/Route10.asm10
-rwxr-xr-xdata/mapHeaders/Route11.asm10
-rwxr-xr-xdata/mapHeaders/Route11Gate1F.asm8
-rwxr-xr-xdata/mapHeaders/Route11Gate2F.asm8
-rwxr-xr-xdata/mapHeaders/Route12.asm11
-rwxr-xr-xdata/mapHeaders/Route12Gate1F.asm8
-rwxr-xr-xdata/mapHeaders/Route12Gate2F.asm8
-rwxr-xr-xdata/mapHeaders/Route12SuperRodHouse.asm8
-rwxr-xr-xdata/mapHeaders/Route13.asm10
-rwxr-xr-xdata/mapHeaders/Route14.asm10
-rwxr-xr-xdata/mapHeaders/Route15.asm10
-rwxr-xr-xdata/mapHeaders/Route15Gate1F.asm8
-rwxr-xr-xdata/mapHeaders/Route15Gate2F.asm8
-rwxr-xr-xdata/mapHeaders/Route16.asm10
-rwxr-xr-xdata/mapHeaders/Route16FlyHouse.asm8
-rwxr-xr-xdata/mapHeaders/Route16Gate1F.asm8
-rwxr-xr-xdata/mapHeaders/Route16Gate2F.asm8
-rwxr-xr-xdata/mapHeaders/Route17.asm10
-rwxr-xr-xdata/mapHeaders/Route18.asm10
-rwxr-xr-xdata/mapHeaders/Route18Gate1F.asm8
-rwxr-xr-xdata/mapHeaders/Route18Gate2F.asm8
-rwxr-xr-xdata/mapHeaders/Route19.asm10
-rwxr-xr-xdata/mapHeaders/Route2.asm10
-rwxr-xr-xdata/mapHeaders/Route20.asm10
-rwxr-xr-xdata/mapHeaders/Route21.asm10
-rwxr-xr-xdata/mapHeaders/Route22.asm10
-rwxr-xr-xdata/mapHeaders/Route22Gate.asm8
-rwxr-xr-xdata/mapHeaders/Route23.asm10
-rwxr-xr-xdata/mapHeaders/Route24.asm10
-rwxr-xr-xdata/mapHeaders/Route25.asm9
-rwxr-xr-xdata/mapHeaders/Route2Gate.asm8
-rwxr-xr-xdata/mapHeaders/Route2TradeHouse.asm8
-rwxr-xr-xdata/mapHeaders/Route3.asm10
-rwxr-xr-xdata/mapHeaders/Route4.asm10
-rwxr-xr-xdata/mapHeaders/Route5.asm10
-rwxr-xr-xdata/mapHeaders/Route5Gate.asm8
-rwxr-xr-xdata/mapHeaders/Route6.asm10
-rwxr-xr-xdata/mapHeaders/Route6Gate.asm8
-rwxr-xr-xdata/mapHeaders/Route7.asm10
-rwxr-xr-xdata/mapHeaders/Route7Gate.asm8
-rwxr-xr-xdata/mapHeaders/Route8.asm10
-rwxr-xr-xdata/mapHeaders/Route8Gate.asm8
-rwxr-xr-xdata/mapHeaders/Route9.asm10
-rwxr-xr-xdata/mapHeaders/SSAnne1F.asm8
-rwxr-xr-xdata/mapHeaders/SSAnne1FRooms.asm8
-rwxr-xr-xdata/mapHeaders/SSAnne2F.asm8
-rwxr-xr-xdata/mapHeaders/SSAnne2FRooms.asm8
-rwxr-xr-xdata/mapHeaders/SSAnne3F.asm8
-rwxr-xr-xdata/mapHeaders/SSAnneB1F.asm8
-rwxr-xr-xdata/mapHeaders/SSAnneB1FRooms.asm8
-rwxr-xr-xdata/mapHeaders/SSAnneBow.asm8
-rwxr-xr-xdata/mapHeaders/SSAnneCaptainsRoom.asm8
-rwxr-xr-xdata/mapHeaders/SSAnneKitchen.asm8
-rwxr-xr-xdata/mapHeaders/SafariZoneCenter.asm8
-rwxr-xr-xdata/mapHeaders/SafariZoneCenterRestHouse.asm8
-rwxr-xr-xdata/mapHeaders/SafariZoneEast.asm8
-rwxr-xr-xdata/mapHeaders/SafariZoneEastRestHouse.asm8
-rwxr-xr-xdata/mapHeaders/SafariZoneGate.asm8
-rwxr-xr-xdata/mapHeaders/SafariZoneNorth.asm8
-rwxr-xr-xdata/mapHeaders/SafariZoneNorthRestHouse.asm8
-rwxr-xr-xdata/mapHeaders/SafariZoneSecretHouse.asm8
-rwxr-xr-xdata/mapHeaders/SafariZoneWest.asm8
-rwxr-xr-xdata/mapHeaders/SafariZoneWestRestHouse.asm8
-rwxr-xr-xdata/mapHeaders/SaffronCity.asm12
-rwxr-xr-xdata/mapHeaders/SaffronGym.asm8
-rwxr-xr-xdata/mapHeaders/SaffronMart.asm8
-rwxr-xr-xdata/mapHeaders/SaffronPidgeyHouse.asm8
-rwxr-xr-xdata/mapHeaders/SaffronPokecenter.asm8
-rwxr-xr-xdata/mapHeaders/SeafoamIslands1F.asm8
-rwxr-xr-xdata/mapHeaders/SeafoamIslandsB1F.asm8
-rwxr-xr-xdata/mapHeaders/SeafoamIslandsB2F.asm8
-rwxr-xr-xdata/mapHeaders/SeafoamIslandsB3F.asm8
-rwxr-xr-xdata/mapHeaders/SeafoamIslandsB4F.asm8
-rwxr-xr-xdata/mapHeaders/SilphCo10F.asm8
-rwxr-xr-xdata/mapHeaders/SilphCo11F.asm8
-rwxr-xr-xdata/mapHeaders/SilphCo1F.asm8
-rwxr-xr-xdata/mapHeaders/SilphCo2F.asm8
-rwxr-xr-xdata/mapHeaders/SilphCo3F.asm8
-rwxr-xr-xdata/mapHeaders/SilphCo4F.asm8
-rwxr-xr-xdata/mapHeaders/SilphCo5F.asm8
-rwxr-xr-xdata/mapHeaders/SilphCo6F.asm8
-rwxr-xr-xdata/mapHeaders/SilphCo7F.asm8
-rwxr-xr-xdata/mapHeaders/SilphCo8F.asm8
-rwxr-xr-xdata/mapHeaders/SilphCo9F.asm8
-rwxr-xr-xdata/mapHeaders/SilphCoElevator.asm8
-rwxr-xr-xdata/mapHeaders/TradeCenter.asm8
-rwxr-xr-xdata/mapHeaders/UndergroundPathNorthSouth.asm8
-rwxr-xr-xdata/mapHeaders/UndergroundPathRoute5.asm8
-rwxr-xr-xdata/mapHeaders/UndergroundPathRoute6.asm8
-rwxr-xr-xdata/mapHeaders/UndergroundPathRoute7.asm8
-rwxr-xr-xdata/mapHeaders/UndergroundPathRoute7Copy.asm8
-rwxr-xr-xdata/mapHeaders/UndergroundPathRoute8.asm8
-rwxr-xr-xdata/mapHeaders/UndergroundPathWestEast.asm8
-rwxr-xr-xdata/mapHeaders/VermilionCity.asm10
-rwxr-xr-xdata/mapHeaders/VermilionDock.asm8
-rwxr-xr-xdata/mapHeaders/VermilionGym.asm8
-rwxr-xr-xdata/mapHeaders/VermilionMart.asm8
-rwxr-xr-xdata/mapHeaders/VermilionOldRodHouse.asm8
-rwxr-xr-xdata/mapHeaders/VermilionPidgeyHouse.asm8
-rwxr-xr-xdata/mapHeaders/VermilionPokecenter.asm8
-rwxr-xr-xdata/mapHeaders/VermilionTradeHouse.asm8
-rwxr-xr-xdata/mapHeaders/VictoryRoad1F.asm8
-rwxr-xr-xdata/mapHeaders/VictoryRoad2F.asm8
-rwxr-xr-xdata/mapHeaders/VictoryRoad3F.asm8
-rwxr-xr-xdata/mapHeaders/ViridianCity.asm11
-rwxr-xr-xdata/mapHeaders/ViridianForest.asm8
-rwxr-xr-xdata/mapHeaders/ViridianForestNorthGate.asm8
-rwxr-xr-xdata/mapHeaders/ViridianForestSouthGate.asm8
-rwxr-xr-xdata/mapHeaders/ViridianGym.asm8
-rwxr-xr-xdata/mapHeaders/ViridianMart.asm8
-rwxr-xr-xdata/mapHeaders/ViridianNicknameHouse.asm8
-rwxr-xr-xdata/mapHeaders/ViridianPokecenter.asm8
-rwxr-xr-xdata/mapHeaders/ViridianSchoolHouse.asm8
-rwxr-xr-xdata/mapHeaders/WardensHouse.asm8
-rwxr-xr-xdata/mapObjects/AgathasRoom.asm19
-rw-r--r--data/mapObjects/BeachHouse.asm20
-rwxr-xr-xdata/mapObjects/BikeShop.asm17
-rwxr-xr-xdata/mapObjects/BillsHouse.asm17
-rwxr-xr-xdata/mapObjects/BluesHouse.asm17
-rwxr-xr-xdata/mapObjects/BrunosRoom.asm19
-rwxr-xr-xdata/mapObjects/CeladonChiefHouse.asm17
-rwxr-xr-xdata/mapObjects/CeladonCity.asm54
-rwxr-xr-xdata/mapObjects/CeladonDiner.asm19
-rwxr-xr-xdata/mapObjects/CeladonGym.asm22
-rwxr-xr-xdata/mapObjects/CeladonHotel.asm17
-rwxr-xr-xdata/mapObjects/CeladonMansion1F.asm25
-rwxr-xr-xdata/mapObjects/CeladonMansion2F.asm19
-rwxr-xr-xdata/mapObjects/CeladonMansion3F.asm26
-rwxr-xr-xdata/mapObjects/CeladonMansionRoof.asm17
-rwxr-xr-xdata/mapObjects/CeladonMansionRoofHouse.asm16
-rwxr-xr-xdata/mapObjects/CeladonMart1F.asm25
-rwxr-xr-xdata/mapObjects/CeladonMart2F.asm21
-rwxr-xr-xdata/mapObjects/CeladonMart3F.asm33
-rwxr-xr-xdata/mapObjects/CeladonMart4F.asm20
-rwxr-xr-xdata/mapObjects/CeladonMart5F.asm21
-rwxr-xr-xdata/mapObjects/CeladonMartElevator.asm15
-rwxr-xr-xdata/mapObjects/CeladonMartRoof.asm18
-rwxr-xr-xdata/mapObjects/CeladonPokecenter.asm19
-rwxr-xr-xdata/mapObjects/CeruleanBadgeHouse.asm17
-rwxr-xr-xdata/mapObjects/CeruleanCave1F.asm32
-rwxr-xr-xdata/mapObjects/CeruleanCave2F.asm26
-rwxr-xr-xdata/mapObjects/CeruleanCaveB1F.asm17
-rwxr-xr-xdata/mapObjects/CeruleanCity.asm47
-rwxr-xr-xdata/mapObjects/CeruleanGym.asm18
-rwxr-xr-xdata/mapObjects/CeruleanMart.asm17
-rwxr-xr-xdata/mapObjects/CeruleanPokecenter.asm19
-rwxr-xr-xdata/mapObjects/CeruleanTradeHouse.asm18
-rwxr-xr-xdata/mapObjects/CeruleanTrashedHouse.asm19
-rwxr-xr-xdata/mapObjects/ChampionsRoom.asm20
-rwxr-xr-xdata/mapObjects/CinnabarGym.asm23
-rwxr-xr-xdata/mapObjects/CinnabarIsland.asm27
-rwxr-xr-xdata/mapObjects/CinnabarLab.asm25
-rwxr-xr-xdata/mapObjects/CinnabarLabFossilRoom.asm16
-rwxr-xr-xdata/mapObjects/CinnabarLabMetronomeRoom.asm19
-rwxr-xr-xdata/mapObjects/CinnabarLabTradeRoom.asm17
-rwxr-xr-xdata/mapObjects/CinnabarMart.asm17
-rwxr-xr-xdata/mapObjects/CinnabarPokecenter.asm19
-rw-r--r--data/mapObjects/Colosseum.asm9
-rwxr-xr-xdata/mapObjects/CopycatsHouse1F.asm19
-rwxr-xr-xdata/mapObjects/CopycatsHouse2F.asm19
-rwxr-xr-xdata/mapObjects/Daycare.asm15
-rwxr-xr-xdata/mapObjects/DiglettsCave.asm14
-rwxr-xr-xdata/mapObjects/DiglettsCaveRoute11.asm17
-rwxr-xr-xdata/mapObjects/DiglettsCaveRoute2.asm17
-rwxr-xr-xdata/mapObjects/FightingDojo.asm21
-rwxr-xr-xdata/mapObjects/FuchsiaBillsGrandpasHouse.asm17
-rwxr-xr-xdata/mapObjects/FuchsiaCity.asm52
-rwxr-xr-xdata/mapObjects/FuchsiaGoodRodHouse.asm17
-rwxr-xr-xdata/mapObjects/FuchsiaGym.asm22
-rwxr-xr-xdata/mapObjects/FuchsiaMart.asm17
-rwxr-xr-xdata/mapObjects/FuchsiaMeetingRoom.asm17
-rwxr-xr-xdata/mapObjects/FuchsiaPokecenter.asm19
-rwxr-xr-xdata/mapObjects/GameCorner.asm28
-rwxr-xr-xdata/mapObjects/GameCornerPrizeRoom.asm19
-rwxr-xr-xdata/mapObjects/HallOfFame.asm15
-rwxr-xr-xdata/mapObjects/IndigoPlateau.asm14
-rwxr-xr-xdata/mapObjects/IndigoPlateauLobby.asm22
-rwxr-xr-xdata/mapObjects/LancesRoom.asm17
-rwxr-xr-xdata/mapObjects/LavenderCuboneHouse.asm16
-rwxr-xr-xdata/mapObjects/LavenderMart.asm17
-rwxr-xr-xdata/mapObjects/LavenderPokecenter.asm19
-rwxr-xr-xdata/mapObjects/LavenderTown.asm31
-rwxr-xr-xdata/mapObjects/LoreleisRoom.asm19
-rwxr-xr-xdata/mapObjects/MrFujisHouse.asm20
-rwxr-xr-xdata/mapObjects/MrPsychicsHouse.asm15
-rwxr-xr-xdata/mapObjects/MtMoon1F.asm34
-rwxr-xr-xdata/mapObjects/MtMoonB1F.asm26
-rwxr-xr-xdata/mapObjects/MtMoonB2F.asm28
-rwxr-xr-xdata/mapObjects/MtMoonPokecenter.asm21
-rwxr-xr-xdata/mapObjects/Museum1F.asm25
-rwxr-xr-xdata/mapObjects/Museum2F.asm19
-rwxr-xr-xdata/mapObjects/NameRatersHouse.asm15
-rwxr-xr-xdata/mapObjects/OaksLab.asm23
-rwxr-xr-xdata/mapObjects/PalletTown.asm23
-rwxr-xr-xdata/mapObjects/PewterCity.asm36
-rwxr-xr-xdata/mapObjects/PewterGym.asm17
-rwxr-xr-xdata/mapObjects/PewterMart.asm17
-rwxr-xr-xdata/mapObjects/PewterNidoranHouse.asm17
-rwxr-xr-xdata/mapObjects/PewterPokecenter.asm20
-rwxr-xr-xdata/mapObjects/PewterSpeechHouse.asm16
-rwxr-xr-xdata/mapObjects/PokemonFanClub.asm20
-rwxr-xr-xdata/mapObjects/PokemonMansion1F.asm29
-rwxr-xr-xdata/mapObjects/PokemonMansion2F.asm22
-rwxr-xr-xdata/mapObjects/PokemonMansion3F.asm21
-rwxr-xr-xdata/mapObjects/PokemonMansionB1F.asm20
-rwxr-xr-xdata/mapObjects/PokemonTower1F.asm21
-rwxr-xr-xdata/mapObjects/PokemonTower2F.asm16
-rwxr-xr-xdata/mapObjects/PokemonTower3F.asm18
-rwxr-xr-xdata/mapObjects/PokemonTower4F.asm20
-rwxr-xr-xdata/mapObjects/PokemonTower5F.asm20
-rwxr-xr-xdata/mapObjects/PokemonTower6F.asm19
-rwxr-xr-xdata/mapObjects/PokemonTower7F.asm15
-rwxr-xr-xdata/mapObjects/PowerPlant.asm30
-rwxr-xr-xdata/mapObjects/RedsHouse1F.asm18
-rwxr-xr-xdata/mapObjects/RedsHouse2F.asm12
-rwxr-xr-xdata/mapObjects/RockTunnel1F.asm34
-rwxr-xr-xdata/mapObjects/RockTunnelB1F.asm26
-rwxr-xr-xdata/mapObjects/RockTunnelPokecenter.asm19
-rwxr-xr-xdata/mapObjects/RocketHideoutB1F.asm27
-rwxr-xr-xdata/mapObjects/RocketHideoutB2F.asm25
-rwxr-xr-xdata/mapObjects/RocketHideoutB3F.asm18
-rwxr-xr-xdata/mapObjects/RocketHideoutB4F.asm25
-rwxr-xr-xdata/mapObjects/RocketHideoutElevator.asm15
-rwxr-xr-xdata/mapObjects/Route1.asm14
-rwxr-xr-xdata/mapObjects/Route10.asm28
-rwxr-xr-xdata/mapObjects/Route11.asm31
-rwxr-xr-xdata/mapObjects/Route11Gate1F.asm21
-rwxr-xr-xdata/mapObjects/Route11Gate2F.asm16
-rwxr-xr-xdata/mapObjects/Route12.asm30
-rwxr-xr-xdata/mapObjects/Route12Gate1F.asm21
-rwxr-xr-xdata/mapObjects/Route12Gate2F.asm15
-rwxr-xr-xdata/mapObjects/Route12SuperRodHouse.asm15
-rwxr-xr-xdata/mapObjects/Route13.asm21
-rwxr-xr-xdata/mapObjects/Route14.asm19
-rwxr-xr-xdata/mapObjects/Route15.asm30
-rwxr-xr-xdata/mapObjects/Route15Gate1F.asm21
-rwxr-xr-xdata/mapObjects/Route15Gate2F.asm14
-rwxr-xr-xdata/mapObjects/Route16.asm37
-rwxr-xr-xdata/mapObjects/Route16FlyHouse.asm16
-rwxr-xr-xdata/mapObjects/Route16Gate1F.asm30
-rwxr-xr-xdata/mapObjects/Route16Gate2F.asm16
-rwxr-xr-xdata/mapObjects/Route17.asm24
-rwxr-xr-xdata/mapObjects/Route18.asm23
-rwxr-xr-xdata/mapObjects/Route18Gate1F.asm21
-rwxr-xr-xdata/mapObjects/Route18Gate2F.asm15
-rwxr-xr-xdata/mapObjects/Route19.asm23
-rwxr-xr-xdata/mapObjects/Route2.asm36
-rwxr-xr-xdata/mapObjects/Route20.asm26
-rwxr-xr-xdata/mapObjects/Route21.asm17
-rwxr-xr-xdata/mapObjects/Route22.asm15
-rwxr-xr-xdata/mapObjects/Route22Gate.asm19
-rwxr-xr-xdata/mapObjects/Route23.asm26
-rwxr-xr-xdata/mapObjects/Route24.asm17
-rwxr-xr-xdata/mapObjects/Route25.asm23
-rwxr-xr-xdata/mapObjects/Route2Gate.asm20
-rwxr-xr-xdata/mapObjects/Route2TradeHouse.asm16
-rwxr-xr-xdata/mapObjects/Route3.asm18
-rwxr-xr-xdata/mapObjects/Route4.asm22
-rwxr-xr-xdata/mapObjects/Route5.asm21
-rwxr-xr-xdata/mapObjects/Route5Gate.asm19
-rwxr-xr-xdata/mapObjects/Route6.asm25
-rwxr-xr-xdata/mapObjects/Route6Gate.asm19
-rwxr-xr-xdata/mapObjects/Route7.asm21
-rwxr-xr-xdata/mapObjects/Route7Gate.asm19
-rwxr-xr-xdata/mapObjects/Route8.asm30
-rwxr-xr-xdata/mapObjects/Route8Gate.asm19
-rwxr-xr-xdata/mapObjects/Route9.asm19
-rwxr-xr-xdata/mapObjects/SSAnne1F.asm34
-rwxr-xr-xdata/mapObjects/SSAnne1FRooms.asm33
-rwxr-xr-xdata/mapObjects/SSAnne2F.asm30
-rwxr-xr-xdata/mapObjects/SSAnne2FRooms.asm47
-rwxr-xr-xdata/mapObjects/SSAnne3F.asm15
-rwxr-xr-xdata/mapObjects/SSAnneB1F.asm22
-rwxr-xr-xdata/mapObjects/SSAnneB1FRooms.asm41
-rwxr-xr-xdata/mapObjects/SSAnneBow.asm19
-rwxr-xr-xdata/mapObjects/SSAnneCaptainsRoom.asm15
-rwxr-xr-xdata/mapObjects/SSAnneKitchen.asm19
-rwxr-xr-xdata/mapObjects/SafariZoneCenter.asm31
-rwxr-xr-xdata/mapObjects/SafariZoneCenterRestHouse.asm16
-rwxr-xr-xdata/mapObjects/SafariZoneEast.asm27
-rwxr-xr-xdata/mapObjects/SafariZoneEastRestHouse.asm17
-rwxr-xr-xdata/mapObjects/SafariZoneGate.asm20
-rwxr-xr-xdata/mapObjects/SafariZoneNorth.asm35
-rwxr-xr-xdata/mapObjects/SafariZoneNorthRestHouse.asm17
-rwxr-xr-xdata/mapObjects/SafariZoneSecretHouse.asm15
-rwxr-xr-xdata/mapObjects/SafariZoneWest.asm34
-rwxr-xr-xdata/mapObjects/SafariZoneWestRestHouse.asm17
-rwxr-xr-xdata/mapObjects/SaffronCity.asm50
-rwxr-xr-xdata/mapObjects/SaffronGym.asm83
-rwxr-xr-xdata/mapObjects/SaffronMart.asm17
-rwxr-xr-xdata/mapObjects/SaffronPidgeyHouse.asm18
-rwxr-xr-xdata/mapObjects/SaffronPokecenter.asm19
-rwxr-xr-xdata/mapObjects/SeafoamIslands1F.asm26
-rwxr-xr-xdata/mapObjects/SeafoamIslandsB1F.asm26
-rwxr-xr-xdata/mapObjects/SeafoamIslandsB2F.asm26
-rwxr-xr-xdata/mapObjects/SeafoamIslandsB3F.asm30
-rwxr-xr-xdata/mapObjects/SeafoamIslandsB4F.asm23
-rwxr-xr-xdata/mapObjects/SilphCo10F.asm28
-rwxr-xr-xdata/mapObjects/SilphCo11F.asm24
-rwxr-xr-xdata/mapObjects/SilphCo1F.asm21
-rwxr-xr-xdata/mapObjects/SilphCo2F.asm29
-rwxr-xr-xdata/mapObjects/SilphCo3F.asm34
-rwxr-xr-xdata/mapObjects/SilphCo4F.asm31
-rwxr-xr-xdata/mapObjects/SilphCo5F.asm35
-rwxr-xr-xdata/mapObjects/SilphCo6F.asm30
-rwxr-xr-xdata/mapObjects/SilphCo7F.asm33
-rwxr-xr-xdata/mapObjects/SilphCo8F.asm28
-rwxr-xr-xdata/mapObjects/SilphCo9F.asm24
-rwxr-xr-xdata/mapObjects/SilphCoElevator.asm15
-rw-r--r--data/mapObjects/TradeCenter.asm9
-rwxr-xr-xdata/mapObjects/UndergroundPathNorthSouth.asm14
-rwxr-xr-xdata/mapObjects/UndergroundPathRoute5.asm17
-rwxr-xr-xdata/mapObjects/UndergroundPathRoute6.asm17
-rwxr-xr-xdata/mapObjects/UndergroundPathRoute7.asm17
-rwxr-xr-xdata/mapObjects/UndergroundPathRoute7Copy.asm18
-rwxr-xr-xdata/mapObjects/UndergroundPathRoute8.asm17
-rwxr-xr-xdata/mapObjects/UndergroundPathWestEast.asm14
-rwxr-xr-xdata/mapObjects/VermilionCity.asm42
-rwxr-xr-xdata/mapObjects/VermilionDock.asm14
-rwxr-xr-xdata/mapObjects/VermilionGym.asm19
-rwxr-xr-xdata/mapObjects/VermilionMart.asm17
-rwxr-xr-xdata/mapObjects/VermilionOldRodHouse.asm15
-rwxr-xr-xdata/mapObjects/VermilionPidgeyHouse.asm17
-rwxr-xr-xdata/mapObjects/VermilionPokecenter.asm19
-rwxr-xr-xdata/mapObjects/VermilionTradeHouse.asm15
-rwxr-xr-xdata/mapObjects/VictoryRoad1F.asm23
-rwxr-xr-xdata/mapObjects/VictoryRoad2F.asm37
-rwxr-xr-xdata/mapObjects/VictoryRoad3F.asm28
-rwxr-xr-xdata/mapObjects/ViridianCity.asm34
-rwxr-xr-xdata/mapObjects/ViridianForest.asm38
-rwxr-xr-xdata/mapObjects/ViridianForestNorthGate.asm20
-rwxr-xr-xdata/mapObjects/ViridianForestSouthGate.asm20
-rwxr-xr-xdata/mapObjects/ViridianGym.asm25
-rwxr-xr-xdata/mapObjects/ViridianMart.asm17
-rwxr-xr-xdata/mapObjects/ViridianNicknameHouse.asm18
-rwxr-xr-xdata/mapObjects/ViridianPokecenter.asm19
-rwxr-xr-xdata/mapObjects/ViridianSchoolHouse.asm17
-rwxr-xr-xdata/mapObjects/WardensHouse.asm19
-rw-r--r--data/map_header_banks.asm251
-rw-r--r--data/map_songs.asm250
-rw-r--r--data/maps/badge_maps.asm10
-rw-r--r--data/maps/dungeon_maps.asm27
-rwxr-xr-xdata/maps/force_bike_surf.asm15
-rwxr-xr-xdata/maps/headers/AgathasRoom.asm3
-rw-r--r--data/maps/headers/BeachHouse.asm (renamed from data/mapHeaders/BeachHouse.asm)0
-rwxr-xr-xdata/maps/headers/BikeShop.asm3
-rwxr-xr-xdata/maps/headers/BillsHouse.asm3
-rwxr-xr-xdata/maps/headers/BluesHouse.asm3
-rwxr-xr-xdata/maps/headers/BrunosRoom.asm3
-rwxr-xr-xdata/maps/headers/CeladonChiefHouse.asm3
-rwxr-xr-xdata/maps/headers/CeladonCity.asm5
-rwxr-xr-xdata/maps/headers/CeladonDiner.asm3
-rwxr-xr-xdata/maps/headers/CeladonGym.asm3
-rwxr-xr-xdata/maps/headers/CeladonHotel.asm3
-rwxr-xr-xdata/maps/headers/CeladonMansion1F.asm3
-rwxr-xr-xdata/maps/headers/CeladonMansion2F.asm3
-rwxr-xr-xdata/maps/headers/CeladonMansion3F.asm3
-rwxr-xr-xdata/maps/headers/CeladonMansionRoof.asm3
-rwxr-xr-xdata/maps/headers/CeladonMansionRoofHouse.asm3
-rwxr-xr-xdata/maps/headers/CeladonMart1F.asm3
-rwxr-xr-xdata/maps/headers/CeladonMart2F.asm3
-rwxr-xr-xdata/maps/headers/CeladonMart3F.asm3
-rwxr-xr-xdata/maps/headers/CeladonMart4F.asm3
-rwxr-xr-xdata/maps/headers/CeladonMart5F.asm3
-rwxr-xr-xdata/maps/headers/CeladonMartElevator.asm3
-rwxr-xr-xdata/maps/headers/CeladonMartRoof.asm3
-rwxr-xr-xdata/maps/headers/CeladonPokecenter.asm3
-rwxr-xr-xdata/maps/headers/CeruleanBadgeHouse.asm3
-rwxr-xr-xdata/maps/headers/CeruleanCave1F.asm3
-rwxr-xr-xdata/maps/headers/CeruleanCave2F.asm3
-rwxr-xr-xdata/maps/headers/CeruleanCaveB1F.asm3
-rwxr-xr-xdata/maps/headers/CeruleanCity.asm7
-rwxr-xr-xdata/maps/headers/CeruleanGym.asm3
-rwxr-xr-xdata/maps/headers/CeruleanMart.asm3
-rwxr-xr-xdata/maps/headers/CeruleanPokecenter.asm3
-rwxr-xr-xdata/maps/headers/CeruleanTradeHouse.asm3
-rwxr-xr-xdata/maps/headers/CeruleanTrashedHouse.asm3
-rwxr-xr-xdata/maps/headers/ChampionsRoom.asm3
-rwxr-xr-xdata/maps/headers/CinnabarGym.asm3
-rwxr-xr-xdata/maps/headers/CinnabarIsland.asm5
-rwxr-xr-xdata/maps/headers/CinnabarLab.asm3
-rwxr-xr-xdata/maps/headers/CinnabarLabFossilRoom.asm3
-rwxr-xr-xdata/maps/headers/CinnabarLabMetronomeRoom.asm3
-rwxr-xr-xdata/maps/headers/CinnabarLabTradeRoom.asm3
-rwxr-xr-xdata/maps/headers/CinnabarMart.asm3
-rwxr-xr-xdata/maps/headers/CinnabarPokecenter.asm3
-rwxr-xr-xdata/maps/headers/Colosseum.asm3
-rwxr-xr-xdata/maps/headers/CopycatsHouse1F.asm3
-rwxr-xr-xdata/maps/headers/CopycatsHouse2F.asm3
-rwxr-xr-xdata/maps/headers/Daycare.asm3
-rwxr-xr-xdata/maps/headers/DiglettsCave.asm3
-rwxr-xr-xdata/maps/headers/DiglettsCaveRoute11.asm3
-rwxr-xr-xdata/maps/headers/DiglettsCaveRoute2.asm3
-rwxr-xr-xdata/maps/headers/FightingDojo.asm3
-rwxr-xr-xdata/maps/headers/FuchsiaBillsGrandpasHouse.asm3
-rwxr-xr-xdata/maps/headers/FuchsiaCity.asm6
-rwxr-xr-xdata/maps/headers/FuchsiaGoodRodHouse.asm3
-rwxr-xr-xdata/maps/headers/FuchsiaGym.asm3
-rwxr-xr-xdata/maps/headers/FuchsiaMart.asm3
-rwxr-xr-xdata/maps/headers/FuchsiaMeetingRoom.asm3
-rwxr-xr-xdata/maps/headers/FuchsiaPokecenter.asm3
-rwxr-xr-xdata/maps/headers/GameCorner.asm3
-rwxr-xr-xdata/maps/headers/GameCornerPrizeRoom.asm3
-rwxr-xr-xdata/maps/headers/HallOfFame.asm3
-rwxr-xr-xdata/maps/headers/IndigoPlateau.asm4
-rwxr-xr-xdata/maps/headers/IndigoPlateauLobby.asm3
-rwxr-xr-xdata/maps/headers/LancesRoom.asm3
-rwxr-xr-xdata/maps/headers/LavenderCuboneHouse.asm3
-rwxr-xr-xdata/maps/headers/LavenderMart.asm3
-rwxr-xr-xdata/maps/headers/LavenderPokecenter.asm3
-rwxr-xr-xdata/maps/headers/LavenderTown.asm6
-rwxr-xr-xdata/maps/headers/LoreleisRoom.asm3
-rwxr-xr-xdata/maps/headers/MrFujisHouse.asm3
-rwxr-xr-xdata/maps/headers/MrPsychicsHouse.asm3
-rwxr-xr-xdata/maps/headers/MtMoon1F.asm3
-rwxr-xr-xdata/maps/headers/MtMoonB1F.asm3
-rwxr-xr-xdata/maps/headers/MtMoonB2F.asm3
-rwxr-xr-xdata/maps/headers/MtMoonPokecenter.asm3
-rwxr-xr-xdata/maps/headers/Museum1F.asm3
-rwxr-xr-xdata/maps/headers/Museum2F.asm3
-rwxr-xr-xdata/maps/headers/NameRatersHouse.asm3
-rwxr-xr-xdata/maps/headers/OaksLab.asm3
-rwxr-xr-xdata/maps/headers/PalletTown.asm5
-rwxr-xr-xdata/maps/headers/PewterCity.asm5
-rwxr-xr-xdata/maps/headers/PewterGym.asm3
-rwxr-xr-xdata/maps/headers/PewterMart.asm3
-rwxr-xr-xdata/maps/headers/PewterNidoranHouse.asm3
-rwxr-xr-xdata/maps/headers/PewterPokecenter.asm3
-rwxr-xr-xdata/maps/headers/PewterSpeechHouse.asm3
-rwxr-xr-xdata/maps/headers/PokemonFanClub.asm3
-rwxr-xr-xdata/maps/headers/PokemonMansion1F.asm3
-rwxr-xr-xdata/maps/headers/PokemonMansion2F.asm3
-rwxr-xr-xdata/maps/headers/PokemonMansion3F.asm3
-rwxr-xr-xdata/maps/headers/PokemonMansionB1F.asm3
-rwxr-xr-xdata/maps/headers/PokemonTower1F.asm3
-rwxr-xr-xdata/maps/headers/PokemonTower2F.asm3
-rwxr-xr-xdata/maps/headers/PokemonTower3F.asm3
-rwxr-xr-xdata/maps/headers/PokemonTower4F.asm3
-rwxr-xr-xdata/maps/headers/PokemonTower5F.asm3
-rwxr-xr-xdata/maps/headers/PokemonTower6F.asm3
-rwxr-xr-xdata/maps/headers/PokemonTower7F.asm3
-rwxr-xr-xdata/maps/headers/PowerPlant.asm3
-rwxr-xr-xdata/maps/headers/RedsHouse1F.asm3
-rwxr-xr-xdata/maps/headers/RedsHouse2F.asm3
-rwxr-xr-xdata/maps/headers/RockTunnel1F.asm3
-rwxr-xr-xdata/maps/headers/RockTunnelB1F.asm3
-rwxr-xr-xdata/maps/headers/RockTunnelPokecenter.asm3
-rwxr-xr-xdata/maps/headers/RocketHideoutB1F.asm3
-rwxr-xr-xdata/maps/headers/RocketHideoutB2F.asm3
-rwxr-xr-xdata/maps/headers/RocketHideoutB3F.asm3
-rwxr-xr-xdata/maps/headers/RocketHideoutB4F.asm3
-rwxr-xr-xdata/maps/headers/RocketHideoutElevator.asm3
-rwxr-xr-xdata/maps/headers/Route1.asm5
-rwxr-xr-xdata/maps/headers/Route10.asm5
-rwxr-xr-xdata/maps/headers/Route11.asm5
-rwxr-xr-xdata/maps/headers/Route11Gate1F.asm3
-rwxr-xr-xdata/maps/headers/Route11Gate2F.asm3
-rwxr-xr-xdata/maps/headers/Route12.asm6
-rwxr-xr-xdata/maps/headers/Route12Gate1F.asm3
-rwxr-xr-xdata/maps/headers/Route12Gate2F.asm3
-rwxr-xr-xdata/maps/headers/Route12SuperRodHouse.asm3
-rwxr-xr-xdata/maps/headers/Route13.asm5
-rwxr-xr-xdata/maps/headers/Route14.asm5
-rwxr-xr-xdata/maps/headers/Route15.asm5
-rwxr-xr-xdata/maps/headers/Route15Gate1F.asm3
-rwxr-xr-xdata/maps/headers/Route15Gate2F.asm3
-rwxr-xr-xdata/maps/headers/Route16.asm5
-rwxr-xr-xdata/maps/headers/Route16FlyHouse.asm3
-rwxr-xr-xdata/maps/headers/Route16Gate1F.asm3
-rwxr-xr-xdata/maps/headers/Route16Gate2F.asm3
-rwxr-xr-xdata/maps/headers/Route17.asm5
-rwxr-xr-xdata/maps/headers/Route18.asm5
-rwxr-xr-xdata/maps/headers/Route18Gate1F.asm3
-rwxr-xr-xdata/maps/headers/Route18Gate2F.asm3
-rwxr-xr-xdata/maps/headers/Route19.asm5
-rwxr-xr-xdata/maps/headers/Route2.asm5
-rwxr-xr-xdata/maps/headers/Route20.asm5
-rwxr-xr-xdata/maps/headers/Route21.asm5
-rwxr-xr-xdata/maps/headers/Route22.asm5
-rwxr-xr-xdata/maps/headers/Route22Gate.asm3
-rwxr-xr-xdata/maps/headers/Route23.asm5
-rwxr-xr-xdata/maps/headers/Route24.asm5
-rwxr-xr-xdata/maps/headers/Route25.asm4
-rwxr-xr-xdata/maps/headers/Route2Gate.asm3
-rwxr-xr-xdata/maps/headers/Route2TradeHouse.asm3
-rwxr-xr-xdata/maps/headers/Route3.asm5
-rwxr-xr-xdata/maps/headers/Route4.asm5
-rwxr-xr-xdata/maps/headers/Route5.asm5
-rwxr-xr-xdata/maps/headers/Route5Gate.asm3
-rwxr-xr-xdata/maps/headers/Route6.asm5
-rwxr-xr-xdata/maps/headers/Route6Gate.asm3
-rwxr-xr-xdata/maps/headers/Route7.asm5
-rwxr-xr-xdata/maps/headers/Route7Gate.asm3
-rwxr-xr-xdata/maps/headers/Route8.asm5
-rwxr-xr-xdata/maps/headers/Route8Gate.asm3
-rwxr-xr-xdata/maps/headers/Route9.asm5
-rwxr-xr-xdata/maps/headers/SSAnne1F.asm3
-rwxr-xr-xdata/maps/headers/SSAnne1FRooms.asm3
-rwxr-xr-xdata/maps/headers/SSAnne2F.asm3
-rwxr-xr-xdata/maps/headers/SSAnne2FRooms.asm3
-rwxr-xr-xdata/maps/headers/SSAnne3F.asm3
-rwxr-xr-xdata/maps/headers/SSAnneB1F.asm3
-rwxr-xr-xdata/maps/headers/SSAnneB1FRooms.asm3
-rwxr-xr-xdata/maps/headers/SSAnneBow.asm3
-rwxr-xr-xdata/maps/headers/SSAnneCaptainsRoom.asm3
-rwxr-xr-xdata/maps/headers/SSAnneKitchen.asm3
-rwxr-xr-xdata/maps/headers/SafariZoneCenter.asm3
-rwxr-xr-xdata/maps/headers/SafariZoneCenterRestHouse.asm3
-rwxr-xr-xdata/maps/headers/SafariZoneEast.asm3
-rwxr-xr-xdata/maps/headers/SafariZoneEastRestHouse.asm3
-rwxr-xr-xdata/maps/headers/SafariZoneGate.asm3
-rwxr-xr-xdata/maps/headers/SafariZoneNorth.asm3
-rwxr-xr-xdata/maps/headers/SafariZoneNorthRestHouse.asm3
-rwxr-xr-xdata/maps/headers/SafariZoneSecretHouse.asm3
-rwxr-xr-xdata/maps/headers/SafariZoneWest.asm3
-rwxr-xr-xdata/maps/headers/SafariZoneWestRestHouse.asm3
-rwxr-xr-xdata/maps/headers/SaffronCity.asm7
-rwxr-xr-xdata/maps/headers/SaffronGym.asm3
-rwxr-xr-xdata/maps/headers/SaffronMart.asm3
-rwxr-xr-xdata/maps/headers/SaffronPidgeyHouse.asm3
-rwxr-xr-xdata/maps/headers/SaffronPokecenter.asm3
-rwxr-xr-xdata/maps/headers/SeafoamIslands1F.asm3
-rwxr-xr-xdata/maps/headers/SeafoamIslandsB1F.asm3
-rwxr-xr-xdata/maps/headers/SeafoamIslandsB2F.asm3
-rwxr-xr-xdata/maps/headers/SeafoamIslandsB3F.asm3
-rwxr-xr-xdata/maps/headers/SeafoamIslandsB4F.asm3
-rwxr-xr-xdata/maps/headers/SilphCo10F.asm3
-rwxr-xr-xdata/maps/headers/SilphCo11F.asm3
-rwxr-xr-xdata/maps/headers/SilphCo1F.asm3
-rwxr-xr-xdata/maps/headers/SilphCo2F.asm3
-rwxr-xr-xdata/maps/headers/SilphCo3F.asm3
-rwxr-xr-xdata/maps/headers/SilphCo4F.asm3
-rwxr-xr-xdata/maps/headers/SilphCo5F.asm3
-rwxr-xr-xdata/maps/headers/SilphCo6F.asm3
-rwxr-xr-xdata/maps/headers/SilphCo7F.asm3
-rwxr-xr-xdata/maps/headers/SilphCo8F.asm3
-rwxr-xr-xdata/maps/headers/SilphCo9F.asm3
-rwxr-xr-xdata/maps/headers/SilphCoElevator.asm3
-rwxr-xr-xdata/maps/headers/TradeCenter.asm3
-rwxr-xr-xdata/maps/headers/UndergroundPathNorthSouth.asm3
-rwxr-xr-xdata/maps/headers/UndergroundPathRoute5.asm3
-rwxr-xr-xdata/maps/headers/UndergroundPathRoute6.asm3
-rwxr-xr-xdata/maps/headers/UndergroundPathRoute7.asm3
-rwxr-xr-xdata/maps/headers/UndergroundPathRoute7Copy.asm3
-rwxr-xr-xdata/maps/headers/UndergroundPathRoute8.asm3
-rwxr-xr-xdata/maps/headers/UndergroundPathWestEast.asm3
-rwxr-xr-xdata/maps/headers/VermilionCity.asm5
-rwxr-xr-xdata/maps/headers/VermilionDock.asm3
-rwxr-xr-xdata/maps/headers/VermilionGym.asm3
-rwxr-xr-xdata/maps/headers/VermilionMart.asm3
-rwxr-xr-xdata/maps/headers/VermilionOldRodHouse.asm3
-rwxr-xr-xdata/maps/headers/VermilionPidgeyHouse.asm3
-rwxr-xr-xdata/maps/headers/VermilionPokecenter.asm3
-rwxr-xr-xdata/maps/headers/VermilionTradeHouse.asm3
-rwxr-xr-xdata/maps/headers/VictoryRoad1F.asm3
-rwxr-xr-xdata/maps/headers/VictoryRoad2F.asm3
-rwxr-xr-xdata/maps/headers/VictoryRoad3F.asm3
-rwxr-xr-xdata/maps/headers/ViridianCity.asm6
-rwxr-xr-xdata/maps/headers/ViridianForest.asm3
-rwxr-xr-xdata/maps/headers/ViridianForestNorthGate.asm3
-rwxr-xr-xdata/maps/headers/ViridianForestSouthGate.asm3
-rwxr-xr-xdata/maps/headers/ViridianGym.asm3
-rwxr-xr-xdata/maps/headers/ViridianMart.asm3
-rwxr-xr-xdata/maps/headers/ViridianNicknameHouse.asm3
-rwxr-xr-xdata/maps/headers/ViridianPokecenter.asm3
-rwxr-xr-xdata/maps/headers/ViridianSchoolHouse.asm3
-rwxr-xr-xdata/maps/headers/WardensHouse.asm3
-rwxr-xr-xdata/maps/hide_show_data.asm581
-rw-r--r--data/maps/map_header_banks.asm251
-rw-r--r--data/maps/map_header_pointers.asm (renamed from data/map_header_pointers.asm)0
-rwxr-xr-xdata/maps/names.asm54
-rwxr-xr-xdata/maps/objects/AgathasRoom.asm15
-rw-r--r--data/maps/objects/BeachHouse.asm18
-rwxr-xr-xdata/maps/objects/BikeShop.asm15
-rwxr-xr-xdata/maps/objects/BillsHouse.asm15
-rwxr-xr-xdata/maps/objects/BluesHouse.asm15
-rwxr-xr-xdata/maps/objects/BrunosRoom.asm15
-rwxr-xr-xdata/maps/objects/CeladonChiefHouse.asm15
-rwxr-xr-xdata/maps/objects/CeladonCity.asm41
-rwxr-xr-xdata/maps/objects/CeladonDiner.asm17
-rwxr-xr-xdata/maps/objects/CeladonGym.asm20
-rwxr-xr-xdata/maps/objects/CeladonHotel.asm15
-rwxr-xr-xdata/maps/objects/CeladonMansion1F.asm20
-rwxr-xr-xdata/maps/objects/CeladonMansion2F.asm15
-rwxr-xr-xdata/maps/objects/CeladonMansion3F.asm22
-rwxr-xr-xdata/maps/objects/CeladonMansionRoof.asm14
-rwxr-xr-xdata/maps/objects/CeladonMansionRoofHouse.asm14
-rwxr-xr-xdata/maps/objects/CeladonMart1F.asm19
-rwxr-xr-xdata/maps/objects/CeladonMart2F.asm18
-rwxr-xr-xdata/maps/objects/CeladonMart3F.asm30
-rwxr-xr-xdata/maps/objects/CeladonMart4F.asm17
-rwxr-xr-xdata/maps/objects/CeladonMart5F.asm18
-rwxr-xr-xdata/maps/objects/CeladonMartElevator.asm13
-rwxr-xr-xdata/maps/objects/CeladonMartRoof.asm17
-rwxr-xr-xdata/maps/objects/CeladonPokecenter.asm17
-rwxr-xr-xdata/maps/objects/CeruleanBadgeHouse.asm14
-rwxr-xr-xdata/maps/objects/CeruleanCave1F.asm23
-rwxr-xr-xdata/maps/objects/CeruleanCave2F.asm20
-rwxr-xr-xdata/maps/objects/CeruleanCaveB1F.asm16
-rwxr-xr-xdata/maps/objects/CeruleanCity.asm37
-rwxr-xr-xdata/maps/objects/CeruleanGym.asm16
-rwxr-xr-xdata/maps/objects/CeruleanMart.asm15
-rwxr-xr-xdata/maps/objects/CeruleanPokecenter.asm17
-rwxr-xr-xdata/maps/objects/CeruleanTradeHouse.asm16
-rwxr-xr-xdata/maps/objects/CeruleanTrashedHouse.asm16
-rwxr-xr-xdata/maps/objects/ChampionsRoom.asm16
-rwxr-xr-xdata/maps/objects/CinnabarGym.asm21
-rwxr-xr-xdata/maps/objects/CinnabarIsland.asm22
-rwxr-xr-xdata/maps/objects/CinnabarLab.asm20
-rwxr-xr-xdata/maps/objects/CinnabarLabFossilRoom.asm14
-rwxr-xr-xdata/maps/objects/CinnabarLabMetronomeRoom.asm17
-rwxr-xr-xdata/maps/objects/CinnabarLabTradeRoom.asm15
-rwxr-xr-xdata/maps/objects/CinnabarMart.asm15
-rwxr-xr-xdata/maps/objects/CinnabarPokecenter.asm17
-rw-r--r--data/maps/objects/Colosseum.asm11
-rwxr-xr-xdata/maps/objects/CopycatsHouse1F.asm16
-rwxr-xr-xdata/maps/objects/CopycatsHouse2F.asm18
-rwxr-xr-xdata/maps/objects/Daycare.asm13
-rwxr-xr-xdata/maps/objects/DiglettsCave.asm12
-rwxr-xr-xdata/maps/objects/DiglettsCaveRoute11.asm14
-rwxr-xr-xdata/maps/objects/DiglettsCaveRoute2.asm14
-rwxr-xr-xdata/maps/objects/FightingDojo.asm19
-rwxr-xr-xdata/maps/objects/FuchsiaBillsGrandpasHouse.asm15
-rwxr-xr-xdata/maps/objects/FuchsiaCity.asm43
-rwxr-xr-xdata/maps/objects/FuchsiaGoodRodHouse.asm14
-rwxr-xr-xdata/maps/objects/FuchsiaGym.asm20
-rwxr-xr-xdata/maps/objects/FuchsiaMart.asm15
-rwxr-xr-xdata/maps/objects/FuchsiaMeetingRoom.asm15
-rwxr-xr-xdata/maps/objects/FuchsiaPokecenter.asm17
-rwxr-xr-xdata/maps/objects/GameCorner.asm25
-rwxr-xr-xdata/maps/objects/GameCornerPrizeRoom.asm17
-rwxr-xr-xdata/maps/objects/HallOfFame.asm13
-rwxr-xr-xdata/maps/objects/IndigoPlateau.asm12
-rwxr-xr-xdata/maps/objects/IndigoPlateauLobby.asm19
-rwxr-xr-xdata/maps/objects/LancesRoom.asm14
-rwxr-xr-xdata/maps/objects/LavenderCuboneHouse.asm14
-rwxr-xr-xdata/maps/objects/LavenderMart.asm15
-rwxr-xr-xdata/maps/objects/LavenderPokecenter.asm17
-rwxr-xr-xdata/maps/objects/LavenderTown.asm25
-rwxr-xr-xdata/maps/objects/LoreleisRoom.asm15
-rwxr-xr-xdata/maps/objects/MrFujisHouse.asm18
-rwxr-xr-xdata/maps/objects/MrPsychicsHouse.asm13
-rwxr-xr-xdata/maps/objects/MtMoon1F.asm29
-rwxr-xr-xdata/maps/objects/MtMoonB1F.asm18
-rwxr-xr-xdata/maps/objects/MtMoonB2F.asm24
-rwxr-xr-xdata/maps/objects/MtMoonPokecenter.asm19
-rwxr-xr-xdata/maps/objects/Museum1F.asm20
-rwxr-xr-xdata/maps/objects/Museum2F.asm18
-rwxr-xr-xdata/maps/objects/NameRatersHouse.asm13
-rwxr-xr-xdata/maps/objects/OaksLab.asm21
-rwxr-xr-xdata/maps/objects/PalletTown.asm20
-rwxr-xr-xdata/maps/objects/PewterCity.asm29
-rwxr-xr-xdata/maps/objects/PewterGym.asm15
-rwxr-xr-xdata/maps/objects/PewterMart.asm15
-rwxr-xr-xdata/maps/objects/PewterNidoranHouse.asm15
-rwxr-xr-xdata/maps/objects/PewterPokecenter.asm18
-rwxr-xr-xdata/maps/objects/PewterSpeechHouse.asm14
-rwxr-xr-xdata/maps/objects/PokemonFanClub.asm18
-rwxr-xr-xdata/maps/objects/PokemonMansion1F.asm21
-rwxr-xr-xdata/maps/objects/PokemonMansion2F.asm18
-rwxr-xr-xdata/maps/objects/PokemonMansion3F.asm18
-rwxr-xr-xdata/maps/objects/PokemonMansionB1F.asm19
-rwxr-xr-xdata/maps/objects/PokemonTower1F.asm18
-rwxr-xr-xdata/maps/objects/PokemonTower2F.asm14
-rwxr-xr-xdata/maps/objects/PokemonTower3F.asm16
-rwxr-xr-xdata/maps/objects/PokemonTower4F.asm18
-rwxr-xr-xdata/maps/objects/PokemonTower5F.asm18
-rwxr-xr-xdata/maps/objects/PokemonTower6F.asm17
-rwxr-xr-xdata/maps/objects/PokemonTower7F.asm14
-rwxr-xr-xdata/maps/objects/PowerPlant.asm27
-rwxr-xr-xdata/maps/objects/RedsHouse1F.asm15
-rwxr-xr-xdata/maps/objects/RedsHouse2F.asm11
-rwxr-xr-xdata/maps/objects/RockTunnel1F.asm26
-rwxr-xr-xdata/maps/objects/RockTunnelB1F.asm22
-rwxr-xr-xdata/maps/objects/RockTunnelPokecenter.asm17
-rwxr-xr-xdata/maps/objects/RocketHideoutB1F.asm22
-rwxr-xr-xdata/maps/objects/RocketHideoutB2F.asm20
-rwxr-xr-xdata/maps/objects/RocketHideoutB3F.asm16
-rwxr-xr-xdata/maps/objects/RocketHideoutB4F.asm22
-rwxr-xr-xdata/maps/objects/RocketHideoutElevator.asm13
-rwxr-xr-xdata/maps/objects/Route1.asm16
-rwxr-xr-xdata/maps/objects/Route10.asm24
-rwxr-xr-xdata/maps/objects/Route11.asm26
-rwxr-xr-xdata/maps/objects/Route11Gate1F.asm16
-rwxr-xr-xdata/maps/objects/Route11Gate2F.asm15
-rwxr-xr-xdata/maps/objects/Route12.asm26
-rwxr-xr-xdata/maps/objects/Route12Gate1F.asm16
-rwxr-xr-xdata/maps/objects/Route12Gate2F.asm14
-rwxr-xr-xdata/maps/objects/Route12SuperRodHouse.asm13
-rwxr-xr-xdata/maps/objects/Route13.asm23
-rwxr-xr-xdata/maps/objects/Route14.asm21
-rwxr-xr-xdata/maps/objects/Route15.asm26
-rwxr-xr-xdata/maps/objects/Route15Gate1F.asm16
-rwxr-xr-xdata/maps/objects/Route15Gate2F.asm13
-rwxr-xr-xdata/maps/objects/Route16.asm28
-rwxr-xr-xdata/maps/objects/Route16FlyHouse.asm14
-rwxr-xr-xdata/maps/objects/Route16Gate1F.asm21
-rwxr-xr-xdata/maps/objects/Route16Gate2F.asm15
-rwxr-xr-xdata/maps/objects/Route17.asm26
-rwxr-xr-xdata/maps/objects/Route18.asm19
-rwxr-xr-xdata/maps/objects/Route18Gate1F.asm16
-rwxr-xr-xdata/maps/objects/Route18Gate2F.asm14
-rwxr-xr-xdata/maps/objects/Route19.asm22
-rwxr-xr-xdata/maps/objects/Route2.asm29
-rwxr-xr-xdata/maps/objects/Route20.asm24
-rwxr-xr-xdata/maps/objects/Route21.asm19
-rwxr-xr-xdata/maps/objects/Route22.asm14
-rwxr-xr-xdata/maps/objects/Route22Gate.asm15
-rwxr-xr-xdata/maps/objects/Route23.asm22
-rwxr-xr-xdata/maps/objects/Route24.asm19
-rwxr-xr-xdata/maps/objects/Route25.asm22
-rwxr-xr-xdata/maps/objects/Route2Gate.asm16
-rwxr-xr-xdata/maps/objects/Route2TradeHouse.asm14
-rwxr-xr-xdata/maps/objects/Route3.asm20
-rwxr-xr-xdata/maps/objects/Route4.asm19
-rwxr-xr-xdata/maps/objects/Route5.asm16
-rwxr-xr-xdata/maps/objects/Route5Gate.asm15
-rwxr-xr-xdata/maps/objects/Route6.asm21
-rwxr-xr-xdata/maps/objects/Route6Gate.asm15
-rwxr-xr-xdata/maps/objects/Route7.asm16
-rwxr-xr-xdata/maps/objects/Route7Gate.asm15
-rwxr-xr-xdata/maps/objects/Route8.asm25
-rwxr-xr-xdata/maps/objects/Route8Gate.asm15
-rwxr-xr-xdata/maps/objects/Route9.asm21
-rwxr-xr-xdata/maps/objects/SSAnne1F.asm23
-rwxr-xr-xdata/maps/objects/SSAnne1FRooms.asm27
-rwxr-xr-xdata/maps/objects/SSAnne2F.asm21
-rwxr-xr-xdata/maps/objects/SSAnne2FRooms.asm35
-rwxr-xr-xdata/maps/objects/SSAnne3F.asm13
-rwxr-xr-xdata/maps/objects/SSAnneB1F.asm16
-rwxr-xr-xdata/maps/objects/SSAnneB1FRooms.asm31
-rwxr-xr-xdata/maps/objects/SSAnneBow.asm17
-rwxr-xr-xdata/maps/objects/SSAnneCaptainsRoom.asm14
-rwxr-xr-xdata/maps/objects/SSAnneKitchen.asm18
-rwxr-xr-xdata/maps/objects/SafariZoneCenter.asm22
-rwxr-xr-xdata/maps/objects/SafariZoneCenterRestHouse.asm14
-rwxr-xr-xdata/maps/objects/SafariZoneEast.asm22
-rwxr-xr-xdata/maps/objects/SafariZoneEastRestHouse.asm15
-rwxr-xr-xdata/maps/objects/SafariZoneGate.asm16
-rwxr-xr-xdata/maps/objects/SafariZoneNorth.asm26
-rwxr-xr-xdata/maps/objects/SafariZoneNorthRestHouse.asm15
-rwxr-xr-xdata/maps/objects/SafariZoneSecretHouse.asm13
-rwxr-xr-xdata/maps/objects/SafariZoneWest.asm26
-rwxr-xr-xdata/maps/objects/SafariZoneWestRestHouse.asm15
-rwxr-xr-xdata/maps/objects/SaffronCity.asm42
-rwxr-xr-xdata/maps/objects/SaffronGym.asm51
-rwxr-xr-xdata/maps/objects/SaffronMart.asm15
-rwxr-xr-xdata/maps/objects/SaffronPidgeyHouse.asm16
-rwxr-xr-xdata/maps/objects/SaffronPokecenter.asm17
-rwxr-xr-xdata/maps/objects/SeafoamIslands1F.asm19
-rwxr-xr-xdata/maps/objects/SeafoamIslandsB1F.asm19
-rwxr-xr-xdata/maps/objects/SeafoamIslandsB2F.asm19
-rwxr-xr-xdata/maps/objects/SeafoamIslandsB3F.asm23
-rwxr-xr-xdata/maps/objects/SeafoamIslandsB4F.asm19
-rwxr-xr-xdata/maps/objects/SilphCo10F.asm22
-rwxr-xr-xdata/maps/objects/SilphCo11F.asm20
-rwxr-xr-xdata/maps/objects/SilphCo1F.asm16
-rwxr-xr-xdata/maps/objects/SilphCo2F.asm22
-rwxr-xr-xdata/maps/objects/SilphCo3F.asm24
-rwxr-xr-xdata/maps/objects/SilphCo4F.asm24
-rwxr-xr-xdata/maps/objects/SilphCo5F.asm28
-rwxr-xr-xdata/maps/objects/SilphCo6F.asm25
-rwxr-xr-xdata/maps/objects/SilphCo7F.asm27
-rwxr-xr-xdata/maps/objects/SilphCo8F.asm21
-rwxr-xr-xdata/maps/objects/SilphCo9F.asm19
-rwxr-xr-xdata/maps/objects/SilphCoElevator.asm13
-rw-r--r--data/maps/objects/TradeCenter.asm11
-rwxr-xr-xdata/maps/objects/UndergroundPathNorthSouth.asm12
-rwxr-xr-xdata/maps/objects/UndergroundPathRoute5.asm14
-rwxr-xr-xdata/maps/objects/UndergroundPathRoute6.asm14
-rwxr-xr-xdata/maps/objects/UndergroundPathRoute7.asm14
-rwxr-xr-xdata/maps/objects/UndergroundPathRoute7Copy.asm15
-rwxr-xr-xdata/maps/objects/UndergroundPathRoute8.asm14
-rwxr-xr-xdata/maps/objects/UndergroundPathWestEast.asm12
-rwxr-xr-xdata/maps/objects/VermilionCity.asm33
-rwxr-xr-xdata/maps/objects/VermilionDock.asm12
-rwxr-xr-xdata/maps/objects/VermilionGym.asm17
-rwxr-xr-xdata/maps/objects/VermilionMart.asm15
-rwxr-xr-xdata/maps/objects/VermilionOldRodHouse.asm13
-rwxr-xr-xdata/maps/objects/VermilionPidgeyHouse.asm15
-rwxr-xr-xdata/maps/objects/VermilionPokecenter.asm17
-rwxr-xr-xdata/maps/objects/VermilionTradeHouse.asm13
-rwxr-xr-xdata/maps/objects/VictoryRoad1F.asm20
-rwxr-xr-xdata/maps/objects/VictoryRoad2F.asm30
-rwxr-xr-xdata/maps/objects/VictoryRoad3F.asm24
-rwxr-xr-xdata/maps/objects/ViridianCity.asm29
-rwxr-xr-xdata/maps/objects/ViridianForest.asm32
-rwxr-xr-xdata/maps/objects/ViridianForestNorthGate.asm16
-rwxr-xr-xdata/maps/objects/ViridianForestSouthGate.asm16
-rwxr-xr-xdata/maps/objects/ViridianGym.asm23
-rwxr-xr-xdata/maps/objects/ViridianMart.asm15
-rwxr-xr-xdata/maps/objects/ViridianNicknameHouse.asm16
-rwxr-xr-xdata/maps/objects/ViridianPokecenter.asm17
-rwxr-xr-xdata/maps/objects/ViridianSchoolHouse.asm15
-rwxr-xr-xdata/maps/objects/WardensHouse.asm17
-rw-r--r--data/maps/rest_house_maps.asm5
-rw-r--r--data/maps/songs.asm250
-rwxr-xr-xdata/maps/special_warps.asm91
-rwxr-xr-xdata/maps/sprite_sets.asm191
-rwxr-xr-xdata/maps/town_map_entries.asm118
-rwxr-xr-xdata/maps/town_map_order.asm (renamed from data/town_map_order.asm)0
-rwxr-xr-xdata/mart_inventories.asm64
-rwxr-xr-xdata/mon_party_sprites.asm77
-rwxr-xr-xdata/moves.asm178
-rwxr-xr-xdata/moves/animations.asm1269
-rw-r--r--data/moves/effects_pointers.asm88
-rw-r--r--data/moves/field_move_names.asm10
-rw-r--r--data/moves/field_moves.asm14
-rw-r--r--data/moves/grammar.asm74
-rw-r--r--data/moves/hm_moves.asm10
-rwxr-xr-xdata/moves/moves.asm178
-rw-r--r--data/moves/names.asm (renamed from text/move_names.asm)0
-rw-r--r--data/moves/sfx.asm168
-rwxr-xr-xdata/moves/tmhm_moves.asm30
-rw-r--r--data/player_names.asm13
-rw-r--r--data/player_names_list.asm11
-rwxr-xr-xdata/pokedex_entries.asm1265
-rwxr-xr-xdata/pokemon/base_stats.asm154
-rw-r--r--data/pokemon/base_stats/abra.asm24
-rw-r--r--data/pokemon/base_stats/aerodactyl.asm23
-rw-r--r--data/pokemon/base_stats/alakazam.asm25
-rw-r--r--data/pokemon/base_stats/arbok.asm23
-rw-r--r--data/pokemon/base_stats/arcanine.asm23
-rw-r--r--data/pokemon/base_stats/articuno.asm23
-rw-r--r--data/pokemon/base_stats/beedrill.asm23
-rw-r--r--data/pokemon/base_stats/bellsprout.asm22
-rw-r--r--data/pokemon/base_stats/blastoise.asm25
-rw-r--r--data/pokemon/base_stats/bulbasaur.asm22
-rw-r--r--data/pokemon/base_stats/butterfree.asm23
-rw-r--r--data/pokemon/base_stats/caterpie.asm20
-rw-r--r--data/pokemon/base_stats/chansey.asm27
-rw-r--r--data/pokemon/base_stats/charizard.asm25
-rw-r--r--data/pokemon/base_stats/charmander.asm24
-rw-r--r--data/pokemon/base_stats/charmeleon.asm24
-rw-r--r--data/pokemon/base_stats/clefable.asm26
-rw-r--r--data/pokemon/base_stats/clefairy.asm26
-rw-r--r--data/pokemon/base_stats/cloyster.asm24
-rw-r--r--data/pokemon/base_stats/cubone.asm24
-rw-r--r--data/pokemon/base_stats/dewgong.asm23
-rw-r--r--data/pokemon/base_stats/diglett.asm22
-rw-r--r--data/pokemon/base_stats/ditto.asm20
-rw-r--r--data/pokemon/base_stats/dodrio.asm23
-rw-r--r--data/pokemon/base_stats/doduo.asm23
-rw-r--r--data/pokemon/base_stats/dragonair.asm24
-rw-r--r--data/pokemon/base_stats/dragonite.asm25
-rw-r--r--data/pokemon/base_stats/dratini.asm24
-rw-r--r--data/pokemon/base_stats/drowzee.asm24
-rw-r--r--data/pokemon/base_stats/dugtrio.asm23
-rw-r--r--data/pokemon/base_stats/eevee.asm22
-rw-r--r--data/pokemon/base_stats/ekans.asm23
-rw-r--r--data/pokemon/base_stats/electabuzz.asm25
-rw-r--r--data/pokemon/base_stats/electrode.asm23
-rw-r--r--data/pokemon/base_stats/exeggcute.asm23
-rw-r--r--data/pokemon/base_stats/exeggutor.asm23
-rw-r--r--data/pokemon/base_stats/farfetchd.asm23
-rw-r--r--data/pokemon/base_stats/fearow.asm22
-rw-r--r--data/pokemon/base_stats/flareon.asm22
-rw-r--r--data/pokemon/base_stats/gastly.asm22
-rw-r--r--data/pokemon/base_stats/gengar.asm25
-rw-r--r--data/pokemon/base_stats/geodude.asm24
-rw-r--r--data/pokemon/base_stats/gloom.asm22
-rw-r--r--data/pokemon/base_stats/golbat.asm22
-rw-r--r--data/pokemon/base_stats/goldeen.asm23
-rw-r--r--data/pokemon/base_stats/golduck.asm25
-rw-r--r--data/pokemon/base_stats/golem.asm24
-rw-r--r--data/pokemon/base_stats/graveler.asm24
-rw-r--r--data/pokemon/base_stats/grimer.asm22
-rw-r--r--data/pokemon/base_stats/growlithe.asm23
-rw-r--r--data/pokemon/base_stats/gyarados.asm24
-rw-r--r--data/pokemon/base_stats/haunter.asm22
-rw-r--r--data/pokemon/base_stats/hitmonchan.asm23
-rw-r--r--data/pokemon/base_stats/hitmonlee.asm23
-rw-r--r--data/pokemon/base_stats/horsea.asm23
-rw-r--r--data/pokemon/base_stats/hypno.asm25
-rw-r--r--data/pokemon/base_stats/ivysaur.asm22
-rw-r--r--data/pokemon/base_stats/jigglypuff.asm26
-rw-r--r--data/pokemon/base_stats/jolteon.asm23
-rw-r--r--data/pokemon/base_stats/jynx.asm25
-rw-r--r--data/pokemon/base_stats/kabuto.asm23
-rw-r--r--data/pokemon/base_stats/kabutops.asm24
-rw-r--r--data/pokemon/base_stats/kadabra.asm24
-rw-r--r--data/pokemon/base_stats/kakuna.asm20
-rw-r--r--data/pokemon/base_stats/kangaskhan.asm25
-rw-r--r--data/pokemon/base_stats/kingler.asm23
-rw-r--r--data/pokemon/base_stats/koffing.asm22
-rw-r--r--data/pokemon/base_stats/krabby.asm23
-rw-r--r--data/pokemon/base_stats/lapras.asm25
-rw-r--r--data/pokemon/base_stats/lickitung.asm25
-rw-r--r--data/pokemon/base_stats/machamp.asm24
-rw-r--r--data/pokemon/base_stats/machoke.asm24
-rw-r--r--data/pokemon/base_stats/machop.asm24
-rw-r--r--data/pokemon/base_stats/magikarp.asm20
-rw-r--r--data/pokemon/base_stats/magmar.asm24
-rw-r--r--data/pokemon/base_stats/magnemite.asm23
-rw-r--r--data/pokemon/base_stats/magneton.asm23
-rw-r--r--data/pokemon/base_stats/mankey.asm24
-rw-r--r--data/pokemon/base_stats/marowak.asm25
-rw-r--r--data/pokemon/base_stats/meowth.asm23
-rw-r--r--data/pokemon/base_stats/metapod.asm20
-rw-r--r--data/pokemon/base_stats/mew.asm30
-rw-r--r--data/pokemon/base_stats/mewtwo.asm26
-rw-r--r--data/pokemon/base_stats/moltres.asm23
-rw-r--r--data/pokemon/base_stats/mrmime.asm25
-rw-r--r--data/pokemon/base_stats/muk.asm22
-rw-r--r--data/pokemon/base_stats/nidoking.asm26
-rw-r--r--data/pokemon/base_stats/nidoqueen.asm26
-rw-r--r--data/pokemon/base_stats/nidoranf.asm22
-rw-r--r--data/pokemon/base_stats/nidoranm.asm23
-rw-r--r--data/pokemon/base_stats/nidorina.asm23
-rw-r--r--data/pokemon/base_stats/nidorino.asm23
-rw-r--r--data/pokemon/base_stats/ninetales.asm23
-rw-r--r--data/pokemon/base_stats/oddish.asm22
-rw-r--r--data/pokemon/base_stats/omanyte.asm23
-rw-r--r--data/pokemon/base_stats/omastar.asm24
-rw-r--r--data/pokemon/base_stats/onix.asm23
-rw-r--r--data/pokemon/base_stats/paras.asm23
-rw-r--r--data/pokemon/base_stats/parasect.asm23
-rw-r--r--data/pokemon/base_stats/persian.asm23
-rw-r--r--data/pokemon/base_stats/pidgeot.asm23
-rw-r--r--data/pokemon/base_stats/pidgeotto.asm22
-rw-r--r--data/pokemon/base_stats/pidgey.asm22
-rw-r--r--data/pokemon/base_stats/pikachu.asm24
-rw-r--r--data/pokemon/base_stats/pinsir.asm23
-rw-r--r--data/pokemon/base_stats/poliwag.asm23
-rw-r--r--data/pokemon/base_stats/poliwhirl.asm25
-rw-r--r--data/pokemon/base_stats/poliwrath.asm25
-rw-r--r--data/pokemon/base_stats/ponyta.asm22
-rw-r--r--data/pokemon/base_stats/porygon.asm24
-rw-r--r--data/pokemon/base_stats/primeape.asm24
-rw-r--r--data/pokemon/base_stats/psyduck.asm24
-rw-r--r--data/pokemon/base_stats/raichu.asm24
-rw-r--r--data/pokemon/base_stats/rapidash.asm23
-rw-r--r--data/pokemon/base_stats/raticate.asm23
-rw-r--r--data/pokemon/base_stats/rattata.asm23
-rw-r--r--data/pokemon/base_stats/rhydon.asm26
-rw-r--r--data/pokemon/base_stats/rhyhorn.asm23
-rw-r--r--data/pokemon/base_stats/sandshrew.asm24
-rw-r--r--data/pokemon/base_stats/sandslash.asm24
-rw-r--r--data/pokemon/base_stats/scyther.asm22
-rw-r--r--data/pokemon/base_stats/seadra.asm23
-rw-r--r--data/pokemon/base_stats/seaking.asm23
-rw-r--r--data/pokemon/base_stats/seel.asm23
-rw-r--r--data/pokemon/base_stats/shellder.asm23
-rw-r--r--data/pokemon/base_stats/slowbro.asm27
-rw-r--r--data/pokemon/base_stats/slowpoke.asm25
-rw-r--r--data/pokemon/base_stats/snorlax.asm27
-rw-r--r--data/pokemon/base_stats/spearow.asm22
-rw-r--r--data/pokemon/base_stats/squirtle.asm24
-rw-r--r--data/pokemon/base_stats/starmie.asm25
-rw-r--r--data/pokemon/base_stats/staryu.asm24
-rw-r--r--data/pokemon/base_stats/tangela.asm23
-rw-r--r--data/pokemon/base_stats/tauros.asm24
-rw-r--r--data/pokemon/base_stats/tentacool.asm23
-rw-r--r--data/pokemon/base_stats/tentacruel.asm23
-rw-r--r--data/pokemon/base_stats/vaporeon.asm23
-rw-r--r--data/pokemon/base_stats/venomoth.asm23
-rw-r--r--data/pokemon/base_stats/venonat.asm22
-rw-r--r--data/pokemon/base_stats/venusaur.asm23
-rw-r--r--data/pokemon/base_stats/victreebel.asm23
-rw-r--r--data/pokemon/base_stats/vileplume.asm23
-rw-r--r--data/pokemon/base_stats/voltorb.asm23
-rw-r--r--data/pokemon/base_stats/vulpix.asm22
-rw-r--r--data/pokemon/base_stats/wartortle.asm24
-rw-r--r--data/pokemon/base_stats/weedle.asm20
-rw-r--r--data/pokemon/base_stats/weepinbell.asm22
-rw-r--r--data/pokemon/base_stats/weezing.asm22
-rw-r--r--data/pokemon/base_stats/wigglytuff.asm26
-rw-r--r--data/pokemon/base_stats/zapdos.asm23
-rw-r--r--data/pokemon/base_stats/zubat.asm22
-rwxr-xr-xdata/pokemon/cries.asm197
-rwxr-xr-xdata/pokemon/dex_entries.asm1259
-rwxr-xr-xdata/pokemon/dex_order.asm (renamed from data/pokedex_order.asm)0
-rw-r--r--data/pokemon/dex_text.asm (renamed from text/pokedex.asm)0
-rwxr-xr-xdata/pokemon/evos_moves.asm2161
-rwxr-xr-xdata/pokemon/menu_icons.asm77
-rwxr-xr-xdata/pokemon/names.asm191
-rwxr-xr-xdata/pokemon/palettes.asm (renamed from data/mon_palettes.asm)0
-rw-r--r--data/predef_pointers.asm111
-rwxr-xr-xdata/prize_mon_levels.asm8
-rwxr-xr-xdata/prizes.asm45
-rwxr-xr-xdata/sgb/sgb_border.asm87
-rwxr-xr-xdata/sgb/sgb_packets.asm244
-rwxr-xr-xdata/sgb/sgb_palettes.asm84
-rwxr-xr-xdata/sgb_border.asm87
-rwxr-xr-xdata/sgb_packets.asm233
-rwxr-xr-xdata/special_warps.asm119
-rwxr-xr-xdata/sprite_sets.asm601
-rw-r--r--data/sprites/facings.asm131
-rw-r--r--data/sprites/sprites.asm90
-rwxr-xr-xdata/super_palettes.asm481
-rwxr-xr-xdata/super_rod.asm33
-rw-r--r--data/text/alphabets.asm15
-rw-r--r--data/text/dakutens.asm15
-rw-r--r--data/text/text_1.asm154
-rw-r--r--data/text/text_2.asm1322
-rw-r--r--data/text/text_3.asm637
-rw-r--r--data/text/text_4.asm56
-rw-r--r--data/text/text_5.asm277
-rw-r--r--data/text/text_6.asm10
-rw-r--r--data/text/text_7.asm216
-rw-r--r--data/text/text_8.asm118
-rw-r--r--data/text/text_9.asm442
-rw-r--r--data/text/unused_names.asm22
-rw-r--r--data/text_boxes.asm88
-rw-r--r--data/text_predef_pointers.asm74
-rw-r--r--data/tilemaps.asm46
-rwxr-xr-xdata/tileset_headers.asm27
-rwxr-xr-xdata/tilesets/bike_riding_tilesets.asm7
-rw-r--r--data/tilesets/bookshelf_tile_ids.asm25
-rw-r--r--data/tilesets/collision_tile_ids.asm74
-rw-r--r--data/tilesets/cut_tree_blocks.asm13
-rw-r--r--data/tilesets/door_tile_ids.asm60
-rwxr-xr-xdata/tilesets/dungeon_tilesets.asm13
-rw-r--r--data/tilesets/escape_rope_tilesets.asm7
-rw-r--r--data/tilesets/ledge_tiles.asm11
-rw-r--r--data/tilesets/pair_collision_tile_ids.asm24
-rw-r--r--data/tilesets/spinner_tiles.asm29
-rwxr-xr-xdata/tilesets/tileset_headers.asm35
-rw-r--r--data/tilesets/warp_carpet_tile_ids.asm25
-rw-r--r--data/tilesets/warp_pad_hole_tile_ids.asm7
-rwxr-xr-xdata/tilesets/warp_tile_ids.asm97
-rw-r--r--data/tilesets/water_tilesets.asm12
-rwxr-xr-xdata/tm_prices.asm27
-rwxr-xr-xdata/tms.asm57
-rwxr-xr-xdata/town_map_entries.asm102
-rwxr-xr-xdata/trades.asm12
-rwxr-xr-xdata/trainer_moves.asm160
-rwxr-xr-xdata/trainer_parties.asm699
-rwxr-xr-xdata/trainer_types.asm17
-rw-r--r--data/trainers/ai_pointers.asm52
-rwxr-xr-xdata/trainers/encounter_types.asm17
-rw-r--r--data/trainers/move_choices.asm57
-rw-r--r--data/trainers/name_pointers.asm71
-rwxr-xr-xdata/trainers/names.asm48
-rwxr-xr-xdata/trainers/parties.asm749
-rwxr-xr-xdata/trainers/pic_pointers_money.asm55
-rwxr-xr-xdata/trainers/special_moves.asm160
-rwxr-xr-xdata/type_effects.asm89
-rwxr-xr-xdata/types/names.asm40
-rwxr-xr-xdata/types/type_matchups.asm85
-rwxr-xr-xdata/warp_tile_ids.asm89
-rwxr-xr-xdata/wild/good_rod.asm5
-rwxr-xr-xdata/wild/grass_water.asm323
-rw-r--r--data/wild/maps/CeruleanCave1F.asm14
-rw-r--r--data/wild/maps/CeruleanCave2F.asm14
-rw-r--r--data/wild/maps/CeruleanCaveB1F.asm14
-rwxr-xr-xdata/wild/maps/DiglettsCave.asm14
-rwxr-xr-xdata/wild/maps/MtMoon1F.asm14
-rwxr-xr-xdata/wild/maps/MtMoonB1F.asm14
-rwxr-xr-xdata/wild/maps/MtMoonB2F.asm14
-rwxr-xr-xdata/wild/maps/PokemonMansion1F.asm14
-rwxr-xr-xdata/wild/maps/PokemonMansion2F.asm14
-rwxr-xr-xdata/wild/maps/PokemonMansion3F.asm14
-rwxr-xr-xdata/wild/maps/PokemonMansionB1F.asm14
-rwxr-xr-xdata/wild/maps/PokemonTower1F.asm4
-rwxr-xr-xdata/wild/maps/PokemonTower2F.asm4
-rwxr-xr-xdata/wild/maps/PokemonTower3F.asm14
-rwxr-xr-xdata/wild/maps/PokemonTower4F.asm14
-rwxr-xr-xdata/wild/maps/PokemonTower5F.asm14
-rwxr-xr-xdata/wild/maps/PokemonTower6F.asm14
-rwxr-xr-xdata/wild/maps/PokemonTower7F.asm14
-rwxr-xr-xdata/wild/maps/PowerPlant.asm14
-rwxr-xr-xdata/wild/maps/RockTunnel1F.asm14
-rwxr-xr-xdata/wild/maps/RockTunnelB1F.asm14
-rwxr-xr-xdata/wild/maps/Route1.asm14
-rwxr-xr-xdata/wild/maps/Route10.asm14
-rwxr-xr-xdata/wild/maps/Route11.asm14
-rwxr-xr-xdata/wild/maps/Route12.asm24
-rwxr-xr-xdata/wild/maps/Route13.asm24
-rwxr-xr-xdata/wild/maps/Route14.asm14
-rwxr-xr-xdata/wild/maps/Route15.asm14
-rwxr-xr-xdata/wild/maps/Route16.asm14
-rwxr-xr-xdata/wild/maps/Route17.asm14
-rwxr-xr-xdata/wild/maps/Route18.asm14
-rw-r--r--data/wild/maps/Route19.asm14
-rwxr-xr-xdata/wild/maps/Route2.asm14
-rw-r--r--data/wild/maps/Route20.asm (renamed from data/wildPokemon/route20.asm)0
-rwxr-xr-xdata/wild/maps/Route21.asm24
-rwxr-xr-xdata/wild/maps/Route22.asm14
-rwxr-xr-xdata/wild/maps/Route23.asm14
-rwxr-xr-xdata/wild/maps/Route24.asm14
-rwxr-xr-xdata/wild/maps/Route25.asm14
-rwxr-xr-xdata/wild/maps/Route3.asm14
-rwxr-xr-xdata/wild/maps/Route4.asm14
-rwxr-xr-xdata/wild/maps/Route5.asm14
-rwxr-xr-xdata/wild/maps/Route6.asm24
-rwxr-xr-xdata/wild/maps/Route7.asm14
-rwxr-xr-xdata/wild/maps/Route8.asm14
-rwxr-xr-xdata/wild/maps/Route9.asm14
-rwxr-xr-xdata/wild/maps/SafariZoneCenter.asm14
-rwxr-xr-xdata/wild/maps/SafariZoneEast.asm14
-rwxr-xr-xdata/wild/maps/SafariZoneNorth.asm14
-rwxr-xr-xdata/wild/maps/SafariZoneWest.asm14
-rwxr-xr-xdata/wild/maps/SeafoamIslands1F.asm14
-rwxr-xr-xdata/wild/maps/SeafoamIslandsB1F.asm14
-rwxr-xr-xdata/wild/maps/SeafoamIslandsB2F.asm14
-rwxr-xr-xdata/wild/maps/SeafoamIslandsB3F.asm24
-rwxr-xr-xdata/wild/maps/SeafoamIslandsB4F.asm24
-rwxr-xr-xdata/wild/maps/VictoryRoad1F.asm14
-rwxr-xr-xdata/wild/maps/VictoryRoad2F.asm14
-rwxr-xr-xdata/wild/maps/VictoryRoad3F.asm14
-rwxr-xr-xdata/wild/maps/ViridianForest.asm14
-rwxr-xr-xdata/wild/maps/nothing.asm4
-rw-r--r--data/wild/probabilities.asm15
-rwxr-xr-xdata/wild/super_rod.asm33
-rw-r--r--data/wildPokemon/ceruleancave1.asm14
-rw-r--r--data/wildPokemon/ceruleancave2.asm14
-rw-r--r--data/wildPokemon/ceruleancaveb1.asm14
-rwxr-xr-xdata/wildPokemon/diglettscave.asm14
-rwxr-xr-xdata/wildPokemon/mansion1.asm14
-rwxr-xr-xdata/wildPokemon/mansion2.asm14
-rwxr-xr-xdata/wildPokemon/mansion3.asm14
-rwxr-xr-xdata/wildPokemon/mansionb1.asm13
-rwxr-xr-xdata/wildPokemon/mtmoon1.asm14
-rwxr-xr-xdata/wildPokemon/mtmoonb1.asm14
-rwxr-xr-xdata/wildPokemon/mtmoonb2.asm14
-rwxr-xr-xdata/wildPokemon/nomons.asm4
-rwxr-xr-xdata/wildPokemon/pokemontower1.asm4
-rwxr-xr-xdata/wildPokemon/pokemontower2.asm4
-rwxr-xr-xdata/wildPokemon/pokemontower3.asm14
-rwxr-xr-xdata/wildPokemon/pokemontower4.asm14
-rwxr-xr-xdata/wildPokemon/pokemontower5.asm14
-rwxr-xr-xdata/wildPokemon/pokemontower6.asm14
-rwxr-xr-xdata/wildPokemon/pokemontower7.asm14
-rwxr-xr-xdata/wildPokemon/powerplant.asm13
-rwxr-xr-xdata/wildPokemon/rocktunnel1.asm14
-rwxr-xr-xdata/wildPokemon/rocktunnel2.asm14
-rwxr-xr-xdata/wildPokemon/route1.asm14
-rwxr-xr-xdata/wildPokemon/route10.asm14
-rwxr-xr-xdata/wildPokemon/route11.asm14
-rwxr-xr-xdata/wildPokemon/route12.asm25
-rwxr-xr-xdata/wildPokemon/route13.asm25
-rwxr-xr-xdata/wildPokemon/route14.asm14
-rwxr-xr-xdata/wildPokemon/route15.asm14
-rwxr-xr-xdata/wildPokemon/route16.asm14
-rwxr-xr-xdata/wildPokemon/route17.asm14
-rwxr-xr-xdata/wildPokemon/route18.asm14
-rw-r--r--data/wildPokemon/route19.asm15
-rwxr-xr-xdata/wildPokemon/route2.asm14
-rwxr-xr-xdata/wildPokemon/route21.asm25
-rwxr-xr-xdata/wildPokemon/route22.asm14
-rwxr-xr-xdata/wildPokemon/route23.asm14
-rwxr-xr-xdata/wildPokemon/route24.asm14
-rwxr-xr-xdata/wildPokemon/route25.asm14
-rwxr-xr-xdata/wildPokemon/route3.asm14
-rwxr-xr-xdata/wildPokemon/route4.asm14
-rwxr-xr-xdata/wildPokemon/route5.asm14
-rwxr-xr-xdata/wildPokemon/route6.asm25
-rwxr-xr-xdata/wildPokemon/route7.asm14
-rwxr-xr-xdata/wildPokemon/route8.asm14
-rwxr-xr-xdata/wildPokemon/route9.asm14
-rwxr-xr-xdata/wildPokemon/safarizone1.asm14
-rwxr-xr-xdata/wildPokemon/safarizone2.asm14
-rwxr-xr-xdata/wildPokemon/safarizone3.asm14
-rwxr-xr-xdata/wildPokemon/safarizonecenter.asm14
-rwxr-xr-xdata/wildPokemon/seafoamisland1.asm14
-rwxr-xr-xdata/wildPokemon/seafoamislandb1.asm14
-rwxr-xr-xdata/wildPokemon/seafoamislandb2.asm14
-rwxr-xr-xdata/wildPokemon/seafoamislandb3.asm25
-rwxr-xr-xdata/wildPokemon/seafoamislandb4.asm25
-rwxr-xr-xdata/wildPokemon/victoryroad1.asm14
-rwxr-xr-xdata/wildPokemon/victoryroad2.asm14
-rwxr-xr-xdata/wildPokemon/victoryroad3.asm14
-rwxr-xr-xdata/wildPokemon/viridianforest.asm14
-rwxr-xr-xdata/wild_mons.asm323
-rw-r--r--data/yes_no_menu_strings.asm44
-rw-r--r--docs/bugs_and_glitches.md2
-rwxr-xr-xengine/HoF_room_pc.asm323
-rw-r--r--engine/add_mon.asm522
-rw-r--r--engine/bank3c.asm24
-rw-r--r--engine/bank3d.asm72
-rw-r--r--engine/bank3f.asm10
-rwxr-xr-xengine/battle/animations.asm794
-rw-r--r--engine/battle/bank3d_battle.asm111
-rw-r--r--engine/battle/battle_transitions.asm263
-rw-r--r--engine/battle/common_text.asm110
-rwxr-xr-xengine/battle/core.asm2840
-rw-r--r--engine/battle/decrement_pp.asm2
-rw-r--r--engine/battle/display_effectiveness.asm8
-rw-r--r--engine/battle/draw_hud_pokeball_gfx.asm8
-rw-r--r--engine/battle/effects.asm1551
-rwxr-xr-xengine/battle/end_of_battle.asm10
-rw-r--r--engine/battle/experience.asm64
-rw-r--r--engine/battle/get_trainer_name.asm8
-rw-r--r--engine/battle/ghost_marowak_anim.asm20
-rw-r--r--engine/battle/init_battle_variables.asm4
-rw-r--r--engine/battle/link_battle_versus_text.asm10
-rwxr-xr-xengine/battle/misc.asm (renamed from engine/battle/bank_e_misc.asm)0
-rw-r--r--engine/battle/moveEffects/conversion_effect.asm35
-rw-r--r--engine/battle/moveEffects/drain_hp_effect.asm104
-rw-r--r--engine/battle/moveEffects/focus_energy_effect.asm22
-rw-r--r--engine/battle/moveEffects/haze_effect.asm81
-rw-r--r--engine/battle/moveEffects/heal_effect.asm120
-rw-r--r--engine/battle/moveEffects/leech_seed_effect.asm40
-rw-r--r--engine/battle/moveEffects/mist_effect.asm19
-rw-r--r--engine/battle/moveEffects/one_hit_ko_effect.asm38
-rw-r--r--engine/battle/moveEffects/paralyze_effect.asm47
-rw-r--r--engine/battle/moveEffects/pay_day_effect.asm45
-rw-r--r--engine/battle/moveEffects/recoil_effect.asm70
-rw-r--r--engine/battle/moveEffects/reflect_light_screen_effect.asm45
-rw-r--r--engine/battle/moveEffects/substitute_effect.asm77
-rw-r--r--engine/battle/moveEffects/transform_effect.asm141
-rw-r--r--engine/battle/move_effects/conversion.asm35
-rw-r--r--engine/battle/move_effects/drain_hp.asm104
-rw-r--r--engine/battle/move_effects/focus_energy.asm22
-rw-r--r--engine/battle/move_effects/haze.asm81
-rw-r--r--engine/battle/move_effects/heal.asm120
-rw-r--r--engine/battle/move_effects/leech_seed.asm40
-rw-r--r--engine/battle/move_effects/mist.asm19
-rw-r--r--engine/battle/move_effects/one_hit_ko.asm38
-rw-r--r--engine/battle/move_effects/paralyze.asm47
-rw-r--r--engine/battle/move_effects/pay_day.asm45
-rw-r--r--engine/battle/move_effects/recoil.asm70
-rw-r--r--engine/battle/move_effects/reflect_light_screen.asm45
-rw-r--r--engine/battle/move_effects/substitute.asm77
-rw-r--r--engine/battle/move_effects/transform.asm141
-rw-r--r--engine/battle/print_type.asm2
-rwxr-xr-xengine/battle/read_trainer_party.asm2
-rwxr-xr-xengine/battle/safari_zone.asm8
-rw-r--r--engine/battle/save_trainer_name.asm95
-rw-r--r--engine/battle/scale_sprites.asm30
-rw-r--r--engine/battle/scroll_draw_trainer_pic.asm4
-rw-r--r--engine/battle/trainer_ai.asm157
-rwxr-xr-xengine/battle/trainer_pic_money_pointers.asm143
-rw-r--r--engine/battle/unused_stats_functions.asm4
-rw-r--r--engine/battle/wild_encounters.asm32
-rw-r--r--engine/bcd.asm218
-rw-r--r--engine/bg_map_attributes.asm40
-rw-r--r--engine/black_out.asm48
-rwxr-xr-xengine/cable_club.asm984
-rwxr-xr-xengine/clear_save.asm27
-rw-r--r--engine/debug/debug_menu.asm46
-rw-r--r--engine/debug/debug_party.asm24
-rw-r--r--engine/debug1.asm24
-rwxr-xr-xengine/diploma_3a.asm46
-rw-r--r--engine/display_pokedex.asm19
-rw-r--r--engine/display_text_id_init.asm75
-rw-r--r--engine/events/black_out.asm48
-rwxr-xr-xengine/events/card_key.asm102
-rwxr-xr-xengine/events/cinnabar_lab.asm123
-rw-r--r--engine/events/diploma.asm17
-rw-r--r--engine/events/display_pokedex.asm19
-rwxr-xr-xengine/events/elevator.asm54
-rwxr-xr-xengine/events/give_pokemon.asm87
-rw-r--r--engine/events/heal_party.asm (renamed from engine/heal_party.asm)0
-rwxr-xr-xengine/events/hidden_items.asm172
-rw-r--r--engine/events/hidden_objects/bench_guys.asm98
-rw-r--r--engine/events/hidden_objects/bills_house_pc.asm131
-rw-r--r--engine/events/hidden_objects/blues_room.asm13
-rw-r--r--engine/events/hidden_objects/book_or_sculpture.asm21
-rw-r--r--engine/events/hidden_objects/bookshelves.asm39
-rw-r--r--engine/events/hidden_objects/cinnabar_gym_quiz.asm246
-rw-r--r--engine/events/hidden_objects/elevator.asm3
-rw-r--r--engine/events/hidden_objects/fanclub_pictures.asm23
-rw-r--r--engine/events/hidden_objects/fighting_dojo.asm23
-rw-r--r--engine/events/hidden_objects/gym_statues.asm39
-rw-r--r--engine/events/hidden_objects/indigo_plateau_hq.asm10
-rw-r--r--engine/events/hidden_objects/indigo_plateau_statues.asm24
-rw-r--r--engine/events/hidden_objects/magazines.asm8
-rw-r--r--engine/events/hidden_objects/museum_fossils.asm23
-rw-r--r--engine/events/hidden_objects/museum_fossils2.asm28
-rw-r--r--engine/events/hidden_objects/new_bike.asm7
-rw-r--r--engine/events/hidden_objects/oaks_lab_email.asm11
-rw-r--r--engine/events/hidden_objects/oaks_lab_posters.asm29
-rw-r--r--engine/events/hidden_objects/pokecenter_pc.asm11
-rw-r--r--engine/events/hidden_objects/pokemon_stuff.asm3
-rw-r--r--engine/events/hidden_objects/reds_room.asm14
-rw-r--r--engine/events/hidden_objects/route_15_binoculars.asm17
-rw-r--r--engine/events/hidden_objects/safari_game.asm78
-rw-r--r--engine/events/hidden_objects/school_blackboard.asm223
-rw-r--r--engine/events/hidden_objects/school_notebooks.asm65
-rw-r--r--engine/events/hidden_objects/town_map.asm22
-rw-r--r--engine/events/hidden_objects/vermilion_gym_trash.asm134
-rwxr-xr-xengine/events/in_game_trades.asm350
-rwxr-xr-xengine/events/oaks_aide.asm71
-rwxr-xr-xengine/events/pewter_guys.asm (renamed from engine/overworld/pewter_guys.asm)0
-rw-r--r--engine/events/pick_up_item.asm54
-rw-r--r--engine/events/poison.asm151
-rwxr-xr-xengine/events/pokecenter.asm149
-rwxr-xr-xengine/events/pokedex_rating.asm138
-rwxr-xr-xengine/events/pokemart.asm272
-rwxr-xr-xengine/events/prize_menu.asm305
-rwxr-xr-xengine/events/saffron_guards.asm15
-rw-r--r--engine/events/set_blackout_map.asm25
-rwxr-xr-xengine/events/starter_dex.asm9
-rwxr-xr-xengine/events/vending_machine.asm132
-rwxr-xr-xengine/evolution.asm156
-rwxr-xr-xengine/evos_moves.asm668
-rwxr-xr-xengine/experience.asm160
-rwxr-xr-xengine/game_corner_slots.asm54
-rwxr-xr-xengine/game_corner_slots2.asm31
-rwxr-xr-xengine/gamefreak.asm263
-rwxr-xr-xengine/gfx/hp_bar.asm268
-rwxr-xr-xengine/gfx/load_pokedex_tiles.asm11
-rwxr-xr-xengine/gfx/mon_icons.asm307
-rw-r--r--engine/gfx/oam_dma.asm28
-rwxr-xr-xengine/gfx/palettes.asm1117
-rw-r--r--engine/gfx/screen_effects.asm73
-rw-r--r--engine/gfx/sprite_oam.asm232
-rwxr-xr-xengine/give_pokemon.asm87
-rwxr-xr-xengine/hall_of_fame.asm303
-rwxr-xr-xengine/hidden_object_functions14.asm100
-rwxr-xr-xengine/hidden_object_functions17.asm466
-rwxr-xr-xengine/hidden_object_functions18.asm204
-rwxr-xr-xengine/hidden_object_functions3.asm153
-rwxr-xr-xengine/hidden_object_functions7.asm510
-rwxr-xr-xengine/hp_bar.asm268
-rwxr-xr-xengine/in_game_trades.asm350
-rw-r--r--engine/init_player_data.asm60
-rwxr-xr-xengine/intro.asm164
-rw-r--r--engine/items/get_bag_item_quantity.asm (renamed from engine/get_bag_item_quantity.asm)0
-rw-r--r--engine/items/inventory.asm8
-rwxr-xr-xengine/items/item_effects.asm3186
-rwxr-xr-xengine/items/items.asm3235
-rw-r--r--engine/items/subtract_paid_money.asm17
-rwxr-xr-xengine/items/tm_prices.asm14
-rwxr-xr-xengine/items/tmhm.asm4
-rwxr-xr-xengine/items/tms.asm2
-rwxr-xr-xengine/items/town_map.asm629
-rw-r--r--engine/joypad.asm52
-rwxr-xr-xengine/learn_move.asm250
-rwxr-xr-xengine/link/cable_club.asm984
-rwxr-xr-xengine/link/cable_club_npc.asm208
-rw-r--r--engine/link/print_waiting_text.asm19
-rw-r--r--engine/load_mon_data.asm68
-rwxr-xr-xengine/load_pokedex_tiles.asm11
-rw-r--r--engine/math/bcd.asm218
-rwxr-xr-xengine/math/multiply_divide.asm143
-rwxr-xr-xengine/math/random.asm13
-rw-r--r--engine/menu/bills_pc.asm598
-rw-r--r--engine/menu/diploma.asm17
-rw-r--r--engine/menu/draw_badges.asm120
-rw-r--r--engine/menu/draw_start_menu.asm87
-rwxr-xr-xengine/menu/league_pc.asm119
-rw-r--r--engine/menu/link_menu.asm910
-rwxr-xr-xengine/menu/main_menu.asm297
-rwxr-xr-xengine/menu/naming_screen.asm526
-rwxr-xr-xengine/menu/oaks_pc.asm28
-rw-r--r--engine/menu/options.asm443
-rwxr-xr-xengine/menu/party_menu.asm333
-rwxr-xr-xengine/menu/pc.asm141
-rwxr-xr-xengine/menu/players_pc.asm302
-rwxr-xr-xengine/menu/pokedex.asm747
-rwxr-xr-xengine/menu/prize_menu.asm307
-rwxr-xr-xengine/menu/start_menu.asm84
-rwxr-xr-xengine/menu/start_sub_menus.asm871
-rwxr-xr-xengine/menu/status_screen.asm495
-rw-r--r--engine/menu/swap_items.asm149
-rw-r--r--engine/menu/text_box.asm739
-rwxr-xr-xengine/menu/vending_machine.asm138
-rw-r--r--engine/menus/display_text_id_init.asm76
-rw-r--r--engine/menus/draw_badges.asm120
-rw-r--r--engine/menus/draw_start_menu.asm87
-rwxr-xr-xengine/menus/league_pc.asm119
-rw-r--r--engine/menus/link_menu.asm910
-rwxr-xr-xengine/menus/main_menu.asm300
-rwxr-xr-xengine/menus/naming_screen.asm508
-rwxr-xr-xengine/menus/oaks_pc.asm28
-rw-r--r--engine/menus/options.asm443
-rwxr-xr-xengine/menus/party_menu.asm314
-rwxr-xr-xengine/menus/pc.asm141
-rwxr-xr-xengine/menus/players_pc.asm302
-rwxr-xr-xengine/menus/pokedex.asm745
-rwxr-xr-xengine/menus/save.asm682
-rwxr-xr-xengine/menus/start_sub_menus.asm825
-rw-r--r--engine/menus/swap_items.asm149
-rw-r--r--engine/menus/text_box.asm533
-rwxr-xr-xengine/mon_party_sprites.asm445
-rwxr-xr-xengine/movie/credits.asm322
-rwxr-xr-xengine/movie/evolution.asm156
-rwxr-xr-xengine/movie/hall_of_fame.asm303
-rwxr-xr-xengine/movie/intro.asm157
-rwxr-xr-xengine/movie/oak_speech/clear_save.asm27
-rw-r--r--engine/movie/oak_speech/init_player_data.asm60
-rwxr-xr-xengine/movie/oak_speech/oak_speech.asm244
-rwxr-xr-xengine/movie/oak_speech/oak_speech2.asm219
-rwxr-xr-xengine/movie/splash.asm259
-rwxr-xr-xengine/movie/title.asm370
-rwxr-xr-xengine/movie/title2.asm122
-rwxr-xr-xengine/movie/trade.asm859
-rwxr-xr-xengine/movie/trade2.asm49
-rwxr-xr-xengine/multiply_divide.asm144
-rwxr-xr-xengine/oak_speech.asm244
-rwxr-xr-xengine/oak_speech2.asm241
-rw-r--r--engine/oam_dma.asm26
-rw-r--r--engine/overworld/advance_player_sprite.asm247
-rwxr-xr-xengine/overworld/auto_movement.asm270
-rwxr-xr-xengine/overworld/cable_club_npc.asm208
-rwxr-xr-xengine/overworld/card_key.asm113
-rwxr-xr-xengine/overworld/cinnabar_lab.asm123
-rw-r--r--engine/overworld/clear_variables.asm16
-rwxr-xr-xengine/overworld/cut.asm66
-rwxr-xr-xengine/overworld/cut2.asm8
-rwxr-xr-xengine/overworld/doors.asm55
-rw-r--r--engine/overworld/dungeon_warps.asm2
-rwxr-xr-xengine/overworld/dust_smoke.asm95
-rwxr-xr-xengine/overworld/elevator.asm10
-rwxr-xr-xengine/overworld/emotion_bubbles.asm19
-rw-r--r--engine/overworld/field_move_messages.asm23
-rwxr-xr-xengine/overworld/healing_machine.asm43
-rwxr-xr-xengine/overworld/hidden_items.asm172
-rwxr-xr-xengine/overworld/hidden_objects.asm20
-rw-r--r--engine/overworld/item.asm54
-rwxr-xr-xengine/overworld/ledges.asm26
-rw-r--r--engine/overworld/map_sprite_functions1.asm390
-rwxr-xr-xengine/overworld/map_sprites.asm32
-rw-r--r--engine/overworld/missable_objects.asm36
-rw-r--r--engine/overworld/movement.asm459
-rwxr-xr-xengine/overworld/npc_movement.asm270
-rwxr-xr-xengine/overworld/npc_movement_2.asm14
-rwxr-xr-xengine/overworld/oaks_aide.asm71
-rw-r--r--engine/overworld/oam.asm232
-rw-r--r--engine/overworld/pathfinding.asm201
-rwxr-xr-xengine/overworld/player_animations.asm118
-rw-r--r--engine/overworld/player_state.asm122
-rw-r--r--engine/overworld/poison.asm151
-rwxr-xr-xengine/overworld/pokecenter.asm149
-rwxr-xr-xengine/overworld/pokemart.asm272
-rw-r--r--engine/overworld/push_boulder.asm34
-rwxr-xr-xengine/overworld/saffron_guards.asm16
-rw-r--r--engine/overworld/set_blackout_map.asm29
-rw-r--r--engine/overworld/special_warps.asm149
-rw-r--r--engine/overworld/spinners.asm65
-rw-r--r--engine/overworld/sprite_collisions.asm392
-rwxr-xr-xengine/overworld/ssanne.asm95
-rw-r--r--engine/overworld/tileset_header.asm51
-rw-r--r--engine/overworld/tilesets.asm51
-rwxr-xr-xengine/overworld/trainer_sight.asm349
-rwxr-xr-xengine/overworld/trainers.asm349
-rw-r--r--engine/overworld/update_map.asm32
-rw-r--r--engine/overworld/wild_mons.asm10
-rwxr-xr-xengine/palettes.asm1116
-rw-r--r--engine/pathfinding.asm201
-rwxr-xr-xengine/pikachu_emotions.asm26
-rwxr-xr-xengine/pikachu_follow.asm16
-rwxr-xr-xengine/pikachu_movement.asm8
-rwxr-xr-xengine/pikachu_pcm.asm38
-rwxr-xr-xengine/pikachu_pic_animation.asm38
-rwxr-xr-xengine/pokedex_rating.asm154
-rw-r--r--engine/pokemon/add_mon.asm522
-rw-r--r--engine/pokemon/bills_pc.asm593
-rwxr-xr-xengine/pokemon/evos_moves.asm668
-rwxr-xr-xengine/pokemon/experience.asm149
-rwxr-xr-xengine/pokemon/learn_move.asm250
-rw-r--r--engine/pokemon/load_mon_data.asm68
-rw-r--r--engine/pokemon/remove_mon.asm95
-rwxr-xr-xengine/pokemon/set_types.asm (renamed from engine/predefs17_2.asm)0
-rwxr-xr-xengine/pokemon/status_ailments.asm46
-rwxr-xr-xengine/pokemon/status_screen.asm496
-rwxr-xr-xengine/predefs.asm113
-rwxr-xr-xengine/predefs17.asm9
-rwxr-xr-xengine/predefs7.asm54
-rw-r--r--engine/predefsA.asm73
-rw-r--r--engine/print_waiting_text.asm19
-rw-r--r--engine/printer.asm208
-rwxr-xr-xengine/printer/serial.asm24
-rwxr-xr-xengine/random.asm13
-rw-r--r--engine/remove_pokemon.asm95
-rwxr-xr-xengine/save.asm682
-rwxr-xr-xengine/slot_machine.asm891
-rwxr-xr-xengine/slots/game_corner_slots.asm54
-rwxr-xr-xengine/slots/game_corner_slots2.asm31
-rwxr-xr-xengine/slots/slot_machine.asm892
-rw-r--r--engine/special_warps.asm149
-rwxr-xr-xengine/status_ailments.asm46
-rw-r--r--engine/subtract_paid_money.asm17
-rwxr-xr-xengine/surfing_minigame.asm218
-rw-r--r--engine/test_battle.asm45
-rwxr-xr-xengine/titlescreen.asm370
-rwxr-xr-xengine/titlescreen2.asm122
-rwxr-xr-xengine/town_map.asm628
-rwxr-xr-xengine/trade.asm857
-rwxr-xr-xengine/trade2.asm48
-rwxr-xr-xengine/unknown_ea3ea.asm66
-rwxr-xr-xengine/vermilion_gym_trash_cans.asm2
-rwxr-xr-xengine/yellow_intro.asm164
-rw-r--r--gfx/attack_anim_1.pngbin1042 -> 0 bytes
-rw-r--r--gfx/attack_anim_2.pngbin999 -> 0 bytes
-rw-r--r--gfx/battle/attack_anim_1.pngbin0 -> 977 bytes
-rw-r--r--gfx/battle/attack_anim_2.pngbin0 -> 936 bytes
-rw-r--r--gfx/battle/balls.pngbin0 -> 115 bytes
-rw-r--r--gfx/battle/battle_hud_1.pngbin0 -> 102 bytes
-rw-r--r--gfx/battle/battle_hud_2.pngbin0 -> 88 bytes
-rw-r--r--gfx/battle/battle_hud_3.pngbin0 -> 93 bytes
-rw-r--r--gfx/battle/ghost.png (renamed from pic/other/ghost.png)bin497 -> 497 bytes
-rw-r--r--gfx/battle/minimize.png (renamed from gfx/minimized_mon_sprite.png)bin74 -> 74 bytes
-rw-r--r--gfx/battle/oldman.png (renamed from pic/trainer/oldman.png)bin259 -> 259 bytes
-rw-r--r--gfx/battle/prof.oakb.png (renamed from pic/ytrainer/prof.oakb.png)bin224 -> 224 bytes
-rw-r--r--gfx/battle_hud1.pngbin94 -> 0 bytes
-rw-r--r--gfx/battle_hud2.pngbin79 -> 0 bytes
-rw-r--r--gfx/battle_hud3.pngbin88 -> 0 bytes
-rw-r--r--gfx/credits/the_end.png (renamed from gfx/theend.png)bin139 -> 139 bytes
-rw-r--r--gfx/emotes/bolt.pngbin0 -> 126 bytes
-rw-r--r--gfx/emotes/fish.pngbin0 -> 123 bytes
-rw-r--r--gfx/emotes/happy.pngbin0 -> 125 bytes
-rw-r--r--gfx/emotes/heart.pngbin0 -> 133 bytes
-rw-r--r--gfx/emotes/question.pngbin0 -> 126 bytes
-rw-r--r--gfx/emotes/shock.pngbin0 -> 110 bytes
-rw-r--r--gfx/emotes/skull.pngbin0 -> 127 bytes
-rw-r--r--gfx/emotes/zzz.pngbin0 -> 123 bytes
-rw-r--r--gfx/emotion_bubbles.pngbin269 -> 0 bytes
-rw-r--r--gfx/fishing.asm4
-rw-r--r--gfx/font.asm33
-rw-r--r--gfx/font/AB.png (renamed from gfx/AB.png)bin90 -> 90 bytes
-rw-r--r--gfx/font/ED.png (renamed from gfx/ED_tile.png)bin79 -> 79 bytes
-rw-r--r--gfx/font/P.png (renamed from gfx/p_tile.png)bin77 -> 77 bytes
-rw-r--r--gfx/font/font.png (renamed from gfx/font.png)bin625 -> 625 bytes
-rw-r--r--gfx/font/font_battle_extra.pngbin0 -> 252 bytes
-rw-r--r--gfx/font/font_extra.pngbin0 -> 283 bytes
-rw-r--r--gfx/hp_bar_and_status.pngbin262 -> 0 bytes
-rw-r--r--gfx/icons/bug.pngbin0 -> 131 bytes
-rw-r--r--gfx/icons/plant.pngbin0 -> 140 bytes
-rw-r--r--gfx/icons/quadruped.pngbin0 -> 129 bytes
-rw-r--r--gfx/icons/snake.pngbin0 -> 123 bytes
-rw-r--r--gfx/intro/gengar_1.tilemapbin0 -> 49 bytes
-rw-r--r--gfx/intro/gengar_2.tilemapbin0 -> 49 bytes
-rw-r--r--gfx/intro/gengar_3.tilemapbin0 -> 49 bytes
-rw-r--r--gfx/mon_ow_sprites.pngbin324 -> 0 bytes
-rw-r--r--gfx/overworld/battle_transition.png (renamed from gfx/battle_transition.png)bin68 -> 68 bytes
-rw-r--r--gfx/overworld/fishing_rod.png (renamed from gfx/red_fishingrod_tiles.png)bin108 -> 108 bytes
-rw-r--r--gfx/overworld/heal_machine.png (renamed from gfx/pokecenter_ball.png)bin93 -> 93 bytes
-rw-r--r--gfx/overworld/red_fish_back.png (renamed from gfx/red_fishing_tile_back.png)bin114 -> 114 bytes
-rw-r--r--gfx/overworld/red_fish_front.png (renamed from gfx/red_fishing_tile_front.png)bin107 -> 107 bytes
-rw-r--r--gfx/overworld/red_fish_side.png (renamed from gfx/red_fishing_tile_side.png)bin111 -> 111 bytes
-rw-r--r--gfx/overworld/shadow.png (renamed from gfx/ledge_hopping_shadow.png)bin84 -> 84 bytes
-rw-r--r--gfx/overworld/smoke.png (renamed from gfx/ss_anne_smoke_puff.png)bin90 -> 90 bytes
-rw-r--r--gfx/overworld/spinners.pngbin0 -> 128 bytes
-rw-r--r--gfx/pics.asm376
-rw-r--r--gfx/player.asm3
-rw-r--r--gfx/player/red.png (renamed from pic/trainer/red.png)bin410 -> 410 bytes
-rw-r--r--gfx/player/redb.png (renamed from pic/trainer/redb.png)bin256 -> 256 bytes
-rw-r--r--gfx/player/shrink1.png (renamed from pic/trainer/shrink1.png)bin196 -> 196 bytes
-rw-r--r--gfx/player/shrink2.png (renamed from pic/trainer/shrink2.png)bin139 -> 139 bytes
-rw-r--r--gfx/player/yellow/red.png (renamed from pic/ytrainer/red.png)bin414 -> 414 bytes
-rw-r--r--gfx/pokeball.pngbin124 -> 0 bytes
-rw-r--r--gfx/pokedex/pokedex.png (renamed from gfx/pokedex.png)bin179 -> 179 bytes
-rw-r--r--gfx/pokemon/back/abrab.png (renamed from pic/monback/abrab.png)bin244 -> 244 bytes
-rw-r--r--gfx/pokemon/back/aerodactylb.png (renamed from pic/monback/aerodactylb.png)bin259 -> 259 bytes
-rw-r--r--gfx/pokemon/back/alakazamb.png (renamed from pic/monback/alakazamb.png)bin267 -> 267 bytes
-rw-r--r--gfx/pokemon/back/arbokb.png (renamed from pic/monback/arbokb.png)bin263 -> 263 bytes
-rw-r--r--gfx/pokemon/back/arcanineb.png (renamed from pic/monback/arcanineb.png)bin271 -> 271 bytes
-rw-r--r--gfx/pokemon/back/articunob.png (renamed from pic/monback/articunob.png)bin203 -> 203 bytes
-rw-r--r--gfx/pokemon/back/beedrillb.png (renamed from pic/monback/beedrillb.png)bin222 -> 222 bytes
-rw-r--r--gfx/pokemon/back/bellsproutb.png (renamed from pic/monback/bellsproutb.png)bin225 -> 225 bytes
-rw-r--r--gfx/pokemon/back/blastoiseb.png (renamed from pic/monback/blastoiseb.png)bin246 -> 246 bytes
-rw-r--r--gfx/pokemon/back/bulbasaurb.png (renamed from pic/monback/bulbasaurb.png)bin209 -> 209 bytes
-rw-r--r--gfx/pokemon/back/butterfreeb.png (renamed from pic/monback/butterfreeb.png)bin234 -> 234 bytes
-rw-r--r--gfx/pokemon/back/caterpieb.png (renamed from pic/monback/caterpieb.png)bin174 -> 174 bytes
-rw-r--r--gfx/pokemon/back/chanseyb.png (renamed from pic/monback/chanseyb.png)bin203 -> 203 bytes
-rw-r--r--gfx/pokemon/back/charizardb.png (renamed from pic/monback/charizardb.png)bin263 -> 263 bytes
-rw-r--r--gfx/pokemon/back/charmanderb.png (renamed from pic/monback/charmanderb.png)bin178 -> 178 bytes
-rw-r--r--gfx/pokemon/back/charmeleonb.png (renamed from pic/monback/charmeleonb.png)bin220 -> 220 bytes
-rw-r--r--gfx/pokemon/back/clefableb.png (renamed from pic/monback/clefableb.png)bin259 -> 259 bytes
-rw-r--r--gfx/pokemon/back/clefairyb.png (renamed from pic/monback/clefairyb.png)bin179 -> 179 bytes
-rw-r--r--gfx/pokemon/back/cloysterb.png (renamed from pic/monback/cloysterb.png)bin292 -> 292 bytes
-rw-r--r--gfx/pokemon/back/cuboneb.png (renamed from pic/monback/cuboneb.png)bin220 -> 220 bytes
-rw-r--r--gfx/pokemon/back/dewgongb.png (renamed from pic/monback/dewgongb.png)bin223 -> 223 bytes
-rw-r--r--gfx/pokemon/back/diglettb.png (renamed from pic/monback/diglettb.png)bin197 -> 197 bytes
-rw-r--r--gfx/pokemon/back/dittob.png (renamed from pic/monback/dittob.png)bin159 -> 159 bytes
-rw-r--r--gfx/pokemon/back/dodriob.png (renamed from pic/monback/dodriob.png)bin273 -> 273 bytes
-rw-r--r--gfx/pokemon/back/doduob.png (renamed from pic/monback/doduob.png)bin207 -> 207 bytes
-rw-r--r--gfx/pokemon/back/dragonairb.png (renamed from pic/monback/dragonairb.png)bin237 -> 237 bytes
-rw-r--r--gfx/pokemon/back/dragoniteb.png (renamed from pic/monback/dragoniteb.png)bin277 -> 277 bytes
-rw-r--r--gfx/pokemon/back/dratinib.png (renamed from pic/monback/dratinib.png)bin196 -> 196 bytes
-rw-r--r--gfx/pokemon/back/drowzeeb.png (renamed from pic/monback/drowzeeb.png)bin215 -> 215 bytes
-rw-r--r--gfx/pokemon/back/dugtriob.png (renamed from pic/monback/dugtriob.png)bin249 -> 249 bytes
-rw-r--r--gfx/pokemon/back/eeveeb.png (renamed from pic/monback/eeveeb.png)bin199 -> 199 bytes
-rw-r--r--gfx/pokemon/back/ekansb.png (renamed from pic/monback/ekansb.png)bin158 -> 158 bytes
-rw-r--r--gfx/pokemon/back/electabuzzb.png (renamed from pic/monback/electabuzzb.png)bin258 -> 258 bytes
-rw-r--r--gfx/pokemon/back/electrodeb.png (renamed from pic/monback/electrodeb.png)bin199 -> 199 bytes
-rw-r--r--gfx/pokemon/back/exeggcuteb.png (renamed from pic/monback/exeggcuteb.png)bin236 -> 236 bytes
-rw-r--r--gfx/pokemon/back/exeggutorb.png (renamed from pic/monback/exeggutorb.png)bin272 -> 272 bytes
-rw-r--r--gfx/pokemon/back/farfetchdb.png (renamed from pic/monback/farfetchdb.png)bin265 -> 265 bytes
-rw-r--r--gfx/pokemon/back/fearowb.png (renamed from pic/monback/fearowb.png)bin238 -> 238 bytes
-rw-r--r--gfx/pokemon/back/flareonb.png (renamed from pic/monback/flareonb.png)bin254 -> 254 bytes
-rw-r--r--gfx/pokemon/back/gastlyb.png (renamed from pic/monback/gastlyb.png)bin227 -> 227 bytes
-rw-r--r--gfx/pokemon/back/gengarb.png (renamed from pic/monback/gengarb.png)bin206 -> 206 bytes
-rw-r--r--gfx/pokemon/back/geodudeb.png (renamed from pic/monback/geodudeb.png)bin169 -> 169 bytes
-rw-r--r--gfx/pokemon/back/gloomb.png (renamed from pic/monback/gloomb.png)bin285 -> 285 bytes
-rw-r--r--gfx/pokemon/back/golbatb.png (renamed from pic/monback/golbatb.png)bin193 -> 193 bytes
-rw-r--r--gfx/pokemon/back/goldeenb.png (renamed from pic/monback/goldeenb.png)bin202 -> 202 bytes
-rw-r--r--gfx/pokemon/back/golduckb.png (renamed from pic/monback/golduckb.png)bin248 -> 248 bytes
-rw-r--r--gfx/pokemon/back/golemb.png (renamed from pic/monback/golemb.png)bin206 -> 206 bytes
-rw-r--r--gfx/pokemon/back/gravelerb.png (renamed from pic/monback/gravelerb.png)bin276 -> 276 bytes
-rw-r--r--gfx/pokemon/back/grimerb.png (renamed from pic/monback/grimerb.png)bin291 -> 291 bytes
-rw-r--r--gfx/pokemon/back/growlitheb.png (renamed from pic/monback/growlitheb.png)bin201 -> 201 bytes
-rw-r--r--gfx/pokemon/back/gyaradosb.png (renamed from pic/monback/gyaradosb.png)bin254 -> 254 bytes
-rw-r--r--gfx/pokemon/back/haunterb.png (renamed from pic/monback/haunterb.png)bin232 -> 232 bytes
-rw-r--r--gfx/pokemon/back/hitmonchanb.png (renamed from pic/monback/hitmonchanb.png)bin228 -> 228 bytes
-rw-r--r--gfx/pokemon/back/hitmonleeb.png (renamed from pic/monback/hitmonleeb.png)bin207 -> 207 bytes
-rw-r--r--gfx/pokemon/back/horseab.png (renamed from pic/monback/horseab.png)bin168 -> 168 bytes
-rw-r--r--gfx/pokemon/back/hypnob.png (renamed from pic/monback/hypnob.png)bin239 -> 239 bytes
-rw-r--r--gfx/pokemon/back/ivysaurb.png (renamed from pic/monback/ivysaurb.png)bin223 -> 223 bytes
-rw-r--r--gfx/pokemon/back/jigglypuffb.png (renamed from pic/monback/jigglypuffb.png)bin151 -> 151 bytes
-rw-r--r--gfx/pokemon/back/jolteonb.png (renamed from pic/monback/jolteonb.png)bin271 -> 271 bytes
-rw-r--r--gfx/pokemon/back/jynxb.png (renamed from pic/monback/jynxb.png)bin225 -> 225 bytes
-rw-r--r--gfx/pokemon/back/kabutob.png (renamed from pic/monback/kabutob.png)bin174 -> 174 bytes
-rw-r--r--gfx/pokemon/back/kabutopsb.png (renamed from pic/monback/kabutopsb.png)bin252 -> 252 bytes
-rw-r--r--gfx/pokemon/back/kadabrab.png (renamed from pic/monback/kadabrab.png)bin242 -> 242 bytes
-rw-r--r--gfx/pokemon/back/kakunab.png (renamed from pic/monback/kakunab.png)bin169 -> 169 bytes
-rw-r--r--gfx/pokemon/back/kangaskhanb.png (renamed from pic/monback/kangaskhanb.png)bin260 -> 260 bytes
-rw-r--r--gfx/pokemon/back/kinglerb.png (renamed from pic/monback/kinglerb.png)bin276 -> 276 bytes
-rw-r--r--gfx/pokemon/back/koffingb.png (renamed from pic/monback/koffingb.png)bin275 -> 275 bytes
-rw-r--r--gfx/pokemon/back/krabbyb.png (renamed from pic/monback/krabbyb.png)bin205 -> 205 bytes
-rw-r--r--gfx/pokemon/back/laprasb.png (renamed from pic/monback/laprasb.png)bin238 -> 238 bytes
-rw-r--r--gfx/pokemon/back/lickitungb.png (renamed from pic/monback/lickitungb.png)bin266 -> 266 bytes
-rw-r--r--gfx/pokemon/back/machampb.png (renamed from pic/monback/machampb.png)bin236 -> 236 bytes
-rw-r--r--gfx/pokemon/back/machokeb.png (renamed from pic/monback/machokeb.png)bin245 -> 245 bytes
-rw-r--r--gfx/pokemon/back/machopb.png (renamed from pic/monback/machopb.png)bin216 -> 216 bytes
-rw-r--r--gfx/pokemon/back/magikarpb.png (renamed from pic/monback/magikarpb.png)bin247 -> 247 bytes
-rw-r--r--gfx/pokemon/back/magmarb.png (renamed from pic/monback/magmarb.png)bin286 -> 286 bytes
-rw-r--r--gfx/pokemon/back/magnemiteb.png (renamed from pic/monback/magnemiteb.png)bin165 -> 165 bytes
-rw-r--r--gfx/pokemon/back/magnetonb.png (renamed from pic/monback/magnetonb.png)bin230 -> 230 bytes
-rw-r--r--gfx/pokemon/back/mankeyb.png (renamed from pic/monback/mankeyb.png)bin207 -> 207 bytes
-rw-r--r--gfx/pokemon/back/marowakb.png (renamed from pic/monback/marowakb.png)bin249 -> 249 bytes
-rw-r--r--gfx/pokemon/back/meowthb.png (renamed from pic/monback/meowthb.png)bin181 -> 181 bytes
-rw-r--r--gfx/pokemon/back/metapodb.png (renamed from pic/monback/metapodb.png)bin214 -> 214 bytes
-rw-r--r--gfx/pokemon/back/mewb.png (renamed from pic/monback/mewb.png)bin188 -> 188 bytes
-rw-r--r--gfx/pokemon/back/mewtwob.png (renamed from pic/monback/mewtwob.png)bin278 -> 278 bytes
-rw-r--r--gfx/pokemon/back/moltresb.png (renamed from pic/monback/moltresb.png)bin263 -> 263 bytes
-rw-r--r--gfx/pokemon/back/mr.mimeb.png (renamed from pic/monback/mr.mimeb.png)bin232 -> 232 bytes
-rw-r--r--gfx/pokemon/back/mukb.png (renamed from pic/monback/mukb.png)bin229 -> 229 bytes
-rw-r--r--gfx/pokemon/back/nidokingb.png (renamed from pic/monback/nidokingb.png)bin292 -> 292 bytes
-rw-r--r--gfx/pokemon/back/nidoqueenb.png (renamed from pic/monback/nidoqueenb.png)bin306 -> 306 bytes
-rw-r--r--gfx/pokemon/back/nidoranfb.png (renamed from pic/monback/nidoranfb.png)bin151 -> 151 bytes
-rw-r--r--gfx/pokemon/back/nidoranmb.png (renamed from pic/monback/nidoranmb.png)bin191 -> 191 bytes
-rw-r--r--gfx/pokemon/back/nidorinab.png (renamed from pic/monback/nidorinab.png)bin246 -> 246 bytes
-rw-r--r--gfx/pokemon/back/nidorinob.png (renamed from pic/monback/nidorinob.png)bin276 -> 276 bytes
-rw-r--r--gfx/pokemon/back/ninetalesb.png (renamed from pic/monback/ninetalesb.png)bin255 -> 255 bytes
-rw-r--r--gfx/pokemon/back/oddishb.png (renamed from pic/monback/oddishb.png)bin264 -> 264 bytes
-rw-r--r--gfx/pokemon/back/omanyteb.png (renamed from pic/monback/omanyteb.png)bin176 -> 176 bytes
-rw-r--r--gfx/pokemon/back/omastarb.png (renamed from pic/monback/omastarb.png)bin282 -> 282 bytes
-rw-r--r--gfx/pokemon/back/onixb.png (renamed from pic/monback/onixb.png)bin250 -> 250 bytes
-rw-r--r--gfx/pokemon/back/parasb.png (renamed from pic/monback/parasb.png)bin195 -> 195 bytes
-rw-r--r--gfx/pokemon/back/parasectb.png (renamed from pic/monback/parasectb.png)bin221 -> 221 bytes
-rw-r--r--gfx/pokemon/back/persianb.png (renamed from pic/monback/persianb.png)bin256 -> 256 bytes
-rw-r--r--gfx/pokemon/back/pidgeotb.png (renamed from pic/monback/pidgeotb.png)bin270 -> 270 bytes
-rw-r--r--gfx/pokemon/back/pidgeottob.png (renamed from pic/monback/pidgeottob.png)bin199 -> 199 bytes
-rw-r--r--gfx/pokemon/back/pidgeyb.png (renamed from pic/monback/pidgeyb.png)bin149 -> 149 bytes
-rw-r--r--gfx/pokemon/back/pikachub.png (renamed from pic/monback/pikachub.png)bin238 -> 238 bytes
-rw-r--r--gfx/pokemon/back/pinsirb.png (renamed from pic/monback/pinsirb.png)bin267 -> 267 bytes
-rw-r--r--gfx/pokemon/back/poliwagb.png (renamed from pic/monback/poliwagb.png)bin171 -> 171 bytes
-rw-r--r--gfx/pokemon/back/poliwhirlb.png (renamed from pic/monback/poliwhirlb.png)bin211 -> 211 bytes
-rw-r--r--gfx/pokemon/back/poliwrathb.png (renamed from pic/monback/poliwrathb.png)bin181 -> 181 bytes
-rw-r--r--gfx/pokemon/back/ponytab.png (renamed from pic/monback/ponytab.png)bin251 -> 251 bytes
-rw-r--r--gfx/pokemon/back/porygonb.png (renamed from pic/monback/porygonb.png)bin198 -> 198 bytes
-rw-r--r--gfx/pokemon/back/primeapeb.png (renamed from pic/monback/primeapeb.png)bin240 -> 240 bytes
-rw-r--r--gfx/pokemon/back/psyduckb.png (renamed from pic/monback/psyduckb.png)bin208 -> 208 bytes
-rw-r--r--gfx/pokemon/back/raichub.png (renamed from pic/monback/raichub.png)bin258 -> 258 bytes
-rw-r--r--gfx/pokemon/back/rapidashb.png (renamed from pic/monback/rapidashb.png)bin286 -> 286 bytes
-rw-r--r--gfx/pokemon/back/raticateb.png (renamed from pic/monback/raticateb.png)bin220 -> 220 bytes
-rw-r--r--gfx/pokemon/back/rattatab.png (renamed from pic/monback/rattatab.png)bin140 -> 140 bytes
-rw-r--r--gfx/pokemon/back/rhydonb.png (renamed from pic/monback/rhydonb.png)bin273 -> 273 bytes
-rw-r--r--gfx/pokemon/back/rhyhornb.png (renamed from pic/monback/rhyhornb.png)bin299 -> 299 bytes
-rw-r--r--gfx/pokemon/back/sandshrewb.png (renamed from pic/monback/sandshrewb.png)bin216 -> 216 bytes
-rw-r--r--gfx/pokemon/back/sandslashb.png (renamed from pic/monback/sandslashb.png)bin244 -> 244 bytes
-rw-r--r--gfx/pokemon/back/scytherb.png (renamed from pic/monback/scytherb.png)bin263 -> 263 bytes
-rw-r--r--gfx/pokemon/back/seadrab.png (renamed from pic/monback/seadrab.png)bin273 -> 273 bytes
-rw-r--r--gfx/pokemon/back/seakingb.png (renamed from pic/monback/seakingb.png)bin285 -> 285 bytes
-rw-r--r--gfx/pokemon/back/seelb.png (renamed from pic/monback/seelb.png)bin184 -> 184 bytes
-rw-r--r--gfx/pokemon/back/shellderb.png (renamed from pic/monback/shellderb.png)bin185 -> 185 bytes
-rw-r--r--gfx/pokemon/back/slowbrob.png (renamed from pic/monback/slowbrob.png)bin277 -> 277 bytes
-rw-r--r--gfx/pokemon/back/slowpokeb.png (renamed from pic/monback/slowpokeb.png)bin217 -> 217 bytes
-rw-r--r--gfx/pokemon/back/snorlaxb.png (renamed from pic/monback/snorlaxb.png)bin189 -> 189 bytes
-rw-r--r--gfx/pokemon/back/spearowb.png (renamed from pic/monback/spearowb.png)bin172 -> 172 bytes
-rw-r--r--gfx/pokemon/back/squirtleb.png (renamed from pic/monback/squirtleb.png)bin225 -> 225 bytes
-rw-r--r--gfx/pokemon/back/starmieb.png (renamed from pic/monback/starmieb.png)bin180 -> 180 bytes
-rw-r--r--gfx/pokemon/back/staryub.png (renamed from pic/monback/staryub.png)bin160 -> 160 bytes
-rw-r--r--gfx/pokemon/back/tangelab.png (renamed from pic/monback/tangelab.png)bin203 -> 203 bytes
-rw-r--r--gfx/pokemon/back/taurosb.png (renamed from pic/monback/taurosb.png)bin260 -> 260 bytes
-rw-r--r--gfx/pokemon/back/tentacoolb.png (renamed from pic/monback/tentacoolb.png)bin172 -> 172 bytes
-rw-r--r--gfx/pokemon/back/tentacruelb.png (renamed from pic/monback/tentacruelb.png)bin288 -> 288 bytes
-rw-r--r--gfx/pokemon/back/vaporeonb.png (renamed from pic/monback/vaporeonb.png)bin262 -> 262 bytes
-rw-r--r--gfx/pokemon/back/venomothb.png (renamed from pic/monback/venomothb.png)bin184 -> 184 bytes
-rw-r--r--gfx/pokemon/back/venonatb.png (renamed from pic/monback/venonatb.png)bin192 -> 192 bytes
-rw-r--r--gfx/pokemon/back/venusaurb.png (renamed from pic/monback/venusaurb.png)bin289 -> 289 bytes
-rw-r--r--gfx/pokemon/back/victreebelb.png (renamed from pic/monback/victreebelb.png)bin257 -> 257 bytes
-rw-r--r--gfx/pokemon/back/vileplumeb.png (renamed from pic/monback/vileplumeb.png)bin233 -> 233 bytes
-rw-r--r--gfx/pokemon/back/voltorbb.png (renamed from pic/monback/voltorbb.png)bin187 -> 187 bytes
-rw-r--r--gfx/pokemon/back/vulpixb.png (renamed from pic/monback/vulpixb.png)bin201 -> 201 bytes
-rw-r--r--gfx/pokemon/back/wartortleb.png (renamed from pic/monback/wartortleb.png)bin260 -> 260 bytes
-rw-r--r--gfx/pokemon/back/weedleb.png (renamed from pic/monback/weedleb.png)bin182 -> 182 bytes
-rw-r--r--gfx/pokemon/back/weepinbellb.png (renamed from pic/monback/weepinbellb.png)bin219 -> 219 bytes
-rw-r--r--gfx/pokemon/back/weezingb.png (renamed from pic/monback/weezingb.png)bin287 -> 287 bytes
-rw-r--r--gfx/pokemon/back/wigglytuffb.png (renamed from pic/monback/wigglytuffb.png)bin220 -> 220 bytes
-rw-r--r--gfx/pokemon/back/zapdosb.png (renamed from pic/monback/zapdosb.png)bin252 -> 252 bytes
-rw-r--r--gfx/pokemon/back/zubatb.png (renamed from pic/monback/zubatb.png)bin177 -> 177 bytes
-rw-r--r--gfx/pokemon/downscaled_3x3.tilemap1
-rw-r--r--gfx/pokemon/downscaled_5x5.tilemap1
-rw-r--r--gfx/pokemon/front.tilemapbin0 -> 49 bytes
-rw-r--r--gfx/pokemon/front/abra.pngbin0 -> 390 bytes
-rw-r--r--gfx/pokemon/front/aerodactyl.pngbin0 -> 583 bytes
-rw-r--r--gfx/pokemon/front/alakazam.pngbin0 -> 688 bytes
-rw-r--r--gfx/pokemon/front/arbok.pngbin0 -> 728 bytes
-rw-r--r--gfx/pokemon/front/arcanine.pngbin0 -> 722 bytes
-rw-r--r--gfx/pokemon/front/articuno.pngbin0 -> 705 bytes
-rw-r--r--gfx/pokemon/front/beedrill.pngbin0 -> 666 bytes
-rw-r--r--gfx/pokemon/front/bellsprout.pngbin0 -> 313 bytes
-rw-r--r--gfx/pokemon/front/blastoise.pngbin0 -> 685 bytes
-rw-r--r--gfx/pokemon/front/bulbasaur.pngbin0 -> 362 bytes
-rw-r--r--gfx/pokemon/front/butterfree.pngbin0 -> 628 bytes
-rw-r--r--gfx/pokemon/front/caterpie.pngbin0 -> 243 bytes
-rw-r--r--gfx/pokemon/front/chansey.pngbin0 -> 496 bytes
-rw-r--r--gfx/pokemon/front/charizard.pngbin0 -> 676 bytes
-rw-r--r--gfx/pokemon/front/charmander.pngbin0 -> 394 bytes
-rw-r--r--gfx/pokemon/front/charmeleon.pngbin0 -> 461 bytes
-rw-r--r--gfx/pokemon/front/clefable.pngbin0 -> 425 bytes
-rw-r--r--gfx/pokemon/front/clefairy.pngbin0 -> 375 bytes
-rw-r--r--gfx/pokemon/front/cloyster.pngbin0 -> 690 bytes
-rw-r--r--gfx/pokemon/front/cubone.pngbin0 -> 360 bytes
-rw-r--r--gfx/pokemon/front/dewgong.pngbin0 -> 460 bytes
-rw-r--r--gfx/pokemon/front/diglett.pngbin0 -> 314 bytes
-rw-r--r--gfx/pokemon/front/ditto.pngbin0 -> 275 bytes
-rw-r--r--gfx/pokemon/front/dodrio.pngbin0 -> 592 bytes
-rw-r--r--gfx/pokemon/front/doduo.pngbin0 -> 348 bytes
-rw-r--r--gfx/pokemon/front/dragonair.pngbin0 -> 459 bytes
-rw-r--r--gfx/pokemon/front/dragonite.pngbin0 -> 638 bytes
-rw-r--r--gfx/pokemon/front/dratini.pngbin0 -> 357 bytes
-rw-r--r--gfx/pokemon/front/drowzee.pngbin0 -> 499 bytes
-rw-r--r--gfx/pokemon/front/dugtrio.pngbin0 -> 565 bytes
-rw-r--r--gfx/pokemon/front/eevee.pngbin0 -> 374 bytes
-rw-r--r--gfx/pokemon/front/ekans.pngbin0 -> 376 bytes
-rw-r--r--gfx/pokemon/front/electabuzz.pngbin0 -> 515 bytes
-rw-r--r--gfx/pokemon/front/electrode.pngbin0 -> 323 bytes
-rw-r--r--gfx/pokemon/front/exeggcute.pngbin0 -> 664 bytes
-rw-r--r--gfx/pokemon/front/exeggutor.pngbin0 -> 713 bytes
-rw-r--r--gfx/pokemon/front/farfetchd.pngbin0 -> 614 bytes
-rw-r--r--gfx/pokemon/front/fearow.pngbin0 -> 564 bytes
-rw-r--r--gfx/pokemon/front/flareon.pngbin0 -> 515 bytes
-rw-r--r--gfx/pokemon/front/fossilaerodactyl.png (renamed from pic/ymon/fossilaerodactyl.png)bin539 -> 539 bytes
-rw-r--r--gfx/pokemon/front/fossilkabutops.png (renamed from pic/ymon/fossilkabutops.png)bin546 -> 546 bytes
-rw-r--r--gfx/pokemon/front/gastly.pngbin0 -> 668 bytes
-rw-r--r--gfx/pokemon/front/gengar.pngbin0 -> 447 bytes
-rw-r--r--gfx/pokemon/front/geodude.pngbin0 -> 321 bytes
-rw-r--r--gfx/pokemon/front/gloom.pngbin0 -> 429 bytes
-rw-r--r--gfx/pokemon/front/golbat.pngbin0 -> 691 bytes
-rw-r--r--gfx/pokemon/front/goldeen.pngbin0 -> 415 bytes
-rw-r--r--gfx/pokemon/front/golduck.pngbin0 -> 596 bytes
-rw-r--r--gfx/pokemon/front/golem.pngbin0 -> 519 bytes
-rw-r--r--gfx/pokemon/front/graveler.pngbin0 -> 568 bytes
-rw-r--r--gfx/pokemon/front/grimer.pngbin0 -> 441 bytes
-rw-r--r--gfx/pokemon/front/growlithe.pngbin0 -> 388 bytes
-rw-r--r--gfx/pokemon/front/gyarados.pngbin0 -> 759 bytes
-rw-r--r--gfx/pokemon/front/haunter.pngbin0 -> 555 bytes
-rw-r--r--gfx/pokemon/front/hitmonchan.pngbin0 -> 538 bytes
-rw-r--r--gfx/pokemon/front/hitmonlee.pngbin0 -> 587 bytes
-rw-r--r--gfx/pokemon/front/horsea.pngbin0 -> 291 bytes
-rw-r--r--gfx/pokemon/front/hypno.pngbin0 -> 638 bytes
-rw-r--r--gfx/pokemon/front/ivysaur.pngbin0 -> 431 bytes
-rw-r--r--gfx/pokemon/front/jigglypuff.pngbin0 -> 348 bytes
-rw-r--r--gfx/pokemon/front/jolteon.pngbin0 -> 514 bytes
-rw-r--r--gfx/pokemon/front/jynx.pngbin0 -> 578 bytes
-rw-r--r--gfx/pokemon/front/kabuto.pngbin0 -> 326 bytes
-rw-r--r--gfx/pokemon/front/kabutops.pngbin0 -> 560 bytes
-rw-r--r--gfx/pokemon/front/kadabra.pngbin0 -> 523 bytes
-rw-r--r--gfx/pokemon/front/kakuna.pngbin0 -> 316 bytes
-rw-r--r--gfx/pokemon/front/kangaskhan.pngbin0 -> 673 bytes
-rw-r--r--gfx/pokemon/front/kingler.pngbin0 -> 616 bytes
-rw-r--r--gfx/pokemon/front/koffing.pngbin0 -> 599 bytes
-rw-r--r--gfx/pokemon/front/krabby.pngbin0 -> 436 bytes
-rw-r--r--gfx/pokemon/front/lapras.pngbin0 -> 574 bytes
-rw-r--r--gfx/pokemon/front/lickitung.pngbin0 -> 514 bytes
-rw-r--r--gfx/pokemon/front/machamp.pngbin0 -> 653 bytes
-rw-r--r--gfx/pokemon/front/machoke.pngbin0 -> 633 bytes
-rw-r--r--gfx/pokemon/front/machop.pngbin0 -> 381 bytes
-rw-r--r--gfx/pokemon/front/magikarp.pngbin0 -> 533 bytes
-rw-r--r--gfx/pokemon/front/magmar.pngbin0 -> 496 bytes
-rw-r--r--gfx/pokemon/front/magnemite.pngbin0 -> 215 bytes
-rw-r--r--gfx/pokemon/front/magneton.pngbin0 -> 552 bytes
-rw-r--r--gfx/pokemon/front/mankey.pngbin0 -> 395 bytes
-rw-r--r--gfx/pokemon/front/marowak.pngbin0 -> 501 bytes
-rw-r--r--gfx/pokemon/front/meowth.pngbin0 -> 383 bytes
-rw-r--r--gfx/pokemon/front/metapod.pngbin0 -> 259 bytes
-rw-r--r--gfx/pokemon/front/mew.pngbin0 -> 365 bytes
-rw-r--r--gfx/pokemon/front/mewtwo.pngbin0 -> 652 bytes
-rw-r--r--gfx/pokemon/front/moltres.pngbin0 -> 747 bytes
-rw-r--r--gfx/pokemon/front/mr.mime.pngbin0 -> 475 bytes
-rw-r--r--gfx/pokemon/front/muk.pngbin0 -> 685 bytes
-rw-r--r--gfx/pokemon/front/nidoking.pngbin0 -> 752 bytes
-rw-r--r--gfx/pokemon/front/nidoqueen.pngbin0 -> 652 bytes
-rw-r--r--gfx/pokemon/front/nidoranf.pngbin0 -> 264 bytes
-rw-r--r--gfx/pokemon/front/nidoranm.pngbin0 -> 353 bytes
-rw-r--r--gfx/pokemon/front/nidorina.pngbin0 -> 438 bytes
-rw-r--r--gfx/pokemon/front/nidorino.pngbin0 -> 517 bytes
-rw-r--r--gfx/pokemon/front/ninetales.pngbin0 -> 658 bytes
-rw-r--r--gfx/pokemon/front/oddish.pngbin0 -> 267 bytes
-rw-r--r--gfx/pokemon/front/omanyte.pngbin0 -> 331 bytes
-rw-r--r--gfx/pokemon/front/omastar.pngbin0 -> 585 bytes
-rw-r--r--gfx/pokemon/front/onix.pngbin0 -> 558 bytes
-rw-r--r--gfx/pokemon/front/paras.pngbin0 -> 307 bytes
-rw-r--r--gfx/pokemon/front/parasect.pngbin0 -> 598 bytes
-rw-r--r--gfx/pokemon/front/persian.pngbin0 -> 619 bytes
-rw-r--r--gfx/pokemon/front/pidgeot.pngbin0 -> 581 bytes
-rw-r--r--gfx/pokemon/front/pidgeotto.pngbin0 -> 487 bytes
-rw-r--r--gfx/pokemon/front/pidgey.pngbin0 -> 303 bytes
-rw-r--r--gfx/pokemon/front/pikachu.pngbin0 -> 396 bytes
-rw-r--r--gfx/pokemon/front/pinsir.pngbin0 -> 617 bytes
-rw-r--r--gfx/pokemon/front/poliwag.pngbin0 -> 318 bytes
-rw-r--r--gfx/pokemon/front/poliwhirl.pngbin0 -> 478 bytes
-rw-r--r--gfx/pokemon/front/poliwrath.pngbin0 -> 513 bytes
-rw-r--r--gfx/pokemon/front/ponyta.pngbin0 -> 503 bytes
-rw-r--r--gfx/pokemon/front/porygon.pngbin0 -> 496 bytes
-rw-r--r--gfx/pokemon/front/primeape.pngbin0 -> 607 bytes
-rw-r--r--gfx/pokemon/front/psyduck.pngbin0 -> 423 bytes
-rw-r--r--gfx/pokemon/front/raichu.pngbin0 -> 595 bytes
-rw-r--r--gfx/pokemon/front/rapidash.pngbin0 -> 710 bytes
-rw-r--r--gfx/pokemon/front/raticate.pngbin0 -> 539 bytes
-rw-r--r--gfx/pokemon/front/rattata.pngbin0 -> 325 bytes
-rw-r--r--gfx/pokemon/front/rhydon.pngbin0 -> 657 bytes
-rw-r--r--gfx/pokemon/front/rhyhorn.pngbin0 -> 661 bytes
-rw-r--r--gfx/pokemon/front/sandshrew.pngbin0 -> 407 bytes
-rw-r--r--gfx/pokemon/front/sandslash.pngbin0 -> 556 bytes
-rw-r--r--gfx/pokemon/front/scyther.pngbin0 -> 690 bytes
-rw-r--r--gfx/pokemon/front/seadra.pngbin0 -> 482 bytes
-rw-r--r--gfx/pokemon/front/seaking.pngbin0 -> 627 bytes
-rw-r--r--gfx/pokemon/front/seel.pngbin0 -> 490 bytes
-rw-r--r--gfx/pokemon/front/shellder.pngbin0 -> 396 bytes
-rw-r--r--gfx/pokemon/front/slowbro.pngbin0 -> 765 bytes
-rw-r--r--gfx/pokemon/front/slowpoke.pngbin0 -> 428 bytes
-rw-r--r--gfx/pokemon/front/snorlax.pngbin0 -> 610 bytes
-rw-r--r--gfx/pokemon/front/spearow.pngbin0 -> 337 bytes
-rw-r--r--gfx/pokemon/front/squirtle.pngbin0 -> 318 bytes
-rw-r--r--gfx/pokemon/front/starmie.pngbin0 -> 537 bytes
-rw-r--r--gfx/pokemon/front/staryu.pngbin0 -> 401 bytes
-rw-r--r--gfx/pokemon/front/tangela.pngbin0 -> 532 bytes
-rw-r--r--gfx/pokemon/front/tauros.pngbin0 -> 622 bytes
-rw-r--r--gfx/pokemon/front/tentacool.pngbin0 -> 364 bytes
-rw-r--r--gfx/pokemon/front/tentacruel.pngbin0 -> 483 bytes
-rw-r--r--gfx/pokemon/front/vaporeon.pngbin0 -> 492 bytes
-rw-r--r--gfx/pokemon/front/venomoth.pngbin0 -> 597 bytes
-rw-r--r--gfx/pokemon/front/venonat.pngbin0 -> 390 bytes
-rw-r--r--gfx/pokemon/front/venusaur.pngbin0 -> 658 bytes
-rw-r--r--gfx/pokemon/front/victreebel.pngbin0 -> 603 bytes
-rw-r--r--gfx/pokemon/front/vileplume.pngbin0 -> 473 bytes
-rw-r--r--gfx/pokemon/front/voltorb.pngbin0 -> 245 bytes
-rw-r--r--gfx/pokemon/front/vulpix.pngbin0 -> 501 bytes
-rw-r--r--gfx/pokemon/front/wartortle.pngbin0 -> 451 bytes
-rw-r--r--gfx/pokemon/front/weedle.pngbin0 -> 286 bytes
-rw-r--r--gfx/pokemon/front/weepinbell.pngbin0 -> 436 bytes
-rw-r--r--gfx/pokemon/front/weezing.pngbin0 -> 709 bytes
-rw-r--r--gfx/pokemon/front/wigglytuff.pngbin0 -> 513 bytes
-rw-r--r--gfx/pokemon/front/zapdos.pngbin0 -> 621 bytes
-rw-r--r--gfx/pokemon/front/zubat.pngbin0 -> 389 bytes
-rw-r--r--gfx/pokemon/front_rg/abra.png (renamed from pic/rgmon/abra.png)bin465 -> 465 bytes
-rw-r--r--gfx/pokemon/front_rg/aerodactyl.png (renamed from pic/rgmon/aerodactyl.png)bin625 -> 625 bytes
-rw-r--r--gfx/pokemon/front_rg/alakazam.png (renamed from pic/rgmon/alakazam.png)bin707 -> 707 bytes
-rw-r--r--gfx/pokemon/front_rg/arbok.png (renamed from pic/rgmon/arbok.png)bin665 -> 665 bytes
-rw-r--r--gfx/pokemon/front_rg/arcanine.png (renamed from pic/rgmon/arcanine.png)bin702 -> 702 bytes
-rw-r--r--gfx/pokemon/front_rg/articuno.png (renamed from pic/rgmon/articuno.png)bin655 -> 655 bytes
-rw-r--r--gfx/pokemon/front_rg/beedrill.png (renamed from pic/rgmon/beedrill.png)bin657 -> 657 bytes
-rw-r--r--gfx/pokemon/front_rg/bellsprout.png (renamed from pic/rgmon/bellsprout.png)bin288 -> 288 bytes
-rw-r--r--gfx/pokemon/front_rg/blastoise.png (renamed from pic/rgmon/blastoise.png)bin659 -> 659 bytes
-rw-r--r--gfx/pokemon/front_rg/bulbasaur.png (renamed from pic/rgmon/bulbasaur.png)bin333 -> 333 bytes
-rw-r--r--gfx/pokemon/front_rg/butterfree.png (renamed from pic/rgmon/butterfree.png)bin729 -> 729 bytes
-rw-r--r--gfx/pokemon/front_rg/caterpie.png (renamed from pic/rgmon/caterpie.png)bin242 -> 242 bytes
-rw-r--r--gfx/pokemon/front_rg/chansey.png (renamed from pic/rgmon/chansey.png)bin486 -> 486 bytes
-rw-r--r--gfx/pokemon/front_rg/charizard.png (renamed from pic/rgmon/charizard.png)bin726 -> 726 bytes
-rw-r--r--gfx/pokemon/front_rg/charmander.png (renamed from pic/rgmon/charmander.png)bin381 -> 381 bytes
-rw-r--r--gfx/pokemon/front_rg/charmeleon.png (renamed from pic/rgmon/charmeleon.png)bin509 -> 509 bytes
-rw-r--r--gfx/pokemon/front_rg/clefable.png (renamed from pic/rgmon/clefable.png)bin444 -> 444 bytes
-rw-r--r--gfx/pokemon/front_rg/clefairy.png (renamed from pic/rgmon/clefairy.png)bin333 -> 333 bytes
-rw-r--r--gfx/pokemon/front_rg/cloyster.png (renamed from pic/rgmon/cloyster.png)bin739 -> 739 bytes
-rw-r--r--gfx/pokemon/front_rg/cubone.png (renamed from pic/rgmon/cubone.png)bin398 -> 398 bytes
-rw-r--r--gfx/pokemon/front_rg/dewgong.png (renamed from pic/rgmon/dewgong.png)bin472 -> 472 bytes
-rw-r--r--gfx/pokemon/front_rg/diglett.png (renamed from pic/rgmon/diglett.png)bin226 -> 226 bytes
-rw-r--r--gfx/pokemon/front_rg/ditto.png (renamed from pic/rgmon/ditto.png)bin252 -> 252 bytes
-rw-r--r--gfx/pokemon/front_rg/dodrio.png (renamed from pic/rgmon/dodrio.png)bin673 -> 673 bytes
-rw-r--r--gfx/pokemon/front_rg/doduo.png (renamed from pic/rgmon/doduo.png)bin373 -> 373 bytes
-rw-r--r--gfx/pokemon/front_rg/dragonair.png (renamed from pic/rgmon/dragonair.png)bin506 -> 506 bytes
-rw-r--r--gfx/pokemon/front_rg/dragonite.png (renamed from pic/rgmon/dragonite.png)bin693 -> 693 bytes
-rw-r--r--gfx/pokemon/front_rg/dratini.png (renamed from pic/rgmon/dratini.png)bin347 -> 347 bytes
-rw-r--r--gfx/pokemon/front_rg/drowzee.png (renamed from pic/rgmon/drowzee.png)bin480 -> 480 bytes
-rw-r--r--gfx/pokemon/front_rg/dugtrio.png (renamed from pic/rgmon/dugtrio.png)bin523 -> 523 bytes
-rw-r--r--gfx/pokemon/front_rg/eevee.png (renamed from pic/rgmon/eevee.png)bin347 -> 347 bytes
-rw-r--r--gfx/pokemon/front_rg/ekans.png (renamed from pic/rgmon/ekans.png)bin323 -> 323 bytes
-rw-r--r--gfx/pokemon/front_rg/electabuzz.png (renamed from pic/rgmon/electabuzz.png)bin598 -> 598 bytes
-rw-r--r--gfx/pokemon/front_rg/electrode.png (renamed from pic/rgmon/electrode.png)bin350 -> 350 bytes
-rw-r--r--gfx/pokemon/front_rg/exeggcute.png (renamed from pic/rgmon/exeggcute.png)bin658 -> 658 bytes
-rw-r--r--gfx/pokemon/front_rg/exeggutor.png (renamed from pic/rgmon/exeggutor.png)bin728 -> 728 bytes
-rw-r--r--gfx/pokemon/front_rg/farfetchd.png (renamed from pic/rgmon/farfetchd.png)bin531 -> 531 bytes
-rw-r--r--gfx/pokemon/front_rg/fearow.png (renamed from pic/rgmon/fearow.png)bin699 -> 699 bytes
-rw-r--r--gfx/pokemon/front_rg/flareon.png (renamed from pic/rgmon/flareon.png)bin571 -> 571 bytes
-rw-r--r--gfx/pokemon/front_rg/fossilaerodactyl.png (renamed from pic/rgmon/fossilaerodactyl.png)bin549 -> 549 bytes
-rw-r--r--gfx/pokemon/front_rg/fossilkabutops.png (renamed from pic/rgmon/fossilkabutops.png)bin489 -> 489 bytes
-rw-r--r--gfx/pokemon/front_rg/gastly.png (renamed from pic/rgmon/gastly.png)bin652 -> 652 bytes
-rw-r--r--gfx/pokemon/front_rg/gengar.png (renamed from pic/rgmon/gengar.png)bin456 -> 456 bytes
-rw-r--r--gfx/pokemon/front_rg/geodude.png (renamed from pic/rgmon/geodude.png)bin281 -> 281 bytes
-rw-r--r--gfx/pokemon/front_rg/gloom.png (renamed from pic/rgmon/gloom.png)bin476 -> 476 bytes
-rw-r--r--gfx/pokemon/front_rg/golbat.png (renamed from pic/rgmon/golbat.png)bin598 -> 598 bytes
-rw-r--r--gfx/pokemon/front_rg/goldeen.png (renamed from pic/rgmon/goldeen.png)bin472 -> 472 bytes
-rw-r--r--gfx/pokemon/front_rg/golduck.png (renamed from pic/rgmon/golduck.png)bin619 -> 619 bytes
-rw-r--r--gfx/pokemon/front_rg/golem.png (renamed from pic/rgmon/golem.png)bin565 -> 565 bytes
-rw-r--r--gfx/pokemon/front_rg/graveler.png (renamed from pic/rgmon/graveler.png)bin562 -> 562 bytes
-rw-r--r--gfx/pokemon/front_rg/grimer.png (renamed from pic/rgmon/grimer.png)bin387 -> 387 bytes
-rw-r--r--gfx/pokemon/front_rg/growlithe.png (renamed from pic/rgmon/growlithe.png)bin367 -> 367 bytes
-rw-r--r--gfx/pokemon/front_rg/gyarados.png (renamed from pic/rgmon/gyarados.png)bin732 -> 732 bytes
-rw-r--r--gfx/pokemon/front_rg/haunter.png (renamed from pic/rgmon/haunter.png)bin558 -> 558 bytes
-rw-r--r--gfx/pokemon/front_rg/hitmonchan.png (renamed from pic/rgmon/hitmonchan.png)bin488 -> 488 bytes
-rw-r--r--gfx/pokemon/front_rg/hitmonlee.png (renamed from pic/rgmon/hitmonlee.png)bin555 -> 555 bytes
-rw-r--r--gfx/pokemon/front_rg/horsea.png (renamed from pic/rgmon/horsea.png)bin286 -> 286 bytes
-rw-r--r--gfx/pokemon/front_rg/hypno.png (renamed from pic/rgmon/hypno.png)bin657 -> 657 bytes
-rw-r--r--gfx/pokemon/front_rg/ivysaur.png (renamed from pic/rgmon/ivysaur.png)bin433 -> 433 bytes
-rw-r--r--gfx/pokemon/front_rg/jigglypuff.png (renamed from pic/rgmon/jigglypuff.png)bin317 -> 317 bytes
-rw-r--r--gfx/pokemon/front_rg/jolteon.png (renamed from pic/rgmon/jolteon.png)bin543 -> 543 bytes
-rw-r--r--gfx/pokemon/front_rg/jynx.png (renamed from pic/rgmon/jynx.png)bin561 -> 561 bytes
-rw-r--r--gfx/pokemon/front_rg/kabuto.png (renamed from pic/rgmon/kabuto.png)bin267 -> 267 bytes
-rw-r--r--gfx/pokemon/front_rg/kabutops.png (renamed from pic/rgmon/kabutops.png)bin496 -> 496 bytes
-rw-r--r--gfx/pokemon/front_rg/kadabra.png (renamed from pic/rgmon/kadabra.png)bin615 -> 615 bytes
-rw-r--r--gfx/pokemon/front_rg/kakuna.png (renamed from pic/rgmon/kakuna.png)bin308 -> 308 bytes
-rw-r--r--gfx/pokemon/front_rg/kangaskhan.png (renamed from pic/rgmon/kangaskhan.png)bin662 -> 662 bytes
-rw-r--r--gfx/pokemon/front_rg/kingler.png (renamed from pic/rgmon/kingler.png)bin659 -> 659 bytes
-rw-r--r--gfx/pokemon/front_rg/koffing.png (renamed from pic/rgmon/koffing.png)bin584 -> 584 bytes
-rw-r--r--gfx/pokemon/front_rg/krabby.png (renamed from pic/rgmon/krabby.png)bin415 -> 415 bytes
-rw-r--r--gfx/pokemon/front_rg/lapras.png (renamed from pic/rgmon/lapras.png)bin600 -> 600 bytes
-rw-r--r--gfx/pokemon/front_rg/lickitung.png (renamed from pic/rgmon/lickitung.png)bin604 -> 604 bytes
-rw-r--r--gfx/pokemon/front_rg/machamp.png (renamed from pic/rgmon/machamp.png)bin725 -> 725 bytes
-rw-r--r--gfx/pokemon/front_rg/machoke.png (renamed from pic/rgmon/machoke.png)bin658 -> 658 bytes
-rw-r--r--gfx/pokemon/front_rg/machop.png (renamed from pic/rgmon/machop.png)bin383 -> 383 bytes
-rw-r--r--gfx/pokemon/front_rg/magikarp.png (renamed from pic/rgmon/magikarp.png)bin499 -> 499 bytes
-rw-r--r--gfx/pokemon/front_rg/magmar.png (renamed from pic/rgmon/magmar.png)bin573 -> 573 bytes
-rw-r--r--gfx/pokemon/front_rg/magnemite.png (renamed from pic/rgmon/magnemite.png)bin217 -> 217 bytes
-rw-r--r--gfx/pokemon/front_rg/magneton.png (renamed from pic/rgmon/magneton.png)bin567 -> 567 bytes
-rw-r--r--gfx/pokemon/front_rg/mankey.png (renamed from pic/rgmon/mankey.png)bin401 -> 401 bytes
-rw-r--r--gfx/pokemon/front_rg/marowak.png (renamed from pic/rgmon/marowak.png)bin532 -> 532 bytes
-rw-r--r--gfx/pokemon/front_rg/meowth.png (renamed from pic/rgmon/meowth.png)bin341 -> 341 bytes
-rw-r--r--gfx/pokemon/front_rg/metapod.png (renamed from pic/rgmon/metapod.png)bin264 -> 264 bytes
-rw-r--r--gfx/pokemon/front_rg/mew.png (renamed from pic/rgmon/mew.png)bin366 -> 366 bytes
-rw-r--r--gfx/pokemon/front_rg/mewtwo.png (renamed from pic/rgmon/mewtwo.png)bin583 -> 583 bytes
-rw-r--r--gfx/pokemon/front_rg/moltres.png (renamed from pic/rgmon/moltres.png)bin836 -> 836 bytes
-rw-r--r--gfx/pokemon/front_rg/mr.mime.png (renamed from pic/rgmon/mr.mime.png)bin554 -> 554 bytes
-rw-r--r--gfx/pokemon/front_rg/muk.png (renamed from pic/rgmon/muk.png)bin593 -> 593 bytes
-rw-r--r--gfx/pokemon/front_rg/nidoking.png (renamed from pic/rgmon/nidoking.png)bin735 -> 735 bytes
-rw-r--r--gfx/pokemon/front_rg/nidoqueen.png (renamed from pic/rgmon/nidoqueen.png)bin662 -> 662 bytes
-rw-r--r--gfx/pokemon/front_rg/nidoranf.png (renamed from pic/rgmon/nidoranf.png)bin313 -> 313 bytes
-rw-r--r--gfx/pokemon/front_rg/nidoranm.png (renamed from pic/rgmon/nidoranm.png)bin340 -> 340 bytes
-rw-r--r--gfx/pokemon/front_rg/nidorina.png (renamed from pic/rgmon/nidorina.png)bin502 -> 502 bytes
-rw-r--r--gfx/pokemon/front_rg/nidorino.png (renamed from pic/rgmon/nidorino.png)bin519 -> 519 bytes
-rw-r--r--gfx/pokemon/front_rg/ninetales.png (renamed from pic/rgmon/ninetales.png)bin701 -> 701 bytes
-rw-r--r--gfx/pokemon/front_rg/oddish.png (renamed from pic/rgmon/oddish.png)bin355 -> 355 bytes
-rw-r--r--gfx/pokemon/front_rg/omanyte.png (renamed from pic/rgmon/omanyte.png)bin327 -> 327 bytes
-rw-r--r--gfx/pokemon/front_rg/omastar.png (renamed from pic/rgmon/omastar.png)bin591 -> 591 bytes
-rw-r--r--gfx/pokemon/front_rg/onix.png (renamed from pic/rgmon/onix.png)bin606 -> 606 bytes
-rw-r--r--gfx/pokemon/front_rg/paras.png (renamed from pic/rgmon/paras.png)bin339 -> 339 bytes
-rw-r--r--gfx/pokemon/front_rg/parasect.png (renamed from pic/rgmon/parasect.png)bin610 -> 610 bytes
-rw-r--r--gfx/pokemon/front_rg/persian.png (renamed from pic/rgmon/persian.png)bin568 -> 568 bytes
-rw-r--r--gfx/pokemon/front_rg/pidgeot.png (renamed from pic/rgmon/pidgeot.png)bin722 -> 722 bytes
-rw-r--r--gfx/pokemon/front_rg/pidgeotto.png (renamed from pic/rgmon/pidgeotto.png)bin577 -> 577 bytes
-rw-r--r--gfx/pokemon/front_rg/pidgey.png (renamed from pic/rgmon/pidgey.png)bin318 -> 318 bytes
-rw-r--r--gfx/pokemon/front_rg/pikachu.png (renamed from pic/rgmon/pikachu.png)bin399 -> 399 bytes
-rw-r--r--gfx/pokemon/front_rg/pinsir.png (renamed from pic/rgmon/pinsir.png)bin632 -> 632 bytes
-rw-r--r--gfx/pokemon/front_rg/poliwag.png (renamed from pic/rgmon/poliwag.png)bin319 -> 319 bytes
-rw-r--r--gfx/pokemon/front_rg/poliwhirl.png (renamed from pic/rgmon/poliwhirl.png)bin414 -> 414 bytes
-rw-r--r--gfx/pokemon/front_rg/poliwrath.png (renamed from pic/rgmon/poliwrath.png)bin551 -> 551 bytes
-rw-r--r--gfx/pokemon/front_rg/ponyta.png (renamed from pic/rgmon/ponyta.png)bin543 -> 543 bytes
-rw-r--r--gfx/pokemon/front_rg/porygon.png (renamed from pic/rgmon/porygon.png)bin402 -> 402 bytes
-rw-r--r--gfx/pokemon/front_rg/primeape.png (renamed from pic/rgmon/primeape.png)bin645 -> 645 bytes
-rw-r--r--gfx/pokemon/front_rg/psyduck.png (renamed from pic/rgmon/psyduck.png)bin393 -> 393 bytes
-rw-r--r--gfx/pokemon/front_rg/raichu.png (renamed from pic/rgmon/raichu.png)bin613 -> 613 bytes
-rw-r--r--gfx/pokemon/front_rg/rapidash.png (renamed from pic/rgmon/rapidash.png)bin652 -> 652 bytes
-rw-r--r--gfx/pokemon/front_rg/raticate.png (renamed from pic/rgmon/raticate.png)bin479 -> 479 bytes
-rw-r--r--gfx/pokemon/front_rg/rattata.png (renamed from pic/rgmon/rattata.png)bin304 -> 304 bytes
-rw-r--r--gfx/pokemon/front_rg/rhydon.png (renamed from pic/rgmon/rhydon.png)bin722 -> 722 bytes
-rw-r--r--gfx/pokemon/front_rg/rhyhorn.png (renamed from pic/rgmon/rhyhorn.png)bin679 -> 679 bytes
-rw-r--r--gfx/pokemon/front_rg/sandshrew.png (renamed from pic/rgmon/sandshrew.png)bin355 -> 355 bytes
-rw-r--r--gfx/pokemon/front_rg/sandslash.png (renamed from pic/rgmon/sandslash.png)bin592 -> 592 bytes
-rw-r--r--gfx/pokemon/front_rg/scyther.png (renamed from pic/rgmon/scyther.png)bin704 -> 704 bytes
-rw-r--r--gfx/pokemon/front_rg/seadra.png (renamed from pic/rgmon/seadra.png)bin504 -> 504 bytes
-rw-r--r--gfx/pokemon/front_rg/seaking.png (renamed from pic/rgmon/seaking.png)bin717 -> 717 bytes
-rw-r--r--gfx/pokemon/front_rg/seel.png (renamed from pic/rgmon/seel.png)bin452 -> 452 bytes
-rw-r--r--gfx/pokemon/front_rg/shellder.png (renamed from pic/rgmon/shellder.png)bin313 -> 313 bytes
-rw-r--r--gfx/pokemon/front_rg/slowbro.png (renamed from pic/rgmon/slowbro.png)bin740 -> 740 bytes
-rw-r--r--gfx/pokemon/front_rg/slowpoke.png (renamed from pic/rgmon/slowpoke.png)bin375 -> 375 bytes
-rw-r--r--gfx/pokemon/front_rg/snorlax.png (renamed from pic/rgmon/snorlax.png)bin453 -> 453 bytes
-rw-r--r--gfx/pokemon/front_rg/spearow.png (renamed from pic/rgmon/spearow.png)bin342 -> 342 bytes
-rw-r--r--gfx/pokemon/front_rg/squirtle.png (renamed from pic/rgmon/squirtle.png)bin319 -> 319 bytes
-rw-r--r--gfx/pokemon/front_rg/starmie.png (renamed from pic/rgmon/starmie.png)bin571 -> 571 bytes
-rw-r--r--gfx/pokemon/front_rg/staryu.png (renamed from pic/rgmon/staryu.png)bin425 -> 425 bytes
-rw-r--r--gfx/pokemon/front_rg/tangela.png (renamed from pic/rgmon/tangela.png)bin573 -> 573 bytes
-rw-r--r--gfx/pokemon/front_rg/tauros.png (renamed from pic/rgmon/tauros.png)bin610 -> 610 bytes
-rw-r--r--gfx/pokemon/front_rg/tentacool.png (renamed from pic/rgmon/tentacool.png)bin363 -> 363 bytes
-rw-r--r--gfx/pokemon/front_rg/tentacruel.png (renamed from pic/rgmon/tentacruel.png)bin539 -> 539 bytes
-rw-r--r--gfx/pokemon/front_rg/vaporeon.png (renamed from pic/rgmon/vaporeon.png)bin618 -> 618 bytes
-rw-r--r--gfx/pokemon/front_rg/venomoth.png (renamed from pic/rgmon/venomoth.png)bin663 -> 663 bytes
-rw-r--r--gfx/pokemon/front_rg/venonat.png (renamed from pic/rgmon/venonat.png)bin374 -> 374 bytes
-rw-r--r--gfx/pokemon/front_rg/venusaur.png (renamed from pic/rgmon/venusaur.png)bin756 -> 756 bytes
-rw-r--r--gfx/pokemon/front_rg/victreebel.png (renamed from pic/rgmon/victreebel.png)bin567 -> 567 bytes
-rw-r--r--gfx/pokemon/front_rg/vileplume.png (renamed from pic/rgmon/vileplume.png)bin575 -> 575 bytes
-rw-r--r--gfx/pokemon/front_rg/voltorb.png (renamed from pic/rgmon/voltorb.png)bin238 -> 238 bytes
-rw-r--r--gfx/pokemon/front_rg/vulpix.png (renamed from pic/rgmon/vulpix.png)bin418 -> 418 bytes
-rw-r--r--gfx/pokemon/front_rg/wartortle.png (renamed from pic/rgmon/wartortle.png)bin485 -> 485 bytes
-rw-r--r--gfx/pokemon/front_rg/weedle.png (renamed from pic/rgmon/weedle.png)bin266 -> 266 bytes
-rw-r--r--gfx/pokemon/front_rg/weepinbell.png (renamed from pic/rgmon/weepinbell.png)bin461 -> 461 bytes
-rw-r--r--gfx/pokemon/front_rg/weezing.png (renamed from pic/rgmon/weezing.png)bin636 -> 636 bytes
-rw-r--r--gfx/pokemon/front_rg/wigglytuff.png (renamed from pic/rgmon/wigglytuff.png)bin518 -> 518 bytes
-rw-r--r--gfx/pokemon/front_rg/zapdos.png (renamed from pic/rgmon/zapdos.png)bin645 -> 645 bytes
-rw-r--r--gfx/pokemon/front_rg/zubat.png (renamed from pic/rgmon/zubat.png)bin366 -> 366 bytes
-rw-r--r--gfx/pokemon/front_yellow/abra.png (renamed from pic/ymon/abra.png)bin394 -> 394 bytes
-rw-r--r--gfx/pokemon/front_yellow/aerodactyl.png (renamed from pic/ymon/aerodactyl.png)bin566 -> 566 bytes
-rw-r--r--gfx/pokemon/front_yellow/alakazam.png (renamed from pic/ymon/alakazam.png)bin652 -> 652 bytes
-rw-r--r--gfx/pokemon/front_yellow/arbok.png (renamed from pic/ymon/arbok.png)bin596 -> 596 bytes
-rw-r--r--gfx/pokemon/front_yellow/arcanine.png (renamed from pic/ymon/arcanine.png)bin657 -> 657 bytes
-rw-r--r--gfx/pokemon/front_yellow/articuno.png (renamed from pic/ymon/articuno.png)bin706 -> 706 bytes
-rw-r--r--gfx/pokemon/front_yellow/beedrill.png (renamed from pic/ymon/beedrill.png)bin665 -> 665 bytes
-rw-r--r--gfx/pokemon/front_yellow/bellsprout.png (renamed from pic/ymon/bellsprout.png)bin333 -> 333 bytes
-rw-r--r--gfx/pokemon/front_yellow/blastoise.png (renamed from pic/ymon/blastoise.png)bin673 -> 673 bytes
-rw-r--r--gfx/pokemon/front_yellow/bulbasaur.png (renamed from pic/ymon/bulbasaur.png)bin356 -> 356 bytes
-rw-r--r--gfx/pokemon/front_yellow/butterfree.png (renamed from pic/ymon/butterfree.png)bin600 -> 600 bytes
-rw-r--r--gfx/pokemon/front_yellow/caterpie.png (renamed from pic/ymon/caterpie.png)bin346 -> 346 bytes
-rw-r--r--gfx/pokemon/front_yellow/chansey.png (renamed from pic/ymon/chansey.png)bin417 -> 417 bytes
-rw-r--r--gfx/pokemon/front_yellow/charizard.png (renamed from pic/ymon/charizard.png)bin733 -> 733 bytes
-rw-r--r--gfx/pokemon/front_yellow/charmander.png (renamed from pic/ymon/charmander.png)bin391 -> 391 bytes
-rw-r--r--gfx/pokemon/front_yellow/charmeleon.png (renamed from pic/ymon/charmeleon.png)bin502 -> 502 bytes
-rw-r--r--gfx/pokemon/front_yellow/clefable.png (renamed from pic/ymon/clefable.png)bin491 -> 491 bytes
-rw-r--r--gfx/pokemon/front_yellow/clefairy.png (renamed from pic/ymon/clefairy.png)bin349 -> 349 bytes
-rw-r--r--gfx/pokemon/front_yellow/cloyster.png (renamed from pic/ymon/cloyster.png)bin657 -> 657 bytes
-rw-r--r--gfx/pokemon/front_yellow/cubone.png (renamed from pic/ymon/cubone.png)bin411 -> 411 bytes
-rw-r--r--gfx/pokemon/front_yellow/dewgong.png (renamed from pic/ymon/dewgong.png)bin562 -> 562 bytes
-rw-r--r--gfx/pokemon/front_yellow/diglett.png (renamed from pic/ymon/diglett.png)bin259 -> 259 bytes
-rw-r--r--gfx/pokemon/front_yellow/ditto.png (renamed from pic/ymon/ditto.png)bin261 -> 261 bytes
-rw-r--r--gfx/pokemon/front_yellow/dodrio.png (renamed from pic/ymon/dodrio.png)bin594 -> 594 bytes
-rw-r--r--gfx/pokemon/front_yellow/doduo.png (renamed from pic/ymon/doduo.png)bin452 -> 452 bytes
-rw-r--r--gfx/pokemon/front_yellow/dragonair.png (renamed from pic/ymon/dragonair.png)bin443 -> 443 bytes
-rw-r--r--gfx/pokemon/front_yellow/dragonite.png (renamed from pic/ymon/dragonite.png)bin676 -> 676 bytes
-rw-r--r--gfx/pokemon/front_yellow/dratini.png (renamed from pic/ymon/dratini.png)bin351 -> 351 bytes
-rw-r--r--gfx/pokemon/front_yellow/drowzee.png (renamed from pic/ymon/drowzee.png)bin481 -> 481 bytes
-rw-r--r--gfx/pokemon/front_yellow/dugtrio.png (renamed from pic/ymon/dugtrio.png)bin497 -> 497 bytes
-rw-r--r--gfx/pokemon/front_yellow/eevee.png (renamed from pic/ymon/eevee.png)bin407 -> 407 bytes
-rw-r--r--gfx/pokemon/front_yellow/ekans.png (renamed from pic/ymon/ekans.png)bin383 -> 383 bytes
-rw-r--r--gfx/pokemon/front_yellow/electabuzz.png (renamed from pic/ymon/electabuzz.png)bin570 -> 570 bytes
-rwxr-xr-xgfx/pokemon/front_yellow/electrode.png (renamed from pic/ymon/electrode.png)bin659 -> 659 bytes
-rw-r--r--gfx/pokemon/front_yellow/exeggcute.png (renamed from pic/ymon/exeggcute.png)bin615 -> 615 bytes
-rw-r--r--gfx/pokemon/front_yellow/exeggutor.png (renamed from pic/ymon/exeggutor.png)bin597 -> 597 bytes
-rw-r--r--gfx/pokemon/front_yellow/farfetchd.png (renamed from pic/ymon/farfetchd.png)bin548 -> 548 bytes
-rw-r--r--gfx/pokemon/front_yellow/fearow.png (renamed from pic/ymon/fearow.png)bin655 -> 655 bytes
-rw-r--r--gfx/pokemon/front_yellow/flareon.png (renamed from pic/ymon/flareon.png)bin479 -> 479 bytes
-rw-r--r--gfx/pokemon/front_yellow/fossilaerodactyl.pngbin0 -> 539 bytes
-rw-r--r--gfx/pokemon/front_yellow/fossilkabutops.pngbin0 -> 546 bytes
-rw-r--r--gfx/pokemon/front_yellow/gastly.png (renamed from pic/ymon/gastly.png)bin342 -> 342 bytes
-rw-r--r--gfx/pokemon/front_yellow/gengar.png (renamed from pic/ymon/gengar.png)bin446 -> 446 bytes
-rw-r--r--gfx/pokemon/front_yellow/geodude.png (renamed from pic/ymon/geodude.png)bin403 -> 403 bytes
-rw-r--r--gfx/pokemon/front_yellow/gloom.png (renamed from pic/ymon/gloom.png)bin416 -> 416 bytes
-rw-r--r--gfx/pokemon/front_yellow/golbat.png (renamed from pic/ymon/golbat.png)bin550 -> 550 bytes
-rw-r--r--gfx/pokemon/front_yellow/goldeen.png (renamed from pic/ymon/goldeen.png)bin496 -> 496 bytes
-rw-r--r--gfx/pokemon/front_yellow/golduck.png (renamed from pic/ymon/golduck.png)bin612 -> 612 bytes
-rw-r--r--gfx/pokemon/front_yellow/golem.png (renamed from pic/ymon/golem.png)bin545 -> 545 bytes
-rw-r--r--gfx/pokemon/front_yellow/graveler.png (renamed from pic/ymon/graveler.png)bin553 -> 553 bytes
-rw-r--r--gfx/pokemon/front_yellow/grimer.png (renamed from pic/ymon/grimer.png)bin410 -> 410 bytes
-rw-r--r--gfx/pokemon/front_yellow/growlithe.png (renamed from pic/ymon/growlithe.png)bin425 -> 425 bytes
-rw-r--r--gfx/pokemon/front_yellow/gyarados.png (renamed from pic/ymon/gyarados.png)bin741 -> 741 bytes
-rw-r--r--gfx/pokemon/front_yellow/haunter.png (renamed from pic/ymon/haunter.png)bin476 -> 476 bytes
-rw-r--r--gfx/pokemon/front_yellow/hitmonchan.png (renamed from pic/ymon/hitmonchan.png)bin440 -> 440 bytes
-rw-r--r--gfx/pokemon/front_yellow/hitmonlee.png (renamed from pic/ymon/hitmonlee.png)bin567 -> 567 bytes
-rw-r--r--gfx/pokemon/front_yellow/horsea.png (renamed from pic/ymon/horsea.png)bin364 -> 364 bytes
-rw-r--r--gfx/pokemon/front_yellow/hypno.png (renamed from pic/ymon/hypno.png)bin583 -> 583 bytes
-rw-r--r--gfx/pokemon/front_yellow/ivysaur.png (renamed from pic/ymon/ivysaur.png)bin543 -> 543 bytes
-rw-r--r--gfx/pokemon/front_yellow/jigglypuff.png (renamed from pic/ymon/jigglypuff.png)bin349 -> 349 bytes
-rw-r--r--gfx/pokemon/front_yellow/jolteon.png (renamed from pic/ymon/jolteon.png)bin573 -> 573 bytes
-rw-r--r--gfx/pokemon/front_yellow/jynx.png (renamed from pic/ymon/jynx.png)bin569 -> 569 bytes
-rw-r--r--gfx/pokemon/front_yellow/kabuto.png (renamed from pic/ymon/kabuto.png)bin306 -> 306 bytes
-rw-r--r--gfx/pokemon/front_yellow/kabutops.png (renamed from pic/ymon/kabutops.png)bin555 -> 555 bytes
-rw-r--r--gfx/pokemon/front_yellow/kadabra.png (renamed from pic/ymon/kadabra.png)bin558 -> 558 bytes
-rw-r--r--gfx/pokemon/front_yellow/kakuna.png (renamed from pic/ymon/kakuna.png)bin319 -> 319 bytes
-rw-r--r--gfx/pokemon/front_yellow/kangaskhan.png (renamed from pic/ymon/kangaskhan.png)bin732 -> 732 bytes
-rw-r--r--gfx/pokemon/front_yellow/kingler.png (renamed from pic/ymon/kingler.png)bin640 -> 640 bytes
-rw-r--r--gfx/pokemon/front_yellow/koffing.png (renamed from pic/ymon/koffing.png)bin428 -> 428 bytes
-rw-r--r--gfx/pokemon/front_yellow/krabby.png (renamed from pic/ymon/krabby.png)bin357 -> 357 bytes
-rw-r--r--gfx/pokemon/front_yellow/lapras.png (renamed from pic/ymon/lapras.png)bin597 -> 597 bytes
-rw-r--r--gfx/pokemon/front_yellow/lickitung.png (renamed from pic/ymon/lickitung.png)bin600 -> 600 bytes
-rw-r--r--gfx/pokemon/front_yellow/machamp.png (renamed from pic/ymon/machamp.png)bin679 -> 679 bytes
-rw-r--r--gfx/pokemon/front_yellow/machoke.png (renamed from pic/ymon/machoke.png)bin550 -> 550 bytes
-rw-r--r--gfx/pokemon/front_yellow/machop.png (renamed from pic/ymon/machop.png)bin383 -> 383 bytes
-rw-r--r--gfx/pokemon/front_yellow/magikarp.png (renamed from pic/ymon/magikarp.png)bin501 -> 501 bytes
-rw-r--r--gfx/pokemon/front_yellow/magmar.png (renamed from pic/ymon/magmar.png)bin576 -> 576 bytes
-rw-r--r--gfx/pokemon/front_yellow/magnemite.png (renamed from pic/ymon/magnemite.png)bin322 -> 322 bytes
-rw-r--r--gfx/pokemon/front_yellow/magneton.png (renamed from pic/ymon/magneton.png)bin518 -> 518 bytes
-rw-r--r--gfx/pokemon/front_yellow/mankey.png (renamed from pic/ymon/mankey.png)bin480 -> 480 bytes
-rw-r--r--gfx/pokemon/front_yellow/marowak.png (renamed from pic/ymon/marowak.png)bin508 -> 508 bytes
-rw-r--r--gfx/pokemon/front_yellow/meowth.png (renamed from pic/ymon/meowth.png)bin403 -> 403 bytes
-rw-r--r--gfx/pokemon/front_yellow/metapod.png (renamed from pic/ymon/metapod.png)bin295 -> 295 bytes
-rw-r--r--gfx/pokemon/front_yellow/mew.png (renamed from pic/ymon/mew.png)bin395 -> 395 bytes
-rw-r--r--gfx/pokemon/front_yellow/mewtwo.png (renamed from pic/ymon/mewtwo.png)bin614 -> 614 bytes
-rw-r--r--gfx/pokemon/front_yellow/moltres.png (renamed from pic/ymon/moltres.png)bin609 -> 609 bytes
-rw-r--r--gfx/pokemon/front_yellow/mr.mime.png (renamed from pic/ymon/mr.mime.png)bin554 -> 554 bytes
-rw-r--r--gfx/pokemon/front_yellow/muk.png (renamed from pic/ymon/muk.png)bin498 -> 498 bytes
-rw-r--r--gfx/pokemon/front_yellow/nidoking.png (renamed from pic/ymon/nidoking.png)bin686 -> 686 bytes
-rw-r--r--gfx/pokemon/front_yellow/nidoqueen.png (renamed from pic/ymon/nidoqueen.png)bin676 -> 676 bytes
-rw-r--r--gfx/pokemon/front_yellow/nidoranf.png (renamed from pic/ymon/nidoranf.png)bin355 -> 355 bytes
-rw-r--r--gfx/pokemon/front_yellow/nidoranm.png (renamed from pic/ymon/nidoranm.png)bin367 -> 367 bytes
-rw-r--r--gfx/pokemon/front_yellow/nidorina.png (renamed from pic/ymon/nidorina.png)bin532 -> 532 bytes
-rw-r--r--gfx/pokemon/front_yellow/nidorino.png (renamed from pic/ymon/nidorino.png)bin491 -> 491 bytes
-rw-r--r--gfx/pokemon/front_yellow/ninetales.png (renamed from pic/ymon/ninetales.png)bin690 -> 690 bytes
-rw-r--r--gfx/pokemon/front_yellow/oddish.png (renamed from pic/ymon/oddish.png)bin346 -> 346 bytes
-rw-r--r--gfx/pokemon/front_yellow/omanyte.png (renamed from pic/ymon/omanyte.png)bin332 -> 332 bytes
-rw-r--r--gfx/pokemon/front_yellow/omastar.png (renamed from pic/ymon/omastar.png)bin511 -> 511 bytes
-rw-r--r--gfx/pokemon/front_yellow/onix.png (renamed from pic/ymon/onix.png)bin522 -> 522 bytes
-rw-r--r--gfx/pokemon/front_yellow/paras.png (renamed from pic/ymon/paras.png)bin362 -> 362 bytes
-rw-r--r--gfx/pokemon/front_yellow/parasect.png (renamed from pic/ymon/parasect.png)bin525 -> 525 bytes
-rw-r--r--gfx/pokemon/front_yellow/persian.png (renamed from pic/ymon/persian.png)bin558 -> 558 bytes
-rw-r--r--gfx/pokemon/front_yellow/pidgeot.png (renamed from pic/ymon/pidgeot.png)bin704 -> 704 bytes
-rw-r--r--gfx/pokemon/front_yellow/pidgeotto.png (renamed from pic/ymon/pidgeotto.png)bin482 -> 482 bytes
-rw-r--r--gfx/pokemon/front_yellow/pidgey.png (renamed from pic/ymon/pidgey.png)bin344 -> 344 bytes
-rw-r--r--gfx/pokemon/front_yellow/pikachu.png (renamed from pic/ymon/pikachu.png)bin357 -> 357 bytes
-rw-r--r--gfx/pokemon/front_yellow/pinsir.png (renamed from pic/ymon/pinsir.png)bin678 -> 678 bytes
-rw-r--r--gfx/pokemon/front_yellow/poliwag.png (renamed from pic/ymon/poliwag.png)bin346 -> 346 bytes
-rw-r--r--gfx/pokemon/front_yellow/poliwhirl.png (renamed from pic/ymon/poliwhirl.png)bin479 -> 479 bytes
-rw-r--r--gfx/pokemon/front_yellow/poliwrath.png (renamed from pic/ymon/poliwrath.png)bin603 -> 603 bytes
-rw-r--r--gfx/pokemon/front_yellow/ponyta.png (renamed from pic/ymon/ponyta.png)bin524 -> 524 bytes
-rw-r--r--gfx/pokemon/front_yellow/porygon.png (renamed from pic/ymon/porygon.png)bin387 -> 387 bytes
-rw-r--r--gfx/pokemon/front_yellow/primeape.png (renamed from pic/ymon/primeape.png)bin614 -> 614 bytes
-rw-r--r--gfx/pokemon/front_yellow/psyduck.png (renamed from pic/ymon/psyduck.png)bin388 -> 388 bytes
-rw-r--r--gfx/pokemon/front_yellow/raichu.png (renamed from pic/ymon/raichu.png)bin616 -> 616 bytes
-rw-r--r--gfx/pokemon/front_yellow/rapidash.png (renamed from pic/ymon/rapidash.png)bin681 -> 681 bytes
-rw-r--r--gfx/pokemon/front_yellow/raticate.png (renamed from pic/ymon/raticate.png)bin579 -> 579 bytes
-rw-r--r--gfx/pokemon/front_yellow/rattata.png (renamed from pic/ymon/rattata.png)bin351 -> 351 bytes
-rw-r--r--gfx/pokemon/front_yellow/rhydon.png (renamed from pic/ymon/rhydon.png)bin681 -> 681 bytes
-rw-r--r--gfx/pokemon/front_yellow/rhyhorn.png (renamed from pic/ymon/rhyhorn.png)bin566 -> 566 bytes
-rw-r--r--gfx/pokemon/front_yellow/sandshrew.png (renamed from pic/ymon/sandshrew.png)bin397 -> 397 bytes
-rw-r--r--gfx/pokemon/front_yellow/sandslash.png (renamed from pic/ymon/sandslash.png)bin560 -> 560 bytes
-rw-r--r--gfx/pokemon/front_yellow/scyther.png (renamed from pic/ymon/scyther.png)bin653 -> 653 bytes
-rw-r--r--gfx/pokemon/front_yellow/seadra.png (renamed from pic/ymon/seadra.png)bin500 -> 500 bytes
-rw-r--r--gfx/pokemon/front_yellow/seaking.png (renamed from pic/ymon/seaking.png)bin657 -> 657 bytes
-rw-r--r--gfx/pokemon/front_yellow/seel.png (renamed from pic/ymon/seel.png)bin452 -> 452 bytes
-rw-r--r--gfx/pokemon/front_yellow/shellder.png (renamed from pic/ymon/shellder.png)bin309 -> 309 bytes
-rw-r--r--gfx/pokemon/front_yellow/slowbro.png (renamed from pic/ymon/slowbro.png)bin623 -> 623 bytes
-rw-r--r--gfx/pokemon/front_yellow/slowpoke.png (renamed from pic/ymon/slowpoke.png)bin313 -> 313 bytes
-rw-r--r--gfx/pokemon/front_yellow/snorlax.png (renamed from pic/ymon/snorlax.png)bin512 -> 512 bytes
-rw-r--r--gfx/pokemon/front_yellow/spearow.png (renamed from pic/ymon/spearow.png)bin325 -> 325 bytes
-rw-r--r--gfx/pokemon/front_yellow/squirtle.png (renamed from pic/ymon/squirtle.png)bin370 -> 370 bytes
-rw-r--r--gfx/pokemon/front_yellow/starmie.png (renamed from pic/ymon/starmie.png)bin505 -> 505 bytes
-rw-r--r--gfx/pokemon/front_yellow/staryu.png (renamed from pic/ymon/staryu.png)bin339 -> 339 bytes
-rw-r--r--gfx/pokemon/front_yellow/tangela.png (renamed from pic/ymon/tangela.png)bin459 -> 459 bytes
-rw-r--r--gfx/pokemon/front_yellow/tauros.png (renamed from pic/ymon/tauros.png)bin579 -> 579 bytes
-rw-r--r--gfx/pokemon/front_yellow/tentacool.png (renamed from pic/ymon/tentacool.png)bin384 -> 384 bytes
-rw-r--r--gfx/pokemon/front_yellow/tentacruel.png (renamed from pic/ymon/tentacruel.png)bin549 -> 549 bytes
-rw-r--r--gfx/pokemon/front_yellow/vaporeon.png (renamed from pic/ymon/vaporeon.png)bin530 -> 530 bytes
-rw-r--r--gfx/pokemon/front_yellow/venomoth.png (renamed from pic/ymon/venomoth.png)bin599 -> 599 bytes
-rw-r--r--gfx/pokemon/front_yellow/venonat.png (renamed from pic/ymon/venonat.png)bin377 -> 377 bytes
-rw-r--r--gfx/pokemon/front_yellow/venusaur.png (renamed from pic/ymon/venusaur.png)bin661 -> 661 bytes
-rw-r--r--gfx/pokemon/front_yellow/victreebel.png (renamed from pic/ymon/victreebel.png)bin617 -> 617 bytes
-rw-r--r--gfx/pokemon/front_yellow/vileplume.png (renamed from pic/ymon/vileplume.png)bin425 -> 425 bytes
-rw-r--r--gfx/pokemon/front_yellow/voltorb.png (renamed from pic/ymon/voltorb.png)bin281 -> 281 bytes
-rw-r--r--gfx/pokemon/front_yellow/vulpix.png (renamed from pic/ymon/vulpix.png)bin453 -> 453 bytes
-rw-r--r--gfx/pokemon/front_yellow/wartortle.png (renamed from pic/ymon/wartortle.png)bin515 -> 515 bytes
-rw-r--r--gfx/pokemon/front_yellow/weedle.png (renamed from pic/ymon/weedle.png)bin298 -> 298 bytes
-rw-r--r--gfx/pokemon/front_yellow/weepinbell.png (renamed from pic/ymon/weepinbell.png)bin389 -> 389 bytes
-rw-r--r--gfx/pokemon/front_yellow/weezing.png (renamed from pic/ymon/weezing.png)bin484 -> 484 bytes
-rw-r--r--gfx/pokemon/front_yellow/wigglytuff.png (renamed from pic/ymon/wigglytuff.png)bin526 -> 526 bytes
-rw-r--r--gfx/pokemon/front_yellow/zapdos.png (renamed from pic/ymon/zapdos.png)bin601 -> 601 bytes
-rw-r--r--gfx/pokemon/front_yellow/zubat.png (renamed from pic/ymon/zubat.png)bin349 -> 349 bytes
-rw-r--r--gfx/pokemon/slide_down_7x3.tilemapbin0 -> 21 bytes
-rw-r--r--gfx/pokemon/slide_down_7x5.tilemapbin0 -> 35 bytes
-rw-r--r--gfx/sgb/border.png (renamed from gfx/pokemon_yellow.png)bin781 -> 781 bytes
-rw-r--r--gfx/sgb/border.tilemap (renamed from gfx/tilemaps/sgbborder.map)bin1792 -> 1792 bytes
-rw-r--r--gfx/sgb/green_border.pngbin0 -> 1051 bytes
-rw-r--r--gfx/sgb/green_border.tilemapbin0 -> 1792 bytes
-rw-r--r--gfx/slotmachine1.pngbin470 -> 0 bytes
-rw-r--r--gfx/slots/green_slots_1.pngbin0 -> 461 bytes
-rw-r--r--gfx/slots/green_slots_2.pngbin0 -> 308 bytes
-rw-r--r--gfx/slots/slots.tilemap (renamed from gfx/tilemaps/slotmachine.map)bin240 -> 240 bytes
-rw-r--r--gfx/slots/slots_1.pngbin0 -> 478 bytes
-rw-r--r--gfx/slots/slots_2.png (renamed from gfx/slotmachine2.png)bin379 -> 379 bytes
-rw-r--r--gfx/spinner_arrow.pngbin131 -> 0 bytes
-rw-r--r--gfx/splash/copyright.png (renamed from gfx/copyright.png)bin219 -> 219 bytes
-rw-r--r--gfx/splash/falling_star.png (renamed from gfx/falling_star.png)bin90 -> 90 bytes
-rw-r--r--gfx/splash/gamefreak_logo.png (renamed from gfx/gamefreak_logo.png)bin139 -> 139 bytes
-rw-r--r--gfx/splash/gamefreak_presents.png (renamed from gfx/gamefreak_intro.png)bin180 -> 180 bytes
-rw-r--r--gfx/sprites.asm74
-rw-r--r--gfx/sprites/beauty.png (renamed from gfx/sprites/foulard_woman.png)bin260 -> 260 bytes
-rw-r--r--gfx/sprites/bike_shop_clerk.png (renamed from gfx/sprites/bike_shop_guy.png)bin209 -> 209 bytes
-rw-r--r--gfx/sprites/captain.png (renamed from gfx/sprites/ss_captain.png)bin221 -> 221 bytes
-rw-r--r--gfx/sprites/channeler.png (renamed from gfx/sprites/medium.png)bin242 -> 242 bytes
-rw-r--r--gfx/sprites/clefairy.pngbin317 -> 554 bytes
-rw-r--r--gfx/sprites/clefairy2.pngbin554 -> 0 bytes
-rw-r--r--gfx/sprites/clerk.png (renamed from gfx/sprites/mart_guy.png)bin220 -> 220 bytes
-rw-r--r--gfx/sprites/cooltrainer_f.png (renamed from gfx/sprites/lass.png)bin349 -> 349 bytes
-rw-r--r--gfx/sprites/cooltrainer_m.png (renamed from gfx/sprites/black_hair_boy_1.png)bin286 -> 286 bytes
-rw-r--r--gfx/sprites/fairy.pngbin0 -> 317 bytes
-rw-r--r--gfx/sprites/fisher.pngbin213 -> 308 bytes
-rw-r--r--gfx/sprites/fisher2.pngbin308 -> 0 bytes
-rw-r--r--gfx/sprites/fishing_guru.pngbin0 -> 213 bytes
-rw-r--r--gfx/sprites/fossil.png (renamed from gfx/sprites/omanyte.png)bin140 -> 140 bytes
-rw-r--r--gfx/sprites/gambler_asleep.png (renamed from gfx/sprites/lying_old_man.png)bin124 -> 124 bytes
-rw-r--r--gfx/sprites/gramps.png (renamed from gfx/sprites/old_person.png)bin239 -> 239 bytes
-rw-r--r--gfx/sprites/granny.png (renamed from gfx/sprites/old_medium_woman.png)bin202 -> 202 bytes
-rw-r--r--gfx/sprites/gym_guide.png (renamed from gfx/sprites/gym_helper.png)bin214 -> 214 bytes
-rw-r--r--gfx/sprites/koga.png (renamed from gfx/sprites/blackbelt.png)bin271 -> 271 bytes
-rw-r--r--gfx/sprites/link_receptionist.png (renamed from gfx/sprites/cable_club_woman.png)bin218 -> 218 bytes
-rw-r--r--gfx/sprites/little_boy.png (renamed from gfx/sprites/young_boy.png)bin185 -> 185 bytes
-rw-r--r--gfx/sprites/middle_aged_man.png (renamed from gfx/sprites/fat_bald_guy.png)bin289 -> 289 bytes
-rw-r--r--gfx/sprites/middle_aged_woman.png (renamed from gfx/sprites/mom_geisha.png)bin264 -> 264 bytes
-rw-r--r--gfx/sprites/monster.png (renamed from gfx/sprites/slowbro.png)bin350 -> 350 bytes
-rw-r--r--gfx/sprites/paper.png (renamed from gfx/sprites/paper_sheet.png)bin107 -> 107 bytes
-rw-r--r--gfx/sprites/poke_ball.png (renamed from gfx/sprites/ball.png)bin114 -> 114 bytes
-rw-r--r--gfx/sprites/pokedex.png (renamed from gfx/sprites/book_map_dex.png)bin116 -> 116 bytes
-rw-r--r--gfx/sprites/red_bike.png (renamed from gfx/sprites/cycling.png)bin373 -> 373 bytes
-rw-r--r--gfx/sprites/safari_zone_worker.png (renamed from gfx/sprites/white_player.png)bin210 -> 210 bytes
-rw-r--r--gfx/sprites/scientist.png (renamed from gfx/sprites/oak_aide.png)bin281 -> 281 bytes
-rw-r--r--gfx/sprites/silph_president.png (renamed from gfx/sprites/mr_masterball.png)bin212 -> 212 bytes
-rw-r--r--gfx/sprites/silph_worker.png (renamed from gfx/sprites/lapras_giver.png)bin210 -> 210 bytes
-rw-r--r--gfx/sprites/super_nerd.png (renamed from gfx/sprites/black_hair_boy_2.png)bin291 -> 291 bytes
-rw-r--r--gfx/sprites/youngster.png (renamed from gfx/sprites/bug_catcher.png)bin291 -> 291 bytes
-rw-r--r--gfx/surfing_pikachu_1.pngbin3766 -> 0 bytes
-rw-r--r--gfx/text_box.pngbin295 -> 0 bytes
-rw-r--r--gfx/tilesets.asm64
-rw-r--r--gfx/tilesets/beachhouse.tilecoll1
-rw-r--r--gfx/tilesets/cavern.tilecoll1
-rw-r--r--gfx/tilesets/cemetery.tilecoll1
-rw-r--r--gfx/tilesets/club.tilecoll1
-rw-r--r--gfx/tilesets/facility.tilecoll1
-rw-r--r--gfx/tilesets/forest.tilecoll1
-rw-r--r--gfx/tilesets/gate.tilecoll1
-rw-r--r--gfx/tilesets/gym.tilecoll1
-rw-r--r--gfx/tilesets/house.tilecoll1
-rw-r--r--gfx/tilesets/interior.tilecoll1
-rw-r--r--gfx/tilesets/lab.tilecoll1
-rw-r--r--gfx/tilesets/lobby.tilecoll1
-rw-r--r--gfx/tilesets/mansion.tilecoll1
-rw-r--r--gfx/tilesets/overworld.tilecollbin20 -> 0 bytes
-rw-r--r--gfx/tilesets/plateau.tilecoll1
-rw-r--r--gfx/tilesets/pokecenter.tilecoll1
-rw-r--r--gfx/tilesets/reds_house.tilecoll1
-rw-r--r--gfx/tilesets/ship.tilecoll1
-rw-r--r--gfx/tilesets/ship_port.tilecoll2
-rw-r--r--gfx/tilesets/tilesets_rg/flower.pngbin0 -> 108 bytes
-rw-r--r--gfx/tilesets/tilesets_rg/forest.pngbin0 -> 1416 bytes
-rw-r--r--gfx/tilesets/tilesets_rg/overworld.pngbin0 -> 1288 bytes
-rw-r--r--gfx/tilesets/underground.tilecoll1
-rw-r--r--gfx/title/blue_version.png (renamed from gfx/blueversion.png)bin116 -> 116 bytes
-rw-r--r--gfx/title/gamefreak_inc.png (renamed from gfx/gamefreak.png)bin147 -> 147 bytes
-rw-r--r--gfx/title/player.png (renamed from gfx/player_title.png)bin450 -> 450 bytes
-rw-r--r--gfx/title/pokemon_logo.png (renamed from gfx/pokemon_logo.png)bin1793 -> 1793 bytes
-rw-r--r--gfx/title/pokemon_logo_japan.png (renamed from gfx/pokemon_logo_japan.png)bin1991 -> 1991 bytes
-rw-r--r--gfx/town_map/mon_nest_icon.png (renamed from gfx/mon_nest_icon.png)bin80 -> 80 bytes
-rw-r--r--gfx/town_map/town_map.png (renamed from gfx/town_map.png)bin256 -> 256 bytes
-rwxr-xr-xgfx/town_map/town_map.rle (renamed from gfx/town_map.rle)bin171 -> 171 bytes
-rw-r--r--gfx/town_map/town_map_cursor.png (renamed from gfx/town_map_cursor.png)bin82 -> 82 bytes
-rw-r--r--gfx/town_map/up_arrow.png (renamed from gfx/up_arrow.png)bin80 -> 80 bytes
-rw-r--r--gfx/trade.asm7
-rw-r--r--gfx/trade/bubble.pngbin0 -> 143 bytes
-rw-r--r--gfx/trade/cable_ball.png (renamed from gfx/trade2.png)bin126 -> 126 bytes
-rw-r--r--gfx/trade/game_boy.png (renamed from gfx/game_boy.png)bin246 -> 246 bytes
-rw-r--r--gfx/trade/game_boy.tilemap1
-rw-r--r--gfx/trade/link_cable.png (renamed from gfx/link_cable.png)bin207 -> 207 bytes
-rw-r--r--gfx/trade/link_cable.tilemap1
-rw-r--r--gfx/trainer_card.asm8
-rw-r--r--gfx/trainer_card/badge_numbers.png (renamed from gfx/badge_numbers.png)bin135 -> 135 bytes
-rw-r--r--gfx/trainer_card/badges.png (renamed from gfx/badges.png)bin919 -> 919 bytes
-rw-r--r--gfx/trainer_card/blank_leader_names.png (renamed from gfx/blank_leader_names.png)bin73 -> 73 bytes
-rw-r--r--gfx/trainer_card/circle_tile.png (renamed from gfx/circle_tile.png)bin81 -> 81 bytes
-rw-r--r--gfx/trainer_card/trainer_info.png (renamed from gfx/trainer_info.png)bin175 -> 175 bytes
-rw-r--r--gfx/trainers/agatha.png (renamed from pic/trainer/agatha.png)bin470 -> 470 bytes
-rw-r--r--gfx/trainers/beauty.png (renamed from pic/trainer/beauty.png)bin476 -> 476 bytes
-rw-r--r--gfx/trainers/biker.png (renamed from pic/trainer/biker.png)bin618 -> 618 bytes
-rw-r--r--gfx/trainers/birdkeeper.png (renamed from pic/trainer/birdkeeper.png)bin561 -> 561 bytes
-rw-r--r--gfx/trainers/blackbelt.png (renamed from pic/trainer/blackbelt.png)bin594 -> 594 bytes
-rw-r--r--gfx/trainers/blaine.png (renamed from pic/trainer/blaine.png)bin402 -> 402 bytes
-rw-r--r--gfx/trainers/brock.png (renamed from pic/trainer/brock.png)bin394 -> 394 bytes
-rw-r--r--gfx/trainers/bruno.png (renamed from pic/trainer/bruno.png)bin648 -> 648 bytes
-rw-r--r--gfx/trainers/bugcatcher.png (renamed from pic/trainer/bugcatcher.png)bin413 -> 413 bytes
-rw-r--r--gfx/trainers/burglar.png (renamed from pic/trainer/burglar.png)bin486 -> 486 bytes
-rw-r--r--gfx/trainers/channeler.png (renamed from pic/trainer/channeler.png)bin605 -> 605 bytes
-rw-r--r--gfx/trainers/cooltrainerf.png (renamed from pic/trainer/cooltrainerf.png)bin530 -> 530 bytes
-rw-r--r--gfx/trainers/cooltrainerm.png (renamed from pic/trainer/cooltrainerm.png)bin549 -> 549 bytes
-rw-r--r--gfx/trainers/cueball.png (renamed from pic/trainer/cueball.png)bin615 -> 615 bytes
-rw-r--r--gfx/trainers/engineer.png (renamed from pic/trainer/engineer.png)bin532 -> 532 bytes
-rw-r--r--gfx/trainers/erika.png (renamed from pic/trainer/erika.png)bin433 -> 433 bytes
-rw-r--r--gfx/trainers/fisher.png (renamed from pic/trainer/fisher.png)bin569 -> 569 bytes
-rw-r--r--gfx/trainers/gambler.png (renamed from pic/trainer/gambler.png)bin584 -> 584 bytes
-rw-r--r--gfx/trainers/gentleman.png (renamed from pic/trainer/gentleman.png)bin360 -> 360 bytes
-rw-r--r--gfx/trainers/giovanni.png (renamed from pic/trainer/giovanni.png)bin368 -> 368 bytes
-rw-r--r--gfx/trainers/hiker.png (renamed from pic/trainer/hiker.png)bin605 -> 605 bytes
-rw-r--r--gfx/trainers/jr.trainerf.png (renamed from pic/trainer/jr.trainerf.png)bin458 -> 458 bytes
-rw-r--r--gfx/trainers/jr.trainerm.png (renamed from pic/trainer/jr.trainerm.png)bin443 -> 443 bytes
-rw-r--r--gfx/trainers/juggler.png (renamed from pic/trainer/juggler.png)bin613 -> 613 bytes
-rw-r--r--gfx/trainers/koga.png (renamed from pic/trainer/koga.png)bin535 -> 535 bytes
-rw-r--r--gfx/trainers/lance.png (renamed from pic/trainer/lance.png)bin511 -> 511 bytes
-rw-r--r--gfx/trainers/lass.png (renamed from pic/trainer/lass.png)bin365 -> 365 bytes
-rw-r--r--gfx/trainers/lorelei.png (renamed from pic/trainer/lorelei.png)bin445 -> 445 bytes
-rw-r--r--gfx/trainers/lt.surge.png (renamed from pic/trainer/lt.surge.png)bin536 -> 536 bytes
-rw-r--r--gfx/trainers/misty.png (renamed from pic/trainer/misty.png)bin381 -> 381 bytes
-rw-r--r--gfx/trainers/pokemaniac.png (renamed from pic/trainer/pokemaniac.png)bin440 -> 440 bytes
-rw-r--r--gfx/trainers/prof.oak.png (renamed from pic/trainer/prof.oak.png)bin421 -> 421 bytes
-rw-r--r--gfx/trainers/psychic.png (renamed from pic/trainer/psychic.png)bin420 -> 420 bytes
-rw-r--r--gfx/trainers/rival1.png (renamed from pic/trainer/rival1.png)bin423 -> 423 bytes
-rw-r--r--gfx/trainers/rival2.png (renamed from pic/trainer/rival2.png)bin497 -> 497 bytes
-rw-r--r--gfx/trainers/rival3.png (renamed from pic/trainer/rival3.png)bin482 -> 482 bytes
-rw-r--r--gfx/trainers/rocker.png (renamed from pic/trainer/rocker.png)bin460 -> 460 bytes
-rw-r--r--gfx/trainers/rocket.png (renamed from pic/trainer/rocket.png)bin556 -> 556 bytes
-rw-r--r--gfx/trainers/sabrina.png (renamed from pic/trainer/sabrina.png)bin548 -> 548 bytes
-rw-r--r--gfx/trainers/sailor.png (renamed from pic/trainer/sailor.png)bin522 -> 522 bytes
-rw-r--r--gfx/trainers/scientist.png (renamed from pic/trainer/scientist.png)bin474 -> 474 bytes
-rw-r--r--gfx/trainers/supernerd.png (renamed from pic/trainer/supernerd.png)bin365 -> 365 bytes
-rw-r--r--gfx/trainers/swimmer.png (renamed from pic/trainer/swimmer.png)bin408 -> 408 bytes
-rw-r--r--gfx/trainers/tamer.png (renamed from pic/trainer/tamer.png)bin566 -> 566 bytes
-rw-r--r--gfx/trainers/yellow/brock.png (renamed from pic/ytrainer/brock.png)bin371 -> 371 bytes
-rw-r--r--gfx/trainers/yellow/erika.png (renamed from pic/ytrainer/erika.png)bin434 -> 434 bytes
-rw-r--r--gfx/trainers/yellow/jessiejames.png (renamed from pic/ytrainer/jessiejames.png)bin641 -> 641 bytes
-rw-r--r--gfx/trainers/yellow/misty.png (renamed from pic/ytrainer/misty.png)bin406 -> 406 bytes
-rw-r--r--gfx/trainers/yellow/rival1.png (renamed from pic/ytrainer/rival1.png)bin378 -> 378 bytes
-rw-r--r--gfx/trainers/yellow/rival2.png (renamed from pic/ytrainer/rival2.png)bin445 -> 445 bytes
-rw-r--r--gfx/trainers/yellow/rival3.png (renamed from pic/ytrainer/rival3.png)bin418 -> 418 bytes
-rw-r--r--gfx/trainers/youngster.png (renamed from pic/trainer/youngster.png)bin324 -> 324 bytes
-rw-r--r--gfx/version.asm3
-rw-r--r--home.asm4801
-rw-r--r--home/array.asm21
-rw-r--r--home/array2.asm47
-rw-r--r--home/audio.asm10
-rw-r--r--home/bankswitch.asm15
-rw-r--r--home/clear_sprites.asm21
-rw-r--r--home/compare.asm11
-rw-r--r--home/copy.asm50
-rw-r--r--home/copy2.asm68
-rw-r--r--home/copy_string.asm13
-rw-r--r--home/count_set_bits.asm24
-rw-r--r--home/delay.asm32
-rw-r--r--home/fade.asm18
-rw-r--r--home/fade_audio.asm46
-rw-r--r--home/give.asm26
-rw-r--r--home/header.asm81
-rw-r--r--home/hidden_objects.asm35
-rw-r--r--home/init.asm80
-rw-r--r--home/inventory.asm38
-rw-r--r--home/item.asm49
-rw-r--r--home/item_price.asm39
-rw-r--r--home/joypad.asm5
-rw-r--r--home/joypad2.asm100
-rw-r--r--home/lcd.asm25
-rw-r--r--home/lcdc.asm6
-rw-r--r--home/list_menu.asm523
-rw-r--r--home/load_font.asm47
-rw-r--r--home/map_objects.asm322
-rw-r--r--home/math.asm33
-rw-r--r--home/money.asm15
-rw-r--r--home/move_mon.asm239
-rw-r--r--home/names.asm141
-rw-r--r--home/names2.asm92
-rw-r--r--home/npc_movement.asm52
-rw-r--r--home/oam.asm36
-rw-r--r--home/overworld.asm371
-rw-r--r--home/overworld_text.asm31
-rw-r--r--home/palettes.asm63
-rw-r--r--home/pathfinding.asm65
-rw-r--r--home/pic.asm588
-rw-r--r--home/pics.asm198
-rwxr-xr-xhome/pikachu.asm6
-rw-r--r--home/play_time.asm10
-rw-r--r--home/pokemon.asm474
-rw-r--r--home/predef.asm4
-rw-r--r--home/predef_text.asm28
-rw-r--r--home/print_bcd.asm77
-rw-r--r--home/print_num.asm219
-rw-r--r--home/print_text.asm45
-rw-r--r--home/random.asm12
-rw-r--r--home/reload_sprites.asm19
-rw-r--r--home/reload_tiles.asm67
-rw-r--r--home/reset_player_sprite.asm21
-rw-r--r--home/serial.asm98
-rw-r--r--home/start.asm10
-rwxr-xr-xhome/start_menu.asm84
-rw-r--r--home/text.asm533
-rw-r--r--home/text_script.asm225
-rw-r--r--home/textbox.asm7
-rw-r--r--home/tilemap.asm45
-rw-r--r--home/trainers.asm426
-rw-r--r--home/trainers2.asm54
-rw-r--r--home/uncompress.asm588
-rw-r--r--home/update_sprites.asm15
-rw-r--r--home/vblank.asm38
-rw-r--r--home/vcopy.asm150
-rw-r--r--home/window.asm292
-rw-r--r--home/yes_no.asm40
-rw-r--r--hram.asm499
-rw-r--r--layout.link241
-rw-r--r--macros.asm41
-rwxr-xr-xmacros/asm_macros.asm190
-rwxr-xr-xmacros/audio_macros.asm214
-rwxr-xr-xmacros/code.asm20
-rw-r--r--macros/const.asm40
-rw-r--r--macros/coords.asm90
-rwxr-xr-xmacros/data.asm80
-rwxr-xr-xmacros/data_macros.asm242
-rw-r--r--macros/event_macros.asm502
-rw-r--r--macros/farcall.asm33
-rw-r--r--macros/gfx.asm22
-rw-r--r--macros/predef.asm36
-rwxr-xr-xmacros/scripts/audio.asm233
-rw-r--r--macros/scripts/events.asm532
-rw-r--r--macros/scripts/maps.asm225
-rwxr-xr-xmacros/scripts/text.asm213
-rwxr-xr-xmacros/text_macros.asm80
-rw-r--r--macros/wram.asm97
-rwxr-xr-xmain.asm2053
-rw-r--r--maps.asm1226
-rw-r--r--maps/green/CeruleanCave1F.blk3
-rw-r--r--maps/green/CeruleanCave2F.blk1
-rw-r--r--maps/green/CeruleanCaveB1F.blk1
-rw-r--r--pokeyellow.link345
-rw-r--r--rgbdscheck.asm12
-rw-r--r--roms.md51
-rw-r--r--roms.sha11
-rwxr-xr-xscripts/AgathasRoom.asm47
-rw-r--r--scripts/BeachHouse.asm78
-rwxr-xr-xscripts/BeachHouse2.asm16
-rwxr-xr-xscripts/BikeShop.asm62
-rwxr-xr-xscripts/BillsHouse.asm60
-rwxr-xr-xscripts/BillsHouse2.asm48
-rwxr-xr-xscripts/BluesHouse.asm65
-rwxr-xr-xscripts/BrunosRoom.asm47
-rwxr-xr-xscripts/CeladonChiefHouse.asm12
-rwxr-xr-xscripts/CeladonCity.asm86
-rwxr-xr-xscripts/CeladonCity2.asm6
-rwxr-xr-xscripts/CeladonDiner.asm20
-rwxr-xr-xscripts/CeladonDiner2.asm34
-rwxr-xr-xscripts/CeladonGym.asm219
-rwxr-xr-xscripts/CeladonHotel.asm12
-rwxr-xr-xscripts/CeladonMansion1F.asm22
-rwxr-xr-xscripts/CeladonMansion1F_2.asm42
-rwxr-xr-xscripts/CeladonMansion2F.asm4
-rwxr-xr-xscripts/CeladonMansion3F.asm94
-rwxr-xr-xscripts/CeladonMansion3F_2.asm24
-rwxr-xr-xscripts/CeladonMansionRoof.asm4
-rwxr-xr-xscripts/CeladonMansionRoofHouse.asm10
-rwxr-xr-xscripts/CeladonMart1F.asm12
-rwxr-xr-xscripts/CeladonMart2F.asm12
-rwxr-xr-xscripts/CeladonMart3F.asm50
-rwxr-xr-xscripts/CeladonMart3F_2.asm54
-rwxr-xr-xscripts/CeladonMart4F.asm12
-rwxr-xr-xscripts/CeladonMart5F.asm12
-rwxr-xr-xscripts/CeladonMartElevator.asm23
-rwxr-xr-xscripts/CeladonMartRoof.asm104
-rwxr-xr-xscripts/CeladonPokecenter.asm16
-rwxr-xr-xscripts/CeruleanBadgeHouse.asm61
-rwxr-xr-xscripts/CeruleanCaveB1F.asm17
-rwxr-xr-xscripts/CeruleanCity.asm186
-rwxr-xr-xscripts/CeruleanGym.asm114
-rwxr-xr-xscripts/CeruleanMart.asm8
-rwxr-xr-xscripts/CeruleanPokecenter.asm16
-rwxr-xr-xscripts/CeruleanTradeHouse.asm42
-rwxr-xr-xscripts/CeruleanTrashedHouse.asm28
-rwxr-xr-xscripts/ChampionsRoom.asm86
-rwxr-xr-xscripts/CinnabarGym.asm180
-rwxr-xr-xscripts/CinnabarGym3.asm40
-rwxr-xr-xscripts/CinnabarGym_2.asm2
-rwxr-xr-xscripts/CinnabarIsland.asm32
-rwxr-xr-xscripts/CinnabarLab.asm20
-rwxr-xr-xscripts/CinnabarLabFossilRoom.asm28
-rwxr-xr-xscripts/CinnabarLabMetronomeRoom.asm48
-rwxr-xr-xscripts/CinnabarLabTradeRoom.asm12
-rwxr-xr-xscripts/CinnabarMart.asm8
-rwxr-xr-xscripts/CinnabarPokecenter.asm16
-rw-r--r--scripts/Colosseum.asm4
-rwxr-xr-xscripts/CopycatsHouse1F.asm12
-rwxr-xr-xscripts/CopycatsHouse2F.asm76
-rwxr-xr-xscripts/Daycare.asm86
-rwxr-xr-xscripts/DiglettsCave.asm3
-rwxr-xr-xscripts/DiglettsCaveRoute11.asm4
-rwxr-xr-xscripts/DiglettsCaveRoute2.asm4
-rwxr-xr-xscripts/FightingDojo.asm148
-rwxr-xr-xscripts/FuchsiaBillsGrandpasHouse.asm12
-rwxr-xr-xscripts/FuchsiaCity.asm84
-rwxr-xr-xscripts/FuchsiaGoodRodHouse.asm63
-rwxr-xr-xscripts/FuchsiaGym.asm209
-rwxr-xr-xscripts/FuchsiaMart.asm8
-rwxr-xr-xscripts/FuchsiaMeetingRoom.asm12
-rwxr-xr-xscripts/FuchsiaPokecenter.asm16
-rwxr-xr-xscripts/GameCorner.asm222
-rwxr-xr-xscripts/GameCorner2.asm2
-rwxr-xr-xscripts/GameCornerPrizeRoom.asm10
-rwxr-xr-xscripts/HallOfFame.asm16
-rwxr-xr-xscripts/IndigoPlateauLobby.asm16
-rwxr-xr-xscripts/LancesRoom.asm53
-rwxr-xr-xscripts/LavenderCuboneHouse.asm22
-rwxr-xr-xscripts/LavenderMart.asm14
-rwxr-xr-xscripts/LavenderPokecenter.asm16
-rwxr-xr-xscripts/LavenderTown.asm42
-rwxr-xr-xscripts/LoreleisRoom.asm47
-rwxr-xr-xscripts/MrFujisHouse.asm84
-rwxr-xr-xscripts/MrPsychicsHouse.asm36
-rwxr-xr-xscripts/MtMoon1F.asm167
-rwxr-xr-xscripts/MtMoonB1F.asm4
-rwxr-xr-xscripts/MtMoonB2F.asm231
-rwxr-xr-xscripts/MtMoonB2F_2.asm4
-rwxr-xr-xscripts/MtMoonPokecenter.asm24
-rwxr-xr-xscripts/MtMoonPokecenter2.asm24
-rwxr-xr-xscripts/Museum1F.asm32
-rwxr-xr-xscripts/Museum1F2.asm122
-rwxr-xr-xscripts/Museum2F.asm38
-rwxr-xr-xscripts/NameRatersHouse.asm32
-rwxr-xr-xscripts/OaksLab.asm376
-rwxr-xr-xscripts/OaksLab2.asm2
-rwxr-xr-xscripts/PalletTown.asm68
-rwxr-xr-xscripts/PewterCity.asm138
-rwxr-xr-xscripts/PewterGym.asm115
-rwxr-xr-xscripts/PewterMart.asm14
-rwxr-xr-xscripts/PewterNidoranHouse.asm12
-rwxr-xr-xscripts/PewterPokecenter.asm20
-rwxr-xr-xscripts/PewterPokecenter2.asm31
-rwxr-xr-xscripts/PewterSpeechHouse.asm8
-rwxr-xr-xscripts/PokemonFanClub.asm141
-rwxr-xr-xscripts/PokemonMansion1F.asm45
-rwxr-xr-xscripts/PokemonMansion2F.asm53
-rwxr-xr-xscripts/PokemonMansion3F.asm66
-rwxr-xr-xscripts/PokemonMansionB1F.asm58
-rwxr-xr-xscripts/PokemonTower1F.asm20
-rwxr-xr-xscripts/PokemonTower2F.asm52
-rwxr-xr-xscripts/PokemonTower2F_2.asm2
-rwxr-xr-xscripts/PokemonTower3F.asm70
-rwxr-xr-xscripts/PokemonTower4F.asm71
-rwxr-xr-xscripts/PokemonTower5F.asm116
-rwxr-xr-xscripts/PokemonTower6F.asm96
-rwxr-xr-xscripts/PokemonTower7F.asm44
-rwxr-xr-xscripts/PowerPlant.asm109
-rwxr-xr-xscripts/RedsHouse1F.asm16
-rwxr-xr-xscripts/RedsHouse1F2.asm36
-rwxr-xr-xscripts/RedsHouse2F.asm3
-rwxr-xr-xscripts/RockTunnel1F.asm167
-rwxr-xr-xscripts/RockTunnelB1F.asm186
-rwxr-xr-xscripts/RockTunnelPokecenter.asm16
-rwxr-xr-xscripts/RocketHideoutB1F.asm121
-rwxr-xr-xscripts/RocketHideoutB2F.asm463
-rwxr-xr-xscripts/RocketHideoutB3F.asm169
-rwxr-xr-xscripts/RocketHideoutB4F.asm82
-rwxr-xr-xscripts/RocketHideoutElevator.asm25
-rwxr-xr-xscripts/Route1.asm12
-rwxr-xr-xscripts/Route10.asm148
-rwxr-xr-xscripts/Route11.asm236
-rwxr-xr-xscripts/Route11Gate1F.asm4
-rwxr-xr-xscripts/Route11Gate2F.asm46
-rwxr-xr-xscripts/Route12.asm187
-rwxr-xr-xscripts/Route12Gate1F.asm4
-rwxr-xr-xscripts/Route12Gate2F.asm50
-rwxr-xr-xscripts/Route12SuperRodHouse.asm50
-rwxr-xr-xscripts/Route13.asm244
-rwxr-xr-xscripts/Route14.asm236
-rwxr-xr-xscripts/Route15.asm236
-rwxr-xr-xscripts/Route15Gate1F.asm4
-rwxr-xr-xscripts/Route15Gate2F.asm32
-rwxr-xr-xscripts/Route16.asm164
-rwxr-xr-xscripts/Route16FlyHouse.asm38
-rwxr-xr-xscripts/Route16Gate1F.asm34
-rwxr-xr-xscripts/Route16Gate2F.asm24
-rwxr-xr-xscripts/Route17.asm256
-rwxr-xr-xscripts/Route18.asm79
-rwxr-xr-xscripts/Route18Gate1F.asm30
-rwxr-xr-xscripts/Route18Gate2F.asm16
-rwxr-xr-xscripts/Route19.asm236
-rwxr-xr-xscripts/Route1_2.asm58
-rwxr-xr-xscripts/Route2.asm8
-rwxr-xr-xscripts/Route20.asm238
-rwxr-xr-xscripts/Route21.asm209
-rwxr-xr-xscripts/Route22.asm89
-rwxr-xr-xscripts/Route22Gate.asm28
-rwxr-xr-xscripts/Route22_2.asm26
-rwxr-xr-xscripts/Route23.asm49
-rwxr-xr-xscripts/Route24.asm216
-rwxr-xr-xscripts/Route25.asm213
-rwxr-xr-xscripts/Route2Gate.asm30
-rwxr-xr-xscripts/Route2TradeHouse.asm8
-rwxr-xr-xscripts/Route3.asm194
-rwxr-xr-xscripts/Route4.asm37
-rwxr-xr-xscripts/Route5.asm4
-rwxr-xr-xscripts/Route5Gate.asm38
-rwxr-xr-xscripts/Route6.asm144
-rwxr-xr-xscripts/Route6Gate.asm17
-rwxr-xr-xscripts/Route7.asm4
-rwxr-xr-xscripts/Route7Gate.asm18
-rwxr-xr-xscripts/Route8.asm213
-rwxr-xr-xscripts/Route8Gate.asm18
-rwxr-xr-xscripts/Route9.asm213
-rwxr-xr-xscripts/SSAnne1F.asm8
-rwxr-xr-xscripts/SSAnne1FRooms.asm118
-rwxr-xr-xscripts/SSAnne2F.asm62
-rwxr-xr-xscripts/SSAnne2FRooms.asm128
-rwxr-xr-xscripts/SSAnne2FRooms_2.asm24
-rwxr-xr-xscripts/SSAnne3F.asm4
-rwxr-xr-xscripts/SSAnneB1F.asm3
-rwxr-xr-xscripts/SSAnneB1FRooms.asm148
-rwxr-xr-xscripts/SSAnneBow.asm60
-rwxr-xr-xscripts/SSAnneCaptainsRoom.asm48
-rwxr-xr-xscripts/SSAnneKitchen.asm58
-rwxr-xr-xscripts/SafariZoneCenter.asm8
-rwxr-xr-xscripts/SafariZoneCenterRestHouse.asm8
-rwxr-xr-xscripts/SafariZoneEast.asm12
-rwxr-xr-xscripts/SafariZoneEastRestHouse.asm12
-rwxr-xr-xscripts/SafariZoneGate.asm46
-rwxr-xr-xscripts/SafariZoneGate2.asm82
-rwxr-xr-xscripts/SafariZoneNorth.asm20
-rwxr-xr-xscripts/SafariZoneNorthRestHouse.asm12
-rwxr-xr-xscripts/SafariZoneSecretHouse.asm36
-rwxr-xr-xscripts/SafariZoneWest.asm16
-rwxr-xr-xscripts/SafariZoneWestRestHouse.asm12
-rwxr-xr-xscripts/SaffronCity.asm94
-rwxr-xr-xscripts/SaffronGym.asm233
-rwxr-xr-xscripts/SaffronMart.asm8
-rwxr-xr-xscripts/SaffronPidgeyHouse.asm16
-rwxr-xr-xscripts/SaffronPokecenter.asm16
-rwxr-xr-xscripts/SeafoamIslands1F.asm6
-rwxr-xr-xscripts/SeafoamIslandsB1F.asm6
-rwxr-xr-xscripts/SeafoamIslandsB2F.asm6
-rwxr-xr-xscripts/SeafoamIslandsB3F.asm42
-rwxr-xr-xscripts/SeafoamIslandsB4F.asm57
-rwxr-xr-xscripts/SilphCo10F.asm64
-rwxr-xr-xscripts/SilphCo11F.asm158
-rwxr-xr-xscripts/SilphCo11F_2.asm4
-rwxr-xr-xscripts/SilphCo1F.asm4
-rwxr-xr-xscripts/SilphCo2F.asm130
-rwxr-xr-xscripts/SilphCo3F.asm66
-rwxr-xr-xscripts/SilphCo4F.asm95
-rwxr-xr-xscripts/SilphCo5F.asm126
-rwxr-xr-xscripts/SilphCo6F.asm127
-rwxr-xr-xscripts/SilphCo7F.asm214
-rwxr-xr-xscripts/SilphCo8F.asm93
-rwxr-xr-xscripts/SilphCo9F.asm103
-rwxr-xr-xscripts/SilphCoElevator.asm35
-rw-r--r--scripts/TradeCenter.asm26
-rwxr-xr-xscripts/UndergroundPathNorthSouth.asm3
-rwxr-xr-xscripts/UndergroundPathRoute5.asm10
-rwxr-xr-xscripts/UndergroundPathRoute6.asm4
-rwxr-xr-xscripts/UndergroundPathRoute7.asm4
-rwxr-xr-xscripts/UndergroundPathRoute7Copy.asm16
-rwxr-xr-xscripts/UndergroundPathRoute8.asm4
-rwxr-xr-xscripts/UndergroundPathWestEast.asm3
-rwxr-xr-xscripts/VermilionCity.asm96
-rwxr-xr-xscripts/VermilionCity2.asm54
-rwxr-xr-xscripts/VermilionDock.asm37
-rwxr-xr-xscripts/VermilionGym.asm141
-rwxr-xr-xscripts/VermilionMart.asm8
-rwxr-xr-xscripts/VermilionOldRodHouse.asm50
-rwxr-xr-xscripts/VermilionPidgeyHouse.asm12
-rwxr-xr-xscripts/VermilionPokecenter.asm16
-rwxr-xr-xscripts/VermilionTradeHouse.asm4
-rwxr-xr-xscripts/VictoryRoad1F.asm53
-rwxr-xr-xscripts/VictoryRoad2F.asm140
-rwxr-xr-xscripts/VictoryRoad3F.asm102
-rwxr-xr-xscripts/ViridianCity.asm122
-rwxr-xr-xscripts/ViridianCity2.asm158
-rwxr-xr-xscripts/ViridianForest.asm139
-rwxr-xr-xscripts/ViridianForest2.asm34
-rwxr-xr-xscripts/ViridianForestNorthGate.asm8
-rwxr-xr-xscripts/ViridianForestSouthGate.asm8
-rwxr-xr-xscripts/ViridianGym.asm335
-rwxr-xr-xscripts/ViridianMart.asm41
-rwxr-xr-xscripts/ViridianNicknameHouse.asm18
-rwxr-xr-xscripts/ViridianPokecenter.asm16
-rwxr-xr-xscripts/ViridianSchoolHouse.asm12
-rwxr-xr-xscripts/ViridianSchoolHouse2.asm12
-rwxr-xr-xscripts/WardensHouse.asm86
-rw-r--r--sram.asm54
-rw-r--r--text.asm3666
-rw-r--r--text/AgathasRoom.asm (renamed from text/maps/AgathasRoom.asm)0
-rw-r--r--text/BeachHouse.asm107
-rw-r--r--text/BikeShop.asm71
-rw-r--r--text/BillsHouse.asm93
-rw-r--r--text/BluesHouse.asm42
-rw-r--r--text/BrunosRoom.asm (renamed from text/maps/BrunosRoom.asm)0
-rw-r--r--text/CeladonChiefHouse.asm (renamed from text/maps/CeladonChiefHouse.asm)0
-rw-r--r--text/CeladonCity.asm154
-rw-r--r--text/CeladonDiner.asm60
-rw-r--r--text/CeladonGym.asm220
-rw-r--r--text/CeladonHotel.asm (renamed from text/maps/CeladonHotel.asm)0
-rw-r--r--text/CeladonMansion1F.asm68
-rw-r--r--text/CeladonMansion2F.asm (renamed from text/maps/CeladonMansion2F.asm)0
-rw-r--r--text/CeladonMansion3F.asm118
-rw-r--r--text/CeladonMansionRoof.asm (renamed from text/maps/CeladonMansionRoof.asm)0
-rw-r--r--text/CeladonMansionRoofHouse.asm (renamed from text/maps/CeladonMansionRoofHouse.asm)0
-rw-r--r--text/CeladonMart1F.asm (renamed from text/maps/CeladonMart1F.asm)0
-rw-r--r--text/CeladonMart2F.asm (renamed from text/maps/CeladonMart2F.asm)0
-rw-r--r--text/CeladonMart3F.asm99
-rw-r--r--text/CeladonMart4F.asm (renamed from text/maps/CeladonMart4F.asm)0
-rw-r--r--text/CeladonMart5F.asm (renamed from text/maps/CeladonMart5F.asm)0
-rw-r--r--text/CeladonMartRoof.asm149
-rw-r--r--text/CeladonPokecenter.asm (renamed from text/maps/CeladonPokecenter.asm)0
-rw-r--r--text/CeruleanBadgeHouse.asm (renamed from text/maps/CeruleanBadgeHouse.asm)0
-rw-r--r--[-rwxr-xr-x]text/CeruleanBadgeHouse_2.asm (renamed from text/maps/CeruleanBadgeHouse_2.asm)0
-rw-r--r--text/CeruleanCaveB1F.asm3
-rw-r--r--text/CeruleanCity.asm235
-rw-r--r--text/CeruleanGym.asm135
-rw-r--r--text/CeruleanMart.asm (renamed from text/maps/CeruleanMart.asm)0
-rw-r--r--text/CeruleanPokecenter.asm (renamed from text/maps/CeruleanPokecenter.asm)0
-rw-r--r--text/CeruleanTradeHouse.asm46
-rw-r--r--text/CeruleanTrashedHouse.asm (renamed from text/maps/CeruleanTrashedHouse.asm)0
-rw-r--r--text/ChampionsRoom.asm146
-rw-r--r--text/CinnabarGym.asm255
-rw-r--r--text/CinnabarIsland.asm (renamed from text/maps/CinnabarIsland.asm)0
-rw-r--r--text/CinnabarLab.asm (renamed from text/maps/CinnabarLab.asm)0
-rw-r--r--text/CinnabarLabFossilRoom.asm78
-rw-r--r--text/CinnabarLabMetronomeRoom.asm64
-rw-r--r--text/CinnabarLabTradeRoom.asm (renamed from text/maps/CinnabarLabTradeRoom.asm)0
-rw-r--r--text/CinnabarMart.asm (renamed from text/maps/CinnabarMart.asm)0
-rw-r--r--text/CinnabarPokecenter.asm (renamed from text/maps/CinnabarPokecenter.asm)0
-rw-r--r--text/CopycatsHouse1F.asm21
-rw-r--r--text/CopycatsHouse2F.asm100
-rw-r--r--text/Daycare.asm97
-rw-r--r--text/DiglettsCaveRoute11.asm (renamed from text/maps/DiglettsCaveRoute11.asm)0
-rw-r--r--text/DiglettsCaveRoute2.asm (renamed from text/maps/DiglettsCaveRoute2.asm)0
-rw-r--r--text/FightingDojo.asm (renamed from text/maps/FightingDojo.asm)0
-rw-r--r--text/FuchsiaBillsGrandpasHouse.asm (renamed from text/maps/FuchsiaBillsGrandpasHouse.asm)0
-rw-r--r--text/FuchsiaCity.asm (renamed from text/maps/FuchsiaCity.asm)0
-rw-r--r--text/FuchsiaGoodRodHouse.asm44
-rw-r--r--text/FuchsiaGym.asm221
-rw-r--r--text/FuchsiaMart.asm (renamed from text/maps/FuchsiaMart.asm)0
-rw-r--r--text/FuchsiaMeetingRoom.asm (renamed from text/maps/FuchsiaMeetingRoom.asm)0
-rw-r--r--text/FuchsiaPokecenter.asm (renamed from text/maps/FuchsiaPokecenter.asm)0
-rw-r--r--text/GameCorner.asm185
-rw-r--r--text/GameCornerPrizeRoom.asm (renamed from text/maps/GameCornerPrizeRoom.asm)0
-rw-r--r--[-rwxr-xr-x]text/GameCorner_2.asm (renamed from text/maps/GameCorner_2.asm)0
-rw-r--r--text/HallOfFame.asm (renamed from text/maps/HallOfFame.asm)0
-rw-r--r--text/IndigoPlateauLobby.asm (renamed from text/maps/IndigoPlateauLobby.asm)0
-rw-r--r--text/LancesRoom.asm64
-rw-r--r--text/LavenderCuboneHouse.asm25
-rw-r--r--text/LavenderMart.asm (renamed from text/maps/LavenderMart.asm)0
-rw-r--r--text/LavenderPokecenter.asm (renamed from text/maps/LavenderPokecenter.asm)0
-rw-r--r--text/LavenderTown.asm (renamed from text/maps/LavenderTown.asm)0
-rw-r--r--text/LoreleisRoom.asm (renamed from text/maps/LoreleisRoom.asm)0
-rw-r--r--text/MrFujisHouse.asm89
-rw-r--r--text/MrPsychicsHouse.asm26
-rw-r--r--text/MtMoon1F.asm (renamed from text/maps/MtMoon1F.asm)0
-rw-r--r--text/MtMoonB1F.asm3
-rw-r--r--text/MtMoonB2F.asm130
-rw-r--r--text/MtMoonPokecenter.asm48
-rw-r--r--text/Museum1F.asm108
-rw-r--r--text/Museum2F.asm (renamed from text/maps/Museum2F.asm)0
-rw-r--r--text/NameRatersHouse.asm60
-rw-r--r--text/OaksLab.asm401
-rw-r--r--text/PalletTown.asm68
-rw-r--r--text/PewterCity.asm (renamed from text/maps/PewterCity.asm)0
-rw-r--r--text/PewterGym.asm186
-rw-r--r--text/PewterMart.asm (renamed from text/maps/PewterMart.asm)0
-rw-r--r--text/PewterNidoranHouse.asm25
-rw-r--r--text/PewterPokecenter.asm (renamed from text/maps/PewterPokecenter.asm)0
-rw-r--r--text/PewterSpeechHouse.asm (renamed from text/maps/PewterSpeechHouse.asm)0
-rw-r--r--text/PokemonFanClub.asm179
-rw-r--r--text/PokemonMansion1F.asm (renamed from text/maps/PokemonMansion1F.asm)0
-rw-r--r--text/PokemonMansion2F.asm (renamed from text/maps/PokemonMansion2F.asm)0
-rw-r--r--text/PokemonMansion3F.asm (renamed from text/maps/PokemonMansion3F.asm)0
-rw-r--r--text/PokemonMansionB1F.asm (renamed from text/maps/PokemonMansionB1F.asm)0
-rw-r--r--text/PokemonTower1F.asm (renamed from text/maps/PokemonTower1F.asm)0
-rw-r--r--text/PokemonTower2F.asm (renamed from text/maps/PokemonTower2F.asm)0
-rw-r--r--text/PokemonTower3F.asm (renamed from text/maps/PokemonTower3F.asm)0
-rw-r--r--text/PokemonTower4F.asm (renamed from text/maps/PokemonTower4F.asm)0
-rw-r--r--text/PokemonTower5F.asm (renamed from text/maps/PokemonTower5F.asm)0
-rw-r--r--text/PokemonTower6F.asm (renamed from text/maps/PokemonTower6F.asm)0
-rw-r--r--text/PokemonTower7F.asm51
-rw-r--r--text/PowerPlant.asm7
-rw-r--r--text/RedsHouse1F.asm (renamed from text/maps/RedsHouse1F.asm)0
-rw-r--r--text/RockTunnel1F.asm (renamed from text/maps/RockTunnel1F.asm)0
-rw-r--r--text/RockTunnelB1F.asm (renamed from text/maps/RockTunnelB1F.asm)0
-rw-r--r--text/RockTunnelPokecenter.asm (renamed from text/maps/RockTunnelPokecenter.asm)0
-rw-r--r--text/RocketHideoutB1F.asm74
-rw-r--r--text/RocketHideoutB2F.asm (renamed from text/maps/RocketHideoutB2F.asm)0
-rw-r--r--text/RocketHideoutB3F.asm (renamed from text/maps/RocketHideoutB3F.asm)0
-rw-r--r--text/RocketHideoutB4F.asm67
-rw-r--r--text/RocketHideoutElevator.asm4
-rw-r--r--text/Route1.asm50
-rw-r--r--text/Route10.asm (renamed from text/maps/Route10.asm)0
-rw-r--r--text/Route11.asm (renamed from text/maps/Route11.asm)0
-rw-r--r--text/Route11Gate1F.asm (renamed from text/maps/Route11Gate1F.asm)0
-rw-r--r--text/Route11Gate2F.asm (renamed from text/maps/Route11Gate2F.asm)0
-rw-r--r--text/Route12.asm (renamed from text/maps/Route12.asm)0
-rw-r--r--text/Route12Gate1F.asm (renamed from text/maps/Route12Gate1F.asm)0
-rw-r--r--text/Route12Gate2F.asm43
-rw-r--r--text/Route12SuperRodHouse.asm62
-rw-r--r--text/Route13.asm (renamed from text/maps/Route13.asm)0
-rw-r--r--text/Route14.asm (renamed from text/maps/Route14.asm)0
-rw-r--r--text/Route15.asm172
-rw-r--r--text/Route15Gate1F.asm (renamed from text/maps/Route15Gate1F.asm)0
-rw-r--r--text/Route15Gate2F.asm (renamed from text/maps/Route15Gate2F.asm)0
-rw-r--r--text/Route16.asm (renamed from text/maps/Route16.asm)0
-rw-r--r--text/Route16FlyHouse.asm32
-rw-r--r--text/Route16Gate1F.asm (renamed from text/maps/Route16Gate1F.asm)0
-rw-r--r--text/Route16Gate2F.asm (renamed from text/maps/Route16Gate2F.asm)0
-rw-r--r--text/Route17.asm (renamed from text/maps/Route17.asm)0
-rw-r--r--text/Route18.asm (renamed from text/maps/Route18.asm)0
-rw-r--r--text/Route18Gate1F.asm (renamed from text/maps/Route18Gate1F.asm)0
-rw-r--r--text/Route18Gate2F.asm (renamed from text/maps/Route18Gate2F.asm)0
-rw-r--r--text/Route19.asm (renamed from text/maps/Route19.asm)0
-rw-r--r--text/Route2.asm (renamed from text/maps/Route2.asm)0
-rw-r--r--text/Route20.asm (renamed from text/maps/Route20.asm)0
-rw-r--r--text/Route21.asm (renamed from text/maps/Route21.asm)0
-rw-r--r--text/Route22.asm (renamed from text/maps/Route22.asm)0
-rw-r--r--text/Route22Gate.asm22
-rw-r--r--text/Route23.asm41
-rw-r--r--text/Route24.asm187
-rw-r--r--text/Route25.asm (renamed from text/maps/Route25.asm)0
-rw-r--r--text/Route2Gate.asm (renamed from text/maps/Route2Gate.asm)0
-rw-r--r--text/Route2TradeHouse.asm (renamed from text/maps/Route2TradeHouse.asm)0
-rw-r--r--text/Route3.asm (renamed from text/maps/Route3.asm)0
-rw-r--r--text/Route4.asm (renamed from text/maps/Route4.asm)0
-rw-r--r--text/Route5.asm (renamed from text/maps/Route5.asm)0
-rw-r--r--text/Route6.asm (renamed from text/maps/Route6.asm)0
-rw-r--r--text/Route7.asm (renamed from text/maps/Route7.asm)0
-rw-r--r--text/Route8.asm (renamed from text/maps/Route8.asm)0
-rw-r--r--text/Route9.asm (renamed from text/maps/Route9.asm)0
-rw-r--r--[-rwxr-xr-x]text/Route9_2.asm (renamed from text/maps/Route9_2.asm)0
-rw-r--r--text/SSAnne1F.asm (renamed from text/maps/SSAnne1F.asm)0
-rw-r--r--text/SSAnne1FRooms.asm105
-rw-r--r--text/SSAnne2F.asm (renamed from text/maps/SSAnne2F.asm)0
-rw-r--r--text/SSAnne2FRooms.asm (renamed from text/maps/SSAnne2FRooms.asm)0
-rw-r--r--text/SSAnne3F.asm (renamed from text/maps/SSAnne3F.asm)0
-rw-r--r--text/SSAnneB1FRooms.asm114
-rw-r--r--text/SSAnneBow.asm (renamed from text/maps/SSAnneBow.asm)0
-rw-r--r--text/SSAnneCaptainsRoom.asm64
-rw-r--r--text/SSAnneKitchen.asm (renamed from text/maps/SSAnneKitchen.asm)0
-rw-r--r--text/SafariZoneCenter.asm (renamed from text/maps/SafariZoneCenter.asm)0
-rw-r--r--text/SafariZoneCenterRestHouse.asm (renamed from text/maps/SafariZoneCenterRestHouse.asm)0
-rw-r--r--text/SafariZoneEast.asm (renamed from text/maps/SafariZoneEast.asm)0
-rw-r--r--text/SafariZoneEastRestHouse.asm (renamed from text/maps/SafariZoneEastRestHouse.asm)0
-rw-r--r--text/SafariZoneGate.asm147
-rw-r--r--text/SafariZoneNorth.asm (renamed from text/maps/SafariZoneNorth.asm)0
-rw-r--r--text/SafariZoneNorthRestHouse.asm (renamed from text/maps/SafariZoneNorthRestHouse.asm)0
-rw-r--r--text/SafariZoneSecretHouse.asm45
-rw-r--r--text/SafariZoneWest.asm (renamed from text/maps/SafariZoneWest.asm)0
-rw-r--r--text/SafariZoneWestRestHouse.asm (renamed from text/maps/SafariZoneWestRestHouse.asm)0
-rw-r--r--text/SaffronCity.asm152
-rw-r--r--text/SaffronGates.asm38
-rw-r--r--text/SaffronGym.asm238
-rw-r--r--text/SaffronMart.asm (renamed from text/maps/SaffronMart.asm)0
-rw-r--r--text/SaffronPidgeyHouse.asm27
-rw-r--r--text/SaffronPokecenter.asm (renamed from text/maps/SaffronPokecenter.asm)0
-rw-r--r--text/SeafoamIslandsB4F.asm14
-rw-r--r--text/SilphCo10F.asm68
-rw-r--r--text/SilphCo11F.asm115
-rw-r--r--text/SilphCo1F.asm (renamed from text/maps/SilphCo1F.asm)0
-rw-r--r--text/SilphCo2F.asm97
-rw-r--r--text/SilphCo3F.asm (renamed from text/maps/SilphCo3F.asm)0
-rw-r--r--text/SilphCo4F.asm (renamed from text/maps/SilphCo4F.asm)0
-rw-r--r--text/SilphCo5F.asm (renamed from text/maps/SilphCo5F.asm)0
-rw-r--r--text/SilphCo6F.asm (renamed from text/maps/SilphCo6F.asm)0
-rw-r--r--text/SilphCo7F.asm (renamed from text/maps/SilphCo7F.asm)0
-rw-r--r--text/SilphCo8F.asm (renamed from text/maps/SilphCo8F.asm)0
-rw-r--r--text/SilphCo9F.asm (renamed from text/maps/SilphCo9F.asm)0
-rw-r--r--text/UndergroundPathRoute6.asm (renamed from text/maps/UndergroundPathRoute6.asm)0
-rw-r--r--text/UndergroundPathRoute7.asm (renamed from text/maps/UndergroundPathRoute7.asm)0
-rw-r--r--text/UndergroundPathRoute7Copy.asm (renamed from text/maps/UndergroundPathRoute7Copy.asm)0
-rw-r--r--text/UndergroundPathRoute8.asm (renamed from text/maps/UndergroundPathRoute8.asm)0
-rw-r--r--text/VermilionCity.asm169
-rw-r--r--text/VermilionDock.asm3
-rw-r--r--text/VermilionGym.asm167
-rw-r--r--text/VermilionMart.asm (renamed from text/maps/VermilionMart.asm)0
-rw-r--r--text/VermilionOldRodHouse.asm55
-rw-r--r--text/VermilionPidgeyHouse.asm22
-rw-r--r--text/VermilionPokecenter.asm (renamed from text/maps/VermilionPokecenter.asm)0
-rw-r--r--text/VictoryRoad1F.asm (renamed from text/maps/VictoryRoad1F.asm)0
-rw-r--r--text/VictoryRoad2F.asm86
-rw-r--r--text/VictoryRoad3F.asm (renamed from text/maps/VictoryRoad3F.asm)0
-rw-r--r--text/ViridianCity.asm195
-rw-r--r--text/ViridianForest.asm (renamed from text/maps/ViridianForest.asm)0
-rw-r--r--text/ViridianForestNorthGate.asm (renamed from text/maps/ViridianForestNorthGate.asm)0
-rw-r--r--text/ViridianForestSouthGate.asm (renamed from text/maps/ViridianForestSouthGate.asm)0
-rw-r--r--text/ViridianGym.asm240
-rw-r--r--text/ViridianMart.asm33
-rw-r--r--text/ViridianNicknameHouse.asm (renamed from text/maps/ViridianNicknameHouse.asm)0
-rwxr-xr-xtext/ViridianPokecenter.asm (renamed from text/maps/ViridianPokecenter.asm)0
-rw-r--r--text/ViridianSchoolHouse.asm (renamed from text/maps/ViridianSchoolHouse.asm)0
-rw-r--r--text/WardensHouse.asm86
-rwxr-xr-xtext/credits_text.asm264
-rwxr-xr-xtext/item_names.asm98
-rwxr-xr-xtext/map_names.asm107
-rw-r--r--text/maps/BeachHouse.asm103
-rw-r--r--text/maps/BikeShop.asm70
-rw-r--r--text/maps/BillsHouse.asm92
-rw-r--r--text/maps/BluesHouse.asm41
-rw-r--r--text/maps/CeladonCity.asm152
-rw-r--r--text/maps/CeladonDiner.asm59
-rw-r--r--text/maps/CeladonGym.asm219
-rw-r--r--text/maps/CeladonMansion1F.asm64
-rw-r--r--text/maps/CeladonMansion3F.asm117
-rw-r--r--text/maps/CeladonMart3F.asm98
-rw-r--r--text/maps/CeladonMartRoof.asm138
-rw-r--r--text/maps/CeruleanCaveB1F.asm2
-rw-r--r--text/maps/CeruleanCity.asm233
-rw-r--r--text/maps/CeruleanGym.asm134
-rw-r--r--text/maps/CeruleanTradeHouse.asm39
-rw-r--r--text/maps/ChampionsRoom.asm146
-rw-r--r--text/maps/CinnabarGym.asm253
-rw-r--r--text/maps/CinnabarLabFossilRoom.asm78
-rw-r--r--text/maps/CinnabarLabMetronomeRoom.asm63
-rw-r--r--text/maps/CopycatsHouse1F.asm20
-rw-r--r--text/maps/CopycatsHouse2F.asm97
-rw-r--r--text/maps/Daycare.asm96
-rw-r--r--text/maps/FuchsiaGoodRodHouse.asm43
-rw-r--r--text/maps/FuchsiaGym.asm220
-rw-r--r--text/maps/GameCorner.asm181
-rw-r--r--text/maps/LancesRoom.asm63
-rw-r--r--text/maps/LavenderCuboneHouse.asm24
-rw-r--r--text/maps/MrFujisHouse.asm86
-rw-r--r--text/maps/MrPsychicsHouse.asm25
-rw-r--r--text/maps/MtMoonB1F.asm3
-rw-r--r--text/maps/MtMoonB2F.asm125
-rw-r--r--text/maps/MtMoonPokecenter.asm48
-rw-r--r--text/maps/Museum1F.asm107
-rw-r--r--text/maps/NameRatersHouse.asm60
-rw-r--r--text/maps/OaksLab.asm396
-rw-r--r--text/maps/PalletTown.asm67
-rw-r--r--text/maps/PewterGym.asm184
-rw-r--r--text/maps/PewterNidoranHouse.asm24
-rw-r--r--text/maps/PokemonFanClub.asm178
-rw-r--r--text/maps/PokemonTower7F.asm49
-rw-r--r--text/maps/PowerPlant.asm6
-rw-r--r--text/maps/RocketHideoutB1F.asm73
-rw-r--r--text/maps/RocketHideoutB4F.asm65
-rw-r--r--text/maps/RocketHideoutElevator.asm3
-rw-r--r--text/maps/Route1.asm49
-rw-r--r--text/maps/Route12Gate2F.asm42
-rw-r--r--text/maps/Route12SuperRodHouse.asm61
-rw-r--r--text/maps/Route15.asm171
-rw-r--r--text/maps/Route16FlyHouse.asm31
-rw-r--r--text/maps/Route22Gate.asm20
-rw-r--r--text/maps/Route23.asm39
-rw-r--r--text/maps/Route24.asm184
-rw-r--r--text/maps/SSAnne1FRooms.asm104
-rw-r--r--text/maps/SSAnneB1FRooms.asm112
-rw-r--r--text/maps/SSAnneCaptainsRoom.asm62
-rw-r--r--text/maps/SafariZoneGate.asm143
-rw-r--r--text/maps/SafariZoneSecretHouse.asm44
-rw-r--r--text/maps/SaffronCity.asm151
-rw-r--r--text/maps/SaffronGates.asm37
-rw-r--r--text/maps/SaffronGym.asm236
-rw-r--r--text/maps/SaffronPidgeyHouse.asm26
-rw-r--r--text/maps/SeafoamIslandsB4F.asm13
-rw-r--r--text/maps/SilphCo10F.asm66
-rw-r--r--text/maps/SilphCo11F.asm114
-rw-r--r--text/maps/SilphCo2F.asm96
-rw-r--r--text/maps/VermilionCity.asm167
-rw-r--r--text/maps/VermilionDock.asm3
-rw-r--r--text/maps/VermilionGym.asm166
-rw-r--r--text/maps/VermilionOldRodHouse.asm54
-rw-r--r--text/maps/VermilionPidgeyHouse.asm21
-rw-r--r--text/maps/VictoryRoad2F.asm85
-rw-r--r--text/maps/ViridianCity.asm194
-rw-r--r--text/maps/ViridianGym.asm237
-rw-r--r--text/maps/ViridianMart.asm32
-rw-r--r--text/maps/WardensHouse.asm84
-rwxr-xr-xtext/monster_names.asm191
-rw-r--r--text/oakspeech.asm55
-rw-r--r--text/pokedex_ratings.asm4
-rwxr-xr-xtext/trainer_names.asm48
-rwxr-xr-xtext/type_names.asm48
-rw-r--r--text/unused_names.asm20
-rw-r--r--tools/gfx.c71
-rw-r--r--tools/pic.py491
-rwxr-xr-xtools/unnamed.py109
-rw-r--r--vram.asm44
-rwxr-xr-xwram.asm2369
3318 files changed, 88106 insertions, 93373 deletions
diff --git a/.gitattributes b/.gitattributes
index 3b289089..dca901b7 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -10,9 +10,8 @@
*.2bpp binary
*.1bpp binary
*.rle binary
-*.tilecoll binary
*.bst binary
-*.map binary
+*.tilemap binary
*.wav binary
*.blk binary
*.pic binary \ No newline at end of file
diff --git a/.gitignore b/.gitignore
index faf283c7..c5e70143 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,59 +1,33 @@
-# precompiled python
-*.pyc
-
-# compiled object file
+# compiled objects
*.o
-# no binaries
-*.exe
+# compiled graphics
+*.1bpp
+*.2bpp
+*.pic
-# roms
+# compiled roms
*.gbc
*.gb
# rgbds extras
+*.map
*.sym
-# converted image data
-*.2bpp
-*.1bpp
-*.pic
+# tool binaries
+*.exe
+
+# precompiled python
+*.pyc
+*$py.class
# converted audio data
*.pcm
-# swap files for vim
-.*.swp
-
-# no data from extras/
-*.json
-
-# for any of the poor souls with save game files in their working directory
+# save game files
*.sgm
*.sav
-*.sys
-
-# lol bgb
-*.sn1
-*.sn2
-*.sn3
-*.sn4
-*.sn5
-*.sn6
-*.sn7
-*.sn8
-*.sn9
-*.sn0
-
-# replace.sh
-replace.sh
-
-# leftover txt files from diff
-*.txt
-
-# for vim configuration
-# url: http://www.vim.org/scripts/script.php?script_id=441
-.lvimrc
-
-# extras is a submodule, don't include
-extras/
+*.rtc
+*.sn*
+*.sa*
+*.sg1
diff --git a/.travis.yml b/.travis.yml
index d3cce374..1147a117 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,14 +1,14 @@
language: c
+os:
+ - linux
+ - osx
install:
- |-
- path="$(pwd)"; cd;
- wget https://github.com/rednex/rgbds/archive/v0.3.3.tar.gz -O rgbds.tar.gz &&
- tar xf rgbds.tar.gz &&
- cd rgbds-0.3.3 &&
- sudo make install &&
- cd - &&
- rm -rf rgbds &&
- cd "$path"
+ ( cd
+ git clone -b v0.4.1 --depth=1 https://github.com/gbdev/rgbds
+ sudo make -C rgbds install
+ rm -rf rgbds
+ )
before_script:
- |-
function check_status() {
@@ -19,6 +19,10 @@ before_script:
fi;
}
script:
- - make -j2
- - make compare
+ - make DEBUG=1 -j2 compare
- check_status
+after_success:
+ - |-
+ if [ "$TRAVIS_BRANCH" = master -a "$TRAVIS_PULL_REQUEST" = false -a "$TRAVIS_OS_NAME" = linux ]; then
+ ./.travis/webhook.sh
+ fi
diff --git a/.travis/webhook.sh b/.travis/webhook.sh
new file mode 100755
index 00000000..c19a321b
--- /dev/null
+++ b/.travis/webhook.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+
+root="$(readlink -e "$(dirname "$0")/..")"
+
+# Report unnamed symbols
+content="$("$root/tools/unnamed.py" -r "$root" "$root/pokeyellow.sym" | head)"
+
+curl -H 'Content-Type: application/json' -X POST "$POKERED_DISCORD_WEBHOOK_URL" -d@- << EOF
+{
+ "username": "$POKERED_DISCORD_WEBHOOK_USERNAME",
+ "avatar_url": "$POKERED_DISCORD_WEBHOOK_AVATAR_URL",
+ "content": "\`\`\`$(echo "$content" | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')\`\`\`"
+}
+EOF
diff --git a/INSTALL.md b/INSTALL.md
index 713f5fe8..f640e31e 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,56 +1,155 @@
-# Linux
+# Instructions
- sudo apt-get install make git gcc python
+These instructions explain how to set up the tools required to build **pokeyellow**, including [**rgbds**](https://github.com/gbdev/rgbds), which assembles the source files into a ROM.
- sudo apt-get install byacc flex pkg-config libpng-dev
- git clone https://github.com/rednex/rgbds
- cd rgbds
- sudo make install
- cd ..
+If you run into trouble, ask for help on IRC or Discord (see [README.md](README.md)).
- git clone https://github.com/pret/pokeyellow
- cd pokeyellow
-To build **pokeyellow.gbc**:
+## Windows 10
- make
+Download and install [**Windows Subsystem for Linux**](https://docs.microsoft.com/en-us/windows/wsl/install-win10). Then open the **WSL terminal**.
+Update WSL's software before continuing. If you chose Debian, Ubuntu, or another distribution that uses `apt-get`, then enter this command:
-# Mac
+```bash
+apt-get update && apt-get upgrade
+```
-Get [**Homebrew**](http://brew.sh/).
+WSL has its own file system that's not accessible from Windows, but Windows files *are* accessible from WSL. So you're going to want to install pokeyellow within Windows. You'll have to change the **current working directory** every time you open WSL.
-Then in **Terminal**, run:
+For example, if you want to store pokeyellow in **C:\Users\\*\<user>*\Desktop**, enter this command:
- xcode-select --install
- brew install rgbds
+```bash
+cd /mnt/c/Users/<user>/Desktop
+```
- git clone https://github.com/pret/pokeyellow
- cd pokeyellow
+(The Windows `C:\` drive is called `/mnt/c/` in WSL. Replace *\<user>* in the example path with your username.)
-To build **pokeyellow.gbc**:
+If this works, then follow [the instructions for **Linux**](#linux) below for whatever distribution you installed for WSL.
- make
+Otherwise, continue reading below for [the older Windows instructions](#windows).
-# Windows
+## Windows
Download [**Cygwin**](http://cygwin.com/install.html): **setup-x86_64.exe** for 64-bit Windows, **setup-x86.exe** for 32-bit.
-Run setup and leave the default settings. At "Select Packages", choose to install the following:
+Run setup and leave the default settings. At the "**Select Packages**" step, choose to install the following, all of which are in the "**Devel**" category:
- `make`
- `git`
- `gcc-core`
- `python`
-Then download [**rgbds**](https://github.com/rednex/rgbds/releases/): the latest **win64.tar.gz** or **win32.tar.gz** release. Extract it and put all the `exe` and `dll` files individually in **C:\cygwin64\usr\local\bin**.
+Double click on the text that says "**Skip**" next to each package to select the most recent version to install.
+
+Then follow the [**rgbds** install instructions](https://rgbds.gbdev.io/install/windows) for Windows with Cygwin to install **rgbds 0.4.1**.
+
+**Note:** If you already have an older rgbds, you will need to update to 0.4.1. Ignore this if you have never installed rgbds before. If a version newer than 0.4.1 does not work, try downloading 0.4.1.
+
+Now open the **Cygwin terminal** and enter the following commands.
+
+Cygwin has its own file system that's within Windows, at **C:\cygwin64\home\\*\<user>***. If you don't want to store pokeyellow there, you'll have to change the **current working directory** every time you open Cygwin.
+
+For example, if you want to store pokeyellow in **C:\Users\\*\<user>*\Desktop**:
+
+```bash
+cd /cygdrive/c/Users/<user>/Desktop
+```
+
+(The Windows `C:\` drive is called `/cygdrive/c/` in Cygwin. Replace *\<user>* in the example path with your username.)
+
+Now you're ready to [build **pokeyellow**](#build-pokeyellow).
+
+
+## macOS
+
+Install [**Homebrew**](https://brew.sh/). Follow the official instructions.
+
+Open **Terminal** and prepare to enter commands.
+
+Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/macos) for macOS to install **rgbds 0.4.1**.
+
+Now you're ready to [build **pokeyellow**](#build-pokeyellow).
+
+
+## Linux
+
+Open **Terminal** and enter the following commands, depending on which distro you're using.
+
+### Debian or Ubuntu
+
+To install the software required for **pokeyellow**:
+
+```bash
+sudo apt-get install make gcc git
+```
+
+Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.1** from source.
+
+### OpenSUSE
+
+To install the software required for **pokeyellow**:
+
+```bash
+sudo zypper install make gcc git
+```
+
+Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.1** from source.
+
+### Arch Linux
+
+To install the software required for **pokeyellow**:
+
+```bash
+sudo pacman -S make gcc git
+```
+
+Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/arch) for Arch Linux to install **rgbds 0.4.1**.
+
+If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.1** from source.
+
+### Termux
+
+To install the software required for **pokeyellow**:
+
+```bash
+sudo apt install make clang git sed
+```
+
+To install **rgbds**:
+
+```bash
+sudo apt install rgbds
+```
+
+If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.1** from source.
+
+### Other distros
+
+If your distro is not listed here, try to find the required software in its repositories:
+
+- `make`
+- `gcc` (or `clang`)
+- `git`
+- `rgbds`
+
+If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.1** from source.
+
+Now you're ready to [build **pokeyellow**](#build-pokeyellow).
+
+
+## Build pokeyellow
-In the **Cygwin terminal**, enter these commands:
+To download the **pokeyellow** source files:
- git clone https://github.com/pret/pokeyellow
- cd pokeyellow
+```bash
+git clone https://github.com/pret/pokeyellow
+cd pokeyellow
+```
To build **pokeyellow.gbc**:
- make
+```bash
+make
+```
diff --git a/Makefile b/Makefile
index 27363d87..a5366069 100644
--- a/Makefile
+++ b/Makefile
@@ -3,12 +3,25 @@ pcm := $(PYTHON) tools/pokemontools/pcm.py pcm
rom := pokeyellow.gbc
-objs := audio.o main.o text.o wram.o
+rom_obj := \
+audio.o \
+home.o \
+main.o \
+maps.o \
+text.o \
+wram.o \
+gfx/pics.o \
+gfx/sprites.o \
+gfx/tilesets.o
### Build tools
-MD5 := md5sum -c
+ifeq (,$(shell which sha1sum))
+SHA1 := shasum
+else
+SHA1 := sha1sum
+endif
RGBDS ?=
RGBASM ?= $(RGBDS)rgbasm
@@ -28,53 +41,75 @@ RGBLINK ?= $(RGBDS)rgblink
all: $(rom)
yellow: $(rom)
-# For contributors to make sure a change didn't affect the contents of the rom.
-compare: $(rom)
- @$(MD5) roms.md5
-
-clean:
- rm -f $(rom) $(objs) $(rom:.gbc=.sym)
- find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' -o -iname '*.pcm' \) -exec rm {} +
- $(MAKE) clean -C tools/
+clean: tidy
+ find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' -o -iname '*.pcm' \) -delete
tidy:
- rm -f $(rom) $(objs) $(rom:.gbc=.sym)
+ rm -f $(rom) $(rom_obj) $(rom:.gbc=.map) $(rom:.gbc=.sym) rgbdscheck.o
$(MAKE) clean -C tools/
+compare: $(rom)
+ @$(SHA1) -c roms.sha1
+
tools:
$(MAKE) -C tools/
+RGBASMFLAGS = -h -L -Weverything
+# Create a sym/map for debug purposes if `make` run with `DEBUG=1`
+ifeq ($(DEBUG),1)
+RGBASMFLAGS += -E
+endif
+
+rgbdscheck.o: rgbdscheck.asm
+ $(RGBASM) -o $@ $<
+
+# The dep rules have to be explicit or else missing files won't be reported.
+# As a side effect, they're evaluated immediately instead of when the rule is invoked.
+# It doesn't look like $(shell) can be deferred so there might not be a better way.
+define DEP
+$1: $2 $$(shell tools/scan_includes $2) | rgbdscheck.o
+ $$(RGBASM) $$(RGBASMFLAGS) -o $$@ $$<
+endef
+
# Build tools when building the rom.
# This has to happen before the rules are processed, since that's when scan_includes is run.
-ifeq (,$(filter clean tools,$(MAKECMDGOALS)))
+ifeq (,$(filter clean tidy tools,$(MAKECMDGOALS)))
+
$(info $(shell $(MAKE) -C tools))
+
+# Dependencies for objects
+$(foreach obj, $(rom_obj), $(eval $(call DEP,$(obj),$(obj:.o=.asm))))
+
endif
%.asm: ;
-%.o: dep = $(shell tools/scan_includes $(@D)/$*.asm)
-$(objs): %.o: %.asm $$(dep)
- $(RGBASM) -h -o $@ $*.asm
-
opts = -cjsv -k 01 -l 0x33 -m 0x1b -p 0 -r 03 -t "POKEMON YELLOW"
-$(rom): $(objs)
- $(RGBLINK) -n pokeyellow.sym -l pokeyellow.link -o $@ $^
+$(rom): $(rom_obj) layout.link
+ $(RGBLINK) -m $(rom:.gbc=.map) -n $(rom:.gbc=.sym) -l layout.link -o $@ $(filter %.o,$^)
$(RGBFIX) $(opts) $@
- sort $(rom:.gbc=.sym) -o $(rom:.gbc=.sym)
### Misc file-specific graphics rules
-gfx/game_boy.2bpp: tools/gfx += --remove-duplicates
-gfx/theend.2bpp: tools/gfx += --interleave --png=$<
+gfx/battle/attack_anim_1.2bpp: tools/gfx += --trim-whitespace
+gfx/battle/attack_anim_2.2bpp: tools/gfx += --trim-whitespace
+
+gfx/credits/the_end.2bpp: tools/gfx += --interleave --png=$<
+
+gfx/slots/slots_1.2bpp: tools/gfx += --trim-whitespace
+
gfx/tilesets/%.2bpp: tools/gfx += --trim-whitespace
-gfx/pokemon_yellow.2bpp: tools/gfx += --trim-whitespace
+gfx/tilesets/reds_house.2bpp: tools/gfx += --preserve=0x48
+
+gfx/trade/game_boy.2bpp: tools/gfx += --remove-duplicates
+
+gfx/sgb/border.2bpp: tools/gfx += --trim-whitespace
gfx/surfing_pikachu_1c.2bpp: tools/gfx += --trim-whitespace
gfx/surfing_pikachu_3.2bpp: tools/gfx += --trim-whitespace
-gfx/surfing_pikachu_1.2bpp: tools/gfx += --trim-whitespace
### Catch-all graphics rules
@@ -87,11 +122,11 @@ gfx/surfing_pikachu_1.2bpp: tools/gfx += --trim-whitespace
tools/gfx $(tools/gfx) -o $@ $@)
%.1bpp: %.png
- $(RGBGFX) -d1 $(rgbgfx) -o $@ $<
+ $(RGBGFX) $(rgbgfx) -d1 -o $@ $<
$(if $(tools/gfx),\
tools/gfx $(tools/gfx) -d1 -o $@ $@)
-%.pic: %.2bpp
+%.pic: %.2bpp
tools/pkmncompress $< $@
diff --git a/README.md b/README.md
index 0d2cb2d7..dbcc27ab 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,29 @@
-# Pokémon Yellow
+# Pokémon Yellow [![Build Status][travis-badge]][travis]
This is a disassembly of Pokémon Yellow.
-It builds the following rom:
+It builds the following ROM:
-* Pokemon Yellow (UE) [C][!].gbc `md5: d9290db87b1f0a23b89f99ee4469e34b`
+- Pokemon Yellow (UE) [C][!].gbc `sha1: cc7d03262ebfaf2f06772c1a480c7d9d5f4a38e1`
To set up the repository, see [**INSTALL.md**](INSTALL.md).
## See also
-* Disassembly of [**Pokémon Red/Blue**][pokered]
-* Disassembly of [**Pokémon Gold**][pokegold]
-* Disassembly of [**Pokémon Crystal**][pokecrystal]
-* Disassembly of [**Pokémon Pinball**][pokepinball]
-* Disassembly of [**Pokémon TCG**][poketcg]
-* Disassembly of [**Pokémon Ruby**][pokeruby]
-* Disassembly of [**Pokémon Fire Red**][pokefirered]
-* Disassembly of [**Pokémon Emerald**][pokeemerald]
-* Discord: [**pret**][Discord]
-* irc: **irc.freenode.net** [**#pret**][irc]
+- **Discord:** [pret][discord]
+- **IRC:** [freenode#pret][irc]
+
+Other disassembly projects:
+
+- [**Pokémon Red/Blue**][pokered]
+- [**Pokémon Gold/Silver**][pokegold]
+- [**Pokémon Crystal**][pokecrystal]
+- [**Pokémon Pinball**][pokepinball]
+- [**Pokémon TCG**][poketcg]
+- [**Pokémon Ruby**][pokeruby]
+- [**Pokémon FireRed**][pokefirered]
+- [**Pokémon Emerald**][pokeemerald]
[pokered]: https://github.com/pret/pokered
[pokegold]: https://github.com/pret/pokegold
@@ -30,5 +33,7 @@ To set up the repository, see [**INSTALL.md**](INSTALL.md).
[pokeruby]: https://github.com/pret/pokeruby
[pokefirered]: https://github.com/pret/pokefirered
[pokeemerald]: https://github.com/pret/pokeemerald
-[Discord]: https://discord.gg/d5dubZ3
+[discord]: https://discord.gg/d5dubZ3
[irc]: https://kiwiirc.com/client/irc.freenode.net/?#pret
+[travis]: https://travis-ci.org/pret/pokeyellow
+[travis-badge]: https://travis-ci.org/pret/pokeyellow.svg?branch=master
diff --git a/audio.asm b/audio.asm
index cff600d2..737e9f70 100644
--- a/audio.asm
+++ b/audio.asm
@@ -1,33 +1,33 @@
INCLUDE "constants.asm"
-SECTION "Sound Effect Headers 1", ROMX ; BANK $02
+SECTION "Sound Effect Headers 1", ROMX
INCLUDE "audio/headers/sfxheaders1.asm"
-SECTION "Sound Effect Headers 2", ROMX ; BANK $08
+SECTION "Sound Effect Headers 2", ROMX
INCLUDE "audio/headers/sfxheaders2.asm"
-SECTION "Sound Effect Headers 3", ROMX ; BANK $1f
+SECTION "Sound Effect Headers 3", ROMX
INCLUDE "audio/headers/sfxheaders3.asm"
-SECTION "Sound Effect Headers 4", ROMX ; BANK $20
+SECTION "Sound Effect Headers 4", ROMX
INCLUDE "audio/headers/sfxheaders4.asm"
-SECTION "Music Headers 1", ROMX ; BANK $02
+SECTION "Music Headers 1", ROMX
INCLUDE "audio/headers/musicheaders1.asm"
-SECTION "Music Headers 2", ROMX ; BANK $08
+SECTION "Music Headers 2", ROMX
INCLUDE "audio/headers/musicheaders2.asm"
-SECTION "Music Headers 3", ROMX ; BANK $1f
+SECTION "Music Headers 3", ROMX
INCLUDE "audio/headers/musicheaders3.asm"
-SECTION "Music Headers 4", ROMX ; BANK $20
+SECTION "Music Headers 4", ROMX
INCLUDE "audio/headers/musicheaders4.asm"
-SECTION "Sound Effects 1", ROMX ; BANK $02
+SECTION "Sound Effects 1", ROMX
INCLUDE "audio/sfx/noise_instrument01_1.asm"
INCLUDE "audio/sfx/noise_instrument02_1.asm"
@@ -49,8 +49,6 @@ INCLUDE "audio/sfx/noise_instrument17_1.asm"
INCLUDE "audio/sfx/noise_instrument18_1.asm"
INCLUDE "audio/sfx/noise_instrument19_1.asm"
-; Audio1_WavePointers: INCLUDE "audio/wave_instruments.asm"
-
INCLUDE "audio/sfx/start_menu_1.asm"
INCLUDE "audio/sfx/pokeflute.asm"
INCLUDE "audio/sfx/cut_1.asm"
@@ -126,7 +124,7 @@ INCLUDE "audio/sfx/cry21_1.asm"
INCLUDE "audio/sfx/cry22_1.asm"
-SECTION "Sound Effects 2", ROMX ; BANK $08
+SECTION "Sound Effects 2", ROMX
INCLUDE "audio/sfx/noise_instrument01_2.asm"
INCLUDE "audio/sfx/noise_instrument02_2.asm"
@@ -148,8 +146,6 @@ INCLUDE "audio/sfx/noise_instrument17_2.asm"
INCLUDE "audio/sfx/noise_instrument18_2.asm"
INCLUDE "audio/sfx/noise_instrument19_2.asm"
-; Audio2_WavePointers: INCLUDE "audio/wave_instruments.asm"
-
INCLUDE "audio/sfx/press_ab_2.asm"
INCLUDE "audio/sfx/start_menu_2.asm"
INCLUDE "audio/sfx/tink_2.asm"
@@ -252,7 +248,7 @@ INCLUDE "audio/sfx/cry21_2.asm"
INCLUDE "audio/sfx/cry22_2.asm"
-SECTION "Sound Effects 3", ROMX ; BANK $1f
+SECTION "Sound Effects 3", ROMX
INCLUDE "audio/sfx/noise_instrument01_3.asm"
INCLUDE "audio/sfx/noise_instrument02_3.asm"
@@ -274,8 +270,6 @@ INCLUDE "audio/sfx/noise_instrument17_3.asm"
INCLUDE "audio/sfx/noise_instrument18_3.asm"
INCLUDE "audio/sfx/noise_instrument19_3.asm"
-; Audio3_WavePointers: INCLUDE "audio/wave_instruments.asm"
-
INCLUDE "audio/sfx/start_menu_3.asm"
INCLUDE "audio/sfx/cut_3.asm"
INCLUDE "audio/sfx/go_inside_3.asm"
@@ -359,7 +353,7 @@ INCLUDE "audio/sfx/cry21_3.asm"
INCLUDE "audio/sfx/cry22_3.asm"
-SECTION "Sound Effects 4", ROMX ; BANK $20
+SECTION "Sound Effects 4", ROMX
INCLUDE "audio/sfx/noise_instrument01_4.asm"
INCLUDE "audio/sfx/noise_instrument02_4.asm"
@@ -437,230 +431,36 @@ INCLUDE "audio/sfx/get_item1_4_2.asm"
INCLUDE "audio/sfx/get_item2_4.asm"
-SECTION "Audio Engine 1", ROMX ; BANK $02
+SECTION "Audio Engine 1", ROMX
AudioEngine1::
-PlayBattleMusic::
- xor a
- ld [wAudioFadeOutControl], a
- ld [wLowHealthAlarm], a
- call StopAllMusic
- call DelayFrame
- ld c, BANK(Music_GymLeaderBattle)
- ld a, [wGymLeaderNo]
- and a
- jr z, .notGymLeaderBattle
- ld a, MUSIC_GYM_LEADER_BATTLE
- jr .playSong
-.notGymLeaderBattle
- ld a, [wCurOpponent]
- cp OPP_ID_OFFSET
- jr c, .wildBattle
- cp OPP_SONY3
- jr z, .finalBattle
- cp OPP_LANCE
- jr nz, .normalTrainerBattle
- ld a, MUSIC_GYM_LEADER_BATTLE ; lance also plays gym leader theme
- jr .playSong
-.normalTrainerBattle
- ld a, MUSIC_TRAINER_BATTLE
- jr .playSong
-.finalBattle
- ld a, MUSIC_FINAL_BATTLE
- jr .playSong
-.wildBattle
- ld a, MUSIC_WILD_BATTLE
-.playSong
- jp PlayMusic
+INCLUDE "audio/play_battle_music.asm"
+INCLUDE "audio/engine_1.asm"
+INCLUDE "audio/alternate_tempo.asm"
+
+SECTION "Low Health Alarm (Audio Engine 2)", ROMX
-INCLUDE "audio/engine_1.asm"
+INCLUDE "audio/low_health_alarm.asm"
-; an alternate start for MeetRival which has a different first measure
-Music_RivalAlternateStart::
- ld c, BANK(Music_MeetRival)
- ld a, MUSIC_MEET_RIVAL
- call PlayMusic
- ld hl, wChannelCommandPointers
- ld de, Music_MeetRival_branch_b1a2
- call Audio1_OverwriteChannelPointer
- ld de, Music_MeetRival_branch_b21d
- call Audio1_OverwriteChannelPointer
- ld de, Music_MeetRival_branch_b2b5
-
-Audio1_OverwriteChannelPointer:
- ld a, e
- ld [hli], a
- ld a, d
- ld [hli], a
- ret
-
-; an alternate tempo for MeetRival which is slightly slower
-Music_RivalAlternateTempo::
- ld c, BANK(Music_MeetRival)
- ld a, MUSIC_MEET_RIVAL
- call PlayMusic
- ld de, Music_MeetRival_branch_b119
- jr asm_99ed
-
-; applies both the alternate start and alternate tempo
-Music_RivalAlternateStartAndTempo::
- call Music_RivalAlternateStart
- ld de, Music_MeetRival_branch_b19b
-asm_99ed:
- ld hl, wChannelCommandPointers
- jp Audio1_OverwriteChannelPointer
-
-; XXX
- ret
-
-; an alternate tempo for Cities1 which is used for the Hall of Fame room
-Music_Cities1AlternateTempo::
- 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 ; wait for the fade-out to finish
- ld c, BANK(Music_Cities1)
- ld a, MUSIC_CITIES1
- call PlayMusic
- ld hl, wChannelCommandPointers
- ld de, Music_Cities1_branch_aa6f
- jp Audio1_OverwriteChannelPointer
-
-
-SECTION "Audio Engine 2", ROMX ; BANK $08
+SECTION "Audio Engine 2", ROMX
AudioEngine2::
-Music_DoLowHealthAlarm::
- ld a, [wLowHealthAlarm]
- cp $ff
- jr z, .disableAlarm
-
- bit 7, a ;alarm enabled?
- ret z ;nope
-
- and $7f ;low 7 bits are the timer.
- jr nz, .asm_21383 ;if timer > 0, play low tone.
-
- call .playToneHi
- ld a, 30 ;keep this tone for 30 frames.
- jr .asm_21395 ;reset the timer.
-
-.asm_21383
- cp 20
- jr nz, .asm_2138a ;if timer == 20,
- call .playToneLo ;actually set the sound registers.
-
-.asm_2138a
- ld a, $86
- ld [wChannelSoundIDs + Ch5], a ;disable sound channel?
- ld a, [wLowHealthAlarm]
- and $7f ;decrement alarm timer.
- dec a
-
-.asm_21395
- ; reset the timer and enable flag.
- set 7, a
- ld [wLowHealthAlarm], a
- ret
-
-.disableAlarm
- xor a
- ld [wLowHealthAlarm], a ;disable alarm
- ld [wChannelSoundIDs + Ch5], a ;re-enable sound channel?
- ld de, .toneDataSilence
- jr .playTone
-
-;update the sound registers to change the frequency.
-;the tone set here stays until we change it.
-.playToneHi
- ld de, .toneDataHi
- jr .playTone
-
-.playToneLo
- ld de, .toneDataLo
-
-;update sound channel 1 to play the alarm, overriding all other sounds.
-.playTone
- ld hl, rNR10 ;channel 1 sound register
- ld c, $5
- xor a
-
-.copyLoop
- ld [hli], a
- ld a, [de]
- inc de
- dec c
- jr nz, .copyLoop
- ret
-
-;bytes to write to sound channel 1 registers for health alarm.
-;starting at FF11 (FF10 is always zeroed), so these bytes are:
-;length, envelope, freq lo, freq hi
-.toneDataHi
- db $A0,$E2,$50,$87
-
-.toneDataLo
- db $B0,$E2,$EE,$86
-
-;written to stop the alarm
-.toneDataSilence
- db $00,$00,$00,$80
-
-INCLUDE "engine/menu/bills_pc.asm"
-
INCLUDE "audio/engine_2.asm"
-SECTION "Audio Engine 3", ROMX ; BANK $1f
+SECTION "Audio Engine 3", ROMX
AudioEngine3::
-PlayPokedexRatingSfx::
- ld a, [$ffdc]
- ld c, $0
- ld hl, OwnedMonValues
-.getSfxPointer
- cp [hl]
- jr c, .gotSfxPointer
- inc c
- inc hl
- jr .getSfxPointer
-.gotSfxPointer
- push bc
- call StopAllMusic
- pop bc
- ld b, $0
- ld hl, PokedexRatingSfxPointers
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld c, [hl]
- call PlayMusic
- jp PlayDefaultMusic
-
-PokedexRatingSfxPointers:
- db SFX_DENIED, BANK(SFX_Denied_3)
- db SFX_POKEDEX_RATING, BANK(SFX_Pokedex_Rating_1)
- db SFX_GET_ITEM_1, BANK(SFX_Get_Item1_1)
- db SFX_CAUGHT_MON, BANK(SFX_Caught_Mon)
- db SFX_LEVEL_UP, BANK(SFX_Level_Up)
- db SFX_GET_KEY_ITEM, BANK(SFX_Get_Key_Item_1)
- db SFX_GET_ITEM_2, BANK(SFX_Get_Item2_1)
-
-OwnedMonValues:
- db 10, 40, 60, 90, 120, 150, $ff
-
+INCLUDE "audio/pokedex_rating_sfx.asm"
INCLUDE "audio/engine_3.asm"
-SECTION "Audio Engine 4", ROMX ; BANK $20
+SECTION "Audio Engine 4", ROMX
SurfingPikachu1Graphics1:: INCBIN "gfx/surfing_pikachu_1a.2bpp"
SurfingPikachu1Graphics2:: INCBIN "gfx/surfing_pikachu_1b.2bpp"
@@ -669,7 +469,7 @@ SurfingPikachu1Graphics3:: INCBIN "gfx/surfing_pikachu_1c.2bpp"
INCLUDE "audio/engine_4.asm"
-SECTION "Music 1", ROMX ; BANK $02
+SECTION "Music 1", ROMX
Audio1_WavePointers: INCLUDE "audio/wave_instruments.asm"
@@ -700,7 +500,7 @@ INCLUDE "audio/music/gym.asm"
INCLUDE "audio/music/pokecenter.asm"
-SECTION "Music 2", ROMX ; BANK $08
+SECTION "Music 2", ROMX
INCLUDE "audio/sfx/unused2_2.asm"
INCLUDE "audio/music/gymleaderbattle.asm"
@@ -715,7 +515,7 @@ INCLUDE "audio/music/defeatedwildmon.asm"
INCLUDE "audio/music/defeatedgymleader.asm"
-SECTION "Music 3", ROMX ; BANK $1f
+SECTION "Music 3", ROMX
INCLUDE "audio/music/bikeriding.asm"
INCLUDE "audio/music/dungeon1.asm"
@@ -742,7 +542,7 @@ INCLUDE "audio/music/credits.asm"
INCLUDE "audio/music/yellowintro.asm"
-SECTION "Music 4", ROMX ; BANK $20
+SECTION "Music 4", ROMX
INCLUDE "audio/music/surfingpikachu.asm"
INCLUDE "audio/music/yellowunusedsong.asm"
diff --git a/audio/alternate_tempo.asm b/audio/alternate_tempo.asm
new file mode 100644
index 00000000..87d08e18
--- /dev/null
+++ b/audio/alternate_tempo.asm
@@ -0,0 +1,53 @@
+; an alternate start for MeetRival which has a different first measure
+Music_RivalAlternateStart::
+ ld c, BANK(Music_MeetRival)
+ ld a, MUSIC_MEET_RIVAL
+ call PlayMusic
+ ld hl, wChannelCommandPointers
+ ld de, Music_MeetRival_branch_b1a2
+ call Audio1_OverwriteChannelPointer
+ ld de, Music_MeetRival_branch_b21d
+ call Audio1_OverwriteChannelPointer
+ ld de, Music_MeetRival_branch_b2b5
+
+Audio1_OverwriteChannelPointer:
+ ld a, e
+ ld [hli], a
+ ld a, d
+ ld [hli], a
+ ret
+
+; an alternate tempo for MeetRival which is slightly slower
+Music_RivalAlternateTempo::
+ ld c, BANK(Music_MeetRival)
+ ld a, MUSIC_MEET_RIVAL
+ call PlayMusic
+ ld de, Music_MeetRival_branch_b119
+ jr asm_99ed
+
+; applies both the alternate start and alternate tempo
+Music_RivalAlternateStartAndTempo::
+ call Music_RivalAlternateStart
+ ld de, Music_MeetRival_branch_b19b
+asm_99ed:
+ ld hl, wChannelCommandPointers
+ jp Audio1_OverwriteChannelPointer
+
+; XXX
+ ret
+
+; an alternate tempo for Cities1 which is used for the Hall of Fame room
+Music_Cities1AlternateTempo::
+ 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 ; wait for the fade-out to finish
+ ld c, BANK(Music_Cities1)
+ ld a, MUSIC_CITIES1
+ call PlayMusic
+ ld hl, wChannelCommandPointers
+ ld de, Music_Cities1_branch_aa6f
+ jp Audio1_OverwriteChannelPointer
diff --git a/audio/engine_1.asm b/audio/engine_1.asm
index bd021ab3..a585cd43 100644
--- a/audio/engine_1.asm
+++ b/audio/engine_1.asm
@@ -20,10 +20,10 @@ Audio1_UpdateMusic::
set 7, a
ld [wMuteAudioAndPauseMusic], a
xor a ; disable all channels' output
- ld [rNR51], a
- ld [rNR30], a
+ ldh [rNR51], a
+ ldh [rNR30], a
ld a, $80
- ld [rNR30], a
+ ldh [rNR30], a
jr .nextChannel
.applyAffects
call Audio1_ApplyMusicAffects
@@ -41,7 +41,7 @@ Audio1_ApplyMusicAffects:
ld hl, wChannelNoteDelayCounters ; delay until next note
add hl, bc
ld a, [hl]
- cp $1 ; if the delay is 1, play next note
+ cp 1 ; if the delay is 1, play next note
jp z, Audio1_PlayNextNote
dec a ; otherwise, decrease the delay timer
ld [hl], a
@@ -172,8 +172,8 @@ Audio1_PlayNextNote:
Audio1_sound_ret:
call Audio1_GetNextMusicByte
ld d, a
- cp $ff ; is this command a sound_ret?
- jp nz, Audio1_sound_call ; no
+ cp sound_ret_cmd
+ jp nz, Audio1_sound_call
ld b, 0
ld hl, wChannelFlags1
add hl, bc
@@ -192,9 +192,9 @@ Audio1_sound_ret:
jr nz, .skipSfxChannel3
; restart hardware channel 3 (wave channel) output
ld a, $0
- ld [rNR30], a
+ ldh [rNR30], a
ld a, $80
- ld [rNR30], a
+ ldh [rNR30], a
.skipSfxChannel3
jr nz, .dontDisable
ld a, [wDisableChannelOutputWhenSfxEnds]
@@ -228,9 +228,9 @@ Audio1_sound_ret:
.disableChannelOutput
ld hl, Audio1_HWChannelDisableMasks
add hl, bc
- ld a, [rNR51]
+ ldh a, [rNR51]
and [hl]
- ld [rNR51], a
+ ldh [rNR51], a
.afterDisable
ld a, [wChannelSoundIDs + Ch5]
cp CRY_SFX_START
@@ -250,7 +250,7 @@ Audio1_sound_ret:
ret c
.skipRewind
ld a, [wSavedVolume]
- ld [rNR50], a
+ ldh [rNR50], a
xor a
ld [wSavedVolume], a
.skipCry
@@ -260,8 +260,8 @@ Audio1_sound_ret:
ret
Audio1_sound_call:
- cp $fd ; is this command a sound_call?
- jp nz, Audio1_sound_loop ; no
+ cp sound_call_cmd
+ jp nz, Audio1_sound_loop
call Audio1_GetNextMusicByte
push af
call Audio1_GetNextMusicByte
@@ -297,8 +297,8 @@ Audio1_sound_call:
jp Audio1_sound_ret
Audio1_sound_loop:
- cp $fe ; is this command a sound_loop?
- jp nz, Audio1_note_type ; no
+ cp sound_loop_cmd
+ jp nz, Audio1_note_type
call Audio1_GetNextMusicByte
ld e, a
and a
@@ -336,8 +336,8 @@ Audio1_sound_loop:
Audio1_note_type:
and $f0
- cp $d0 ; is this command a note_type?
- jp nz, Audio1_toggle_perfect_pitch ; no
+ cp note_type_cmd
+ jp nz, Audio1_toggle_perfect_pitch
ld a, d
and $f
ld b, $0
@@ -380,8 +380,8 @@ Audio1_note_type:
Audio1_toggle_perfect_pitch:
ld a, d
- cp $e8 ; is this command a toggle_perfect_pitch?
- jr nz, Audio1_vibrato ; no
+ cp toggle_perfect_pitch_cmd
+ jr nz, Audio1_vibrato
ld b, 0
ld hl, wChannelFlags1
add hl, bc
@@ -391,8 +391,8 @@ Audio1_toggle_perfect_pitch:
jp Audio1_sound_ret
Audio1_vibrato:
- cp $ea ; is this command a vibrato?
- jr nz, Audio1_pitch_slide ; no
+ cp vibrato_cmd
+ jr nz, Audio1_pitch_slide
call Audio1_GetNextMusicByte
ld b, 0
ld hl, wChannelVibratoDelayCounters
@@ -439,8 +439,8 @@ Audio1_vibrato:
jp Audio1_sound_ret
Audio1_pitch_slide:
- cp $eb ; is this command a pitch_slide?
- jr nz, Audio1_duty_cycle ; no
+ cp pitch_slide_cmd
+ jr nz, Audio1_duty_cycle
call Audio1_GetNextMusicByte
ld b, 0
ld hl, wChannelPitchSlideLengthModifiers
@@ -470,8 +470,8 @@ Audio1_pitch_slide:
jp Audio1_note_length
Audio1_duty_cycle:
- cp $ec ; is this command a duty_cycle?
- jr nz, Audio1_tempo ; no
+ cp duty_cycle_cmd
+ jr nz, Audio1_tempo
call Audio1_GetNextMusicByte
rrca
rrca
@@ -483,8 +483,8 @@ Audio1_duty_cycle:
jp Audio1_sound_ret
Audio1_tempo:
- cp $ed ; is this command a tempo?
- jr nz, Audio1_stereo_panning ; no
+ cp tempo_cmd
+ jr nz, Audio1_stereo_panning
ld a, c
cp Ch5
jr nc, .sfxChannel
@@ -512,16 +512,16 @@ Audio1_tempo:
jp Audio1_sound_ret
Audio1_stereo_panning:
- cp $ee ; is this command a stereo_panning?
- jr nz, Audio1_unknownmusic0xef ; no
+ cp stereo_panning_cmd
+ jr nz, Audio1_unknownmusic0xef
call Audio1_GetNextMusicByte
ld [wStereoPanning], a ; store panning
jp Audio1_sound_ret
; this appears to never be used
Audio1_unknownmusic0xef:
- cp $ef ; is this command an unknownmusic0xef?
- jr nz, Audio1_duty_cycle_pattern ; no
+ cp unknownmusic0xef_cmd
+ jr nz, Audio1_duty_cycle_pattern
call Audio1_GetNextMusicByte
push bc
ld b, a
@@ -538,8 +538,8 @@ Audio1_unknownmusic0xef:
jp Audio1_sound_ret
Audio1_duty_cycle_pattern:
- cp $fc ; is this command a duty_cycle_pattern?
- jr nz, Audio1_volume ; no
+ cp duty_cycle_pattern_cmd
+ jr nz, Audio1_volume
call Audio1_GetNextMusicByte
ld b, 0
ld hl, wChannelDutyCyclePatterns
@@ -555,15 +555,15 @@ Audio1_duty_cycle_pattern:
jp Audio1_sound_ret
Audio1_volume:
- cp $f0 ; is this command a volume?
- jr nz, Audio1_execute_music ; no
+ cp volume_cmd
+ jr nz, Audio1_execute_music
call Audio1_GetNextMusicByte
- ld [rNR50], a ; store volume
+ ldh [rNR50], a ; store volume
jp Audio1_sound_ret
Audio1_execute_music:
- cp $f8 ; is this command an execute_music?
- jr nz, Audio1_octave ; no
+ cp execute_music_cmd
+ jr nz, Audio1_octave
ld b, $0
ld hl, wChannelFlags2
add hl, bc
@@ -572,8 +572,8 @@ Audio1_execute_music:
Audio1_octave:
and $f0
- cp $e0 ; is this command an octave?
- jr nz, Audio1_sfx_note ; no
+ cp octave_cmd
+ jr nz, Audio1_sfx_note
ld hl, wChannelOctaves
ld b, 0
add hl, bc
@@ -584,7 +584,7 @@ Audio1_octave:
; sfx_note is either square_note or noise_note depending on the channel
Audio1_sfx_note:
- cp $20 ; is this command a sfx_note?
+ cp sfx_note_cmd
jr nz, Audio1_pitch_sweep
ld a, c
cp Ch4 ; is this a noise or sfx channel?
@@ -640,15 +640,15 @@ Audio1_pitch_sweep:
cp Ch5
jr c, Audio1_note ; if not a sfx
ld a, d
- cp $10 ; is this command a pitch_sweep?
- jr nz, Audio1_note ; no
+ cp pitch_sweep_cmd
+ jr nz, Audio1_note
ld b, $0
ld hl, wChannelFlags2
add hl, bc
bit BIT_EXECUTE_MUSIC, [hl]
jr nz, Audio1_note ; no
call Audio1_GetNextMusicByte
- ld [rNR10], a
+ ldh [rNR10], a
jp Audio1_sound_ret
Audio1_note:
@@ -657,12 +657,12 @@ Audio1_note:
jr nz, Audio1_note_length ; if not noise channel
ld a, d
and $f0
- cp $b0 ; is this command a drum_note?
+ cp drum_note_cmd
jr z, .drum_note
- jr nc, Audio1_note_length ; no
+ jr nc, Audio1_note_length
; this executes when on the noise channel and
- ; the command id is less than $b0
+ ; the command id is less than drum_note_cmd ($b0)
; in this case, the upper nybble is used as the noise instrument ($1-$a)
; and the lower nybble is the length minus 1 (0-15)
; however, this doesn't work for instrument #2 because the command id
@@ -758,7 +758,7 @@ Audio1_note_length:
Audio1_note_pitch:
pop af
and $f0
- cp $c0 ; compare to rest
+ cp rest_cmd
jr nz, .notRest
ld a, c
cp Ch5
@@ -780,9 +780,9 @@ Audio1_note_pitch:
ld b, 0
ld hl, Audio1_HWChannelDisableMasks
add hl, bc
- ld a, [rNR51]
+ ldh a, [rNR51]
and [hl]
- ld [rNR51], a ; disable hardware channel 3's output
+ ldh [rNR51], a ; disable hardware channel 3's output
jr .done
.notChannel3
ld b, REG_VOLUME_ENVELOPE
@@ -854,7 +854,7 @@ Audio1_EnableChannelOutput:
ld b, 0
call Audio1_9972
add hl, bc
- ld a, [rNR51]
+ ldh a, [rNR51]
or [hl] ; set this channel's bits
ld d, a
ld a, c
@@ -876,7 +876,7 @@ Audio1_EnableChannelOutput:
add hl, bc
and [hl]
ld d, a
- ld a, [rNR51]
+ ldh a, [rNR51]
ld hl, Audio1_HWChannelDisableMasks
add hl, bc
and [hl] ; reset this channel's output bits
@@ -884,7 +884,7 @@ Audio1_EnableChannelOutput:
ld d, a
.skip
ld a, d
- ld [rNR51], a
+ ldh [rNR51], a
ret
Audio1_ApplyDutyCycleAndSoundLength:
@@ -935,10 +935,10 @@ Audio1_ApplyWavePatternAndFrequency:
ld e, [hl]
inc hl
ld d, [hl]
- ld hl, $ff30 ; wave pattern RAM
+ ld hl, rWave_0
ld b, $f
ld a, $0 ; stop hardware channel 3
- ld [rNR30], a
+ ldh [rNR30], a
.loop
ld a, [de]
inc de
@@ -948,7 +948,7 @@ Audio1_ApplyWavePatternAndFrequency:
and a
jr nz, .loop
ld a, $80 ; start hardware channel 3
- ld [rNR30], a
+ ldh [rNR30], a
pop de
.notChannel3
ld a, d
@@ -1367,7 +1367,7 @@ Audio1_CalculateFrequency:
Audio1_PlaySound::
ld [wSoundID], a
ld a, [wSoundID]
- cp $ff
+ cp SFX_STOP_ALL_MUSIC
jp z, .stopAllAudio
cp MAX_SFX_ID_1
jp z, .playSfx
@@ -1544,10 +1544,10 @@ Audio1_PlaySound::
ld a, [wSavedVolume]
and a
jr nz, .done
- ld a, [rNR50]
+ ldh a, [rNR50]
ld [wSavedVolume], a
ld a, $77
- ld [rNR50], a ; full volume
+ ldh [rNR50], a ; full volume
.done
ret
@@ -1588,15 +1588,4 @@ Audio1_HWChannelEnableMasks:
db $01,$02,$40,$80
Audio1_Pitches:
- dw $F82C ; C_
- dw $F89D ; C#
- dw $F907 ; D_
- dw $F96B ; D#
- dw $F9CA ; E_
- dw $FA23 ; F_
- dw $FA77 ; F#
- dw $FAC7 ; G_
- dw $FB12 ; G#
- dw $FB58 ; A_
- dw $FB9B ; A#
- dw $FBDA ; B_
+INCLUDE "audio/notes.asm"
diff --git a/audio/engine_2.asm b/audio/engine_2.asm
index 5fe686a8..65c25c20 100644
--- a/audio/engine_2.asm
+++ b/audio/engine_2.asm
@@ -5,7 +5,7 @@
Audio2_PlaySound::
ld [wSoundID], a
ld a, [wSoundID]
- cp $ff
+ cp SFX_STOP_ALL_MUSIC
jp z, .stopAllAudio
cp MAX_SFX_ID_2
jp z, .playSfx
@@ -182,34 +182,17 @@ Audio2_PlaySound::
ld a, [wSavedVolume]
and a
jr nz, .done
- ld a, [rNR50]
+ ldh a, [rNR50]
ld [wSavedVolume], a
ld a, $77
- ld [rNR50], a
+ ldh [rNR50], a
.done
ret
Audio2_CryRet:
sound_ret
-Music_PokeFluteInBattle::
- ; begin playing the "caught mon" sound effect
- ld a, SFX_CAUGHT_MON
- call PlaySoundWaitForCurrent
- ; then immediately overwrtie the channel pointers
- ld hl, wChannelCommandPointers + Ch5 * 2
- ld de, SFX_Pokeflute_Ch5
- call Audio2_OverwriteChannelPointer
- ld de, SFX_Pokeflute_Ch6
- call Audio2_OverwriteChannelPointer
- ld de, SFX_Pokeflute_Ch7
-
-Audio2_OverwriteChannelPointer:
- ld a, e
- ld [hli], a
- ld a, d
- ld [hli], a
- ret
+INCLUDE "audio/poke_flute.asm"
INCLUDE "audio/sfx/pokeflute_ch5_ch6.asm"
@@ -220,12 +203,12 @@ Audio2_InitMusicVariables::
ld [wMusicTempo + 1], a
ld [wMusicWaveInstrument], a
ld [wSfxWaveInstrument], a
- ld d, $8
+ ld d, NUM_CHANNELS
ld hl, wChannelReturnAddresses
call Audio2_FillMem
ld hl, wChannelCommandPointers
call Audio2_FillMem
- ld d, $4
+ ld d, NUM_MUSIC_CHANS
ld hl, wChannelSoundIDs
call Audio2_FillMem
ld hl, wChannelFlags1
@@ -273,17 +256,17 @@ Audio2_InitMusicVariables::
ld a, $ff
ld [wStereoPanning], a
xor a
- ld [rNR50], a
+ ldh [rNR50], a
ld a, $8
- ld [rNR10], a
+ ldh [rNR10], a
ld a, 0
- ld [rNR51], a
+ ldh [rNR51], a
xor a
- ld [rNR30], a
+ ldh [rNR30], a
ld a, $80
- ld [rNR30], a
+ ldh [rNR30], a
ld a, $77
- ld [rNR50], a
+ ldh [rNR50], a
ret
Audio2_InitSFXVariables::
@@ -371,27 +354,27 @@ Audio2_InitSFXVariables::
cp Ch5
ret nz
ld a, $8
- ld [rNR10], a ; sweep off
+ ldh [rNR10], a ; sweep off
ret
Audio2_StopAllAudio::
ld a, $80
- ld [rNR52], a ; sound hardware on
- ld [rNR30], a ; wave playback on
+ ldh [rNR52], a ; sound hardware on
+ ldh [rNR30], a ; wave playback on
xor a
- ld [rNR51], a ; no sound output
- ld [rNR32], a ; mute channel 3 (wave channel)
+ ldh [rNR51], a ; no sound output
+ ldh [rNR32], a ; mute channel 3 (wave channel)
ld a, $8
- 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)
+ ldh [rNR10], a ; sweep off
+ ldh [rNR12], a ; mute channel 1 (pulse channel 1)
+ ldh [rNR22], a ; mute channel 2 (pulse channel 2)
+ ldh [rNR42], a ; mute channel 4 (noise channel)
ld a, $40
- ld [rNR14], a ; counter mode
- ld [rNR24], a
- ld [rNR44], a
+ ldh [rNR14], a ; counter mode
+ ldh [rNR24], a
+ ldh [rNR44], a
ld a, $77
- ld [rNR50], a ; full volume
+ ldh [rNR50], a ; full volume
xor a
ld [wUnusedC000], a
ld [wDisableChannelOutputWhenSfxEnds], a
@@ -414,7 +397,7 @@ Audio2_StopAllAudio::
ret
; fills d bytes at hl with a
-Audio2_FillMem
+Audio2_FillMem:
ld b, d
.loop
ld [hli], a
diff --git a/audio/engine_3.asm b/audio/engine_3.asm
index 2d4a30e3..10893868 100644
--- a/audio/engine_3.asm
+++ b/audio/engine_3.asm
@@ -3,7 +3,7 @@
Audio3_PlaySound::
ld [wSoundID], a
ld a, [wSoundID]
- cp $ff
+ cp SFX_STOP_ALL_MUSIC
jp z, .stopAllAudio
cp MAX_SFX_ID_3
jp z, .playSfx
@@ -180,10 +180,10 @@ Audio3_PlaySound::
ld a, [wSavedVolume]
and a
jr nz, .done
- ld a, [rNR50]
+ ldh a, [rNR50]
ld [wSavedVolume], a
ld a, $77
- ld [rNR50], a ; full volume
+ ldh [rNR50], a ; full volume
.done
ret
diff --git a/audio/engine_4.asm b/audio/engine_4.asm
index 2f0d9ade..850bb66a 100644
--- a/audio/engine_4.asm
+++ b/audio/engine_4.asm
@@ -180,10 +180,10 @@ Audio4_PlaySound::
ld a, [wSavedVolume]
and a
jr nz, .done
- ld a, [rNR50]
+ ldh a, [rNR50]
ld [wSavedVolume], a
ld a, $77
- ld [rNR50], a ; full volume
+ ldh [rNR50], a ; full volume
.done
ret
diff --git a/audio/low_health_alarm.asm b/audio/low_health_alarm.asm
new file mode 100644
index 00000000..a550cf70
--- /dev/null
+++ b/audio/low_health_alarm.asm
@@ -0,0 +1,80 @@
+Music_DoLowHealthAlarm::
+ ld a, [wLowHealthAlarm]
+ cp $ff
+ jr z, .disableAlarm
+
+ bit 7, a ;alarm enabled?
+ ret z ;nope
+
+ and $7f ;low 7 bits are the timer.
+ jr nz, .asm_21383 ;if timer > 0, play low tone.
+
+ call .playToneHi
+ ld a, 30 ;keep this tone for 30 frames.
+ jr .asm_21395 ;reset the timer.
+
+.asm_21383
+ cp 20
+ jr nz, .asm_2138a ;if timer == 20,
+ call .playToneLo ;actually set the sound registers.
+
+.asm_2138a
+ ld a, $86
+ ld [wChannelSoundIDs + Ch5], a ;disable sound channel?
+ ld a, [wLowHealthAlarm]
+ and $7f ;decrement alarm timer.
+ dec a
+
+.asm_21395
+ ; reset the timer and enable flag.
+ set 7, a
+ ld [wLowHealthAlarm], a
+ ret
+
+.disableAlarm
+ xor a
+ ld [wLowHealthAlarm], a ;disable alarm
+ ld [wChannelSoundIDs + Ch5], a ;re-enable sound channel?
+ ld de, .toneDataSilence
+ jr .playTone
+
+;update the sound registers to change the frequency.
+;the tone set here stays until we change it.
+.playToneHi
+ ld de, .toneDataHi
+ jr .playTone
+
+.playToneLo
+ ld de, .toneDataLo
+
+;update sound channel 1 to play the alarm, overriding all other sounds.
+.playTone
+ ld hl, rNR10 ;channel 1 sound register
+ ld c, $5
+ xor a
+
+.copyLoop
+ ld [hli], a
+ ld a, [de]
+ inc de
+ dec c
+ jr nz, .copyLoop
+ ret
+
+alarm_tone: MACRO
+ db \1 ; length
+ db \2 ; envelope
+ dw \3 ; frequency
+ENDM
+
+;bytes to write to sound channel 1 registers for health alarm.
+;starting at FF11 (FF10 is always zeroed).
+.toneDataHi
+ alarm_tone $A0, $E2, $8750
+
+.toneDataLo
+ alarm_tone $B0, $E2, $86EE
+
+;written to stop the alarm
+.toneDataSilence
+ alarm_tone $00, $00, $8000
diff --git a/audio/notes.asm b/audio/notes.asm
new file mode 100644
index 00000000..75e1a0b7
--- /dev/null
+++ b/audio/notes.asm
@@ -0,0 +1,14 @@
+; This file is INCLUDEd three times, once in each audio engine.
+
+ dw $F82C ; C_
+ dw $F89D ; C#
+ dw $F907 ; D_
+ dw $F96B ; D#
+ dw $F9CA ; E_
+ dw $FA23 ; F_
+ dw $FA77 ; F#
+ dw $FAC7 ; G_
+ dw $FB12 ; G#
+ dw $FB58 ; A_
+ dw $FB9B ; A#
+ dw $FBDA ; B_
diff --git a/audio/play_battle_music.asm b/audio/play_battle_music.asm
new file mode 100644
index 00000000..bf86c9ae
--- /dev/null
+++ b/audio/play_battle_music.asm
@@ -0,0 +1,32 @@
+PlayBattleMusic::
+ xor a
+ ld [wAudioFadeOutControl], a
+ ld [wLowHealthAlarm], a
+ call StopAllMusic
+ call DelayFrame
+ ld c, BANK(Music_GymLeaderBattle)
+ ld a, [wGymLeaderNo]
+ and a
+ jr z, .notGymLeaderBattle
+ ld a, MUSIC_GYM_LEADER_BATTLE
+ jr .playSong
+.notGymLeaderBattle
+ ld a, [wCurOpponent]
+ cp OPP_ID_OFFSET
+ jr c, .wildBattle
+ cp OPP_RIVAL3
+ jr z, .finalBattle
+ cp OPP_LANCE
+ jr nz, .normalTrainerBattle
+ ld a, MUSIC_GYM_LEADER_BATTLE ; lance also plays gym leader theme
+ jr .playSong
+.normalTrainerBattle
+ ld a, MUSIC_TRAINER_BATTLE
+ jr .playSong
+.finalBattle
+ ld a, MUSIC_FINAL_BATTLE
+ jr .playSong
+.wildBattle
+ ld a, MUSIC_WILD_BATTLE
+.playSong
+ jp PlayMusic
diff --git a/audio/poke_flute.asm b/audio/poke_flute.asm
new file mode 100644
index 00000000..f55a2a1f
--- /dev/null
+++ b/audio/poke_flute.asm
@@ -0,0 +1,18 @@
+Music_PokeFluteInBattle::
+ ; begin playing the "caught mon" sound effect
+ ld a, SFX_CAUGHT_MON
+ call PlaySoundWaitForCurrent
+ ; then immediately overwrite the channel pointers
+ ld hl, wChannelCommandPointers + Ch5 * 2
+ ld de, SFX_Pokeflute_Ch5
+ call Audio2_OverwriteChannelPointer
+ ld de, SFX_Pokeflute_Ch6
+ call Audio2_OverwriteChannelPointer
+ ld de, SFX_Pokeflute_Ch7
+
+Audio2_OverwriteChannelPointer:
+ ld a, e
+ ld [hli], a
+ ld a, d
+ ld [hli], a
+ ret
diff --git a/audio/pokedex_rating_sfx.asm b/audio/pokedex_rating_sfx.asm
new file mode 100644
index 00000000..aefbd066
--- /dev/null
+++ b/audio/pokedex_rating_sfx.asm
@@ -0,0 +1,34 @@
+PlayPokedexRatingSfx::
+ ldh a, [hDexRatingNumMonsOwned]
+ ld c, $0
+ ld hl, OwnedMonValues
+.getSfxPointer
+ cp [hl]
+ jr c, .gotSfxPointer
+ inc c
+ inc hl
+ jr .getSfxPointer
+.gotSfxPointer
+ push bc
+ call StopAllMusic
+ pop bc
+ ld b, $0
+ ld hl, PokedexRatingSfxPointers
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld c, [hl]
+ call PlayMusic
+ jp PlayDefaultMusic
+
+PokedexRatingSfxPointers:
+ db SFX_DENIED, BANK(SFX_Denied_3)
+ db SFX_POKEDEX_RATING, BANK(SFX_Pokedex_Rating_1)
+ db SFX_GET_ITEM_1, BANK(SFX_Get_Item1_1)
+ db SFX_CAUGHT_MON, BANK(SFX_Caught_Mon)
+ db SFX_LEVEL_UP, BANK(SFX_Level_Up)
+ db SFX_GET_KEY_ITEM, BANK(SFX_Get_Key_Item_1)
+ db SFX_GET_ITEM_2, BANK(SFX_Get_Item2_1)
+
+OwnedMonValues:
+ db 10, 40, 60, 90, 120, 150, $ff
diff --git a/audio/wave_instruments.asm b/audio/wave_instruments.asm
index 9f34d3ac..5095cced 100644
--- a/audio/wave_instruments.asm
+++ b/audio/wave_instruments.asm
@@ -1,3 +1,5 @@
+; This file is INCLUDEd three times, once for each audio engine.
+
dw .wave0
dw .wave1
dw .wave2
@@ -11,7 +13,7 @@
; these are the definitions for the channel 3 instruments
; each instrument definition is made up of 32 points (nibbles) that form
; the graph of the wave
-; the current instrument is copied to $FF30
+; the current instrument is copied to rWave_0--rWave_f
.wave0
db $02,$46,$8A,$CE,$FF,$FE,$ED,$DC,$CB,$A9,$87,$65,$44,$33,$22,$11
diff --git a/charmap.asm b/charmap.asm
index 4b5278c6..f0967978 100644
--- a/charmap.asm
+++ b/charmap.asm
@@ -1,265 +1,386 @@
-charmap "ガ", $05
-charmap "ギ", $06
-charmap "グ", $07
-charmap "ゲ", $08
-charmap "ゴ", $09
-charmap "ザ", $0A
-charmap "ジ", $0B
-charmap "ズ", $0C
-charmap "ゼ", $0D
-charmap "ゾ", $0E
-charmap "ダ", $0F
-charmap "ヂ", $10
-charmap "ヅ", $11
-charmap "デ", $12
-charmap "ド", $13
-charmap "バ", $19
-charmap "ビ", $1A
-charmap "ブ", $1B
-charmap "ボ", $1C
-charmap "が", $26
-charmap "ぎ", $27
-charmap "ぐ", $28
-charmap "げ", $29
-charmap "ご", $2A
-charmap "ざ", $2B
-charmap "じ", $2C
-charmap "ず", $2D
-charmap "ぜ", $2E
-charmap "ぞ", $2F
-charmap "だ", $30
-charmap "ぢ", $31
-charmap "づ", $32
-charmap "で", $33
-charmap "ど", $34
-charmap "ば", $3A
-charmap "び", $3B
-charmap "ぶ", $3C
-charmap "べ", $3D
-charmap "ぼ", $3E
-charmap "パ", $40
-charmap "ピ", $41
-charmap "プ", $42
-charmap "ポ", $43
-charmap "ぱ", $44
-charmap "ぴ", $45
-charmap "ぷ", $46
-charmap "ぺ", $47
-charmap "ぽ", $48
-charmap "ア", $80
-charmap "イ", $81
-charmap "ウ", $82
-charmap "エ", $83
-charmap "ォ", $84
-charmap "カ", $85
-charmap "キ", $86
-charmap "ク", $87
-charmap "ケ", $88
-charmap "コ", $89
-charmap "サ", $8A
-charmap "シ", $8B
-charmap "ス", $8C
-charmap "セ", $8D
-charmap "ソ", $8E
-charmap "タ", $8F
-charmap "チ", $90
-charmap "ツ", $91
-charmap "テ", $92
-charmap "ト", $93
-charmap "ナ", $94
-charmap "ニ", $95
-charmap "ヌ", $96
-charmap "ネ", $97
-charmap "ノ", $98
-charmap "ハ", $99
-charmap "ヒ", $9A
-charmap "フ", $9B
-charmap "ホ", $9C
-charmap "マ", $9D
-charmap "ミ", $9E
-charmap "ム", $9F
-charmap "メ", $A0
-charmap "モ", $A1
-charmap "ヤ", $A2
-charmap "ユ", $A3
-charmap "ヨ", $A4
-charmap "ラ", $A5
-charmap "ル", $A6
-charmap "レ", $A7
-charmap "ロ", $A8
-charmap "ワ", $A9
-charmap "ヲ", $AA
-charmap "ン", $AB
-charmap "ッ", $AC
-charmap "ャ", $AD
-charmap "ュ", $AE
-charmap "ョ", $AF
-charmap "ィ", $B0
-charmap "あ", $B1
-charmap "い", $B2
-charmap "う", $B3
-charmap "え", $B4
-charmap "お", $B5
-charmap "か", $B6
-charmap "き", $B7
-charmap "く", $B8
-charmap "け", $B9
-charmap "こ", $BA
-charmap "さ", $BB
-charmap "し", $BC
-charmap "す", $BD
-charmap "せ", $BE
-charmap "そ", $BF
-charmap "た", $C0
-charmap "ち", $C1
-charmap "つ", $C2
-charmap "て", $C3
-charmap "と", $C4
-charmap "な", $C5
-charmap "に", $C6
-charmap "ぬ", $C7
-charmap "ね", $C8
-charmap "の", $C9
-charmap "は", $CA
-charmap "ひ", $CB
-charmap "ふ", $CC
-charmap "へ", $CD
-charmap "ほ", $CE
-charmap "ま", $CF
-charmap "み", $D0
-charmap "む", $D1
-charmap "め", $D2
-charmap "も", $D3
-charmap "や", $D4
-charmap "ゆ", $D5
-charmap "よ", $D6
-charmap "ら", $D7
-charmap "り", $D8
-charmap "る", $D9
-charmap "れ", $DA
-charmap "ろ", $DB
-charmap "わ", $DC
-charmap "を", $DD
-charmap "ん", $DE
-charmap "っ", $DF
-charmap "ゃ", $E0
-charmap "ゅ", $E1
-charmap "ょ", $E2
-charmap "ー", $E3
-
-charmap "<pkmn>", $4A ; PkMn
-charmap "@", $50
-charmap "<PLAYER>", $52
-charmap "<RIVAL>", $53
-charmap "#", $54
-;charmap "POKé", $54
-charmap "<TARGET>", $59
-charmap "<USER>", $5A
-charmap "′", $71
-charmap "″", $73
-charmap "№", $74
-charmap "…", $75
-
-charmap "┌", $79
-charmap "─", $7A
-charmap "┐", $7B
-charmap "│", $7C
-charmap "└", $7D
-charmap "┘", $7E
-
-charmap " ", $7F
-charmap "A", $80
-charmap "B", $81
-charmap "C", $82
-charmap "D", $83
-charmap "E", $84
-charmap "F", $85
-charmap "G", $86
-charmap "H", $87
-charmap "I", $88
-charmap "J", $89
-charmap "K", $8A
-charmap "L", $8B
-charmap "M", $8C
-charmap "N", $8D
-charmap "O", $8E
-charmap "P", $8F
-charmap "Q", $90
-charmap "R", $91
-charmap "S", $92
-charmap "T", $93
-charmap "U", $94
-charmap "V", $95
-charmap "W", $96
-charmap "X", $97
-charmap "Y", $98
-charmap "Z", $99
-charmap "(", $9A
-charmap ")", $9B
-charmap ":", $9C
-charmap ";", $9D
-charmap "[", $9E
-charmap "]", $9F
-charmap "a", $A0
-charmap "b", $A1
-charmap "c", $A2
-charmap "d", $A3
-charmap "e", $A4
-charmap "f", $A5
-charmap "g", $A6
-charmap "h", $A7
-charmap "i", $A8
-charmap "j", $A9
-charmap "k", $AA
-charmap "l", $AB
-charmap "m", $AC
-charmap "n", $AD
-charmap "o", $AE
-charmap "p", $AF
-charmap "q", $B0
-charmap "r", $B1
-charmap "s", $B2
-charmap "t", $B3
-charmap "u", $B4
-charmap "v", $B5
-charmap "w", $B6
-charmap "x", $B7
-charmap "y", $B8
-charmap "z", $B9
-charmap "é", $BA
-charmap "'d", $BB
-charmap "'l", $BC
-charmap "'s", $BD
-charmap "'t", $BE
-charmap "'v", $BF
-
-charmap "'", $E0
-
-charmap "-", $E3
-charmap "'r", $E4
-charmap "'m", $E5
-charmap "?", $E6
-charmap "!", $E7
-charmap ".", $E8
-
-charmap "▷", $EC
-charmap "▶", $ED
-charmap "▲", $ED
-charmap "▼", $EE
-charmap "♂", $EF
-charmap "¥", $F0
-charmap "×", $F1
-charmap "⠄", $F2
-charmap "/", $F3
-charmap ",", $F4
-charmap "♀", $F5
-charmap "0", $F6
-charmap "1", $F7
-charmap "2", $F8
-charmap "3", $F9
-charmap "4", $FA
-charmap "5", $FB
-charmap "6", $FC
-charmap "7", $FD
-charmap "8", $FE
-charmap "9", $FF
+; $00-$17 are TX_* constants (see macros/scripts/text.asm)
+
+; Control characters (see home/text.asm)
+
+ charmap "<NULL>", $00
+ charmap "<PAGE>", $49
+ charmap "<PKMN>", $4a ; "<PK><MN>"
+ charmap "<_CONT>", $4b ; implements "<CONT>"
+ charmap "<SCROLL>", $4c
+ charmap "<NEXT>", $4e
+ charmap "<LINE>", $4f
+ charmap "@", $50 ; string terminator
+ charmap "<PARA>", $51
+ charmap "<PLAYER>", $52 ; wPlayerName
+ charmap "<RIVAL>", $53 ; wRivalName
+ charmap "#", $54 ; "POKé"
+ charmap "<CONT>", $55
+ charmap "<……>", $56 ; "……"
+ charmap "<DONE>", $57
+ charmap "<PROMPT>", $58
+ charmap "<TARGET>", $59
+ charmap "<USER>", $5a
+ charmap "<PC>", $5b ; "PC"
+ charmap "<TM>", $5c ; "TM"
+ charmap "<TRAINER>", $5d ; "TRAINER"
+ charmap "<ROCKET>", $5e ; "ROCKET"
+ charmap "<DEXEND>", $5f
+
+; Actual characters (from gfx/font/font_extra.png)
+
+ charmap "<BOLD_A>", $60 ; unused
+ charmap "<BOLD_B>", $61 ; unused
+ charmap "<BOLD_C>", $62 ; unused
+ charmap "<BOLD_D>", $63 ; unused
+ charmap "<BOLD_E>", $64 ; unused
+ charmap "<BOLD_F>", $65 ; unused
+ charmap "<BOLD_G>", $66 ; unused
+ charmap "<BOLD_H>", $67 ; unused
+ charmap "<BOLD_I>", $68 ; unused
+ charmap "<BOLD_V>", $69
+ charmap "<BOLD_S>", $6a
+ charmap "<BOLD_L>", $6b ; unused
+ charmap "<BOLD_M>", $6c ; unused
+ charmap "<COLON>", $6d ; colon with tinier dots than ":"
+ charmap "ぃ", $6e ; hiragana small i, unused
+ charmap "ぅ", $6f ; hiragana small u, unused
+ charmap "‘", $70 ; opening single quote
+ charmap "’", $71 ; closing single quote
+ charmap "“", $72 ; opening quote
+ charmap "”", $73 ; closing quote
+ charmap "·", $74 ; middle dot, unused
+ charmap "…", $75 ; ellipsis
+ charmap "ぁ", $76 ; hiragana small a, unused
+ charmap "ぇ", $77 ; hiragana small e, unused
+ charmap "ぉ", $78 ; hiragana small o, unused
+
+ charmap "┌", $79
+ charmap "─", $7a
+ charmap "┐", $7b
+ charmap "│", $7c
+ charmap "└", $7d
+ charmap "┘", $7e
+ charmap " ", $7f
+
+; Actual characters (from gfx/font/font_battle_extra.png)
+
+ charmap "<LV>", $6e
+
+ charmap "<to>", $70 ; narrow "to"
+
+ charmap "『", $72 ; Japanese opening quote, unused
+ charmap "<ID>", $73
+ charmap "№", $74
+
+; Actual characters (from other graphics files)
+
+ ; needed for ShowPokedexDataInternal (see engine/menus/pokedex.asm)
+ charmap "′", $60 ; gfx/pokedex/pokedex.png
+ charmap "″", $61 ; gfx/pokedex/pokedex.png
+
+ ; needed for StatusScreen (see engine/pokemon/status_screen.asm)
+ charmap "<BOLD_P>", $72 ; gfx/font/P.1bpp
+
+ ; needed for LoadTownMap_Fly (see engine/items/town_map.asm)
+ charmap "▲", $ed ; gfx/town_map/up_arrow.1bpp
+
+ ; needed for PrintAlphabet (see engine/menus/naming_screen.asm)
+ charmap "<ED>", $f0 ; gfx/font/ED.1bpp
+
+; Actual characters (from gfx/font/font.png)
+
+ charmap "A", $80
+ charmap "B", $81
+ charmap "C", $82
+ charmap "D", $83
+ charmap "E", $84
+ charmap "F", $85
+ charmap "G", $86
+ charmap "H", $87
+ charmap "I", $88
+ charmap "J", $89
+ charmap "K", $8a
+ charmap "L", $8b
+ charmap "M", $8c
+ charmap "N", $8d
+ charmap "O", $8e
+ charmap "P", $8f
+ charmap "Q", $90
+ charmap "R", $91
+ charmap "S", $92
+ charmap "T", $93
+ charmap "U", $94
+ charmap "V", $95
+ charmap "W", $96
+ charmap "X", $97
+ charmap "Y", $98
+ charmap "Z", $99
+
+ charmap "(", $9a
+ charmap ")", $9b
+ charmap ":", $9c
+ charmap ";", $9d
+ charmap "[", $9e
+ charmap "]", $9f
+
+ charmap "a", $a0
+ charmap "b", $a1
+ charmap "c", $a2
+ charmap "d", $a3
+ charmap "e", $a4
+ charmap "f", $a5
+ charmap "g", $a6
+ charmap "h", $a7
+ charmap "i", $a8
+ charmap "j", $a9
+ charmap "k", $aa
+ charmap "l", $ab
+ charmap "m", $ac
+ charmap "n", $ad
+ charmap "o", $ae
+ charmap "p", $af
+ charmap "q", $b0
+ charmap "r", $b1
+ charmap "s", $b2
+ charmap "t", $b3
+ charmap "u", $b4
+ charmap "v", $b5
+ charmap "w", $b6
+ charmap "x", $b7
+ charmap "y", $b8
+ charmap "z", $b9
+
+ charmap "é", $ba
+ charmap "'d", $bb
+ charmap "'l", $bc
+ charmap "'s", $bd
+ charmap "'t", $be
+ charmap "'v", $bf
+
+ charmap "'", $e0
+ charmap "<PK>", $e1
+ charmap "<MN>", $e2
+ charmap "-", $e3
+
+ charmap "'r", $e4
+ charmap "'m", $e5
+
+ charmap "?", $e6
+ charmap "!", $e7
+ charmap ".", $e8
+
+ charmap "ァ", $e9 ; katakana small a, unused
+ charmap "ゥ", $ea ; katakana small u, unused
+ charmap "ェ", $eb ; katakana small e, unused
+
+ charmap "▷", $ec
+ charmap "▶", $ed
+ charmap "▼", $ee
+ charmap "♂", $ef
+ charmap "¥", $f0
+ charmap "×", $f1
+ charmap "<DOT>", $f2 ; decimal point; same as "." in English
+ charmap "/", $f3
+ charmap ",", $f4
+ charmap "♀", $f5
+
+ charmap "0", $f6
+ charmap "1", $f7
+ charmap "2", $f8
+ charmap "3", $f9
+ charmap "4", $fa
+ charmap "5", $fb
+ charmap "6", $fc
+ charmap "7", $fd
+ charmap "8", $fe
+ charmap "9", $ff
+
+
+; Japanese kana, for those bits of text that were not translated to English
+
+ charmap "ガ", $05
+ charmap "ギ", $06
+ charmap "グ", $07
+ charmap "ゲ", $08
+ charmap "ゴ", $09
+ charmap "ザ", $0a
+ charmap "ジ", $0b
+ charmap "ズ", $0c
+ charmap "ゼ", $0d
+ charmap "ゾ", $0e
+ charmap "ダ", $0f
+ charmap "ヂ", $10
+ charmap "ヅ", $11
+ charmap "デ", $12
+ charmap "ド", $13
+
+ charmap "バ", $19
+ charmap "ビ", $1a
+ charmap "ブ", $1b
+ charmap "ボ", $1c
+
+ charmap "が", $26
+ charmap "ぎ", $27
+ charmap "ぐ", $28
+ charmap "げ", $29
+ charmap "ご", $2a
+ charmap "ざ", $2b
+ charmap "じ", $2c
+ charmap "ず", $2d
+ charmap "ぜ", $2e
+ charmap "ぞ", $2f
+ charmap "だ", $30
+ charmap "ぢ", $31
+ charmap "づ", $32
+ charmap "で", $33
+ charmap "ど", $34
+
+ charmap "ば", $3a
+ charmap "び", $3b
+ charmap "ぶ", $3c
+ charmap "べ", $3d
+ charmap "ぼ", $3e
+
+ charmap "パ", $40
+ charmap "ピ", $41
+ charmap "プ", $42
+ charmap "ポ", $43
+ charmap "ぱ", $44
+ charmap "ぴ", $45
+ charmap "ぷ", $46
+ charmap "ぺ", $47
+ charmap "ぽ", $48
+
+ charmap "「", $70
+ charmap "」", $71
+ charmap "』", $73
+ charmap "⋯", $75
+
+ charmap " ", $7f
+
+ charmap "ア", $80
+ charmap "イ", $81
+ charmap "ウ", $82
+ charmap "エ", $83
+ charmap "オ", $84
+ charmap "カ", $85
+ charmap "キ", $86
+ charmap "ク", $87
+ charmap "ケ", $88
+ charmap "コ", $89
+ charmap "サ", $8a
+ charmap "シ", $8b
+ charmap "ス", $8c
+ charmap "セ", $8d
+ charmap "ソ", $8e
+ charmap "タ", $8f
+ charmap "チ", $90
+ charmap "ツ", $91
+ charmap "テ", $92
+ charmap "ト", $93
+ charmap "ナ", $94
+ charmap "ニ", $95
+ charmap "ヌ", $96
+ charmap "ネ", $97
+ charmap "ノ", $98
+ charmap "ハ", $99
+ charmap "ヒ", $9a
+ charmap "フ", $9b
+ charmap "ホ", $9c
+ charmap "マ", $9d
+ charmap "ミ", $9e
+ charmap "ム", $9f
+ charmap "メ", $a0
+ charmap "モ", $a1
+ charmap "ヤ", $a2
+ charmap "ユ", $a3
+ charmap "ヨ", $a4
+ charmap "ラ", $a5
+ charmap "ル", $a6
+ charmap "レ", $a7
+ charmap "ロ", $a8
+ charmap "ワ", $a9
+ charmap "ヲ", $aa
+ charmap "ン", $ab
+ charmap "ッ", $ac
+ charmap "ャ", $ad
+ charmap "ュ", $ae
+ charmap "ョ", $af
+ charmap "ィ", $b0
+
+ charmap "あ", $b1
+ charmap "い", $b2
+ charmap "う", $b3
+ charmap "え", $b4
+ charmap "お", $b5
+ charmap "か", $b6
+ charmap "き", $b7
+ charmap "く", $b8
+ charmap "け", $b9
+ charmap "こ", $ba
+ charmap "さ", $bb
+ charmap "し", $bc
+ charmap "す", $bd
+ charmap "せ", $be
+ charmap "そ", $bf
+ charmap "た", $c0
+ charmap "ち", $c1
+ charmap "つ", $c2
+ charmap "て", $c3
+ charmap "と", $c4
+ charmap "な", $c5
+ charmap "に", $c6
+ charmap "ぬ", $c7
+ charmap "ね", $c8
+ charmap "の", $c9
+ charmap "は", $ca
+ charmap "ひ", $cb
+ charmap "ふ", $cc
+ charmap "へ", $cd
+ charmap "ほ", $ce
+ charmap "ま", $cf
+ charmap "み", $d0
+ charmap "む", $d1
+ charmap "め", $d2
+ charmap "も", $d3
+ charmap "や", $d4
+ charmap "ゆ", $d5
+ charmap "よ", $d6
+ charmap "ら", $d7
+ charmap "り", $d8
+ charmap "る", $d9
+ charmap "れ", $da
+ charmap "ろ", $db
+ charmap "わ", $dc
+ charmap "を", $dd
+ charmap "ん", $de
+ charmap "っ", $df
+ charmap "ゃ", $e0
+ charmap "ゅ", $e1
+ charmap "ょ", $e2
+
+ charmap "ー", $e3
+ charmap "゚", $e4
+ charmap "゙", $e5
+
+ charmap "?", $e6
+ charmap "!", $e7
+ charmap "。", $e8
+
+ charmap "円", $f0
+
+ charmap ".", $f2
+ charmap "/", $f3
+
+ charmap "ォ", $f4
+
+ charmap "0", $f6
+ charmap "1", $f7
+ charmap "2", $f8
+ charmap "3", $f9
+ charmap "4", $fa
+ charmap "5", $fb
+ charmap "6", $fc
+ charmap "7", $fd
+ charmap "8", $fe
+ charmap "9", $ff
diff --git a/constants.asm b/constants.asm
index fa32422b..21cd6400 100644
--- a/constants.asm
+++ b/constants.asm
@@ -1,33 +1,38 @@
-INCLUDE "macros.asm"
INCLUDE "charmap.asm"
-INCLUDE "hram.asm"
-INCLUDE "vram.asm"
+INCLUDE "macros.asm"
INCLUDE "constants/hardware_constants.asm"
INCLUDE "constants/oam_constants.asm"
INCLUDE "constants/misc_constants.asm"
-
+INCLUDE "constants/gfx_constants.asm"
+INCLUDE "constants/input_constants.asm"
+INCLUDE "constants/serial_constants.asm"
+INCLUDE "constants/script_constants.asm"
INCLUDE "constants/pokemon_constants.asm"
INCLUDE "constants/pokedex_constants.asm"
+INCLUDE "constants/pokemon_data_constants.asm"
INCLUDE "constants/trainer_constants.asm"
-INCLUDE "constants/item_constants.asm"
INCLUDE "constants/type_constants.asm"
INCLUDE "constants/move_constants.asm"
INCLUDE "constants/move_animation_constants.asm"
INCLUDE "constants/move_effect_constants.asm"
-INCLUDE "constants/status_constants.asm"
+INCLUDE "constants/battle_constants.asm"
+INCLUDE "constants/item_constants.asm"
+INCLUDE "constants/icon_constants.asm"
INCLUDE "constants/sprite_constants.asm"
+INCLUDE "constants/sprite_data_constants.asm"
INCLUDE "constants/palette_constants.asm"
-INCLUDE "constants/evolution_constants.asm"
INCLUDE "constants/list_constants.asm"
INCLUDE "constants/map_constants.asm"
-INCLUDE "constants/connection_constants.asm"
+INCLUDE "constants/map_data_constants.asm"
+INCLUDE "constants/map_object_constants.asm"
INCLUDE "constants/hide_show_constants.asm"
INCLUDE "constants/credits_constants.asm"
+INCLUDE "constants/audio_constants.asm"
INCLUDE "constants/music_constants.asm"
-INCLUDE "constants/tilesets.asm"
-INCLUDE "constants/starter_mons.asm"
+INCLUDE "constants/tileset_constants.asm"
INCLUDE "constants/event_constants.asm"
INCLUDE "constants/text_constants.asm"
+INCLUDE "constants/menu_constants.asm"
INCLUDE "constants/pikachu_emotion_constants.asm"
diff --git a/constants/audio_constants.asm b/constants/audio_constants.asm
new file mode 100644
index 00000000..e36d2d5f
--- /dev/null
+++ b/constants/audio_constants.asm
@@ -0,0 +1,67 @@
+; pitch
+; Audio[1|2|3]_Pitches indexes (see audio/notes.asm)
+ const_def
+ const C_ ; 0
+ const C# ; 1
+ const D_ ; 2
+ const D# ; 3
+ const E_ ; 4
+ const F_ ; 5
+ const F# ; 6
+ const G_ ; 7
+ const G# ; 8
+ const A_ ; 9
+ const A# ; A
+ const B_ ; B
+
+; channel
+; Audio[1|2|3]_HWChannelBaseAddresses, Audio[1|2|3]_HWChannelDisableMasks,
+; and Audio[1|2|3]_HWChannelEnableMasks indexes (see audio/engine_[1|2|3].asm)
+ const_def
+ const Ch1 ; 0
+ const Ch2 ; 1
+ const Ch3 ; 2
+ const Ch4 ; 3
+NUM_MUSIC_CHANS EQU const_value
+ const Ch5 ; 4
+ const Ch6 ; 5
+ const Ch7 ; 6
+ const Ch8 ; 7
+NUM_NOISE_CHANS EQU const_value - NUM_MUSIC_CHANS
+NUM_CHANNELS EQU const_value
+
+; HW sound channel register base addresses
+HW_CH1_BASE EQU LOW(rNR10)
+HW_CH2_BASE EQU LOW(rNR21) - 1
+HW_CH3_BASE EQU LOW(rNR30)
+HW_CH4_BASE EQU LOW(rNR41) - 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)
+
+ const_def 1
+ const REG_DUTY_SOUND_LEN ; 1
+ const REG_VOLUME_ENVELOPE ; 2
+ const REG_FREQUENCY_LO ; 3
+
+; wChannelFlags1 constants
+ const_def
+ const BIT_PERFECT_PITCH ; 0 ; controlled by toggle_perfect_pitch command
+ const BIT_SOUND_CALL ; 1 ; if in sound call
+ const BIT_NOISE_OR_SFX ; 2 ; if channel is the music noise channel or an SFX channel
+ const BIT_VIBRATO_DIRECTION ; 3 ; if the pitch is above or below normal (cycles)
+ const BIT_PITCH_SLIDE_ON ; 4 ; if pitch slide is active
+ const BIT_PITCH_SLIDE_DECREASING ; 5 ; if the pitch slide frequency is decreasing (instead of increasing)
+ const BIT_ROTATE_DUTY_CYCLE ; 6 ; if rotating duty cycle
+
+; wChannelFlags2 constant (only has one flag)
+BIT_EXECUTE_MUSIC EQU 0 ; if in execute music
diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm
new file mode 100644
index 00000000..15ba42eb
--- /dev/null
+++ b/constants/battle_constants.asm
@@ -0,0 +1,75 @@
+MAX_LEVEL EQU 100
+
+NUM_MOVES EQU 4
+NUM_STATS EQU 5
+NUM_STAT_MODS EQU 8
+NUM_DVS EQU 2
+
+; D733 flags
+BIT_TEST_BATTLE EQU 0
+
+; battle type constants (wBattleType values)
+ const_def
+ const BATTLE_TYPE_NORMAL ; 0
+ const BATTLE_TYPE_OLD_MAN ; 1
+ const BATTLE_TYPE_SAFARI ; 2
+ const BATTLE_TYPE_RUN ; 3
+ const BATTLE_TYPE_PIKACHU ; 4
+
+; damage limits before type effectiveness
+MIN_NEUTRAL_DAMAGE EQU 2
+MAX_NEUTRAL_DAMAGE EQU 999
+
+; fixed damage constants
+SONICBOOM_DAMAGE EQU 20
+DRAGON_RAGE_DAMAGE EQU 40
+
+; type effectiveness factors, scaled by 10
+SUPER_EFFECTIVE EQU 20
+MORE_EFFECTIVE EQU 15
+EFFECTIVE EQU 10
+NOT_VERY_EFFECTIVE EQU 05
+NO_EFFECT EQU 00
+
+; non-volatile statuses
+SLP EQU %111 ; sleep counter
+ const_def 3
+ const PSN ; 3
+ const BRN ; 4
+ const FRZ ; 5
+ const PAR ; 6
+
+MAX_STAT_VALUE EQU 999
+
+; trainer dvs
+ATKDEFDV_TRAINER EQU $98
+SPDSPCDV_TRAINER EQU $88
+
+; wPlayerBattleStatus1 or wEnemyBattleStatus1 bit flags
+ const_def
+ const STORING_ENERGY ; 0 ; Bide
+ const THRASHING_ABOUT ; 1 ; e.g. Thrash
+ const ATTACKING_MULTIPLE_TIMES ; 2 ; e.g. Double Kick, Fury Attack
+ const FLINCHED ; 3
+ const CHARGING_UP ; 4 ; e.g. Solar Beam, Fly
+ const USING_TRAPPING_MOVE ; 5 ; e.g. Wrap
+ const INVULNERABLE ; 6 ; charging up Fly/Dig
+ const CONFUSED ; 7
+
+; wPlayerBattleStatus2 or wEnemyBattleStatus2 bit flags
+ const_def
+ const USING_X_ACCURACY ; 0
+ const PROTECTED_BY_MIST ; 1
+ const GETTING_PUMPED ; 2 ; Focus Energy
+ const_skip ; 3 ; unused
+ const HAS_SUBSTITUTE_UP ; 4
+ const NEEDS_TO_RECHARGE ; 5 ; Hyper Beam
+ const USING_RAGE ; 6
+ const SEEDED ; 7
+
+; wPlayerBattleStatus3 or wEnemyBattleStatus3 bit flags
+ const_def
+ const BADLY_POISONED ; 0
+ const HAS_LIGHT_SCREEN_UP ; 1
+ const HAS_REFLECT_UP ; 2
+ const TRANSFORMED ; 3
diff --git a/constants/connection_constants.asm b/constants/connection_constants.asm
deleted file mode 100755
index 154c4163..00000000
--- a/constants/connection_constants.asm
+++ /dev/null
@@ -1,9 +0,0 @@
-; width of east/west connections
-; height of north/south connections
-MAP_BORDER EQU 3
-
-; connection directions
-EAST EQU 1
-WEST EQU 2
-SOUTH EQU 4
-NORTH EQU 8
diff --git a/constants/credits_constants.asm b/constants/credits_constants.asm
index 013ceceb..b04ec0b8 100644
--- a/constants/credits_constants.asm
+++ b/constants/credits_constants.asm
@@ -1,3 +1,4 @@
+; CreditsTextPointers indexes (see data/credits/credits_text.asm)
const_def
const CRED_VERSION ; 00
const CRED_TAJIRI ; 01
@@ -86,10 +87,10 @@
const CRED_YOSHIMURA ; 54
const CRED_YAMAZAKI ; 55
-const_value SET $fa
- const CRED_THE_END
- const CRED_COPYRIGHT
- const CRED_TEXT
- const CRED_TEXT_FADE
- const CRED_TEXT_MON
- const CRED_TEXT_FADE_MON
+ const_def -1, -1
+ const CRED_TEXT_FADE_MON ; $FF
+ const CRED_TEXT_MON ; $FE
+ const CRED_TEXT_FADE ; $FD
+ const CRED_TEXT ; $FC
+ const CRED_COPYRIGHT ; $FB
+ const CRED_THE_END ; $FA
diff --git a/constants/event_constants.asm b/constants/event_constants.asm
index b35f74f8..bf4926aa 100644
--- a/constants/event_constants.asm
+++ b/constants/event_constants.asm
@@ -1,2564 +1,794 @@
-const_value = 0
+; wEventFlags bit flags
- const EVENT_FOLLOWED_OAK_INTO_LAB ; 000, (D747, bit 0)
- const EVENT_001 ; 001, (D747, bit 1)
- const EVENT_002 ; 002, (D747, bit 2)
- const EVENT_HALL_OF_FAME_DEX_RATING ; 003, (D747, bit 3)
- const EVENT_004 ; 004, (D747, bit 4)
- const EVENT_PLAYER_AT_RIGHT_EXIT_TO_PALLET_TOWN ; 005, (D747, bit 5)
- const EVENT_PALLET_AFTER_GETTING_POKEBALLS ; 006, (D747, bit 6)
- const EVENT_007 ; 007, (D747, bit 7)
- const EVENT_008 ; 008, (D748, bit 0)
- const EVENT_009 ; 009, (D748, bit 1)
- const EVENT_00A ; 00A, (D748, bit 2)
- const EVENT_00B ; 00B, (D748, bit 3)
- const EVENT_00C ; 00C, (D748, bit 4)
- const EVENT_00D ; 00D, (D748, bit 5)
- const EVENT_00E ; 00E, (D748, bit 6)
- const EVENT_00F ; 00F, (D748, bit 7)
- const EVENT_010 ; 010, (D749, bit 0)
- const EVENT_011 ; 011, (D749, bit 1)
- const EVENT_012 ; 012, (D749, bit 2)
- const EVENT_013 ; 013, (D749, bit 3)
- const EVENT_014 ; 014, (D749, bit 4)
- const EVENT_015 ; 015, (D749, bit 5)
- const EVENT_016 ; 016, (D749, bit 6)
- const EVENT_017 ; 017, (D749, bit 7)
- const EVENT_GOT_TOWN_MAP ; 018, (D74A, bit 0)
- const EVENT_ENTERED_BLUES_HOUSE ; 019, (D74A, bit 1)
- const EVENT_DAISY_WALKING ; 01A, (D74A, bit 2)
- const EVENT_01B ; 01B, (D74A, bit 3)
- const EVENT_01C ; 01C, (D74A, bit 4)
- const EVENT_01D ; 01D, (D74A, bit 5)
- const EVENT_01E ; 01E, (D74A, bit 6)
- const EVENT_01F ; 01F, (D74A, bit 7)
- const EVENT_FOLLOWED_OAK_INTO_LAB_2 ; 020, (D74B, bit 0)
- const EVENT_OAK_ASKED_TO_CHOOSE_MON ; 021, (D74B, bit 1)
- const EVENT_GOT_STARTER ; 022, (D74B, bit 2)
- const EVENT_BATTLED_RIVAL_IN_OAKS_LAB ; 023, (D74B, bit 3)
- const EVENT_GOT_POKEBALLS_FROM_OAK ; 024, (D74B, bit 4)
- const EVENT_GOT_POKEDEX ; 025, (D74B, bit 5)
- const EVENT_PALLET_AFTER_GETTING_POKEBALLS_2 ; 026, (D74B, bit 6)
- const EVENT_OAK_APPEARED_IN_PALLET ; 027, (D74B, bit 7)
- const EVENT_VIRIDIAN_GYM_OPEN ; 028, (D74C, bit 0)
- const EVENT_GOT_TM42 ; 029, (D74C, bit 1)
- const EVENT_02A ; 02A, (D74C, bit 2)
- const EVENT_02B ; 02B, (D74C, bit 3)
- const EVENT_02C ; 02C, (D74C, bit 4)
- const EVENT_02D ; 02D, (D74C, bit 5)
- const EVENT_02E ; 02E, (D74C, bit 6)
- const EVENT_02F ; 02F, (D74C, bit 7)
- const EVENT_030 ; 030, (D74D, bit 0)
- const EVENT_031 ; 031, (D74D, bit 1)
- const EVENT_032 ; 032, (D74D, bit 2)
- const EVENT_033 ; 033, (D74D, bit 3)
- const EVENT_034 ; 034, (D74D, bit 4)
- const EVENT_035 ; 035, (D74D, bit 5)
- const EVENT_036 ; 036, (D74D, bit 6)
- const EVENT_037 ; 037, (D74D, bit 7)
- const EVENT_OAK_GOT_PARCEL ; 038, (D74E, bit 0)
- const EVENT_GOT_OAKS_PARCEL ; 039, (D74E, bit 1)
- const EVENT_03A ; 03A, (D74E, bit 2)
- const EVENT_03B ; 03B, (D74E, bit 3)
- const EVENT_03C ; 03C, (D74E, bit 4)
- const EVENT_03D ; 03D, (D74E, bit 5)
- const EVENT_03E ; 03E, (D74E, bit 6)
- const EVENT_03F ; 03F, (D74E, bit 7)
- const EVENT_040 ; 040, (D74F, bit 0)
- const EVENT_041 ; 041, (D74F, bit 1)
- const EVENT_042 ; 042, (D74F, bit 2)
- const EVENT_043 ; 043, (D74F, bit 3)
- const EVENT_044 ; 044, (D74F, bit 4)
- const EVENT_045 ; 045, (D74F, bit 5)
- const EVENT_046 ; 046, (D74F, bit 6)
- const EVENT_047 ; 047, (D74F, bit 7)
- const EVENT_048 ; 048, (D750, bit 0)
- const EVENT_049 ; 049, (D750, bit 1)
- const EVENT_04A ; 04A, (D750, bit 2)
- const EVENT_04B ; 04B, (D750, bit 3)
- const EVENT_04C ; 04C, (D750, bit 4)
- const EVENT_04D ; 04D, (D750, bit 5)
- const EVENT_04E ; 04E, (D750, bit 6)
- const EVENT_04F ; 04F, (D750, bit 7)
- const EVENT_GOT_TM27 ; 050, (D751, bit 0)
- const EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI ; 051, (D751, bit 1)
- const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0 ; 052, (D751, bit 2)
- const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1 ; 053, (D751, bit 3)
- const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2 ; 054, (D751, bit 4)
- const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3 ; 055, (D751, bit 5)
- const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4 ; 056, (D751, bit 6)
- const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5 ; 057, (D751, bit 7)
- const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6 ; 058, (D752, bit 0)
- const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7 ; 059, (D752, bit 1)
- const EVENT_05A ; 05A, (D752, bit 2)
- const EVENT_05B ; 05B, (D752, bit 3)
- const EVENT_05C ; 05C, (D752, bit 4)
- const EVENT_05D ; 05D, (D752, bit 5)
- const EVENT_05E ; 05E, (D752, bit 6)
- const EVENT_05F ; 05F, (D752, bit 7)
- const EVENT_060 ; 060, (D753, bit 0)
- const EVENT_061 ; 061, (D753, bit 1)
- const EVENT_062 ; 062, (D753, bit 2)
- const EVENT_063 ; 063, (D753, bit 3)
- const EVENT_064 ; 064, (D753, bit 4)
- const EVENT_065 ; 065, (D753, bit 5)
- const EVENT_066 ; 066, (D753, bit 6)
- const EVENT_067 ; 067, (D753, bit 7)
- const EVENT_BOUGHT_MUSEUM_TICKET ; 068, (D754, bit 0)
- const EVENT_GOT_OLD_AMBER ; 069, (D754, bit 1)
- const EVENT_06A ; 06A, (D754, bit 2)
- const EVENT_06B ; 06B, (D754, bit 3)
- const EVENT_06C ; 06C, (D754, bit 4)
- const EVENT_06D ; 06D, (D754, bit 5)
- const EVENT_06E ; 06E, (D754, bit 6)
- const EVENT_06F ; 06F, (D754, bit 7)
- const EVENT_070 ; 070, (D755, bit 0)
- const EVENT_071 ; 071, (D755, bit 1)
- const EVENT_BEAT_PEWTER_GYM_TRAINER_0 ; 072, (D755, bit 2)
- const EVENT_073 ; 073, (D755, bit 3)
- const EVENT_074 ; 074, (D755, bit 4)
- const EVENT_075 ; 075, (D755, bit 5)
- const EVENT_GOT_TM34 ; 076, (D755, bit 6)
- const EVENT_BEAT_BROCK ; 077, (D755, bit 7)
- const EVENT_078 ; 078, (D756, bit 0)
- const EVENT_079 ; 079, (D756, bit 1)
- const EVENT_07A ; 07A, (D756, bit 2)
- const EVENT_07B ; 07B, (D756, bit 3)
- const EVENT_07C ; 07C, (D756, bit 4)
- const EVENT_07D ; 07D, (D756, bit 5)
- const EVENT_07E ; 07E, (D756, bit 6)
- const EVENT_07F ; 07F, (D756, bit 7)
- const EVENT_080 ; 080, (D757, bit 0)
- const EVENT_081 ; 081, (D757, bit 1)
- const EVENT_082 ; 082, (D757, bit 2)
- const EVENT_083 ; 083, (D757, bit 3)
- const EVENT_084 ; 084, (D757, bit 4)
- const EVENT_085 ; 085, (D757, bit 5)
- const EVENT_086 ; 086, (D757, bit 6)
- const EVENT_087 ; 087, (D757, bit 7)
- const EVENT_088 ; 088, (D758, bit 0)
- const EVENT_089 ; 089, (D758, bit 1)
- const EVENT_08A ; 08A, (D758, bit 2)
- const EVENT_08B ; 08B, (D758, bit 3)
- const EVENT_08C ; 08C, (D758, bit 4)
- const EVENT_08D ; 08D, (D758, bit 5)
- const EVENT_08E ; 08E, (D758, bit 6)
- const EVENT_08F ; 08F, (D758, bit 7)
- const EVENT_090 ; 090, (D759, bit 0)
- const EVENT_091 ; 091, (D759, bit 1)
- const EVENT_092 ; 092, (D759, bit 2)
- const EVENT_093 ; 093, (D759, bit 3)
- const EVENT_094 ; 094, (D759, bit 4)
- const EVENT_095 ; 095, (D759, bit 5)
- const EVENT_096 ; 096, (D759, bit 6)
- const EVENT_097 ; 097, (D759, bit 7)
- const EVENT_BEAT_CERULEAN_RIVAL ; 098, (D75A, bit 0)
- const EVENT_099 ; 099, (D75A, bit 1)
- const EVENT_09A ; 09A, (D75A, bit 2)
- const EVENT_09B ; 09B, (D75A, bit 3)
- const EVENT_09C ; 09C, (D75A, bit 4)
- const EVENT_09D ; 09D, (D75A, bit 5)
- const EVENT_09E ; 09E, (D75A, bit 6)
- const EVENT_09F ; 09F, (D75A, bit 7)
- const EVENT_0A0 ; 0A0, (D75B, bit 0)
- const EVENT_0A1 ; 0A1, (D75B, bit 1)
- const EVENT_0A2 ; 0A2, (D75B, bit 2)
- const EVENT_0A3 ; 0A3, (D75B, bit 3)
- const EVENT_0A4 ; 0A4, (D75B, bit 4)
- const EVENT_0A5 ; 0A5, (D75B, bit 5)
- const EVENT_0A6 ; 0A6, (D75B, bit 6)
- const EVENT_BEAT_CERULEAN_ROCKET_THIEF ; 0A7, (D75B, bit 7)
- const EVENT_GOT_BULBASAUR_IN_CERULEAN ; 0A8, (D75C, bit 0)
- const EVENT_0A9 ; 0A9, (D75C, bit 1)
- const EVENT_0AA ; 0AA, (D75C, bit 2)
- const EVENT_0AB ; 0AB, (D75C, bit 3)
- const EVENT_0AC ; 0AC, (D75C, bit 4)
- const EVENT_0AD ; 0AD, (D75C, bit 5)
- const EVENT_0AE ; 0AE, (D75C, bit 6)
- const EVENT_0AF ; 0AF, (D75C, bit 7)
- const EVENT_0B0 ; 0B0, (D75D, bit 0)
- const EVENT_0B1 ; 0B1, (D75D, bit 1)
- const EVENT_0B2 ; 0B2, (D75D, bit 2)
- const EVENT_0B3 ; 0B3, (D75D, bit 3)
- const EVENT_0B4 ; 0B4, (D75D, bit 4)
- const EVENT_0B5 ; 0B5, (D75D, bit 5)
- const EVENT_0B6 ; 0B6, (D75D, bit 6)
- const EVENT_0B7 ; 0B7, (D75D, bit 7)
- const EVENT_0B8 ; 0B8, (D75E, bit 0)
- const EVENT_0B9 ; 0B9, (D75E, bit 1)
- const EVENT_BEAT_CERULEAN_GYM_TRAINER_0 ; 0BA, (D75E, bit 2)
- const EVENT_BEAT_CERULEAN_GYM_TRAINER_1 ; 0BB, (D75E, bit 3)
- const EVENT_0BC ; 0BC, (D75E, bit 4)
- const EVENT_0BD ; 0BD, (D75E, bit 5)
- const EVENT_GOT_TM11 ; 0BE, (D75E, bit 6)
- const EVENT_BEAT_MISTY ; 0BF, (D75E, bit 7)
- const EVENT_GOT_BICYCLE ; 0C0, (D75F, bit 0)
- const EVENT_0C1 ; 0C1, (D75F, bit 1)
- const EVENT_0C2 ; 0C2, (D75F, bit 2)
- const EVENT_0C3 ; 0C3, (D75F, bit 3)
- const EVENT_0C4 ; 0C4, (D75F, bit 4)
- const EVENT_0C5 ; 0C5, (D75F, bit 5)
- const EVENT_0C6 ; 0C6, (D75F, bit 6)
- const EVENT_0C7 ; 0C7, (D75F, bit 7)
- const EVENT_0C8 ; 0C8, (D760, bit 0)
- const EVENT_0C9 ; 0C9, (D760, bit 1)
- const EVENT_0CA ; 0CA, (D760, bit 2)
- const EVENT_0CB ; 0CB, (D760, bit 3)
- const EVENT_0CC ; 0CC, (D760, bit 4)
- const EVENT_0CD ; 0CD, (D760, bit 5)
- const EVENT_0CE ; 0CE, (D760, bit 6)
- const EVENT_0CF ; 0CF, (D760, bit 7)
- const EVENT_0D0 ; 0D0, (D761, bit 0)
- const EVENT_0D1 ; 0D1, (D761, bit 1)
- const EVENT_0D2 ; 0D2, (D761, bit 2)
- const EVENT_0D3 ; 0D3, (D761, bit 3)
- const EVENT_0D4 ; 0D4, (D761, bit 4)
- const EVENT_0D5 ; 0D5, (D761, bit 5)
- const EVENT_0D6 ; 0D6, (D761, bit 6)
- const EVENT_0D7 ; 0D7, (D761, bit 7)
- const EVENT_0D8 ; 0D8, (D762, bit 0)
- const EVENT_0D9 ; 0D9, (D762, bit 1)
- const EVENT_0DA ; 0DA, (D762, bit 2)
- const EVENT_0DB ; 0DB, (D762, bit 3)
- const EVENT_0DC ; 0DC, (D762, bit 4)
- const EVENT_0DD ; 0DD, (D762, bit 5)
- const EVENT_0DE ; 0DE, (D762, bit 6)
- const EVENT_0DF ; 0DF, (D762, bit 7)
- const EVENT_0E0 ; 0E0, (D763, bit 0)
- const EVENT_0E1 ; 0E1, (D763, bit 1)
- const EVENT_0E2 ; 0E2, (D763, bit 2)
- const EVENT_0E3 ; 0E3, (D763, bit 3)
- const EVENT_0E4 ; 0E4, (D763, bit 4)
- const EVENT_0E5 ; 0E5, (D763, bit 5)
- const EVENT_0E6 ; 0E6, (D763, bit 6)
- const EVENT_0E7 ; 0E7, (D763, bit 7)
- const EVENT_0E8 ; 0E8, (D764, bit 0)
- const EVENT_0E9 ; 0E9, (D764, bit 1)
- const EVENT_0EA ; 0EA, (D764, bit 2)
- const EVENT_0EB ; 0EB, (D764, bit 3)
- const EVENT_0EC ; 0EC, (D764, bit 4)
- const EVENT_0ED ; 0ED, (D764, bit 5)
- const EVENT_POKEMON_TOWER_RIVAL_ON_LEFT ; 0EE, (D764, bit 6)
- const EVENT_BEAT_POKEMON_TOWER_RIVAL ; 0EF, (D764, bit 7)
- const EVENT_0F0 ; 0F0, (D765, bit 0)
- const EVENT_BEAT_POKEMONTOWER_3_TRAINER_0 ; 0F1, (D765, bit 1)
- const EVENT_BEAT_POKEMONTOWER_3_TRAINER_1 ; 0F2, (D765, bit 2)
- const EVENT_BEAT_POKEMONTOWER_3_TRAINER_2 ; 0F3, (D765, bit 3)
- const EVENT_0F4 ; 0F4, (D765, bit 4)
- const EVENT_0F5 ; 0F5, (D765, bit 5)
- const EVENT_0F6 ; 0F6, (D765, bit 6)
- const EVENT_0F7 ; 0F7, (D765, bit 7)
- const EVENT_0F8 ; 0F8, (D766, bit 0)
- const EVENT_BEAT_POKEMONTOWER_4_TRAINER_0 ; 0F9, (D766, bit 1)
- const EVENT_BEAT_POKEMONTOWER_4_TRAINER_1 ; 0FA, (D766, bit 2)
- const EVENT_BEAT_POKEMONTOWER_4_TRAINER_2 ; 0FB, (D766, bit 3)
- const EVENT_0FC ; 0FC, (D766, bit 4)
- const EVENT_0FD ; 0FD, (D766, bit 5)
- const EVENT_0FE ; 0FE, (D766, bit 6)
- const EVENT_0FF ; 0FF, (D766, bit 7)
- const EVENT_100 ; 100, (D767, bit 0)
- const EVENT_101 ; 101, (D767, bit 1)
- const EVENT_BEAT_POKEMONTOWER_5_TRAINER_0 ; 102, (D767, bit 2)
- const EVENT_BEAT_POKEMONTOWER_5_TRAINER_1 ; 103, (D767, bit 3)
- const EVENT_BEAT_POKEMONTOWER_5_TRAINER_2 ; 104, (D767, bit 4)
- const EVENT_BEAT_POKEMONTOWER_5_TRAINER_3 ; 105, (D767, bit 5)
- const EVENT_106 ; 106, (D767, bit 6)
- const EVENT_IN_PURIFIED_ZONE ; 107, (D767, bit 7)
- const EVENT_108 ; 108, (D768, bit 0)
- const EVENT_BEAT_POKEMONTOWER_6_TRAINER_0 ; 109, (D768, bit 1)
- const EVENT_BEAT_POKEMONTOWER_6_TRAINER_1 ; 10A, (D768, bit 2)
- const EVENT_BEAT_POKEMONTOWER_6_TRAINER_2 ; 10B, (D768, bit 3)
- const EVENT_10C ; 10C, (D768, bit 4)
- const EVENT_10D ; 10D, (D768, bit 5)
- const EVENT_10E ; 10E, (D768, bit 6)
- const EVENT_BEAT_GHOST_MAROWAK ; 10F, (D768, bit 7)
- const EVENT_110 ; 110, (D769, bit 0)
- const EVENT_BEAT_POKEMONTOWER_7_TRAINER_0 ; 111, (D769, bit 1)
- const EVENT_BEAT_POKEMONTOWER_7_TRAINER_1 ; 112, (D769, bit 2)
- const EVENT_BEAT_POKEMONTOWER_7_TRAINER_2 ; 113, (D769, bit 3)
- const EVENT_114 ; 114, (D769, bit 4)
- const EVENT_115 ; 115, (D769, bit 5)
- const EVENT_116 ; 116, (D769, bit 6)
- const EVENT_RESCUED_MR_FUJI_2 ; 117, (D769, bit 7)
- const EVENT_118 ; 118, (D76A, bit 0)
- const EVENT_119 ; 119, (D76A, bit 1)
- const EVENT_11A ; 11A, (D76A, bit 2)
- const EVENT_11B ; 11B, (D76A, bit 3)
- const EVENT_11C ; 11C, (D76A, bit 4)
- const EVENT_11D ; 11D, (D76A, bit 5)
- const EVENT_11E ; 11E, (D76A, bit 6)
- const EVENT_11F ; 11F, (D76A, bit 7)
- const EVENT_120 ; 120, (D76B, bit 0)
- const EVENT_121 ; 121, (D76B, bit 1)
- const EVENT_122 ; 122, (D76B, bit 2)
- const EVENT_123 ; 123, (D76B, bit 3)
- const EVENT_124 ; 124, (D76B, bit 4)
- const EVENT_125 ; 125, (D76B, bit 5)
- const EVENT_126 ; 126, (D76B, bit 6)
- const EVENT_127 ; 127, (D76B, bit 7)
- const EVENT_GOT_POKE_FLUTE ; 128, (D76C, bit 0)
- const EVENT_129 ; 129, (D76C, bit 1)
- const EVENT_12A ; 12A, (D76C, bit 2)
- const EVENT_12B ; 12B, (D76C, bit 3)
- const EVENT_12C ; 12C, (D76C, bit 4)
- const EVENT_12D ; 12D, (D76C, bit 5)
- const EVENT_12E ; 12E, (D76C, bit 6)
- const EVENT_12F ; 12F, (D76C, bit 7)
- const EVENT_130 ; 130, (D76D, bit 0)
- const EVENT_131 ; 131, (D76D, bit 1)
- const EVENT_132 ; 132, (D76D, bit 2)
- const EVENT_133 ; 133, (D76D, bit 3)
- const EVENT_134 ; 134, (D76D, bit 4)
- const EVENT_135 ; 135, (D76D, bit 5)
- const EVENT_136 ; 136, (D76D, bit 6)
- const EVENT_137 ; 137, (D76D, bit 7)
- const EVENT_138 ; 138, (D76E, bit 0)
- const EVENT_139 ; 139, (D76E, bit 1)
- const EVENT_13A ; 13A, (D76E, bit 2)
- const EVENT_13B ; 13B, (D76E, bit 3)
- const EVENT_13C ; 13C, (D76E, bit 4)
- const EVENT_13D ; 13D, (D76E, bit 5)
- const EVENT_13E ; 13E, (D76E, bit 6)
- const EVENT_13F ; 13F, (D76E, bit 7)
- const EVENT_140 ; 140, (D76F, bit 0)
- const EVENT_141 ; 141, (D76F, bit 1)
- const EVENT_142 ; 142, (D76F, bit 2)
- const EVENT_143 ; 143, (D76F, bit 3)
- const EVENT_144 ; 144, (D76F, bit 4)
- const EVENT_145 ; 145, (D76F, bit 5)
- const EVENT_146 ; 146, (D76F, bit 6)
- const EVENT_GOT_SQUIRTLE_FROM_OFFICER_JENNY ; 147, (D76F, bit 7)
- const EVENT_148 ; 148, (D770, bit 0)
- const EVENT_149 ; 149, (D770, bit 1)
- const EVENT_14A ; 14A, (D770, bit 2)
- const EVENT_14B ; 14B, (D770, bit 3)
- const EVENT_14C ; 14C, (D770, bit 4)
- const EVENT_14D ; 14D, (D770, bit 5)
- const EVENT_14E ; 14E, (D770, bit 6)
- const EVENT_14F ; 14F, (D770, bit 7)
- const EVENT_150 ; 150, (D771, bit 0)
- const EVENT_GOT_BIKE_VOUCHER ; 151, (D771, bit 1)
- const EVENT_152 ; 152, (D771, bit 2)
- const EVENT_153 ; 153, (D771, bit 3)
- const EVENT_154 ; 154, (D771, bit 4)
- const EVENT_155 ; 155, (D771, bit 5)
- const EVENT_SEEL_FAN_BOAST ; 156, (D771, bit 6)
- const EVENT_PIKACHU_FAN_BOAST ; 157, (D771, bit 7)
- const EVENT_158 ; 158, (D772, bit 0)
- const EVENT_159 ; 159, (D772, bit 1)
- const EVENT_15A ; 15A, (D772, bit 2)
- const EVENT_15B ; 15B, (D772, bit 3)
- const EVENT_15C ; 15C, (D772, bit 4)
- const EVENT_15D ; 15D, (D772, bit 5)
- const EVENT_15E ; 15E, (D772, bit 6)
- const EVENT_15F ; 15F, (D772, bit 7)
- const EVENT_2ND_LOCK_OPENED ; 160, (D773, bit 0)
- const EVENT_1ST_LOCK_OPENED ; 161, (D773, bit 1)
- const EVENT_BEAT_VERMILION_GYM_TRAINER_0 ; 162, (D773, bit 2)
- const EVENT_BEAT_VERMILION_GYM_TRAINER_1 ; 163, (D773, bit 3)
- const EVENT_BEAT_VERMILION_GYM_TRAINER_2 ; 164, (D773, bit 4)
- const EVENT_165 ; 165, (D773, bit 5)
- const EVENT_GOT_TM24 ; 166, (D773, bit 6)
- const EVENT_BEAT_LT_SURGE ; 167, (D773, bit 7)
- const EVENT_168 ; 168, (D774, bit 0)
- const EVENT_169 ; 169, (D774, bit 1)
- const EVENT_16A ; 16A, (D774, bit 2)
- const EVENT_16B ; 16B, (D774, bit 3)
- const EVENT_16C ; 16C, (D774, bit 4)
- const EVENT_16D ; 16D, (D774, bit 5)
- const EVENT_16E ; 16E, (D774, bit 6)
- const EVENT_16F ; 16F, (D774, bit 7)
- const EVENT_170 ; 170, (D775, bit 0)
- const EVENT_171 ; 171, (D775, bit 1)
- const EVENT_172 ; 172, (D775, bit 2)
- const EVENT_173 ; 173, (D775, bit 3)
- const EVENT_174 ; 174, (D775, bit 4)
- const EVENT_175 ; 175, (D775, bit 5)
- const EVENT_176 ; 176, (D775, bit 6)
- const EVENT_177 ; 177, (D775, bit 7)
- const EVENT_178 ; 178, (D776, bit 0)
- const EVENT_179 ; 179, (D776, bit 1)
- const EVENT_17A ; 17A, (D776, bit 2)
- const EVENT_17B ; 17B, (D776, bit 3)
- const EVENT_17C ; 17C, (D776, bit 4)
- const EVENT_17D ; 17D, (D776, bit 5)
- const EVENT_17E ; 17E, (D776, bit 6)
- const EVENT_17F ; 17F, (D776, bit 7)
- const EVENT_GOT_TM41 ; 180, (D777, bit 0)
- const EVENT_181 ; 181, (D777, bit 1)
- const EVENT_182 ; 182, (D777, bit 2)
- const EVENT_183 ; 183, (D777, bit 3)
- const EVENT_184 ; 184, (D777, bit 4)
- const EVENT_185 ; 185, (D777, bit 5)
- const EVENT_186 ; 186, (D777, bit 6)
- const EVENT_187 ; 187, (D777, bit 7)
- const EVENT_188 ; 188, (D778, bit 0)
- const EVENT_189 ; 189, (D778, bit 1)
- const EVENT_18A ; 18A, (D778, bit 2)
- const EVENT_18B ; 18B, (D778, bit 3)
- const EVENT_GOT_TM13 ; 18C, (D778, bit 4)
- const EVENT_GOT_TM48 ; 18D, (D778, bit 5)
- const EVENT_GOT_TM49 ; 18E, (D778, bit 6)
- const EVENT_GOT_TM18 ; 18F, (D778, bit 7)
- const EVENT_190 ; 190, (D779, bit 0)
- const EVENT_191 ; 191, (D779, bit 1)
- const EVENT_192 ; 192, (D779, bit 2)
- const EVENT_193 ; 193, (D779, bit 3)
- const EVENT_194 ; 194, (D779, bit 4)
- const EVENT_195 ; 195, (D779, bit 5)
- const EVENT_196 ; 196, (D779, bit 6)
- const EVENT_197 ; 197, (D779, bit 7)
- const EVENT_198 ; 198, (D77A, bit 0)
- const EVENT_199 ; 199, (D77A, bit 1)
- const EVENT_19A ; 19A, (D77A, bit 2)
- const EVENT_19B ; 19B, (D77A, bit 3)
- const EVENT_19C ; 19C, (D77A, bit 4)
- const EVENT_19D ; 19D, (D77A, bit 5)
- const EVENT_19E ; 19E, (D77A, bit 6)
- const EVENT_19F ; 19F, (D77A, bit 7)
- const EVENT_1A0 ; 1A0, (D77B, bit 0)
- const EVENT_1A1 ; 1A1, (D77B, bit 1)
- const EVENT_1A2 ; 1A2, (D77B, bit 2)
- const EVENT_1A3 ; 1A3, (D77B, bit 3)
- const EVENT_1A4 ; 1A4, (D77B, bit 4)
- const EVENT_1A5 ; 1A5, (D77B, bit 5)
- const EVENT_1A6 ; 1A6, (D77B, bit 6)
- const EVENT_1A7 ; 1A7, (D77B, bit 7)
- const EVENT_GOT_TM21 ; 1A8, (D77C, bit 0)
- const EVENT_BEAT_ERIKA ; 1A9, (D77C, bit 1)
- const EVENT_BEAT_CELADON_GYM_TRAINER_0 ; 1AA, (D77C, bit 2)
- const EVENT_BEAT_CELADON_GYM_TRAINER_1 ; 1AB, (D77C, bit 3)
- const EVENT_BEAT_CELADON_GYM_TRAINER_2 ; 1AC, (D77C, bit 4)
- const EVENT_BEAT_CELADON_GYM_TRAINER_3 ; 1AD, (D77C, bit 5)
- const EVENT_BEAT_CELADON_GYM_TRAINER_4 ; 1AE, (D77C, bit 6)
- const EVENT_BEAT_CELADON_GYM_TRAINER_5 ; 1AF, (D77C, bit 7)
- const EVENT_BEAT_CELADON_GYM_TRAINER_6 ; 1B0, (D77D, bit 0)
- const EVENT_1B1 ; 1B1, (D77D, bit 1)
- const EVENT_1B2 ; 1B2, (D77D, bit 2)
- const EVENT_1B3 ; 1B3, (D77D, bit 3)
- const EVENT_1B4 ; 1B4, (D77D, bit 4)
- const EVENT_1B5 ; 1B5, (D77D, bit 5)
- const EVENT_1B6 ; 1B6, (D77D, bit 6)
- const EVENT_1B7 ; 1B7, (D77D, bit 7)
- const EVENT_1B8 ; 1B8, (D77E, bit 0)
- const EVENT_FOUND_ROCKET_HIDEOUT ; 1B9, (D77E, bit 1)
- const EVENT_GOT_10_COINS ; 1BA, (D77E, bit 2)
- const EVENT_GOT_20_COINS ; 1BB, (D77E, bit 3)
- const EVENT_GOT_20_COINS_2 ; 1BC, (D77E, bit 4)
- const EVENT_1BD ; 1BD, (D77E, bit 5)
- const EVENT_1BE ; 1BE, (D77E, bit 6)
- const EVENT_1BF ; 1BF, (D77E, bit 7)
- const EVENT_1C0 ; 1C0, (D77F, bit 0)
- const EVENT_1C1 ; 1C1, (D77F, bit 1)
- const EVENT_1C2 ; 1C2, (D77F, bit 2)
- const EVENT_1C3 ; 1C3, (D77F, bit 3)
- const EVENT_1C4 ; 1C4, (D77F, bit 4)
- const EVENT_1C5 ; 1C5, (D77F, bit 5)
- const EVENT_1C6 ; 1C6, (D77F, bit 6)
- const EVENT_1C7 ; 1C7, (D77F, bit 7)
- const EVENT_1C8 ; 1C8, (D780, bit 0)
- const EVENT_1C9 ; 1C9, (D780, bit 1)
- const EVENT_1CA ; 1CA, (D780, bit 2)
- const EVENT_1CB ; 1CB, (D780, bit 3)
- const EVENT_1CC ; 1CC, (D780, bit 4)
- const EVENT_1CD ; 1CD, (D780, bit 5)
- const EVENT_1CE ; 1CE, (D780, bit 6)
- const EVENT_1CF ; 1CF, (D780, bit 7)
- const EVENT_1D0 ; 1D0, (D781, bit 0)
- const EVENT_1D1 ; 1D1, (D781, bit 1)
- const EVENT_1D2 ; 1D2, (D781, bit 2)
- const EVENT_1D3 ; 1D3, (D781, bit 3)
- const EVENT_1D4 ; 1D4, (D781, bit 4)
- const EVENT_1D5 ; 1D5, (D781, bit 5)
- const EVENT_1D6 ; 1D6, (D781, bit 6)
- const EVENT_1D7 ; 1D7, (D781, bit 7)
- const EVENT_1D8 ; 1D8, (D782, bit 0)
- const EVENT_1D9 ; 1D9, (D782, bit 1)
- const EVENT_1DA ; 1DA, (D782, bit 2)
- const EVENT_1DB ; 1DB, (D782, bit 3)
- const EVENT_1DC ; 1DC, (D782, bit 4)
- const EVENT_1DD ; 1DD, (D782, bit 5)
- const EVENT_1DE ; 1DE, (D782, bit 6)
- const EVENT_1DF ; 1DF, (D782, bit 7)
- const EVENT_GOT_COIN_CASE ; 1E0, (D783, bit 0)
- const EVENT_1E1 ; 1E1, (D783, bit 1)
- const EVENT_1E2 ; 1E2, (D783, bit 2)
- const EVENT_1E3 ; 1E3, (D783, bit 3)
- const EVENT_1E4 ; 1E4, (D783, bit 4)
- const EVENT_1E5 ; 1E5, (D783, bit 5)
- const EVENT_1E6 ; 1E6, (D783, bit 6)
- const EVENT_1E7 ; 1E7, (D783, bit 7)
- const EVENT_1E8 ; 1E8, (D784, bit 0)
- const EVENT_1E9 ; 1E9, (D784, bit 1)
- const EVENT_1EA ; 1EA, (D784, bit 2)
- const EVENT_1EB ; 1EB, (D784, bit 3)
- const EVENT_1EC ; 1EC, (D784, bit 4)
- const EVENT_1ED ; 1ED, (D784, bit 5)
- const EVENT_1EE ; 1EE, (D784, bit 6)
- const EVENT_1EF ; 1EF, (D784, bit 7)
- const EVENT_1F0 ; 1F0, (D785, bit 0)
- const EVENT_1F1 ; 1F1, (D785, bit 1)
- const EVENT_1F2 ; 1F2, (D785, bit 2)
- const EVENT_1F3 ; 1F3, (D785, bit 3)
- const EVENT_1F4 ; 1F4, (D785, bit 4)
- const EVENT_1F5 ; 1F5, (D785, bit 5)
- const EVENT_1F6 ; 1F6, (D785, bit 6)
- const EVENT_1F7 ; 1F7, (D785, bit 7)
- const EVENT_1F8 ; 1F8, (D786, bit 0)
- const EVENT_1F9 ; 1F9, (D786, bit 1)
- const EVENT_1FA ; 1FA, (D786, bit 2)
- const EVENT_1FB ; 1FB, (D786, bit 3)
- const EVENT_1FC ; 1FC, (D786, bit 4)
- const EVENT_1FD ; 1FD, (D786, bit 5)
- const EVENT_1FE ; 1FE, (D786, bit 6)
- const EVENT_1FF ; 1FF, (D786, bit 7)
- const EVENT_200 ; 200, (D787, bit 0)
- const EVENT_201 ; 201, (D787, bit 1)
- const EVENT_202 ; 202, (D787, bit 2)
- const EVENT_203 ; 203, (D787, bit 3)
- const EVENT_204 ; 204, (D787, bit 4)
- const EVENT_205 ; 205, (D787, bit 5)
- const EVENT_206 ; 206, (D787, bit 6)
- const EVENT_207 ; 207, (D787, bit 7)
- const EVENT_208 ; 208, (D788, bit 0)
- const EVENT_209 ; 209, (D788, bit 1)
- const EVENT_20A ; 20A, (D788, bit 2)
- const EVENT_20B ; 20B, (D788, bit 3)
- const EVENT_20C ; 20C, (D788, bit 4)
- const EVENT_20D ; 20D, (D788, bit 5)
- const EVENT_20E ; 20E, (D788, bit 6)
- const EVENT_20F ; 20F, (D788, bit 7)
- const EVENT_210 ; 210, (D789, bit 0)
- const EVENT_211 ; 211, (D789, bit 1)
- const EVENT_212 ; 212, (D789, bit 2)
- const EVENT_213 ; 213, (D789, bit 3)
- const EVENT_214 ; 214, (D789, bit 4)
- const EVENT_215 ; 215, (D789, bit 5)
- const EVENT_216 ; 216, (D789, bit 6)
- const EVENT_217 ; 217, (D789, bit 7)
- const EVENT_218 ; 218, (D78A, bit 0)
- const EVENT_219 ; 219, (D78A, bit 1)
- const EVENT_21A ; 21A, (D78A, bit 2)
- const EVENT_21B ; 21B, (D78A, bit 3)
- const EVENT_21C ; 21C, (D78A, bit 4)
- const EVENT_21D ; 21D, (D78A, bit 5)
- const EVENT_21E ; 21E, (D78A, bit 6)
- const EVENT_21F ; 21F, (D78A, bit 7)
- const EVENT_220 ; 220, (D78B, bit 0)
- const EVENT_221 ; 221, (D78B, bit 1)
- const EVENT_222 ; 222, (D78B, bit 2)
- const EVENT_223 ; 223, (D78B, bit 3)
- const EVENT_224 ; 224, (D78B, bit 4)
- const EVENT_225 ; 225, (D78B, bit 5)
- const EVENT_226 ; 226, (D78B, bit 6)
- const EVENT_227 ; 227, (D78B, bit 7)
- const EVENT_228 ; 228, (D78C, bit 0)
- const EVENT_229 ; 229, (D78C, bit 1)
- const EVENT_22A ; 22A, (D78C, bit 2)
- const EVENT_22B ; 22B, (D78C, bit 3)
- const EVENT_22C ; 22C, (D78C, bit 4)
- const EVENT_22D ; 22D, (D78C, bit 5)
- const EVENT_22E ; 22E, (D78C, bit 6)
- const EVENT_22F ; 22F, (D78C, bit 7)
- const EVENT_230 ; 230, (D78D, bit 0)
- const EVENT_231 ; 231, (D78D, bit 1)
- const EVENT_232 ; 232, (D78D, bit 2)
- const EVENT_233 ; 233, (D78D, bit 3)
- const EVENT_234 ; 234, (D78D, bit 4)
- const EVENT_235 ; 235, (D78D, bit 5)
- const EVENT_236 ; 236, (D78D, bit 6)
- const EVENT_237 ; 237, (D78D, bit 7)
- const EVENT_GOT_HM04 ; 238, (D78E, bit 0)
- const EVENT_GAVE_GOLD_TEETH ; 239, (D78E, bit 1)
- const EVENT_23A ; 23A, (D78E, bit 2)
- const EVENT_23B ; 23B, (D78E, bit 3)
- const EVENT_23C ; 23C, (D78E, bit 4)
- const EVENT_23D ; 23D, (D78E, bit 5)
- const EVENT_23E ; 23E, (D78E, bit 6)
- const EVENT_23F ; 23F, (D78E, bit 7)
- const EVENT_240 ; 240, (D78F, bit 0)
- const EVENT_241 ; 241, (D78F, bit 1)
- const EVENT_242 ; 242, (D78F, bit 2)
- const EVENT_243 ; 243, (D78F, bit 3)
- const EVENT_244 ; 244, (D78F, bit 4)
- const EVENT_245 ; 245, (D78F, bit 5)
- const EVENT_246 ; 246, (D78F, bit 6)
- const EVENT_247 ; 247, (D78F, bit 7)
- const EVENT_248 ; 248, (D790, bit 0)
- const EVENT_249 ; 249, (D790, bit 1)
- const EVENT_24A ; 24A, (D790, bit 2)
- const EVENT_24B ; 24B, (D790, bit 3)
- const EVENT_24C ; 24C, (D790, bit 4)
- const EVENT_24D ; 24D, (D790, bit 5)
- const EVENT_SAFARI_GAME_OVER ; 24E, (D790, bit 6)
- const EVENT_IN_SAFARI_ZONE ; 24F, (D790, bit 7)
- const EVENT_250 ; 250, (D791, bit 0)
- const EVENT_251 ; 251, (D791, bit 1)
- const EVENT_252 ; 252, (D791, bit 2)
- const EVENT_253 ; 253, (D791, bit 3)
- const EVENT_254 ; 254, (D791, bit 4)
- const EVENT_255 ; 255, (D791, bit 5)
- const EVENT_256 ; 256, (D791, bit 6)
- const EVENT_257 ; 257, (D791, bit 7)
- const EVENT_GOT_TM06 ; 258, (D792, bit 0)
- const EVENT_BEAT_KOGA ; 259, (D792, bit 1)
- const EVENT_BEAT_FUCHSIA_GYM_TRAINER_0 ; 25A, (D792, bit 2)
- const EVENT_BEAT_FUCHSIA_GYM_TRAINER_1 ; 25B, (D792, bit 3)
- const EVENT_BEAT_FUCHSIA_GYM_TRAINER_2 ; 25C, (D792, bit 4)
- const EVENT_BEAT_FUCHSIA_GYM_TRAINER_3 ; 25D, (D792, bit 5)
- const EVENT_BEAT_FUCHSIA_GYM_TRAINER_4 ; 25E, (D792, bit 6)
- const EVENT_BEAT_FUCHSIA_GYM_TRAINER_5 ; 25F, (D792, bit 7)
- const EVENT_260 ; 260, (D793, bit 0)
- const EVENT_261 ; 261, (D793, bit 1)
- const EVENT_262 ; 262, (D793, bit 2)
- const EVENT_263 ; 263, (D793, bit 3)
- const EVENT_264 ; 264, (D793, bit 4)
- const EVENT_265 ; 265, (D793, bit 5)
- const EVENT_266 ; 266, (D793, bit 6)
- const EVENT_267 ; 267, (D793, bit 7)
- const EVENT_268 ; 268, (D794, bit 0)
- const EVENT_269 ; 269, (D794, bit 1)
- const EVENT_26A ; 26A, (D794, bit 2)
- const EVENT_26B ; 26B, (D794, bit 3)
- const EVENT_26C ; 26C, (D794, bit 4)
- const EVENT_26D ; 26D, (D794, bit 5)
- const EVENT_26E ; 26E, (D794, bit 6)
- const EVENT_26F ; 26F, (D794, bit 7)
- const EVENT_270 ; 270, (D795, bit 0)
- const EVENT_271 ; 271, (D795, bit 1)
- const EVENT_272 ; 272, (D795, bit 2)
- const EVENT_273 ; 273, (D795, bit 3)
- const EVENT_274 ; 274, (D795, bit 4)
- const EVENT_275 ; 275, (D795, bit 5)
- const EVENT_276 ; 276, (D795, bit 6)
- const EVENT_277 ; 277, (D795, bit 7)
- const EVENT_MANSION_SWITCH_ON ; 278, (D796, bit 0)
- const EVENT_279 ; 279, (D796, bit 1)
- const EVENT_27A ; 27A, (D796, bit 2)
- const EVENT_27B ; 27B, (D796, bit 3)
- const EVENT_27C ; 27C, (D796, bit 4)
- const EVENT_27D ; 27D, (D796, bit 5)
- const EVENT_27E ; 27E, (D796, bit 6)
- const EVENT_27F ; 27F, (D796, bit 7)
- const EVENT_280 ; 280, (D797, bit 0)
- const EVENT_281 ; 281, (D797, bit 1)
- const EVENT_282 ; 282, (D797, bit 2)
- const EVENT_283 ; 283, (D797, bit 3)
- const EVENT_284 ; 284, (D797, bit 4)
- const EVENT_285 ; 285, (D797, bit 5)
- const EVENT_286 ; 286, (D797, bit 6)
- const EVENT_287 ; 287, (D797, bit 7)
- const EVENT_288 ; 288, (D798, bit 0)
- const EVENT_BEAT_MANSION_1_TRAINER_0 ; 289, (D798, bit 1)
- const EVENT_28A ; 28A, (D798, bit 2)
- const EVENT_28B ; 28B, (D798, bit 3)
- const EVENT_28C ; 28C, (D798, bit 4)
- const EVENT_28D ; 28D, (D798, bit 5)
- const EVENT_28E ; 28E, (D798, bit 6)
- const EVENT_28F ; 28F, (D798, bit 7)
- const EVENT_290 ; 290, (D799, bit 0)
- const EVENT_291 ; 291, (D799, bit 1)
- const EVENT_292 ; 292, (D799, bit 2)
- const EVENT_293 ; 293, (D799, bit 3)
- const EVENT_294 ; 294, (D799, bit 4)
- const EVENT_295 ; 295, (D799, bit 5)
- const EVENT_296 ; 296, (D799, bit 6)
- const EVENT_297 ; 297, (D799, bit 7)
- const EVENT_GOT_TM38 ; 298, (D79A, bit 0)
- const EVENT_BEAT_BLAINE ; 299, (D79A, bit 1)
- const EVENT_BEAT_CINNABAR_GYM_TRAINER_0 ; 29A, (D79A, bit 2)
- const EVENT_BEAT_CINNABAR_GYM_TRAINER_1 ; 29B, (D79A, bit 3)
- const EVENT_BEAT_CINNABAR_GYM_TRAINER_2 ; 29C, (D79A, bit 4)
- const EVENT_BEAT_CINNABAR_GYM_TRAINER_3 ; 29D, (D79A, bit 5)
- const EVENT_BEAT_CINNABAR_GYM_TRAINER_4 ; 29E, (D79A, bit 6)
- const EVENT_BEAT_CINNABAR_GYM_TRAINER_5 ; 29F, (D79A, bit 7)
- const EVENT_BEAT_CINNABAR_GYM_TRAINER_6 ; 2A0, (D79B, bit 0)
- const EVENT_2A1 ; 2A1, (D79B, bit 1)
- const EVENT_2A2 ; 2A2, (D79B, bit 2)
- const EVENT_2A3 ; 2A3, (D79B, bit 3)
- const EVENT_2A4 ; 2A4, (D79B, bit 4)
- const EVENT_2A5 ; 2A5, (D79B, bit 5)
- const EVENT_2A6 ; 2A6, (D79B, bit 6)
- const EVENT_2A7 ; 2A7, (D79B, bit 7)
- const EVENT_CINNABAR_GYM_GATE0_UNLOCKED ; 2A8, (D79C, bit 0) doesn't exist, but the bit is set
- const EVENT_CINNABAR_GYM_GATE1_UNLOCKED ; 2A9, (D79C, bit 1)
- const EVENT_CINNABAR_GYM_GATE2_UNLOCKED ; 2AA, (D79C, bit 2)
- const EVENT_CINNABAR_GYM_GATE3_UNLOCKED ; 2AB, (D79C, bit 3)
- const EVENT_CINNABAR_GYM_GATE4_UNLOCKED ; 2AC, (D79C, bit 4)
- const EVENT_CINNABAR_GYM_GATE5_UNLOCKED ; 2AD, (D79C, bit 5)
- const EVENT_CINNABAR_GYM_GATE6_UNLOCKED ; 2AE, (D79C, bit 6)
- const EVENT_2AF ; 2AF, (D79C, bit 7)
- const EVENT_2B0 ; 2B0, (D79D, bit 0)
- const EVENT_2B1 ; 2B1, (D79D, bit 1)
- const EVENT_2B2 ; 2B2, (D79D, bit 2)
- const EVENT_2B3 ; 2B3, (D79D, bit 3)
- const EVENT_2B4 ; 2B4, (D79D, bit 4)
- const EVENT_2B5 ; 2B5, (D79D, bit 5)
- const EVENT_2B6 ; 2B6, (D79D, bit 6)
- const EVENT_2B7 ; 2B7, (D79D, bit 7)
- const EVENT_2B8 ; 2B8, (D79E, bit 0)
- const EVENT_2B9 ; 2B9, (D79E, bit 1)
- const EVENT_2BA ; 2BA, (D79E, bit 2)
- const EVENT_2BB ; 2BB, (D79E, bit 3)
- const EVENT_2BC ; 2BC, (D79E, bit 4)
- const EVENT_2BD ; 2BD, (D79E, bit 5)
- const EVENT_2BE ; 2BE, (D79E, bit 6)
- const EVENT_2BF ; 2BF, (D79E, bit 7)
- const EVENT_2C0 ; 2C0, (D79F, bit 0)
- const EVENT_2C1 ; 2C1, (D79F, bit 1)
- const EVENT_2C2 ; 2C2, (D79F, bit 2)
- const EVENT_2C3 ; 2C3, (D79F, bit 3)
- const EVENT_2C4 ; 2C4, (D79F, bit 4)
- const EVENT_2C5 ; 2C5, (D79F, bit 5)
- const EVENT_2C6 ; 2C6, (D79F, bit 6)
- const EVENT_2C7 ; 2C7, (D79F, bit 7)
- const EVENT_2C8 ; 2C8, (D7A0, bit 0)
- const EVENT_2C9 ; 2C9, (D7A0, bit 1)
- const EVENT_2CA ; 2CA, (D7A0, bit 2)
- const EVENT_2CB ; 2CB, (D7A0, bit 3)
- const EVENT_2CC ; 2CC, (D7A0, bit 4)
- const EVENT_2CD ; 2CD, (D7A0, bit 5)
- const EVENT_2CE ; 2CE, (D7A0, bit 6)
- const EVENT_2CF ; 2CF, (D7A0, bit 7)
- const EVENT_2D0 ; 2D0, (D7A1, bit 0)
- const EVENT_2D1 ; 2D1, (D7A1, bit 1)
- const EVENT_2D2 ; 2D2, (D7A1, bit 2)
- const EVENT_2D3 ; 2D3, (D7A1, bit 3)
- const EVENT_2D4 ; 2D4, (D7A1, bit 4)
- const EVENT_2D5 ; 2D5, (D7A1, bit 5)
- const EVENT_2D6 ; 2D6, (D7A1, bit 6)
- const EVENT_GOT_TM35 ; 2D7, (D7A1, bit 7)
- const EVENT_2D8 ; 2D8, (D7A2, bit 0)
- const EVENT_2D9 ; 2D9, (D7A2, bit 1)
- const EVENT_2DA ; 2DA, (D7A2, bit 2)
- const EVENT_2DB ; 2DB, (D7A2, bit 3)
- const EVENT_2DC ; 2DC, (D7A2, bit 4)
- const EVENT_2DD ; 2DD, (D7A2, bit 5)
- const EVENT_2DE ; 2DE, (D7A2, bit 6)
- const EVENT_2DF ; 2DF, (D7A2, bit 7)
- const EVENT_GAVE_FOSSIL_TO_LAB ; 2E0, (D7A3, bit 0)
- const EVENT_LAB_STILL_REVIVING_FOSSIL ; 2E1, (D7A3, bit 1)
- const EVENT_LAB_HANDING_OVER_FOSSIL_MON ; 2E2, (D7A3, bit 2)
- const EVENT_2E3 ; 2E3, (D7A3, bit 3)
- const EVENT_2E4 ; 2E4, (D7A3, bit 4)
- const EVENT_2E5 ; 2E5, (D7A3, bit 5)
- const EVENT_2E6 ; 2E6, (D7A3, bit 6)
- const EVENT_2E7 ; 2E7, (D7A3, bit 7)
- const EVENT_2E8 ; 2E8, (D7A4, bit 0)
- const EVENT_2E9 ; 2E9, (D7A4, bit 1)
- const EVENT_2EA ; 2EA, (D7A4, bit 2)
- const EVENT_2EB ; 2EB, (D7A4, bit 3)
- const EVENT_2EC ; 2EC, (D7A4, bit 4)
- const EVENT_2ED ; 2ED, (D7A4, bit 5)
- const EVENT_2EE ; 2EE, (D7A4, bit 6)
- const EVENT_2EF ; 2EF, (D7A4, bit 7)
- const EVENT_2F0 ; 2F0, (D7A5, bit 0)
- const EVENT_2F1 ; 2F1, (D7A5, bit 1)
- const EVENT_2F2 ; 2F2, (D7A5, bit 2)
- const EVENT_2F3 ; 2F3, (D7A5, bit 3)
- const EVENT_2F4 ; 2F4, (D7A5, bit 4)
- const EVENT_2F5 ; 2F5, (D7A5, bit 5)
- const EVENT_2F6 ; 2F6, (D7A5, bit 6)
- const EVENT_2F7 ; 2F7, (D7A5, bit 7)
- const EVENT_2F8 ; 2F8, (D7A6, bit 0)
- const EVENT_2F9 ; 2F9, (D7A6, bit 1)
- const EVENT_2FA ; 2FA, (D7A6, bit 2)
- const EVENT_2FB ; 2FB, (D7A6, bit 3)
- const EVENT_2FC ; 2FC, (D7A6, bit 4)
- const EVENT_2FD ; 2FD, (D7A6, bit 5)
- const EVENT_2FE ; 2FE, (D7A6, bit 6)
- const EVENT_2FF ; 2FF, (D7A6, bit 7)
- const EVENT_300 ; 300, (D7A7, bit 0)
- const EVENT_301 ; 301, (D7A7, bit 1)
- const EVENT_302 ; 302, (D7A7, bit 2)
- const EVENT_303 ; 303, (D7A7, bit 3)
- const EVENT_304 ; 304, (D7A7, bit 4)
- const EVENT_305 ; 305, (D7A7, bit 5)
- const EVENT_306 ; 306, (D7A7, bit 6)
- const EVENT_307 ; 307, (D7A7, bit 7)
- const EVENT_308 ; 308, (D7A8, bit 0)
- const EVENT_309 ; 309, (D7A8, bit 1)
- const EVENT_30A ; 30A, (D7A8, bit 2)
- const EVENT_30B ; 30B, (D7A8, bit 3)
- const EVENT_30C ; 30C, (D7A8, bit 4)
- const EVENT_30D ; 30D, (D7A8, bit 5)
- const EVENT_30E ; 30E, (D7A8, bit 6)
- const EVENT_30F ; 30F, (D7A8, bit 7)
- const EVENT_310 ; 310, (D7A9, bit 0)
- const EVENT_311 ; 311, (D7A9, bit 1)
- const EVENT_312 ; 312, (D7A9, bit 2)
- const EVENT_313 ; 313, (D7A9, bit 3)
- const EVENT_314 ; 314, (D7A9, bit 4)
- const EVENT_315 ; 315, (D7A9, bit 5)
- const EVENT_316 ; 316, (D7A9, bit 6)
- const EVENT_317 ; 317, (D7A9, bit 7)
- const EVENT_318 ; 318, (D7AA, bit 0)
- const EVENT_319 ; 319, (D7AA, bit 1)
- const EVENT_31A ; 31A, (D7AA, bit 2)
- const EVENT_31B ; 31B, (D7AA, bit 3)
- const EVENT_31C ; 31C, (D7AA, bit 4)
- const EVENT_31D ; 31D, (D7AA, bit 5)
- const EVENT_31E ; 31E, (D7AA, bit 6)
- const EVENT_31F ; 31F, (D7AA, bit 7)
- const EVENT_320 ; 320, (D7AB, bit 0)
- const EVENT_321 ; 321, (D7AB, bit 1)
- const EVENT_322 ; 322, (D7AB, bit 2)
- const EVENT_323 ; 323, (D7AB, bit 3)
- const EVENT_324 ; 324, (D7AB, bit 4)
- const EVENT_325 ; 325, (D7AB, bit 5)
- const EVENT_326 ; 326, (D7AB, bit 6)
- const EVENT_327 ; 327, (D7AB, bit 7)
- const EVENT_328 ; 328, (D7AC, bit 0)
- const EVENT_329 ; 329, (D7AC, bit 1)
- const EVENT_32A ; 32A, (D7AC, bit 2)
- const EVENT_32B ; 32B, (D7AC, bit 3)
- const EVENT_32C ; 32C, (D7AC, bit 4)
- const EVENT_32D ; 32D, (D7AC, bit 5)
- const EVENT_32E ; 32E, (D7AC, bit 6)
- const EVENT_32F ; 32F, (D7AC, bit 7)
- const EVENT_330 ; 330, (D7AD, bit 0)
- const EVENT_331 ; 331, (D7AD, bit 1)
- const EVENT_332 ; 332, (D7AD, bit 2)
- const EVENT_333 ; 333, (D7AD, bit 3)
- const EVENT_334 ; 334, (D7AD, bit 4)
- const EVENT_335 ; 335, (D7AD, bit 5)
- const EVENT_336 ; 336, (D7AD, bit 6)
- const EVENT_337 ; 337, (D7AD, bit 7)
- const EVENT_338 ; 338, (D7AE, bit 0)
- const EVENT_339 ; 339, (D7AE, bit 1)
- const EVENT_33A ; 33A, (D7AE, bit 2)
- const EVENT_33B ; 33B, (D7AE, bit 3)
- const EVENT_33C ; 33C, (D7AE, bit 4)
- const EVENT_33D ; 33D, (D7AE, bit 5)
- const EVENT_33E ; 33E, (D7AE, bit 6)
- const EVENT_33F ; 33F, (D7AE, bit 7)
- const EVENT_GOT_TM31 ; 340, (D7AF, bit 0)
- const EVENT_341 ; 341, (D7AF, bit 1)
- const EVENT_342 ; 342, (D7AF, bit 2)
- const EVENT_343 ; 343, (D7AF, bit 3)
- const EVENT_344 ; 344, (D7AF, bit 4)
- const EVENT_345 ; 345, (D7AF, bit 5)
- const EVENT_346 ; 346, (D7AF, bit 6)
- const EVENT_347 ; 347, (D7AF, bit 7)
- const EVENT_348 ; 348, (D7B0, bit 0)
- const EVENT_349 ; 349, (D7B0, bit 1)
- const EVENT_34A ; 34A, (D7B0, bit 2)
- const EVENT_34B ; 34B, (D7B0, bit 3)
- const EVENT_34C ; 34C, (D7B0, bit 4)
- const EVENT_34D ; 34D, (D7B0, bit 5)
- const EVENT_34E ; 34E, (D7B0, bit 6)
- const EVENT_34F ; 34F, (D7B0, bit 7)
- const EVENT_DEFEATED_FIGHTING_DOJO ; 350, (D7B1, bit 0)
- const EVENT_BEAT_KARATE_MASTER ; 351, (D7B1, bit 1)
- const EVENT_BEAT_FIGHTING_DOJO_TRAINER_0 ; 352, (D7B1, bit 2)
- const EVENT_BEAT_FIGHTING_DOJO_TRAINER_1 ; 353, (D7B1, bit 3)
- const EVENT_BEAT_FIGHTING_DOJO_TRAINER_2 ; 354, (D7B1, bit 4)
- const EVENT_BEAT_FIGHTING_DOJO_TRAINER_3 ; 355, (D7B1, bit 5)
- const EVENT_GOT_HITMONLEE ; 356, (D7B1, bit 6)
- const EVENT_GOT_HITMONCHAN ; 357, (D7B1, bit 7)
- const EVENT_358 ; 358, (D7B2, bit 0)
- const EVENT_359 ; 359, (D7B2, bit 1)
- const EVENT_35A ; 35A, (D7B2, bit 2)
- const EVENT_35B ; 35B, (D7B2, bit 3)
- const EVENT_35C ; 35C, (D7B2, bit 4)
- const EVENT_35D ; 35D, (D7B2, bit 5)
- const EVENT_35E ; 35E, (D7B2, bit 6)
- const EVENT_35F ; 35F, (D7B2, bit 7)
- const EVENT_GOT_TM46 ; 360, (D7B3, bit 0)
- const EVENT_BEAT_SABRINA ; 361, (D7B3, bit 1)
- const EVENT_BEAT_SAFFRON_GYM_TRAINER_0 ; 362, (D7B3, bit 2)
- const EVENT_BEAT_SAFFRON_GYM_TRAINER_1 ; 363, (D7B3, bit 3)
- const EVENT_BEAT_SAFFRON_GYM_TRAINER_2 ; 364, (D7B3, bit 4)
- const EVENT_BEAT_SAFFRON_GYM_TRAINER_3 ; 365, (D7B3, bit 5)
- const EVENT_BEAT_SAFFRON_GYM_TRAINER_4 ; 366, (D7B3, bit 6)
- const EVENT_BEAT_SAFFRON_GYM_TRAINER_5 ; 367, (D7B3, bit 7)
- const EVENT_BEAT_SAFFRON_GYM_TRAINER_6 ; 368, (D7B4, bit 0)
- const EVENT_369 ; 369, (D7B4, bit 1)
- const EVENT_36A ; 36A, (D7B4, bit 2)
- const EVENT_36B ; 36B, (D7B4, bit 3)
- const EVENT_36C ; 36C, (D7B4, bit 4)
- const EVENT_36D ; 36D, (D7B4, bit 5)
- const EVENT_36E ; 36E, (D7B4, bit 6)
- const EVENT_36F ; 36F, (D7B4, bit 7)
- const EVENT_370 ; 370, (D7B5, bit 0)
- const EVENT_371 ; 371, (D7B5, bit 1)
- const EVENT_372 ; 372, (D7B5, bit 2)
- const EVENT_373 ; 373, (D7B5, bit 3)
- const EVENT_374 ; 374, (D7B5, bit 4)
- const EVENT_375 ; 375, (D7B5, bit 5)
- const EVENT_376 ; 376, (D7B5, bit 6)
- const EVENT_377 ; 377, (D7B5, bit 7)
- const EVENT_378 ; 378, (D7B6, bit 0)
- const EVENT_379 ; 379, (D7B6, bit 1)
- const EVENT_37A ; 37A, (D7B6, bit 2)
- const EVENT_37B ; 37B, (D7B6, bit 3)
- const EVENT_37C ; 37C, (D7B6, bit 4)
- const EVENT_37D ; 37D, (D7B6, bit 5)
- const EVENT_37E ; 37E, (D7B6, bit 6)
- const EVENT_37F ; 37F, (D7B6, bit 7)
- const EVENT_380 ; 380, (D7B7, bit 0)
- const EVENT_381 ; 381, (D7B7, bit 1)
- const EVENT_382 ; 382, (D7B7, bit 2)
- const EVENT_383 ; 383, (D7B7, bit 3)
- const EVENT_384 ; 384, (D7B7, bit 4)
- const EVENT_385 ; 385, (D7B7, bit 5)
- const EVENT_386 ; 386, (D7B7, bit 6)
- const EVENT_387 ; 387, (D7B7, bit 7)
- const EVENT_388 ; 388, (D7B8, bit 0)
- const EVENT_389 ; 389, (D7B8, bit 1)
- const EVENT_38A ; 38A, (D7B8, bit 2)
- const EVENT_38B ; 38B, (D7B8, bit 3)
- const EVENT_38C ; 38C, (D7B8, bit 4)
- const EVENT_38D ; 38D, (D7B8, bit 5)
- const EVENT_38E ; 38E, (D7B8, bit 6)
- const EVENT_38F ; 38F, (D7B8, bit 7)
- const EVENT_390 ; 390, (D7B9, bit 0)
- const EVENT_391 ; 391, (D7B9, bit 1)
- const EVENT_392 ; 392, (D7B9, bit 2)
- const EVENT_393 ; 393, (D7B9, bit 3)
- const EVENT_394 ; 394, (D7B9, bit 4)
- const EVENT_395 ; 395, (D7B9, bit 5)
- const EVENT_396 ; 396, (D7B9, bit 6)
- const EVENT_SILPH_CO_RECEPTIONIST_AT_DESK ; 397, (D7B9, bit 7)
- const EVENT_398 ; 398, (D7BA, bit 0)
- const EVENT_399 ; 399, (D7BA, bit 1)
- const EVENT_39A ; 39A, (D7BA, bit 2)
- const EVENT_39B ; 39B, (D7BA, bit 3)
- const EVENT_39C ; 39C, (D7BA, bit 4)
- const EVENT_39D ; 39D, (D7BA, bit 5)
- const EVENT_39E ; 39E, (D7BA, bit 6)
- const EVENT_39F ; 39F, (D7BA, bit 7)
- const EVENT_3A0 ; 3A0, (D7BB, bit 0)
- const EVENT_3A1 ; 3A1, (D7BB, bit 1)
- const EVENT_3A2 ; 3A2, (D7BB, bit 2)
- const EVENT_3A3 ; 3A3, (D7BB, bit 3)
- const EVENT_3A4 ; 3A4, (D7BB, bit 4)
- const EVENT_3A5 ; 3A5, (D7BB, bit 5)
- const EVENT_3A6 ; 3A6, (D7BB, bit 6)
- const EVENT_3A7 ; 3A7, (D7BB, bit 7)
- const EVENT_3A8 ; 3A8, (D7BC, bit 0)
- const EVENT_3A9 ; 3A9, (D7BC, bit 1)
- const EVENT_3AA ; 3AA, (D7BC, bit 2)
- const EVENT_3AB ; 3AB, (D7BC, bit 3)
- const EVENT_3AC ; 3AC, (D7BC, bit 4)
- const EVENT_3AD ; 3AD, (D7BC, bit 5)
- const EVENT_3AE ; 3AE, (D7BC, bit 6)
- const EVENT_3AF ; 3AF, (D7BC, bit 7)
- const EVENT_GOT_TM29 ; 3B0, (D7BD, bit 0)
- const EVENT_3B1 ; 3B1, (D7BD, bit 1)
- const EVENT_3B2 ; 3B2, (D7BD, bit 2)
- const EVENT_3B3 ; 3B3, (D7BD, bit 3)
- const EVENT_3B4 ; 3B4, (D7BD, bit 4)
- const EVENT_3B5 ; 3B5, (D7BD, bit 5)
- const EVENT_3B6 ; 3B6, (D7BD, bit 6)
- const EVENT_3B7 ; 3B7, (D7BD, bit 7)
- const EVENT_3B8 ; 3B8, (D7BE, bit 0)
- const EVENT_3B9 ; 3B9, (D7BE, bit 1)
- const EVENT_3BA ; 3BA, (D7BE, bit 2)
- const EVENT_3BB ; 3BB, (D7BE, bit 3)
- const EVENT_3BC ; 3BC, (D7BE, bit 4)
- const EVENT_3BD ; 3BD, (D7BE, bit 5)
- const EVENT_3BE ; 3BE, (D7BE, bit 6)
- const EVENT_3BF ; 3BF, (D7BE, bit 7)
- const EVENT_GOT_POTION_SAMPLE ; 3C0, (D7BF, bit 0)
- const EVENT_3C1 ; 3C1, (D7BF, bit 1)
- const EVENT_3C2 ; 3C2, (D7BF, bit 2)
- const EVENT_3C3 ; 3C3, (D7BF, bit 3)
- const EVENT_3C4 ; 3C4, (D7BF, bit 4)
- const EVENT_3C5 ; 3C5, (D7BF, bit 5)
- const EVENT_3C6 ; 3C6, (D7BF, bit 6)
- const EVENT_3C7 ; 3C7, (D7BF, bit 7)
- const EVENT_3C8 ; 3C8, (D7C0, bit 0)
- const EVENT_3C9 ; 3C9, (D7C0, bit 1)
- const EVENT_3CA ; 3CA, (D7C0, bit 2)
- const EVENT_3CB ; 3CB, (D7C0, bit 3)
- const EVENT_3CC ; 3CC, (D7C0, bit 4)
- const EVENT_3CD ; 3CD, (D7C0, bit 5)
- const EVENT_3CE ; 3CE, (D7C0, bit 6)
- const EVENT_3CF ; 3CF, (D7C0, bit 7)
- const EVENT_3D0 ; 3D0, (D7C1, bit 0)
- const EVENT_3D1 ; 3D1, (D7C1, bit 1)
- const EVENT_3D2 ; 3D2, (D7C1, bit 2)
- const EVENT_3D3 ; 3D3, (D7C1, bit 3)
- const EVENT_3D4 ; 3D4, (D7C1, bit 4)
- const EVENT_3D5 ; 3D5, (D7C1, bit 5)
- const EVENT_3D6 ; 3D6, (D7C1, bit 6)
- const EVENT_3D7 ; 3D7, (D7C1, bit 7)
- const EVENT_GOT_HM05 ; 3D8, (D7C2, bit 0)
- const EVENT_3D9 ; 3D9, (D7C2, bit 1)
- const EVENT_3DA ; 3DA, (D7C2, bit 2)
- const EVENT_3DB ; 3DB, (D7C2, bit 3)
- const EVENT_3DC ; 3DC, (D7C2, bit 4)
- const EVENT_3DD ; 3DD, (D7C2, bit 5)
- const EVENT_3DE ; 3DE, (D7C2, bit 6)
- const EVENT_3DF ; 3DF, (D7C2, bit 7)
- const EVENT_3E0 ; 3E0, (D7C3, bit 0)
- const EVENT_3E1 ; 3E1, (D7C3, bit 1)
- const EVENT_BEAT_ROUTE_3_TRAINER_0 ; 3E2, (D7C3, bit 2)
- const EVENT_BEAT_ROUTE_3_TRAINER_1 ; 3E3, (D7C3, bit 3)
- const EVENT_BEAT_ROUTE_3_TRAINER_2 ; 3E4, (D7C3, bit 4)
- const EVENT_BEAT_ROUTE_3_TRAINER_3 ; 3E5, (D7C3, bit 5)
- const EVENT_BEAT_ROUTE_3_TRAINER_4 ; 3E6, (D7C3, bit 6)
- const EVENT_BEAT_ROUTE_3_TRAINER_5 ; 3E7, (D7C3, bit 7)
- const EVENT_BEAT_ROUTE_3_TRAINER_6 ; 3E8, (D7C4, bit 0)
- const EVENT_BEAT_ROUTE_3_TRAINER_7 ; 3E9, (D7C4, bit 1)
- const EVENT_3EA ; 3EA, (D7C4, bit 2)
- const EVENT_3EB ; 3EB, (D7C4, bit 3)
- const EVENT_3EC ; 3EC, (D7C4, bit 4)
- const EVENT_3ED ; 3ED, (D7C4, bit 5)
- const EVENT_3EE ; 3EE, (D7C4, bit 6)
- const EVENT_3EF ; 3EF, (D7C4, bit 7)
- const EVENT_3F0 ; 3F0, (D7C5, bit 0)
- const EVENT_3F1 ; 3F1, (D7C5, bit 1)
- const EVENT_BEAT_ROUTE_4_TRAINER_0 ; 3F2, (D7C5, bit 2)
- const EVENT_3F3 ; 3F3, (D7C5, bit 3)
- const EVENT_3F4 ; 3F4, (D7C5, bit 4)
- const EVENT_3F5 ; 3F5, (D7C5, bit 5)
- const EVENT_3F6 ; 3F6, (D7C5, bit 6)
- const EVENT_3F7 ; 3F7, (D7C5, bit 7)
- const EVENT_3F8 ; 3F8, (D7C6, bit 0)
- const EVENT_3F9 ; 3F9, (D7C6, bit 1)
- const EVENT_3FA ; 3FA, (D7C6, bit 2)
- const EVENT_3FB ; 3FB, (D7C6, bit 3)
- const EVENT_3FC ; 3FC, (D7C6, bit 4)
- const EVENT_3FD ; 3FD, (D7C6, bit 5)
- const EVENT_3FE ; 3FE, (D7C6, bit 6)
- const EVENT_BOUGHT_MAGIKARP ; 3FF, (D7C6, bit 7)
- const EVENT_400 ; 400, (D7C7, bit 0)
- const EVENT_401 ; 401, (D7C7, bit 1)
- const EVENT_402 ; 402, (D7C7, bit 2)
- const EVENT_403 ; 403, (D7C7, bit 3)
- const EVENT_404 ; 404, (D7C7, bit 4)
- const EVENT_405 ; 405, (D7C7, bit 5)
- const EVENT_406 ; 406, (D7C7, bit 6)
- const EVENT_407 ; 407, (D7C7, bit 7)
- const EVENT_408 ; 408, (D7C8, bit 0)
- const EVENT_409 ; 409, (D7C8, bit 1)
- const EVENT_40A ; 40A, (D7C8, bit 2)
- const EVENT_40B ; 40B, (D7C8, bit 3)
- const EVENT_40C ; 40C, (D7C8, bit 4)
- const EVENT_40D ; 40D, (D7C8, bit 5)
- const EVENT_40E ; 40E, (D7C8, bit 6)
- const EVENT_40F ; 40F, (D7C8, bit 7)
- const EVENT_410 ; 410, (D7C9, bit 0)
- const EVENT_BEAT_ROUTE_6_TRAINER_0 ; 411, (D7C9, bit 1)
- const EVENT_BEAT_ROUTE_6_TRAINER_1 ; 412, (D7C9, bit 2)
- const EVENT_BEAT_ROUTE_6_TRAINER_2 ; 413, (D7C9, bit 3)
- const EVENT_BEAT_ROUTE_6_TRAINER_3 ; 414, (D7C9, bit 4)
- const EVENT_BEAT_ROUTE_6_TRAINER_4 ; 415, (D7C9, bit 5)
- const EVENT_BEAT_ROUTE_6_TRAINER_5 ; 416, (D7C9, bit 6)
- const EVENT_417 ; 417, (D7C9, bit 7)
- const EVENT_418 ; 418, (D7CA, bit 0)
- const EVENT_419 ; 419, (D7CA, bit 1)
- const EVENT_41A ; 41A, (D7CA, bit 2)
- const EVENT_41B ; 41B, (D7CA, bit 3)
- const EVENT_41C ; 41C, (D7CA, bit 4)
- const EVENT_41D ; 41D, (D7CA, bit 5)
- const EVENT_41E ; 41E, (D7CA, bit 6)
- const EVENT_41F ; 41F, (D7CA, bit 7)
- const EVENT_420 ; 420, (D7CB, bit 0)
- const EVENT_421 ; 421, (D7CB, bit 1)
- const EVENT_422 ; 422, (D7CB, bit 2)
- const EVENT_423 ; 423, (D7CB, bit 3)
- const EVENT_424 ; 424, (D7CB, bit 4)
- const EVENT_425 ; 425, (D7CB, bit 5)
- const EVENT_426 ; 426, (D7CB, bit 6)
- const EVENT_427 ; 427, (D7CB, bit 7)
- const EVENT_428 ; 428, (D7CC, bit 0)
- const EVENT_429 ; 429, (D7CC, bit 1)
- const EVENT_42A ; 42A, (D7CC, bit 2)
- const EVENT_42B ; 42B, (D7CC, bit 3)
- const EVENT_42C ; 42C, (D7CC, bit 4)
- const EVENT_42D ; 42D, (D7CC, bit 5)
- const EVENT_42E ; 42E, (D7CC, bit 6)
- const EVENT_42F ; 42F, (D7CC, bit 7)
- const EVENT_430 ; 430, (D7CD, bit 0)
- const EVENT_BEAT_ROUTE_8_TRAINER_0 ; 431, (D7CD, bit 1)
- const EVENT_BEAT_ROUTE_8_TRAINER_1 ; 432, (D7CD, bit 2)
- const EVENT_BEAT_ROUTE_8_TRAINER_2 ; 433, (D7CD, bit 3)
- const EVENT_BEAT_ROUTE_8_TRAINER_3 ; 434, (D7CD, bit 4)
- const EVENT_BEAT_ROUTE_8_TRAINER_4 ; 435, (D7CD, bit 5)
- const EVENT_BEAT_ROUTE_8_TRAINER_5 ; 436, (D7CD, bit 6)
- const EVENT_BEAT_ROUTE_8_TRAINER_6 ; 437, (D7CD, bit 7)
- const EVENT_BEAT_ROUTE_8_TRAINER_7 ; 438, (D7CE, bit 0)
- const EVENT_BEAT_ROUTE_8_TRAINER_8 ; 439, (D7CE, bit 1)
- const EVENT_43A ; 43A, (D7CE, bit 2)
- const EVENT_43B ; 43B, (D7CE, bit 3)
- const EVENT_43C ; 43C, (D7CE, bit 4)
- const EVENT_43D ; 43D, (D7CE, bit 5)
- const EVENT_43E ; 43E, (D7CE, bit 6)
- const EVENT_43F ; 43F, (D7CE, bit 7)
- const EVENT_440 ; 440, (D7CF, bit 0)
- const EVENT_BEAT_ROUTE_9_TRAINER_0 ; 441, (D7CF, bit 1)
- const EVENT_BEAT_ROUTE_9_TRAINER_1 ; 442, (D7CF, bit 2)
- const EVENT_BEAT_ROUTE_9_TRAINER_2 ; 443, (D7CF, bit 3)
- const EVENT_BEAT_ROUTE_9_TRAINER_3 ; 444, (D7CF, bit 4)
- const EVENT_BEAT_ROUTE_9_TRAINER_4 ; 445, (D7CF, bit 5)
- const EVENT_BEAT_ROUTE_9_TRAINER_5 ; 446, (D7CF, bit 6)
- const EVENT_BEAT_ROUTE_9_TRAINER_6 ; 447, (D7CF, bit 7)
- const EVENT_BEAT_ROUTE_9_TRAINER_7 ; 448, (D7D0, bit 0)
- const EVENT_BEAT_ROUTE_9_TRAINER_8 ; 449, (D7D0, bit 1)
- const EVENT_44A ; 44A, (D7D0, bit 2)
- const EVENT_44B ; 44B, (D7D0, bit 3)
- const EVENT_44C ; 44C, (D7D0, bit 4)
- const EVENT_44D ; 44D, (D7D0, bit 5)
- const EVENT_44E ; 44E, (D7D0, bit 6)
- const EVENT_44F ; 44F, (D7D0, bit 7)
- const EVENT_450 ; 450, (D7D1, bit 0)
- const EVENT_BEAT_ROUTE_10_TRAINER_0 ; 451, (D7D1, bit 1)
- const EVENT_BEAT_ROUTE_10_TRAINER_1 ; 452, (D7D1, bit 2)
- const EVENT_BEAT_ROUTE_10_TRAINER_2 ; 453, (D7D1, bit 3)
- const EVENT_BEAT_ROUTE_10_TRAINER_3 ; 454, (D7D1, bit 4)
- const EVENT_BEAT_ROUTE_10_TRAINER_4 ; 455, (D7D1, bit 5)
- const EVENT_BEAT_ROUTE_10_TRAINER_5 ; 456, (D7D1, bit 6)
- const EVENT_457 ; 457, (D7D1, bit 7)
- const EVENT_458 ; 458, (D7D2, bit 0)
- const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0 ; 459, (D7D2, bit 1)
- const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1 ; 45A, (D7D2, bit 2)
- const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2 ; 45B, (D7D2, bit 3)
- const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3 ; 45C, (D7D2, bit 4)
- const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4 ; 45D, (D7D2, bit 5)
- const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5 ; 45E, (D7D2, bit 6)
- const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6 ; 45F, (D7D2, bit 7)
- const EVENT_460 ; 460, (D7D3, bit 0)
- const EVENT_BEAT_POWER_PLANT_VOLTORB_0 ; 461, (D7D3, bit 1)
- const EVENT_BEAT_POWER_PLANT_VOLTORB_1 ; 462, (D7D3, bit 2)
- const EVENT_BEAT_POWER_PLANT_VOLTORB_2 ; 463, (D7D3, bit 3)
- const EVENT_BEAT_POWER_PLANT_VOLTORB_3 ; 464, (D7D3, bit 4)
- const EVENT_BEAT_POWER_PLANT_VOLTORB_4 ; 465, (D7D3, bit 5)
- const EVENT_BEAT_POWER_PLANT_VOLTORB_5 ; 466, (D7D3, bit 6)
- const EVENT_BEAT_POWER_PLANT_VOLTORB_6 ; 467, (D7D3, bit 7)
- const EVENT_BEAT_POWER_PLANT_VOLTORB_7 ; 468, (D7D4, bit 0)
- const EVENT_BEAT_ZAPDOS ; 469, (D7D4, bit 1)
- const EVENT_46A ; 46A, (D7D4, bit 2)
- const EVENT_46B ; 46B, (D7D4, bit 3)
- const EVENT_46C ; 46C, (D7D4, bit 4)
- const EVENT_46D ; 46D, (D7D4, bit 5)
- const EVENT_46E ; 46E, (D7D4, bit 6)
- const EVENT_46F ; 46F, (D7D4, bit 7)
- const EVENT_470 ; 470, (D7D5, bit 0)
- const EVENT_BEAT_ROUTE_11_TRAINER_0 ; 471, (D7D5, bit 1)
- const EVENT_BEAT_ROUTE_11_TRAINER_1 ; 472, (D7D5, bit 2)
- const EVENT_BEAT_ROUTE_11_TRAINER_2 ; 473, (D7D5, bit 3)
- const EVENT_BEAT_ROUTE_11_TRAINER_3 ; 474, (D7D5, bit 4)
- const EVENT_BEAT_ROUTE_11_TRAINER_4 ; 475, (D7D5, bit 5)
- const EVENT_BEAT_ROUTE_11_TRAINER_5 ; 476, (D7D5, bit 6)
- const EVENT_BEAT_ROUTE_11_TRAINER_6 ; 477, (D7D5, bit 7)
- const EVENT_BEAT_ROUTE_11_TRAINER_7 ; 478, (D7D6, bit 0)
- const EVENT_BEAT_ROUTE_11_TRAINER_8 ; 479, (D7D6, bit 1)
- const EVENT_BEAT_ROUTE_11_TRAINER_9 ; 47A, (D7D6, bit 2)
- const EVENT_47B ; 47B, (D7D6, bit 3)
- const EVENT_47C ; 47C, (D7D6, bit 4)
- const EVENT_47D ; 47D, (D7D6, bit 5)
- const EVENT_47E ; 47E, (D7D6, bit 6)
- const EVENT_GOT_ITEMFINDER ; 47F, (D7D6, bit 7)
- const EVENT_GOT_TM39 ; 480, (D7D7, bit 0)
- const EVENT_481 ; 481, (D7D7, bit 1)
- const EVENT_BEAT_ROUTE_12_TRAINER_0 ; 482, (D7D7, bit 2)
- const EVENT_BEAT_ROUTE_12_TRAINER_1 ; 483, (D7D7, bit 3)
- const EVENT_BEAT_ROUTE_12_TRAINER_2 ; 484, (D7D7, bit 4)
- const EVENT_BEAT_ROUTE_12_TRAINER_3 ; 485, (D7D7, bit 5)
- const EVENT_BEAT_ROUTE_12_TRAINER_4 ; 486, (D7D7, bit 6)
- const EVENT_BEAT_ROUTE_12_TRAINER_5 ; 487, (D7D7, bit 7)
- const EVENT_BEAT_ROUTE_12_TRAINER_6 ; 488, (D7D8, bit 0)
- const EVENT_489 ; 489, (D7D8, bit 1)
- const EVENT_48A ; 48A, (D7D8, bit 2)
- const EVENT_48B ; 48B, (D7D8, bit 3)
- const EVENT_48C ; 48C, (D7D8, bit 4)
- const EVENT_48D ; 48D, (D7D8, bit 5)
- const EVENT_FIGHT_ROUTE12_SNORLAX ; 48E, (D7D8, bit 6)
- const EVENT_BEAT_ROUTE12_SNORLAX ; 48F, (D7D8, bit 7)
- const EVENT_490 ; 490, (D7D9, bit 0)
- const EVENT_BEAT_ROUTE_13_TRAINER_0 ; 491, (D7D9, bit 1)
- const EVENT_BEAT_ROUTE_13_TRAINER_1 ; 492, (D7D9, bit 2)
- const EVENT_BEAT_ROUTE_13_TRAINER_2 ; 493, (D7D9, bit 3)
- const EVENT_BEAT_ROUTE_13_TRAINER_3 ; 494, (D7D9, bit 4)
- const EVENT_BEAT_ROUTE_13_TRAINER_4 ; 495, (D7D9, bit 5)
- const EVENT_BEAT_ROUTE_13_TRAINER_5 ; 496, (D7D9, bit 6)
- const EVENT_BEAT_ROUTE_13_TRAINER_6 ; 497, (D7D9, bit 7)
- const EVENT_BEAT_ROUTE_13_TRAINER_7 ; 498, (D7DA, bit 0)
- const EVENT_BEAT_ROUTE_13_TRAINER_8 ; 499, (D7DA, bit 1)
- const EVENT_BEAT_ROUTE_13_TRAINER_9 ; 49A, (D7DA, bit 2)
- const EVENT_49B ; 49B, (D7DA, bit 3)
- const EVENT_49C ; 49C, (D7DA, bit 4)
- const EVENT_49D ; 49D, (D7DA, bit 5)
- const EVENT_49E ; 49E, (D7DA, bit 6)
- const EVENT_49F ; 49F, (D7DA, bit 7)
- const EVENT_4A0 ; 4A0, (D7DB, bit 0)
- const EVENT_BEAT_ROUTE_14_TRAINER_0 ; 4A1, (D7DB, bit 1)
- const EVENT_BEAT_ROUTE_14_TRAINER_1 ; 4A2, (D7DB, bit 2)
- const EVENT_BEAT_ROUTE_14_TRAINER_2 ; 4A3, (D7DB, bit 3)
- const EVENT_BEAT_ROUTE_14_TRAINER_3 ; 4A4, (D7DB, bit 4)
- const EVENT_BEAT_ROUTE_14_TRAINER_4 ; 4A5, (D7DB, bit 5)
- const EVENT_BEAT_ROUTE_14_TRAINER_5 ; 4A6, (D7DB, bit 6)
- const EVENT_BEAT_ROUTE_14_TRAINER_6 ; 4A7, (D7DB, bit 7)
- const EVENT_BEAT_ROUTE_14_TRAINER_7 ; 4A8, (D7DC, bit 0)
- const EVENT_BEAT_ROUTE_14_TRAINER_8 ; 4A9, (D7DC, bit 1)
- const EVENT_BEAT_ROUTE_14_TRAINER_9 ; 4AA, (D7DC, bit 2)
- const EVENT_4AB ; 4AB, (D7DC, bit 3)
- const EVENT_4AC ; 4AC, (D7DC, bit 4)
- const EVENT_4AD ; 4AD, (D7DC, bit 5)
- const EVENT_4AE ; 4AE, (D7DC, bit 6)
- const EVENT_4AF ; 4AF, (D7DC, bit 7)
- const EVENT_GOT_EXP_ALL ; 4B0, (D7DD, bit 0)
- const EVENT_BEAT_ROUTE_15_TRAINER_0 ; 4B1, (D7DD, bit 1)
- const EVENT_BEAT_ROUTE_15_TRAINER_1 ; 4B2, (D7DD, bit 2)
- const EVENT_BEAT_ROUTE_15_TRAINER_2 ; 4B3, (D7DD, bit 3)
- const EVENT_BEAT_ROUTE_15_TRAINER_3 ; 4B4, (D7DD, bit 4)
- const EVENT_BEAT_ROUTE_15_TRAINER_4 ; 4B5, (D7DD, bit 5)
- const EVENT_BEAT_ROUTE_15_TRAINER_5 ; 4B6, (D7DD, bit 6)
- const EVENT_BEAT_ROUTE_15_TRAINER_6 ; 4B7, (D7DD, bit 7)
- const EVENT_BEAT_ROUTE_15_TRAINER_7 ; 4B8, (D7DE, bit 0)
- const EVENT_BEAT_ROUTE_15_TRAINER_8 ; 4B9, (D7DE, bit 1)
- const EVENT_BEAT_ROUTE_15_TRAINER_9 ; 4BA, (D7DE, bit 2)
- const EVENT_4BB ; 4BB, (D7DE, bit 3)
- const EVENT_4BC ; 4BC, (D7DE, bit 4)
- const EVENT_4BD ; 4BD, (D7DE, bit 5)
- const EVENT_4BE ; 4BE, (D7DE, bit 6)
- const EVENT_4BF ; 4BF, (D7DE, bit 7)
- const EVENT_4C0 ; 4C0, (D7DF, bit 0)
- const EVENT_BEAT_ROUTE_16_TRAINER_0 ; 4C1, (D7DF, bit 1)
- const EVENT_BEAT_ROUTE_16_TRAINER_1 ; 4C2, (D7DF, bit 2)
- const EVENT_BEAT_ROUTE_16_TRAINER_2 ; 4C3, (D7DF, bit 3)
- const EVENT_BEAT_ROUTE_16_TRAINER_3 ; 4C4, (D7DF, bit 4)
- const EVENT_BEAT_ROUTE_16_TRAINER_4 ; 4C5, (D7DF, bit 5)
- const EVENT_BEAT_ROUTE_16_TRAINER_5 ; 4C6, (D7DF, bit 6)
- const EVENT_4C7 ; 4C7, (D7DF, bit 7)
- const EVENT_FIGHT_ROUTE16_SNORLAX ; 4C8, (D7E0, bit 0)
- const EVENT_BEAT_ROUTE16_SNORLAX ; 4C9, (D7E0, bit 1)
- const EVENT_4CA ; 4CA, (D7E0, bit 2)
- const EVENT_4CB ; 4CB, (D7E0, bit 3)
- const EVENT_4CC ; 4CC, (D7E0, bit 4)
- const EVENT_4CD ; 4CD, (D7E0, bit 5)
- const EVENT_GOT_HM02 ; 4CE, (D7E0, bit 6)
- const EVENT_RESCUED_MR_FUJI ; 4CF, (D7E0, bit 7)
- const EVENT_4D0 ; 4D0, (D7E1, bit 0)
- const EVENT_BEAT_ROUTE_17_TRAINER_0 ; 4D1, (D7E1, bit 1)
- const EVENT_BEAT_ROUTE_17_TRAINER_1 ; 4D2, (D7E1, bit 2)
- const EVENT_BEAT_ROUTE_17_TRAINER_2 ; 4D3, (D7E1, bit 3)
- const EVENT_BEAT_ROUTE_17_TRAINER_3 ; 4D4, (D7E1, bit 4)
- const EVENT_BEAT_ROUTE_17_TRAINER_4 ; 4D5, (D7E1, bit 5)
- const EVENT_BEAT_ROUTE_17_TRAINER_5 ; 4D6, (D7E1, bit 6)
- const EVENT_BEAT_ROUTE_17_TRAINER_6 ; 4D7, (D7E1, bit 7)
- const EVENT_BEAT_ROUTE_17_TRAINER_7 ; 4D8, (D7E2, bit 0)
- const EVENT_BEAT_ROUTE_17_TRAINER_8 ; 4D9, (D7E2, bit 1)
- const EVENT_BEAT_ROUTE_17_TRAINER_9 ; 4DA, (D7E2, bit 2)
- const EVENT_4DB ; 4DB, (D7E2, bit 3)
- const EVENT_4DC ; 4DC, (D7E2, bit 4)
- const EVENT_4DD ; 4DD, (D7E2, bit 5)
- const EVENT_4DE ; 4DE, (D7E2, bit 6)
- const EVENT_4DF ; 4DF, (D7E2, bit 7)
- const EVENT_4E0 ; 4E0, (D7E3, bit 0)
- const EVENT_BEAT_ROUTE_18_TRAINER_0 ; 4E1, (D7E3, bit 1)
- const EVENT_BEAT_ROUTE_18_TRAINER_1 ; 4E2, (D7E3, bit 2)
- const EVENT_BEAT_ROUTE_18_TRAINER_2 ; 4E3, (D7E3, bit 3)
- const EVENT_4E4 ; 4E4, (D7E3, bit 4)
- const EVENT_4E5 ; 4E5, (D7E3, bit 5)
- const EVENT_4E6 ; 4E6, (D7E3, bit 6)
- const EVENT_4E7 ; 4E7, (D7E3, bit 7)
- const EVENT_4E8 ; 4E8, (D7E4, bit 0)
- const EVENT_4E9 ; 4E9, (D7E4, bit 1)
- const EVENT_4EA ; 4EA, (D7E4, bit 2)
- const EVENT_4EB ; 4EB, (D7E4, bit 3)
- const EVENT_4EC ; 4EC, (D7E4, bit 4)
- const EVENT_4ED ; 4ED, (D7E4, bit 5)
- const EVENT_4EE ; 4EE, (D7E4, bit 6)
- const EVENT_4EF ; 4EF, (D7E4, bit 7)
- const EVENT_4F0 ; 4F0, (D7E5, bit 0)
- const EVENT_BEAT_ROUTE_19_TRAINER_0 ; 4F1, (D7E5, bit 1)
- const EVENT_BEAT_ROUTE_19_TRAINER_1 ; 4F2, (D7E5, bit 2)
- const EVENT_BEAT_ROUTE_19_TRAINER_2 ; 4F3, (D7E5, bit 3)
- const EVENT_BEAT_ROUTE_19_TRAINER_3 ; 4F4, (D7E5, bit 4)
- const EVENT_BEAT_ROUTE_19_TRAINER_4 ; 4F5, (D7E5, bit 5)
- const EVENT_BEAT_ROUTE_19_TRAINER_5 ; 4F6, (D7E5, bit 6)
- const EVENT_BEAT_ROUTE_19_TRAINER_6 ; 4F7, (D7E5, bit 7)
- const EVENT_BEAT_ROUTE_19_TRAINER_7 ; 4F8, (D7E6, bit 0)
- const EVENT_BEAT_ROUTE_19_TRAINER_8 ; 4F9, (D7E6, bit 1)
- const EVENT_BEAT_ROUTE_19_TRAINER_9 ; 4FA, (D7E6, bit 2)
- const EVENT_4FB ; 4FB, (D7E6, bit 3)
- const EVENT_4FC ; 4FC, (D7E6, bit 4)
- const EVENT_4FD ; 4FD, (D7E6, bit 5)
- const EVENT_4FE ; 4FE, (D7E6, bit 6)
- const EVENT_4FF ; 4FF, (D7E6, bit 7)
- const EVENT_IN_SEAFOAM_ISLANDS ; 500, (D7E7, bit 0)
- const EVENT_BEAT_ROUTE_20_TRAINER_0 ; 501, (D7E7, bit 1)
- const EVENT_BEAT_ROUTE_20_TRAINER_1 ; 502, (D7E7, bit 2)
- const EVENT_BEAT_ROUTE_20_TRAINER_2 ; 503, (D7E7, bit 3)
- const EVENT_BEAT_ROUTE_20_TRAINER_3 ; 504, (D7E7, bit 4)
- const EVENT_BEAT_ROUTE_20_TRAINER_4 ; 505, (D7E7, bit 5)
- const EVENT_BEAT_ROUTE_20_TRAINER_5 ; 506, (D7E7, bit 6)
- const EVENT_BEAT_ROUTE_20_TRAINER_6 ; 507, (D7E7, bit 7)
- const EVENT_BEAT_ROUTE_20_TRAINER_7 ; 508, (D7E8, bit 0)
- const EVENT_BEAT_ROUTE_20_TRAINER_8 ; 509, (D7E8, bit 1)
- const EVENT_BEAT_ROUTE_20_TRAINER_9 ; 50A, (D7E8, bit 2)
- const EVENT_50B ; 50B, (D7E8, bit 3)
- const EVENT_50C ; 50C, (D7E8, bit 4)
- const EVENT_50D ; 50D, (D7E8, bit 5)
- const EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE ; 50E, (D7E8, bit 6)
- const EVENT_SEAFOAM1_BOULDER2_DOWN_HOLE ; 50F, (D7E8, bit 7)
- const EVENT_510 ; 510, (D7E9, bit 0)
- const EVENT_BEAT_ROUTE_21_TRAINER_0 ; 511, (D7E9, bit 1)
- const EVENT_BEAT_ROUTE_21_TRAINER_1 ; 512, (D7E9, bit 2)
- const EVENT_BEAT_ROUTE_21_TRAINER_2 ; 513, (D7E9, bit 3)
- const EVENT_BEAT_ROUTE_21_TRAINER_3 ; 514, (D7E9, bit 4)
- const EVENT_BEAT_ROUTE_21_TRAINER_4 ; 515, (D7E9, bit 5)
- const EVENT_BEAT_ROUTE_21_TRAINER_5 ; 516, (D7E9, bit 6)
- const EVENT_BEAT_ROUTE_21_TRAINER_6 ; 517, (D7E9, bit 7)
- const EVENT_BEAT_ROUTE_21_TRAINER_7 ; 518, (D7EA, bit 0)
- const EVENT_BEAT_ROUTE_21_TRAINER_8 ; 519, (D7EA, bit 1)
- const EVENT_51A ; 51A, (D7EA, bit 2)
- const EVENT_51B ; 51B, (D7EA, bit 3)
- const EVENT_51C ; 51C, (D7EA, bit 4)
- const EVENT_51D ; 51D, (D7EA, bit 5)
- const EVENT_51E ; 51E, (D7EA, bit 6)
- const EVENT_51F ; 51F, (D7EA, bit 7)
- const EVENT_1ST_ROUTE22_RIVAL_BATTLE ; 520, (D7EB, bit 0)
- const EVENT_2ND_ROUTE22_RIVAL_BATTLE ; 521, (D7EB, bit 1)
- const EVENT_522 ; 522, (D7EB, bit 2)
- const EVENT_523 ; 523, (D7EB, bit 3)
- const EVENT_524 ; 524, (D7EB, bit 4)
- const EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE ; 525, (D7EB, bit 5)
- const EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE ; 526, (D7EB, bit 6)
- const EVENT_ROUTE22_RIVAL_WANTS_BATTLE ; 527, (D7EB, bit 7)
- const EVENT_528 ; 528, (D7EC, bit 0)
- const EVENT_529 ; 529, (D7EC, bit 1)
- const EVENT_52A ; 52A, (D7EC, bit 2)
- const EVENT_52B ; 52B, (D7EC, bit 3)
- const EVENT_52C ; 52C, (D7EC, bit 4)
- const EVENT_52D ; 52D, (D7EC, bit 5)
- const EVENT_52E ; 52E, (D7EC, bit 6)
- const EVENT_52F ; 52F, (D7EC, bit 7)
- const EVENT_PASSED_CASCADEBADGE_CHECK ; 530, (D7ED, bit 0)
- const EVENT_PASSED_THUNDERBADGE_CHECK ; 531, (D7ED, bit 1)
- const EVENT_PASSED_RAINBOWBADGE_CHECK ; 532, (D7ED, bit 2)
- const EVENT_PASSED_SOULBADGE_CHECK ; 533, (D7ED, bit 3)
- const EVENT_PASSED_MARSHBADGE_CHECK ; 534, (D7ED, bit 4)
- const EVENT_PASSED_VOLCANOBADGE_CHECK ; 535, (D7ED, bit 5)
- const EVENT_PASSED_EARTHBADGE_CHECK ; 536, (D7ED, bit 6)
- const EVENT_537 ; 537, (D7ED, bit 7)
- const EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 ; 538, (D7EE, bit 0)
- const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0 ; 539, (D7EE, bit 1)
- const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1 ; 53A, (D7EE, bit 2)
- const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2 ; 53B, (D7EE, bit 3)
- const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3 ; 53C, (D7EE, bit 4)
- const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4 ; 53D, (D7EE, bit 5)
- const EVENT_BEAT_MOLTRES ; 53E, (D7EE, bit 6)
- const EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2 ; 53F, (D7EE, bit 7)
- const EVENT_GOT_NUGGET ; 540, (D7EF, bit 0)
- const EVENT_BEAT_ROUTE24_ROCKET ; 541, (D7EF, bit 1)
- const EVENT_BEAT_ROUTE_24_TRAINER_0 ; 542, (D7EF, bit 2)
- const EVENT_BEAT_ROUTE_24_TRAINER_1 ; 543, (D7EF, bit 3)
- const EVENT_BEAT_ROUTE_24_TRAINER_2 ; 544, (D7EF, bit 4)
- const EVENT_BEAT_ROUTE_24_TRAINER_3 ; 545, (D7EF, bit 5)
- const EVENT_BEAT_ROUTE_24_TRAINER_4 ; 546, (D7EF, bit 6)
- const EVENT_BEAT_ROUTE_24_TRAINER_5 ; 547, (D7EF, bit 7)
- const EVENT_548 ; 548, (D7F0, bit 0)
- const EVENT_NUGGET_REWARD_AVAILABLE ; 549, (D7F0, bit 1)
- const EVENT_54A ; 54A, (D7F0, bit 2)
- const EVENT_54B ; 54B, (D7F0, bit 3)
- const EVENT_54C ; 54C, (D7F0, bit 4)
- const EVENT_54D ; 54D, (D7F0, bit 5)
- const EVENT_54E ; 54E, (D7F0, bit 6)
- const EVENT_54F ; 54F, (D7F0, bit 7)
- const EVENT_MET_BILL ; 550, (D7F1, bit 0)
- const EVENT_BEAT_ROUTE_25_TRAINER_0 ; 551, (D7F1, bit 1)
- const EVENT_BEAT_ROUTE_25_TRAINER_1 ; 552, (D7F1, bit 2)
- const EVENT_BEAT_ROUTE_25_TRAINER_2 ; 553, (D7F1, bit 3)
- const EVENT_BEAT_ROUTE_25_TRAINER_3 ; 554, (D7F1, bit 4)
- const EVENT_BEAT_ROUTE_25_TRAINER_4 ; 555, (D7F1, bit 5)
- const EVENT_BEAT_ROUTE_25_TRAINER_5 ; 556, (D7F1, bit 6)
- const EVENT_BEAT_ROUTE_25_TRAINER_6 ; 557, (D7F1, bit 7)
- const EVENT_BEAT_ROUTE_25_TRAINER_7 ; 558, (D7F2, bit 0)
- const EVENT_BEAT_ROUTE_25_TRAINER_8 ; 559, (D7F2, bit 1)
- const EVENT_55A ; 55A, (D7F2, bit 2)
- const EVENT_USED_CELL_SEPARATOR_ON_BILL ; 55B, (D7F2, bit 3)
- const EVENT_GOT_SS_TICKET ; 55C, (D7F2, bit 4)
- const EVENT_MET_BILL_2 ; 55D, (D7F2, bit 5)
- const EVENT_BILL_SAID_USE_CELL_SEPARATOR ; 55E, (D7F2, bit 6)
- const EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING ; 55F, (D7F2, bit 7)
- const EVENT_560 ; 560, (D7F3, bit 0)
- const EVENT_561 ; 561, (D7F3, bit 1)
- const EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0 ; 562, (D7F3, bit 2)
- const EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1 ; 563, (D7F3, bit 3)
- const EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2 ; 564, (D7F3, bit 4)
- const EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_3 ; 565, (D7F3, bit 5)
- const EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_4 ; 566, (D7F3, bit 6)
- const EVENT_567 ; 567, (D7F3, bit 7)
- const EVENT_568 ; 568, (D7F4, bit 0)
- const EVENT_569 ; 569, (D7F4, bit 1)
- const EVENT_56A ; 56A, (D7F4, bit 2)
- const EVENT_56B ; 56B, (D7F4, bit 3)
- const EVENT_56C ; 56C, (D7F4, bit 4)
- const EVENT_56D ; 56D, (D7F4, bit 5)
- const EVENT_56E ; 56E, (D7F4, bit 6)
- const EVENT_56F ; 56F, (D7F4, bit 7)
- const EVENT_570 ; 570, (D7F5, bit 0)
- const EVENT_BEAT_MT_MOON_1_TRAINER_0 ; 571, (D7F5, bit 1)
- const EVENT_BEAT_MT_MOON_1_TRAINER_1 ; 572, (D7F5, bit 2)
- const EVENT_BEAT_MT_MOON_1_TRAINER_2 ; 573, (D7F5, bit 3)
- const EVENT_BEAT_MT_MOON_1_TRAINER_3 ; 574, (D7F5, bit 4)
- const EVENT_BEAT_MT_MOON_1_TRAINER_4 ; 575, (D7F5, bit 5)
- const EVENT_BEAT_MT_MOON_1_TRAINER_5 ; 576, (D7F5, bit 6)
- const EVENT_BEAT_MT_MOON_1_TRAINER_6 ; 577, (D7F5, bit 7)
- const EVENT_GOT_DOME_FOSSIL ; 578, (D7F6, bit 0)
- const EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD ; 579, (D7F6, bit 1)
- const EVENT_BEAT_MT_MOON_3_TRAINER_0 ; 57A, (D7F6, bit 2)
- const EVENT_BEAT_MT_MOON_3_TRAINER_1 ; 57B, (D7F6, bit 3)
- const EVENT_BEAT_MT_MOON_3_TRAINER_2 ; 57C, (D7F6, bit 4)
- const EVENT_BEAT_MT_MOON_3_TRAINER_3 ; 57D, (D7F6, bit 5)
- const EVENT_57E ; 57E, (D7F6, bit 6)
- const EVENT_GOT_HELIX_FOSSIL ; 57F, (D7F6, bit 7)
- const EVENT_580 ; 580, (D7F7, bit 0)
- const EVENT_581 ; 581, (D7F7, bit 1)
- const EVENT_582 ; 582, (D7F7, bit 2)
- const EVENT_583 ; 583, (D7F7, bit 3)
- const EVENT_584 ; 584, (D7F7, bit 4)
- const EVENT_585 ; 585, (D7F7, bit 5)
- const EVENT_586 ; 586, (D7F7, bit 6)
- const EVENT_587 ; 587, (D7F7, bit 7)
- const EVENT_588 ; 588, (D7F8, bit 0)
- const EVENT_589 ; 589, (D7F8, bit 1)
- const EVENT_58A ; 58A, (D7F8, bit 2)
- const EVENT_58B ; 58B, (D7F8, bit 3)
- const EVENT_58C ; 58C, (D7F8, bit 4)
- const EVENT_58D ; 58D, (D7F8, bit 5)
- const EVENT_58E ; 58E, (D7F8, bit 6)
- const EVENT_58F ; 58F, (D7F8, bit 7)
- const EVENT_590 ; 590, (D7F9, bit 0)
- const EVENT_591 ; 591, (D7F9, bit 1)
- const EVENT_592 ; 592, (D7F9, bit 2)
- const EVENT_593 ; 593, (D7F9, bit 3)
- const EVENT_594 ; 594, (D7F9, bit 4)
- const EVENT_595 ; 595, (D7F9, bit 5)
- const EVENT_596 ; 596, (D7F9, bit 6)
- const EVENT_597 ; 597, (D7F9, bit 7)
- const EVENT_598 ; 598, (D7FA, bit 0)
- const EVENT_599 ; 599, (D7FA, bit 1)
- const EVENT_59A ; 59A, (D7FA, bit 2)
- const EVENT_59B ; 59B, (D7FA, bit 3)
- const EVENT_59C ; 59C, (D7FA, bit 4)
- const EVENT_59D ; 59D, (D7FA, bit 5)
- const EVENT_59E ; 59E, (D7FA, bit 6)
- const EVENT_59F ; 59F, (D7FA, bit 7)
- const EVENT_5A0 ; 5A0, (D7FB, bit 0)
- const EVENT_5A1 ; 5A1, (D7FB, bit 1)
- const EVENT_5A2 ; 5A2, (D7FB, bit 2)
- const EVENT_5A3 ; 5A3, (D7FB, bit 3)
- const EVENT_5A4 ; 5A4, (D7FB, bit 4)
- const EVENT_5A5 ; 5A5, (D7FB, bit 5)
- const EVENT_5A6 ; 5A6, (D7FB, bit 6)
- const EVENT_5A7 ; 5A7, (D7FB, bit 7)
- const EVENT_5A8 ; 5A8, (D7FC, bit 0)
- const EVENT_5A9 ; 5A9, (D7FC, bit 1)
- const EVENT_5AA ; 5AA, (D7FC, bit 2)
- const EVENT_5AB ; 5AB, (D7FC, bit 3)
- const EVENT_5AC ; 5AC, (D7FC, bit 4)
- const EVENT_5AD ; 5AD, (D7FC, bit 5)
- const EVENT_5AE ; 5AE, (D7FC, bit 6)
- const EVENT_5AF ; 5AF, (D7FC, bit 7)
- const EVENT_5B0 ; 5B0, (D7FD, bit 0)
- const EVENT_5B1 ; 5B1, (D7FD, bit 1)
- const EVENT_5B2 ; 5B2, (D7FD, bit 2)
- const EVENT_5B3 ; 5B3, (D7FD, bit 3)
- const EVENT_5B4 ; 5B4, (D7FD, bit 4)
- const EVENT_5B5 ; 5B5, (D7FD, bit 5)
- const EVENT_5B6 ; 5B6, (D7FD, bit 6)
- const EVENT_5B7 ; 5B7, (D7FD, bit 7)
- const EVENT_5B8 ; 5B8, (D7FE, bit 0)
- const EVENT_5B9 ; 5B9, (D7FE, bit 1)
- const EVENT_5BA ; 5BA, (D7FE, bit 2)
- const EVENT_5BB ; 5BB, (D7FE, bit 3)
- const EVENT_5BC ; 5BC, (D7FE, bit 4)
- const EVENT_5BD ; 5BD, (D7FE, bit 5)
- const EVENT_5BE ; 5BE, (D7FE, bit 6)
- const EVENT_5BF ; 5BF, (D7FE, bit 7)
- const EVENT_5C0 ; 5C0, (D7FF, bit 0)
- const EVENT_5C1 ; 5C1, (D7FF, bit 1)
- const EVENT_5C2 ; 5C2, (D7FF, bit 2)
- const EVENT_5C3 ; 5C3, (D7FF, bit 3)
- const EVENT_BEAT_SS_ANNE_5_TRAINER_0 ; 5C4, (D7FF, bit 4)
- const EVENT_BEAT_SS_ANNE_5_TRAINER_1 ; 5C5, (D7FF, bit 5)
- const EVENT_5C6 ; 5C6, (D7FF, bit 6)
- const EVENT_5C7 ; 5C7, (D7FF, bit 7)
- const EVENT_5C8 ; 5C8, (D800, bit 0)
- const EVENT_5C9 ; 5C9, (D800, bit 1)
- const EVENT_5CA ; 5CA, (D800, bit 2)
- const EVENT_5CB ; 5CB, (D800, bit 3)
- const EVENT_5CC ; 5CC, (D800, bit 4)
- const EVENT_5CD ; 5CD, (D800, bit 5)
- const EVENT_5CE ; 5CE, (D800, bit 6)
- const EVENT_5CF ; 5CF, (D800, bit 7)
- const EVENT_5D0 ; 5D0, (D801, bit 0)
- const EVENT_5D1 ; 5D1, (D801, bit 1)
- const EVENT_5D2 ; 5D2, (D801, bit 2)
- const EVENT_5D3 ; 5D3, (D801, bit 3)
- const EVENT_5D4 ; 5D4, (D801, bit 4)
- const EVENT_5D5 ; 5D5, (D801, bit 5)
- const EVENT_5D6 ; 5D6, (D801, bit 6)
- const EVENT_5D7 ; 5D7, (D801, bit 7)
- const EVENT_5D8 ; 5D8, (D802, bit 0)
- const EVENT_5D9 ; 5D9, (D802, bit 1)
- const EVENT_5DA ; 5DA, (D802, bit 2)
- const EVENT_5DB ; 5DB, (D802, bit 3)
- const EVENT_5DC ; 5DC, (D802, bit 4)
- const EVENT_5DD ; 5DD, (D802, bit 5)
- const EVENT_5DE ; 5DE, (D802, bit 6)
- const EVENT_5DF ; 5DF, (D802, bit 7)
- const EVENT_GOT_HM01 ; 5E0, (D803, bit 0)
- const EVENT_RUBBED_CAPTAINS_BACK ; 5E1, (D803, bit 1)
- const EVENT_SS_ANNE_LEFT ; 5E2, (D803, bit 2)
- const EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT ; 5E3, (D803, bit 3)
- const EVENT_STARTED_WALKING_OUT_OF_DOCK ; 5E4, (D803, bit 4)
- const EVENT_WALKED_OUT_OF_DOCK ; 5E5, (D803, bit 5)
- const EVENT_5E6 ; 5E6, (D803, bit 6)
- const EVENT_5E7 ; 5E7, (D803, bit 7)
- const EVENT_5E8 ; 5E8, (D804, bit 0)
- const EVENT_5E9 ; 5E9, (D804, bit 1)
- const EVENT_5EA ; 5EA, (D804, bit 2)
- const EVENT_5EB ; 5EB, (D804, bit 3)
- const EVENT_5EC ; 5EC, (D804, bit 4)
- const EVENT_5ED ; 5ED, (D804, bit 5)
- const EVENT_5EE ; 5EE, (D804, bit 6)
- const EVENT_5EF ; 5EF, (D804, bit 7)
- const EVENT_5F0 ; 5F0, (D805, bit 0)
- const EVENT_BEAT_SS_ANNE_8_TRAINER_0 ; 5F1, (D805, bit 1)
- const EVENT_BEAT_SS_ANNE_8_TRAINER_1 ; 5F2, (D805, bit 2)
- const EVENT_BEAT_SS_ANNE_8_TRAINER_2 ; 5F3, (D805, bit 3)
- const EVENT_BEAT_SS_ANNE_8_TRAINER_3 ; 5F4, (D805, bit 4)
- const EVENT_5F5 ; 5F5, (D805, bit 5)
- const EVENT_5F6 ; 5F6, (D805, bit 6)
- const EVENT_5F7 ; 5F7, (D805, bit 7)
- const EVENT_5F8 ; 5F8, (D806, bit 0)
- const EVENT_5F9 ; 5F9, (D806, bit 1)
- const EVENT_5FA ; 5FA, (D806, bit 2)
- const EVENT_5FB ; 5FB, (D806, bit 3)
- const EVENT_5FC ; 5FC, (D806, bit 4)
- const EVENT_5FD ; 5FD, (D806, bit 5)
- const EVENT_5FE ; 5FE, (D806, bit 6)
- const EVENT_5FF ; 5FF, (D806, bit 7)
- const EVENT_600 ; 600, (D807, bit 0)
- const EVENT_BEAT_SS_ANNE_9_TRAINER_0 ; 601, (D807, bit 1)
- const EVENT_BEAT_SS_ANNE_9_TRAINER_1 ; 602, (D807, bit 2)
- const EVENT_BEAT_SS_ANNE_9_TRAINER_2 ; 603, (D807, bit 3)
- const EVENT_BEAT_SS_ANNE_9_TRAINER_3 ; 604, (D807, bit 4)
- const EVENT_605 ; 605, (D807, bit 5)
- const EVENT_606 ; 606, (D807, bit 6)
- const EVENT_607 ; 607, (D807, bit 7)
- const EVENT_608 ; 608, (D808, bit 0)
- const EVENT_609 ; 609, (D808, bit 1)
- const EVENT_60A ; 60A, (D808, bit 2)
- const EVENT_60B ; 60B, (D808, bit 3)
- const EVENT_60C ; 60C, (D808, bit 4)
- const EVENT_60D ; 60D, (D808, bit 5)
- const EVENT_60E ; 60E, (D808, bit 6)
- const EVENT_60F ; 60F, (D808, bit 7)
- const EVENT_610 ; 610, (D809, bit 0)
- const EVENT_BEAT_SS_ANNE_10_TRAINER_0 ; 611, (D809, bit 1)
- const EVENT_BEAT_SS_ANNE_10_TRAINER_1 ; 612, (D809, bit 2)
- const EVENT_BEAT_SS_ANNE_10_TRAINER_2 ; 613, (D809, bit 3)
- const EVENT_BEAT_SS_ANNE_10_TRAINER_3 ; 614, (D809, bit 4)
- const EVENT_BEAT_SS_ANNE_10_TRAINER_4 ; 615, (D809, bit 5)
- const EVENT_BEAT_SS_ANNE_10_TRAINER_5 ; 616, (D809, bit 6)
- const EVENT_617 ; 617, (D809, bit 7)
- const EVENT_618 ; 618, (D80A, bit 0)
- const EVENT_619 ; 619, (D80A, bit 1)
- const EVENT_61A ; 61A, (D80A, bit 2)
- const EVENT_61B ; 61B, (D80A, bit 3)
- const EVENT_61C ; 61C, (D80A, bit 4)
- const EVENT_61D ; 61D, (D80A, bit 5)
- const EVENT_61E ; 61E, (D80A, bit 6)
- const EVENT_61F ; 61F, (D80A, bit 7)
- const EVENT_620 ; 620, (D80B, bit 0)
- const EVENT_621 ; 621, (D80B, bit 1)
- const EVENT_622 ; 622, (D80B, bit 2)
- const EVENT_623 ; 623, (D80B, bit 3)
- const EVENT_624 ; 624, (D80B, bit 4)
- const EVENT_625 ; 625, (D80B, bit 5)
- const EVENT_626 ; 626, (D80B, bit 6)
- const EVENT_627 ; 627, (D80B, bit 7)
- const EVENT_628 ; 628, (D80C, bit 0)
- const EVENT_629 ; 629, (D80C, bit 1)
- const EVENT_62A ; 62A, (D80C, bit 2)
- const EVENT_62B ; 62B, (D80C, bit 3)
- const EVENT_62C ; 62C, (D80C, bit 4)
- const EVENT_62D ; 62D, (D80C, bit 5)
- const EVENT_62E ; 62E, (D80C, bit 6)
- const EVENT_62F ; 62F, (D80C, bit 7)
- const EVENT_630 ; 630, (D80D, bit 0)
- const EVENT_631 ; 631, (D80D, bit 1)
- const EVENT_632 ; 632, (D80D, bit 2)
- const EVENT_633 ; 633, (D80D, bit 3)
- const EVENT_634 ; 634, (D80D, bit 4)
- const EVENT_635 ; 635, (D80D, bit 5)
- const EVENT_636 ; 636, (D80D, bit 6)
- const EVENT_637 ; 637, (D80D, bit 7)
- const EVENT_638 ; 638, (D80E, bit 0)
- const EVENT_639 ; 639, (D80E, bit 1)
- const EVENT_63A ; 63A, (D80E, bit 2)
- const EVENT_63B ; 63B, (D80E, bit 3)
- const EVENT_63C ; 63C, (D80E, bit 4)
- const EVENT_63D ; 63D, (D80E, bit 5)
- const EVENT_63E ; 63E, (D80E, bit 6)
- const EVENT_63F ; 63F, (D80E, bit 7)
- const EVENT_640 ; 640, (D80F, bit 0)
- const EVENT_641 ; 641, (D80F, bit 1)
- const EVENT_642 ; 642, (D80F, bit 2)
- const EVENT_643 ; 643, (D80F, bit 3)
- const EVENT_644 ; 644, (D80F, bit 4)
- const EVENT_645 ; 645, (D80F, bit 5)
- const EVENT_646 ; 646, (D80F, bit 6)
- const EVENT_647 ; 647, (D80F, bit 7)
- const EVENT_648 ; 648, (D810, bit 0)
- const EVENT_649 ; 649, (D810, bit 1)
- const EVENT_64A ; 64A, (D810, bit 2)
- const EVENT_64B ; 64B, (D810, bit 3)
- const EVENT_64C ; 64C, (D810, bit 4)
- const EVENT_64D ; 64D, (D810, bit 5)
- const EVENT_64E ; 64E, (D810, bit 6)
- const EVENT_64F ; 64F, (D810, bit 7)
- const EVENT_650 ; 650, (D811, bit 0)
- const EVENT_651 ; 651, (D811, bit 1)
- const EVENT_652 ; 652, (D811, bit 2)
- const EVENT_653 ; 653, (D811, bit 3)
- const EVENT_654 ; 654, (D811, bit 4)
- const EVENT_655 ; 655, (D811, bit 5)
- const EVENT_656 ; 656, (D811, bit 6)
- const EVENT_657 ; 657, (D811, bit 7)
- const EVENT_658 ; 658, (D812, bit 0)
- const EVENT_659 ; 659, (D812, bit 1)
- const EVENT_65A ; 65A, (D812, bit 2)
- const EVENT_65B ; 65B, (D812, bit 3)
- const EVENT_65C ; 65C, (D812, bit 4)
- const EVENT_65D ; 65D, (D812, bit 5)
- const EVENT_65E ; 65E, (D812, bit 6)
- const EVENT_65F ; 65F, (D812, bit 7)
- const EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1 ; 660, (D813, bit 0)
- const EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0 ; 661, (D813, bit 1)
- const EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1 ; 662, (D813, bit 2)
- const EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2 ; 663, (D813, bit 3)
- const EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3 ; 664, (D813, bit 4)
- const EVENT_665 ; 665, (D813, bit 5)
- const EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH2 ; 666, (D813, bit 6)
- const EVENT_667 ; 667, (D813, bit 7)
- const EVENT_668 ; 668, (D814, bit 0)
- const EVENT_669 ; 669, (D814, bit 1)
- const EVENT_66A ; 66A, (D814, bit 2)
- const EVENT_66B ; 66B, (D814, bit 3)
- const EVENT_66C ; 66C, (D814, bit 4)
- const EVENT_66D ; 66D, (D814, bit 5)
- const EVENT_66E ; 66E, (D814, bit 6)
- const EVENT_66F ; 66F, (D814, bit 7)
- const EVENT_670 ; 670, (D815, bit 0)
- const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0 ; 671, (D815, bit 1)
- const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1 ; 672, (D815, bit 2)
- const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2 ; 673, (D815, bit 3)
- const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3 ; 674, (D815, bit 4)
- const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4 ; 675, (D815, bit 5)
- const EVENT_676 ; 676, (D815, bit 6)
- const EVENT_677 ; 677, (D815, bit 7)
- const EVENT_678 ; 678, (D816, bit 0)
- const EVENT_679 ; 679, (D816, bit 1)
- const EVENT_67A ; 67A, (D816, bit 2)
- const EVENT_67B ; 67B, (D816, bit 3)
- const EVENT_67C ; 67C, (D816, bit 4)
- const EVENT_67D ; 67D, (D816, bit 5)
- const EVENT_67E ; 67E, (D816, bit 6)
- const EVENT_67F ; 67F, (D816, bit 7)
- const EVENT_680 ; 680, (D817, bit 0)
- const EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0 ; 681, (D817, bit 1)
- const EVENT_682 ; 682, (D817, bit 2)
- const EVENT_683 ; 683, (D817, bit 3)
- const EVENT_684 ; 684, (D817, bit 4)
- const EVENT_685 ; 685, (D817, bit 5)
- const EVENT_686 ; 686, (D817, bit 6)
- const EVENT_687 ; 687, (D817, bit 7)
- const EVENT_688 ; 688, (D818, bit 0)
- const EVENT_689 ; 689, (D818, bit 1)
- const EVENT_68A ; 68A, (D818, bit 2)
- const EVENT_68B ; 68B, (D818, bit 3)
- const EVENT_68C ; 68C, (D818, bit 4)
- const EVENT_68D ; 68D, (D818, bit 5)
- const EVENT_68E ; 68E, (D818, bit 6)
- const EVENT_68F ; 68F, (D818, bit 7)
- const EVENT_690 ; 690, (D819, bit 0)
- const EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0 ; 691, (D819, bit 1)
- const EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1 ; 692, (D819, bit 2)
- const EVENT_693 ; 693, (D819, bit 3)
- const EVENT_694 ; 694, (D819, bit 4)
- const EVENT_695 ; 695, (D819, bit 5)
- const EVENT_696 ; 696, (D819, bit 6)
- const EVENT_697 ; 697, (D819, bit 7)
- const EVENT_698 ; 698, (D81A, bit 0)
- const EVENT_699 ; 699, (D81A, bit 1)
- const EVENT_69A ; 69A, (D81A, bit 2)
- const EVENT_69B ; 69B, (D81A, bit 3)
- const EVENT_69C ; 69C, (D81A, bit 4)
- const EVENT_69D ; 69D, (D81A, bit 5)
- const EVENT_69E ; 69E, (D81A, bit 6)
- const EVENT_69F ; 69F, (D81A, bit 7)
- const EVENT_6A0 ; 6A0, (D81B, bit 0)
- const EVENT_6A1 ; 6A1, (D81B, bit 1)
- const EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0 ; 6A2, (D81B, bit 2)
- const EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1 ; 6A3, (D81B, bit 3)
- const EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 ; 6A4, (D81B, bit 4)
- const EVENT_ROCKET_HIDEOUT_4_DOOR_UNLOCKED ; 6A5, (D81B, bit 5)
- const EVENT_ROCKET_DROPPED_LIFT_KEY ; 6A6, (D81B, bit 6)
- const EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI ; 6A7, (D81B, bit 7)
- const EVENT_6A8 ; 6A8, (D81C, bit 0)
- const EVENT_6A9 ; 6A9, (D81C, bit 1)
- const EVENT_6AA ; 6AA, (D81C, bit 2)
- const EVENT_6AB ; 6AB, (D81C, bit 3)
- const EVENT_6AC ; 6AC, (D81C, bit 4)
- const EVENT_6AD ; 6AD, (D81C, bit 5)
- const EVENT_6AE ; 6AE, (D81C, bit 6)
- const EVENT_6AF ; 6AF, (D81C, bit 7)
- const EVENT_6B0 ; 6B0, (D81D, bit 0)
- const EVENT_6B1 ; 6B1, (D81D, bit 1)
- const EVENT_6B2 ; 6B2, (D81D, bit 2)
- const EVENT_6B3 ; 6B3, (D81D, bit 3)
- const EVENT_6B4 ; 6B4, (D81D, bit 4)
- const EVENT_6B5 ; 6B5, (D81D, bit 5)
- const EVENT_6B6 ; 6B6, (D81D, bit 6)
- const EVENT_6B7 ; 6B7, (D81D, bit 7)
- const EVENT_6B8 ; 6B8, (D81E, bit 0)
- const EVENT_6B9 ; 6B9, (D81E, bit 1)
- const EVENT_6BA ; 6BA, (D81E, bit 2)
- const EVENT_6BB ; 6BB, (D81E, bit 3)
- const EVENT_6BC ; 6BC, (D81E, bit 4)
- const EVENT_6BD ; 6BD, (D81E, bit 5)
- const EVENT_6BE ; 6BE, (D81E, bit 6)
- const EVENT_6BF ; 6BF, (D81E, bit 7)
- const EVENT_6C0 ; 6C0, (D81F, bit 0)
- const EVENT_6C1 ; 6C1, (D81F, bit 1)
- const EVENT_6C2 ; 6C2, (D81F, bit 2)
- const EVENT_6C3 ; 6C3, (D81F, bit 3)
- const EVENT_6C4 ; 6C4, (D81F, bit 4)
- const EVENT_6C5 ; 6C5, (D81F, bit 5)
- const EVENT_6C6 ; 6C6, (D81F, bit 6)
- const EVENT_6C7 ; 6C7, (D81F, bit 7)
- const EVENT_6C8 ; 6C8, (D820, bit 0)
- const EVENT_6C9 ; 6C9, (D820, bit 1)
- const EVENT_6CA ; 6CA, (D820, bit 2)
- const EVENT_6CB ; 6CB, (D820, bit 3)
- const EVENT_6CC ; 6CC, (D820, bit 4)
- const EVENT_6CD ; 6CD, (D820, bit 5)
- const EVENT_6CE ; 6CE, (D820, bit 6)
- const EVENT_6CF ; 6CF, (D820, bit 7)
- const EVENT_6D0 ; 6D0, (D821, bit 0)
- const EVENT_6D1 ; 6D1, (D821, bit 1)
- const EVENT_6D2 ; 6D2, (D821, bit 2)
- const EVENT_6D3 ; 6D3, (D821, bit 3)
- const EVENT_6D4 ; 6D4, (D821, bit 4)
- const EVENT_6D5 ; 6D5, (D821, bit 5)
- const EVENT_6D6 ; 6D6, (D821, bit 6)
- const EVENT_6D7 ; 6D7, (D821, bit 7)
- const EVENT_6D8 ; 6D8, (D822, bit 0)
- const EVENT_6D9 ; 6D9, (D822, bit 1)
- const EVENT_6DA ; 6DA, (D822, bit 2)
- const EVENT_6DB ; 6DB, (D822, bit 3)
- const EVENT_6DC ; 6DC, (D822, bit 4)
- const EVENT_6DD ; 6DD, (D822, bit 5)
- const EVENT_6DE ; 6DE, (D822, bit 6)
- const EVENT_6DF ; 6DF, (D822, bit 7)
- const EVENT_6E0 ; 6E0, (D823, bit 0)
- const EVENT_6E1 ; 6E1, (D823, bit 1)
- const EVENT_6E2 ; 6E2, (D823, bit 2)
- const EVENT_6E3 ; 6E3, (D823, bit 3)
- const EVENT_6E4 ; 6E4, (D823, bit 4)
- const EVENT_6E5 ; 6E5, (D823, bit 5)
- const EVENT_6E6 ; 6E6, (D823, bit 6)
- const EVENT_6E7 ; 6E7, (D823, bit 7)
- const EVENT_6E8 ; 6E8, (D824, bit 0)
- const EVENT_6E9 ; 6E9, (D824, bit 1)
- const EVENT_6EA ; 6EA, (D824, bit 2)
- const EVENT_6EB ; 6EB, (D824, bit 3)
- const EVENT_6EC ; 6EC, (D824, bit 4)
- const EVENT_6ED ; 6ED, (D824, bit 5)
- const EVENT_6EE ; 6EE, (D824, bit 6)
- const EVENT_6EF ; 6EF, (D824, bit 7)
- const EVENT_6F0 ; 6F0, (D825, bit 0)
- const EVENT_6F1 ; 6F1, (D825, bit 1)
- const EVENT_BEAT_SILPH_CO_2F_TRAINER_0 ; 6F2, (D825, bit 2)
- const EVENT_BEAT_SILPH_CO_2F_TRAINER_1 ; 6F3, (D825, bit 3)
- const EVENT_BEAT_SILPH_CO_2F_TRAINER_2 ; 6F4, (D825, bit 4)
- const EVENT_BEAT_SILPH_CO_2F_TRAINER_3 ; 6F5, (D825, bit 5)
- const EVENT_6F6 ; 6F6, (D825, bit 6)
- const EVENT_6F7 ; 6F7, (D825, bit 7)
- const EVENT_6F8 ; 6F8, (D826, bit 0)
- const EVENT_6F9 ; 6F9, (D826, bit 1)
- const EVENT_6FA ; 6FA, (D826, bit 2)
- const EVENT_6FB ; 6FB, (D826, bit 3)
- const EVENT_6FC ; 6FC, (D826, bit 4)
- const EVENT_SILPH_CO_2_UNLOCKED_DOOR1 ; 6FD, (D826, bit 5)
- const EVENT_SILPH_CO_2_UNLOCKED_DOOR2 ; 6FE, (D826, bit 6)
- const EVENT_GOT_TM36 ; 6FF, (D826, bit 7)
- const EVENT_700 ; 700, (D827, bit 0)
- const EVENT_701 ; 701, (D827, bit 1)
- const EVENT_BEAT_SILPH_CO_3F_TRAINER_0 ; 702, (D827, bit 2)
- const EVENT_BEAT_SILPH_CO_3F_TRAINER_1 ; 703, (D827, bit 3)
- const EVENT_704 ; 704, (D827, bit 4)
- const EVENT_705 ; 705, (D827, bit 5)
- const EVENT_706 ; 706, (D827, bit 6)
- const EVENT_707 ; 707, (D827, bit 7)
- const EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ; 708, (D828, bit 0)
- const EVENT_SILPH_CO_3_UNLOCKED_DOOR2 ; 709, (D828, bit 1)
- const EVENT_70A ; 70A, (D828, bit 2)
- const EVENT_70B ; 70B, (D828, bit 3)
- const EVENT_70C ; 70C, (D828, bit 4)
- const EVENT_70D ; 70D, (D828, bit 5)
- const EVENT_70E ; 70E, (D828, bit 6)
- const EVENT_70F ; 70F, (D828, bit 7)
- const EVENT_710 ; 710, (D829, bit 0)
- const EVENT_711 ; 711, (D829, bit 1)
- const EVENT_BEAT_SILPH_CO_4F_TRAINER_0 ; 712, (D829, bit 2)
- const EVENT_BEAT_SILPH_CO_4F_TRAINER_1 ; 713, (D829, bit 3)
- const EVENT_BEAT_SILPH_CO_4F_TRAINER_2 ; 714, (D829, bit 4)
- const EVENT_715 ; 715, (D829, bit 5)
- const EVENT_716 ; 716, (D829, bit 6)
- const EVENT_717 ; 717, (D829, bit 7)
- const EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ; 718, (D82A, bit 0)
- const EVENT_SILPH_CO_4_UNLOCKED_DOOR2 ; 719, (D82A, bit 1)
- const EVENT_71A ; 71A, (D82A, bit 2)
- const EVENT_71B ; 71B, (D82A, bit 3)
- const EVENT_71C ; 71C, (D82A, bit 4)
- const EVENT_71D ; 71D, (D82A, bit 5)
- const EVENT_71E ; 71E, (D82A, bit 6)
- const EVENT_71F ; 71F, (D82A, bit 7)
- const EVENT_720 ; 720, (D82B, bit 0)
- const EVENT_721 ; 721, (D82B, bit 1)
- const EVENT_BEAT_SILPH_CO_5F_TRAINER_0 ; 722, (D82B, bit 2)
- const EVENT_BEAT_SILPH_CO_5F_TRAINER_1 ; 723, (D82B, bit 3)
- const EVENT_BEAT_SILPH_CO_5F_TRAINER_2 ; 724, (D82B, bit 4)
- const EVENT_BEAT_SILPH_CO_5F_TRAINER_3 ; 725, (D82B, bit 5)
- const EVENT_726 ; 726, (D82B, bit 6)
- const EVENT_727 ; 727, (D82B, bit 7)
- const EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ; 728, (D82C, bit 0)
- const EVENT_SILPH_CO_5_UNLOCKED_DOOR2 ; 729, (D82C, bit 1)
- const EVENT_SILPH_CO_5_UNLOCKED_DOOR3 ; 72A, (D82C, bit 2)
- const EVENT_72B ; 72B, (D82C, bit 3)
- const EVENT_72C ; 72C, (D82C, bit 4)
- const EVENT_72D ; 72D, (D82C, bit 5)
- const EVENT_72E ; 72E, (D82C, bit 6)
- const EVENT_72F ; 72F, (D82C, bit 7)
- const EVENT_730 ; 730, (D82D, bit 0)
- const EVENT_731 ; 731, (D82D, bit 1)
- const EVENT_732 ; 732, (D82D, bit 2)
- const EVENT_733 ; 733, (D82D, bit 3)
- const EVENT_734 ; 734, (D82D, bit 4)
- const EVENT_735 ; 735, (D82D, bit 5)
- const EVENT_BEAT_SILPH_CO_6F_TRAINER_0 ; 736, (D82D, bit 6)
- const EVENT_BEAT_SILPH_CO_6F_TRAINER_1 ; 737, (D82D, bit 7)
- const EVENT_BEAT_SILPH_CO_6F_TRAINER_2 ; 738, (D82E, bit 0)
- const EVENT_739 ; 739, (D82E, bit 1)
- const EVENT_73A ; 73A, (D82E, bit 2)
- const EVENT_73B ; 73B, (D82E, bit 3)
- const EVENT_73C ; 73C, (D82E, bit 4)
- const EVENT_73D ; 73D, (D82E, bit 5)
- const EVENT_73E ; 73E, (D82E, bit 6)
- const EVENT_SILPH_CO_6_UNLOCKED_DOOR ; 73F, (D82E, bit 7)
- const EVENT_BEAT_SILPH_CO_RIVAL ; 740, (D82F, bit 0)
- const EVENT_741 ; 741, (D82F, bit 1)
- const EVENT_742 ; 742, (D82F, bit 2)
- const EVENT_743 ; 743, (D82F, bit 3)
- const EVENT_744 ; 744, (D82F, bit 4)
- const EVENT_BEAT_SILPH_CO_7F_TRAINER_0 ; 745, (D82F, bit 5)
- const EVENT_BEAT_SILPH_CO_7F_TRAINER_1 ; 746, (D82F, bit 6)
- const EVENT_BEAT_SILPH_CO_7F_TRAINER_2 ; 747, (D82F, bit 7)
- const EVENT_BEAT_SILPH_CO_7F_TRAINER_3 ; 748, (D830, bit 0)
- const EVENT_749 ; 749, (D830, bit 1)
- const EVENT_74A ; 74A, (D830, bit 2)
- const EVENT_74B ; 74B, (D830, bit 3)
- const EVENT_SILPH_CO_7_UNLOCKED_DOOR1 ; 74C, (D830, bit 4)
- const EVENT_SILPH_CO_7_UNLOCKED_DOOR2 ; 74D, (D830, bit 5)
- const EVENT_SILPH_CO_7_UNLOCKED_DOOR3 ; 74E, (D830, bit 6)
- const EVENT_74F ; 74F, (D830, bit 7)
- const EVENT_750 ; 750, (D831, bit 0)
- const EVENT_751 ; 751, (D831, bit 1)
- const EVENT_BEAT_SILPH_CO_8F_TRAINER_0 ; 752, (D831, bit 2)
- const EVENT_BEAT_SILPH_CO_8F_TRAINER_1 ; 753, (D831, bit 3)
- const EVENT_BEAT_SILPH_CO_8F_TRAINER_2 ; 754, (D831, bit 4)
- const EVENT_755 ; 755, (D831, bit 5)
- const EVENT_756 ; 756, (D831, bit 6)
- const EVENT_757 ; 757, (D831, bit 7)
- const EVENT_SILPH_CO_8_UNLOCKED_DOOR ; 758, (D832, bit 0)
- const EVENT_759 ; 759, (D832, bit 1)
- const EVENT_75A ; 75A, (D832, bit 2)
- const EVENT_75B ; 75B, (D832, bit 3)
- const EVENT_75C ; 75C, (D832, bit 4)
- const EVENT_75D ; 75D, (D832, bit 5)
- const EVENT_75E ; 75E, (D832, bit 6)
- const EVENT_75F ; 75F, (D832, bit 7)
- const EVENT_760 ; 760, (D833, bit 0)
- const EVENT_761 ; 761, (D833, bit 1)
- const EVENT_BEAT_SILPH_CO_9F_TRAINER_0 ; 762, (D833, bit 2)
- const EVENT_BEAT_SILPH_CO_9F_TRAINER_1 ; 763, (D833, bit 3)
- const EVENT_BEAT_SILPH_CO_9F_TRAINER_2 ; 764, (D833, bit 4)
- const EVENT_765 ; 765, (D833, bit 5)
- const EVENT_766 ; 766, (D833, bit 6)
- const EVENT_767 ; 767, (D833, bit 7)
- const EVENT_SILPH_CO_9_UNLOCKED_DOOR1 ; 768, (D834, bit 0)
- const EVENT_SILPH_CO_9_UNLOCKED_DOOR2 ; 769, (D834, bit 1)
- const EVENT_SILPH_CO_9_UNLOCKED_DOOR3 ; 76A, (D834, bit 2)
- const EVENT_SILPH_CO_9_UNLOCKED_DOOR4 ; 76B, (D834, bit 3)
- const EVENT_76C ; 76C, (D834, bit 4)
- const EVENT_76D ; 76D, (D834, bit 5)
- const EVENT_76E ; 76E, (D834, bit 6)
- const EVENT_76F ; 76F, (D834, bit 7)
- const EVENT_770 ; 770, (D835, bit 0)
- const EVENT_BEAT_SILPH_CO_10F_TRAINER_0 ; 771, (D835, bit 1)
- const EVENT_BEAT_SILPH_CO_10F_TRAINER_1 ; 772, (D835, bit 2)
- const EVENT_773 ; 773, (D835, bit 3)
- const EVENT_774 ; 774, (D835, bit 4)
- const EVENT_775 ; 775, (D835, bit 5)
- const EVENT_776 ; 776, (D835, bit 6)
- const EVENT_777 ; 777, (D835, bit 7)
- const EVENT_SILPH_CO_10_UNLOCKED_DOOR ; 778, (D836, bit 0)
- const EVENT_779 ; 779, (D836, bit 1)
- const EVENT_77A ; 77A, (D836, bit 2)
- const EVENT_77B ; 77B, (D836, bit 3)
- const EVENT_77C ; 77C, (D836, bit 4)
- const EVENT_77D ; 77D, (D836, bit 5)
- const EVENT_77E ; 77E, (D836, bit 6)
- const EVENT_77F ; 77F, (D836, bit 7)
- const EVENT_780 ; 780, (D837, bit 0)
- const EVENT_781 ; 781, (D837, bit 1)
- const EVENT_782 ; 782, (D837, bit 2)
- const EVENT_783 ; 783, (D837, bit 3)
- const EVENT_BEAT_SILPH_CO_11F_TRAINER_0 ; 784, (D837, bit 4)
- const EVENT_BEAT_SILPH_CO_11F_TRAINER_1 ; 785, (D837, bit 5)
- const EVENT_786 ; 786, (D837, bit 6)
- const EVENT_787 ; 787, (D837, bit 7)
- const EVENT_SILPH_CO_11_UNLOCKED_DOOR ; 788, (D838, bit 0)
- const EVENT_789 ; 789, (D838, bit 1)
- const EVENT_78A ; 78A, (D838, bit 2)
- const EVENT_78B ; 78B, (D838, bit 3)
- const EVENT_78C ; 78C, (D838, bit 4)
- const EVENT_GOT_MASTER_BALL ; 78D, (D838, bit 5)
- const EVENT_78E ; 78E, (D838, bit 6)
- const EVENT_BEAT_SILPH_CO_GIOVANNI ; 78F, (D838, bit 7)
- const EVENT_790 ; 790, (D839, bit 0)
- const EVENT_791 ; 791, (D839, bit 1)
- const EVENT_792 ; 792, (D839, bit 2)
- const EVENT_793 ; 793, (D839, bit 3)
- const EVENT_794 ; 794, (D839, bit 4)
- const EVENT_795 ; 795, (D839, bit 5)
- const EVENT_796 ; 796, (D839, bit 6)
- const EVENT_797 ; 797, (D839, bit 7)
- const EVENT_798 ; 798, (D83A, bit 0)
- const EVENT_799 ; 799, (D83A, bit 1)
- const EVENT_79A ; 79A, (D83A, bit 2)
- const EVENT_79B ; 79B, (D83A, bit 3)
- const EVENT_79C ; 79C, (D83A, bit 4)
- const EVENT_79D ; 79D, (D83A, bit 5)
- const EVENT_79E ; 79E, (D83A, bit 6)
- const EVENT_79F ; 79F, (D83A, bit 7)
- const EVENT_7A0 ; 7A0, (D83B, bit 0)
- const EVENT_7A1 ; 7A1, (D83B, bit 1)
- const EVENT_7A2 ; 7A2, (D83B, bit 2)
- const EVENT_7A3 ; 7A3, (D83B, bit 3)
- const EVENT_7A4 ; 7A4, (D83B, bit 4)
- const EVENT_7A5 ; 7A5, (D83B, bit 5)
- const EVENT_7A6 ; 7A6, (D83B, bit 6)
- const EVENT_7A7 ; 7A7, (D83B, bit 7)
- const EVENT_7A8 ; 7A8, (D83C, bit 0)
- const EVENT_7A9 ; 7A9, (D83C, bit 1)
- const EVENT_7AA ; 7AA, (D83C, bit 2)
- const EVENT_7AB ; 7AB, (D83C, bit 3)
- const EVENT_7AC ; 7AC, (D83C, bit 4)
- const EVENT_7AD ; 7AD, (D83C, bit 5)
- const EVENT_7AE ; 7AE, (D83C, bit 6)
- const EVENT_7AF ; 7AF, (D83C, bit 7)
- const EVENT_7B0 ; 7B0, (D83D, bit 0)
- const EVENT_7B1 ; 7B1, (D83D, bit 1)
- const EVENT_7B2 ; 7B2, (D83D, bit 2)
- const EVENT_7B3 ; 7B3, (D83D, bit 3)
- const EVENT_7B4 ; 7B4, (D83D, bit 4)
- const EVENT_7B5 ; 7B5, (D83D, bit 5)
- const EVENT_7B6 ; 7B6, (D83D, bit 6)
- const EVENT_7B7 ; 7B7, (D83D, bit 7)
- const EVENT_7B8 ; 7B8, (D83E, bit 0)
- const EVENT_7B9 ; 7B9, (D83E, bit 1)
- const EVENT_7BA ; 7BA, (D83E, bit 2)
- const EVENT_7BB ; 7BB, (D83E, bit 3)
- const EVENT_7BC ; 7BC, (D83E, bit 4)
- const EVENT_7BD ; 7BD, (D83E, bit 5)
- const EVENT_7BE ; 7BE, (D83E, bit 6)
- const EVENT_7BF ; 7BF, (D83E, bit 7)
- const EVENT_7C0 ; 7C0, (D83F, bit 0)
- const EVENT_7C1 ; 7C1, (D83F, bit 1)
- const EVENT_7C2 ; 7C2, (D83F, bit 2)
- const EVENT_7C3 ; 7C3, (D83F, bit 3)
- const EVENT_7C4 ; 7C4, (D83F, bit 4)
- const EVENT_7C5 ; 7C5, (D83F, bit 5)
- const EVENT_7C6 ; 7C6, (D83F, bit 6)
- const EVENT_7C7 ; 7C7, (D83F, bit 7)
- const EVENT_7C8 ; 7C8, (D840, bit 0)
- const EVENT_7C9 ; 7C9, (D840, bit 1)
- const EVENT_7CA ; 7CA, (D840, bit 2)
- const EVENT_7CB ; 7CB, (D840, bit 3)
- const EVENT_7CC ; 7CC, (D840, bit 4)
- const EVENT_7CD ; 7CD, (D840, bit 5)
- const EVENT_7CE ; 7CE, (D840, bit 6)
- const EVENT_7CF ; 7CF, (D840, bit 7)
- const EVENT_7D0 ; 7D0, (D841, bit 0)
- const EVENT_7D1 ; 7D1, (D841, bit 1)
- const EVENT_7D2 ; 7D2, (D841, bit 2)
- const EVENT_7D3 ; 7D3, (D841, bit 3)
- const EVENT_7D4 ; 7D4, (D841, bit 4)
- const EVENT_7D5 ; 7D5, (D841, bit 5)
- const EVENT_7D6 ; 7D6, (D841, bit 6)
- const EVENT_7D7 ; 7D7, (D841, bit 7)
- const EVENT_7D8 ; 7D8, (D842, bit 0)
- const EVENT_7D9 ; 7D9, (D842, bit 1)
- const EVENT_7DA ; 7DA, (D842, bit 2)
- const EVENT_7DB ; 7DB, (D842, bit 3)
- const EVENT_7DC ; 7DC, (D842, bit 4)
- const EVENT_7DD ; 7DD, (D842, bit 5)
- const EVENT_7DE ; 7DE, (D842, bit 6)
- const EVENT_7DF ; 7DF, (D842, bit 7)
- const EVENT_7E0 ; 7E0, (D843, bit 0)
- const EVENT_7E1 ; 7E1, (D843, bit 1)
- const EVENT_7E2 ; 7E2, (D843, bit 2)
- const EVENT_7E3 ; 7E3, (D843, bit 3)
- const EVENT_7E4 ; 7E4, (D843, bit 4)
- const EVENT_7E5 ; 7E5, (D843, bit 5)
- const EVENT_7E6 ; 7E6, (D843, bit 6)
- const EVENT_7E7 ; 7E7, (D843, bit 7)
- const EVENT_7E8 ; 7E8, (D844, bit 0)
- const EVENT_7E9 ; 7E9, (D844, bit 1)
- const EVENT_7EA ; 7EA, (D844, bit 2)
- const EVENT_7EB ; 7EB, (D844, bit 3)
- const EVENT_7EC ; 7EC, (D844, bit 4)
- const EVENT_7ED ; 7ED, (D844, bit 5)
- const EVENT_7EE ; 7EE, (D844, bit 6)
- const EVENT_7EF ; 7EF, (D844, bit 7)
- const EVENT_7F0 ; 7F0, (D845, bit 0)
- const EVENT_7F1 ; 7F1, (D845, bit 1)
- const EVENT_7F2 ; 7F2, (D845, bit 2)
- const EVENT_7F3 ; 7F3, (D845, bit 3)
- const EVENT_7F4 ; 7F4, (D845, bit 4)
- const EVENT_7F5 ; 7F5, (D845, bit 5)
- const EVENT_7F6 ; 7F6, (D845, bit 6)
- const EVENT_7F7 ; 7F7, (D845, bit 7)
- const EVENT_7F8 ; 7F8, (D846, bit 0)
- const EVENT_7F9 ; 7F9, (D846, bit 1)
- const EVENT_7FA ; 7FA, (D846, bit 2)
- const EVENT_7FB ; 7FB, (D846, bit 3)
- const EVENT_7FC ; 7FC, (D846, bit 4)
- const EVENT_7FD ; 7FD, (D846, bit 5)
- const EVENT_7FE ; 7FE, (D846, bit 6)
- const EVENT_7FF ; 7FF, (D846, bit 7)
- const EVENT_800 ; 800, (D847, bit 0)
- const EVENT_BEAT_MANSION_2_TRAINER_0 ; 801, (D847, bit 1)
- const EVENT_802 ; 802, (D847, bit 2)
- const EVENT_803 ; 803, (D847, bit 3)
- const EVENT_804 ; 804, (D847, bit 4)
- const EVENT_805 ; 805, (D847, bit 5)
- const EVENT_806 ; 806, (D847, bit 6)
- const EVENT_807 ; 807, (D847, bit 7)
- const EVENT_808 ; 808, (D848, bit 0)
- const EVENT_809 ; 809, (D848, bit 1)
- const EVENT_80A ; 80A, (D848, bit 2)
- const EVENT_80B ; 80B, (D848, bit 3)
- const EVENT_80C ; 80C, (D848, bit 4)
- const EVENT_80D ; 80D, (D848, bit 5)
- const EVENT_80E ; 80E, (D848, bit 6)
- const EVENT_80F ; 80F, (D848, bit 7)
- const EVENT_810 ; 810, (D849, bit 0)
- const EVENT_BEAT_MANSION_3_TRAINER_0 ; 811, (D849, bit 1)
- const EVENT_BEAT_MANSION_3_TRAINER_1 ; 812, (D849, bit 2)
- const EVENT_813 ; 813, (D849, bit 3)
- const EVENT_814 ; 814, (D849, bit 4)
- const EVENT_815 ; 815, (D849, bit 5)
- const EVENT_816 ; 816, (D849, bit 6)
- const EVENT_817 ; 817, (D849, bit 7)
- const EVENT_818 ; 818, (D84A, bit 0)
- const EVENT_819 ; 819, (D84A, bit 1)
- const EVENT_81A ; 81A, (D84A, bit 2)
- const EVENT_81B ; 81B, (D84A, bit 3)
- const EVENT_81C ; 81C, (D84A, bit 4)
- const EVENT_81D ; 81D, (D84A, bit 5)
- const EVENT_81E ; 81E, (D84A, bit 6)
- const EVENT_81F ; 81F, (D84A, bit 7)
- const EVENT_820 ; 820, (D84B, bit 0)
- const EVENT_BEAT_MANSION_4_TRAINER_0 ; 821, (D84B, bit 1)
- const EVENT_BEAT_MANSION_4_TRAINER_1 ; 822, (D84B, bit 2)
- const EVENT_823 ; 823, (D84B, bit 3)
- const EVENT_824 ; 824, (D84B, bit 4)
- const EVENT_825 ; 825, (D84B, bit 5)
- const EVENT_826 ; 826, (D84B, bit 6)
- const EVENT_827 ; 827, (D84B, bit 7)
- const EVENT_828 ; 828, (D84C, bit 0)
- const EVENT_829 ; 829, (D84C, bit 1)
- const EVENT_82A ; 82A, (D84C, bit 2)
- const EVENT_82B ; 82B, (D84C, bit 3)
- const EVENT_82C ; 82C, (D84C, bit 4)
- const EVENT_82D ; 82D, (D84C, bit 5)
- const EVENT_82E ; 82E, (D84C, bit 6)
- const EVENT_82F ; 82F, (D84C, bit 7)
- const EVENT_830 ; 830, (D84D, bit 0)
- const EVENT_831 ; 831, (D84D, bit 1)
- const EVENT_832 ; 832, (D84D, bit 2)
- const EVENT_833 ; 833, (D84D, bit 3)
- const EVENT_834 ; 834, (D84D, bit 4)
- const EVENT_835 ; 835, (D84D, bit 5)
- const EVENT_836 ; 836, (D84D, bit 6)
- const EVENT_837 ; 837, (D84D, bit 7)
- const EVENT_838 ; 838, (D84E, bit 0)
- const EVENT_839 ; 839, (D84E, bit 1)
- const EVENT_83A ; 83A, (D84E, bit 2)
- const EVENT_83B ; 83B, (D84E, bit 3)
- const EVENT_83C ; 83C, (D84E, bit 4)
- const EVENT_83D ; 83D, (D84E, bit 5)
- const EVENT_83E ; 83E, (D84E, bit 6)
- const EVENT_83F ; 83F, (D84E, bit 7)
- const EVENT_840 ; 840, (D84F, bit 0)
- const EVENT_841 ; 841, (D84F, bit 1)
- const EVENT_842 ; 842, (D84F, bit 2)
- const EVENT_843 ; 843, (D84F, bit 3)
- const EVENT_844 ; 844, (D84F, bit 4)
- const EVENT_845 ; 845, (D84F, bit 5)
- const EVENT_846 ; 846, (D84F, bit 6)
- const EVENT_847 ; 847, (D84F, bit 7)
- const EVENT_848 ; 848, (D850, bit 0)
- const EVENT_849 ; 849, (D850, bit 1)
- const EVENT_84A ; 84A, (D850, bit 2)
- const EVENT_84B ; 84B, (D850, bit 3)
- const EVENT_84C ; 84C, (D850, bit 4)
- const EVENT_84D ; 84D, (D850, bit 5)
- const EVENT_84E ; 84E, (D850, bit 6)
- const EVENT_84F ; 84F, (D850, bit 7)
- const EVENT_850 ; 850, (D851, bit 0)
- const EVENT_851 ; 851, (D851, bit 1)
- const EVENT_852 ; 852, (D851, bit 2)
- const EVENT_853 ; 853, (D851, bit 3)
- const EVENT_854 ; 854, (D851, bit 4)
- const EVENT_855 ; 855, (D851, bit 5)
- const EVENT_856 ; 856, (D851, bit 6)
- const EVENT_857 ; 857, (D851, bit 7)
- const EVENT_858 ; 858, (D852, bit 0)
- const EVENT_859 ; 859, (D852, bit 1)
- const EVENT_85A ; 85A, (D852, bit 2)
- const EVENT_85B ; 85B, (D852, bit 3)
- const EVENT_85C ; 85C, (D852, bit 4)
- const EVENT_85D ; 85D, (D852, bit 5)
- const EVENT_85E ; 85E, (D852, bit 6)
- const EVENT_85F ; 85F, (D852, bit 7)
- const EVENT_860 ; 860, (D853, bit 0)
- const EVENT_861 ; 861, (D853, bit 1)
- const EVENT_862 ; 862, (D853, bit 2)
- const EVENT_863 ; 863, (D853, bit 3)
- const EVENT_864 ; 864, (D853, bit 4)
- const EVENT_865 ; 865, (D853, bit 5)
- const EVENT_866 ; 866, (D853, bit 6)
- const EVENT_867 ; 867, (D853, bit 7)
- const EVENT_868 ; 868, (D854, bit 0)
- const EVENT_869 ; 869, (D854, bit 1)
- const EVENT_86A ; 86A, (D854, bit 2)
- const EVENT_86B ; 86B, (D854, bit 3)
- const EVENT_86C ; 86C, (D854, bit 4)
- const EVENT_86D ; 86D, (D854, bit 5)
- const EVENT_86E ; 86E, (D854, bit 6)
- const EVENT_86F ; 86F, (D854, bit 7)
- const EVENT_870 ; 870, (D855, bit 0)
- const EVENT_871 ; 871, (D855, bit 1)
- const EVENT_872 ; 872, (D855, bit 2)
- const EVENT_873 ; 873, (D855, bit 3)
- const EVENT_874 ; 874, (D855, bit 4)
- const EVENT_875 ; 875, (D855, bit 5)
- const EVENT_876 ; 876, (D855, bit 6)
- const EVENT_877 ; 877, (D855, bit 7)
- const EVENT_878 ; 878, (D856, bit 0)
- const EVENT_879 ; 879, (D856, bit 1)
- const EVENT_87A ; 87A, (D856, bit 2)
- const EVENT_87B ; 87B, (D856, bit 3)
- const EVENT_87C ; 87C, (D856, bit 4)
- const EVENT_87D ; 87D, (D856, bit 5)
- const EVENT_87E ; 87E, (D856, bit 6)
- const EVENT_87F ; 87F, (D856, bit 7)
- const EVENT_GOT_HM03 ; 880, (D857, bit 0)
- const EVENT_881 ; 881, (D857, bit 1)
- const EVENT_882 ; 882, (D857, bit 2)
- const EVENT_883 ; 883, (D857, bit 3)
- const EVENT_884 ; 884, (D857, bit 4)
- const EVENT_885 ; 885, (D857, bit 5)
- const EVENT_886 ; 886, (D857, bit 6)
- const EVENT_887 ; 887, (D857, bit 7)
- const EVENT_888 ; 888, (D858, bit 0)
- const EVENT_889 ; 889, (D858, bit 1)
- const EVENT_88A ; 88A, (D858, bit 2)
- const EVENT_88B ; 88B, (D858, bit 3)
- const EVENT_88C ; 88C, (D858, bit 4)
- const EVENT_88D ; 88D, (D858, bit 5)
- const EVENT_88E ; 88E, (D858, bit 6)
- const EVENT_88F ; 88F, (D858, bit 7)
- const EVENT_890 ; 890, (D859, bit 0)
- const EVENT_891 ; 891, (D859, bit 1)
- const EVENT_892 ; 892, (D859, bit 2)
- const EVENT_893 ; 893, (D859, bit 3)
- const EVENT_894 ; 894, (D859, bit 4)
- const EVENT_895 ; 895, (D859, bit 5)
- const EVENT_896 ; 896, (D859, bit 6)
- const EVENT_897 ; 897, (D859, bit 7)
- const EVENT_898 ; 898, (D85A, bit 0)
- const EVENT_899 ; 899, (D85A, bit 1)
- const EVENT_89A ; 89A, (D85A, bit 2)
- const EVENT_89B ; 89B, (D85A, bit 3)
- const EVENT_89C ; 89C, (D85A, bit 4)
- const EVENT_89D ; 89D, (D85A, bit 5)
- const EVENT_89E ; 89E, (D85A, bit 6)
- const EVENT_89F ; 89F, (D85A, bit 7)
- const EVENT_8A0 ; 8A0, (D85B, bit 0)
- const EVENT_8A1 ; 8A1, (D85B, bit 1)
- const EVENT_8A2 ; 8A2, (D85B, bit 2)
- const EVENT_8A3 ; 8A3, (D85B, bit 3)
- const EVENT_8A4 ; 8A4, (D85B, bit 4)
- const EVENT_8A5 ; 8A5, (D85B, bit 5)
- const EVENT_8A6 ; 8A6, (D85B, bit 6)
- const EVENT_8A7 ; 8A7, (D85B, bit 7)
- const EVENT_8A8 ; 8A8, (D85C, bit 0)
- const EVENT_8A9 ; 8A9, (D85C, bit 1)
- const EVENT_8AA ; 8AA, (D85C, bit 2)
- const EVENT_8AB ; 8AB, (D85C, bit 3)
- const EVENT_8AC ; 8AC, (D85C, bit 4)
- const EVENT_8AD ; 8AD, (D85C, bit 5)
- const EVENT_8AE ; 8AE, (D85C, bit 6)
- const EVENT_8AF ; 8AF, (D85C, bit 7)
- const EVENT_8B0 ; 8B0, (D85D, bit 0)
- const EVENT_8B1 ; 8B1, (D85D, bit 1)
- const EVENT_8B2 ; 8B2, (D85D, bit 2)
- const EVENT_8B3 ; 8B3, (D85D, bit 3)
- const EVENT_8B4 ; 8B4, (D85D, bit 4)
- const EVENT_8B5 ; 8B5, (D85D, bit 5)
- const EVENT_8B6 ; 8B6, (D85D, bit 6)
- const EVENT_8B7 ; 8B7, (D85D, bit 7)
- const EVENT_8B8 ; 8B8, (D85E, bit 0)
- const EVENT_8B9 ; 8B9, (D85E, bit 1)
- const EVENT_8BA ; 8BA, (D85E, bit 2)
- const EVENT_8BB ; 8BB, (D85E, bit 3)
- const EVENT_8BC ; 8BC, (D85E, bit 4)
- const EVENT_8BD ; 8BD, (D85E, bit 5)
- const EVENT_8BE ; 8BE, (D85E, bit 6)
- const EVENT_8BF ; 8BF, (D85E, bit 7)
- const EVENT_8C0 ; 8C0, (D85F, bit 0)
- const EVENT_BEAT_MEWTWO ; 8C1, (D85F, bit 1)
- const EVENT_8C2 ; 8C2, (D85F, bit 2)
- const EVENT_8C3 ; 8C3, (D85F, bit 3)
- const EVENT_8C4 ; 8C4, (D85F, bit 4)
- const EVENT_8C5 ; 8C5, (D85F, bit 5)
- const EVENT_8C6 ; 8C6, (D85F, bit 6)
- const EVENT_8C7 ; 8C7, (D85F, bit 7)
- const EVENT_8C8 ; 8C8, (D860, bit 0)
- const EVENT_8C9 ; 8C9, (D860, bit 1)
- const EVENT_8CA ; 8CA, (D860, bit 2)
- const EVENT_8CB ; 8CB, (D860, bit 3)
- const EVENT_8CC ; 8CC, (D860, bit 4)
- const EVENT_8CD ; 8CD, (D860, bit 5)
- const EVENT_8CE ; 8CE, (D860, bit 6)
- const EVENT_8CF ; 8CF, (D860, bit 7)
- const EVENT_8D0 ; 8D0, (D861, bit 0)
- const EVENT_8D1 ; 8D1, (D861, bit 1)
- const EVENT_8D2 ; 8D2, (D861, bit 2)
- const EVENT_8D3 ; 8D3, (D861, bit 3)
- const EVENT_8D4 ; 8D4, (D861, bit 4)
- const EVENT_8D5 ; 8D5, (D861, bit 5)
- const EVENT_8D6 ; 8D6, (D861, bit 6)
- const EVENT_8D7 ; 8D7, (D861, bit 7)
- const EVENT_8D8 ; 8D8, (D862, bit 0)
- const EVENT_8D9 ; 8D9, (D862, bit 1)
- const EVENT_8DA ; 8DA, (D862, bit 2)
- const EVENT_8DB ; 8DB, (D862, bit 3)
- const EVENT_8DC ; 8DC, (D862, bit 4)
- const EVENT_8DD ; 8DD, (D862, bit 5)
- const EVENT_8DE ; 8DE, (D862, bit 6)
- const EVENT_8DF ; 8DF, (D862, bit 7)
- const ELITE4_EVENTS_START ; 8E0, (D863, bit 0)
- const EVENT_BEAT_LORELEIS_ROOM_TRAINER_0 ; 8E1, (D863, bit 1)
- const EVENT_8E2 ; 8E2, (D863, bit 2)
- const EVENT_8E3 ; 8E3, (D863, bit 3)
- const EVENT_8E4 ; 8E4, (D863, bit 4)
- const EVENT_8E5 ; 8E5, (D863, bit 5)
- const EVENT_AUTOWALKED_INTO_LORELEIS_ROOM ; 8E6, (D863, bit 6)
- const EVENT_8E7 ; 8E7, (D863, bit 7)
- const EVENT_8E8 ; 8E8, (D864, bit 0)
- const EVENT_BEAT_BRUNOS_ROOM_TRAINER_0 ; 8E9, (D864, bit 1)
- const EVENT_8EA ; 8EA, (D864, bit 2)
- const EVENT_8EB ; 8EB, (D864, bit 3)
- const EVENT_8EC ; 8EC, (D864, bit 4)
- const EVENT_8ED ; 8ED, (D864, bit 5)
- const EVENT_AUTOWALKED_INTO_BRUNOS_ROOM ; 8EE, (D864, bit 6)
- const EVENT_8EF ; 8EF, (D864, bit 7)
- const EVENT_8F0 ; 8F0, (D865, bit 0)
- const EVENT_BEAT_AGATHAS_ROOM_TRAINER_0 ; 8F1, (D865, bit 1)
- const EVENT_8F2 ; 8F2, (D865, bit 2)
- const EVENT_8F3 ; 8F3, (D865, bit 3)
- const EVENT_8F4 ; 8F4, (D865, bit 4)
- const EVENT_8F5 ; 8F5, (D865, bit 5)
- const EVENT_AUTOWALKED_INTO_AGATHAS_ROOM ; 8F6, (D865, bit 6)
- const EVENT_8F7 ; 8F7, (D865, bit 7)
- const EVENT_8F8 ; 8F8, (D866, bit 0)
- const EVENT_BEAT_LANCES_ROOM_TRAINER_0 ; 8F9, (D866, bit 1)
- const EVENT_8FA ; 8FA, (D866, bit 2)
- const EVENT_8FB ; 8FB, (D866, bit 3)
- const EVENT_8FC ; 8FC, (D866, bit 4)
- const EVENT_8FD ; 8FD, (D866, bit 5)
- const EVENT_BEAT_LANCE ; 8FE, (D866, bit 6)
- const EVENT_LANCES_ROOM_LOCK_DOOR ; 8FF, (D866, bit 7)
- const EVENT_900 ; 900, (D867, bit 0)
- const EVENT_BEAT_CHAMPION_RIVAL ; 901, (D867, bit 1)
- const EVENT_902 ; 902, (D867, bit 2)
- const EVENT_903 ; 903, (D867, bit 3)
- const EVENT_904 ; 904, (D867, bit 4)
- const EVENT_905 ; 905, (D867, bit 5)
- const EVENT_906 ; 906, (D867, bit 6)
- const ELITE4_CHAMPION_EVENTS_END ; 907, (D867, bit 7)
- const EVENT_908 ; 908, (D868, bit 0)
- const EVENT_909 ; 909, (D868, bit 1)
- const EVENT_90A ; 90A, (D868, bit 2)
- const EVENT_90B ; 90B, (D868, bit 3)
- const EVENT_90C ; 90C, (D868, bit 4)
- const EVENT_90D ; 90D, (D868, bit 5)
- const EVENT_90E ; 90E, (D868, bit 6)
- const EVENT_90F ; 90F, (D868, bit 7)
- const EVENT_910 ; 910, (D869, bit 0)
- const EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0 ; 911, (D869, bit 1)
- const EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1 ; 912, (D869, bit 2)
- const EVENT_913 ; 913, (D869, bit 3)
- const EVENT_914 ; 914, (D869, bit 4)
- const EVENT_915 ; 915, (D869, bit 5)
- const EVENT_916 ; 916, (D869, bit 6)
- const EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH ; 917, (D869, bit 7)
- const EVENT_918 ; 918, (D86A, bit 0)
- const EVENT_919 ; 919, (D86A, bit 1)
- const EVENT_91A ; 91A, (D86A, bit 2)
- const EVENT_91B ; 91B, (D86A, bit 3)
- const EVENT_91C ; 91C, (D86A, bit 4)
- const EVENT_91D ; 91D, (D86A, bit 5)
- const EVENT_91E ; 91E, (D86A, bit 6)
- const EVENT_91F ; 91F, (D86A, bit 7)
- const EVENT_920 ; 920, (D86B, bit 0)
- const EVENT_921 ; 921, (D86B, bit 1)
- const EVENT_922 ; 922, (D86B, bit 2)
- const EVENT_923 ; 923, (D86B, bit 3)
- const EVENT_924 ; 924, (D86B, bit 4)
- const EVENT_925 ; 925, (D86B, bit 5)
- const EVENT_926 ; 926, (D86B, bit 6)
- const EVENT_927 ; 927, (D86B, bit 7)
- const EVENT_928 ; 928, (D86C, bit 0)
- const EVENT_929 ; 929, (D86C, bit 1)
- const EVENT_92A ; 92A, (D86C, bit 2)
- const EVENT_92B ; 92B, (D86C, bit 3)
- const EVENT_92C ; 92C, (D86C, bit 4)
- const EVENT_92D ; 92D, (D86C, bit 5)
- const EVENT_92E ; 92E, (D86C, bit 6)
- const EVENT_92F ; 92F, (D86C, bit 7)
- const EVENT_930 ; 930, (D86D, bit 0)
- const EVENT_931 ; 931, (D86D, bit 1)
- const EVENT_932 ; 932, (D86D, bit 2)
- const EVENT_933 ; 933, (D86D, bit 3)
- const EVENT_934 ; 934, (D86D, bit 4)
- const EVENT_935 ; 935, (D86D, bit 5)
- const EVENT_936 ; 936, (D86D, bit 6)
- const EVENT_937 ; 937, (D86D, bit 7)
- const EVENT_938 ; 938, (D86E, bit 0)
- const EVENT_939 ; 939, (D86E, bit 1)
- const EVENT_93A ; 93A, (D86E, bit 2)
- const EVENT_93B ; 93B, (D86E, bit 3)
- const EVENT_93C ; 93C, (D86E, bit 4)
- const EVENT_93D ; 93D, (D86E, bit 5)
- const EVENT_93E ; 93E, (D86E, bit 6)
- const EVENT_93F ; 93F, (D86E, bit 7)
- const EVENT_940 ; 940, (D86F, bit 0)
- const EVENT_941 ; 941, (D86F, bit 1)
- const EVENT_942 ; 942, (D86F, bit 2)
- const EVENT_943 ; 943, (D86F, bit 3)
- const EVENT_944 ; 944, (D86F, bit 4)
- const EVENT_945 ; 945, (D86F, bit 5)
- const EVENT_946 ; 946, (D86F, bit 6)
- const EVENT_947 ; 947, (D86F, bit 7)
- const EVENT_948 ; 948, (D870, bit 0)
- const EVENT_949 ; 949, (D870, bit 1)
- const EVENT_94A ; 94A, (D870, bit 2)
- const EVENT_94B ; 94B, (D870, bit 3)
- const EVENT_94C ; 94C, (D870, bit 4)
- const EVENT_94D ; 94D, (D870, bit 5)
- const EVENT_94E ; 94E, (D870, bit 6)
- const EVENT_94F ; 94F, (D870, bit 7)
- const EVENT_950 ; 950, (D871, bit 0)
- const EVENT_951 ; 951, (D871, bit 1)
- const EVENT_952 ; 952, (D871, bit 2)
- const EVENT_953 ; 953, (D871, bit 3)
- const EVENT_954 ; 954, (D871, bit 4)
- const EVENT_955 ; 955, (D871, bit 5)
- const EVENT_956 ; 956, (D871, bit 6)
- const EVENT_957 ; 957, (D871, bit 7)
- const EVENT_958 ; 958, (D872, bit 0)
- const EVENT_959 ; 959, (D872, bit 1)
- const EVENT_95A ; 95A, (D872, bit 2)
- const EVENT_95B ; 95B, (D872, bit 3)
- const EVENT_95C ; 95C, (D872, bit 4)
- const EVENT_95D ; 95D, (D872, bit 5)
- const EVENT_95E ; 95E, (D872, bit 6)
- const EVENT_95F ; 95F, (D872, bit 7)
- const EVENT_960 ; 960, (D873, bit 0)
- const EVENT_961 ; 961, (D873, bit 1)
- const EVENT_962 ; 962, (D873, bit 2)
- const EVENT_963 ; 963, (D873, bit 3)
- const EVENT_964 ; 964, (D873, bit 4)
- const EVENT_965 ; 965, (D873, bit 5)
- const EVENT_966 ; 966, (D873, bit 6)
- const EVENT_967 ; 967, (D873, bit 7)
- const EVENT_968 ; 968, (D874, bit 0)
- const EVENT_969 ; 969, (D874, bit 1)
- const EVENT_96A ; 96A, (D874, bit 2)
- const EVENT_96B ; 96B, (D874, bit 3)
- const EVENT_96C ; 96C, (D874, bit 4)
- const EVENT_96D ; 96D, (D874, bit 5)
- const EVENT_96E ; 96E, (D874, bit 6)
- const EVENT_96F ; 96F, (D874, bit 7)
- const EVENT_970 ; 970, (D875, bit 0)
- const EVENT_971 ; 971, (D875, bit 1)
- const EVENT_972 ; 972, (D875, bit 2)
- const EVENT_973 ; 973, (D875, bit 3)
- const EVENT_974 ; 974, (D875, bit 4)
- const EVENT_975 ; 975, (D875, bit 5)
- const EVENT_976 ; 976, (D875, bit 6)
- const EVENT_977 ; 977, (D875, bit 7)
- const EVENT_978 ; 978, (D876, bit 0)
- const EVENT_979 ; 979, (D876, bit 1)
- const EVENT_97A ; 97A, (D876, bit 2)
- const EVENT_97B ; 97B, (D876, bit 3)
- const EVENT_97C ; 97C, (D876, bit 4)
- const EVENT_97D ; 97D, (D876, bit 5)
- const EVENT_97E ; 97E, (D876, bit 6)
- const EVENT_97F ; 97F, (D876, bit 7)
- const EVENT_980 ; 980, (D877, bit 0)
- const EVENT_981 ; 981, (D877, bit 1)
- const EVENT_982 ; 982, (D877, bit 2)
- const EVENT_983 ; 983, (D877, bit 3)
- const EVENT_984 ; 984, (D877, bit 4)
- const EVENT_985 ; 985, (D877, bit 5)
- const EVENT_986 ; 986, (D877, bit 6)
- const EVENT_987 ; 987, (D877, bit 7)
- const EVENT_988 ; 988, (D878, bit 0)
- const EVENT_989 ; 989, (D878, bit 1)
- const EVENT_98A ; 98A, (D878, bit 2)
- const EVENT_98B ; 98B, (D878, bit 3)
- const EVENT_98C ; 98C, (D878, bit 4)
- const EVENT_98D ; 98D, (D878, bit 5)
- const EVENT_98E ; 98E, (D878, bit 6)
- const EVENT_98F ; 98F, (D878, bit 7)
- const EVENT_990 ; 990, (D879, bit 0)
- const EVENT_991 ; 991, (D879, bit 1)
- const EVENT_992 ; 992, (D879, bit 2)
- const EVENT_993 ; 993, (D879, bit 3)
- const EVENT_994 ; 994, (D879, bit 4)
- const EVENT_995 ; 995, (D879, bit 5)
- const EVENT_996 ; 996, (D879, bit 6)
- const EVENT_997 ; 997, (D879, bit 7)
- const EVENT_998 ; 998, (D87A, bit 0)
- const EVENT_999 ; 999, (D87A, bit 1)
- const EVENT_99A ; 99A, (D87A, bit 2)
- const EVENT_99B ; 99B, (D87A, bit 3)
- const EVENT_99C ; 99C, (D87A, bit 4)
- const EVENT_99D ; 99D, (D87A, bit 5)
- const EVENT_99E ; 99E, (D87A, bit 6)
- const EVENT_99F ; 99F, (D87A, bit 7)
- const EVENT_9A0 ; 9A0, (D87B, bit 0)
- const EVENT_9A1 ; 9A1, (D87B, bit 1)
- const EVENT_9A2 ; 9A2, (D87B, bit 2)
- const EVENT_9A3 ; 9A3, (D87B, bit 3)
- const EVENT_9A4 ; 9A4, (D87B, bit 4)
- const EVENT_9A5 ; 9A5, (D87B, bit 5)
- const EVENT_9A6 ; 9A6, (D87B, bit 6)
- const EVENT_9A7 ; 9A7, (D87B, bit 7)
- const EVENT_9A8 ; 9A8, (D87C, bit 0)
- const EVENT_9A9 ; 9A9, (D87C, bit 1)
- const EVENT_9AA ; 9AA, (D87C, bit 2)
- const EVENT_9AB ; 9AB, (D87C, bit 3)
- const EVENT_9AC ; 9AC, (D87C, bit 4)
- const EVENT_9AD ; 9AD, (D87C, bit 5)
- const EVENT_9AE ; 9AE, (D87C, bit 6)
- const EVENT_9AF ; 9AF, (D87C, bit 7)
- const EVENT_9B0 ; 9B0, (D87D, bit 0)
- const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0 ; 9B1, (D87D, bit 1)
- const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1 ; 9B2, (D87D, bit 2)
- const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2 ; 9B3, (D87D, bit 3)
- const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3 ; 9B4, (D87D, bit 4)
- const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4 ; 9B5, (D87D, bit 5)
- const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5 ; 9B6, (D87D, bit 6)
- const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6 ; 9B7, (D87D, bit 7)
- const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7 ; 9B8, (D87E, bit 0)
- const EVENT_9B9 ; 9B9, (D87E, bit 1)
- const EVENT_9BA ; 9BA, (D87E, bit 2)
- const EVENT_9BB ; 9BB, (D87E, bit 3)
- const EVENT_9BC ; 9BC, (D87E, bit 4)
- const EVENT_9BD ; 9BD, (D87E, bit 5)
- const EVENT_9BE ; 9BE, (D87E, bit 6)
- const EVENT_9BF ; 9BF, (D87E, bit 7)
- const EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE ; 9C0, (D87F, bit 0)
- const EVENT_SEAFOAM2_BOULDER2_DOWN_HOLE ; 9C1, (D87F, bit 1)
- const EVENT_9C2 ; 9C2, (D87F, bit 2)
- const EVENT_9C3 ; 9C3, (D87F, bit 3)
- const EVENT_9C4 ; 9C4, (D87F, bit 4)
- const EVENT_9C5 ; 9C5, (D87F, bit 5)
- const EVENT_9C6 ; 9C6, (D87F, bit 6)
- const EVENT_9C7 ; 9C7, (D87F, bit 7)
- const EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE ; 9C8, (D880, bit 0)
- const EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE ; 9C9, (D880, bit 1)
- const EVENT_9CA ; 9CA, (D880, bit 2)
- const EVENT_9CB ; 9CB, (D880, bit 3)
- const EVENT_9CC ; 9CC, (D880, bit 4)
- const EVENT_9CD ; 9CD, (D880, bit 5)
- const EVENT_9CE ; 9CE, (D880, bit 6)
- const EVENT_9CF ; 9CF, (D880, bit 7)
- const EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE ; 9D0, (D881, bit 0)
- const EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE ; 9D1, (D881, bit 1)
- const EVENT_9D2 ; 9D2, (D881, bit 2)
- const EVENT_9D3 ; 9D3, (D881, bit 3)
- const EVENT_9D4 ; 9D4, (D881, bit 4)
- const EVENT_9D5 ; 9D5, (D881, bit 5)
- const EVENT_9D6 ; 9D6, (D881, bit 6)
- const EVENT_9D7 ; 9D7, (D881, bit 7)
- const EVENT_9D8 ; 9D8, (D882, bit 0)
- const EVENT_9D9 ; 9D9, (D882, bit 1)
- const EVENT_BEAT_ARTICUNO ; 9DA, (D882, bit 2)
- const EVENT_9DB ; 9DB, (D882, bit 3)
- const EVENT_9DC ; 9DC, (D882, bit 4)
- const EVENT_9DD ; 9DD, (D882, bit 5)
- const EVENT_9DE ; 9DE, (D882, bit 6)
- const EVENT_9DF ; 9DF, (D882, bit 7)
- const EVENT_9E0 ; 9E0, (D883, bit 0)
- const EVENT_9E1 ; 9E1, (D883, bit 1)
- const EVENT_9E2 ; 9E2, (D883, bit 2)
- const EVENT_9E3 ; 9E3, (D883, bit 3)
- const EVENT_9E4 ; 9E4, (D883, bit 4)
- const EVENT_9E5 ; 9E5, (D883, bit 5)
- const EVENT_9E6 ; 9E6, (D883, bit 6)
- const EVENT_9E7 ; 9E7, (D883, bit 7)
- const EVENT_9E8 ; 9E8, (D884, bit 0)
- const EVENT_9E9 ; 9E9, (D884, bit 1)
- const EVENT_9EA ; 9EA, (D884, bit 2)
- const EVENT_9EB ; 9EB, (D884, bit 3)
- const EVENT_9EC ; 9EC, (D884, bit 4)
- const EVENT_9ED ; 9ED, (D884, bit 5)
- const EVENT_9EE ; 9EE, (D884, bit 6)
- const EVENT_9EF ; 9EF, (D884, bit 7)
- const EVENT_9F0 ; 9F0, (D885, bit 0)
- const EVENT_9F1 ; 9F1, (D885, bit 1)
- const EVENT_9F2 ; 9F2, (D885, bit 2)
- const EVENT_9F3 ; 9F3, (D885, bit 3)
- const EVENT_9F4 ; 9F4, (D885, bit 4)
- const EVENT_9F5 ; 9F5, (D885, bit 5)
- const EVENT_9F6 ; 9F6, (D885, bit 6)
- const EVENT_9F7 ; 9F7, (D885, bit 7)
- const EVENT_9F8 ; 9F8, (D886, bit 0)
- const EVENT_9F9 ; 9F9, (D886, bit 1)
- const EVENT_9FA ; 9FA, (D886, bit 2)
- const EVENT_9FB ; 9FB, (D886, bit 3)
- const EVENT_9FC ; 9FC, (D886, bit 4)
- const EVENT_9FD ; 9FD, (D886, bit 5)
- const EVENT_9FE ; 9FE, (D886, bit 6)
- const EVENT_9FF ; 9FF, (D886, bit 7)
+; Pallet Town events
+ const_def
+ const EVENT_FOLLOWED_OAK_INTO_LAB
+ const_skip 2
+ const EVENT_HALL_OF_FAME_DEX_RATING
+ const_skip
+ const EVENT_PLAYER_AT_RIGHT_EXIT_TO_PALLET_TOWN
+ const EVENT_PALLET_AFTER_GETTING_POKEBALLS
+ const_skip 17
+ const EVENT_GOT_TOWN_MAP
+ const EVENT_ENTERED_BLUES_HOUSE
+ const EVENT_DAISY_WALKING
+ const_skip 5
+ const EVENT_FOLLOWED_OAK_INTO_LAB_2
+ const EVENT_OAK_ASKED_TO_CHOOSE_MON
+ const EVENT_GOT_STARTER
+ const EVENT_BATTLED_RIVAL_IN_OAKS_LAB
+ const EVENT_GOT_POKEBALLS_FROM_OAK
+ const EVENT_GOT_POKEDEX
+ const EVENT_PALLET_AFTER_GETTING_POKEBALLS_2
+ const EVENT_OAK_APPEARED_IN_PALLET
-NUM_EVENT_FLAGS EQU const_value
+; Viridian City events
+ const_next $28
+ const EVENT_VIRIDIAN_GYM_OPEN
+ const EVENT_GOT_TM42
+ const_skip 2
+ const EVENT_02C
+ const EVENT_02D
+ const EVENT_02E
+ const EVENT_02F
+ const_skip 8
+ const EVENT_OAK_GOT_PARCEL
+ const EVENT_GOT_OAKS_PARCEL
+ const_skip 22
+ const EVENT_GOT_TM27
+ const EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
+ const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0
+ const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1
+ const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2
+ const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3
+ const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4
+ const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5
+ const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6
+ const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7
+
+; Pewter City events
+ const_next $68
+ const EVENT_BOUGHT_MUSEUM_TICKET
+ const EVENT_GOT_OLD_AMBER
+ const_skip 8
+ const EVENT_BEAT_PEWTER_GYM_TRAINER_0
+ const_skip 3
+ const EVENT_GOT_TM34
+ const EVENT_BEAT_BROCK
+
+; Cerulean City events
+ const_next $98
+ const EVENT_BEAT_CERULEAN_RIVAL
+ const_skip 14
+ const EVENT_BEAT_CERULEAN_ROCKET_THIEF
+ const EVENT_GOT_BULBASAUR_IN_CERULEAN
+ const_skip 17
+ const EVENT_BEAT_CERULEAN_GYM_TRAINER_0
+ const EVENT_BEAT_CERULEAN_GYM_TRAINER_1
+ const_skip 2
+ const EVENT_GOT_TM11
+ const EVENT_BEAT_MISTY
+ const EVENT_GOT_BICYCLE
+
+; Lavender Town events
+ const_next $F0 - 2
+ const EVENT_POKEMON_TOWER_RIVAL_ON_LEFT
+ const EVENT_BEAT_POKEMON_TOWER_RIVAL
+ const_skip
+ const EVENT_BEAT_POKEMONTOWER_3_TRAINER_0
+ const EVENT_BEAT_POKEMONTOWER_3_TRAINER_1
+ const EVENT_BEAT_POKEMONTOWER_3_TRAINER_2
+ const_skip 5
+ const EVENT_BEAT_POKEMONTOWER_4_TRAINER_0
+ const EVENT_BEAT_POKEMONTOWER_4_TRAINER_1
+ const EVENT_BEAT_POKEMONTOWER_4_TRAINER_2
+ const_skip 6
+ const EVENT_BEAT_POKEMONTOWER_5_TRAINER_0
+ const EVENT_BEAT_POKEMONTOWER_5_TRAINER_1
+ const EVENT_BEAT_POKEMONTOWER_5_TRAINER_2
+ const EVENT_BEAT_POKEMONTOWER_5_TRAINER_3
+ const_skip
+ const EVENT_IN_PURIFIED_ZONE
+ const_skip
+ const EVENT_BEAT_POKEMONTOWER_6_TRAINER_0
+ const EVENT_BEAT_POKEMONTOWER_6_TRAINER_1
+ const EVENT_BEAT_POKEMONTOWER_6_TRAINER_2
+ const_skip 3
+ const EVENT_BEAT_GHOST_MAROWAK
+ const_skip
+ const EVENT_BEAT_POKEMONTOWER_7_TRAINER_0
+ const EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
+ const EVENT_BEAT_POKEMONTOWER_7_TRAINER_2
+ const_skip 3
+ const EVENT_RESCUED_MR_FUJI_2
+ const_skip 16
+ const EVENT_GOT_POKE_FLUTE
+ const_skip 30
+ const EVENT_GOT_SQUIRTLE_FROM_OFFICER_JENNY
+
+; Vermilion City events
+ const_next $150
+ const_skip
+ const EVENT_GOT_BIKE_VOUCHER
+ const EVENT_152
+ const_skip 3
+ const EVENT_SEEL_FAN_BOAST
+ const EVENT_PIKACHU_FAN_BOAST
+ const_skip 8
+ const EVENT_2ND_LOCK_OPENED
+ const EVENT_1ST_LOCK_OPENED
+ const EVENT_BEAT_VERMILION_GYM_TRAINER_0
+ const EVENT_BEAT_VERMILION_GYM_TRAINER_1
+ const EVENT_BEAT_VERMILION_GYM_TRAINER_2
+ const_skip
+ const EVENT_GOT_TM24
+ const EVENT_BEAT_LT_SURGE
+
+; Celadon City events
+ const_next $180
+ const EVENT_GOT_TM41
+ const_skip 11
+ const EVENT_GOT_TM13
+ const EVENT_GOT_TM48
+ const EVENT_GOT_TM49
+ const EVENT_GOT_TM18
+ const_skip 24
+ const EVENT_GOT_TM21
+ const EVENT_BEAT_ERIKA
+ const EVENT_BEAT_CELADON_GYM_TRAINER_0
+ const EVENT_BEAT_CELADON_GYM_TRAINER_1
+ const EVENT_BEAT_CELADON_GYM_TRAINER_2
+ const EVENT_BEAT_CELADON_GYM_TRAINER_3
+ const EVENT_BEAT_CELADON_GYM_TRAINER_4
+ const EVENT_BEAT_CELADON_GYM_TRAINER_5
+ const EVENT_BEAT_CELADON_GYM_TRAINER_6
+ const_skip 7
+ const EVENT_1B8 ; ???
+ const EVENT_FOUND_ROCKET_HIDEOUT
+ const EVENT_GOT_10_COINS
+ const EVENT_GOT_20_COINS
+ const EVENT_GOT_20_COINS_2
+ const_skip 2
+ const EVENT_1BF ; ???
+ const_skip 32
+ const EVENT_GOT_COIN_CASE
+
+; Fuchsia City events
+ const_next $238
+ const EVENT_GOT_HM04
+ const EVENT_GAVE_GOLD_TEETH
+ const_skip 20
+ const EVENT_SAFARI_GAME_OVER
+ const EVENT_IN_SAFARI_ZONE
+ const_skip 8
+ const EVENT_GOT_TM06
+ const EVENT_BEAT_KOGA
+ const EVENT_BEAT_FUCHSIA_GYM_TRAINER_0
+ const EVENT_BEAT_FUCHSIA_GYM_TRAINER_1
+ const EVENT_BEAT_FUCHSIA_GYM_TRAINER_2
+ const EVENT_BEAT_FUCHSIA_GYM_TRAINER_3
+ const EVENT_BEAT_FUCHSIA_GYM_TRAINER_4
+ const EVENT_BEAT_FUCHSIA_GYM_TRAINER_5
+
+; Cinnabar Island events
+ const_next $278
+ const EVENT_MANSION_SWITCH_ON
+ const_skip 16
+ const EVENT_BEAT_MANSION_1_TRAINER_0
+ const_skip 14
+ const EVENT_GOT_TM38
+ const EVENT_BEAT_BLAINE
+ const EVENT_BEAT_CINNABAR_GYM_TRAINER_0
+ const EVENT_BEAT_CINNABAR_GYM_TRAINER_1
+ const EVENT_BEAT_CINNABAR_GYM_TRAINER_2
+ const EVENT_BEAT_CINNABAR_GYM_TRAINER_3
+ const EVENT_BEAT_CINNABAR_GYM_TRAINER_4
+ const EVENT_BEAT_CINNABAR_GYM_TRAINER_5
+ const EVENT_BEAT_CINNABAR_GYM_TRAINER_6
+ const_skip 6
+ const EVENT_2A7 ; ???
+ const EVENT_CINNABAR_GYM_GATE0_UNLOCKED
+ const EVENT_CINNABAR_GYM_GATE1_UNLOCKED
+ const EVENT_CINNABAR_GYM_GATE2_UNLOCKED
+ const EVENT_CINNABAR_GYM_GATE3_UNLOCKED
+ const EVENT_CINNABAR_GYM_GATE4_UNLOCKED
+ const EVENT_CINNABAR_GYM_GATE5_UNLOCKED
+ const EVENT_CINNABAR_GYM_GATE6_UNLOCKED
+ const_skip 40
+ const EVENT_GOT_TM35
+ const_skip 8
+ const EVENT_GAVE_FOSSIL_TO_LAB
+ const EVENT_LAB_STILL_REVIVING_FOSSIL
+ const EVENT_LAB_HANDING_OVER_FOSSIL_MON
+
+; Saffron City events
+ const_next $340
+ const EVENT_GOT_TM31
+ const_skip 15
+ const EVENT_DEFEATED_FIGHTING_DOJO
+ const EVENT_BEAT_KARATE_MASTER
+ const EVENT_BEAT_FIGHTING_DOJO_TRAINER_0
+ const EVENT_BEAT_FIGHTING_DOJO_TRAINER_1
+ const EVENT_BEAT_FIGHTING_DOJO_TRAINER_2
+ const EVENT_BEAT_FIGHTING_DOJO_TRAINER_3
+ const EVENT_GOT_HITMONLEE
+ const EVENT_GOT_HITMONCHAN
+ const_skip 8
+ const EVENT_GOT_TM46
+ const EVENT_BEAT_SABRINA
+ const EVENT_BEAT_SAFFRON_GYM_TRAINER_0
+ const EVENT_BEAT_SAFFRON_GYM_TRAINER_1
+ const EVENT_BEAT_SAFFRON_GYM_TRAINER_2
+ const EVENT_BEAT_SAFFRON_GYM_TRAINER_3
+ const EVENT_BEAT_SAFFRON_GYM_TRAINER_4
+ const EVENT_BEAT_SAFFRON_GYM_TRAINER_5
+ const EVENT_BEAT_SAFFRON_GYM_TRAINER_6
+ const_skip 46
+ const EVENT_SILPH_CO_RECEPTIONIST_AT_DESK
+ const_skip 24
+ const EVENT_GOT_TM29
+
+; Route 1 events
+ const_next $3C0
+ const EVENT_GOT_POTION_SAMPLE
+
+; Route 2 events
+ const_next $3D8
+ const EVENT_GOT_HM05
+
+; Route 3 events
+ const_next $3E0
+ const_skip 2
+ const EVENT_BEAT_ROUTE_3_TRAINER_0
+ const EVENT_BEAT_ROUTE_3_TRAINER_1
+ const EVENT_BEAT_ROUTE_3_TRAINER_2
+ const EVENT_BEAT_ROUTE_3_TRAINER_3
+ const EVENT_BEAT_ROUTE_3_TRAINER_4
+ const EVENT_BEAT_ROUTE_3_TRAINER_5
+ const EVENT_BEAT_ROUTE_3_TRAINER_6
+ const EVENT_BEAT_ROUTE_3_TRAINER_7
+
+; Route 4 events
+ const_next $3F0
+ const_skip 2
+ const EVENT_BEAT_ROUTE_4_TRAINER_0
+ const_skip 12
+ const EVENT_BOUGHT_MAGIKARP
+
+; Route 6 events
+ const_next $410
+ const_skip
+ const EVENT_BEAT_ROUTE_6_TRAINER_0
+ const EVENT_BEAT_ROUTE_6_TRAINER_1
+ const EVENT_BEAT_ROUTE_6_TRAINER_2
+ const EVENT_BEAT_ROUTE_6_TRAINER_3
+ const EVENT_BEAT_ROUTE_6_TRAINER_4
+ const EVENT_BEAT_ROUTE_6_TRAINER_5
+
+; Route 8 events
+ const_next $430
+ const_skip
+ const EVENT_BEAT_ROUTE_8_TRAINER_0
+ const EVENT_BEAT_ROUTE_8_TRAINER_1
+ const EVENT_BEAT_ROUTE_8_TRAINER_2
+ const EVENT_BEAT_ROUTE_8_TRAINER_3
+ const EVENT_BEAT_ROUTE_8_TRAINER_4
+ const EVENT_BEAT_ROUTE_8_TRAINER_5
+ const EVENT_BEAT_ROUTE_8_TRAINER_6
+ const EVENT_BEAT_ROUTE_8_TRAINER_7
+ const EVENT_BEAT_ROUTE_8_TRAINER_8
+
+; Route 9 events
+ const_next $440
+ const_skip
+ const EVENT_BEAT_ROUTE_9_TRAINER_0
+ const EVENT_BEAT_ROUTE_9_TRAINER_1
+ const EVENT_BEAT_ROUTE_9_TRAINER_2
+ const EVENT_BEAT_ROUTE_9_TRAINER_3
+ const EVENT_BEAT_ROUTE_9_TRAINER_4
+ const EVENT_BEAT_ROUTE_9_TRAINER_5
+ const EVENT_BEAT_ROUTE_9_TRAINER_6
+ const EVENT_BEAT_ROUTE_9_TRAINER_7
+ const EVENT_BEAT_ROUTE_9_TRAINER_8
+
+; Route 10 events
+ const_next $450
+ const_skip
+ const EVENT_BEAT_ROUTE_10_TRAINER_0
+ const EVENT_BEAT_ROUTE_10_TRAINER_1
+ const EVENT_BEAT_ROUTE_10_TRAINER_2
+ const EVENT_BEAT_ROUTE_10_TRAINER_3
+ const EVENT_BEAT_ROUTE_10_TRAINER_4
+ const EVENT_BEAT_ROUTE_10_TRAINER_5
+ const_skip 2
+ const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0
+ const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1
+ const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2
+ const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3
+ const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4
+ const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5
+ const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6
+ const_skip
+ const EVENT_BEAT_POWER_PLANT_VOLTORB_0
+ const EVENT_BEAT_POWER_PLANT_VOLTORB_1
+ const EVENT_BEAT_POWER_PLANT_VOLTORB_2
+ const EVENT_BEAT_POWER_PLANT_VOLTORB_3
+ const EVENT_BEAT_POWER_PLANT_VOLTORB_4
+ const EVENT_BEAT_POWER_PLANT_VOLTORB_5
+ const EVENT_BEAT_POWER_PLANT_VOLTORB_6
+ const EVENT_BEAT_POWER_PLANT_VOLTORB_7
+ const EVENT_BEAT_ZAPDOS
+
+; Route 11 events
+ const_next $470
+ const_skip
+ const EVENT_BEAT_ROUTE_11_TRAINER_0
+ const EVENT_BEAT_ROUTE_11_TRAINER_1
+ const EVENT_BEAT_ROUTE_11_TRAINER_2
+ const EVENT_BEAT_ROUTE_11_TRAINER_3
+ const EVENT_BEAT_ROUTE_11_TRAINER_4
+ const EVENT_BEAT_ROUTE_11_TRAINER_5
+ const EVENT_BEAT_ROUTE_11_TRAINER_6
+ const EVENT_BEAT_ROUTE_11_TRAINER_7
+ const EVENT_BEAT_ROUTE_11_TRAINER_8
+ const EVENT_BEAT_ROUTE_11_TRAINER_9
+ const_skip 4
+ const EVENT_GOT_ITEMFINDER
+
+; Route 12 events
+ const_next $480
+ const EVENT_GOT_TM39
+ const_skip
+ const EVENT_BEAT_ROUTE_12_TRAINER_0
+ const EVENT_BEAT_ROUTE_12_TRAINER_1
+ const EVENT_BEAT_ROUTE_12_TRAINER_2
+ const EVENT_BEAT_ROUTE_12_TRAINER_3
+ const EVENT_BEAT_ROUTE_12_TRAINER_4
+ const EVENT_BEAT_ROUTE_12_TRAINER_5
+ const EVENT_BEAT_ROUTE_12_TRAINER_6
+ const_skip 5
+ const EVENT_FIGHT_ROUTE12_SNORLAX
+ const EVENT_BEAT_ROUTE12_SNORLAX
+
+; Route 13 events
+ const_next $490
+ const_skip
+ const EVENT_BEAT_ROUTE_13_TRAINER_0
+ const EVENT_BEAT_ROUTE_13_TRAINER_1
+ const EVENT_BEAT_ROUTE_13_TRAINER_2
+ const EVENT_BEAT_ROUTE_13_TRAINER_3
+ const EVENT_BEAT_ROUTE_13_TRAINER_4
+ const EVENT_BEAT_ROUTE_13_TRAINER_5
+ const EVENT_BEAT_ROUTE_13_TRAINER_6
+ const EVENT_BEAT_ROUTE_13_TRAINER_7
+ const EVENT_BEAT_ROUTE_13_TRAINER_8
+ const EVENT_BEAT_ROUTE_13_TRAINER_9
+
+; Route 14 events
+ const_next $4A0
+ const_skip
+ const EVENT_BEAT_ROUTE_14_TRAINER_0
+ const EVENT_BEAT_ROUTE_14_TRAINER_1
+ const EVENT_BEAT_ROUTE_14_TRAINER_2
+ const EVENT_BEAT_ROUTE_14_TRAINER_3
+ const EVENT_BEAT_ROUTE_14_TRAINER_4
+ const EVENT_BEAT_ROUTE_14_TRAINER_5
+ const EVENT_BEAT_ROUTE_14_TRAINER_6
+ const EVENT_BEAT_ROUTE_14_TRAINER_7
+ const EVENT_BEAT_ROUTE_14_TRAINER_8
+ const EVENT_BEAT_ROUTE_14_TRAINER_9
+
+; Route 15 events
+ const_next $4B0
+ const EVENT_GOT_EXP_ALL
+ const EVENT_BEAT_ROUTE_15_TRAINER_0
+ const EVENT_BEAT_ROUTE_15_TRAINER_1
+ const EVENT_BEAT_ROUTE_15_TRAINER_2
+ const EVENT_BEAT_ROUTE_15_TRAINER_3
+ const EVENT_BEAT_ROUTE_15_TRAINER_4
+ const EVENT_BEAT_ROUTE_15_TRAINER_5
+ const EVENT_BEAT_ROUTE_15_TRAINER_6
+ const EVENT_BEAT_ROUTE_15_TRAINER_7
+ const EVENT_BEAT_ROUTE_15_TRAINER_8
+ const EVENT_BEAT_ROUTE_15_TRAINER_9
+
+; Route 16 events
+ const_next $4C0
+ const_skip
+ const EVENT_BEAT_ROUTE_16_TRAINER_0
+ const EVENT_BEAT_ROUTE_16_TRAINER_1
+ const EVENT_BEAT_ROUTE_16_TRAINER_2
+ const EVENT_BEAT_ROUTE_16_TRAINER_3
+ const EVENT_BEAT_ROUTE_16_TRAINER_4
+ const EVENT_BEAT_ROUTE_16_TRAINER_5
+ const_skip
+ const EVENT_FIGHT_ROUTE16_SNORLAX
+ const EVENT_BEAT_ROUTE16_SNORLAX
+ const_skip 4
+ const EVENT_GOT_HM02
+ const EVENT_RESCUED_MR_FUJI
+
+; Route 17 events
+ const_next $4D0
+ const_skip
+ const EVENT_BEAT_ROUTE_17_TRAINER_0
+ const EVENT_BEAT_ROUTE_17_TRAINER_1
+ const EVENT_BEAT_ROUTE_17_TRAINER_2
+ const EVENT_BEAT_ROUTE_17_TRAINER_3
+ const EVENT_BEAT_ROUTE_17_TRAINER_4
+ const EVENT_BEAT_ROUTE_17_TRAINER_5
+ const EVENT_BEAT_ROUTE_17_TRAINER_6
+ const EVENT_BEAT_ROUTE_17_TRAINER_7
+ const EVENT_BEAT_ROUTE_17_TRAINER_8
+ const EVENT_BEAT_ROUTE_17_TRAINER_9
+
+; Route 18 events
+ const_next $4E0
+ const_skip
+ const EVENT_BEAT_ROUTE_18_TRAINER_0
+ const EVENT_BEAT_ROUTE_18_TRAINER_1
+ const EVENT_BEAT_ROUTE_18_TRAINER_2
+
+; Route 19 events
+ const_next $4F0
+ const_skip
+ const EVENT_BEAT_ROUTE_19_TRAINER_0
+ const EVENT_BEAT_ROUTE_19_TRAINER_1
+ const EVENT_BEAT_ROUTE_19_TRAINER_2
+ const EVENT_BEAT_ROUTE_19_TRAINER_3
+ const EVENT_BEAT_ROUTE_19_TRAINER_4
+ const EVENT_BEAT_ROUTE_19_TRAINER_5
+ const EVENT_BEAT_ROUTE_19_TRAINER_6
+ const EVENT_BEAT_ROUTE_19_TRAINER_7
+ const EVENT_BEAT_ROUTE_19_TRAINER_8
+ const EVENT_BEAT_ROUTE_19_TRAINER_9
+
+; Route 20 events
+ const_next $500
+ const EVENT_IN_SEAFOAM_ISLANDS
+ const EVENT_BEAT_ROUTE_20_TRAINER_0
+ const EVENT_BEAT_ROUTE_20_TRAINER_1
+ const EVENT_BEAT_ROUTE_20_TRAINER_2
+ const EVENT_BEAT_ROUTE_20_TRAINER_3
+ const EVENT_BEAT_ROUTE_20_TRAINER_4
+ const EVENT_BEAT_ROUTE_20_TRAINER_5
+ const EVENT_BEAT_ROUTE_20_TRAINER_6
+ const EVENT_BEAT_ROUTE_20_TRAINER_7
+ const EVENT_BEAT_ROUTE_20_TRAINER_8
+ const EVENT_BEAT_ROUTE_20_TRAINER_9
+ const_skip 3
+ const EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE
+ const EVENT_SEAFOAM1_BOULDER2_DOWN_HOLE
+
+; Route 21 events
+ const_next $510
+ const_skip
+ const EVENT_BEAT_ROUTE_21_TRAINER_0
+ const EVENT_BEAT_ROUTE_21_TRAINER_1
+ const EVENT_BEAT_ROUTE_21_TRAINER_2
+ const EVENT_BEAT_ROUTE_21_TRAINER_3
+ const EVENT_BEAT_ROUTE_21_TRAINER_4
+ const EVENT_BEAT_ROUTE_21_TRAINER_5
+ const EVENT_BEAT_ROUTE_21_TRAINER_6
+ const EVENT_BEAT_ROUTE_21_TRAINER_7
+ const EVENT_BEAT_ROUTE_21_TRAINER_8
+
+; Route 22 events
+ const_next $520
+ const EVENT_1ST_ROUTE22_RIVAL_BATTLE
+ const EVENT_2ND_ROUTE22_RIVAL_BATTLE
+ const_skip 3
+ const EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE
+ const EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE
+ const EVENT_ROUTE22_RIVAL_WANTS_BATTLE
+
+; Route 23 events
+ const_next $530
+ const EVENT_PASSED_CASCADEBADGE_CHECK
+ const EVENT_PASSED_THUNDERBADGE_CHECK
+ const EVENT_PASSED_RAINBOWBADGE_CHECK
+ const EVENT_PASSED_SOULBADGE_CHECK
+ const EVENT_PASSED_MARSHBADGE_CHECK
+ const EVENT_PASSED_VOLCANOBADGE_CHECK
+ const EVENT_PASSED_EARTHBADGE_CHECK
+ const_skip
+ const EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
+ const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0
+ const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1
+ const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2
+ const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3
+ const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4
+ const EVENT_BEAT_MOLTRES
+ const EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2
+
+; Route 24 events
+ const_next $540
+ const EVENT_GOT_NUGGET
+ const EVENT_BEAT_ROUTE24_ROCKET
+ const EVENT_BEAT_ROUTE_24_TRAINER_0
+ const EVENT_BEAT_ROUTE_24_TRAINER_1
+ const EVENT_BEAT_ROUTE_24_TRAINER_2
+ const EVENT_BEAT_ROUTE_24_TRAINER_3
+ const EVENT_BEAT_ROUTE_24_TRAINER_4
+ const EVENT_BEAT_ROUTE_24_TRAINER_5
+ const_skip
+ const EVENT_NUGGET_REWARD_AVAILABLE
+
+; Route 25 events
+ const_next $550 - 1
+ const EVENT_54F
+ const EVENT_MET_BILL
+ const EVENT_BEAT_ROUTE_25_TRAINER_0
+ const EVENT_BEAT_ROUTE_25_TRAINER_1
+ const EVENT_BEAT_ROUTE_25_TRAINER_2
+ const EVENT_BEAT_ROUTE_25_TRAINER_3
+ const EVENT_BEAT_ROUTE_25_TRAINER_4
+ const EVENT_BEAT_ROUTE_25_TRAINER_5
+ const EVENT_BEAT_ROUTE_25_TRAINER_6
+ const EVENT_BEAT_ROUTE_25_TRAINER_7
+ const EVENT_BEAT_ROUTE_25_TRAINER_8
+ const_skip
+ const EVENT_USED_CELL_SEPARATOR_ON_BILL
+ const EVENT_GOT_SS_TICKET
+ const EVENT_MET_BILL_2
+ const EVENT_BILL_SAID_USE_CELL_SEPARATOR
+ const EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING
+
+; Viridian Forest events
+ const_next $560
+ const_skip 2
+ const EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0
+ const EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1
+ const EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2
+ const EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_3
+ const EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_4
+
+; Mt. Moon events
+ const_next $570
+ const_skip
+ const EVENT_BEAT_MT_MOON_1_TRAINER_0
+ const EVENT_BEAT_MT_MOON_1_TRAINER_1
+ const EVENT_BEAT_MT_MOON_1_TRAINER_2
+ const EVENT_BEAT_MT_MOON_1_TRAINER_3
+ const EVENT_BEAT_MT_MOON_1_TRAINER_4
+ const EVENT_BEAT_MT_MOON_1_TRAINER_5
+ const EVENT_BEAT_MT_MOON_1_TRAINER_6
+ const EVENT_GOT_DOME_FOSSIL
+ const EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD
+ const EVENT_BEAT_MT_MOON_3_TRAINER_0
+ const EVENT_BEAT_MT_MOON_3_TRAINER_1
+ const EVENT_BEAT_MT_MOON_3_TRAINER_2
+ const EVENT_BEAT_MT_MOON_3_TRAINER_3
+ const EVENT_57E
+ const EVENT_GOT_HELIX_FOSSIL
+
+; S.S. Anne events
+ const_next $5C0
+ const_skip 4
+ const EVENT_BEAT_SS_ANNE_5_TRAINER_0
+ const EVENT_BEAT_SS_ANNE_5_TRAINER_1
+ const_skip 26
+ const EVENT_GOT_HM01
+ const EVENT_RUBBED_CAPTAINS_BACK
+ const EVENT_SS_ANNE_LEFT
+ const EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT
+ const EVENT_STARTED_WALKING_OUT_OF_DOCK
+ const EVENT_WALKED_OUT_OF_DOCK
+ const_skip 11
+ const EVENT_BEAT_SS_ANNE_8_TRAINER_0
+ const EVENT_BEAT_SS_ANNE_8_TRAINER_1
+ const EVENT_BEAT_SS_ANNE_8_TRAINER_2
+ const EVENT_BEAT_SS_ANNE_8_TRAINER_3
+ const_skip 12
+ const EVENT_BEAT_SS_ANNE_9_TRAINER_0
+ const EVENT_BEAT_SS_ANNE_9_TRAINER_1
+ const EVENT_BEAT_SS_ANNE_9_TRAINER_2
+ const EVENT_BEAT_SS_ANNE_9_TRAINER_3
+ const_skip 12
+ const EVENT_BEAT_SS_ANNE_10_TRAINER_0
+ const EVENT_BEAT_SS_ANNE_10_TRAINER_1
+ const EVENT_BEAT_SS_ANNE_10_TRAINER_2
+ const EVENT_BEAT_SS_ANNE_10_TRAINER_3
+ const EVENT_BEAT_SS_ANNE_10_TRAINER_4
+ const EVENT_BEAT_SS_ANNE_10_TRAINER_5
+
+; Victory Road 3F events
+ const_next $660
+ const EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1
+ const EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0
+ const EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1
+ const EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2
+ const EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3
+ const_skip
+ const EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH2
+
+; Rocket Hideout events
+ const_next $670
+ const_skip
+ const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0
+ const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1
+ const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2
+ const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3
+ const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
+ const_skip
+ const EVENT_677 ; ???
+ const_skip 7
+ const EVENT_67F ; ???
+ const_skip
+ const EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0
+ const_skip 15
+ const EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0
+ const EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1
+ const_skip 13
+ const EVENT_6A0
+ const_skip
+ const EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0
+ const EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1
+ const EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2
+ const EVENT_ROCKET_HIDEOUT_4_DOOR_UNLOCKED
+ const EVENT_ROCKET_DROPPED_LIFT_KEY
+ const EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI
+
+; Silph Co. events
+ const_next $6F0
+ const_skip 2
+ const EVENT_BEAT_SILPH_CO_2F_TRAINER_0
+ const EVENT_BEAT_SILPH_CO_2F_TRAINER_1
+ const EVENT_BEAT_SILPH_CO_2F_TRAINER_2
+ const EVENT_BEAT_SILPH_CO_2F_TRAINER_3
+ const_skip 7
+ const EVENT_SILPH_CO_2_UNLOCKED_DOOR1
+ const EVENT_SILPH_CO_2_UNLOCKED_DOOR2
+ const EVENT_GOT_TM36
+ const_skip 2
+ const EVENT_BEAT_SILPH_CO_3F_TRAINER_0
+ const EVENT_BEAT_SILPH_CO_3F_TRAINER_1
+ const_skip 4
+ const EVENT_SILPH_CO_3_UNLOCKED_DOOR1
+ const EVENT_SILPH_CO_3_UNLOCKED_DOOR2
+ const_skip 8
+ const EVENT_BEAT_SILPH_CO_4F_TRAINER_0
+ const EVENT_BEAT_SILPH_CO_4F_TRAINER_1
+ const EVENT_BEAT_SILPH_CO_4F_TRAINER_2
+ const_skip 3
+ const EVENT_SILPH_CO_4_UNLOCKED_DOOR1
+ const EVENT_SILPH_CO_4_UNLOCKED_DOOR2
+ const_skip 8
+ const EVENT_BEAT_SILPH_CO_5F_TRAINER_0
+ const EVENT_BEAT_SILPH_CO_5F_TRAINER_1
+ const EVENT_BEAT_SILPH_CO_5F_TRAINER_2
+ const EVENT_BEAT_SILPH_CO_5F_TRAINER_3
+ const_skip 2
+ const EVENT_SILPH_CO_5_UNLOCKED_DOOR1
+ const EVENT_SILPH_CO_5_UNLOCKED_DOOR2
+ const EVENT_SILPH_CO_5_UNLOCKED_DOOR3
+ const_skip 11
+ const EVENT_BEAT_SILPH_CO_6F_TRAINER_0
+ const EVENT_BEAT_SILPH_CO_6F_TRAINER_1
+ const EVENT_BEAT_SILPH_CO_6F_TRAINER_2
+ const_skip 6
+ const EVENT_SILPH_CO_6_UNLOCKED_DOOR
+ const EVENT_BEAT_SILPH_CO_RIVAL
+ const_skip 4
+ const EVENT_BEAT_SILPH_CO_7F_TRAINER_0
+ const EVENT_BEAT_SILPH_CO_7F_TRAINER_1
+ const EVENT_BEAT_SILPH_CO_7F_TRAINER_2
+ const EVENT_BEAT_SILPH_CO_7F_TRAINER_3
+ const_skip 3
+ const EVENT_SILPH_CO_7_UNLOCKED_DOOR1
+ const EVENT_SILPH_CO_7_UNLOCKED_DOOR2
+ const EVENT_SILPH_CO_7_UNLOCKED_DOOR3
+ const_skip 3
+ const EVENT_BEAT_SILPH_CO_8F_TRAINER_0
+ const EVENT_BEAT_SILPH_CO_8F_TRAINER_1
+ const EVENT_BEAT_SILPH_CO_8F_TRAINER_2
+ const_skip 3
+ const EVENT_SILPH_CO_8_UNLOCKED_DOOR
+ const_skip 9
+ const EVENT_BEAT_SILPH_CO_9F_TRAINER_0
+ const EVENT_BEAT_SILPH_CO_9F_TRAINER_1
+ const EVENT_BEAT_SILPH_CO_9F_TRAINER_2
+ const_skip 3
+ const EVENT_SILPH_CO_9_UNLOCKED_DOOR1
+ const EVENT_SILPH_CO_9_UNLOCKED_DOOR2
+ const EVENT_SILPH_CO_9_UNLOCKED_DOOR3
+ const EVENT_SILPH_CO_9_UNLOCKED_DOOR4
+ const_skip 5
+ const EVENT_BEAT_SILPH_CO_10F_TRAINER_0
+ const EVENT_BEAT_SILPH_CO_10F_TRAINER_1
+ const_skip 5
+ const EVENT_SILPH_CO_10_UNLOCKED_DOOR
+ const_skip 7
+ const EVENT_780
+ const EVENT_781
+ const EVENT_782
+ const_skip
+ const EVENT_BEAT_SILPH_CO_11F_TRAINER_0
+ const EVENT_BEAT_SILPH_CO_11F_TRAINER_1
+ const_skip 2
+ const EVENT_SILPH_CO_11_UNLOCKED_DOOR
+ const_skip 4
+ const EVENT_GOT_MASTER_BALL
+ const_skip
+ const EVENT_BEAT_SILPH_CO_GIOVANNI
+
+; Pokémon Mansion events
+ const_next $800
+ const_skip
+ const EVENT_BEAT_MANSION_2_TRAINER_0
+ const_skip 15
+ const EVENT_BEAT_MANSION_3_TRAINER_0
+ const EVENT_BEAT_MANSION_3_TRAINER_1
+ const_skip 14
+ const EVENT_BEAT_MANSION_4_TRAINER_0
+ const EVENT_BEAT_MANSION_4_TRAINER_1
+
+; Safari Zone events
+ const_next $880
+ const EVENT_GOT_HM03
+
+; Cerulean Cave events
+ const_next $8C0
+ const_skip
+ const EVENT_BEAT_MEWTWO
+
+; Indigo Plateau events
+ const_next $8E0
+ const ELITE4_EVENTS_START
+ const EVENT_BEAT_LORELEIS_ROOM_TRAINER_0
+ const_skip 4
+ const EVENT_AUTOWALKED_INTO_LORELEIS_ROOM
+ const_skip 2
+ const EVENT_BEAT_BRUNOS_ROOM_TRAINER_0
+ const_skip 4
+ const EVENT_AUTOWALKED_INTO_BRUNOS_ROOM
+ const_skip 2
+ const EVENT_BEAT_AGATHAS_ROOM_TRAINER_0
+ const_skip 4
+ const EVENT_AUTOWALKED_INTO_AGATHAS_ROOM
+ const_skip 2
+ const EVENT_BEAT_LANCES_ROOM_TRAINER_0
+ const_skip 4
+ const EVENT_BEAT_LANCE
+ const EVENT_LANCES_ROOM_LOCK_DOOR
+ const_skip
+ const EVENT_BEAT_CHAMPION_RIVAL
+ const_skip 5
+ const ELITE4_CHAMPION_EVENTS_END
+
+; Victory Road 1F events
+ const_next $910
+ const_skip
+ const EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0
+ const EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1
+ const_skip 4
+ const EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
+
+; Rock Tunnel events
+ const_next $9B0
+ const_skip
+ const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0
+ const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1
+ const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2
+ const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3
+ const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4
+ const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5
+ const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6
+ const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7
+
+; Seafoam Islands events
+ const_next $9C0
+ const EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE
+ const EVENT_SEAFOAM2_BOULDER2_DOWN_HOLE
+ const_skip 6
+ const EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE
+ const EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE
+ const_skip 6
+ const EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE
+ const EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE
+ const_skip 8
+ const EVENT_BEAT_ARTICUNO
+
+; End of events
+ const_next $A00
+NUM_EVENTS EQU const_value
diff --git a/constants/evolution_constants.asm b/constants/evolution_constants.asm
deleted file mode 100755
index 86c466d8..00000000
--- a/constants/evolution_constants.asm
+++ /dev/null
@@ -1,9 +0,0 @@
-; See data/evos_moves.asm
-
-; Evolution types
-EV_LEVEL EQU 1
-EV_ITEM EQU 2
-EV_TRADE EQU 3
-
-MAX_EVOLUTIONS EQU 3
-EVOLUTION_SIZE EQU 4
diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm
new file mode 100644
index 00000000..912e5835
--- /dev/null
+++ b/constants/gfx_constants.asm
@@ -0,0 +1,43 @@
+TILE_WIDTH EQU 8 ; pixels
+LEN_1BPP_TILE EQU 1 * TILE_WIDTH ; bytes
+LEN_2BPP_TILE EQU 2 * TILE_WIDTH ; bytes
+
+NUM_PAL_COLORS EQU 4
+PAL_COLOR_SIZE EQU 2
+PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE
+
+SCREEN_WIDTH EQU 20
+SCREEN_HEIGHT EQU 18
+SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels
+SCREEN_HEIGHT_PX EQU SCREEN_HEIGHT * TILE_WIDTH ; pixels
+
+BG_MAP_WIDTH EQU 32 ; tiles
+BG_MAP_HEIGHT EQU 32 ; tiles
+
+SPRITEBUFFERSIZE EQU 7 * 7 * LEN_1BPP_TILE
+
+; HP bar
+HP_BAR_GREEN EQU 0
+HP_BAR_YELLOW EQU 1
+HP_BAR_RED EQU 2
+
+; hAutoBGTransferEnabled
+TRANSFERTOP EQU 0
+TRANSFERMIDDLE EQU 1
+TRANSFERBOTTOM EQU 2
+
+; hRedrawRowOrColumnMode
+REDRAW_COL EQU 1
+REDRAW_ROW EQU 2
+
+; tile list ids
+; TileIDListPointerTable indexes (see data/tilemaps.asm)
+ const_def
+ const TILEMAP_MON_PIC
+ const TILEMAP_SLIDE_DOWN_MON_PIC_7X5
+ const TILEMAP_SLIDE_DOWN_MON_PIC_7X3
+ const TILEMAP_GENGAR_INTRO_1
+ const TILEMAP_GENGAR_INTRO_2
+ const TILEMAP_GENGAR_INTRO_3
+ const TILEMAP_GAME_BOY
+ const TILEMAP_LINK_CABLE
diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm
index 9f2aa1b7..993a02f5 100644
--- a/constants/hardware_constants.asm
+++ b/constants/hardware_constants.asm
@@ -2,6 +2,19 @@
GBC EQU $11
+; memory map
+VRAM_Begin EQU $8000
+VRAM_End EQU $a000
+SRAM_Begin EQU $a000
+SRAM_End EQU $c000
+WRAM0_Begin EQU $c000
+WRAM0_End EQU $d000
+WRAM1_Begin EQU $d000
+WRAM1_End EQU $e000
+; hardware registers $ff00-$ff80 (see below)
+HRAM_Begin EQU $ff80
+HRAM_End EQU $ffff
+
; MBC1
MBC1SRamEnable EQU $0000
MBC1RomBank EQU $2000
@@ -64,6 +77,22 @@ rNR44 EQU $ff23 ; Channel 4 Counter/consecutive; Initial (R/W)
rNR50 EQU $ff24 ; Channel control / ON-OFF / Volume (R/W)
rNR51 EQU $ff25 ; Selection of Sound output terminal (R/W)
rNR52 EQU $ff26 ; Sound on/off
+rWave_0 EQU $ff30
+rWave_1 EQU $ff31
+rWave_2 EQU $ff32
+rWave_3 EQU $ff33
+rWave_4 EQU $ff34
+rWave_5 EQU $ff35
+rWave_6 EQU $ff36
+rWave_7 EQU $ff37
+rWave_8 EQU $ff38
+rWave_9 EQU $ff39
+rWave_a EQU $ff3a
+rWave_b EQU $ff3b
+rWave_c EQU $ff3c
+rWave_d EQU $ff3d
+rWave_e EQU $ff3e
+rWave_f EQU $ff3f
rLCDC EQU $ff40 ; LCD Control (R/W)
rLCDC_ENABLE EQU 7
rLCDC_ENABLE_MASK EQU 1 << rLCDC_ENABLE
diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm
index de0addaf..54d27769 100755
--- a/constants/hide_show_constants.asm
+++ b/constants/hide_show_constants.asm
@@ -1,9 +1,12 @@
+HIDE EQU $11
+SHOW EQU $15
+
+; MissableObjects indexes (see data/maps/hide_show_data.asm)
; this is a list of the sprites that can be enabled/disabled during the game
; there may be unused sprites, but these will remain unmarked until
; the disassembly is complete
const_def
-
const HS_PALLET_TOWN_OAK ; 00
const HS_LYING_OLD_MAN ; 01
const HS_OLD_MAN_1 ; 02
diff --git a/constants/icon_constants.asm b/constants/icon_constants.asm
new file mode 100644
index 00000000..bc73632e
--- /dev/null
+++ b/constants/icon_constants.asm
@@ -0,0 +1,18 @@
+; party menu icons
+; used in MonPartySpritePointers (see data/icon_pointers.asm)
+ const_def
+ const ICON_MON ; $0
+ const ICON_BALL ; $1
+ const ICON_HELIX ; $2
+ const ICON_FAIRY ; $3
+ const ICON_BIRD ; $4
+ const ICON_WATER ; $5
+ const ICON_BUG ; $6
+ const ICON_GRASS ; $7
+ const ICON_SNAKE ; $8
+ const ICON_QUADRUPED ; $9
+ const ICON_PIKACHU ; $A
+
+ICON_TRADEBUBBLE EQU $e
+
+ICONOFFSET EQU $40 ; difference between alternating icon frames' tile IDs
diff --git a/constants/input_constants.asm b/constants/input_constants.asm
new file mode 100644
index 00000000..7984d5a9
--- /dev/null
+++ b/constants/input_constants.asm
@@ -0,0 +1,20 @@
+; joypad buttons
+ const_def
+ const BIT_A_BUTTON
+ const BIT_B_BUTTON
+ const BIT_SELECT
+ const BIT_START
+ const BIT_D_RIGHT
+ const BIT_D_LEFT
+ const BIT_D_UP
+ const BIT_D_DOWN
+
+NO_INPUT EQU 0
+A_BUTTON EQU 1 << BIT_A_BUTTON
+B_BUTTON EQU 1 << BIT_B_BUTTON
+SELECT EQU 1 << BIT_SELECT
+START EQU 1 << BIT_START
+D_RIGHT EQU 1 << BIT_D_RIGHT
+D_LEFT EQU 1 << BIT_D_LEFT
+D_UP EQU 1 << BIT_D_UP
+D_DOWN EQU 1 << BIT_D_DOWN
diff --git a/constants/item_constants.asm b/constants/item_constants.asm
index fe6fcb15..67416600 100755
--- a/constants/item_constants.asm
+++ b/constants/item_constants.asm
@@ -1,5 +1,12 @@
-const_value = 1
-
+; item ids
+; indexes for:
+; - ItemNames (see data/items/names.asm)
+; - ItemPrices (see data/items/prices.asm)
+; - TechnicalMachinePrices (see data/items/tm_prices.asm)
+; - KeyItemBitfield (see data/items/key_items.asm)
+; - ItemUsePtrTable (see engine/items/item_effects.asm)
+ const_def
+ const NO_ITEM ; $00
const MASTER_BALL ; $01
const ULTRA_BALL ; $02
const GREAT_BALL ; $03
@@ -100,60 +107,119 @@ SAFARI_ROCK EQU $16 ; overload
const FLOOR_11F ; $60
const FLOOR_B4F ; $61
-const_value = $C4
+ const_next $C4
+
+; HMs are defined before TMs, so the actual number of TM definitions
+; is not yet available. The TM quantity is hard-coded here and must
+; match the actual number below.
+NUM_TMS EQU 50
+
+add_hm: MACRO
+; Defines three constants:
+; - HM_\1: the item id, starting at $C4
+; - \1_TMNUM: the learnable TM/HM flag, starting at 51
+; - HM##_MOVE: alias for the move id, equal to the value of \1
+; The first usage also defines HM01 as the first HM item id.
+IF !DEF(HM01)
+HM01 EQU const_value
+__tmhm_value__ = NUM_TMS + 1
+ENDC
+HM_VALUE EQU __tmhm_value__ - NUM_TMS
+IF HM_VALUE < 10
+MOVE_FOR_HM EQUS "HM0{d:HM_VALUE}_MOVE"
+ELSE
+MOVE_FOR_HM EQUS "HM{d:HM_VALUE}_MOVE"
+ENDC
+MOVE_FOR_HM = \1
+PURGE MOVE_FOR_HM
+PURGE HM_VALUE
+ const HM_\1
+\1_TMNUM EQU __tmhm_value__
+__tmhm_value__ = __tmhm_value__ + 1
+ENDM
+
+ add_hm CUT ; $C4
+ add_hm FLY ; $C5
+ add_hm SURF ; $C6
+ add_hm STRENGTH ; $C7
+ add_hm FLASH ; $C8
+NUM_HMS EQU const_value - HM01
+
+add_tm: MACRO
+; Defines three constants:
+; - TM_\1: the item id, starting at $C9
+; - \1_TMNUM: the learnable TM/HM flag, starting at 1
+; - TM##_MOVE: alias for the move id, equal to the value of \1
+; The first usage also defines TM01 as the first TM item id.
+IF !DEF(TM01)
+TM01 EQU const_value
+__tmhm_value__ = 1
+ENDC
+IF __tmhm_value__ < 10
+MOVE_FOR_TM EQUS "TM0{d:__tmhm_value__}_MOVE"
+ELSE
+MOVE_FOR_TM EQUS "TM{d:__tmhm_value__}_MOVE"
+ENDC
+MOVE_FOR_TM = \1
+PURGE MOVE_FOR_TM
+ const TM_\1
+\1_TMNUM EQU __tmhm_value__
+__tmhm_value__ = __tmhm_value__ + 1
+ENDM
+
+ add_tm MEGA_PUNCH ; $C9
+ add_tm RAZOR_WIND ; $CA
+ add_tm SWORDS_DANCE ; $CB
+ add_tm WHIRLWIND ; $CC
+ add_tm MEGA_KICK ; $CD
+ add_tm TOXIC ; $CE
+ add_tm HORN_DRILL ; $CF
+ add_tm BODY_SLAM ; $D0
+ add_tm TAKE_DOWN ; $D1
+ add_tm DOUBLE_EDGE ; $D2
+ add_tm BUBBLEBEAM ; $D3
+ add_tm WATER_GUN ; $D4
+ add_tm ICE_BEAM ; $D5
+ add_tm BLIZZARD ; $D6
+ add_tm HYPER_BEAM ; $D7
+ add_tm PAY_DAY ; $D8
+ add_tm SUBMISSION ; $D9
+ add_tm COUNTER ; $DA
+ add_tm SEISMIC_TOSS ; $DB
+ add_tm RAGE ; $DC
+ add_tm MEGA_DRAIN ; $DD
+ add_tm SOLARBEAM ; $DE
+ add_tm DRAGON_RAGE ; $DF
+ add_tm THUNDERBOLT ; $E0
+ add_tm THUNDER ; $E1
+ add_tm EARTHQUAKE ; $E2
+ add_tm FISSURE ; $E3
+ add_tm DIG ; $E4
+ add_tm PSYCHIC_M ; $E5
+ add_tm TELEPORT ; $E6
+ add_tm MIMIC ; $E7
+ add_tm DOUBLE_TEAM ; $E8
+ add_tm REFLECT ; $E9
+ add_tm BIDE ; $EA
+ add_tm METRONOME ; $EB
+ add_tm SELFDESTRUCT ; $EC
+ add_tm EGG_BOMB ; $ED
+ add_tm FIRE_BLAST ; $EE
+ add_tm SWIFT ; $EF
+ add_tm SKULL_BASH ; $F0
+ add_tm SOFTBOILED ; $F1
+ add_tm DREAM_EATER ; $F2
+ add_tm SKY_ATTACK ; $F3
+ add_tm REST ; $F4
+ add_tm THUNDER_WAVE ; $F5
+ add_tm PSYWAVE ; $F6
+ add_tm EXPLOSION ; $F7
+ add_tm ROCK_SLIDE ; $F8
+ add_tm TRI_ATTACK ; $F9
+ add_tm SUBSTITUTE ; $FA
+assert NUM_TMS == const_value - TM01, "NUM_TMS ({d:NUM_TMS}) does not match the number of add_tm definitions"
- const HM_01 ; $C4
- const HM_02 ; $C5
- const HM_03 ; $C6
- const HM_04 ; $C7
- const HM_05 ; $C8
- const TM_01 ; $C9
- const TM_02 ; $CA
- const TM_03 ; $CB
- const TM_04 ; $CC
- const TM_05 ; $CD
- const TM_06 ; $CE
- const TM_07 ; $CF
- const TM_08 ; $D0
- const TM_09 ; $D1
- const TM_10 ; $D2
- const TM_11 ; $D3
- const TM_12 ; $D4
- const TM_13 ; $D5
- const TM_14 ; $D6
- const TM_15 ; $D7
- const TM_16 ; $D8
- const TM_17 ; $D9
- const TM_18 ; $DA
- const TM_19 ; $DB
- const TM_20 ; $DC
- const TM_21 ; $DD
- const TM_22 ; $DE
- const TM_23 ; $DF
- const TM_24 ; $E0
- const TM_25 ; $E1
- const TM_26 ; $E2
- const TM_27 ; $E3
- const TM_28 ; $E4
- const TM_29 ; $E5
- const TM_30 ; $E6
- const TM_31 ; $E7
- const TM_32 ; $E8
- const TM_33 ; $E9
- const TM_34 ; $EA
- const TM_35 ; $EB
- const TM_36 ; $EC
- const TM_37 ; $ED
- const TM_38 ; $EE
- const TM_39 ; $EF
- const TM_40 ; $F0
- const TM_41 ; $F1
- const TM_42 ; $F2
- const TM_43 ; $F3
- const TM_44 ; $F4
- const TM_45 ; $F5
- const TM_46 ; $F6
- const TM_47 ; $F7
- const TM_48 ; $F8
- const TM_49 ; $F9
- const TM_50 ; $FA
+; 50 TMs + 5 HMs = 55 learnable TM/HM flags per Pokémon.
+; These fit in 7 bytes, with one unused bit left over.
+__tmhm_value__ = NUM_TMS + NUM_HMS + 1
+UNUSED_TMNUM EQU __tmhm_value__
diff --git a/constants/list_constants.asm b/constants/list_constants.asm
index 7e26a6b6..840856df 100755
--- a/constants/list_constants.asm
+++ b/constants/list_constants.asm
@@ -1,20 +1,24 @@
-; list menu ID's
-PCPOKEMONLISTMENU EQU $00 ; PC pokemon withdraw/deposit lists
-MOVESLISTMENU EQU $01 ; XXX where is this used?
-PRICEDITEMLISTMENU EQU $02 ; Pokemart buy menu / Pokemart buy/sell choose quantity menu
-ITEMLISTMENU EQU $03 ; Start menu Item menu / Pokemart sell menu
-SPECIALLISTMENU EQU $04 ; list of special "items" e.g. floor list in elevators / list of badges
+; list menu IDs
+ const_def
+ const PCPOKEMONLISTMENU ; $00 ; PC pokemon withdraw/deposit lists
+ const MOVESLISTMENU ; $01 ; XXX where is this used?
+ const PRICEDITEMLISTMENU ; $02 ; Pokemart buy menu / Pokemart buy/sell choose quantity menu
+ const ITEMLISTMENU ; $03 ; Start menu Item menu / Pokemart sell menu
+ const SPECIALLISTMENU ; $04 ; list of special "items" e.g. floor list in elevators / list of badges
-MONSTER_NAME EQU 1
-MOVE_NAME EQU 2
-; ???_NAME EQU 3
-ITEM_NAME EQU 4
-PLAYEROT_NAME EQU 5
-ENEMYOT_NAME EQU 6
-TRAINER_NAME EQU 7
+; NamePointers indexes (see home/names2.asm)
+ const_def 1
+ const MONSTER_NAME ; 1
+ const MOVE_NAME ; 2
+ const UNUSED_NAME ; 3
+ const ITEM_NAME ; 4
+ const PLAYEROT_NAME ; 5
+ const ENEMYOT_NAME ; 6
+ const TRAINER_NAME ; 7
-INIT_ENEMYOT_LIST EQU 1
-INIT_BAG_ITEM_LIST EQU 2
-INIT_OTHER_ITEM_LIST EQU 3
-INIT_PLAYEROT_LIST EQU 4
-INIT_MON_LIST EQU 5
+ const_def 1
+ const INIT_ENEMYOT_LIST ; 1
+ const INIT_BAG_ITEM_LIST ; 2
+ const INIT_OTHER_ITEM_LIST ; 3
+ const INIT_PLAYEROT_LIST ; 4
+ const INIT_MON_LIST ; 5
diff --git a/constants/map_constants.asm b/constants/map_constants.asm
index cf006604..038c2ab2 100644
--- a/constants/map_constants.asm
+++ b/constants/map_constants.asm
@@ -4,6 +4,16 @@ mapconst: MACRO
\1_WIDTH EQU \3
ENDM
+; map ids
+; indexes for:
+; - MapHeaderBanks (see data/maps/map_header_banks.asm)
+; - MapHeaderPointers (see data/maps/map_header_pointers.asm)
+; - MapSongBanks (see data/maps/songs.asm)
+; - MapHSPointers (see data/maps/hide_show_data.asm)
+; - MapSpriteSets (see data/maps/sprite_sets.asm)
+; - ExternalMapEntries (see data/maps/town_map_entries.asm)
+; Each map also has associated data in maps.asm.
+; Order: towns/cities, then routes, then indoor/dungeon maps
const_def
mapconst PALLET_TOWN, 9, 10 ; $00
mapconst VIRIDIAN_CITY, 18, 20 ; $01
@@ -16,7 +26,9 @@ ENDM
mapconst CINNABAR_ISLAND, 9, 10 ; $08
mapconst INDIGO_PLATEAU, 9, 10 ; $09
mapconst SAFFRON_CITY, 18, 20 ; $0A
+NUM_CITY_MAPS EQU const_value
mapconst UNUSED_MAP_0B, 0, 0 ; $0B
+FIRST_ROUTE_MAP EQU const_value
mapconst ROUTE_1, 18, 10 ; $0C
mapconst ROUTE_2, 36, 10 ; $0D
mapconst ROUTE_3, 9, 35 ; $0E
@@ -42,6 +54,7 @@ ENDM
mapconst ROUTE_23, 72, 10 ; $22
mapconst ROUTE_24, 18, 10 ; $23
mapconst ROUTE_25, 9, 30 ; $24
+FIRST_INDOOR_MAP EQU const_value
mapconst REDS_HOUSE_1F, 4, 4 ; $25
mapconst REDS_HOUSE_2F, 4, 4 ; $26
mapconst BLUES_HOUSE, 4, 4 ; $27
@@ -254,3 +267,7 @@ ENDM
mapconst BRUNOS_ROOM, 6, 5 ; $F6
mapconst AGATHAS_ROOM, 6, 5 ; $F7
mapconst BEACH_HOUSE, 4, 7 ; $F8
+
+; Indoor maps, such as houses, use this as the Map ID in their exit warps
+; This map ID takes the player back to the last outdoor map they were on, stored in wLastMap
+LAST_MAP EQU -1
diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm
new file mode 100755
index 00000000..5efd9928
--- /dev/null
+++ b/constants/map_data_constants.asm
@@ -0,0 +1,16 @@
+; width of east/west connections
+; height of north/south connections
+MAP_BORDER EQU 3
+
+; connection directions
+ const_def
+ shift_const EAST ; 1
+ shift_const WEST ; 2
+ shift_const SOUTH ; 4
+ shift_const NORTH ; 8
+
+; tileset environments
+ const_def
+ const INDOOR ; 0
+ const CAVE ; 1
+ const OUTDOOR ; 2
diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm
new file mode 100644
index 00000000..9993a6a9
--- /dev/null
+++ b/constants/map_object_constants.asm
@@ -0,0 +1,57 @@
+; spritestatedata1 struct members (see macros/wram.asm)
+ const_def
+ const SPRITESTATEDATA1_PICTUREID ; 0
+ const SPRITESTATEDATA1_MOVEMENTSTATUS ; 1
+ const SPRITESTATEDATA1_IMAGEINDEX ; 2
+ const SPRITESTATEDATA1_YSTEPVECTOR ; 3
+ const SPRITESTATEDATA1_YPIXELS ; 4
+ const SPRITESTATEDATA1_XSTEPVECTOR ; 5
+ const SPRITESTATEDATA1_XPIXELS ; 6
+ const SPRITESTATEDATA1_INTRAANIMFRAMECOUNTER ; 7
+ const SPRITESTATEDATA1_ANIMFRAMECOUNTER ; 8
+ const SPRITESTATEDATA1_FACINGDIRECTION ; 9
+ const SPRITESTATEDATA1_YADJUSTED ; a
+ const SPRITESTATEDATA1_XADJUSTED ; b
+ const SPRITESTATEDATA1_COLLISIONDATA ; c
+ const SPRITESTATEDATA1_0D ; d
+ const SPRITESTATEDATA1_0E ; e
+ const SPRITESTATEDATA1_0F ; f
+SPRITESTATEDATA1_LENGTH EQU const_value
+
+; spritestatedata2 struct members (see macros/wram.asm)
+ const_def
+ const SPRITESTATEDATA2_WALKANIMATIONCOUNTER ; 0
+ const SPRITESTATEDATA2_01 ; 1
+ const SPRITESTATEDATA2_YDISPLACEMENT ; 2
+ const SPRITESTATEDATA2_XDISPLACEMENT ; 3
+ const SPRITESTATEDATA2_MAPY ; 4
+ const SPRITESTATEDATA2_MAPX ; 5
+ const SPRITESTATEDATA2_MOVEMENTBYTE1 ; 6
+ const SPRITESTATEDATA2_GRASSPRIORITY ; 7
+ const SPRITESTATEDATA2_MOVEMENTDELAY ; 8
+ const SPRITESTATEDATA2_ORIGFACINGDIRECTION ; 9
+ const SPRITESTATEDATA2_0A ; a
+ const SPRITESTATEDATA2_0B ; b
+ const SPRITESTATEDATA2_0C ; c
+ const SPRITESTATEDATA2_PICTUREID ; d
+ const SPRITESTATEDATA2_IMAGEBASEOFFSET ; e
+ const SPRITESTATEDATA2_0F ; f
+SPRITESTATEDATA2_LENGTH EQU const_value
+
+; different kinds of people events
+ITEM EQU $80
+TRAINER EQU $40
+
+WALK EQU $FE
+STAY EQU $FF
+
+ANY_DIR EQU $00
+UP_DOWN EQU $01
+LEFT_RIGHT EQU $02
+DOWN EQU $D0
+UP EQU $D1
+LEFT EQU $D2
+RIGHT EQU $D3
+NONE EQU $FF
+
+BOULDER_MOVEMENT_BYTE_2 EQU $10
diff --git a/constants/menu_constants.asm b/constants/menu_constants.asm
new file mode 100644
index 00000000..a53adfdc
--- /dev/null
+++ b/constants/menu_constants.asm
@@ -0,0 +1,88 @@
+BAG_ITEM_CAPACITY EQU 20
+PC_ITEM_CAPACITY EQU 50
+
+; text box IDs
+ const_def 1
+ const MESSAGE_BOX ; $01
+ const_skip ; $02
+ const MENU_TEMPLATE_03 ; $03 unused
+ const FIELD_MOVE_MON_MENU ; $04
+ const JP_MOCHIMONO_MENU_TEMPLATE ; $05
+ const USE_TOSS_MENU_TEMPLATE ; $06
+ const MENU_TEMPLATE_07 ; $07 unused
+ const JP_SAVE_MESSAGE_MENU_TEMPLATE ; $08
+ const JP_SPEED_OPTIONS_MENU_TEMPLATE ; $09
+ const_skip ; $0a
+ const BATTLE_MENU_TEMPLATE ; $0b
+ const SWITCH_STATS_CANCEL_MENU_TEMPLATE ; $0c
+ const LIST_MENU_BOX ; $0d
+ const BUY_SELL_QUIT_MENU_TEMPLATE ; $0e
+ const MONEY_BOX_TEMPLATE ; $0f
+ const MENU_TEMPLATE_10 ; $10 unused
+ const MON_SPRITE_POPUP ; $11
+ const JP_AH_MENU_TEMPLATE ; $12
+ const MONEY_BOX ; $13
+ const TWO_OPTION_MENU ; $14
+ const BUY_SELL_QUIT_MENU ; $15
+ const_skip ; $16
+ const_skip ; $17
+ const_skip ; $18
+ const_skip ; $19
+ const JP_POKEDEX_MENU_TEMPLATE ; $1a
+ const SAFARI_BATTLE_MENU_TEMPLATE ; $1b
+
+; two option menu constants
+; TwoOptionMenuStrings indexes (see data/yes_no_menu_strings.asm)
+ const_def
+ const YES_NO_MENU ; 0
+ const NORTH_WEST_MENU ; 1
+ const SOUTH_EAST_MENU ; 2
+ const WIDE_YES_NO_MENU ; 3
+ const NORTH_EAST_MENU ; 4
+ const TRADE_CANCEL_MENU ; 5
+ const HEAL_CANCEL_MENU ; 6
+ const NO_YES_MENU ; 7
+
+; menu exit method constants for list menus and the buy/sell/quit menu
+CHOSE_MENU_ITEM EQU 1 ; pressed A
+CANCELLED_MENU EQU 2 ; pressed B
+
+; menu exit method constants for two-option menus
+CHOSE_FIRST_ITEM EQU 1
+CHOSE_SECOND_ITEM EQU 2
+
+; move mon constants
+ const_def
+ const BOX_TO_PARTY ; 0
+ const PARTY_TO_BOX ; 1
+ const DAYCARE_TO_PARTY ; 2
+ const PARTY_TO_DAYCARE ; 3
+
+; party menu types
+; PartyMenuMessagePointers indexes (see engine/menus/party_menu.asm)
+ const_def
+ const NORMAL_PARTY_MENU ; $00
+ const USE_ITEM_PARTY_MENU ; $01
+ const BATTLE_PARTY_MENU ; $02
+ const TMHM_PARTY_MENU ; $03
+ const SWAP_MONS_PARTY_MENU ; $04
+ const EVO_STONE_PARTY_MENU ; $05
+; party menu message IDs
+; PartyMenuItemUseMessagePointers indexes (see engine/menus/party_menu.asm)
+ const_next $F0
+FIRST_PARTY_MENU_TEXT_ID EQU const_value
+ const ANTIDOTE_MSG ; $F0
+ const BURN_HEAL_MSG ; $F1
+ const ICE_HEAL_MSG ; $F2
+ const AWAKENING_MSG ; $F3
+ const PARALYZ_HEAL_MSG ; $F4
+ const POTION_MSG ; $F5
+ const FULL_HEAL_MSG ; $F6
+ const REVIVE_MSG ; $F7
+ const RARE_CANDY_MSG ; $F8
+
+; naming screen types
+ const_def
+ const NAME_PLAYER_SCREEN ; 0
+ const NAME_RIVAL_SCREEN ; 1
+ const NAME_MON_SCREEN ; 2
diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm
index bc8a767c..6fb43490 100644
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -1,221 +1,15 @@
-MAX_LEVEL EQU 100
-
-NUM_MOVES EQU 4
-NUM_STATS EQU 5
-NUM_STAT_MODS EQU 8
-NUM_DVS EQU 2
-
-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
-START EQU %00001000
-D_RIGHT EQU %00010000
-D_LEFT EQU %00100000
-D_UP EQU %01000000
-D_DOWN EQU %10000000
-
-const_value set 0
- const BIT_A_BUTTON
- const BIT_B_BUTTON
- const BIT_SELECT
- const BIT_START
- const BIT_D_RIGHT
- const BIT_D_LEFT
- const BIT_D_UP
- const BIT_D_DOWN
-
-SCREEN_WIDTH EQU 20
-SCREEN_HEIGHT EQU 18
-
-SCREEN_WIDTH_PIXELS EQU SCREEN_WIDTH * 8
-SCREEN_HEIGHT_PIXELS EQU SCREEN_HEIGHT * 8
-
-BYTES_PER_TILE EQU 16
-
-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
-NPC_MOVEMENT_LEFT EQU $80
-NPC_MOVEMENT_RIGHT EQU $C0
-
-; text box IDs
-MESSAGE_BOX EQU $01
-FIELD_MOVE_MON_MENU EQU $04
-JP_MOCHIMONO_MENU_TEMPLATE EQU $05
-USE_TOSS_MENU_TEMPLATE EQU $06
-JP_SAVE_MESSAGE_MENU_TEMPLATE EQU $08
-JP_SPEED_OPTIONS_MENU_TEMPLATE EQU $09
-BATTLE_MENU_TEMPLATE EQU $0b
-SWITCH_STATS_CANCEL_MENU_TEMPLATE EQU $0c
-LIST_MENU_BOX EQU $0d
-BUY_SELL_QUIT_MENU_TEMPLATE EQU $0e
-MONEY_BOX_TEMPLATE EQU $0f
-MON_SPRITE_POPUP EQU $11
-JP_AH_MENU_TEMPLATE EQU $12
-MONEY_BOX EQU $13
-TWO_OPTION_MENU EQU $14
-BUY_SELL_QUIT_MENU EQU $15
-JP_POKEDEX_MENU_TEMPLATE EQU $1a
-SAFARI_BATTLE_MENU_TEMPLATE EQU $1b
-
-; two option menu constants
-YES_NO_MENU EQU 0
-NORTH_WEST_MENU EQU 1
-SOUTH_EAST_MENU EQU 2
-WIDE_YES_NO_MENU EQU 3
-NORTH_EAST_MENU EQU 4
-TRADE_CANCEL_MENU EQU 5
-HEAL_CANCEL_MENU EQU 6
-NO_YES_MENU EQU 7
-
-; menu exit method constants for list menus and the buy/sell/quit menu
-CHOSE_MENU_ITEM EQU 1 ; pressed A
-CANCELLED_MENU EQU 2 ; pressed B
-
-; menu exit method constants for two-option menus
-CHOSE_FIRST_ITEM EQU 1
-CHOSE_SECOND_ITEM EQU 2
-
-; move mon constants
-BOX_TO_PARTY EQU 0
-PARTY_TO_BOX EQU 1
-DAYCARE_TO_PARTY EQU 2
-PARTY_TO_DAYCARE EQU 3
-
-; emotion bubbles
-EXCLAMATION_BUBBLE EQU 0
-QUESTION_BUBBLE EQU 1
-SMILE_BUBBLE EQU 2
-SKULL_BUBBLE EQU 3
-HEART_BUBBLE EQU 4
-BOLT_BUBBLE EQU 5
-ZZZ_BUBBLE EQU 6
-FISH_BUBBLE EQU 7
-
-; slot symbols
-SLOTS7 EQU $0200
-SLOTSBAR EQU $0604
-SLOTSCHERRY EQU $0A08
-SLOTSFISH EQU $0E0C
-SLOTSBIRD EQU $1210
-SLOTSMOUSE EQU $1614
-
-; party menu types
-NORMAL_PARTY_MENU EQU 0
-USE_ITEM_PARTY_MENU EQU 1
-BATTLE_PARTY_MENU EQU 2
-TMHM_PARTY_MENU EQU 3
-SWAP_MONS_PARTY_MENU EQU 4
-EVO_STONE_PARTY_MENU EQU 5
-
-; party menu message IDs
-ANTIDOTE_MSG EQU $F0
-BURN_HEAL_MSG EQU $F1
-ICE_HEAL_MSG EQU $F2
-AWAKENING_MSG EQU $F3
-PARALYZ_HEAL_MSG EQU $F4
-POTION_MSG EQU $F5
-FULL_HEAL_MSG EQU $F6
-REVIVE_MSG EQU $F7
-RARE_CANDY_MSG EQU $F8
-
-; naming screen types
-NAME_PLAYER_SCREEN EQU 0
-NAME_RIVAL_SCREEN EQU 1
-NAME_MON_SCREEN EQU 2
-
-; mon data locations
-; Note that some values are not supported by all functions that use these values.
-PLAYER_PARTY_DATA EQU 0
-ENEMY_PARTY_DATA EQU 1
-BOX_DATA EQU 2
-DAYCARE_DATA EQU 3
-BATTLE_MON_DATA EQU 4
-
-; player direction constants
-
-PLAYER_DIR_BIT_RIGHT EQU 0
-PLAYER_DIR_BIT_LEFT EQU 1
-PLAYER_DIR_BIT_DOWN EQU 2
-PLAYER_DIR_BIT_UP EQU 3
-
-PLAYER_DIR_RIGHT EQU (1 << PLAYER_DIR_BIT_RIGHT)
-PLAYER_DIR_LEFT EQU (1 << PLAYER_DIR_BIT_LEFT)
-PLAYER_DIR_DOWN EQU (1 << PLAYER_DIR_BIT_DOWN)
-PLAYER_DIR_UP EQU (1 << PLAYER_DIR_BIT_UP)
+; Boolean checks
+FALSE EQU 0
+TRUE EQU 1
; flag operations
-
-FLAG_RESET EQU 0
-FLAG_SET EQU 1
-FLAG_TEST EQU 2
-
-; 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
-BATTLE_TYPE_RUN EQU 3
-BATTLE_TYPE_PIKACHU EQU 4
-
-; serial
-
-ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01
-ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK EQU $02
-
-USING_EXTERNAL_CLOCK EQU $01
-USING_INTERNAL_CLOCK EQU $02
-CONNECTION_NOT_ESTABLISHED EQU $ff
-
-; signals the start of an array of bytes transferred over the link cable
-SERIAL_PREAMBLE_BYTE EQU $FD
-
-; this byte is used when there is no data to send
-SERIAL_NO_DATA_BYTE EQU $FE
-
-; signals the end of one part of a patch list (there are two parts) for player/enemy party data
-SERIAL_PATCH_LIST_PART_TERMINATOR EQU $FF
-
-LINK_STATE_NONE EQU $00 ; not using link
-LINK_STATE_IN_CABLE_CLUB EQU $01 ; in a cable club room (Colosseum or Trade Centre)
-LINK_STATE_START_TRADE EQU $02 ; pre-trade selection screen initialisation
-LINK_STATE_START_BATTLE EQU $03 ; pre-battle initialisation
-LINK_STATE_BATTLING EQU $04 ; in a link battle
-LINK_STATE_RESET EQU $05 ; reset game (unused)
-LINK_STATE_TRADING EQU $32 ; in a link trade
-
-LINKBATTLE_RUN EQU $F
-LINKBATTLE_STRUGGLE EQU $E
-LINKBATTLE_NO_ACTION EQU $D
+ const_def
+ const FLAG_RESET ; 0
+ const FLAG_SET ; 1
+ const FLAG_TEST ; 2
; pikachu happiness modifiers
-const_value set 1
+ const_def 1
const PIKAHAPPY_LEVELUP
const PIKAHAPPY_USEDITEM
const PIKAHAPPY_USEDXITEM
diff --git a/constants/move_animation_constants.asm b/constants/move_animation_constants.asm
index 27658c83..f7617544 100644
--- a/constants/move_animation_constants.asm
+++ b/constants/move_animation_constants.asm
@@ -1,8 +1,8 @@
-; subanimations
-
-const_value = $D8
-
-; special effects, prefaced with "SE" for "Special Effect"
+; special effects that are part of move animations
+; SpecialEffectPointers associates them with effect routines (see data/battle_anims/special_effect_pointers.asm)
+ const_def $C0
+FIRST_SE_ID EQU const_value
+ const_skip $18
const SE_WAVY_SCREEN ; $D8 used in Psywave/Night Shade/Psychic etc.
const SE_SUBSTITUTE_MON ; $D9 used in Substitute (turns the pokemon into a mini sprite)
const SE_SHAKE_BACK_AND_FORTH ; $DA used in Double Team
@@ -42,3 +42,417 @@ const_value = $D8
const SE_RESET_SCREEN_PALETTE ; $FC used in Leer/Thunderpunch/etc.
const SE_DARK_SCREEN_PALETTE ; $FD used in Hyper Beam/Thunderpunch/etc.
const SE_DARK_SCREEN_FLASH ; $FE used in Cut/Take Down/etc.
+
+; subanimations that are part of move animations
+; SubanimationPointers indexes (see data/battle_anims/subanimations.asm)
+ const_def
+ const SUBANIM_00
+ const SUBANIM_01
+ const SUBANIM_02
+ const SUBANIM_03
+ const SUBANIM_04
+ const SUBANIM_05
+ const SUBANIM_06
+ const SUBANIM_07
+ const SUBANIM_08
+ const SUBANIM_09
+ const SUBANIM_0A
+ const SUBANIM_0B
+ const SUBANIM_0C
+ const SUBANIM_0D
+ const SUBANIM_0E
+ const SUBANIM_0F
+ const SUBANIM_10
+ const SUBANIM_11
+ const SUBANIM_12
+ const SUBANIM_13
+ const SUBANIM_14
+ const SUBANIM_15
+ const SUBANIM_16
+ const SUBANIM_17
+ const SUBANIM_18
+ const SUBANIM_19
+ const SUBANIM_1A
+ const SUBANIM_1B
+ const SUBANIM_1C
+ const SUBANIM_1D
+ const SUBANIM_1E
+ const SUBANIM_1F
+ const SUBANIM_20
+ const SUBANIM_21
+ const SUBANIM_22
+ const SUBANIM_23
+ const SUBANIM_24
+ const SUBANIM_25
+ const SUBANIM_26
+ const SUBANIM_27
+ const SUBANIM_28
+ const SUBANIM_29
+ const SUBANIM_2A
+ const SUBANIM_2B
+ const SUBANIM_2C
+ const SUBANIM_2D
+ const SUBANIM_2E
+ const SUBANIM_2F
+ const SUBANIM_30
+ const SUBANIM_31
+ const SUBANIM_32
+ const SUBANIM_33
+ const SUBANIM_34
+ const SUBANIM_35
+ const SUBANIM_36
+ const SUBANIM_37
+ const SUBANIM_38
+ const SUBANIM_39
+ const SUBANIM_3A
+ const SUBANIM_3B
+ const SUBANIM_3C
+ const SUBANIM_3D
+ const SUBANIM_3E
+ const SUBANIM_3F
+ const SUBANIM_40
+ const SUBANIM_41
+ const SUBANIM_42
+ const SUBANIM_43
+ const SUBANIM_44
+ const SUBANIM_45
+ const SUBANIM_46
+ const SUBANIM_47
+ const SUBANIM_48
+ const SUBANIM_49
+ const SUBANIM_4A
+ const SUBANIM_4B
+ const SUBANIM_4C
+ const SUBANIM_4D
+ const SUBANIM_4E
+ const SUBANIM_4F
+ const SUBANIM_50
+ const SUBANIM_51
+ const SUBANIM_52
+ const SUBANIM_53
+ const SUBANIM_54
+ const SUBANIM_55
+
+; types of subanimations
+ const_def
+ const SUBANIMTYPE_NORMAL
+ const SUBANIMTYPE_HVFLIP
+ const SUBANIMTYPE_HFLIP
+ const SUBANIMTYPE_COORDFLIP
+ const SUBANIMTYPE_REVERSE
+ const SUBANIMTYPE_ENEMY
+
+; frame blocks that are part of subanimations
+; FrameBlockPointers indexes (see data/battle_anims/frame_blocks.asm)
+ const_def
+ const FRAMEBLOCK_00
+ const FRAMEBLOCK_01
+ const FRAMEBLOCK_02
+ const FRAMEBLOCK_03
+ const FRAMEBLOCK_04
+ const FRAMEBLOCK_05
+ const FRAMEBLOCK_06
+ const FRAMEBLOCK_07
+ const FRAMEBLOCK_08
+ const FRAMEBLOCK_09
+ const FRAMEBLOCK_0A
+ const FRAMEBLOCK_0B
+ const FRAMEBLOCK_0C
+ const FRAMEBLOCK_0D
+ const FRAMEBLOCK_0E
+ const FRAMEBLOCK_0F
+ const FRAMEBLOCK_10
+ const FRAMEBLOCK_11
+ const FRAMEBLOCK_12
+ const FRAMEBLOCK_13
+ const FRAMEBLOCK_14
+ const FRAMEBLOCK_15
+ const FRAMEBLOCK_16
+ const FRAMEBLOCK_17
+ const FRAMEBLOCK_18
+ const FRAMEBLOCK_19
+ const FRAMEBLOCK_1A
+ const FRAMEBLOCK_1B
+ const FRAMEBLOCK_1C
+ const FRAMEBLOCK_1D
+ const FRAMEBLOCK_1E
+ const FRAMEBLOCK_1F
+ const FRAMEBLOCK_20
+ const FRAMEBLOCK_21
+ const FRAMEBLOCK_22
+ const FRAMEBLOCK_23
+ const FRAMEBLOCK_24
+ const FRAMEBLOCK_25
+ const FRAMEBLOCK_26
+ const FRAMEBLOCK_27
+ const FRAMEBLOCK_28
+ const FRAMEBLOCK_29
+ const FRAMEBLOCK_2A
+ const FRAMEBLOCK_2B
+ const FRAMEBLOCK_2C
+ const FRAMEBLOCK_2D
+ const FRAMEBLOCK_2E
+ const FRAMEBLOCK_2F
+ const FRAMEBLOCK_30
+ const FRAMEBLOCK_31
+ const FRAMEBLOCK_32
+ const FRAMEBLOCK_33
+ const FRAMEBLOCK_34
+ const FRAMEBLOCK_35
+ const FRAMEBLOCK_36
+ const FRAMEBLOCK_37
+ const FRAMEBLOCK_38
+ const FRAMEBLOCK_39
+ const FRAMEBLOCK_3A
+ const FRAMEBLOCK_3B
+ const FRAMEBLOCK_3C
+ const FRAMEBLOCK_3D
+ const FRAMEBLOCK_3E
+ const FRAMEBLOCK_3F
+ const FRAMEBLOCK_40
+ const FRAMEBLOCK_41
+ const FRAMEBLOCK_42
+ const FRAMEBLOCK_43
+ const FRAMEBLOCK_44
+ const FRAMEBLOCK_45
+ const FRAMEBLOCK_46
+ const FRAMEBLOCK_47
+ const FRAMEBLOCK_SMALL_BLACK_CIRCLE
+ const FRAMEBLOCK_LARGE_BLACK_CIRCLE
+ const FRAMEBLOCK_4A
+ const FRAMEBLOCK_4B
+ const FRAMEBLOCK_4C
+ const FRAMEBLOCK_4D
+ const FRAMEBLOCK_4E
+ const FRAMEBLOCK_4F
+ const FRAMEBLOCK_50
+ const FRAMEBLOCK_51
+ const FRAMEBLOCK_52
+ const FRAMEBLOCK_53
+ const FRAMEBLOCK_54
+ const FRAMEBLOCK_55
+ const FRAMEBLOCK_56
+ const FRAMEBLOCK_57
+ const FRAMEBLOCK_58
+ const FRAMEBLOCK_59
+ const FRAMEBLOCK_5A
+ const FRAMEBLOCK_5B
+ const FRAMEBLOCK_5C
+ const FRAMEBLOCK_5D
+ const FRAMEBLOCK_5E
+ const FRAMEBLOCK_5F
+ const FRAMEBLOCK_60
+ const FRAMEBLOCK_61
+ const FRAMEBLOCK_62
+ const FRAMEBLOCK_63
+ const FRAMEBLOCK_64
+ const FRAMEBLOCK_65
+ const FRAMEBLOCK_66
+ const FRAMEBLOCK_67
+ const FRAMEBLOCK_68
+ const FRAMEBLOCK_69
+ const FRAMEBLOCK_6A
+ const FRAMEBLOCK_6B
+ const FRAMEBLOCK_6C
+ const FRAMEBLOCK_6D
+ const FRAMEBLOCK_6E
+ const FRAMEBLOCK_6F
+ const FRAMEBLOCK_70
+ const FRAMEBLOCK_71
+ const FRAMEBLOCK_72
+ const FRAMEBLOCK_73
+ const FRAMEBLOCK_74
+ const FRAMEBLOCK_75
+ const FRAMEBLOCK_76
+ const FRAMEBLOCK_77
+ const FRAMEBLOCK_78
+ const FRAMEBLOCK_79
+
+; base coordinates that are part of subanimations
+; FrameBlockBaseCoords indexes (see data/battle_anims/base_coords.asm)
+ const_def
+ const BASECOORD_00
+ const BASECOORD_01
+ const BASECOORD_02
+ const BASECOORD_03
+ const BASECOORD_04
+ const BASECOORD_05
+ const BASECOORD_06
+ const BASECOORD_07
+ const BASECOORD_08
+ const BASECOORD_09
+ const BASECOORD_0A
+ const BASECOORD_0B
+ const BASECOORD_0C
+ const BASECOORD_0D
+ const BASECOORD_0E
+ const BASECOORD_0F
+ const BASECOORD_10
+ const BASECOORD_11
+ const BASECOORD_12
+ const BASECOORD_13
+ const BASECOORD_14
+ const BASECOORD_15
+ const BASECOORD_16
+ const BASECOORD_17
+ const BASECOORD_18
+ const BASECOORD_19
+ const BASECOORD_1A
+ const BASECOORD_1B
+ const BASECOORD_1C
+ const BASECOORD_1D
+ const BASECOORD_1E
+ const BASECOORD_1F
+ const BASECOORD_20
+ const BASECOORD_21
+ const BASECOORD_22
+ const BASECOORD_23
+ const BASECOORD_24
+ const BASECOORD_25
+ const BASECOORD_26
+ const BASECOORD_27
+ const BASECOORD_28
+ const BASECOORD_29
+ const BASECOORD_2A
+ const BASECOORD_2B
+ const BASECOORD_2C
+ const BASECOORD_2D
+ const BASECOORD_2E
+ const BASECOORD_2F
+ const BASECOORD_30
+ const BASECOORD_31
+ const BASECOORD_32
+ const BASECOORD_33
+ const BASECOORD_34
+ const BASECOORD_35
+ const BASECOORD_36
+ const BASECOORD_37
+ const BASECOORD_38
+ const BASECOORD_39
+ const BASECOORD_3A
+ const BASECOORD_3B
+ const BASECOORD_3C
+ const BASECOORD_3D
+ const BASECOORD_3E
+ const BASECOORD_3F
+ const BASECOORD_40
+ const BASECOORD_41
+ const BASECOORD_42
+ const BASECOORD_43
+ const BASECOORD_44
+ const BASECOORD_45
+ const BASECOORD_46
+ const BASECOORD_47
+ const BASECOORD_48
+ const BASECOORD_49
+ const BASECOORD_4A
+ const BASECOORD_4B
+ const BASECOORD_4C
+ const BASECOORD_4D
+ const BASECOORD_4E
+ const BASECOORD_4F
+ const BASECOORD_50
+ const BASECOORD_51
+ const BASECOORD_52
+ const BASECOORD_53
+ const BASECOORD_54
+ const BASECOORD_55
+ const BASECOORD_56
+ const BASECOORD_57
+ const BASECOORD_58
+ const BASECOORD_59
+ const BASECOORD_5A
+ const BASECOORD_5B
+ const BASECOORD_5C
+ const BASECOORD_5D
+ const BASECOORD_5E
+ const BASECOORD_5F
+ const BASECOORD_60
+ const BASECOORD_61
+ const BASECOORD_62
+ const BASECOORD_63
+ const BASECOORD_64
+ const BASECOORD_65
+ const BASECOORD_66
+ const BASECOORD_67
+ const BASECOORD_68
+ const BASECOORD_69
+ const BASECOORD_6A
+ const BASECOORD_6B
+ const BASECOORD_6C
+ const BASECOORD_6D
+ const BASECOORD_6E
+ const BASECOORD_6F
+ const BASECOORD_70
+ const BASECOORD_71
+ const BASECOORD_72
+ const BASECOORD_73
+ const BASECOORD_74
+ const BASECOORD_75
+ const BASECOORD_76
+ const BASECOORD_77
+ const BASECOORD_78
+ const BASECOORD_79
+ const BASECOORD_7A
+ const BASECOORD_7B
+ const BASECOORD_7C
+ const BASECOORD_7D
+ const BASECOORD_7E
+ const BASECOORD_7F
+ const BASECOORD_80
+ const BASECOORD_81
+ const BASECOORD_82
+ const BASECOORD_83
+ const BASECOORD_84
+ const BASECOORD_85
+ const BASECOORD_86
+ const BASECOORD_87
+ const BASECOORD_88
+ const BASECOORD_89
+ const BASECOORD_8A
+ const BASECOORD_8B
+ const BASECOORD_8C
+ const BASECOORD_8D
+ const BASECOORD_8E
+ const BASECOORD_8F
+ const BASECOORD_90
+ const BASECOORD_91
+ const BASECOORD_92
+ const BASECOORD_93
+ const BASECOORD_94
+ const BASECOORD_95
+ const BASECOORD_96
+ const BASECOORD_97
+ const BASECOORD_98
+ const BASECOORD_99
+ const BASECOORD_9A
+ const BASECOORD_9B
+ const BASECOORD_9C
+ const BASECOORD_9D
+ const BASECOORD_9E
+ const BASECOORD_9F
+ const BASECOORD_A0
+ const BASECOORD_A1
+ const BASECOORD_A2
+ const BASECOORD_A3
+ const BASECOORD_A4
+ const BASECOORD_A5
+ const BASECOORD_A6
+ const BASECOORD_A7
+ const BASECOORD_A8
+ const BASECOORD_A9
+ const BASECOORD_AA
+ const BASECOORD_AB
+ const BASECOORD_AC
+ const BASECOORD_AD
+ const BASECOORD_AE
+ const BASECOORD_AF
+ const BASECOORD_B0
+
+; frame block modes that are part of subanimations
+ const_def
+ const FRAMEBLOCKMODE_00
+ const FRAMEBLOCKMODE_01
+ const FRAMEBLOCKMODE_02
+ const FRAMEBLOCKMODE_03
+ const FRAMEBLOCKMODE_04
diff --git a/constants/move_constants.asm b/constants/move_constants.asm
index dfbb500e..ecc28078 100644
--- a/constants/move_constants.asm
+++ b/constants/move_constants.asm
@@ -1,5 +1,11 @@
-const_value = 1
-
+; move ids
+; indexes for:
+; - Moves (see data/moves/moves.asm)
+; - MoveNames (see data/moves/names.asm)
+; - AttackAnimationPointers (see data/moves/animations.asm)
+; - MoveSoundTable (see data/moves/sfx.asm)
+ const_def
+ const NO_MOVE ; 00
const POUND ; 01
const KARATE_CHOP ; 02
const DOUBLESLAP ; 03
@@ -165,9 +171,9 @@ const_value = 1
const SLASH ; a3
const SUBSTITUTE ; a4
-NUM_ATTACKS EQU const_value + -1
+NUM_ATTACKS EQU const_value - 1
- const STRUGGLE
+ const STRUGGLE ; a5
; Moves do double duty as animation identifiers.
diff --git a/constants/move_effect_constants.asm b/constants/move_effect_constants.asm
index b66772d1..4c6d0c38 100644
--- a/constants/move_effect_constants.asm
+++ b/constants/move_effect_constants.asm
@@ -1,11 +1,11 @@
-; tentative move effect constants
; {stat}_(UP|DOWN)(1|2) means that the move raises the user's (or lowers the target's) corresponding stat modifier by 1 (or 2) stages
-; {status condition}_side_effect means that the move has a side chance of causing that condition
-; {status condition}_effect means that the move causes the status condition every time it hits the target
-const_value = 0
+; {status condition}_SIDE_EFFECT means that the move has a side chance of causing that condition
+; {status condition}_EFFECT means that the move causes the status condition every time it hits the target
+; MoveEffectPointerTable indexes (see data/moves/effects_pointers.asm)
+ const_def
const NO_ADDITIONAL_EFFECT ; $00
- const UNUSED_EFFECT_01 ; $01
+ const EFFECT_01 ; $01 unused
const POISON_SIDE_EFFECT1 ; $02
const DRAIN_HP_EFFECT ; $03
const BURN_SIDE_EFFECT1 ; $04
@@ -34,7 +34,7 @@ const_value = 0
const THRASH_PETAL_DANCE_EFFECT ; $1B
const SWITCH_AND_TELEPORT_EFFECT ; $1C
const TWO_TO_FIVE_ATTACKS_EFFECT ; $1D
- const UNUSED_EFFECT_1E ; $1E
+ const EFFECT_1E ; $1E unused
const FLINCH_SIDE_EFFECT1 ; $1F
const SLEEP_EFFECT ; $20
const POISON_SIDE_EFFECT2 ; $21
@@ -76,13 +76,13 @@ const_value = 0
const DEFENSE_DOWN_SIDE_EFFECT ; $45
const SPEED_DOWN_SIDE_EFFECT ; $46
const SPECIAL_DOWN_SIDE_EFFECT ; $47
- const UNUSED_EFFECT_48 ; $48
- const UNUSED_EFFECT_49 ; $49
- const UNUSED_EFFECT_4A ; $4A
- const UNUSED_EFFECT_4B ; $4B
+ const_skip ; $48
+ const_skip ; $49
+ const_skip ; $4A
+ const_skip ; $4B
const CONFUSION_SIDE_EFFECT ; $4C
const TWINEEDLE_EFFECT ; $4D
- const UNUSED_EFFECT_4E ; $4E
+ const_skip ; $4E
const SUBSTITUTE_EFFECT ; $4F
const HYPER_BEAM_EFFECT ; $50
const RAGE_EFFECT ; $51
@@ -91,7 +91,3 @@ const_value = 0
const LEECH_SEED_EFFECT ; $54
const SPLASH_EFFECT ; $55
const DISABLE_EFFECT ; $56
-
-; fixed damage constants
-SONICBOOM_DAMAGE EQU 20
-DRAGON_RAGE_DAMAGE EQU 40
diff --git a/constants/music_constants.asm b/constants/music_constants.asm
index 117ed2e3..46955712 100644
--- a/constants/music_constants.asm
+++ b/constants/music_constants.asm
@@ -1,52 +1,5 @@
-; 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_1 EQUS "SFX_SAFARI_ZONE_PA"
-MAX_SFX_ID_2 EQUS "SFX_SILPH_SCOPE"
-MAX_SFX_ID_3 EQUS "SFX_SHOOTING_STAR"
-MAX_SFX_ID_4 EQUS "SFX_GET_ITEM2_4_2 + 2"
-
-NOISE_INSTRUMENTS_START EQUS "SFX_NOISE_INSTRUMENT01"
-NOISE_INSTRUMENTS_END EQUS "SFX_NOISE_INSTRUMENT19 + 1"
-
-CRY_SFX_START EQUS "SFX_CRY_00"
-CRY_SFX_END EQUS "SFX_CRY_25 + 3"
-
-BATTLE_SFX_START EQUS "SFX_PECK"
-BATTLE_SFX_END EQUS "SFX_SILPH_SCOPE + 1"
-
-; wChannelFlags1 constants
-BIT_PERFECT_PITCH EQU 0 ; controlled by toggle_perfect_pitch command
-BIT_SOUND_CALL EQU 1 ; if in sound 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_SLIDE_ON EQU 4 ; if pitch slide is active
-BIT_PITCH_SLIDE_DECREASING EQU 5 ; if the pitch slide frequency is decreasing (instead of increasing)
-BIT_ROTATE_DUTY_CYCLE EQU 6 ; if rotating duty cycle
-
-; wChannelFlags2 constant (only has one flag)
-BIT_EXECUTE_MUSIC EQU 0 ; if in execute music
-
; Song ids are calculated by address to save space.
+; SFX_Headers_(1|2|3) indexes (see audio/headers/*.asm)
music_const: MACRO
\1 EQUS "((\2 - SFX_Headers_1) / 3)"
@@ -110,6 +63,7 @@ ENDM
music_const MUSIC_GB_PRINTER, Music_GBPrinter
; AUDIO_1 AUDIO_2 AUDIO_3 AUDIO_4
+NOISE_INSTRUMENTS_START EQUS "SFX_NOISE_INSTRUMENT01"
music_const SFX_NOISE_INSTRUMENT01, SFX_Noise_Instrument01_1
music_const SFX_NOISE_INSTRUMENT02, SFX_Noise_Instrument02_1
music_const SFX_NOISE_INSTRUMENT03, SFX_Noise_Instrument03_1
@@ -129,6 +83,9 @@ ENDM
music_const SFX_NOISE_INSTRUMENT17, SFX_Noise_Instrument17_1
music_const SFX_NOISE_INSTRUMENT18, SFX_Noise_Instrument18_1
music_const SFX_NOISE_INSTRUMENT19, SFX_Noise_Instrument19_1
+NOISE_INSTRUMENTS_END EQUS "SFX_NOISE_INSTRUMENT19 + 1"
+
+CRY_SFX_START EQUS "SFX_CRY_00"
music_const SFX_CRY_00, SFX_Cry00_1
music_const SFX_CRY_01, SFX_Cry01_1
music_const SFX_CRY_02, SFX_Cry02_1
@@ -167,6 +124,7 @@ ENDM
music_const SFX_CRY_23, SFX_Cry23_1
music_const SFX_CRY_24, SFX_Cry24_1
music_const SFX_CRY_25, SFX_Cry25_1
+CRY_SFX_END EQUS "SFX_CRY_25 + 3"
music_const SFX_GET_ITEM_2, SFX_Get_Item2_1
music_const SFX_TINK, SFX_Tink_1
@@ -212,6 +170,7 @@ ENDM
; AUDIO_1
music_const SFX_POKEFLUTE, SFX_Pokeflute
music_const SFX_SAFARI_ZONE_PA, SFX_Safari_Zone_PA
+MAX_SFX_ID_1 EQUS "SFX_SAFARI_ZONE_PA"
; AUDIO_2
music_const SFX_LEVEL_UP, SFX_Level_Up
@@ -222,6 +181,8 @@ ENDM
music_const SFX_RUN, SFX_Run
music_const SFX_DEX_PAGE_ADDED, SFX_Dex_Page_Added
music_const SFX_CAUGHT_MON, SFX_Caught_Mon
+
+BATTLE_SFX_START EQUS "SFX_PECK"
music_const SFX_PECK, SFX_Peck
music_const SFX_FAINT_FALL, SFX_Faint_Fall
music_const SFX_BATTLE_09, SFX_Battle_09
@@ -271,6 +232,8 @@ ENDM
music_const SFX_BATTLE_35, SFX_Battle_35
music_const SFX_BATTLE_36, SFX_Battle_36
music_const SFX_SILPH_SCOPE, SFX_Silph_Scope
+BATTLE_SFX_END EQUS "SFX_SILPH_SCOPE + 1"
+MAX_SFX_ID_2 EQUS "SFX_SILPH_SCOPE"
; AUDIO_3
music_const SFX_INTRO_LUNGE, SFX_Intro_Lunge
@@ -283,6 +246,7 @@ ENDM
music_const SFX_SLOTS_REWARD, SFX_Slots_Reward
music_const SFX_SLOTS_NEW_SPIN, SFX_Slots_New_Spin
music_const SFX_SHOOTING_STAR, SFX_Shooting_Star
+MAX_SFX_ID_3 EQUS "SFX_SHOOTING_STAR"
; AUDIO_4
music_const SFX_SURFING_JUMP, SFX_Surfing_Jump
@@ -291,3 +255,6 @@ ENDM
music_const SFX_UNKNOWN_802CC_4, SFX_802cc_4
music_const SFX_SURFING_LAND, SFX_Surfing_Land
music_const SFX_GET_ITEM2_4_2, SFX_Get_Item2_4_2
+MAX_SFX_ID_4 EQUS "SFX_GET_ITEM2_4_2 + 2"
+
+SFX_STOP_ALL_MUSIC EQU $ff
diff --git a/constants/oam_constants.asm b/constants/oam_constants.asm
index 9eb52385..7a80bdd2 100755
--- a/constants/oam_constants.asm
+++ b/constants/oam_constants.asm
@@ -1,8 +1,6 @@
; OAM flags used by this game
OAMFLAG_ENDOFDATA EQU %00000001 ; pseudo OAM flag, only used by game logic
OAMFLAG_CANBEMASKED EQU %00000010 ; pseudo OAM flag, only used by game logic
-OAMFLAG_VFLIPPED EQU %00100000 ; OAM flag flips the sprite vertically.
-; Used for making left facing sprites face right and to alternate between left and right foot animation when walking up or down
; OAM attribute flags
OAM_PALETTE EQU %111
@@ -13,8 +11,9 @@ OAM_Y_FLIP EQU 6
OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3)
; OAM attribute masks
-OAM_HFLIP EQU 1 << OAM_X_FLIP ; horizontal flip
-OAM_VFLIP EQU 1 << OAM_Y_FLIP ; vertical flip
+OAM_OBP1 EQU 1 << OAM_OBP_NUM ; OBJ palette 1
+OAM_HFLIP EQU 1 << OAM_X_FLIP ; horizontal flip
+OAM_VFLIP EQU 1 << OAM_Y_FLIP ; vertical flip
OAM_BEHIND_BG EQU 1 << OAM_PRIORITY ; behind bg (except color 0)
frame: MACRO
diff --git a/constants/palette_constants.asm b/constants/palette_constants.asm
index 0988b361..a16999e7 100755
--- a/constants/palette_constants.asm
+++ b/constants/palette_constants.asm
@@ -5,25 +5,30 @@
const DARK_GRAY
const BLACK
-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
+; pal/blk packets
+; SetPalFunctions indexes (see engine/gfx/palettes.asm)
+ const_def
+ const SET_PAL_BATTLE_BLACK ; $00
+ const SET_PAL_BATTLE ; $01
+ const SET_PAL_TOWN_MAP ; $02
+ const SET_PAL_STATUS_SCREEN ; $03
+ const SET_PAL_POKEDEX ; $04
+ const SET_PAL_SLOTS ; $05
+ const SET_PAL_TITLE_SCREEN ; $06
+ const SET_PAL_NIDORINO_INTRO ; $07
+ const SET_PAL_GENERIC ; $08
+ const SET_PAL_OVERWORLD ; $09
+ const SET_PAL_PARTY_MENU ; $0A
+ const SET_PAL_POKEMON_WHOLE_SCREEN ; $0B
+ const SET_PAL_GAME_FREAK_INTRO ; $0C
+ const SET_PAL_TRAINER_CARD ; $0D
-; super game boy palettes
-const_value = 0
+SET_PAL_PARTY_MENU_HP_BARS EQU $fc
+SET_PAL_DEFAULT EQU $ff
+; sgb palettes
+; SuperPalettes indexes (see data/sgb/sgb_palettes.asm)
+ const_def
const PAL_ROUTE ; $00
const PAL_PALLET ; $01
const PAL_VIRIDIAN ; $02
diff --git a/constants/pokedex_constants.asm b/constants/pokedex_constants.asm
index b80547f7..a805b261 100644
--- a/constants/pokedex_constants.asm
+++ b/constants/pokedex_constants.asm
@@ -1,5 +1,9 @@
-const_value = 1
-
+; pokedex ids
+; indexes for:
+; - BaseStats (see data/pokemon/base_stats.asm)
+; - MonPartyData (see data/pokemon/menu_icons.asm)
+; - MonsterPalettes (see data/pokemon/palettes.asm)
+ const_def 1
const DEX_BULBASAUR ; 1
const DEX_IVYSAUR ; 2
const DEX_VENUSAUR ; 3
@@ -152,4 +156,4 @@ const_value = 1
const DEX_MEWTWO ; 150
const DEX_MEW ; 151
-NUM_POKEMON EQU const_value + -1
+NUM_POKEMON EQU const_value - 1
diff --git a/constants/pokemon_constants.asm b/constants/pokemon_constants.asm
index 8fb15366..d01398b8 100644
--- a/constants/pokemon_constants.asm
+++ b/constants/pokemon_constants.asm
@@ -1,197 +1,209 @@
-const_value = 1
+; pokemon ids
+; indexes for:
+; - MonsterNames (see data/pokemon/names.asm)
+; - EvosMovesPointerTable (see data/pokemon/evos_moves.asm)
+; - CryData (see data/pokemon/cries.asm)
+; - PokedexOrder (see data/pokemon/dex_order.asm)
+; - PokedexEntryPointers (see data/pokemon/dex_entries.asm)
+ const_def
+ const NO_MON ; $00
+ const RHYDON ; $01
+ const KANGASKHAN ; $02
+ const NIDORAN_M ; $03
+ const CLEFAIRY ; $04
+ const SPEAROW ; $05
+ const VOLTORB ; $06
+ const NIDOKING ; $07
+ const SLOWBRO ; $08
+ const IVYSAUR ; $09
+ const EXEGGUTOR ; $0A
+ const LICKITUNG ; $0B
+ const EXEGGCUTE ; $0C
+ const GRIMER ; $0D
+ const GENGAR ; $0E
+ const NIDORAN_F ; $0F
+ const NIDOQUEEN ; $10
+ const CUBONE ; $11
+ const RHYHORN ; $12
+ const LAPRAS ; $13
+ const ARCANINE ; $14
+ const MEW ; $15
+ const GYARADOS ; $16
+ const SHELLDER ; $17
+ const TENTACOOL ; $18
+ const GASTLY ; $19
+ const SCYTHER ; $1A
+ const STARYU ; $1B
+ const BLASTOISE ; $1C
+ const PINSIR ; $1D
+ const TANGELA ; $1E
+ const_skip ; $1F
+ const_skip ; $20
+ const GROWLITHE ; $21
+ const ONIX ; $22
+ const FEAROW ; $23
+ const PIDGEY ; $24
+ const SLOWPOKE ; $25
+ const KADABRA ; $26
+ const GRAVELER ; $27
+ const CHANSEY ; $28
+ const MACHOKE ; $29
+ const MR_MIME ; $2A
+ const HITMONLEE ; $2B
+ const HITMONCHAN ; $2C
+ const ARBOK ; $2D
+ const PARASECT ; $2E
+ const PSYDUCK ; $2F
+ const DROWZEE ; $30
+ const GOLEM ; $31
+ const_skip ; $32
+ const MAGMAR ; $33
+ const_skip ; $34
+ const ELECTABUZZ ; $35
+ const MAGNETON ; $36
+ const KOFFING ; $37
+ const_skip ; $38
+ const MANKEY ; $39
+ const SEEL ; $3A
+ const DIGLETT ; $3B
+ const TAUROS ; $3C
+ const_skip ; $3D
+ const_skip ; $3E
+ const_skip ; $3F
+ const FARFETCHD ; $40
+ const VENONAT ; $41
+ const DRAGONITE ; $42
+ const_skip ; $43
+ const_skip ; $44
+ const_skip ; $45
+ const DODUO ; $46
+ const POLIWAG ; $47
+ const JYNX ; $48
+ const MOLTRES ; $49
+ const ARTICUNO ; $4A
+ const ZAPDOS ; $4B
+ const DITTO ; $4C
+ const MEOWTH ; $4D
+ const KRABBY ; $4E
+ const_skip ; $4F
+ const_skip ; $50
+ const_skip ; $51
+ const VULPIX ; $52
+ const NINETALES ; $53
+ const PIKACHU ; $54
+ const RAICHU ; $55
+ const_skip ; $56
+ const_skip ; $57
+ const DRATINI ; $58
+ const DRAGONAIR ; $59
+ const KABUTO ; $5A
+ const KABUTOPS ; $5B
+ const HORSEA ; $5C
+ const SEADRA ; $5D
+ const_skip ; $5E
+ const_skip ; $5F
+ const SANDSHREW ; $60
+ const SANDSLASH ; $61
+ const OMANYTE ; $62
+ const OMASTAR ; $63
+ const JIGGLYPUFF ; $64
+ const WIGGLYTUFF ; $65
+ const EEVEE ; $66
+ const FLAREON ; $67
+ const JOLTEON ; $68
+ const VAPOREON ; $69
+ const MACHOP ; $6A
+ const ZUBAT ; $6B
+ const EKANS ; $6C
+ const PARAS ; $6D
+ const POLIWHIRL ; $6E
+ const POLIWRATH ; $6F
+ const WEEDLE ; $70
+ const KAKUNA ; $71
+ const BEEDRILL ; $72
+ const_skip ; $73
+ const DODRIO ; $74
+ const PRIMEAPE ; $75
+ const DUGTRIO ; $76
+ const VENOMOTH ; $77
+ const DEWGONG ; $78
+ const_skip ; $79
+ const_skip ; $7A
+ const CATERPIE ; $7B
+ const METAPOD ; $7C
+ const BUTTERFREE ; $7D
+ const MACHAMP ; $7E
+ const_skip ; $7F
+ const GOLDUCK ; $80
+ const HYPNO ; $81
+ const GOLBAT ; $82
+ const MEWTWO ; $83
+ const SNORLAX ; $84
+ const MAGIKARP ; $85
+ const_skip ; $86
+ const_skip ; $87
+ const MUK ; $88
+ const_skip ; $89
+ const KINGLER ; $8A
+ const CLOYSTER ; $8B
+ const_skip ; $8C
+ const ELECTRODE ; $8D
+ const CLEFABLE ; $8E
+ const WEEZING ; $8F
+ const PERSIAN ; $90
+ const MAROWAK ; $91
+ const_skip ; $92
+ const HAUNTER ; $93
+ const ABRA ; $94
+ const ALAKAZAM ; $95
+ const PIDGEOTTO ; $96
+ const PIDGEOT ; $97
+ const STARMIE ; $98
+ const BULBASAUR ; $99
+ const VENUSAUR ; $9A
+ const TENTACRUEL ; $9B
+ const_skip ; $9C
+ const GOLDEEN ; $9D
+ const SEAKING ; $9E
+ const_skip ; $9F
+ const_skip ; $A0
+ const_skip ; $A1
+ const_skip ; $A2
+ const PONYTA ; $A3
+ const RAPIDASH ; $A4
+ const RATTATA ; $A5
+ const RATICATE ; $A6
+ const NIDORINO ; $A7
+ const NIDORINA ; $A8
+ const GEODUDE ; $A9
+ const PORYGON ; $AA
+ const AERODACTYL ; $AB
+ const_skip ; $AC
+ const MAGNEMITE ; $AD
+ const_skip ; $AE
+ const_skip ; $AF
+ const CHARMANDER ; $B0
+ const SQUIRTLE ; $B1
+ const CHARMELEON ; $B2
+ const WARTORTLE ; $B3
+ const CHARIZARD ; $B4
+ const_skip ; $B5
+ const FOSSIL_KABUTOPS ; $B6
+ const FOSSIL_AERODACTYL ; $B7
+ const MON_GHOST ; $B8
+ const ODDISH ; $B9
+ const GLOOM ; $BA
+ const VILEPLUME ; $BB
+ const BELLSPROUT ; $BC
+ const WEEPINBELL ; $BD
+ const VICTREEBEL ; $BE
- const RHYDON ; $01
- const KANGASKHAN ; $02
- const NIDORAN_M ; $03
- const CLEFAIRY ; $04
- const SPEAROW ; $05
- const VOLTORB ; $06
- const NIDOKING ; $07
- const SLOWBRO ; $08
- const IVYSAUR ; $09
- const EXEGGUTOR ; $0A
- const LICKITUNG ; $0B
- const EXEGGCUTE ; $0C
- const GRIMER ; $0D
- const GENGAR ; $0E
- const NIDORAN_F ; $0F
- const NIDOQUEEN ; $10
- const CUBONE ; $11
- const RHYHORN ; $12
- const LAPRAS ; $13
- const ARCANINE ; $14
- const MEW ; $15
- const GYARADOS ; $16
- const SHELLDER ; $17
- const TENTACOOL ; $18
- const GASTLY ; $19
- const SCYTHER ; $1A
- const STARYU ; $1B
- const BLASTOISE ; $1C
- const PINSIR ; $1D
- const TANGELA ; $1E
- const MISSINGNO_1F ; $1F
- const MISSINGNO_20 ; $20
- const GROWLITHE ; $21
- const ONIX ; $22
- const FEAROW ; $23
- const PIDGEY ; $24
- const SLOWPOKE ; $25
- const KADABRA ; $26
- const GRAVELER ; $27
- const CHANSEY ; $28
- const MACHOKE ; $29
- const MR_MIME ; $2A
- const HITMONLEE ; $2B
- const HITMONCHAN ; $2C
- const ARBOK ; $2D
- const PARASECT ; $2E
- const PSYDUCK ; $2F
- const DROWZEE ; $30
- const GOLEM ; $31
- const MISSINGNO_32 ; $32
- const MAGMAR ; $33
- const MISSINGNO_34 ; $34
- const ELECTABUZZ ; $35
- const MAGNETON ; $36
- const KOFFING ; $37
- const MISSINGNO_38 ; $38
- const MANKEY ; $39
- const SEEL ; $3A
- const DIGLETT ; $3B
- const TAUROS ; $3C
- const MISSINGNO_3D ; $3D
- const MISSINGNO_3E ; $3E
- const MISSINGNO_3F ; $3F
- const FARFETCHD ; $40
- const VENONAT ; $41
- const DRAGONITE ; $42
- const MISSINGNO_43 ; $43
- const MISSINGNO_44 ; $44
- const MISSINGNO_45 ; $45
- const DODUO ; $46
- const POLIWAG ; $47
- const JYNX ; $48
- const MOLTRES ; $49
- const ARTICUNO ; $4A
- const ZAPDOS ; $4B
- const DITTO ; $4C
- const MEOWTH ; $4D
- const KRABBY ; $4E
- const MISSINGNO_4F ; $4F
- const MISSINGNO_50 ; $50
- const MISSINGNO_51 ; $51
- const VULPIX ; $52
- const NINETALES ; $53
- const PIKACHU ; $54
- const RAICHU ; $55
- const MISSINGNO_56 ; $56
- const MISSINGNO_57 ; $57
- const DRATINI ; $58
- const DRAGONAIR ; $59
- const KABUTO ; $5A
- const KABUTOPS ; $5B
- const HORSEA ; $5C
- const SEADRA ; $5D
- const MISSINGNO_5E ; $5E
- const MISSINGNO_5F ; $5F
- const SANDSHREW ; $60
- const SANDSLASH ; $61
- const OMANYTE ; $62
- const OMASTAR ; $63
- const JIGGLYPUFF ; $64
- const WIGGLYTUFF ; $65
- const EEVEE ; $66
- const FLAREON ; $67
- const JOLTEON ; $68
- const VAPOREON ; $69
- const MACHOP ; $6A
- const ZUBAT ; $6B
- const EKANS ; $6C
- const PARAS ; $6D
- const POLIWHIRL ; $6E
- const POLIWRATH ; $6F
- const WEEDLE ; $70
- const KAKUNA ; $71
- const BEEDRILL ; $72
- const MISSINGNO_73 ; $73
- const DODRIO ; $74
- const PRIMEAPE ; $75
- const DUGTRIO ; $76
- const VENOMOTH ; $77
- const DEWGONG ; $78
- const MISSINGNO_79 ; $79
- const MISSINGNO_7A ; $7A
- const CATERPIE ; $7B
- const METAPOD ; $7C
- const BUTTERFREE ; $7D
- const MACHAMP ; $7E
- const MISSINGNO_7F ; $7F
- const GOLDUCK ; $80
- const HYPNO ; $81
- const GOLBAT ; $82
- const MEWTWO ; $83
- const SNORLAX ; $84
- const MAGIKARP ; $85
- const MISSINGNO_86 ; $86
- const MISSINGNO_87 ; $87
- const MUK ; $88
- const MISSINGNO_89 ; $89
- const KINGLER ; $8A
- const CLOYSTER ; $8B
- const MISSINGNO_8C ; $8C
- const ELECTRODE ; $8D
- const CLEFABLE ; $8E
- const WEEZING ; $8F
- const PERSIAN ; $90
- const MAROWAK ; $91
- const MISSINGNO_92 ; $92
- const HAUNTER ; $93
- const ABRA ; $94
- const ALAKAZAM ; $95
- const PIDGEOTTO ; $96
- const PIDGEOT ; $97
- const STARMIE ; $98
- const BULBASAUR ; $99
- const VENUSAUR ; $9A
- const TENTACRUEL ; $9B
- const MISSINGNO_9C ; $9C
- const GOLDEEN ; $9D
- const SEAKING ; $9E
- const MISSINGNO_9F ; $9F
- const MISSINGNO_A0 ; $A0
- const MISSINGNO_A1 ; $A1
- const MISSINGNO_A2 ; $A2
- const PONYTA ; $A3
- const RAPIDASH ; $A4
- const RATTATA ; $A5
- const RATICATE ; $A6
- const NIDORINO ; $A7
- const NIDORINA ; $A8
- const GEODUDE ; $A9
- const PORYGON ; $AA
- const AERODACTYL ; $AB
- const MISSINGNO_AC ; $AC
- const MAGNEMITE ; $AD
- const MISSINGNO_AE ; $AE
- const MISSINGNO_AF ; $AF
- const CHARMANDER ; $B0
- const SQUIRTLE ; $B1
- const CHARMELEON ; $B2
- const WARTORTLE ; $B3
- const CHARIZARD ; $B4
- const MISSINGNO_B5 ; $B5
- const FOSSIL_KABUTOPS ; $B6
- const FOSSIL_AERODACTYL ; $B7
- const MON_GHOST ; $B8
- const ODDISH ; $B9
- const GLOOM ; $BA
- const VILEPLUME ; $BB
- const BELLSPROUT ; $BC
- const WEEPINBELL ; $BD
- const VICTREEBEL ; $BE
+NUM_POKEMON_INDEXES EQU const_value - 1
-NUM_POKEMON_INDEXES EQU const_value + -1
+; starters
+STARTER1 EQU CHARMANDER
+STARTER2 EQU SQUIRTLE
+STARTER3 EQU BULBASAUR
; ghost Marowak in Pokémon Tower
RESTLESS_SOUL EQU MAROWAK
diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm
new file mode 100755
index 00000000..a0e5b257
--- /dev/null
+++ b/constants/pokemon_data_constants.asm
@@ -0,0 +1,41 @@
+PARTY_LENGTH EQU 6
+
+MONS_PER_BOX EQU 20
+NUM_BOXES EQU 12
+
+HOF_MON EQU $10
+HOF_TEAM EQU PARTY_LENGTH * HOF_MON
+HOF_TEAM_CAPACITY EQU 50
+
+
+; mon data locations
+; Note that some values are not supported by all functions that use these values.
+ const_def
+ const PLAYER_PARTY_DATA ; 0
+ const ENEMY_PARTY_DATA ; 1
+ const BOX_DATA ; 2
+ const DAYCARE_DATA ; 3
+ const BATTLE_MON_DATA ; 4
+
+
+; See data/pokemon/evos_moves.asm
+
+; Evolution types
+ const_def 1
+ const EV_LEVEL ; 1
+ const EV_ITEM ; 2
+ const EV_TRADE ; 3
+
+MAX_EVOLUTIONS EQU 3
+EVOLUTION_SIZE EQU 4
+
+
+; wMonHGrowthRate values
+; GrowthRateTable indexes (see data/growth_rates.asm)
+ const_def
+ const GROWTH_MEDIUM_FAST
+ const GROWTH_SLIGHTLY_FAST
+ const GROWTH_SLIGHTLY_SLOW
+ const GROWTH_MEDIUM_SLOW
+ const GROWTH_FAST
+ const GROWTH_SLOW
diff --git a/constants/script_constants.asm b/constants/script_constants.asm
new file mode 100644
index 00000000..e7d23e97
--- /dev/null
+++ b/constants/script_constants.asm
@@ -0,0 +1,63 @@
+; EmotionBubblesPointerTable indexes (see engine/overworld/emotion_bubbles.asm)
+ const_def
+ const EXCLAMATION_BUBBLE ; 0
+ const QUESTION_BUBBLE ; 1
+ const SMILE_BUBBLE ; 2
+ const SKULL_BUBBLE ; 3
+ const HEART_BUBBLE ; 4
+ const BOLT_BUBBLE ; 5
+ const ZZZ_BUBBLE ; 6
+ const FISH_BUBBLE ; 7
+
+; slot symbols
+SLOTS7 EQU $0200
+SLOTSBAR EQU $0604
+SLOTSCHERRY EQU $0A08
+SLOTSFISH EQU $0E0C
+SLOTSBIRD EQU $1210
+SLOTSMOUSE EQU $1614
+
+; StartSlotMachine dialogs
+SLOTS_OUTOFORDER EQU $fd
+SLOTS_OUTTOLUNCH EQU $fe
+SLOTS_SOMEONESKEYS EQU $ff
+
+; in game trades
+; TradeMons indexes (see data/events/trades.asm)
+ const_def
+ const TRADE_FOR_TERRY
+ const TRADE_FOR_MARCEL
+ const TRADE_FOR_CHIKUCHIKU
+ const TRADE_FOR_SAILOR
+ const TRADE_FOR_DUX
+ const TRADE_FOR_MARC
+ const TRADE_FOR_LOLA
+ const TRADE_FOR_DORIS
+ const TRADE_FOR_CRINKLES
+ const TRADE_FOR_SPOT
+
+; in game trade dialog sets
+; InGameTradeTextPointers indexes (see engine/events/in_game_trades.asm)
+ const_def
+ const TRADE_DIALOGSET_CASUAL
+ const TRADE_DIALOGSET_POLITE
+ const TRADE_DIALOGSET_HAPPY
+
+; badges
+; wObtainedBadges and wBeatGymFlags bits
+ const_def
+ const BIT_BOULDERBADGE ; 0
+ const BIT_CASCADEBADGE ; 1
+ const BIT_THUNDERBADGE ; 2
+ const BIT_RAINBOWBADGE ; 3
+ const BIT_SOULBADGE ; 4
+ const BIT_MARSHBADGE ; 5
+ const BIT_VOLCANOBADGE ; 6
+ const BIT_EARTHBADGE ; 7
+NUM_BADGES EQU const_value
+
+; OaksAideScript results
+OAKS_AIDE_BAG_FULL EQU $00
+OAKS_AIDE_GOT_ITEM EQU $01
+OAKS_AIDE_NOT_ENOUGH_MONS EQU $80
+OAKS_AIDE_REFUSED EQU $ff
diff --git a/constants/serial_constants.asm b/constants/serial_constants.asm
new file mode 100644
index 00000000..a6aae315
--- /dev/null
+++ b/constants/serial_constants.asm
@@ -0,0 +1,27 @@
+ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01
+ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK EQU $02
+
+USING_EXTERNAL_CLOCK EQU $01
+USING_INTERNAL_CLOCK EQU $02
+CONNECTION_NOT_ESTABLISHED EQU $ff
+
+; signals the start of an array of bytes transferred over the link cable
+SERIAL_PREAMBLE_BYTE EQU $FD
+
+; this byte is used when there is no data to send
+SERIAL_NO_DATA_BYTE EQU $FE
+
+; signals the end of one part of a patch list (there are two parts) for player/enemy party data
+SERIAL_PATCH_LIST_PART_TERMINATOR EQU $FF
+
+LINK_STATE_NONE EQU $00 ; not using link
+LINK_STATE_IN_CABLE_CLUB EQU $01 ; in a cable club room (Colosseum or Trade Centre)
+LINK_STATE_START_TRADE EQU $02 ; pre-trade selection screen initialisation
+LINK_STATE_START_BATTLE EQU $03 ; pre-battle initialisation
+LINK_STATE_BATTLING EQU $04 ; in a link battle
+LINK_STATE_RESET EQU $05 ; reset game (unused)
+LINK_STATE_TRADING EQU $32 ; in a link trade
+
+LINKBATTLE_RUN EQU $F
+LINKBATTLE_STRUGGLE EQU $E
+LINKBATTLE_NO_ACTION EQU $D
diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm
index 3349e374..da0b3b43 100755
--- a/constants/sprite_constants.asm
+++ b/constants/sprite_constants.asm
@@ -1,113 +1,87 @@
-; pokemon's overworld sprites
-const_value = 0
-
- const SPRITE_MON ; $0
- const SPRITE_BALL_M ; $1
- const SPRITE_HELIX ; $2
- const SPRITE_FAIRY ; $3
- const SPRITE_BIRD_M ; $4
- const SPRITE_WATER ; $5
- const SPRITE_BUG ; $6
- const SPRITE_GRASS ; $7
- const SPRITE_SNAKE ; $8
- const SPRITE_QUADRUPED ; $9
- const SPRITE_PIKACHU_FAMILY ; $A
; overworld sprites
-const_value = 1
-
- const SPRITE_RED ; $01
- const SPRITE_BLUE ; $02
- const SPRITE_OAK ; $03
- const SPRITE_BUG_CATCHER ; $04
- const SPRITE_SLOWBRO ; $05
- const SPRITE_LASS ; $06
- const SPRITE_BLACK_HAIR_BOY_1 ; $07
- const SPRITE_LITTLE_GIRL ; $08
- const SPRITE_BIRD ; $09
- const SPRITE_FAT_BALD_GUY ; $0a
- const SPRITE_GAMBLER ; $0b
- const SPRITE_BLACK_HAIR_BOY_2 ; $0c
- const SPRITE_GIRL ; $0d
- const SPRITE_HIKER ; $0e
- const SPRITE_FOULARD_WOMAN ; $0f
- const SPRITE_GENTLEMAN ; $10
- const SPRITE_DAISY ; $11
- const SPRITE_BIKER ; $12
- const SPRITE_SAILOR ; $13
- const SPRITE_COOK ; $14
- const SPRITE_BIKE_SHOP_GUY ; $15
- const SPRITE_MR_FUJI ; $16
- const SPRITE_GIOVANNI ; $17
- const SPRITE_ROCKET ; $18
- const SPRITE_MEDIUM ; $19
- const SPRITE_WAITER ; $1a
- const SPRITE_ERIKA ; $1b
- const SPRITE_MOM_GEISHA ; $1c
- const SPRITE_BRUNETTE_GIRL ; $1d
- const SPRITE_LANCE ; $1e
- const SPRITE_UNUSED_1 ; $1f
- const SPRITE_OAK_AIDE ; $20
- const SPRITE_ROCKER ; $21
- const SPRITE_SWIMMER ; $22
- const SPRITE_WHITE_PLAYER ; $23
- const SPRITE_GYM_HELPER ; $24
- const SPRITE_OLD_PERSON ; $25
- const SPRITE_MART_GUY ; $26
- const SPRITE_FISHER ; $27
- const SPRITE_OLD_MEDIUM_WOMAN ; $28
- const SPRITE_NURSE ; $29
- const SPRITE_CABLE_CLUB_WOMAN ; $2a
- const SPRITE_MR_MASTERBALL ; $2b
- const SPRITE_LAPRAS_GIVER ; $2c
- const SPRITE_WARDEN ; $2d
- const SPRITE_SS_CAPTAIN ; $2e
- const SPRITE_FISHER2 ; $2f
- const SPRITE_BLACKBELT ; $30
- const SPRITE_GUARD ; $31
- const SPRITE_UNUSED_2 ; $32
- const SPRITE_MOM ; $33
- const SPRITE_BALDING_GUY ; $34
- const SPRITE_YOUNG_BOY ; $35
- const SPRITE_UNUSED_3 ; $36
- const SPRITE_GAMEBOY_KID ; $37
- const SPRITE_CLEFAIRY ; $38
- const SPRITE_AGATHA ; $39
- const SPRITE_BRUNO ; $3a
- const SPRITE_LORELEI ; $3b
- const SPRITE_SEEL ; $3c
- const SPRITE_PIKACHU ; $3d
- const SPRITE_OFFICER_JENNY ; $3e
- const SPRITE_SANDSHREW ; $3f
- const SPRITE_ODDISH ; $40
- const SPRITE_BULBASAUR ; $41
- const SPRITE_JIGGLYPUFF ; $42
- const SPRITE_CLEFAIRY_2 ; $43
- const SPRITE_CHANSEY ; $44
- const SPRITE_JESSIE ; $45
- const SPRITE_JAMES ; $46
-
- ; 4-tile sprites
- const SPRITE_BALL ; $47
- const SPRITE_OMANYTE ; $48
- const SPRITE_BOULDER ; $49
- const SPRITE_PAPER_SHEET ; $4a
- const SPRITE_BOOK_MAP_DEX ; $4b
- const SPRITE_CLIPBOARD ; $4c
- const SPRITE_SNORLAX ; $4d
- const SPRITE_OLD_AMBER_COPY ; $4e
- const SPRITE_OLD_AMBER ; $4f
- const SPRITE_LYING_OLD_MAN_UNUSED_1 ; $50
- const SPRITE_LYING_OLD_MAN_UNUSED_2 ; $51
- const SPRITE_LYING_OLD_MAN ; $52
-
-; different kinds of people events
-ITEM EQU $80
-TRAINER EQU $40
-
-BOULDER_MOVEMENT_BYTE_2 EQU $10
-
-; sprite facing directions
-SPRITE_FACING_DOWN EQU $00
-SPRITE_FACING_UP EQU $04
-SPRITE_FACING_LEFT EQU $08
-SPRITE_FACING_RIGHT EQU $0C
+; SpriteSheetPointerTable indexes (see data/sprites/sprites.asm)
+ const_def
+ const SPRITE_NONE ; $00
+ const SPRITE_RED ; $01
+ const SPRITE_BLUE ; $02
+ const SPRITE_OAK ; $03
+ const SPRITE_YOUNGSTER ; $04
+ const SPRITE_MONSTER ; $05
+ const SPRITE_COOLTRAINER_F ; $06
+ const SPRITE_COOLTRAINER_M ; $07
+ const SPRITE_LITTLE_GIRL ; $08
+ const SPRITE_BIRD ; $09
+ const SPRITE_MIDDLE_AGED_MAN ; $0a
+ const SPRITE_GAMBLER ; $0b
+ const SPRITE_SUPER_NERD ; $0c
+ const SPRITE_GIRL ; $0d
+ const SPRITE_HIKER ; $0e
+ const SPRITE_BEAUTY ; $0f
+ const SPRITE_GENTLEMAN ; $10
+ const SPRITE_DAISY ; $11
+ const SPRITE_BIKER ; $12
+ const SPRITE_SAILOR ; $13
+ const SPRITE_COOK ; $14
+ const SPRITE_BIKE_SHOP_CLERK ; $15
+ const SPRITE_MR_FUJI ; $16
+ const SPRITE_GIOVANNI ; $17
+ const SPRITE_ROCKET ; $18
+ const SPRITE_CHANNELER ; $19
+ const SPRITE_WAITER ; $1a
+ const SPRITE_ERIKA ; $1b
+ const SPRITE_MIDDLE_AGED_WOMAN ; $1c
+ const SPRITE_BRUNETTE_GIRL ; $1d
+ const SPRITE_LANCE ; $1e
+ const SPRITE_UNUSED_SCIENTIST ; $1f
+ const SPRITE_SCIENTIST ; $20
+ const SPRITE_ROCKER ; $21
+ const SPRITE_SWIMMER ; $22
+ const SPRITE_SAFARI_ZONE_WORKER ; $23
+ const SPRITE_GYM_GUIDE ; $24
+ const SPRITE_GRAMPS ; $25
+ const SPRITE_CLERK ; $26
+ const SPRITE_FISHING_GURU ; $27
+ const SPRITE_GRANNY ; $28
+ const SPRITE_NURSE ; $29
+ const SPRITE_LINK_RECEPTIONIST ; $2a
+ const SPRITE_SILPH_PRESIDENT ; $2b
+ const SPRITE_SILPH_WORKER ; $2c
+ const SPRITE_WARDEN ; $2d
+ const SPRITE_CAPTAIN ; $2e
+ const SPRITE_FISHER ; $2f
+ const SPRITE_KOGA ; $30
+ const SPRITE_GUARD ; $31
+ const SPRITE_UNUSED_GUARD ; $32
+ const SPRITE_MOM ; $33
+ const SPRITE_BALDING_GUY ; $34
+ const SPRITE_LITTLE_BOY ; $35
+ const SPRITE_UNUSED_GAMEBOY_KID ; $36
+ const SPRITE_GAMEBOY_KID ; $37
+ const SPRITE_FAIRY ; $38
+ const SPRITE_AGATHA ; $39
+ const SPRITE_BRUNO ; $3a
+ const SPRITE_LORELEI ; $3b
+ const SPRITE_SEEL ; $3c
+ const SPRITE_PIKACHU ; $3d
+ const SPRITE_OFFICER_JENNY ; $3e
+ const SPRITE_SANDSHREW ; $3f
+ const SPRITE_ODDISH ; $40
+ const SPRITE_BULBASAUR ; $41
+ const SPRITE_JIGGLYPUFF ; $42
+ const SPRITE_CLEFAIRY ; $43
+ const SPRITE_CHANSEY ; $44
+ const SPRITE_JESSIE ; $45
+ const SPRITE_JAMES ; $46
+FIRST_STILL_SPRITE EQU const_value
+ const SPRITE_POKE_BALL ; $47
+ const SPRITE_FOSSIL ; $48
+ const SPRITE_BOULDER ; $49
+ const SPRITE_PAPER ; $4a
+ const SPRITE_POKEDEX ; $4b
+ const SPRITE_CLIPBOARD ; $4c
+ const SPRITE_SNORLAX ; $4d
+ const SPRITE_UNUSED_OLD_AMBER ; $4e
+ const SPRITE_OLD_AMBER ; $4f
+ const SPRITE_UNUSED_GAMBLER_ASLEEP_1 ; $50
+ const SPRITE_UNUSED_GAMBLER_ASLEEP_2 ; $51
+ const SPRITE_GAMBLER_ASLEEP ; $52
diff --git a/constants/sprite_data_constants.asm b/constants/sprite_data_constants.asm
new file mode 100644
index 00000000..e1104262
--- /dev/null
+++ b/constants/sprite_data_constants.asm
@@ -0,0 +1,26 @@
+; sprite facing directions
+ const_def 0, $04
+ const SPRITE_FACING_DOWN ; $00
+ const SPRITE_FACING_UP ; $04
+ const SPRITE_FACING_LEFT ; $08
+ const SPRITE_FACING_RIGHT ; $0C
+
+ const_def 0, $40
+ const NPC_MOVEMENT_DOWN ; $00
+ const NPC_MOVEMENT_UP ; $40
+ const NPC_MOVEMENT_LEFT ; $80
+ const NPC_MOVEMENT_RIGHT ; $C0
+
+NPC_CHANGE_FACING EQU $E0
+
+; player direction constants
+ const_def
+ const PLAYER_DIR_BIT_RIGHT ; 0
+ const PLAYER_DIR_BIT_LEFT ; 1
+ const PLAYER_DIR_BIT_DOWN ; 2
+ const PLAYER_DIR_BIT_UP ; 3
+
+PLAYER_DIR_RIGHT EQU 1 << PLAYER_DIR_BIT_RIGHT
+PLAYER_DIR_LEFT EQU 1 << PLAYER_DIR_BIT_LEFT
+PLAYER_DIR_DOWN EQU 1 << PLAYER_DIR_BIT_DOWN
+PLAYER_DIR_UP EQU 1 << PLAYER_DIR_BIT_UP
diff --git a/constants/starter_mons.asm b/constants/starter_mons.asm
deleted file mode 100755
index 16de35d4..00000000
--- a/constants/starter_mons.asm
+++ /dev/null
@@ -1,3 +0,0 @@
-STARTER1 EQU CHARMANDER
-STARTER2 EQU SQUIRTLE
-STARTER3 EQU BULBASAUR
diff --git a/constants/status_constants.asm b/constants/status_constants.asm
deleted file mode 100755
index 25babb82..00000000
--- a/constants/status_constants.asm
+++ /dev/null
@@ -1,32 +0,0 @@
-; non-volatile statuses
-SLP EQU %111 ; sleep counter
-PSN EQU 3
-BRN EQU 4
-FRZ EQU 5
-PAR EQU 6
-
-; volatile statuses 1
-STORING_ENERGY EQU 0 ; Bide
-THRASHING_ABOUT EQU 1 ; e.g. Thrash
-ATTACKING_MULTIPLE_TIMES EQU 2 ; e.g. Double Kick, Fury Attack
-FLINCHED EQU 3
-CHARGING_UP EQU 4 ; e.g. Solar Beam, Fly
-USING_TRAPPING_MOVE EQU 5 ; e.g. Wrap
-INVULNERABLE EQU 6 ; charging up Fly/Dig
-CONFUSED EQU 7
-
-; volatile statuses 2
-USING_X_ACCURACY EQU 0
-PROTECTED_BY_MIST EQU 1
-GETTING_PUMPED EQU 2 ; Focus Energy
-; EQU 3 ; unused
-HAS_SUBSTITUTE_UP EQU 4
-NEEDS_TO_RECHARGE EQU 5 ; Hyper Beam
-USING_RAGE EQU 6
-SEEDED EQU 7
-
-; volatile statuses 3
-BADLY_POISONED EQU 0
-HAS_LIGHT_SCREEN_UP EQU 1
-HAS_REFLECT_UP EQU 2
-TRANSFORMED EQU 3
diff --git a/constants/text_constants.asm b/constants/text_constants.asm
index 4479e90e..6a2ce9f6 100755
--- a/constants/text_constants.asm
+++ b/constants/text_constants.asm
@@ -1,15 +1,22 @@
-; special text IDs
-TEXT_MON_FAINTED EQU $d0
-TEXT_BLACKED_OUT EQU $d1
-TEXT_REPEL_WORE_OFF EQU $d2
-TEXT_SAFARI_GAME_OVER EQU $d3
-TEXT_PIKACHU_ANIM EQU $d4
+NAME_LENGTH EQU 11
+ITEM_NAME_LENGTH EQU 13
; PrintNumber
-BIT_MONEY_SIGN EQU 5
-BIT_LEFT_ALIGN EQU 6
-BIT_LEADING_ZEROES EQU 7
+ const_def 5
+ const BIT_MONEY_SIGN ; 5
+ const BIT_LEFT_ALIGN ; 6
+ const BIT_LEADING_ZEROES ; 7
MONEY_SIGN EQU (1 << BIT_MONEY_SIGN)
LEFT_ALIGN EQU (1 << BIT_LEFT_ALIGN)
LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES)
+
+; special text IDs (see home/text_script.asm)
+ const_def $d0
+ const TEXT_MON_FAINTED ; $d0
+ const TEXT_BLACKED_OUT ; $d1
+ const TEXT_REPEL_WORE_OFF ; $d2
+ const TEXT_SAFARI_GAME_OVER ; $d3
+ const TEXT_PIKACHU_ANIM ; $d4
+
+TEXT_START_MENU EQU $00
diff --git a/constants/tileset_constants.asm b/constants/tileset_constants.asm
new file mode 100644
index 00000000..12b30ffe
--- /dev/null
+++ b/constants/tileset_constants.asm
@@ -0,0 +1,28 @@
+; tileset ids
+; Tilesets indexes (see data/tilesets/tileset_headers.asm)
+ const_def
+ const OVERWORLD ; 0
+ const REDS_HOUSE_1 ; 1
+ const MART ; 2
+ const FOREST ; 3
+ const REDS_HOUSE_2 ; 4
+ const DOJO ; 5
+ const POKECENTER ; 6
+ const GYM ; 7
+ const HOUSE ; 8
+ const FOREST_GATE ; 9
+ const MUSEUM ; 10
+ const UNDERGROUND ; 11
+ const GATE ; 12
+ const SHIP ; 13
+ const SHIP_PORT ; 14
+ const CEMETERY ; 15
+ const INTERIOR ; 16
+ const CAVERN ; 17
+ const LOBBY ; 18
+ const MANSION ; 19
+ const LAB ; 20
+ const CLUB ; 21
+ const FACILITY ; 22
+ const PLATEAU ; 23
+ const BEACH_HOUSE_TILESET ; 24
diff --git a/constants/tilesets.asm b/constants/tilesets.asm
deleted file mode 100644
index aa81f774..00000000
--- a/constants/tilesets.asm
+++ /dev/null
@@ -1,27 +0,0 @@
-const_value = 0
-
- const OVERWORLD ; 0
- const REDS_HOUSE_1 ; 1
- const MART ; 2
- const FOREST ; 3
- const REDS_HOUSE_2 ; 4
- const DOJO ; 5
- const POKECENTER ; 6
- const GYM ; 7
- const HOUSE ; 8
- const FOREST_GATE ; 9
- const MUSEUM ; 10
- const UNDERGROUND ; 11
- const GATE ; 12
- const SHIP ; 13
- const SHIP_PORT ; 14
- const CEMETERY ; 15
- const INTERIOR ; 16
- const CAVERN ; 17
- const LOBBY ; 18
- const MANSION ; 19
- const LAB ; 20
- const CLUB ; 21
- const FACILITY ; 22
- const PLATEAU ; 23
- const BEACH_HOUSE_TILESET ; 24
diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm
index 65b60cc5..6fdc5d4e 100755
--- a/constants/trainer_constants.asm
+++ b/constants/trainer_constants.asm
@@ -1,57 +1,64 @@
OPP_ID_OFFSET EQU 200
trainer_const: MACRO
-\1 EQU const_value
-OPP_\1 EQU const_value + OPP_ID_OFFSET
-const_value = const_value + 1
+ const \1
+OPP_\1 EQU OPP_ID_OFFSET + \1
ENDM
-const_value = 1
-
- trainer_const YOUNGSTER ; $01 | OPP = $C9
- trainer_const BUG_CATCHER ; $02 | OPP = $CA
- trainer_const LASS ; $03 | OPP = $CB
- trainer_const SAILOR ; $04 | OPP = $CC
- trainer_const JR_TRAINER_M ; $05 | OPP = $CD
- trainer_const JR_TRAINER_F ; $06 | OPP = $CE
- trainer_const POKEMANIAC ; $07 | OPP = $CF
- trainer_const SUPER_NERD ; $08 | OPP = $D0
- trainer_const HIKER ; $09 | OPP = $D1
- trainer_const BIKER ; $0A | OPP = $D2
- trainer_const BURGLAR ; $0B | OPP = $D3
- trainer_const ENGINEER ; $0C | OPP = $D4
- trainer_const JUGGLER_X ; $0D | OPP = $D5
- trainer_const FISHER ; $0E | OPP = $D6
- trainer_const SWIMMER ; $0F | OPP = $D7
- trainer_const CUE_BALL ; $10 | OPP = $D8
- trainer_const GAMBLER ; $11 | OPP = $D9
- trainer_const BEAUTY ; $12 | OPP = $DA
- trainer_const PSYCHIC_TR ; $13 | OPP = $DB
- trainer_const ROCKER ; $14 | OPP = $DC
- trainer_const JUGGLER ; $15 | OPP = $DD
- trainer_const TAMER ; $16 | OPP = $DE
- trainer_const BIRD_KEEPER ; $17 | OPP = $DF
- trainer_const BLACKBELT ; $18 | OPP = $E0
- trainer_const SONY1 ; $19 | OPP = $E1
- trainer_const PROF_OAK ; $1A | OPP = $E2
- trainer_const CHIEF ; $1B | OPP = $E3
- trainer_const SCIENTIST ; $1C | OPP = $E4
- trainer_const GIOVANNI ; $1D | OPP = $E5
- trainer_const ROCKET ; $1E | OPP = $E6
- trainer_const COOLTRAINER_M ; $1F | OPP = $E7
- trainer_const COOLTRAINER_F ; $20 | OPP = $E8
- trainer_const BRUNO ; $21 | OPP = $E9
- trainer_const BROCK ; $22 | OPP = $EA
- trainer_const MISTY ; $23 | OPP = $EB
- trainer_const LT_SURGE ; $24 | OPP = $EC
- trainer_const ERIKA ; $25 | OPP = $ED
- trainer_const KOGA ; $26 | OPP = $EE
- trainer_const BLAINE ; $27 | OPP = $EF
- trainer_const SABRINA ; $28 | OPP = $F0
- trainer_const GENTLEMAN ; $29 | OPP = $F1
- trainer_const SONY2 ; $2A | OPP = $F2
- trainer_const SONY3 ; $2B | OPP = $F3
- trainer_const LORELEI ; $2C | OPP = $F4
- trainer_const CHANNELER ; $2D | OPP = $F5
- trainer_const AGATHA ; $2E | OPP = $F6
- trainer_const LANCE ; $2F | OPP = $F7
+; trainer class ids
+; indexes for:
+; - TrainerNames (see data/trainers/names.asm)
+; - TrainerNamePointers (see data/trainers/name_pointers.asm)
+; - TrainerDataPointers (see data/trainers/parties.asm)
+; - TrainerPicAndMoneyPointers (see data/trainers/pic_pointers_money.asm)
+; - TrainerAIPointers (see data/trainers/ai_pointers.asm)
+; - TrainerClassMoveChoiceModifications (see data/trainers/move_choices.asm)
+ const_def
+ trainer_const NOBODY ; $00
+ 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 UNUSED_JUGGLER ; $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 RIVAL1 ; $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 RIVAL2 ; $2A
+ trainer_const RIVAL3 ; $2B
+ trainer_const LORELEI ; $2C
+ trainer_const CHANNELER ; $2D
+ trainer_const AGATHA ; $2E
+ trainer_const LANCE ; $2F
diff --git a/constants/type_constants.asm b/constants/type_constants.asm
index b36dc179..6ae3408d 100755
--- a/constants/type_constants.asm
+++ b/constants/type_constants.asm
@@ -1,16 +1,24 @@
-; Elemental types
-NORMAL EQU $00
-FIGHTING EQU $01
-FLYING EQU $02
-POISON EQU $03
-GROUND EQU $04
-ROCK EQU $05
-BUG EQU $07
-GHOST EQU $08
-FIRE EQU $14
-WATER EQU $15
-GRASS EQU $16
-ELECTRIC EQU $17
-PSYCHIC EQU $18
-ICE EQU $19
-DRAGON EQU $1A
+; TypeNames indexes (see data/types/names.asm)
+ const_def
+
+PHYSICAL EQU const_value
+ const NORMAL ; $00
+ const FIGHTING ; $01
+ const FLYING ; $02
+ const POISON ; $03
+ const GROUND ; $04
+ const ROCK ; $05
+ const BIRD ; $06
+ const BUG ; $07
+ const GHOST ; $08
+
+ const_next 20
+
+SPECIAL EQU const_value
+ const FIRE ; $14
+ const WATER ; $15
+ const GRASS ; $16
+ const ELECTRIC ; $17
+ const PSYCHIC_TYPE ; $18
+ const ICE ; $19
+ const DRAGON ; $1A
diff --git a/data/animations.asm b/data/animations.asm
deleted file mode 100755
index de2487d7..00000000
--- a/data/animations.asm
+++ /dev/null
@@ -1,3623 +0,0 @@
-AttackAnimationPointers:
- dw PoundAnim
- dw KarateChopAnim
- dw DoubleSlapAnim
- dw CometPunchAnim
- dw MegaPunchAnim
- dw PayDayAnim
- dw FirePunchAnim
- dw IcePunchAnim
- dw ThunderPunchAnim
- dw ScratchAnim
- dw VicegripAnim
- dw GuillotineAnim
- dw RazorWindAnim
- dw SwordsDanceAnim
- dw CutAnim
- dw GustAnim
- dw WingAttackAnim
- dw WhirlwindAnim
- dw FlyAnim
- dw BindAnim
- dw SlamAnim
- dw VineWhipAnim
- dw StompAnim
- dw DoubleKickAnim
- dw MegaKickAnim
- dw JumpKickAnim
- dw RollingKickAnim
- dw SandAttackAnim
- dw HeatButtAnim
- dw HornAttackAnim
- dw FuryAttackAnim
- dw HornDrillAnim
- dw TackleAnim
- dw BodySlamAnim
- dw WrapAnim
- dw TakeDownAnim
- dw ThrashAnim
- dw DoubleEdgeAnim
- dw TailWhipAnim
- dw PoisonStingAnim
- dw TwineedleAnim
- dw PinMissileAnim
- dw LeerAnim
- dw BiteAnim
- dw GrowlAnim
- dw RoarAnim
- dw SingAnim
- dw SupersonicAnim
- dw SonicBoomAnim
- dw DisableAnim
- dw AcidAnim
- dw EmberAnim
- dw FlamethrowerAnim
- dw MistAnim
- dw WaterGunAnim
- dw HydroPumpAnim
- dw SurfAnim
- dw IceBeamAnim
- dw BlizzardAnim
- dw PsyBeamAnim
- dw BubbleBeamAnim
- dw AuroraBeamAnim
- dw HyperBeamAnim
- dw PeckAnim
- dw DrillPeckAnim
- dw SubmissionAnim
- dw LowKickAnim
- dw CounterAnim
- dw SeismicTossAnim
- dw StrengthAnim
- dw AbsorbAnim
- dw MegaDrainAnim
- dw LeechSeedAnim
- dw GrowthAnim
- dw RazorLeafAnim
- dw SolarBeamAnim
- dw PoisonPowderAnim
- dw StunSporeAnim
- dw SleepPowderAnim
- dw PedalDanceAnim
- dw StringShotAnim
- dw DragonRageAnim
- dw FireSpinAnim
- dw ThunderShockAnim
- dw ThunderBoltAnim
- dw ThunderWaveAnim
- dw ThunderAnim
- dw RockThrowAnim
- dw EarthquakeAnim
- dw FissureAnim
- dw DigAnim
- dw ToxicAnim
- dw ConfusionAnim
- dw PsychicAnim
- dw HypnosisAnim
- dw MeditateAnim
- dw AgilityAnim
- dw QuickAttackAnim
- dw RageAnim
- dw TeleportAnim
- dw NightShadeAnim
- dw MimicAnim
- dw ScreechAnim
- dw DoubleTeamAnim
- dw RecoverAnim
- dw HardenAnim
- dw MinimizeAnim
- dw SmokeScreenAnim
- dw ConfuseRayAnim
- dw WithdrawAnim
- dw DefenseCurlAnim
- dw BarrierAnim
- dw LightScreenAnim
- dw HazeAnim
- dw ReflectAnim
- dw FocusEnergyAnim
- dw BideAnim
- dw MetronomeAnim
- dw MirrorMoveAnim
- dw SelfdestructAnim
- dw EggBombAnim
- dw LickAnim
- dw SmogAnim
- dw SludgeAnim
- dw BoneClubAnim
- dw FireBlastAnim
- dw WaterfallAnim
- dw ClampAnim
- dw SwiftAnim
- dw SkullBashAnim
- dw SpikeCannonAnim
- dw ConstrictAnim
- dw AmnesiaAnim
- dw KinesisAnim
- dw SoftboiledAnim
- dw HiJumpKickAnim
- dw GlareAnim
- dw DreamEaterAnim
- dw PoisonGasAnim
- dw BarrageAnim
- dw LeechLifeAnim
- dw LovelyKissAnim
- dw SkyAttackAnim
- dw TransformAnim
- dw BubbleAnim
- dw DizzyPunchAnim
- dw SporeAnim
- dw FlashAnim
- dw PsywaveAnim
- dw SplashAnim
- dw AcidArmorAnim
- dw CrabHammerAnim
- dw ExplosionAnim
- dw FurySwipesAnim
- dw BonemerangAnim
- dw RestAnim
- dw RockSlideAnim
- dw HyperFangAnim
- dw SharpenAnim
- dw ConversionAnim
- dw TriAttackAnim
- dw SuperFangAnim
- dw SlashAnim
- dw SubstituteAnim
- dw StruggleAnim
- dw ShowPicAnim
- dw EnemyFlashAnim
- dw PlayerFlashAnim
- dw EnemyHUDShakeAnim
- dw TradeBallDropAnim
- dw TradeBallAppear1Anim
- dw TradeBallAppear2Anim
- dw TradeBallPoofAnim
- dw XStatItemAnim
- dw XStatItemAnim
- dw ShrinkingSquareAnim
- dw ShrinkingSquareAnim
- dw XStatItemBlackAnim
- dw XStatItemBlackAnim
- dw ShrinkingSquareBlackAnim
- dw ShrinkingSquareBlackAnim
- dw UnusedAnim
- dw UnusedAnim
- dw ParalyzeAnim
- dw ParalyzeAnim
- dw PoisonAnim
- dw PoisonAnim
- dw SleepPlayerAnim
- dw SleepEnemyAnim
- dw ConfusedPlayerAnim
- dw ConfusedEnemyAnim
- dw FaintAnim
- dw BallTossAnim
- dw BallShakeAnim
- dw BallPoofAnim
- dw BallBlockAnim
- dw GreatTossAnim
- dw UltraTossAnim
- dw ShakeScreenAnim
- dw HidePicAnim
- dw ThrowRockAnim
- dw ThrowBaitAnim
-
-; each animation is a list of subanimations and special effects
-; if first byte < $56
-; db tileset_and_delay, sound_id, subanimation_id
-; if first byte >= $D8
-; db special_effect_id, sound_id
-; $FF terminated
-PoundAnim:
-StruggleAnim:
- db $08,$00,$01
- db $FF
-
-KarateChopAnim:
- db $08,$01,$03
- db $FF
-
-DoubleSlapAnim:
- db $05,$02,$01
- db $05,$02,$01
- db $FF
-
-CometPunchAnim:
- db $04,$03,$02
- db $04,$03,$02
- db $FF
-
-MegaPunchAnim:
- db $46,$04,$04
- db $FF
-
-PayDayAnim:
- db $08,$00,$01
- db $04,$05,$52
- db $FF
-
-FirePunchAnim:
- db $06,$06,$02
- db $46,$FF,$11
- db $FF
-
-IcePunchAnim:
- db $06,$07,$02
- db $10,$FF,$2F
- db $FF
-
-ThunderPunchAnim:
- db $06,$08,$02
- db SE_DARK_SCREEN_PALETTE, $FF
- db $46,$FF,$2B
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-ScratchAnim:
- db $06,$09,$0F
- db $FF
-
-VicegripAnim:
- db $08,$0A,$2A
- db $FF
-
-GuillotineAnim:
- db $06,$0B,$2A
- db $FF
-
-RazorWindAnim:
- db $04,$0C,$16
- db $FF
-
-SwordsDanceAnim:
- db $46,$0D,$18
- db $46,$0D,$18
- db $46,$0D,$18
- db $FF
-
-CutAnim:
- db SE_DARK_SCREEN_FLASH, $0E
- db $04,$FF,$16
- db $FF
-
-GustAnim:
- db $46,$0F,$10
- db $06,$FF,$02
- db $FF
-
-WingAttackAnim:
- db $46,$10,$04
- db $FF
-
-WhirlwindAnim:
- db $46,$11,$10
- db SE_SLIDE_ENEMY_MON_OFF, $FF
- db $FF
-
-FlyAnim:
- db $46,$12,$04
- db SE_SHOW_MON_PIC, $FF
- db $FF
-
-BindAnim:
- db $04,$13,$23
- db $04,$13,$23
- db $FF
-
-SlamAnim:
- db $06,$14,$02
- db $FF
-
-VineWhipAnim:
- db $01,$15,$16
- db $08,$FF,$01
- db $FF
-
-StompAnim:
- db $48,$16,$05
- db $FF
-
-DoubleKickAnim:
- db $08,$17,$01
- db $08,$17,$01
- db $FF
-
-MegaKickAnim:
- db $46,$18,$04
- db $FF
-
-JumpKickAnim:
- db $46,$19,$04
- db $FF
-
-RollingKickAnim:
- db SE_DARK_SCREEN_FLASH, $1A
- db $46,$FF,$04
- db $FF
-
-SandAttackAnim:
- db $46,$1B,$28
- db $FF
-
-HeatButtAnim:
- db $46,$1C,$05
- db $FF
-
-HornAttackAnim:
- db $06,$1D,$45
- db $46,$FF,$05
- db $FF
-
-FuryAttackAnim:
- db $02,$1E,$46
- db $02,$FF,$46
- db $FF
-
-HornDrillAnim:
- db $42,$1F,$05
- db $42,$FF,$05
- db $42,$FF,$05
- db $42,$FF,$05
- db $42,$FF,$05
- db $FF
-
-TackleAnim:
- db SE_MOVE_MON_HORIZONTALLY, $48
- db SE_RESET_MON_POSITION, $FF
- db $FF
-
-BodySlamAnim:
- db SE_MOVE_MON_HORIZONTALLY, $48
- db SE_DARK_SCREEN_FLASH, $FF
- db SE_DARK_SCREEN_FLASH, $FF
- db SE_RESET_MON_POSITION, $FF
- db $FF
-
-WrapAnim:
- db $04,$22,$23
- db $04,$22,$23
- db $04,$22,$23
- db $FF
-
-TakeDownAnim:
- db SE_MOVE_MON_HORIZONTALLY, $48
- db SE_DARK_SCREEN_FLASH, $23
- db SE_RESET_MON_POSITION, $FF
- db $FF
-
-ThrashAnim:
- db $46,$24,$04
- db $FF
-
-DoubleEdgeAnim:
- db SE_LIGHT_SCREEN_PALETTE, $48
- db $06,$FF,$2D
- db SE_RESET_SCREEN_PALETTE, $FF
- db SE_MOVE_MON_HORIZONTALLY, $FF
- db SE_DARK_SCREEN_FLASH, $25
- db SE_RESET_MON_POSITION, $FF
- db $FF
-
-TailWhipAnim:
- db SE_MOVE_MON_HORIZONTALLY, $84
- db SE_DELAY_ANIMATION_10, $FF
- db SE_RESET_MON_POSITION, $84
- db SE_DELAY_ANIMATION_10, $FF
- db SE_MOVE_MON_HORIZONTALLY, $84
- db SE_DELAY_ANIMATION_10, $FF
- db SE_RESET_MON_POSITION, $84
- db $FF
-
-PoisonStingAnim:
- db $06,$27,$00
- db $FF
-
-TwineedleAnim:
- db $05,$28,$01
- db $05,$28,$01
- db $FF
-
-PinMissileAnim:
- db $03,$29,$01
- db $FF
-
-LeerAnim:
- db SE_DARK_SCREEN_PALETTE, $48
- db SE_DARK_SCREEN_FLASH, $2A
- db SE_DARK_SCREEN_FLASH, $2A
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-BiteAnim:
- db $08,$2B,$02
- db $FF
-
-GrowlAnim:
- db $46,$2C,$12
- db $FF
-
-RoarAnim:
- db $46,$2D,$15
- db $46,$2D,$15
- db $46,$2D,$15
- db $FF
-
-SingAnim:
- db $46,$2E,$12
- db $50,$FF,$40
- db $50,$FF,$40
- db $FF
-
-SupersonicAnim:
- db $06,$2F,$31
- db $FF
-
-SonicBoomAnim:
- db $46,$2D,$15
- db $46,$2D,$15
- db $46,$0F,$10
- db $46,$FF,$05
- db $FF
-
-DisableAnim:
- db SE_DARK_SCREEN_PALETTE, $48
- db SE_DARK_SCREEN_FLASH, $2A
- db SE_DARK_SCREEN_FLASH, $2A
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-AcidAnim:
- db $46,$32,$13
- db $46,$32,$14
- db $FF
-
-EmberAnim:
- db $46,$33,$11
- db $FF
-
-FlamethrowerAnim:
- db $46,$34,$1F
- db $46,$34,$0C
- db $46,$34,$0D
- db $FF
-
-MistAnim:
- db SE_LIGHT_SCREEN_PALETTE, $FF
- db SE_WATER_DROPLETS_EVERYWHERE, $38
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-WaterGunAnim:
- db $06,$36,$2C
- db $FF
-
-HydroPumpAnim:
- db $06,$37,$1A
- db $06,$37,$1A
- db $FF
-
-SurfAnim:
- db SE_WATER_DROPLETS_EVERYWHERE, $38
- db $06,$37,$1A
- db $FF
-
-IceBeamAnim:
- db $03,$39,$2E
- db $10,$FF,$2F
- db $FF
-
-BlizzardAnim:
- db $04,$3A,$38
- db $04,$37,$38
- db $FF
-
-PsyBeamAnim:
- db $03,$3B,$2E
- db SE_FLASH_SCREEN_LONG, $FF
- db $FF
-
-BubbleBeamAnim:
- db $12,$3C,$35
- db $FF
-
-AuroraBeamAnim:
- db $03,$3D,$2E
- db SE_DELAY_ANIMATION_10, $FF
- db SE_DELAY_ANIMATION_10, $FF
- db $FF
-
-HyperBeamAnim:
- db SE_DARK_SCREEN_PALETTE, $48
- db SE_SPIRAL_BALLS_INWARD, $FF
- db $02,$3E,$2E
- db SE_DARK_SCREEN_FLASH, $FF
- db SE_DARK_SCREEN_FLASH, $FF
- db $46,$04,$04
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-PeckAnim:
- db $08,$3F,$01
- db $FF
-
-DrillPeckAnim:
- db $46,$40,$04
- db $FF
-
-SubmissionAnim:
- db SE_SLIDE_MON_OFF, $41
- db $06,$FF,$01
- db SE_SHOW_MON_PIC, $FF
- db $FF
-
-LowKickAnim:
- db SE_SLIDE_MON_OFF, $42
- db $46,$FF,$04
- db SE_SHOW_MON_PIC, $FF
- db $FF
-
-CounterAnim:
- db SE_SLIDE_MON_OFF, $43
- db $46,$FF,$04
- db SE_SHOW_MON_PIC, $FF
- db $FF
-
-SeismicTossAnim:
- db SE_BLINK_ENEMY_MON, $FF
- db $41,$8B,$4E
- db SE_HIDE_ENEMY_MON_PIC, $FF
- db SE_SLIDE_MON_OFF, $FF
- db $42,$44,$4F
- db SE_DELAY_ANIMATION_10, $FF
- db SE_DELAY_ANIMATION_10, $FF
- db SE_SHOW_MON_PIC, $FF
- db $41,$44,$50
- db SE_SHOW_ENEMY_MON_PIC, $FF
- db SE_SHAKE_SCREEN, $FF
- db $FF
-
-StrengthAnim:
- db SE_MOVE_MON_HORIZONTALLY, $48
- db SE_RESET_MON_POSITION, $FF
- db $46,$06,$04
- db $FF
-
-AbsorbAnim:
- db SE_LIGHT_SCREEN_PALETTE, $46
- db $06,$FF,$21
- db $06,$FF,$22
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-MegaDrainAnim:
- db SE_LIGHT_SCREEN_PALETTE, $47
- db SE_DARK_SCREEN_FLASH, $FF
- db $06,$FF,$21
- db $06,$FF,$22
- db SE_DARK_SCREEN_FLASH, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-LeechSeedAnim:
- db $46,$48,$1B
- db $55,$4D,$1C
- db $FF
-
-GrowthAnim:
- db SE_LIGHT_SCREEN_PALETTE, $49
- db SE_SPIRAL_BALLS_INWARD, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-RazorLeafAnim:
- db SE_LEAVES_FALLING, $4A
- db $41,$80,$44
- db $01,$0C,$16
- db $FF
-
-SolarBeamAnim:
- db $06,$4B,$2E
- db $06,$FF,$01
- db $FF
-
-PoisonPowderAnim:
- db $06,$4C,$36
- db $FF
-
-StunSporeAnim:
- db $06,$4D,$36
- db $FF
-
-SleepPowderAnim:
- db $06,$4E,$36
- db $FF
-
-PedalDanceAnim:
- db SE_LIGHT_SCREEN_PALETTE, $4F
- db SE_PETALS_FALLING, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-StringShotAnim:
- db $08,$50,$37
- db $FF
-
-DragonRageAnim:
- db $46,$51,$1F
- db $46,$FF,$0C
- db $46,$FF,$0D
- db $46,$FF,$0E
- db $FF
-
-FireSpinAnim:
- db $46,$52,$0C
- db $46,$FF,$0D
- db $46,$FF,$0E
- db $FF
-
-ThunderShockAnim:
- db $42,$53,$29
- db $FF
-
-ThunderBoltAnim:
- db $41,$54,$29
- db $41,$54,$29
- db $FF
-
-ThunderWaveAnim:
- db $42,$55,$29
- db $02,$FF,$23
- db $04,$FF,$23
- db $FF
-
-ThunderAnim:
- db SE_DARK_SCREEN_PALETTE, $56
- db SE_DARK_SCREEN_FLASH, $FF
- db $46,$FF,$2B
- db SE_DARK_SCREEN_FLASH, $FF
- db $42,$54,$29
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-RockThrowAnim:
- db $04,$57,$30
- db $FF
-
-EarthquakeAnim:
- db SE_SHAKE_SCREEN, $58
- db SE_SHAKE_SCREEN, $58
- db $FF
-
-FissureAnim:
- db SE_DARK_SCREEN_FLASH, $59
- db SE_SHAKE_SCREEN, $FF
- db SE_DARK_SCREEN_FLASH, $59
- db SE_SHAKE_SCREEN, $FF
- db $FF
-
-DigAnim:
- db $46,$5A,$04
- db SE_SLIDE_MON_UP, $FF
- db $FF
-
-ToxicAnim:
- db SE_WATER_DROPLETS_EVERYWHERE, $38
- db $46,$5B,$14
- db $FF
-
-ConfusionAnim:
- db SE_FLASH_SCREEN_LONG, $5C
- db $FF
-
-PsychicAnim:
- db SE_FLASH_SCREEN_LONG, $5D
- db SE_WAVY_SCREEN, $FF
- db $FF
-
-HypnosisAnim:
- db SE_FLASH_SCREEN_LONG, $5E
- db $FF
-
-MeditateAnim:
- db SE_LIGHT_SCREEN_PALETTE, $5F
- db $46,$FF,$43
- db SE_DARK_SCREEN_FLASH, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-AgilityAnim:
- db SE_LIGHT_SCREEN_PALETTE, $60
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-QuickAttackAnim:
- db SE_SLIDE_MON_OFF, $61
- db $46,$FF,$04
- db SE_SHOW_MON_PIC, $FF
- db $FF
-
-RageAnim:
- db $06,$62,$01
- db $FF
-
-TeleportAnim:
- db SE_SQUISH_MON_PIC, $63
- db SE_SHOOT_BALLS_UPWARD, $FF
- db $FF
-
-NightShadeAnim:
- db SE_FLASH_SCREEN_LONG, $5C
- db SE_WAVY_SCREEN, $FF
- db $FF
-
-MimicAnim:
- db $46,$65,$21
- db $46,$65,$22
- db $FF
-
-ScreechAnim:
- db $46,$66,$12
- db $FF
-
-DoubleTeamAnim:
- db SE_DARK_SCREEN_PALETTE, $FF
- db SE_DELAY_ANIMATION_10, $FF
- db SE_DELAY_ANIMATION_10, $FF
- db SE_DARK_SCREEN_FLASH, $FF
- db SE_DARK_SCREEN_FLASH, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db SE_SHAKE_BACK_AND_FORTH, $67
- db SE_SHOW_MON_PIC, $FF
- db $46,$6F,$33
- db $FF
-
-RecoverAnim:
- db SE_BLINK_MON, $68
- db SE_LIGHT_SCREEN_PALETTE, $FF
- db SE_SPIRAL_BALLS_INWARD, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-HardenAnim:
- db SE_LIGHT_SCREEN_PALETTE, $69
- db $46,$FF,$43
- db SE_DARK_SCREEN_FLASH, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-MinimizeAnim:
- db SE_LIGHT_SCREEN_PALETTE, $6A
- db SE_SPIRAL_BALLS_INWARD, $FF
- db SE_MINIMIZE_MON, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-SmokeScreenAnim:
- db $46,$6B,$28
- db $04,$FF,$0A
- db SE_DARKEN_MON_PALETTE, $FF
- db SE_DELAY_ANIMATION_10, $FF
- db SE_DELAY_ANIMATION_10, $FF
- db SE_DARK_SCREEN_PALETTE, $FF
- db SE_DELAY_ANIMATION_10, $FF
- db SE_DELAY_ANIMATION_10, $FF
- db SE_DELAY_ANIMATION_10, $FF
- db SE_DELAY_ANIMATION_10, $FF
- db SE_DELAY_ANIMATION_10, $FF
- db SE_DELAY_ANIMATION_10, $FF
- db SE_DARKEN_MON_PALETTE, $FF
- db SE_DELAY_ANIMATION_10, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-ConfuseRayAnim:
- db SE_DARK_SCREEN_PALETTE, $6C
- db $46,$FF,$3E
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-WithdrawAnim:
- db SE_LIGHT_SCREEN_PALETTE, $6E
- db SE_SLIDE_MON_DOWN, $FF
- db $06,$FF,$51
- db SE_RESET_SCREEN_PALETTE, $FF
- db SE_SHOW_MON_PIC, $FF
- db $FF
-
-DefenseCurlAnim:
- db SE_LIGHT_SCREEN_PALETTE, $6E
- db $06,$FF,$43
- db SE_DARK_SCREEN_FLASH, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-BarrierAnim:
- db $46,$6F,$33
- db $46,$6F,$33
- db $FF
-
-LightScreenAnim:
- db SE_LIGHT_SCREEN_PALETTE, $FF
- db $46,$70,$33
- db $46,$70,$33
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-HazeAnim:
- db SE_DARKEN_MON_PALETTE, $FF
- db SE_WATER_DROPLETS_EVERYWHERE, $38
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-ReflectAnim:
- db SE_DARK_SCREEN_PALETTE, $FF
- db $46,$72,$33
- db $46,$72,$33
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-FocusEnergyAnim:
- db SE_SPIRAL_BALLS_INWARD, $73
- db $FF
-
-BideAnim:
- db $46,$74,$04
- db $FF
-
-MetronomeAnim:
- db SE_MOVE_MON_HORIZONTALLY, $84
- db SE_DELAY_ANIMATION_10, $FF
- db SE_RESET_MON_POSITION, $84
- db SE_DELAY_ANIMATION_10, $FF
- db SE_MOVE_MON_HORIZONTALLY, $84
- db SE_DELAY_ANIMATION_10, $FF
- db SE_RESET_MON_POSITION, $84
- db $FF
-
-MirrorMoveAnim:
- db $08,$76,$01
- db $FF
-
-SelfdestructAnim:
- db $43,$77,$34
- db $FF
-
-EggBombAnim:
- db $44,$78,$41
- db $44,$78,$42
- db $FF
-
-LickAnim:
- db $46,$7B,$14
- db $FF
-
-SmogAnim:
- db SE_DARKEN_MON_PALETTE, $48
- db $46,$7A,$19
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-SludgeAnim:
- db $46,$7B,$13
- db $46,$7B,$14
- db $FF
-
-BoneClubAnim:
- db $08,$7C,$02
- db $FF
-
-FireBlastAnim:
- db $46,$7D,$1F
- db $46,$FF,$20
- db $46,$FF,$20
- db $46,$FF,$0C
- db $46,$FF,$0D
- db $FF
-
-WaterfallAnim:
- db SE_SLIDE_MON_DOWN, $48
- db $06,$37,$1A
- db $08,$FF,$02
- db SE_SLIDE_MON_UP, $FF
- db $FF
-
-ClampAnim:
- db $08,$7F,$2A
- db $06,$83,$23
- db $06,$83,$23
- db $FF
-
-SwiftAnim:
- db $43,$80,$3F
- db $FF
-
-SkullBashAnim:
- db $46,$81,$05
- db $FF
-
-SpikeCannonAnim:
- db $44,$82,$04
- db $FF
-
-ConstrictAnim:
- db $06,$83,$23
- db $06,$83,$23
- db $06,$83,$23
- db $FF
-
-AmnesiaAnim:
- db $08,$84,$25
- db $08,$84,$25
- db $FF
-
-KinesisAnim:
- db $08,$85,$01
- db $FF
-
-SoftboiledAnim:
- db SE_SLIDE_MON_HALF_OFF, $48
- db $08,$86,$4C
- db SE_LIGHT_SCREEN_PALETTE, $FF
- db SE_SPIRAL_BALLS_INWARD, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db SE_SHOW_MON_PIC, $FF
- db $FF
-
-HiJumpKickAnim:
- db $46,$87,$04
- db $FF
-
-GlareAnim:
- db SE_DARK_SCREEN_PALETTE, $48
- db SE_DARK_SCREEN_FLASH, $88
- db SE_DARK_SCREEN_FLASH, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-DreamEaterAnim:
- db SE_FLASH_SCREEN_LONG, $89
- db SE_DARK_SCREEN_PALETTE, $89
- db $08,$89,$02
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-PoisonGasAnim:
- db $46,$8A,$19
- db $FF
-
-BarrageAnim:
- db $43,$8B,$41
- db $05,$FF,$55
- db $FF
-
-LeechLifeAnim:
- db $08,$8C,$02
- db SE_DARK_SCREEN_FLASH, $FF
- db $06,$FF,$21
- db $06,$FF,$22
- db SE_DARK_SCREEN_FLASH, $FF
- db $FF
-
-LovelyKissAnim:
- db $06,$8D,$12
- db $FF
-
-SkyAttackAnim:
- db SE_SQUISH_MON_PIC, $8E
- db SE_SHOOT_BALLS_UPWARD, $FF
- db $46,$87,$04
- db SE_SHOW_MON_PIC, $FF
- db $FF
-
-TransformAnim:
- db $46,$8F,$21
- db $44,$8F,$22
- db $08,$FF,$47
- db SE_TRANSFORM_MON, $FF
- db $FF
-
-BubbleAnim:
- db $16,$90,$35
- db $FF
-
-DizzyPunchAnim:
- db $06,$91,$17
- db $06,$91,$17
- db $06,$91,$17
- db $06,$02,$02
- db $FF
-
-SporeAnim:
- db $06,$92,$36
- db $FF
-
-FlashAnim:
- db SE_LIGHT_SCREEN_PALETTE, $48
- db SE_DARK_SCREEN_FLASH, $88
- db SE_DARK_SCREEN_FLASH, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-PsywaveAnim:
- db $06,$2F,$31
- db SE_WAVY_SCREEN, $5C
- db $FF
-
-SplashAnim:
- db SE_BOUNCE_UP_AND_DOWN, $95
- db $FF
-
-AcidArmorAnim:
- db SE_SLIDE_MON_DOWN_AND_HIDE, $96
- db $FF
-
-CrabHammerAnim:
- db $46,$97,$05
- db $06,$FF,$2A
- db $FF
-
-ExplosionAnim:
- db $43,$98,$34
- db $FF
-
-FurySwipesAnim:
- db $04,$99,$0F
- db $FF
-
-BonemerangAnim:
- db $06,$9A,$02
- db $FF
-
-RestAnim:
- db $10,$9B,$3A
- db $10,$9B,$3A
- db $FF
-
-RockSlideAnim:
- db $04,$9C,$1D
- db $03,$9C,$1E
- db $46,$9D,$04
- db $FF
-
-HyperFangAnim:
- db $06,$9D,$02
- db $FF
-
-SharpenAnim:
- db SE_LIGHT_SCREEN_PALETTE, $9E
- db $46,$FF,$43
- db SE_DARK_SCREEN_FLASH, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-ConversionAnim:
- db SE_DARK_SCREEN_FLASH, $9F
- db $46,$FF,$21
- db $46,$FF,$22
- db SE_DARK_SCREEN_FLASH, $FF
- db $FF
-
-TriAttackAnim:
- db SE_DARK_SCREEN_FLASH, $A0
- db $46,$FF,$4D
- db SE_DARK_SCREEN_FLASH, $FF
- db $FF
-
-SuperFangAnim:
- db SE_DARK_SCREEN_PALETTE, $48
- db $46,$A1,$04
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-SlashAnim:
- db $06,$A2,$0F
- db $FF
-
-SubstituteAnim:
- db SE_SLIDE_MON_OFF, $A3
- db $08,$FF,$47
- db SE_SUBSTITUTE_MON, $FF
- db $FF
-
-BallTossAnim:
- db $03,$FF,$06
- db $FF
-
-GreatTossAnim:
- db $03,$FF,$07
- db $FF
-
-UltraTossAnim:
- db $02,$FF,$08
- db $FF
-
-BallShakeAnim:
- db $04,$FF,$09
- db $FF
-
-BallPoofAnim:
- db $04,$FF,$0A
- db $FF
-
-ShowPicAnim:
- db SE_SHOW_ENEMY_MON_PIC, $FF
- db $FF
-
-HidePicAnim:
- db SE_HIDE_ENEMY_MON_PIC, $FF
- db $FF
-
-EnemyFlashAnim:
- db SE_SHOW_MON_PIC, $FF
- db $FF
-
-PlayerFlashAnim:
- db SE_FLASH_MON_PIC, $FF
- db $FF
-
-EnemyHUDShakeAnim:
- db SE_SHAKE_ENEMY_HUD, $FF
- db $FF
-
-TradeBallDropAnim:
- db $86,$FF,$48
- db $FF
-
-TradeBallAppear1Anim:
- db $84,$FF,$49
- db $FF
-
-TradeBallAppear2Anim:
- db $86,$FF,$4A
- db $FF
-
-TradeBallPoofAnim:
- db $86,$FF,$4B
- db $FF
-
-XStatItemAnim:
- db SE_LIGHT_SCREEN_PALETTE, $FF
- db SE_SPIRAL_BALLS_INWARD, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-ShrinkingSquareAnim:
- db SE_LIGHT_SCREEN_PALETTE, $FF
- db $46,$FF,$43
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-XStatItemBlackAnim:
- db SE_DARKEN_MON_PALETTE, $FF
- db SE_SPIRAL_BALLS_INWARD, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-ShrinkingSquareBlackAnim:
- db SE_DARKEN_MON_PALETTE, $FF
- db $46,$FF,$43
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-UnusedAnim:
- db SE_LIGHT_SCREEN_PALETTE, $FF
- db SE_SHOOT_MANY_BALLS_UPWARD, $FF
- db SE_RESET_SCREEN_PALETTE, $FF
- db $FF
-
-ParalyzeAnim:
- db $04,$13,$24
- db $04,$13,$24
- db $FF
-
-PoisonAnim:
- db $08,$13,$27
- db $08,$13,$27
- db $FF
-
-SleepPlayerAnim:
- db $10,$9B,$3A
- db $10,$9B,$3A
- db $FF
-
-SleepEnemyAnim:
- db $10,$9B,$3B
- db $10,$9B,$3B
- db $FF
-
-ConfusedPlayerAnim:
- db $08,$84,$25
- db $08,$84,$25
- db $FF
-
-ConfusedEnemyAnim:
- db $08,$84,$26
- db $08,$84,$26
- db $FF
-
-BallBlockAnim:
- db $03,$FF,$0B
- db $FF
-
-FaintAnim:
- db SE_SLIDE_MON_DOWN, $5A
- db $FF
-
-ShakeScreenAnim:
- db SE_SHAKE_SCREEN, $FF
- db $FF
-
-ThrowRockAnim:
- db $03,$8B,$53
- db $FF
-
-ThrowBaitAnim:
- db $03,$8B,$54
- db $FF
-
-SubanimationPointers:
- dw Subanimation00
- dw Subanimation01
- dw Subanimation02
- dw Subanimation03
- dw Subanimation04
- dw Subanimation05
- dw Subanimation06
- dw Subanimation07
- dw Subanimation08
- dw Subanimation09
- dw Subanimation0a
- dw Subanimation0b
- dw Subanimation0c
- dw Subanimation0d
- dw Subanimation0e
- dw Subanimation0f
- dw Subanimation10
- dw Subanimation11
- dw Subanimation12
- dw Subanimation13
- dw Subanimation14
- dw Subanimation15
- dw Subanimation16
- dw Subanimation17
- dw Subanimation18
- dw Subanimation19
- dw Subanimation1a
- dw Subanimation1b
- dw Subanimation1c
- dw Subanimation1d
- dw Subanimation1e
- dw Subanimation1f
- dw Subanimation20
- dw Subanimation21
- dw Subanimation22
- dw Subanimation23
- dw Subanimation24
- dw Subanimation25
- dw Subanimation26
- dw Subanimation27
- dw Subanimation28
- dw Subanimation29
- dw Subanimation2a
- dw Subanimation2b
- dw Subanimation2c
- dw Subanimation2d
- dw Subanimation2e
- dw Subanimation2f
- dw Subanimation30
- dw Subanimation31
- dw Subanimation32
- dw Subanimation33
- dw Subanimation34
- dw Subanimation35
- dw Subanimation36
- dw Subanimation37
- dw Subanimation38
- dw Subanimation39
- dw Subanimation3a
- dw Subanimation3b
- dw Subanimation3c
- dw Subanimation3d
- dw Subanimation3e
- dw Subanimation3f
- dw Subanimation40
- dw Subanimation41
- dw Subanimation42
- dw Subanimation43
- dw Subanimation44
- dw Subanimation45
- dw Subanimation46
- dw Subanimation47
- dw Subanimation48
- dw Subanimation49
- dw Subanimation4a
- dw Subanimation4b
- dw Subanimation4c
- dw Subanimation4d
- dw Subanimation4e
- dw Subanimation4f
- dw Subanimation50
- dw Subanimation51
- dw Subanimation52
- dw Subanimation53
- dw Subanimation54
- dw Subanimation55
-
-Subanimation04:
- db $43
- db $02,$1a,$00
- db $02,$10,$00
- db $02,$03,$00
-
-Subanimation05:
- db $41
- db $02,$10,$00
-
-Subanimation08:
- db $0b
- db $03,$30,$00
- db $03,$44,$00
- db $03,$94,$00
- db $03,$60,$00
- db $03,$76,$00
- db $03,$9f,$00
- db $03,$8d,$00
- db $03,$a0,$00
- db $03,$1a,$00
- db $03,$a1,$00
- db $03,$34,$00
-
-Subanimation07:
- db $0b
- db $03,$30,$00
- db $03,$a2,$00
- db $03,$31,$00
- db $03,$a3,$00
- db $03,$32,$00
- db $03,$a4,$00
- db $03,$92,$00
- db $03,$a5,$00
- db $03,$15,$00
- db $03,$a6,$00
- db $03,$34,$00
-
-Subanimation06:
- db $0b
- db $03,$30,$00
- db $03,$a2,$00
- db $03,$93,$00
- db $03,$61,$00
- db $03,$73,$00
- db $03,$a7,$00
- db $03,$33,$00
- db $03,$a8,$00
- db $03,$0e,$00
- db $03,$a9,$00
- db $03,$34,$00
-
-Subanimation09:
- db $04
- db $03,$21,$04
- db $04,$21,$04
- db $03,$21,$04
- db $05,$21,$04
-
-Subanimation0a:
- db $46
- db $06,$1b,$00
- db $07,$1b,$00
- db $08,$36,$00
- db $09,$36,$00
- db $0a,$15,$00
- db $0a,$15,$00
-
-Subanimation0b:
- db $04
- db $01,$2d,$00
- db $03,$2f,$00
- db $03,$35,$00
- db $03,$4d,$00
-
-Subanimation55:
- db $41
- db $01,$9d,$00
-
-Subanimation11:
- db $4c
- db $0b,$26,$00
- db $0c,$26,$00
- db $0b,$26,$00
- db $0c,$26,$00
- db $0b,$28,$00
- db $0c,$28,$00
- db $0b,$28,$00
- db $0c,$28,$00
- db $0b,$27,$00
- db $0c,$27,$00
- db $0b,$27,$00
- db $0c,$27,$00
-
-Subanimation2b:
- db $4b
- db $0d,$03,$03
- db $0e,$03,$03
- db $0f,$03,$00
- db $0d,$11,$00
- db $0d,$11,$00
- db $0d,$37,$00
- db $0d,$37,$00
- db $10,$21,$00
- db $10,$21,$00
- db $11,$1b,$00
- db $11,$1b,$00
-
-Subanimation2c:
- db $4c
- db $12,$01,$00
- db $12,$0f,$00
- db $12,$1b,$00
- db $12,$25,$00
- db $13,$38,$00
- db $13,$38,$02
- db $14,$38,$00
- db $14,$38,$02
- db $15,$38,$00
- db $15,$38,$00
- db $16,$38,$00
- db $16,$38,$00
-
-Subanimation12:
- db $69
- db $17,$30,$00
- db $17,$39,$00
- db $17,$3a,$00
- db $17,$3b,$00
- db $17,$3c,$00
- db $17,$3d,$00
- db $17,$3e,$00
- db $17,$3f,$00
- db $17,$1f,$00
-
-Subanimation00:
- db $41
- db $01,$17,$00
-
-Subanimation01:
- db $42
- db $01,$0f,$00
- db $01,$1d,$00
-
-Subanimation02:
- db $43
- db $01,$12,$00
- db $01,$15,$00
- db $01,$1c,$00
-
-Subanimation03:
- db $44
- db $01,$0b,$00
- db $01,$11,$00
- db $01,$18,$00
- db $01,$1d,$00
-
-Subanimation0c:
- db $43
- db $0c,$20,$00
- db $0c,$21,$00
- db $0c,$23,$00
-
-Subanimation0d:
- db $46
- db $0c,$20,$02
- db $0c,$15,$00
- db $0c,$21,$02
- db $0c,$17,$00
- db $0c,$23,$02
- db $0c,$19,$00
-
-Subanimation0e:
- db $49
- db $0c,$20,$02
- db $0c,$15,$02
- db $0c,$07,$00
- db $0c,$21,$02
- db $0c,$17,$02
- db $0c,$09,$00
- db $0c,$23,$02
- db $0c,$19,$02
- db $0c,$0c,$00
-
-Subanimation1f:
- db $85
- db $0c,$30,$03
- db $0c,$40,$03
- db $0c,$41,$03
- db $0c,$42,$03
- db $0c,$21,$00
-
-Subanimation2e:
- db $2e
- db $18,$43,$02
- db $75,$52,$04
- db $19,$43,$02
- db $75,$63,$04
- db $1a,$43,$02
- db $75,$4d,$04
- db $1b,$43,$02
- db $75,$97,$04
- db $1c,$43,$02
- db $75,$98,$04
- db $1d,$43,$02
- db $75,$58,$04
- db $1e,$43,$02
- db $75,$1b,$00
-
-Subanimation2f:
- db $44
- db $1f,$24,$00
- db $20,$20,$00
- db $21,$1a,$00
- db $22,$15,$00
-
-Subanimation30:
- db $52
- db $23,$00,$02
- db $23,$02,$02
- db $23,$04,$00
- db $23,$07,$02
- db $23,$02,$02
- db $23,$04,$00
- db $23,$0e,$02
- db $23,$02,$02
- db $23,$0c,$00
- db $25,$07,$00
- db $25,$0e,$00
- db $25,$15,$00
- db $24,$24,$02
- db $23,$1c,$02
- db $23,$23,$00
- db $23,$21,$02
- db $24,$28,$00
- db $24,$28,$00
-
-Subanimation0f:
- db $4c
- db $26,$0e,$02
- db $26,$16,$02
- db $26,$1c,$00
- db $27,$0e,$02
- db $27,$16,$02
- db $27,$1c,$00
- db $28,$0e,$02
- db $28,$16,$02
- db $28,$1c,$00
- db $29,$0e,$02
- db $29,$16,$02
- db $29,$1c,$00
-
-Subanimation16:
- db $4c
- db $2a,$05,$00
- db $2b,$05,$02
- db $2b,$0c,$02
- db $2a,$11,$04
- db $2b,$11,$02
- db $2b,$17,$02
- db $2a,$1b,$04
- db $2b,$1b,$02
- db $2b,$20,$02
- db $2a,$2f,$04
- db $2c,$00,$02
- db $2c,$00,$00
-
-Subanimation10:
- db $88
- db $2d,$44,$00
- db $2e,$45,$00
- db $2d,$46,$00
- db $2e,$47,$00
- db $2d,$48,$00
- db $2e,$49,$00
- db $2d,$2f,$00
- db $2e,$1a,$00
-
-Subanimation31:
- db $2a
- db $2f,$46,$00
- db $2f,$4a,$00
- db $2f,$4b,$00
- db $2f,$4c,$00
- db $2f,$4d,$00
- db $2f,$4e,$00
- db $2f,$4f,$00
- db $2f,$50,$00
- db $2f,$2e,$00
- db $2f,$51,$00
-
-Subanimation13:
- db $86
- db $30,$31,$00
- db $30,$32,$00
- db $30,$92,$00
- db $30,$0e,$00
- db $30,$0f,$00
- db $30,$10,$00
-
-Subanimation14:
- db $49
- db $30,$10,$00
- db $30,$10,$03
- db $31,$1c,$04
- db $31,$21,$04
- db $31,$26,$00
- db $30,$10,$02
- db $31,$1d,$04
- db $31,$22,$04
- db $31,$27,$00
-
-Subanimation41:
- db $85
- db $03,$31,$00
- db $03,$32,$00
- db $03,$92,$00
- db $03,$0e,$00
- db $03,$10,$00
-
-Subanimation42:
- db $43
- db $48,$08,$00
- db $49,$08,$00
- db $5a,$08,$00
-
-Subanimation15:
- db $22
- db $35,$52,$00
- db $35,$53,$00
-
-Subanimation17:
- db $44
- db $36,$54,$00
- db $36,$55,$00
- db $37,$56,$00
- db $37,$57,$00
-
-Subanimation18:
- db $a4
- db $36,$54,$00
- db $36,$55,$00
- db $37,$56,$00
- db $37,$57,$00
-
-Subanimation40:
- db $46
- db $17,$54,$00
- db $17,$55,$00
- db $17,$0e,$00
- db $17,$56,$00
- db $17,$57,$00
- db $17,$13,$00
-
-Subanimation19:
- db $8c
- db $38,$31,$00
- db $39,$31,$00
- db $38,$32,$00
- db $39,$32,$00
- db $38,$92,$00
- db $39,$92,$00
- db $38,$0e,$00
- db $39,$0e,$00
- db $38,$0f,$00
- db $39,$0f,$00
- db $38,$10,$00
- db $39,$10,$00
-
-Subanimation1a:
- db $50
- db $3a,$08,$00
- db $3b,$08,$00
- db $3c,$08,$00
- db $3d,$08,$00
- db $3e,$08,$00
- db $3f,$08,$00
- db $3e,$08,$00
- db $3f,$08,$00
- db $3a,$0b,$00
- db $3b,$0b,$00
- db $3c,$0b,$00
- db $3d,$0b,$00
- db $3e,$0b,$00
- db $3f,$0b,$00
- db $3e,$0b,$00
- db $3f,$0b,$00
-
-Subanimation1b:
- db $84
- db $40,$31,$00
- db $40,$32,$00
- db $40,$92,$00
- db $40,$15,$00
-
-Subanimation1c:
- db $43
- db $41,$58,$00
- db $41,$59,$00
- db $41,$21,$00
-
-Subanimation1d:
- db $af
- db $24,$9a,$00
- db $23,$1b,$02
- db $24,$22,$00
- db $23,$16,$02
- db $23,$1d,$02
- db $24,$98,$00
- db $25,$2c,$04
- db $25,$2a,$04
- db $25,$99,$04
- db $25,$62,$04
- db $25,$99,$04
- db $25,$62,$04
- db $25,$99,$04
- db $25,$62,$04
- db $25,$99,$03
-
-Subanimation1e:
- db $01
- db $25,$75,$00
-
-Subanimation20:
- db $42
- db $42,$07,$00
- db $43,$07,$00
-
-Subanimation21:
- db $43
- db $44,$00,$00
- db $45,$08,$00
- db $46,$10,$02
-
-Subanimation22:
- db $8b
- db $47,$10,$00
- db $47,$56,$00
- db $47,$07,$00
- db $47,$aa,$00
- db $47,$ab,$00
- db $47,$ac,$00
- db $47,$ad,$00
- db $47,$ae,$00
- db $47,$af,$00
- db $47,$89,$00
- db $47,$b0,$00
-
-Subanimation2d:
- db $66
- db $44,$64,$00
- db $45,$65,$00
- db $46,$66,$00
- db $47,$66,$00
- db $47,$66,$00
- db $47,$66,$00
-
-Subanimation39:
- db $61
- db $47,$67,$00
-
-Subanimation4e:
- db $41
- db $71,$0f,$03
-
-Subanimation4f:
- db $47
- db $71,$0f,$00
- db $71,$08,$00
- db $71,$01,$00
- db $71,$95,$00
- db $72,$95,$00
- db $73,$95,$00
- db $74,$95,$00
-
-Subanimation50:
- db $48
- db $74,$95,$00
- db $73,$95,$00
- db $72,$95,$00
- db $71,$95,$00
- db $71,$01,$00
- db $71,$08,$00
- db $71,$0f,$00
- db $71,$16,$00
-
-Subanimation29:
- db $5d
- db $48,$0f,$00
- db $4a,$68,$03
- db $4b,$2a,$03
- db $49,$0f,$00
- db $4a,$68,$03
- db $4b,$2a,$00
- db $4c,$6a,$03
- db $4d,$69,$03
- db $49,$6b,$00
- db $4c,$6a,$03
- db $4d,$69,$00
- db $4a,$68,$03
- db $4b,$2a,$03
- db $49,$6c,$00
- db $4a,$68,$03
- db $4b,$2a,$00
- db $4c,$6a,$03
- db $4d,$69,$03
- db $49,$6d,$00
- db $4c,$6a,$03
- db $4d,$2a,$00
- db $4a,$68,$03
- db $4b,$2a,$03
- db $49,$0f,$00
- db $4a,$68,$03
- db $4b,$2a,$00
- db $4c,$6a,$03
- db $4d,$2a,$03
- db $49,$6b,$00
-
-Subanimation2a:
- db $44
- db $4e,$2b,$00
- db $4f,$2b,$00
- db $50,$2b,$00
- db $50,$2b,$00
-
-Subanimation23:
- db $42
- db $51,$2d,$00
- db $51,$6e,$00
-
-Subanimation24:
- db $a2
- db $51,$2d,$00
- db $51,$6e,$00
-
-Subanimation25:
- db $62
- db $52,$71,$00
- db $52,$72,$00
-
-Subanimation26:
- db $02
- db $52,$01,$00
- db $52,$2c,$00
-
-Subanimation3a:
- db $63
- db $53,$71,$00
- db $53,$7f,$00
- db $53,$81,$00
-
-Subanimation3b:
- db $03
- db $53,$01,$00
- db $53,$15,$00
- db $53,$2c,$00
-
-Subanimation27:
- db $a2
- db $54,$01,$00
- db $54,$2c,$00
-
-Subanimation28:
- db $23
- db $55,$73,$03
- db $56,$73,$03
- db $57,$73,$00
-
-Subanimation32:
- db $63
- db $47,$74,$00
- db $47,$43,$00
- db $47,$75,$00
-
-Subanimation33:
- db $26
- db $58,$76,$00
- db $34,$76,$00
- db $58,$76,$00
- db $34,$76,$00
- db $58,$76,$00
- db $34,$76,$00
-
-Subanimation3c:
- db $67
- db $59,$79,$03
- db $59,$7b,$03
- db $59,$77,$03
- db $59,$7a,$03
- db $59,$78,$03
- db $59,$7c,$03
- db $59,$76,$00
-
-Subanimation3d:
- db $08
- db $3a,$4d,$00
- db $3b,$4d,$00
- db $3c,$4d,$00
- db $3d,$4d,$00
- db $3e,$4d,$00
- db $3f,$4d,$00
- db $3e,$4d,$00
- db $3f,$4d,$00
-
-Subanimation34:
- db $35
- db $48,$7d,$00
- db $49,$7d,$00
- db $5a,$7d,$00
- db $48,$30,$00
- db $49,$30,$00
- db $5a,$30,$00
- db $48,$7e,$00
- db $49,$7e,$00
- db $5a,$7e,$00
- db $48,$7f,$00
- db $49,$7f,$00
- db $5a,$7f,$00
- db $48,$80,$00
- db $49,$80,$00
- db $5a,$80,$00
- db $48,$81,$00
- db $49,$81,$00
- db $5a,$81,$00
- db $48,$82,$00
- db $49,$82,$00
- db $5a,$82,$00
-
-Subanimation35:
- db $24
- db $5b,$83,$03
- db $5c,$84,$03
- db $5d,$85,$03
- db $5e,$09,$00
-
-Subanimation36:
- db $48
- db $5f,$2a,$00
- db $5f,$00,$00
- db $60,$2a,$00
- db $60,$00,$00
- db $61,$2a,$00
- db $61,$00,$00
- db $62,$2a,$00
- db $62,$00,$00
-
-Subanimation37:
- db $2a
- db $63,$89,$00
- db $64,$75,$00
- db $63,$76,$00
- db $65,$0d,$00
- db $65,$86,$00
- db $65,$12,$00
- db $65,$87,$00
- db $65,$17,$00
- db $65,$88,$00
- db $65,$1a,$00
-
-Subanimation38:
- db $50
- db $66,$8a,$00
- db $66,$33,$00
- db $66,$2e,$00
- db $67,$24,$03
- db $66,$01,$04
- db $66,$10,$04
- db $66,$1d,$04
- db $67,$28,$03
- db $66,$2a,$04
- db $66,$0e,$04
- db $66,$1b,$04
- db $67,$26,$03
- db $66,$03,$04
- db $66,$12,$04
- db $66,$1e,$04
- db $67,$29,$00
-
-Subanimation3e:
- db $92
- db $02,$31,$00
- db $34,$31,$00
- db $02,$31,$00
- db $02,$32,$00
- db $34,$32,$00
- db $02,$32,$00
- db $02,$92,$00
- db $34,$92,$00
- db $02,$92,$00
- db $02,$0e,$00
- db $34,$0e,$00
- db $02,$0e,$00
- db $02,$0f,$00
- db $34,$0f,$00
- db $02,$0f,$00
- db $02,$10,$00
- db $34,$10,$00
- db $02,$10,$00
-
-Subanimation3f:
- db $72
- db $68,$4b,$00
- db $68,$8c,$00
- db $68,$20,$00
- db $68,$1c,$00
- db $68,$19,$00
- db $68,$14,$00
- db $68,$76,$00
- db $68,$8d,$00
- db $68,$15,$00
- db $68,$10,$00
- db $68,$0c,$00
- db $68,$06,$00
- db $68,$8e,$00
- db $68,$8f,$00
- db $68,$90,$00
- db $68,$26,$00
- db $68,$23,$00
- db $68,$1f,$00
-
-Subanimation44:
- db $2c
- db $69,$4b,$00
- db $69,$8c,$00
- db $69,$20,$00
- db $69,$1c,$00
- db $69,$19,$00
- db $69,$14,$00
- db $69,$76,$00
- db $69,$8d,$00
- db $69,$15,$00
- db $69,$10,$00
- db $69,$0c,$00
- db $69,$06,$00
-
-Subanimation43:
- db $a3
- db $6a,$07,$00
- db $6b,$0f,$00
- db $6c,$17,$00
-
-Subanimation45:
- db $24
- db $6d,$8b,$00
- db $6d,$84,$00
- db $6d,$63,$00
- db $6d,$8c,$00
-
-Subanimation46:
- db $26
- db $6d,$8b,$00
- db $6d,$84,$00
- db $6d,$63,$00
- db $6d,$8c,$00
- db $6d,$0a,$00
- db $6d,$89,$00
-
-Subanimation47:
- db $23
- db $06,$82,$00
- db $07,$82,$00
- db $08,$96,$00
-
-Subanimation48:
- db $06
- db $03,$41,$04
- db $03,$48,$04
- db $04,$48,$04
- db $03,$48,$04
- db $05,$48,$04
- db $03,$48,$03
-
-Subanimation49:
- db $04
- db $04,$48,$04
- db $03,$48,$04
- db $05,$48,$04
- db $03,$48,$03
-
-Subanimation4a:
- db $01
- db $04,$84,$03
-
-Subanimation4b:
- db $03
- db $06,$72,$00
- db $07,$72,$00
- db $08,$72,$00
-
-Subanimation4c:
- db $68
- db $6f,$30,$00
- db $6e,$30,$00
- db $70,$30,$00
- db $6e,$30,$00
- db $6f,$30,$00
- db $6e,$30,$00
- db $70,$30,$00
- db $6e,$30,$00
-
-Subanimation4d:
- db $26
- db $32,$4b,$00
- db $33,$4f,$00
- db $32,$20,$00
- db $33,$16,$00
- db $32,$19,$00
- db $33,$0d,$00
-
-Subanimation51:
- db $a6
- db $76,$1b,$00
- db $34,$1b,$00
- db $76,$1b,$00
- db $34,$1b,$00
- db $76,$1b,$00
- db $34,$1b,$00
-
-Subanimation52:
- db $47
- db $77,$25,$00
- db $77,$9b,$00
- db $77,$1a,$00
- db $77,$9c,$00
- db $77,$2f,$00
- db $77,$50,$00
- db $77,$8c,$00
-
-Subanimation53:
- db $0c
- db $78,$30,$00
- db $78,$a2,$00
- db $78,$93,$00
- db $78,$61,$00
- db $78,$73,$00
- db $78,$a7,$00
- db $78,$33,$00
- db $78,$a8,$00
- db $78,$0e,$00
- db $78,$a9,$00
- db $78,$34,$00
- db $01,$9e,$00
-
-Subanimation54:
- db $0b
- db $79,$30,$00
- db $79,$a2,$00
- db $79,$93,$00
- db $79,$61,$00
- db $79,$73,$00
- db $79,$a7,$00
- db $79,$33,$00
- db $79,$a8,$00
- db $79,$0e,$00
- db $79,$a9,$00
- db $79,$34,$00
-
-FrameBlockPointers:
- dw FrameBlock00
- dw FrameBlock01
- dw FrameBlock02
- dw FrameBlock03
- dw FrameBlock04
- dw FrameBlock05
- dw FrameBlock06
- dw FrameBlock07
- dw FrameBlock08
- dw FrameBlock09
- dw FrameBlock0a
- dw FrameBlock0b
- dw FrameBlock0c
- dw FrameBlock0d
- dw FrameBlock0e
- dw FrameBlock0f
- dw FrameBlock10
- dw FrameBlock11
- dw FrameBlock12
- dw FrameBlock13
- dw FrameBlock14
- dw FrameBlock15
- dw FrameBlock16
- dw FrameBlock17
- dw FrameBlock18
- dw FrameBlock19
- dw FrameBlock1a
- dw FrameBlock1b
- dw FrameBlock1c
- dw FrameBlock1d
- dw FrameBlock1e
- dw FrameBlock1f
- dw FrameBlock20
- dw FrameBlock21
- dw FrameBlock22
- dw FrameBlock23
- dw FrameBlock24
- dw FrameBlock25
- dw FrameBlock26
- dw FrameBlock27
- dw FrameBlock28
- dw FrameBlock29
- dw FrameBlock2a
- dw FrameBlock2b
- dw FrameBlock2c
- dw FrameBlock2d
- dw FrameBlock2e
- dw FrameBlock2f
- dw FrameBlock30
- dw FrameBlock31
- dw FrameBlock32
- dw FrameBlock33
- dw FrameBlock34
- dw FrameBlock35
- dw FrameBlock36
- dw FrameBlock37
- dw FrameBlock38
- dw FrameBlock39
- dw FrameBlock3a
- dw FrameBlock3b
- dw FrameBlock3c
- dw FrameBlock3d
- dw FrameBlock3e
- dw FrameBlock3f
- dw FrameBlock40
- dw FrameBlock41
- dw FrameBlock42
- dw FrameBlock43
- dw FrameBlock44
- dw FrameBlock45
- dw FrameBlock46
- dw FrameBlock47
- dw SmallBlackCircleFrameBlock
- dw LargeBlockCircleFrameBlock
- dw FrameBlock4a
- dw FrameBlock4b
- dw FrameBlock4c
- dw FrameBlock4d
- dw FrameBlock4e
- dw FrameBlock4f
- dw FrameBlock50
- dw FrameBlock51
- dw FrameBlock52
- dw FrameBlock53
- dw FrameBlock54
- dw FrameBlock55
- dw FrameBlock56
- dw FrameBlock57
- dw FrameBlock58
- dw FrameBlock59
- dw FrameBlock5a
- dw FrameBlock5b
- dw FrameBlock5c
- dw FrameBlock5d
- dw FrameBlock5e
- dw FrameBlock5f
- dw FrameBlock60
- dw FrameBlock61
- dw FrameBlock62
- dw FrameBlock63
- dw FrameBlock64
- dw FrameBlock65
- dw FrameBlock66
- dw FrameBlock67
- dw FrameBlock68
- dw FrameBlock69
- dw FrameBlock6a
- dw FrameBlock6b
- dw FrameBlock6c
- dw FrameBlock6d
- dw FrameBlock6e
- dw FrameBlock6f
- dw FrameBlock70
- dw FrameBlock71
- dw FrameBlock72
- dw FrameBlock73
- dw FrameBlock74
- dw FrameBlock75
- dw FrameBlock76
- dw FrameBlock77
- dw FrameBlock78
- dw FrameBlock79
-
-; FrameBlock format is as follows:
-; first byte = number of tiles in FrameBlock
-;
-; Next, each group of 4 bytes describes a tile in the FrameBlock
-; first byte = y offset
-; second byte = x offset
-; third byte = tile id (it's actually tile id - $31)
-; fourth byte = tile properties (xflip/yflip/etc.)
-FrameBlock01:
- db $09
- db $00,$00,$2c,$00
- db $00,$08,$2d,$00
- db $00,$10,$2c,$20
- db $08,$00,$3c,$00
- db $08,$08,$3d,$00
- db $08,$10,$3c,$20
- db $10,$00,$2c,$40
- db $10,$08,$2d,$40
- db $10,$10,$2c,$60
-
-FrameBlock02:
- db $10
- db $00,$00,$20,$00
- db $00,$08,$21,$00
- db $00,$10,$21,$20
- db $00,$18,$20,$20
- db $08,$00,$30,$00
- db $08,$08,$31,$00
- db $08,$10,$31,$20
- db $08,$18,$30,$20
- db $10,$00,$30,$40
- db $10,$08,$31,$40
- db $10,$10,$31,$60
- db $10,$18,$30,$60
- db $18,$00,$20,$40
- db $18,$08,$21,$40
- db $18,$10,$21,$60
- db $18,$18,$20,$60
-
-FrameBlock03:
- db $04
- db $00,$00,$02,$00
- db $00,$08,$02,$20
- db $08,$00,$12,$00
- db $08,$08,$12,$20
-
-FrameBlock04:
- db $04
- db $00,$00,$06,$00
- db $00,$08,$07,$00
- db $08,$00,$16,$00
- db $08,$08,$17,$00
-
-FrameBlock05:
- db $04
- db $00,$00,$07,$20
- db $00,$08,$06,$20
- db $08,$00,$17,$20
- db $08,$08,$16,$20
-
-FrameBlock06:
- db $0c
- db $00,$08,$23,$00
- db $08,$00,$32,$00
- db $08,$08,$33,$00
- db $00,$10,$23,$20
- db $08,$10,$33,$20
- db $08,$18,$32,$20
- db $10,$00,$32,$40
- db $10,$08,$33,$40
- db $18,$08,$23,$40
- db $10,$10,$33,$60
- db $10,$18,$32,$60
- db $18,$10,$23,$60
-
-FrameBlock07:
- db $10
- db $00,$00,$20,$00
- db $00,$08,$21,$00
- db $08,$00,$30,$00
- db $08,$08,$31,$00
- db $00,$10,$21,$20
- db $00,$18,$20,$20
- db $08,$10,$31,$20
- db $08,$18,$30,$20
- db $10,$00,$30,$40
- db $10,$08,$31,$40
- db $18,$00,$20,$40
- db $18,$08,$21,$40
- db $10,$10,$31,$60
- db $10,$18,$30,$60
- db $18,$10,$21,$60
- db $18,$18,$20,$60
-
-FrameBlock08:
- db $10
- db $00,$00,$20,$00
- db $00,$08,$21,$00
- db $08,$00,$30,$00
- db $08,$08,$31,$00
- db $00,$18,$21,$20
- db $00,$20,$20,$20
- db $08,$18,$31,$20
- db $08,$20,$30,$20
- db $18,$00,$30,$40
- db $18,$08,$31,$40
- db $20,$00,$20,$40
- db $20,$08,$21,$40
- db $18,$18,$31,$60
- db $18,$20,$30,$60
- db $20,$18,$21,$60
- db $20,$20,$20,$60
-
-FrameBlock09:
- db $0c
- db $00,$00,$24,$00
- db $00,$08,$25,$00
- db $08,$00,$34,$00
- db $00,$18,$25,$20
- db $00,$20,$24,$20
- db $08,$20,$34,$20
- db $18,$00,$34,$40
- db $20,$00,$24,$40
- db $20,$08,$25,$40
- db $18,$20,$34,$60
- db $20,$18,$25,$60
- db $20,$20,$24,$60
-
-FrameBlock0a:
- db $0c
- db $00,$00,$24,$00
- db $00,$08,$25,$00
- db $08,$00,$34,$00
- db $00,$20,$25,$20
- db $00,$28,$24,$20
- db $08,$28,$34,$20
- db $20,$00,$34,$40
- db $28,$00,$24,$40
- db $28,$08,$25,$40
- db $20,$28,$34,$60
- db $28,$20,$25,$60
- db $28,$28,$24,$60
-
-FrameBlock0b:
- db $04
- db $00,$00,$05,$00
- db $00,$08,$05,$20
- db $08,$00,$15,$00
- db $08,$08,$15,$20
-
-FrameBlock0c:
- db $04
- db $00,$00,$04,$00
- db $00,$08,$04,$20
- db $08,$00,$14,$00
- db $08,$08,$14,$20
-
-FrameBlock0d:
- db $08
- db $00,$00,$0c,$00
- db $00,$08,$0d,$00
- db $08,$00,$1c,$00
- db $08,$08,$1d,$00
- db $10,$00,$1d,$60
- db $10,$08,$1c,$60
- db $18,$00,$0d,$60
- db $18,$08,$0c,$60
-
-FrameBlock0e:
- db $04
- db $20,$00,$0c,$00
- db $20,$08,$0d,$00
- db $28,$00,$1c,$00
- db $28,$08,$1d,$00
-
-FrameBlock0f:
- db $04
- db $30,$00,$1d,$60
- db $30,$08,$1c,$60
- db $38,$00,$0d,$60
- db $38,$08,$0c,$60
-
-FrameBlock10:
- db $08
- db $00,$00,$0e,$00
- db $00,$08,$0f,$00
- db $08,$00,$1e,$00
- db $08,$08,$1f,$00
- db $00,$10,$0f,$20
- db $00,$18,$0e,$20
- db $08,$10,$1f,$20
- db $08,$18,$1e,$20
-
-FrameBlock11:
- db $08
- db $00,$00,$0e,$00
- db $00,$08,$0f,$00
- db $08,$00,$1e,$00
- db $08,$08,$1f,$00
- db $00,$20,$0f,$20
- db $00,$28,$0e,$20
- db $08,$20,$1f,$20
- db $08,$28,$1e,$20
-
-FrameBlock12:
- db $03
- db $00,$00,$37,$00
- db $08,$10,$37,$00
- db $00,$20,$37,$00
-
-FrameBlock13:
- db $04
- db $00,$00,$36,$00
- db $00,$08,$36,$20
- db $08,$00,$36,$40
- db $08,$08,$36,$60
-
-FrameBlock14:
- db $08
- db $00,$10,$28,$00
- db $00,$18,$28,$20
- db $08,$10,$38,$00
- db $08,$18,$38,$20
- db $00,$20,$36,$00
- db $00,$28,$36,$20
- db $08,$20,$36,$40
- db $08,$28,$36,$60
-
-FrameBlock15:
- db $0c
- db $00,$00,$28,$00
- db $00,$08,$28,$20
- db $08,$00,$38,$00
- db $08,$08,$38,$20
- db $00,$10,$29,$00
- db $00,$18,$29,$20
- db $08,$10,$39,$00
- db $08,$18,$39,$20
- db $00,$20,$28,$00
- db $00,$28,$28,$20
- db $08,$20,$38,$00
- db $08,$28,$38,$20
-
-FrameBlock16:
- db $08
- db $00,$00,$29,$00
- db $00,$08,$29,$20
- db $08,$00,$39,$00
- db $08,$08,$39,$20
- db $00,$20,$29,$00
- db $00,$28,$29,$20
- db $08,$20,$39,$00
- db $08,$28,$39,$20
-
-FrameBlock17:
- db $04
- db $00,$00,$08,$00
- db $00,$08,$09,$00
- db $08,$00,$18,$00
- db $08,$08,$19,$00
-
-FrameBlock18:
- db $01
- db $18,$00,$45,$60
-
-FrameBlock19:
- db $02
- db $18,$08,$45,$00
- db $10,$08,$46,$60
-
-FrameBlock1a:
- db $02
- db $10,$10,$45,$60
- db $18,$10,$46,$00
-
-FrameBlock1b:
- db $02
- db $10,$18,$45,$00
- db $08,$18,$46,$60
-
-FrameBlock1c:
- db $02
- db $08,$20,$45,$60
- db $10,$20,$46,$00
-
-FrameBlock1d:
- db $02
- db $08,$28,$45,$00
- db $00,$28,$46,$60
-
-FrameBlock1e:
- db $02
- db $00,$30,$45,$60
- db $08,$30,$46,$00
-
-FrameBlock75:
- db $04
- db $00,$00,$43,$00
- db $00,$08,$43,$20
- db $08,$00,$22,$00
- db $08,$08,$43,$60
-
-FrameBlock1f:
- db $02
- db $00,$00,$03,$00
- db $00,$30,$03,$20
-
-FrameBlock20:
- db $06
- db $00,$00,$03,$00
- db $00,$30,$03,$20
- db $08,$08,$03,$00
- db $08,$28,$03,$20
- db $08,$00,$13,$00
- db $08,$30,$13,$20
-
-FrameBlock21:
- db $0c
- db $00,$00,$03,$00
- db $00,$30,$03,$20
- db $08,$08,$03,$00
- db $08,$28,$03,$20
- db $08,$00,$13,$00
- db $08,$30,$13,$20
- db $10,$10,$03,$00
- db $10,$20,$03,$20
- db $10,$08,$13,$00
- db $10,$28,$13,$20
- db $10,$00,$03,$00
- db $10,$30,$03,$20
-
-FrameBlock22:
- db $13
- db $00,$00,$03,$00
- db $08,$00,$13,$00
- db $10,$00,$03,$00
- db $18,$00,$13,$00
- db $08,$08,$03,$00
- db $10,$08,$13,$00
- db $18,$08,$03,$00
- db $10,$10,$03,$00
- db $18,$10,$13,$00
- db $18,$18,$03,$00
- db $10,$20,$03,$20
- db $18,$20,$13,$20
- db $08,$28,$03,$20
- db $10,$28,$13,$20
- db $18,$28,$03,$20
- db $00,$30,$03,$20
- db $08,$30,$13,$20
- db $10,$30,$03,$20
- db $18,$30,$13,$20
-
-FrameBlock23:
- db $04
- db $00,$00,$0a,$00
- db $00,$08,$0b,$00
- db $08,$00,$1a,$00
- db $08,$08,$1b,$00
-
-FrameBlock24:
- db $02
- db $08,$00,$0a,$00
- db $08,$08,$0b,$00
-
-FrameBlock25:
- db $0c
- db $10,$00,$0a,$00
- db $10,$08,$0b,$00
- db $18,$00,$1a,$00
- db $18,$08,$1b,$00
- db $00,$10,$0a,$00
- db $00,$18,$0b,$00
- db $08,$10,$1a,$00
- db $08,$18,$1b,$00
- db $08,$20,$0a,$00
- db $08,$28,$0b,$00
- db $10,$20,$1a,$00
- db $10,$28,$1b,$00
-
-FrameBlock26:
- db $04
- db $00,$10,$44,$00
- db $00,$18,$44,$20
- db $08,$10,$44,$40
- db $08,$18,$44,$60
-
-FrameBlock27:
- db $05
- db $08,$08,$44,$00
- db $08,$10,$44,$20
- db $10,$08,$44,$40
- db $10,$10,$44,$60
- db $00,$18,$47,$00
-
-FrameBlock28:
- db $06
- db $10,$00,$44,$00
- db $10,$08,$44,$20
- db $18,$00,$44,$40
- db $18,$08,$44,$60
- db $08,$10,$47,$00
- db $02,$16,$47,$00
-
-FrameBlock29:
- db $04
- db $18,$00,$47,$00
- db $12,$06,$47,$00
- db $0c,$0c,$47,$00
- db $06,$12,$47,$00
-
-FrameBlock2a:
- db $04
- db $00,$00,$44,$00
- db $00,$08,$44,$20
- db $08,$00,$44,$40
- db $08,$08,$44,$60
-
-FrameBlock2b:
- db $02
- db $06,$02,$47,$00
- db $00,$08,$47,$00
-
-FrameBlock2c:
- db $01
- db $a0,$00,$4d,$00
-
-FrameBlock2d:
- db $08
- db $00,$00,$26,$00
- db $00,$08,$27,$00
- db $08,$00,$36,$00
- db $08,$08,$37,$00
- db $10,$00,$28,$00
- db $10,$08,$29,$00
- db $18,$00,$38,$00
- db $18,$08,$39,$00
-
-FrameBlock2e:
- db $08
- db $00,$00,$27,$20
- db $00,$08,$26,$20
- db $08,$00,$37,$20
- db $08,$08,$36,$20
- db $10,$00,$29,$20
- db $10,$08,$28,$20
- db $18,$00,$39,$20
- db $18,$08,$38,$20
-
-FrameBlock2f:
- db $04
- db $00,$00,$0c,$00
- db $00,$08,$0d,$00
- db $08,$00,$0c,$40
- db $08,$08,$0d,$40
-
-FrameBlock30:
- db $04
- db $00,$00,$44,$00
- db $00,$08,$44,$20
- db $08,$00,$44,$40
- db $08,$08,$44,$60
-
-FrameBlock31:
- db $01
- db $00,$00,$45,$00
-
-FrameBlock32:
- db $07
- db $00,$00,$4d,$00
- db $00,$08,$2f,$00
- db $00,$10,$4d,$20
- db $08,$00,$4e,$00
- db $08,$08,$07,$00
- db $08,$10,$4e,$20
- db $10,$08,$3f,$00
-
-FrameBlock33:
- db $07
- db $00,$08,$3f,$40
- db $08,$00,$4e,$40
- db $08,$08,$07,$40
- db $08,$10,$4e,$60
- db $10,$00,$4d,$40
- db $10,$08,$2f,$40
- db $10,$10,$4d,$60
-
-FrameBlock34:
- db $01
- db $a0,$00,$00,$10
-
-FrameBlock35:
- db $06
- db $00,$00,$2a,$00
- db $00,$08,$2b,$00
- db $08,$00,$3a,$00
- db $10,$00,$3a,$40
- db $18,$00,$2a,$40
- db $18,$08,$2b,$40
-
-FrameBlock36:
- db $04
- db $00,$00,$00,$00
- db $00,$08,$01,$00
- db $08,$00,$10,$00
- db $08,$08,$11,$00
-
-FrameBlock37:
- db $04
- db $00,$00,$01,$a0
- db $00,$08,$00,$a0
- db $08,$00,$11,$a0
- db $08,$08,$10,$a0
-
-FrameBlock38:
- db $04
- db $00,$00,$0a,$00
- db $00,$08,$0b,$00
- db $08,$00,$1a,$00
- db $08,$08,$1b,$00
-
-FrameBlock39:
- db $04
- db $00,$00,$0b,$20
- db $00,$08,$0a,$20
- db $08,$00,$1b,$20
- db $08,$08,$1a,$20
-
-FrameBlock3a:
- db $04
- db $20,$00,$05,$00
- db $20,$08,$05,$20
- db $28,$00,$15,$00
- db $28,$08,$15,$20
-
-FrameBlock3b:
- db $05
- db $18,$00,$04,$00
- db $18,$08,$04,$20
- db $20,$00,$14,$00
- db $20,$08,$14,$20
- db $28,$04,$41,$00
-
-FrameBlock3c:
- db $06
- db $10,$00,$05,$00
- db $10,$08,$05,$20
- db $18,$00,$15,$00
- db $18,$08,$15,$20
- db $20,$04,$42,$00
- db $28,$04,$42,$00
-
-FrameBlock3d:
- db $07
- db $08,$00,$04,$00
- db $08,$08,$04,$20
- db $10,$00,$14,$00
- db $10,$08,$14,$20
- db $18,$04,$41,$00
- db $20,$04,$41,$00
- db $28,$04,$41,$00
-
-FrameBlock3e:
- db $08
- db $00,$00,$05,$00
- db $00,$08,$05,$20
- db $08,$00,$15,$00
- db $08,$08,$15,$20
- db $10,$04,$42,$00
- db $18,$04,$42,$00
- db $20,$04,$42,$00
- db $28,$04,$42,$00
-
-FrameBlock3f:
- db $08
- db $00,$00,$04,$00
- db $00,$08,$04,$20
- db $08,$00,$14,$00
- db $08,$08,$14,$20
- db $10,$04,$41,$00
- db $18,$04,$41,$00
- db $20,$04,$41,$00
- db $28,$04,$41,$00
-
-FrameBlock40:
- db $03
- db $00,$00,$3d,$00
- db $00,$08,$3d,$00
- db $08,$08,$3d,$00
-
-FrameBlock41:
- db $04
- db $00,$00,$06,$00
- db $00,$08,$06,$20
- db $08,$00,$16,$00
- db $08,$08,$17,$00
-
-FrameBlock42:
- db $0b
- db $00,$10,$42,$00
- db $08,$00,$42,$00
- db $08,$08,$42,$00
- db $08,$10,$42,$00
- db $08,$18,$42,$00
- db $08,$20,$42,$00
- db $10,$10,$42,$00
- db $18,$08,$42,$00
- db $18,$18,$42,$00
- db $20,$00,$42,$00
- db $20,$20,$42,$00
-
-FrameBlock43:
- db $0b
- db $00,$10,$41,$00
- db $08,$00,$41,$00
- db $08,$08,$41,$00
- db $08,$10,$41,$00
- db $08,$18,$41,$00
- db $08,$20,$41,$00
- db $10,$10,$41,$00
- db $18,$08,$41,$00
- db $18,$18,$41,$00
- db $20,$00,$41,$00
- db $20,$20,$41,$00
-
-FrameBlock44:
- db $04
- db $00,$00,$49,$00
- db $00,$28,$49,$00
- db $28,$00,$49,$00
- db $28,$28,$49,$00
-
-FrameBlock45:
- db $04
- db $00,$00,$49,$00
- db $00,$18,$49,$00
- db $18,$00,$49,$00
- db $18,$18,$49,$00
-
-FrameBlock46:
- db $04
- db $00,$00,$49,$00
- db $00,$08,$49,$00
- db $08,$00,$49,$00
- db $08,$08,$49,$00
-
-FrameBlock47:
- db $04
- db $00,$00,$43,$00
- db $00,$08,$43,$20
- db $08,$00,$43,$40
- db $08,$08,$43,$60
-
-SmallBlackCircleFrameBlock:
- db $04
- db $08,$08,$33,$00
- db $08,$10,$33,$20
- db $10,$08,$33,$40
- db $10,$10,$33,$60
-
-LargeBlockCircleFrameBlock:
- db $10
- db $00,$00,$22,$00
- db $00,$08,$23,$00
- db $00,$10,$23,$20
- db $00,$18,$22,$20
- db $08,$00,$32,$00
- db $08,$08,$43,$00
- db $08,$10,$43,$20
- db $08,$18,$32,$20
- db $10,$00,$32,$40
- db $10,$08,$43,$40
- db $10,$10,$43,$60
- db $10,$18,$32,$60
- db $18,$00,$22,$40
- db $18,$08,$23,$40
- db $18,$10,$23,$60
- db $18,$18,$22,$60
-
-FrameBlock71:
- db $10
- db $00,$00,$22,$00
- db $00,$08,$3b,$00
- db $00,$10,$23,$20
- db $00,$18,$22,$20
- db $08,$00,$32,$00
- db $08,$08,$43,$00
- db $08,$10,$43,$20
- db $08,$18,$32,$20
- db $10,$00,$32,$40
- db $10,$08,$43,$40
- db $10,$10,$43,$60
- db $10,$18,$32,$60
- db $18,$00,$22,$40
- db $18,$08,$23,$40
- db $18,$10,$23,$60
- db $18,$18,$22,$60
-
-FrameBlock72:
- db $0c
- db $00,$00,$32,$00
- db $00,$08,$43,$00
- db $00,$10,$43,$20
- db $00,$18,$32,$20
- db $08,$00,$32,$40
- db $08,$08,$43,$40
- db $08,$10,$43,$60
- db $08,$18,$32,$60
- db $10,$00,$22,$40
- db $10,$08,$23,$40
- db $10,$10,$23,$60
- db $10,$18,$22,$60
-
-FrameBlock73:
- db $08
- db $00,$00,$32,$40
- db $00,$08,$43,$40
- db $00,$10,$43,$60
- db $00,$18,$32,$60
- db $08,$00,$22,$40
- db $08,$08,$23,$40
- db $08,$10,$23,$60
- db $08,$18,$22,$60
-
-FrameBlock74:
- db $04
- db $00,$00,$22,$40
- db $00,$08,$23,$40
- db $00,$10,$23,$60
- db $00,$18,$22,$60
-
-FrameBlock4a:
- db $04
- db $08,$18,$4c,$20
- db $20,$08,$4b,$00
- db $30,$20,$4c,$00
- db $18,$30,$4b,$40
-
-FrameBlock4b:
- db $04
- db $00,$18,$4c,$00
- db $20,$00,$4b,$40
- db $38,$20,$4c,$20
- db $18,$38,$4b,$00
-
-FrameBlock4c:
- db $04
- db $10,$08,$4a,$40
- db $30,$10,$4a,$00
- db $28,$30,$4a,$20
- db $08,$28,$4a,$60
-
-FrameBlock4d:
- db $04
- db $08,$00,$4a,$20
- db $38,$08,$4a,$60
- db $30,$38,$4a,$40
- db $00,$30,$4a,$00
-
-FrameBlock4e:
- db $08
- db $00,$30,$44,$00
- db $00,$38,$44,$20
- db $08,$30,$44,$40
- db $08,$38,$44,$60
- db $26,$0a,$44,$00
- db $26,$12,$44,$20
- db $2e,$0a,$44,$40
- db $2e,$12,$44,$60
-
-FrameBlock4f:
- db $0c
- db $0e,$22,$44,$00
- db $0e,$2a,$44,$20
- db $16,$22,$44,$40
- db $16,$2a,$44,$60
- db $06,$32,$47,$00
- db $00,$38,$47,$00
- db $1a,$16,$44,$00
- db $1a,$1e,$44,$20
- db $22,$16,$44,$40
- db $22,$1e,$44,$60
- db $30,$08,$47,$00
- db $2a,$0e,$47,$00
-
-FrameBlock50:
- db $08
- db $06,$32,$47,$00
- db $00,$38,$47,$00
- db $12,$26,$47,$00
- db $0c,$2c,$47,$00
- db $1e,$1a,$47,$00
- db $18,$20,$47,$00
- db $2a,$0e,$47,$00
- db $24,$14,$47,$00
-
-FrameBlock51:
- db $08
- db $00,$00,$35,$20
- db $08,$00,$35,$40
- db $10,$00,$35,$00
- db $18,$00,$35,$60
- db $00,$40,$35,$00
- db $08,$40,$35,$60
- db $10,$40,$35,$20
- db $18,$40,$35,$40
-
-FrameBlock52:
- db $04
- db $00,$00,$2a,$00
- db $00,$08,$2b,$00
- db $08,$00,$3a,$00
- db $08,$08,$3b,$00
-
-FrameBlock53:
- db $03
- db $00,$00,$3f,$00
- db $00,$08,$3f,$00
- db $08,$06,$3f,$00
-
-FrameBlock54:
- db $04
- db $00,$00,$0e,$00
- db $00,$08,$0e,$20
- db $08,$00,$0f,$00
- db $08,$08,$0f,$20
-
-FrameBlock55:
- db $03
- db $10,$00,$2c,$00
- db $10,$08,$3c,$00
- db $10,$10,$2d,$00
-
-FrameBlock56:
- db $06
- db $10,$10,$31,$00
- db $10,$18,$31,$00
- db $08,$10,$2c,$00
- db $08,$18,$3c,$00
- db $08,$20,$2d,$00
- db $10,$20,$2d,$00
-
-FrameBlock57:
- db $09
- db $08,$20,$31,$00
- db $10,$20,$31,$00
- db $08,$28,$31,$00
- db $10,$28,$31,$00
- db $00,$20,$2c,$00
- db $00,$28,$3c,$00
- db $00,$30,$2d,$00
- db $08,$30,$2d,$00
- db $10,$30,$2d,$00
-
-FrameBlock58:
- db $07
- db $00,$00,$46,$00
- db $08,$02,$47,$00
- db $10,$03,$48,$00
- db $18,$04,$48,$00
- db $20,$05,$48,$00
- db $28,$05,$48,$00
- db $30,$05,$48,$00
-
-FrameBlock59:
- db $01
- db $00,$00,$42,$00
-
-FrameBlock5a:
- db $0c
- db $00,$00,$24,$00
- db $00,$08,$25,$00
- db $08,$00,$34,$00
- db $00,$10,$25,$20
- db $00,$18,$24,$20
- db $08,$18,$34,$20
- db $10,$00,$34,$40
- db $18,$00,$24,$40
- db $18,$08,$25,$40
- db $10,$18,$34,$60
- db $18,$10,$25,$60
- db $18,$18,$24,$60
-
-FrameBlock5b:
- db $04
- db $00,$00,$43,$00
- db $00,$08,$43,$20
- db $08,$00,$43,$40
- db $08,$08,$43,$60
-
-FrameBlock5c:
- db $08
- db $00,$00,$49,$00
- db $02,$08,$49,$00
- db $18,$00,$49,$00
- db $10,$10,$49,$00
- db $08,$00,$43,$00
- db $08,$08,$43,$20
- db $10,$00,$43,$40
- db $10,$08,$43,$60
-
-FrameBlock5d:
- db $0b
- db $00,$00,$49,$00
- db $18,$02,$49,$00
- db $14,$10,$49,$00
- db $08,$00,$43,$00
- db $00,$08,$43,$20
- db $10,$00,$43,$40
- db $10,$08,$43,$60
- db $04,$08,$43,$00
- db $04,$10,$43,$20
- db $0c,$08,$43,$40
- db $0c,$10,$43,$60
-
-FrameBlock5e:
- db $0f
- db $00,$08,$49,$00
- db $08,$10,$49,$00
- db $20,$00,$49,$00
- db $08,$00,$43,$00
- db $08,$08,$43,$20
- db $10,$00,$43,$40
- db $10,$08,$43,$60
- db $10,$10,$43,$00
- db $10,$18,$43,$20
- db $18,$10,$43,$40
- db $18,$18,$43,$60
- db $20,$08,$43,$00
- db $20,$10,$43,$20
- db $28,$08,$43,$40
- db $28,$10,$43,$60
-
-FrameBlock5f:
- db $04
- db $00,$00,$49,$00
- db $00,$10,$49,$00
- db $00,$20,$49,$00
- db $00,$30,$49,$00
-
-FrameBlock60:
- db $08
- db $00,$00,$49,$00
- db $00,$10,$49,$00
- db $00,$20,$49,$00
- db $00,$30,$49,$00
- db $08,$08,$49,$00
- db $08,$18,$49,$00
- db $08,$28,$49,$00
- db $08,$38,$49,$00
-
-FrameBlock61:
- db $0c
- db $00,$00,$49,$00
- db $00,$10,$49,$00
- db $00,$20,$49,$00
- db $00,$30,$49,$00
- db $08,$08,$49,$00
- db $08,$18,$49,$00
- db $08,$28,$49,$00
- db $08,$38,$49,$00
- db $10,$00,$49,$00
- db $10,$10,$49,$00
- db $10,$20,$49,$00
- db $10,$30,$49,$00
-
-FrameBlock62:
- db $0f
- db $00,$00,$49,$00
- db $00,$10,$49,$00
- db $00,$20,$49,$00
- db $00,$30,$49,$00
- db $08,$08,$49,$00
- db $08,$18,$49,$00
- db $08,$28,$49,$00
- db $08,$38,$49,$00
- db $10,$00,$49,$00
- db $10,$10,$49,$00
- db $10,$20,$49,$00
- db $10,$30,$49,$00
- db $18,$08,$49,$00
- db $18,$18,$49,$00
- db $18,$28,$49,$00
- db $18,$38,$49,$00 ; unused
-
-FrameBlock63:
- db $06
- db $10,$00,$26,$00
- db $10,$08,$27,$00
- db $08,$10,$26,$00
- db $08,$18,$27,$00
- db $00,$20,$26,$00
- db $00,$28,$27,$00
-
-FrameBlock64:
- db $06
- db $18,$00,$27,$00
- db $10,$08,$26,$00
- db $10,$10,$27,$00
- db $08,$18,$26,$00
- db $08,$20,$27,$00
- db $00,$28,$26,$00
-
-FrameBlock65:
- db $06
- db $00,$00,$1c,$00
- db $00,$08,$1d,$00
- db $10,$00,$1c,$00
- db $10,$08,$1d,$00
- db $20,$00,$1c,$00
- db $20,$08,$1d,$00
-
-FrameBlock66:
- db $02
- db $00,$00,$03,$00
- db $08,$00,$13,$00
-
-FrameBlock67:
- db $01
- db $00,$00,$03,$00
-
-FrameBlock68:
- db $04
- db $00,$00,$03,$00
- db $00,$08,$03,$20
- db $08,$00,$13,$00
- db $08,$08,$13,$20
-
-FrameBlock69:
- db $01
- db $00,$00,$06,$00
-
-FrameBlock6a:
- db $08
- db $00,$00,$2e,$00
- db $00,$30,$2e,$20
- db $30,$00,$2e,$40
- db $30,$30,$2e,$60
- db $00,$18,$2f,$00
- db $30,$18,$2f,$40
- db $18,$00,$3e,$00
- db $18,$30,$3e,$20
-
-FrameBlock6b:
- db $08
- db $00,$00,$2e,$00
- db $00,$20,$2e,$20
- db $20,$00,$2e,$40
- db $20,$20,$2e,$60
- db $00,$10,$2f,$00
- db $20,$10,$2f,$40
- db $10,$00,$3e,$00
- db $10,$20,$3e,$20
-
-FrameBlock6c:
- db $08
- db $00,$00,$2e,$00
- db $00,$10,$2e,$20
- db $10,$00,$2e,$40
- db $10,$10,$2e,$60
- db $00,$08,$2f,$00
- db $10,$08,$2f,$40
- db $08,$00,$3e,$00
- db $08,$10,$3e,$20
-
-FrameBlock6d:
- db $02
- db $00,$00,$1e,$00
- db $00,$08,$1f,$00
-
-FrameBlock6e:
- db $04
- db $00,$00,$48,$00
- db $00,$08,$48,$20
- db $08,$00,$12,$00
- db $08,$08,$12,$20
-
-FrameBlock6f:
- db $04
- db $00,$00,$4a,$00
- db $00,$08,$07,$00
- db $08,$00,$16,$00
- db $08,$08,$17,$00
-
-FrameBlock70:
- db $04
- db $00,$00,$07,$20
- db $00,$08,$4a,$20
- db $08,$00,$17,$20
- db $08,$08,$16,$20
-
-FrameBlock76:
- db $07
- db $00,$10,$2f,$00
- db $01,$08,$2f,$00
- db $01,$18,$2f,$00
- db $02,$00,$2e,$00
- db $02,$20,$2e,$20
- db $0a,$00,$3e,$00
- db $0a,$20,$3e,$20
-
-FrameBlock77:
- db $04
- db $00,$02,$4b,$00
- db $00,$0a,$4c,$00
- db $08,$00,$4c,$60
- db $08,$08,$4b,$60
-
-FrameBlock78:
- db $01
- db $00,$00,$4d,$00
-
-FrameBlock79:
- db $01
- db $00,$00,$4e,$00
-
-FrameBlockBaseCoords:
- db $10,$68
- db $10,$70
- db $10,$78
- db $10,$80
- db $10,$88
- db $10,$90
- db $10,$98
- db $18,$68
- db $18,$70
- db $18,$78
- db $34,$28
- db $18,$80
- db $18,$88
- db $18,$98
- db $20,$68
- db $20,$70
- db $20,$78
- db $20,$80
- db $20,$88
- db $20,$90
- db $20,$98
- db $28,$68
- db $28,$70
- db $28,$78
- db $28,$80
- db $28,$88
- db $30,$68
- db $30,$70
- db $30,$78
- db $30,$80
- db $30,$90
- db $30,$98
- db $38,$68
- db $38,$78
- db $38,$80
- db $38,$88
- db $40,$68
- db $40,$70
- db $40,$78
- db $40,$80
- db $40,$88
- db $40,$98
- db $10,$60
- db $18,$60
- db $20,$60
- db $28,$60
- db $30,$60
- db $40,$60
- db $58,$28
- db $43,$38
- db $33,$48
- db $20,$58
- db $32,$78
- db $58,$58
- db $2C,$6C
- db $34,$80
- db $48,$70
- db $42,$36
- db $38,$44
- db $40,$52
- db $48,$60
- db $3E,$6E
- db $28,$7C
- db $28,$8A
- db $50,$3C
- db $48,$50
- db $40,$64
- db $38,$38
- db $50,$30
- db $50,$38
- db $50,$40
- db $50,$48
- db $50,$50
- db $48,$58
- db $50,$44
- db $48,$48
- db $48,$4C
- db $40,$50
- db $40,$54
- db $38,$58
- db $38,$5C
- db $30,$64
- db $48,$40
- db $48,$39
- db $24,$88
- db $24,$70
- db $1C,$70
- db $1C,$88
- db $34,$68
- db $34,$88
- db $68,$50
- db $60,$50
- db $68,$60
- db $58,$50
- db $60,$60
- db $68,$40
- db $40,$40
- db $38,$40
- db $0B,$60
- db $44,$48
- db $40,$14
- db $48,$1C
- db $50,$24
- db $4C,$24
- db $10,$62
- db $12,$62
- db $12,$60
- db $20,$72
- db $22,$72
- db $22,$70
- db $28,$62
- db $50,$0A
- db $52,$0A
- db $38,$30
- db $40,$48
- db $30,$48
- db $40,$30
- db $30,$40
- db $38,$48
- db $40,$4A
- db $48,$4B
- db $50,$4C
- db $58,$4D
- db $60,$4D
- db $68,$4D
- db $38,$10
- db $50,$10
- db $38,$28
- db $48,$18
- db $40,$20
- db $48,$20
- db $40,$3C
- db $38,$50
- db $28,$64
- db $1C,$90
- db $24,$80
- db $2C,$70
- db $30,$38
- db $10,$50
- db $3C,$40
- db $40,$58
- db $30,$58
- db $58,$48
- db $50,$58
- db $48,$68
- db $40,$18
- db $28,$58
- db $40,$38
- db $48,$38
- db $08,$70
- db $44,$1C
- db $3C,$58
- db $38,$60
- db $08,$60
- db $38,$70
- db $38,$6C
- db $38,$64
- db $1C,$74
- db $2E,$74
- db $34,$50
- db $2F,$60
- db $31,$70
- db $4C,$30
- db $3B,$40
- db $2D,$50
- db $26,$60
- db $2D,$70
- db $28,$50
- db $1E,$60
- db $29,$70
- db $16,$60
- db $14,$58
- db $12,$54
- db $14,$50
- db $18,$4C
- db $1C,$48
- db $48,$28
-
-FrameBlock00:
- db $00,$00
diff --git a/data/baseStats/abra.asm b/data/baseStats/abra.asm
deleted file mode 100644
index c8e240f2..00000000
--- a/data/baseStats/abra.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_ABRA ; pokedex id
-db 25 ; base hp
-db 20 ; base attack
-db 15 ; base defense
-db 90 ; base speed
-db 105 ; base special
-db PSYCHIC ; species type 1
-db PSYCHIC ; species type 2
-db 200 ; catch rate
-db 73 ; base exp yield
-INCBIN "pic/ymon/abra.pic",0,1 ; 55, sprite dimensions
-dw AbraPicFront
-dw AbraPicBack
-; attacks known at lvl 0
-db TELEPORT
-db 0
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10
- tmlearn 17,18,19,20
- tmlearn 29,30,31,32
- tmlearn 33,34,35,40
- tmlearn 44,45,46
- tmlearn 49,50,55
-db 0 ; padding
diff --git a/data/baseStats/aerodactyl.asm b/data/baseStats/aerodactyl.asm
deleted file mode 100644
index 7c9158f8..00000000
--- a/data/baseStats/aerodactyl.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_AERODACTYL ; pokedex id
-db 80 ; base hp
-db 105 ; base attack
-db 65 ; base defense
-db 130 ; base speed
-db 60 ; base special
-db ROCK ; species type 1
-db FLYING ; species type 2
-db 45 ; catch rate
-db 202 ; base exp yield
-INCBIN "pic/ymon/aerodactyl.pic",0,1 ; 77, sprite dimensions
-dw AerodactylPicFront
-dw AerodactylPicBack
-; attacks known at lvl 0
-db WING_ATTACK
-db AGILITY
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 2,4,6
- tmlearn 9,10,15
- tmlearn 20,23
- tmlearn 31,32
- tmlearn 33,34,38,39
- tmlearn 43,44
- tmlearn 50,52
-db 0 ; padding
diff --git a/data/baseStats/alakazam.asm b/data/baseStats/alakazam.asm
deleted file mode 100644
index 5a9bf426..00000000
--- a/data/baseStats/alakazam.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_ALAKAZAM ; pokedex id
-db 55 ; base hp
-db 50 ; base attack
-db 45 ; base defense
-db 120 ; base speed
-db 135 ; base special
-db PSYCHIC ; species type 1
-db PSYCHIC ; species type 2
-db 50 ; catch rate
-db 186 ; base exp yield
-INCBIN "pic/ymon/alakazam.pic",0,1 ; 77, sprite dimensions
-dw AlakazamPicFront
-dw AlakazamPicBack
-; attacks known at lvl 0
-db TELEPORT
-db KINESIS
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,15
- tmlearn 17,18,19,20
- tmlearn 28,29,30,31,32
- tmlearn 33,34,35,40
- tmlearn 44,45,46
- tmlearn 49,50,55
-db 0 ; padding
diff --git a/data/baseStats/arbok.asm b/data/baseStats/arbok.asm
deleted file mode 100644
index 1959af0c..00000000
--- a/data/baseStats/arbok.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_ARBOK ; pokedex id
-db 60 ; base hp
-db 85 ; base attack
-db 69 ; base defense
-db 80 ; base speed
-db 65 ; base special
-db POISON ; species type 1
-db POISON ; species type 2
-db 90 ; catch rate
-db 147 ; base exp yield
-INCBIN "pic/ymon/arbok.pic",0,1 ; 77, sprite dimensions
-dw ArbokPicFront
-dw ArbokPicBack
-; attacks known at lvl 0
-db WRAP
-db LEER
-db POISON_STING
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,15
- tmlearn 20,21
- tmlearn 26,27,28,31,32
- tmlearn 34,40
- tmlearn 44,48
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/arcanine.asm b/data/baseStats/arcanine.asm
deleted file mode 100644
index 68e111a1..00000000
--- a/data/baseStats/arcanine.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_ARCANINE ; pokedex id
-db 90 ; base hp
-db 110 ; base attack
-db 80 ; base defense
-db 95 ; base speed
-db 80 ; base special
-db FIRE ; species type 1
-db FIRE ; species type 2
-db 75 ; catch rate
-db 213 ; base exp yield
-INCBIN "pic/ymon/arcanine.pic",0,1 ; 77, sprite dimensions
-dw ArcaninePicFront
-dw ArcaninePicBack
-; attacks known at lvl 0
-db ROAR
-db EMBER
-db LEER
-db TAKE_DOWN
-db 5 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,15
- tmlearn 20,23
- tmlearn 28,30,31,32
- tmlearn 33,34,38,39,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/articuno.asm b/data/baseStats/articuno.asm
deleted file mode 100644
index 6171d40c..00000000
--- a/data/baseStats/articuno.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_ARTICUNO ; pokedex id
-db 90 ; base hp
-db 85 ; base attack
-db 100 ; base defense
-db 85 ; base speed
-db 125 ; base special
-db ICE ; species type 1
-db FLYING ; species type 2
-db 3 ; catch rate
-db 215 ; base exp yield
-INCBIN "pic/ymon/articuno.pic",0,1 ; 77, sprite dimensions
-dw ArticunoPicFront
-dw ArticunoPicBack
-; attacks known at lvl 0
-db PECK
-db ICE_BEAM
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 2,4,6
- tmlearn 9,10,11,12,13,14,15
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34,39
- tmlearn 43,44
- tmlearn 50,52
-db 0 ; padding
diff --git a/data/baseStats/beedrill.asm b/data/baseStats/beedrill.asm
deleted file mode 100644
index 859d4835..00000000
--- a/data/baseStats/beedrill.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_BEEDRILL ; pokedex id
-db 65 ; base hp
-db 80 ; base attack
-db 40 ; base defense
-db 75 ; base speed
-db 45 ; base special
-db BUG ; species type 1
-db POISON ; species type 2
-db 45 ; catch rate
-db 159 ; base exp yield
-INCBIN "pic/ymon/beedrill.pic",0,1 ; 77, sprite dimensions
-dw BeedrillPicFront
-dw BeedrillPicBack
-; attacks known at lvl 0
-db FURY_ATTACK
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 3,6
- tmlearn 9,10,15
- tmlearn 20,21
- tmlearn 31,32
- tmlearn 33,34,39,40
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/bellsprout.asm b/data/baseStats/bellsprout.asm
deleted file mode 100644
index 2126a422..00000000
--- a/data/baseStats/bellsprout.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_BELLSPROUT ; pokedex id
-db 50 ; base hp
-db 75 ; base attack
-db 35 ; base defense
-db 40 ; base speed
-db 70 ; base special
-db GRASS ; species type 1
-db POISON ; species type 2
-db 255 ; catch rate
-db 84 ; base exp yield
-INCBIN "pic/ymon/bellsprout.pic",0,1 ; 55, sprite dimensions
-dw BellsproutPicFront
-dw BellsproutPicBack
-; attacks known at lvl 0
-db VINE_WHIP
-db GROWTH
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 3,6
- tmlearn 9,10
- tmlearn 20,21,22
- tmlearn 31,32
- tmlearn 33,34
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/blastoise.asm b/data/baseStats/blastoise.asm
deleted file mode 100644
index c6fad5f0..00000000
--- a/data/baseStats/blastoise.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_BLASTOISE ; pokedex id
-db 79 ; base hp
-db 83 ; base attack
-db 100 ; base defense
-db 78 ; base speed
-db 85 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 45 ; catch rate
-db 210 ; base exp yield
-INCBIN "pic/ymon/blastoise.pic",0,1 ; 77, sprite dimensions
-dw BlastoisePicFront
-dw BlastoisePicBack
-; attacks known at lvl 0
-db TACKLE
-db TAIL_WHIP
-db BUBBLE
-db WATER_GUN
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 17,18,19,20
- tmlearn 26,27,28,31,32
- tmlearn 33,34,40
- tmlearn 44
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/bulbasaur.asm b/data/baseStats/bulbasaur.asm
deleted file mode 100644
index 225e8bec..00000000
--- a/data/baseStats/bulbasaur.asm
+++ /dev/null
@@ -1,30 +0,0 @@
-MonBaseStats:
-db DEX_BULBASAUR ; pokedex id
-db 45 ; base hp
-db 49 ; base attack
-db 49 ; base defense
-db 45 ; base speed
-db 65 ; base special
-db GRASS ; species type 1
-db POISON ; species type 2
-db 45 ; catch rate
-db 64 ; base exp yield
-INCBIN "pic/ymon/bulbasaur.pic",0,1 ; 55, sprite dimensions
-dw BulbasaurPicFront
-dw BulbasaurPicBack
-; attacks known at lvl 0
-db TACKLE
-db GROWL
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 3,6,8
- tmlearn 9,10
- tmlearn 20,21,22
- tmlearn 31,32
- tmlearn 33,34
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
-MonBaseStatsEnd:
diff --git a/data/baseStats/butterfree.asm b/data/baseStats/butterfree.asm
deleted file mode 100644
index 4b161422..00000000
--- a/data/baseStats/butterfree.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_BUTTERFREE ; pokedex id
-db 60 ; base hp
-db 45 ; base attack
-db 50 ; base defense
-db 70 ; base speed
-db 80 ; base special
-db BUG ; species type 1
-db FLYING ; species type 2
-db 45 ; catch rate
-db 160 ; base exp yield
-INCBIN "pic/ymon/butterfree.pic",0,1 ; 77, sprite dimensions
-dw ButterfreePicFront
-dw ButterfreePicBack
-; attacks known at lvl 0
-db CONFUSION
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 2,4,6
- tmlearn 9,10,15
- tmlearn 20,21,22
- tmlearn 29,30,31,32
- tmlearn 33,34,39
- tmlearn 44,46
- tmlearn 50,55
-db 0 ; padding
diff --git a/data/baseStats/caterpie.asm b/data/baseStats/caterpie.asm
deleted file mode 100644
index 10615994..00000000
--- a/data/baseStats/caterpie.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_CATERPIE ; pokedex id
-db 45 ; base hp
-db 30 ; base attack
-db 35 ; base defense
-db 45 ; base speed
-db 20 ; base special
-db BUG ; species type 1
-db BUG ; species type 2
-db 255 ; catch rate
-db 53 ; base exp yield
-INCBIN "pic/ymon/caterpie.pic",0,1 ; 55, sprite dimensions
-dw CaterpiePicFront
-dw CaterpiePicBack
-; attacks known at lvl 0
-db TACKLE
-db STRING_SHOT
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
-db 0 ; padding
diff --git a/data/baseStats/chansey.asm b/data/baseStats/chansey.asm
deleted file mode 100644
index 2097ef8c..00000000
--- a/data/baseStats/chansey.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_CHANSEY ; pokedex id
-db 250 ; base hp
-db 5 ; base attack
-db 5 ; base defense
-db 50 ; base speed
-db 105 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 30 ; catch rate
-db 255 ; base exp yield
-INCBIN "pic/ymon/chansey.pic",0,1 ; 66, sprite dimensions
-dw ChanseyPicFront
-dw ChanseyPicBack
-; attacks known at lvl 0
-db POUND
-db TAIL_WHIP
-db 0
-db 0
-db 4 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 17,18,19,20,22,24
- tmlearn 25,29,30,31,32
- tmlearn 33,34,35,37,38,40
- tmlearn 41,44,45,46
- tmlearn 49,50,54,55
-db 0 ; padding
diff --git a/data/baseStats/charizard.asm b/data/baseStats/charizard.asm
deleted file mode 100644
index c123bd18..00000000
--- a/data/baseStats/charizard.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_CHARIZARD ; pokedex id
-db 78 ; base hp
-db 84 ; base attack
-db 78 ; base defense
-db 100 ; base speed
-db 85 ; base special
-db FIRE ; species type 1
-db FLYING ; species type 2
-db 45 ; catch rate
-db 209 ; base exp yield
-INCBIN "pic/ymon/charizard.pic",0,1 ; 77, sprite dimensions
-dw CharizardPicFront
-dw CharizardPicBack
-; attacks known at lvl 0
-db SCRATCH
-db GROWL
-db EMBER
-db LEER
-db 3 ; growth rate
-; learnset
- tmlearn 1,3,5,6,8
- tmlearn 9,10,15
- tmlearn 17,18,19,20,23
- tmlearn 26,27,28,31,32
- tmlearn 33,34,38,39,40
- tmlearn 44
- tmlearn 50,51,52,54
-db 0 ; padding
diff --git a/data/baseStats/charmander.asm b/data/baseStats/charmander.asm
deleted file mode 100644
index 2e0189f2..00000000
--- a/data/baseStats/charmander.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_CHARMANDER ; pokedex id
-db 39 ; base hp
-db 52 ; base attack
-db 43 ; base defense
-db 65 ; base speed
-db 50 ; base special
-db FIRE ; species type 1
-db FIRE ; species type 2
-db 45 ; catch rate
-db 65 ; base exp yield
-INCBIN "pic/ymon/charmander.pic",0,1 ; 55, sprite dimensions
-dw CharmanderPicFront
-dw CharmanderPicBack
-; attacks known at lvl 0
-db SCRATCH
-db GROWL
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,3,5,6,8
- tmlearn 9,10
- tmlearn 17,18,19,20,23
- tmlearn 28,31,32
- tmlearn 33,34,38,39,40
- tmlearn 44
- tmlearn 50,51,54
-db 0 ; padding
diff --git a/data/baseStats/charmeleon.asm b/data/baseStats/charmeleon.asm
deleted file mode 100644
index 419fc4b8..00000000
--- a/data/baseStats/charmeleon.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_CHARMELEON ; pokedex id
-db 58 ; base hp
-db 64 ; base attack
-db 58 ; base defense
-db 80 ; base speed
-db 65 ; base special
-db FIRE ; species type 1
-db FIRE ; species type 2
-db 45 ; catch rate
-db 142 ; base exp yield
-INCBIN "pic/ymon/charmeleon.pic",0,1 ; 66, sprite dimensions
-dw CharmeleonPicFront
-dw CharmeleonPicBack
-; attacks known at lvl 0
-db SCRATCH
-db GROWL
-db EMBER
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,3,5,6,8
- tmlearn 9,10
- tmlearn 17,18,19,20,23
- tmlearn 28,31,32
- tmlearn 33,34,38,39,40
- tmlearn 44
- tmlearn 50,51,54
-db 0 ; padding
diff --git a/data/baseStats/clefable.asm b/data/baseStats/clefable.asm
deleted file mode 100644
index 473564b3..00000000
--- a/data/baseStats/clefable.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_CLEFABLE ; pokedex id
-db 95 ; base hp
-db 70 ; base attack
-db 73 ; base defense
-db 60 ; base speed
-db 85 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 25 ; catch rate
-db 129 ; base exp yield
-INCBIN "pic/ymon/clefable.pic",0,1 ; 66, sprite dimensions
-dw ClefablePicFront
-dw ClefablePicBack
-; attacks known at lvl 0
-db SING
-db DOUBLESLAP
-db MINIMIZE
-db METRONOME
-db 4 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 17,18,19,20,22,24
- tmlearn 25,29,30,31,32
- tmlearn 33,34,35,38,40
- tmlearn 44,45,46
- tmlearn 49,50,54,55
-db 0 ; padding
diff --git a/data/baseStats/clefairy.asm b/data/baseStats/clefairy.asm
deleted file mode 100644
index c24f0c73..00000000
--- a/data/baseStats/clefairy.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_CLEFAIRY ; pokedex id
-db 70 ; base hp
-db 45 ; base attack
-db 48 ; base defense
-db 35 ; base speed
-db 60 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 150 ; catch rate
-db 68 ; base exp yield
-INCBIN "pic/ymon/clefairy.pic",0,1 ; 55, sprite dimensions
-dw ClefairyPicFront
-dw ClefairyPicBack
-; attacks known at lvl 0
-db POUND
-db GROWL
-db 0
-db 0
-db 4 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14
- tmlearn 17,18,19,20,22,24
- tmlearn 25,29,30,31,32
- tmlearn 33,34,35,38,40
- tmlearn 44,45,46
- tmlearn 49,50,54,55
-db 0 ; padding
diff --git a/data/baseStats/cloyster.asm b/data/baseStats/cloyster.asm
deleted file mode 100644
index 4b174241..00000000
--- a/data/baseStats/cloyster.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_CLOYSTER ; pokedex id
-db 50 ; base hp
-db 95 ; base attack
-db 180 ; base defense
-db 70 ; base speed
-db 85 ; base special
-db WATER ; species type 1
-db ICE ; species type 2
-db 60 ; catch rate
-db 203 ; base exp yield
-INCBIN "pic/ymon/cloyster.pic",0,1 ; 77, sprite dimensions
-dw CloysterPicFront
-dw CloysterPicBack
-; attacks known at lvl 0
-db WITHDRAW
-db SUPERSONIC
-db CLAMP
-db AURORA_BEAM
-db 5 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9,10,11,12,13,14,15
- tmlearn 20
- tmlearn 30,31,32
- tmlearn 33,34,36,39
- tmlearn 44,47
- tmlearn 49,50,53
-db 0 ; padding
diff --git a/data/baseStats/cubone.asm b/data/baseStats/cubone.asm
deleted file mode 100644
index 598531d5..00000000
--- a/data/baseStats/cubone.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_CUBONE ; pokedex id
-db 50 ; base hp
-db 50 ; base attack
-db 95 ; base defense
-db 35 ; base speed
-db 40 ; base special
-db GROUND ; species type 1
-db GROUND ; species type 2
-db 190 ; catch rate
-db 87 ; base exp yield
-INCBIN "pic/ymon/cubone.pic",0,1 ; 55, sprite dimensions
-dw CubonePicFront
-dw CubonePicBack
-; attacks known at lvl 0
-db GROWL
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14
- tmlearn 17,18,19,20
- tmlearn 26,27,28,31,32
- tmlearn 34,38,40
- tmlearn 44
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/dewgong.asm b/data/baseStats/dewgong.asm
deleted file mode 100644
index cdeb45a7..00000000
--- a/data/baseStats/dewgong.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_DEWGONG ; pokedex id
-db 90 ; base hp
-db 70 ; base attack
-db 80 ; base defense
-db 70 ; base speed
-db 95 ; base special
-db WATER ; species type 1
-db ICE ; species type 2
-db 75 ; catch rate
-db 176 ; base exp yield
-INCBIN "pic/ymon/dewgong.pic",0,1 ; 66, sprite dimensions
-dw DewgongPicFront
-dw DewgongPicBack
-; attacks known at lvl 0
-db HEADBUTT
-db GROWL
-db AURORA_BEAM
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,7,8
- tmlearn 9,10,11,12,13,14,15,16
- tmlearn 20
- tmlearn 31,32
- tmlearn 34,40
- tmlearn 44
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/diglett.asm b/data/baseStats/diglett.asm
deleted file mode 100644
index 91fdc415..00000000
--- a/data/baseStats/diglett.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_DIGLETT ; pokedex id
-db 10 ; base hp
-db 55 ; base attack
-db 25 ; base defense
-db 95 ; base speed
-db 45 ; base special
-db GROUND ; species type 1
-db GROUND ; species type 2
-db 255 ; catch rate
-db 81 ; base exp yield
-INCBIN "pic/ymon/diglett.pic",0,1 ; 55, sprite dimensions
-dw DiglettPicFront
-dw DiglettPicBack
-; attacks known at lvl 0
-db SCRATCH
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10
- tmlearn 20
- tmlearn 26,27,28,31,32
- tmlearn 34
- tmlearn 44,48
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/ditto.asm b/data/baseStats/ditto.asm
deleted file mode 100644
index 456639c7..00000000
--- a/data/baseStats/ditto.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_DITTO ; pokedex id
-db 48 ; base hp
-db 48 ; base attack
-db 48 ; base defense
-db 48 ; base speed
-db 48 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 35 ; catch rate
-db 61 ; base exp yield
-INCBIN "pic/ymon/ditto.pic",0,1 ; 55, sprite dimensions
-dw DittoPicFront
-dw DittoPicBack
-; attacks known at lvl 0
-db TRANSFORM
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
-db 0 ; padding
diff --git a/data/baseStats/dodrio.asm b/data/baseStats/dodrio.asm
deleted file mode 100644
index dfae1713..00000000
--- a/data/baseStats/dodrio.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_DODRIO ; pokedex id
-db 60 ; base hp
-db 110 ; base attack
-db 70 ; base defense
-db 100 ; base speed
-db 60 ; base special
-db NORMAL ; species type 1
-db FLYING ; species type 2
-db 45 ; catch rate
-db 158 ; base exp yield
-INCBIN "pic/ymon/dodrio.pic",0,1 ; 77, sprite dimensions
-dw DodrioPicFront
-dw DodrioPicBack
-; attacks known at lvl 0
-db PECK
-db GROWL
-db FURY_ATTACK
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 4,6,8
- tmlearn 9,10,15
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34,40
- tmlearn 43,44
- tmlearn 49,50,52
-db 0 ; padding
diff --git a/data/baseStats/doduo.asm b/data/baseStats/doduo.asm
deleted file mode 100644
index 5571d09e..00000000
--- a/data/baseStats/doduo.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_DODUO ; pokedex id
-db 35 ; base hp
-db 85 ; base attack
-db 45 ; base defense
-db 75 ; base speed
-db 35 ; base special
-db NORMAL ; species type 1
-db FLYING ; species type 2
-db 190 ; catch rate
-db 96 ; base exp yield
-INCBIN "pic/ymon/doduo.pic",0,1 ; 55, sprite dimensions
-dw DoduoPicFront
-dw DoduoPicBack
-; attacks known at lvl 0
-db PECK
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 4,6,8
- tmlearn 9,10
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34,40
- tmlearn 43,44
- tmlearn 49,50,52
-db 0 ; padding
diff --git a/data/baseStats/dragonair.asm b/data/baseStats/dragonair.asm
deleted file mode 100644
index 6ec0031b..00000000
--- a/data/baseStats/dragonair.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_DRAGONAIR ; pokedex id
-db 61 ; base hp
-db 84 ; base attack
-db 65 ; base defense
-db 70 ; base speed
-db 70 ; base special
-db DRAGON ; species type 1
-db DRAGON ; species type 2
-db 27 ; catch rate
-db 144 ; base exp yield
-INCBIN "pic/ymon/dragonair.pic",0,1 ; 66, sprite dimensions
-dw DragonairPicFront
-dw DragonairPicBack
-; attacks known at lvl 0
-db WRAP
-db LEER
-db THUNDER_WAVE
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 6,7,8
- tmlearn 9,10,11,12,13,14
- tmlearn 20,23,24
- tmlearn 25,31,32
- tmlearn 33,34,38,39,40
- tmlearn 44,45
- tmlearn 50,53
-db 0 ; padding
diff --git a/data/baseStats/dragonite.asm b/data/baseStats/dragonite.asm
deleted file mode 100644
index 02ac0c9b..00000000
--- a/data/baseStats/dragonite.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_DRAGONITE ; pokedex id
-db 91 ; base hp
-db 134 ; base attack
-db 95 ; base defense
-db 80 ; base speed
-db 100 ; base special
-db DRAGON ; species type 1
-db FLYING ; species type 2
-db 9 ; catch rate
-db 218 ; base exp yield
-INCBIN "pic/ymon/dragonite.pic",0,1 ; 77, sprite dimensions
-dw DragonitePicFront
-dw DragonitePicBack
-; attacks known at lvl 0
-db WRAP
-db LEER
-db THUNDER_WAVE
-db AGILITY
-db 5 ; growth rate
-; learnset
- tmlearn 2,6,7,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 20,23,24
- tmlearn 25,31,32
- tmlearn 33,34,38,39,40
- tmlearn 44,45
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/dratini.asm b/data/baseStats/dratini.asm
deleted file mode 100644
index c3c659a4..00000000
--- a/data/baseStats/dratini.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_DRATINI ; pokedex id
-db 41 ; base hp
-db 64 ; base attack
-db 45 ; base defense
-db 50 ; base speed
-db 50 ; base special
-db DRAGON ; species type 1
-db DRAGON ; species type 2
-db 45 ; catch rate
-db 67 ; base exp yield
-INCBIN "pic/ymon/dratini.pic",0,1 ; 55, sprite dimensions
-dw DratiniPicFront
-dw DratiniPicBack
-; attacks known at lvl 0
-db WRAP
-db LEER
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,11,12,13,14
- tmlearn 20,23,24
- tmlearn 25,31,32
- tmlearn 33,34,38,39,40
- tmlearn 44,45
- tmlearn 50,53
-db 0 ; padding
diff --git a/data/baseStats/drowzee.asm b/data/baseStats/drowzee.asm
deleted file mode 100644
index 132c1b5c..00000000
--- a/data/baseStats/drowzee.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_DROWZEE ; pokedex id
-db 60 ; base hp
-db 48 ; base attack
-db 45 ; base defense
-db 42 ; base speed
-db 90 ; base special
-db PSYCHIC ; species type 1
-db PSYCHIC ; species type 2
-db 190 ; catch rate
-db 102 ; base exp yield
-INCBIN "pic/ymon/drowzee.pic",0,1 ; 66, sprite dimensions
-dw DrowzeePicFront
-dw DrowzeePicBack
-; attacks known at lvl 0
-db POUND
-db HYPNOSIS
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10
- tmlearn 17,18,19,20
- tmlearn 29,30,31,32
- tmlearn 33,34,35,40
- tmlearn 42,44,45,46
- tmlearn 49,50,55
-db 0 ; padding
diff --git a/data/baseStats/dugtrio.asm b/data/baseStats/dugtrio.asm
deleted file mode 100644
index 07f551a5..00000000
--- a/data/baseStats/dugtrio.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_DUGTRIO ; pokedex id
-db 35 ; base hp
-db 80 ; base attack
-db 50 ; base defense
-db 120 ; base speed
-db 70 ; base special
-db GROUND ; species type 1
-db GROUND ; species type 2
-db 50 ; catch rate
-db 153 ; base exp yield
-INCBIN "pic/ymon/dugtrio.pic",0,1 ; 66, sprite dimensions
-dw DugtrioPicFront
-dw DugtrioPicBack
-; attacks known at lvl 0
-db SCRATCH
-db GROWL
-db DIG
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,15
- tmlearn 20
- tmlearn 26,27,28,31,32
- tmlearn 34
- tmlearn 44,48
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/eevee.asm b/data/baseStats/eevee.asm
deleted file mode 100644
index 7e64bfd8..00000000
--- a/data/baseStats/eevee.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_EEVEE ; pokedex id
-db 55 ; base hp
-db 55 ; base attack
-db 50 ; base defense
-db 55 ; base speed
-db 65 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 45 ; catch rate
-db 92 ; base exp yield
-INCBIN "pic/ymon/eevee.pic",0,1 ; 55, sprite dimensions
-dw EeveePicFront
-dw EeveePicBack
-; attacks known at lvl 0
-db TACKLE
-db TAIL_WHIP
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34,39,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/ekans.asm b/data/baseStats/ekans.asm
deleted file mode 100644
index a4385e9c..00000000
--- a/data/baseStats/ekans.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_EKANS ; pokedex id
-db 35 ; base hp
-db 60 ; base attack
-db 44 ; base defense
-db 55 ; base speed
-db 40 ; base special
-db POISON ; species type 1
-db POISON ; species type 2
-db 255 ; catch rate
-db 62 ; base exp yield
-INCBIN "pic/ymon/ekans.pic",0,1 ; 55, sprite dimensions
-dw EkansPicFront
-dw EkansPicBack
-; attacks known at lvl 0
-db WRAP
-db LEER
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10
- tmlearn 20,21
- tmlearn 26,27,28,31,32
- tmlearn 34,40
- tmlearn 44,48
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/electabuzz.asm b/data/baseStats/electabuzz.asm
deleted file mode 100644
index 8b85f12a..00000000
--- a/data/baseStats/electabuzz.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_ELECTABUZZ ; pokedex id
-db 65 ; base hp
-db 83 ; base attack
-db 57 ; base defense
-db 105 ; base speed
-db 85 ; base special
-db ELECTRIC ; species type 1
-db ELECTRIC ; species type 2
-db 45 ; catch rate
-db 156 ; base exp yield
-INCBIN "pic/ymon/electabuzz.pic",0,1 ; 66, sprite dimensions
-dw ElectabuzzPicFront
-dw ElectabuzzPicBack
-; attacks known at lvl 0
-db QUICK_ATTACK
-db LEER
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,15
- tmlearn 17,18,19,20,24
- tmlearn 25,29,30,31,32
- tmlearn 33,34,35,39,40
- tmlearn 44,45,46
- tmlearn 50,54,55
-db 0 ; padding
diff --git a/data/baseStats/electrode.asm b/data/baseStats/electrode.asm
deleted file mode 100644
index d6842241..00000000
--- a/data/baseStats/electrode.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_ELECTRODE ; pokedex id
-db 60 ; base hp
-db 50 ; base attack
-db 70 ; base defense
-db 140 ; base speed
-db 80 ; base special
-db ELECTRIC ; species type 1
-db ELECTRIC ; species type 2
-db 60 ; catch rate
-db 150 ; base exp yield
-INCBIN "pic/ymon/electrode.pic",0,1 ; 55, sprite dimensions
-dw ElectrodePicFront
-dw ElectrodePicBack
-; attacks known at lvl 0
-db TACKLE
-db SCREECH
-db SONICBOOM
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9,15
- tmlearn 20,24
- tmlearn 25,30,31,32
- tmlearn 33,34,36,39,40
- tmlearn 44,45,47
- tmlearn 50,55
-db 0 ; padding
diff --git a/data/baseStats/exeggcute.asm b/data/baseStats/exeggcute.asm
deleted file mode 100644
index db0860fa..00000000
--- a/data/baseStats/exeggcute.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_EXEGGCUTE ; pokedex id
-db 60 ; base hp
-db 40 ; base attack
-db 80 ; base defense
-db 40 ; base speed
-db 60 ; base special
-db GRASS ; species type 1
-db PSYCHIC ; species type 2
-db 90 ; catch rate
-db 98 ; base exp yield
-INCBIN "pic/ymon/exeggcute.pic",0,1 ; 77, sprite dimensions
-dw ExeggcutePicFront
-dw ExeggcutePicBack
-; attacks known at lvl 0
-db BARRAGE
-db HYPNOSIS
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9,10
- tmlearn 20
- tmlearn 29,30,31,32
- tmlearn 33,34,36,37
- tmlearn 44,46,47
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/exeggutor.asm b/data/baseStats/exeggutor.asm
deleted file mode 100644
index 1349e7d7..00000000
--- a/data/baseStats/exeggutor.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_EXEGGUTOR ; pokedex id
-db 95 ; base hp
-db 95 ; base attack
-db 85 ; base defense
-db 55 ; base speed
-db 125 ; base special
-db GRASS ; species type 1
-db PSYCHIC ; species type 2
-db 45 ; catch rate
-db 212 ; base exp yield
-INCBIN "pic/ymon/exeggutor.pic",0,1 ; 77, sprite dimensions
-dw ExeggutorPicFront
-dw ExeggutorPicBack
-; attacks known at lvl 0
-db BARRAGE
-db HYPNOSIS
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9,10,15
- tmlearn 20,21,22
- tmlearn 29,30,31,32
- tmlearn 33,34,36,37
- tmlearn 44,46,47
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/farfetchd.asm b/data/baseStats/farfetchd.asm
deleted file mode 100644
index 801b672c..00000000
--- a/data/baseStats/farfetchd.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_FARFETCHD ; pokedex id
-db 52 ; base hp
-db 65 ; base attack
-db 55 ; base defense
-db 60 ; base speed
-db 58 ; base special
-db NORMAL ; species type 1
-db FLYING ; species type 2
-db 45 ; catch rate
-db 94 ; base exp yield
-INCBIN "pic/ymon/farfetchd.pic",0,1 ; 66, sprite dimensions
-dw FarfetchdPicFront
-dw FarfetchdPicBack
-; attacks known at lvl 0
-db PECK
-db SAND_ATTACK
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 2,3,4,6,8
- tmlearn 9,10
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34,39,40
- tmlearn 44
- tmlearn 50,51,52
-db 0 ; padding
diff --git a/data/baseStats/fearow.asm b/data/baseStats/fearow.asm
deleted file mode 100644
index 2da5d712..00000000
--- a/data/baseStats/fearow.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_FEAROW ; pokedex id
-db 65 ; base hp
-db 90 ; base attack
-db 65 ; base defense
-db 100 ; base speed
-db 61 ; base special
-db NORMAL ; species type 1
-db FLYING ; species type 2
-db 90 ; catch rate
-db 162 ; base exp yield
-INCBIN "pic/ymon/fearow.pic",0,1 ; 77, sprite dimensions
-dw FearowPicFront
-dw FearowPicBack
-; attacks known at lvl 0
-db PECK
-db GROWL
-db LEER
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 2,4,6
- tmlearn 9,10,15
- tmlearn 20
- tmlearn 31,32
- tmlearn 34,39
- tmlearn 43,44
- tmlearn 50,52
-db 0 ; padding
diff --git a/data/baseStats/flareon.asm b/data/baseStats/flareon.asm
deleted file mode 100644
index 82add9d7..00000000
--- a/data/baseStats/flareon.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_FLAREON ; pokedex id
-db 65 ; base hp
-db 130 ; base attack
-db 60 ; base defense
-db 65 ; base speed
-db 110 ; base special
-db FIRE ; species type 1
-db FIRE ; species type 2
-db 45 ; catch rate
-db 198 ; base exp yield
-INCBIN "pic/ymon/flareon.pic",0,1 ; 66, sprite dimensions
-dw FlareonPicFront
-dw FlareonPicBack
-; attacks known at lvl 0
-db TACKLE
-db TAIL_WHIP
-db QUICK_ATTACK
-db EMBER
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,15
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34,38,39,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/gastly.asm b/data/baseStats/gastly.asm
deleted file mode 100644
index 10f5eebd..00000000
--- a/data/baseStats/gastly.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_GASTLY ; pokedex id
-db 30 ; base hp
-db 35 ; base attack
-db 30 ; base defense
-db 80 ; base speed
-db 100 ; base special
-db GHOST ; species type 1
-db POISON ; species type 2
-db 190 ; catch rate
-db 95 ; base exp yield
-INCBIN "pic/ymon/gastly.pic",0,1 ; 77, sprite dimensions
-dw GastlyPicFront
-dw GastlyPicBack
-; attacks known at lvl 0
-db LICK
-db CONFUSE_RAY
-db NIGHT_SHADE
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 0
- tmlearn 20,21,24
- tmlearn 25,29,31,32
- tmlearn 34,36
- tmlearn 42,44,46,47
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/gengar.asm b/data/baseStats/gengar.asm
deleted file mode 100644
index 927e0d9b..00000000
--- a/data/baseStats/gengar.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_GENGAR ; pokedex id
-db 60 ; base hp
-db 65 ; base attack
-db 60 ; base defense
-db 110 ; base speed
-db 130 ; base special
-db GHOST ; species type 1
-db POISON ; species type 2
-db 45 ; catch rate
-db 190 ; base exp yield
-INCBIN "pic/ymon/gengar.pic",0,1 ; 66, sprite dimensions
-dw GengarPicFront
-dw GengarPicBack
-; attacks known at lvl 0
-db LICK
-db CONFUSE_RAY
-db NIGHT_SHADE
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,15
- tmlearn 17,18,19,20,21,24
- tmlearn 25,29,31,32
- tmlearn 34,35,36,40
- tmlearn 42,44,46,47
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/geodude.asm b/data/baseStats/geodude.asm
deleted file mode 100644
index fb981766..00000000
--- a/data/baseStats/geodude.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_GEODUDE ; pokedex id
-db 40 ; base hp
-db 80 ; base attack
-db 100 ; base defense
-db 20 ; base speed
-db 30 ; base special
-db ROCK ; species type 1
-db GROUND ; species type 2
-db 255 ; catch rate
-db 86 ; base exp yield
-INCBIN "pic/ymon/geodude.pic",0,1 ; 55, sprite dimensions
-dw GeodudePicFront
-dw GeodudePicBack
-; attacks known at lvl 0
-db TACKLE
-db 0
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,6,8
- tmlearn 9,10
- tmlearn 17,18,19,20
- tmlearn 26,27,28,31,32
- tmlearn 34,35,36,38
- tmlearn 44,47,48
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/gloom.asm b/data/baseStats/gloom.asm
deleted file mode 100644
index 35bfbba6..00000000
--- a/data/baseStats/gloom.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_GLOOM ; pokedex id
-db 60 ; base hp
-db 65 ; base attack
-db 70 ; base defense
-db 40 ; base speed
-db 85 ; base special
-db GRASS ; species type 1
-db POISON ; species type 2
-db 120 ; catch rate
-db 132 ; base exp yield
-INCBIN "pic/ymon/gloom.pic",0,1 ; 66, sprite dimensions
-dw GloomPicFront
-dw GloomPicBack
-; attacks known at lvl 0
-db ABSORB
-db POISONPOWDER
-db STUN_SPORE
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 3,6
- tmlearn 9,10
- tmlearn 20,21,22
- tmlearn 31,32
- tmlearn 33,34
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/golbat.asm b/data/baseStats/golbat.asm
deleted file mode 100644
index 123ccad6..00000000
--- a/data/baseStats/golbat.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_GOLBAT ; pokedex id
-db 75 ; base hp
-db 80 ; base attack
-db 70 ; base defense
-db 90 ; base speed
-db 75 ; base special
-db POISON ; species type 1
-db FLYING ; species type 2
-db 90 ; catch rate
-db 171 ; base exp yield
-INCBIN "pic/ymon/golbat.pic",0,1 ; 77, sprite dimensions
-dw GolbatPicFront
-dw GolbatPicBack
-; attacks known at lvl 0
-db LEECH_LIFE
-db SCREECH
-db BITE
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 2,4,6
- tmlearn 9,10,15
- tmlearn 20,21
- tmlearn 31,32
- tmlearn 34,39
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/goldeen.asm b/data/baseStats/goldeen.asm
deleted file mode 100644
index 7952ec18..00000000
--- a/data/baseStats/goldeen.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_GOLDEEN ; pokedex id
-db 45 ; base hp
-db 67 ; base attack
-db 60 ; base defense
-db 63 ; base speed
-db 50 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 225 ; catch rate
-db 111 ; base exp yield
-INCBIN "pic/ymon/goldeen.pic",0,1 ; 66, sprite dimensions
-dw GoldeenPicFront
-dw GoldeenPicBack
-; attacks known at lvl 0
-db PECK
-db TAIL_WHIP
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,7
- tmlearn 9,10,11,12,13,14
- tmlearn 20
- tmlearn 31,32
- tmlearn 34,39,40
- tmlearn 44
- tmlearn 50,53
-db 0 ; padding
diff --git a/data/baseStats/golduck.asm b/data/baseStats/golduck.asm
deleted file mode 100644
index 6ac14021..00000000
--- a/data/baseStats/golduck.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_GOLDUCK ; pokedex id
-db 80 ; base hp
-db 82 ; base attack
-db 78 ; base defense
-db 85 ; base speed
-db 80 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 75 ; catch rate
-db 174 ; base exp yield
-INCBIN "pic/ymon/golduck.pic",0,1 ; 77, sprite dimensions
-dw GolduckPicFront
-dw GolduckPicBack
-; attacks known at lvl 0
-db SCRATCH
-db TAIL_WHIP
-db DISABLE
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14,15,16
- tmlearn 17,18,19,20
- tmlearn 28,31,32
- tmlearn 34,39,40
- tmlearn 44
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/golem.asm b/data/baseStats/golem.asm
deleted file mode 100644
index 5047de54..00000000
--- a/data/baseStats/golem.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_GOLEM ; pokedex id
-db 80 ; base hp
-db 110 ; base attack
-db 130 ; base defense
-db 45 ; base speed
-db 55 ; base special
-db ROCK ; species type 1
-db GROUND ; species type 2
-db 45 ; catch rate
-db 177 ; base exp yield
-INCBIN "pic/ymon/golem.pic",0,1 ; 66, sprite dimensions
-dw GolemPicFront
-dw GolemPicBack
-; attacks known at lvl 0
-db TACKLE
-db DEFENSE_CURL
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,15
- tmlearn 17,18,19,20
- tmlearn 26,27,28,31,32
- tmlearn 34,35,36,38
- tmlearn 44,47,48
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/graveler.asm b/data/baseStats/graveler.asm
deleted file mode 100644
index 898673b8..00000000
--- a/data/baseStats/graveler.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_GRAVELER ; pokedex id
-db 55 ; base hp
-db 95 ; base attack
-db 115 ; base defense
-db 35 ; base speed
-db 45 ; base special
-db ROCK ; species type 1
-db GROUND ; species type 2
-db 120 ; catch rate
-db 134 ; base exp yield
-INCBIN "pic/ymon/graveler.pic",0,1 ; 66, sprite dimensions
-dw GravelerPicFront
-dw GravelerPicBack
-; attacks known at lvl 0
-db TACKLE
-db DEFENSE_CURL
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,6,8
- tmlearn 9,10
- tmlearn 17,18,19,20
- tmlearn 26,27,28,31,32
- tmlearn 34,35,36,38
- tmlearn 44,47,48
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/grimer.asm b/data/baseStats/grimer.asm
deleted file mode 100644
index 0effddf4..00000000
--- a/data/baseStats/grimer.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_GRIMER ; pokedex id
-db 80 ; base hp
-db 80 ; base attack
-db 50 ; base defense
-db 25 ; base speed
-db 40 ; base special
-db POISON ; species type 1
-db POISON ; species type 2
-db 190 ; catch rate
-db 90 ; base exp yield
-INCBIN "pic/ymon/grimer.pic",0,1 ; 55, sprite dimensions
-dw GrimerPicFront
-dw GrimerPicBack
-; attacks known at lvl 0
-db POUND
-db DISABLE
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 0
- tmlearn 20,21,24
- tmlearn 25,31,32
- tmlearn 34,36,38
- tmlearn 44,47
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/growlithe.asm b/data/baseStats/growlithe.asm
deleted file mode 100644
index 39804054..00000000
--- a/data/baseStats/growlithe.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_GROWLITHE ; pokedex id
-db 55 ; base hp
-db 70 ; base attack
-db 45 ; base defense
-db 60 ; base speed
-db 50 ; base special
-db FIRE ; species type 1
-db FIRE ; species type 2
-db 190 ; catch rate
-db 91 ; base exp yield
-INCBIN "pic/ymon/growlithe.pic",0,1 ; 55, sprite dimensions
-dw GrowlithePicFront
-dw GrowlithePicBack
-; attacks known at lvl 0
-db BITE
-db ROAR
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10
- tmlearn 20,23
- tmlearn 28,31,32
- tmlearn 33,34,38,39,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/gyarados.asm b/data/baseStats/gyarados.asm
deleted file mode 100644
index 742da527..00000000
--- a/data/baseStats/gyarados.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_GYARADOS ; pokedex id
-db 95 ; base hp
-db 125 ; base attack
-db 79 ; base defense
-db 81 ; base speed
-db 100 ; base special
-db WATER ; species type 1
-db FLYING ; species type 2
-db 45 ; catch rate
-db 214 ; base exp yield
-INCBIN "pic/ymon/gyarados.pic",0,1 ; 77, sprite dimensions
-dw GyaradosPicFront
-dw GyaradosPicBack
-; attacks known at lvl 0
-db TACKLE
-db 0
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 20,23,24
- tmlearn 25,31,32
- tmlearn 33,34,38,40
- tmlearn 44
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/haunter.asm b/data/baseStats/haunter.asm
deleted file mode 100644
index 8614c373..00000000
--- a/data/baseStats/haunter.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_HAUNTER ; pokedex id
-db 45 ; base hp
-db 50 ; base attack
-db 45 ; base defense
-db 95 ; base speed
-db 115 ; base special
-db GHOST ; species type 1
-db POISON ; species type 2
-db 90 ; catch rate
-db 126 ; base exp yield
-INCBIN "pic/ymon/haunter.pic",0,1 ; 66, sprite dimensions
-dw HaunterPicFront
-dw HaunterPicBack
-; attacks known at lvl 0
-db LICK
-db CONFUSE_RAY
-db NIGHT_SHADE
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 0
- tmlearn 20,21,24
- tmlearn 25,29,31,32
- tmlearn 34,36
- tmlearn 42,44,46,47
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/hitmonchan.asm b/data/baseStats/hitmonchan.asm
deleted file mode 100644
index 4a565d21..00000000
--- a/data/baseStats/hitmonchan.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_HITMONCHAN ; pokedex id
-db 50 ; base hp
-db 105 ; base attack
-db 79 ; base defense
-db 76 ; base speed
-db 35 ; base special
-db FIGHTING ; species type 1
-db FIGHTING ; species type 2
-db 45 ; catch rate
-db 140 ; base exp yield
-INCBIN "pic/ymon/hitmonchan.pic",0,1 ; 66, sprite dimensions
-dw HitmonchanPicFront
-dw HitmonchanPicBack
-; attacks known at lvl 0
-db COMET_PUNCH
-db AGILITY
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10
- tmlearn 17,18,19,20
- tmlearn 31,32
- tmlearn 34,35,39,40
- tmlearn 44
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/hitmonlee.asm b/data/baseStats/hitmonlee.asm
deleted file mode 100644
index b08cd76c..00000000
--- a/data/baseStats/hitmonlee.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_HITMONLEE ; pokedex id
-db 50 ; base hp
-db 120 ; base attack
-db 53 ; base defense
-db 87 ; base speed
-db 35 ; base special
-db FIGHTING ; species type 1
-db FIGHTING ; species type 2
-db 45 ; catch rate
-db 139 ; base exp yield
-INCBIN "pic/ymon/hitmonlee.pic",0,1 ; 77, sprite dimensions
-dw HitmonleePicFront
-dw HitmonleePicBack
-; attacks known at lvl 0
-db DOUBLE_KICK
-db MEDITATE
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10
- tmlearn 17,18,19,20
- tmlearn 31,32
- tmlearn 34,35,39,40
- tmlearn 44
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/horsea.asm b/data/baseStats/horsea.asm
deleted file mode 100644
index 86222be3..00000000
--- a/data/baseStats/horsea.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_HORSEA ; pokedex id
-db 30 ; base hp
-db 40 ; base attack
-db 70 ; base defense
-db 60 ; base speed
-db 70 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 225 ; catch rate
-db 83 ; base exp yield
-INCBIN "pic/ymon/horsea.pic",0,1 ; 55, sprite dimensions
-dw HorseaPicFront
-dw HorseaPicBack
-; attacks known at lvl 0
-db BUBBLE
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9,10,11,12,13,14
- tmlearn 20
- tmlearn 31,32
- tmlearn 34,39,40
- tmlearn 44
- tmlearn 50,53
-db 0 ; padding
diff --git a/data/baseStats/hypno.asm b/data/baseStats/hypno.asm
deleted file mode 100644
index 3d9cb355..00000000
--- a/data/baseStats/hypno.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_HYPNO ; pokedex id
-db 85 ; base hp
-db 73 ; base attack
-db 70 ; base defense
-db 67 ; base speed
-db 115 ; base special
-db PSYCHIC ; species type 1
-db PSYCHIC ; species type 2
-db 75 ; catch rate
-db 165 ; base exp yield
-INCBIN "pic/ymon/hypno.pic",0,1 ; 77, sprite dimensions
-dw HypnoPicFront
-dw HypnoPicBack
-; attacks known at lvl 0
-db POUND
-db HYPNOSIS
-db DISABLE
-db CONFUSION
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,15
- tmlearn 17,18,19,20
- tmlearn 29,30,31,32
- tmlearn 33,34,35,40
- tmlearn 42,44,45,46
- tmlearn 49,50,55
-db 0 ; padding
diff --git a/data/baseStats/ivysaur.asm b/data/baseStats/ivysaur.asm
deleted file mode 100644
index 38d5ce6a..00000000
--- a/data/baseStats/ivysaur.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_IVYSAUR ; pokedex id
-db 60 ; base hp
-db 62 ; base attack
-db 63 ; base defense
-db 60 ; base speed
-db 80 ; base special
-db GRASS ; species type 1
-db POISON ; species type 2
-db 45 ; catch rate
-db 141 ; base exp yield
-INCBIN "pic/ymon/ivysaur.pic",0,1 ; 66, sprite dimensions
-dw IvysaurPicFront
-dw IvysaurPicBack
-; attacks known at lvl 0
-db TACKLE
-db GROWL
-db LEECH_SEED
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 3,6,8
- tmlearn 9,10
- tmlearn 20,21,22
- tmlearn 31,32
- tmlearn 33,34
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/jigglypuff.asm b/data/baseStats/jigglypuff.asm
deleted file mode 100644
index bb8a1626..00000000
--- a/data/baseStats/jigglypuff.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_JIGGLYPUFF ; pokedex id
-db 115 ; base hp
-db 45 ; base attack
-db 20 ; base defense
-db 20 ; base speed
-db 25 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 170 ; catch rate
-db 76 ; base exp yield
-INCBIN "pic/ymon/jigglypuff.pic",0,1 ; 55, sprite dimensions
-dw JigglypuffPicFront
-dw JigglypuffPicBack
-; attacks known at lvl 0
-db SING
-db 0
-db 0
-db 0
-db 4 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14
- tmlearn 17,18,19,20,22,24
- tmlearn 25,29,30,31,32
- tmlearn 33,34,38,40
- tmlearn 44,45,46
- tmlearn 49,50,54,55
-db 0 ; padding
diff --git a/data/baseStats/jolteon.asm b/data/baseStats/jolteon.asm
deleted file mode 100644
index dd1e3c5a..00000000
--- a/data/baseStats/jolteon.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_JOLTEON ; pokedex id
-db 65 ; base hp
-db 65 ; base attack
-db 60 ; base defense
-db 130 ; base speed
-db 110 ; base special
-db ELECTRIC ; species type 1
-db ELECTRIC ; species type 2
-db 45 ; catch rate
-db 197 ; base exp yield
-INCBIN "pic/ymon/jolteon.pic",0,1 ; 66, sprite dimensions
-dw JolteonPicFront
-dw JolteonPicBack
-; attacks known at lvl 0
-db TACKLE
-db TAIL_WHIP
-db QUICK_ATTACK
-db THUNDERSHOCK
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,15
- tmlearn 20,24
- tmlearn 25,31,32
- tmlearn 33,34,39,40
- tmlearn 44,45
- tmlearn 50,55
-db 0 ; padding
diff --git a/data/baseStats/jynx.asm b/data/baseStats/jynx.asm
deleted file mode 100644
index 72d28179..00000000
--- a/data/baseStats/jynx.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_JYNX ; pokedex id
-db 65 ; base hp
-db 50 ; base attack
-db 35 ; base defense
-db 95 ; base speed
-db 95 ; base special
-db ICE ; species type 1
-db PSYCHIC ; species type 2
-db 45 ; catch rate
-db 137 ; base exp yield
-INCBIN "pic/ymon/jynx.pic",0,1 ; 66, sprite dimensions
-dw JynxPicFront
-dw JynxPicBack
-; attacks known at lvl 0
-db POUND
-db LOVELY_KISS
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 17,18,19,20
- tmlearn 29,30,31,32
- tmlearn 33,34,35,40
- tmlearn 44,46
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/kabuto.asm b/data/baseStats/kabuto.asm
deleted file mode 100644
index dce77f2b..00000000
--- a/data/baseStats/kabuto.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_KABUTO ; pokedex id
-db 30 ; base hp
-db 80 ; base attack
-db 90 ; base defense
-db 55 ; base speed
-db 45 ; base special
-db ROCK ; species type 1
-db WATER ; species type 2
-db 45 ; catch rate
-db 119 ; base exp yield
-INCBIN "pic/ymon/kabuto.pic",0,1 ; 55, sprite dimensions
-dw KabutoPicFront
-dw KabutoPicBack
-; attacks known at lvl 0
-db SCRATCH
-db HARDEN
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,11,12,13,14
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34
- tmlearn 44
- tmlearn 50,53
-db 0 ; padding
diff --git a/data/baseStats/kabutops.asm b/data/baseStats/kabutops.asm
deleted file mode 100644
index ef165079..00000000
--- a/data/baseStats/kabutops.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_KABUTOPS ; pokedex id
-db 60 ; base hp
-db 115 ; base attack
-db 105 ; base defense
-db 80 ; base speed
-db 70 ; base special
-db ROCK ; species type 1
-db WATER ; species type 2
-db 45 ; catch rate
-db 201 ; base exp yield
-INCBIN "pic/ymon/kabutops.pic",0,1 ; 66, sprite dimensions
-dw KabutopsPicFront
-dw KabutopsPicBack
-; attacks known at lvl 0
-db SCRATCH
-db HARDEN
-db ABSORB
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 2,3,5,6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 17,19,20
- tmlearn 31,32
- tmlearn 33,34,40
- tmlearn 44
- tmlearn 50,51,53
-db 0 ; padding
diff --git a/data/baseStats/kadabra.asm b/data/baseStats/kadabra.asm
deleted file mode 100644
index 37f9ded4..00000000
--- a/data/baseStats/kadabra.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_KADABRA ; pokedex id
-db 40 ; base hp
-db 35 ; base attack
-db 30 ; base defense
-db 105 ; base speed
-db 120 ; base special
-db PSYCHIC ; species type 1
-db PSYCHIC ; species type 2
-db 100 ; catch rate
-db 145 ; base exp yield
-INCBIN "pic/ymon/kadabra.pic",0,1 ; 66, sprite dimensions
-dw KadabraPicFront
-dw KadabraPicBack
-; attacks known at lvl 0
-db TELEPORT
-db KINESIS
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10
- tmlearn 17,18,19,20
- tmlearn 28,29,30,31,32
- tmlearn 33,34,35,40
- tmlearn 44,45,46
- tmlearn 49,50,55
-db 0 ; padding
diff --git a/data/baseStats/kakuna.asm b/data/baseStats/kakuna.asm
deleted file mode 100644
index ea59d67d..00000000
--- a/data/baseStats/kakuna.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_KAKUNA ; pokedex id
-db 45 ; base hp
-db 25 ; base attack
-db 50 ; base defense
-db 35 ; base speed
-db 25 ; base special
-db BUG ; species type 1
-db POISON ; species type 2
-db 120 ; catch rate
-db 71 ; base exp yield
-INCBIN "pic/ymon/kakuna.pic",0,1 ; 55, sprite dimensions
-dw KakunaPicFront
-dw KakunaPicBack
-; attacks known at lvl 0
-db HARDEN
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
-db 0 ; padding
diff --git a/data/baseStats/kangaskhan.asm b/data/baseStats/kangaskhan.asm
deleted file mode 100644
index bca753e2..00000000
--- a/data/baseStats/kangaskhan.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_KANGASKHAN ; pokedex id
-db 105 ; base hp
-db 95 ; base attack
-db 80 ; base defense
-db 90 ; base speed
-db 40 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 45 ; catch rate
-db 175 ; base exp yield
-INCBIN "pic/ymon/kangaskhan.pic",0,1 ; 77, sprite dimensions
-dw KangaskhanPicFront
-dw KangaskhanPicBack
-; attacks known at lvl 0
-db COMET_PUNCH
-db RAGE
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 17,18,19,20,24
- tmlearn 25,26,27,31,32
- tmlearn 34,38,40
- tmlearn 44,48
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/kingler.asm b/data/baseStats/kingler.asm
deleted file mode 100644
index d4030bb8..00000000
--- a/data/baseStats/kingler.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_KINGLER ; pokedex id
-db 55 ; base hp
-db 130 ; base attack
-db 115 ; base defense
-db 75 ; base speed
-db 50 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 60 ; catch rate
-db 206 ; base exp yield
-INCBIN "pic/ymon/kingler.pic",0,1 ; 77, sprite dimensions
-dw KinglerPicFront
-dw KinglerPicBack
-; attacks known at lvl 0
-db BUBBLE
-db LEER
-db VICEGRIP
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 3,6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 20
- tmlearn 31,32
- tmlearn 34
- tmlearn 44
- tmlearn 50,51,53,54
-db 0 ; padding
diff --git a/data/baseStats/koffing.asm b/data/baseStats/koffing.asm
deleted file mode 100644
index a6034ea6..00000000
--- a/data/baseStats/koffing.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_KOFFING ; pokedex id
-db 40 ; base hp
-db 65 ; base attack
-db 95 ; base defense
-db 35 ; base speed
-db 60 ; base special
-db POISON ; species type 1
-db POISON ; species type 2
-db 190 ; catch rate
-db 114 ; base exp yield
-INCBIN "pic/ymon/koffing.pic",0,1 ; 66, sprite dimensions
-dw KoffingPicFront
-dw KoffingPicBack
-; attacks known at lvl 0
-db TACKLE
-db SMOG
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 0
- tmlearn 20,24
- tmlearn 25,31,32
- tmlearn 34,36,38
- tmlearn 44,47
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/krabby.asm b/data/baseStats/krabby.asm
deleted file mode 100644
index b0b6ce66..00000000
--- a/data/baseStats/krabby.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_KRABBY ; pokedex id
-db 30 ; base hp
-db 105 ; base attack
-db 90 ; base defense
-db 50 ; base speed
-db 25 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 225 ; catch rate
-db 115 ; base exp yield
-INCBIN "pic/ymon/krabby.pic",0,1 ; 55, sprite dimensions
-dw KrabbyPicFront
-dw KrabbyPicBack
-; attacks known at lvl 0
-db BUBBLE
-db LEER
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 3,6,8
- tmlearn 9,10,11,12,13,14
- tmlearn 20
- tmlearn 31,32
- tmlearn 34
- tmlearn 44
- tmlearn 50,51,53,54
-db 0 ; padding
diff --git a/data/baseStats/lapras.asm b/data/baseStats/lapras.asm
deleted file mode 100644
index 83df6278..00000000
--- a/data/baseStats/lapras.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_LAPRAS ; pokedex id
-db 130 ; base hp
-db 85 ; base attack
-db 80 ; base defense
-db 60 ; base speed
-db 95 ; base special
-db WATER ; species type 1
-db ICE ; species type 2
-db 45 ; catch rate
-db 219 ; base exp yield
-INCBIN "pic/ymon/lapras.pic",0,1 ; 77, sprite dimensions
-dw LaprasPicFront
-dw LaprasPicBack
-; attacks known at lvl 0
-db WATER_GUN
-db GROWL
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 6,7,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 20,22,23,24
- tmlearn 25,29,31,32
- tmlearn 33,34,40
- tmlearn 44,46
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/lickitung.asm b/data/baseStats/lickitung.asm
deleted file mode 100644
index 5db3fa6e..00000000
--- a/data/baseStats/lickitung.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_LICKITUNG ; pokedex id
-db 90 ; base hp
-db 55 ; base attack
-db 75 ; base defense
-db 30 ; base speed
-db 60 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 45 ; catch rate
-db 127 ; base exp yield
-INCBIN "pic/ymon/lickitung.pic",0,1 ; 77, sprite dimensions
-dw LickitungPicFront
-dw LickitungPicBack
-; attacks known at lvl 0
-db WRAP
-db SUPERSONIC
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,3,5,6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 17,18,19,20,24
- tmlearn 25,26,27,31,32
- tmlearn 34,38,40
- tmlearn 44
- tmlearn 50,51,53,54
-db 0 ; padding
diff --git a/data/baseStats/machamp.asm b/data/baseStats/machamp.asm
deleted file mode 100644
index dec82c74..00000000
--- a/data/baseStats/machamp.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MACHAMP ; pokedex id
-db 90 ; base hp
-db 130 ; base attack
-db 80 ; base defense
-db 55 ; base speed
-db 65 ; base special
-db FIGHTING ; species type 1
-db FIGHTING ; species type 2
-db 45 ; catch rate
-db 193 ; base exp yield
-INCBIN "pic/ymon/machamp.pic",0,1 ; 77, sprite dimensions
-dw MachampPicFront
-dw MachampPicBack
-; attacks known at lvl 0
-db KARATE_CHOP
-db LOW_KICK
-db LEER
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,15
- tmlearn 17,18,19,20
- tmlearn 26,27,28,31,32
- tmlearn 34,35,38,40
- tmlearn 44,48
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/machoke.asm b/data/baseStats/machoke.asm
deleted file mode 100644
index eee41d0c..00000000
--- a/data/baseStats/machoke.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MACHOKE ; pokedex id
-db 80 ; base hp
-db 100 ; base attack
-db 70 ; base defense
-db 45 ; base speed
-db 50 ; base special
-db FIGHTING ; species type 1
-db FIGHTING ; species type 2
-db 90 ; catch rate
-db 146 ; base exp yield
-INCBIN "pic/ymon/machoke.pic",0,1 ; 77, sprite dimensions
-dw MachokePicFront
-dw MachokePicBack
-; attacks known at lvl 0
-db KARATE_CHOP
-db LOW_KICK
-db LEER
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10
- tmlearn 17,18,19,20
- tmlearn 26,27,28,31,32
- tmlearn 34,35,38,40
- tmlearn 44,48
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/machop.asm b/data/baseStats/machop.asm
deleted file mode 100644
index 91250bfb..00000000
--- a/data/baseStats/machop.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MACHOP ; pokedex id
-db 70 ; base hp
-db 80 ; base attack
-db 50 ; base defense
-db 35 ; base speed
-db 35 ; base special
-db FIGHTING ; species type 1
-db FIGHTING ; species type 2
-db 180 ; catch rate
-db 88 ; base exp yield
-INCBIN "pic/ymon/machop.pic",0,1 ; 55, sprite dimensions
-dw MachopPicFront
-dw MachopPicBack
-; attacks known at lvl 0
-db KARATE_CHOP
-db 0
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10
- tmlearn 17,18,19,20
- tmlearn 26,27,28,31,32
- tmlearn 34,35,38,40
- tmlearn 44,48
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/magikarp.asm b/data/baseStats/magikarp.asm
deleted file mode 100644
index 941f8cd9..00000000
--- a/data/baseStats/magikarp.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MAGIKARP ; pokedex id
-db 20 ; base hp
-db 10 ; base attack
-db 55 ; base defense
-db 80 ; base speed
-db 20 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 255 ; catch rate
-db 20 ; base exp yield
-INCBIN "pic/ymon/magikarp.pic",0,1 ; 66, sprite dimensions
-dw MagikarpPicFront
-dw MagikarpPicBack
-; attacks known at lvl 0
-db SPLASH
-db 0
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
-db 0 ; padding
diff --git a/data/baseStats/magmar.asm b/data/baseStats/magmar.asm
deleted file mode 100644
index 6d503611..00000000
--- a/data/baseStats/magmar.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MAGMAR ; pokedex id
-db 65 ; base hp
-db 95 ; base attack
-db 57 ; base defense
-db 93 ; base speed
-db 85 ; base special
-db FIRE ; species type 1
-db FIRE ; species type 2
-db 45 ; catch rate
-db 167 ; base exp yield
-INCBIN "pic/ymon/magmar.pic",0,1 ; 66, sprite dimensions
-dw MagmarPicFront
-dw MagmarPicBack
-; attacks known at lvl 0
-db EMBER
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,15
- tmlearn 17,18,19,20
- tmlearn 29,30,31,32
- tmlearn 34,35,38,40
- tmlearn 44,46
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/magnemite.asm b/data/baseStats/magnemite.asm
deleted file mode 100644
index a328f2ef..00000000
--- a/data/baseStats/magnemite.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MAGNEMITE ; pokedex id
-db 25 ; base hp
-db 35 ; base attack
-db 70 ; base defense
-db 45 ; base speed
-db 95 ; base special
-db ELECTRIC ; species type 1
-db ELECTRIC ; species type 2
-db 190 ; catch rate
-db 89 ; base exp yield
-INCBIN "pic/ymon/magnemite.pic",0,1 ; 55, sprite dimensions
-dw MagnemitePicFront
-dw MagnemitePicBack
-; attacks known at lvl 0
-db TACKLE
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9,10
- tmlearn 20,24
- tmlearn 25,30,31,32
- tmlearn 33,34,39
- tmlearn 44,45
- tmlearn 50,55
-db 0 ; padding
diff --git a/data/baseStats/magneton.asm b/data/baseStats/magneton.asm
deleted file mode 100644
index 9cc52ec3..00000000
--- a/data/baseStats/magneton.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MAGNETON ; pokedex id
-db 50 ; base hp
-db 60 ; base attack
-db 95 ; base defense
-db 70 ; base speed
-db 120 ; base special
-db ELECTRIC ; species type 1
-db ELECTRIC ; species type 2
-db 60 ; catch rate
-db 161 ; base exp yield
-INCBIN "pic/ymon/magneton.pic",0,1 ; 66, sprite dimensions
-dw MagnetonPicFront
-dw MagnetonPicBack
-; attacks known at lvl 0
-db TACKLE
-db SONICBOOM
-db THUNDERSHOCK
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9,10,15
- tmlearn 20,24
- tmlearn 25,30,31,32
- tmlearn 33,34,39
- tmlearn 44,45
- tmlearn 50,55
-db 0 ; padding
diff --git a/data/baseStats/mankey.asm b/data/baseStats/mankey.asm
deleted file mode 100644
index b05fd16d..00000000
--- a/data/baseStats/mankey.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MANKEY ; pokedex id
-db 40 ; base hp
-db 80 ; base attack
-db 35 ; base defense
-db 70 ; base speed
-db 35 ; base special
-db FIGHTING ; species type 1
-db FIGHTING ; species type 2
-db 190 ; catch rate
-db 74 ; base exp yield
-INCBIN "pic/ymon/mankey.pic",0,1 ; 55, sprite dimensions
-dw MankeyPicFront
-dw MankeyPicBack
-; attacks known at lvl 0
-db SCRATCH
-db LEER
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,16
- tmlearn 17,18,19,20,24
- tmlearn 25,28,31,32
- tmlearn 34,35,39,40
- tmlearn 44,48
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/marowak.asm b/data/baseStats/marowak.asm
deleted file mode 100644
index bc767faf..00000000
--- a/data/baseStats/marowak.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MAROWAK ; pokedex id
-db 60 ; base hp
-db 80 ; base attack
-db 110 ; base defense
-db 45 ; base speed
-db 50 ; base special
-db GROUND ; species type 1
-db GROUND ; species type 2
-db 75 ; catch rate
-db 124 ; base exp yield
-INCBIN "pic/ymon/marowak.pic",0,1 ; 66, sprite dimensions
-dw MarowakPicFront
-dw MarowakPicBack
-; attacks known at lvl 0
-db BONE_CLUB
-db TAIL_WHIP
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 17,18,19,20
- tmlearn 26,27,28,31,32
- tmlearn 34,38,40
- tmlearn 44
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/meowth.asm b/data/baseStats/meowth.asm
deleted file mode 100644
index ce211d22..00000000
--- a/data/baseStats/meowth.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MEOWTH ; pokedex id
-db 40 ; base hp
-db 45 ; base attack
-db 35 ; base defense
-db 90 ; base speed
-db 40 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 255 ; catch rate
-db 69 ; base exp yield
-INCBIN "pic/ymon/meowth.pic",0,1 ; 55, sprite dimensions
-dw MeowthPicFront
-dw MeowthPicBack
-; attacks known at lvl 0
-db SCRATCH
-db GROWL
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,11,12,16
- tmlearn 20,24
- tmlearn 25,31,32
- tmlearn 34,39,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/metapod.asm b/data/baseStats/metapod.asm
deleted file mode 100644
index b29a323d..00000000
--- a/data/baseStats/metapod.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_METAPOD ; pokedex id
-db 50 ; base hp
-db 20 ; base attack
-db 55 ; base defense
-db 30 ; base speed
-db 25 ; base special
-db BUG ; species type 1
-db BUG ; species type 2
-db 120 ; catch rate
-db 72 ; base exp yield
-INCBIN "pic/ymon/metapod.pic",0,1 ; 55, sprite dimensions
-dw MetapodPicFront
-dw MetapodPicBack
-; attacks known at lvl 0
-db HARDEN
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
-db 0 ; padding
diff --git a/data/baseStats/mew.asm b/data/baseStats/mew.asm
deleted file mode 100644
index 7381bf6f..00000000
--- a/data/baseStats/mew.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MEW ; pokedex id
-db 100 ; base hp
-db 100 ; base attack
-db 100 ; base defense
-db 100 ; base speed
-db 100 ; base special
-db PSYCHIC ; species type 1
-db PSYCHIC ; species type 2
-db 45 ; catch rate
-db 64 ; base exp yield
-INCBIN "pic/ymon/mew.pic",0,1 ; 55, sprite dimensions
-dw MewPicFront
-dw MewPicBack
-; attacks known at lvl 0
-db POUND
-db 0
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,2,3,4,5,6,7,8
- tmlearn 9,10,11,12,13,14,15,16
- tmlearn 17,18,19,20,21,22,23,24
- tmlearn 25,26,27,28,29,30,31,32
- tmlearn 33,34,35,36,37,38,39,40
- tmlearn 41,42,43,44,45,46,47,48
- tmlearn 49,50,51,52,53,54,55
-db 0 ; usually spacing
diff --git a/data/baseStats/mewtwo.asm b/data/baseStats/mewtwo.asm
deleted file mode 100644
index d6239384..00000000
--- a/data/baseStats/mewtwo.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MEWTWO ; pokedex id
-db 106 ; base hp
-db 110 ; base attack
-db 90 ; base defense
-db 130 ; base speed
-db 154 ; base special
-db PSYCHIC ; species type 1
-db PSYCHIC ; species type 2
-db 3 ; catch rate
-db 220 ; base exp yield
-INCBIN "pic/ymon/mewtwo.pic",0,1 ; 77, sprite dimensions
-dw MewtwoPicFront
-dw MewtwoPicBack
-; attacks known at lvl 0
-db CONFUSION
-db DISABLE
-db SWIFT
-db PSYCHIC_M
-db 5 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 17,18,19,20,22,24
- tmlearn 25,29,30,31,32
- tmlearn 33,34,35,36,38,40
- tmlearn 44,45,46
- tmlearn 49,50,54,55
-db 0 ; padding
diff --git a/data/baseStats/moltres.asm b/data/baseStats/moltres.asm
deleted file mode 100644
index 5588e0df..00000000
--- a/data/baseStats/moltres.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MOLTRES ; pokedex id
-db 90 ; base hp
-db 100 ; base attack
-db 90 ; base defense
-db 90 ; base speed
-db 125 ; base special
-db FIRE ; species type 1
-db FLYING ; species type 2
-db 3 ; catch rate
-db 217 ; base exp yield
-INCBIN "pic/ymon/moltres.pic",0,1 ; 77, sprite dimensions
-dw MoltresPicFront
-dw MoltresPicBack
-; attacks known at lvl 0
-db PECK
-db FIRE_SPIN
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 2,4,6
- tmlearn 9,10,15
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34,38,39
- tmlearn 43,44
- tmlearn 50,52
-db 0 ; padding
diff --git a/data/baseStats/mrmime.asm b/data/baseStats/mrmime.asm
deleted file mode 100644
index 87b110b7..00000000
--- a/data/baseStats/mrmime.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MR_MIME ; pokedex id
-db 40 ; base hp
-db 45 ; base attack
-db 65 ; base defense
-db 90 ; base speed
-db 100 ; base special
-db PSYCHIC ; species type 1
-db PSYCHIC ; species type 2
-db 45 ; catch rate
-db 136 ; base exp yield
-INCBIN "pic/ymon/mr.mime.pic",0,1 ; 66, sprite dimensions
-dw MrMimePicFront
-dw MrMimePicBack
-; attacks known at lvl 0
-db CONFUSION
-db BARRIER
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,15
- tmlearn 17,18,19,20,22,24
- tmlearn 25,29,30,31,32
- tmlearn 33,34,35,40
- tmlearn 44,45,46
- tmlearn 50,55
-db 0 ; padding
diff --git a/data/baseStats/muk.asm b/data/baseStats/muk.asm
deleted file mode 100644
index 4e67df43..00000000
--- a/data/baseStats/muk.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_MUK ; pokedex id
-db 105 ; base hp
-db 105 ; base attack
-db 75 ; base defense
-db 50 ; base speed
-db 65 ; base special
-db POISON ; species type 1
-db POISON ; species type 2
-db 75 ; catch rate
-db 157 ; base exp yield
-INCBIN "pic/ymon/muk.pic",0,1 ; 77, sprite dimensions
-dw MukPicFront
-dw MukPicBack
-; attacks known at lvl 0
-db POUND
-db DISABLE
-db POISON_GAS
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 15
- tmlearn 20,21,24
- tmlearn 25,31,32
- tmlearn 34,36,38
- tmlearn 44,47
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/nidoking.asm b/data/baseStats/nidoking.asm
deleted file mode 100644
index c9efa629..00000000
--- a/data/baseStats/nidoking.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_NIDOKING ; pokedex id
-db 81 ; base hp
-db 92 ; base attack
-db 77 ; base defense
-db 85 ; base speed
-db 75 ; base special
-db POISON ; species type 1
-db GROUND ; species type 2
-db 45 ; catch rate
-db 195 ; base exp yield
-INCBIN "pic/ymon/nidoking.pic",0,1 ; 77, sprite dimensions
-dw NidokingPicFront
-dw NidokingPicBack
-; attacks known at lvl 0
-db TACKLE
-db HORN_ATTACK
-db POISON_STING
-db THRASH
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,7,8
- tmlearn 9,10,11,12,13,14,15,16
- tmlearn 17,18,19,20,24
- tmlearn 25,26,27,31,32
- tmlearn 33,34,38,40
- tmlearn 44,48
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/nidoqueen.asm b/data/baseStats/nidoqueen.asm
deleted file mode 100644
index f37cc0af..00000000
--- a/data/baseStats/nidoqueen.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_NIDOQUEEN ; pokedex id
-db 90 ; base hp
-db 82 ; base attack
-db 87 ; base defense
-db 76 ; base speed
-db 75 ; base special
-db POISON ; species type 1
-db GROUND ; species type 2
-db 45 ; catch rate
-db 194 ; base exp yield
-INCBIN "pic/ymon/nidoqueen.pic",0,1 ; 77, sprite dimensions
-dw NidoqueenPicFront
-dw NidoqueenPicBack
-; attacks known at lvl 0
-db TACKLE
-db SCRATCH
-db TAIL_WHIP
-db BODY_SLAM
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,7,8
- tmlearn 9,10,11,12,13,14,15,16
- tmlearn 17,18,19,20,24
- tmlearn 25,26,27,31,32
- tmlearn 33,34,38,40
- tmlearn 44,48
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/nidoranf.asm b/data/baseStats/nidoranf.asm
deleted file mode 100644
index 9694a027..00000000
--- a/data/baseStats/nidoranf.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_NIDORAN_F ; pokedex id
-db 55 ; base hp
-db 47 ; base attack
-db 52 ; base defense
-db 41 ; base speed
-db 40 ; base special
-db POISON ; species type 1
-db POISON ; species type 2
-db 235 ; catch rate
-db 59 ; base exp yield
-INCBIN "pic/ymon/nidoranf.pic",0,1 ; 55, sprite dimensions
-dw NidoranFPicFront
-dw NidoranFPicBack
-; attacks known at lvl 0
-db GROWL
-db TACKLE
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,14
- tmlearn 20,24
- tmlearn 25,31,32
- tmlearn 33,34,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/nidoranm.asm b/data/baseStats/nidoranm.asm
deleted file mode 100644
index 0d04948e..00000000
--- a/data/baseStats/nidoranm.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_NIDORAN_M ; pokedex id
-db 46 ; base hp
-db 57 ; base attack
-db 40 ; base defense
-db 50 ; base speed
-db 40 ; base special
-db POISON ; species type 1
-db POISON ; species type 2
-db 235 ; catch rate
-db 60 ; base exp yield
-INCBIN "pic/ymon/nidoranm.pic",0,1 ; 55, sprite dimensions
-dw NidoranMPicFront
-dw NidoranMPicBack
-; attacks known at lvl 0
-db LEER
-db TACKLE
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 6,7,8
- tmlearn 9,10,14
- tmlearn 20,24
- tmlearn 25,31,32
- tmlearn 33,34,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/nidorina.asm b/data/baseStats/nidorina.asm
deleted file mode 100644
index e8375d97..00000000
--- a/data/baseStats/nidorina.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_NIDORINA ; pokedex id
-db 70 ; base hp
-db 62 ; base attack
-db 67 ; base defense
-db 56 ; base speed
-db 55 ; base special
-db POISON ; species type 1
-db POISON ; species type 2
-db 120 ; catch rate
-db 117 ; base exp yield
-INCBIN "pic/ymon/nidorina.pic",0,1 ; 66, sprite dimensions
-dw NidorinaPicFront
-dw NidorinaPicBack
-; attacks known at lvl 0
-db GROWL
-db TACKLE
-db SCRATCH
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 6,7,8
- tmlearn 9,10,11,12,13,14
- tmlearn 20,24
- tmlearn 25,31,32
- tmlearn 33,34,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/nidorino.asm b/data/baseStats/nidorino.asm
deleted file mode 100644
index ca28b121..00000000
--- a/data/baseStats/nidorino.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_NIDORINO ; pokedex id
-db 61 ; base hp
-db 72 ; base attack
-db 57 ; base defense
-db 65 ; base speed
-db 55 ; base special
-db POISON ; species type 1
-db POISON ; species type 2
-db 120 ; catch rate
-db 118 ; base exp yield
-INCBIN "pic/ymon/nidorino.pic",0,1 ; 66, sprite dimensions
-dw NidorinoPicFront
-dw NidorinoPicBack
-; attacks known at lvl 0
-db LEER
-db TACKLE
-db HORN_ATTACK
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 6,7,8
- tmlearn 9,10,11,12,13,14
- tmlearn 20,24
- tmlearn 25,31,32
- tmlearn 33,34,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/ninetales.asm b/data/baseStats/ninetales.asm
deleted file mode 100644
index 212f6322..00000000
--- a/data/baseStats/ninetales.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_NINETALES ; pokedex id
-db 73 ; base hp
-db 76 ; base attack
-db 75 ; base defense
-db 100 ; base speed
-db 100 ; base special
-db FIRE ; species type 1
-db FIRE ; species type 2
-db 75 ; catch rate
-db 178 ; base exp yield
-INCBIN "pic/ymon/ninetales.pic",0,1 ; 77, sprite dimensions
-dw NinetalesPicFront
-dw NinetalesPicBack
-; attacks known at lvl 0
-db EMBER
-db TAIL_WHIP
-db QUICK_ATTACK
-db ROAR
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,15
- tmlearn 20
- tmlearn 28,31,32
- tmlearn 33,34,38,39,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/oddish.asm b/data/baseStats/oddish.asm
deleted file mode 100644
index aabc873b..00000000
--- a/data/baseStats/oddish.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_ODDISH ; pokedex id
-db 45 ; base hp
-db 50 ; base attack
-db 55 ; base defense
-db 30 ; base speed
-db 75 ; base special
-db GRASS ; species type 1
-db POISON ; species type 2
-db 255 ; catch rate
-db 78 ; base exp yield
-INCBIN "pic/ymon/oddish.pic",0,1 ; 55, sprite dimensions
-dw OddishPicFront
-dw OddishPicBack
-; attacks known at lvl 0
-db ABSORB
-db 0
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 3,6
- tmlearn 9,10
- tmlearn 20,21,22
- tmlearn 31,32
- tmlearn 33,34
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/omanyte.asm b/data/baseStats/omanyte.asm
deleted file mode 100644
index 89a6b824..00000000
--- a/data/baseStats/omanyte.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_OMANYTE ; pokedex id
-db 35 ; base hp
-db 40 ; base attack
-db 100 ; base defense
-db 35 ; base speed
-db 90 ; base special
-db ROCK ; species type 1
-db WATER ; species type 2
-db 45 ; catch rate
-db 120 ; base exp yield
-INCBIN "pic/ymon/omanyte.pic",0,1 ; 55, sprite dimensions
-dw OmanytePicFront
-dw OmanytePicBack
-; attacks known at lvl 0
-db WATER_GUN
-db WITHDRAW
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,11,12,13,14
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34
- tmlearn 44
- tmlearn 50,53
-db 0 ; padding
diff --git a/data/baseStats/omastar.asm b/data/baseStats/omastar.asm
deleted file mode 100644
index 2066c8c2..00000000
--- a/data/baseStats/omastar.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_OMASTAR ; pokedex id
-db 70 ; base hp
-db 60 ; base attack
-db 125 ; base defense
-db 55 ; base speed
-db 115 ; base special
-db ROCK ; species type 1
-db WATER ; species type 2
-db 45 ; catch rate
-db 199 ; base exp yield
-INCBIN "pic/ymon/omastar.pic",0,1 ; 66, sprite dimensions
-dw OmastarPicFront
-dw OmastarPicBack
-; attacks known at lvl 0
-db WATER_GUN
-db WITHDRAW
-db HORN_ATTACK
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,7,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 17,19,20
- tmlearn 31,32
- tmlearn 33,34,40
- tmlearn 44
- tmlearn 50,53
-db 0 ; padding
diff --git a/data/baseStats/onix.asm b/data/baseStats/onix.asm
deleted file mode 100644
index 1e2f6ed5..00000000
--- a/data/baseStats/onix.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_ONIX ; pokedex id
-db 35 ; base hp
-db 45 ; base attack
-db 160 ; base defense
-db 70 ; base speed
-db 30 ; base special
-db ROCK ; species type 1
-db GROUND ; species type 2
-db 45 ; catch rate
-db 108 ; base exp yield
-INCBIN "pic/ymon/onix.pic",0,1 ; 77, sprite dimensions
-dw OnixPicFront
-dw OnixPicBack
-; attacks known at lvl 0
-db TACKLE
-db SCREECH
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10
- tmlearn 20
- tmlearn 26,27,28,31,32
- tmlearn 34,36,40
- tmlearn 44,47,48
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/paras.asm b/data/baseStats/paras.asm
deleted file mode 100644
index 273ec7a3..00000000
--- a/data/baseStats/paras.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_PARAS ; pokedex id
-db 35 ; base hp
-db 70 ; base attack
-db 55 ; base defense
-db 25 ; base speed
-db 55 ; base special
-db BUG ; species type 1
-db GRASS ; species type 2
-db 190 ; catch rate
-db 70 ; base exp yield
-INCBIN "pic/ymon/paras.pic",0,1 ; 55, sprite dimensions
-dw ParasPicFront
-dw ParasPicBack
-; attacks known at lvl 0
-db SCRATCH
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 3,6,8
- tmlearn 9,10
- tmlearn 20,21,22
- tmlearn 28,31,32
- tmlearn 33,34,40
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/parasect.asm b/data/baseStats/parasect.asm
deleted file mode 100644
index ed5c7015..00000000
--- a/data/baseStats/parasect.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_PARASECT ; pokedex id
-db 60 ; base hp
-db 95 ; base attack
-db 80 ; base defense
-db 30 ; base speed
-db 80 ; base special
-db BUG ; species type 1
-db GRASS ; species type 2
-db 75 ; catch rate
-db 128 ; base exp yield
-INCBIN "pic/ymon/parasect.pic",0,1 ; 77, sprite dimensions
-dw ParasectPicFront
-dw ParasectPicBack
-; attacks known at lvl 0
-db SCRATCH
-db STUN_SPORE
-db LEECH_LIFE
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 3,6,8
- tmlearn 9,10,15
- tmlearn 20,21,22
- tmlearn 28,31,32
- tmlearn 33,34,40
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/persian.asm b/data/baseStats/persian.asm
deleted file mode 100644
index 5ace4f35..00000000
--- a/data/baseStats/persian.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_PERSIAN ; pokedex id
-db 65 ; base hp
-db 70 ; base attack
-db 60 ; base defense
-db 115 ; base speed
-db 65 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 90 ; catch rate
-db 148 ; base exp yield
-INCBIN "pic/ymon/persian.pic",0,1 ; 77, sprite dimensions
-dw PersianPicFront
-dw PersianPicBack
-; attacks known at lvl 0
-db SCRATCH
-db GROWL
-db BITE
-db SCREECH
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,11,12,15,16
- tmlearn 20,24
- tmlearn 25,31,32
- tmlearn 34,39,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/pidgeot.asm b/data/baseStats/pidgeot.asm
deleted file mode 100644
index e0240fb1..00000000
--- a/data/baseStats/pidgeot.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_PIDGEOT ; pokedex id
-db 83 ; base hp
-db 80 ; base attack
-db 75 ; base defense
-db 91 ; base speed
-db 70 ; base special
-db NORMAL ; species type 1
-db FLYING ; species type 2
-db 45 ; catch rate
-db 172 ; base exp yield
-INCBIN "pic/ymon/pidgeot.pic",0,1 ; 77, sprite dimensions
-dw PidgeotPicFront
-dw PidgeotPicBack
-; attacks known at lvl 0
-db GUST
-db SAND_ATTACK
-db QUICK_ATTACK
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 2,4,6
- tmlearn 9,10,15
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34,39
- tmlearn 43,44
- tmlearn 50,52
-db 0 ; padding
diff --git a/data/baseStats/pidgeotto.asm b/data/baseStats/pidgeotto.asm
deleted file mode 100644
index 2930b5ae..00000000
--- a/data/baseStats/pidgeotto.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_PIDGEOTTO ; pokedex id
-db 63 ; base hp
-db 60 ; base attack
-db 55 ; base defense
-db 71 ; base speed
-db 50 ; base special
-db NORMAL ; species type 1
-db FLYING ; species type 2
-db 120 ; catch rate
-db 113 ; base exp yield
-INCBIN "pic/ymon/pidgeotto.pic",0,1 ; 66, sprite dimensions
-dw PidgeottoPicFront
-dw PidgeottoPicBack
-; attacks known at lvl 0
-db GUST
-db SAND_ATTACK
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 2,4,6
- tmlearn 9,10
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34,39
- tmlearn 43,44
- tmlearn 50,52
-db 0 ; padding
diff --git a/data/baseStats/pidgey.asm b/data/baseStats/pidgey.asm
deleted file mode 100644
index c110a32e..00000000
--- a/data/baseStats/pidgey.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_PIDGEY ; pokedex id
-db 40 ; base hp
-db 45 ; base attack
-db 40 ; base defense
-db 56 ; base speed
-db 35 ; base special
-db NORMAL ; species type 1
-db FLYING ; species type 2
-db 255 ; catch rate
-db 55 ; base exp yield
-INCBIN "pic/ymon/pidgey.pic",0,1 ; 55, sprite dimensions
-dw PidgeyPicFront
-dw PidgeyPicBack
-; attacks known at lvl 0
-db GUST
-db 0
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 2,4,6
- tmlearn 9,10
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34,39
- tmlearn 43,44
- tmlearn 50,52
-db 0 ; padding
diff --git a/data/baseStats/pikachu.asm b/data/baseStats/pikachu.asm
deleted file mode 100644
index 5e81a85f..00000000
--- a/data/baseStats/pikachu.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_PIKACHU ; pokedex id
-db 35 ; base hp
-db 55 ; base attack
-db 30 ; base defense
-db 90 ; base speed
-db 50 ; base special
-db ELECTRIC ; species type 1
-db ELECTRIC ; species type 2
-db 190 ; catch rate
-db 82 ; base exp yield
-INCBIN "pic/ymon/pikachu.pic",0,1 ; 55, sprite dimensions
-dw PikachuPicFront
-dw PikachuPicBack
-; attacks known at lvl 0
-db THUNDERSHOCK
-db GROWL
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,16
- tmlearn 17,19,20,24
- tmlearn 25,31,32
- tmlearn 33,34,39,40
- tmlearn 44,45
- tmlearn 50,55
-db 0 ; padding
diff --git a/data/baseStats/pinsir.asm b/data/baseStats/pinsir.asm
deleted file mode 100644
index b79f01a3..00000000
--- a/data/baseStats/pinsir.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_PINSIR ; pokedex id
-db 65 ; base hp
-db 125 ; base attack
-db 100 ; base defense
-db 85 ; base speed
-db 55 ; base special
-db BUG ; species type 1
-db BUG ; species type 2
-db 45 ; catch rate
-db 200 ; base exp yield
-INCBIN "pic/ymon/pinsir.pic",0,1 ; 77, sprite dimensions
-dw PinsirPicFront
-dw PinsirPicBack
-; attacks known at lvl 0
-db VICEGRIP
-db 0
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 3,6,8
- tmlearn 9,10,15
- tmlearn 17,19,20
- tmlearn 31,32
- tmlearn 34
- tmlearn 44
- tmlearn 50,51,54
-db 0 ; padding
diff --git a/data/baseStats/poliwag.asm b/data/baseStats/poliwag.asm
deleted file mode 100644
index 9c89fc49..00000000
--- a/data/baseStats/poliwag.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_POLIWAG ; pokedex id
-db 40 ; base hp
-db 50 ; base attack
-db 40 ; base defense
-db 90 ; base speed
-db 40 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 255 ; catch rate
-db 77 ; base exp yield
-INCBIN "pic/ymon/poliwag.pic",0,1 ; 55, sprite dimensions
-dw PoliwagPicFront
-dw PoliwagPicBack
-; attacks known at lvl 0
-db BUBBLE
-db 0
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,11,12,13,14
- tmlearn 20
- tmlearn 29,31,32
- tmlearn 34,40
- tmlearn 44,46
- tmlearn 50,53
-db 0 ; padding
diff --git a/data/baseStats/poliwhirl.asm b/data/baseStats/poliwhirl.asm
deleted file mode 100644
index c836e194..00000000
--- a/data/baseStats/poliwhirl.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_POLIWHIRL ; pokedex id
-db 65 ; base hp
-db 65 ; base attack
-db 65 ; base defense
-db 90 ; base speed
-db 50 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 120 ; catch rate
-db 131 ; base exp yield
-INCBIN "pic/ymon/poliwhirl.pic",0,1 ; 66, sprite dimensions
-dw PoliwhirlPicFront
-dw PoliwhirlPicBack
-; attacks known at lvl 0
-db BUBBLE
-db HYPNOSIS
-db WATER_GUN
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14
- tmlearn 17,18,19,20
- tmlearn 26,27,29,31,32
- tmlearn 34,35,40
- tmlearn 44,46
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/poliwrath.asm b/data/baseStats/poliwrath.asm
deleted file mode 100644
index 5a1acd9f..00000000
--- a/data/baseStats/poliwrath.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_POLIWRATH ; pokedex id
-db 90 ; base hp
-db 85 ; base attack
-db 95 ; base defense
-db 70 ; base speed
-db 70 ; base special
-db WATER ; species type 1
-db FIGHTING ; species type 2
-db 45 ; catch rate
-db 185 ; base exp yield
-INCBIN "pic/ymon/poliwrath.pic",0,1 ; 77, sprite dimensions
-dw PoliwrathPicFront
-dw PoliwrathPicBack
-; attacks known at lvl 0
-db HYPNOSIS
-db WATER_GUN
-db DOUBLESLAP
-db BODY_SLAM
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 17,18,19,20
- tmlearn 26,27,29,31,32
- tmlearn 34,35,40
- tmlearn 44,46
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/ponyta.asm b/data/baseStats/ponyta.asm
deleted file mode 100644
index 3c779075..00000000
--- a/data/baseStats/ponyta.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_PONYTA ; pokedex id
-db 50 ; base hp
-db 85 ; base attack
-db 55 ; base defense
-db 90 ; base speed
-db 65 ; base special
-db FIRE ; species type 1
-db FIRE ; species type 2
-db 190 ; catch rate
-db 152 ; base exp yield
-INCBIN "pic/ymon/ponyta.pic",0,1 ; 66, sprite dimensions
-dw PonytaPicFront
-dw PonytaPicBack
-; attacks known at lvl 0
-db EMBER
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,7,8
- tmlearn 9,10
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34,38,39,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/porygon.asm b/data/baseStats/porygon.asm
deleted file mode 100644
index 502bbc4f..00000000
--- a/data/baseStats/porygon.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_PORYGON ; pokedex id
-db 65 ; base hp
-db 60 ; base attack
-db 70 ; base defense
-db 40 ; base speed
-db 75 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 45 ; catch rate
-db 130 ; base exp yield
-INCBIN "pic/ymon/porygon.pic",0,1 ; 66, sprite dimensions
-dw PorygonPicFront
-dw PorygonPicBack
-; attacks known at lvl 0
-db TACKLE
-db SHARPEN
-db CONVERSION
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9,10,13,14,15
- tmlearn 20,24
- tmlearn 25,29,30,31,32
- tmlearn 33,34,39,40
- tmlearn 44,45,46
- tmlearn 49,50,55
-db 0 ; padding
diff --git a/data/baseStats/primeape.asm b/data/baseStats/primeape.asm
deleted file mode 100644
index 3eeac4f3..00000000
--- a/data/baseStats/primeape.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_PRIMEAPE ; pokedex id
-db 65 ; base hp
-db 105 ; base attack
-db 60 ; base defense
-db 95 ; base speed
-db 60 ; base special
-db FIGHTING ; species type 1
-db FIGHTING ; species type 2
-db 75 ; catch rate
-db 149 ; base exp yield
-INCBIN "pic/ymon/primeape.pic",0,1 ; 77, sprite dimensions
-dw PrimeapePicFront
-dw PrimeapePicBack
-; attacks known at lvl 0
-db SCRATCH
-db LEER
-db LOW_KICK
-db KARATE_CHOP
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,15,16
- tmlearn 17,18,19,20,24
- tmlearn 25,28,31,32
- tmlearn 34,35,39,40
- tmlearn 44,48
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/psyduck.asm b/data/baseStats/psyduck.asm
deleted file mode 100644
index e3ab72bb..00000000
--- a/data/baseStats/psyduck.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_PSYDUCK ; pokedex id
-db 50 ; base hp
-db 52 ; base attack
-db 48 ; base defense
-db 55 ; base speed
-db 50 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 190 ; catch rate
-db 80 ; base exp yield
-INCBIN "pic/ymon/psyduck.pic",0,1 ; 55, sprite dimensions
-dw PsyduckPicFront
-dw PsyduckPicBack
-; attacks known at lvl 0
-db SCRATCH
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14,16
- tmlearn 17,18,19,20
- tmlearn 28,31,32
- tmlearn 34,39,40
- tmlearn 44
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/raichu.asm b/data/baseStats/raichu.asm
deleted file mode 100644
index c63231b3..00000000
--- a/data/baseStats/raichu.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_RAICHU ; pokedex id
-db 60 ; base hp
-db 90 ; base attack
-db 55 ; base defense
-db 100 ; base speed
-db 90 ; base special
-db ELECTRIC ; species type 1
-db ELECTRIC ; species type 2
-db 75 ; catch rate
-db 122 ; base exp yield
-INCBIN "pic/ymon/raichu.pic",0,1 ; 77, sprite dimensions
-dw RaichuPicFront
-dw RaichuPicBack
-; attacks known at lvl 0
-db THUNDERSHOCK
-db GROWL
-db THUNDER_WAVE
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,15,16
- tmlearn 17,19,20,24
- tmlearn 25,31,32
- tmlearn 33,34,39,40
- tmlearn 44,45
- tmlearn 50,55
-db 0 ; padding
diff --git a/data/baseStats/rapidash.asm b/data/baseStats/rapidash.asm
deleted file mode 100644
index 18781739..00000000
--- a/data/baseStats/rapidash.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_RAPIDASH ; pokedex id
-db 65 ; base hp
-db 100 ; base attack
-db 70 ; base defense
-db 105 ; base speed
-db 80 ; base special
-db FIRE ; species type 1
-db FIRE ; species type 2
-db 60 ; catch rate
-db 192 ; base exp yield
-INCBIN "pic/ymon/rapidash.pic",0,1 ; 77, sprite dimensions
-dw RapidashPicFront
-dw RapidashPicBack
-; attacks known at lvl 0
-db EMBER
-db TAIL_WHIP
-db STOMP
-db GROWL
-db 0 ; growth rate
-; learnset
- tmlearn 6,7,8
- tmlearn 9,10,15
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34,38,39,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/raticate.asm b/data/baseStats/raticate.asm
deleted file mode 100644
index 85aa044b..00000000
--- a/data/baseStats/raticate.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_RATICATE ; pokedex id
-db 55 ; base hp
-db 81 ; base attack
-db 60 ; base defense
-db 97 ; base speed
-db 50 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 90 ; catch rate
-db 116 ; base exp yield
-INCBIN "pic/ymon/raticate.pic",0,1 ; 66, sprite dimensions
-dw RaticatePicFront
-dw RaticatePicBack
-; attacks known at lvl 0
-db TACKLE
-db TAIL_WHIP
-db QUICK_ATTACK
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 20,24
- tmlearn 25,28,31,32
- tmlearn 34,39,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/rattata.asm b/data/baseStats/rattata.asm
deleted file mode 100644
index 165dce14..00000000
--- a/data/baseStats/rattata.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_RATTATA ; pokedex id
-db 30 ; base hp
-db 56 ; base attack
-db 35 ; base defense
-db 72 ; base speed
-db 25 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 255 ; catch rate
-db 57 ; base exp yield
-INCBIN "pic/ymon/rattata.pic",0,1 ; 55, sprite dimensions
-dw RattataPicFront
-dw RattataPicBack
-; attacks known at lvl 0
-db TACKLE
-db TAIL_WHIP
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,11,12,14
- tmlearn 20,24
- tmlearn 25,28,31,32
- tmlearn 34,39,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/rhydon.asm b/data/baseStats/rhydon.asm
deleted file mode 100644
index b183c282..00000000
--- a/data/baseStats/rhydon.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_RHYDON ; pokedex id
-db 105 ; base hp
-db 130 ; base attack
-db 120 ; base defense
-db 40 ; base speed
-db 45 ; base special
-db GROUND ; species type 1
-db ROCK ; species type 2
-db 60 ; catch rate
-db 204 ; base exp yield
-INCBIN "pic/ymon/rhydon.pic",0,1 ; 77, sprite dimensions
-dw RhydonPicFront
-dw RhydonPicBack
-; attacks known at lvl 0
-db HORN_ATTACK
-db STOMP
-db TAIL_WHIP
-db FURY_ATTACK
-db 5 ; growth rate
-; learnset
- tmlearn 1,5,6,7,8
- tmlearn 9,10,11,12,13,14,15,16
- tmlearn 17,18,19,20,24
- tmlearn 25,26,27,28,31,32
- tmlearn 34,38,40
- tmlearn 44,48
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/rhyhorn.asm b/data/baseStats/rhyhorn.asm
deleted file mode 100644
index 41a1e360..00000000
--- a/data/baseStats/rhyhorn.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_RHYHORN ; pokedex id
-db 80 ; base hp
-db 85 ; base attack
-db 95 ; base defense
-db 25 ; base speed
-db 30 ; base special
-db GROUND ; species type 1
-db ROCK ; species type 2
-db 120 ; catch rate
-db 135 ; base exp yield
-INCBIN "pic/ymon/rhyhorn.pic",0,1 ; 77, sprite dimensions
-dw RhyhornPicFront
-dw RhyhornPicBack
-; attacks known at lvl 0
-db HORN_ATTACK
-db 0
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 6,7,8
- tmlearn 9,10
- tmlearn 20,24
- tmlearn 25,26,27,28,31,32
- tmlearn 34,38,40
- tmlearn 44,48
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/sandshrew.asm b/data/baseStats/sandshrew.asm
deleted file mode 100644
index b4c6abb8..00000000
--- a/data/baseStats/sandshrew.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_SANDSHREW ; pokedex id
-db 50 ; base hp
-db 75 ; base attack
-db 85 ; base defense
-db 40 ; base speed
-db 30 ; base special
-db GROUND ; species type 1
-db GROUND ; species type 2
-db 255 ; catch rate
-db 93 ; base exp yield
-INCBIN "pic/ymon/sandshrew.pic",0,1 ; 55, sprite dimensions
-dw SandshrewPicFront
-dw SandshrewPicBack
-; attacks known at lvl 0
-db SCRATCH
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 3,6,8
- tmlearn 9,10
- tmlearn 17,19,20
- tmlearn 26,27,28,31,32
- tmlearn 34,39,40
- tmlearn 44,48
- tmlearn 50,51,54
-db 0 ; padding
diff --git a/data/baseStats/sandslash.asm b/data/baseStats/sandslash.asm
deleted file mode 100644
index e47467ef..00000000
--- a/data/baseStats/sandslash.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_SANDSLASH ; pokedex id
-db 75 ; base hp
-db 100 ; base attack
-db 110 ; base defense
-db 65 ; base speed
-db 55 ; base special
-db GROUND ; species type 1
-db GROUND ; species type 2
-db 90 ; catch rate
-db 163 ; base exp yield
-INCBIN "pic/ymon/sandslash.pic",0,1 ; 66, sprite dimensions
-dw SandslashPicFront
-dw SandslashPicBack
-; attacks known at lvl 0
-db SCRATCH
-db SAND_ATTACK
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 3,6,8
- tmlearn 9,10,15
- tmlearn 17,19,20
- tmlearn 26,27,28,31,32
- tmlearn 34,39,40
- tmlearn 44,48
- tmlearn 50,51,54
-db 0 ; padding
diff --git a/data/baseStats/scyther.asm b/data/baseStats/scyther.asm
deleted file mode 100644
index ea3f3cba..00000000
--- a/data/baseStats/scyther.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_SCYTHER ; pokedex id
-db 70 ; base hp
-db 110 ; base attack
-db 80 ; base defense
-db 105 ; base speed
-db 55 ; base special
-db BUG ; species type 1
-db FLYING ; species type 2
-db 45 ; catch rate
-db 187 ; base exp yield
-INCBIN "pic/ymon/scyther.pic",0,1 ; 77, sprite dimensions
-dw ScytherPicFront
-dw ScytherPicBack
-; attacks known at lvl 0
-db QUICK_ATTACK
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 3,6
- tmlearn 9,10,15
- tmlearn 20
- tmlearn 31,32
- tmlearn 34,39,40
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/seadra.asm b/data/baseStats/seadra.asm
deleted file mode 100644
index 4f5614af..00000000
--- a/data/baseStats/seadra.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_SEADRA ; pokedex id
-db 55 ; base hp
-db 65 ; base attack
-db 95 ; base defense
-db 85 ; base speed
-db 95 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 75 ; catch rate
-db 155 ; base exp yield
-INCBIN "pic/ymon/seadra.pic",0,1 ; 66, sprite dimensions
-dw SeadraPicFront
-dw SeadraPicBack
-; attacks known at lvl 0
-db BUBBLE
-db SMOKESCREEN
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9,10,11,12,13,14,15
- tmlearn 20
- tmlearn 31,32
- tmlearn 34,39,40
- tmlearn 44
- tmlearn 50,53
-db 0 ; padding
diff --git a/data/baseStats/seaking.asm b/data/baseStats/seaking.asm
deleted file mode 100644
index de983475..00000000
--- a/data/baseStats/seaking.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_SEAKING ; pokedex id
-db 80 ; base hp
-db 92 ; base attack
-db 65 ; base defense
-db 68 ; base speed
-db 80 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 60 ; catch rate
-db 170 ; base exp yield
-INCBIN "pic/ymon/seaking.pic",0,1 ; 77, sprite dimensions
-dw SeakingPicFront
-dw SeakingPicBack
-; attacks known at lvl 0
-db PECK
-db TAIL_WHIP
-db SUPERSONIC
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,7
- tmlearn 9,10,11,12,13,14,15
- tmlearn 20
- tmlearn 31,32
- tmlearn 34,39,40
- tmlearn 44
- tmlearn 50,53
-db 0 ; padding
diff --git a/data/baseStats/seel.asm b/data/baseStats/seel.asm
deleted file mode 100644
index 4a82ad72..00000000
--- a/data/baseStats/seel.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_SEEL ; pokedex id
-db 65 ; base hp
-db 45 ; base attack
-db 55 ; base defense
-db 45 ; base speed
-db 70 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 190 ; catch rate
-db 100 ; base exp yield
-INCBIN "pic/ymon/seel.pic",0,1 ; 66, sprite dimensions
-dw SeelPicFront
-dw SeelPicBack
-; attacks known at lvl 0
-db HEADBUTT
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,7,8
- tmlearn 9,10,11,12,13,14,16
- tmlearn 20
- tmlearn 31,32
- tmlearn 34,40
- tmlearn 44
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/shellder.asm b/data/baseStats/shellder.asm
deleted file mode 100644
index 1a4644cb..00000000
--- a/data/baseStats/shellder.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_SHELLDER ; pokedex id
-db 30 ; base hp
-db 65 ; base attack
-db 100 ; base defense
-db 40 ; base speed
-db 45 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 190 ; catch rate
-db 97 ; base exp yield
-INCBIN "pic/ymon/shellder.pic",0,1 ; 55, sprite dimensions
-dw ShellderPicFront
-dw ShellderPicBack
-; attacks known at lvl 0
-db TACKLE
-db WITHDRAW
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9,10,11,12,13,14
- tmlearn 20
- tmlearn 30,31,32
- tmlearn 33,34,36,39
- tmlearn 44,47
- tmlearn 49,50,53
-db 0 ; padding
diff --git a/data/baseStats/slowbro.asm b/data/baseStats/slowbro.asm
deleted file mode 100644
index f471a646..00000000
--- a/data/baseStats/slowbro.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_SLOWBRO ; pokedex id
-db 95 ; base hp
-db 75 ; base attack
-db 110 ; base defense
-db 30 ; base speed
-db 80 ; base special
-db WATER ; species type 1
-db PSYCHIC ; species type 2
-db 75 ; catch rate
-db 164 ; base exp yield
-INCBIN "pic/ymon/slowbro.pic",0,1 ; 77, sprite dimensions
-dw SlowbroPicFront
-dw SlowbroPicBack
-; attacks known at lvl 0
-db CONFUSION
-db DISABLE
-db HEADBUTT
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14,15,16
- tmlearn 17,18,19,20
- tmlearn 26,27,28,29,30,31,32
- tmlearn 33,34,38,39,40
- tmlearn 44,45,46
- tmlearn 49,50,53,54,55
-db 0 ; padding
diff --git a/data/baseStats/slowpoke.asm b/data/baseStats/slowpoke.asm
deleted file mode 100644
index f7a1a510..00000000
--- a/data/baseStats/slowpoke.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_SLOWPOKE ; pokedex id
-db 90 ; base hp
-db 65 ; base attack
-db 65 ; base defense
-db 15 ; base speed
-db 40 ; base special
-db WATER ; species type 1
-db PSYCHIC ; species type 2
-db 190 ; catch rate
-db 99 ; base exp yield
-INCBIN "pic/ymon/slowpoke.pic",0,1 ; 55, sprite dimensions
-dw SlowpokePicFront
-dw SlowpokePicBack
-; attacks known at lvl 0
-db CONFUSION
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,11,12,13,14,16
- tmlearn 20
- tmlearn 26,27,28,29,30,31,32
- tmlearn 33,34,38,39,40
- tmlearn 44,45,46
- tmlearn 49,50,53,54,55
-db 0 ; padding
diff --git a/data/baseStats/snorlax.asm b/data/baseStats/snorlax.asm
deleted file mode 100644
index 62144d31..00000000
--- a/data/baseStats/snorlax.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_SNORLAX ; pokedex id
-db 160 ; base hp
-db 110 ; base attack
-db 65 ; base defense
-db 30 ; base speed
-db 65 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 25 ; catch rate
-db 154 ; base exp yield
-INCBIN "pic/ymon/snorlax.pic",0,1 ; 77, sprite dimensions
-dw SnorlaxPicFront
-dw SnorlaxPicBack
-; attacks known at lvl 0
-db HEADBUTT
-db AMNESIA
-db REST
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14,15,16
- tmlearn 17,18,19,20,22,24
- tmlearn 25,26,27,29,31,32
- tmlearn 33,34,35,36,38,40
- tmlearn 44,46,48
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/spearow.asm b/data/baseStats/spearow.asm
deleted file mode 100644
index b7d35b3a..00000000
--- a/data/baseStats/spearow.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_SPEAROW ; pokedex id
-db 40 ; base hp
-db 60 ; base attack
-db 30 ; base defense
-db 70 ; base speed
-db 31 ; base special
-db NORMAL ; species type 1
-db FLYING ; species type 2
-db 255 ; catch rate
-db 58 ; base exp yield
-INCBIN "pic/ymon/spearow.pic",0,1 ; 55, sprite dimensions
-dw SpearowPicFront
-dw SpearowPicBack
-; attacks known at lvl 0
-db PECK
-db GROWL
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 2,4,6
- tmlearn 9,10
- tmlearn 20
- tmlearn 31,32
- tmlearn 34,39
- tmlearn 43,44
- tmlearn 50,52
-db 0 ; padding
diff --git a/data/baseStats/squirtle.asm b/data/baseStats/squirtle.asm
deleted file mode 100644
index 1d302a00..00000000
--- a/data/baseStats/squirtle.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_SQUIRTLE ; pokedex id
-db 44 ; base hp
-db 48 ; base attack
-db 65 ; base defense
-db 43 ; base speed
-db 50 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 45 ; catch rate
-db 66 ; base exp yield
-INCBIN "pic/ymon/squirtle.pic",0,1 ; 55, sprite dimensions
-dw SquirtlePicFront
-dw SquirtlePicBack
-; attacks known at lvl 0
-db TACKLE
-db TAIL_WHIP
-db 0
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14
- tmlearn 17,18,19,20
- tmlearn 28,31,32
- tmlearn 33,34,40
- tmlearn 44
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/starmie.asm b/data/baseStats/starmie.asm
deleted file mode 100644
index 8ef77af8..00000000
--- a/data/baseStats/starmie.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_STARMIE ; pokedex id
-db 60 ; base hp
-db 75 ; base attack
-db 85 ; base defense
-db 115 ; base speed
-db 100 ; base special
-db WATER ; species type 1
-db PSYCHIC ; species type 2
-db 60 ; catch rate
-db 207 ; base exp yield
-INCBIN "pic/ymon/starmie.pic",0,1 ; 66, sprite dimensions
-dw StarmiePicFront
-dw StarmiePicBack
-; attacks known at lvl 0
-db TACKLE
-db WATER_GUN
-db HARDEN
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9,10,11,12,13,14,15
- tmlearn 20,24
- tmlearn 25,29,30,31,32
- tmlearn 33,34,39,40
- tmlearn 44,45,46
- tmlearn 49,50,53,55
-db 0 ; padding
diff --git a/data/baseStats/staryu.asm b/data/baseStats/staryu.asm
deleted file mode 100644
index bc774f42..00000000
--- a/data/baseStats/staryu.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_STARYU ; pokedex id
-db 30 ; base hp
-db 45 ; base attack
-db 55 ; base defense
-db 85 ; base speed
-db 70 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 225 ; catch rate
-db 106 ; base exp yield
-INCBIN "pic/ymon/staryu.pic",0,1 ; 66, sprite dimensions
-dw StaryuPicFront
-dw StaryuPicBack
-; attacks known at lvl 0
-db TACKLE
-db 0
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9,10,11,12,13,14
- tmlearn 20,24
- tmlearn 25,29,30,31,32
- tmlearn 33,34,39,40
- tmlearn 44,45,46
- tmlearn 49,50,53,55
-db 0 ; padding
diff --git a/data/baseStats/tangela.asm b/data/baseStats/tangela.asm
deleted file mode 100644
index 8b76bde5..00000000
--- a/data/baseStats/tangela.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_TANGELA ; pokedex id
-db 65 ; base hp
-db 55 ; base attack
-db 115 ; base defense
-db 60 ; base speed
-db 100 ; base special
-db GRASS ; species type 1
-db GRASS ; species type 2
-db 45 ; catch rate
-db 166 ; base exp yield
-INCBIN "pic/ymon/tangela.pic",0,1 ; 66, sprite dimensions
-dw TangelaPicFront
-dw TangelaPicBack
-; attacks known at lvl 0
-db CONSTRICT
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 3,6,8
- tmlearn 9,10,15
- tmlearn 20,21,22
- tmlearn 31,32
- tmlearn 34,40
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/tauros.asm b/data/baseStats/tauros.asm
deleted file mode 100644
index ac55ed65..00000000
--- a/data/baseStats/tauros.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_TAUROS ; pokedex id
-db 75 ; base hp
-db 100 ; base attack
-db 95 ; base defense
-db 110 ; base speed
-db 70 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 45 ; catch rate
-db 211 ; base exp yield
-INCBIN "pic/ymon/tauros.pic",0,1 ; 77, sprite dimensions
-dw TaurosPicFront
-dw TaurosPicBack
-; attacks known at lvl 0
-db TACKLE
-db 0
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 6,7,8
- tmlearn 9,10,13,14,15
- tmlearn 20,24
- tmlearn 25,26,27,31,32
- tmlearn 34,38,40
- tmlearn 44
- tmlearn 50,54
-db 0 ; padding
diff --git a/data/baseStats/tentacool.asm b/data/baseStats/tentacool.asm
deleted file mode 100644
index 123d904c..00000000
--- a/data/baseStats/tentacool.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_TENTACOOL ; pokedex id
-db 40 ; base hp
-db 40 ; base attack
-db 35 ; base defense
-db 70 ; base speed
-db 100 ; base special
-db WATER ; species type 1
-db POISON ; species type 2
-db 190 ; catch rate
-db 105 ; base exp yield
-INCBIN "pic/ymon/tentacool.pic",0,1 ; 55, sprite dimensions
-dw TentacoolPicFront
-dw TentacoolPicBack
-; attacks known at lvl 0
-db ACID
-db 0
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 3,6
- tmlearn 9,10,11,12,13,14
- tmlearn 20,21
- tmlearn 31,32
- tmlearn 33,34,40
- tmlearn 44
- tmlearn 50,51,53
-db 0 ; padding
diff --git a/data/baseStats/tentacruel.asm b/data/baseStats/tentacruel.asm
deleted file mode 100644
index 9c65fe15..00000000
--- a/data/baseStats/tentacruel.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_TENTACRUEL ; pokedex id
-db 80 ; base hp
-db 70 ; base attack
-db 65 ; base defense
-db 100 ; base speed
-db 120 ; base special
-db WATER ; species type 1
-db POISON ; species type 2
-db 60 ; catch rate
-db 205 ; base exp yield
-INCBIN "pic/ymon/tentacruel.pic",0,1 ; 66, sprite dimensions
-dw TentacruelPicFront
-dw TentacruelPicBack
-; attacks known at lvl 0
-db ACID
-db SUPERSONIC
-db WRAP
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 3,6
- tmlearn 9,10,11,12,13,14,15
- tmlearn 20,21
- tmlearn 31,32
- tmlearn 33,34,40
- tmlearn 44
- tmlearn 50,51,53
-db 0 ; padding
diff --git a/data/baseStats/vaporeon.asm b/data/baseStats/vaporeon.asm
deleted file mode 100644
index 3d5024b5..00000000
--- a/data/baseStats/vaporeon.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_VAPOREON ; pokedex id
-db 130 ; base hp
-db 65 ; base attack
-db 60 ; base defense
-db 65 ; base speed
-db 110 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 45 ; catch rate
-db 196 ; base exp yield
-INCBIN "pic/ymon/vaporeon.pic",0,1 ; 66, sprite dimensions
-dw VaporeonPicFront
-dw VaporeonPicBack
-; attacks known at lvl 0
-db TACKLE
-db TAIL_WHIP
-db QUICK_ATTACK
-db WATER_GUN
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 20
- tmlearn 31,32
- tmlearn 33,34,39,40
- tmlearn 44
- tmlearn 50,53
-db 0 ; padding
diff --git a/data/baseStats/venomoth.asm b/data/baseStats/venomoth.asm
deleted file mode 100644
index 6709e42a..00000000
--- a/data/baseStats/venomoth.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_VENOMOTH ; pokedex id
-db 70 ; base hp
-db 65 ; base attack
-db 60 ; base defense
-db 90 ; base speed
-db 90 ; base special
-db BUG ; species type 1
-db POISON ; species type 2
-db 75 ; catch rate
-db 138 ; base exp yield
-INCBIN "pic/ymon/venomoth.pic",0,1 ; 77, sprite dimensions
-dw VenomothPicFront
-dw VenomothPicBack
-; attacks known at lvl 0
-db TACKLE
-db DISABLE
-db SUPERSONIC
-db CONFUSION
-db 0 ; growth rate
-; learnset
- tmlearn 2,4,6
- tmlearn 9,10,15
- tmlearn 20,21,22
- tmlearn 29,30,31,32
- tmlearn 33,34,39
- tmlearn 44,46
- tmlearn 50,55
-db 0 ; padding
diff --git a/data/baseStats/venonat.asm b/data/baseStats/venonat.asm
deleted file mode 100644
index ef3db9a1..00000000
--- a/data/baseStats/venonat.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_VENONAT ; pokedex id
-db 60 ; base hp
-db 55 ; base attack
-db 50 ; base defense
-db 45 ; base speed
-db 40 ; base special
-db BUG ; species type 1
-db POISON ; species type 2
-db 190 ; catch rate
-db 75 ; base exp yield
-INCBIN "pic/ymon/venonat.pic",0,1 ; 55, sprite dimensions
-dw VenonatPicFront
-dw VenonatPicBack
-; attacks known at lvl 0
-db TACKLE
-db DISABLE
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9,10
- tmlearn 20,21,22
- tmlearn 29,31,32
- tmlearn 33,34
- tmlearn 44,46
- tmlearn 50,55
-db 0 ; padding
diff --git a/data/baseStats/venusaur.asm b/data/baseStats/venusaur.asm
deleted file mode 100644
index d3725735..00000000
--- a/data/baseStats/venusaur.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_VENUSAUR ; pokedex id
-db 80 ; base hp
-db 82 ; base attack
-db 83 ; base defense
-db 80 ; base speed
-db 100 ; base special
-db GRASS ; species type 1
-db POISON ; species type 2
-db 45 ; catch rate
-db 208 ; base exp yield
-INCBIN "pic/ymon/venusaur.pic",0,1 ; 77, sprite dimensions
-dw VenusaurPicFront
-dw VenusaurPicBack
-; attacks known at lvl 0
-db TACKLE
-db GROWL
-db LEECH_SEED
-db VINE_WHIP
-db 3 ; growth rate
-; learnset
- tmlearn 3,6,8
- tmlearn 9,10,15
- tmlearn 20,21,22
- tmlearn 31,32
- tmlearn 33,34
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/victreebel.asm b/data/baseStats/victreebel.asm
deleted file mode 100644
index 56bfd25a..00000000
--- a/data/baseStats/victreebel.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_VICTREEBEL ; pokedex id
-db 80 ; base hp
-db 105 ; base attack
-db 65 ; base defense
-db 70 ; base speed
-db 100 ; base special
-db GRASS ; species type 1
-db POISON ; species type 2
-db 45 ; catch rate
-db 191 ; base exp yield
-INCBIN "pic/ymon/victreebel.pic",0,1 ; 77, sprite dimensions
-dw VictreebelPicFront
-dw VictreebelPicBack
-; attacks known at lvl 0
-db SLEEP_POWDER
-db STUN_SPORE
-db ACID
-db RAZOR_LEAF
-db 3 ; growth rate
-; learnset
- tmlearn 3,6,8
- tmlearn 9,10,15
- tmlearn 20,21,22
- tmlearn 31,32
- tmlearn 33,34
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/vileplume.asm b/data/baseStats/vileplume.asm
deleted file mode 100644
index ed463650..00000000
--- a/data/baseStats/vileplume.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_VILEPLUME ; pokedex id
-db 75 ; base hp
-db 80 ; base attack
-db 85 ; base defense
-db 50 ; base speed
-db 100 ; base special
-db GRASS ; species type 1
-db POISON ; species type 2
-db 45 ; catch rate
-db 184 ; base exp yield
-INCBIN "pic/ymon/vileplume.pic",0,1 ; 77, sprite dimensions
-dw VileplumePicFront
-dw VileplumePicBack
-; attacks known at lvl 0
-db STUN_SPORE
-db SLEEP_POWDER
-db ACID
-db PETAL_DANCE
-db 3 ; growth rate
-; learnset
- tmlearn 3,6,8
- tmlearn 9,10,15
- tmlearn 20,21,22
- tmlearn 31,32
- tmlearn 33,34
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/voltorb.asm b/data/baseStats/voltorb.asm
deleted file mode 100644
index ffd12992..00000000
--- a/data/baseStats/voltorb.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_VOLTORB ; pokedex id
-db 40 ; base hp
-db 30 ; base attack
-db 50 ; base defense
-db 100 ; base speed
-db 55 ; base special
-db ELECTRIC ; species type 1
-db ELECTRIC ; species type 2
-db 190 ; catch rate
-db 103 ; base exp yield
-INCBIN "pic/ymon/voltorb.pic",0,1 ; 55, sprite dimensions
-dw VoltorbPicFront
-dw VoltorbPicBack
-; attacks known at lvl 0
-db TACKLE
-db SCREECH
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 9
- tmlearn 20,24
- tmlearn 25,30,31,32
- tmlearn 33,34,36,39
- tmlearn 44,45,47
- tmlearn 50,55
-db 0 ; padding
diff --git a/data/baseStats/vulpix.asm b/data/baseStats/vulpix.asm
deleted file mode 100644
index b67b9bbd..00000000
--- a/data/baseStats/vulpix.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_VULPIX ; pokedex id
-db 38 ; base hp
-db 41 ; base attack
-db 40 ; base defense
-db 65 ; base speed
-db 65 ; base special
-db FIRE ; species type 1
-db FIRE ; species type 2
-db 190 ; catch rate
-db 63 ; base exp yield
-INCBIN "pic/ymon/vulpix.pic",0,1 ; 66, sprite dimensions
-dw VulpixPicFront
-dw VulpixPicBack
-; attacks known at lvl 0
-db EMBER
-db TAIL_WHIP
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6,8
- tmlearn 9,10
- tmlearn 20
- tmlearn 28,31,32
- tmlearn 33,34,38,39,40
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/wartortle.asm b/data/baseStats/wartortle.asm
deleted file mode 100644
index daf85dc6..00000000
--- a/data/baseStats/wartortle.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_WARTORTLE ; pokedex id
-db 59 ; base hp
-db 63 ; base attack
-db 80 ; base defense
-db 58 ; base speed
-db 65 ; base special
-db WATER ; species type 1
-db WATER ; species type 2
-db 45 ; catch rate
-db 143 ; base exp yield
-INCBIN "pic/ymon/wartortle.pic",0,1 ; 66, sprite dimensions
-dw WartortlePicFront
-dw WartortlePicBack
-; attacks known at lvl 0
-db TACKLE
-db TAIL_WHIP
-db BUBBLE
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14
- tmlearn 17,18,19,20
- tmlearn 28,31,32
- tmlearn 33,34,40
- tmlearn 44
- tmlearn 50,53,54
-db 0 ; padding
diff --git a/data/baseStats/weedle.asm b/data/baseStats/weedle.asm
deleted file mode 100644
index 44ca5c2c..00000000
--- a/data/baseStats/weedle.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_WEEDLE ; pokedex id
-db 40 ; base hp
-db 35 ; base attack
-db 30 ; base defense
-db 50 ; base speed
-db 20 ; base special
-db BUG ; species type 1
-db POISON ; species type 2
-db 255 ; catch rate
-db 52 ; base exp yield
-INCBIN "pic/ymon/weedle.pic",0,1 ; 55, sprite dimensions
-dw WeedlePicFront
-dw WeedlePicBack
-; attacks known at lvl 0
-db POISON_STING
-db STRING_SHOT
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
- tmlearn 0
-db 0 ; padding
diff --git a/data/baseStats/weepinbell.asm b/data/baseStats/weepinbell.asm
deleted file mode 100644
index 0ac287f8..00000000
--- a/data/baseStats/weepinbell.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_WEEPINBELL ; pokedex id
-db 65 ; base hp
-db 90 ; base attack
-db 50 ; base defense
-db 55 ; base speed
-db 85 ; base special
-db GRASS ; species type 1
-db POISON ; species type 2
-db 120 ; catch rate
-db 151 ; base exp yield
-INCBIN "pic/ymon/weepinbell.pic",0,1 ; 66, sprite dimensions
-dw WeepinbellPicFront
-dw WeepinbellPicBack
-; attacks known at lvl 0
-db VINE_WHIP
-db GROWTH
-db WRAP
-db 0
-db 3 ; growth rate
-; learnset
- tmlearn 3,6
- tmlearn 9,10
- tmlearn 20,21,22
- tmlearn 31,32
- tmlearn 33,34
- tmlearn 44
- tmlearn 50,51
-db 0 ; padding
diff --git a/data/baseStats/weezing.asm b/data/baseStats/weezing.asm
deleted file mode 100644
index 089ef495..00000000
--- a/data/baseStats/weezing.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_WEEZING ; pokedex id
-db 65 ; base hp
-db 90 ; base attack
-db 120 ; base defense
-db 60 ; base speed
-db 85 ; base special
-db POISON ; species type 1
-db POISON ; species type 2
-db 60 ; catch rate
-db 173 ; base exp yield
-INCBIN "pic/ymon/weezing.pic",0,1 ; 77, sprite dimensions
-dw WeezingPicFront
-dw WeezingPicBack
-; attacks known at lvl 0
-db TACKLE
-db SMOG
-db SLUDGE
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 6
- tmlearn 15
- tmlearn 20,24
- tmlearn 25,31,32
- tmlearn 34,36,38
- tmlearn 44,47
- tmlearn 50
-db 0 ; padding
diff --git a/data/baseStats/wigglytuff.asm b/data/baseStats/wigglytuff.asm
deleted file mode 100644
index 815b1244..00000000
--- a/data/baseStats/wigglytuff.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_WIGGLYTUFF ; pokedex id
-db 140 ; base hp
-db 70 ; base attack
-db 45 ; base defense
-db 45 ; base speed
-db 50 ; base special
-db NORMAL ; species type 1
-db NORMAL ; species type 2
-db 50 ; catch rate
-db 109 ; base exp yield
-INCBIN "pic/ymon/wigglytuff.pic",0,1 ; 66, sprite dimensions
-dw WigglytuffPicFront
-dw WigglytuffPicBack
-; attacks known at lvl 0
-db SING
-db DISABLE
-db DEFENSE_CURL
-db DOUBLESLAP
-db 4 ; growth rate
-; learnset
- tmlearn 1,5,6,8
- tmlearn 9,10,11,12,13,14,15
- tmlearn 17,18,19,20,22,24
- tmlearn 25,29,30,31,32
- tmlearn 33,34,38,40
- tmlearn 44,45,46
- tmlearn 49,50,54,55
-db 0 ; padding
diff --git a/data/baseStats/zapdos.asm b/data/baseStats/zapdos.asm
deleted file mode 100644
index b7befb99..00000000
--- a/data/baseStats/zapdos.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_ZAPDOS ; pokedex id
-db 90 ; base hp
-db 90 ; base attack
-db 85 ; base defense
-db 100 ; base speed
-db 125 ; base special
-db ELECTRIC ; species type 1
-db FLYING ; species type 2
-db 3 ; catch rate
-db 216 ; base exp yield
-INCBIN "pic/ymon/zapdos.pic",0,1 ; 77, sprite dimensions
-dw ZapdosPicFront
-dw ZapdosPicBack
-; attacks known at lvl 0
-db THUNDERSHOCK
-db DRILL_PECK
-db 0
-db 0
-db 5 ; growth rate
-; learnset
- tmlearn 2,4,6
- tmlearn 9,10,15
- tmlearn 20,24
- tmlearn 25,31,32
- tmlearn 33,34,39
- tmlearn 43,44,45
- tmlearn 50,52,55
-db 0 ; padding
diff --git a/data/baseStats/zubat.asm b/data/baseStats/zubat.asm
deleted file mode 100644
index 7ddad05c..00000000
--- a/data/baseStats/zubat.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-db DEX_ZUBAT ; pokedex id
-db 40 ; base hp
-db 45 ; base attack
-db 35 ; base defense
-db 55 ; base speed
-db 40 ; base special
-db POISON ; species type 1
-db FLYING ; species type 2
-db 255 ; catch rate
-db 54 ; base exp yield
-INCBIN "pic/ymon/zubat.pic",0,1 ; 55, sprite dimensions
-dw ZubatPicFront
-dw ZubatPicBack
-; attacks known at lvl 0
-db LEECH_LIFE
-db 0
-db 0
-db 0
-db 0 ; growth rate
-; learnset
- tmlearn 2,4,6
- tmlearn 9,10
- tmlearn 20,21
- tmlearn 31,32
- tmlearn 34,39
- tmlearn 44
- tmlearn 50
-db 0 ; padding
diff --git a/data/base_stats.asm b/data/base_stats.asm
deleted file mode 100755
index 23e85e0f..00000000
--- a/data/base_stats.asm
+++ /dev/null
@@ -1,151 +0,0 @@
-INCLUDE "data/baseStats/bulbasaur.asm"
-INCLUDE "data/baseStats/ivysaur.asm"
-INCLUDE "data/baseStats/venusaur.asm"
-INCLUDE "data/baseStats/charmander.asm"
-INCLUDE "data/baseStats/charmeleon.asm"
-INCLUDE "data/baseStats/charizard.asm"
-INCLUDE "data/baseStats/squirtle.asm"
-INCLUDE "data/baseStats/wartortle.asm"
-INCLUDE "data/baseStats/blastoise.asm"
-INCLUDE "data/baseStats/caterpie.asm"
-INCLUDE "data/baseStats/metapod.asm"
-INCLUDE "data/baseStats/butterfree.asm"
-INCLUDE "data/baseStats/weedle.asm"
-INCLUDE "data/baseStats/kakuna.asm"
-INCLUDE "data/baseStats/beedrill.asm"
-INCLUDE "data/baseStats/pidgey.asm"
-INCLUDE "data/baseStats/pidgeotto.asm"
-INCLUDE "data/baseStats/pidgeot.asm"
-INCLUDE "data/baseStats/rattata.asm"
-INCLUDE "data/baseStats/raticate.asm"
-INCLUDE "data/baseStats/spearow.asm"
-INCLUDE "data/baseStats/fearow.asm"
-INCLUDE "data/baseStats/ekans.asm"
-INCLUDE "data/baseStats/arbok.asm"
-INCLUDE "data/baseStats/pikachu.asm"
-INCLUDE "data/baseStats/raichu.asm"
-INCLUDE "data/baseStats/sandshrew.asm"
-INCLUDE "data/baseStats/sandslash.asm"
-INCLUDE "data/baseStats/nidoranf.asm"
-INCLUDE "data/baseStats/nidorina.asm"
-INCLUDE "data/baseStats/nidoqueen.asm"
-INCLUDE "data/baseStats/nidoranm.asm"
-INCLUDE "data/baseStats/nidorino.asm"
-INCLUDE "data/baseStats/nidoking.asm"
-INCLUDE "data/baseStats/clefairy.asm"
-INCLUDE "data/baseStats/clefable.asm"
-INCLUDE "data/baseStats/vulpix.asm"
-INCLUDE "data/baseStats/ninetales.asm"
-INCLUDE "data/baseStats/jigglypuff.asm"
-INCLUDE "data/baseStats/wigglytuff.asm"
-INCLUDE "data/baseStats/zubat.asm"
-INCLUDE "data/baseStats/golbat.asm"
-INCLUDE "data/baseStats/oddish.asm"
-INCLUDE "data/baseStats/gloom.asm"
-INCLUDE "data/baseStats/vileplume.asm"
-INCLUDE "data/baseStats/paras.asm"
-INCLUDE "data/baseStats/parasect.asm"
-INCLUDE "data/baseStats/venonat.asm"
-INCLUDE "data/baseStats/venomoth.asm"
-INCLUDE "data/baseStats/diglett.asm"
-INCLUDE "data/baseStats/dugtrio.asm"
-INCLUDE "data/baseStats/meowth.asm"
-INCLUDE "data/baseStats/persian.asm"
-INCLUDE "data/baseStats/psyduck.asm"
-INCLUDE "data/baseStats/golduck.asm"
-INCLUDE "data/baseStats/mankey.asm"
-INCLUDE "data/baseStats/primeape.asm"
-INCLUDE "data/baseStats/growlithe.asm"
-INCLUDE "data/baseStats/arcanine.asm"
-INCLUDE "data/baseStats/poliwag.asm"
-INCLUDE "data/baseStats/poliwhirl.asm"
-INCLUDE "data/baseStats/poliwrath.asm"
-INCLUDE "data/baseStats/abra.asm"
-INCLUDE "data/baseStats/kadabra.asm"
-INCLUDE "data/baseStats/alakazam.asm"
-INCLUDE "data/baseStats/machop.asm"
-INCLUDE "data/baseStats/machoke.asm"
-INCLUDE "data/baseStats/machamp.asm"
-INCLUDE "data/baseStats/bellsprout.asm"
-INCLUDE "data/baseStats/weepinbell.asm"
-INCLUDE "data/baseStats/victreebel.asm"
-INCLUDE "data/baseStats/tentacool.asm"
-INCLUDE "data/baseStats/tentacruel.asm"
-INCLUDE "data/baseStats/geodude.asm"
-INCLUDE "data/baseStats/graveler.asm"
-INCLUDE "data/baseStats/golem.asm"
-INCLUDE "data/baseStats/ponyta.asm"
-INCLUDE "data/baseStats/rapidash.asm"
-INCLUDE "data/baseStats/slowpoke.asm"
-INCLUDE "data/baseStats/slowbro.asm"
-INCLUDE "data/baseStats/magnemite.asm"
-INCLUDE "data/baseStats/magneton.asm"
-INCLUDE "data/baseStats/farfetchd.asm"
-INCLUDE "data/baseStats/doduo.asm"
-INCLUDE "data/baseStats/dodrio.asm"
-INCLUDE "data/baseStats/seel.asm"
-INCLUDE "data/baseStats/dewgong.asm"
-INCLUDE "data/baseStats/grimer.asm"
-INCLUDE "data/baseStats/muk.asm"
-INCLUDE "data/baseStats/shellder.asm"
-INCLUDE "data/baseStats/cloyster.asm"
-INCLUDE "data/baseStats/gastly.asm"
-INCLUDE "data/baseStats/haunter.asm"
-INCLUDE "data/baseStats/gengar.asm"
-INCLUDE "data/baseStats/onix.asm"
-INCLUDE "data/baseStats/drowzee.asm"
-INCLUDE "data/baseStats/hypno.asm"
-INCLUDE "data/baseStats/krabby.asm"
-INCLUDE "data/baseStats/kingler.asm"
-INCLUDE "data/baseStats/voltorb.asm"
-INCLUDE "data/baseStats/electrode.asm"
-INCLUDE "data/baseStats/exeggcute.asm"
-INCLUDE "data/baseStats/exeggutor.asm"
-INCLUDE "data/baseStats/cubone.asm"
-INCLUDE "data/baseStats/marowak.asm"
-INCLUDE "data/baseStats/hitmonlee.asm"
-INCLUDE "data/baseStats/hitmonchan.asm"
-INCLUDE "data/baseStats/lickitung.asm"
-INCLUDE "data/baseStats/koffing.asm"
-INCLUDE "data/baseStats/weezing.asm"
-INCLUDE "data/baseStats/rhyhorn.asm"
-INCLUDE "data/baseStats/rhydon.asm"
-INCLUDE "data/baseStats/chansey.asm"
-INCLUDE "data/baseStats/tangela.asm"
-INCLUDE "data/baseStats/kangaskhan.asm"
-INCLUDE "data/baseStats/horsea.asm"
-INCLUDE "data/baseStats/seadra.asm"
-INCLUDE "data/baseStats/goldeen.asm"
-INCLUDE "data/baseStats/seaking.asm"
-INCLUDE "data/baseStats/staryu.asm"
-INCLUDE "data/baseStats/starmie.asm"
-INCLUDE "data/baseStats/mrmime.asm"
-INCLUDE "data/baseStats/scyther.asm"
-INCLUDE "data/baseStats/jynx.asm"
-INCLUDE "data/baseStats/electabuzz.asm"
-INCLUDE "data/baseStats/magmar.asm"
-INCLUDE "data/baseStats/pinsir.asm"
-INCLUDE "data/baseStats/tauros.asm"
-INCLUDE "data/baseStats/magikarp.asm"
-INCLUDE "data/baseStats/gyarados.asm"
-INCLUDE "data/baseStats/lapras.asm"
-INCLUDE "data/baseStats/ditto.asm"
-INCLUDE "data/baseStats/eevee.asm"
-INCLUDE "data/baseStats/vaporeon.asm"
-INCLUDE "data/baseStats/jolteon.asm"
-INCLUDE "data/baseStats/flareon.asm"
-INCLUDE "data/baseStats/porygon.asm"
-INCLUDE "data/baseStats/omanyte.asm"
-INCLUDE "data/baseStats/omastar.asm"
-INCLUDE "data/baseStats/kabuto.asm"
-INCLUDE "data/baseStats/kabutops.asm"
-INCLUDE "data/baseStats/aerodactyl.asm"
-INCLUDE "data/baseStats/snorlax.asm"
-INCLUDE "data/baseStats/articuno.asm"
-INCLUDE "data/baseStats/zapdos.asm"
-INCLUDE "data/baseStats/moltres.asm"
-INCLUDE "data/baseStats/dratini.asm"
-INCLUDE "data/baseStats/dragonair.asm"
-INCLUDE "data/baseStats/dragonite.asm"
-INCLUDE "data/baseStats/mewtwo.asm"
-INCLUDE "data/baseStats/mew.asm"
diff --git a/data/battle/always_happen_effects.asm b/data/battle/always_happen_effects.asm
new file mode 100644
index 00000000..c8e5247e
--- /dev/null
+++ b/data/battle/always_happen_effects.asm
@@ -0,0 +1,13 @@
+AlwaysHappenSideEffects:
+; Attacks that aren't finished after they faint the opponent.
+ db DRAIN_HP_EFFECT
+ db EXPLODE_EFFECT
+ db DREAM_EATER_EFFECT
+ db PAY_DAY_EFFECT
+ db TWO_TO_FIVE_ATTACKS_EFFECT
+ db EFFECT_1E
+ db ATTACK_TWICE_EFFECT
+ db RECOIL_EFFECT
+ db TWINEEDLE_EFFECT
+ db RAGE_EFFECT
+ db -1 ; end
diff --git a/data/battle/critical_hit_moves.asm b/data/battle/critical_hit_moves.asm
new file mode 100644
index 00000000..a567a934
--- /dev/null
+++ b/data/battle/critical_hit_moves.asm
@@ -0,0 +1,6 @@
+HighCriticalMoves:
+ db KARATE_CHOP
+ db RAZOR_LEAF
+ db CRABHAMMER
+ db SLASH
+ db -1 ; end
diff --git a/data/battle/residual_effects_1.asm b/data/battle/residual_effects_1.asm
new file mode 100644
index 00000000..b478487d
--- /dev/null
+++ b/data/battle/residual_effects_1.asm
@@ -0,0 +1,20 @@
+; These are move effects (second value from the Moves table in bank $E).
+ResidualEffects1:
+; most non-side effects
+ db CONVERSION_EFFECT
+ db HAZE_EFFECT
+ db SWITCH_AND_TELEPORT_EFFECT
+ db MIST_EFFECT
+ db FOCUS_ENERGY_EFFECT
+ db CONFUSION_EFFECT
+ db HEAL_EFFECT
+ db TRANSFORM_EFFECT
+ db LIGHT_SCREEN_EFFECT
+ db REFLECT_EFFECT
+ db POISON_EFFECT
+ db PARALYZE_EFFECT
+ db SUBSTITUTE_EFFECT
+ db MIMIC_EFFECT
+ db LEECH_SEED_EFFECT
+ db SPLASH_EFFECT
+ db -1 ; end
diff --git a/data/battle/residual_effects_2.asm b/data/battle/residual_effects_2.asm
new file mode 100644
index 00000000..f58bb47c
--- /dev/null
+++ b/data/battle/residual_effects_2.asm
@@ -0,0 +1,32 @@
+ResidualEffects2:
+; non-side effects not included in ResidualEffects1
+; stat-affecting moves, sleep-inflicting moves, and Bide
+; e.g., Meditate, Bide, Hypnosis
+ db EFFECT_01
+ db ATTACK_UP1_EFFECT
+ db DEFENSE_UP1_EFFECT
+ db SPEED_UP1_EFFECT
+ db SPECIAL_UP1_EFFECT
+ db ACCURACY_UP1_EFFECT
+ db EVASION_UP1_EFFECT
+ db ATTACK_DOWN1_EFFECT
+ db DEFENSE_DOWN1_EFFECT
+ db SPEED_DOWN1_EFFECT
+ db SPECIAL_DOWN1_EFFECT
+ db ACCURACY_DOWN1_EFFECT
+ db EVASION_DOWN1_EFFECT
+ db BIDE_EFFECT
+ db SLEEP_EFFECT
+ db ATTACK_UP2_EFFECT
+ db DEFENSE_UP2_EFFECT
+ db SPEED_UP2_EFFECT
+ db SPECIAL_UP2_EFFECT
+ db ACCURACY_UP2_EFFECT
+ db EVASION_UP2_EFFECT
+ db ATTACK_DOWN2_EFFECT
+ db DEFENSE_DOWN2_EFFECT
+ db SPEED_DOWN2_EFFECT
+ db SPECIAL_DOWN2_EFFECT
+ db ACCURACY_DOWN2_EFFECT
+ db EVASION_DOWN2_EFFECT
+ db -1 ; end
diff --git a/data/battle/set_damage_effects.asm b/data/battle/set_damage_effects.asm
new file mode 100644
index 00000000..cedb3bc1
--- /dev/null
+++ b/data/battle/set_damage_effects.asm
@@ -0,0 +1,6 @@
+SetDamageEffects:
+; moves that do damage but not through normal calculations
+; e.g., Super Fang, Psywave
+ db SUPER_FANG_EFFECT
+ db SPECIAL_DAMAGE_EFFECT
+ db -1 ; end
diff --git a/data/battle/special_effects.asm b/data/battle/special_effects.asm
new file mode 100644
index 00000000..3e21ee2f
--- /dev/null
+++ b/data/battle/special_effects.asm
@@ -0,0 +1,24 @@
+SpecialEffects:
+; Effects from arrays 2, 4, and 5B, minus Twineedle and Rage.
+; Includes all effects that do not need to be called at the end of
+; ExecutePlayerMove (or ExecuteEnemyMove), because they have already been handled
+ db DRAIN_HP_EFFECT
+ db EXPLODE_EFFECT
+ db DREAM_EATER_EFFECT
+ db PAY_DAY_EFFECT
+ db SWIFT_EFFECT
+ db TWO_TO_FIVE_ATTACKS_EFFECT
+ db EFFECT_1E
+ db CHARGE_EFFECT
+ db SUPER_FANG_EFFECT
+ db SPECIAL_DAMAGE_EFFECT
+ db FLY_EFFECT
+ db ATTACK_TWICE_EFFECT
+ db JUMP_KICK_EFFECT
+ db RECOIL_EFFECT
+ ; fallthrough
+SpecialEffectsCont:
+; damaging moves whose effect is executed prior to damage calculation
+ db THRASH_PETAL_DANCE_EFFECT
+ db TRAPPING_EFFECT
+ db -1 ; end
diff --git a/data/battle/stat_modifiers.asm b/data/battle/stat_modifiers.asm
new file mode 100644
index 00000000..c0a6355a
--- /dev/null
+++ b/data/battle/stat_modifiers.asm
@@ -0,0 +1,15 @@
+StatModifierRatios:
+; first byte is numerator, second byte is denominator
+ db 25, 100 ; 0.25
+ db 28, 100 ; 0.28
+ db 33, 100 ; 0.33
+ db 40, 100 ; 0.40
+ db 50, 100 ; 0.50
+ db 66, 100 ; 0.66
+ db 1, 1 ; 1.00
+ db 15, 10 ; 1.50
+ db 2, 1 ; 2.00
+ db 25, 10 ; 2.50
+ db 3, 1 ; 3.00
+ db 35, 10 ; 3.50
+ db 4, 1 ; 4.00
diff --git a/data/battle/stat_names.asm b/data/battle/stat_names.asm
new file mode 100644
index 00000000..854780c6
--- /dev/null
+++ b/data/battle/stat_names.asm
@@ -0,0 +1,7 @@
+StatsTextStrings:
+ db "ATTACK@"
+ db "DEFENSE@"
+ db "SPEED@"
+ db "SPECIAL@"
+ db "ACCURACY@"
+ db "EVADE@"
diff --git a/data/battle/unused_critical_hit_moves.asm b/data/battle/unused_critical_hit_moves.asm
new file mode 100644
index 00000000..bc88b2cb
--- /dev/null
+++ b/data/battle/unused_critical_hit_moves.asm
@@ -0,0 +1,6 @@
+UnusedHighCriticalMoves:
+ db KARATE_CHOP
+ db RAZOR_LEAF
+ db CRABHAMMER
+ db SLASH
+ db -1 ; end
diff --git a/data/battle_anims/base_coords.asm b/data/battle_anims/base_coords.asm
new file mode 100644
index 00000000..ad67baff
--- /dev/null
+++ b/data/battle_anims/base_coords.asm
@@ -0,0 +1,178 @@
+FrameBlockBaseCoords:
+ db $10, $68 ; BASECOORD_00
+ db $10, $70 ; BASECOORD_01
+ db $10, $78 ; BASECOORD_02
+ db $10, $80 ; BASECOORD_03
+ db $10, $88 ; BASECOORD_04
+ db $10, $90 ; BASECOORD_05
+ db $10, $98 ; BASECOORD_06
+ db $18, $68 ; BASECOORD_07
+ db $18, $70 ; BASECOORD_08
+ db $18, $78 ; BASECOORD_09
+ db $34, $28 ; BASECOORD_0A
+ db $18, $80 ; BASECOORD_0B
+ db $18, $88 ; BASECOORD_0C
+ db $18, $98 ; BASECOORD_0D
+ db $20, $68 ; BASECOORD_0E
+ db $20, $70 ; BASECOORD_0F
+ db $20, $78 ; BASECOORD_10
+ db $20, $80 ; BASECOORD_11
+ db $20, $88 ; BASECOORD_12
+ db $20, $90 ; BASECOORD_13
+ db $20, $98 ; BASECOORD_14
+ db $28, $68 ; BASECOORD_15
+ db $28, $70 ; BASECOORD_16
+ db $28, $78 ; BASECOORD_17
+ db $28, $80 ; BASECOORD_18
+ db $28, $88 ; BASECOORD_19
+ db $30, $68 ; BASECOORD_1A
+ db $30, $70 ; BASECOORD_1B
+ db $30, $78 ; BASECOORD_1C
+ db $30, $80 ; BASECOORD_1D
+ db $30, $90 ; BASECOORD_1E
+ db $30, $98 ; BASECOORD_1F
+ db $38, $68 ; BASECOORD_20
+ db $38, $78 ; BASECOORD_21
+ db $38, $80 ; BASECOORD_22
+ db $38, $88 ; BASECOORD_23
+ db $40, $68 ; BASECOORD_24
+ db $40, $70 ; BASECOORD_25
+ db $40, $78 ; BASECOORD_26
+ db $40, $80 ; BASECOORD_27
+ db $40, $88 ; BASECOORD_28
+ db $40, $98 ; BASECOORD_29
+ db $10, $60 ; BASECOORD_2A
+ db $18, $60 ; BASECOORD_2B
+ db $20, $60 ; BASECOORD_2C
+ db $28, $60 ; BASECOORD_2D
+ db $30, $60 ; BASECOORD_2E
+ db $40, $60 ; BASECOORD_2F
+ db $58, $28 ; BASECOORD_30
+ db $43, $38 ; BASECOORD_31
+ db $33, $48 ; BASECOORD_32
+ db $20, $58 ; BASECOORD_33
+ db $32, $78 ; BASECOORD_34
+ db $58, $58 ; BASECOORD_35
+ db $2C, $6C ; BASECOORD_36
+ db $34, $80 ; BASECOORD_37
+ db $48, $70 ; BASECOORD_38
+ db $42, $36 ; BASECOORD_39
+ db $38, $44 ; BASECOORD_3A
+ db $40, $52 ; BASECOORD_3B
+ db $48, $60 ; BASECOORD_3C
+ db $3E, $6E ; BASECOORD_3D
+ db $28, $7C ; BASECOORD_3E
+ db $28, $8A ; BASECOORD_3F
+ db $50, $3C ; BASECOORD_40
+ db $48, $50 ; BASECOORD_41
+ db $40, $64 ; BASECOORD_42
+ db $38, $38 ; BASECOORD_43
+ db $50, $30 ; BASECOORD_44
+ db $50, $38 ; BASECOORD_45
+ db $50, $40 ; BASECOORD_46
+ db $50, $48 ; BASECOORD_47
+ db $50, $50 ; BASECOORD_48
+ db $48, $58 ; BASECOORD_49
+ db $50, $44 ; BASECOORD_4A
+ db $48, $48 ; BASECOORD_4B
+ db $48, $4C ; BASECOORD_4C
+ db $40, $50 ; BASECOORD_4D
+ db $40, $54 ; BASECOORD_4E
+ db $38, $58 ; BASECOORD_4F
+ db $38, $5C ; BASECOORD_50
+ db $30, $64 ; BASECOORD_51
+ db $48, $40 ; BASECOORD_52
+ db $48, $39 ; BASECOORD_53
+ db $24, $88 ; BASECOORD_54
+ db $24, $70 ; BASECOORD_55
+ db $1C, $70 ; BASECOORD_56
+ db $1C, $88 ; BASECOORD_57
+ db $34, $68 ; BASECOORD_58
+ db $34, $88 ; BASECOORD_59
+ db $68, $50 ; BASECOORD_5A
+ db $60, $50 ; BASECOORD_5B
+ db $68, $60 ; BASECOORD_5C
+ db $58, $50 ; BASECOORD_5D
+ db $60, $60 ; BASECOORD_5E
+ db $68, $40 ; BASECOORD_5F
+ db $40, $40 ; BASECOORD_60
+ db $38, $40 ; BASECOORD_61
+ db $0B, $60 ; BASECOORD_62
+ db $44, $48 ; BASECOORD_63
+ db $40, $14 ; BASECOORD_64
+ db $48, $1C ; BASECOORD_65
+ db $50, $24 ; BASECOORD_66
+ db $4C, $24 ; BASECOORD_67
+ db $10, $62 ; BASECOORD_68
+ db $12, $62 ; BASECOORD_69
+ db $12, $60 ; BASECOORD_6A
+ db $20, $72 ; BASECOORD_6B
+ db $22, $72 ; BASECOORD_6C
+ db $22, $70 ; BASECOORD_6D
+ db $28, $62 ; BASECOORD_6E
+ db $50, $0A ; BASECOORD_6F
+ db $52, $0A ; BASECOORD_70
+ db $38, $30 ; BASECOORD_71
+ db $40, $48 ; BASECOORD_72
+ db $30, $48 ; BASECOORD_73
+ db $40, $30 ; BASECOORD_74
+ db $30, $40 ; BASECOORD_75
+ db $38, $48 ; BASECOORD_76
+ db $40, $4A ; BASECOORD_77
+ db $48, $4B ; BASECOORD_78
+ db $50, $4C ; BASECOORD_79
+ db $58, $4D ; BASECOORD_7A
+ db $60, $4D ; BASECOORD_7B
+ db $68, $4D ; BASECOORD_7C
+ db $38, $10 ; BASECOORD_7D
+ db $50, $10 ; BASECOORD_7E
+ db $38, $28 ; BASECOORD_7F
+ db $48, $18 ; BASECOORD_80
+ db $40, $20 ; BASECOORD_81
+ db $48, $20 ; BASECOORD_82
+ db $40, $3C ; BASECOORD_83
+ db $38, $50 ; BASECOORD_84
+ db $28, $64 ; BASECOORD_85
+ db $1C, $90 ; BASECOORD_86
+ db $24, $80 ; BASECOORD_87
+ db $2C, $70 ; BASECOORD_88
+ db $30, $38 ; BASECOORD_89
+ db $10, $50 ; BASECOORD_8A
+ db $3C, $40 ; BASECOORD_8B
+ db $40, $58 ; BASECOORD_8C
+ db $30, $58 ; BASECOORD_8D
+ db $58, $48 ; BASECOORD_8E
+ db $50, $58 ; BASECOORD_8F
+ db $48, $68 ; BASECOORD_90
+ db $40, $18 ; BASECOORD_91
+ db $28, $58 ; BASECOORD_92
+ db $40, $38 ; BASECOORD_93
+ db $48, $38 ; BASECOORD_94
+ db $08, $70 ; BASECOORD_95
+ db $44, $1C ; BASECOORD_96
+ db $3C, $58 ; BASECOORD_97
+ db $38, $60 ; BASECOORD_98
+ db $08, $60 ; BASECOORD_99
+ db $38, $70 ; BASECOORD_9A
+ db $38, $6C ; BASECOORD_9B
+ db $38, $64 ; BASECOORD_9C
+ db $1C, $74 ; BASECOORD_9D
+ db $2E, $74 ; BASECOORD_9E
+ db $34, $50 ; BASECOORD_9F
+ db $2F, $60 ; BASECOORD_A0
+ db $31, $70 ; BASECOORD_A1
+ db $4C, $30 ; BASECOORD_A2
+ db $3B, $40 ; BASECOORD_A3
+ db $2D, $50 ; BASECOORD_A4
+ db $26, $60 ; BASECOORD_A5
+ db $2D, $70 ; BASECOORD_A6
+ db $28, $50 ; BASECOORD_A7
+ db $1E, $60 ; BASECOORD_A8
+ db $29, $70 ; BASECOORD_A9
+ db $16, $60 ; BASECOORD_AA
+ db $14, $58 ; BASECOORD_AB
+ db $12, $54 ; BASECOORD_AC
+ db $14, $50 ; BASECOORD_AD
+ db $18, $4C ; BASECOORD_AE
+ db $1C, $48 ; BASECOORD_AF
+ db $48, $28 ; BASECOORD_B0
diff --git a/data/battle_anims/frame_blocks.asm b/data/battle_anims/frame_blocks.asm
new file mode 100644
index 00000000..8b9b0919
--- /dev/null
+++ b/data/battle_anims/frame_blocks.asm
@@ -0,0 +1,1238 @@
+FrameBlockPointers:
+ dw FrameBlock00
+ dw FrameBlock01
+ dw FrameBlock02
+ dw FrameBlock03
+ dw FrameBlock04
+ dw FrameBlock05
+ dw FrameBlock06
+ dw FrameBlock07
+ dw FrameBlock08
+ dw FrameBlock09
+ dw FrameBlock0a
+ dw FrameBlock0b
+ dw FrameBlock0c
+ dw FrameBlock0d
+ dw FrameBlock0e
+ dw FrameBlock0f
+ dw FrameBlock10
+ dw FrameBlock11
+ dw FrameBlock12
+ dw FrameBlock13
+ dw FrameBlock14
+ dw FrameBlock15
+ dw FrameBlock16
+ dw FrameBlock17
+ dw FrameBlock18
+ dw FrameBlock19
+ dw FrameBlock1a
+ dw FrameBlock1b
+ dw FrameBlock1c
+ dw FrameBlock1d
+ dw FrameBlock1e
+ dw FrameBlock1f
+ dw FrameBlock20
+ dw FrameBlock21
+ dw FrameBlock22
+ dw FrameBlock23
+ dw FrameBlock24
+ dw FrameBlock25
+ dw FrameBlock26
+ dw FrameBlock27
+ dw FrameBlock28
+ dw FrameBlock29
+ dw FrameBlock2a
+ dw FrameBlock2b
+ dw FrameBlock2c
+ dw FrameBlock2d
+ dw FrameBlock2e
+ dw FrameBlock2f
+ dw FrameBlock30
+ dw FrameBlock31
+ dw FrameBlock32
+ dw FrameBlock33
+ dw FrameBlock34
+ dw FrameBlock35
+ dw FrameBlock36
+ dw FrameBlock37
+ dw FrameBlock38
+ dw FrameBlock39
+ dw FrameBlock3a
+ dw FrameBlock3b
+ dw FrameBlock3c
+ dw FrameBlock3d
+ dw FrameBlock3e
+ dw FrameBlock3f
+ dw FrameBlock40
+ dw FrameBlock41
+ dw FrameBlock42
+ dw FrameBlock43
+ dw FrameBlock44
+ dw FrameBlock45
+ dw FrameBlock46
+ dw FrameBlock47
+ dw SmallBlackCircleFrameBlock
+ dw LargeBlackCircleFrameBlock
+ dw FrameBlock4a
+ dw FrameBlock4b
+ dw FrameBlock4c
+ dw FrameBlock4d
+ dw FrameBlock4e
+ dw FrameBlock4f
+ dw FrameBlock50
+ dw FrameBlock51
+ dw FrameBlock52
+ dw FrameBlock53
+ dw FrameBlock54
+ dw FrameBlock55
+ dw FrameBlock56
+ dw FrameBlock57
+ dw FrameBlock58
+ dw FrameBlock59
+ dw FrameBlock5a
+ dw FrameBlock5b
+ dw FrameBlock5c
+ dw FrameBlock5d
+ dw FrameBlock5e
+ dw FrameBlock5f
+ dw FrameBlock60
+ dw FrameBlock61
+ dw FrameBlock62
+ dw FrameBlock63
+ dw FrameBlock64
+ dw FrameBlock65
+ dw FrameBlock66
+ dw FrameBlock67
+ dw FrameBlock68
+ dw FrameBlock69
+ dw FrameBlock6a
+ dw FrameBlock6b
+ dw FrameBlock6c
+ dw FrameBlock6d
+ dw FrameBlock6e
+ dw FrameBlock6f
+ dw FrameBlock70
+ dw FrameBlock71
+ dw FrameBlock72
+ dw FrameBlock73
+ dw FrameBlock74
+ dw FrameBlock75
+ dw FrameBlock76
+ dw FrameBlock77
+ dw FrameBlock78
+ dw FrameBlock79
+
+FrameBlock01:
+ db 9 ; #
+ dbsprite 0, 0, 0, 0, $2c, 0
+ dbsprite 1, 0, 0, 0, $2d, 0
+ dbsprite 2, 0, 0, 0, $2c, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $3c, 0
+ dbsprite 1, 1, 0, 0, $3d, 0
+ dbsprite 2, 1, 0, 0, $3c, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $2c, OAM_VFLIP
+ dbsprite 1, 2, 0, 0, $2d, OAM_VFLIP
+ dbsprite 2, 2, 0, 0, $2c, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock02:
+ db 16 ; #
+ dbsprite 0, 0, 0, 0, $20, 0
+ dbsprite 1, 0, 0, 0, $21, 0
+ dbsprite 2, 0, 0, 0, $21, OAM_HFLIP
+ dbsprite 3, 0, 0, 0, $20, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $30, 0
+ dbsprite 1, 1, 0, 0, $31, 0
+ dbsprite 2, 1, 0, 0, $31, OAM_HFLIP
+ dbsprite 3, 1, 0, 0, $30, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $30, OAM_VFLIP
+ dbsprite 1, 2, 0, 0, $31, OAM_VFLIP
+ dbsprite 2, 2, 0, 0, $31, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 2, 0, 0, $30, OAM_HFLIP | OAM_VFLIP
+ dbsprite 0, 3, 0, 0, $20, OAM_VFLIP
+ dbsprite 1, 3, 0, 0, $21, OAM_VFLIP
+ dbsprite 2, 3, 0, 0, $21, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 3, 0, 0, $20, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock03:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $02, 0
+ dbsprite 1, 0, 0, 0, $02, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $12, 0
+ dbsprite 1, 1, 0, 0, $12, OAM_HFLIP
+
+FrameBlock04:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $06, 0
+ dbsprite 1, 0, 0, 0, $07, 0
+ dbsprite 0, 1, 0, 0, $16, 0
+ dbsprite 1, 1, 0, 0, $17, 0
+
+FrameBlock05:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $07, OAM_HFLIP
+ dbsprite 1, 0, 0, 0, $06, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $17, OAM_HFLIP
+ dbsprite 1, 1, 0, 0, $16, OAM_HFLIP
+
+FrameBlock06:
+ db 12 ; #
+ dbsprite 1, 0, 0, 0, $23, 0
+ dbsprite 0, 1, 0, 0, $32, 0
+ dbsprite 1, 1, 0, 0, $33, 0
+ dbsprite 2, 0, 0, 0, $23, OAM_HFLIP
+ dbsprite 2, 1, 0, 0, $33, OAM_HFLIP
+ dbsprite 3, 1, 0, 0, $32, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $32, OAM_VFLIP
+ dbsprite 1, 2, 0, 0, $33, OAM_VFLIP
+ dbsprite 1, 3, 0, 0, $23, OAM_VFLIP
+ dbsprite 2, 2, 0, 0, $33, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 2, 0, 0, $32, OAM_HFLIP | OAM_VFLIP
+ dbsprite 2, 3, 0, 0, $23, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock07:
+ db 16 ; #
+ dbsprite 0, 0, 0, 0, $20, 0
+ dbsprite 1, 0, 0, 0, $21, 0
+ dbsprite 0, 1, 0, 0, $30, 0
+ dbsprite 1, 1, 0, 0, $31, 0
+ dbsprite 2, 0, 0, 0, $21, OAM_HFLIP
+ dbsprite 3, 0, 0, 0, $20, OAM_HFLIP
+ dbsprite 2, 1, 0, 0, $31, OAM_HFLIP
+ dbsprite 3, 1, 0, 0, $30, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $30, OAM_VFLIP
+ dbsprite 1, 2, 0, 0, $31, OAM_VFLIP
+ dbsprite 0, 3, 0, 0, $20, OAM_VFLIP
+ dbsprite 1, 3, 0, 0, $21, OAM_VFLIP
+ dbsprite 2, 2, 0, 0, $31, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 2, 0, 0, $30, OAM_HFLIP | OAM_VFLIP
+ dbsprite 2, 3, 0, 0, $21, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 3, 0, 0, $20, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock08:
+ db 16 ; #
+ dbsprite 0, 0, 0, 0, $20, 0
+ dbsprite 1, 0, 0, 0, $21, 0
+ dbsprite 0, 1, 0, 0, $30, 0
+ dbsprite 1, 1, 0, 0, $31, 0
+ dbsprite 3, 0, 0, 0, $21, OAM_HFLIP
+ dbsprite 4, 0, 0, 0, $20, OAM_HFLIP
+ dbsprite 3, 1, 0, 0, $31, OAM_HFLIP
+ dbsprite 4, 1, 0, 0, $30, OAM_HFLIP
+ dbsprite 0, 3, 0, 0, $30, OAM_VFLIP
+ dbsprite 1, 3, 0, 0, $31, OAM_VFLIP
+ dbsprite 0, 4, 0, 0, $20, OAM_VFLIP
+ dbsprite 1, 4, 0, 0, $21, OAM_VFLIP
+ dbsprite 3, 3, 0, 0, $31, OAM_HFLIP | OAM_VFLIP
+ dbsprite 4, 3, 0, 0, $30, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 4, 0, 0, $21, OAM_HFLIP | OAM_VFLIP
+ dbsprite 4, 4, 0, 0, $20, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock09:
+ db 12 ; #
+ dbsprite 0, 0, 0, 0, $24, 0
+ dbsprite 1, 0, 0, 0, $25, 0
+ dbsprite 0, 1, 0, 0, $34, 0
+ dbsprite 3, 0, 0, 0, $25, OAM_HFLIP
+ dbsprite 4, 0, 0, 0, $24, OAM_HFLIP
+ dbsprite 4, 1, 0, 0, $34, OAM_HFLIP
+ dbsprite 0, 3, 0, 0, $34, OAM_VFLIP
+ dbsprite 0, 4, 0, 0, $24, OAM_VFLIP
+ dbsprite 1, 4, 0, 0, $25, OAM_VFLIP
+ dbsprite 4, 3, 0, 0, $34, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 4, 0, 0, $25, OAM_HFLIP | OAM_VFLIP
+ dbsprite 4, 4, 0, 0, $24, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock0a:
+ db 12 ; #
+ dbsprite 0, 0, 0, 0, $24, 0
+ dbsprite 1, 0, 0, 0, $25, 0
+ dbsprite 0, 1, 0, 0, $34, 0
+ dbsprite 4, 0, 0, 0, $25, OAM_HFLIP
+ dbsprite 5, 0, 0, 0, $24, OAM_HFLIP
+ dbsprite 5, 1, 0, 0, $34, OAM_HFLIP
+ dbsprite 0, 4, 0, 0, $34, OAM_VFLIP
+ dbsprite 0, 5, 0, 0, $24, OAM_VFLIP
+ dbsprite 1, 5, 0, 0, $25, OAM_VFLIP
+ dbsprite 5, 4, 0, 0, $34, OAM_HFLIP | OAM_VFLIP
+ dbsprite 4, 5, 0, 0, $25, OAM_HFLIP | OAM_VFLIP
+ dbsprite 5, 5, 0, 0, $24, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock0b:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $05, 0
+ dbsprite 1, 0, 0, 0, $05, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $15, 0
+ dbsprite 1, 1, 0, 0, $15, OAM_HFLIP
+
+FrameBlock0c:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $04, 0
+ dbsprite 1, 0, 0, 0, $04, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $14, 0
+ dbsprite 1, 1, 0, 0, $14, OAM_HFLIP
+
+FrameBlock0d:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $0c, 0
+ dbsprite 1, 0, 0, 0, $0d, 0
+ dbsprite 0, 1, 0, 0, $1c, 0
+ dbsprite 1, 1, 0, 0, $1d, 0
+ dbsprite 0, 2, 0, 0, $1d, OAM_HFLIP | OAM_VFLIP
+ dbsprite 1, 2, 0, 0, $1c, OAM_HFLIP | OAM_VFLIP
+ dbsprite 0, 3, 0, 0, $0d, OAM_HFLIP | OAM_VFLIP
+ dbsprite 1, 3, 0, 0, $0c, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock0e:
+ db 4 ; #
+ dbsprite 0, 4, 0, 0, $0c, 0
+ dbsprite 1, 4, 0, 0, $0d, 0
+ dbsprite 0, 5, 0, 0, $1c, 0
+ dbsprite 1, 5, 0, 0, $1d, 0
+
+FrameBlock0f:
+ db 4 ; #
+ dbsprite 0, 6, 0, 0, $1d, OAM_HFLIP | OAM_VFLIP
+ dbsprite 1, 6, 0, 0, $1c, OAM_HFLIP | OAM_VFLIP
+ dbsprite 0, 7, 0, 0, $0d, OAM_HFLIP | OAM_VFLIP
+ dbsprite 1, 7, 0, 0, $0c, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock10:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $0e, 0
+ dbsprite 1, 0, 0, 0, $0f, 0
+ dbsprite 0, 1, 0, 0, $1e, 0
+ dbsprite 1, 1, 0, 0, $1f, 0
+ dbsprite 2, 0, 0, 0, $0f, OAM_HFLIP
+ dbsprite 3, 0, 0, 0, $0e, OAM_HFLIP
+ dbsprite 2, 1, 0, 0, $1f, OAM_HFLIP
+ dbsprite 3, 1, 0, 0, $1e, OAM_HFLIP
+
+FrameBlock11:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $0e, 0
+ dbsprite 1, 0, 0, 0, $0f, 0
+ dbsprite 0, 1, 0, 0, $1e, 0
+ dbsprite 1, 1, 0, 0, $1f, 0
+ dbsprite 4, 0, 0, 0, $0f, OAM_HFLIP
+ dbsprite 5, 0, 0, 0, $0e, OAM_HFLIP
+ dbsprite 4, 1, 0, 0, $1f, OAM_HFLIP
+ dbsprite 5, 1, 0, 0, $1e, OAM_HFLIP
+
+FrameBlock12:
+ db 3 ; #
+ dbsprite 0, 0, 0, 0, $37, 0
+ dbsprite 2, 1, 0, 0, $37, 0
+ dbsprite 4, 0, 0, 0, $37, 0
+
+FrameBlock13:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $36, 0
+ dbsprite 1, 0, 0, 0, $36, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $36, OAM_VFLIP
+ dbsprite 1, 1, 0, 0, $36, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock14:
+ db 8 ; #
+ dbsprite 2, 0, 0, 0, $28, 0
+ dbsprite 3, 0, 0, 0, $28, OAM_HFLIP
+ dbsprite 2, 1, 0, 0, $38, 0
+ dbsprite 3, 1, 0, 0, $38, OAM_HFLIP
+ dbsprite 4, 0, 0, 0, $36, 0
+ dbsprite 5, 0, 0, 0, $36, OAM_HFLIP
+ dbsprite 4, 1, 0, 0, $36, OAM_VFLIP
+ dbsprite 5, 1, 0, 0, $36, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock15:
+ db 12 ; #
+ dbsprite 0, 0, 0, 0, $28, 0
+ dbsprite 1, 0, 0, 0, $28, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $38, 0
+ dbsprite 1, 1, 0, 0, $38, OAM_HFLIP
+ dbsprite 2, 0, 0, 0, $29, 0
+ dbsprite 3, 0, 0, 0, $29, OAM_HFLIP
+ dbsprite 2, 1, 0, 0, $39, 0
+ dbsprite 3, 1, 0, 0, $39, OAM_HFLIP
+ dbsprite 4, 0, 0, 0, $28, 0
+ dbsprite 5, 0, 0, 0, $28, OAM_HFLIP
+ dbsprite 4, 1, 0, 0, $38, 0
+ dbsprite 5, 1, 0, 0, $38, OAM_HFLIP
+
+FrameBlock16:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $29, 0
+ dbsprite 1, 0, 0, 0, $29, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $39, 0
+ dbsprite 1, 1, 0, 0, $39, OAM_HFLIP
+ dbsprite 4, 0, 0, 0, $29, 0
+ dbsprite 5, 0, 0, 0, $29, OAM_HFLIP
+ dbsprite 4, 1, 0, 0, $39, 0
+ dbsprite 5, 1, 0, 0, $39, OAM_HFLIP
+
+FrameBlock17:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $08, 0
+ dbsprite 1, 0, 0, 0, $09, 0
+ dbsprite 0, 1, 0, 0, $18, 0
+ dbsprite 1, 1, 0, 0, $19, 0
+
+FrameBlock18:
+ db 1 ; #
+ dbsprite 0, 3, 0, 0, $45, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock19:
+ db 2 ; #
+ dbsprite 1, 3, 0, 0, $45, 0
+ dbsprite 1, 2, 0, 0, $46, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock1a:
+ db 2 ; #
+ dbsprite 2, 2, 0, 0, $45, OAM_HFLIP | OAM_VFLIP
+ dbsprite 2, 3, 0, 0, $46, 0
+
+FrameBlock1b:
+ db 2 ; #
+ dbsprite 3, 2, 0, 0, $45, 0
+ dbsprite 3, 1, 0, 0, $46, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock1c:
+ db 2 ; #
+ dbsprite 4, 1, 0, 0, $45, OAM_HFLIP | OAM_VFLIP
+ dbsprite 4, 2, 0, 0, $46, 0
+
+FrameBlock1d:
+ db 2 ; #
+ dbsprite 5, 1, 0, 0, $45, 0
+ dbsprite 5, 0, 0, 0, $46, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock1e:
+ db 2 ; #
+ dbsprite 6, 0, 0, 0, $45, OAM_HFLIP | OAM_VFLIP
+ dbsprite 6, 1, 0, 0, $46, 0
+
+FrameBlock75:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $43, 0
+ dbsprite 1, 0, 0, 0, $43, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $22, 0
+ dbsprite 1, 1, 0, 0, $43, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock1f:
+ db 2 ; #
+ dbsprite 0, 0, 0, 0, $03, 0
+ dbsprite 6, 0, 0, 0, $03, OAM_HFLIP
+
+FrameBlock20:
+ db 6 ; #
+ dbsprite 0, 0, 0, 0, $03, 0
+ dbsprite 6, 0, 0, 0, $03, OAM_HFLIP
+ dbsprite 1, 1, 0, 0, $03, 0
+ dbsprite 5, 1, 0, 0, $03, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $13, 0
+ dbsprite 6, 1, 0, 0, $13, OAM_HFLIP
+
+FrameBlock21:
+ db 12 ; #
+ dbsprite 0, 0, 0, 0, $03, 0
+ dbsprite 6, 0, 0, 0, $03, OAM_HFLIP
+ dbsprite 1, 1, 0, 0, $03, 0
+ dbsprite 5, 1, 0, 0, $03, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $13, 0
+ dbsprite 6, 1, 0, 0, $13, OAM_HFLIP
+ dbsprite 2, 2, 0, 0, $03, 0
+ dbsprite 4, 2, 0, 0, $03, OAM_HFLIP
+ dbsprite 1, 2, 0, 0, $13, 0
+ dbsprite 5, 2, 0, 0, $13, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $03, 0
+ dbsprite 6, 2, 0, 0, $03, OAM_HFLIP
+
+FrameBlock22:
+ db 19 ; #
+ dbsprite 0, 0, 0, 0, $03, 0
+ dbsprite 0, 1, 0, 0, $13, 0
+ dbsprite 0, 2, 0, 0, $03, 0
+ dbsprite 0, 3, 0, 0, $13, 0
+ dbsprite 1, 1, 0, 0, $03, 0
+ dbsprite 1, 2, 0, 0, $13, 0
+ dbsprite 1, 3, 0, 0, $03, 0
+ dbsprite 2, 2, 0, 0, $03, 0
+ dbsprite 2, 3, 0, 0, $13, 0
+ dbsprite 3, 3, 0, 0, $03, 0
+ dbsprite 4, 2, 0, 0, $03, OAM_HFLIP
+ dbsprite 4, 3, 0, 0, $13, OAM_HFLIP
+ dbsprite 5, 1, 0, 0, $03, OAM_HFLIP
+ dbsprite 5, 2, 0, 0, $13, OAM_HFLIP
+ dbsprite 5, 3, 0, 0, $03, OAM_HFLIP
+ dbsprite 6, 0, 0, 0, $03, OAM_HFLIP
+ dbsprite 6, 1, 0, 0, $13, OAM_HFLIP
+ dbsprite 6, 2, 0, 0, $03, OAM_HFLIP
+ dbsprite 6, 3, 0, 0, $13, OAM_HFLIP
+
+FrameBlock23:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $0a, 0
+ dbsprite 1, 0, 0, 0, $0b, 0
+ dbsprite 0, 1, 0, 0, $1a, 0
+ dbsprite 1, 1, 0, 0, $1b, 0
+
+FrameBlock24:
+ db 2 ; #
+ dbsprite 0, 1, 0, 0, $0a, 0
+ dbsprite 1, 1, 0, 0, $0b, 0
+
+FrameBlock25:
+ db 12 ; #
+ dbsprite 0, 2, 0, 0, $0a, 0
+ dbsprite 1, 2, 0, 0, $0b, 0
+ dbsprite 0, 3, 0, 0, $1a, 0
+ dbsprite 1, 3, 0, 0, $1b, 0
+ dbsprite 2, 0, 0, 0, $0a, 0
+ dbsprite 3, 0, 0, 0, $0b, 0
+ dbsprite 2, 1, 0, 0, $1a, 0
+ dbsprite 3, 1, 0, 0, $1b, 0
+ dbsprite 4, 1, 0, 0, $0a, 0
+ dbsprite 5, 1, 0, 0, $0b, 0
+ dbsprite 4, 2, 0, 0, $1a, 0
+ dbsprite 5, 2, 0, 0, $1b, 0
+
+FrameBlock26:
+ db 4 ; #
+ dbsprite 2, 0, 0, 0, $44, 0
+ dbsprite 3, 0, 0, 0, $44, OAM_HFLIP
+ dbsprite 2, 1, 0, 0, $44, OAM_VFLIP
+ dbsprite 3, 1, 0, 0, $44, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock27:
+ db 5 ; #
+ dbsprite 1, 1, 0, 0, $44, 0
+ dbsprite 2, 1, 0, 0, $44, OAM_HFLIP
+ dbsprite 1, 2, 0, 0, $44, OAM_VFLIP
+ dbsprite 2, 2, 0, 0, $44, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 0, 0, 0, $47, 0
+
+FrameBlock28:
+ db 6 ; #
+ dbsprite 0, 2, 0, 0, $44, 0
+ dbsprite 1, 2, 0, 0, $44, OAM_HFLIP
+ dbsprite 0, 3, 0, 0, $44, OAM_VFLIP
+ dbsprite 1, 3, 0, 0, $44, OAM_HFLIP | OAM_VFLIP
+ dbsprite 2, 1, 0, 0, $47, 0
+ dbsprite 2, 0, 6, 2, $47, 0
+
+FrameBlock29:
+ db 4 ; #
+ dbsprite 0, 3, 0, 0, $47, 0
+ dbsprite 0, 2, 6, 2, $47, 0
+ dbsprite 1, 1, 4, 4, $47, 0
+ dbsprite 2, 0, 2, 6, $47, 0
+
+FrameBlock2a:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $44, 0
+ dbsprite 1, 0, 0, 0, $44, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $44, OAM_VFLIP
+ dbsprite 1, 1, 0, 0, $44, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock2b:
+ db 2 ; #
+ dbsprite 0, 0, 2, 6, $47, 0
+ dbsprite 1, 0, 0, 0, $47, 0
+
+FrameBlock2c:
+ db 1 ; #
+ dbsprite 0, 20, 0, 0, $4d, 0
+
+FrameBlock2d:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $26, 0
+ dbsprite 1, 0, 0, 0, $27, 0
+ dbsprite 0, 1, 0, 0, $36, 0
+ dbsprite 1, 1, 0, 0, $37, 0
+ dbsprite 0, 2, 0, 0, $28, 0
+ dbsprite 1, 2, 0, 0, $29, 0
+ dbsprite 0, 3, 0, 0, $38, 0
+ dbsprite 1, 3, 0, 0, $39, 0
+
+FrameBlock2e:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $27, OAM_HFLIP
+ dbsprite 1, 0, 0, 0, $26, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $37, OAM_HFLIP
+ dbsprite 1, 1, 0, 0, $36, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $29, OAM_HFLIP
+ dbsprite 1, 2, 0, 0, $28, OAM_HFLIP
+ dbsprite 0, 3, 0, 0, $39, OAM_HFLIP
+ dbsprite 1, 3, 0, 0, $38, OAM_HFLIP
+
+FrameBlock2f:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $0c, 0
+ dbsprite 1, 0, 0, 0, $0d, 0
+ dbsprite 0, 1, 0, 0, $0c, OAM_VFLIP
+ dbsprite 1, 1, 0, 0, $0d, OAM_VFLIP
+
+FrameBlock30:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $44, 0
+ dbsprite 1, 0, 0, 0, $44, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $44, OAM_VFLIP
+ dbsprite 1, 1, 0, 0, $44, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock31:
+ db 1 ; #
+ dbsprite 0, 0, 0, 0, $45, 0
+
+FrameBlock32:
+ db 7 ; #
+ dbsprite 0, 0, 0, 0, $4d, 0
+ dbsprite 1, 0, 0, 0, $2f, 0
+ dbsprite 2, 0, 0, 0, $4d, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $4e, 0
+ dbsprite 1, 1, 0, 0, $07, 0
+ dbsprite 2, 1, 0, 0, $4e, OAM_HFLIP
+ dbsprite 1, 2, 0, 0, $3f, 0
+
+FrameBlock33:
+ db 7 ; #
+ dbsprite 1, 0, 0, 0, $3f, OAM_VFLIP
+ dbsprite 0, 1, 0, 0, $4e, OAM_VFLIP
+ dbsprite 1, 1, 0, 0, $07, OAM_VFLIP
+ dbsprite 2, 1, 0, 0, $4e, OAM_HFLIP | OAM_VFLIP
+ dbsprite 0, 2, 0, 0, $4d, OAM_VFLIP
+ dbsprite 1, 2, 0, 0, $2f, OAM_VFLIP
+ dbsprite 2, 2, 0, 0, $4d, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock34:
+ db 1 ; #
+ dbsprite 0, 20, 0, 0, $00, OAM_OBP1
+
+FrameBlock35:
+ db 6 ; #
+ dbsprite 0, 0, 0, 0, $2a, 0
+ dbsprite 1, 0, 0, 0, $2b, 0
+ dbsprite 0, 1, 0, 0, $3a, 0
+ dbsprite 0, 2, 0, 0, $3a, OAM_VFLIP
+ dbsprite 0, 3, 0, 0, $2a, OAM_VFLIP
+ dbsprite 1, 3, 0, 0, $2b, OAM_VFLIP
+
+FrameBlock36:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $00, 0
+ dbsprite 1, 0, 0, 0, $01, 0
+ dbsprite 0, 1, 0, 0, $10, 0
+ dbsprite 1, 1, 0, 0, $11, 0
+
+FrameBlock37:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $01, OAM_BEHIND_BG | OAM_HFLIP
+ dbsprite 1, 0, 0, 0, $00, OAM_BEHIND_BG | OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $11, OAM_BEHIND_BG | OAM_HFLIP
+ dbsprite 1, 1, 0, 0, $10, OAM_BEHIND_BG | OAM_HFLIP
+
+FrameBlock38:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $0a, 0
+ dbsprite 1, 0, 0, 0, $0b, 0
+ dbsprite 0, 1, 0, 0, $1a, 0
+ dbsprite 1, 1, 0, 0, $1b, 0
+
+FrameBlock39:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $0b, OAM_HFLIP
+ dbsprite 1, 0, 0, 0, $0a, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $1b, OAM_HFLIP
+ dbsprite 1, 1, 0, 0, $1a, OAM_HFLIP
+
+FrameBlock3a:
+ db 4 ; #
+ dbsprite 0, 4, 0, 0, $05, 0
+ dbsprite 1, 4, 0, 0, $05, OAM_HFLIP
+ dbsprite 0, 5, 0, 0, $15, 0
+ dbsprite 1, 5, 0, 0, $15, OAM_HFLIP
+
+FrameBlock3b:
+ db 5 ; #
+ dbsprite 0, 3, 0, 0, $04, 0
+ dbsprite 1, 3, 0, 0, $04, OAM_HFLIP
+ dbsprite 0, 4, 0, 0, $14, 0
+ dbsprite 1, 4, 0, 0, $14, OAM_HFLIP
+ dbsprite 0, 5, 4, 0, $41, 0
+
+FrameBlock3c:
+ db 6 ; #
+ dbsprite 0, 2, 0, 0, $05, 0
+ dbsprite 1, 2, 0, 0, $05, OAM_HFLIP
+ dbsprite 0, 3, 0, 0, $15, 0
+ dbsprite 1, 3, 0, 0, $15, OAM_HFLIP
+ dbsprite 0, 4, 4, 0, $42, 0
+ dbsprite 0, 5, 4, 0, $42, 0
+
+FrameBlock3d:
+ db 7 ; #
+ dbsprite 0, 1, 0, 0, $04, 0
+ dbsprite 1, 1, 0, 0, $04, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $14, 0
+ dbsprite 1, 2, 0, 0, $14, OAM_HFLIP
+ dbsprite 0, 3, 4, 0, $41, 0
+ dbsprite 0, 4, 4, 0, $41, 0
+ dbsprite 0, 5, 4, 0, $41, 0
+
+FrameBlock3e:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $05, 0
+ dbsprite 1, 0, 0, 0, $05, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $15, 0
+ dbsprite 1, 1, 0, 0, $15, OAM_HFLIP
+ dbsprite 0, 2, 4, 0, $42, 0
+ dbsprite 0, 3, 4, 0, $42, 0
+ dbsprite 0, 4, 4, 0, $42, 0
+ dbsprite 0, 5, 4, 0, $42, 0
+
+FrameBlock3f:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $04, 0
+ dbsprite 1, 0, 0, 0, $04, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $14, 0
+ dbsprite 1, 1, 0, 0, $14, OAM_HFLIP
+ dbsprite 0, 2, 4, 0, $41, 0
+ dbsprite 0, 3, 4, 0, $41, 0
+ dbsprite 0, 4, 4, 0, $41, 0
+ dbsprite 0, 5, 4, 0, $41, 0
+
+FrameBlock40:
+ db 3 ; #
+ dbsprite 0, 0, 0, 0, $3d, 0
+ dbsprite 1, 0, 0, 0, $3d, 0
+ dbsprite 1, 1, 0, 0, $3d, 0
+
+FrameBlock41:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $06, 0
+ dbsprite 1, 0, 0, 0, $06, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $16, 0
+ dbsprite 1, 1, 0, 0, $17, 0
+
+FrameBlock42:
+ db 11 ; #
+ dbsprite 2, 0, 0, 0, $42, 0
+ dbsprite 0, 1, 0, 0, $42, 0
+ dbsprite 1, 1, 0, 0, $42, 0
+ dbsprite 2, 1, 0, 0, $42, 0
+ dbsprite 3, 1, 0, 0, $42, 0
+ dbsprite 4, 1, 0, 0, $42, 0
+ dbsprite 2, 2, 0, 0, $42, 0
+ dbsprite 1, 3, 0, 0, $42, 0
+ dbsprite 3, 3, 0, 0, $42, 0
+ dbsprite 0, 4, 0, 0, $42, 0
+ dbsprite 4, 4, 0, 0, $42, 0
+
+FrameBlock43:
+ db 11 ; #
+ dbsprite 2, 0, 0, 0, $41, 0
+ dbsprite 0, 1, 0, 0, $41, 0
+ dbsprite 1, 1, 0, 0, $41, 0
+ dbsprite 2, 1, 0, 0, $41, 0
+ dbsprite 3, 1, 0, 0, $41, 0
+ dbsprite 4, 1, 0, 0, $41, 0
+ dbsprite 2, 2, 0, 0, $41, 0
+ dbsprite 1, 3, 0, 0, $41, 0
+ dbsprite 3, 3, 0, 0, $41, 0
+ dbsprite 0, 4, 0, 0, $41, 0
+ dbsprite 4, 4, 0, 0, $41, 0
+
+FrameBlock44:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $49, 0
+ dbsprite 5, 0, 0, 0, $49, 0
+ dbsprite 0, 5, 0, 0, $49, 0
+ dbsprite 5, 5, 0, 0, $49, 0
+
+FrameBlock45:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $49, 0
+ dbsprite 3, 0, 0, 0, $49, 0
+ dbsprite 0, 3, 0, 0, $49, 0
+ dbsprite 3, 3, 0, 0, $49, 0
+
+FrameBlock46:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $49, 0
+ dbsprite 1, 0, 0, 0, $49, 0
+ dbsprite 0, 1, 0, 0, $49, 0
+ dbsprite 1, 1, 0, 0, $49, 0
+
+FrameBlock47:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $43, 0
+ dbsprite 1, 0, 0, 0, $43, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $43, OAM_VFLIP
+ dbsprite 1, 1, 0, 0, $43, OAM_HFLIP | OAM_VFLIP
+
+SmallBlackCircleFrameBlock:
+ db 4 ; #
+ dbsprite 1, 1, 0, 0, $33, 0
+ dbsprite 2, 1, 0, 0, $33, OAM_HFLIP
+ dbsprite 1, 2, 0, 0, $33, OAM_VFLIP
+ dbsprite 2, 2, 0, 0, $33, OAM_HFLIP | OAM_VFLIP
+
+LargeBlackCircleFrameBlock:
+ db 16 ; #
+ dbsprite 0, 0, 0, 0, $22, 0
+ dbsprite 1, 0, 0, 0, $23, 0
+ dbsprite 2, 0, 0, 0, $23, OAM_HFLIP
+ dbsprite 3, 0, 0, 0, $22, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $32, 0
+ dbsprite 1, 1, 0, 0, $43, 0
+ dbsprite 2, 1, 0, 0, $43, OAM_HFLIP
+ dbsprite 3, 1, 0, 0, $32, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $32, OAM_VFLIP
+ dbsprite 1, 2, 0, 0, $43, OAM_VFLIP
+ dbsprite 2, 2, 0, 0, $43, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 2, 0, 0, $32, OAM_HFLIP | OAM_VFLIP
+ dbsprite 0, 3, 0, 0, $22, OAM_VFLIP
+ dbsprite 1, 3, 0, 0, $23, OAM_VFLIP
+ dbsprite 2, 3, 0, 0, $23, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 3, 0, 0, $22, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock71:
+ db 16 ; #
+ dbsprite 0, 0, 0, 0, $22, 0
+ dbsprite 1, 0, 0, 0, $3b, 0
+ dbsprite 2, 0, 0, 0, $23, OAM_HFLIP
+ dbsprite 3, 0, 0, 0, $22, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $32, 0
+ dbsprite 1, 1, 0, 0, $43, 0
+ dbsprite 2, 1, 0, 0, $43, OAM_HFLIP
+ dbsprite 3, 1, 0, 0, $32, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $32, OAM_VFLIP
+ dbsprite 1, 2, 0, 0, $43, OAM_VFLIP
+ dbsprite 2, 2, 0, 0, $43, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 2, 0, 0, $32, OAM_HFLIP | OAM_VFLIP
+ dbsprite 0, 3, 0, 0, $22, OAM_VFLIP
+ dbsprite 1, 3, 0, 0, $23, OAM_VFLIP
+ dbsprite 2, 3, 0, 0, $23, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 3, 0, 0, $22, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock72:
+ db 12 ; #
+ dbsprite 0, 0, 0, 0, $32, 0
+ dbsprite 1, 0, 0, 0, $43, 0
+ dbsprite 2, 0, 0, 0, $43, OAM_HFLIP
+ dbsprite 3, 0, 0, 0, $32, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $32, OAM_VFLIP
+ dbsprite 1, 1, 0, 0, $43, OAM_VFLIP
+ dbsprite 2, 1, 0, 0, $43, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 1, 0, 0, $32, OAM_HFLIP | OAM_VFLIP
+ dbsprite 0, 2, 0, 0, $22, OAM_VFLIP
+ dbsprite 1, 2, 0, 0, $23, OAM_VFLIP
+ dbsprite 2, 2, 0, 0, $23, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 2, 0, 0, $22, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock73:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $32, OAM_VFLIP
+ dbsprite 1, 0, 0, 0, $43, OAM_VFLIP
+ dbsprite 2, 0, 0, 0, $43, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 0, 0, 0, $32, OAM_HFLIP | OAM_VFLIP
+ dbsprite 0, 1, 0, 0, $22, OAM_VFLIP
+ dbsprite 1, 1, 0, 0, $23, OAM_VFLIP
+ dbsprite 2, 1, 0, 0, $23, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 1, 0, 0, $22, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock74:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $22, OAM_VFLIP
+ dbsprite 1, 0, 0, 0, $23, OAM_VFLIP
+ dbsprite 2, 0, 0, 0, $23, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 0, 0, 0, $22, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock4a:
+ db 4 ; #
+ dbsprite 3, 1, 0, 0, $4c, OAM_HFLIP
+ dbsprite 1, 4, 0, 0, $4b, 0
+ dbsprite 4, 6, 0, 0, $4c, 0
+ dbsprite 6, 3, 0, 0, $4b, OAM_VFLIP
+
+FrameBlock4b:
+ db 4 ; #
+ dbsprite 3, 0, 0, 0, $4c, 0
+ dbsprite 0, 4, 0, 0, $4b, OAM_VFLIP
+ dbsprite 4, 7, 0, 0, $4c, OAM_HFLIP
+ dbsprite 7, 3, 0, 0, $4b, 0
+
+FrameBlock4c:
+ db 4 ; #
+ dbsprite 1, 2, 0, 0, $4a, OAM_VFLIP
+ dbsprite 2, 6, 0, 0, $4a, 0
+ dbsprite 6, 5, 0, 0, $4a, OAM_HFLIP
+ dbsprite 5, 1, 0, 0, $4a, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock4d:
+ db 4 ; #
+ dbsprite 0, 1, 0, 0, $4a, OAM_HFLIP
+ dbsprite 1, 7, 0, 0, $4a, OAM_HFLIP | OAM_VFLIP
+ dbsprite 7, 6, 0, 0, $4a, OAM_VFLIP
+ dbsprite 6, 0, 0, 0, $4a, 0
+
+FrameBlock4e:
+ db 8 ; #
+ dbsprite 6, 0, 0, 0, $44, 0
+ dbsprite 7, 0, 0, 0, $44, OAM_HFLIP
+ dbsprite 6, 1, 0, 0, $44, OAM_VFLIP
+ dbsprite 7, 1, 0, 0, $44, OAM_HFLIP | OAM_VFLIP
+ dbsprite 1, 4, 2, 6, $44, 0
+ dbsprite 2, 4, 2, 6, $44, OAM_HFLIP
+ dbsprite 1, 5, 2, 6, $44, OAM_VFLIP
+ dbsprite 2, 5, 2, 6, $44, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock4f:
+ db 12 ; #
+ dbsprite 4, 1, 2, 6, $44, 0
+ dbsprite 5, 1, 2, 6, $44, OAM_HFLIP
+ dbsprite 4, 2, 2, 6, $44, OAM_VFLIP
+ dbsprite 5, 2, 2, 6, $44, OAM_HFLIP | OAM_VFLIP
+ dbsprite 6, 0, 2, 6, $47, 0
+ dbsprite 7, 0, 0, 0, $47, 0
+ dbsprite 2, 3, 6, 2, $44, 0
+ dbsprite 3, 3, 6, 2, $44, OAM_HFLIP
+ dbsprite 2, 4, 6, 2, $44, OAM_VFLIP
+ dbsprite 3, 4, 6, 2, $44, OAM_HFLIP | OAM_VFLIP
+ dbsprite 1, 6, 0, 0, $47, 0
+ dbsprite 1, 5, 6, 2, $47, 0
+
+FrameBlock50:
+ db 8 ; #
+ dbsprite 6, 0, 2, 6, $47, 0
+ dbsprite 7, 0, 0, 0, $47, 0
+ dbsprite 4, 2, 6, 2, $47, 0
+ dbsprite 5, 1, 4, 4, $47, 0
+ dbsprite 3, 3, 2, 6, $47, 0
+ dbsprite 4, 3, 0, 0, $47, 0
+ dbsprite 1, 5, 6, 2, $47, 0
+ dbsprite 2, 4, 4, 4, $47, 0
+
+FrameBlock51:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $35, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $35, OAM_VFLIP
+ dbsprite 0, 2, 0, 0, $35, 0
+ dbsprite 0, 3, 0, 0, $35, OAM_HFLIP | OAM_VFLIP
+ dbsprite 8, 0, 0, 0, $35, 0
+ dbsprite 8, 1, 0, 0, $35, OAM_HFLIP | OAM_VFLIP
+ dbsprite 8, 2, 0, 0, $35, OAM_HFLIP
+ dbsprite 8, 3, 0, 0, $35, OAM_VFLIP
+
+FrameBlock52:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $2a, 0
+ dbsprite 1, 0, 0, 0, $2b, 0
+ dbsprite 0, 1, 0, 0, $3a, 0
+ dbsprite 1, 1, 0, 0, $3b, 0
+
+FrameBlock53:
+ db 3 ; #
+ dbsprite 0, 0, 0, 0, $3f, 0
+ dbsprite 1, 0, 0, 0, $3f, 0
+ dbsprite 0, 1, 6, 0, $3f, 0
+
+FrameBlock54:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $0e, 0
+ dbsprite 1, 0, 0, 0, $0e, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $0f, 0
+ dbsprite 1, 1, 0, 0, $0f, OAM_HFLIP
+
+FrameBlock55:
+ db 3 ; #
+ dbsprite 0, 2, 0, 0, $2c, 0
+ dbsprite 1, 2, 0, 0, $3c, 0
+ dbsprite 2, 2, 0, 0, $2d, 0
+
+FrameBlock56:
+ db 6 ; #
+ dbsprite 2, 2, 0, 0, $31, 0
+ dbsprite 3, 2, 0, 0, $31, 0
+ dbsprite 2, 1, 0, 0, $2c, 0
+ dbsprite 3, 1, 0, 0, $3c, 0
+ dbsprite 4, 1, 0, 0, $2d, 0
+ dbsprite 4, 2, 0, 0, $2d, 0
+
+FrameBlock57:
+ db 9 ; #
+ dbsprite 4, 1, 0, 0, $31, 0
+ dbsprite 4, 2, 0, 0, $31, 0
+ dbsprite 5, 1, 0, 0, $31, 0
+ dbsprite 5, 2, 0, 0, $31, 0
+ dbsprite 4, 0, 0, 0, $2c, 0
+ dbsprite 5, 0, 0, 0, $3c, 0
+ dbsprite 6, 0, 0, 0, $2d, 0
+ dbsprite 6, 1, 0, 0, $2d, 0
+ dbsprite 6, 2, 0, 0, $2d, 0
+
+FrameBlock58:
+ db 7 ; #
+ dbsprite 0, 0, 0, 0, $46, 0
+ dbsprite 0, 1, 2, 0, $47, 0
+ dbsprite 0, 2, 3, 0, $48, 0
+ dbsprite 0, 3, 4, 0, $48, 0
+ dbsprite 0, 4, 5, 0, $48, 0
+ dbsprite 0, 5, 5, 0, $48, 0
+ dbsprite 0, 6, 5, 0, $48, 0
+
+FrameBlock59:
+ db 1 ; #
+ dbsprite 0, 0, 0, 0, $42, 0
+
+FrameBlock5a:
+ db 12 ; #
+ dbsprite 0, 0, 0, 0, $24, 0
+ dbsprite 1, 0, 0, 0, $25, 0
+ dbsprite 0, 1, 0, 0, $34, 0
+ dbsprite 2, 0, 0, 0, $25, OAM_HFLIP
+ dbsprite 3, 0, 0, 0, $24, OAM_HFLIP
+ dbsprite 3, 1, 0, 0, $34, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $34, OAM_VFLIP
+ dbsprite 0, 3, 0, 0, $24, OAM_VFLIP
+ dbsprite 1, 3, 0, 0, $25, OAM_VFLIP
+ dbsprite 3, 2, 0, 0, $34, OAM_HFLIP | OAM_VFLIP
+ dbsprite 2, 3, 0, 0, $25, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 3, 0, 0, $24, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock5b:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $43, 0
+ dbsprite 1, 0, 0, 0, $43, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $43, OAM_VFLIP
+ dbsprite 1, 1, 0, 0, $43, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock5c:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $49, 0
+ dbsprite 1, 0, 0, 2, $49, 0
+ dbsprite 0, 3, 0, 0, $49, 0
+ dbsprite 2, 2, 0, 0, $49, 0
+ dbsprite 0, 1, 0, 0, $43, 0
+ dbsprite 1, 1, 0, 0, $43, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $43, OAM_VFLIP
+ dbsprite 1, 2, 0, 0, $43, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock5d:
+ db 11 ; #
+ dbsprite 0, 0, 0, 0, $49, 0
+ dbsprite 0, 3, 2, 0, $49, 0
+ dbsprite 2, 2, 0, 4, $49, 0
+ dbsprite 0, 1, 0, 0, $43, 0
+ dbsprite 1, 0, 0, 0, $43, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $43, OAM_VFLIP
+ dbsprite 1, 2, 0, 0, $43, OAM_HFLIP | OAM_VFLIP
+ dbsprite 1, 0, 0, 4, $43, 0
+ dbsprite 2, 0, 0, 4, $43, OAM_HFLIP
+ dbsprite 1, 1, 0, 4, $43, OAM_VFLIP
+ dbsprite 2, 1, 0, 4, $43, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock5e:
+ db 15 ; #
+ dbsprite 1, 0, 0, 0, $49, 0
+ dbsprite 2, 1, 0, 0, $49, 0
+ dbsprite 0, 4, 0, 0, $49, 0
+ dbsprite 0, 1, 0, 0, $43, 0
+ dbsprite 1, 1, 0, 0, $43, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $43, OAM_VFLIP
+ dbsprite 1, 2, 0, 0, $43, OAM_HFLIP | OAM_VFLIP
+ dbsprite 2, 2, 0, 0, $43, 0
+ dbsprite 3, 2, 0, 0, $43, OAM_HFLIP
+ dbsprite 2, 3, 0, 0, $43, OAM_VFLIP
+ dbsprite 3, 3, 0, 0, $43, OAM_HFLIP | OAM_VFLIP
+ dbsprite 1, 4, 0, 0, $43, 0
+ dbsprite 2, 4, 0, 0, $43, OAM_HFLIP
+ dbsprite 1, 5, 0, 0, $43, OAM_VFLIP
+ dbsprite 2, 5, 0, 0, $43, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock5f:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $49, 0
+ dbsprite 2, 0, 0, 0, $49, 0
+ dbsprite 4, 0, 0, 0, $49, 0
+ dbsprite 6, 0, 0, 0, $49, 0
+
+FrameBlock60:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $49, 0
+ dbsprite 2, 0, 0, 0, $49, 0
+ dbsprite 4, 0, 0, 0, $49, 0
+ dbsprite 6, 0, 0, 0, $49, 0
+ dbsprite 1, 1, 0, 0, $49, 0
+ dbsprite 3, 1, 0, 0, $49, 0
+ dbsprite 5, 1, 0, 0, $49, 0
+ dbsprite 7, 1, 0, 0, $49, 0
+
+FrameBlock61:
+ db 12 ; #
+ dbsprite 0, 0, 0, 0, $49, 0
+ dbsprite 2, 0, 0, 0, $49, 0
+ dbsprite 4, 0, 0, 0, $49, 0
+ dbsprite 6, 0, 0, 0, $49, 0
+ dbsprite 1, 1, 0, 0, $49, 0
+ dbsprite 3, 1, 0, 0, $49, 0
+ dbsprite 5, 1, 0, 0, $49, 0
+ dbsprite 7, 1, 0, 0, $49, 0
+ dbsprite 0, 2, 0, 0, $49, 0
+ dbsprite 2, 2, 0, 0, $49, 0
+ dbsprite 4, 2, 0, 0, $49, 0
+ dbsprite 6, 2, 0, 0, $49, 0
+
+FrameBlock62:
+ db 15 ; #
+ dbsprite 0, 0, 0, 0, $49, 0
+ dbsprite 2, 0, 0, 0, $49, 0
+ dbsprite 4, 0, 0, 0, $49, 0
+ dbsprite 6, 0, 0, 0, $49, 0
+ dbsprite 1, 1, 0, 0, $49, 0
+ dbsprite 3, 1, 0, 0, $49, 0
+ dbsprite 5, 1, 0, 0, $49, 0
+ dbsprite 7, 1, 0, 0, $49, 0
+ dbsprite 0, 2, 0, 0, $49, 0
+ dbsprite 2, 2, 0, 0, $49, 0
+ dbsprite 4, 2, 0, 0, $49, 0
+ dbsprite 6, 2, 0, 0, $49, 0
+ dbsprite 1, 3, 0, 0, $49, 0
+ dbsprite 3, 3, 0, 0, $49, 0
+ dbsprite 5, 3, 0, 0, $49, 0
+ dbsprite 7, 3, 0, 0, $49, 0
+
+FrameBlock63:
+ db 6 ; #
+ dbsprite 0, 2, 0, 0, $26, 0
+ dbsprite 1, 2, 0, 0, $27, 0
+ dbsprite 2, 1, 0, 0, $26, 0
+ dbsprite 3, 1, 0, 0, $27, 0
+ dbsprite 4, 0, 0, 0, $26, 0
+ dbsprite 5, 0, 0, 0, $27, 0
+
+FrameBlock64:
+ db 6 ; #
+ dbsprite 0, 3, 0, 0, $27, 0
+ dbsprite 1, 2, 0, 0, $26, 0
+ dbsprite 2, 2, 0, 0, $27, 0
+ dbsprite 3, 1, 0, 0, $26, 0
+ dbsprite 4, 1, 0, 0, $27, 0
+ dbsprite 5, 0, 0, 0, $26, 0
+
+FrameBlock65:
+ db 6 ; #
+ dbsprite 0, 0, 0, 0, $1c, 0
+ dbsprite 1, 0, 0, 0, $1d, 0
+ dbsprite 0, 2, 0, 0, $1c, 0
+ dbsprite 1, 2, 0, 0, $1d, 0
+ dbsprite 0, 4, 0, 0, $1c, 0
+ dbsprite 1, 4, 0, 0, $1d, 0
+
+FrameBlock66:
+ db 2 ; #
+ dbsprite 0, 0, 0, 0, $03, 0
+ dbsprite 0, 1, 0, 0, $13, 0
+
+FrameBlock67:
+ db 1 ; #
+ dbsprite 0, 0, 0, 0, $03, 0
+
+FrameBlock68:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $03, 0
+ dbsprite 1, 0, 0, 0, $03, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $13, 0
+ dbsprite 1, 1, 0, 0, $13, OAM_HFLIP
+
+FrameBlock69:
+ db 1 ; #
+ dbsprite 0, 0, 0, 0, $06, 0
+
+FrameBlock6a:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $2e, 0
+ dbsprite 6, 0, 0, 0, $2e, OAM_HFLIP
+ dbsprite 0, 6, 0, 0, $2e, OAM_VFLIP
+ dbsprite 6, 6, 0, 0, $2e, OAM_HFLIP | OAM_VFLIP
+ dbsprite 3, 0, 0, 0, $2f, 0
+ dbsprite 3, 6, 0, 0, $2f, OAM_VFLIP
+ dbsprite 0, 3, 0, 0, $3e, 0
+ dbsprite 6, 3, 0, 0, $3e, OAM_HFLIP
+
+FrameBlock6b:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $2e, 0
+ dbsprite 4, 0, 0, 0, $2e, OAM_HFLIP
+ dbsprite 0, 4, 0, 0, $2e, OAM_VFLIP
+ dbsprite 4, 4, 0, 0, $2e, OAM_HFLIP | OAM_VFLIP
+ dbsprite 2, 0, 0, 0, $2f, 0
+ dbsprite 2, 4, 0, 0, $2f, OAM_VFLIP
+ dbsprite 0, 2, 0, 0, $3e, 0
+ dbsprite 4, 2, 0, 0, $3e, OAM_HFLIP
+
+FrameBlock6c:
+ db 8 ; #
+ dbsprite 0, 0, 0, 0, $2e, 0
+ dbsprite 2, 0, 0, 0, $2e, OAM_HFLIP
+ dbsprite 0, 2, 0, 0, $2e, OAM_VFLIP
+ dbsprite 2, 2, 0, 0, $2e, OAM_HFLIP | OAM_VFLIP
+ dbsprite 1, 0, 0, 0, $2f, 0
+ dbsprite 1, 2, 0, 0, $2f, OAM_VFLIP
+ dbsprite 0, 1, 0, 0, $3e, 0
+ dbsprite 2, 1, 0, 0, $3e, OAM_HFLIP
+
+FrameBlock6d:
+ db 2 ; #
+ dbsprite 0, 0, 0, 0, $1e, 0
+ dbsprite 1, 0, 0, 0, $1f, 0
+
+FrameBlock6e:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $48, 0
+ dbsprite 1, 0, 0, 0, $48, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $12, 0
+ dbsprite 1, 1, 0, 0, $12, OAM_HFLIP
+
+FrameBlock6f:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $4a, 0
+ dbsprite 1, 0, 0, 0, $07, 0
+ dbsprite 0, 1, 0, 0, $16, 0
+ dbsprite 1, 1, 0, 0, $17, 0
+
+FrameBlock70:
+ db 4 ; #
+ dbsprite 0, 0, 0, 0, $07, OAM_HFLIP
+ dbsprite 1, 0, 0, 0, $4a, OAM_HFLIP
+ dbsprite 0, 1, 0, 0, $17, OAM_HFLIP
+ dbsprite 1, 1, 0, 0, $16, OAM_HFLIP
+
+FrameBlock76:
+ db 7 ; #
+ dbsprite 2, 0, 0, 0, $2f, 0
+ dbsprite 1, 0, 0, 1, $2f, 0
+ dbsprite 3, 0, 0, 1, $2f, 0
+ dbsprite 0, 0, 0, 2, $2e, 0
+ dbsprite 4, 0, 0, 2, $2e, OAM_HFLIP
+ dbsprite 0, 1, 0, 2, $3e, 0
+ dbsprite 4, 1, 0, 2, $3e, OAM_HFLIP
+
+FrameBlock77:
+ db 4 ; #
+ dbsprite 0, 0, 2, 0, $4b, 0
+ dbsprite 1, 0, 2, 0, $4c, 0
+ dbsprite 0, 1, 0, 0, $4c, OAM_HFLIP | OAM_VFLIP
+ dbsprite 1, 1, 0, 0, $4b, OAM_HFLIP | OAM_VFLIP
+
+FrameBlock78:
+ db 1 ; #
+ dbsprite 0, 0, 0, 0, $4d, 0
+
+FrameBlock79:
+ db 1 ; #
+ dbsprite 0, 0, 0, 0, $4e, 0
+
+INCLUDE "data/battle_anims/base_coords.asm"
+
+FrameBlock00:
+ db 0 ; #
+
+ db $00 ; unused
diff --git a/data/battle_anims/special_effect_pointers.asm b/data/battle_anims/special_effect_pointers.asm
new file mode 100644
index 00000000..4e2fb857
--- /dev/null
+++ b/data/battle_anims/special_effect_pointers.asm
@@ -0,0 +1,47 @@
+special_effect: MACRO
+ db \1
+ dw \2
+ENDM
+
+SpecialEffectPointers:
+ ; special effect id, effect routine address
+ special_effect SE_DARK_SCREEN_FLASH, AnimationFlashScreen ; $FE
+ special_effect SE_DARK_SCREEN_PALETTE, AnimationDarkScreenPalette ; $FD
+ special_effect SE_RESET_SCREEN_PALETTE, AnimationResetScreenPalette ; $FC
+ special_effect SE_SHAKE_SCREEN, AnimationShakeScreen ; $FB
+ special_effect SE_WATER_DROPLETS_EVERYWHERE, AnimationWaterDropletsEverywhere ; $FA
+ special_effect SE_DARKEN_MON_PALETTE, AnimationDarkenMonPalette ; $F9
+ special_effect SE_FLASH_SCREEN_LONG, AnimationFlashScreenLong ; $F8
+ special_effect SE_SLIDE_MON_UP, AnimationSlideMonUp ; $F7
+ special_effect SE_SLIDE_MON_DOWN, AnimationSlideMonDown ; $F6
+ special_effect SE_FLASH_MON_PIC, AnimationFlashMonPic ; $F5
+ special_effect SE_SLIDE_MON_OFF, AnimationSlideMonOff ; $F4
+ special_effect SE_BLINK_MON, AnimationBlinkMon ; $F3
+ special_effect SE_MOVE_MON_HORIZONTALLY, AnimationMoveMonHorizontally ; $F2
+ special_effect SE_RESET_MON_POSITION, AnimationResetMonPosition ; $F1
+ special_effect SE_LIGHT_SCREEN_PALETTE, AnimationLightScreenPalette ; $F0
+ special_effect SE_HIDE_MON_PIC, AnimationHideMonPic ; $EF
+ special_effect SE_SQUISH_MON_PIC, AnimationSquishMonPic ; $EE
+ special_effect SE_SHOOT_BALLS_UPWARD, AnimationShootBallsUpward ; $ED
+ special_effect SE_SHOOT_MANY_BALLS_UPWARD, AnimationShootManyBallsUpward ; $EC
+ special_effect SE_BOUNCE_UP_AND_DOWN, AnimationBoundUpAndDown ; $EB
+ special_effect SE_MINIMIZE_MON, AnimationMinimizeMon ; $EA
+ special_effect SE_SLIDE_MON_DOWN_AND_HIDE, AnimationSlideMonDownAndHide ; $E9
+ special_effect SE_TRANSFORM_MON, AnimationTransformMon ; $E8
+ special_effect SE_LEAVES_FALLING, AnimationLeavesFalling ; $E7
+ special_effect SE_PETALS_FALLING, AnimationPetalsFalling ; $E6
+ special_effect SE_SLIDE_MON_HALF_OFF, AnimationSlideMonHalfOff ; $E5
+ special_effect SE_SHAKE_ENEMY_HUD, AnimationShakeEnemyHUD ; $E4
+ special_effect SE_SHAKE_ENEMY_HUD_2, AnimationShakeEnemyHUD ; $E3 unused
+ special_effect SE_SPIRAL_BALLS_INWARD, AnimationSpiralBallsInward ; $E2
+ special_effect SE_DELAY_ANIMATION_10, AnimationDelay10 ; $E1
+ special_effect SE_FLASH_ENEMY_MON_PIC, AnimationFlashEnemyMonPic ; $E0 unused
+ special_effect SE_HIDE_ENEMY_MON_PIC, AnimationHideEnemyMonPic ; $DF
+ special_effect SE_BLINK_ENEMY_MON, AnimationBlinkEnemyMon ; $DE
+ special_effect SE_SHOW_MON_PIC, AnimationShowMonPic ; $DD
+ special_effect SE_SHOW_ENEMY_MON_PIC, AnimationShowEnemyMonPic ; $DC
+ special_effect SE_SLIDE_ENEMY_MON_OFF, AnimationSlideEnemyMonOff ; $DB
+ special_effect SE_SHAKE_BACK_AND_FORTH, AnimationShakeBackAndForth ; $DA
+ special_effect SE_SUBSTITUTE_MON, AnimationSubstitute ; $D9
+ special_effect SE_WAVY_SCREEN, AnimationWavyScreen ; $D8
+ db -1 ; end
diff --git a/data/battle_anims/special_effects.asm b/data/battle_anims/special_effects.asm
new file mode 100644
index 00000000..dd73ff8d
--- /dev/null
+++ b/data/battle_anims/special_effects.asm
@@ -0,0 +1,32 @@
+anim_special_effect: MACRO
+ db \1
+ dw \2
+ENDM
+
+AnimationIdSpecialEffects:
+ ; animation id, effect routine address
+ anim_special_effect MEGA_PUNCH, AnimationFlashScreen
+ anim_special_effect GUILLOTINE, AnimationFlashScreen
+ anim_special_effect MEGA_KICK, AnimationFlashScreen
+ anim_special_effect HEADBUTT, AnimationFlashScreen
+ anim_special_effect TAIL_WHIP, TailWhipAnimationUnused
+ anim_special_effect GROWL, DoGrowlSpecialEffects
+ anim_special_effect DISABLE, AnimationFlashScreen
+ anim_special_effect BLIZZARD, DoBlizzardSpecialEffects
+ anim_special_effect BUBBLEBEAM, AnimationFlashScreen
+ anim_special_effect HYPER_BEAM, FlashScreenEveryFourFrameBlocks
+ anim_special_effect THUNDERBOLT, FlashScreenEveryEightFrameBlocks
+ anim_special_effect REFLECT, AnimationFlashScreen
+ anim_special_effect SELFDESTRUCT, DoExplodeSpecialEffects
+ anim_special_effect SPORE, FlashScreenEveryFourFrameBlocks
+ anim_special_effect EXPLOSION, DoExplodeSpecialEffects
+ anim_special_effect ROCK_SLIDE, DoRockSlideSpecialEffects
+ anim_special_effect TRADE_BALL_DROP_ANIM, TradeHidePokemon
+ anim_special_effect TRADE_BALL_SHAKE_ANIM, TradeShakePokeball
+ anim_special_effect TRADE_BALL_TILT_ANIM, TradeJumpPokeball
+ anim_special_effect TOSS_ANIM, DoBallTossSpecialEffects
+ anim_special_effect SHAKE_ANIM, DoBallShakeSpecialEffects
+ anim_special_effect POOF_ANIM, DoPoofSpecialEffects
+ anim_special_effect GREATTOSS_ANIM, DoBallTossSpecialEffects
+ anim_special_effect ULTRATOSS_ANIM, DoBallTossSpecialEffects
+ db -1 ; end
diff --git a/data/battle_anims/subanimations.asm b/data/battle_anims/subanimations.asm
new file mode 100644
index 00000000..bbdc45c0
--- /dev/null
+++ b/data/battle_anims/subanimations.asm
@@ -0,0 +1,954 @@
+SubanimationPointers:
+ dw Subanimation00
+ dw Subanimation01
+ dw Subanimation02
+ dw Subanimation03
+ dw Subanimation04
+ dw Subanimation05
+ dw Subanimation06
+ dw Subanimation07
+ dw Subanimation08
+ dw Subanimation09
+ dw Subanimation0a
+ dw Subanimation0b
+ dw Subanimation0c
+ dw Subanimation0d
+ dw Subanimation0e
+ dw Subanimation0f
+ dw Subanimation10
+ dw Subanimation11
+ dw Subanimation12
+ dw Subanimation13
+ dw Subanimation14
+ dw Subanimation15
+ dw Subanimation16
+ dw Subanimation17
+ dw Subanimation18
+ dw Subanimation19
+ dw Subanimation1a
+ dw Subanimation1b
+ dw Subanimation1c
+ dw Subanimation1d
+ dw Subanimation1e
+ dw Subanimation1f
+ dw Subanimation20
+ dw Subanimation21
+ dw Subanimation22
+ dw Subanimation23
+ dw Subanimation24
+ dw Subanimation25
+ dw Subanimation26
+ dw Subanimation27
+ dw Subanimation28
+ dw Subanimation29
+ dw Subanimation2a
+ dw Subanimation2b
+ dw Subanimation2c
+ dw Subanimation2d
+ dw Subanimation2e
+ dw Subanimation2f
+ dw Subanimation30
+ dw Subanimation31
+ dw Subanimation32
+ dw Subanimation33
+ dw Subanimation34
+ dw Subanimation35
+ dw Subanimation36
+ dw Subanimation37
+ dw Subanimation38
+ dw Subanimation39
+ dw Subanimation3a
+ dw Subanimation3b
+ dw Subanimation3c
+ dw Subanimation3d
+ dw Subanimation3e
+ dw Subanimation3f
+ dw Subanimation40
+ dw Subanimation41
+ dw Subanimation42
+ dw Subanimation43
+ dw Subanimation44
+ dw Subanimation45
+ dw Subanimation46
+ dw Subanimation47
+ dw Subanimation48
+ dw Subanimation49
+ dw Subanimation4a
+ dw Subanimation4b
+ dw Subanimation4c
+ dw Subanimation4d
+ dw Subanimation4e
+ dw Subanimation4f
+ dw Subanimation50
+ dw Subanimation51
+ dw Subanimation52
+ dw Subanimation53
+ dw Subanimation54
+ dw Subanimation55
+
+; format:
+; subanim type, count
+; REPT count
+; db frame block id, base coordinate id, frame block mode
+; endr
+
+subanim: MACRO
+ db (\1 << 5) | \2
+ENDM
+
+Subanimation04:
+ subanim SUBANIMTYPE_HFLIP, 3
+ db FRAMEBLOCK_02, BASECOORD_1A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_02, BASECOORD_10, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_02, BASECOORD_03, FRAMEBLOCKMODE_00
+
+Subanimation05:
+ subanim SUBANIMTYPE_HFLIP, 1
+ db FRAMEBLOCK_02, BASECOORD_10, FRAMEBLOCKMODE_00
+
+Subanimation08:
+ subanim SUBANIMTYPE_NORMAL, 11
+ db FRAMEBLOCK_03, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_44, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_94, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_60, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_76, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_9F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_8D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_A0, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_1A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_A1, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_34, FRAMEBLOCKMODE_00
+
+Subanimation07:
+ subanim SUBANIMTYPE_NORMAL, 11
+ db FRAMEBLOCK_03, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_A2, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_31, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_A3, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_32, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_A4, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_92, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_A5, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_15, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_A6, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_34, FRAMEBLOCKMODE_00
+
+Subanimation06:
+ subanim SUBANIMTYPE_NORMAL, 11
+ db FRAMEBLOCK_03, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_A2, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_93, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_61, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_73, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_A7, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_33, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_A8, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_0E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_A9, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_34, FRAMEBLOCKMODE_00
+
+Subanimation09:
+ subanim SUBANIMTYPE_NORMAL, 4
+ db FRAMEBLOCK_03, BASECOORD_21, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_04, BASECOORD_21, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_03, BASECOORD_21, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_05, BASECOORD_21, FRAMEBLOCKMODE_04
+
+Subanimation0a:
+ subanim SUBANIMTYPE_HFLIP, 6
+ db FRAMEBLOCK_06, BASECOORD_1B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_07, BASECOORD_1B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_08, BASECOORD_36, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_09, BASECOORD_36, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0A, BASECOORD_15, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0A, BASECOORD_15, FRAMEBLOCKMODE_00
+
+Subanimation0b:
+ subanim SUBANIMTYPE_NORMAL, 4
+ db FRAMEBLOCK_01, BASECOORD_2D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_2F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_35, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_4D, FRAMEBLOCKMODE_00
+
+Subanimation55:
+ subanim SUBANIMTYPE_HFLIP, 1
+ db FRAMEBLOCK_01, BASECOORD_9D, FRAMEBLOCKMODE_00
+
+Subanimation11:
+ subanim SUBANIMTYPE_HFLIP, 12
+ db FRAMEBLOCK_0B, BASECOORD_26, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0C, BASECOORD_26, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0B, BASECOORD_26, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0C, BASECOORD_26, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0B, BASECOORD_28, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0C, BASECOORD_28, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0B, BASECOORD_28, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0C, BASECOORD_28, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0B, BASECOORD_27, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0C, BASECOORD_27, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0B, BASECOORD_27, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0C, BASECOORD_27, FRAMEBLOCKMODE_00
+
+Subanimation2b:
+ subanim SUBANIMTYPE_HFLIP, 11
+ db FRAMEBLOCK_0D, BASECOORD_03, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_0E, BASECOORD_03, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_0F, BASECOORD_03, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0D, BASECOORD_11, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0D, BASECOORD_11, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0D, BASECOORD_37, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0D, BASECOORD_37, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_10, BASECOORD_21, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_10, BASECOORD_21, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_11, BASECOORD_1B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_11, BASECOORD_1B, FRAMEBLOCKMODE_00
+
+Subanimation2c:
+ subanim SUBANIMTYPE_HFLIP, 12
+ db FRAMEBLOCK_12, BASECOORD_01, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_12, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_12, BASECOORD_1B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_12, BASECOORD_25, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_13, BASECOORD_38, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_13, BASECOORD_38, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_14, BASECOORD_38, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_14, BASECOORD_38, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_15, BASECOORD_38, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_15, BASECOORD_38, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_16, BASECOORD_38, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_16, BASECOORD_38, FRAMEBLOCKMODE_00
+
+Subanimation12:
+ subanim SUBANIMTYPE_COORDFLIP, 9
+ db FRAMEBLOCK_17, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_17, BASECOORD_39, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_17, BASECOORD_3A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_17, BASECOORD_3B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_17, BASECOORD_3C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_17, BASECOORD_3D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_17, BASECOORD_3E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_17, BASECOORD_3F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_17, BASECOORD_1F, FRAMEBLOCKMODE_00
+
+Subanimation00:
+ subanim SUBANIMTYPE_HFLIP, 1
+ db FRAMEBLOCK_01, BASECOORD_17, FRAMEBLOCKMODE_00
+
+Subanimation01:
+ subanim SUBANIMTYPE_HFLIP, 2
+ db FRAMEBLOCK_01, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_01, BASECOORD_1D, FRAMEBLOCKMODE_00
+
+Subanimation02:
+ subanim SUBANIMTYPE_HFLIP, 3
+ db FRAMEBLOCK_01, BASECOORD_12, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_01, BASECOORD_15, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_01, BASECOORD_1C, FRAMEBLOCKMODE_00
+
+Subanimation03:
+ subanim SUBANIMTYPE_HFLIP, 4
+ db FRAMEBLOCK_01, BASECOORD_0B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_01, BASECOORD_11, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_01, BASECOORD_18, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_01, BASECOORD_1D, FRAMEBLOCKMODE_00
+
+Subanimation0c:
+ subanim SUBANIMTYPE_HFLIP, 3
+ db FRAMEBLOCK_0C, BASECOORD_20, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0C, BASECOORD_21, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0C, BASECOORD_23, FRAMEBLOCKMODE_00
+
+Subanimation0d:
+ subanim SUBANIMTYPE_HFLIP, 6
+ db FRAMEBLOCK_0C, BASECOORD_20, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_0C, BASECOORD_15, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0C, BASECOORD_21, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_0C, BASECOORD_17, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0C, BASECOORD_23, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_0C, BASECOORD_19, FRAMEBLOCKMODE_00
+
+Subanimation0e:
+ subanim SUBANIMTYPE_HFLIP, 9
+ db FRAMEBLOCK_0C, BASECOORD_20, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_0C, BASECOORD_15, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_0C, BASECOORD_07, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0C, BASECOORD_21, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_0C, BASECOORD_17, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_0C, BASECOORD_09, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_0C, BASECOORD_23, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_0C, BASECOORD_19, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_0C, BASECOORD_0C, FRAMEBLOCKMODE_00
+
+Subanimation1f:
+ subanim SUBANIMTYPE_REVERSE, 5
+ db FRAMEBLOCK_0C, BASECOORD_30, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_0C, BASECOORD_40, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_0C, BASECOORD_41, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_0C, BASECOORD_42, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_0C, BASECOORD_21, FRAMEBLOCKMODE_00
+
+Subanimation2e:
+ subanim SUBANIMTYPE_HVFLIP, 14
+ db FRAMEBLOCK_18, BASECOORD_43, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_75, BASECOORD_52, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_19, BASECOORD_43, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_75, BASECOORD_63, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_1A, BASECOORD_43, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_75, BASECOORD_4D, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_1B, BASECOORD_43, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_75, BASECOORD_97, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_1C, BASECOORD_43, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_75, BASECOORD_98, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_1D, BASECOORD_43, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_75, BASECOORD_58, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_1E, BASECOORD_43, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_75, BASECOORD_1B, FRAMEBLOCKMODE_00
+
+Subanimation2f:
+ subanim SUBANIMTYPE_HFLIP, 4
+ db FRAMEBLOCK_1F, BASECOORD_24, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_20, BASECOORD_20, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_21, BASECOORD_1A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_22, BASECOORD_15, FRAMEBLOCKMODE_00
+
+Subanimation30:
+ subanim SUBANIMTYPE_HFLIP, 18
+ db FRAMEBLOCK_23, BASECOORD_00, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_23, BASECOORD_02, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_23, BASECOORD_04, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_23, BASECOORD_07, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_23, BASECOORD_02, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_23, BASECOORD_04, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_23, BASECOORD_0E, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_23, BASECOORD_02, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_23, BASECOORD_0C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_25, BASECOORD_07, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_25, BASECOORD_0E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_25, BASECOORD_15, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_24, BASECOORD_24, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_23, BASECOORD_1C, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_23, BASECOORD_23, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_23, BASECOORD_21, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_24, BASECOORD_28, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_24, BASECOORD_28, FRAMEBLOCKMODE_00
+
+Subanimation0f:
+ subanim SUBANIMTYPE_HFLIP, 12
+ db FRAMEBLOCK_26, BASECOORD_0E, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_26, BASECOORD_16, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_26, BASECOORD_1C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_27, BASECOORD_0E, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_27, BASECOORD_16, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_27, BASECOORD_1C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_28, BASECOORD_0E, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_28, BASECOORD_16, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_28, BASECOORD_1C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_29, BASECOORD_0E, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_29, BASECOORD_16, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_29, BASECOORD_1C, FRAMEBLOCKMODE_00
+
+Subanimation16:
+ subanim SUBANIMTYPE_HFLIP, 12
+ db FRAMEBLOCK_2A, BASECOORD_05, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2B, BASECOORD_05, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_2B, BASECOORD_0C, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_2A, BASECOORD_11, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_2B, BASECOORD_11, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_2B, BASECOORD_17, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_2A, BASECOORD_1B, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_2B, BASECOORD_1B, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_2B, BASECOORD_20, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_2A, BASECOORD_2F, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_2C, BASECOORD_00, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_2C, BASECOORD_00, FRAMEBLOCKMODE_00
+
+Subanimation10:
+ subanim SUBANIMTYPE_REVERSE, 8
+ db FRAMEBLOCK_2D, BASECOORD_44, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2E, BASECOORD_45, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2D, BASECOORD_46, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2E, BASECOORD_47, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2D, BASECOORD_48, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2E, BASECOORD_49, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2D, BASECOORD_2F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2E, BASECOORD_1A, FRAMEBLOCKMODE_00
+
+Subanimation31:
+ subanim SUBANIMTYPE_HVFLIP, 10
+ db FRAMEBLOCK_2F, BASECOORD_46, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2F, BASECOORD_4A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2F, BASECOORD_4B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2F, BASECOORD_4C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2F, BASECOORD_4D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2F, BASECOORD_4E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2F, BASECOORD_4F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2F, BASECOORD_50, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2F, BASECOORD_2E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_2F, BASECOORD_51, FRAMEBLOCKMODE_00
+
+Subanimation13:
+ subanim SUBANIMTYPE_REVERSE, 6
+ db FRAMEBLOCK_30, BASECOORD_31, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_30, BASECOORD_32, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_30, BASECOORD_92, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_30, BASECOORD_0E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_30, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_30, BASECOORD_10, FRAMEBLOCKMODE_00
+
+Subanimation14:
+ subanim SUBANIMTYPE_HFLIP, 9
+ db FRAMEBLOCK_30, BASECOORD_10, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_30, BASECOORD_10, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_31, BASECOORD_1C, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_31, BASECOORD_21, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_31, BASECOORD_26, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_30, BASECOORD_10, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_31, BASECOORD_1D, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_31, BASECOORD_22, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_31, BASECOORD_27, FRAMEBLOCKMODE_00
+
+Subanimation41:
+ subanim SUBANIMTYPE_REVERSE, 5
+ db FRAMEBLOCK_03, BASECOORD_31, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_32, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_92, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_0E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_03, BASECOORD_10, FRAMEBLOCKMODE_00
+
+Subanimation42:
+ subanim SUBANIMTYPE_HFLIP, 3
+ db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_08, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_08, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_5A, BASECOORD_08, FRAMEBLOCKMODE_00
+
+Subanimation15:
+ subanim SUBANIMTYPE_HVFLIP, 2
+ db FRAMEBLOCK_35, BASECOORD_52, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_35, BASECOORD_53, FRAMEBLOCKMODE_00
+
+Subanimation17:
+ subanim SUBANIMTYPE_HFLIP, 4
+ db FRAMEBLOCK_36, BASECOORD_54, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_36, BASECOORD_55, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_37, BASECOORD_56, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_37, BASECOORD_57, FRAMEBLOCKMODE_00
+
+Subanimation18:
+ subanim SUBANIMTYPE_ENEMY, 4
+ db FRAMEBLOCK_36, BASECOORD_54, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_36, BASECOORD_55, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_37, BASECOORD_56, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_37, BASECOORD_57, FRAMEBLOCKMODE_00
+
+Subanimation40:
+ subanim SUBANIMTYPE_HFLIP, 6
+ db FRAMEBLOCK_17, BASECOORD_54, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_17, BASECOORD_55, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_17, BASECOORD_0E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_17, BASECOORD_56, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_17, BASECOORD_57, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_17, BASECOORD_13, FRAMEBLOCKMODE_00
+
+Subanimation19:
+ subanim SUBANIMTYPE_REVERSE, 12
+ db FRAMEBLOCK_38, BASECOORD_31, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_39, BASECOORD_31, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_38, BASECOORD_32, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_39, BASECOORD_32, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_38, BASECOORD_92, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_39, BASECOORD_92, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_38, BASECOORD_0E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_39, BASECOORD_0E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_38, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_39, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_38, BASECOORD_10, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_39, BASECOORD_10, FRAMEBLOCKMODE_00
+
+Subanimation1a:
+ subanim SUBANIMTYPE_HFLIP, 16
+ db FRAMEBLOCK_3A, BASECOORD_08, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3B, BASECOORD_08, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3C, BASECOORD_08, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3D, BASECOORD_08, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3E, BASECOORD_08, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3F, BASECOORD_08, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3E, BASECOORD_08, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3F, BASECOORD_08, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3A, BASECOORD_0B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3B, BASECOORD_0B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3C, BASECOORD_0B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3D, BASECOORD_0B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3E, BASECOORD_0B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3F, BASECOORD_0B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3E, BASECOORD_0B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3F, BASECOORD_0B, FRAMEBLOCKMODE_00
+
+Subanimation1b:
+ subanim SUBANIMTYPE_REVERSE, 4
+ db FRAMEBLOCK_40, BASECOORD_31, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_40, BASECOORD_32, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_40, BASECOORD_92, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_40, BASECOORD_15, FRAMEBLOCKMODE_00
+
+Subanimation1c:
+ subanim SUBANIMTYPE_HFLIP, 3
+ db FRAMEBLOCK_41, BASECOORD_58, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_41, BASECOORD_59, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_41, BASECOORD_21, FRAMEBLOCKMODE_00
+
+Subanimation1d:
+ subanim SUBANIMTYPE_ENEMY, 15
+ db FRAMEBLOCK_24, BASECOORD_9A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_23, BASECOORD_1B, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_24, BASECOORD_22, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_23, BASECOORD_16, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_23, BASECOORD_1D, FRAMEBLOCKMODE_02
+ db FRAMEBLOCK_24, BASECOORD_98, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_25, BASECOORD_2C, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_25, BASECOORD_2A, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_25, BASECOORD_99, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_25, BASECOORD_62, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_25, BASECOORD_99, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_25, BASECOORD_62, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_25, BASECOORD_99, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_25, BASECOORD_62, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_25, BASECOORD_99, FRAMEBLOCKMODE_03
+
+Subanimation1e:
+ subanim SUBANIMTYPE_NORMAL, 1
+ db FRAMEBLOCK_25, BASECOORD_75, FRAMEBLOCKMODE_00
+
+Subanimation20:
+ subanim SUBANIMTYPE_HFLIP, 2
+ db FRAMEBLOCK_42, BASECOORD_07, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_43, BASECOORD_07, FRAMEBLOCKMODE_00
+
+Subanimation21:
+ subanim SUBANIMTYPE_HFLIP, 3
+ db FRAMEBLOCK_44, BASECOORD_00, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_45, BASECOORD_08, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_46, BASECOORD_10, FRAMEBLOCKMODE_02
+
+Subanimation22:
+ subanim SUBANIMTYPE_REVERSE, 11
+ db FRAMEBLOCK_47, BASECOORD_10, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_56, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_07, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_AA, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_AB, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_AC, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_AD, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_AE, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_AF, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_89, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_B0, FRAMEBLOCKMODE_00
+
+Subanimation2d:
+ subanim SUBANIMTYPE_COORDFLIP, 6
+ db FRAMEBLOCK_44, BASECOORD_64, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_45, BASECOORD_65, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_46, BASECOORD_66, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_66, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_66, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_66, FRAMEBLOCKMODE_00
+
+Subanimation39:
+ subanim SUBANIMTYPE_COORDFLIP, 1
+ db FRAMEBLOCK_47, BASECOORD_67, FRAMEBLOCKMODE_00
+
+Subanimation4e:
+ subanim SUBANIMTYPE_HFLIP, 1
+ db FRAMEBLOCK_71, BASECOORD_0F, FRAMEBLOCKMODE_03
+
+Subanimation4f:
+ subanim SUBANIMTYPE_HFLIP, 7
+ db FRAMEBLOCK_71, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_71, BASECOORD_08, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_71, BASECOORD_01, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_71, BASECOORD_95, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_72, BASECOORD_95, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_73, BASECOORD_95, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_74, BASECOORD_95, FRAMEBLOCKMODE_00
+
+Subanimation50:
+ subanim SUBANIMTYPE_HFLIP, 8
+ db FRAMEBLOCK_74, BASECOORD_95, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_73, BASECOORD_95, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_72, BASECOORD_95, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_71, BASECOORD_95, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_71, BASECOORD_01, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_71, BASECOORD_08, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_71, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_71, BASECOORD_16, FRAMEBLOCKMODE_00
+
+Subanimation29:
+ subanim SUBANIMTYPE_HFLIP, 29
+ db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_4A, BASECOORD_68, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_4B, BASECOORD_2A, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_4A, BASECOORD_68, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_4B, BASECOORD_2A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_4C, BASECOORD_6A, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_4D, BASECOORD_69, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_6B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_4C, BASECOORD_6A, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_4D, BASECOORD_69, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_4A, BASECOORD_68, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_4B, BASECOORD_2A, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_6C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_4A, BASECOORD_68, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_4B, BASECOORD_2A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_4C, BASECOORD_6A, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_4D, BASECOORD_69, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_6D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_4C, BASECOORD_6A, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_4D, BASECOORD_2A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_4A, BASECOORD_68, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_4B, BASECOORD_2A, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_4A, BASECOORD_68, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_4B, BASECOORD_2A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_4C, BASECOORD_6A, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_4D, BASECOORD_2A, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_6B, FRAMEBLOCKMODE_00
+
+Subanimation2a:
+ subanim SUBANIMTYPE_HFLIP, 4
+ db FRAMEBLOCK_4E, BASECOORD_2B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_4F, BASECOORD_2B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_50, BASECOORD_2B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_50, BASECOORD_2B, FRAMEBLOCKMODE_00
+
+Subanimation23:
+ subanim SUBANIMTYPE_HFLIP, 2
+ db FRAMEBLOCK_51, BASECOORD_2D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_51, BASECOORD_6E, FRAMEBLOCKMODE_00
+
+Subanimation24:
+ subanim SUBANIMTYPE_ENEMY, 2
+ db FRAMEBLOCK_51, BASECOORD_2D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_51, BASECOORD_6E, FRAMEBLOCKMODE_00
+
+Subanimation25:
+ subanim SUBANIMTYPE_COORDFLIP, 2
+ db FRAMEBLOCK_52, BASECOORD_71, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_52, BASECOORD_72, FRAMEBLOCKMODE_00
+
+Subanimation26:
+ subanim SUBANIMTYPE_NORMAL, 2
+ db FRAMEBLOCK_52, BASECOORD_01, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_52, BASECOORD_2C, FRAMEBLOCKMODE_00
+
+Subanimation3a:
+ subanim SUBANIMTYPE_COORDFLIP, 3
+ db FRAMEBLOCK_53, BASECOORD_71, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_53, BASECOORD_7F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_53, BASECOORD_81, FRAMEBLOCKMODE_00
+
+Subanimation3b:
+ subanim SUBANIMTYPE_NORMAL, 3
+ db FRAMEBLOCK_53, BASECOORD_01, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_53, BASECOORD_15, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_53, BASECOORD_2C, FRAMEBLOCKMODE_00
+
+Subanimation27:
+ subanim SUBANIMTYPE_ENEMY, 2
+ db FRAMEBLOCK_54, BASECOORD_01, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_54, BASECOORD_2C, FRAMEBLOCKMODE_00
+
+Subanimation28:
+ subanim SUBANIMTYPE_HVFLIP, 3
+ db FRAMEBLOCK_55, BASECOORD_73, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_56, BASECOORD_73, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_57, BASECOORD_73, FRAMEBLOCKMODE_00
+
+Subanimation32:
+ subanim SUBANIMTYPE_COORDFLIP, 3
+ db FRAMEBLOCK_47, BASECOORD_74, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_43, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_47, BASECOORD_75, FRAMEBLOCKMODE_00
+
+Subanimation33:
+ subanim SUBANIMTYPE_HVFLIP, 6
+ db FRAMEBLOCK_58, BASECOORD_76, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_34, BASECOORD_76, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_58, BASECOORD_76, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_34, BASECOORD_76, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_58, BASECOORD_76, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_34, BASECOORD_76, FRAMEBLOCKMODE_00
+
+Subanimation3c:
+ subanim SUBANIMTYPE_COORDFLIP, 7
+ db FRAMEBLOCK_59, BASECOORD_79, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_59, BASECOORD_7B, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_59, BASECOORD_77, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_59, BASECOORD_7A, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_59, BASECOORD_78, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_59, BASECOORD_7C, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_59, BASECOORD_76, FRAMEBLOCKMODE_00
+
+Subanimation3d:
+ subanim SUBANIMTYPE_NORMAL, 8
+ db FRAMEBLOCK_3A, BASECOORD_4D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3B, BASECOORD_4D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3C, BASECOORD_4D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3D, BASECOORD_4D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3E, BASECOORD_4D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3F, BASECOORD_4D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3E, BASECOORD_4D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_3F, BASECOORD_4D, FRAMEBLOCKMODE_00
+
+Subanimation34:
+ subanim SUBANIMTYPE_HVFLIP, 21
+ db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_7D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_7D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_5A, BASECOORD_7D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_5A, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_7E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_7E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_5A, BASECOORD_7E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_7F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_7F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_5A, BASECOORD_7F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_80, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_80, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_5A, BASECOORD_80, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_81, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_81, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_5A, BASECOORD_81, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_82, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_82, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_5A, BASECOORD_82, FRAMEBLOCKMODE_00
+
+Subanimation35:
+ subanim SUBANIMTYPE_HVFLIP, 4
+ db FRAMEBLOCK_5B, BASECOORD_83, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_5C, BASECOORD_84, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_5D, BASECOORD_85, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_5E, BASECOORD_09, FRAMEBLOCKMODE_00
+
+Subanimation36:
+ subanim SUBANIMTYPE_HFLIP, 8
+ db FRAMEBLOCK_5F, BASECOORD_2A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_5F, BASECOORD_00, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_60, BASECOORD_2A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_60, BASECOORD_00, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_61, BASECOORD_2A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_61, BASECOORD_00, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_62, BASECOORD_2A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_62, BASECOORD_00, FRAMEBLOCKMODE_00
+
+Subanimation37:
+ subanim SUBANIMTYPE_HVFLIP, 10
+ db FRAMEBLOCK_63, BASECOORD_89, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_64, BASECOORD_75, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_63, BASECOORD_76, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_65, BASECOORD_0D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_65, BASECOORD_86, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_65, BASECOORD_12, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_65, BASECOORD_87, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_65, BASECOORD_17, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_65, BASECOORD_88, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_65, BASECOORD_1A, FRAMEBLOCKMODE_00
+
+Subanimation38:
+ subanim SUBANIMTYPE_HFLIP, 16
+ db FRAMEBLOCK_66, BASECOORD_8A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_66, BASECOORD_33, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_66, BASECOORD_2E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_67, BASECOORD_24, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_66, BASECOORD_01, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_66, BASECOORD_10, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_66, BASECOORD_1D, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_67, BASECOORD_28, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_66, BASECOORD_2A, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_66, BASECOORD_0E, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_66, BASECOORD_1B, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_67, BASECOORD_26, FRAMEBLOCKMODE_03
+ db FRAMEBLOCK_66, BASECOORD_03, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_66, BASECOORD_12, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_66, BASECOORD_1E, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_67, BASECOORD_29, FRAMEBLOCKMODE_00
+
+Subanimation3e:
+ subanim SUBANIMTYPE_REVERSE, 18
+ db FRAMEBLOCK_02, BASECOORD_31, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_34, BASECOORD_31, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_02, BASECOORD_31, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_02, BASECOORD_32, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_34, BASECOORD_32, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_02, BASECOORD_32, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_02, BASECOORD_92, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_34, BASECOORD_92, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_02, BASECOORD_92, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_02, BASECOORD_0E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_34, BASECOORD_0E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_02, BASECOORD_0E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_02, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_34, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_02, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_02, BASECOORD_10, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_34, BASECOORD_10, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_02, BASECOORD_10, FRAMEBLOCKMODE_00
+
+Subanimation3f:
+ subanim SUBANIMTYPE_COORDFLIP, 18
+ db FRAMEBLOCK_68, BASECOORD_4B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_8C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_20, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_1C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_19, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_14, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_76, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_8D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_15, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_10, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_0C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_06, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_8E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_8F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_90, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_26, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_23, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_68, BASECOORD_1F, FRAMEBLOCKMODE_00
+
+Subanimation44:
+ subanim SUBANIMTYPE_HVFLIP, 12
+ db FRAMEBLOCK_69, BASECOORD_4B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_69, BASECOORD_8C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_69, BASECOORD_20, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_69, BASECOORD_1C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_69, BASECOORD_19, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_69, BASECOORD_14, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_69, BASECOORD_76, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_69, BASECOORD_8D, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_69, BASECOORD_15, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_69, BASECOORD_10, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_69, BASECOORD_0C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_69, BASECOORD_06, FRAMEBLOCKMODE_00
+
+Subanimation43:
+ subanim SUBANIMTYPE_ENEMY, 3
+ db FRAMEBLOCK_6A, BASECOORD_07, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6B, BASECOORD_0F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6C, BASECOORD_17, FRAMEBLOCKMODE_00
+
+Subanimation45:
+ subanim SUBANIMTYPE_HVFLIP, 4
+ db FRAMEBLOCK_6D, BASECOORD_8B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6D, BASECOORD_84, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6D, BASECOORD_63, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6D, BASECOORD_8C, FRAMEBLOCKMODE_00
+
+Subanimation46:
+ subanim SUBANIMTYPE_HVFLIP, 6
+ db FRAMEBLOCK_6D, BASECOORD_8B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6D, BASECOORD_84, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6D, BASECOORD_63, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6D, BASECOORD_8C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6D, BASECOORD_0A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6D, BASECOORD_89, FRAMEBLOCKMODE_00
+
+Subanimation47:
+ subanim SUBANIMTYPE_HVFLIP, 3
+ db FRAMEBLOCK_06, BASECOORD_82, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_07, BASECOORD_82, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_08, BASECOORD_96, FRAMEBLOCKMODE_00
+
+Subanimation48:
+ subanim SUBANIMTYPE_NORMAL, 6
+ db FRAMEBLOCK_03, BASECOORD_41, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_03, BASECOORD_48, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_04, BASECOORD_48, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_03, BASECOORD_48, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_05, BASECOORD_48, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_03, BASECOORD_48, FRAMEBLOCKMODE_03
+
+Subanimation49:
+ subanim SUBANIMTYPE_NORMAL, 4
+ db FRAMEBLOCK_04, BASECOORD_48, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_03, BASECOORD_48, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_05, BASECOORD_48, FRAMEBLOCKMODE_04
+ db FRAMEBLOCK_03, BASECOORD_48, FRAMEBLOCKMODE_03
+
+Subanimation4a:
+ subanim SUBANIMTYPE_NORMAL, 1
+ db FRAMEBLOCK_04, BASECOORD_84, FRAMEBLOCKMODE_03
+
+Subanimation4b:
+ subanim SUBANIMTYPE_NORMAL, 3
+ db FRAMEBLOCK_06, BASECOORD_72, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_07, BASECOORD_72, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_08, BASECOORD_72, FRAMEBLOCKMODE_00
+
+Subanimation4c:
+ subanim SUBANIMTYPE_COORDFLIP, 8
+ db FRAMEBLOCK_6F, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6E, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_70, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6E, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6F, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6E, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_70, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_6E, BASECOORD_30, FRAMEBLOCKMODE_00
+
+Subanimation4d:
+ subanim SUBANIMTYPE_HVFLIP, 6
+ db FRAMEBLOCK_32, BASECOORD_4B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_33, BASECOORD_4F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_32, BASECOORD_20, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_33, BASECOORD_16, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_32, BASECOORD_19, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_33, BASECOORD_0D, FRAMEBLOCKMODE_00
+
+Subanimation51:
+ subanim SUBANIMTYPE_ENEMY, 6
+ db FRAMEBLOCK_76, BASECOORD_1B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_34, BASECOORD_1B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_76, BASECOORD_1B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_34, BASECOORD_1B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_76, BASECOORD_1B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_34, BASECOORD_1B, FRAMEBLOCKMODE_00
+
+Subanimation52:
+ subanim SUBANIMTYPE_HFLIP, 7
+ db FRAMEBLOCK_77, BASECOORD_25, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_77, BASECOORD_9B, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_77, BASECOORD_1A, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_77, BASECOORD_9C, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_77, BASECOORD_2F, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_77, BASECOORD_50, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_77, BASECOORD_8C, FRAMEBLOCKMODE_00
+
+Subanimation53:
+ subanim SUBANIMTYPE_NORMAL, 12
+ db FRAMEBLOCK_78, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_78, BASECOORD_A2, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_78, BASECOORD_93, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_78, BASECOORD_61, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_78, BASECOORD_73, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_78, BASECOORD_A7, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_78, BASECOORD_33, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_78, BASECOORD_A8, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_78, BASECOORD_0E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_78, BASECOORD_A9, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_78, BASECOORD_34, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_01, BASECOORD_9E, FRAMEBLOCKMODE_00
+
+Subanimation54:
+ subanim SUBANIMTYPE_NORMAL, 11
+ db FRAMEBLOCK_79, BASECOORD_30, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_79, BASECOORD_A2, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_79, BASECOORD_93, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_79, BASECOORD_61, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_79, BASECOORD_73, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_79, BASECOORD_A7, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_79, BASECOORD_33, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_79, BASECOORD_A8, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_79, BASECOORD_0E, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_79, BASECOORD_A9, FRAMEBLOCKMODE_00
+ db FRAMEBLOCK_79, BASECOORD_34, FRAMEBLOCKMODE_00
diff --git a/data/bike_riding_tilesets.asm b/data/bike_riding_tilesets.asm
deleted file mode 100755
index 48c2cee6..00000000
--- a/data/bike_riding_tilesets.asm
+++ /dev/null
@@ -1,2 +0,0 @@
-BikeRidingTilesets::
- db OVERWORLD, FOREST, UNDERGROUND, SHIP_PORT, CAVERN, $FF
diff --git a/data/collision.asm b/data/collision.asm
deleted file mode 100644
index 8d35793d..00000000
--- a/data/collision.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-Underground_Coll:: INCBIN "gfx/tilesets/underground.tilecoll"
-Overworld_Coll:: INCBIN "gfx/tilesets/overworld.tilecoll"
-RedsHouse1_Coll::
-RedsHouse2_Coll:: INCBIN "gfx/tilesets/reds_house.tilecoll"
-Mart_Coll::
-Pokecenter_Coll:: INCBIN "gfx/tilesets/pokecenter.tilecoll"
-Dojo_Coll::
-Gym_Coll:: INCBIN "gfx/tilesets/gym.tilecoll"
-Forest_Coll:: INCBIN "gfx/tilesets/forest.tilecoll"
-House_Coll:: INCBIN "gfx/tilesets/house.tilecoll"
-ForestGate_Coll::
-Museum_Coll::
-Gate_Coll:: INCBIN "gfx/tilesets/gate.tilecoll"
-Ship_Coll:: INCBIN "gfx/tilesets/ship.tilecoll"
-ShipPort_Coll:: INCBIN "gfx/tilesets/ship_port.tilecoll"
-Cemetery_Coll:: INCBIN "gfx/tilesets/cemetery.tilecoll"
-Interior_Coll:: INCBIN "gfx/tilesets/interior.tilecoll"
-Cavern_Coll:: INCBIN "gfx/tilesets/cavern.tilecoll"
-Lobby_Coll:: INCBIN "gfx/tilesets/lobby.tilecoll"
-Mansion_Coll:: INCBIN "gfx/tilesets/mansion.tilecoll"
-Lab_Coll:: INCBIN "gfx/tilesets/lab.tilecoll"
-Club_Coll:: INCBIN "gfx/tilesets/club.tilecoll"
-Facility_Coll:: INCBIN "gfx/tilesets/facility.tilecoll"
-Plateau_Coll:: INCBIN "gfx/tilesets/plateau.tilecoll"
-BeachHouse_Coll:: INCBIN "gfx/tilesets/beachhouse.tilecoll"
diff --git a/data/credit_mons.asm b/data/credits/credits_mons.asm
index 15212048..15212048 100755
--- a/data/credit_mons.asm
+++ b/data/credits/credits_mons.asm
diff --git a/data/credits/credits_order.asm b/data/credits/credits_order.asm
new file mode 100755
index 00000000..c2b5e523
--- /dev/null
+++ b/data/credits/credits_order.asm
@@ -0,0 +1,37 @@
+CreditsOrder:
+; subsequent credits elements will be displayed on separate lines.
+; CRED_TEXT, CRED_TEXT_FADE, CRED_TEXT_MON, and CRED_TEXT_FADE_MON are
+; commands that are used to go to the next set of credits texts.
+ db CRED_POKEMON, CRED_VERSION, CRED_TEXT_FADE_MON
+ db CRED_DIRECTOR, CRED_TAJIRI, CRED_TEXT_FADE_MON
+ db CRED_PROGRAMMERS, CRED_OOTA, CRED_MORIMOTO, CRED_WATANABE, CRED_TEXT_FADE
+ db CRED_PROGRAMMERS, CRED_MASUDA, CRED_TAMADA, CRED_TEXT_MON
+ db CRED_CHARACTER_DESIGN, CRED_SUGIMORI, CRED_NISHIDA, CRED_TEXT_FADE_MON
+ db CRED_MUSIC, CRED_MASUDA, CRED_TEXT_FADE
+ db CRED_SOUND_EFFECTS, CRED_MASUDA, CRED_WATANABE, CRED_TEXT_MON
+ db CRED_GAME_DESIGN, CRED_TAJIRI, CRED_NISHINO, CRED_TEXT_FADE_MON
+ db CRED_MONSTER_DESIGN, CRED_SUGIMORI, CRED_NISHIDA, CRED_YOSHIDA, CRED_TEXT_FADE_MON
+ db CRED_GAME_SCENARIO, CRED_TAJIRI, CRED_TEXT_FADE
+ db CRED_GAME_SCENARIO, CRED_MATSUMITA, CRED_TEXT_MON
+ db CRED_PARAMETRIC_DESIGN, CRED_NISHINO, CRED_TEXT_FADE_MON
+ db CRED_MAP_DESIGN, CRED_TAJIRI, CRED_NISHINO, CRED_SEYA, CRED_TEXT_FADE_MON
+ db CRED_TESTING, CRED_SEKINE, CRED_SEYA, CRED_TEXT_FADE
+ db CRED_TESTING, CRED_SHIMAMURA, CRED_SHIMOYAMADA, CRED_TEXT_MON
+ db CRED_SPECIAL_THANKS, CRED_SHOGAKUKAN, CRED_TEXT_FADE_MON
+ db CRED_PIKACHU_VOICE, CRED_OOTANI, CRED_TEXT_FADE_MON
+ db CRED_PRODUCER, CRED_IZUSHI, CRED_TEXT_FADE
+ db CRED_PRODUCER, CRED_KAWAGUCHI, CRED_TEXT
+ db CRED_PRODUCER, CRED_ISHIHARA, CRED_TEXT_MON
+ db CRED_U_S_STAFF, CRED_TEXT_FADE
+ db CRED_U_S_COORD, CRED_TILDEN, CRED_TEXT_FADE
+ db CRED_U_S_COORD, CRED_KAWAKAMI, CRED_NAKAMURA2, CRED_TEXT
+ db CRED_U_S_COORD, CRED_SHOEMAKE, CRED_OSBORNE, CRED_TEXT
+ db CRED_TRANSLATION, CRED_OGASAWARA, CRED_TEXT_FADE
+ db CRED_PROGRAMMERS, CRED_MURAKAWA, CRED_FUKUI, CRED_TEXT_FADE
+ db CRED_CHARACTER_DESIGN, CRED_HOSOKAWA, CRED_TEXT_FADE
+ db CRED_SPECIAL_THANKS, CRED_OKUBO, CRED_HARADA2, CRED_TEXT_FADE
+ db CRED_SPECIAL_THANKS, CRED_NAKAMICHI, CRED_YOSHIMURA, CRED_YAMAZAKI, CRED_TEXT
+ db CRED_TESTING, CRED_PAAD, CRED_SUPER_MARIO_CLUB2, CRED_TEXT_FADE
+ db CRED_EXECUTIVE_PRODUCER, CRED_YAMAUCHI, CRED_TEXT_FADE_MON
+ db CRED_COPYRIGHT, CRED_TEXT_FADE_MON
+ db CRED_THE_END
diff --git a/data/credits/credits_text.asm b/data/credits/credits_text.asm
new file mode 100755
index 00000000..766690df
--- /dev/null
+++ b/data/credits/credits_text.asm
@@ -0,0 +1,265 @@
+CreditsTextPointers:
+; entries correspond to CRED_* constants
+ dw CreditsText_Version
+ dw CreditsText_Tajiri
+ dw CreditsText_Oota
+ dw CreditsText_Morimoto
+ dw CreditsText_Watanabe
+ dw CreditsText_Masuda
+ dw CreditsText_Nishino
+ dw CreditsText_Sugimori
+ dw CreditsText_Nishida
+ dw CreditsText_Miyamoto
+ dw CreditsText_Kawaguchi
+ dw CreditsText_Ishihara
+ dw CreditsText_Yamauchi
+ dw CreditsText_Zinnai
+ dw CreditsText_Hishida
+ dw CreditsText_Sakai
+ dw CreditsText_Yamaguchi
+ dw CreditsText_Yamamoto
+ dw CreditsText_Taniguchi
+ dw CreditsText_Nonomura
+ dw CreditsText_Fuziwara
+ dw CreditsText_Matsusima
+ dw CreditsText_Tomisawa
+ dw CreditsText_Kawamoto
+ dw CreditsText_Kakei
+ dw CreditsText_Tsuchiya
+ dw CreditsText_Nakamura
+ dw CreditsText_Yuda
+ dw CreditsText_Pokemon
+ dw CreditsText_Director
+ dw CreditsText_Programmers
+ dw CreditsText_CharacterDesign
+ dw CreditsText_Music
+ dw CreditsText_SoundEffects
+ dw CreditsText_GameDesign
+ dw CreditsText_MonsterDesign
+ dw CreditsText_GameScenario
+ dw CreditsText_ParametricDesign
+ dw CreditsText_MapDesign
+ dw CreditsText_Testing
+ dw CreditsText_SpecialThanks
+ dw CreditsText_Producer
+ dw CreditsText_ExecutiveProducer
+ dw CreditsText_Tamada
+ dw CreditsText_Oota2
+ dw CreditsText_Yoshikawa
+ dw CreditsText_Oota23
+ dw CreditsText_Yoshida
+ dw CreditsText_Matsumita
+ dw CreditsText_Seya
+ dw CreditsText_Sekine
+ dw CreditsText_Shimamura
+ dw CreditsText_Shimoyamada
+ dw CreditsText_SuperMarioClub
+ dw CreditsText_Izushi
+ dw CreditsText_Nomura
+ dw CreditsText_Harada
+ dw CreditsText_Yamagami
+ dw CreditsText_Nishimura
+ dw CreditsText_Saeki
+ dw CreditsText_Fuzii
+ dw CreditsText_Shogakukan
+ dw CreditsText_Ootani
+ dw CreditsText_PikachuVoice
+ dw CreditsText_USStaff
+ dw CreditsText_USCoord
+ dw CreditsText_Tilden
+ dw CreditsText_Kawakami
+ dw CreditsText_Nakamura2
+ dw CreditsText_Shoemake
+ dw CreditsText_Osborne
+ dw CreditsText_Translation
+ dw CreditsText_Ogasawara
+ dw CreditsText_Iwata
+ dw CreditsText_Izushi2
+ dw CreditsText_Harada2
+ dw CreditsText_Murakawa
+ dw CreditsText_Fukui
+ dw CreditsText_SuperMarioClub2
+ dw CreditsText_Paad
+ dw CreditsText_Producers
+ dw CreditsText_Hosokawa
+ dw CreditsText_Okubo
+ dw CreditsText_Nakamichi
+ dw CreditsText_Yoshimura
+ dw CreditsText_Yamazaki
+
+CreditsText_Version:
+ db -6, "YELLOW VERSION"
+ next " STAFF@"
+CreditsText_Tajiri:
+ db -6, "SATOSHI TAJIRI@"
+CreditsText_Oota:
+ db -6, "TAKENORI OOTA@"
+CreditsText_Morimoto:
+ db -7, "SHIGEKI MORIMOTO@"
+CreditsText_Watanabe:
+ db -7, "TETSUYA WATANABE@"
+CreditsText_Masuda:
+ db -6, "JUNICHI MASUDA@"
+CreditsText_Nishino:
+ db -5, "KOHJI NISHINO@"
+CreditsText_Sugimori:
+ db -5, "KEN SUGIMORI@"
+CreditsText_Nishida:
+ db -6, "ATSUKO NISHIDA@"
+CreditsText_Miyamoto:
+ db -7, "SHIGERU MIYAMOTO@"
+CreditsText_Kawaguchi:
+ db -8, "TAKASHI KAWAGUCHI@"
+CreditsText_Ishihara:
+ db -8, "TSUNEKAZU ISHIHARA@"
+CreditsText_Yamauchi:
+ db -7, "HIROSHI YAMAUCHI@"
+CreditsText_Zinnai:
+ db -7, "HIROYUKI ZINNAI@"
+CreditsText_Hishida:
+ db -7, "TATSUYA HISHIDA@"
+CreditsText_Sakai:
+ db -6, "YASUHIRO SAKAI@"
+CreditsText_Yamaguchi:
+ db -7, "WATARU YAMAGUCHI@"
+CreditsText_Yamamoto:
+ db -8, "KAZUYUKI YAMAMOTO@"
+CreditsText_Taniguchi:
+ db -8, "RYOHSUKE TANIGUCHI@"
+CreditsText_Nonomura:
+ db -8, "FUMIHIRO NONOMURA@"
+CreditsText_Fuziwara:
+ db -7, "MOTOFUMI FUZIWARA@"
+CreditsText_Matsusima:
+ db -7, "KENJI MATSUSIMA@"
+CreditsText_Tomisawa:
+ db -7, "AKIHITO TOMISAWA@"
+CreditsText_Kawamoto:
+ db -7, "HIROSHI KAWAMOTO@"
+CreditsText_Kakei:
+ db -6, "AKIYOSHI KAKEI@"
+CreditsText_Tsuchiya:
+ db -7, "KAZUKI TSUCHIYA@"
+CreditsText_Nakamura:
+ db -6, "TAKEO NAKAMURA@"
+CreditsText_Yuda:
+ db -6, "MASAMITSU YUDA@"
+CreditsText_Pokemon:
+ db -3, "#MON@"
+CreditsText_Director:
+ db -3, "DIRECTOR@"
+CreditsText_Programmers:
+ db -5, "PROGRAMMERS@"
+CreditsText_CharacterDesign:
+ db -7, "CHARACTER DESIGN@"
+CreditsText_Music:
+ db -2, "MUSIC@"
+CreditsText_SoundEffects:
+ db -6, "SOUND EFFECTS@"
+CreditsText_GameDesign:
+ db -5, "GAME DESIGN@"
+CreditsText_MonsterDesign:
+ db -6, "MONSTER DESIGN@"
+CreditsText_GameScenario:
+ db -6, "GAME SCENARIO@"
+CreditsText_ParametricDesign:
+ db -7, "PARAMETRIC DESIGN@"
+CreditsText_MapDesign:
+ db -4, "MAP DESIGN@"
+CreditsText_Testing:
+ db -6, "PRODUCT TESTING@"
+CreditsText_SpecialThanks:
+ db -6, "SPECIAL THANKS@"
+CreditsText_Producers:
+ db -4, "PRODUCERS@"
+CreditsText_Producer:
+ db -3, "PRODUCER@"
+CreditsText_ExecutiveProducer:
+ db -8, "EXECUTIVE PRODUCER@"
+CreditsText_Tamada:
+ db -6, "SOUSUKE TAMADA@"
+CreditsText_Oota2:
+ db -5, "SATOSHI OOTA@"
+CreditsText_Yoshikawa:
+ db -6, "RENA YOSHIKAWA@"
+CreditsText_Oota23:
+ db -6, "TOMOMICHI OOTA@"
+CreditsText_Matsumita:
+ db -8, "TOSHINOBU MATSUMIYA@"
+CreditsText_Seya:
+ db -5, "NOBUHIRO SEYA@"
+CreditsText_Yoshida:
+ db -7, "HIRONOBU YOSHIDA@"
+CreditsText_Sekine:
+ db -6, "KAZUHITO SEKINE@"
+CreditsText_Shimamura:
+ db -7, "KAZUSHI SHIMAMURA@"
+CreditsText_Shimoyamada:
+ db -9, "TERUYUKI SHIMOYAMADA@"
+CreditsText_SuperMarioClub:
+ db -9, "NCL SUPER MARIO CLUB@"
+CreditsText_Izushi:
+ db -7, "TAKEHIRO IZUSHI@"
+CreditsText_Nomura:
+ db -5, "FUZIKO NOMURA@"
+CreditsText_Harada:
+ db -6, "TAKAHIRO HARADA@"
+CreditsText_Yamagami:
+ db -7, "HITOSHI YAMAGAMI@"
+CreditsText_Nishimura:
+ db -8, "KENTAROU NISHIMURA@"
+CreditsText_Saeki:
+ db -5, "NAOKO SAEKI@"
+CreditsText_Fuzii:
+ db -5, "TAKAYA FUZII@"
+CreditsText_Shogakukan:
+ db -4, "SHOGAKUKAN"
+ next "PRODUCTION@"
+CreditsText_Ootani:
+ db -5, "IKUE OOTANI@"
+CreditsText_PikachuVoice:
+ db -6, "PIKACHU VOICE@"
+
+ db -3, "××××××××@"
+CreditsText_USStaff:
+ db -7, "US VERSION STAFF@"
+CreditsText_USCoord:
+ db -7, "US COORDINATION@"
+CreditsText_Tilden:
+ db -5, "GAIL TILDEN@"
+CreditsText_Kawakami:
+ db -6, "NAOKO KAWAKAMI@"
+CreditsText_Nakamura2:
+ db -6, "HIRO NAKAMURA@"
+CreditsText_Shoemake:
+ db -6, "RANDY SHOEMAKE@"
+CreditsText_Osborne:
+ db -5, "SARA OSBORNE@"
+CreditsText_Translation:
+ db -7, "TEXT TRANSLATION@"
+CreditsText_Ogasawara:
+ db -6, "NOB OGASAWARA@"
+CreditsText_Iwata:
+ db -5, "SATORU IWATA@"
+CreditsText_Izushi2:
+ db -7, "TAKEHIRO IZUSHI@"
+CreditsText_Harada2:
+ db -7, "TAKAHIRO HARADA@"
+CreditsText_Murakawa:
+ db -7, "TERUKI MURAKAWA@"
+CreditsText_Fukui:
+ db -5, "KOHTA FUKUI@"
+CreditsText_SuperMarioClub2:
+ db -9, "NCL SUPER MARIO CLUB@"
+CreditsText_Paad:
+ db -5, "PAAD TESTING@"
+CreditsText_Hosokawa:
+ db -8, "TAKEHIKO HOSOKAWA@"
+CreditsText_Okubo:
+ db -5, "KENJI OKUBO@"
+CreditsText_Nakamichi:
+ db -7, "KIMIKO NAKAMICHI@"
+CreditsText_Yoshimura:
+ db -6, "KAMON YOSHIMURA@"
+CreditsText_Yamazaki:
+ db -6, "SAKAE YAMAZAKI@"
diff --git a/data/credits_order.asm b/data/credits_order.asm
deleted file mode 100755
index c818ac07..00000000
--- a/data/credits_order.asm
+++ /dev/null
@@ -1,38 +0,0 @@
-CreditsOrder:
-; subsequent credits elements will be displayed on separate lines.
-; $FF, $FE, $FD, $FC, $FB, and $FA are commands that are used
-; to go to the next set of credits texts.
- db CRED_POKEMON, CRED_VERSION, CRED_TEXT_FADE_MON
- db CRED_DIRECTOR, CRED_TAJIRI, CRED_TEXT_FADE_MON
- db CRED_PROGRAMMERS, CRED_OOTA, CRED_MORIMOTO, CRED_WATANABE, CRED_TEXT_FADE
- db CRED_PROGRAMMERS, CRED_MASUDA, CRED_TAMADA, CRED_TEXT_MON
- db CRED_CHARACTER_DESIGN, CRED_SUGIMORI, CRED_NISHIDA, CRED_TEXT_FADE_MON
- db CRED_MUSIC, CRED_MASUDA, CRED_TEXT_FADE
- db CRED_SOUND_EFFECTS, CRED_MASUDA, CRED_WATANABE, CRED_TEXT_MON
- db CRED_GAME_DESIGN, CRED_TAJIRI, CRED_NISHINO, CRED_TEXT_FADE_MON
- db CRED_MONSTER_DESIGN, CRED_SUGIMORI, CRED_NISHIDA, CRED_YOSHIDA, CRED_TEXT_FADE_MON
- db CRED_GAME_SCENARIO, CRED_TAJIRI, CRED_TEXT_FADE
- db CRED_GAME_SCENARIO, CRED_MATSUMITA, CRED_TEXT_MON
- db CRED_PARAMETRIC_DESIGN, CRED_NISHINO, CRED_TEXT_FADE_MON
- db CRED_MAP_DESIGN, CRED_TAJIRI, CRED_NISHINO, CRED_SEYA, CRED_TEXT_FADE_MON
- db CRED_TESTING, CRED_SEKINE, CRED_SEYA, CRED_TEXT_FADE
- db CRED_TESTING, CRED_SHIMAMURA, CRED_SHIMOYAMADA, CRED_TEXT_MON
- db CRED_SPECIAL_THANKS, CRED_SHOGAKUKAN, CRED_TEXT_FADE_MON
- db CRED_PIKACHU_VOICE, CRED_OOTANI, CRED_TEXT_FADE_MON
- db CRED_PRODUCER, CRED_IZUSHI, CRED_TEXT_FADE
- db CRED_PRODUCER, CRED_KAWAGUCHI, CRED_TEXT
- db CRED_PRODUCER, CRED_ISHIHARA, CRED_TEXT_MON
- db CRED_U_S_STAFF, CRED_TEXT_FADE
- db CRED_U_S_COORD, CRED_TILDEN, CRED_TEXT_FADE
- db CRED_U_S_COORD, CRED_KAWAKAMI, CRED_NAKAMURA2, CRED_TEXT
- db CRED_U_S_COORD, CRED_SHOEMAKE, CRED_OSBORNE, CRED_TEXT
- db CRED_TRANSLATION, CRED_OGASAWARA, CRED_TEXT_FADE
- db CRED_PROGRAMMERS, CRED_MURAKAWA, CRED_FUKUI, CRED_TEXT_FADE
- db CRED_CHARACTER_DESIGN, CRED_HOSOKAWA, CRED_TEXT_FADE
- db CRED_SPECIAL_THANKS, CRED_OKUBO, CRED_HARADA2, CRED_TEXT_FADE
- db CRED_SPECIAL_THANKS, CRED_NAKAMICHI, CRED_YOSHIMURA, CRED_YAMAZAKI, CRED_TEXT
- db CRED_TESTING, CRED_PAAD, CRED_SUPER_MARIO_CLUB2, CRED_TEXT_FADE
- db CRED_EXECUTIVE_PRODUCER, CRED_YAMAUCHI, CRED_TEXT_FADE_MON
- db CRED_COPYRIGHT
- db CRED_TEXT_FADE_MON
- db CRED_THE_END
diff --git a/data/cries.asm b/data/cries.asm
deleted file mode 100755
index 7031536e..00000000
--- a/data/cries.asm
+++ /dev/null
@@ -1,192 +0,0 @@
-CryData:
- ;$BaseCry, $Pitch, $Length
- db $11, $00, $80; Rhydon
- db $03, $00, $80; Kangaskhan
- db $00, $00, $80; Nidoran♂
- db $19, $CC, $01; Clefairy
- db $10, $00, $80; Spearow
- db $06, $ED, $80; Voltorb
- db $09, $00, $80; Nidoking
- db $1F, $00, $80; Slowbro
- db $0F, $20, $80; Ivysaur
- db $0D, $00, $80; Exeggutor
- db $0C, $00, $80; Lickitung
- db $0B, $00, $80; Exeggcute
- db $05, $00, $80; Grimer
- db $07, $00, $FF; Gengar
- db $01, $00, $80; Nidoran♀
- db $0A, $00, $80; Nidoqueen
- db $19, $00, $80; Cubone
- db $04, $00, $80; Rhyhorn
- db $1B, $00, $80; Lapras
- db $15, $00, $80; Arcanine
- db $1E, $EE, $FF; Mew
- db $17, $00, $80; Gyarados
- db $18, $00, $80; Shellder
- db $1A, $00, $80; Tentacool
- db $1C, $00, $80; Gastly
- db $16, $00, $80; Scyther
- db $1E, $02, $20; Staryu
- db $13, $00, $80; Blastoise
- db $14, $00, $80; Pinsir
- db $12, $00, $80; Tangela
- db $00, $00, $00; MissingNo.
- db $00, $00, $00; MissingNo.
- db $1F, $20, $40; Growlithe
- db $17, $FF, $C0; Onix
- db $18, $40, $A0; Fearow
- db $0E, $DF, $04; Pidgey
- db $02, $00, $80; Slowpoke
- db $1C, $A8, $C0; Kadabra
- db $24, $00, $80; Graveler
- db $14, $0A, $C0; Chansey
- db $1F, $48, $60; Machoke
- db $20, $08, $40; Mr.Mime
- db $12, $80, $C0; Hitmonlee
- db $0C, $EE, $C0; Hitmonchan
- db $17, $E0, $10; Arbok
- db $1E, $42, $FF; Parasect
- db $21, $20, $60; Psyduck
- db $0D, $88, $20; Drowzee
- db $12, $E0, $40; Golem
- db $00, $00, $00; MissingNo.
- db $04, $FF, $30; Magmar
- db $00, $00, $00; MissingNo.
- db $06, $8F, $FF; Electabuzz
- db $1C, $20, $C0; Magneton
- db $12, $E6, $DD; Koffing
- db $00, $00, $00; MissingNo.
- db $0A, $DD, $60; Mankey
- db $0C, $88, $C0; Seel
- db $0B, $AA, $01; Diglett
- db $1D, $11, $40; Tauros
- db $00, $00, $00; MissingNo.
- db $00, $00, $00; MissingNo.
- db $00, $00, $00; MissingNo.
- db $10, $DD, $01; Farfetch'd
- db $1A, $44, $40; Venonat
- db $0F, $3C, $C0; Dragonite
- db $00, $80, $10; MissingNo.
- db $00, $00, $00; MissingNo.
- db $1D, $E0, $80; MissingNo.
- db $0B, $BB, $01; Doduo
- db $0E, $FF, $FF; Poliwag
- db $0D, $FF, $FF; Jynx
- db $09, $F8, $40; Moltres
- db $09, $80, $40; Articuno
- db $18, $FF, $80; Zapdos
- db $0E, $FF, $FF; Ditto
- db $19, $77, $10; Meowth
- db $20, $20, $E0; Krabby
- db $22, $FF, $40; MissingNo.
- db $00, $00, $00; MissingNo.
- db $0E, $E0, $60; MissingNo.
- db $24, $4F, $10; Vulpix
- db $24, $88, $60; Ninetales
- db $0F, $EE, $01; Pikachu
- db $09, $EE, $08; Raichu
- db $00, $00, $00; MissingNo.
- db $00, $00, $00; MissingNo.
- db $0F, $60, $40; Dratini
- db $0F, $40, $80; Dragonair
- db $16, $BB, $40; Kabuto
- db $18, $EE, $01; Kabutops
- db $19, $99, $10; Horsea
- db $19, $3C, $01; Seadra
- db $0F, $40, $C0; MissingNo.
- db $0F, $20, $C0; MissingNo.
- db $00, $20, $40; Sandshrew
- db $00, $FF, $FF; Sandslash
- db $1F, $F0, $01; Omanyte
- db $1F, $FF, $40; Omastar
- db $0E, $FF, $35; Jigglypuff
- db $0E, $68, $60; Wigglytuff
- db $1A, $88, $60; Eevee
- db $1A, $10, $20; Flareon
- db $1A, $3D, $80; Jolteon
- db $1A, $AA, $FF; Vaporeon
- db $1F, $EE, $01; Machop
- db $1D, $E0, $80; Zubat
- db $17, $12, $40; Ekans
- db $1E, $20, $E0; Paras
- db $0E, $77, $60; Poliwhirl
- db $0E, $00, $FF; Poliwrath
- db $15, $EE, $01; Weedle
- db $13, $FF, $01; Kakuna
- db $13, $60, $80; Beedrill
- db $00, $00, $00; MissingNo.
- db $0B, $99, $20; Dodrio
- db $0A, $AF, $40; Primeape
- db $0B, $2A, $10; Dugtrio
- db $1A, $29, $80; Venomoth
- db $0C, $23, $FF; Dewgong
- db $00, $00, $00; MissingNo.
- db $00, $00, $00; MissingNo.
- db $16, $80, $20; Caterpie
- db $1C, $CC, $01; Metapod
- db $16, $77, $40; Butterfree
- db $1F, $08, $C0; Machamp
- db $11, $20, $10; MissingNo.
- db $21, $FF, $40; Golduck
- db $0D, $EE, $40; Hypno
- db $1D, $FA, $80; Golbat
- db $1E, $99, $FF; Mewtwo
- db $05, $55, $01; Snorlax
- db $17, $80, $00; Magikarp
- db $00, $00, $00; MissingNo.
- db $00, $00, $00; MissingNo.
- db $07, $EF, $FF; Muk
- db $0F, $40, $80; MissingNo.
- db $20, $EE, $E0; Kingler
- db $18, $6F, $E0; Cloyster
- db $00, $00, $00; MissingNo.
- db $06, $A8, $90; Electrode
- db $19, $AA, $20; Clefable
- db $12, $FF, $FF; Weezing
- db $19, $99, $FF; Persian
- db $08, $4F, $60; Marowak
- db $00, $00, $00; MissingNo.
- db $1C, $30, $40; Haunter
- db $1C, $C0, $01; Abra
- db $1C, $98, $FF; Alakazam
- db $14, $28, $C0; Pidgeotto
- db $14, $11, $FF; Pidgeot
- db $1E, $00, $80; Starmie
- db $0F, $80, $01; Bulbasaur
- db $0F, $00, $C0; Venusaur
- db $1A, $EE, $FF; Tentacruel
- db $00, $00, $00; MissingNo.
- db $16, $80, $40; Goldeen
- db $16, $10, $FF; Seaking
- db $00, $00, $00; MissingNo.
- db $00, $00, $00; MissingNo.
- db $00, $00, $00; MissingNo.
- db $00, $00, $00; MissingNo.
- db $25, $00, $80; Ponyta
- db $25, $20, $C0; Rapidash
- db $22, $00, $80; Rattata
- db $22, $20, $FF; Raticate
- db $00, $2C, $C0; Nidorino
- db $01, $2C, $E0; Nidorina
- db $24, $F0, $10; Geodude
- db $25, $AA, $FF; Porygon
- db $23, $20, $F0; Aerodactyl
- db $00, $00, $00; MissingNo.
- db $1C, $80, $60; Magnemite
- db $00, $00, $00; MissingNo.
- db $00, $00, $00; MissingNo.
- db $04, $60, $40; Charmander
- db $1D, $60, $40; Squirtle
- db $04, $20, $40; Charmeleon
- db $1D, $20, $40; Wartortle
- db $04, $00, $80; Charizard
- db $1D, $00, $80; MissingNo.
- db $00, $00, $00; MissingNo.
- db $00, $00, $00; MissingNo.
- db $00, $00, $00; MissingNo.
- db $08, $DD, $01; Oddish
- db $08, $AA, $40; Gloom
- db $23, $22, $FF; Vileplume
- db $21, $55, $01; Bellsprout
- db $25, $44, $20; Weepinbell
- db $25, $66, $CC; Victreebel
diff --git a/data/dungeon_tilesets.asm b/data/dungeon_tilesets.asm
deleted file mode 100755
index 01e86714..00000000
--- a/data/dungeon_tilesets.asm
+++ /dev/null
@@ -1,2 +0,0 @@
-DungeonTilesets:
- db FOREST, MUSEUM, SHIP, CAVERN, LOBBY, MANSION, GATE, LAB, FACILITY, CEMETERY, GYM, $FF
diff --git a/data/events/bench_guys.asm b/data/events/bench_guys.asm
new file mode 100644
index 00000000..f597a26d
--- /dev/null
+++ b/data/events/bench_guys.asm
@@ -0,0 +1,23 @@
+bench_guy_text: MACRO
+ db \1, \2
+ db_tx_pre \3
+ENDM
+
+BenchGuyTextPointers:
+ ; map id, player facing direction, predef text
+ bench_guy_text VIRIDIAN_POKECENTER, SPRITE_FACING_LEFT, ViridianCityPokecenterBenchGuyText
+ bench_guy_text PEWTER_POKECENTER, SPRITE_FACING_LEFT, PewterCityPokecenterBenchGuyText
+ bench_guy_text CERULEAN_POKECENTER, SPRITE_FACING_LEFT, CeruleanCityPokecenterBenchGuyText
+ bench_guy_text LAVENDER_POKECENTER, SPRITE_FACING_LEFT, LavenderCityPokecenterBenchGuyText
+ bench_guy_text VERMILION_POKECENTER, SPRITE_FACING_LEFT, VermilionCityPokecenterBenchGuyText
+ bench_guy_text CELADON_POKECENTER, SPRITE_FACING_LEFT, CeladonCityPokecenterBenchGuyText
+ bench_guy_text CELADON_HOTEL, SPRITE_FACING_LEFT, CeladonCityHotelText
+ bench_guy_text FUCHSIA_POKECENTER, SPRITE_FACING_LEFT, FuchsiaCityPokecenterBenchGuyText
+ bench_guy_text CINNABAR_POKECENTER, SPRITE_FACING_LEFT, CinnabarIslandPokecenterBenchGuyText
+ bench_guy_text SAFFRON_POKECENTER, SPRITE_FACING_LEFT, SaffronCityPokecenterBenchGuyText
+ bench_guy_text MT_MOON_POKECENTER, SPRITE_FACING_LEFT, MtMoonPokecenterBenchGuyText
+ bench_guy_text ROCK_TUNNEL_POKECENTER, SPRITE_FACING_LEFT, RockTunnelPokecenterBenchGuyText
+ bench_guy_text SAFARI_ZONE_WEST_REST_HOUSE, SPRITE_FACING_LEFT, UnusedBenchGuyText1
+ bench_guy_text SAFARI_ZONE_EAST_REST_HOUSE, SPRITE_FACING_LEFT, UnusedBenchGuyText2
+ bench_guy_text SAFARI_ZONE_NORTH_REST_HOUSE, SPRITE_FACING_LEFT, UnusedBenchGuyText3
+ db -1 ; end
diff --git a/data/events/card_key_coords.asm b/data/events/card_key_coords.asm
new file mode 100644
index 00000000..afdcfbd4
--- /dev/null
+++ b/data/events/card_key_coords.asm
@@ -0,0 +1,36 @@
+; These tables are probably supposed to be door locations in Silph Co.,
+; but they are unused.
+; The reason there are 3 tables is unknown.
+
+; Format: map ID, Y, X, gate ID?
+
+CardKeyTable1:
+ db SILPH_CO_2F, $04, $04, 0
+ db SILPH_CO_2F, $04, $05, 1
+ db SILPH_CO_4F, $0C, $04, 2
+ db SILPH_CO_4F, $0C, $05, 3
+ db SILPH_CO_7F, $06, $0A, 4
+ db SILPH_CO_7F, $06, $0B, 5
+ db SILPH_CO_9F, $04, $12, 6
+ db SILPH_CO_9F, $04, $13, 7
+ db SILPH_CO_10F, $08, $0A, 8
+ db SILPH_CO_10F, $08, $0B, 9
+ db -1 ; end
+
+CardKeyTable2:
+ db SILPH_CO_3F, $08, $09, 10
+ db SILPH_CO_3F, $09, $09, 11
+ db SILPH_CO_5F, $04, $07, 12
+ db SILPH_CO_5F, $05, $07, 13
+ db SILPH_CO_6F, $0C, $05, 14
+ db SILPH_CO_6F, $0D, $05, 15
+ db SILPH_CO_8F, $08, $07, 16
+ db SILPH_CO_8F, $09, $07, 17
+ db SILPH_CO_9F, $08, $03, 18
+ db SILPH_CO_9F, $09, $03, 19
+ db -1 ; end
+
+CardKeyTable3:
+ db SILPH_CO_11F, $08, $09, 20
+ db SILPH_CO_11F, $09, $09, 21
+ db -1 ; end
diff --git a/data/events/card_key_maps.asm b/data/events/card_key_maps.asm
new file mode 100644
index 00000000..c66f31d9
--- /dev/null
+++ b/data/events/card_key_maps.asm
@@ -0,0 +1,12 @@
+SilphCoMapList:
+ db SILPH_CO_2F
+ db SILPH_CO_3F
+ db SILPH_CO_4F
+ db SILPH_CO_5F
+ db SILPH_CO_6F
+ db SILPH_CO_7F
+ db SILPH_CO_8F
+ db SILPH_CO_9F
+ db SILPH_CO_10F
+ db SILPH_CO_11F
+ db -1 ; end
diff --git a/data/events/hidden_coins.asm b/data/events/hidden_coins.asm
new file mode 100755
index 00000000..bcdbcd80
--- /dev/null
+++ b/data/events/hidden_coins.asm
@@ -0,0 +1,19 @@
+hidden_coin: MACRO
+ db \1, \3, \2
+ENDM
+
+HiddenCoinCoords:
+ ; map id, x, y
+ hidden_coin GAME_CORNER, 0, 8
+ hidden_coin GAME_CORNER, 1, 16
+ hidden_coin GAME_CORNER, 3, 11
+ hidden_coin GAME_CORNER, 3, 14
+ hidden_coin GAME_CORNER, 4, 12
+ hidden_coin GAME_CORNER, 9, 12
+ hidden_coin GAME_CORNER, 9, 15
+ hidden_coin GAME_CORNER, 16, 14
+ hidden_coin GAME_CORNER, 10, 16
+ hidden_coin GAME_CORNER, 11, 7
+ hidden_coin GAME_CORNER, 15, 8
+ hidden_coin GAME_CORNER, 12, 15
+ db -1 ; end
diff --git a/data/events/hidden_item_coords.asm b/data/events/hidden_item_coords.asm
new file mode 100755
index 00000000..5705feed
--- /dev/null
+++ b/data/events/hidden_item_coords.asm
@@ -0,0 +1,62 @@
+hidden_item: MACRO
+ db \1, \3, \2
+ENDM
+
+HiddenItemCoords:
+ ; map id, x, y
+ hidden_item SILPH_CO_5F, 12, 3
+ hidden_item SILPH_CO_9F, 2, 15
+ hidden_item POKEMON_MANSION_3F, 1, 9
+ hidden_item POKEMON_MANSION_B1F, 1, 9
+ hidden_item SAFARI_ZONE_WEST, 6, 5
+ hidden_item CERULEAN_CAVE_2F, 16, 13
+ hidden_item CERULEAN_CAVE_B1F, 8, 14
+ hidden_item UNUSED_MAP_6F, 14, 11
+ hidden_item SEAFOAM_ISLANDS_B2F, 15, 15
+ hidden_item SEAFOAM_ISLANDS_B3F, 9, 16
+ hidden_item SEAFOAM_ISLANDS_B4F, 25, 17
+ hidden_item VIRIDIAN_FOREST, 1, 18
+ hidden_item VIRIDIAN_FOREST, 16, 42
+ hidden_item MT_MOON_B2F, 18, 12
+ hidden_item MT_MOON_B2F, 33, 9
+ hidden_item SS_ANNE_B1F_ROOMS, 3, 1
+ hidden_item SS_ANNE_KITCHEN, 13, 9
+ hidden_item UNDERGROUND_PATH_NORTH_SOUTH, 3, 4
+ hidden_item UNDERGROUND_PATH_NORTH_SOUTH, 4, 34
+ hidden_item UNDERGROUND_PATH_WEST_EAST, 12, 2
+ hidden_item UNDERGROUND_PATH_WEST_EAST, 21, 5
+ hidden_item ROCKET_HIDEOUT_B1F, 21, 15
+ hidden_item ROCKET_HIDEOUT_B3F, 27, 17
+ hidden_item ROCKET_HIDEOUT_B4F, 25, 1
+ hidden_item ROUTE_10, 9, 17
+ hidden_item ROUTE_10, 16, 53
+ hidden_item POWER_PLANT, 17, 16
+ hidden_item POWER_PLANT, 12, 1
+ hidden_item ROUTE_11, 48, 5
+ hidden_item ROUTE_12, 2, 63
+ hidden_item ROUTE_13, 1, 14
+ hidden_item ROUTE_13, 16, 13
+ hidden_item ROUTE_17, 15, 14
+ hidden_item ROUTE_17, 8, 45
+ hidden_item ROUTE_17, 17, 72
+ hidden_item ROUTE_17, 4, 91
+ hidden_item ROUTE_17, 8, 121
+ hidden_item ROUTE_23, 9, 44
+ hidden_item ROUTE_23, 19, 70
+ hidden_item ROUTE_23, 8, 90
+ hidden_item VICTORY_ROAD_2F, 5, 2
+ hidden_item VICTORY_ROAD_2F, 26, 7
+ hidden_item ROUTE_25, 38, 3
+ hidden_item ROUTE_25, 10, 1
+ hidden_item ROUTE_4, 40, 3
+ hidden_item ROUTE_9, 14, 7
+ hidden_item COPYCATS_HOUSE_2F, 1, 1
+ hidden_item VIRIDIAN_CITY, 14, 4
+ hidden_item CERULEAN_CITY, 15, 8
+ hidden_item CERULEAN_CAVE_1F, 18, 7
+ hidden_item POKEMON_TOWER_5F, 4, 12
+ hidden_item VERMILION_CITY, 14, 11
+ hidden_item CELADON_CITY, 48, 15
+ hidden_item SAFARI_ZONE_GATE, 10, 1 ; inaccessible
+ hidden_item POKEMON_MANSION_1F, 8, 16
+ db -1 ; end
diff --git a/data/events/hidden_objects.asm b/data/events/hidden_objects.asm
new file mode 100755
index 00000000..2afd1275
--- /dev/null
+++ b/data/events/hidden_objects.asm
@@ -0,0 +1,560 @@
+HiddenObjectMaps:
+ dbw SILPH_CO_11F, SilphCo11FHiddenObjects
+ dbw SILPH_CO_5F, SilphCo5FHiddenObjects
+ dbw SILPH_CO_9F, SilphCo9FHiddenObjects
+ dbw POKEMON_MANSION_2F, Mansion2HiddenObjects
+ dbw POKEMON_MANSION_3F, Mansion3HiddenObjects
+ dbw POKEMON_MANSION_B1F, Mansion4HiddenObjects
+ dbw SAFARI_ZONE_WEST, SafariZoneWestHiddenObjects
+ dbw CERULEAN_CAVE_2F, CeruleanCave2HiddenObjects
+ dbw CERULEAN_CAVE_B1F, CeruleanCave3HiddenObjects
+ dbw UNUSED_MAP_6F, UnusedMap6FHiddenObjects
+ dbw SEAFOAM_ISLANDS_B2F, SeafoamIslands3HiddenObjects
+ dbw SEAFOAM_ISLANDS_B3F, SeafoamIslands4HiddenObjects
+ dbw SEAFOAM_ISLANDS_B4F, SeafoamIslands5HiddenObjects
+ dbw VIRIDIAN_FOREST, ViridianForestHiddenObjects
+ dbw MT_MOON_B2F, MtMoon3HiddenObjects
+ dbw SS_ANNE_B1F_ROOMS, SSAnne10HiddenObjects
+ dbw SS_ANNE_KITCHEN, SSAnne6HiddenObjects
+ dbw UNDERGROUND_PATH_NORTH_SOUTH, UndergroundPathNsHiddenObjects
+ dbw UNDERGROUND_PATH_WEST_EAST, UndergroundPathWeHiddenObjects
+ dbw ROCKET_HIDEOUT_B1F, RocketHideout1HiddenObjects
+ dbw ROCKET_HIDEOUT_B3F, RocketHideout3HiddenObjects
+ dbw ROCKET_HIDEOUT_B4F, RocketHideout4HiddenObjects
+ dbw ROUTE_10, Route10HiddenObjects
+ dbw ROCK_TUNNEL_POKECENTER, RockTunnelPokecenterHiddenObjects
+ dbw POWER_PLANT, PowerPlantHiddenObjects
+ dbw ROUTE_11, Route11HiddenObjects
+ dbw ROUTE_12, Route12HiddenObjects
+ dbw ROUTE_13, Route13HiddenObjects
+ dbw ROUTE_15_GATE_2F, Route15Gate2FHiddenObjects
+ dbw ROUTE_17, Route17HiddenObjects
+ dbw ROUTE_23, Route23HiddenObjects
+ dbw VICTORY_ROAD_2F, VictoryRoad2HiddenObjects
+ dbw ROUTE_25, Route25HiddenObjects
+ dbw BILLS_HOUSE, BillsHouseHiddenObjects
+ dbw ROUTE_4, Route4HiddenObjects
+ dbw MT_MOON_POKECENTER, MtMoonPokecenterHiddenObjects
+ dbw ROUTE_9, Route9HiddenObjects
+ dbw TRADE_CENTER, TradeCenterHiddenObjects
+ dbw COLOSSEUM, ColosseumHiddenObjects
+ dbw INDIGO_PLATEAU, IndigoPlateauHiddenObjects
+ dbw INDIGO_PLATEAU_LOBBY, IndigoPlateauLobbyHiddenObjects
+ dbw COPYCATS_HOUSE_2F, CopycatsHouse2FHiddenObjects
+ dbw FIGHTING_DOJO, FightingDojoHiddenObjects
+ dbw SAFFRON_GYM, SaffronGymHiddenObjects
+ dbw SAFFRON_POKECENTER, SaffronPokecenterHiddenObjects
+ dbw REDS_HOUSE_2F, RedsHouse2FHiddenObjects
+ dbw BLUES_HOUSE, BluesHouseHiddenObjects
+ dbw OAKS_LAB, OaksLabHiddenObjects
+ dbw VIRIDIAN_CITY, ViridianCityHiddenObjects
+ dbw VIRIDIAN_POKECENTER, ViridianPokecenterHiddenObjects
+ dbw VIRIDIAN_SCHOOL_HOUSE, ViridianSchoolHiddenObjects
+ dbw VIRIDIAN_GYM, ViridianGymHiddenObjects
+ dbw MUSEUM_1F, Museum1FHiddenObjects
+ dbw PEWTER_GYM, PewterGymHiddenObjects
+ dbw PEWTER_POKECENTER, PewterPokecenterHiddenObjects
+ dbw CERULEAN_CITY, CeruleanCityHiddenObjects
+ dbw CERULEAN_POKECENTER, CeruleanPokecenterHiddenObjects
+ dbw CERULEAN_GYM, CeruleanGymHiddenObjects
+ dbw BIKE_SHOP, BikeShopHiddenObjects
+ dbw CERULEAN_CAVE_1F, CeruleanCave1HiddenObjects
+ dbw LAVENDER_POKECENTER, LavenderPokecenterHiddenObjects
+ dbw POKEMON_TOWER_5F, Pokemontower5HiddenObjects
+ dbw MR_FUJIS_HOUSE, LavenderHouse1HiddenObjects
+ dbw VERMILION_CITY, VermilionCityHiddenObjects
+ dbw VERMILION_POKECENTER, VermilionPokecenterHiddenObjects
+ dbw POKEMON_FAN_CLUB, PokemonFanClubHiddenObjects
+ dbw VERMILION_GYM, VermilionGymHiddenObjects
+ dbw CELADON_CITY, CeladonCityHiddenObjects
+ dbw CELADON_HOTEL, CeladonHotelHiddenObjects
+ dbw CELADON_MANSION_2F, CeladonMansion2HiddenObjects
+ dbw CELADON_MANSION_ROOF_HOUSE, CeladonMansion5HiddenObjects
+ dbw CELADON_POKECENTER, CeladonPokecenterHiddenObjects
+ dbw CELADON_GYM, CeladonGymHiddenObjects
+ dbw GAME_CORNER, GameCornerHiddenObjects
+ dbw FUCHSIA_POKECENTER, FuchsiaPokecenterHiddenObjects
+ dbw SAFARI_ZONE_GATE, SafariZoneEntranceHiddenObjects
+ dbw FUCHSIA_GYM, FuchsiaGymHiddenObjects
+ dbw POKEMON_MANSION_1F, Mansion1HiddenObjects
+ dbw CINNABAR_GYM, CinnabarGymHiddenObjects
+ dbw CINNABAR_LAB_FOSSIL_ROOM, CinnabarLab4HiddenObjects
+ dbw CINNABAR_POKECENTER, CinnabarPokecenterHiddenObjects
+ db -1 ; end
+
+hidden_object: MACRO
+ db \2 ; y coord
+ db \1 ; x coord
+ db \3 ; item id
+ dba \4 ; object routine
+ENDM
+
+hidden_text_predef: MACRO
+ db \2 ; y coord
+ db \1 ; x coord
+ db_tx_pre \3 ; text id
+ dba \4 ; object routine
+ENDM
+
+; Some hidden objects use SPRITE_FACING_* values,
+; but these do not actually prevent the player
+; from interacting with them in any direction.
+ANY_FACING EQU $d0
+
+SilphCo11FHiddenObjects:
+ hidden_object 10, 12, SPRITE_FACING_UP, OpenPokemonCenterPC
+ db -1 ; end
+
+SilphCo5FHiddenObjects:
+ hidden_object 12, 3, ELIXER, HiddenItems
+ db -1 ; end
+
+SilphCo9FHiddenObjects:
+ hidden_object 2, 15, MAX_POTION, HiddenItems
+ db -1 ; end
+
+Mansion2HiddenObjects:
+ hidden_object 2, 11, SPRITE_FACING_UP, Mansion2Script_Switches
+ db -1 ; end
+
+Mansion3HiddenObjects:
+ hidden_object 1, 9, MAX_REVIVE, HiddenItems
+ hidden_object 10, 5, SPRITE_FACING_UP, Mansion3Script_Switches
+ db -1 ; end
+
+Mansion4HiddenObjects:
+ hidden_object 1, 9, RARE_CANDY, HiddenItems
+ hidden_object 20, 3, SPRITE_FACING_UP, Mansion4Script_Switches
+ hidden_object 18, 25, SPRITE_FACING_UP, Mansion4Script_Switches
+ db -1 ; end
+
+SafariZoneWestHiddenObjects:
+ hidden_object 6, 5, REVIVE, HiddenItems
+ db -1 ; end
+
+CeruleanCave2HiddenObjects:
+ hidden_object 16, 13, PP_UP, HiddenItems
+ db -1 ; end
+
+CeruleanCave3HiddenObjects:
+ hidden_object 8, 14, PP_UP, HiddenItems
+ db -1 ; end
+
+UnusedMap6FHiddenObjects:
+ hidden_object 14, 11, MAX_ELIXER, HiddenItems
+ db -1 ; end
+
+SeafoamIslands3HiddenObjects:
+ hidden_object 15, 15, NUGGET, HiddenItems
+ db -1 ; end
+
+SeafoamIslands4HiddenObjects:
+ hidden_object 9, 16, MAX_ELIXER, HiddenItems
+ db -1 ; end
+
+SeafoamIslands5HiddenObjects:
+ hidden_object 25, 17, ULTRA_BALL, HiddenItems
+ db -1 ; end
+
+ViridianForestHiddenObjects:
+ hidden_object 1, 18, POTION, HiddenItems
+ hidden_object 16, 42, ANTIDOTE, HiddenItems
+ db -1 ; end
+
+MtMoon3HiddenObjects:
+ hidden_object 18, 12, MOON_STONE, HiddenItems
+ hidden_object 33, 9, ETHER, HiddenItems
+ db -1 ; end
+
+SSAnne10HiddenObjects:
+ hidden_object 3, 1, HYPER_POTION, HiddenItems
+ db -1 ; end
+
+SSAnne6HiddenObjects:
+ hidden_object 13, 5, SPRITE_FACING_DOWN, PrintTrashText
+ hidden_object 13, 7, SPRITE_FACING_DOWN, PrintTrashText
+ hidden_object 13, 9, GREAT_BALL, HiddenItems
+ db -1 ; end
+
+UndergroundPathNsHiddenObjects:
+ hidden_object 3, 4, FULL_RESTORE, HiddenItems
+ hidden_object 4, 34, X_SPECIAL, HiddenItems
+ db -1 ; end
+
+UndergroundPathWeHiddenObjects:
+ hidden_object 12, 2, NUGGET, HiddenItems
+ hidden_object 21, 5, ELIXER, HiddenItems
+ db -1 ; end
+
+RocketHideout1HiddenObjects:
+ hidden_object 21, 15, PP_UP, HiddenItems
+ db -1 ; end
+
+RocketHideout3HiddenObjects:
+ hidden_object 27, 17, NUGGET, HiddenItems
+ db -1 ; end
+
+RocketHideout4HiddenObjects:
+ hidden_object 25, 1, SUPER_POTION, HiddenItems
+ db -1 ; end
+
+Route10HiddenObjects:
+ hidden_object 9, 17, SUPER_POTION, HiddenItems
+ hidden_object 16, 53, MAX_ETHER, HiddenItems
+ db -1 ; end
+
+RockTunnelPokecenterHiddenObjects:
+ hidden_object 0, 4, SPRITE_FACING_LEFT, PrintBenchGuyText
+ hidden_object 13, 3, SPRITE_FACING_UP, OpenPokemonCenterPC
+ db -1 ; end
+
+PowerPlantHiddenObjects:
+ hidden_object 17, 16, MAX_ELIXER, HiddenItems
+ hidden_object 12, 1, PP_UP, HiddenItems
+ db -1 ; end
+
+Route11HiddenObjects:
+ hidden_object 48, 5, ESCAPE_ROPE, HiddenItems
+ db -1 ; end
+
+Route12HiddenObjects:
+ hidden_object 2, 63, HYPER_POTION, HiddenItems
+ db -1 ; end
+
+Route13HiddenObjects:
+ hidden_object 1, 14, PP_UP, HiddenItems
+ hidden_object 16, 13, CALCIUM, HiddenItems
+ db -1 ; end
+
+Route15Gate2FHiddenObjects:
+ hidden_object 1, 2, SPRITE_FACING_UP, Route15GateLeftBinoculars
+ db -1 ; end
+
+Route17HiddenObjects:
+ hidden_object 15, 14, RARE_CANDY, HiddenItems
+ hidden_object 8, 45, FULL_RESTORE, HiddenItems
+ hidden_object 17, 72, PP_UP, HiddenItems
+ hidden_object 4, 91, MAX_REVIVE, HiddenItems
+ hidden_object 8, 121, MAX_ELIXER, HiddenItems
+ db -1 ; end
+
+Route23HiddenObjects:
+ hidden_object 9, 44, FULL_RESTORE, HiddenItems
+ hidden_object 19, 70, ULTRA_BALL, HiddenItems
+ hidden_object 8, 90, MAX_ETHER, HiddenItems
+ db -1 ; end
+
+VictoryRoad2HiddenObjects:
+ hidden_object 5, 2, ULTRA_BALL, HiddenItems
+ hidden_object 26, 7, FULL_RESTORE, HiddenItems
+ db -1 ; end
+
+Route25HiddenObjects:
+ hidden_object 38, 3, ETHER, HiddenItems
+ hidden_object 10, 1, ELIXER, HiddenItems
+ db -1 ; end
+
+BillsHouseHiddenObjects:
+ hidden_object 1, 4, SPRITE_FACING_UP, BillsHousePC
+ db -1 ; end
+
+Route4HiddenObjects:
+ hidden_object 40, 3, GREAT_BALL, HiddenItems
+ db -1 ; end
+
+MtMoonPokecenterHiddenObjects:
+ hidden_object 0, 4, SPRITE_FACING_LEFT, PrintBenchGuyText
+ hidden_object 13, 3, SPRITE_FACING_UP, OpenPokemonCenterPC
+ db -1 ; end
+
+Route9HiddenObjects:
+ hidden_object 14, 7, ETHER, HiddenItems
+ db -1 ; end
+
+TradeCenterHiddenObjects:
+ hidden_object 5, 4, ANY_FACING, CableClubRightGameboy
+ hidden_object 4, 4, ANY_FACING, CableClubLeftGameboy
+ db -1 ; end
+
+ColosseumHiddenObjects:
+ hidden_object 5, 4, ANY_FACING, CableClubRightGameboy
+ hidden_object 4, 4, ANY_FACING, CableClubLeftGameboy
+ db -1 ; end
+
+IndigoPlateauHiddenObjects:
+ hidden_object 8, 13, $ff, PrintIndigoPlateauHQText ; inaccessible
+ hidden_object 11, 13, SPRITE_FACING_DOWN, PrintIndigoPlateauHQText ; inaccessible
+ db -1 ; end
+
+IndigoPlateauLobbyHiddenObjects:
+ hidden_object 15, 7, SPRITE_FACING_UP, OpenPokemonCenterPC
+ db -1 ; end
+
+CopycatsHouse2FHiddenObjects:
+ hidden_object 1, 1, NUGGET, HiddenItems
+ db -1 ; end
+
+FightingDojoHiddenObjects:
+ hidden_object 3, 9, SPRITE_FACING_UP, PrintFightingDojoText
+ hidden_object 6, 9, SPRITE_FACING_UP, PrintFightingDojoText
+ hidden_object 4, 0, SPRITE_FACING_UP, PrintFightingDojoText2
+ hidden_object 5, 0, SPRITE_FACING_UP, PrintFightingDojoText3
+ db -1 ; end
+
+SaffronGymHiddenObjects:
+ hidden_object 9, 15, SPRITE_FACING_UP, GymStatues
+ db -1 ; end
+
+SaffronPokecenterHiddenObjects:
+ hidden_object 0, 4, SPRITE_FACING_UP, PrintBenchGuyText
+ hidden_object 13, 3, SPRITE_FACING_UP, OpenPokemonCenterPC
+ db -1 ; end
+
+RedsHouse2FHiddenObjects:
+ hidden_object 0, 1, SPRITE_FACING_UP, OpenRedsPC
+ hidden_object 3, 5, ANY_FACING, PrintRedSNESText
+ db -1 ; end
+
+BluesHouseHiddenObjects:
+ hidden_object 0, 1, SPRITE_FACING_UP, PrintBookcaseText
+ hidden_object 1, 1, SPRITE_FACING_UP, PrintBookcaseText
+ hidden_object 7, 1, SPRITE_FACING_UP, PrintBookcaseText
+ db -1 ; end
+
+OaksLabHiddenObjects:
+ hidden_object 4, 0, SPRITE_FACING_UP, DisplayOakLabLeftPoster
+ hidden_object 5, 0, SPRITE_FACING_UP, DisplayOakLabRightPoster
+ hidden_object 0, 1, SPRITE_FACING_UP, DisplayOakLabEmailText
+ hidden_object 1, 1, SPRITE_FACING_UP, DisplayOakLabEmailText
+ db -1 ; end
+
+ViridianCityHiddenObjects:
+ hidden_object 14, 4, POTION, HiddenItems
+ db -1 ; end
+
+ViridianPokecenterHiddenObjects:
+ hidden_object 0, 4, SPRITE_FACING_LEFT, PrintBenchGuyText
+ hidden_object 13, 3, SPRITE_FACING_UP, OpenPokemonCenterPC
+ db -1 ; end
+
+ViridianSchoolHiddenObjects:
+ hidden_text_predef 3, 4, ViridianSchoolNotebook, PrintNotebookText
+ hidden_text_predef 3, 0, ViridianSchoolBlackboard, PrintBlackboardLinkCableText
+ db -1 ; end
+
+ViridianGymHiddenObjects:
+ hidden_object 15, 15, SPRITE_FACING_UP, GymStatues
+ hidden_object 18, 15, SPRITE_FACING_UP, GymStatues
+ db -1 ; end
+
+Museum1FHiddenObjects:
+ hidden_object 2, 3, SPRITE_FACING_UP, AerodactylFossil
+ hidden_object 2, 6, SPRITE_FACING_UP, KabutopsFossil
+ db -1 ; end
+
+PewterGymHiddenObjects:
+ hidden_object 3, 10, SPRITE_FACING_UP, GymStatues
+ hidden_object 6, 10, SPRITE_FACING_UP, GymStatues
+ db -1 ; end
+
+PewterPokecenterHiddenObjects:
+ hidden_object 0, 4, SPRITE_FACING_LEFT, PrintBenchGuyText
+ hidden_object 13, 3, SPRITE_FACING_UP, OpenPokemonCenterPC
+ db -1 ; end
+
+CeruleanCityHiddenObjects:
+ hidden_object 15, 8, RARE_CANDY, HiddenItems
+ db -1 ; end
+
+CeruleanPokecenterHiddenObjects:
+ hidden_object 0, 4, SPRITE_FACING_LEFT, PrintBenchGuyText
+ hidden_object 13, 3, SPRITE_FACING_UP, OpenPokemonCenterPC
+ db -1 ; end
+
+CeruleanGymHiddenObjects:
+ hidden_object 3, 11, SPRITE_FACING_UP, GymStatues
+ hidden_object 6, 11, SPRITE_FACING_UP, GymStatues
+ db -1 ; end
+
+BikeShopHiddenObjects:
+ hidden_object 1, 0, ANY_FACING, PrintNewBikeText
+ hidden_object 2, 1, ANY_FACING, PrintNewBikeText
+ hidden_object 1, 2, ANY_FACING, PrintNewBikeText
+ hidden_object 3, 2, ANY_FACING, PrintNewBikeText
+ hidden_object 0, 4, ANY_FACING, PrintNewBikeText
+ hidden_object 1, 5, ANY_FACING, PrintNewBikeText
+ db -1 ; end
+
+CeruleanCave1HiddenObjects:
+ hidden_object 18, 7, PP_UP, HiddenItems
+ db -1 ; end
+
+LavenderPokecenterHiddenObjects:
+ hidden_object 0, 4, SPRITE_FACING_LEFT, PrintBenchGuyText
+ hidden_object 13, 3, SPRITE_FACING_UP, OpenPokemonCenterPC
+ db -1 ; end
+
+Pokemontower5HiddenObjects:
+ hidden_object 4, 12, ELIXER, HiddenItems
+ db -1 ; end
+
+LavenderHouse1HiddenObjects:
+ hidden_object 0, 1, SPRITE_FACING_DOWN, PrintMagazinesText
+ hidden_object 1, 1, SPRITE_FACING_DOWN, PrintMagazinesText
+ hidden_object 7, 1, SPRITE_FACING_DOWN, PrintMagazinesText
+ db -1 ; end
+
+VermilionCityHiddenObjects:
+ hidden_object 14, 11, MAX_ETHER, HiddenItems
+ db -1 ; end
+
+VermilionPokecenterHiddenObjects:
+ hidden_object 13, 3, SPRITE_FACING_UP, OpenPokemonCenterPC
+ hidden_object 0, 4, SPRITE_FACING_UP, PrintBenchGuyText
+ db -1 ; end
+
+PokemonFanClubHiddenObjects:
+ hidden_object 1, 0, SPRITE_FACING_UP, FanClubPicture1
+ hidden_object 6, 0, SPRITE_FACING_UP, FanClubPicture2
+ db -1 ; end
+
+VermilionGymHiddenObjects:
+ hidden_object 3, 14, SPRITE_FACING_UP, GymStatues
+ hidden_object 6, 14, SPRITE_FACING_UP, GymStatues
+ hidden_object 6, 1, SPRITE_FACING_DOWN, PrintTrashText
+ ; third param: [wGymTrashCanIndex]
+ hidden_object 1, 7, 0, GymTrashScript
+ hidden_object 1, 9, 1, GymTrashScript
+ hidden_object 1, 11, 2, GymTrashScript
+ hidden_object 3, 7, 3, GymTrashScript
+ hidden_object 3, 9, 4, GymTrashScript
+ hidden_object 3, 11, 5, GymTrashScript
+ hidden_object 5, 7, 6, GymTrashScript
+ hidden_object 5, 9, 7, GymTrashScript
+ hidden_object 5, 11, 8, GymTrashScript
+ hidden_object 7, 7, 9, GymTrashScript
+ hidden_object 7, 9, 10, GymTrashScript
+ hidden_object 7, 11, 11, GymTrashScript
+ hidden_object 9, 7, 12, GymTrashScript
+ hidden_object 9, 9, 13, GymTrashScript
+ hidden_object 9, 11, 14, GymTrashScript
+ db -1 ; end
+
+CeladonCityHiddenObjects:
+ hidden_object 48, 15, PP_UP, HiddenItems
+ db -1 ; end
+
+CeladonHotelHiddenObjects:
+ hidden_object 0, 4, SPRITE_FACING_LEFT, PrintBenchGuyText
+ db -1 ; end
+
+CeladonMansion2HiddenObjects:
+ hidden_object 0, 5, SPRITE_FACING_UP, OpenPokemonCenterPC
+ db -1 ; end
+
+CeladonMansion5HiddenObjects:
+ hidden_text_predef 3, 0, LinkCableHelp, PrintBlackboardLinkCableText
+ hidden_text_predef 4, 0, LinkCableHelp, PrintBlackboardLinkCableText
+ hidden_text_predef 3, 4, TMNotebook, PrintNotebookText
+ db -1 ; end
+
+CeladonPokecenterHiddenObjects:
+ hidden_object 0, 4, SPRITE_FACING_LEFT, PrintBenchGuyText
+ hidden_object 13, 3, SPRITE_FACING_UP, OpenPokemonCenterPC
+ db -1 ; end
+
+CeladonGymHiddenObjects:
+ hidden_object 3, 15, SPRITE_FACING_UP, GymStatues
+ hidden_object 6, 15, SPRITE_FACING_UP, GymStatues
+ db -1 ; end
+
+GameCornerHiddenObjects:
+ hidden_object 18, 15, ANY_FACING, StartSlotMachine
+ hidden_object 18, 14, ANY_FACING, StartSlotMachine
+ hidden_object 18, 13, ANY_FACING, StartSlotMachine
+ hidden_object 18, 12, ANY_FACING, StartSlotMachine
+ hidden_object 18, 11, ANY_FACING, StartSlotMachine
+ hidden_object 18, 10, SLOTS_SOMEONESKEYS, StartSlotMachine
+ hidden_object 13, 10, ANY_FACING, StartSlotMachine
+ hidden_object 13, 11, ANY_FACING, StartSlotMachine
+ hidden_object 13, 12, SLOTS_OUTTOLUNCH, StartSlotMachine
+ hidden_object 13, 13, ANY_FACING, StartSlotMachine
+ hidden_object 13, 14, ANY_FACING, StartSlotMachine
+ hidden_object 13, 15, ANY_FACING, StartSlotMachine
+ hidden_object 12, 15, ANY_FACING, StartSlotMachine
+ hidden_object 12, 14, ANY_FACING, StartSlotMachine
+ hidden_object 12, 13, ANY_FACING, StartSlotMachine
+ hidden_object 12, 12, ANY_FACING, StartSlotMachine
+ hidden_object 12, 11, ANY_FACING, StartSlotMachine
+ hidden_object 12, 10, ANY_FACING, StartSlotMachine
+ hidden_object 7, 10, ANY_FACING, StartSlotMachine
+ hidden_object 7, 11, ANY_FACING, StartSlotMachine
+ hidden_object 7, 12, ANY_FACING, StartSlotMachine
+ hidden_object 7, 13, ANY_FACING, StartSlotMachine
+ hidden_object 7, 14, ANY_FACING, StartSlotMachine
+ hidden_object 7, 15, ANY_FACING, StartSlotMachine
+ hidden_object 6, 15, ANY_FACING, StartSlotMachine
+ hidden_object 6, 14, ANY_FACING, StartSlotMachine
+ hidden_object 6, 13, ANY_FACING, StartSlotMachine
+ hidden_object 6, 12, SLOTS_OUTOFORDER, StartSlotMachine
+ hidden_object 6, 11, ANY_FACING, StartSlotMachine
+ hidden_object 6, 10, ANY_FACING, StartSlotMachine
+ hidden_object 1, 10, ANY_FACING, StartSlotMachine
+ hidden_object 1, 11, ANY_FACING, StartSlotMachine
+ hidden_object 1, 12, ANY_FACING, StartSlotMachine
+ hidden_object 1, 13, ANY_FACING, StartSlotMachine
+ hidden_object 1, 14, ANY_FACING, StartSlotMachine
+ hidden_object 1, 15, ANY_FACING, StartSlotMachine
+ hidden_object 0, 8, COIN+10, HiddenCoins
+ hidden_object 1, 16, COIN+10, HiddenCoins
+ hidden_object 3, 11, COIN+20, HiddenCoins
+ hidden_object 3, 14, COIN+10, HiddenCoins
+ hidden_object 4, 12, COIN+10, HiddenCoins
+ hidden_object 9, 12, COIN+20, HiddenCoins
+ hidden_object 9, 15, COIN+10, HiddenCoins
+ hidden_object 16, 14, COIN+10, HiddenCoins
+ hidden_object 10, 16, COIN+10, HiddenCoins
+ hidden_object 11, 7, COIN+40, HiddenCoins
+ hidden_object 15, 8, COIN+100, HiddenCoins
+ hidden_object 12, 15, COIN+10, HiddenCoins
+ db -1 ; end
+
+FuchsiaPokecenterHiddenObjects:
+ hidden_object 13, 3, SPRITE_FACING_UP, OpenPokemonCenterPC
+ hidden_object 0, 4, SPRITE_FACING_UP, PrintBenchGuyText
+ db -1 ; end
+
+SafariZoneEntranceHiddenObjects:
+ hidden_object 10, 1, NUGGET, HiddenItems ; inaccessible
+ db -1 ; end
+
+FuchsiaGymHiddenObjects:
+ hidden_object 3, 15, SPRITE_FACING_UP, GymStatues
+ hidden_object 6, 15, SPRITE_FACING_UP, GymStatues
+ db -1 ; end
+
+Mansion1HiddenObjects:
+ hidden_object 8, 16, MOON_STONE, HiddenItems
+ hidden_object 2, 5, SPRITE_FACING_UP, Mansion1Script_Switches
+ db -1 ; end
+
+CinnabarGymHiddenObjects:
+ hidden_object 17, 13, SPRITE_FACING_UP, GymStatues
+ ; third param: ([hGymGateAnswer] << 4) | [hGymGateIndex]
+ hidden_object 15, 7, (FALSE << 4) | 1, PrintCinnabarQuiz
+ hidden_object 10, 1, (TRUE << 4) | 2, PrintCinnabarQuiz
+ hidden_object 9, 7, (TRUE << 4) | 3, PrintCinnabarQuiz
+ hidden_object 9, 13, (TRUE << 4) | 4, PrintCinnabarQuiz
+ hidden_object 1, 13, (FALSE << 4) | 5, PrintCinnabarQuiz
+ hidden_object 1, 7, (TRUE << 4) | 6, PrintCinnabarQuiz
+ db -1 ; end
+
+CinnabarLab4HiddenObjects:
+ hidden_object 0, 4, SPRITE_FACING_UP, OpenPokemonCenterPC
+ hidden_object 2, 4, SPRITE_FACING_UP, OpenPokemonCenterPC
+ db -1 ; end
+
+CinnabarPokecenterHiddenObjects:
+ hidden_object 0, 4, SPRITE_FACING_UP, PrintBenchGuyText
+ hidden_object 13, 3, SPRITE_FACING_UP, OpenPokemonCenterPC
+ db -1 ; end
diff --git a/data/events/prize_mon_levels.asm b/data/events/prize_mon_levels.asm
new file mode 100755
index 00000000..53a2a966
--- /dev/null
+++ b/data/events/prize_mon_levels.asm
@@ -0,0 +1,8 @@
+PrizeMonLevelDictionary:
+ db ABRA, 15
+ db VULPIX, 18
+ db WIGGLYTUFF, 22
+
+ db SCYTHER, 30
+ db PINSIR, 30
+ db PORYGON, 26
diff --git a/data/events/prizes.asm b/data/events/prizes.asm
new file mode 100755
index 00000000..61d7b5f5
--- /dev/null
+++ b/data/events/prizes.asm
@@ -0,0 +1,40 @@
+PrizeDifferentMenuPtrs:
+ dw PrizeMenuMon1Entries, PrizeMenuMon1Cost
+ dw PrizeMenuMon2Entries, PrizeMenuMon2Cost
+ dw PrizeMenuTMsEntries, PrizeMenuTMsCost
+
+PrizeMenuMon1Entries:
+ db ABRA
+ db VULPIX
+ db WIGGLYTUFF
+ db "@"
+
+PrizeMenuMon1Cost:
+ coins 230
+ coins 1000
+ coins 2680
+ db "@"
+
+PrizeMenuMon2Entries:
+ db SCYTHER
+ db PINSIR
+ db PORYGON
+ db "@"
+
+PrizeMenuMon2Cost:
+ coins 6500
+ coins 6500
+ coins 9999
+ db "@"
+
+PrizeMenuTMsEntries:
+ db TM_DRAGON_RAGE
+ db TM_HYPER_BEAM
+ db TM_SUBSTITUTE
+ db "@"
+
+PrizeMenuTMsCost:
+ coins 3300
+ coins 5500
+ coins 7700
+ db "@"
diff --git a/data/slot_machine_wheels.asm b/data/events/slot_machine_wheels.asm
index 88a89822..88a89822 100755
--- a/data/slot_machine_wheels.asm
+++ b/data/events/slot_machine_wheels.asm
diff --git a/data/events/trades.asm b/data/events/trades.asm
new file mode 100755
index 00000000..44f7ec21
--- /dev/null
+++ b/data/events/trades.asm
@@ -0,0 +1,13 @@
+TradeMons:
+; entries correspond to TRADE_FOR_* constants
+ ; give mon, get mon, dialog id, nickname
+ db LICKITUNG, DUGTRIO, TRADE_DIALOGSET_CASUAL, "GURIO@@@@@@"
+ db CLEFAIRY, MR_MIME, TRADE_DIALOGSET_CASUAL, "MILES@@@@@@"
+ db BUTTERFREE, BEEDRILL, TRADE_DIALOGSET_HAPPY, "STINGER@@@@"
+ db KANGASKHAN, MUK, TRADE_DIALOGSET_CASUAL, "STICKY@@@@@"
+ db MEW, MEW, TRADE_DIALOGSET_HAPPY, "BART@@@@@@@"
+ db TANGELA, PARASECT, TRADE_DIALOGSET_CASUAL, "SPIKE@@@@@@"
+ db PIDGEOT, PIDGEOT, TRADE_DIALOGSET_POLITE, "MARTY@@@@@@"
+ db GOLDUCK, RHYDON, TRADE_DIALOGSET_POLITE, "BUFFY@@@@@@"
+ db GROWLITHE, DEWGONG, TRADE_DIALOGSET_HAPPY, "CEZANNE@@@@"
+ db CUBONE, MACHOKE, TRADE_DIALOGSET_HAPPY, "RICKY@@@@@@"
diff --git a/data/evos_moves.asm b/data/evos_moves.asm
deleted file mode 100755
index 27397eb0..00000000
--- a/data/evos_moves.asm
+++ /dev/null
@@ -1,2161 +0,0 @@
-; See constants/evolution_constants.asm
-; The max number of evolutions per monster is MAX_EVOLUTIONS
-
-EvosMovesPointerTable:
- dw RhydonEvosMoves
- dw KangaskhanEvosMoves
- dw NidoranMEvosMoves
- dw ClefairyEvosMoves
- dw SpearowEvosMoves
- dw VoltorbEvosMoves
- dw NidokingEvosMoves
- dw SlowbroEvosMoves
- dw IvysaurEvosMoves
- dw ExeggutorEvosMoves
- dw LickitungEvosMoves
- dw ExeggcuteEvosMoves
- dw GrimerEvosMoves
- dw GengarEvosMoves
- dw NidoranFEvosMoves
- dw NidoqueenEvosMoves
- dw CuboneEvosMoves
- dw RhyhornEvosMoves
- dw LaprasEvosMoves
- dw ArcanineEvosMoves
- dw MewEvosMoves
- dw GyaradosEvosMoves
- dw ShellderEvosMoves
- dw TentacoolEvosMoves
- dw GastlyEvosMoves
- dw ScytherEvosMoves
- dw StaryuEvosMoves
- dw BlastoiseEvosMoves
- dw PinsirEvosMoves
- dw TangelaEvosMoves
- dw MissingNo1FEvosMoves
- dw MissingNo20EvosMoves
- dw GrowlitheEvosMoves
- dw OnixEvosMoves
- dw FearowEvosMoves
- dw PidgeyEvosMoves
- dw SlowpokeEvosMoves
- dw KadabraEvosMoves
- dw GravelerEvosMoves
- dw ChanseyEvosMoves
- dw MachokeEvosMoves
- dw MrMimeEvosMoves
- dw HitmonleeEvosMoves
- dw HitmonchanEvosMoves
- dw ArbokEvosMoves
- dw ParasectEvosMoves
- dw PsyduckEvosMoves
- dw DrowzeeEvosMoves
- dw GolemEvosMoves
- dw MissingNo32EvosMoves
- dw MagmarEvosMoves
- dw MissingNo34EvosMoves
- dw ElectabuzzEvosMoves
- dw MagnetonEvosMoves
- dw KoffingEvosMoves
- dw MissingNo38EvosMoves
- dw MankeyEvosMoves
- dw SeelEvosMoves
- dw DiglettEvosMoves
- dw TaurosEvosMoves
- dw MissingNo3DEvosMoves
- dw MissingNo3EEvosMoves
- dw MissingNo3FEvosMoves
- dw FarfetchdEvosMoves
- dw VenonatEvosMoves
- dw DragoniteEvosMoves
- dw MissingNo43EvosMoves
- dw MissingNo44EvosMoves
- dw MissingNo45EvosMoves
- dw DoduoEvosMoves
- dw PoliwagEvosMoves
- dw JynxEvosMoves
- dw MoltresEvosMoves
- dw ArticunoEvosMoves
- dw ZapdosEvosMoves
- dw DittoEvosMoves
- dw MeowthEvosMoves
- dw KrabbyEvosMoves
- dw MissingNo4FEvosMoves
- dw MissingNo50EvosMoves
- dw MissingNo51EvosMoves
- dw VulpixEvosMoves
- dw NinetalesEvosMoves
- dw PikachuEvosMoves
- dw RaichuEvosMoves
- dw MissingNo56EvosMoves
- dw MissingNo57EvosMoves
- dw DratiniEvosMoves
- dw DragonairEvosMoves
- dw KabutoEvosMoves
- dw KabutopsEvosMoves
- dw HorseaEvosMoves
- dw SeadraEvosMoves
- dw MissingNo5EEvosMoves
- dw MissingNo5FEvosMoves
- dw SandshrewEvosMoves
- dw SandslashEvosMoves
- dw OmanyteEvosMoves
- dw OmastarEvosMoves
- dw JigglypuffEvosMoves
- dw WigglytuffEvosMoves
- dw EeveeEvosMoves
- dw FlareonEvosMoves
- dw JolteonEvosMoves
- dw VaporeonEvosMoves
- dw MachopEvosMoves
- dw ZubatEvosMoves
- dw EkansEvosMoves
- dw ParasEvosMoves
- dw PoliwhirlEvosMoves
- dw PoliwrathEvosMoves
- dw WeedleEvosMoves
- dw KakunaEvosMoves
- dw BeedrillEvosMoves
- dw MissingNo73EvosMoves
- dw DodrioEvosMoves
- dw PrimeapeEvosMoves
- dw DugtrioEvosMoves
- dw VenomothEvosMoves
- dw DewgongEvosMoves
- dw MissingNo79EvosMoves
- dw MissingNo7AEvosMoves
- dw CaterpieEvosMoves
- dw MetapodEvosMoves
- dw ButterfreeEvosMoves
- dw MachampEvosMoves
- dw MissingNo7FEvosMoves
- dw GolduckEvosMoves
- dw HypnoEvosMoves
- dw GolbatEvosMoves
- dw MewtwoEvosMoves
- dw SnorlaxEvosMoves
- dw MagikarpEvosMoves
- dw MissingNo86EvosMoves
- dw MissingNo87EvosMoves
- dw MukEvosMoves
- dw MissingNo8AEvosMoves
- dw KinglerEvosMoves
- dw CloysterEvosMoves
- dw MissingNo8CEvosMoves
- dw ElectrodeEvosMoves
- dw ClefableEvosMoves
- dw WeezingEvosMoves
- dw PersianEvosMoves
- dw MarowakEvosMoves
- dw MissingNo92EvosMoves
- dw HaunterEvosMoves
- dw AbraEvosMoves
- dw AlakazamEvosMoves
- dw PidgeottoEvosMoves
- dw PidgeotEvosMoves
- dw StarmieEvosMoves
- dw BulbasaurEvosMoves
- dw VenusaurEvosMoves
- dw TentacruelEvosMoves
- dw MissingNo9CEvosMoves
- dw GoldeenEvosMoves
- dw SeakingEvosMoves
- dw MissingNo9FEvosMoves
- dw MissingNoA0EvosMoves
- dw MissingNoA1EvosMoves
- dw MissingNoA2EvosMoves
- dw PonytaEvosMoves
- dw RapidashEvosMoves
- dw RattataEvosMoves
- dw RaticateEvosMoves
- dw NidorinoEvosMoves
- dw NidorinaEvosMoves
- dw GeodudeEvosMoves
- dw PorygonEvosMoves
- dw AerodactylEvosMoves
- dw MissingNoACEvosMoves
- dw MagnemiteEvosMoves
- dw MissingNoAEEvosMoves
- dw MissingNoAFEvosMoves
- dw CharmanderEvosMoves
- dw SquirtleEvosMoves
- dw CharmeleonEvosMoves
- dw WartortleEvosMoves
- dw CharizardEvosMoves
- dw MissingNoB5EvosMoves
- dw FossilKabutopsEvosMoves
- dw FossilAerodactylEvosMoves
- dw MonGhostEvosMoves
- dw OddishEvosMoves
- dw GloomEvosMoves
- dw VileplumeEvosMoves
- dw BellsproutEvosMoves
- dw WeepinbellEvosMoves
- dw VictreebelEvosMoves
-
-RhydonEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 30, STOMP
- db 35, TAIL_WHIP
- db 40, FURY_ATTACK
- db 48, HORN_DRILL
- db 55, LEER
- db 64, TAKE_DOWN
- db 0
-
-KangaskhanEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 26, BITE
- db 31, TAIL_WHIP
- db 36, MEGA_PUNCH
- db 41, LEER
- db 46, DIZZY_PUNCH
- db 0
-
-NidoranMEvosMoves:
-; Evolutions
- db EV_LEVEL, 16, NIDORINO
- db 0
-; Learnset
- db 8, HORN_ATTACK
- db 12, DOUBLE_KICK
- db 17, POISON_STING
- db 23, FOCUS_ENERGY
- db 30, FURY_ATTACK
- db 38, HORN_DRILL
- db 0
-
-ClefairyEvosMoves:
-; Evolutions
- db EV_ITEM, MOON_STONE, 1, CLEFABLE
- db 0
-; Learnset
- db 13, SING
- db 18, DOUBLESLAP
- db 24, MINIMIZE
- db 31, METRONOME
- db 39, DEFENSE_CURL
- db 48, LIGHT_SCREEN
- db 0
-
-SpearowEvosMoves:
-; Evolutions
- db EV_LEVEL, 20, FEAROW
- db 0
-; Learnset
- db 9, LEER
- db 15, FURY_ATTACK
- db 22, MIRROR_MOVE
- db 29, DRILL_PECK
- db 36, AGILITY
- db 0
-
-VoltorbEvosMoves:
-; Evolutions
- db EV_LEVEL, 30, ELECTRODE
- db 0
-; Learnset
- db 17, SONICBOOM
- db 22, SELFDESTRUCT
- db 29, LIGHT_SCREEN
- db 36, SWIFT
- db 43, EXPLOSION
- db 0
-
-NidokingEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 8, HORN_ATTACK
- db 12, DOUBLE_KICK
- db 23, THRASH
- db 0
-
-SlowbroEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 18, DISABLE
- db 22, HEADBUTT
- db 27, GROWL
- db 33, WATER_GUN
- db 37, WITHDRAW
- db 44, AMNESIA
- db 55, PSYCHIC_M
- db 0
-
-IvysaurEvosMoves:
-; Evolutions
- db EV_LEVEL, 32, VENUSAUR
- db 0
-; Learnset
- db 7, LEECH_SEED
- db 13, VINE_WHIP
- db 22, POISONPOWDER
- db 30, RAZOR_LEAF
- db 38, GROWTH
- db 46, SLEEP_POWDER
- db 54, SOLARBEAM
- db 0
-
-ExeggutorEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 28, STOMP
- db 0
-
-LickitungEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 7, STOMP
- db 15, DISABLE
- db 23, DEFENSE_CURL
- db 31, SLAM
- db 39, SCREECH
- db 0
-
-ExeggcuteEvosMoves:
-; Evolutions
- db EV_ITEM, LEAF_STONE, 1, EXEGGUTOR
- db 0
-; Learnset
- db 25, REFLECT
- db 28, LEECH_SEED
- db 32, STUN_SPORE
- db 37, POISONPOWDER
- db 42, SOLARBEAM
- db 48, SLEEP_POWDER
- db 0
-
-GrimerEvosMoves:
-; Evolutions
- db EV_LEVEL, 38, MUK
- db 0
-; Learnset
- db 30, POISON_GAS
- db 33, MINIMIZE
- db 37, SLUDGE
- db 42, HARDEN
- db 48, SCREECH
- db 55, ACID_ARMOR
- db 0
-
-GengarEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 29, HYPNOSIS
- db 38, DREAM_EATER
- db 0
-
-NidoranFEvosMoves:
-; Evolutions
- db EV_LEVEL, 16, NIDORINA
- db 0
-; Learnset
- db 8, SCRATCH
- db 12, DOUBLE_KICK
- db 17, POISON_STING
- db 23, TAIL_WHIP
- db 30, BITE
- db 38, FURY_SWIPES
- db 0
-
-NidoqueenEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 8, SCRATCH
- db 12, DOUBLE_KICK
- db 23, BODY_SLAM
- db 0
-
-CuboneEvosMoves:
-; Evolutions
- db EV_LEVEL, 28, MAROWAK
- db 0
-; Learnset
- db 10, BONE_CLUB
- db 13, TAIL_WHIP
- db 18, HEADBUTT
- db 25, LEER
- db 31, FOCUS_ENERGY
- db 38, THRASH
- db 43, BONEMERANG
- db 46, RAGE
- db 0
-
-RhyhornEvosMoves:
-; Evolutions
- db EV_LEVEL, 42, RHYDON
- db 0
-; Learnset
- db 30, STOMP
- db 35, TAIL_WHIP
- db 40, FURY_ATTACK
- db 45, HORN_DRILL
- db 50, LEER
- db 55, TAKE_DOWN
- db 0
-
-LaprasEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 16, SING
- db 20, MIST
- db 25, BODY_SLAM
- db 31, CONFUSE_RAY
- db 38, ICE_BEAM
- db 46, HYDRO_PUMP
- db 0
-
-ArcanineEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MewEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 10, TRANSFORM
- db 20, MEGA_PUNCH
- db 30, METRONOME
- db 40, PSYCHIC_M
- db 0
-
-GyaradosEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 20, BITE
- db 25, DRAGON_RAGE
- db 32, LEER
- db 41, HYDRO_PUMP
- db 52, HYPER_BEAM
- db 0
-
-ShellderEvosMoves:
-; Evolutions
- db EV_ITEM, WATER_STONE, 1, CLOYSTER
- db 0
-; Learnset
- db 18, SUPERSONIC
- db 23, CLAMP
- db 30, AURORA_BEAM
- db 39, LEER
- db 50, ICE_BEAM
- db 0
-
-TentacoolEvosMoves:
-; Evolutions
- db EV_LEVEL, 30, TENTACRUEL
- db 0
-; Learnset
- db 7, SUPERSONIC
- db 13, WRAP
- db 18, POISON_STING
- db 22, WATER_GUN
- db 27, CONSTRICT
- db 33, BARRIER
- db 40, SCREECH
- db 48, HYDRO_PUMP
- db 0
-
-GastlyEvosMoves:
-; Evolutions
- db EV_LEVEL, 25, HAUNTER
- db 0
-; Learnset
- db 27, HYPNOSIS
- db 35, DREAM_EATER
- db 0
-
-ScytherEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 17, LEER
- db 20, FOCUS_ENERGY
- db 24, DOUBLE_TEAM
- db 29, SLASH
- db 35, SWORDS_DANCE
- db 42, AGILITY
- db 50, WING_ATTACK
- db 0
-
-StaryuEvosMoves:
-; Evolutions
- db EV_ITEM, WATER_STONE, 1, STARMIE
- db 0
-; Learnset
- db 17, WATER_GUN
- db 22, HARDEN
- db 27, RECOVER
- db 32, SWIFT
- db 37, MINIMIZE
- db 42, LIGHT_SCREEN
- db 47, HYDRO_PUMP
- db 0
-
-BlastoiseEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 8, BUBBLE
- db 15, WATER_GUN
- db 24, BITE
- db 31, WITHDRAW
- db 42, SKULL_BASH
- db 52, HYDRO_PUMP
- db 0
-
-PinsirEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 21, BIND
- db 25, SEISMIC_TOSS
- db 30, GUILLOTINE
- db 36, FOCUS_ENERGY
- db 43, HARDEN
- db 49, SLASH
- db 54, SWORDS_DANCE
- db 0
-
-TangelaEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 24, BIND
- db 27, ABSORB
- db 29, VINE_WHIP
- db 32, POISONPOWDER
- db 36, STUN_SPORE
- db 39, SLEEP_POWDER
- db 45, SLAM
- db 48, GROWTH
- db 0
-
-MissingNo1FEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNo20EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-GrowlitheEvosMoves:
-; Evolutions
- db EV_ITEM, FIRE_STONE, 1, ARCANINE
- db 0
-; Learnset
- db 18, EMBER
- db 23, LEER
- db 30, TAKE_DOWN
- db 39, AGILITY
- db 50, FLAMETHROWER
- db 0
-
-OnixEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 15, BIND
- db 19, ROCK_THROW
- db 25, RAGE
- db 33, SLAM
- db 43, HARDEN
- db 0
-
-FearowEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 9, LEER
- db 15, FURY_ATTACK
- db 25, MIRROR_MOVE
- db 34, DRILL_PECK
- db 43, AGILITY
- db 0
-
-PidgeyEvosMoves:
-; Evolutions
- db EV_LEVEL, 18, PIDGEOTTO
- db 0
-; Learnset
- db 5, SAND_ATTACK
- db 12, QUICK_ATTACK
- db 19, WHIRLWIND
- db 28, WING_ATTACK
- db 36, AGILITY
- db 44, MIRROR_MOVE
- db 0
-
-SlowpokeEvosMoves:
-; Evolutions
- db EV_LEVEL, 37, SLOWBRO
- db 0
-; Learnset
- db 18, DISABLE
- db 22, HEADBUTT
- db 27, GROWL
- db 33, WATER_GUN
- db 40, AMNESIA
- db 48, PSYCHIC_M
- db 0
-
-KadabraEvosMoves:
-; Evolutions
- db EV_TRADE, 1, ALAKAZAM
- db 0
-; Learnset
- db 16, CONFUSION
- db 20, DISABLE
- db 27, PSYBEAM
- db 31, RECOVER
- db 38, PSYCHIC_M
- db 42, REFLECT
- db 0
-
-GravelerEvosMoves:
-; Evolutions
- db EV_TRADE, 1, GOLEM
- db 0
-; Learnset
- db 11, DEFENSE_CURL
- db 16, ROCK_THROW
- db 21, SELFDESTRUCT
- db 29, HARDEN
- db 36, EARTHQUAKE
- db 43, EXPLOSION
- db 0
-
-ChanseyEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 12, DOUBLESLAP
- db 24, SING
- db 30, GROWL
- db 38, MINIMIZE
- db 44, DEFENSE_CURL
- db 48, LIGHT_SCREEN
- db 54, DOUBLE_EDGE
- db 0
-
-MachokeEvosMoves:
-; Evolutions
- db EV_TRADE, 1, MACHAMP
- db 0
-; Learnset
- db 20, LOW_KICK
- db 25, LEER
- db 36, FOCUS_ENERGY
- db 44, SEISMIC_TOSS
- db 52, SUBMISSION
- db 0
-
-MrMimeEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 15, CONFUSION
- db 23, LIGHT_SCREEN
- db 31, DOUBLESLAP
- db 39, MEDITATE
- db 47, SUBSTITUTE
- db 0
-
-HitmonleeEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 33, ROLLING_KICK
- db 38, JUMP_KICK
- db 43, FOCUS_ENERGY
- db 48, HI_JUMP_KICK
- db 53, MEGA_KICK
- db 0
-
-HitmonchanEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 33, FIRE_PUNCH
- db 38, ICE_PUNCH
- db 43, THUNDERPUNCH
- db 48, MEGA_PUNCH
- db 53, COUNTER
- db 0
-
-ArbokEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 10, POISON_STING
- db 17, BITE
- db 27, GLARE
- db 36, SCREECH
- db 47, ACID
- db 0
-
-ParasectEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 13, STUN_SPORE
- db 20, LEECH_LIFE
- db 30, SPORE
- db 39, SLASH
- db 48, GROWTH
- db 0
-
-PsyduckEvosMoves:
-; Evolutions
- db EV_LEVEL, 33, GOLDUCK
- db 0
-; Learnset
- db 28, TAIL_WHIP
- db 31, DISABLE
- db 36, CONFUSION
- db 43, FURY_SWIPES
- db 52, HYDRO_PUMP
- db 0
-
-DrowzeeEvosMoves:
-; Evolutions
- db EV_LEVEL, 26, HYPNO
- db 0
-; Learnset
- db 12, DISABLE
- db 17, CONFUSION
- db 24, HEADBUTT
- db 29, POISON_GAS
- db 32, PSYCHIC_M
- db 37, MEDITATE
- db 0
-
-GolemEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 11, DEFENSE_CURL
- db 16, ROCK_THROW
- db 21, SELFDESTRUCT
- db 29, HARDEN
- db 36, EARTHQUAKE
- db 43, EXPLOSION
- db 0
-
-MissingNo32EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MagmarEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 36, LEER
- db 39, CONFUSE_RAY
- db 43, FIRE_PUNCH
- db 48, SMOKESCREEN
- db 52, SMOG
- db 55, FLAMETHROWER
- db 0
-
-MissingNo34EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-ElectabuzzEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 34, THUNDERSHOCK
- db 37, SCREECH
- db 42, THUNDERPUNCH
- db 49, LIGHT_SCREEN
- db 54, THUNDER
- db 0
-
-MagnetonEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 21, SONICBOOM
- db 25, THUNDERSHOCK
- db 29, SUPERSONIC
- db 38, THUNDER_WAVE
- db 46, SWIFT
- db 54, SCREECH
- db 0
-
-KoffingEvosMoves:
-; Evolutions
- db EV_LEVEL, 35, WEEZING
- db 0
-; Learnset
- db 32, SLUDGE
- db 37, SMOKESCREEN
- db 40, SELFDESTRUCT
- db 45, HAZE
- db 48, EXPLOSION
- db 0
-
-MissingNo38EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MankeyEvosMoves:
-; Evolutions
- db EV_LEVEL, 28, PRIMEAPE
- db 0
-; Learnset
- db 9, LOW_KICK
- db 15, KARATE_CHOP
- db 21, FURY_SWIPES
- db 27, FOCUS_ENERGY
- db 33, SEISMIC_TOSS
- db 39, THRASH
- db 45, SCREECH
- db 0
-
-SeelEvosMoves:
-; Evolutions
- db EV_LEVEL, 34, DEWGONG
- db 0
-; Learnset
- db 30, GROWL
- db 35, AURORA_BEAM
- db 40, REST
- db 45, TAKE_DOWN
- db 50, ICE_BEAM
- db 0
-
-DiglettEvosMoves:
-; Evolutions
- db EV_LEVEL, 26, DUGTRIO
- db 0
-; Learnset
- db 15, GROWL
- db 19, DIG
- db 24, SAND_ATTACK
- db 31, SLASH
- db 40, EARTHQUAKE
- db 0
-
-TaurosEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 21, STOMP
- db 28, TAIL_WHIP
- db 35, LEER
- db 44, RAGE
- db 51, TAKE_DOWN
- db 0
-
-MissingNo3DEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNo3EEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNo3FEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-FarfetchdEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 7, LEER
- db 15, FURY_ATTACK
- db 23, SWORDS_DANCE
- db 31, AGILITY
- db 39, SLASH
- db 0
-
-VenonatEvosMoves:
-; Evolutions
- db EV_LEVEL, 31, VENOMOTH
- db 0
-; Learnset
- db 11, SUPERSONIC
- db 19, CONFUSION
- db 22, POISONPOWDER
- db 27, LEECH_LIFE
- db 30, STUN_SPORE
- db 35, PSYBEAM
- db 38, SLEEP_POWDER
- db 43, PSYCHIC_M
- db 0
-
-DragoniteEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 10, THUNDER_WAVE
- db 20, AGILITY
- db 35, SLAM
- db 45, DRAGON_RAGE
- db 60, HYPER_BEAM
- db 0
-
-MissingNo43EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNo44EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNo45EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-DoduoEvosMoves:
-; Evolutions
- db EV_LEVEL, 31, DODRIO
- db 0
-; Learnset
- db 20, GROWL
- db 24, FURY_ATTACK
- db 30, DRILL_PECK
- db 36, RAGE
- db 40, TRI_ATTACK
- db 44, AGILITY
- db 0
-
-PoliwagEvosMoves:
-; Evolutions
- db EV_LEVEL, 25, POLIWHIRL
- db 0
-; Learnset
- db 16, HYPNOSIS
- db 19, WATER_GUN
- db 25, DOUBLESLAP
- db 31, BODY_SLAM
- db 38, AMNESIA
- db 45, HYDRO_PUMP
- db 0
-
-JynxEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 18, LICK
- db 23, DOUBLESLAP
- db 31, ICE_PUNCH
- db 39, BODY_SLAM
- db 47, THRASH
- db 58, BLIZZARD
- db 0
-
-MoltresEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 51, LEER
- db 55, AGILITY
- db 60, SKY_ATTACK
- db 0
-
-ArticunoEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 51, BLIZZARD
- db 55, AGILITY
- db 60, MIST
- db 0
-
-ZapdosEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 51, THUNDER
- db 55, AGILITY
- db 60, LIGHT_SCREEN
- db 0
-
-DittoEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MeowthEvosMoves:
-; Evolutions
- db EV_LEVEL, 28, PERSIAN
- db 0
-; Learnset
- db 12, BITE
- db 17, PAY_DAY
- db 24, SCREECH
- db 33, FURY_SWIPES
- db 44, SLASH
- db 0
-
-KrabbyEvosMoves:
-; Evolutions
- db EV_LEVEL, 28, KINGLER
- db 0
-; Learnset
- db 20, VICEGRIP
- db 25, GUILLOTINE
- db 30, STOMP
- db 35, CRABHAMMER
- db 40, HARDEN
- db 0
-
-MissingNo4FEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNo50EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNo51EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-VulpixEvosMoves:
-; Evolutions
- db EV_ITEM, FIRE_STONE, 1, NINETALES
- db 0
-; Learnset
- db 16, QUICK_ATTACK
- db 21, ROAR
- db 28, CONFUSE_RAY
- db 35, FLAMETHROWER
- db 42, FIRE_SPIN
- db 0
-
-NinetalesEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-PikachuEvosMoves:
-; Evolutions
- db EV_ITEM, THUNDER_STONE, 1, RAICHU
- db 0
-; Learnset
- db 6, TAIL_WHIP
- db 8, THUNDER_WAVE
- db 11, QUICK_ATTACK
- db 15, DOUBLE_TEAM
- db 20, SLAM
- db 26, THUNDERBOLT
- db 33, AGILITY
- db 41, THUNDER
- db 50, LIGHT_SCREEN
- db 0
-
-RaichuEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNo56EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNo57EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-DratiniEvosMoves:
-; Evolutions
- db EV_LEVEL, 30, DRAGONAIR
- db 0
-; Learnset
- db 10, THUNDER_WAVE
- db 20, AGILITY
- db 30, SLAM
- db 40, DRAGON_RAGE
- db 50, HYPER_BEAM
- db 0
-
-DragonairEvosMoves:
-; Evolutions
- db EV_LEVEL, 55, DRAGONITE
- db 0
-; Learnset
- db 10, THUNDER_WAVE
- db 20, AGILITY
- db 35, SLAM
- db 45, DRAGON_RAGE
- db 55, HYPER_BEAM
- db 0
-
-KabutoEvosMoves:
-; Evolutions
- db EV_LEVEL, 40, KABUTOPS
- db 0
-; Learnset
- db 34, ABSORB
- db 39, SLASH
- db 44, LEER
- db 49, HYDRO_PUMP
- db 0
-
-KabutopsEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 34, ABSORB
- db 39, SLASH
- db 46, LEER
- db 53, HYDRO_PUMP
- db 0
-
-HorseaEvosMoves:
-; Evolutions
- db EV_LEVEL, 32, SEADRA
- db 0
-; Learnset
- db 19, SMOKESCREEN
- db 24, LEER
- db 30, WATER_GUN
- db 37, AGILITY
- db 45, HYDRO_PUMP
- db 0
-
-SeadraEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 19, SMOKESCREEN
- db 24, LEER
- db 30, WATER_GUN
- db 41, AGILITY
- db 52, HYDRO_PUMP
- db 0
-
-MissingNo5EEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNo5FEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-SandshrewEvosMoves:
-; Evolutions
- db EV_LEVEL, 22, SANDSLASH
- db 0
-; Learnset
- db 10, SAND_ATTACK
- db 17, SLASH
- db 24, POISON_STING
- db 31, SWIFT
- db 38, FURY_SWIPES
- db 0
-
-SandslashEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 10, SAND_ATTACK
- db 17, SLASH
- db 27, POISON_STING
- db 36, SWIFT
- db 47, FURY_SWIPES
- db 0
-
-OmanyteEvosMoves:
-; Evolutions
- db EV_LEVEL, 40, OMASTAR
- db 0
-; Learnset
- db 34, HORN_ATTACK
- db 39, LEER
- db 46, SPIKE_CANNON
- db 53, HYDRO_PUMP
- db 0
-
-OmastarEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 34, HORN_ATTACK
- db 39, LEER
- db 44, SPIKE_CANNON
- db 49, HYDRO_PUMP
- db 0
-
-JigglypuffEvosMoves:
-; Evolutions
- db EV_ITEM, MOON_STONE, 1, WIGGLYTUFF
- db 0
-; Learnset
- db 9, POUND
- db 14, DISABLE
- db 19, DEFENSE_CURL
- db 24, DOUBLESLAP
- db 29, REST
- db 34, BODY_SLAM
- db 39, DOUBLE_EDGE
- db 0
-
-WigglytuffEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-EeveeEvosMoves:
-; Evolutions
- db EV_ITEM, FIRE_STONE, 1, FLAREON
- db EV_ITEM, THUNDER_STONE, 1, JOLTEON
- db EV_ITEM, WATER_STONE, 1, VAPOREON
- db 0
-; Learnset
- db 8, SAND_ATTACK
- db 16, GROWL
- db 23, QUICK_ATTACK
- db 30, BITE
- db 36, FOCUS_ENERGY
- db 42, TAKE_DOWN
- db 0
-
-FlareonEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 8, SAND_ATTACK
- db 16, EMBER
- db 23, QUICK_ATTACK
- db 30, BITE
- db 36, FIRE_SPIN
- db 42, SMOG
- db 47, LEER
- db 52, FLAMETHROWER
- db 0
-
-JolteonEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 8, SAND_ATTACK
- db 16, THUNDERSHOCK
- db 23, QUICK_ATTACK
- db 30, DOUBLE_KICK
- db 36, PIN_MISSILE
- db 42, THUNDER_WAVE
- db 47, AGILITY
- db 52, THUNDER
- db 0
-
-VaporeonEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 8, SAND_ATTACK
- db 16, WATER_GUN
- db 23, QUICK_ATTACK
- db 30, BITE
- db 36, AURORA_BEAM
- db 42, HAZE
- db 42, MIST
- db 47, ACID_ARMOR
- db 52, HYDRO_PUMP
- db 0
-
-MachopEvosMoves:
-; Evolutions
- db EV_LEVEL, 28, MACHOKE
- db 0
-; Learnset
- db 20, LOW_KICK
- db 25, LEER
- db 32, FOCUS_ENERGY
- db 39, SEISMIC_TOSS
- db 46, SUBMISSION
- db 0
-
-ZubatEvosMoves:
-; Evolutions
- db EV_LEVEL, 22, GOLBAT
- db 0
-; Learnset
- db 10, SUPERSONIC
- db 15, BITE
- db 21, CONFUSE_RAY
- db 28, WING_ATTACK
- db 36, HAZE
- db 0
-
-EkansEvosMoves:
-; Evolutions
- db EV_LEVEL, 22, ARBOK
- db 0
-; Learnset
- db 10, POISON_STING
- db 17, BITE
- db 24, GLARE
- db 31, SCREECH
- db 38, ACID
- db 0
-
-ParasEvosMoves:
-; Evolutions
- db EV_LEVEL, 24, PARASECT
- db 0
-; Learnset
- db 13, STUN_SPORE
- db 20, LEECH_LIFE
- db 27, SPORE
- db 34, SLASH
- db 41, GROWTH
- db 0
-
-PoliwhirlEvosMoves:
-; Evolutions
- db EV_ITEM, WATER_STONE, 1, POLIWRATH
- db 0
-; Learnset
- db 16, HYPNOSIS
- db 19, WATER_GUN
- db 26, DOUBLESLAP
- db 33, BODY_SLAM
- db 41, AMNESIA
- db 49, HYDRO_PUMP
- db 0
-
-PoliwrathEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 16, HYPNOSIS
- db 19, WATER_GUN
- db 0
-
-WeedleEvosMoves:
-; Evolutions
- db EV_LEVEL, 7, KAKUNA
- db 0
-; Learnset
- db 0
-
-KakunaEvosMoves:
-; Evolutions
- db EV_LEVEL, 10, BEEDRILL
- db 0
-; Learnset
- db 0
-
-BeedrillEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 12, FURY_ATTACK
- db 16, FOCUS_ENERGY
- db 20, TWINEEDLE
- db 25, RAGE
- db 30, PIN_MISSILE
- db 35, AGILITY
- db 0
-
-MissingNo73EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-DodrioEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 20, GROWL
- db 24, FURY_ATTACK
- db 30, DRILL_PECK
- db 39, RAGE
- db 45, TRI_ATTACK
- db 51, AGILITY
- db 0
-
-PrimeapeEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 9, LOW_KICK
- db 15, KARATE_CHOP
- db 21, FURY_SWIPES
- db 27, FOCUS_ENERGY
- db 28, RAGE
- db 37, SEISMIC_TOSS
- db 46, THRASH
- db 45, SCREECH
- db 0
-
-DugtrioEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 15, GROWL
- db 19, DIG
- db 24, SAND_ATTACK
- db 35, SLASH
- db 47, EARTHQUAKE
- db 0
-
-VenomothEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 22, POISONPOWDER
- db 27, LEECH_LIFE
- db 30, STUN_SPORE
- db 38, PSYBEAM
- db 43, SLEEP_POWDER
- db 50, PSYCHIC_M
- db 0
-
-DewgongEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 30, GROWL
- db 35, AURORA_BEAM
- db 44, REST
- db 50, TAKE_DOWN
- db 56, ICE_BEAM
- db 0
-
-MissingNo79EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNo7AEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-CaterpieEvosMoves:
-; Evolutions
- db EV_LEVEL, 7, METAPOD
- db 0
-; Learnset
- db 0
-
-MetapodEvosMoves:
-; Evolutions
- db EV_LEVEL, 10, BUTTERFREE
- db 0
-; Learnset
- db 7, HARDEN
- db 0
-
-ButterfreeEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 10, CONFUSION
- db 13, POISONPOWDER
- db 14, STUN_SPORE
- db 15, SLEEP_POWDER
- db 18, SUPERSONIC
- db 23, WHIRLWIND
- db 28, GUST
- db 34, PSYBEAM
- db 0
-
-MachampEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 20, LOW_KICK
- db 25, LEER
- db 36, FOCUS_ENERGY
- db 44, SEISMIC_TOSS
- db 52, SUBMISSION
- db 0
-
-MissingNo7FEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-GolduckEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 28, TAIL_WHIP
- db 31, DISABLE
- db 39, CONFUSION
- db 48, FURY_SWIPES
- db 59, HYDRO_PUMP
- db 0
-
-HypnoEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 12, DISABLE
- db 17, CONFUSION
- db 24, HEADBUTT
- db 33, POISON_GAS
- db 37, PSYCHIC_M
- db 43, MEDITATE
- db 0
-
-GolbatEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 10, SUPERSONIC
- db 15, BITE
- db 21, CONFUSE_RAY
- db 32, WING_ATTACK
- db 43, HAZE
- db 0
-
-MewtwoEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 63, BARRIER
- db 66, PSYCHIC_M
- db 70, RECOVER
- db 75, MIST
- db 81, AMNESIA
- db 0
-
-SnorlaxEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 35, BODY_SLAM
- db 41, HARDEN
- db 48, DOUBLE_EDGE
- db 56, HYPER_BEAM
- db 0
-
-MagikarpEvosMoves:
-; Evolutions
- db EV_LEVEL, 20, GYARADOS
- db 0
-; Learnset
- db 15, TACKLE
- db 0
-
-MissingNo86EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNo87EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MukEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 30, POISON_GAS
- db 33, MINIMIZE
- db 37, SLUDGE
- db 45, HARDEN
- db 53, SCREECH
- db 60, ACID_ARMOR
- db 0
-
-MissingNo8AEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-KinglerEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 20, VICEGRIP
- db 25, GUILLOTINE
- db 34, STOMP
- db 42, CRABHAMMER
- db 49, HARDEN
- db 0
-
-CloysterEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 50, SPIKE_CANNON
- db 0
-
-MissingNo8CEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-ElectrodeEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 17, SONICBOOM
- db 22, SELFDESTRUCT
- db 29, LIGHT_SCREEN
- db 40, SWIFT
- db 50, EXPLOSION
- db 0
-
-ClefableEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-WeezingEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 32, SLUDGE
- db 39, SMOKESCREEN
- db 43, SELFDESTRUCT
- db 49, HAZE
- db 53, EXPLOSION
- db 0
-
-PersianEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 12, BITE
- db 17, PAY_DAY
- db 24, SCREECH
- db 37, FURY_SWIPES
- db 51, SLASH
- db 0
-
-MarowakEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 10, BONE_CLUB
- db 13, TAIL_WHIP
- db 18, HEADBUTT
- db 25, LEER
- db 33, FOCUS_ENERGY
- db 41, THRASH
- db 48, BONEMERANG
- db 55, RAGE
- db 0
-
-MissingNo92EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-HaunterEvosMoves:
-; Evolutions
- db EV_TRADE, 1, GENGAR
- db 0
-; Learnset
- db 29, HYPNOSIS
- db 38, DREAM_EATER
- db 0
-
-AbraEvosMoves:
-; Evolutions
- db EV_LEVEL, 16, KADABRA
- db 0
-; Learnset
- db 0
-
-AlakazamEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 16, CONFUSION
- db 20, DISABLE
- db 27, PSYBEAM
- db 31, RECOVER
- db 38, PSYCHIC_M
- db 42, REFLECT
- db 0
-
-PidgeottoEvosMoves:
-; Evolutions
- db EV_LEVEL, 36, PIDGEOT
- db 0
-; Learnset
- db 5, SAND_ATTACK
- db 12, QUICK_ATTACK
- db 21, WHIRLWIND
- db 31, WING_ATTACK
- db 40, AGILITY
- db 49, MIRROR_MOVE
- db 0
-
-PidgeotEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 5, SAND_ATTACK
- db 12, QUICK_ATTACK
- db 21, WHIRLWIND
- db 31, WING_ATTACK
- db 44, AGILITY
- db 54, MIRROR_MOVE
- db 0
-
-StarmieEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-BulbasaurEvosMoves:
-; Evolutions
- db EV_LEVEL, 16, IVYSAUR
- db 0
-; Learnset
- db 7, LEECH_SEED
- db 13, VINE_WHIP
- db 20, POISONPOWDER
- db 27, RAZOR_LEAF
- db 34, GROWTH
- db 41, SLEEP_POWDER
- db 48, SOLARBEAM
- db 0
-
-VenusaurEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 7, LEECH_SEED
- db 13, VINE_WHIP
- db 22, POISONPOWDER
- db 30, RAZOR_LEAF
- db 43, GROWTH
- db 55, SLEEP_POWDER
- db 65, SOLARBEAM
- db 0
-
-TentacruelEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 7, SUPERSONIC
- db 13, WRAP
- db 18, POISON_STING
- db 22, WATER_GUN
- db 27, CONSTRICT
- db 35, BARRIER
- db 43, SCREECH
- db 50, HYDRO_PUMP
- db 0
-
-MissingNo9CEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-GoldeenEvosMoves:
-; Evolutions
- db EV_LEVEL, 33, SEAKING
- db 0
-; Learnset
- db 19, SUPERSONIC
- db 24, HORN_ATTACK
- db 30, FURY_ATTACK
- db 37, WATERFALL
- db 45, HORN_DRILL
- db 54, AGILITY
- db 0
-
-SeakingEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 19, SUPERSONIC
- db 24, HORN_ATTACK
- db 30, FURY_ATTACK
- db 39, WATERFALL
- db 48, HORN_DRILL
- db 54, AGILITY
- db 0
-
-MissingNo9FEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNoA0EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNoA1EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNoA2EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-PonytaEvosMoves:
-; Evolutions
- db EV_LEVEL, 40, RAPIDASH
- db 0
-; Learnset
- db 30, TAIL_WHIP
- db 32, STOMP
- db 35, GROWL
- db 39, FIRE_SPIN
- db 43, TAKE_DOWN
- db 48, AGILITY
- db 0
-
-RapidashEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 30, TAIL_WHIP
- db 32, STOMP
- db 35, GROWL
- db 39, FIRE_SPIN
- db 47, TAKE_DOWN
- db 55, AGILITY
- db 0
-
-RattataEvosMoves:
-; Evolutions
- db EV_LEVEL, 20, RATICATE
- db 0
-; Learnset
- db 7, QUICK_ATTACK
- db 14, HYPER_FANG
- db 23, FOCUS_ENERGY
- db 34, SUPER_FANG
- db 0
-
-RaticateEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 7, QUICK_ATTACK
- db 14, HYPER_FANG
- db 27, FOCUS_ENERGY
- db 41, SUPER_FANG
- db 0
-
-NidorinoEvosMoves:
-; Evolutions
- db EV_ITEM, MOON_STONE, 1, NIDOKING
- db 0
-; Learnset
- db 8, HORN_ATTACK
- db 12, DOUBLE_KICK
- db 19, POISON_STING
- db 27, FOCUS_ENERGY
- db 36, FURY_ATTACK
- db 46, HORN_DRILL
- db 0
-
-NidorinaEvosMoves:
-; Evolutions
- db EV_ITEM, MOON_STONE, 1, NIDOQUEEN
- db 0
-; Learnset
- db 8, SCRATCH
- db 12, DOUBLE_KICK
- db 19, POISON_STING
- db 27, TAIL_WHIP
- db 36, BITE
- db 46, FURY_SWIPES
- db 0
-
-GeodudeEvosMoves:
-; Evolutions
- db EV_LEVEL, 25, GRAVELER
- db 0
-; Learnset
- db 11, DEFENSE_CURL
- db 16, ROCK_THROW
- db 21, SELFDESTRUCT
- db 26, HARDEN
- db 31, EARTHQUAKE
- db 36, EXPLOSION
- db 0
-
-PorygonEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 23, PSYBEAM
- db 28, RECOVER
- db 35, AGILITY
- db 42, TRI_ATTACK
- db 0
-
-AerodactylEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 33, SUPERSONIC
- db 38, BITE
- db 45, TAKE_DOWN
- db 54, HYPER_BEAM
- db 0
-
-MissingNoACEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MagnemiteEvosMoves:
-; Evolutions
- db EV_LEVEL, 30, MAGNETON
- db 0
-; Learnset
- db 21, SONICBOOM
- db 25, THUNDERSHOCK
- db 29, SUPERSONIC
- db 35, THUNDER_WAVE
- db 41, SWIFT
- db 47, SCREECH
- db 0
-
-MissingNoAEEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MissingNoAFEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-CharmanderEvosMoves:
-; Evolutions
- db EV_LEVEL, 16, CHARMELEON
- db 0
-; Learnset
- db 9, EMBER
- db 15, LEER
- db 22, RAGE
- db 30, SLASH
- db 38, FLAMETHROWER
- db 46, FIRE_SPIN
- db 0
-
-SquirtleEvosMoves:
-; Evolutions
- db EV_LEVEL, 16, WARTORTLE
- db 0
-; Learnset
- db 8, BUBBLE
- db 15, WATER_GUN
- db 22, BITE
- db 28, WITHDRAW
- db 35, SKULL_BASH
- db 42, HYDRO_PUMP
- db 0
-
-CharmeleonEvosMoves:
-; Evolutions
- db EV_LEVEL, 36, CHARIZARD
- db 0
-; Learnset
- db 9, EMBER
- db 15, LEER
- db 24, RAGE
- db 33, SLASH
- db 42, FLAMETHROWER
- db 56, FIRE_SPIN
- db 0
-
-WartortleEvosMoves:
-; Evolutions
- db EV_LEVEL, 36, BLASTOISE
- db 0
-; Learnset
- db 8, BUBBLE
- db 15, WATER_GUN
- db 24, BITE
- db 31, WITHDRAW
- db 39, SKULL_BASH
- db 47, HYDRO_PUMP
- db 0
-
-CharizardEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 9, EMBER
- db 15, LEER
- db 24, RAGE
- db 36, SLASH
- db 46, FLAMETHROWER
- db 55, FIRE_SPIN
- db 0
-
-MissingNoB5EvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-FossilKabutopsEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-FossilAerodactylEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-MonGhostEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 0
-
-OddishEvosMoves:
-; Evolutions
- db EV_LEVEL, 21, GLOOM
- db 0
-; Learnset
- db 15, POISONPOWDER
- db 17, STUN_SPORE
- db 19, SLEEP_POWDER
- db 24, ACID
- db 33, PETAL_DANCE
- db 46, SOLARBEAM
- db 0
-
-GloomEvosMoves:
-; Evolutions
- db EV_ITEM, LEAF_STONE, 1, VILEPLUME
- db 0
-; Learnset
- db 15, POISONPOWDER
- db 17, STUN_SPORE
- db 19, SLEEP_POWDER
- db 28, ACID
- db 38, PETAL_DANCE
- db 52, SOLARBEAM
- db 0
-
-VileplumeEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 15, POISONPOWDER
- db 17, STUN_SPORE
- db 19, SLEEP_POWDER
- db 0
-
-BellsproutEvosMoves:
-; Evolutions
- db EV_LEVEL, 21, WEEPINBELL
- db 0
-; Learnset
- db 13, WRAP
- db 15, POISONPOWDER
- db 18, SLEEP_POWDER
- db 21, STUN_SPORE
- db 26, ACID
- db 33, RAZOR_LEAF
- db 42, SLAM
- db 0
-
-WeepinbellEvosMoves:
-; Evolutions
- db EV_ITEM, LEAF_STONE, 1, VICTREEBEL
- db 0
-; Learnset
- db 13, WRAP
- db 15, POISONPOWDER
- db 18, SLEEP_POWDER
- db 23, STUN_SPORE
- db 29, ACID
- db 38, RAZOR_LEAF
- db 49, SLAM
- db 0
-
-VictreebelEvosMoves:
-; Evolutions
- db 0
-; Learnset
- db 13, WRAP
- db 15, POISONPOWDER
- db 18, SLEEP_POWDER
- db 0
diff --git a/data/facing.asm b/data/facing.asm
deleted file mode 100644
index 944a31c8..00000000
--- a/data/facing.asm
+++ /dev/null
@@ -1,133 +0,0 @@
-SpriteFacingAndAnimationTable:
- dw SpriteFacingDownAndStanding ; facing down, walk animation frame 0
- dw SpriteFacingDownAndWalking ; facing down, walk animation frame 1
- dw SpriteFacingDownAndStanding ; facing down, walk animation frame 2
- dw SpriteFacingDownAndWalking2 ; facing down, walk animation frame 3
-
- dw SpriteFacingUpAndStanding ; facing up, walk animation frame 0
- dw SpriteFacingUpAndWalking ; facing up, walk animation frame 1
- dw SpriteFacingUpAndStanding ; facing up, walk animation frame 2
- dw SpriteFacingUpAndWalking2 ; facing up, walk animation frame 3
-
- dw SpriteFacingLeftAndStanding ; facing left, walk animation frame 0
- dw SpriteFacingLeftAndWalking ; facing left, walk animation frame 1
- dw SpriteFacingLeftAndStanding ; facing left, walk animation frame 2
- dw SpriteFacingLeftAndWalking ; facing left, walk animation frame 3
-
- dw SpriteFacingRightAndStanding ; facing right, walk animation frame 0
- dw SpriteFacingRightAndWalking ; facing right, walk animation frame 1
- dw SpriteFacingRightAndStanding ; facing right, walk animation frame 2
- dw SpriteFacingRightAndWalking ; facing right, walk animation frame 3
-
- dw SpriteFacingDownAndStanding ; ---
- dw SpriteFacingDownAndStanding ; This table is used for sprites $a and $b.
- dw SpriteFacingDownAndStanding ; All orientation and animation parameters
- dw SpriteFacingDownAndStanding ; lead to the same result. Used for immobile
- dw SpriteFacingDownAndStanding ; sprites like items on the ground
- dw SpriteFacingDownAndStanding ; ---
- dw SpriteFacingDownAndStanding
- dw SpriteFacingDownAndStanding
- dw SpriteFacingDownAndStanding
- dw SpriteFacingDownAndStanding
- dw SpriteFacingDownAndStanding
- dw SpriteFacingDownAndStanding
- dw SpriteFacingDownAndStanding
- dw SpriteFacingDownAndStanding
- dw SpriteFacingDownAndStanding
- dw SpriteFacingDownAndStanding
-; special case
- dw SpriteSpecialCase ; pikachu maybe?
-
-SpriteFacingDownAndStanding:
- db $04
-; Sprite OAM Parameters
- db $00,$00,$00,$00 ; top left
- db $00,$08,$01,$00 ; top right
- db $08,$00,$02,OAMFLAG_CANBEMASKED ; bottom left
- db $08,$08,$03,OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
-
-SpriteFacingDownAndWalking:
- db $04
-; Sprite OAM Parameters
- db $00,$00,$80,$00 ; top left
- db $00,$08,$81,$00 ; top right
- db $08,$00,$82,OAMFLAG_CANBEMASKED ; bottom left
- db $08,$08,$83,OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
-
-SpriteFacingDownAndWalking2:
- db $04
-; Sprite OAM Parameters
- db $00,$08,$80,OAMFLAG_VFLIPPED ; top left
- db $00,$00,$81,OAMFLAG_VFLIPPED ; top right
- db $08,$08,$82,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED ; bottom left
- db $08,$00,$83,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
-
-SpriteFacingUpAndStanding:
- db $04
-; Sprite OAM Parameters
- db $00,$00,$04,$00 ; top left
- db $00,$08,$05,$00 ; top right
- db $08,$00,$06,OAMFLAG_CANBEMASKED ; bottom left
- db $08,$08,$07,OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
-
-SpriteFacingUpAndWalking:
- db $04
-; Sprite OAM Parameters
- db $00,$00,$84,$00 ; top left
- db $00,$08,$85,$00 ; top right
- db $08,$00,$86,OAMFLAG_CANBEMASKED ; bottom left
- db $08,$08,$87,OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
-
-SpriteFacingUpAndWalking2:
- db $04
-; Sprite OAM Parameters
- db $00,$08,$84,OAMFLAG_VFLIPPED ; top left
- db $00,$00,$85,OAMFLAG_VFLIPPED ; top right
- db $08,$08,$86,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED ; bottom left
- db $08,$00,$87,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
-
-SpriteFacingLeftAndStanding:
- db $04
-; Sprite OAM Parameters
- db $00,$00,$08,$00 ; top left
- db $00,$08,$09,$00 ; top right
- db $08,$00,$0a,OAMFLAG_CANBEMASKED ; bottom left
- db $08,$08,$0b,OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
-
-SpriteFacingLeftAndWalking:
- db $04
-; Sprite OAM Parameters
- db $00,$00,$88,$00 ; top left
- db $00,$08,$89,$00 ; top right
- db $08,$00,$8a,OAMFLAG_CANBEMASKED ; bottom left
- db $08,$08,$8b,OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
-
-SpriteFacingRightAndStanding:
- db $04
-; Sprite OAM Parameters
- db $00,$08,$08,OAMFLAG_VFLIPPED ; top left
- db $00,$00,$09,OAMFLAG_VFLIPPED ; top right
- db $08,$08,$0a,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED ; bottom left
- db $08,$00,$0b,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
-
-SpriteFacingRightAndWalking:
- db $04
-; Sprite OAM Parameters
- db $00,$08,$88,OAMFLAG_VFLIPPED ; top left
- db $00,$00,$89,OAMFLAG_VFLIPPED ; top right
- db $08,$08,$8a,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED ; bottom left
- db $08,$00,$8b,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
-
-SpriteSpecialCase
- db $09
-; Sprite OAM Parameters
- db -$4,-$4,$00,$00
- db -$4,$04,$01,$00
- db -$4,$0c,$00,OAMFLAG_VFLIPPED
- db $04,-$4,$01,$00
- db $04,$04,$02,$00
- db $04,$0c,$01,$00
- db $0c,-$4,$00,OAM_VFLIP | OAMFLAG_CANBEMASKED
- db $0c,$04,$01,OAMFLAG_CANBEMASKED
- db $0c,$0c,$00,OAM_VFLIP | OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
-
diff --git a/data/force_bike_surf.asm b/data/force_bike_surf.asm
deleted file mode 100755
index fb352aa9..00000000
--- a/data/force_bike_surf.asm
+++ /dev/null
@@ -1,11 +0,0 @@
-ForcedBikeOrSurfMaps:
-; map id, y, x
- db ROUTE_16,$0A,$11
- db ROUTE_16,$0B,$11
- db ROUTE_18,$08,$21
- db ROUTE_18,$09,$21
- db SEAFOAM_ISLANDS_B3F,$07,$12
- db SEAFOAM_ISLANDS_B3F,$07,$13
- db SEAFOAM_ISLANDS_B4F,$0E,$04
- db SEAFOAM_ISLANDS_B4F,$0E,$05
- db $FF ;end
diff --git a/data/good_rod.asm b/data/good_rod.asm
deleted file mode 100755
index 6c23f402..00000000
--- a/data/good_rod.asm
+++ /dev/null
@@ -1,3 +0,0 @@
-GoodRodMons:
- db 10,GOLDEEN
- db 10,POLIWAG
diff --git a/data/growth_rates.asm b/data/growth_rates.asm
new file mode 100644
index 00000000..32354a64
--- /dev/null
+++ b/data/growth_rates.asm
@@ -0,0 +1,19 @@
+growth_rate: MACRO
+; [1]/[2]*n**3 + [3]*n**2 + [4]*n - [5]
+ dn \1, \2
+ if \3 & $80 ; signed
+ db -\3 | $80
+ else
+ db \3
+ endc
+ db \4, \5
+ENDM
+
+GrowthRateTable:
+; entries correspond to GROWTH_* (see constants/pokemon_data_constants.asm)
+ growth_rate 1, 1, 0, 0, 0 ; Medium Fast
+ growth_rate 3, 4, 10, 0, 30 ; Slightly Fast
+ growth_rate 3, 4, 20, 0, 70 ; Slightly Slow
+ growth_rate 6, 5, -15, 100, 140 ; Medium Slow
+ growth_rate 4, 5, 0, 0, 0 ; Fast
+ growth_rate 5, 4, 0, 0, 0 ; Slow
diff --git a/data/hidden_coins.asm b/data/hidden_coins.asm
deleted file mode 100755
index b7358572..00000000
--- a/data/hidden_coins.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-HiddenCoinCoords:
- db GAME_CORNER,$08,$00
- db GAME_CORNER,$10,$01
- db GAME_CORNER,$0b,$03
- db GAME_CORNER,$0e,$03
- db GAME_CORNER,$0c,$04
- db GAME_CORNER,$0c,$09
- db GAME_CORNER,$0f,$09
- db GAME_CORNER,$0e,$10
- db GAME_CORNER,$10,$0a
- db GAME_CORNER,$07,$0b
- db GAME_CORNER,$08,$0f
- db GAME_CORNER,$0f,$0c
- db $ff
diff --git a/data/hidden_item_coords.asm b/data/hidden_item_coords.asm
deleted file mode 100755
index acc79172..00000000
--- a/data/hidden_item_coords.asm
+++ /dev/null
@@ -1,58 +0,0 @@
-HiddenItemCoords:
-; map ID, then coords
- db SILPH_CO_5F,$03,$0c
- db SILPH_CO_9F,$0f,$02
- db POKEMON_MANSION_3F,$09,$01
- db POKEMON_MANSION_B1F,$09,$01
- db SAFARI_ZONE_WEST,$05,$06
- db CERULEAN_CAVE_2F,$0d,$10
- db CERULEAN_CAVE_B1F,$0e,$08
- db UNUSED_MAP_6F,$0b,$0e
- db SEAFOAM_ISLANDS_B2F,$0f,$0f
- db SEAFOAM_ISLANDS_B3F,$10,$09
- db SEAFOAM_ISLANDS_B4F,$11,$19
- db VIRIDIAN_FOREST,$12,$01
- db VIRIDIAN_FOREST,$2a,$10
- db MT_MOON_B2F,$0c,$12
- db MT_MOON_B2F,$09,$21
- db SS_ANNE_B1F_ROOMS,$01,$03
- db SS_ANNE_KITCHEN,$09,$0d
- db UNDERGROUND_PATH_NORTH_SOUTH,$04,$03
- db UNDERGROUND_PATH_NORTH_SOUTH,$22,$04
- db UNDERGROUND_PATH_WEST_EAST,$02,$0c
- db UNDERGROUND_PATH_WEST_EAST,$05,$15
- db ROCKET_HIDEOUT_B1F,$0f,$15
- db ROCKET_HIDEOUT_B3F,$11,$1b
- db ROCKET_HIDEOUT_B4F,$01,$19
- db ROUTE_10,$11,$09
- db ROUTE_10,$35,$10
- db POWER_PLANT,$10,$11
- db POWER_PLANT,$01,$0c
- db ROUTE_11,$05,$30
- db ROUTE_12,$3f,$02
- db ROUTE_13,$0e,$01
- db ROUTE_13,$0d,$10
- db ROUTE_17,$0e,$0f
- db ROUTE_17,$2d,$08
- db ROUTE_17,$48,$11
- db ROUTE_17,$5b,$04
- db ROUTE_17,$79,$08
- db ROUTE_23,$2c,$09
- db ROUTE_23,$46,$13
- db ROUTE_23,$5a,$08
- db VICTORY_ROAD_2F,$02,$05
- db VICTORY_ROAD_2F,$07,$1a
- db ROUTE_25,$03,$26
- db ROUTE_25,$01,$0a
- db ROUTE_4,$03,$28
- db ROUTE_9,$07,$0e
- db COPYCATS_HOUSE_2F,$01,$01
- db VIRIDIAN_CITY,$04,$0e
- db CERULEAN_CITY,$08,$0f
- db CERULEAN_CAVE_1F,$07,$12
- db POKEMON_TOWER_5F,$0c,$04
- db VERMILION_CITY,$0b,$0e
- db CELADON_CITY,$0f,$30
- db SAFARI_ZONE_GATE,$01,$0a
- db POKEMON_MANSION_1F,$10,$08
- db $ff
diff --git a/data/hidden_objects.asm b/data/hidden_objects.asm
deleted file mode 100755
index f4865bb9..00000000
--- a/data/hidden_objects.asm
+++ /dev/null
@@ -1,545 +0,0 @@
-HiddenObjectMaps:
- dbw SILPH_CO_11F, SilphCo11FHiddenObjects
- dbw SILPH_CO_5F, SilphCo5FHiddenObjects
- dbw SILPH_CO_9F, SilphCo9FHiddenObjects
- dbw POKEMON_MANSION_2F, Mansion2HiddenObjects
- dbw POKEMON_MANSION_3F, Mansion3HiddenObjects
- dbw POKEMON_MANSION_B1F, Mansion4HiddenObjects
- dbw SAFARI_ZONE_WEST, SafariZoneWestHiddenObjects
- dbw CERULEAN_CAVE_2F, CeruleanCave2HiddenObjects
- dbw CERULEAN_CAVE_B1F, CeruleanCave3HiddenObjects
- dbw UNUSED_MAP_6F, UnusedMap6FHiddenObjects
- dbw SEAFOAM_ISLANDS_B2F, SeafoamIslands3HiddenObjects
- dbw SEAFOAM_ISLANDS_B3F, SeafoamIslands4HiddenObjects
- dbw SEAFOAM_ISLANDS_B4F, SeafoamIslands5HiddenObjects
- dbw VIRIDIAN_FOREST, ViridianForestHiddenObjects
- dbw MT_MOON_B2F, MtMoon3HiddenObjects
- dbw SS_ANNE_B1F_ROOMS, SSAnne10HiddenObjects
- dbw SS_ANNE_KITCHEN, SSAnne6HiddenObjects
- dbw UNDERGROUND_PATH_NORTH_SOUTH, UndergroundPathNsHiddenObjects
- dbw UNDERGROUND_PATH_WEST_EAST, UndergroundPathWeHiddenObjects
- dbw ROCKET_HIDEOUT_B1F, RocketHideout1HiddenObjects
- dbw ROCKET_HIDEOUT_B3F, RocketHideout3HiddenObjects
- dbw ROCKET_HIDEOUT_B4F, RocketHideout4HiddenObjects
- dbw ROUTE_10, Route10HiddenObjects
- dbw ROCK_TUNNEL_POKECENTER, RockTunnelPokecenterHiddenObjects
- dbw POWER_PLANT, PowerPlantHiddenObjects
- dbw ROUTE_11, Route11HiddenObjects
- dbw ROUTE_12, Route12HiddenObjects
- dbw ROUTE_13, Route13HiddenObjects
- dbw ROUTE_15_GATE_2F, Route15Gate2FHiddenObjects
- dbw ROUTE_17, Route17HiddenObjects
- dbw ROUTE_23, Route23HiddenObjects
- dbw VICTORY_ROAD_2F, VictoryRoad2HiddenObjects
- dbw ROUTE_25, Route25HiddenObjects
- dbw BILLS_HOUSE, BillsHouseHiddenObjects
- dbw ROUTE_4, Route4HiddenObjects
- dbw MT_MOON_POKECENTER, MtMoonPokecenterHiddenObjects
- dbw ROUTE_9, Route9HiddenObjects
- dbw TRADE_CENTER, TradeCenterHiddenObjects
- dbw COLOSSEUM, ColosseumHiddenObjects
- dbw INDIGO_PLATEAU, IndigoPlateauHiddenObjects
- dbw INDIGO_PLATEAU_LOBBY, IndigoPlateauLobbyHiddenObjects
- dbw COPYCATS_HOUSE_2F, CopycatsHouse2FHiddenObjects
- dbw FIGHTING_DOJO, FightingDojoHiddenObjects
- dbw SAFFRON_GYM, SaffronGymHiddenObjects
- dbw SAFFRON_POKECENTER, SaffronPokecenterHiddenObjects
- dbw REDS_HOUSE_2F, RedsHouse2FHiddenObjects
- dbw BLUES_HOUSE, BluesHouseHiddenObjects
- dbw OAKS_LAB, OaksLabHiddenObjects
- dbw VIRIDIAN_CITY, ViridianCityHiddenObjects
- dbw VIRIDIAN_POKECENTER, ViridianPokecenterHiddenObjects
- dbw VIRIDIAN_SCHOOL_HOUSE, ViridianSchoolHiddenObjects
- dbw VIRIDIAN_GYM, ViridianGymHiddenObjects
- dbw MUSEUM_1F, Museum1FHiddenObjects
- dbw PEWTER_GYM, PewterGymHiddenObjects
- dbw PEWTER_POKECENTER, PewterPokecenterHiddenObjects
- dbw CERULEAN_CITY, CeruleanCityHiddenObjects
- dbw CERULEAN_POKECENTER, CeruleanPokecenterHiddenObjects
- dbw CERULEAN_GYM, CeruleanGymHiddenObjects
- dbw BIKE_SHOP, BikeShopHiddenObjects
- dbw CERULEAN_CAVE_1F, CeruleanCave1HiddenObjects
- dbw LAVENDER_POKECENTER, LavenderPokecenterHiddenObjects
- dbw POKEMON_TOWER_5F, Pokemontower5HiddenObjects
- dbw MR_FUJIS_HOUSE, LavenderHouse1HiddenObjects
- dbw VERMILION_CITY, VermilionCityHiddenObjects
- dbw VERMILION_POKECENTER, VermilionPokecenterHiddenObjects
- dbw POKEMON_FAN_CLUB, PokemonFanClubHiddenObjects
- dbw VERMILION_GYM, VermilionGymHiddenObjects
- dbw CELADON_CITY, CeladonCityHiddenObjects
- dbw CELADON_HOTEL, CeladonHotelHiddenObjects
- dbw CELADON_MANSION_2F, CeladonMansion2HiddenObjects
- dbw CELADON_MANSION_ROOF_HOUSE, CeladonMansion5HiddenObjects
- dbw CELADON_POKECENTER, CeladonPokecenterHiddenObjects
- dbw CELADON_GYM, CeladonGymHiddenObjects
- dbw GAME_CORNER, GameCornerHiddenObjects
- dbw FUCHSIA_POKECENTER, FuchsiaPokecenterHiddenObjects
- dbw SAFARI_ZONE_GATE, SafariZoneEntranceHiddenObjects
- dbw FUCHSIA_GYM, FuchsiaGymHiddenObjects
- dbw POKEMON_MANSION_1F, Mansion1HiddenObjects
- dbw CINNABAR_GYM, CinnabarGymHiddenObjects
- dbw CINNABAR_LAB_FOSSIL_ROOM, CinnabarLab4HiddenObjects
- dbw CINNABAR_POKECENTER, CinnabarPokecenterHiddenObjects
- db $ff
-
-; format: y-coord, x-coord, text id/item id, object routine
-hidden_object: macro
- db \1, \2, \3
- dba \4
- endm
-
-SilphCo11FHiddenObjects:
- hidden_object 12, 10, SPRITE_FACING_UP, OpenPokemonCenterPC
- db $ff
-
-SilphCo5FHiddenObjects:
- hidden_object 3, 12, ELIXER, HiddenItems
- db $ff
-
-SilphCo9FHiddenObjects:
- hidden_object 15, 2, MAX_POTION, HiddenItems
- db $ff
-
-Mansion2HiddenObjects:
- hidden_object 11, 2, SPRITE_FACING_UP, Mansion2Script_Switches
- db $ff
-
-Mansion3HiddenObjects:
- hidden_object 9, 1, MAX_REVIVE, HiddenItems
- hidden_object 5, 10, SPRITE_FACING_UP, Mansion3Script_Switches
- db $ff
-
-Mansion4HiddenObjects:
- hidden_object 9, 1, RARE_CANDY, HiddenItems
- hidden_object 3, 20, SPRITE_FACING_UP, Mansion4Script_Switches
- hidden_object 25, 18, SPRITE_FACING_UP, Mansion4Script_Switches
- db $ff
-
-SafariZoneWestHiddenObjects:
- hidden_object 5, 6, REVIVE, HiddenItems
- db $ff
-
-CeruleanCave2HiddenObjects:
- hidden_object 13, 16, PP_UP, HiddenItems
- db $ff
-
-CeruleanCave3HiddenObjects:
- hidden_object 14, 8, PP_UP, HiddenItems
- db $ff
-
-UnusedMap6FHiddenObjects:
- hidden_object 11, 14, MAX_ELIXER, HiddenItems
- db $ff
-
-SeafoamIslands3HiddenObjects:
- hidden_object 15, 15, NUGGET, HiddenItems
- db $ff
-
-SeafoamIslands4HiddenObjects:
- hidden_object 16, 9, MAX_ELIXER, HiddenItems
- db $ff
-
-SeafoamIslands5HiddenObjects:
- hidden_object 17, 25, ULTRA_BALL, HiddenItems
- db $ff
-
-ViridianForestHiddenObjects:
- hidden_object 18, 1, POTION, HiddenItems
- hidden_object 42, 16, ANTIDOTE, HiddenItems
- db $ff
-
-MtMoon3HiddenObjects:
- hidden_object 12, 18, MOON_STONE, HiddenItems
- hidden_object 9, 33, ETHER, HiddenItems
- db $ff
-
-SSAnne10HiddenObjects:
- hidden_object 1, 3, HYPER_POTION, HiddenItems
- db $ff
-
-SSAnne6HiddenObjects:
- hidden_object 5, 13, SPRITE_FACING_DOWN, PrintTrashText
- hidden_object 7, 13, SPRITE_FACING_DOWN, PrintTrashText
- hidden_object 9, 13, GREAT_BALL, HiddenItems
- db $ff
-
-UndergroundPathNsHiddenObjects:
- hidden_object 4, 3, FULL_RESTORE, HiddenItems
- hidden_object 34, 4, X_SPECIAL, HiddenItems
- db $ff
-
-UndergroundPathWeHiddenObjects:
- hidden_object 2, 12, NUGGET, HiddenItems
- hidden_object 5, 21, ELIXER, HiddenItems
- db $ff
-
-RocketHideout1HiddenObjects:
- hidden_object 15, 21, PP_UP, HiddenItems
- db $ff
-
-RocketHideout3HiddenObjects:
- hidden_object 17, 27, NUGGET, HiddenItems
- db $ff
-
-RocketHideout4HiddenObjects:
- hidden_object 1, 25, SUPER_POTION, HiddenItems
- db $ff
-
-Route10HiddenObjects:
- hidden_object 17, 9, SUPER_POTION, HiddenItems
- hidden_object 53, 16, MAX_ETHER, HiddenItems
- db $ff
-
-RockTunnelPokecenterHiddenObjects:
- hidden_object 4, 0, SPRITE_FACING_LEFT, PrintBenchGuyText
- hidden_object 3, 13, SPRITE_FACING_UP, OpenPokemonCenterPC
- db $ff
-
-PowerPlantHiddenObjects:
- hidden_object 16, 17, MAX_ELIXER, HiddenItems
- hidden_object 1, 12, PP_UP, HiddenItems
- db $ff
-
-Route11HiddenObjects:
- hidden_object 5, 48, ESCAPE_ROPE, HiddenItems
- db $ff
-
-Route12HiddenObjects:
- hidden_object 63, 2, HYPER_POTION, HiddenItems
- db $ff
-
-Route13HiddenObjects:
- hidden_object 14, 1, PP_UP, HiddenItems
- hidden_object 13, 16, CALCIUM, HiddenItems
- db $ff
-
-Route15Gate2FHiddenObjects:
- hidden_object 2, 1, SPRITE_FACING_UP, Route15GateLeftBinoculars
- db $ff
-
-Route17HiddenObjects:
- hidden_object 14, 15, RARE_CANDY, HiddenItems
- hidden_object 45, 8, FULL_RESTORE, HiddenItems
- hidden_object 72, 17, PP_UP, HiddenItems
- hidden_object 91, 4, MAX_REVIVE, HiddenItems
- hidden_object 121, 8, MAX_ELIXER, HiddenItems
- db $ff
-
-Route23HiddenObjects:
- hidden_object 44, 9, FULL_RESTORE, HiddenItems
- hidden_object 70, 19, ULTRA_BALL, HiddenItems
- hidden_object 90, 8, MAX_ETHER, HiddenItems
- db $ff
-
-VictoryRoad2HiddenObjects:
- hidden_object 2, 5, ULTRA_BALL, HiddenItems
- hidden_object 7, 26, FULL_RESTORE, HiddenItems
- db $ff
-
-Route25HiddenObjects:
- hidden_object 3, 38, ETHER, HiddenItems
- hidden_object 1, 10, ELIXER, HiddenItems
- db $ff
-
-BillsHouseHiddenObjects:
- hidden_object 4, 1, SPRITE_FACING_UP, BillsHousePC
- db $ff
-
-Route4HiddenObjects:
- hidden_object 3, 40, GREAT_BALL, HiddenItems
- db $ff
-
-MtMoonPokecenterHiddenObjects:
- hidden_object 4, 0, SPRITE_FACING_LEFT, PrintBenchGuyText
- hidden_object 3, 13, SPRITE_FACING_UP, OpenPokemonCenterPC
- db $ff
-
-Route9HiddenObjects:
- hidden_object 7, 14, ETHER, HiddenItems
- db $ff
-
-TradeCenterHiddenObjects:
- hidden_object 4, 5, $d0, CableClubRightGameboy
- hidden_object 4, 4, $d0, CableClubLeftGameboy
- db $ff
-
-ColosseumHiddenObjects:
- hidden_object 4, 5, $d0, CableClubRightGameboy
- hidden_object 4, 4, $d0, CableClubLeftGameboy
- db $ff
-
-IndigoPlateauHiddenObjects:
- hidden_object 13, 8, $ff, PrintIndigoPlateauHQText
- hidden_object 13, 11, SPRITE_FACING_DOWN, PrintIndigoPlateauHQText
- db $ff
-
-IndigoPlateauLobbyHiddenObjects:
- hidden_object 7, 15, SPRITE_FACING_UP, OpenPokemonCenterPC
- db $ff
-
-CopycatsHouse2FHiddenObjects:
- hidden_object 1, 1, NUGGET, HiddenItems
- db $ff
-
-FightingDojoHiddenObjects:
- hidden_object 9, 3, SPRITE_FACING_UP, PrintFightingDojoText
- hidden_object 9, 6, SPRITE_FACING_UP, PrintFightingDojoText
- hidden_object 0, 4, SPRITE_FACING_UP, PrintFightingDojoText2
- hidden_object 0, 5, SPRITE_FACING_UP, PrintFightingDojoText3
- db $ff
-
-SaffronGymHiddenObjects:
- hidden_object 15, 9, SPRITE_FACING_UP, GymStatues
- db $ff
-
-SaffronPokecenterHiddenObjects:
- hidden_object 4, 0, SPRITE_FACING_UP, PrintBenchGuyText
- hidden_object 3, 13, SPRITE_FACING_UP, OpenPokemonCenterPC
- db $ff
-
-RedsHouse2FHiddenObjects:
- hidden_object 1, 0, SPRITE_FACING_UP, OpenRedsPC
- hidden_object 5, 3, $d0, PrintRedSNESText
- db $ff
-
-BluesHouseHiddenObjects:
- hidden_object 1, 0, SPRITE_FACING_UP, PrintBookcaseText
- hidden_object 1, 1, SPRITE_FACING_UP, PrintBookcaseText
- hidden_object 1, 7, SPRITE_FACING_UP, PrintBookcaseText
- db $ff
-
-OaksLabHiddenObjects:
- hidden_object 0, 4, SPRITE_FACING_UP, DisplayOakLabLeftPoster
- hidden_object 0, 5, SPRITE_FACING_UP, DisplayOakLabRightPoster
- hidden_object 1, 0, SPRITE_FACING_UP, DisplayOakLabEmailText
- hidden_object 1, 1, SPRITE_FACING_UP, DisplayOakLabEmailText
- db $ff
-
-ViridianCityHiddenObjects:
- hidden_object 4, 14, POTION, HiddenItems
- db $ff
-
-ViridianPokecenterHiddenObjects:
- hidden_object 4, 0, SPRITE_FACING_LEFT, PrintBenchGuyText
- hidden_object 3, 13, SPRITE_FACING_UP, OpenPokemonCenterPC
- db $ff
-
-ViridianSchoolHiddenObjects:
- hidden_object 4, 3, (ViridianSchoolNotebook_id - TextPredefs) / 2 + 1, PrintNotebookText
- hidden_object 0, 3, (ViridianSchoolBlackboard_id - TextPredefs) / 2 + 1, PrintBlackboardLinkCableText
- db $ff
-
-ViridianGymHiddenObjects:
- hidden_object 15, 15, SPRITE_FACING_UP, GymStatues
- hidden_object 15, 18, SPRITE_FACING_UP, GymStatues
- db $ff
-
-Museum1FHiddenObjects:
- hidden_object 3, 2, SPRITE_FACING_UP, AerodactylFossil
- hidden_object 6, 2, SPRITE_FACING_UP, KabutopsFossil
- db $ff
-
-PewterGymHiddenObjects:
- hidden_object 10, 3, SPRITE_FACING_UP, GymStatues
- hidden_object 10, 6, SPRITE_FACING_UP, GymStatues
- db $ff
-
-PewterPokecenterHiddenObjects:
- hidden_object 4, 0, SPRITE_FACING_LEFT, PrintBenchGuyText
- hidden_object 3, 13, SPRITE_FACING_UP, OpenPokemonCenterPC
- db $ff
-
-CeruleanCityHiddenObjects:
- hidden_object 8, 15, RARE_CANDY, HiddenItems
- db $ff
-
-CeruleanPokecenterHiddenObjects:
- hidden_object 4, 0, SPRITE_FACING_LEFT, PrintBenchGuyText
- hidden_object 3, 13, SPRITE_FACING_UP, OpenPokemonCenterPC
- db $ff
-
-CeruleanGymHiddenObjects:
- hidden_object 11, 3, SPRITE_FACING_UP, GymStatues
- hidden_object 11, 6, SPRITE_FACING_UP, GymStatues
- db $ff
-
-BikeShopHiddenObjects:
- hidden_object 0, 1, $d0, PrintNewBikeText
- hidden_object 1, 2, $d0, PrintNewBikeText
- hidden_object 2, 1, $d0, PrintNewBikeText
- hidden_object 2, 3, $d0, PrintNewBikeText
- hidden_object 4, 0, $d0, PrintNewBikeText
- hidden_object 5, 1, $d0, PrintNewBikeText
- db $ff
-
-CeruleanCave1HiddenObjects:
- hidden_object 7, 18, PP_UP, HiddenItems
- db $ff
-
-LavenderPokecenterHiddenObjects:
- hidden_object 4, 0, SPRITE_FACING_LEFT, PrintBenchGuyText
- hidden_object 3, 13, SPRITE_FACING_UP, OpenPokemonCenterPC
- db $ff
-
-Pokemontower5HiddenObjects:
- hidden_object 12, 4, ELIXER, HiddenItems
- db $ff
-
-LavenderHouse1HiddenObjects:
- hidden_object 1, 0, SPRITE_FACING_DOWN, PrintMagazinesText
- hidden_object 1, 1, SPRITE_FACING_DOWN, PrintMagazinesText
- hidden_object 1, 7, SPRITE_FACING_DOWN, PrintMagazinesText
- db $ff
-
-VermilionCityHiddenObjects:
- hidden_object 11, 14, MAX_ETHER, HiddenItems
- db $ff
-
-VermilionPokecenterHiddenObjects:
- hidden_object 3, 13, SPRITE_FACING_UP, OpenPokemonCenterPC
- hidden_object 4, 0, SPRITE_FACING_UP, PrintBenchGuyText
- db $ff
-
-PokemonFanClubHiddenObjects:
- hidden_object 0, 1, SPRITE_FACING_UP, FanClubPicture1
- hidden_object 0, 6, SPRITE_FACING_UP, FanClubPicture2
- db $ff
-
-VermilionGymHiddenObjects:
- hidden_object 14, 3, SPRITE_FACING_UP, GymStatues
- hidden_object 14, 6, SPRITE_FACING_UP, GymStatues
- hidden_object 1, 6, SPRITE_FACING_DOWN, PrintTrashText
- hidden_object 7, 1, 0, GymTrashScript
- hidden_object 9, 1, 1, GymTrashScript
- hidden_object 11, 1, 2, GymTrashScript
- hidden_object 7, 3, 3, GymTrashScript
- hidden_object 9, 3, 4, GymTrashScript
- hidden_object 11, 3, 5, GymTrashScript
- hidden_object 7, 5, 6, GymTrashScript
- hidden_object 9, 5, 7, GymTrashScript
- hidden_object 11, 5, 8, GymTrashScript
- hidden_object 7, 7, 9, GymTrashScript
- hidden_object 9, 7, 10, GymTrashScript
- hidden_object 11, 7, 11, GymTrashScript
- hidden_object 7, 9, 12, GymTrashScript
- hidden_object 9, 9, 13, GymTrashScript
- hidden_object 11, 9, 14, GymTrashScript
- db $ff
-
-CeladonCityHiddenObjects:
- hidden_object 15, 48, PP_UP, HiddenItems
- db $ff
-
-CeladonHotelHiddenObjects:
- hidden_object 4, 0, SPRITE_FACING_LEFT, PrintBenchGuyText
- db $ff
-
-CeladonMansion2HiddenObjects:
- hidden_object 5, 0, SPRITE_FACING_UP, OpenPokemonCenterPC
- db $ff
-
-CeladonMansion5HiddenObjects:
- hidden_object 0, 3, (LinkCableHelp_id - TextPredefs) / 2 + 1, PrintBlackboardLinkCableText
- hidden_object 0, 4, (LinkCableHelp_id - TextPredefs) / 2 + 1, PrintBlackboardLinkCableText
- hidden_object 4, 3, (TMNotebook_id - TextPredefs) / 2 + 1, PrintNotebookText
- db $ff
-
-CeladonPokecenterHiddenObjects:
- hidden_object 4, 0, SPRITE_FACING_LEFT, PrintBenchGuyText
- hidden_object 3, 13, SPRITE_FACING_UP, OpenPokemonCenterPC
- db $ff
-
-CeladonGymHiddenObjects:
- hidden_object 15, 3, SPRITE_FACING_UP, GymStatues
- hidden_object 15, 6, SPRITE_FACING_UP, GymStatues
- db $ff
-
-GameCornerHiddenObjects:
- hidden_object 15, 18, $d0, StartSlotMachine
- hidden_object 14, 18, $d0, StartSlotMachine
- hidden_object 13, 18, $d0, StartSlotMachine
- hidden_object 12, 18, $d0, StartSlotMachine
- hidden_object 11, 18, $d0, StartSlotMachine
- hidden_object 10, 18, $ff, StartSlotMachine ; "Someone's Keys"
- hidden_object 10, 13, $d0, StartSlotMachine
- hidden_object 11, 13, $d0, StartSlotMachine
- hidden_object 12, 13, $fe, StartSlotMachine ; "Out To Lunch"
- hidden_object 13, 13, $d0, StartSlotMachine
- hidden_object 14, 13, $d0, StartSlotMachine
- hidden_object 15, 13, $d0, StartSlotMachine
- hidden_object 15, 12, $d0, StartSlotMachine
- hidden_object 14, 12, $d0, StartSlotMachine
- hidden_object 13, 12, $d0, StartSlotMachine
- hidden_object 12, 12, $d0, StartSlotMachine
- hidden_object 11, 12, $d0, StartSlotMachine
- hidden_object 10, 12, $d0, StartSlotMachine
- hidden_object 10, 7, $d0, StartSlotMachine
- hidden_object 11, 7, $d0, StartSlotMachine
- hidden_object 12, 7, $d0, StartSlotMachine
- hidden_object 13, 7, $d0, StartSlotMachine
- hidden_object 14, 7, $d0, StartSlotMachine
- hidden_object 15, 7, $d0, StartSlotMachine
- hidden_object 15, 6, $d0, StartSlotMachine
- hidden_object 14, 6, $d0, StartSlotMachine
- hidden_object 13, 6, $d0, StartSlotMachine
- hidden_object 12, 6, $fd, StartSlotMachine ; "Out Of Order"
- hidden_object 11, 6, $d0, StartSlotMachine
- hidden_object 10, 6, $d0, StartSlotMachine
- hidden_object 10, 1, $d0, StartSlotMachine
- hidden_object 11, 1, $d0, StartSlotMachine
- hidden_object 12, 1, $d0, StartSlotMachine
- hidden_object 13, 1, $d0, StartSlotMachine
- hidden_object 14, 1, $d0, StartSlotMachine
- hidden_object 15, 1, $d0, StartSlotMachine
- hidden_object 8, 0, COIN + 10, HiddenCoins
- hidden_object 16, 1, COIN + 10, HiddenCoins
- hidden_object 11, 3, COIN + 20, HiddenCoins
- hidden_object 14, 3, COIN + 10, HiddenCoins
- hidden_object 12, 4, COIN + 10, HiddenCoins
- hidden_object 12, 9, COIN + 20, HiddenCoins
- hidden_object 15, 9, COIN + 10, HiddenCoins
- hidden_object 14, 16, COIN + 10, HiddenCoins
- hidden_object 16, 10, COIN + 10, HiddenCoins
- hidden_object 7, 11, COIN + 40, HiddenCoins
- hidden_object 8, 15, COIN + 100, HiddenCoins
- hidden_object 15, 12, COIN + 10, HiddenCoins
- db $ff
-
-FuchsiaPokecenterHiddenObjects:
- hidden_object 3, 13, SPRITE_FACING_UP, OpenPokemonCenterPC
- hidden_object 4, 0, SPRITE_FACING_UP, PrintBenchGuyText
- db $ff
-
-SafariZoneEntranceHiddenObjects:
- hidden_object 1, 10, NUGGET, HiddenItems
- db $ff
-
-FuchsiaGymHiddenObjects:
- hidden_object 15, 3, SPRITE_FACING_UP, GymStatues
- hidden_object 15, 6, SPRITE_FACING_UP, GymStatues
- db $ff
-
-Mansion1HiddenObjects:
- hidden_object 16, 8, MOON_STONE, HiddenItems
- hidden_object 5, 2, SPRITE_FACING_UP, Mansion1Script_Switches
- db $ff
-
-CinnabarGymHiddenObjects:
- hidden_object 13, 17, SPRITE_FACING_UP, GymStatues
- hidden_object 7, 15, (0 << 4) | 1, PrintCinnabarQuiz
- hidden_object 1, 10, (1 << 4) | 2, PrintCinnabarQuiz
- hidden_object 7, 9, (1 << 4) | 3, PrintCinnabarQuiz
- hidden_object 13, 9, (1 << 4) | 4, PrintCinnabarQuiz
- hidden_object 13, 1, (0 << 4) | 5, PrintCinnabarQuiz
- hidden_object 7, 1, (1 << 4) | 6, PrintCinnabarQuiz
- db $ff
-
-CinnabarLab4HiddenObjects:
- hidden_object 4, 0, SPRITE_FACING_UP, OpenPokemonCenterPC
- hidden_object 4, 2, SPRITE_FACING_UP, OpenPokemonCenterPC
- db $ff
-
-CinnabarPokecenterHiddenObjects:
- hidden_object 4, 0, SPRITE_FACING_UP, PrintBenchGuyText
- hidden_object 3, 13, SPRITE_FACING_UP, OpenPokemonCenterPC
- db $ff
diff --git a/data/hide_show_data.asm b/data/hide_show_data.asm
deleted file mode 100755
index df9e5e8f..00000000
--- a/data/hide_show_data.asm
+++ /dev/null
@@ -1,593 +0,0 @@
-; data for default hidden/shown
-; objects for each map ($00-$F8)
-
-; Table of 2-Byte pointers, one pointer per map,
-; goes up to Map_F7, ends with $FFFF.
-; points to table listing all missable object in the area
-MapHSPointers:
- dw MapHS00
- dw MapHS01
- dw MapHS02
- dw MapHS03
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS0A
- dw MapHSXX
- dw MapHSXX
- dw MapHS0D
- dw MapHSXX
- dw MapHS0F
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS14
- dw MapHSXX
- dw MapHSXX
- dw MapHS17
- dw MapHSXX
- dw MapHSXX
- dw MapHS1A
- dw MapHS1B
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS21
- dw MapHSXX
- dw MapHS23
- dw MapHS24
- dw MapHSXX
- dw MapHSXX
- dw MapHS27
- dw MapHS28
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS2D
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS33
- dw MapHS34
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS3B
- dw MapHSXX
- dw MapHS3D
- dw MapHSXX
- dw MapHS3F
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS53
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS58
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS60
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS66
- dw MapHS67
- dw MapHS68
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS6C
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS78
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS84
- dw MapHSXX
- dw MapHSXX
- dw MapHS87
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS8F
- dw MapHS90
- dw MapHS91
- dw MapHS92
- dw MapHS93
- dw MapHS94
- dw MapHS95
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS9B
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHS9F
- dw MapHSA0
- dw MapHSA1
- dw MapHSA2
- dw MapHSXX
- dw MapHSXX
- dw MapHSA5
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSB1
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSB5
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSC0
- dw MapHSXX
- dw MapHSC2
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSC6
- dw MapHSC7
- dw MapHSC8
- dw MapHSC9
- dw MapHSCA
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSCF
- dw MapHSD0
- dw MapHSD1
- dw MapHSD2
- dw MapHSD3
- dw MapHSD4
- dw MapHSD5
- dw MapHSD6
- dw MapHSD7
- dw MapHSD8
- dw MapHSD9
- dw MapHSDA
- dw MapHSDB
- dw MapHSDC
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSE2
- dw MapHSE3
- dw MapHSE4
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSE9
- dw MapHSEA
- dw MapHSEB
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSF4
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX
- dw MapHSXX ; beach house
- dw $FFFF
-
-; Structure:
-; 3 bytes per object
-; [Map_ID][Object_ID][H/S]
-;
-; Program stops reading when either:
-; a) Map_ID = $FF
-; b) Map_ID ≠ currentMapID
-;
-; This Data is loaded into RAM at wd5ce-$D5F?. (wMissableObjectList)
-
-; These constants come from the bytes for Predef functions:
-Hide EQU $11 ; (HideObjectPredef - PredefPointers) / 3
-Show EQU $15 ; (ShowObjectPredef - PredefPointers) / 3
-
-MapHSXX:
- db $FF,$FF,$FF
-MapHS00:
- db PALLET_TOWN,$01,Hide
-MapHS01:
- db VIRIDIAN_CITY,$05,Show
- db VIRIDIAN_CITY,$07,Hide
- db VIRIDIAN_CITY,$08,Hide
-MapHS02:
- db PEWTER_CITY,$03,Show
- db PEWTER_CITY,$05,Show
-MapHS03:
- db CERULEAN_CITY,$01,Hide
- db CERULEAN_CITY,$02,Show
- db CERULEAN_CITY,$06,Hide
- db CERULEAN_CITY,$0A,Show
- db CERULEAN_CITY,$0B,Show
-MapHS0A:
- db SAFFRON_CITY,$01,Show
- db SAFFRON_CITY,$02,Show
- db SAFFRON_CITY,$03,Show
- db SAFFRON_CITY,$04,Show
- db SAFFRON_CITY,$05,Show
- db SAFFRON_CITY,$06,Show
- db SAFFRON_CITY,$07,Show
- db SAFFRON_CITY,$08,Hide
- db SAFFRON_CITY,$09,Hide
- db SAFFRON_CITY,$0A,Hide
- db SAFFRON_CITY,$0B,Hide
- db SAFFRON_CITY,$0C,Hide
- db SAFFRON_CITY,$0D,Hide
- db SAFFRON_CITY,$0E,Show
- db SAFFRON_CITY,$0F,Hide
-MapHS0D:
- db ROUTE_2,$01,Show
- db ROUTE_2,$02,Show
-MapHS0F:
- db ROUTE_4,$03,Show
-MapHS14:
- db ROUTE_9,$0A,Show
-MapHS17:
- db ROUTE_12,$01,Show
- db ROUTE_12,$09,Show
- db ROUTE_12,$0A,Show
-MapHS1A:
- db ROUTE_15,$0B,Show
-MapHS1B:
- db ROUTE_16,$07,Show
-MapHS21:
- db ROUTE_22,$01,Hide
- db ROUTE_22,$02,Hide
-MapHS23:
- db ROUTE_24,$01,Show
- db ROUTE_24,$08,Show
-MapHS24:
- db ROUTE_25,$0A,Show
-MapHS27:
- db BLUES_HOUSE,$01,Show
- db BLUES_HOUSE,$02,Hide
- db BLUES_HOUSE,$03,Show
-MapHS28:
- db OAKS_LAB,$01,Show
- db OAKS_LAB,$02,Show
- db OAKS_LAB,$03,Hide
- db OAKS_LAB,$04,Show
- db OAKS_LAB,$05,Show
- db OAKS_LAB,$06,Hide
-MapHS2D:
- db VIRIDIAN_GYM,$01,Show
- db VIRIDIAN_GYM,$0B,Show
-MapHS34:
- db MUSEUM_1F,$05,Show
-MapHS3F: ; bulbasaur adoption house
- db CERULEAN_TRADE_HOUSE,$02,Show
-MapHSE4:
- db CERULEAN_CAVE_1F,$01,Show
- db CERULEAN_CAVE_1F,$02,Show
- db CERULEAN_CAVE_1F,$03,Show
- db CERULEAN_CAVE_1F,$04,Show
-MapHS8F:
- db POKEMON_TOWER_2F,$01,Show
-MapHS90:
- db POKEMON_TOWER_3F,$04,Show
-MapHS91:
- db POKEMON_TOWER_4F,$04,Show
- db POKEMON_TOWER_4F,$05,Show
- db POKEMON_TOWER_4F,$06,Show
-MapHS92:
- db POKEMON_TOWER_5F,$06,Show
-MapHS93:
- db POKEMON_TOWER_6F,$04,Show
- db POKEMON_TOWER_6F,$05,Show
-MapHS94:
- db POKEMON_TOWER_7F,$01,Hide ; jessie & james?
- db POKEMON_TOWER_7F,$02,Hide
- db POKEMON_TOWER_7F,$03,Show
-MapHS95:
- db MR_FUJIS_HOUSE,$05,Hide
-MapHS84:
- db CELADON_MANSION_ROOF_HOUSE,$02,Show
-MapHS87:
- db GAME_CORNER,$0B,Show
-MapHS9B:
- db WARDENS_HOUSE,$02,Show
-MapHSA5:
- db POKEMON_MANSION_1F,$02,Show
- db POKEMON_MANSION_1F,$03,Show
-MapHSB1:
- db FIGHTING_DOJO,$06,Show
- db FIGHTING_DOJO,$07,Show
-MapHSB5:
- db SILPH_CO_1F,$01,Hide
-MapHS53:
- db POWER_PLANT,$01,Show
- db POWER_PLANT,$02,Show
- db POWER_PLANT,$03,Show
- db POWER_PLANT,$04,Show
- db POWER_PLANT,$05,Show
- db POWER_PLANT,$06,Show
- db POWER_PLANT,$07,Show
- db POWER_PLANT,$08,Show
- db POWER_PLANT,$09,Show
- db POWER_PLANT,$0A,Show
- db POWER_PLANT,$0B,Show
- db POWER_PLANT,$0C,Show
- db POWER_PLANT,$0D,Show
- db POWER_PLANT,$0E,Show
-MapHSC2:
- db VICTORY_ROAD_2F,$06,Show
- db VICTORY_ROAD_2F,$07,Show
- db VICTORY_ROAD_2F,$08,Show
- db VICTORY_ROAD_2F,$09,Show
- db VICTORY_ROAD_2F,$0A,Show
- db VICTORY_ROAD_2F,$0D,Show
-MapHS58:
- db BILLS_HOUSE,$01,Show
- db BILLS_HOUSE,$02,Hide
- db BILLS_HOUSE,$03,Hide
-MapHS33:
- db VIRIDIAN_FOREST,$07,Show
- db VIRIDIAN_FOREST,$08,Show
- db VIRIDIAN_FOREST,$09,Show
-MapHS3B:
- db MT_MOON_1F,$08,Show
- db MT_MOON_1F,$09,Show
- db MT_MOON_1F,$0A,Show
- db MT_MOON_1F,$0B,Show
- db MT_MOON_1F,$0C,Show
- db MT_MOON_1F,$0D,Show
-MapHS3D:
- db MT_MOON_B2F,$02,Hide
- db MT_MOON_B2F,$06,Hide
- db MT_MOON_B2F,$07,Show
- db MT_MOON_B2F,$08,Show
- db MT_MOON_B2F,$09,Show
- db MT_MOON_B2F,$0A,Show
-MapHS60:
- db SS_ANNE_2F,$02,Hide
-MapHS66:
- db SS_ANNE_1F_ROOMS,$0A,Show
-MapHS67:
- db SS_ANNE_2F_ROOMS,$06,Show
- db SS_ANNE_2F_ROOMS,$09,Show
-MapHS68:
- db SS_ANNE_B1F_ROOMS,$09,Show
- db SS_ANNE_B1F_ROOMS,$0A,Show
- db SS_ANNE_B1F_ROOMS,$0B,Show
-MapHSC6:
- db VICTORY_ROAD_3F,$05,Show
- db VICTORY_ROAD_3F,$06,Show
- db VICTORY_ROAD_3F,$0A,Show
-MapHSC7:
- db ROCKET_HIDEOUT_B1F,$06,Show
- db ROCKET_HIDEOUT_B1F,$07,Show
-MapHSC8:
- db ROCKET_HIDEOUT_B2F,$02,Show
- db ROCKET_HIDEOUT_B2F,$03,Show
- db ROCKET_HIDEOUT_B2F,$04,Show
- db ROCKET_HIDEOUT_B2F,$05,Show
-MapHSC9:
- db ROCKET_HIDEOUT_B3F,$03,Show
- db ROCKET_HIDEOUT_B3F,$04,Show
-MapHSCA:
- db ROCKET_HIDEOUT_B4F,$01,Show
- db ROCKET_HIDEOUT_B4F,$02,Hide
- db ROCKET_HIDEOUT_B4F,$03,Hide
- db ROCKET_HIDEOUT_B4F,$05,Show
- db ROCKET_HIDEOUT_B4F,$06,Show
- db ROCKET_HIDEOUT_B4F,$07,Show
- db ROCKET_HIDEOUT_B4F,$08,Hide
- db ROCKET_HIDEOUT_B4F,$09,Hide
-MapHSCF:
- db SILPH_CO_2F,$01,Show
- db SILPH_CO_2F,$02,Show
- db SILPH_CO_2F,$03,Show
- db SILPH_CO_2F,$04,Show
- db SILPH_CO_2F,$05,Show
-MapHSD0:
- db SILPH_CO_3F,$02,Show
- db SILPH_CO_3F,$03,Show
- db SILPH_CO_3F,$04,Show
-MapHSD1:
- db SILPH_CO_4F,$02,Show
- db SILPH_CO_4F,$03,Show
- db SILPH_CO_4F,$04,Show
- db SILPH_CO_4F,$05,Show
- db SILPH_CO_4F,$06,Show
- db SILPH_CO_4F,$07,Show
-MapHSD2:
- db SILPH_CO_5F,$02,Show
- db SILPH_CO_5F,$03,Show
- db SILPH_CO_5F,$04,Show
- db SILPH_CO_5F,$05,Show
- db SILPH_CO_5F,$06,Show
- db SILPH_CO_5F,$07,Show
- db SILPH_CO_5F,$08,Show
-MapHSD3:
- db SILPH_CO_6F,$06,Show
- db SILPH_CO_6F,$07,Show
- db SILPH_CO_6F,$08,Show
- db SILPH_CO_6F,$09,Show
- db SILPH_CO_6F,$0A,Show
-MapHSD4:
- db SILPH_CO_7F,$05,Show
- db SILPH_CO_7F,$06,Show
- db SILPH_CO_7F,$07,Show
- db SILPH_CO_7F,$08,Show
- db SILPH_CO_7F,$09,Show
- db SILPH_CO_7F,$0A,Show
- db SILPH_CO_7F,$0B,Show
- db SILPH_CO_7F,$0C,Show
-MapHSD5:
- db SILPH_CO_8F,$02,Show
- db SILPH_CO_8F,$03,Show
- db SILPH_CO_8F,$04,Show
-MapHSE9:
- db SILPH_CO_9F,$02,Show
- db SILPH_CO_9F,$03,Show
- db SILPH_CO_9F,$04,Show
-MapHSEA:
- db SILPH_CO_10F,$01,Show
- db SILPH_CO_10F,$02,Show
- db SILPH_CO_10F,$03,Show
- db SILPH_CO_10F,$04,Show
- db SILPH_CO_10F,$05,Show
- db SILPH_CO_10F,$06,Show
-MapHSEB:
- db SILPH_CO_11F,$03,Show
- db SILPH_CO_11F,$04,Show
- db SILPH_CO_11F,$05,Show
- db SILPH_CO_11F,$06,Show
-MapHSF4:
- db UNUSED_MAP_F4,$02,Show
-MapHSD6:
- db POKEMON_MANSION_2F,$02,Show
-MapHSD7:
- db POKEMON_MANSION_3F,$03,Show
- db POKEMON_MANSION_3F,$04,Show
-MapHSD8:
- db POKEMON_MANSION_B1F,$03,Show
- db POKEMON_MANSION_B1F,$04,Show
- db POKEMON_MANSION_B1F,$05,Show
- db POKEMON_MANSION_B1F,$06,Show
- db POKEMON_MANSION_B1F,$08,Show
-MapHSD9:
- db SAFARI_ZONE_EAST,$01,Show
- db SAFARI_ZONE_EAST,$02,Show
- db SAFARI_ZONE_EAST,$03,Show
- db SAFARI_ZONE_EAST,$04,Show
-MapHSDA:
- db SAFARI_ZONE_NORTH,$01,Show
- db SAFARI_ZONE_NORTH,$02,Show
-MapHSDB:
- db SAFARI_ZONE_WEST,$01,Show
- db SAFARI_ZONE_WEST,$02,Show
- db SAFARI_ZONE_WEST,$03,Show
- db SAFARI_ZONE_WEST,$04,Show
-MapHSDC:
- db SAFARI_ZONE_CENTER,$01,Show
-MapHSE2:
- db CERULEAN_CAVE_2F,$01,Show
- db CERULEAN_CAVE_2F,$02,Show
- db CERULEAN_CAVE_2F,$03,Show
- db CERULEAN_CAVE_2F,$04,Show
-MapHSE3:
- db CERULEAN_CAVE_B1F,$01,Show
- db CERULEAN_CAVE_B1F,$02,Show
- db CERULEAN_CAVE_B1F,$03,Show
- db CERULEAN_CAVE_B1F,$04,Show
- db CERULEAN_CAVE_B1F,$05,Show
-MapHS6C:
- db VICTORY_ROAD_1F,$03,Show
- db VICTORY_ROAD_1F,$04,Show
-MapHS78:
- db CHAMPIONS_ROOM,$02,Hide
-MapHSC0:
- db SEAFOAM_ISLANDS_1F,$01,Show
- db SEAFOAM_ISLANDS_1F,$02,Show
-MapHS9F:
- db SEAFOAM_ISLANDS_B1F,$01,Hide
- db SEAFOAM_ISLANDS_B1F,$02,Hide
-MapHSA0:
- db SEAFOAM_ISLANDS_B2F,$01,Hide
- db SEAFOAM_ISLANDS_B2F,$02,Hide
-MapHSA1:
- db SEAFOAM_ISLANDS_B3F,$02,Show
- db SEAFOAM_ISLANDS_B3F,$03,Show
- db SEAFOAM_ISLANDS_B3F,$05,Hide
- db SEAFOAM_ISLANDS_B3F,$06,Hide
-MapHSA2:
- db SEAFOAM_ISLANDS_B4F,$01,Hide
- db SEAFOAM_ISLANDS_B4F,$02,Hide
- db SEAFOAM_ISLANDS_B4F,$03,Show
-
-MapHS27Copy:
-; doesn't seem to be referenced
- db BLUES_HOUSE,$01,Show
- db BLUES_HOUSE,$02,Hide
- db BLUES_HOUSE,$03,Show
-
- db $FF,$01,Show
diff --git a/data/icon_pointers.asm b/data/icon_pointers.asm
new file mode 100644
index 00000000..9092e1b1
--- /dev/null
+++ b/data/icon_pointers.asm
@@ -0,0 +1,39 @@
+mon_icon_header: MACRO
+ dw \1 tile \2
+ db \3
+ db BANK(\1)
+ dw vSprites tile (\4)
+ENDM
+
+MonPartySpritePointers:
+ ; gfx pointer, gfx tile offset, # tiles, vSprites tile offset
+ mon_icon_header MonsterSprite, 12, 4, ICON_MON << 2
+ mon_icon_header PokeBallSprite, 0, 8, ICON_BALL << 2
+ mon_icon_header FairySprite, 12, 4, ICON_FAIRY << 2
+ mon_icon_header BirdSprite, 12, 4, ICON_BIRD << 2
+ mon_icon_header SeelSprite, 0, 4, ICON_WATER << 2
+ mon_icon_header BugIconFrame2, 0, 1, ICON_BUG << 2
+ mon_icon_header BugIconFrame2, 1, 1, ICON_BUG << 2 + 2
+ mon_icon_header PlantIconFrame2, 0, 1, ICON_GRASS << 2
+ mon_icon_header PlantIconFrame2, 1, 1, ICON_GRASS << 2 + 2
+ mon_icon_header SnakeIconFrame1, 0, 1, ICON_SNAKE << 2
+ mon_icon_header SnakeIconFrame1, 1, 1, ICON_SNAKE << 2 + 2
+ mon_icon_header QuadrupedIconFrame1, 0, 1, ICON_QUADRUPED << 2
+ mon_icon_header QuadrupedIconFrame1, 1, 1, ICON_QUADRUPED << 2 + 2
+ mon_icon_header PikachuSprite, 0, 4, ICON_PIKACHU << 2
+ mon_icon_header TradeBubbleIconGFX, 0, 4, ICON_TRADEBUBBLE << 2
+ mon_icon_header MonsterSprite, 0, 4, ICONOFFSET + ICON_MON << 2
+ mon_icon_header PokeBallSprite, 0, 8, ICONOFFSET + ICON_BALL << 2
+ mon_icon_header FairySprite, 0, 4, ICONOFFSET + ICON_FAIRY << 2
+ mon_icon_header BirdSprite, 0, 4, ICONOFFSET + ICON_BIRD << 2
+ mon_icon_header SeelSprite, 12, 4, ICONOFFSET + ICON_WATER << 2
+ mon_icon_header BugIconFrame1, 0, 1, ICONOFFSET + ICON_BUG << 2
+ mon_icon_header BugIconFrame1, 1, 1, ICONOFFSET + ICON_BUG << 2 + 2
+ mon_icon_header PlantIconFrame1, 0, 1, ICONOFFSET + ICON_GRASS << 2
+ mon_icon_header PlantIconFrame1, 1, 1, ICONOFFSET + ICON_GRASS << 2 + 2
+ mon_icon_header SnakeIconFrame2, 0, 1, ICONOFFSET + ICON_SNAKE << 2
+ mon_icon_header SnakeIconFrame2, 1, 1, ICONOFFSET + ICON_SNAKE << 2 + 2
+ mon_icon_header QuadrupedIconFrame2, 0, 1, ICONOFFSET + ICON_QUADRUPED << 2
+ mon_icon_header QuadrupedIconFrame2, 1, 1, ICONOFFSET + ICON_QUADRUPED << 2 + 2
+ mon_icon_header PikachuSprite, 12, 4, ICONOFFSET + ICON_PIKACHU << 2
+ mon_icon_header TradeBubbleIconGFX, 4, 4, ICONOFFSET + ICON_TRADEBUBBLE << 2
diff --git a/data/item_prices.asm b/data/item_prices.asm
deleted file mode 100755
index 15a1bd34..00000000
--- a/data/item_prices.asm
+++ /dev/null
@@ -1,98 +0,0 @@
-ItemPrices:
- money 0 ; MASTER_BALL
- money 1200 ; ULTRA_BALL
- money 600 ; GREAT_BALL
- money 200 ; POKE_BALL
- money 0 ; TOWN_MAP
- money 0 ; BICYCLE
- money 0 ; SURFBOARD
- money 1000 ; SAFARI_BALL
- money 0 ; POKEDEX
- money 0 ; MOON_STONE
- money 100 ; ANTIDOTE
- money 250 ; BURN_HEAL
- money 250 ; ICE_HEAL
- money 200 ; AWAKENING
- money 200 ; PARLYZ_HEAL
- money 3000 ; FULL_RESTORE
- money 2500 ; MAX_POTION
- money 1500 ; HYPER_POTION
- money 700 ; SUPER_POTION
- money 300 ; POTION
- money 0 ; BOULDERBADGE
- money 0 ; CASCADEBADGE
- money 0 ; THUNDERBADGE
- money 0 ; RAINBOWBADGE
- money 0 ; SOULBADGE
- money 0 ; MARSHBADGE
- money 0 ; VOLCANOBADGE
- money 0 ; EARTHBADGE
- money 550 ; ESCAPE_ROPE
- money 350 ; REPEL
- money 0 ; OLD_AMBER
- money 2100 ; FIRE_STONE
- money 2100 ; THUNDER_STONE
- money 2100 ; WATER_STONE
- money 9800 ; HP_UP
- money 9800 ; PROTEIN
- money 9800 ; IRON
- money 9800 ; CARBOS
- money 9800 ; CALCIUM
- money 4800 ; RARE_CANDY
- money 0 ; DOME_FOSSIL
- money 0 ; HELIX_FOSSIL
- money 0 ; SECRET_KEY
- money 0 ; XXX
- money 0 ; BIKE_VOUCHER
- money 950 ; X_ACCURACY
- money 2100 ; LEAF_STONE
- money 0 ; CARD_KEY
- money 10000 ; NUGGET
- money 9800 ; XXX PP_UP
- money 1000 ; POKE_DOLL
- money 600 ; FULL_HEAL
- money 1500 ; REVIVE
- money 4000 ; MAX_REVIVE
- money 700 ; GUARD_SPEC
- money 500 ; SUPER_REPEL
- money 700 ; MAX_REPEL
- money 650 ; DIRE_HIT
- money 10 ; COIN
- money 200 ; FRESH_WATER
- money 300 ; SODA_POP
- money 350 ; LEMONADE
- money 0 ; S_S_TICKET
- money 0 ; GOLD_TEETH
- money 500 ; X_ATTACK
- money 550 ; X_DEFEND
- money 350 ; X_SPEED
- money 350 ; X_SPECIAL
- money 0 ; COIN_CASE
- money 0 ; OAKS_PARCEL
- money 0 ; ITEMFINDER
- money 0 ; SILPH_SCOPE
- money 0 ; POKE_FLUTE
- money 0 ; LIFT_KEY
- money 0 ; EXP_ALL
- money 0 ; OLD_ROD
- money 0 ; GOOD_ROD
- money 0 ; SUPER_ROD
- money 0 ; PP_UP
- money 0 ; ETHER
- money 0 ; MAX_ETHER
- money 0 ; ELIXER
- money 0 ; MAX_ELIXER
- 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/items/guard_drink_items.asm b/data/items/guard_drink_items.asm
new file mode 100644
index 00000000..e76d1f77
--- /dev/null
+++ b/data/items/guard_drink_items.asm
@@ -0,0 +1,5 @@
+GuardDrinksList:
+ db FRESH_WATER
+ db SODA_POP
+ db LEMONADE
+ db 0 ; end
diff --git a/data/items/key_items.asm b/data/items/key_items.asm
new file mode 100755
index 00000000..aca8cf81
--- /dev/null
+++ b/data/items/key_items.asm
@@ -0,0 +1,103 @@
+key_item_bits: MACRO
+_bit = 0
+_byte = 0
+REPT _NARG
+_byte = _byte | ((\1) << _bit)
+_bit = _bit + 1
+IF _bit == 8
+ db _byte
+_byte = 0
+_bit = 0
+ENDC
+SHIFT
+ENDR
+IF _bit > 0
+ db _byte
+ENDC
+ENDM
+
+KeyItemBitfield:
+ key_item_bits \
+ FALSE, \ ; MASTER_BALL
+ FALSE, \ ; ULTRA_BALL
+ FALSE, \ ; GREAT_BALL
+ FALSE, \ ; POKE_BALL
+ TRUE, \ ; TOWN_MAP
+ TRUE, \ ; BICYCLE
+ TRUE, \ ; SURFBOARD
+ TRUE, \ ; SAFARI_BALL
+ TRUE, \ ; POKEDEX
+ FALSE, \ ; MOON_STONE
+ FALSE, \ ; ANTIDOTE
+ FALSE, \ ; BURN_HEAL
+ FALSE, \ ; ICE_HEAL
+ FALSE, \ ; AWAKENING
+ FALSE, \ ; PARLYZ_HEAL
+ FALSE, \ ; FULL_RESTORE
+ FALSE, \ ; MAX_POTION
+ FALSE, \ ; HYPER_POTION
+ FALSE, \ ; SUPER_POTION
+ FALSE, \ ; POTION
+ TRUE, \ ; BOULDERBADGE
+ TRUE, \ ; CASCADEBADGE
+ TRUE, \ ; THUNDERBADGE
+ TRUE, \ ; RAINBOWBADGE
+ TRUE, \ ; SOULBADGE
+ TRUE, \ ; MARSHBADGE
+ TRUE, \ ; VOLCANOBADGE
+ TRUE, \ ; EARTHBADGE
+ FALSE, \ ; ESCAPE_ROPE
+ FALSE, \ ; REPEL
+ TRUE, \ ; OLD_AMBER
+ FALSE, \ ; FIRE_STONE
+ FALSE, \ ; THUNDER_STONE
+ FALSE, \ ; WATER_STONE
+ FALSE, \ ; HP_UP
+ FALSE, \ ; PROTEIN
+ FALSE, \ ; IRON
+ FALSE, \ ; CARBOS
+ FALSE, \ ; CALCIUM
+ FALSE, \ ; RARE_CANDY
+ TRUE, \ ; DOME_FOSSIL
+ TRUE, \ ; HELIX_FOSSIL
+ TRUE, \ ; SECRET_KEY
+ TRUE, \ ; UNUSED_ITEM
+ TRUE, \ ; BIKE_VOUCHER
+ FALSE, \ ; X_ACCURACY
+ FALSE, \ ; LEAF_STONE
+ TRUE, \ ; CARD_KEY
+ FALSE, \ ; NUGGET
+ FALSE, \ ; PP_UP_2
+ FALSE, \ ; POKE_DOLL
+ FALSE, \ ; FULL_HEAL
+ FALSE, \ ; REVIVE
+ FALSE, \ ; MAX_REVIVE
+ FALSE, \ ; GUARD_SPEC
+ FALSE, \ ; SUPER_REPEL
+ FALSE, \ ; MAX_REPEL
+ FALSE, \ ; DIRE_HIT
+ FALSE, \ ; COIN
+ FALSE, \ ; FRESH_WATER
+ FALSE, \ ; SODA_POP
+ FALSE, \ ; LEMONADE
+ TRUE, \ ; S_S_TICKET
+ TRUE, \ ; GOLD_TEETH
+ FALSE, \ ; X_ATTACK
+ FALSE, \ ; X_DEFEND
+ FALSE, \ ; X_SPEED
+ FALSE, \ ; X_SPECIAL
+ TRUE, \ ; COIN_CASE
+ TRUE, \ ; OAKS_PARCEL
+ TRUE, \ ; ITEMFINDER
+ TRUE, \ ; SILPH_SCOPE
+ TRUE, \ ; POKE_FLUTE
+ TRUE, \ ; LIFT_KEY
+ FALSE, \ ; EXP_ALL
+ TRUE, \ ; OLD_ROD
+ TRUE, \ ; GOOD_ROD
+ TRUE, \ ; SUPER_ROD
+ FALSE, \ ; PP_UP
+ FALSE, \ ; ETHER
+ FALSE, \ ; MAX_ETHER
+ FALSE, \ ; ELIXER
+ FALSE ; MAX_ELIXER
diff --git a/data/items/marts.asm b/data/items/marts.asm
new file mode 100755
index 00000000..30eb7d9a
--- /dev/null
+++ b/data/items/marts.asm
@@ -0,0 +1,64 @@
+; mart inventories are below
+; they are texts
+
+; Viridian
+ViridianCashierText::
+ script_mart POKE_BALL, POTION, ANTIDOTE, PARLYZ_HEAL, BURN_HEAL
+
+; Pewter
+PewterCashierText::
+ script_mart POKE_BALL, POTION, ESCAPE_ROPE, ANTIDOTE, BURN_HEAL, AWAKENING, PARLYZ_HEAL
+
+; Cerulean
+CeruleanCashierText::
+ script_mart POKE_BALL, POTION, ESCAPE_ROPE, REPEL, ANTIDOTE, BURN_HEAL, AWAKENING, PARLYZ_HEAL
+
+; Bike shop
+ script_mart BICYCLE
+
+; Vermilion
+VermilionCashierText::
+ script_mart POKE_BALL, SUPER_POTION, ICE_HEAL, AWAKENING, PARLYZ_HEAL, REPEL
+
+; Lavender
+LavenderCashierText::
+ script_mart GREAT_BALL, SUPER_POTION, REVIVE, ESCAPE_ROPE, SUPER_REPEL, ANTIDOTE, BURN_HEAL, ICE_HEAL, PARLYZ_HEAL
+
+; Celadon Dept. Store 2F (1)
+CeladonMart2Clerk1Text::
+ script_mart GREAT_BALL, SUPER_POTION, REVIVE, SUPER_REPEL, ANTIDOTE, BURN_HEAL, ICE_HEAL, AWAKENING, PARLYZ_HEAL
+
+; Celadon Dept. Store 2F (2)
+CeladonMart2Clerk2Text::
+ script_mart TM_DOUBLE_TEAM, TM_REFLECT, TM_RAZOR_WIND, TM_HORN_DRILL, TM_EGG_BOMB, TM_MEGA_PUNCH, TM_MEGA_KICK, TM_TAKE_DOWN, TM_SUBMISSION
+
+; Celadon Dept. Store 4F
+CeladonMart4ClerkText::
+ script_mart POKE_DOLL, FIRE_STONE, THUNDER_STONE, WATER_STONE, LEAF_STONE
+
+; Celadon Dept. Store 5F (1)
+CeladonMart5Clerk1Text::
+ script_mart X_ACCURACY, GUARD_SPEC, DIRE_HIT, X_ATTACK, X_DEFEND, X_SPEED, X_SPECIAL
+
+; Celadon Dept. Store 5F (2)
+CeladonMart5Clerk2Text::
+ script_mart HP_UP, PROTEIN, IRON, CARBOS, CALCIUM
+
+; Fuchsia
+FuchsiaCashierText::
+ script_mart ULTRA_BALL, GREAT_BALL, HYPER_POTION, REVIVE, FULL_HEAL, SUPER_REPEL
+
+; unused?
+ script_mart GREAT_BALL, HYPER_POTION, SUPER_POTION, FULL_HEAL, REVIVE
+
+; Cinnabar
+CinnabarCashierText::
+ script_mart ULTRA_BALL, GREAT_BALL, HYPER_POTION, MAX_REPEL, ESCAPE_ROPE, FULL_HEAL, REVIVE
+
+; Saffron
+SaffronCashierText::
+ script_mart GREAT_BALL, HYPER_POTION, MAX_REPEL, ESCAPE_ROPE, FULL_HEAL, REVIVE
+
+; Indigo
+IndigoCashierText::
+ script_mart ULTRA_BALL, GREAT_BALL, FULL_RESTORE, MAX_POTION, FULL_HEAL, REVIVE, MAX_REPEL
diff --git a/data/items/names.asm b/data/items/names.asm
new file mode 100755
index 00000000..0c07fe5d
--- /dev/null
+++ b/data/items/names.asm
@@ -0,0 +1,98 @@
+ItemNames::
+ db "MASTER BALL@"
+ db "ULTRA BALL@"
+ db "GREAT BALL@"
+ db "POKé BALL@"
+ db "TOWN MAP@"
+ db "BICYCLE@"
+ db "?????@"
+ db "SAFARI BALL@"
+ db "POKéDEX@"
+ db "MOON STONE@"
+ db "ANTIDOTE@"
+ db "BURN HEAL@"
+ db "ICE HEAL@"
+ db "AWAKENING@"
+ db "PARLYZ HEAL@"
+ db "FULL RESTORE@"
+ db "MAX POTION@"
+ db "HYPER POTION@"
+ db "SUPER POTION@"
+ db "POTION@"
+ db "BOULDERBADGE@"
+ db "CASCADEBADGE@"
+ db "THUNDERBADGE@"
+ db "RAINBOWBADGE@"
+ db "SOULBADGE@"
+ db "MARSHBADGE@"
+ db "VOLCANOBADGE@"
+ db "EARTHBADGE@"
+ db "ESCAPE ROPE@"
+ db "REPEL@"
+ db "OLD AMBER@"
+ db "FIRE STONE@"
+ db "THUNDERSTONE@"
+ db "WATER STONE@"
+ db "HP UP@"
+ db "PROTEIN@"
+ db "IRON@"
+ db "CARBOS@"
+ db "CALCIUM@"
+ db "RARE CANDY@"
+ db "DOME FOSSIL@"
+ db "HELIX FOSSIL@"
+ db "SECRET KEY@"
+ db "?????@"
+ db "BIKE VOUCHER@"
+ db "X ACCURACY@"
+ db "LEAF STONE@"
+ db "CARD KEY@"
+ db "NUGGET@"
+ db "PP UP@"
+ db "POKé DOLL@"
+ db "FULL HEAL@"
+ db "REVIVE@"
+ db "MAX REVIVE@"
+ db "GUARD SPEC.@"
+ db "SUPER REPEL@"
+ db "MAX REPEL@"
+ db "DIRE HIT@"
+ db "COIN@"
+ db "FRESH WATER@"
+ db "SODA POP@"
+ db "LEMONADE@"
+ db "S.S.TICKET@"
+ db "GOLD TEETH@"
+ db "X ATTACK@"
+ db "X DEFEND@"
+ db "X SPEED@"
+ db "X SPECIAL@"
+ db "COIN CASE@"
+ db "OAK's PARCEL@"
+ db "ITEMFINDER@"
+ db "SILPH SCOPE@"
+ db "POKé FLUTE@"
+ db "LIFT KEY@"
+ db "EXP.ALL@"
+ db "OLD ROD@"
+ db "GOOD ROD@"
+ db "SUPER ROD@"
+ db "PP UP@"
+ db "ETHER@"
+ db "MAX ETHER@"
+ db "ELIXER@"
+ db "MAX ELIXER@"
+ db "B2F@"
+ db "B1F@"
+ db "1F@"
+ db "2F@"
+ db "3F@"
+ db "4F@"
+ db "5F@"
+ db "6F@"
+ db "7F@"
+ db "8F@"
+ db "9F@"
+ db "10F@"
+ db "11F@"
+ db "B4F@"
diff --git a/data/items/prices.asm b/data/items/prices.asm
new file mode 100755
index 00000000..f3d8f76b
--- /dev/null
+++ b/data/items/prices.asm
@@ -0,0 +1,98 @@
+ItemPrices::
+ money 0 ; MASTER_BALL
+ money 1200 ; ULTRA_BALL
+ money 600 ; GREAT_BALL
+ money 200 ; POKE_BALL
+ money 0 ; TOWN_MAP
+ money 0 ; BICYCLE
+ money 0 ; SURFBOARD
+ money 1000 ; SAFARI_BALL
+ money 0 ; POKEDEX
+ money 0 ; MOON_STONE
+ money 100 ; ANTIDOTE
+ money 250 ; BURN_HEAL
+ money 250 ; ICE_HEAL
+ money 200 ; AWAKENING
+ money 200 ; PARLYZ_HEAL
+ money 3000 ; FULL_RESTORE
+ money 2500 ; MAX_POTION
+ money 1500 ; HYPER_POTION
+ money 700 ; SUPER_POTION
+ money 300 ; POTION
+ money 0 ; BOULDERBADGE
+ money 0 ; CASCADEBADGE
+ money 0 ; THUNDERBADGE
+ money 0 ; RAINBOWBADGE
+ money 0 ; SOULBADGE
+ money 0 ; MARSHBADGE
+ money 0 ; VOLCANOBADGE
+ money 0 ; EARTHBADGE
+ money 550 ; ESCAPE_ROPE
+ money 350 ; REPEL
+ money 0 ; OLD_AMBER
+ money 2100 ; FIRE_STONE
+ money 2100 ; THUNDER_STONE
+ money 2100 ; WATER_STONE
+ money 9800 ; HP_UP
+ money 9800 ; PROTEIN
+ money 9800 ; IRON
+ money 9800 ; CARBOS
+ money 9800 ; CALCIUM
+ money 4800 ; RARE_CANDY
+ money 0 ; DOME_FOSSIL
+ money 0 ; HELIX_FOSSIL
+ money 0 ; SECRET_KEY
+ money 0 ; XXX
+ money 0 ; BIKE_VOUCHER
+ money 950 ; X_ACCURACY
+ money 2100 ; LEAF_STONE
+ money 0 ; CARD_KEY
+ money 10000 ; NUGGET
+ money 9800 ; XXX PP_UP
+ money 1000 ; POKE_DOLL
+ money 600 ; FULL_HEAL
+ money 1500 ; REVIVE
+ money 4000 ; MAX_REVIVE
+ money 700 ; GUARD_SPEC
+ money 500 ; SUPER_REPEL
+ money 700 ; MAX_REPEL
+ money 650 ; DIRE_HIT
+ money 10 ; COIN
+ money 200 ; FRESH_WATER
+ money 300 ; SODA_POP
+ money 350 ; LEMONADE
+ money 0 ; S_S_TICKET
+ money 0 ; GOLD_TEETH
+ money 500 ; X_ATTACK
+ money 550 ; X_DEFEND
+ money 350 ; X_SPEED
+ money 350 ; X_SPECIAL
+ money 0 ; COIN_CASE
+ money 0 ; OAKS_PARCEL
+ money 0 ; ITEMFINDER
+ money 0 ; SILPH_SCOPE
+ money 0 ; POKE_FLUTE
+ money 0 ; LIFT_KEY
+ money 0 ; EXP_ALL
+ money 0 ; OLD_ROD
+ money 0 ; GOOD_ROD
+ money 0 ; SUPER_ROD
+ money 0 ; PP_UP
+ money 0 ; ETHER
+ money 0 ; MAX_ETHER
+ money 0 ; ELIXER
+ money 0 ; MAX_ELIXER
+ 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/items/tm_prices.asm b/data/items/tm_prices.asm
new file mode 100755
index 00000000..7f007e9d
--- /dev/null
+++ b/data/items/tm_prices.asm
@@ -0,0 +1,27 @@
+TechnicalMachinePrices:
+; In thousands (nybbles).
+ dn 3, 2 ; TM01, TM02
+ dn 2, 1 ; TM03, TM04
+ dn 3, 4 ; TM05, TM06
+ dn 2, 4 ; TM07, TM08
+ dn 3, 4 ; TM09, TM10
+ dn 2, 1 ; TM11, TM12
+ dn 4, 5 ; TM13, TM14
+ dn 5, 5 ; TM15, TM16
+ dn 3, 2 ; TM17, TM18
+ dn 3, 2 ; TM19, TM20
+ dn 5, 5 ; TM21, TM22
+ dn 5, 2 ; TM23, TM24
+ dn 5, 4 ; TM25, TM26
+ dn 5, 2 ; TM27, TM28
+ dn 4, 1 ; TM29, TM30
+ dn 2, 1 ; TM31, TM32
+ dn 1, 2 ; TM33, TM34
+ dn 4, 2 ; TM35, TM36
+ dn 2, 5 ; TM37, TM38
+ dn 2, 4 ; TM39, TM40
+ dn 2, 2 ; TM41, TM42
+ dn 5, 2 ; TM43, TM44
+ dn 2, 4 ; TM45, TM46
+ dn 3, 4 ; TM47, TM48
+ dn 4, 2 ; TM49, TM50
diff --git a/data/items/use_overworld.asm b/data/items/use_overworld.asm
new file mode 100644
index 00000000..5a2ba102
--- /dev/null
+++ b/data/items/use_overworld.asm
@@ -0,0 +1,9 @@
+; items which close the item menu when used
+UsableItems_CloseMenu:
+ db ESCAPE_ROPE
+ db ITEMFINDER
+ db POKE_FLUTE
+ db OLD_ROD
+ db GOOD_ROD
+ db SUPER_ROD
+ db -1 ; end
diff --git a/data/items/use_party.asm b/data/items/use_party.asm
new file mode 100644
index 00000000..e8da68be
--- /dev/null
+++ b/data/items/use_party.asm
@@ -0,0 +1,39 @@
+; items which bring up the party menu when used
+UsableItems_PartyMenu:
+ db MOON_STONE
+ db ANTIDOTE
+ db BURN_HEAL
+ db ICE_HEAL
+ db AWAKENING
+ db PARLYZ_HEAL
+ db FULL_RESTORE
+ db MAX_POTION
+ db HYPER_POTION
+ db SUPER_POTION
+ db POTION
+ db FIRE_STONE
+ db THUNDER_STONE
+ db WATER_STONE
+ db HP_UP
+ db PROTEIN
+ db IRON
+ db CARBOS
+ db CALCIUM
+ db RARE_CANDY
+ db LEAF_STONE
+ db FULL_HEAL
+ db REVIVE
+ db MAX_REVIVE
+ db FRESH_WATER
+ db SODA_POP
+ db LEMONADE
+ db X_ATTACK
+ db X_DEFEND
+ db X_SPEED
+ db X_SPECIAL
+ db PP_UP
+ db ETHER
+ db MAX_ETHER
+ db ELIXER
+ db MAX_ELIXER
+ db -1 ; end
diff --git a/data/items/vending_prices.asm b/data/items/vending_prices.asm
new file mode 100644
index 00000000..131d525d
--- /dev/null
+++ b/data/items/vending_prices.asm
@@ -0,0 +1,10 @@
+vend_item: MACRO
+ db \1
+ money \2
+ENDM
+
+VendingPrices:
+ ; item id, price
+ vend_item FRESH_WATER, 200
+ vend_item SODA_POP, 300
+ vend_item LEMONADE, 350
diff --git a/data/key_items.asm b/data/key_items.asm
deleted file mode 100755
index afa586af..00000000
--- a/data/key_items.asm
+++ /dev/null
@@ -1,12 +0,0 @@
-KeyItemBitfield:
- db %11110000
- db %00000001
- db %11110000
- db %01001111
- db %00000000
- db %10011111
- db %00000000
- db %11000000
- db %11110000
- db %00111011
- db %00000000
diff --git a/data/mapHeaders/AgathasRoom.asm b/data/mapHeaders/AgathasRoom.asm
deleted file mode 100755
index 73cd7291..00000000
--- a/data/mapHeaders/AgathasRoom.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-AgathasRoom_h:
- db CEMETERY ; tileset
- db AGATHAS_ROOM_HEIGHT, AGATHAS_ROOM_WIDTH ; dimensions (y, x)
- dw AgathasRoom_Blocks ; blocks
- dw AgathasRoom_TextPointers ; texts
- dw AgathasRoom_Script ; scripts
- db 0 ; connections
- dw AgathasRoom_Object ; objects
diff --git a/data/mapHeaders/BikeShop.asm b/data/mapHeaders/BikeShop.asm
deleted file mode 100755
index c447fd80..00000000
--- a/data/mapHeaders/BikeShop.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-BikeShop_h:
- db CLUB ; tileset
- db BIKE_SHOP_HEIGHT, BIKE_SHOP_WIDTH ; dimensions (y, x)
- dw BikeShop_Blocks ; blocks
- dw BikeShop_TextPointers ; texts
- dw BikeShop_Script ; scripts
- db 0 ; connections
- dw BikeShop_Object ; objects
diff --git a/data/mapHeaders/BillsHouse.asm b/data/mapHeaders/BillsHouse.asm
deleted file mode 100755
index bba9cf83..00000000
--- a/data/mapHeaders/BillsHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-BillsHouse_h:
- db INTERIOR ; tileset
- db BILLS_HOUSE_HEIGHT, BILLS_HOUSE_WIDTH ; dimensions (y, x)
- dw BillsHouse_Blocks ; blocks
- dw BillsHouse_TextPointers ; texts
- dw BillsHouse_Script ; scripts
- db 0 ; connections
- dw BillsHouse_Object ; objects
diff --git a/data/mapHeaders/BluesHouse.asm b/data/mapHeaders/BluesHouse.asm
deleted file mode 100755
index 6ef0433e..00000000
--- a/data/mapHeaders/BluesHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-BluesHouse_h:
- db HOUSE ; tileset
- db BLUES_HOUSE_HEIGHT, BLUES_HOUSE_WIDTH ; dimensions (y, x)
- dw BluesHouse_Blocks ; blocks
- dw BluesHouse_TextPointers ; texts
- dw BluesHouse_Script ; scripts
- db 0 ; connections
- dw BluesHouse_Object ; objects
diff --git a/data/mapHeaders/BrunosRoom.asm b/data/mapHeaders/BrunosRoom.asm
deleted file mode 100755
index 78c7989d..00000000
--- a/data/mapHeaders/BrunosRoom.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-BrunosRoom_h:
- db GYM ; tileset
- db BRUNOS_ROOM_HEIGHT, BRUNOS_ROOM_WIDTH ; dimensions (y, x)
- dw BrunosRoom_Blocks ; blocks
- dw BrunosRoom_TextPointers ; texts
- dw BrunosRoom_Script ; scripts
- db 0 ; connections
- dw BrunosRoom_Object ; objects
diff --git a/data/mapHeaders/CeladonChiefHouse.asm b/data/mapHeaders/CeladonChiefHouse.asm
deleted file mode 100755
index a31c8121..00000000
--- a/data/mapHeaders/CeladonChiefHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonChiefHouse_h:
- db MANSION ; tileset
- db CELADON_CHIEF_HOUSE_HEIGHT, CELADON_CHIEF_HOUSE_WIDTH ; dimensions (y, x)
- dw CeladonChiefHouse_Blocks ; blocks
- dw CeladonChiefHouse_TextPointers ; texts
- dw CeladonChiefHouse_Script ; scripts
- db 0 ; connections
- dw CeladonChiefHouse_Object ; objects
diff --git a/data/mapHeaders/CeladonCity.asm b/data/mapHeaders/CeladonCity.asm
deleted file mode 100755
index 62243d27..00000000
--- a/data/mapHeaders/CeladonCity.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-CeladonCity_h:
- db OVERWORLD ; tileset
- db CELADON_CITY_HEIGHT, CELADON_CITY_WIDTH ; dimensions (y, x)
- dw CeladonCity_Blocks ; blocks
- dw CeladonCity_TextPointers ; texts
- dw CeladonCity_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION CELADON_CITY, ROUTE_16, 4, 0, Route16_Blocks
- EAST_MAP_CONNECTION CELADON_CITY, ROUTE_7, 4, 0, Route7_Blocks, 1
- dw CeladonCity_Object ; objects
diff --git a/data/mapHeaders/CeladonDiner.asm b/data/mapHeaders/CeladonDiner.asm
deleted file mode 100755
index d4220db7..00000000
--- a/data/mapHeaders/CeladonDiner.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonDiner_h:
- db LOBBY ; tileset
- db CELADON_DINER_HEIGHT, CELADON_DINER_WIDTH ; dimensions (y, x)
- dw CeladonDiner_Blocks ; blocks
- dw CeladonDiner_TextPointers ; texts
- dw CeladonDiner_Script ; scripts
- db 0 ; connections
- dw CeladonDiner_Object ; objects
diff --git a/data/mapHeaders/CeladonGym.asm b/data/mapHeaders/CeladonGym.asm
deleted file mode 100755
index 04a9427c..00000000
--- a/data/mapHeaders/CeladonGym.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonGym_h:
- db GYM ; tileset
- db CELADON_GYM_HEIGHT, CELADON_GYM_WIDTH ; dimensions (y, x)
- dw CeladonGym_Blocks ; blocks
- dw CeladonGym_TextPointers ; texts
- dw CeladonGym_Script ; scripts
- db 0 ; connections
- dw CeladonGym_Object ; objects
diff --git a/data/mapHeaders/CeladonHotel.asm b/data/mapHeaders/CeladonHotel.asm
deleted file mode 100755
index e06c2fd3..00000000
--- a/data/mapHeaders/CeladonHotel.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonHotel_h:
- db POKECENTER ; tileset
- db CELADON_HOTEL_HEIGHT, CELADON_HOTEL_WIDTH ; dimensions (y, x)
- dw CeladonHotel_Blocks ; blocks
- dw CeladonHotel_TextPointers ; texts
- dw CeladonHotel_Script ; scripts
- db 0 ; connections
- dw CeladonHotel_Object ; objects
diff --git a/data/mapHeaders/CeladonMansion1F.asm b/data/mapHeaders/CeladonMansion1F.asm
deleted file mode 100755
index d2d0ee99..00000000
--- a/data/mapHeaders/CeladonMansion1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonMansion1F_h:
- db MANSION ; tileset
- db CELADON_MANSION_1F_HEIGHT, CELADON_MANSION_1F_WIDTH ; dimensions (y, x)
- dw CeladonMansion1F_Blocks ; blocks
- dw CeladonMansion1F_TextPointers ; texts
- dw CeladonMansion1F_Script ; scripts
- db 0 ; connections
- dw CeladonMansion1F_Object ; objects
diff --git a/data/mapHeaders/CeladonMansion2F.asm b/data/mapHeaders/CeladonMansion2F.asm
deleted file mode 100755
index eceac30e..00000000
--- a/data/mapHeaders/CeladonMansion2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonMansion2F_h:
- db MANSION ; tileset
- db CELADON_MANSION_2F_HEIGHT, CELADON_MANSION_2F_WIDTH ; dimensions (y, x)
- dw CeladonMansion2F_Blocks ; blocks
- dw CeladonMansion2F_TextPointers ; texts
- dw CeladonMansion2F_Script ; scripts
- db 0 ; connections
- dw CeladonMansion2F_Object ; objects
diff --git a/data/mapHeaders/CeladonMansion3F.asm b/data/mapHeaders/CeladonMansion3F.asm
deleted file mode 100755
index b5a0a705..00000000
--- a/data/mapHeaders/CeladonMansion3F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonMansion3F_h:
- db MANSION ; tileset
- db CELADON_MANSION_3F_HEIGHT, CELADON_MANSION_3F_WIDTH ; dimensions (y, x)
- dw CeladonMansion3F_Blocks ; blocks
- dw CeladonMansion3F_TextPointers ; texts
- dw CeladonMansion3F_Script ; scripts
- db 0 ; connections
- dw CeladonMansion3F_Object ; objects
diff --git a/data/mapHeaders/CeladonMansionRoof.asm b/data/mapHeaders/CeladonMansionRoof.asm
deleted file mode 100755
index d7a050c8..00000000
--- a/data/mapHeaders/CeladonMansionRoof.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonMansionRoof_h:
- db MANSION ; tileset
- db CELADON_MANSION_ROOF_HEIGHT, CELADON_MANSION_ROOF_WIDTH ; dimensions (y, x)
- dw CeladonMansionRoof_Blocks ; blocks
- dw CeladonMansionRoof_TextPointers ; texts
- dw CeladonMansionRoof_Script ; scripts
- db 0 ; connections
- dw CeladonMansionRoof_Object ; objects
diff --git a/data/mapHeaders/CeladonMansionRoofHouse.asm b/data/mapHeaders/CeladonMansionRoofHouse.asm
deleted file mode 100755
index 7fcf49e1..00000000
--- a/data/mapHeaders/CeladonMansionRoofHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonMansionRoofHouse_h:
- db HOUSE ; tileset
- db CELADON_MANSION_ROOF_HOUSE_HEIGHT, CELADON_MANSION_ROOF_HOUSE_WIDTH ; dimensions (y, x)
- dw CeladonMansionRoofHouse_Blocks ; blocks
- dw CeladonMansionRoofHouse_TextPointers ; texts
- dw CeladonMansionRoofHouse_Script ; scripts
- db 0 ; connections
- dw CeladonMansionRoofHouse_Object ; objects
diff --git a/data/mapHeaders/CeladonMart1F.asm b/data/mapHeaders/CeladonMart1F.asm
deleted file mode 100755
index 51e968fa..00000000
--- a/data/mapHeaders/CeladonMart1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonMart1F_h:
- db LOBBY ; tileset
- db CELADON_MART_1F_HEIGHT, CELADON_MART_1F_WIDTH ; dimensions (y, x)
- dw CeladonMart1F_Blocks ; blocks
- dw CeladonMart1F_TextPointers ; texts
- dw CeladonMart1F_Script ; scripts
- db 0 ; connections
- dw CeladonMart1F_Object ; objects
diff --git a/data/mapHeaders/CeladonMart2F.asm b/data/mapHeaders/CeladonMart2F.asm
deleted file mode 100755
index 77106405..00000000
--- a/data/mapHeaders/CeladonMart2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonMart2F_h:
- db LOBBY ; tileset
- db CELADON_MART_2F_HEIGHT, CELADON_MART_2F_WIDTH ; dimensions (y, x)
- dw CeladonMart2F_Blocks ; blocks
- dw CeladonMart2F_TextPointers ; texts
- dw CeladonMart2F_Script ; scripts
- db 0 ; connections
- dw CeladonMart2F_Object ; objects
diff --git a/data/mapHeaders/CeladonMart3F.asm b/data/mapHeaders/CeladonMart3F.asm
deleted file mode 100755
index c460945c..00000000
--- a/data/mapHeaders/CeladonMart3F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonMart3F_h:
- db LOBBY ; tileset
- db CELADON_MART_3F_HEIGHT, CELADON_MART_3F_WIDTH ; dimensions (y, x)
- dw CeladonMart3F_Blocks ; blocks
- dw CeladonMart3F_TextPointers ; texts
- dw CeladonMart3F_Script ; scripts
- db 0 ; connections
- dw CeladonMart3F_Object ; objects
diff --git a/data/mapHeaders/CeladonMart4F.asm b/data/mapHeaders/CeladonMart4F.asm
deleted file mode 100755
index a742570b..00000000
--- a/data/mapHeaders/CeladonMart4F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonMart4F_h:
- db LOBBY ; tileset
- db CELADON_MART_4F_HEIGHT, CELADON_MART_4F_WIDTH ; dimensions (y, x)
- dw CeladonMart4F_Blocks ; blocks
- dw CeladonMart4F_TextPointers ; texts
- dw CeladonMart4F_Script ; scripts
- db 0 ; connections
- dw CeladonMart4F_Object ; objects
diff --git a/data/mapHeaders/CeladonMart5F.asm b/data/mapHeaders/CeladonMart5F.asm
deleted file mode 100755
index 4b5223e0..00000000
--- a/data/mapHeaders/CeladonMart5F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonMart5F_h:
- db LOBBY ; tileset
- db CELADON_MART_5F_HEIGHT, CELADON_MART_5F_WIDTH ; dimensions (y, x)
- dw CeladonMart5F_Blocks ; blocks
- dw CeladonMart5F_TextPointers ; texts
- dw CeladonMart5F_Script ; scripts
- db 0 ; connections
- dw CeladonMart5F_Object ; objects
diff --git a/data/mapHeaders/CeladonMartElevator.asm b/data/mapHeaders/CeladonMartElevator.asm
deleted file mode 100755
index 06e87608..00000000
--- a/data/mapHeaders/CeladonMartElevator.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonMartElevator_h:
- db LOBBY ; tileset
- db CELADON_MART_ELEVATOR_HEIGHT, CELADON_MART_ELEVATOR_WIDTH ; dimensions (y, x)
- dw CeladonMartElevator_Blocks ; blocks
- dw CeladonMartElevator_TextPointers ; texts
- dw CeladonMartElevator_Script ; scripts
- db 0 ; connections
- dw CeladonMartElevator_Object ; objects
diff --git a/data/mapHeaders/CeladonMartRoof.asm b/data/mapHeaders/CeladonMartRoof.asm
deleted file mode 100755
index 163e25ed..00000000
--- a/data/mapHeaders/CeladonMartRoof.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonMartRoof_h:
- db LOBBY ; tileset
- db CELADON_MART_ROOF_HEIGHT, CELADON_MART_ROOF_WIDTH ; dimensions (y, x)
- dw CeladonMartRoof_Blocks ; blocks
- dw CeladonMartRoof_TextPointers ; texts
- dw CeladonMartRoof_Script ; scripts
- db 0 ; connections
- dw CeladonMartRoof_Object ; objects
diff --git a/data/mapHeaders/CeladonPokecenter.asm b/data/mapHeaders/CeladonPokecenter.asm
deleted file mode 100755
index b5d9bd73..00000000
--- a/data/mapHeaders/CeladonPokecenter.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeladonPokecenter_h:
- db POKECENTER ; tileset
- db CELADON_POKECENTER_HEIGHT, CELADON_POKECENTER_WIDTH ; dimensions (y, x)
- dw CeladonPokecenter_Blocks ; blocks
- dw CeladonPokecenter_TextPointers ; texts
- dw CeladonPokecenter_Script ; scripts
- db 0 ; connections
- dw CeladonPokecenter_Object ; objects
diff --git a/data/mapHeaders/CeruleanBadgeHouse.asm b/data/mapHeaders/CeruleanBadgeHouse.asm
deleted file mode 100755
index a94f1912..00000000
--- a/data/mapHeaders/CeruleanBadgeHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeruleanBadgeHouse_h:
- db SHIP ; tileset
- db CERULEAN_BADGE_HOUSE_HEIGHT, CERULEAN_BADGE_HOUSE_WIDTH ; dimensions (y, x)
- dw CeruleanBadgeHouse_Blocks ; blocks
- dw CeruleanBadgeHouse_TextPointers ; texts
- dw CeruleanBadgeHouse_Script ; scripts
- db 0 ; connections
- dw CeruleanBadgeHouse_Object ; objects
diff --git a/data/mapHeaders/CeruleanCave1F.asm b/data/mapHeaders/CeruleanCave1F.asm
deleted file mode 100755
index 932dfb48..00000000
--- a/data/mapHeaders/CeruleanCave1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeruleanCave1F_h:
- db CAVERN ; tileset
- db CERULEAN_CAVE_1F_HEIGHT, CERULEAN_CAVE_1F_WIDTH ; dimensions (y, x)
- dw CeruleanCave1F_Blocks ; blocks
- dw CeruleanCave1F_TextPointers ; texts
- dw CeruleanCave1F_Script ; scripts
- db 0 ; connections
- dw CeruleanCave1F_Object ; objects
diff --git a/data/mapHeaders/CeruleanCave2F.asm b/data/mapHeaders/CeruleanCave2F.asm
deleted file mode 100755
index 7cf82371..00000000
--- a/data/mapHeaders/CeruleanCave2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeruleanCave2F_h:
- db CAVERN ; tileset
- db CERULEAN_CAVE_2F_HEIGHT, CERULEAN_CAVE_2F_WIDTH ; dimensions (y, x)
- dw CeruleanCave2F_Blocks ; blocks
- dw CeruleanCave2F_TextPointers ; texts
- dw CeruleanCave2F_Script ; scripts
- db 0 ; connections
- dw CeruleanCave2F_Object ; objects
diff --git a/data/mapHeaders/CeruleanCaveB1F.asm b/data/mapHeaders/CeruleanCaveB1F.asm
deleted file mode 100755
index eb940faa..00000000
--- a/data/mapHeaders/CeruleanCaveB1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeruleanCaveB1F_h:
- db CAVERN ; tileset
- db CERULEAN_CAVE_B1F_HEIGHT, CERULEAN_CAVE_B1F_WIDTH ; dimensions (y, x)
- dw CeruleanCaveB1F_Blocks ; blocks
- dw CeruleanCaveB1F_TextPointers ; texts
- dw CeruleanCaveB1F_Script ; scripts
- db 0 ; connections
- dw CeruleanCaveB1F_Object ; objects
diff --git a/data/mapHeaders/CeruleanCity.asm b/data/mapHeaders/CeruleanCity.asm
deleted file mode 100755
index cd5444ab..00000000
--- a/data/mapHeaders/CeruleanCity.asm
+++ /dev/null
@@ -1,12 +0,0 @@
-CeruleanCity_h:
- db OVERWORLD ; tileset
- db CERULEAN_CITY_HEIGHT, CERULEAN_CITY_WIDTH ; dimensions (y, x)
- dw CeruleanCity_Blocks ; blocks
- dw CeruleanCity_TextPointers ; texts
- dw CeruleanCity_Script ; scripts
- db NORTH | SOUTH | WEST | EAST ; connections
- NORTH_MAP_CONNECTION CERULEAN_CITY, ROUTE_24, 5, 0, Route24_Blocks
- SOUTH_MAP_CONNECTION CERULEAN_CITY, ROUTE_5, 5, 0, Route5_Blocks, 1
- WEST_MAP_CONNECTION CERULEAN_CITY, ROUTE_4, 4, 0, Route4_Blocks
- EAST_MAP_CONNECTION CERULEAN_CITY, ROUTE_9, 4, 0, Route9_Blocks
- dw CeruleanCity_Object ; objects
diff --git a/data/mapHeaders/CeruleanGym.asm b/data/mapHeaders/CeruleanGym.asm
deleted file mode 100755
index 3bdb0283..00000000
--- a/data/mapHeaders/CeruleanGym.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeruleanGym_h:
- db GYM ; tileset
- db CERULEAN_GYM_HEIGHT, CERULEAN_GYM_WIDTH ; dimensions (y, x)
- dw CeruleanGym_Blocks ; blocks
- dw CeruleanGym_TextPointers ; texts
- dw CeruleanGym_Script ; scripts
- db 0 ; connections
- dw CeruleanGym_Object ; objects
diff --git a/data/mapHeaders/CeruleanMart.asm b/data/mapHeaders/CeruleanMart.asm
deleted file mode 100755
index f020d4a3..00000000
--- a/data/mapHeaders/CeruleanMart.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeruleanMart_h:
- db MART ; tileset
- db CERULEAN_MART_HEIGHT, CERULEAN_MART_WIDTH ; dimensions (y, x)
- dw CeruleanMart_Blocks ; blocks
- dw CeruleanMart_TextPointers ; texts
- dw CeruleanMart_Script ; scripts
- db 0 ; connections
- dw CeruleanMart_Object ; objects
diff --git a/data/mapHeaders/CeruleanPokecenter.asm b/data/mapHeaders/CeruleanPokecenter.asm
deleted file mode 100755
index 3286acbb..00000000
--- a/data/mapHeaders/CeruleanPokecenter.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeruleanPokecenter_h:
- db POKECENTER ; tileset
- db CERULEAN_POKECENTER_HEIGHT, CERULEAN_POKECENTER_WIDTH ; dimensions (y, x)
- dw CeruleanPokecenter_Blocks ; blocks
- dw CeruleanPokecenter_TextPointers ; texts
- dw CeruleanPokecenter_Script ; scripts
- db 0 ; connections
- dw CeruleanPokecenter_Object ; objects
diff --git a/data/mapHeaders/CeruleanTradeHouse.asm b/data/mapHeaders/CeruleanTradeHouse.asm
deleted file mode 100755
index 23c5062c..00000000
--- a/data/mapHeaders/CeruleanTradeHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeruleanTradeHouse_h:
- db HOUSE ; tileset
- db CERULEAN_TRADE_HOUSE_HEIGHT, CERULEAN_TRADE_HOUSE_WIDTH ; dimensions (y, x)
- dw CeruleanTradeHouse_Blocks ; blocks
- dw CeruleanTradeHouse_TextPointers ; texts
- dw CeruleanTradeHouse_Script ; scripts
- db 0 ; connections
- dw CeruleanTradeHouse_Object ; objects
diff --git a/data/mapHeaders/CeruleanTrashedHouse.asm b/data/mapHeaders/CeruleanTrashedHouse.asm
deleted file mode 100755
index e105b1ed..00000000
--- a/data/mapHeaders/CeruleanTrashedHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CeruleanTrashedHouse_h:
- db HOUSE ; tileset
- db CERULEAN_TRASHED_HOUSE_HEIGHT, CERULEAN_TRASHED_HOUSE_WIDTH ; dimensions (y, x)
- dw CeruleanTrashedHouse_Blocks ; blocks
- dw CeruleanTrashedHouse_TextPointers ; texts
- dw CeruleanTrashedHouse_Script ; scripts
- db 0 ; connections
- dw CeruleanTrashedHouse_Object ; objects
diff --git a/data/mapHeaders/ChampionsRoom.asm b/data/mapHeaders/ChampionsRoom.asm
deleted file mode 100755
index a22b236a..00000000
--- a/data/mapHeaders/ChampionsRoom.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-ChampionsRoom_h:
- db GYM ; tileset
- db CHAMPIONS_ROOM_HEIGHT, CHAMPIONS_ROOM_WIDTH ; dimensions (y, x)
- dw ChampionsRoom_Blocks ; blocks
- dw ChampionsRoom_TextPointers ; texts
- dw ChampionsRoom_Script ; scripts
- db $0 ; connections
- dw ChampionsRoom_Object ; objects
diff --git a/data/mapHeaders/CinnabarGym.asm b/data/mapHeaders/CinnabarGym.asm
deleted file mode 100755
index e871b8f3..00000000
--- a/data/mapHeaders/CinnabarGym.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CinnabarGym_h:
- db FACILITY ; tileset
- db CINNABAR_GYM_HEIGHT, CINNABAR_GYM_WIDTH ; dimensions (y, x)
- dw CinnabarGym_Blocks ; blocks
- dw CinnabarGym_TextPointers ; texts
- dw CinnabarGym_Script ; scripts
- db 0 ; connections
- dw CinnabarGym_Object ; objects
diff --git a/data/mapHeaders/CinnabarIsland.asm b/data/mapHeaders/CinnabarIsland.asm
deleted file mode 100755
index b8c5d7d4..00000000
--- a/data/mapHeaders/CinnabarIsland.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-CinnabarIsland_h:
- db OVERWORLD ; tileset
- db CINNABAR_ISLAND_HEIGHT, CINNABAR_ISLAND_WIDTH ; dimensions (y, x)
- dw CinnabarIsland_Blocks ; blocks
- dw CinnabarIsland_TextPointers ; texts
- dw CinnabarIsland_Script ; scripts
- db NORTH | EAST ; connections
- NORTH_MAP_CONNECTION CINNABAR_ISLAND, ROUTE_21, 0, 0, Route21_Blocks
- EAST_MAP_CONNECTION CINNABAR_ISLAND, ROUTE_20, 0, 0, Route20_Blocks
- dw CinnabarIsland_Object ; objects
diff --git a/data/mapHeaders/CinnabarLab.asm b/data/mapHeaders/CinnabarLab.asm
deleted file mode 100755
index c1167960..00000000
--- a/data/mapHeaders/CinnabarLab.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CinnabarLab_h:
- db LAB ; tileset
- db CINNABAR_LAB_HEIGHT, CINNABAR_LAB_WIDTH ; dimensions (y, x)
- dw CinnabarLab_Blocks ; blocks
- dw CinnabarLab_TextPointers ; texts
- dw CinnabarLab_Script ; scripts
- db 0 ; connections
- dw CinnabarLab_Object ; objects
diff --git a/data/mapHeaders/CinnabarLabFossilRoom.asm b/data/mapHeaders/CinnabarLabFossilRoom.asm
deleted file mode 100755
index 4ac2963b..00000000
--- a/data/mapHeaders/CinnabarLabFossilRoom.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CinnabarLabFossilRoom_h:
- db LAB ; tileset
- db CINNABAR_LAB_FOSSIL_ROOM_HEIGHT, CINNABAR_LAB_FOSSIL_ROOM_WIDTH ; dimensions (y, x)
- dw CinnabarLabFossilRoom_Blocks ; blocks
- dw CinnabarLabFossilRoom_TextPointers ; texts
- dw CinnabarLabFossilRoom_Script ; scripts
- db 0 ; connections
- dw CinnabarLabFossilRoom_Object ; objects
diff --git a/data/mapHeaders/CinnabarLabMetronomeRoom.asm b/data/mapHeaders/CinnabarLabMetronomeRoom.asm
deleted file mode 100755
index 8eb9e502..00000000
--- a/data/mapHeaders/CinnabarLabMetronomeRoom.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CinnabarLabMetronomeRoom_h:
- db LAB ; tileset
- db CINNABAR_LAB_METRONOME_ROOM_HEIGHT, CINNABAR_LAB_METRONOME_ROOM_WIDTH ; dimensions (y, x)
- dw CinnabarLabMetronomeRoom_Blocks ; blocks
- dw CinnabarLabMetronomeRoom_TextPointers ; texts
- dw CinnabarLabMetronomeRoom_Script ; scripts
- db 0 ; connections
- dw CinnabarLabMetronomeRoom_Object ; objects
diff --git a/data/mapHeaders/CinnabarLabTradeRoom.asm b/data/mapHeaders/CinnabarLabTradeRoom.asm
deleted file mode 100755
index 1e0ffd0e..00000000
--- a/data/mapHeaders/CinnabarLabTradeRoom.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CinnabarLabTradeRoom_h:
- db LAB ; tileset
- db CINNABAR_LAB_TRADE_ROOM_HEIGHT, CINNABAR_LAB_TRADE_ROOM_WIDTH ; dimensions (y, x)
- dw CinnabarLabTradeRoom_Blocks ; blocks
- dw CinnabarLabTradeRoom_TextPointers ; texts
- dw CinnabarLabTradeRoom_Script ; scripts
- db 0 ; connections
- dw CinnabarLabTradeRoom_Object ; objects
diff --git a/data/mapHeaders/CinnabarMart.asm b/data/mapHeaders/CinnabarMart.asm
deleted file mode 100755
index 5833b2ef..00000000
--- a/data/mapHeaders/CinnabarMart.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CinnabarMart_h:
- db MART ; tileset
- db CINNABAR_MART_HEIGHT, CINNABAR_MART_WIDTH ; dimensions (y, x)
- dw CinnabarMart_Blocks ; blocks
- dw CinnabarMart_TextPointers ; texts
- dw CinnabarMart_Script ; scripts
- db 0 ; connections
- dw CinnabarMart_Object ; objects
diff --git a/data/mapHeaders/CinnabarPokecenter.asm b/data/mapHeaders/CinnabarPokecenter.asm
deleted file mode 100755
index 9c54b9b9..00000000
--- a/data/mapHeaders/CinnabarPokecenter.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CinnabarPokecenter_h:
- db POKECENTER ; tileset
- db CINNABAR_POKECENTER_HEIGHT, CINNABAR_POKECENTER_WIDTH ; dimensions (y, x)
- dw CinnabarPokecenter_Blocks ; blocks
- dw CinnabarPokecenter_TextPointers ; texts
- dw CinnabarPokecenter_Script ; scripts
- db 0 ; connections
- dw CinnabarPokecenter_Object ; objects
diff --git a/data/mapHeaders/Colosseum.asm b/data/mapHeaders/Colosseum.asm
deleted file mode 100755
index 9b106204..00000000
--- a/data/mapHeaders/Colosseum.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Colosseum_h:
- db CLUB ; tileset
- db COLOSSEUM_HEIGHT, COLOSSEUM_WIDTH ; dimensions (y, x)
- dw Colosseum_Blocks ; blocks
- dw Colosseum_TextPointers ; texts
- dw Colosseum_Script ; scripts
- db 0 ; connections
- dw Colosseum_Object ; objects
diff --git a/data/mapHeaders/CopycatsHouse1F.asm b/data/mapHeaders/CopycatsHouse1F.asm
deleted file mode 100755
index f3cfc261..00000000
--- a/data/mapHeaders/CopycatsHouse1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CopycatsHouse1F_h:
- db REDS_HOUSE_1 ; tileset
- db COPYCATS_HOUSE_1F_HEIGHT, COPYCATS_HOUSE_1F_WIDTH ; dimensions (y, x)
- dw CopycatsHouse1F_Blocks ; blocks
- dw CopycatsHouse1F_TextPointers ; texts
- dw CopycatsHouse1F_Script ; scripts
- db 0 ; connections
- dw CopycatsHouse1F_Object ; objects
diff --git a/data/mapHeaders/CopycatsHouse2F.asm b/data/mapHeaders/CopycatsHouse2F.asm
deleted file mode 100755
index 453ba455..00000000
--- a/data/mapHeaders/CopycatsHouse2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-CopycatsHouse2F_h:
- db REDS_HOUSE_2 ; tileset
- db COPYCATS_HOUSE_2F_HEIGHT, COPYCATS_HOUSE_2F_WIDTH ; dimensions (y, x)
- dw CopycatsHouse2F_Blocks ; blocks
- dw CopycatsHouse2F_TextPointers ; texts
- dw CopycatsHouse2F_Script ; scripts
- db 0 ; connections
- dw CopycatsHouse2F_Object ; objects
diff --git a/data/mapHeaders/Daycare.asm b/data/mapHeaders/Daycare.asm
deleted file mode 100755
index 2fb7a771..00000000
--- a/data/mapHeaders/Daycare.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Daycare_h:
- db HOUSE ; tileset
- db DAYCARE_HEIGHT, DAYCARE_WIDTH ; dimensions (y, x)
- dw Daycare_Blocks ; blocks
- dw Daycare_TextPointers ; texts
- dw Daycare_Script ; scripts
- db 0 ; connections
- dw Daycare_Object ; objects
diff --git a/data/mapHeaders/DiglettsCave.asm b/data/mapHeaders/DiglettsCave.asm
deleted file mode 100755
index 096019de..00000000
--- a/data/mapHeaders/DiglettsCave.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-DiglettsCave_h:
- db CAVERN ; tileset
- db DIGLETTS_CAVE_HEIGHT, DIGLETTS_CAVE_WIDTH ; dimensions (y, x)
- dw DiglettsCave_Blocks ; blocks
- dw DiglettsCave_TextPointers ; texts
- dw DiglettsCave_Script ; scripts
- db 0 ; connections
- dw DiglettsCave_Object ; objects
diff --git a/data/mapHeaders/DiglettsCaveRoute11.asm b/data/mapHeaders/DiglettsCaveRoute11.asm
deleted file mode 100755
index 363859b2..00000000
--- a/data/mapHeaders/DiglettsCaveRoute11.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-DiglettsCaveRoute11_h:
- db CAVERN ; tileset
- db DIGLETTS_CAVE_ROUTE_11_HEIGHT, DIGLETTS_CAVE_ROUTE_11_WIDTH ; dimensions (y, x)
- dw DiglettsCaveRoute11_Blocks ; blocks
- dw DiglettsCaveRoute11_TextPointers ; texts
- dw DiglettsCaveRoute11_Script ; scripts
- db 0 ; connections
- dw DiglettsCaveRoute11_Object ; objects
diff --git a/data/mapHeaders/DiglettsCaveRoute2.asm b/data/mapHeaders/DiglettsCaveRoute2.asm
deleted file mode 100755
index c977415b..00000000
--- a/data/mapHeaders/DiglettsCaveRoute2.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-DiglettsCaveRoute2_h:
- db CAVERN ; tileset
- db DIGLETTS_CAVE_ROUTE_2_HEIGHT, DIGLETTS_CAVE_ROUTE_2_WIDTH ; dimensions (y, x)
- dw DiglettsCaveRoute2_Blocks ; blocks
- dw DiglettsCaveRoute2_TextPointers ; texts
- dw DiglettsCaveRoute2_Script ; scripts
- db 0 ; connections
- dw DiglettsCaveRoute2_Object ; objects
diff --git a/data/mapHeaders/FightingDojo.asm b/data/mapHeaders/FightingDojo.asm
deleted file mode 100755
index 5c802843..00000000
--- a/data/mapHeaders/FightingDojo.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-FightingDojo_h:
- db DOJO ; tileset
- db FIGHTING_DOJO_HEIGHT, FIGHTING_DOJO_WIDTH ; dimensions (y, x)
- dw FightingDojo_Blocks ; blocks
- dw FightingDojo_TextPointers ; texts
- dw FightingDojo_Script ; scripts
- db 0 ; connections
- dw FightingDojo_Object ; objects
diff --git a/data/mapHeaders/FuchsiaBillsGrandpasHouse.asm b/data/mapHeaders/FuchsiaBillsGrandpasHouse.asm
deleted file mode 100755
index bc4fe8e6..00000000
--- a/data/mapHeaders/FuchsiaBillsGrandpasHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-FuchsiaBillsGrandpasHouse_h:
- db HOUSE ; tileset
- db FUCHSIA_BILLS_GRANDPAS_HOUSE_HEIGHT, FUCHSIA_BILLS_GRANDPAS_HOUSE_WIDTH ; dimensions (y, x)
- dw FuchsiaBillsGrandpasHouse_Blocks ; blocks
- dw FuchsiaBillsGrandpasHouse_TextPointers ; texts
- dw FuchsiaBillsGrandpasHouse_Script ; scripts
- db 0 ; connections
- dw FuchsiaBillsGrandpasHouse_Object ; objects
diff --git a/data/mapHeaders/FuchsiaCity.asm b/data/mapHeaders/FuchsiaCity.asm
deleted file mode 100755
index 87398877..00000000
--- a/data/mapHeaders/FuchsiaCity.asm
+++ /dev/null
@@ -1,11 +0,0 @@
-FuchsiaCity_h:
- db OVERWORLD ; tileset
- db FUCHSIA_CITY_HEIGHT, FUCHSIA_CITY_WIDTH ; dimensions (y, x)
- dw FuchsiaCity_Blocks ; blocks
- dw FuchsiaCity_TextPointers ; texts
- dw FuchsiaCity_Script ; scripts
- db SOUTH | WEST | EAST ; connections
- SOUTH_MAP_CONNECTION FUCHSIA_CITY, ROUTE_19, 5, 0, Route19_Blocks
- WEST_MAP_CONNECTION FUCHSIA_CITY, ROUTE_18, 4, 0, Route18_Blocks
- EAST_MAP_CONNECTION FUCHSIA_CITY, ROUTE_15, 4, 0, Route15_Blocks
- dw FuchsiaCity_Object ; objects
diff --git a/data/mapHeaders/FuchsiaGoodRodHouse.asm b/data/mapHeaders/FuchsiaGoodRodHouse.asm
deleted file mode 100755
index 4871970e..00000000
--- a/data/mapHeaders/FuchsiaGoodRodHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-FuchsiaGoodRodHouse_h:
- db SHIP ; tileset
- db FUCHSIA_GOOD_ROD_HOUSE_HEIGHT, FUCHSIA_GOOD_ROD_HOUSE_WIDTH ; dimensions (y, x)
- dw FuchsiaGoodRodHouse_Blocks ; blocks
- dw FuchsiaGoodRodHouse_TextPointers ; texts
- dw FuchsiaGoodRodHouse_Script ; scripts
- db 0 ; connections
- dw FuchsiaGoodRodHouse_Object ; objects
diff --git a/data/mapHeaders/FuchsiaGym.asm b/data/mapHeaders/FuchsiaGym.asm
deleted file mode 100755
index 71ef5960..00000000
--- a/data/mapHeaders/FuchsiaGym.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-FuchsiaGym_h:
- db GYM ; tileset
- db FUCHSIA_GYM_HEIGHT, FUCHSIA_GYM_WIDTH ; dimensions (y, x)
- dw FuchsiaGym_Blocks ; blocks
- dw FuchsiaGym_TextPointers ; texts
- dw FuchsiaGym_Script ; scripts
- db 0 ; connections
- dw FuchsiaGym_Object ; objects
diff --git a/data/mapHeaders/FuchsiaMart.asm b/data/mapHeaders/FuchsiaMart.asm
deleted file mode 100755
index 7c1c34d2..00000000
--- a/data/mapHeaders/FuchsiaMart.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-FuchsiaMart_h:
- db MART ; tileset
- db FUCHSIA_MART_HEIGHT, FUCHSIA_MART_WIDTH ; dimensions (y, x)
- dw FuchsiaMart_Blocks ; blocks
- dw FuchsiaMart_TextPointers ; texts
- dw FuchsiaMart_Script ; scripts
- db 0 ; connections
- dw FuchsiaMart_Object ; objects
diff --git a/data/mapHeaders/FuchsiaMeetingRoom.asm b/data/mapHeaders/FuchsiaMeetingRoom.asm
deleted file mode 100755
index 8bc0cdbf..00000000
--- a/data/mapHeaders/FuchsiaMeetingRoom.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-FuchsiaMeetingRoom_h:
- db LAB ; tileset
- db FUCHSIA_MEETING_ROOM_HEIGHT, FUCHSIA_MEETING_ROOM_WIDTH ; dimensions (y, x)
- dw FuchsiaMeetingRoom_Blocks ; blocks
- dw FuchsiaMeetingRoom_TextPointers ; texts
- dw FuchsiaMeetingRoom_Script ; scripts
- db 0 ; connections
- dw FuchsiaMeetingRoom_Object ; objects
diff --git a/data/mapHeaders/FuchsiaPokecenter.asm b/data/mapHeaders/FuchsiaPokecenter.asm
deleted file mode 100755
index bf654ea6..00000000
--- a/data/mapHeaders/FuchsiaPokecenter.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-FuchsiaPokecenter_h:
- db POKECENTER ; tileset
- db FUCHSIA_POKECENTER_HEIGHT, FUCHSIA_POKECENTER_WIDTH ; dimensions (y, x)
- dw FuchsiaPokecenter_Blocks ; blocks
- dw FuchsiaPokecenter_TextPointers ; texts
- dw FuchsiaPokecenter_Script ; scripts
- db 0 ; connections
- dw FuchsiaPokecenter_Object ; objects
diff --git a/data/mapHeaders/GameCorner.asm b/data/mapHeaders/GameCorner.asm
deleted file mode 100755
index c8b69724..00000000
--- a/data/mapHeaders/GameCorner.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-GameCorner_h:
- db LOBBY ; tileset
- db GAME_CORNER_HEIGHT, GAME_CORNER_WIDTH ; dimensions (y, x)
- dw GameCorner_Blocks ; blocks
- dw GameCorner_TextPointers ; texts
- dw GameCorner_Script ; scripts
- db 0 ; connections
- dw GameCorner_Object ; objects
diff --git a/data/mapHeaders/GameCornerPrizeRoom.asm b/data/mapHeaders/GameCornerPrizeRoom.asm
deleted file mode 100755
index e43d2ec7..00000000
--- a/data/mapHeaders/GameCornerPrizeRoom.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-GameCornerPrizeRoom_h:
- db LOBBY ; tileset
- db GAME_CORNER_PRIZE_ROOM_HEIGHT, GAME_CORNER_PRIZE_ROOM_WIDTH ; dimensions (y, x)
- dw GameCornerPrizeRoom_Blocks ; blocks
- dw GameCornerPrizeRoom_TextPointers ; texts
- dw GameCornerPrizeRoom_Script ; scripts
- db 0 ; connections
- dw GameCornerPrizeRoom_Object ; objects
diff --git a/data/mapHeaders/HallOfFame.asm b/data/mapHeaders/HallOfFame.asm
deleted file mode 100755
index e7f7a982..00000000
--- a/data/mapHeaders/HallOfFame.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-HallOfFame_h:
- db GYM ; tileset
- db HALL_OF_FAME_HEIGHT, HALL_OF_FAME_WIDTH ; dimensions (y, x)
- dw HallOfFame_Blocks ; blocks
- dw HallOfFame_TextPointers ; texts
- dw HallOfFame_Script ; scripts
- db 0 ; connections
- dw HallOfFame_Object ; objects
diff --git a/data/mapHeaders/IndigoPlateau.asm b/data/mapHeaders/IndigoPlateau.asm
deleted file mode 100755
index ee8b2f0c..00000000
--- a/data/mapHeaders/IndigoPlateau.asm
+++ /dev/null
@@ -1,9 +0,0 @@
-IndigoPlateau_h:
- db PLATEAU ; tileset
- db INDIGO_PLATEAU_HEIGHT, INDIGO_PLATEAU_WIDTH ; dimensions (y, x)
- dw IndigoPlateau_Blocks ; blocks
- dw IndigoPlateau_TextPointers ; texts
- dw IndigoPlateau_Script ; scripts
- db SOUTH ; connections
- SOUTH_MAP_CONNECTION INDIGO_PLATEAU, ROUTE_23, 0, 0, Route23_Blocks
- dw IndigoPlateau_Object ; objects
diff --git a/data/mapHeaders/IndigoPlateauLobby.asm b/data/mapHeaders/IndigoPlateauLobby.asm
deleted file mode 100755
index f099c87d..00000000
--- a/data/mapHeaders/IndigoPlateauLobby.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-IndigoPlateauLobby_h:
- db MART ; tileset
- db INDIGO_PLATEAU_LOBBY_HEIGHT, INDIGO_PLATEAU_LOBBY_WIDTH ; dimensions (y, x)
- dw IndigoPlateauLobby_Blocks ; blocks
- dw IndigoPlateauLobby_TextPointers ; texts
- dw IndigoPlateauLobby_Script ; scripts
- db 0 ; connections
- dw IndigoPlateauLobby_Object ; objects
diff --git a/data/mapHeaders/LancesRoom.asm b/data/mapHeaders/LancesRoom.asm
deleted file mode 100755
index a9cea4b6..00000000
--- a/data/mapHeaders/LancesRoom.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-LancesRoom_h:
- db DOJO ; tileset
- db LANCES_ROOM_HEIGHT, LANCES_ROOM_WIDTH ; dimensions (y, x)
- dw LancesRoom_Blocks ; blocks
- dw LancesRoom_TextPointers ; texts
- dw LancesRoom_Script ; scripts
- db 0 ; connections
- dw LancesRoom_Object ; objects
diff --git a/data/mapHeaders/LavenderCuboneHouse.asm b/data/mapHeaders/LavenderCuboneHouse.asm
deleted file mode 100755
index 06e9cb40..00000000
--- a/data/mapHeaders/LavenderCuboneHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-LavenderCuboneHouse_h:
- db HOUSE ; tileset
- db LAVENDER_CUBONE_HOUSE_HEIGHT, LAVENDER_CUBONE_HOUSE_WIDTH ; dimensions (y, x)
- dw LavenderCuboneHouse_Blocks ; blocks
- dw LavenderCuboneHouse_TextPointers ; texts
- dw LavenderCuboneHouse_Script ; scripts
- db 0 ; connections
- dw LavenderCuboneHouse_Object ; objects
diff --git a/data/mapHeaders/LavenderMart.asm b/data/mapHeaders/LavenderMart.asm
deleted file mode 100755
index c6869d3c..00000000
--- a/data/mapHeaders/LavenderMart.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-LavenderMart_h:
- db MART ; tileset
- db LAVENDER_MART_HEIGHT, LAVENDER_MART_WIDTH ; dimensions (y, x)
- dw LavenderMart_Blocks ; blocks
- dw LavenderMart_TextPointers ; texts
- dw LavenderMart_Script ; scripts
- db 0 ; connections
- dw LavenderMart_Object ; objects
diff --git a/data/mapHeaders/LavenderPokecenter.asm b/data/mapHeaders/LavenderPokecenter.asm
deleted file mode 100755
index 820e19cd..00000000
--- a/data/mapHeaders/LavenderPokecenter.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-LavenderPokecenter_h:
- db POKECENTER ; tileset
- db LAVENDER_POKECENTER_HEIGHT, LAVENDER_POKECENTER_WIDTH ; dimensions (y, x)
- dw LavenderPokecenter_Blocks ; blocks
- dw LavenderPokecenter_TextPointers ; texts
- dw LavenderPokecenter_Script ; scripts
- db 0 ; connections
- dw LavenderPokecenter_Object ; objects
diff --git a/data/mapHeaders/LavenderTown.asm b/data/mapHeaders/LavenderTown.asm
deleted file mode 100755
index 99c9515d..00000000
--- a/data/mapHeaders/LavenderTown.asm
+++ /dev/null
@@ -1,11 +0,0 @@
-LavenderTown_h:
- db OVERWORLD ; tileset
- db LAVENDER_TOWN_HEIGHT, LAVENDER_TOWN_WIDTH ; dimensions (y, x)
- dw LavenderTown_Blocks ; blocks
- dw LavenderTown_TextPointers ; texts
- dw LavenderTown_Script ; scripts
- db NORTH | SOUTH | WEST ; connections
- NORTH_MAP_CONNECTION LAVENDER_TOWN, ROUTE_10, 0, 0, Route10_Blocks
- SOUTH_MAP_CONNECTION LAVENDER_TOWN, ROUTE_12, 0, 0, Route12_Blocks, 1
- WEST_MAP_CONNECTION LAVENDER_TOWN, ROUTE_8, 0, 0, Route8_Blocks
- dw LavenderTown_Object ; objects
diff --git a/data/mapHeaders/LoreleisRoom.asm b/data/mapHeaders/LoreleisRoom.asm
deleted file mode 100755
index 216b6621..00000000
--- a/data/mapHeaders/LoreleisRoom.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-LoreleisRoom_h:
- db GYM ; tileset
- db LORELEIS_ROOM_HEIGHT, LORELEIS_ROOM_WIDTH ; dimensions (y, x)
- dw LoreleisRoom_Blocks ; blocks
- dw LoreleisRoom_TextPointers ; texts
- dw LoreleisRoom_Script ; scripts
- db 0 ; connections
- dw LoreleisRoom_Object ; objects
diff --git a/data/mapHeaders/MrFujisHouse.asm b/data/mapHeaders/MrFujisHouse.asm
deleted file mode 100755
index 4ae9c5b7..00000000
--- a/data/mapHeaders/MrFujisHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-MrFujisHouse_h:
- db HOUSE ; tileset
- db MR_FUJIS_HOUSE_HEIGHT, MR_FUJIS_HOUSE_WIDTH ; dimensions (y, x)
- dw MrFujisHouse_Blocks ; blocks
- dw MrFujisHouse_TextPointers ; texts
- dw MrFujisHouse_Script ; scripts
- db 0 ; connections
- dw MrFujisHouse_Object ; objects
diff --git a/data/mapHeaders/MrPsychicsHouse.asm b/data/mapHeaders/MrPsychicsHouse.asm
deleted file mode 100755
index 5e4ce91b..00000000
--- a/data/mapHeaders/MrPsychicsHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-MrPsychicsHouse_h:
- db HOUSE ; tileset
- db MR_PSYCHICS_HOUSE_HEIGHT, MR_PSYCHICS_HOUSE_WIDTH ; dimensions (y, x)
- dw MrPsychicsHouse_Blocks ; blocks
- dw MrPsychicsHouse_TextPointers ; texts
- dw MrPsychicsHouse_Script ; scripts
- db 0 ; connections
- dw MrPsychicsHouse_Object ; objects
diff --git a/data/mapHeaders/MtMoon1F.asm b/data/mapHeaders/MtMoon1F.asm
deleted file mode 100755
index 29ce5d6b..00000000
--- a/data/mapHeaders/MtMoon1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-MtMoon1F_h:
- db CAVERN ; tileset
- db MT_MOON_1F_HEIGHT, MT_MOON_1F_WIDTH ; dimensions (y, x)
- dw MtMoon1F_Blocks ; blocks
- dw MtMoon1F_TextPointers ; texts
- dw MtMoon1F_Script ; scripts
- db 0 ; connections
- dw MtMoon1F_Object ; objects
diff --git a/data/mapHeaders/MtMoonB1F.asm b/data/mapHeaders/MtMoonB1F.asm
deleted file mode 100755
index 7ebc3dab..00000000
--- a/data/mapHeaders/MtMoonB1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-MtMoonB1F_h:
- db CAVERN ; tileset
- db MT_MOON_B1F_HEIGHT, MT_MOON_B1F_WIDTH ; dimensions (y, x)
- dw MtMoonB1F_Blocks ; blocks
- dw MtMoonB1F_TextPointers ; texts
- dw MtMoonB1F_Script ; scripts
- db 0 ; connections
- dw MtMoonB1F_Object ; objects
diff --git a/data/mapHeaders/MtMoonB2F.asm b/data/mapHeaders/MtMoonB2F.asm
deleted file mode 100755
index 2ec86247..00000000
--- a/data/mapHeaders/MtMoonB2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-MtMoonB2F_h:
- db CAVERN ; tileset
- db MT_MOON_B2F_HEIGHT, MT_MOON_B2F_WIDTH ; dimensions (y, x)
- dw MtMoonB2F_Blocks ; blocks
- dw MtMoonB2F_TextPointers ; texts
- dw MtMoonB2F_Script ; scripts
- db 0 ; connections
- dw MtMoonB2F_Object ; objects
diff --git a/data/mapHeaders/MtMoonPokecenter.asm b/data/mapHeaders/MtMoonPokecenter.asm
deleted file mode 100755
index c3c014ff..00000000
--- a/data/mapHeaders/MtMoonPokecenter.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-MtMoonPokecenter_h:
- db POKECENTER ; tileset
- db MT_MOON_POKECENTER_HEIGHT, MT_MOON_POKECENTER_WIDTH ; dimensions (y, x)
- dw MtMoonPokecenter_Blocks ; blocks
- dw MtMoonPokecenter_TextPointers ; texts
- dw MtMoonPokecenter_Script ; scripts
- db 0 ; connections
- dw MtMoonPokecenter_Object ; objects
diff --git a/data/mapHeaders/Museum1F.asm b/data/mapHeaders/Museum1F.asm
deleted file mode 100755
index 55625fc4..00000000
--- a/data/mapHeaders/Museum1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Museum1F_h:
- db MUSEUM ; tileset
- db MUSEUM_1F_HEIGHT, MUSEUM_1F_WIDTH ; dimensions (y, x)
- dw Museum1F_Blocks ; blocks
- dw Museum1F_TextPointers ; texts
- dw Museum1F_Script ; scripts
- db 0 ; connections
- dw Museum1F_Object ; objects
diff --git a/data/mapHeaders/Museum2F.asm b/data/mapHeaders/Museum2F.asm
deleted file mode 100755
index b39e161d..00000000
--- a/data/mapHeaders/Museum2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Museum2F_h:
- db MUSEUM ; tileset
- db MUSEUM_2F_HEIGHT, MUSEUM_2F_WIDTH ; dimensions (y, x)
- dw Museum2F_Blocks ; blocks
- dw Museum2F_TextPointers ; texts
- dw Museum2F_Script ; scripts
- db 0 ; connections
- dw Museum2F_Object ; objects
diff --git a/data/mapHeaders/NameRatersHouse.asm b/data/mapHeaders/NameRatersHouse.asm
deleted file mode 100755
index 7e3acee1..00000000
--- a/data/mapHeaders/NameRatersHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-NameRatersHouse_h:
- db HOUSE ; tileset
- db NAME_RATERS_HOUSE_HEIGHT, NAME_RATERS_HOUSE_WIDTH ; dimensions (y, x)
- dw NameRatersHouse_Blocks ; blocks
- dw NameRatersHouse_TextPointers ; texts
- dw NameRatersHouse_Script ; scripts
- db 0 ; connections
- dw NameRatersHouse_Object ; objects
diff --git a/data/mapHeaders/OaksLab.asm b/data/mapHeaders/OaksLab.asm
deleted file mode 100755
index ffbcdd52..00000000
--- a/data/mapHeaders/OaksLab.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-OaksLab_h:
- db DOJO ; tileset
- db OAKS_LAB_HEIGHT, OAKS_LAB_WIDTH ; dimensions (y, x)
- dw OaksLab_Blocks ; blocks
- dw OaksLab_TextPointers ; texts
- dw OaksLab_Script ; scripts
- db 0 ; connections
- dw OaksLab_Object ; objects
diff --git a/data/mapHeaders/PalletTown.asm b/data/mapHeaders/PalletTown.asm
deleted file mode 100755
index eb8525ae..00000000
--- a/data/mapHeaders/PalletTown.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-PalletTown_h:
- db OVERWORLD ; tileset
- db PALLET_TOWN_HEIGHT, PALLET_TOWN_WIDTH ; dimensions (y, x)
- dw PalletTown_Blocks ; blocks
- dw PalletTown_TextPointers ; texts
- dw PalletTown_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION PALLET_TOWN, ROUTE_1, 0, 0, Route1_Blocks
- SOUTH_MAP_CONNECTION PALLET_TOWN, ROUTE_21, 0, 0, Route21_Blocks, 1
- dw PalletTown_Object ; objects
diff --git a/data/mapHeaders/PewterCity.asm b/data/mapHeaders/PewterCity.asm
deleted file mode 100755
index 73610f86..00000000
--- a/data/mapHeaders/PewterCity.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-PewterCity_h:
- db OVERWORLD ; tileset
- db PEWTER_CITY_HEIGHT, PEWTER_CITY_WIDTH ; dimensions (y, x)
- dw PewterCity_Blocks ; blocks
- dw PewterCity_TextPointers ; texts
- dw PewterCity_Script ; scripts
- db SOUTH | EAST ; connections
- SOUTH_MAP_CONNECTION PEWTER_CITY, ROUTE_2, 5, 0, Route2_Blocks
- EAST_MAP_CONNECTION PEWTER_CITY, ROUTE_3, 4, 0, Route3_Blocks
- dw PewterCity_Object ; objects
diff --git a/data/mapHeaders/PewterGym.asm b/data/mapHeaders/PewterGym.asm
deleted file mode 100755
index bb9c2e84..00000000
--- a/data/mapHeaders/PewterGym.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PewterGym_h:
- db GYM ; tileset
- db PEWTER_GYM_HEIGHT, PEWTER_GYM_WIDTH ; dimensions (y, x)
- dw PewterGym_Blocks ; blocks
- dw PewterGym_TextPointers ; texts
- dw PewterGym_Script ; scripts
- db 0 ; connections
- dw PewterGym_Object ; objects
diff --git a/data/mapHeaders/PewterMart.asm b/data/mapHeaders/PewterMart.asm
deleted file mode 100755
index dc8c5c78..00000000
--- a/data/mapHeaders/PewterMart.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PewterMart_h:
- db MART ; tileset
- db PEWTER_MART_HEIGHT, PEWTER_MART_WIDTH ; dimensions (y, x)
- dw PewterMart_Blocks ; blocks
- dw PewterMart_TextPointers ; texts
- dw PewterMart_Script ; scripts
- db 0 ; connections
- dw PewterMart_Object ; objects
diff --git a/data/mapHeaders/PewterNidoranHouse.asm b/data/mapHeaders/PewterNidoranHouse.asm
deleted file mode 100755
index ffab8473..00000000
--- a/data/mapHeaders/PewterNidoranHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PewterNidoranHouse_h:
- db HOUSE ; tileset
- db PEWTER_NIDORAN_HOUSE_HEIGHT, PEWTER_NIDORAN_HOUSE_WIDTH ; dimensions (y, x)
- dw PewterNidoranHouse_Blocks ; blocks
- dw PewterNidoranHouse_TextPointers ; texts
- dw PewterNidoranHouse_Script ; scripts
- db 0 ; connections
- dw PewterNidoranHouse_Object ; objects
diff --git a/data/mapHeaders/PewterPokecenter.asm b/data/mapHeaders/PewterPokecenter.asm
deleted file mode 100755
index 89adbb80..00000000
--- a/data/mapHeaders/PewterPokecenter.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PewterPokecenter_h:
- db POKECENTER ; tileset
- db PEWTER_POKECENTER_HEIGHT, PEWTER_POKECENTER_WIDTH ; dimensions (y, x)
- dw PewterPokecenter_Blocks ; blocks
- dw PewterPokecenter_TextPointers ; texts
- dw PewterPokecenter_Script ; scripts
- db 0 ; connections
- dw PewterPokecenter_Object ; objects
diff --git a/data/mapHeaders/PewterSpeechHouse.asm b/data/mapHeaders/PewterSpeechHouse.asm
deleted file mode 100755
index 7750c8c7..00000000
--- a/data/mapHeaders/PewterSpeechHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PewterSpeechHouse_h:
- db HOUSE ; tileset
- db PEWTER_SPEECH_HOUSE_HEIGHT, PEWTER_SPEECH_HOUSE_WIDTH ; dimensions (y, x)
- dw PewterSpeechHouse_Blocks ; blocks
- dw PewterSpeechHouse_TextPointers ; texts
- dw PewterSpeechHouse_Script ; scripts
- db 0 ; connections
- dw PewterSpeechHouse_Object ; objects
diff --git a/data/mapHeaders/PokemonFanClub.asm b/data/mapHeaders/PokemonFanClub.asm
deleted file mode 100755
index 18ebb923..00000000
--- a/data/mapHeaders/PokemonFanClub.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PokemonFanClub_h:
- db INTERIOR ; tileset
- db POKEMON_FAN_CLUB_HEIGHT, POKEMON_FAN_CLUB_WIDTH ; dimensions (y, x)
- dw PokemonFanClub_Blocks ; blocks
- dw PokemonFanClub_TextPointers ; texts
- dw PokemonFanClub_Script ; scripts
- db 0 ; connections
- dw PokemonFanClub_Object ; objects
diff --git a/data/mapHeaders/PokemonMansion1F.asm b/data/mapHeaders/PokemonMansion1F.asm
deleted file mode 100755
index 357b0cbb..00000000
--- a/data/mapHeaders/PokemonMansion1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PokemonMansion1F_h:
- db FACILITY ; tileset
- db POKEMON_MANSION_1F_HEIGHT, POKEMON_MANSION_1F_WIDTH ; dimensions (y, x)
- dw PokemonMansion1F_Blocks ; blocks
- dw PokemonMansion1F_TextPointers ; texts
- dw PokemonMansion1F_Script ; scripts
- db 0 ; connections
- dw PokemonMansion1F_Object ; objects
diff --git a/data/mapHeaders/PokemonMansion2F.asm b/data/mapHeaders/PokemonMansion2F.asm
deleted file mode 100755
index 71c0e3bb..00000000
--- a/data/mapHeaders/PokemonMansion2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PokemonMansion2F_h:
- db FACILITY ; tileset
- db POKEMON_MANSION_2F_HEIGHT, POKEMON_MANSION_2F_WIDTH ; dimensions (y, x)
- dw PokemonMansion2F_Blocks ; blocks
- dw PokemonMansion2F_TextPointers ; texts
- dw PokemonMansion2F_Script ; scripts
- db 0 ; connections
- dw PokemonMansion2F_Object ; objects
diff --git a/data/mapHeaders/PokemonMansion3F.asm b/data/mapHeaders/PokemonMansion3F.asm
deleted file mode 100755
index fe4076f9..00000000
--- a/data/mapHeaders/PokemonMansion3F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PokemonMansion3F_h:
- db FACILITY ; tileset
- db POKEMON_MANSION_3F_HEIGHT, POKEMON_MANSION_3F_WIDTH ; dimensions (y, x)
- dw PokemonMansion3F_Blocks ; blocks
- dw PokemonMansion3F_TextPointers ; texts
- dw PokemonMansion3F_Script ; scripts
- db 0 ; connections
- dw PokemonMansion3F_Object ; objects
diff --git a/data/mapHeaders/PokemonMansionB1F.asm b/data/mapHeaders/PokemonMansionB1F.asm
deleted file mode 100755
index ccf892b2..00000000
--- a/data/mapHeaders/PokemonMansionB1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PokemonMansionB1F_h:
- db FACILITY ; tileset
- db POKEMON_MANSION_B1F_HEIGHT, POKEMON_MANSION_B1F_WIDTH ; dimensions (y, x)
- dw PokemonMansionB1F_Blocks ; blocks
- dw PokemonMansionB1F_TextPointers ; texts
- dw PokemonMansionB1F_Script ; scripts
- db 0 ; connections
- dw PokemonMansionB1F_Object ; objects
diff --git a/data/mapHeaders/PokemonTower1F.asm b/data/mapHeaders/PokemonTower1F.asm
deleted file mode 100755
index 561274bb..00000000
--- a/data/mapHeaders/PokemonTower1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PokemonTower1F_h:
- db CEMETERY ; tileset
- db POKEMON_TOWER_1F_HEIGHT, POKEMON_TOWER_1F_WIDTH ; dimensions (y, x)
- dw PokemonTower1F_Blocks ; blocks
- dw PokemonTower1F_TextPointers ; texts
- dw PokemonTower1F_Script ; scripts
- db 0 ; connections
- dw PokemonTower1F_Object ; objects
diff --git a/data/mapHeaders/PokemonTower2F.asm b/data/mapHeaders/PokemonTower2F.asm
deleted file mode 100755
index 41e3271e..00000000
--- a/data/mapHeaders/PokemonTower2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PokemonTower2F_h:
- db CEMETERY ; tileset
- db POKEMON_TOWER_2F_HEIGHT, POKEMON_TOWER_2F_WIDTH ; dimensions (y, x)
- dw PokemonTower2F_Blocks ; blocks
- dw PokemonTower2F_TextPointers ; texts
- dw PokemonTower2F_Script ; scripts
- db 0 ; connections
- dw PokemonTower2F_Object ; objects
diff --git a/data/mapHeaders/PokemonTower3F.asm b/data/mapHeaders/PokemonTower3F.asm
deleted file mode 100755
index 932c4a20..00000000
--- a/data/mapHeaders/PokemonTower3F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PokemonTower3F_h:
- db CEMETERY ; tileset
- db POKEMON_TOWER_3F_HEIGHT, POKEMON_TOWER_3F_WIDTH ; dimensions (y, x)
- dw PokemonTower3F_Blocks ; blocks
- dw PokemonTower3F_TextPointers ; texts
- dw PokemonTower3F_Script ; scripts
- db 0 ; connections
- dw PokemonTower3F_Object ; objects
diff --git a/data/mapHeaders/PokemonTower4F.asm b/data/mapHeaders/PokemonTower4F.asm
deleted file mode 100755
index b3027cb0..00000000
--- a/data/mapHeaders/PokemonTower4F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PokemonTower4F_h:
- db CEMETERY ; tileset
- db POKEMON_TOWER_4F_HEIGHT, POKEMON_TOWER_4F_WIDTH ; dimensions (y, x)
- dw PokemonTower4F_Blocks ; blocks
- dw PokemonTower4F_TextPointers ; texts
- dw PokemonTower4F_Script ; scripts
- db 0 ; connections
- dw PokemonTower4F_Object ; objects
diff --git a/data/mapHeaders/PokemonTower5F.asm b/data/mapHeaders/PokemonTower5F.asm
deleted file mode 100755
index 9452c553..00000000
--- a/data/mapHeaders/PokemonTower5F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PokemonTower5F_h:
- db CEMETERY ; tileset
- db POKEMON_TOWER_5F_HEIGHT, POKEMON_TOWER_5F_WIDTH ; dimensions (y, x)
- dw PokemonTower5F_Blocks ; blocks
- dw PokemonTower5F_TextPointers ; texts
- dw PokemonTower5F_Script ; scripts
- db 0 ; connections
- dw PokemonTower5F_Object ; objects
diff --git a/data/mapHeaders/PokemonTower6F.asm b/data/mapHeaders/PokemonTower6F.asm
deleted file mode 100755
index 336c8f66..00000000
--- a/data/mapHeaders/PokemonTower6F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PokemonTower6F_h:
- db CEMETERY ; tileset
- db POKEMON_TOWER_6F_HEIGHT, POKEMON_TOWER_6F_WIDTH ; dimensions (y, x)
- dw PokemonTower6F_Blocks ; blocks
- dw PokemonTower6F_TextPointers ; texts
- dw PokemonTower6F_Script ; scripts
- db 0 ; connections
- dw PokemonTower6F_Object ; objects
diff --git a/data/mapHeaders/PokemonTower7F.asm b/data/mapHeaders/PokemonTower7F.asm
deleted file mode 100755
index da10fa53..00000000
--- a/data/mapHeaders/PokemonTower7F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PokemonTower7F_h:
- db CEMETERY ; tileset
- db POKEMON_TOWER_7F_HEIGHT, POKEMON_TOWER_7F_WIDTH ; dimensions (y, x)
- dw PokemonTower7F_Blocks ; blocks
- dw PokemonTower7F_TextPointers ; texts
- dw PokemonTower7F_Script ; scripts
- db 0 ; connections
- dw PokemonTower7F_Object ; objects
diff --git a/data/mapHeaders/PowerPlant.asm b/data/mapHeaders/PowerPlant.asm
deleted file mode 100755
index 91f03d63..00000000
--- a/data/mapHeaders/PowerPlant.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PowerPlant_h:
- db FACILITY ; tileset
- db POWER_PLANT_HEIGHT, POWER_PLANT_WIDTH ; dimensions (y, x)
- dw PowerPlant_Blocks ; blocks
- dw PowerPlant_TextPointers ; texts
- dw PowerPlant_Script ; scripts
- db 0 ; connections
- dw PowerPlant_Object ; objects
diff --git a/data/mapHeaders/RedsHouse1F.asm b/data/mapHeaders/RedsHouse1F.asm
deleted file mode 100755
index c9acc489..00000000
--- a/data/mapHeaders/RedsHouse1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-RedsHouse1F_h:
- db REDS_HOUSE_1 ; tileset
- db REDS_HOUSE_1F_HEIGHT, REDS_HOUSE_1F_WIDTH ; dimensions (y, x)
- dw RedsHouse1F_Blocks ; blocks
- dw RedsHouse1F_TextPointers ; texts
- dw RedsHouse1F_Script ; scripts
- db 0 ; connections
- dw RedsHouse1F_Object ; objects
diff --git a/data/mapHeaders/RedsHouse2F.asm b/data/mapHeaders/RedsHouse2F.asm
deleted file mode 100755
index 42215466..00000000
--- a/data/mapHeaders/RedsHouse2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-RedsHouse2F_h:
- db REDS_HOUSE_2 ; tileset
- db REDS_HOUSE_2F_HEIGHT, REDS_HOUSE_2F_WIDTH ; dimensions (y, x)
- dw RedsHouse2F_Blocks ; blocks
- dw RedsHouse2F_TextPointers ; texts
- dw RedsHouse2F_Script ; scripts
- db $00 ; connections
- dw RedsHouse2F_Object ; objects
diff --git a/data/mapHeaders/RockTunnel1F.asm b/data/mapHeaders/RockTunnel1F.asm
deleted file mode 100755
index dd552ac9..00000000
--- a/data/mapHeaders/RockTunnel1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-RockTunnel1F_h:
- db CAVERN ; tileset
- db ROCK_TUNNEL_1F_HEIGHT, ROCK_TUNNEL_1F_WIDTH ; dimensions (y, x)
- dw RockTunnel1F_Blocks ; blocks
- dw RockTunnel1F_TextPointers ; texts
- dw RockTunnel1F_Script ; scripts
- db 0 ; connections
- dw RockTunnel1F_Object ; objects
diff --git a/data/mapHeaders/RockTunnelB1F.asm b/data/mapHeaders/RockTunnelB1F.asm
deleted file mode 100755
index 4e765f20..00000000
--- a/data/mapHeaders/RockTunnelB1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-RockTunnelB1F_h:
- db CAVERN ; tileset
- db ROCK_TUNNEL_B1F_HEIGHT, ROCK_TUNNEL_B1F_WIDTH ; dimensions (y, x)
- dw RockTunnelB1F_Blocks ; blocks
- dw RockTunnelB1F_TextPointers ; texts
- dw RockTunnelB1F_Script ; scripts
- db 0 ; connections
- dw RockTunnelB1F_Object ; objects
diff --git a/data/mapHeaders/RockTunnelPokecenter.asm b/data/mapHeaders/RockTunnelPokecenter.asm
deleted file mode 100755
index ac29f1cf..00000000
--- a/data/mapHeaders/RockTunnelPokecenter.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-RockTunnelPokecenter_h:
- db POKECENTER ; tileset
- db ROCK_TUNNEL_POKECENTER_HEIGHT, ROCK_TUNNEL_POKECENTER_WIDTH ; dimensions (y, x)
- dw RockTunnelPokecenter_Blocks ; blocks
- dw RockTunnelPokecenter_TextPointers ; texts
- dw RockTunnelPokecenter_Script ; scripts
- db 0 ; connections
- dw RockTunnelPokecenter_Object ; objects
diff --git a/data/mapHeaders/RocketHideoutB1F.asm b/data/mapHeaders/RocketHideoutB1F.asm
deleted file mode 100755
index 3c842f1e..00000000
--- a/data/mapHeaders/RocketHideoutB1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-RocketHideoutB1F_h:
- db FACILITY ; tileset
- db ROCKET_HIDEOUT_B1F_HEIGHT, ROCKET_HIDEOUT_B1F_WIDTH ; dimensions (y, x)
- dw RocketHideoutB1F_Blocks ; blocks
- dw RocketHideoutB1F_TextPointers ; texts
- dw RocketHideoutB1F_Script ; scripts
- db 0 ; connections
- dw RocketHideoutB1F_Object ; objects
diff --git a/data/mapHeaders/RocketHideoutB2F.asm b/data/mapHeaders/RocketHideoutB2F.asm
deleted file mode 100755
index b570c2a6..00000000
--- a/data/mapHeaders/RocketHideoutB2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-RocketHideoutB2F_h:
- db FACILITY ; tileset
- db ROCKET_HIDEOUT_B2F_HEIGHT, ROCKET_HIDEOUT_B2F_WIDTH ; dimensions (y, x)
- dw RocketHideoutB2F_Blocks ; blocks
- dw RocketHideoutB2F_TextPointers ; texts
- dw RocketHideoutB2F_Script ; scripts
- db 0 ; connections
- dw RocketHideoutB2F_Object ; objects
diff --git a/data/mapHeaders/RocketHideoutB3F.asm b/data/mapHeaders/RocketHideoutB3F.asm
deleted file mode 100755
index 7eab257e..00000000
--- a/data/mapHeaders/RocketHideoutB3F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-RocketHideoutB3F_h:
- db FACILITY ; tileset
- db ROCKET_HIDEOUT_B3F_HEIGHT, ROCKET_HIDEOUT_B3F_WIDTH ; dimensions (y, x)
- dw RocketHideoutB3F_Blocks ; blocks
- dw RocketHideoutB3F_TextPointers ; texts
- dw RocketHideoutB3F_Script ; scripts
- db 0 ; connections
- dw RocketHideoutB3F_Object ; objects
diff --git a/data/mapHeaders/RocketHideoutB4F.asm b/data/mapHeaders/RocketHideoutB4F.asm
deleted file mode 100755
index 57797c56..00000000
--- a/data/mapHeaders/RocketHideoutB4F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-RocketHideoutB4F_h:
- db FACILITY ; tileset
- db ROCKET_HIDEOUT_B4F_HEIGHT, ROCKET_HIDEOUT_B4F_WIDTH ; dimensions (y, x)
- dw RocketHideoutB4F_Blocks ; blocks
- dw RocketHideoutB4F_TextPointers ; texts
- dw RocketHideoutB4F_Script ; scripts
- db 0 ; connections
- dw RocketHideoutB4F_Object ; objects
diff --git a/data/mapHeaders/RocketHideoutElevator.asm b/data/mapHeaders/RocketHideoutElevator.asm
deleted file mode 100755
index 742d0038..00000000
--- a/data/mapHeaders/RocketHideoutElevator.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-RocketHideoutElevator_h:
- db LOBBY ; tileset
- db ROCKET_HIDEOUT_ELEVATOR_HEIGHT, ROCKET_HIDEOUT_ELEVATOR_WIDTH ; dimensions (y, x)
- dw RocketHideoutElevator_Blocks ; blocks
- dw RocketHideoutElevator_TextPointers ; texts
- dw RocketHideoutElevator_Script ; scripts
- db 0 ; connections
- dw RocketHideoutElevator_Object ; objects
diff --git a/data/mapHeaders/Route1.asm b/data/mapHeaders/Route1.asm
deleted file mode 100755
index ce460937..00000000
--- a/data/mapHeaders/Route1.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route1_h:
- db OVERWORLD ; tileset
- db ROUTE_1_HEIGHT, ROUTE_1_WIDTH ; dimensions (y, x)
- dw Route1_Blocks ; blocks
- dw Route1_TextPointers ; texts
- dw Route1_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_1, VIRIDIAN_CITY, -3, 2, ViridianCity_Blocks
- SOUTH_MAP_CONNECTION ROUTE_1, PALLET_TOWN, 0, 0, PalletTown_Blocks, 1
- dw Route1_Object ; objects
diff --git a/data/mapHeaders/Route10.asm b/data/mapHeaders/Route10.asm
deleted file mode 100755
index 8c51bfc6..00000000
--- a/data/mapHeaders/Route10.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route10_h:
- db OVERWORLD ; tileset
- db ROUTE_10_HEIGHT, ROUTE_10_WIDTH ; dimensions (y, x)
- dw Route10_Blocks ; blocks
- dw Route10_TextPointers ; texts
- dw Route10_Script ; scripts
- db SOUTH | WEST ; connections
- SOUTH_MAP_CONNECTION ROUTE_10, LAVENDER_TOWN, 0, 0, LavenderTown_Blocks
- WEST_MAP_CONNECTION ROUTE_10, ROUTE_9, 0, 0, Route9_Blocks
- dw Route10_Object ; objects
diff --git a/data/mapHeaders/Route11.asm b/data/mapHeaders/Route11.asm
deleted file mode 100755
index b7814465..00000000
--- a/data/mapHeaders/Route11.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route11_h:
- db OVERWORLD ; tileset
- db ROUTE_11_HEIGHT, ROUTE_11_WIDTH ; dimensions (y, x)
- dw Route11_Blocks ; blocks
- dw Route11_TextPointers ; texts
- dw Route11_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_11, VERMILION_CITY, -3, 1, VermilionCity_Blocks
- EAST_MAP_CONNECTION ROUTE_11, ROUTE_12, -3, 24, Route12_Blocks, 1
- dw Route11_Object ; objects
diff --git a/data/mapHeaders/Route11Gate1F.asm b/data/mapHeaders/Route11Gate1F.asm
deleted file mode 100755
index 2e01d168..00000000
--- a/data/mapHeaders/Route11Gate1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route11Gate1F_h:
- db GATE ; tileset
- db ROUTE_11_GATE_1F_HEIGHT, ROUTE_11_GATE_1F_WIDTH ; dimensions (y, x)
- dw Route11Gate1F_Blocks ; blocks
- dw Route11Gate1F_TextPointers ; texts
- dw Route11Gate1F_Script ; scripts
- db 0 ; connections
- dw Route11Gate1F_Object ; objects
diff --git a/data/mapHeaders/Route11Gate2F.asm b/data/mapHeaders/Route11Gate2F.asm
deleted file mode 100755
index ecb2ab7c..00000000
--- a/data/mapHeaders/Route11Gate2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route11Gate2F_h:
- db GATE ; tileset
- db ROUTE_11_GATE_2F_HEIGHT, ROUTE_11_GATE_2F_WIDTH ; dimensions (y, x)
- dw Route11Gate2F_Blocks ; blocks
- dw Route11Gate2F_TextPointers ; texts
- dw Route11Gate2F_Script ; scripts
- db 0 ; connections
- dw Route11Gate2F_Object ; objects
diff --git a/data/mapHeaders/Route12.asm b/data/mapHeaders/Route12.asm
deleted file mode 100755
index 2f76aa27..00000000
--- a/data/mapHeaders/Route12.asm
+++ /dev/null
@@ -1,11 +0,0 @@
-Route12_h:
- db OVERWORLD ; tileset
- db ROUTE_12_HEIGHT, ROUTE_12_WIDTH ; dimensions (y, x)
- dw Route12_Blocks ; blocks
- dw Route12_TextPointers ; texts
- dw Route12_Script ; scripts
- db NORTH | SOUTH | WEST ; connections
- NORTH_MAP_CONNECTION ROUTE_12, LAVENDER_TOWN, 0, 0, LavenderTown_Blocks
- SOUTH_MAP_CONNECTION ROUTE_12, ROUTE_13, -3, 17, Route13_Blocks
- WEST_MAP_CONNECTION ROUTE_12, ROUTE_11, 27, 0, Route11_Blocks
- dw Route12_Object ; objects
diff --git a/data/mapHeaders/Route12Gate1F.asm b/data/mapHeaders/Route12Gate1F.asm
deleted file mode 100755
index e44aecab..00000000
--- a/data/mapHeaders/Route12Gate1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route12Gate1F_h:
- db GATE ; tileset
- db ROUTE_12_GATE_1F_HEIGHT, ROUTE_12_GATE_1F_WIDTH ; dimensions (y, x)
- dw Route12Gate1F_Blocks ; blocks
- dw Route12Gate1F_TextPointers ; texts
- dw Route12Gate1F_Script ; scripts
- db 0 ; connections
- dw Route12Gate1F_Object ; objects
diff --git a/data/mapHeaders/Route12Gate2F.asm b/data/mapHeaders/Route12Gate2F.asm
deleted file mode 100755
index 94d5d54c..00000000
--- a/data/mapHeaders/Route12Gate2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route12Gate2F_h:
- db GATE ; tileset
- db ROUTE_12_GATE_2F_HEIGHT, ROUTE_12_GATE_2F_WIDTH ; dimensions (y, x)
- dw Route12Gate2F_Blocks ; blocks
- dw Route12Gate2F_TextPointers ; texts
- dw Route12Gate2F_Script ; scripts
- db 0 ; connections
- dw Route12Gate2F_Object ; objects
diff --git a/data/mapHeaders/Route12SuperRodHouse.asm b/data/mapHeaders/Route12SuperRodHouse.asm
deleted file mode 100755
index ef5e0f2c..00000000
--- a/data/mapHeaders/Route12SuperRodHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route12SuperRodHouse_h:
- db HOUSE ; tileset
- db ROUTE_12_SUPER_ROD_HOUSE_HEIGHT, ROUTE_12_SUPER_ROD_HOUSE_WIDTH ; dimensions (y, x)
- dw Route12SuperRodHouse_Blocks ; blocks
- dw Route12SuperRodHouse_TextPointers ; texts
- dw Route12SuperRodHouse_Script ; scripts
- db 0 ; connections
- dw Route12SuperRodHouse_Object ; objects
diff --git a/data/mapHeaders/Route13.asm b/data/mapHeaders/Route13.asm
deleted file mode 100755
index e6e244b9..00000000
--- a/data/mapHeaders/Route13.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route13_h:
- db OVERWORLD ; tileset
- db ROUTE_13_HEIGHT, ROUTE_13_WIDTH ; dimensions (y, x)
- dw Route13_Blocks ; blocks
- dw Route13_TextPointers ; texts
- dw Route13_Script ; scripts
- db NORTH | WEST ; connections
- NORTH_MAP_CONNECTION ROUTE_13, ROUTE_12, 20, 0, Route12_Blocks
- WEST_MAP_CONNECTION ROUTE_13, ROUTE_14, 0, 0, Route14_Blocks
- dw Route13_Object ; objects
diff --git a/data/mapHeaders/Route14.asm b/data/mapHeaders/Route14.asm
deleted file mode 100755
index c3934ac5..00000000
--- a/data/mapHeaders/Route14.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route14_h:
- db OVERWORLD ; tileset
- db ROUTE_14_HEIGHT, ROUTE_14_WIDTH ; dimensions (y, x)
- dw Route14_Blocks ; blocks
- dw Route14_TextPointers ; texts
- dw Route14_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_14, ROUTE_15, 18, 0, Route15_Blocks
- EAST_MAP_CONNECTION ROUTE_14, ROUTE_13, 0, 0, Route13_Blocks
- dw Route14_Object ; objects
diff --git a/data/mapHeaders/Route15.asm b/data/mapHeaders/Route15.asm
deleted file mode 100755
index eb14d750..00000000
--- a/data/mapHeaders/Route15.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route15_h:
- db OVERWORLD ; tileset
- db ROUTE_15_HEIGHT, ROUTE_15_WIDTH ; dimensions (y, x)
- dw Route15_Blocks ; blocks
- dw Route15_TextPointers ; texts
- dw Route15_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_15, FUCHSIA_CITY, -3, 1, FuchsiaCity_Blocks
- EAST_MAP_CONNECTION ROUTE_15, ROUTE_14, -3, 15, Route14_Blocks
- dw Route15_Object ; objects
diff --git a/data/mapHeaders/Route15Gate1F.asm b/data/mapHeaders/Route15Gate1F.asm
deleted file mode 100755
index b1ae5662..00000000
--- a/data/mapHeaders/Route15Gate1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route15Gate1F_h:
- db GATE ; tileset
- db ROUTE_15_GATE_1F_HEIGHT, ROUTE_15_GATE_1F_WIDTH ; dimensions (y, x)
- dw Route15Gate1F_Blocks ; blocks
- dw Route15Gate1F_TextPointers ; texts
- dw Route15Gate1F_Script ; scripts
- db 0 ; connections
- dw Route15Gate1F_Object ; objects
diff --git a/data/mapHeaders/Route15Gate2F.asm b/data/mapHeaders/Route15Gate2F.asm
deleted file mode 100755
index 501da092..00000000
--- a/data/mapHeaders/Route15Gate2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route15Gate2F_h:
- db GATE ; tileset
- db ROUTE_15_GATE_2F_HEIGHT, ROUTE_15_GATE_2F_WIDTH ; dimensions (y, x)
- dw Route15Gate2F_Blocks ; blocks
- dw Route15Gate2F_TextPointers ; texts
- dw Route15Gate2F_Script ; scripts
- db 0 ; connections
- dw Route15Gate2F_Object ; objects
diff --git a/data/mapHeaders/Route16.asm b/data/mapHeaders/Route16.asm
deleted file mode 100755
index d12b6ea9..00000000
--- a/data/mapHeaders/Route16.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route16_h:
- db OVERWORLD ; tileset
- db ROUTE_16_HEIGHT, ROUTE_16_WIDTH ; dimensions (y, x)
- dw Route16_Blocks ; blocks
- dw Route16_TextPointers ; texts
- dw Route16_Script ; scripts
- db SOUTH | EAST ; connections
- SOUTH_MAP_CONNECTION ROUTE_16, ROUTE_17, 0, 0, Route17_Blocks
- EAST_MAP_CONNECTION ROUTE_16, CELADON_CITY, -3, 1, CeladonCity_Blocks, 1
- dw Route16_Object ; objects
diff --git a/data/mapHeaders/Route16FlyHouse.asm b/data/mapHeaders/Route16FlyHouse.asm
deleted file mode 100755
index 0d3f828d..00000000
--- a/data/mapHeaders/Route16FlyHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route16FlyHouse_h:
- db HOUSE ; tileset
- db ROUTE_16_FLY_HOUSE_HEIGHT, ROUTE_16_FLY_HOUSE_WIDTH ; dimensions (y, x)
- dw Route16FlyHouse_Blocks ; blocks
- dw Route16FlyHouse_TextPointers ; texts
- dw Route16FlyHouse_Script ; scripts
- db 0 ; connections
- dw Route16FlyHouse_Object ; objects
diff --git a/data/mapHeaders/Route16Gate1F.asm b/data/mapHeaders/Route16Gate1F.asm
deleted file mode 100755
index 561fb597..00000000
--- a/data/mapHeaders/Route16Gate1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route16Gate1F_h:
- db GATE ; tileset
- db ROUTE_16_GATE_1F_HEIGHT, ROUTE_16_GATE_1F_WIDTH ; dimensions (y, x)
- dw Route16Gate1F_Blocks ; blocks
- dw Route16Gate1F_TextPointers ; texts
- dw Route16Gate1F_Script ; scripts
- db 0 ; connections
- dw Route16Gate1F_Object ; objects
diff --git a/data/mapHeaders/Route16Gate2F.asm b/data/mapHeaders/Route16Gate2F.asm
deleted file mode 100755
index 90783ab7..00000000
--- a/data/mapHeaders/Route16Gate2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route16Gate2F_h:
- db GATE ; tileset
- db ROUTE_16_GATE_2F_HEIGHT, ROUTE_16_GATE_2F_WIDTH ; dimensions (y, x)
- dw Route16Gate2F_Blocks ; blocks
- dw Route16Gate2F_TextPointers ; texts
- dw Route16Gate2F_Script ; scripts
- db 0 ; connections
- dw Route16Gate2F_Object ; objects
diff --git a/data/mapHeaders/Route17.asm b/data/mapHeaders/Route17.asm
deleted file mode 100755
index 58a785b4..00000000
--- a/data/mapHeaders/Route17.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route17_h:
- db OVERWORLD ; tileset
- db ROUTE_17_HEIGHT, ROUTE_17_WIDTH ; dimensions (y, x)
- dw Route17_Blocks ; blocks
- dw Route17_TextPointers ; texts
- dw Route17_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_17, ROUTE_16, 0, 0, Route16_Blocks
- SOUTH_MAP_CONNECTION ROUTE_17, ROUTE_18, 0, 0, Route18_Blocks, 1
- dw Route17_Object ; objects
diff --git a/data/mapHeaders/Route18.asm b/data/mapHeaders/Route18.asm
deleted file mode 100755
index 5e10bdbd..00000000
--- a/data/mapHeaders/Route18.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route18_h:
- db OVERWORLD ; tileset
- db ROUTE_18_HEIGHT, ROUTE_18_WIDTH ; dimensions (y, x)
- dw Route18_Blocks ; blocks
- dw Route18_TextPointers ; texts
- dw Route18_Script ; scripts
- db NORTH | EAST ; connections
- NORTH_MAP_CONNECTION ROUTE_18, ROUTE_17, 0, 0, Route17_Blocks
- EAST_MAP_CONNECTION ROUTE_18, FUCHSIA_CITY, -3, 1, FuchsiaCity_Blocks, 1
- dw Route18_Object ; objects
diff --git a/data/mapHeaders/Route18Gate1F.asm b/data/mapHeaders/Route18Gate1F.asm
deleted file mode 100755
index 0e4a0dc3..00000000
--- a/data/mapHeaders/Route18Gate1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route18Gate1F_h:
- db GATE ; tileset
- db ROUTE_18_GATE_1F_HEIGHT, ROUTE_18_GATE_1F_WIDTH ; dimensions (y, x)
- dw Route18Gate1F_Blocks ; blocks
- dw Route18Gate1F_TextPointers ; texts
- dw Route18Gate1F_Script ; scripts
- db 0 ; connections
- dw Route18Gate1F_Object ; objects
diff --git a/data/mapHeaders/Route18Gate2F.asm b/data/mapHeaders/Route18Gate2F.asm
deleted file mode 100755
index 5d8f7126..00000000
--- a/data/mapHeaders/Route18Gate2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route18Gate2F_h:
- db GATE ; tileset
- db ROUTE_18_GATE_2F_HEIGHT, ROUTE_18_GATE_2F_WIDTH ; dimensions (y, x)
- dw Route18Gate2F_Blocks ; blocks
- dw Route18Gate2F_TextPointers ; texts
- dw Route18Gate2F_Script ; scripts
- db 0 ; connections
- dw Route18Gate2F_Object ; objects
diff --git a/data/mapHeaders/Route19.asm b/data/mapHeaders/Route19.asm
deleted file mode 100755
index 79972677..00000000
--- a/data/mapHeaders/Route19.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route19_h:
- db OVERWORLD ; tileset
- db ROUTE_19_HEIGHT, ROUTE_19_WIDTH ; dimensions (y, x)
- dw Route19_Blocks ; blocks
- dw Route19_TextPointers ; texts
- dw Route19_Script ; scripts
- db NORTH | WEST ; connections
- NORTH_MAP_CONNECTION ROUTE_19, FUCHSIA_CITY, -3, 2, FuchsiaCity_Blocks
- WEST_MAP_CONNECTION ROUTE_19, ROUTE_20, 18, 0, Route20_Blocks
- dw Route19_Object ; objects
diff --git a/data/mapHeaders/Route2.asm b/data/mapHeaders/Route2.asm
deleted file mode 100755
index 94511d06..00000000
--- a/data/mapHeaders/Route2.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route2_h:
- db OVERWORLD ; tileset
- db ROUTE_2_HEIGHT, ROUTE_2_WIDTH ; dimensions (y, x)
- dw Route2_Blocks ; blocks
- dw Route2_TextPointers ; texts
- dw Route2_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_2, PEWTER_CITY, -3, 2, PewterCity_Blocks
- SOUTH_MAP_CONNECTION ROUTE_2, VIRIDIAN_CITY, -3, 2, ViridianCity_Blocks, 1
- dw Route2_Object ; objects
diff --git a/data/mapHeaders/Route20.asm b/data/mapHeaders/Route20.asm
deleted file mode 100755
index 689f51cd..00000000
--- a/data/mapHeaders/Route20.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route20_h:
- db OVERWORLD ; tileset
- db ROUTE_20_HEIGHT, ROUTE_20_WIDTH ; dimensions (y, x)
- dw Route20_Blocks ; blocks
- dw Route20_TextPointers ; texts
- dw Route20_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_20, CINNABAR_ISLAND, 0, 0, CinnabarIsland_Blocks
- EAST_MAP_CONNECTION ROUTE_20, ROUTE_19, -3, 15, Route19_Blocks
- dw Route20_Object ; objects
diff --git a/data/mapHeaders/Route21.asm b/data/mapHeaders/Route21.asm
deleted file mode 100755
index f37869dc..00000000
--- a/data/mapHeaders/Route21.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route21_h:
- db OVERWORLD ; tileset
- db ROUTE_21_HEIGHT, ROUTE_21_WIDTH ; dimensions (y, x)
- dw Route21_Blocks ; blocks
- dw Route21_TextPointers ; texts
- dw Route21_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_21, PALLET_TOWN, 0, 0, PalletTown_Blocks
- SOUTH_MAP_CONNECTION ROUTE_21, CINNABAR_ISLAND, 0, 0, CinnabarIsland_Blocks, 1
- dw Route21_Object ; objects
diff --git a/data/mapHeaders/Route22.asm b/data/mapHeaders/Route22.asm
deleted file mode 100755
index 4d07475f..00000000
--- a/data/mapHeaders/Route22.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route22_h:
- db OVERWORLD ; tileset
- db ROUTE_22_HEIGHT, ROUTE_22_WIDTH ; dimensions (y, x)
- dw Route22_Blocks ; blocks
- dw Route22_TextPointers ; texts
- dw Route22_Script ; scripts
- db NORTH | EAST ; connections
- NORTH_MAP_CONNECTION ROUTE_22, ROUTE_23, 0, 0, Route23_Blocks
- EAST_MAP_CONNECTION ROUTE_22, VIRIDIAN_CITY, -3, 1, ViridianCity_Blocks, 1
- dw Route22_Object ; objects
diff --git a/data/mapHeaders/Route22Gate.asm b/data/mapHeaders/Route22Gate.asm
deleted file mode 100755
index 4d3ae0cc..00000000
--- a/data/mapHeaders/Route22Gate.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route22Gate_h:
- db GATE ; tileset
- db ROUTE_22_GATE_HEIGHT, ROUTE_22_GATE_WIDTH ; dimensions (y, x)
- dw Route22Gate_Blocks ; blocks
- dw Route22Gate_TextPointers ; texts
- dw Route22Gate_Script ; scripts
- db 0 ; connections
- dw Route22Gate_Object ; objects
diff --git a/data/mapHeaders/Route23.asm b/data/mapHeaders/Route23.asm
deleted file mode 100755
index 6b1fde97..00000000
--- a/data/mapHeaders/Route23.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route23_h:
- db PLATEAU ; tileset
- db ROUTE_23_HEIGHT, ROUTE_23_WIDTH ; dimensions (y, x)
- dw Route23_Blocks ; blocks
- dw Route23_TextPointers ; texts
- dw Route23_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_23, INDIGO_PLATEAU, 0, 0, IndigoPlateau_Blocks
- SOUTH_MAP_CONNECTION ROUTE_23, ROUTE_22, 0, 0, Route22_Blocks, 1
- dw Route23_Object ; objects
diff --git a/data/mapHeaders/Route24.asm b/data/mapHeaders/Route24.asm
deleted file mode 100755
index 87776f60..00000000
--- a/data/mapHeaders/Route24.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route24_h:
- db OVERWORLD ; tileset
- db ROUTE_24_HEIGHT, ROUTE_24_WIDTH ; dimensions (y, x)
- dw Route24_Blocks ; blocks
- dw Route24_TextPointers ; texts
- dw Route24_Script ; scripts
- db SOUTH | EAST ; connections
- SOUTH_MAP_CONNECTION ROUTE_24, CERULEAN_CITY, -3, 2, CeruleanCity_Blocks, 1
- EAST_MAP_CONNECTION ROUTE_24, ROUTE_25, 0, 0, Route25_Blocks
- dw Route24_Object ; objects
diff --git a/data/mapHeaders/Route25.asm b/data/mapHeaders/Route25.asm
deleted file mode 100755
index c300eeb3..00000000
--- a/data/mapHeaders/Route25.asm
+++ /dev/null
@@ -1,9 +0,0 @@
-Route25_h:
- db OVERWORLD ; tileset
- db ROUTE_25_HEIGHT, ROUTE_25_WIDTH ; dimensions (y, x)
- dw Route25_Blocks ; blocks
- dw Route25_TextPointers ; texts
- dw Route25_Script ; scripts
- db WEST ; connections
- WEST_MAP_CONNECTION ROUTE_25, ROUTE_24, 0, 0, Route24_Blocks
- dw Route25_Object ; objects
diff --git a/data/mapHeaders/Route2Gate.asm b/data/mapHeaders/Route2Gate.asm
deleted file mode 100755
index 9b284178..00000000
--- a/data/mapHeaders/Route2Gate.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route2Gate_h:
- db GATE ; tileset
- db ROUTE_2_GATE_HEIGHT, ROUTE_2_GATE_WIDTH ; dimensions (y, x)
- dw Route2Gate_Blocks ; blocks
- dw Route2Gate_TextPointers ; texts
- dw Route2Gate_Script ; scripts
- db 0 ; connections
- dw Route2Gate_Object ; objects
diff --git a/data/mapHeaders/Route2TradeHouse.asm b/data/mapHeaders/Route2TradeHouse.asm
deleted file mode 100755
index 33693943..00000000
--- a/data/mapHeaders/Route2TradeHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route2TradeHouse_h:
- db HOUSE ; tileset
- db ROUTE_2_TRADE_HOUSE_HEIGHT, ROUTE_2_TRADE_HOUSE_WIDTH ; dimensions (y, x)
- dw Route2TradeHouse_Blocks ; blocks
- dw Route2TradeHouse_TextPointers ; texts
- dw Route2TradeHouse_Script ; scripts
- db 0 ; connections
- dw Route2TradeHouse_Object ; objects
diff --git a/data/mapHeaders/Route3.asm b/data/mapHeaders/Route3.asm
deleted file mode 100755
index c611e4b8..00000000
--- a/data/mapHeaders/Route3.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route3_h:
- db OVERWORLD ; tileset
- db ROUTE_3_HEIGHT, ROUTE_3_WIDTH ; dimensions (y, x)
- dw Route3_Blocks ; blocks
- dw Route3_TextPointers ; texts
- dw Route3_Script ; scripts
- db NORTH | WEST ; connections
- NORTH_MAP_CONNECTION ROUTE_3, ROUTE_4, 25, 0, Route4_Blocks
- WEST_MAP_CONNECTION ROUTE_3, PEWTER_CITY, -3, 1, PewterCity_Blocks
- dw Route3_Object ; objects
diff --git a/data/mapHeaders/Route4.asm b/data/mapHeaders/Route4.asm
deleted file mode 100755
index 999a1207..00000000
--- a/data/mapHeaders/Route4.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route4_h:
- db OVERWORLD ; tileset
- db ROUTE_4_HEIGHT, ROUTE_4_WIDTH ; dimensions (y, x)
- dw Route4_Blocks ; blocks
- dw Route4_TextPointers ; texts
- dw Route4_Script ; scripts
- db SOUTH | EAST ; connections
- SOUTH_MAP_CONNECTION ROUTE_4, ROUTE_3, -3, 22, Route3_Blocks
- EAST_MAP_CONNECTION ROUTE_4, CERULEAN_CITY, -3, 1, CeruleanCity_Blocks, 1
- dw Route4_Object ; objects
diff --git a/data/mapHeaders/Route5.asm b/data/mapHeaders/Route5.asm
deleted file mode 100755
index 6480aebd..00000000
--- a/data/mapHeaders/Route5.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route5_h:
- db OVERWORLD ; tileset
- db ROUTE_5_HEIGHT, ROUTE_5_WIDTH ; dimensions (y, x)
- dw Route5_Blocks ; blocks
- dw Route5_TextPointers ; texts
- dw Route5_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_5, CERULEAN_CITY, -3, 2, CeruleanCity_Blocks
- SOUTH_MAP_CONNECTION ROUTE_5, SAFFRON_CITY, -3, 2, SaffronCity_Blocks, 1
- dw Route5_Object ; objects
diff --git a/data/mapHeaders/Route5Gate.asm b/data/mapHeaders/Route5Gate.asm
deleted file mode 100755
index bb418182..00000000
--- a/data/mapHeaders/Route5Gate.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route5Gate_h:
- db GATE ; tileset
- db ROUTE_5_GATE_HEIGHT, ROUTE_5_GATE_WIDTH ; dimensions (y, x)
- dw Route5Gate_Blocks ; blocks
- dw Route5Gate_TextPointers ; texts
- dw Route5Gate_Script ; scripts
- db 0 ; connections
- dw Route5Gate_Object ; objects
diff --git a/data/mapHeaders/Route6.asm b/data/mapHeaders/Route6.asm
deleted file mode 100755
index 9385ce5f..00000000
--- a/data/mapHeaders/Route6.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route6_h:
- db OVERWORLD ; tileset
- db ROUTE_6_HEIGHT, ROUTE_6_WIDTH ; dimensions (y, x)
- dw Route6_Blocks ; blocks
- dw Route6_TextPointers ; texts
- dw Route6_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_6, SAFFRON_CITY, -3, 2, SaffronCity_Blocks
- SOUTH_MAP_CONNECTION ROUTE_6, VERMILION_CITY, -3, 2, VermilionCity_Blocks, 1
- dw Route6_Object ; objects
diff --git a/data/mapHeaders/Route6Gate.asm b/data/mapHeaders/Route6Gate.asm
deleted file mode 100755
index 282cc5b6..00000000
--- a/data/mapHeaders/Route6Gate.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route6Gate_h:
- db GATE ; tileset
- db ROUTE_6_GATE_HEIGHT, ROUTE_6_GATE_WIDTH ; dimensions (y, x)
- dw Route6Gate_Blocks ; blocks
- dw Route6Gate_TextPointers ; texts
- dw Route6Gate_Script ; scripts
- db 0 ; connections
- dw Route6Gate_Object ; objects
diff --git a/data/mapHeaders/Route7.asm b/data/mapHeaders/Route7.asm
deleted file mode 100755
index 9b34ea1f..00000000
--- a/data/mapHeaders/Route7.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route7_h:
- db OVERWORLD ; tileset
- db ROUTE_7_HEIGHT, ROUTE_7_WIDTH ; dimensions (y, x)
- dw Route7_Blocks ; blocks
- dw Route7_TextPointers ; texts
- dw Route7_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_7, CELADON_CITY, -3, 1, CeladonCity_Blocks
- EAST_MAP_CONNECTION ROUTE_7, SAFFRON_CITY, -3, 1, SaffronCity_Blocks, 1
- dw Route7_Object ; objects
diff --git a/data/mapHeaders/Route7Gate.asm b/data/mapHeaders/Route7Gate.asm
deleted file mode 100755
index 61771e42..00000000
--- a/data/mapHeaders/Route7Gate.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route7Gate_h:
- db GATE ; tileset
- db ROUTE_7_GATE_HEIGHT, ROUTE_7_GATE_WIDTH ; dimensions (y, x)
- dw Route7Gate_Blocks ; blocks
- dw Route7Gate_TextPointers ; texts
- dw Route7Gate_Script ; scripts
- db 0 ; connections
- dw Route7Gate_Object ; objects
diff --git a/data/mapHeaders/Route8.asm b/data/mapHeaders/Route8.asm
deleted file mode 100755
index bd2ee71e..00000000
--- a/data/mapHeaders/Route8.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route8_h:
- db OVERWORLD ; tileset
- db ROUTE_8_HEIGHT, ROUTE_8_WIDTH ; dimensions (y, x)
- dw Route8_Blocks ; blocks
- dw Route8_TextPointers ; texts
- dw Route8_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_8, SAFFRON_CITY, -3, 1, SaffronCity_Blocks
- EAST_MAP_CONNECTION ROUTE_8, LAVENDER_TOWN, 0, 0, LavenderTown_Blocks
- dw Route8_Object ; objects
diff --git a/data/mapHeaders/Route8Gate.asm b/data/mapHeaders/Route8Gate.asm
deleted file mode 100755
index dd14a237..00000000
--- a/data/mapHeaders/Route8Gate.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Route8Gate_h:
- db GATE ; tileset
- db ROUTE_8_GATE_HEIGHT, ROUTE_8_GATE_WIDTH ; dimensions (y, x)
- dw Route8Gate_Blocks ; blocks
- dw Route8Gate_TextPointers ; texts
- dw Route8Gate_Script ; scripts
- db 0 ; connections
- dw Route8Gate_Object ; objects
diff --git a/data/mapHeaders/Route9.asm b/data/mapHeaders/Route9.asm
deleted file mode 100755
index 3dec3b0a..00000000
--- a/data/mapHeaders/Route9.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-Route9_h:
- db OVERWORLD ; tileset
- db ROUTE_9_HEIGHT, ROUTE_9_WIDTH ; dimensions (y, x)
- dw Route9_Blocks ; blocks
- dw Route9_TextPointers ; texts
- dw Route9_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_9, CERULEAN_CITY, -3, 1, CeruleanCity_Blocks
- EAST_MAP_CONNECTION ROUTE_9, ROUTE_10, 0, 0, Route10_Blocks, 1
- dw Route9_Object ; objects
diff --git a/data/mapHeaders/SSAnne1F.asm b/data/mapHeaders/SSAnne1F.asm
deleted file mode 100755
index a69423d6..00000000
--- a/data/mapHeaders/SSAnne1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SSAnne1F_h:
- db SHIP ; tileset
- db SS_ANNE_1F_HEIGHT, SS_ANNE_1F_WIDTH ; dimensions (y, x)
- dw SSAnne1F_Blocks ; blocks
- dw SSAnne1F_TextPointers ; texts
- dw SSAnne1F_Script ; scripts
- db 0 ; connections
- dw SSAnne1F_Object ; objects
diff --git a/data/mapHeaders/SSAnne1FRooms.asm b/data/mapHeaders/SSAnne1FRooms.asm
deleted file mode 100755
index 1f8af23d..00000000
--- a/data/mapHeaders/SSAnne1FRooms.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SSAnne1FRooms_h:
- db SHIP ; tileset
- db SS_ANNE_1F_ROOMS_HEIGHT, SS_ANNE_1F_ROOMS_WIDTH ; dimensions (y, x)
- dw SSAnne1FRooms_Blocks ; blocks
- dw SSAnne1FRooms_TextPointers ; texts
- dw SSAnne1FRooms_Script ; scripts
- db 0 ; connections
- dw SSAnne1FRooms_Object ; objects
diff --git a/data/mapHeaders/SSAnne2F.asm b/data/mapHeaders/SSAnne2F.asm
deleted file mode 100755
index d42d16f4..00000000
--- a/data/mapHeaders/SSAnne2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SSAnne2F_h:
- db SHIP ; tileset
- db SS_ANNE_2F_HEIGHT, SS_ANNE_2F_WIDTH ; dimensions (y, x)
- dw SSAnne2F_Blocks ; blocks
- dw SSAnne2F_TextPointers ; texts
- dw SSAnne2F_Script ; scripts
- db 0 ; connections
- dw SSAnne2F_Object ; objects
diff --git a/data/mapHeaders/SSAnne2FRooms.asm b/data/mapHeaders/SSAnne2FRooms.asm
deleted file mode 100755
index f22de0fa..00000000
--- a/data/mapHeaders/SSAnne2FRooms.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SSAnne2FRooms_h:
- db SHIP ; tileset
- db SS_ANNE_2F_ROOMS_HEIGHT, SS_ANNE_2F_ROOMS_WIDTH ; dimensions (y, x)
- dw SSAnne2FRooms_Blocks ; blocks
- dw SSAnne2FRooms_TextPointers ; texts
- dw SSAnne2FRooms_Script ; scripts
- db 0 ; connections
- dw SSAnne2FRooms_Object ; objects
diff --git a/data/mapHeaders/SSAnne3F.asm b/data/mapHeaders/SSAnne3F.asm
deleted file mode 100755
index 1c5dafea..00000000
--- a/data/mapHeaders/SSAnne3F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SSAnne3F_h:
- db SHIP ; tileset
- db SS_ANNE_3F_HEIGHT, SS_ANNE_3F_WIDTH ; dimensions (y, x)
- dw SSAnne3F_Blocks ; blocks
- dw SSAnne3F_TextPointers ; texts
- dw SSAnne3F_Script ; scripts
- db 0 ; connections
- dw SSAnne3F_Object ; objects
diff --git a/data/mapHeaders/SSAnneB1F.asm b/data/mapHeaders/SSAnneB1F.asm
deleted file mode 100755
index a3ca6dfa..00000000
--- a/data/mapHeaders/SSAnneB1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SSAnneB1F_h:
- db SHIP ; tileset
- db SS_ANNE_B1F_HEIGHT, SS_ANNE_B1F_WIDTH ; dimensions (y, x)
- dw SSAnneB1F_Blocks ; blocks
- dw SSAnneB1F_TextPointers ; texts
- dw SSAnneB1F_Script ; scripts
- db 0 ; connections
- dw SSAnneB1F_Object ; objects
diff --git a/data/mapHeaders/SSAnneB1FRooms.asm b/data/mapHeaders/SSAnneB1FRooms.asm
deleted file mode 100755
index f08e343b..00000000
--- a/data/mapHeaders/SSAnneB1FRooms.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SSAnneB1FRooms_h:
- db SHIP ; tileset
- db SS_ANNE_B1F_ROOMS_HEIGHT, SS_ANNE_B1F_ROOMS_WIDTH ; dimensions (y, x)
- dw SSAnneB1FRooms_Blocks ; blocks
- dw SSAnneB1FRooms_TextPointers ; texts
- dw SSAnneB1FRooms_Script ; scripts
- db 0 ; connections
- dw SSAnneB1FRooms_Object ; objects
diff --git a/data/mapHeaders/SSAnneBow.asm b/data/mapHeaders/SSAnneBow.asm
deleted file mode 100755
index baa71147..00000000
--- a/data/mapHeaders/SSAnneBow.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SSAnneBow_h:
- db SHIP ; tileset
- db SS_ANNE_BOW_HEIGHT, SS_ANNE_BOW_WIDTH ; dimensions (y, x)
- dw SSAnneBow_Blocks ; blocks
- dw SSAnneBow_TextPointers ; texts
- dw SSAnneBow_Script ; scripts
- db 0 ; connections
- dw SSAnneBow_Object ; objects
diff --git a/data/mapHeaders/SSAnneCaptainsRoom.asm b/data/mapHeaders/SSAnneCaptainsRoom.asm
deleted file mode 100755
index 433f060a..00000000
--- a/data/mapHeaders/SSAnneCaptainsRoom.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SSAnneCaptainsRoom_h:
- db SHIP ; tileset
- db SS_ANNE_CAPTAINS_ROOM_HEIGHT, SS_ANNE_CAPTAINS_ROOM_WIDTH ; dimensions (y, x)
- dw SSAnneCaptainsRoom_Blocks ; blocks
- dw SSAnneCaptainsRoom_TextPointers ; texts
- dw SSAnneCaptainsRoom_Script ; scripts
- db 0 ; connections
- dw SSAnneCaptainsRoom_Object ; objects
diff --git a/data/mapHeaders/SSAnneKitchen.asm b/data/mapHeaders/SSAnneKitchen.asm
deleted file mode 100755
index eacbbfb8..00000000
--- a/data/mapHeaders/SSAnneKitchen.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SSAnneKitchen_h:
- db SHIP ; tileset
- db SS_ANNE_KITCHEN_HEIGHT, SS_ANNE_KITCHEN_WIDTH ; dimensions (y, x)
- dw SSAnneKitchen_Blocks ; blocks
- dw SSAnneKitchen_TextPointers ; texts
- dw SSAnneKitchen_Script ; scripts
- db 0 ; connections
- dw SSAnneKitchen_Object ; objects
diff --git a/data/mapHeaders/SafariZoneCenter.asm b/data/mapHeaders/SafariZoneCenter.asm
deleted file mode 100755
index 8ec6c890..00000000
--- a/data/mapHeaders/SafariZoneCenter.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SafariZoneCenter_h:
- db FOREST ; tileset
- db SAFARI_ZONE_CENTER_HEIGHT, SAFARI_ZONE_CENTER_WIDTH ; dimensions (y, x)
- dw SafariZoneCenter_Blocks ; blocks
- dw SafariZoneCenter_TextPointers ; texts
- dw SafariZoneCenter_Script ; scripts
- db 0 ; connections
- dw SafariZoneCenter_Object ; objects
diff --git a/data/mapHeaders/SafariZoneCenterRestHouse.asm b/data/mapHeaders/SafariZoneCenterRestHouse.asm
deleted file mode 100755
index 9b1064f2..00000000
--- a/data/mapHeaders/SafariZoneCenterRestHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SafariZoneCenterRestHouse_h:
- db GATE ; tileset
- db SAFARI_ZONE_CENTER_REST_HOUSE_HEIGHT, SAFARI_ZONE_CENTER_REST_HOUSE_WIDTH ; dimensions (y, x)
- dw SafariZoneCenterRestHouse_Blocks ; blocks
- dw SafariZoneCenterRestHouse_TextPointers ; texts
- dw SafariZoneCenterRestHouse_Script ; scripts
- db 0 ; connections
- dw SafariZoneCenterRestHouse_Object ; objects
diff --git a/data/mapHeaders/SafariZoneEast.asm b/data/mapHeaders/SafariZoneEast.asm
deleted file mode 100755
index 99556473..00000000
--- a/data/mapHeaders/SafariZoneEast.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SafariZoneEast_h:
- db FOREST ; tileset
- db SAFARI_ZONE_EAST_HEIGHT, SAFARI_ZONE_EAST_WIDTH ; dimensions (y, x)
- dw SafariZoneEast_Blocks ; blocks
- dw SafariZoneEast_TextPointers ; texts
- dw SafariZoneEast_Script ; scripts
- db 0 ; connections
- dw SafariZoneEast_Object ; objects
diff --git a/data/mapHeaders/SafariZoneEastRestHouse.asm b/data/mapHeaders/SafariZoneEastRestHouse.asm
deleted file mode 100755
index b9f219c5..00000000
--- a/data/mapHeaders/SafariZoneEastRestHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SafariZoneEastRestHouse_h:
- db GATE ; tileset
- db SAFARI_ZONE_EAST_REST_HOUSE_HEIGHT, SAFARI_ZONE_EAST_REST_HOUSE_WIDTH ; dimensions (y, x)
- dw SafariZoneEastRestHouse_Blocks ; blocks
- dw SafariZoneEastRestHouse_TextPointers ; texts
- dw SafariZoneEastRestHouse_Script ; scripts
- db 0 ; connections
- dw SafariZoneEastRestHouse_Object ; objects
diff --git a/data/mapHeaders/SafariZoneGate.asm b/data/mapHeaders/SafariZoneGate.asm
deleted file mode 100755
index ed306ad0..00000000
--- a/data/mapHeaders/SafariZoneGate.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SafariZoneGate_h:
- db GATE ; tileset
- db SAFARI_ZONE_GATE_HEIGHT, SAFARI_ZONE_GATE_WIDTH ; dimensions (y, x)
- dw SafariZoneGate_Blocks ; blocks
- dw SafariZoneGate_TextPointers ; texts
- dw SafariZoneGate_Script ; scripts
- db 0 ; connections
- dw SafariZoneGate_Object ; objects
diff --git a/data/mapHeaders/SafariZoneNorth.asm b/data/mapHeaders/SafariZoneNorth.asm
deleted file mode 100755
index 3d1a2f51..00000000
--- a/data/mapHeaders/SafariZoneNorth.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SafariZoneNorth_h:
- db FOREST ; tileset
- db SAFARI_ZONE_NORTH_HEIGHT, SAFARI_ZONE_NORTH_WIDTH ; dimensions (y, x)
- dw SafariZoneNorth_Blocks ; blocks
- dw SafariZoneNorth_TextPointers ; texts
- dw SafariZoneNorth_Script ; scripts
- db 0 ; connections
- dw SafariZoneNorth_Object ; objects
diff --git a/data/mapHeaders/SafariZoneNorthRestHouse.asm b/data/mapHeaders/SafariZoneNorthRestHouse.asm
deleted file mode 100755
index 938c15cf..00000000
--- a/data/mapHeaders/SafariZoneNorthRestHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SafariZoneNorthRestHouse_h:
- db GATE ; tileset
- db SAFARI_ZONE_NORTH_REST_HOUSE_HEIGHT, SAFARI_ZONE_NORTH_REST_HOUSE_WIDTH ; dimensions (y, x)
- dw SafariZoneNorthRestHouse_Blocks ; blocks
- dw SafariZoneNorthRestHouse_TextPointers ; texts
- dw SafariZoneNorthRestHouse_Script ; scripts
- db 0 ; connections
- dw SafariZoneNorthRestHouse_Object ; objects
diff --git a/data/mapHeaders/SafariZoneSecretHouse.asm b/data/mapHeaders/SafariZoneSecretHouse.asm
deleted file mode 100755
index 91068691..00000000
--- a/data/mapHeaders/SafariZoneSecretHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SafariZoneSecretHouse_h:
- db LAB ; tileset
- db SAFARI_ZONE_SECRET_HOUSE_HEIGHT, SAFARI_ZONE_SECRET_HOUSE_WIDTH ; dimensions (y, x)
- dw SafariZoneSecretHouse_Blocks ; blocks
- dw SafariZoneSecretHouse_TextPointers ; texts
- dw SafariZoneSecretHouse_Script ; scripts
- db 0 ; connections
- dw SafariZoneSecretHouse_Object ; objects
diff --git a/data/mapHeaders/SafariZoneWest.asm b/data/mapHeaders/SafariZoneWest.asm
deleted file mode 100755
index 876169d1..00000000
--- a/data/mapHeaders/SafariZoneWest.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SafariZoneWest_h:
- db FOREST ; tileset
- db SAFARI_ZONE_WEST_HEIGHT, SAFARI_ZONE_WEST_WIDTH ; dimensions (y, x)
- dw SafariZoneWest_Blocks ; blocks
- dw SafariZoneWest_TextPointers ; texts
- dw SafariZoneWest_Script ; scripts
- db 0 ; connections
- dw SafariZoneWest_Object ; objects
diff --git a/data/mapHeaders/SafariZoneWestRestHouse.asm b/data/mapHeaders/SafariZoneWestRestHouse.asm
deleted file mode 100755
index 886382ec..00000000
--- a/data/mapHeaders/SafariZoneWestRestHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SafariZoneWestRestHouse_h:
- db GATE ; tileset
- db SAFARI_ZONE_WEST_REST_HOUSE_HEIGHT, SAFARI_ZONE_WEST_REST_HOUSE_WIDTH ; dimensions (y, x)
- dw SafariZoneWestRestHouse_Blocks ; blocks
- dw SafariZoneWestRestHouse_TextPointers ; texts
- dw SafariZoneWestRestHouse_Script ; scripts
- db 0 ; connections
- dw SafariZoneWestRestHouse_Object ; objects
diff --git a/data/mapHeaders/SaffronCity.asm b/data/mapHeaders/SaffronCity.asm
deleted file mode 100755
index 13239891..00000000
--- a/data/mapHeaders/SaffronCity.asm
+++ /dev/null
@@ -1,12 +0,0 @@
-SaffronCity_h:
- db OVERWORLD ; tileset
- db SAFFRON_CITY_HEIGHT, SAFFRON_CITY_WIDTH ; dimensions (y, x)
- dw SaffronCity_Blocks ; blocks
- dw SaffronCity_TextPointers ; texts
- dw SaffronCity_Script ; scripts
- db NORTH | SOUTH | WEST | EAST ; connections
- NORTH_MAP_CONNECTION SAFFRON_CITY, ROUTE_5, 5, 0, Route5_Blocks
- SOUTH_MAP_CONNECTION SAFFRON_CITY, ROUTE_6, 5, 0, Route6_Blocks, 1
- WEST_MAP_CONNECTION SAFFRON_CITY, ROUTE_7, 4, 0, Route7_Blocks
- EAST_MAP_CONNECTION SAFFRON_CITY, ROUTE_8, 4, 0, Route8_Blocks
- dw SaffronCity_Object ; objects
diff --git a/data/mapHeaders/SaffronGym.asm b/data/mapHeaders/SaffronGym.asm
deleted file mode 100755
index 6cbadb2c..00000000
--- a/data/mapHeaders/SaffronGym.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SaffronGym_h:
- db FACILITY ; tileset
- db SAFFRON_GYM_HEIGHT, SAFFRON_GYM_WIDTH ; dimensions (y, x)
- dw SaffronGym_Blocks ; blocks
- dw SaffronGym_TextPointers ; texts
- dw SaffronGym_Script ; scripts
- db 0 ; connections
- dw SaffronGym_Object ; objects
diff --git a/data/mapHeaders/SaffronMart.asm b/data/mapHeaders/SaffronMart.asm
deleted file mode 100755
index abd537b6..00000000
--- a/data/mapHeaders/SaffronMart.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SaffronMart_h:
- db MART ; tileset
- db SAFFRON_MART_HEIGHT, SAFFRON_MART_WIDTH ; dimensions (y, x)
- dw SaffronMart_Blocks ; blocks
- dw SaffronMart_TextPointers ; texts
- dw SaffronMart_Script ; scripts
- db 0 ; connections
- dw SaffronMart_Object ; objects
diff --git a/data/mapHeaders/SaffronPidgeyHouse.asm b/data/mapHeaders/SaffronPidgeyHouse.asm
deleted file mode 100755
index 5d6e21ae..00000000
--- a/data/mapHeaders/SaffronPidgeyHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SaffronPidgeyHouse_h:
- db HOUSE ; tileset
- db SAFFRON_PIDGEY_HOUSE_HEIGHT, SAFFRON_PIDGEY_HOUSE_WIDTH ; dimensions (y, x)
- dw SaffronPidgeyHouse_Blocks ; blocks
- dw SaffronPidgeyHouse_TextPointers ; texts
- dw SaffronPidgeyHouse_Script ; scripts
- db 0 ; connections
- dw SaffronPidgeyHouse_Object ; objects
diff --git a/data/mapHeaders/SaffronPokecenter.asm b/data/mapHeaders/SaffronPokecenter.asm
deleted file mode 100755
index 32f1ec71..00000000
--- a/data/mapHeaders/SaffronPokecenter.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SaffronPokecenter_h:
- db POKECENTER ; tileset
- db SAFFRON_POKECENTER_HEIGHT, SAFFRON_POKECENTER_WIDTH ; dimensions (y, x)
- dw SaffronPokecenter_Blocks ; blocks
- dw SaffronPokecenter_TextPointers ; texts
- dw SaffronPokecenter_Script ; scripts
- db 0 ; connections
- dw SaffronPokecenter_Object ; objects
diff --git a/data/mapHeaders/SeafoamIslands1F.asm b/data/mapHeaders/SeafoamIslands1F.asm
deleted file mode 100755
index f5260cda..00000000
--- a/data/mapHeaders/SeafoamIslands1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SeafoamIslands1F_h:
- db CAVERN ; tileset
- db SEAFOAM_ISLANDS_1F_HEIGHT, SEAFOAM_ISLANDS_1F_WIDTH ; dimensions (y, x)
- dw SeafoamIslands1F_Blocks ; blocks
- dw SeafoamIslands1F_TextPointers ; texts
- dw SeafoamIslands1F_Script ; scripts
- db 0 ; connections
- dw SeafoamIslands1F_Object ; objects
diff --git a/data/mapHeaders/SeafoamIslandsB1F.asm b/data/mapHeaders/SeafoamIslandsB1F.asm
deleted file mode 100755
index 23116f74..00000000
--- a/data/mapHeaders/SeafoamIslandsB1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SeafoamIslandsB1F_h:
- db CAVERN ; tileset
- db SEAFOAM_ISLANDS_B1F_HEIGHT, SEAFOAM_ISLANDS_B1F_WIDTH ; dimensions (y, x)
- dw SeafoamIslandsB1F_Blocks ; blocks
- dw SeafoamIslandsB1F_TextPointers ; texts
- dw SeafoamIslandsB1F_Script ; scripts
- db 0 ; connections
- dw SeafoamIslandsB1F_Object ; objects
diff --git a/data/mapHeaders/SeafoamIslandsB2F.asm b/data/mapHeaders/SeafoamIslandsB2F.asm
deleted file mode 100755
index 10d45dad..00000000
--- a/data/mapHeaders/SeafoamIslandsB2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SeafoamIslandsB2F_h:
- db CAVERN ; tileset
- db SEAFOAM_ISLANDS_B2F_HEIGHT, SEAFOAM_ISLANDS_B2F_WIDTH ; dimensions (y, x)
- dw SeafoamIslandsB2F_Blocks ; blocks
- dw SeafoamIslandsB2F_TextPointers ; texts
- dw SeafoamIslandsB2F_Script ; scripts
- db 0 ; connections
- dw SeafoamIslandsB2F_Object ; objects
diff --git a/data/mapHeaders/SeafoamIslandsB3F.asm b/data/mapHeaders/SeafoamIslandsB3F.asm
deleted file mode 100755
index 812d1121..00000000
--- a/data/mapHeaders/SeafoamIslandsB3F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SeafoamIslandsB3F_h:
- db CAVERN ; tileset
- db SEAFOAM_ISLANDS_B3F_HEIGHT, SEAFOAM_ISLANDS_B3F_WIDTH ; dimensions (y, x)
- dw SeafoamIslandsB3F_Blocks ; blocks
- dw SeafoamIslandsB3F_TextPointers ; texts
- dw SeafoamIslandsB3F_Script ; scripts
- db 0 ; connections
- dw SeafoamIslandsB3F_Object ; objects
diff --git a/data/mapHeaders/SeafoamIslandsB4F.asm b/data/mapHeaders/SeafoamIslandsB4F.asm
deleted file mode 100755
index 96c25e06..00000000
--- a/data/mapHeaders/SeafoamIslandsB4F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SeafoamIslandsB4F_h:
- db CAVERN ; tileset
- db SEAFOAM_ISLANDS_B4F_HEIGHT, SEAFOAM_ISLANDS_B4F_WIDTH ; dimensions (y, x)
- dw SeafoamIslandsB4F_Blocks ; blocks
- dw SeafoamIslandsB4F_TextPointers ; texts
- dw SeafoamIslandsB4F_Script ; scripts
- db 0 ; connections
- dw SeafoamIslandsB4F_Object ; objects
diff --git a/data/mapHeaders/SilphCo10F.asm b/data/mapHeaders/SilphCo10F.asm
deleted file mode 100755
index ad040479..00000000
--- a/data/mapHeaders/SilphCo10F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SilphCo10F_h:
- db FACILITY ; tileset
- db SILPH_CO_10F_HEIGHT, SILPH_CO_10F_WIDTH ; dimensions (y, x)
- dw SilphCo10F_Blocks ; blocks
- dw SilphCo10F_TextPointers ; texts
- dw SilphCo10F_Script ; scripts
- db 0 ; connections
- dw SilphCo10F_Object ; objects
diff --git a/data/mapHeaders/SilphCo11F.asm b/data/mapHeaders/SilphCo11F.asm
deleted file mode 100755
index 08d6d650..00000000
--- a/data/mapHeaders/SilphCo11F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SilphCo11F_h:
- db INTERIOR ; tileset
- db SILPH_CO_11F_HEIGHT, SILPH_CO_11F_WIDTH ; dimensions (y, x)
- dw SilphCo11F_Blocks ; blocks
- dw SilphCo11F_TextPointers ; texts
- dw SilphCo11F_Script ; scripts
- db 0 ; connections
- dw SilphCo11F_Object ; objects
diff --git a/data/mapHeaders/SilphCo1F.asm b/data/mapHeaders/SilphCo1F.asm
deleted file mode 100755
index 45e6c5bf..00000000
--- a/data/mapHeaders/SilphCo1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SilphCo1F_h:
- db FACILITY ; tileset
- db SILPH_CO_1F_HEIGHT, SILPH_CO_1F_WIDTH ; dimensions (y, x)
- dw SilphCo1F_Blocks ; blocks
- dw SilphCo1F_TextPointers ; texts
- dw SilphCo1F_Script ; scripts
- db 0 ; connections
- dw SilphCo1F_Object ; objects
diff --git a/data/mapHeaders/SilphCo2F.asm b/data/mapHeaders/SilphCo2F.asm
deleted file mode 100755
index 69c2fb51..00000000
--- a/data/mapHeaders/SilphCo2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SilphCo2F_h:
- db FACILITY ; tileset
- db SILPH_CO_2F_HEIGHT, SILPH_CO_2F_WIDTH ; dimensions (y, x)
- dw SilphCo2F_Blocks ; blocks
- dw SilphCo2F_TextPointers ; texts
- dw SilphCo2F_Script ; scripts
- db 0 ; connections
- dw SilphCo2F_Object ; objects
diff --git a/data/mapHeaders/SilphCo3F.asm b/data/mapHeaders/SilphCo3F.asm
deleted file mode 100755
index 6911a604..00000000
--- a/data/mapHeaders/SilphCo3F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SilphCo3F_h:
- db FACILITY ; tileset
- db SILPH_CO_3F_HEIGHT, SILPH_CO_3F_WIDTH ; dimensions (y, x)
- dw SilphCo3F_Blocks ; blocks
- dw SilphCo3F_TextPointers ; texts
- dw SilphCo3F_Script ; scripts
- db 0 ; connections
- dw SilphCo3F_Object ; objects
diff --git a/data/mapHeaders/SilphCo4F.asm b/data/mapHeaders/SilphCo4F.asm
deleted file mode 100755
index 591ddc07..00000000
--- a/data/mapHeaders/SilphCo4F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SilphCo4F_h:
- db FACILITY ; tileset
- db SILPH_CO_4F_HEIGHT, SILPH_CO_4F_WIDTH ; dimensions (y, x)
- dw SilphCo4F_Blocks ; blocks
- dw SilphCo4F_TextPointers ; texts
- dw SilphCo4F_Script ; scripts
- db 0 ; connections
- dw SilphCo4F_Object ; objects
diff --git a/data/mapHeaders/SilphCo5F.asm b/data/mapHeaders/SilphCo5F.asm
deleted file mode 100755
index 0303ceba..00000000
--- a/data/mapHeaders/SilphCo5F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SilphCo5F_h:
- db FACILITY ; tileset
- db SILPH_CO_5F_HEIGHT, SILPH_CO_5F_WIDTH ; dimensions (y, x)
- dw SilphCo5F_Blocks ; blocks
- dw SilphCo5F_TextPointers ; texts
- dw SilphCo5F_Script ; scripts
- db 0 ; connections
- dw SilphCo5F_Object ; objects
diff --git a/data/mapHeaders/SilphCo6F.asm b/data/mapHeaders/SilphCo6F.asm
deleted file mode 100755
index b26a7587..00000000
--- a/data/mapHeaders/SilphCo6F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SilphCo6F_h:
- db FACILITY ; tileset
- db SILPH_CO_6F_HEIGHT, SILPH_CO_6F_WIDTH ; dimensions (y, x)
- dw SilphCo6F_Blocks ; blocks
- dw SilphCo6F_TextPointers ; texts
- dw SilphCo6F_Script ; scripts
- db 0 ; connections
- dw SilphCo6F_Object ; objects
diff --git a/data/mapHeaders/SilphCo7F.asm b/data/mapHeaders/SilphCo7F.asm
deleted file mode 100755
index 5c6ea959..00000000
--- a/data/mapHeaders/SilphCo7F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SilphCo7F_h:
- db FACILITY ; tileset
- db SILPH_CO_7F_HEIGHT, SILPH_CO_7F_WIDTH ; dimensions (y, x)
- dw SilphCo7F_Blocks ; blocks
- dw SilphCo7F_TextPointers ; texts
- dw SilphCo7F_Script ; scripts
- db 0 ; connections
- dw SilphCo7F_Object ; objects
diff --git a/data/mapHeaders/SilphCo8F.asm b/data/mapHeaders/SilphCo8F.asm
deleted file mode 100755
index e467298e..00000000
--- a/data/mapHeaders/SilphCo8F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SilphCo8F_h:
- db FACILITY ; tileset
- db SILPH_CO_8F_HEIGHT, SILPH_CO_8F_WIDTH ; dimensions (y, x)
- dw SilphCo8F_Blocks ; blocks
- dw SilphCo8F_TextPointers ; texts
- dw SilphCo8F_Script ; scripts
- db 0 ; connections
- dw SilphCo8F_Object ; objects
diff --git a/data/mapHeaders/SilphCo9F.asm b/data/mapHeaders/SilphCo9F.asm
deleted file mode 100755
index ec591e51..00000000
--- a/data/mapHeaders/SilphCo9F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SilphCo9F_h:
- db FACILITY ; tileset
- db SILPH_CO_9F_HEIGHT, SILPH_CO_9F_WIDTH ; dimensions (y, x)
- dw SilphCo9F_Blocks ; blocks
- dw SilphCo9F_TextPointers ; texts
- dw SilphCo9F_Script ; scripts
- db 0 ; connections
- dw SilphCo9F_Object ; objects
diff --git a/data/mapHeaders/SilphCoElevator.asm b/data/mapHeaders/SilphCoElevator.asm
deleted file mode 100755
index 0abe2810..00000000
--- a/data/mapHeaders/SilphCoElevator.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-SilphCoElevator_h:
- db LOBBY ; tileset
- db SILPH_CO_ELEVATOR_HEIGHT, SILPH_CO_ELEVATOR_WIDTH ; dimensions (y, x)
- dw SilphCoElevator_Blocks ; blocks
- dw SilphCoElevator_TextPointers ; texts
- dw SilphCoElevator_Script ; scripts
- db 0 ; connections
- dw SilphCoElevator_Object ; objects
diff --git a/data/mapHeaders/TradeCenter.asm b/data/mapHeaders/TradeCenter.asm
deleted file mode 100755
index 39981c35..00000000
--- a/data/mapHeaders/TradeCenter.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-TradeCenter_h:
- db CLUB ; tileset
- db TRADE_CENTER_HEIGHT, TRADE_CENTER_WIDTH ; dimensions (y, x)
- dw TradeCenter_Blocks ; blocks
- dw TradeCenter_TextPointers ; texts
- dw TradeCenter_Script ; scripts
- db 0 ; connections
- dw TradeCenter_Object ; objects
diff --git a/data/mapHeaders/UndergroundPathNorthSouth.asm b/data/mapHeaders/UndergroundPathNorthSouth.asm
deleted file mode 100755
index 5dd8cdf8..00000000
--- a/data/mapHeaders/UndergroundPathNorthSouth.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-UndergroundPathNorthSouth_h:
- db UNDERGROUND ; tileset
- db UNDERGROUND_PATH_NORTH_SOUTH_HEIGHT, UNDERGROUND_PATH_NORTH_SOUTH_WIDTH ; dimensions (y, x)
- dw UndergroundPathNorthSouth_Blocks ; blocks
- dw UndergroundPathNorthSouth_TextPointers ; texts
- dw UndergroundPathNorthSouth_Script ; scripts
- db 0 ; connections
- dw UndergroundPathNorthSouth_Object ; objects
diff --git a/data/mapHeaders/UndergroundPathRoute5.asm b/data/mapHeaders/UndergroundPathRoute5.asm
deleted file mode 100755
index 14c6aa4d..00000000
--- a/data/mapHeaders/UndergroundPathRoute5.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-UndergroundPathRoute5_h:
- db GATE ; tileset
- db UNDERGROUND_PATH_ROUTE_5_HEIGHT, UNDERGROUND_PATH_ROUTE_5_WIDTH ; dimensions (y, x)
- dw UndergroundPathRoute5_Blocks ; blocks
- dw UndergroundPathRoute5_TextPointers ; texts
- dw UndergroundPathRoute5_Script ; scripts
- db 0 ; connections
- dw UndergroundPathRoute5_Object ; objects
diff --git a/data/mapHeaders/UndergroundPathRoute6.asm b/data/mapHeaders/UndergroundPathRoute6.asm
deleted file mode 100755
index 6aea459c..00000000
--- a/data/mapHeaders/UndergroundPathRoute6.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-UndergroundPathRoute6_h:
- db GATE ; tileset
- db UNDERGROUND_PATH_ROUTE_6_HEIGHT, UNDERGROUND_PATH_ROUTE_6_WIDTH ; dimensions (y, x)
- dw UndergroundPathRoute6_Blocks ; blocks
- dw UndergroundPathRoute6_TextPointers ; texts
- dw UndergroundPathRoute6_Script ; scripts
- db 0 ; connections
- dw UndergroundPathRoute6_Object ; objects
diff --git a/data/mapHeaders/UndergroundPathRoute7.asm b/data/mapHeaders/UndergroundPathRoute7.asm
deleted file mode 100755
index 91495ea3..00000000
--- a/data/mapHeaders/UndergroundPathRoute7.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-UndergroundPathRoute7_h:
- db GATE ; tileset
- db UNDERGROUND_PATH_ROUTE_7_HEIGHT, UNDERGROUND_PATH_ROUTE_7_WIDTH ; dimensions (y, x)
- dw UndergroundPathRoute7_Blocks ; blocks
- dw UndergroundPathRoute7_TextPointers ; texts
- dw UndergroundPathRoute7_Script ; scripts
- db 0 ; connections
- dw UndergroundPathRoute7_Object ; objects
diff --git a/data/mapHeaders/UndergroundPathRoute7Copy.asm b/data/mapHeaders/UndergroundPathRoute7Copy.asm
deleted file mode 100755
index 9d3f4c62..00000000
--- a/data/mapHeaders/UndergroundPathRoute7Copy.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-UndergroundPathRoute7Copy_h:
- db GATE ; tileset
- db UNDERGROUND_PATH_ROUTE_7_HEIGHT, UNDERGROUND_PATH_ROUTE_7_WIDTH ; dimensions (y, x)
- dw UndergroundPathRoute7Copy_Blocks ; blocks
- dw UndergroundPathRoute7Copy_TextPointers ; texts
- dw UndergroundPathRoute7Copy_Script ; scripts
- db 0 ; connections
- dw UndergroundPathRoute7Copy_Object ; objects
diff --git a/data/mapHeaders/UndergroundPathRoute8.asm b/data/mapHeaders/UndergroundPathRoute8.asm
deleted file mode 100755
index f34265b8..00000000
--- a/data/mapHeaders/UndergroundPathRoute8.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-UndergroundPathRoute8_h:
- db GATE ; tileset
- db UNDERGROUND_PATH_ROUTE_8_HEIGHT, UNDERGROUND_PATH_ROUTE_8_WIDTH ; dimensions (y, x)
- dw UndergroundPathRoute8_Blocks ; blocks
- dw UndergroundPathRoute8_TextPointers ; texts
- dw UndergroundPathRoute8_Script ; scripts
- db 0 ; connections
- dw UndergroundPathRoute8_Object ; objects
diff --git a/data/mapHeaders/UndergroundPathWestEast.asm b/data/mapHeaders/UndergroundPathWestEast.asm
deleted file mode 100755
index d084bd73..00000000
--- a/data/mapHeaders/UndergroundPathWestEast.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-UndergroundPathWestEast_h:
- db UNDERGROUND ; tileset
- db UNDERGROUND_PATH_WEST_EAST_HEIGHT, UNDERGROUND_PATH_WEST_EAST_WIDTH ; dimensions (y, x)
- dw UndergroundPathWestEast_Blocks ; blocks
- dw UndergroundPathWestEast_TextPointers ; texts
- dw UndergroundPathWestEast_Script ; scripts
- db 0 ; connections
- dw UndergroundPathWestEast_Object ; objects
diff --git a/data/mapHeaders/VermilionCity.asm b/data/mapHeaders/VermilionCity.asm
deleted file mode 100755
index 6521ad89..00000000
--- a/data/mapHeaders/VermilionCity.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-VermilionCity_h:
- db OVERWORLD ; tileset
- db VERMILION_CITY_HEIGHT, VERMILION_CITY_WIDTH ; dimensions (y, x)
- dw VermilionCity_Blocks ; blocks
- dw VermilionCity_TextPointers ; texts
- dw VermilionCity_Script ; scripts
- db NORTH | EAST ; connections
- NORTH_MAP_CONNECTION VERMILION_CITY, ROUTE_6, 5, 0, Route6_Blocks
- EAST_MAP_CONNECTION VERMILION_CITY, ROUTE_11, 4, 0, Route11_Blocks
- dw VermilionCity_Object ; objects
diff --git a/data/mapHeaders/VermilionDock.asm b/data/mapHeaders/VermilionDock.asm
deleted file mode 100755
index f7dca8e6..00000000
--- a/data/mapHeaders/VermilionDock.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-VermilionDock_h:
- db SHIP_PORT ; tileset
- db VERMILION_DOCK_HEIGHT, VERMILION_DOCK_WIDTH ; dimensions (y, x)
- dw VermilionDock_Blocks ; blocks
- dw VermilionDock_TextPointers ; texts
- dw VermilionDock_Script ; scripts
- db 0 ; connections
- dw VermilionDock_Object ; objects
diff --git a/data/mapHeaders/VermilionGym.asm b/data/mapHeaders/VermilionGym.asm
deleted file mode 100755
index fe304a2e..00000000
--- a/data/mapHeaders/VermilionGym.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-VermilionGym_h:
- db GYM ; tileset
- db VERMILION_GYM_HEIGHT, VERMILION_GYM_WIDTH ; dimensions (y, x)
- dw VermilionGym_Blocks ; blocks
- dw VermilionGym_TextPointers ; texts
- dw VermilionGym_Script ; scripts
- db 0 ; connections
- dw VermilionGym_Object ; objects
diff --git a/data/mapHeaders/VermilionMart.asm b/data/mapHeaders/VermilionMart.asm
deleted file mode 100755
index 67f24f59..00000000
--- a/data/mapHeaders/VermilionMart.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-VermilionMart_h:
- db MART ; tileset
- db VERMILION_MART_HEIGHT, VERMILION_MART_WIDTH ; dimensions (y, x)
- dw VermilionMart_Blocks ; blocks
- dw VermilionMart_TextPointers ; texts
- dw VermilionMart_Script ; scripts
- db 0 ; connections
- dw VermilionMart_Object ; objects
diff --git a/data/mapHeaders/VermilionOldRodHouse.asm b/data/mapHeaders/VermilionOldRodHouse.asm
deleted file mode 100755
index f4b69110..00000000
--- a/data/mapHeaders/VermilionOldRodHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-VermilionOldRodHouse_h:
- db HOUSE ; tileset
- db VERMILION_OLD_ROD_HOUSE_HEIGHT, VERMILION_OLD_ROD_HOUSE_WIDTH ; dimensions (y, x)
- dw VermilionOldRodHouse_Blocks ; blocks
- dw VermilionOldRodHouse_TextPointers ; texts
- dw VermilionOldRodHouse_Script ; scripts
- db 0 ; connections
- dw VermilionOldRodHouse_Object ; objects
diff --git a/data/mapHeaders/VermilionPidgeyHouse.asm b/data/mapHeaders/VermilionPidgeyHouse.asm
deleted file mode 100755
index af052fa6..00000000
--- a/data/mapHeaders/VermilionPidgeyHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-VermilionPidgeyHouse_h:
- db HOUSE ; tileset
- db VERMILION_PIDGEY_HOUSE_HEIGHT, VERMILION_PIDGEY_HOUSE_WIDTH ; dimensions (y, x)
- dw VermilionPidgeyHouse_Blocks ; blocks
- dw VermilionPidgeyHouse_TextPointers ; texts
- dw VermilionPidgeyHouse_Script ; scripts
- db 0 ; connections
- dw VermilionPidgeyHouse_Object ; objects
diff --git a/data/mapHeaders/VermilionPokecenter.asm b/data/mapHeaders/VermilionPokecenter.asm
deleted file mode 100755
index 3d4c23ec..00000000
--- a/data/mapHeaders/VermilionPokecenter.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-VermilionPokecenter_h:
- db POKECENTER ; tileset
- db VERMILION_POKECENTER_HEIGHT, VERMILION_POKECENTER_WIDTH ; dimensions (y, x)
- dw VermilionPokecenter_Blocks ; blocks
- dw VermilionPokecenter_TextPointers ; texts
- dw VermilionPokecenter_Script ; scripts
- db 0 ; connections
- dw VermilionPokecenter_Object ; objects
diff --git a/data/mapHeaders/VermilionTradeHouse.asm b/data/mapHeaders/VermilionTradeHouse.asm
deleted file mode 100755
index 21d30049..00000000
--- a/data/mapHeaders/VermilionTradeHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-VermilionTradeHouse_h:
- db HOUSE ; tileset
- db VERMILION_TRADE_HOUSE_HEIGHT, VERMILION_TRADE_HOUSE_WIDTH ; dimensions (y, x)
- dw VermilionTradeHouse_Blocks ; blocks
- dw VermilionTradeHouse_TextPointers ; texts
- dw VermilionTradeHouse_Script ; scripts
- db 0 ; connections
- dw VermilionTradeHouse_Object ; objects
diff --git a/data/mapHeaders/VictoryRoad1F.asm b/data/mapHeaders/VictoryRoad1F.asm
deleted file mode 100755
index 3508d782..00000000
--- a/data/mapHeaders/VictoryRoad1F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-VictoryRoad1F_h:
- db CAVERN ; tileset
- db VICTORY_ROAD_1F_HEIGHT, VICTORY_ROAD_1F_WIDTH ; dimensions (y, x)
- dw VictoryRoad1F_Blocks ; blocks
- dw VictoryRoad1F_TextPointers ; texts
- dw VictoryRoad1F_Script ; scripts
- db 0 ; connections
- dw VictoryRoad1F_Object ; objects
diff --git a/data/mapHeaders/VictoryRoad2F.asm b/data/mapHeaders/VictoryRoad2F.asm
deleted file mode 100755
index 31693c1c..00000000
--- a/data/mapHeaders/VictoryRoad2F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-VictoryRoad2F_h:
- db CAVERN ; tileset
- db VICTORY_ROAD_2F_HEIGHT, VICTORY_ROAD_2F_WIDTH ; dimensions (y, x)
- dw VictoryRoad2F_Blocks ; blocks
- dw VictoryRoad2F_TextPointers ; texts
- dw VictoryRoad2F_Script ; scripts
- db 0 ; connections
- dw VictoryRoad2F_Object ; objects
diff --git a/data/mapHeaders/VictoryRoad3F.asm b/data/mapHeaders/VictoryRoad3F.asm
deleted file mode 100755
index 3f5e21d2..00000000
--- a/data/mapHeaders/VictoryRoad3F.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-VictoryRoad3F_h:
- db CAVERN ; tileset
- db VICTORY_ROAD_3F_HEIGHT, VICTORY_ROAD_3F_WIDTH ; dimensions (y, x)
- dw VictoryRoad3F_Blocks ; blocks
- dw VictoryRoad3F_TextPointers ; texts
- dw VictoryRoad3F_Script ; scripts
- db 0 ; connections
- dw VictoryRoad3F_Object ; objects
diff --git a/data/mapHeaders/ViridianCity.asm b/data/mapHeaders/ViridianCity.asm
deleted file mode 100755
index 09f7b9f4..00000000
--- a/data/mapHeaders/ViridianCity.asm
+++ /dev/null
@@ -1,11 +0,0 @@
-ViridianCity_h:
- db OVERWORLD ; tileset
- db VIRIDIAN_CITY_HEIGHT, VIRIDIAN_CITY_WIDTH ; dimensions (y, x)
- dw ViridianCity_Blocks ; blocks
- dw ViridianCity_TextPointers ; texts
- dw ViridianCity_Script ; scripts
- db NORTH | SOUTH | WEST ; connections
- NORTH_MAP_CONNECTION VIRIDIAN_CITY, ROUTE_2, 5, 0, Route2_Blocks
- SOUTH_MAP_CONNECTION VIRIDIAN_CITY, ROUTE_1, 5, 0, Route1_Blocks, 1
- WEST_MAP_CONNECTION VIRIDIAN_CITY, ROUTE_22, 4, 0, Route22_Blocks
- dw ViridianCity_Object ; objects
diff --git a/data/mapHeaders/ViridianForest.asm b/data/mapHeaders/ViridianForest.asm
deleted file mode 100755
index a8df3e6e..00000000
--- a/data/mapHeaders/ViridianForest.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-ViridianForest_h:
- db FOREST ; tileset
- db VIRIDIAN_FOREST_HEIGHT, VIRIDIAN_FOREST_WIDTH ; dimensions (y, x)
- dw ViridianForest_Blocks ; blocks
- dw ViridianForest_TextPointers ; texts
- dw ViridianForest_Script ; scripts
- db 0 ; connections
- dw ViridianForest_Object ; objects
diff --git a/data/mapHeaders/ViridianForestNorthGate.asm b/data/mapHeaders/ViridianForestNorthGate.asm
deleted file mode 100755
index 48535977..00000000
--- a/data/mapHeaders/ViridianForestNorthGate.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-ViridianForestNorthGate_h:
- db FOREST_GATE ; tileset
- db VIRIDIAN_FOREST_NORTH_GATE_HEIGHT, VIRIDIAN_FOREST_NORTH_GATE_WIDTH ; dimensions (y, x)
- dw ViridianForestNorthGate_Blocks ; blocks
- dw ViridianForestNorthGate_TextPointers ; texts
- dw ViridianForestNorthGate_Script ; scripts
- db 0 ; connections
- dw ViridianForestNorthGate_Object ; objects
diff --git a/data/mapHeaders/ViridianForestSouthGate.asm b/data/mapHeaders/ViridianForestSouthGate.asm
deleted file mode 100755
index b134ebea..00000000
--- a/data/mapHeaders/ViridianForestSouthGate.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-ViridianForestSouthGate_h:
- db FOREST_GATE ; tileset
- db VIRIDIAN_FOREST_SOUTH_GATE_HEIGHT, VIRIDIAN_FOREST_SOUTH_GATE_WIDTH ; dimensions (y, x)
- dw ViridianForestSouthGate_Blocks ; blocks
- dw ViridianForestSouthGate_TextPointers ; texts
- dw ViridianForestSouthGate_Script ; scripts
- db 0 ; connections
- dw ViridianForestSouthGate_Object ; objects
diff --git a/data/mapHeaders/ViridianGym.asm b/data/mapHeaders/ViridianGym.asm
deleted file mode 100755
index 9b27845c..00000000
--- a/data/mapHeaders/ViridianGym.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-ViridianGym_h:
- db GYM ; tileset
- db VIRIDIAN_GYM_HEIGHT, VIRIDIAN_GYM_WIDTH ; dimensions (y, x)
- dw ViridianGym_Blocks ; blocks
- dw ViridianGym_TextPointers ; texts
- dw ViridianGym_Script ; scripts
- db 0 ; connections
- dw ViridianGym_Object ; objects
diff --git a/data/mapHeaders/ViridianMart.asm b/data/mapHeaders/ViridianMart.asm
deleted file mode 100755
index 063f3327..00000000
--- a/data/mapHeaders/ViridianMart.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-ViridianMart_h:
- db MART ; tileset
- db VIRIDIAN_MART_HEIGHT, VIRIDIAN_MART_WIDTH ; dimensions (y, x)
- dw ViridianMart_Blocks ; blocks
- dw ViridianMart_TextPointers ; texts
- dw ViridianMart_Script ; scripts
- db 0 ; connections
- dw ViridianMart_Object ; objects
diff --git a/data/mapHeaders/ViridianNicknameHouse.asm b/data/mapHeaders/ViridianNicknameHouse.asm
deleted file mode 100755
index b6a00392..00000000
--- a/data/mapHeaders/ViridianNicknameHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-ViridianNicknameHouse_h:
- db HOUSE ; tileset
- db VIRIDIAN_NICKNAME_HOUSE_HEIGHT, VIRIDIAN_NICKNAME_HOUSE_WIDTH ; dimensions (y, x)
- dw ViridianNicknameHouse_Blocks ; blocks
- dw ViridianNicknameHouse_TextPointers ; texts
- dw ViridianNicknameHouse_Script ; scripts
- db 0 ; connections
- dw ViridianNicknameHouse_Object ; objects
diff --git a/data/mapHeaders/ViridianPokecenter.asm b/data/mapHeaders/ViridianPokecenter.asm
deleted file mode 100755
index 25c569d8..00000000
--- a/data/mapHeaders/ViridianPokecenter.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-ViridianPokecenter_h:
- db POKECENTER ; tileset
- db VIRIDIAN_POKECENTER_HEIGHT, VIRIDIAN_POKECENTER_WIDTH ; dimensions (y, x)
- dw ViridianPokecenter_Blocks ; blocks
- dw ViridianPokecenter_TextPointers ; texts
- dw ViridianPokecenter_Script ; scripts
- db 0 ; connections
- dw ViridianPokecenter_Object ; objects
diff --git a/data/mapHeaders/ViridianSchoolHouse.asm b/data/mapHeaders/ViridianSchoolHouse.asm
deleted file mode 100755
index 15e5c88f..00000000
--- a/data/mapHeaders/ViridianSchoolHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-ViridianSchoolHouse_h:
- db HOUSE ; tileset
- db VIRIDIAN_SCHOOL_HOUSE_HEIGHT, VIRIDIAN_SCHOOL_HOUSE_WIDTH ; dimensions (y, x)
- dw ViridianSchoolHouse_Blocks ; blocks
- dw ViridianSchoolHouse_TextPointers ; texts
- dw ViridianSchoolHouse_Script ; scripts
- db 0 ; connections
- dw ViridianSchoolHouse_Object ; objects
diff --git a/data/mapHeaders/WardensHouse.asm b/data/mapHeaders/WardensHouse.asm
deleted file mode 100755
index 128e357a..00000000
--- a/data/mapHeaders/WardensHouse.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-WardensHouse_h:
- db LAB ; tileset
- db WARDENS_HOUSE_HEIGHT, WARDENS_HOUSE_WIDTH ; dimensions (y, x)
- dw WardensHouse_Blocks ; blocks
- dw WardensHouse_TextPointers ; texts
- dw WardensHouse_Script ; scripts
- db 0 ; connections
- dw WardensHouse_Object ; objects
diff --git a/data/mapObjects/AgathasRoom.asm b/data/mapObjects/AgathasRoom.asm
deleted file mode 100755
index 4a82e78d..00000000
--- a/data/mapObjects/AgathasRoom.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-AgathasRoom_Object:
- db $0 ; border block
-
- db 4 ; warps
- warp 4, 11, 2, BRUNOS_ROOM
- warp 5, 11, 3, BRUNOS_ROOM
- warp 4, 0, 0, LANCES_ROOM
- warp 5, 0, 0, LANCES_ROOM
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_AGATHA, 5, 2, STAY, DOWN, 1, OPP_AGATHA, 1
-
- ; warp-to
- warp_to 4, 11, AGATHAS_ROOM_WIDTH ; BRUNOS_ROOM
- warp_to 5, 11, AGATHAS_ROOM_WIDTH ; BRUNOS_ROOM
- warp_to 4, 0, AGATHAS_ROOM_WIDTH ; LANCES_ROOM
- warp_to 5, 0, AGATHAS_ROOM_WIDTH ; LANCES_ROOM
diff --git a/data/mapObjects/BeachHouse.asm b/data/mapObjects/BeachHouse.asm
deleted file mode 100644
index 02bd8037..00000000
--- a/data/mapObjects/BeachHouse.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-BeachHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2,7,0,-1
- warp 3,7,0,-1
-
- db 4 ; signs
- sign 3,0,3
- sign 7,0,4
- sign 11,0,5
- sign 13,1,6
-
- db 2 ; objects
- object SPRITE_FISHER, 2, 3, STAY, DOWN, 1 ; surfin' dude
- object $3d, 5, 3, WALK, $01, 2 ; pikachu
-
- ; warp-to
- warp_to 2,7, BEACH_HOUSE_WIDTH
- warp_to 3,7, BEACH_HOUSE_WIDTH
diff --git a/data/mapObjects/BikeShop.asm b/data/mapObjects/BikeShop.asm
deleted file mode 100755
index 9f21ab3e..00000000
--- a/data/mapObjects/BikeShop.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-BikeShop_Object:
- db $e ; border block
-
- db 2 ; warps
- warp 2, 7, 4, -1
- warp 3, 7, 4, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_BIKE_SHOP_GUY, 6, 2, STAY, NONE, 1 ; person
- object SPRITE_MOM_GEISHA, 5, 6, WALK, 1, 2 ; person
- object SPRITE_BUG_CATCHER, 1, 3, STAY, UP, 3 ; person
-
- ; warp-to
- warp_to 2, 7, BIKE_SHOP_WIDTH
- warp_to 3, 7, BIKE_SHOP_WIDTH
diff --git a/data/mapObjects/BillsHouse.asm b/data/mapObjects/BillsHouse.asm
deleted file mode 100755
index c8f708cb..00000000
--- a/data/mapObjects/BillsHouse.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-BillsHouse_Object:
- db $d ; border block
-
- db 2 ; warps
- warp 2, 7, 0, -1
- warp 3, 7, 0, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_SLOWBRO, 6, 5, STAY, NONE, 1 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 4, 4, STAY, NONE, 2 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 6, 5, STAY, NONE, 3 ; person
-
- ; warp-to
- warp_to 2, 7, BILLS_HOUSE_WIDTH
- warp_to 3, 7, BILLS_HOUSE_WIDTH
diff --git a/data/mapObjects/BluesHouse.asm b/data/mapObjects/BluesHouse.asm
deleted file mode 100755
index 24c5baab..00000000
--- a/data/mapObjects/BluesHouse.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-BluesHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 1, -1
- warp 3, 7, 1, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_DAISY, 2, 3, STAY, RIGHT, 1, 0 ; Daisy, sitting by map
- object SPRITE_DAISY, 6, 4, WALK, 1, 2, 0 ; Daisy, walking around
- object SPRITE_BOOK_MAP_DEX, 3, 3, STAY, NONE, 3, 0 ; map on table
-
- ; warp-to
- warp_to 2, 7, BLUES_HOUSE_WIDTH
- warp_to 3, 7, BLUES_HOUSE_WIDTH
diff --git a/data/mapObjects/BrunosRoom.asm b/data/mapObjects/BrunosRoom.asm
deleted file mode 100755
index dde1e2dd..00000000
--- a/data/mapObjects/BrunosRoom.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-BrunosRoom_Object:
- db $3 ; border block
-
- db 4 ; warps
- warp 4, 11, 2, LORELEIS_ROOM
- warp 5, 11, 3, LORELEIS_ROOM
- warp 4, 0, 0, AGATHAS_ROOM
- warp 5, 0, 1, AGATHAS_ROOM
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_BRUNO, 5, 2, STAY, DOWN, 1, OPP_BRUNO, 1
-
- ; warp-to
- warp_to 4, 11, BRUNOS_ROOM_WIDTH ; LORELEIS_ROOM
- warp_to 5, 11, BRUNOS_ROOM_WIDTH ; LORELEIS_ROOM
- warp_to 4, 0, BRUNOS_ROOM_WIDTH ; AGATHAS_ROOM
- warp_to 5, 0, BRUNOS_ROOM_WIDTH ; AGATHAS_ROOM
diff --git a/data/mapObjects/CeladonChiefHouse.asm b/data/mapObjects/CeladonChiefHouse.asm
deleted file mode 100755
index 88850f35..00000000
--- a/data/mapObjects/CeladonChiefHouse.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-CeladonChiefHouse_Object:
- db $f ; border block
-
- db 2 ; warps
- warp 2, 7, 11, -1
- warp 3, 7, 11, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_OLD_PERSON, 4, 2, STAY, DOWN, 1 ; person
- object SPRITE_ROCKET, 1, 4, WALK, 0, 2 ; person
- object SPRITE_SAILOR, 5, 6, STAY, LEFT, 3 ; person
-
- ; warp-to
- warp_to 2, 7, CELADON_CHIEF_HOUSE_WIDTH
- warp_to 3, 7, CELADON_CHIEF_HOUSE_WIDTH
diff --git a/data/mapObjects/CeladonCity.asm b/data/mapObjects/CeladonCity.asm
deleted file mode 100755
index 005fc61e..00000000
--- a/data/mapObjects/CeladonCity.asm
+++ /dev/null
@@ -1,54 +0,0 @@
-CeladonCity_Object:
- db $f ; border block
-
- db 13 ; warps
- warp 8, 13, 0, CELADON_MART_1F
- warp 10, 13, 2, CELADON_MART_1F
- warp 24, 9, 0, CELADON_MANSION_1F
- warp 24, 3, 2, CELADON_MANSION_1F
- warp 25, 3, 2, CELADON_MANSION_1F
- warp 41, 9, 0, CELADON_POKECENTER
- warp 12, 27, 0, CELADON_GYM
- warp 28, 19, 0, GAME_CORNER
- warp 39, 19, 0, CELADON_MART_5F ; beta warp! no longer used
- warp 33, 19, 0, GAME_CORNER_PRIZE_ROOM
- warp 31, 27, 0, CELADON_DINER
- warp 35, 27, 0, CELADON_CHIEF_HOUSE
- warp 43, 27, 0, CELADON_HOTEL
-
- db 9 ; signs
- sign 27, 15, 10 ; CeladonCityText10
- sign 19, 15, 11 ; CeladonCityText11
- sign 42, 9, 12 ; PokeCenterSignText
- sign 13, 29, 13 ; CeladonCityText13
- sign 21, 9, 14 ; CeladonCityText14
- sign 12, 13, 15 ; CeladonCityText15
- sign 39, 21, 16 ; CeladonCityText16
- sign 33, 21, 17 ; CeladonCityText17
- sign 27, 21, 18 ; CeladonCityText18
-
- db 9 ; objects
- object SPRITE_LITTLE_GIRL, 8, 17, WALK, 0, 1 ; person
- object SPRITE_OLD_PERSON, 11, 28, STAY, UP, 2 ; person
- object SPRITE_GIRL, 14, 19, WALK, 1, 3 ; person
- object SPRITE_OLD_PERSON, 25, 22, STAY, DOWN, 4 ; person
- object SPRITE_OLD_PERSON, 22, 16, STAY, DOWN, 5 ; person
- object SPRITE_FISHER2, 32, 12, STAY, LEFT, 6 ; person
- object SPRITE_SLOWBRO, 30, 12, STAY, RIGHT, 7 ; person
- object SPRITE_ROCKET, 32, 29, WALK, 2, 8 ; person
- object SPRITE_ROCKET, 42, 14, WALK, 2, 9 ; person
-
- ; warp-to
- warp_to 8, 13, CELADON_CITY_WIDTH ; CELADON_MART_1F
- warp_to 10, 13, CELADON_CITY_WIDTH ; CELADON_MART_1F
- warp_to 24, 9, CELADON_CITY_WIDTH ; CELADON_MANSION_1F
- warp_to 24, 3, CELADON_CITY_WIDTH ; CELADON_MANSION_1F
- warp_to 25, 3, CELADON_CITY_WIDTH ; CELADON_MANSION_1F
- warp_to 41, 9, CELADON_CITY_WIDTH ; CELADON_POKECENTER
- warp_to 12, 27, CELADON_CITY_WIDTH ; CELADON_GYM
- warp_to 28, 19, CELADON_CITY_WIDTH ; GAME_CORNER
- warp_to 39, 19, CELADON_CITY_WIDTH ; CELADON_MART_5F
- warp_to 33, 19, CELADON_CITY_WIDTH ; GAME_CORNER_PRIZE_ROOM
- warp_to 31, 27, CELADON_CITY_WIDTH ; CELADON_DINER
- warp_to 35, 27, CELADON_CITY_WIDTH ; CELADON_CHIEF_HOUSE
- warp_to 43, 27, CELADON_CITY_WIDTH ; CELADON_HOTEL
diff --git a/data/mapObjects/CeladonDiner.asm b/data/mapObjects/CeladonDiner.asm
deleted file mode 100755
index 0a4a895d..00000000
--- a/data/mapObjects/CeladonDiner.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-CeladonDiner_Object:
- db $f ; border block
-
- db 2 ; warps
- warp 3, 7, 10, -1
- warp 4, 7, 10, -1
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_COOK, 8, 5, WALK, 2, 1 ; person
- object SPRITE_MOM_GEISHA, 7, 2, STAY, NONE, 2 ; person
- object SPRITE_FAT_BALD_GUY, 1, 4, STAY, DOWN, 3 ; person
- object SPRITE_FISHER2, 5, 3, STAY, RIGHT, 4 ; person
- object SPRITE_GYM_HELPER, 0, 1, STAY, DOWN, 5 ; person
-
- ; warp-to
- warp_to 3, 7, CELADON_DINER_WIDTH
- warp_to 4, 7, CELADON_DINER_WIDTH
diff --git a/data/mapObjects/CeladonGym.asm b/data/mapObjects/CeladonGym.asm
deleted file mode 100755
index 98fce576..00000000
--- a/data/mapObjects/CeladonGym.asm
+++ /dev/null
@@ -1,22 +0,0 @@
-CeladonGym_Object:
- db $3 ; border block
-
- db 2 ; warps
- warp 4, 17, 6, -1
- warp 5, 17, 6, -1
-
- db 0 ; signs
-
- db 8 ; objects
- object SPRITE_ERIKA, 4, 3, STAY, DOWN, 1, OPP_ERIKA, 1
- object SPRITE_LASS, 2, 11, STAY, RIGHT, 2, OPP_LASS, 17
- object SPRITE_FOULARD_WOMAN, 7, 10, STAY, LEFT, 3, OPP_BEAUTY, 1
- object SPRITE_LASS, 9, 5, STAY, DOWN, 4, OPP_JR_TRAINER_F, 11
- object SPRITE_FOULARD_WOMAN, 1, 5, STAY, DOWN, 5, OPP_BEAUTY, 2
- object SPRITE_LASS, 6, 3, STAY, DOWN, 6, OPP_LASS, 18
- 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
- warp_to 4, 17, CELADON_GYM_WIDTH
- warp_to 5, 17, CELADON_GYM_WIDTH
diff --git a/data/mapObjects/CeladonHotel.asm b/data/mapObjects/CeladonHotel.asm
deleted file mode 100755
index f4aa1305..00000000
--- a/data/mapObjects/CeladonHotel.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-CeladonHotel_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 12, -1
- warp 4, 7, 12, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_OLD_MEDIUM_WOMAN, 3, 1, STAY, DOWN, 1 ; person
- object SPRITE_FOULARD_WOMAN, 2, 4, STAY, NONE, 2 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 8, 4, WALK, 2, 3 ; person
-
- ; warp-to
- warp_to 3, 7, CELADON_HOTEL_WIDTH
- warp_to 4, 7, CELADON_HOTEL_WIDTH
diff --git a/data/mapObjects/CeladonMansion1F.asm b/data/mapObjects/CeladonMansion1F.asm
deleted file mode 100755
index 1abd434c..00000000
--- a/data/mapObjects/CeladonMansion1F.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-CeladonMansion1F_Object:
- db $f ; border block
-
- db 5 ; warps
- warp 4, 11, 2, -1
- warp 5, 11, 2, -1
- warp 4, 0, 4, -1
- warp 7, 1, 1, CELADON_MANSION_2F
- warp 2, 1, 2, CELADON_MANSION_2F
-
- db 1 ; signs
- sign 4, 9, 5 ; CeladonMansion1Text5
-
- db 4 ; objects
- object SPRITE_SLOWBRO, 0, 5, STAY, RIGHT, 1 ; person
- object SPRITE_OLD_MEDIUM_WOMAN, 1, 5, STAY, DOWN, 2 ; person
- object SPRITE_CLEFAIRY, 1, 8, WALK, 2, 3 ; person
- object SPRITE_SLOWBRO, 4, 4, WALK, 1, 4 ; person
-
- ; warp-to
- warp_to 4, 11, CELADON_MANSION_1F_WIDTH
- warp_to 5, 11, CELADON_MANSION_1F_WIDTH
- warp_to 4, 0, CELADON_MANSION_1F_WIDTH
- warp_to 7, 1, CELADON_MANSION_1F_WIDTH ; CELADON_MANSION_2F
- warp_to 2, 1, CELADON_MANSION_1F_WIDTH ; CELADON_MANSION_2F
diff --git a/data/mapObjects/CeladonMansion2F.asm b/data/mapObjects/CeladonMansion2F.asm
deleted file mode 100755
index 09c94d29..00000000
--- a/data/mapObjects/CeladonMansion2F.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-CeladonMansion2F_Object:
- db $f ; border block
-
- db 4 ; warps
- warp 6, 1, 0, CELADON_MANSION_3F
- warp 7, 1, 3, CELADON_MANSION_1F
- warp 2, 1, 4, CELADON_MANSION_1F
- warp 4, 1, 3, CELADON_MANSION_3F
-
- db 1 ; signs
- sign 4, 9, 1 ; CeladonMansion2Text1
-
- db 0 ; objects
-
- ; warp-to
- warp_to 6, 1, CELADON_MANSION_2F_WIDTH ; CELADON_MANSION_3F
- warp_to 7, 1, CELADON_MANSION_2F_WIDTH ; CELADON_MANSION_1F
- warp_to 2, 1, CELADON_MANSION_2F_WIDTH ; CELADON_MANSION_1F
- warp_to 4, 1, CELADON_MANSION_2F_WIDTH ; CELADON_MANSION_3F
diff --git a/data/mapObjects/CeladonMansion3F.asm b/data/mapObjects/CeladonMansion3F.asm
deleted file mode 100755
index 32701f14..00000000
--- a/data/mapObjects/CeladonMansion3F.asm
+++ /dev/null
@@ -1,26 +0,0 @@
-CeladonMansion3F_Object:
- db $f ; border block
-
- db 4 ; warps
- warp 6, 1, 0, CELADON_MANSION_2F
- warp 7, 1, 0, CELADON_MANSION_ROOF
- warp 2, 1, 1, CELADON_MANSION_ROOF
- warp 4, 1, 3, CELADON_MANSION_2F
-
- db 4 ; signs
- sign 1, 3, 5 ; CeladonMansion3Text5
- sign 4, 3, 6 ; CeladonMansion3Text6
- sign 1, 6, 7 ; CeladonMansion3Text7
- sign 4, 9, 8 ; CeladonMansion3Text8
-
- db 4 ; objects
- object SPRITE_BIKE_SHOP_GUY, 0, 4, STAY, UP, 1 ; person
- object SPRITE_MART_GUY, 3, 4, STAY, UP, 2 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 0, 7, STAY, UP, 3 ; person
- object SPRITE_LAPRAS_GIVER, 2, 3, STAY, NONE, 4 ; person
-
- ; warp-to
- warp_to 6, 1, CELADON_MANSION_3F_WIDTH ; CELADON_MANSION_2F
- warp_to 7, 1, CELADON_MANSION_3F_WIDTH ; CELADON_MANSION_ROOF
- warp_to 2, 1, CELADON_MANSION_3F_WIDTH ; CELADON_MANSION_ROOF
- warp_to 4, 1, CELADON_MANSION_3F_WIDTH ; CELADON_MANSION_2F
diff --git a/data/mapObjects/CeladonMansionRoof.asm b/data/mapObjects/CeladonMansionRoof.asm
deleted file mode 100755
index 353b0b96..00000000
--- a/data/mapObjects/CeladonMansionRoof.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-CeladonMansionRoof_Object:
- db $9 ; border block
-
- db 3 ; warps
- warp 6, 1, 1, CELADON_MANSION_3F
- warp 2, 1, 2, CELADON_MANSION_3F
- warp 2, 7, 0, CELADON_MANSION_ROOF_HOUSE
-
- db 1 ; signs
- sign 3, 7, 1 ; CeladonMansion4Text1
-
- db 0 ; objects
-
- ; warp-to
- warp_to 6, 1, CELADON_MANSION_ROOF_WIDTH ; CELADON_MANSION_3F
- warp_to 2, 1, CELADON_MANSION_ROOF_WIDTH ; CELADON_MANSION_3F
- warp_to 2, 7, CELADON_MANSION_ROOF_WIDTH ; CELADON_MANSION_ROOF_HOUSE
diff --git a/data/mapObjects/CeladonMansionRoofHouse.asm b/data/mapObjects/CeladonMansionRoofHouse.asm
deleted file mode 100755
index b6a6149f..00000000
--- a/data/mapObjects/CeladonMansionRoofHouse.asm
+++ /dev/null
@@ -1,16 +0,0 @@
-CeladonMansionRoofHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 2, CELADON_MANSION_ROOF
- warp 3, 7, 2, CELADON_MANSION_ROOF
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_HIKER, 2, 2, STAY, DOWN, 1 ; person
- object SPRITE_BALL, 4, 3, STAY, NONE, 2 ; person
-
- ; warp-to
- warp_to 2, 7, CELADON_MANSION_ROOF_HOUSE_WIDTH ; CELADON_MANSION_ROOF
- warp_to 3, 7, CELADON_MANSION_ROOF_HOUSE_WIDTH ; CELADON_MANSION_ROOF
diff --git a/data/mapObjects/CeladonMart1F.asm b/data/mapObjects/CeladonMart1F.asm
deleted file mode 100755
index 2037369a..00000000
--- a/data/mapObjects/CeladonMart1F.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-CeladonMart1F_Object:
- db $f ; border block
-
- db 6 ; warps
- warp 2, 7, 0, -1
- warp 3, 7, 0, -1
- warp 16, 7, 1, -1
- warp 17, 7, 1, -1
- warp 12, 1, 0, CELADON_MART_2F
- warp 1, 1, 0, CELADON_MART_ELEVATOR
-
- db 2 ; signs
- sign 11, 4, 2 ; CeladonMart1Text2
- sign 14, 1, 3 ; CeladonMart1Text3
-
- db 1 ; objects
- object SPRITE_CABLE_CLUB_WOMAN, 8, 3, STAY, DOWN, 1 ; person
-
- ; warp-to
- warp_to 2, 7, CELADON_MART_1F_WIDTH
- warp_to 3, 7, CELADON_MART_1F_WIDTH
- warp_to 16, 7, CELADON_MART_1F_WIDTH
- warp_to 17, 7, CELADON_MART_1F_WIDTH
- warp_to 12, 1, CELADON_MART_1F_WIDTH ; CELADON_MART_2F
- warp_to 1, 1, CELADON_MART_1F_WIDTH ; CELADON_MART_ELEVATOR
diff --git a/data/mapObjects/CeladonMart2F.asm b/data/mapObjects/CeladonMart2F.asm
deleted file mode 100755
index 2f5f428e..00000000
--- a/data/mapObjects/CeladonMart2F.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-CeladonMart2F_Object:
- db $f ; border block
-
- db 3 ; warps
- warp 12, 1, 4, CELADON_MART_1F
- warp 16, 1, 1, CELADON_MART_3F
- warp 1, 1, 0, CELADON_MART_ELEVATOR
-
- db 1 ; signs
- sign 14, 1, 5 ; CeladonMart2Text5
-
- db 4 ; objects
- object SPRITE_MART_GUY, 5, 3, STAY, DOWN, 1 ; person
- object SPRITE_MART_GUY, 6, 3, STAY, DOWN, 2 ; person
- object SPRITE_FAT_BALD_GUY, 19, 5, STAY, NONE, 3 ; person
- object SPRITE_GIRL, 14, 4, WALK, 1, 4 ; person
-
- ; warp-to
- warp_to 12, 1, CELADON_MART_2F_WIDTH ; CELADON_MART_1F
- warp_to 16, 1, CELADON_MART_2F_WIDTH ; CELADON_MART_3F
- warp_to 1, 1, CELADON_MART_2F_WIDTH ; CELADON_MART_ELEVATOR
diff --git a/data/mapObjects/CeladonMart3F.asm b/data/mapObjects/CeladonMart3F.asm
deleted file mode 100755
index 6c6adfd4..00000000
--- a/data/mapObjects/CeladonMart3F.asm
+++ /dev/null
@@ -1,33 +0,0 @@
-CeladonMart3F_Object:
- db $f ; border block
-
- db 3 ; warps
- warp 12, 1, 0, CELADON_MART_4F
- warp 16, 1, 1, CELADON_MART_2F
- warp 1, 1, 0, CELADON_MART_ELEVATOR
-
- db 12 ; signs
- sign 2, 4, 6 ; CeladonMart3Text6
- sign 3, 4, 7 ; CeladonMart3Text7
- sign 5, 4, 8 ; CeladonMart3Text8
- sign 6, 4, 9 ; CeladonMart3Text9
- sign 2, 6, 10 ; CeladonMart3Text10
- sign 3, 6, 11 ; CeladonMart3Text11
- sign 5, 6, 12 ; CeladonMart3Text12
- sign 6, 6, 13 ; CeladonMart3Text13
- sign 14, 1, 14 ; CeladonMart3Text14
- sign 4, 1, 15 ; CeladonMart3Text15
- sign 6, 1, 16 ; CeladonMart3Text16
- sign 10, 1, 17 ; CeladonMart3Text17
-
- db 5 ; objects
- object SPRITE_MART_GUY, 16, 5, STAY, NONE, 1 ; person
- object SPRITE_GAMEBOY_KID, 11, 6, STAY, RIGHT, 2 ; person
- object SPRITE_GAMEBOY_KID, 7, 2, STAY, DOWN, 3 ; person
- object SPRITE_GAMEBOY_KID, 8, 2, STAY, DOWN, 4 ; person
- object SPRITE_YOUNG_BOY, 2, 5, STAY, UP, 5 ; person
-
- ; warp-to
- warp_to 12, 1, CELADON_MART_3F_WIDTH ; CELADON_MART_4F
- warp_to 16, 1, CELADON_MART_3F_WIDTH ; CELADON_MART_2F
- warp_to 1, 1, CELADON_MART_3F_WIDTH ; CELADON_MART_ELEVATOR
diff --git a/data/mapObjects/CeladonMart4F.asm b/data/mapObjects/CeladonMart4F.asm
deleted file mode 100755
index 18ba3bdc..00000000
--- a/data/mapObjects/CeladonMart4F.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-CeladonMart4F_Object:
- db $f ; border block
-
- db 3 ; warps
- warp 12, 1, 0, CELADON_MART_3F
- warp 16, 1, 1, CELADON_MART_5F
- warp 1, 1, 0, CELADON_MART_ELEVATOR
-
- db 1 ; signs
- sign 14, 1, 4 ; CeladonMart4Text4
-
- db 3 ; objects
- object SPRITE_MART_GUY, 5, 7, STAY, NONE, 1 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 15, 5, WALK, 2, 2 ; person
- object SPRITE_BUG_CATCHER, 5, 2, WALK, 2, 3 ; person
-
- ; warp-to
- warp_to 12, 1, CELADON_MART_4F_WIDTH ; CELADON_MART_3F
- warp_to 16, 1, CELADON_MART_4F_WIDTH ; CELADON_MART_5F
- warp_to 1, 1, CELADON_MART_4F_WIDTH ; CELADON_MART_ELEVATOR
diff --git a/data/mapObjects/CeladonMart5F.asm b/data/mapObjects/CeladonMart5F.asm
deleted file mode 100755
index fb1201c9..00000000
--- a/data/mapObjects/CeladonMart5F.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-CeladonMart5F_Object:
- db $f ; border block
-
- db 3 ; warps
- warp 12, 1, 0, CELADON_MART_ROOF
- warp 16, 1, 1, CELADON_MART_4F
- warp 1, 1, 0, CELADON_MART_ELEVATOR
-
- db 1 ; signs
- sign 14, 1, 5 ; CeladonMart5Text5
-
- db 4 ; objects
- object SPRITE_GENTLEMAN, 14, 5, WALK, 1, 1 ; person
- object SPRITE_SAILOR, 2, 6, STAY, NONE, 2 ; person
- object SPRITE_MART_GUY, 5, 3, STAY, DOWN, 3 ; person
- object SPRITE_MART_GUY, 6, 3, STAY, DOWN, 4 ; person
-
- ; warp-to
- warp_to 12, 1, CELADON_MART_5F_WIDTH ; CELADON_MART_ROOF
- warp_to 16, 1, CELADON_MART_5F_WIDTH ; CELADON_MART_4F
- warp_to 1, 1, CELADON_MART_5F_WIDTH ; CELADON_MART_ELEVATOR
diff --git a/data/mapObjects/CeladonMartElevator.asm b/data/mapObjects/CeladonMartElevator.asm
deleted file mode 100755
index 9688daef..00000000
--- a/data/mapObjects/CeladonMartElevator.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-CeladonMartElevator_Object:
- db $f ; border block
-
- db 2 ; warps
- warp 1, 3, 5, CELADON_MART_1F
- warp 2, 3, 5, CELADON_MART_1F
-
- db 1 ; signs
- sign 3, 0, 1 ; CeladonMartElevatorText1
-
- db 0 ; objects
-
- ; warp-to
- warp_to 1, 3, CELADON_MART_ELEVATOR_WIDTH ; CELADON_MART_1F
- warp_to 2, 3, CELADON_MART_ELEVATOR_WIDTH ; CELADON_MART_1F
diff --git a/data/mapObjects/CeladonMartRoof.asm b/data/mapObjects/CeladonMartRoof.asm
deleted file mode 100755
index 05cef2d4..00000000
--- a/data/mapObjects/CeladonMartRoof.asm
+++ /dev/null
@@ -1,18 +0,0 @@
-CeladonMartRoof_Object:
- db $42 ; border block
-
- db 1 ; warps
- warp 15, 2, 0, CELADON_MART_5F
-
- db 4 ; signs
- sign 10, 1, 3 ; CeladonMartRoofText3
- sign 11, 1, 4 ; CeladonMartRoofText4
- sign 12, 2, 5 ; CeladonMartRoofText5
- sign 13, 2, 6 ; CeladonMartRoofText6
-
- db 2 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, 10, 4, STAY, LEFT, 1 ; person
- object SPRITE_LITTLE_GIRL, 5, 5, WALK, 0, 2 ; person
-
- ; warp-to
- warp_to 15, 2, CELADON_MART_ROOF_WIDTH ; CELADON_MART_5F
diff --git a/data/mapObjects/CeladonPokecenter.asm b/data/mapObjects/CeladonPokecenter.asm
deleted file mode 100755
index 91698e34..00000000
--- a/data/mapObjects/CeladonPokecenter.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-CeladonPokecenter_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 5, -1
- warp 4, 7, 5, -1
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
- object SPRITE_GENTLEMAN, 7, 3, STAY, DOWN, 2 ; person
- object SPRITE_FOULARD_WOMAN, 10, 5, WALK, 0, 3 ; person
- object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person
- object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
-
- ; warp-to
- warp_to 3, 7, CELADON_POKECENTER_WIDTH
- warp_to 4, 7, CELADON_POKECENTER_WIDTH
diff --git a/data/mapObjects/CeruleanBadgeHouse.asm b/data/mapObjects/CeruleanBadgeHouse.asm
deleted file mode 100755
index 62a6873b..00000000
--- a/data/mapObjects/CeruleanBadgeHouse.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-CeruleanBadgeHouse_Object:
- db $c ; border block
-
- db 3 ; warps
- warp 2, 0, 9, -1
- warp 2, 7, 8, -1
- warp 3, 7, 8, -1
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_FAT_BALD_GUY, 5, 3, STAY, RIGHT, 1 ; person
-
- ; warp-to
- warp_to 2, 0, CERULEAN_BADGE_HOUSE_WIDTH
- warp_to 2, 7, CERULEAN_BADGE_HOUSE_WIDTH
- warp_to 3, 7, CERULEAN_BADGE_HOUSE_WIDTH
diff --git a/data/mapObjects/CeruleanCave1F.asm b/data/mapObjects/CeruleanCave1F.asm
deleted file mode 100755
index a7f72b34..00000000
--- a/data/mapObjects/CeruleanCave1F.asm
+++ /dev/null
@@ -1,32 +0,0 @@
-CeruleanCave1F_Object:
- db $7d ; border block
-
- db 9 ; warps
- warp 24, 17, 6, -1
- warp 25, 17, 6, -1
- warp 27, 1, 0, CERULEAN_CAVE_2F
- warp 23, 7, 1, CERULEAN_CAVE_2F
- warp 18, 9, 2, CERULEAN_CAVE_2F
- warp 7, 1, 3, CERULEAN_CAVE_2F
- warp 1, 3, 4, CERULEAN_CAVE_2F
- warp 3, 11, 5, CERULEAN_CAVE_2F
- warp 0, 6, 0, CERULEAN_CAVE_B1F
-
- db 0 ; signs
-
- db 4 ; objects
- object SPRITE_BALL, $1d, $10, STAY, NONE, $1, RARE_CANDY
- object SPRITE_BALL, $7, $b, STAY, NONE, $2, MAX_ELIXER
- object SPRITE_BALL, $1d, $9, STAY, NONE, $3, MAX_REVIVE
- object SPRITE_BALL, $12, $3, STAY, NONE, $4, ULTRA_BALL
-
- ; warp-to
- warp_to 24, 17, CERULEAN_CAVE_1F_WIDTH
- warp_to 25, 17, CERULEAN_CAVE_1F_WIDTH
- warp_to 27, 1, CERULEAN_CAVE_1F_WIDTH ; CERULEAN_CAVE_2F
- warp_to 23, 7, CERULEAN_CAVE_1F_WIDTH ; CERULEAN_CAVE_2F
- warp_to 18, 9, CERULEAN_CAVE_1F_WIDTH ; CERULEAN_CAVE_2F
- warp_to 7, 1, CERULEAN_CAVE_1F_WIDTH ; CERULEAN_CAVE_2F
- warp_to 1, 3, CERULEAN_CAVE_1F_WIDTH ; CERULEAN_CAVE_2F
- warp_to 3, 11, CERULEAN_CAVE_1F_WIDTH ; CERULEAN_CAVE_2F
- warp_to 0, 6, CERULEAN_CAVE_1F_WIDTH ; CERULEAN_CAVE_B1F
diff --git a/data/mapObjects/CeruleanCave2F.asm b/data/mapObjects/CeruleanCave2F.asm
deleted file mode 100755
index 9a15eef8..00000000
--- a/data/mapObjects/CeruleanCave2F.asm
+++ /dev/null
@@ -1,26 +0,0 @@
-CeruleanCave2F_Object:
- db $7d ; border block
-
- db 6 ; warps
- warp 29, 1, 2, CERULEAN_CAVE_1F
- warp 22, 6, 3, CERULEAN_CAVE_1F
- warp 19, 7, 4, CERULEAN_CAVE_1F
- warp 9, 1, 5, CERULEAN_CAVE_1F
- warp 1, 3, 6, CERULEAN_CAVE_1F
- warp 3, 11, 7, CERULEAN_CAVE_1F
-
- db 0 ; signs
-
- db 4 ; objects
- object SPRITE_BALL, 0, 11, STAY, NONE, 1, RARE_CANDY
- object SPRITE_BALL, 16, 7, STAY, NONE, 2, ULTRA_BALL
- object SPRITE_BALL, 19, 11, STAY, NONE, 3, MAX_REVIVE
- object SPRITE_BALL, 27, 9, STAY, NONE, 4, FULL_RESTORE
-
- ; warp-to
- warp_to 29, 1, CERULEAN_CAVE_2F_WIDTH ; CERULEAN_CAVE_1F
- warp_to 22, 6, CERULEAN_CAVE_2F_WIDTH ; CERULEAN_CAVE_1F
- warp_to 19, 7, CERULEAN_CAVE_2F_WIDTH ; CERULEAN_CAVE_1F
- warp_to 9, 1, CERULEAN_CAVE_2F_WIDTH ; CERULEAN_CAVE_1F
- warp_to 1, 3, CERULEAN_CAVE_2F_WIDTH ; CERULEAN_CAVE_1F
- warp_to 3, 11, CERULEAN_CAVE_2F_WIDTH ; CERULEAN_CAVE_1F
diff --git a/data/mapObjects/CeruleanCaveB1F.asm b/data/mapObjects/CeruleanCaveB1F.asm
deleted file mode 100755
index 193d674b..00000000
--- a/data/mapObjects/CeruleanCaveB1F.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-CeruleanCaveB1F_Object:
- db $7d ; border block
-
- db 1 ; warps
- warp 3, 6, 8, CERULEAN_CAVE_1F
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_SLOWBRO, 27, 13, STAY, DOWN, 1, MEWTWO, 70
- object SPRITE_BALL, 26, 1, STAY, NONE, 2, ULTRA_BALL
- object SPRITE_BALL, 2, 13, STAY, NONE, 3, ULTRA_BALL
- object SPRITE_BALL, 3, 13, STAY, NONE, 4, MAX_REVIVE
- object SPRITE_BALL, 15, 3, STAY, NONE, 5, MAX_ELIXER
-
- ; warp-to
- warp_to 3, 6, CERULEAN_CAVE_B1F_WIDTH ; CERULEAN_CAVE_1F
diff --git a/data/mapObjects/CeruleanCity.asm b/data/mapObjects/CeruleanCity.asm
deleted file mode 100755
index ca05e65f..00000000
--- a/data/mapObjects/CeruleanCity.asm
+++ /dev/null
@@ -1,47 +0,0 @@
-CeruleanCity_Object:
- db $a ; border block
-
- db 10 ; warps
- warp 27, 11, 0, CERULEAN_TRASHED_HOUSE
- warp 13, 15, 0, CERULEAN_TRADE_HOUSE
- warp 19, 17, 0, CERULEAN_POKECENTER
- warp 30, 19, 0, CERULEAN_GYM
- warp 13, 25, 0, BIKE_SHOP
- warp 25, 25, 0, CERULEAN_MART
- warp 4, 11, 0, CERULEAN_CAVE_1F
- warp 27, 9, 2, CERULEAN_TRASHED_HOUSE
- warp 9, 11, 1, CERULEAN_BADGE_HOUSE
- warp 9, 9, 0, CERULEAN_BADGE_HOUSE
-
- db 6 ; signs
- sign 23, 19, 12 ; CeruleanCityText12
- sign 17, 29, 13 ; CeruleanCityText13
- sign 26, 25, 14 ; MartSignText
- sign 20, 17, 15 ; PokeCenterSignText
- sign 11, 25, 16 ; CeruleanCityText16
- sign 27, 21, 17 ; CeruleanCityText17
-
- db 11 ; objects
- object SPRITE_BLUE, 20, 2, STAY, DOWN, 1 ; person
- object SPRITE_ROCKET, 30, 8, STAY, NONE, 2, OPP_ROCKET, 5
- object SPRITE_BLACK_HAIR_BOY_1, 31, 20, STAY, DOWN, 3 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 15, 18, WALK, 1, 4 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 9, 21, WALK, 2, 5 ; person
- object SPRITE_OFFICER_JENNY, 28, 12, STAY, DOWN, 6 ; person
- object SPRITE_LASS, 29, 26, STAY, LEFT, 7 ; person
- object SPRITE_BALL, 28, 26, STAY, DOWN, 8 ; person
- object SPRITE_LASS, 9, 27, WALK, 2, 9 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 4, 12, STAY, DOWN, 10 ; person
- object SPRITE_OFFICER_JENNY, 27, 12, STAY, DOWN, 11 ; person
-
- ; warp-to
- warp_to 27, 11, CERULEAN_CITY_WIDTH ; CERULEAN_TRASHED_HOUSE
- warp_to 13, 15, CERULEAN_CITY_WIDTH ; CERULEAN_TRADE_HOUSE
- warp_to 19, 17, CERULEAN_CITY_WIDTH ; CERULEAN_POKECENTER
- warp_to 30, 19, CERULEAN_CITY_WIDTH ; CERULEAN_GYM
- warp_to 13, 25, CERULEAN_CITY_WIDTH ; BIKE_SHOP
- warp_to 25, 25, CERULEAN_CITY_WIDTH ; CERULEAN_MART
- warp_to 4, 11, CERULEAN_CITY_WIDTH ; CERULEAN_CAVE_1F
- warp_to 27, 9, CERULEAN_CITY_WIDTH ; CERULEAN_TRASHED_HOUSE
- warp_to 9, 11, CERULEAN_CITY_WIDTH ; CERULEAN_BADGE_HOUSE
- warp_to 9, 9, CERULEAN_CITY_WIDTH ; CERULEAN_BADGE_HOUSE
diff --git a/data/mapObjects/CeruleanGym.asm b/data/mapObjects/CeruleanGym.asm
deleted file mode 100755
index 96713648..00000000
--- a/data/mapObjects/CeruleanGym.asm
+++ /dev/null
@@ -1,18 +0,0 @@
-CeruleanGym_Object:
- db $3 ; border block
-
- db 2 ; warps
- warp 4, 13, 3, -1
- warp 5, 13, 3, -1
-
- db 0 ; signs
-
- db 4 ; objects
- 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, 10, STAY, DOWN, 4 ; person
-
- ; warp-to
- warp_to 4, 13, CERULEAN_GYM_WIDTH
- warp_to 5, 13, CERULEAN_GYM_WIDTH
diff --git a/data/mapObjects/CeruleanMart.asm b/data/mapObjects/CeruleanMart.asm
deleted file mode 100755
index 4659375f..00000000
--- a/data/mapObjects/CeruleanMart.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-CeruleanMart_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 5, -1
- warp 4, 7, 5, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person
- object SPRITE_BLACK_HAIR_BOY_1, 3, 4, WALK, 1, 2 ; person
- object SPRITE_LASS, 6, 2, WALK, 2, 3 ; person
-
- ; warp-to
- warp_to 3, 7, CERULEAN_MART_WIDTH
- warp_to 4, 7, CERULEAN_MART_WIDTH
diff --git a/data/mapObjects/CeruleanPokecenter.asm b/data/mapObjects/CeruleanPokecenter.asm
deleted file mode 100755
index 78b2330e..00000000
--- a/data/mapObjects/CeruleanPokecenter.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-CeruleanPokecenter_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 2, -1
- warp 4, 7, 2, -1
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 10, 5, WALK, 0, 2 ; person
- object SPRITE_GENTLEMAN, 4, 3, STAY, UP, 3 ; person
- object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person
- object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
-
- ; warp-to
- warp_to 3, 7, CERULEAN_POKECENTER_WIDTH
- warp_to 4, 7, CERULEAN_POKECENTER_WIDTH
diff --git a/data/mapObjects/CeruleanTradeHouse.asm b/data/mapObjects/CeruleanTradeHouse.asm
deleted file mode 100755
index e51f9544..00000000
--- a/data/mapObjects/CeruleanTradeHouse.asm
+++ /dev/null
@@ -1,18 +0,0 @@
-CeruleanTradeHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 1, -1
- warp 3, 7, 1, -1
-
- db 0 ; signs
-
- db 4 ; objects
- object SPRITE_GIRL, 3, 1, STAY, DOWN, 1 ; person
- object SPRITE_BULBASAUR, 4, 1, STAY, DOWN, 2 ; person
- object SPRITE_ODDISH, 1, 4, STAY, NONE, 3 ; person
- object SPRITE_SANDSHREW, 5, 3, STAY, LEFT, 4 ; person
-
- ; warp-to
- warp_to 2, 7, CERULEAN_TRADE_HOUSE_WIDTH
- warp_to 3, 7, CERULEAN_TRADE_HOUSE_WIDTH
diff --git a/data/mapObjects/CeruleanTrashedHouse.asm b/data/mapObjects/CeruleanTrashedHouse.asm
deleted file mode 100755
index 44b7cf20..00000000
--- a/data/mapObjects/CeruleanTrashedHouse.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-CeruleanTrashedHouse_Object:
- db $a ; border block
-
- db 3 ; warps
- warp 2, 7, 0, -1
- warp 3, 7, 0, -1
- warp 3, 0, 7, -1
-
- db 1 ; signs
- sign 3, 0, 3 ; CeruleanHouseTrashedText3
-
- db 2 ; objects
- object SPRITE_FISHER, 2, 1, STAY, DOWN, 1 ; person
- object SPRITE_GIRL, 5, 6, WALK, 2, 2 ; person
-
- ; warp-to
- warp_to 2, 7, CERULEAN_TRASHED_HOUSE_WIDTH
- warp_to 3, 7, CERULEAN_TRASHED_HOUSE_WIDTH
- warp_to 3, 0, CERULEAN_TRASHED_HOUSE_WIDTH
diff --git a/data/mapObjects/ChampionsRoom.asm b/data/mapObjects/ChampionsRoom.asm
deleted file mode 100755
index 1e0cb7f4..00000000
--- a/data/mapObjects/ChampionsRoom.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-ChampionsRoom_Object:
- db $3 ; border block
-
- db 4 ; warps
- warp 3, 7, 1, LANCES_ROOM
- warp 4, 7, 2, LANCES_ROOM
- warp 3, 0, 0, HALL_OF_FAME
- warp 4, 0, 0, HALL_OF_FAME
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_BLUE, 4, 2, STAY, DOWN, 1 ; person
- object SPRITE_OAK, 3, 7, STAY, UP, 2 ; person
-
- ; warp-to
- warp_to 3, 7, CHAMPIONS_ROOM_WIDTH ; LANCES_ROOM
- warp_to 4, 7, CHAMPIONS_ROOM_WIDTH ; LANCES_ROOM
- warp_to 3, 0, CHAMPIONS_ROOM_WIDTH ; HALL_OF_FAME
- warp_to 4, 0, CHAMPIONS_ROOM_WIDTH ; HALL_OF_FAME
diff --git a/data/mapObjects/CinnabarGym.asm b/data/mapObjects/CinnabarGym.asm
deleted file mode 100755
index 1a6e96cd..00000000
--- a/data/mapObjects/CinnabarGym.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-CinnabarGym_Object:
- db $2e ; border block
-
- db 2 ; warps
- warp 16, 17, 1, -1
- warp 17, 17, 1, -1
-
- db 0 ; signs
-
- db 9 ; objects
- object SPRITE_MR_MASTERBALL, 3, 3, STAY, DOWN, 1, OPP_BLAINE, 1
- object SPRITE_BLACK_HAIR_BOY_2, 17, 2, STAY, DOWN, 2, OPP_SUPER_NERD, 9
- object SPRITE_BLACK_HAIR_BOY_2, 17, 8, STAY, DOWN, 3, OPP_BURGLAR, 4
- object SPRITE_BLACK_HAIR_BOY_2, 11, 4, STAY, DOWN, 4, OPP_SUPER_NERD, 10
- object SPRITE_BLACK_HAIR_BOY_2, 11, 8, STAY, DOWN, 5, OPP_BURGLAR, 5
- object SPRITE_BLACK_HAIR_BOY_2, 11, 14, STAY, DOWN, 6, OPP_SUPER_NERD, 11
- object SPRITE_BLACK_HAIR_BOY_2, 3, 14, STAY, DOWN, 7, OPP_BURGLAR, 6
- object SPRITE_BLACK_HAIR_BOY_2, 3, 8, STAY, DOWN, 8, OPP_SUPER_NERD, 12
- object SPRITE_GYM_HELPER, 16, 13, STAY, DOWN, 9 ; person
-
- ; warp-to
- warp_to 16, 17, CINNABAR_GYM_WIDTH
- warp_to 17, 17, CINNABAR_GYM_WIDTH
diff --git a/data/mapObjects/CinnabarIsland.asm b/data/mapObjects/CinnabarIsland.asm
deleted file mode 100755
index 1932e134..00000000
--- a/data/mapObjects/CinnabarIsland.asm
+++ /dev/null
@@ -1,27 +0,0 @@
-CinnabarIsland_Object:
- db $43 ; border block
-
- db 5 ; warps
- warp 6, 3, 1, POKEMON_MANSION_1F
- warp 18, 3, 0, CINNABAR_GYM
- warp 6, 9, 0, CINNABAR_LAB
- warp 11, 11, 0, CINNABAR_POKECENTER
- warp 15, 11, 0, CINNABAR_MART
-
- db 5 ; signs
- sign 9, 5, 3 ; CinnabarIslandText3
- sign 16, 11, 4 ; MartSignText
- sign 12, 11, 5 ; PokeCenterSignText
- sign 9, 11, 6 ; CinnabarIslandText6
- sign 13, 3, 7 ; CinnabarIslandText7
-
- db 2 ; objects
- object SPRITE_GIRL, 12, 5, WALK, 2, 1 ; person
- object SPRITE_GAMBLER, 14, 6, STAY, NONE, 2 ; person
-
- ; warp-to
- warp_to 6, 3, CINNABAR_ISLAND_WIDTH ; POKEMON_MANSION_1F
- warp_to 18, 3, CINNABAR_ISLAND_WIDTH ; CINNABAR_GYM
- warp_to 6, 9, CINNABAR_ISLAND_WIDTH ; CINNABAR_LAB
- warp_to 11, 11, CINNABAR_ISLAND_WIDTH ; CINNABAR_POKECENTER
- warp_to 15, 11, CINNABAR_ISLAND_WIDTH ; CINNABAR_MART
diff --git a/data/mapObjects/CinnabarLab.asm b/data/mapObjects/CinnabarLab.asm
deleted file mode 100755
index deb5d8ed..00000000
--- a/data/mapObjects/CinnabarLab.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-CinnabarLab_Object:
- db $17 ; border block
-
- db 5 ; warps
- warp 2, 7, 2, -1
- warp 3, 7, 2, -1
- warp 8, 4, 0, CINNABAR_LAB_TRADE_ROOM
- warp 12, 4, 0, CINNABAR_LAB_METRONOME_ROOM
- warp 16, 4, 0, CINNABAR_LAB_FOSSIL_ROOM
-
- db 4 ; signs
- sign 3, 2, 2 ; Lab1Text2
- sign 9, 4, 3 ; Lab1Text3
- sign 13, 4, 4 ; Lab1Text4
- sign 17, 4, 5 ; Lab1Text5
-
- db 1 ; objects
- object SPRITE_FISHER, 1, 3, STAY, NONE, 1 ; person
-
- ; warp-to
- warp_to 2, 7, CINNABAR_LAB_WIDTH
- warp_to 3, 7, CINNABAR_LAB_WIDTH
- warp_to 8, 4, CINNABAR_LAB_WIDTH ; CINNABAR_LAB_TRADE_ROOM
- warp_to 12, 4, CINNABAR_LAB_WIDTH ; CINNABAR_LAB_METRONOME_ROOM
- warp_to 16, 4, CINNABAR_LAB_WIDTH ; CINNABAR_LAB_FOSSIL_ROOM
diff --git a/data/mapObjects/CinnabarLabFossilRoom.asm b/data/mapObjects/CinnabarLabFossilRoom.asm
deleted file mode 100755
index d31502e6..00000000
--- a/data/mapObjects/CinnabarLabFossilRoom.asm
+++ /dev/null
@@ -1,16 +0,0 @@
-CinnabarLabFossilRoom_Object:
- db $17 ; border block
-
- db 2 ; warps
- warp 2, 7, 4, CINNABAR_LAB
- warp 3, 7, 4, CINNABAR_LAB
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_OAK_AIDE, 5, 2, WALK, 2, 1 ; person
- object SPRITE_OAK_AIDE, 7, 6, STAY, UP, 2 ; person
-
- ; warp-to
- warp_to 2, 7, CINNABAR_LAB_FOSSIL_ROOM_WIDTH ; CINNABAR_LAB
- warp_to 3, 7, CINNABAR_LAB_FOSSIL_ROOM_WIDTH ; CINNABAR_LAB
diff --git a/data/mapObjects/CinnabarLabMetronomeRoom.asm b/data/mapObjects/CinnabarLabMetronomeRoom.asm
deleted file mode 100755
index 37f93d43..00000000
--- a/data/mapObjects/CinnabarLabMetronomeRoom.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-CinnabarLabMetronomeRoom_Object:
- db $17 ; border block
-
- db 2 ; warps
- warp 2, 7, 3, CINNABAR_LAB
- warp 3, 7, 3, CINNABAR_LAB
-
- db 3 ; signs
- sign 0, 4, 3 ; Lab3Text3
- sign 1, 4, 4 ; Lab3Text4
- sign 2, 1, 5 ; Lab3Text5
-
- db 2 ; objects
- object SPRITE_OAK_AIDE, 7, 2, STAY, DOWN, 1 ; person
- object SPRITE_OAK_AIDE, 2, 3, WALK, 2, 2 ; person
-
- ; warp-to
- warp_to 2, 7, CINNABAR_LAB_METRONOME_ROOM_WIDTH ; CINNABAR_LAB
- warp_to 3, 7, CINNABAR_LAB_METRONOME_ROOM_WIDTH ; CINNABAR_LAB
diff --git a/data/mapObjects/CinnabarLabTradeRoom.asm b/data/mapObjects/CinnabarLabTradeRoom.asm
deleted file mode 100755
index 449cc914..00000000
--- a/data/mapObjects/CinnabarLabTradeRoom.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-CinnabarLabTradeRoom_Object:
- db $17 ; border block
-
- db 2 ; warps
- warp 2, 7, 2, CINNABAR_LAB
- warp 3, 7, 2, CINNABAR_LAB
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, 3, 2, STAY, DOWN, 1 ; person
- object SPRITE_OLD_PERSON, 1, 4, STAY, NONE, 2 ; person
- object SPRITE_FOULARD_WOMAN, 5, 5, STAY, UP, 3 ; person
-
- ; warp-to
- warp_to 2, 7, CINNABAR_LAB_TRADE_ROOM_WIDTH ; CINNABAR_LAB
- warp_to 3, 7, CINNABAR_LAB_TRADE_ROOM_WIDTH ; CINNABAR_LAB
diff --git a/data/mapObjects/CinnabarMart.asm b/data/mapObjects/CinnabarMart.asm
deleted file mode 100755
index af88ddf0..00000000
--- a/data/mapObjects/CinnabarMart.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-CinnabarMart_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 4, -1
- warp 4, 7, 4, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person
- object SPRITE_ERIKA, 6, 2, STAY, NONE, 2 ; person
- object SPRITE_OAK_AIDE, 3, 4, STAY, NONE, 3 ; person
-
- ; warp-to
- warp_to 3, 7, CINNABAR_MART_WIDTH
- warp_to 4, 7, CINNABAR_MART_WIDTH
diff --git a/data/mapObjects/CinnabarPokecenter.asm b/data/mapObjects/CinnabarPokecenter.asm
deleted file mode 100755
index 3c9efb34..00000000
--- a/data/mapObjects/CinnabarPokecenter.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-CinnabarPokecenter_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 3, -1
- warp 4, 7, 3, -1
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
- object SPRITE_LASS, 9, 4, WALK, 0, 2 ; person
- object SPRITE_GENTLEMAN, 2, 6, STAY, NONE, 3 ; person
- object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person
- object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
-
- ; warp-to
- warp_to 3, 7, CINNABAR_POKECENTER_WIDTH
- warp_to 4, 7, CINNABAR_POKECENTER_WIDTH
diff --git a/data/mapObjects/Colosseum.asm b/data/mapObjects/Colosseum.asm
deleted file mode 100644
index 18762584..00000000
--- a/data/mapObjects/Colosseum.asm
+++ /dev/null
@@ -1,9 +0,0 @@
-Colosseum_Object:
- db $e ; border block
-
- db 0 ; warps
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_RED, 2, 2, STAY, 0, 1 ; person
diff --git a/data/mapObjects/CopycatsHouse1F.asm b/data/mapObjects/CopycatsHouse1F.asm
deleted file mode 100755
index 8bde12fe..00000000
--- a/data/mapObjects/CopycatsHouse1F.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-CopycatsHouse1F_Object:
- db $a ; border block
-
- db 3 ; warps
- warp 2, 7, 0, -1
- warp 3, 7, 0, -1
- warp 7, 1, 0, COPYCATS_HOUSE_2F
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_MOM_GEISHA, 2, 2, STAY, DOWN, 1 ; person
- object SPRITE_FAT_BALD_GUY, 5, 4, STAY, LEFT, 2 ; person
- object SPRITE_CHANSEY, 1, 4, STAY, NONE, 3 ; person
-
- ; warp-to
- warp_to 2, 7, COPYCATS_HOUSE_1F_WIDTH
- warp_to 3, 7, COPYCATS_HOUSE_1F_WIDTH
- warp_to 7, 1, COPYCATS_HOUSE_1F_WIDTH ; COPYCATS_HOUSE_2F
diff --git a/data/mapObjects/CopycatsHouse2F.asm b/data/mapObjects/CopycatsHouse2F.asm
deleted file mode 100755
index 18b56419..00000000
--- a/data/mapObjects/CopycatsHouse2F.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-CopycatsHouse2F_Object:
- db $a ; border block
-
- db 1 ; warps
- warp 7, 1, 2, COPYCATS_HOUSE_1F
-
- db 2 ; signs
- sign 3, 5, 6 ; CopycatsHouse2FText6
- sign 0, 1, 7 ; CopycatsHouse2FText7
-
- db 5 ; objects
- object SPRITE_BRUNETTE_GIRL, 4, 3, WALK, 0, 1 ; person
- object SPRITE_BIRD, 4, 6, WALK, 2, 2 ; person
- object SPRITE_SLOWBRO, 5, 1, STAY, DOWN, 3 ; person
- object SPRITE_BIRD, 2, 0, STAY, DOWN, 4 ; person
- object SPRITE_CLEFAIRY, 1, 6, STAY, RIGHT, 5 ; person
-
- ; warp-to
- warp_to 7, 1, COPYCATS_HOUSE_2F_WIDTH ; COPYCATS_HOUSE_1F
diff --git a/data/mapObjects/Daycare.asm b/data/mapObjects/Daycare.asm
deleted file mode 100755
index c58c83e4..00000000
--- a/data/mapObjects/Daycare.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-Daycare_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 4, -1
- warp 3, 7, 4, -1
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GENTLEMAN, 2, 3, STAY, RIGHT, 1 ; person
-
- ; warp-to
- warp_to 2, 7, DAYCARE_WIDTH
- warp_to 3, 7, DAYCARE_WIDTH
diff --git a/data/mapObjects/DiglettsCave.asm b/data/mapObjects/DiglettsCave.asm
deleted file mode 100755
index b4fd0af8..00000000
--- a/data/mapObjects/DiglettsCave.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-DiglettsCave_Object:
- db $19 ; border block
-
- db 2 ; warps
- warp 5, 5, 2, DIGLETTS_CAVE_ROUTE_2
- warp 37, 31, 2, DIGLETTS_CAVE_ROUTE_11
-
- db 0 ; signs
-
- db 0 ; objects
-
- ; warp-to
- warp_to 5, 5, DIGLETTS_CAVE_WIDTH ; DIGLETTS_CAVE_ROUTE_2
- warp_to 37, 31, DIGLETTS_CAVE_WIDTH ; DIGLETTS_CAVE_ROUTE_11
diff --git a/data/mapObjects/DiglettsCaveRoute11.asm b/data/mapObjects/DiglettsCaveRoute11.asm
deleted file mode 100755
index a4c70f06..00000000
--- a/data/mapObjects/DiglettsCaveRoute11.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-DiglettsCaveRoute11_Object:
- db $7d ; border block
-
- db 3 ; warps
- warp 2, 7, 4, -1
- warp 3, 7, 4, -1
- warp 4, 4, 1, DIGLETTS_CAVE
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GAMBLER, 2, 3, STAY, NONE, 1 ; person
-
- ; warp-to
- warp_to 2, 7, DIGLETTS_CAVE_ROUTE_11_WIDTH
- warp_to 3, 7, DIGLETTS_CAVE_ROUTE_11_WIDTH
- warp_to 4, 4, DIGLETTS_CAVE_ROUTE_11_WIDTH ; DIGLETTS_CAVE
diff --git a/data/mapObjects/DiglettsCaveRoute2.asm b/data/mapObjects/DiglettsCaveRoute2.asm
deleted file mode 100755
index 0567fee6..00000000
--- a/data/mapObjects/DiglettsCaveRoute2.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-DiglettsCaveRoute2_Object:
- db $7d ; border block
-
- db 3 ; warps
- warp 2, 7, 0, -1
- warp 3, 7, 0, -1
- warp 4, 4, 0, DIGLETTS_CAVE
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_FISHER, 3, 3, STAY, NONE, 1 ; person
-
- ; warp-to
- warp_to 2, 7, DIGLETTS_CAVE_ROUTE_2_WIDTH
- warp_to 3, 7, DIGLETTS_CAVE_ROUTE_2_WIDTH
- warp_to 4, 4, DIGLETTS_CAVE_ROUTE_2_WIDTH ; DIGLETTS_CAVE
diff --git a/data/mapObjects/FightingDojo.asm b/data/mapObjects/FightingDojo.asm
deleted file mode 100755
index fdc7b838..00000000
--- a/data/mapObjects/FightingDojo.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-FightingDojo_Object:
- db $3 ; border block
-
- db 2 ; warps
- warp 4, 11, 1, -1
- warp 5, 11, 1, -1
-
- db 0 ; signs
-
- db 7 ; objects
- 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
-
- ; warp-to
- warp_to 4, 11, FIGHTING_DOJO_WIDTH
- warp_to 5, 11, FIGHTING_DOJO_WIDTH
diff --git a/data/mapObjects/FuchsiaBillsGrandpasHouse.asm b/data/mapObjects/FuchsiaBillsGrandpasHouse.asm
deleted file mode 100755
index 363b56f9..00000000
--- a/data/mapObjects/FuchsiaBillsGrandpasHouse.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-FuchsiaBillsGrandpasHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 1, -1
- warp 3, 7, 1, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_MOM_GEISHA, 2, 3, STAY, RIGHT, 1 ; person
- object SPRITE_GAMBLER, 7, 2, STAY, UP, 2 ; person
- object SPRITE_BUG_CATCHER, 5, 5, STAY, NONE, 3 ; person
-
- ; warp-to
- warp_to 2, 7, FUCHSIA_BILLS_GRANDPAS_HOUSE_WIDTH
- warp_to 3, 7, FUCHSIA_BILLS_GRANDPAS_HOUSE_WIDTH
diff --git a/data/mapObjects/FuchsiaCity.asm b/data/mapObjects/FuchsiaCity.asm
deleted file mode 100755
index 0368905c..00000000
--- a/data/mapObjects/FuchsiaCity.asm
+++ /dev/null
@@ -1,52 +0,0 @@
-FuchsiaCity_Object:
- db $f ; border block
-
- db 9 ; warps
- warp 5, 13, 0, FUCHSIA_MART
- warp 11, 27, 0, FUCHSIA_BILLS_GRANDPAS_HOUSE
- warp 19, 27, 0, FUCHSIA_POKECENTER
- warp 27, 27, 0, WARDENS_HOUSE
- warp 18, 3, 0, SAFARI_ZONE_GATE
- warp 5, 27, 0, FUCHSIA_GYM
- warp 22, 13, 0, FUCHSIA_MEETING_ROOM
- warp 31, 27, 1, FUCHSIA_GOOD_ROD_HOUSE
- warp 31, 24, 0, FUCHSIA_GOOD_ROD_HOUSE
-
- db 14 ; signs
- sign 15, 23, 11 ; FuchsiaCityText11
- sign 25, 15, 12 ; FuchsiaCityText12
- sign 17, 5, 13 ; FuchsiaCityText13
- sign 6, 13, 14 ; MartSignText
- sign 20, 27, 15 ; PokeCenterSignText
- sign 27, 29, 16 ; FuchsiaCityText16
- sign 21, 15, 17 ; FuchsiaCityText17
- sign 5, 29, 18 ; FuchsiaCityText18
- sign 33, 7, 19 ; FuchsiaCityText19
- sign 27, 7, 20 ; FuchsiaCityText20
- sign 13, 7, 21 ; FuchsiaCityText21
- sign 31, 13, 22 ; FuchsiaCityText22
- sign 13, 15, 23 ; FuchsiaCityText23
- sign 7, 7, 24 ; FuchsiaCityText24
-
- db 10 ; objects
- object SPRITE_BUG_CATCHER, 10, 12, WALK, 2, 1 ; person
- object SPRITE_GAMBLER, 28, 17, WALK, 2, 2 ; person
- object SPRITE_FISHER2, 30, 14, STAY, DOWN, 3 ; person
- object SPRITE_BUG_CATCHER, 24, 8, STAY, UP, 4 ; person
- object SPRITE_CHANSEY, 31, 5, STAY, DOWN, 5 ; person
- object SPRITE_BALL, 25, 6, STAY, NONE, 6 ; person
- object SPRITE_SLOWBRO, 12, 6, WALK, 2, 7 ; person
- object SPRITE_SLOWBRO, 30, 12, WALK, 2, 8 ; person
- object SPRITE_SEEL, 8, 17, WALK, 0, 9 ; person
- object SPRITE_OMANYTE, 6, 5, STAY, NONE, 10 ; person
-
- ; warp-to
- warp_to 5, 13, FUCHSIA_CITY_WIDTH ; FUCHSIA_MART
- warp_to 11, 27, FUCHSIA_CITY_WIDTH ; FUCHSIA_BILLS_GRANDPAS_HOUSE
- warp_to 19, 27, FUCHSIA_CITY_WIDTH ; FUCHSIA_POKECENTER
- warp_to 27, 27, FUCHSIA_CITY_WIDTH ; WARDENS_HOUSE
- warp_to 18, 3, FUCHSIA_CITY_WIDTH ; SAFARI_ZONE_GATE
- warp_to 5, 27, FUCHSIA_CITY_WIDTH ; FUCHSIA_GYM
- warp_to 22, 13, FUCHSIA_CITY_WIDTH ; FUCHSIA_MEETING_ROOM
- warp_to 31, 27, FUCHSIA_CITY_WIDTH ; FUCHSIA_GOOD_ROD_HOUSE
- warp_to 31, 24, FUCHSIA_CITY_WIDTH ; FUCHSIA_GOOD_ROD_HOUSE
diff --git a/data/mapObjects/FuchsiaGoodRodHouse.asm b/data/mapObjects/FuchsiaGoodRodHouse.asm
deleted file mode 100755
index 390447c8..00000000
--- a/data/mapObjects/FuchsiaGoodRodHouse.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-FuchsiaGoodRodHouse_Object:
- db $c ; border block
-
- db 3 ; warps
- warp 2, 0, 8, -1
- warp 2, 7, 7, -1
- warp 3, 7, 7, -1
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_FISHER, 5, 3, STAY, RIGHT, 1 ; person
-
- ; warp-to
- warp_to 2, 0, FUCHSIA_GOOD_ROD_HOUSE_WIDTH
- warp_to 2, 7, FUCHSIA_GOOD_ROD_HOUSE_WIDTH
- warp_to 3, 7, FUCHSIA_GOOD_ROD_HOUSE_WIDTH
diff --git a/data/mapObjects/FuchsiaGym.asm b/data/mapObjects/FuchsiaGym.asm
deleted file mode 100755
index 4e717086..00000000
--- a/data/mapObjects/FuchsiaGym.asm
+++ /dev/null
@@ -1,22 +0,0 @@
-FuchsiaGym_Object:
- db $3 ; border block
-
- db 2 ; warps
- warp 4, 17, 5, -1
- warp 5, 17, 5, -1
-
- db 0 ; signs
-
- db 8 ; objects
- object SPRITE_LAPRAS_GIVER, 4, 10, STAY, DOWN, 1, OPP_KOGA, 1
- object SPRITE_ROCKER, 8, 13, STAY, DOWN, 2, OPP_JUGGLER, 7
- object SPRITE_ROCKER, 7, 8, STAY, RIGHT, 3, OPP_JUGGLER, 3
- object SPRITE_ROCKER, 1, 12, 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, 15, STAY, DOWN, 8 ; person
-
- ; warp-to
- warp_to 4, 17, FUCHSIA_GYM_WIDTH
- warp_to 5, 17, FUCHSIA_GYM_WIDTH
diff --git a/data/mapObjects/FuchsiaMart.asm b/data/mapObjects/FuchsiaMart.asm
deleted file mode 100755
index cfa71d8d..00000000
--- a/data/mapObjects/FuchsiaMart.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-FuchsiaMart_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 0, -1
- warp 4, 7, 0, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person
- object SPRITE_FAT_BALD_GUY, 4, 2, STAY, NONE, 2 ; person
- object SPRITE_LASS, 6, 5, WALK, 1, 3 ; person
-
- ; warp-to
- warp_to 3, 7, FUCHSIA_MART_WIDTH
- warp_to 4, 7, FUCHSIA_MART_WIDTH
diff --git a/data/mapObjects/FuchsiaMeetingRoom.asm b/data/mapObjects/FuchsiaMeetingRoom.asm
deleted file mode 100755
index 9130d920..00000000
--- a/data/mapObjects/FuchsiaMeetingRoom.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-FuchsiaMeetingRoom_Object:
- db $17 ; border block
-
- db 2 ; warps
- warp 4, 7, 6, -1
- warp 5, 7, 6, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_WHITE_PLAYER, 4, 1, STAY, DOWN, 1 ; person
- object SPRITE_WHITE_PLAYER, 0, 2, STAY, UP, 2 ; person
- object SPRITE_WHITE_PLAYER, 10, 1, STAY, DOWN, 3 ; person
-
- ; warp-to
- warp_to 4, 7, FUCHSIA_MEETING_ROOM_WIDTH
- warp_to 5, 7, FUCHSIA_MEETING_ROOM_WIDTH
diff --git a/data/mapObjects/FuchsiaPokecenter.asm b/data/mapObjects/FuchsiaPokecenter.asm
deleted file mode 100755
index b0056acd..00000000
--- a/data/mapObjects/FuchsiaPokecenter.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-FuchsiaPokecenter_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 2, -1
- warp 4, 7, 2, -1
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
- object SPRITE_ROCKER, 4, 3, STAY, UP, 2 ; person
- object SPRITE_LASS, 6, 5, WALK, 2, 3 ; person
- object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person
- object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
-
- ; warp-to
- warp_to 3, 7, FUCHSIA_POKECENTER_WIDTH
- warp_to 4, 7, FUCHSIA_POKECENTER_WIDTH
diff --git a/data/mapObjects/GameCorner.asm b/data/mapObjects/GameCorner.asm
deleted file mode 100755
index afac025e..00000000
--- a/data/mapObjects/GameCorner.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-GameCorner_Object:
- db $f ; border block
-
- db 3 ; warps
- warp 15, 17, 7, -1
- warp 16, 17, 7, -1
- warp 17, 4, 1, ROCKET_HIDEOUT_B1F
-
- db 1 ; signs
- sign 9, 4, 12 ; CeladonGameCornerText12
-
- db 11 ; objects
- object SPRITE_FOULARD_WOMAN, 2, 6, STAY, DOWN, 1 ; person
- object SPRITE_MART_GUY, 5, 6, STAY, DOWN, 2 ; person
- object SPRITE_FAT_BALD_GUY, 2, 10, STAY, LEFT, 3 ; person
- object SPRITE_FOULARD_WOMAN, 2, 13, STAY, LEFT, 4 ; person
- object SPRITE_FISHER, 5, 11, STAY, RIGHT, 5 ; person
- object SPRITE_MOM_GEISHA, 8, 11, STAY, LEFT, 6 ; person
- object SPRITE_GYM_HELPER, 8, 14, STAY, LEFT, 7 ; person
- object SPRITE_GAMBLER, 11, 15, STAY, RIGHT, 8 ; person
- object SPRITE_FAT_BALD_GUY, 14, 11, STAY, LEFT, 9 ; person
- object SPRITE_FISHER, 17, 13, STAY, RIGHT, 10 ; person
- object SPRITE_ROCKET, 9, 5, STAY, UP, 11, OPP_ROCKET, 7
-
- ; warp-to
- warp_to 15, 17, GAME_CORNER_WIDTH
- warp_to 16, 17, GAME_CORNER_WIDTH
- warp_to 17, 4, GAME_CORNER_WIDTH ; ROCKET_HIDEOUT_B1F
diff --git a/data/mapObjects/GameCornerPrizeRoom.asm b/data/mapObjects/GameCornerPrizeRoom.asm
deleted file mode 100755
index 35cd3ac8..00000000
--- a/data/mapObjects/GameCornerPrizeRoom.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-GameCornerPrizeRoom_Object:
- db $f ; border block
-
- db 2 ; warps
- warp 4, 7, 9, -1
- warp 5, 7, 9, -1
-
- db 3 ; signs
- sign 2, 2, 3 ; CeladonPrizeRoomText3
- sign 4, 2, 4 ; CeladonPrizeRoomText4
- sign 6, 2, 5 ; CeladonPrizeRoomText5
-
- db 2 ; objects
- object SPRITE_BALDING_GUY, 1, 4, STAY, NONE, 1 ; person
- object SPRITE_GAMBLER, 7, 3, WALK, 2, 2 ; person
-
- ; warp-to
- warp_to 4, 7, GAME_CORNER_PRIZE_ROOM_WIDTH
- warp_to 5, 7, GAME_CORNER_PRIZE_ROOM_WIDTH
diff --git a/data/mapObjects/HallOfFame.asm b/data/mapObjects/HallOfFame.asm
deleted file mode 100755
index 3762d871..00000000
--- a/data/mapObjects/HallOfFame.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-HallOfFame_Object:
- db $3 ; border block
-
- db 2 ; warps
- warp 4, 7, 2, CHAMPIONS_ROOM
- warp 5, 7, 3, CHAMPIONS_ROOM
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_OAK, 5, 2, STAY, DOWN, 1 ; person
-
- ; warp-to
- warp_to 4, 7, HALL_OF_FAME_WIDTH ; CHAMPIONS_ROOM
- warp_to 5, 7, HALL_OF_FAME_WIDTH ; CHAMPIONS_ROOM
diff --git a/data/mapObjects/IndigoPlateau.asm b/data/mapObjects/IndigoPlateau.asm
deleted file mode 100755
index 1447be11..00000000
--- a/data/mapObjects/IndigoPlateau.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-IndigoPlateau_Object:
- db $e ; border block
-
- db 2 ; warps
- warp 9, 5, 0, INDIGO_PLATEAU_LOBBY
- warp 10, 5, 0, INDIGO_PLATEAU_LOBBY
-
- db 0 ; signs
-
- db 0 ; objects
-
- ; warp-to
- warp_to 9, 5, INDIGO_PLATEAU_WIDTH ; INDIGO_PLATEAU_LOBBY
- warp_to 10, 5, INDIGO_PLATEAU_WIDTH ; INDIGO_PLATEAU_LOBBY
diff --git a/data/mapObjects/IndigoPlateauLobby.asm b/data/mapObjects/IndigoPlateauLobby.asm
deleted file mode 100755
index d7de23a7..00000000
--- a/data/mapObjects/IndigoPlateauLobby.asm
+++ /dev/null
@@ -1,22 +0,0 @@
-IndigoPlateauLobby_Object:
- db $0 ; border block
-
- db 3 ; warps
- warp 7, 11, 0, -1
- warp 8, 11, 1, -1
- warp 8, 0, 0, LORELEIS_ROOM
-
- db 0 ; signs
-
- db 6 ; objects
- object SPRITE_NURSE, 7, 5, STAY, DOWN, 1 ; person
- object SPRITE_GYM_HELPER, 4, 9, STAY, RIGHT, 2 ; person
- object SPRITE_LASS, 5, 1, STAY, DOWN, 3 ; person
- object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 4 ; person
- object SPRITE_CABLE_CLUB_WOMAN, 13, 6, STAY, DOWN, 5 ; person
- object SPRITE_CHANSEY, 8, 5, STAY, DOWN, 6 ; person
-
- ; warp-to
- warp_to 7, 11, INDIGO_PLATEAU_LOBBY_WIDTH
- warp_to 8, 11, INDIGO_PLATEAU_LOBBY_WIDTH
- warp_to 8, 0, INDIGO_PLATEAU_LOBBY_WIDTH ; LORELEIS_ROOM
diff --git a/data/mapObjects/LancesRoom.asm b/data/mapObjects/LancesRoom.asm
deleted file mode 100755
index 6f22631a..00000000
--- a/data/mapObjects/LancesRoom.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-LancesRoom_Object:
- db $3 ; border block
-
- db 3 ; warps
- warp 24, 16, 2, AGATHAS_ROOM
- warp 5, 0, 0, CHAMPIONS_ROOM
- warp 6, 0, 0, CHAMPIONS_ROOM
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_LANCE, 6, 1, STAY, DOWN, 1, OPP_LANCE, 1
-
- ; warp-to
- warp_to 24, 16, LANCES_ROOM_WIDTH ; AGATHAS_ROOM
- warp_to 5, 0, LANCES_ROOM_WIDTH ; CHAMPIONS_ROOM
- warp_to 6, 0, LANCES_ROOM_WIDTH ; CHAMPIONS_ROOM
diff --git a/data/mapObjects/LavenderCuboneHouse.asm b/data/mapObjects/LavenderCuboneHouse.asm
deleted file mode 100755
index 96f1b3ba..00000000
--- a/data/mapObjects/LavenderCuboneHouse.asm
+++ /dev/null
@@ -1,16 +0,0 @@
-LavenderCuboneHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 4, -1
- warp 3, 7, 4, -1
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_SLOWBRO, 3, 5, STAY, UP, 1 ; person
- object SPRITE_BRUNETTE_GIRL, 2, 4, STAY, RIGHT, 2 ; person
-
- ; warp-to
- warp_to 2, 7, LAVENDER_CUBONE_HOUSE_WIDTH
- warp_to 3, 7, LAVENDER_CUBONE_HOUSE_WIDTH
diff --git a/data/mapObjects/LavenderMart.asm b/data/mapObjects/LavenderMart.asm
deleted file mode 100755
index df14ad39..00000000
--- a/data/mapObjects/LavenderMart.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-LavenderMart_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 3, -1
- warp 4, 7, 3, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person
- object SPRITE_BALDING_GUY, 3, 4, STAY, NONE, 2 ; person
- object SPRITE_BLACK_HAIR_BOY_1, 7, 2, STAY, NONE, 3 ; person
-
- ; warp-to
- warp_to 3, 7, LAVENDER_MART_WIDTH
- warp_to 4, 7, LAVENDER_MART_WIDTH
diff --git a/data/mapObjects/LavenderPokecenter.asm b/data/mapObjects/LavenderPokecenter.asm
deleted file mode 100755
index 6e38a8e9..00000000
--- a/data/mapObjects/LavenderPokecenter.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-LavenderPokecenter_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 0, -1
- warp 4, 7, 0, -1
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
- object SPRITE_GENTLEMAN, 5, 3, STAY, NONE, 2 ; person
- object SPRITE_LITTLE_GIRL, 10, 5, WALK, 2, 3 ; person
- object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person
- object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
-
- ; warp-to
- warp_to 3, 7, LAVENDER_POKECENTER_WIDTH
- warp_to 4, 7, LAVENDER_POKECENTER_WIDTH
diff --git a/data/mapObjects/LavenderTown.asm b/data/mapObjects/LavenderTown.asm
deleted file mode 100755
index 4aead666..00000000
--- a/data/mapObjects/LavenderTown.asm
+++ /dev/null
@@ -1,31 +0,0 @@
-LavenderTown_Object:
- db $2c ; border block
-
- db 6 ; warps
- warp 3, 5, 0, LAVENDER_POKECENTER
- warp 14, 5, 0, POKEMON_TOWER_1F
- warp 7, 9, 0, MR_FUJIS_HOUSE
- warp 15, 13, 0, LAVENDER_MART
- warp 3, 13, 0, LAVENDER_CUBONE_HOUSE
- warp 7, 13, 0, NAME_RATERS_HOUSE
-
- db 6 ; signs
- sign 11, 9, 4 ; LavenderTownText4
- sign 9, 3, 5 ; LavenderTownText5
- sign 16, 13, 6 ; MartSignText
- sign 4, 5, 7 ; PokeCenterSignText
- sign 5, 9, 8 ; LavenderTownText8
- sign 17, 7, 9 ; LavenderTownText9
-
- db 3 ; objects
- object SPRITE_LITTLE_GIRL, 15, 9, WALK, 0, 1 ; person
- object SPRITE_BLACK_HAIR_BOY_1, 9, 10, STAY, NONE, 2 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 8, 7, WALK, 2, 3 ; person
-
- ; warp-to
- warp_to 3, 5, LAVENDER_TOWN_WIDTH ; LAVENDER_POKECENTER
- warp_to 14, 5, LAVENDER_TOWN_WIDTH ; POKEMON_TOWER_1F
- warp_to 7, 9, LAVENDER_TOWN_WIDTH ; MR_FUJIS_HOUSE
- warp_to 15, 13, LAVENDER_TOWN_WIDTH ; LAVENDER_MART
- warp_to 3, 13, LAVENDER_TOWN_WIDTH ; LAVENDER_CUBONE_HOUSE
- warp_to 7, 13, LAVENDER_TOWN_WIDTH ; NAME_RATERS_HOUSE
diff --git a/data/mapObjects/LoreleisRoom.asm b/data/mapObjects/LoreleisRoom.asm
deleted file mode 100755
index 06450bb4..00000000
--- a/data/mapObjects/LoreleisRoom.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-LoreleisRoom_Object:
- db $3 ; border block
-
- db 4 ; warps
- warp 4, 11, 2, INDIGO_PLATEAU_LOBBY
- warp 5, 11, 2, INDIGO_PLATEAU_LOBBY
- warp 4, 0, 0, BRUNOS_ROOM
- warp 5, 0, 1, BRUNOS_ROOM
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_LORELEI, 5, 2, STAY, DOWN, 1, OPP_LORELEI, 1
-
- ; warp-to
- warp_to 4, 11, LORELEIS_ROOM_WIDTH ; INDIGO_PLATEAU_LOBBY
- warp_to 5, 11, LORELEIS_ROOM_WIDTH ; INDIGO_PLATEAU_LOBBY
- warp_to 4, 0, LORELEIS_ROOM_WIDTH ; BRUNOS_ROOM
- warp_to 5, 0, LORELEIS_ROOM_WIDTH ; BRUNOS_ROOM
diff --git a/data/mapObjects/MrFujisHouse.asm b/data/mapObjects/MrFujisHouse.asm
deleted file mode 100755
index 5b6ca2a6..00000000
--- a/data/mapObjects/MrFujisHouse.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-MrFujisHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 2, -1
- warp 3, 7, 2, -1
-
- db 0 ; signs
-
- db 6 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, 3, 5, STAY, NONE, 1 ; person
- object SPRITE_LITTLE_GIRL, 6, 3, STAY, DOWN, 2 ; person
- object SPRITE_SLOWBRO, 6, 4, STAY, UP, 3 ; person
- object SPRITE_SLOWBRO, 1, 3, STAY, NONE, 4 ; person
- object SPRITE_MR_FUJI, 3, 1, STAY, NONE, 5 ; person
- object SPRITE_BOOK_MAP_DEX, 3, 3, STAY, NONE, 6 ; person
-
- ; warp-to
- warp_to 2, 7, MR_FUJIS_HOUSE_WIDTH
- warp_to 3, 7, MR_FUJIS_HOUSE_WIDTH
diff --git a/data/mapObjects/MrPsychicsHouse.asm b/data/mapObjects/MrPsychicsHouse.asm
deleted file mode 100755
index 01f9e11c..00000000
--- a/data/mapObjects/MrPsychicsHouse.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-MrPsychicsHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 7, -1
- warp 3, 7, 7, -1
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_FISHER, 5, 3, STAY, LEFT, 1 ; person
-
- ; warp-to
- warp_to 2, 7, MR_PSYCHICS_HOUSE_WIDTH
- warp_to 3, 7, MR_PSYCHICS_HOUSE_WIDTH
diff --git a/data/mapObjects/MtMoon1F.asm b/data/mapObjects/MtMoon1F.asm
deleted file mode 100755
index 56820161..00000000
--- a/data/mapObjects/MtMoon1F.asm
+++ /dev/null
@@ -1,34 +0,0 @@
-MtMoon1F_Object:
- db $3 ; border block
-
- db 5 ; warps
- warp 14, 35, 1, -1
- warp 15, 35, 1, -1
- warp 5, 5, 0, MT_MOON_B1F
- warp 17, 11, 2, MT_MOON_B1F
- warp 25, 15, 3, MT_MOON_B1F
-
- db 1 ; signs
- sign 15, 23, 14 ; MtMoon1Text14
-
- db 13 ; objects
- object SPRITE_HIKER, 5, 6, STAY, DOWN, 1, OPP_HIKER, 1
- object SPRITE_BUG_CATCHER, 12, 16, STAY, RIGHT, 2, OPP_YOUNGSTER, 3
- object SPRITE_LASS, 30, 4, STAY, DOWN, 3, OPP_LASS, 5
- object SPRITE_BLACK_HAIR_BOY_2, 24, 31, STAY, UP, 4, OPP_SUPER_NERD, 1
- object SPRITE_LASS, 16, 23, STAY, DOWN, 5, OPP_LASS, 6
- object SPRITE_BUG_CATCHER, 7, 22, STAY, DOWN, 6, OPP_BUG_CATCHER, 7
- object SPRITE_BUG_CATCHER, 30, 27, STAY, RIGHT, 7, OPP_BUG_CATCHER, 8
- object SPRITE_BALL, 2, 20, STAY, NONE, 8, POTION
- object SPRITE_BALL, 2, 2, STAY, NONE, 9, MOON_STONE
- object SPRITE_BALL, 35, 31, STAY, NONE, 10, RARE_CANDY
- object SPRITE_BALL, 36, 23, STAY, NONE, 11, ESCAPE_ROPE
- object SPRITE_BALL, 20, 33, STAY, NONE, 12, POTION
- object SPRITE_BALL, 5, 32, STAY, NONE, 13, TM_12
-
- ; warp-to
- warp_to 14, 35, MT_MOON_1F_WIDTH
- warp_to 15, 35, MT_MOON_1F_WIDTH
- warp_to 5, 5, MT_MOON_1F_WIDTH ; MT_MOON_B1F
- warp_to 17, 11, MT_MOON_1F_WIDTH ; MT_MOON_B1F
- warp_to 25, 15, MT_MOON_1F_WIDTH ; MT_MOON_B1F
diff --git a/data/mapObjects/MtMoonB1F.asm b/data/mapObjects/MtMoonB1F.asm
deleted file mode 100755
index a8365ba7..00000000
--- a/data/mapObjects/MtMoonB1F.asm
+++ /dev/null
@@ -1,26 +0,0 @@
-MtMoonB1F_Object:
- db $3 ; border block
-
- db 8 ; warps
- warp 5, 5, 2, MT_MOON_1F
- warp 17, 11, 0, MT_MOON_B2F
- warp 25, 9, 3, MT_MOON_1F
- warp 25, 15, 4, MT_MOON_1F
- warp 21, 17, 1, MT_MOON_B2F
- warp 13, 27, 2, MT_MOON_B2F
- warp 23, 3, 3, MT_MOON_B2F
- warp 27, 3, 2, -1
-
- db 0 ; signs
-
- db 0 ; objects
-
- ; warp-to
- warp_to 5, 5, MT_MOON_B1F_WIDTH ; MT_MOON_1F
- warp_to 17, 11, MT_MOON_B1F_WIDTH ; MT_MOON_B2F
- warp_to 25, 9, MT_MOON_B1F_WIDTH ; MT_MOON_1F
- warp_to 25, 15, MT_MOON_B1F_WIDTH ; MT_MOON_1F
- warp_to 21, 17, MT_MOON_B1F_WIDTH ; MT_MOON_B2F
- warp_to 13, 27, MT_MOON_B1F_WIDTH ; MT_MOON_B2F
- warp_to 23, 3, MT_MOON_B1F_WIDTH ; MT_MOON_B2F
- warp_to 27, 3, MT_MOON_B1F_WIDTH
diff --git a/data/mapObjects/MtMoonB2F.asm b/data/mapObjects/MtMoonB2F.asm
deleted file mode 100755
index a4c9869a..00000000
--- a/data/mapObjects/MtMoonB2F.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-MtMoonB2F_Object:
- db $3 ; border block
-
- db 4 ; warps
- warp 25, 9, 1, MT_MOON_B1F
- warp 21, 17, 4, MT_MOON_B1F
- warp 15, 27, 5, MT_MOON_B1F
- warp 5, 7, 6, MT_MOON_B1F
-
- db 0 ; signs
-
- db 10 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, 12, 8, STAY, RIGHT, 1, OPP_SUPER_NERD, 2
- object SPRITE_JESSIE, 9, 3, STAY, LEFT, 2
- object SPRITE_ROCKET, 15, 22, STAY, DOWN, 3, OPP_ROCKET, 2
- object SPRITE_ROCKET, 29, 11, STAY, UP, 4, OPP_ROCKET, 3
- object SPRITE_ROCKET, 29, 17, STAY, LEFT, 5, OPP_ROCKET, 1
- object SPRITE_JAMES, 9, 4, STAY, LEFT, 6
- object SPRITE_OMANYTE, 12, 6, STAY, NONE, 7 ; person
- object SPRITE_OMANYTE, 13, 6, STAY, NONE, 8 ; person
- object SPRITE_BALL, 25, 21, STAY, NONE, 9, HP_UP
- object SPRITE_BALL, 29, 5, STAY, NONE, 10, TM_01
-
- ; warp-to
- warp_to 25, 9, MT_MOON_B2F_WIDTH ; MT_MOON_B1F
- warp_to 21, 17, MT_MOON_B2F_WIDTH ; MT_MOON_B1F
- warp_to 15, 27, MT_MOON_B2F_WIDTH ; MT_MOON_B1F
- warp_to 5, 7, MT_MOON_B2F_WIDTH ; MT_MOON_B1F
diff --git a/data/mapObjects/MtMoonPokecenter.asm b/data/mapObjects/MtMoonPokecenter.asm
deleted file mode 100755
index 1027f88a..00000000
--- a/data/mapObjects/MtMoonPokecenter.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-MtMoonPokecenter_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 0, -1
- warp 4, 7, 0, -1
-
- db 0 ; signs
-
- db 7 ; objects
- object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
- object SPRITE_BUG_CATCHER, 4, 3, STAY, UP, 2 ; person
- object SPRITE_GENTLEMAN, 7, 3, STAY, UP, 3 ; person
- object SPRITE_FAT_BALD_GUY, 10, 6, WALK, 2, 4 ; person
- object SPRITE_CLIPBOARD, 7, 2, STAY, NONE, 5 ; person
- object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 6 ; person
- object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 7 ; person
-
- ; warp-to
- warp_to 3, 7, MT_MOON_POKECENTER_WIDTH
- warp_to 4, 7, MT_MOON_POKECENTER_WIDTH
diff --git a/data/mapObjects/Museum1F.asm b/data/mapObjects/Museum1F.asm
deleted file mode 100755
index 1cfd2c68..00000000
--- a/data/mapObjects/Museum1F.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-Museum1F_Object:
- db $a ; border block
-
- db 5 ; warps
- warp 10, 7, 0, -1
- warp 11, 7, 0, -1
- warp 16, 7, 1, -1
- warp 17, 7, 1, -1
- warp 7, 7, 0, MUSEUM_2F
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_OAK_AIDE, 12, 4, STAY, LEFT, 1 ; person
- object SPRITE_GAMBLER, 1, 4, STAY, NONE, 2 ; person
- object SPRITE_OAK_AIDE, 15, 2, STAY, DOWN, 3 ; person
- object SPRITE_OAK_AIDE, 17, 4, STAY, NONE, 4 ; person
- object SPRITE_OLD_AMBER, 16, 2, STAY, NONE, 5 ; person
-
- ; warp-to
- warp_to 10, 7, MUSEUM_1F_WIDTH
- warp_to 11, 7, MUSEUM_1F_WIDTH
- warp_to 16, 7, MUSEUM_1F_WIDTH
- warp_to 17, 7, MUSEUM_1F_WIDTH
- warp_to 7, 7, MUSEUM_1F_WIDTH ; MUSEUM_2F
diff --git a/data/mapObjects/Museum2F.asm b/data/mapObjects/Museum2F.asm
deleted file mode 100755
index 80815820..00000000
--- a/data/mapObjects/Museum2F.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-Museum2F_Object:
- db $a ; border block
-
- db 1 ; warps
- warp 7, 7, 4, MUSEUM_1F
-
- db 2 ; signs
- sign 11, 2, 6 ; Museum2FText6
- sign 2, 5, 7 ; Museum2FText7
-
- db 5 ; objects
- object SPRITE_BUG_CATCHER, 1, 7, WALK, 2, 1 ; person
- object SPRITE_OLD_PERSON, 0, 5, STAY, DOWN, 2 ; person
- object SPRITE_OAK_AIDE, 7, 5, STAY, DOWN, 3 ; person
- object SPRITE_BRUNETTE_GIRL, 11, 5, STAY, NONE, 4 ; person
- object SPRITE_HIKER, 12, 5, STAY, DOWN, 5 ; person
-
- ; warp-to
- warp_to 7, 7, MUSEUM_2F_WIDTH ; MUSEUM_1F
diff --git a/data/mapObjects/NameRatersHouse.asm b/data/mapObjects/NameRatersHouse.asm
deleted file mode 100755
index da95bc43..00000000
--- a/data/mapObjects/NameRatersHouse.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-NameRatersHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 5, -1
- warp 3, 7, 5, -1
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_MR_MASTERBALL, 5, 3, STAY, LEFT, 1 ; person
-
- ; warp-to
- warp_to 2, 7, NAME_RATERS_HOUSE_WIDTH
- warp_to 3, 7, NAME_RATERS_HOUSE_WIDTH
diff --git a/data/mapObjects/OaksLab.asm b/data/mapObjects/OaksLab.asm
deleted file mode 100755
index cf48bec9..00000000
--- a/data/mapObjects/OaksLab.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-OaksLab_Object:
- db $3 ; border block
-
- db 2 ; warps
- warp 4, 11, 2, -1
- warp 5, 11, 2, -1
-
- db 0 ; signs
-
- db 9 ; objects
- object SPRITE_BLUE, 4, 3, STAY, NONE, 1, OPP_SONY1, 1
- object SPRITE_BALL, 7, 3, STAY, NONE, 2 ; person
- object SPRITE_OAK, 5, 2, STAY, DOWN, 3 ; person
- object SPRITE_BOOK_MAP_DEX, 2, 1, STAY, NONE, 4 ; person
- object SPRITE_BOOK_MAP_DEX, 3, 1, STAY, NONE, 5 ; person
- object SPRITE_OAK, 5, 10, STAY, UP, 6 ; person
- object SPRITE_GIRL, 1, 9, WALK, 1, 7 ; person
- object SPRITE_OAK_AIDE, 2, 10, STAY, NONE, 8 ; person
- object SPRITE_OAK_AIDE, 8, 10, STAY, NONE, 9 ; person
-
- ; warp-to
- warp_to 4, 11, OAKS_LAB_WIDTH
- warp_to 5, 11, OAKS_LAB_WIDTH
diff --git a/data/mapObjects/PalletTown.asm b/data/mapObjects/PalletTown.asm
deleted file mode 100755
index 93807688..00000000
--- a/data/mapObjects/PalletTown.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-PalletTown_Object:
- db $b ; border block
-
- db 3 ; warps
- warp 5, 5, 0, REDS_HOUSE_1F
- warp 13, 5, 0, BLUES_HOUSE
- warp 12, 11, 1, OAKS_LAB
-
- db 4 ; signs
- sign 13, 13, 4 ; PalletTownText4
- sign 7, 9, 5 ; PalletTownText5
- sign 3, 5, 6 ; PalletTownText6
- sign 11, 5, 7 ; PalletTownText7
-
- db 3 ; objects
- object SPRITE_OAK, 10, 4, STAY, NONE, 1 ; person
- object SPRITE_GIRL, 3, 8, WALK, 0, 2 ; person
- object SPRITE_FISHER2, 11, 14, WALK, 0, 3 ; person
-
- ; warp-to
- warp_to 5, 5, PALLET_TOWN_WIDTH ; REDS_HOUSE_1F
- warp_to 13, 5, PALLET_TOWN_WIDTH ; BLUES_HOUSE
- warp_to 12, 11, PALLET_TOWN_WIDTH ; OAKS_LAB
diff --git a/data/mapObjects/PewterCity.asm b/data/mapObjects/PewterCity.asm
deleted file mode 100755
index e1a3eecb..00000000
--- a/data/mapObjects/PewterCity.asm
+++ /dev/null
@@ -1,36 +0,0 @@
-PewterCity_Object:
- db $a ; border block
-
- db 7 ; warps
- warp 14, 7, 0, MUSEUM_1F
- warp 19, 5, 2, MUSEUM_1F
- warp 16, 17, 0, PEWTER_GYM
- warp 29, 13, 0, PEWTER_NIDORAN_HOUSE
- warp 23, 17, 0, PEWTER_MART
- warp 7, 29, 0, PEWTER_SPEECH_HOUSE
- warp 13, 25, 0, PEWTER_POKECENTER
-
- db 7 ; signs
- sign 19, 29, 6 ; PewterCityText6
- sign 33, 19, 7 ; PewterCityText7
- sign 24, 17, 8 ; MartSignText
- sign 14, 25, 9 ; PokeCenterSignText
- sign 15, 9, 10 ; PewterCityText10
- sign 11, 17, 11 ; PewterCityText11
- sign 25, 23, 12 ; PewterCityText12
-
- db 5 ; objects
- object SPRITE_LASS, 8, 15, STAY, NONE, 1 ; person
- object SPRITE_BLACK_HAIR_BOY_1, 17, 25, STAY, NONE, 2 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 27, 17, STAY, NONE, 3 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 26, 25, WALK, 2, 4 ; person
- object SPRITE_BUG_CATCHER, 35, 16, STAY, DOWN, 5 ; person
-
- ; warp-to
- warp_to 14, 7, PEWTER_CITY_WIDTH ; MUSEUM_1F
- warp_to 19, 5, PEWTER_CITY_WIDTH ; MUSEUM_1F
- warp_to 16, 17, PEWTER_CITY_WIDTH ; PEWTER_GYM
- warp_to 29, 13, PEWTER_CITY_WIDTH ; PEWTER_NIDORAN_HOUSE
- warp_to 23, 17, PEWTER_CITY_WIDTH ; PEWTER_MART
- warp_to 7, 29, PEWTER_CITY_WIDTH ; PEWTER_SPEECH_HOUSE
- warp_to 13, 25, PEWTER_CITY_WIDTH ; PEWTER_POKECENTER
diff --git a/data/mapObjects/PewterGym.asm b/data/mapObjects/PewterGym.asm
deleted file mode 100755
index 538c3923..00000000
--- a/data/mapObjects/PewterGym.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-PewterGym_Object:
- db $3 ; border block
-
- db 2 ; warps
- warp 4, 13, 2, -1
- warp 5, 13, 2, -1
-
- db 0 ; signs
-
- db 3 ; objects
- 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, 10, STAY, DOWN, 3 ; person
-
- ; warp-to
- warp_to 4, 13, PEWTER_GYM_WIDTH
- warp_to 5, 13, PEWTER_GYM_WIDTH
diff --git a/data/mapObjects/PewterMart.asm b/data/mapObjects/PewterMart.asm
deleted file mode 100755
index 9b983316..00000000
--- a/data/mapObjects/PewterMart.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-PewterMart_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 4, -1
- warp 4, 7, 4, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person
- object SPRITE_BUG_CATCHER, 3, 3, WALK, 1, 2 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 5, 5, STAY, NONE, 3 ; person
-
- ; warp-to
- warp_to 3, 7, PEWTER_MART_WIDTH
- warp_to 4, 7, PEWTER_MART_WIDTH
diff --git a/data/mapObjects/PewterNidoranHouse.asm b/data/mapObjects/PewterNidoranHouse.asm
deleted file mode 100755
index f00317d1..00000000
--- a/data/mapObjects/PewterNidoranHouse.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-PewterNidoranHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 3, -1
- warp 3, 7, 3, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_SLOWBRO, 4, 5, STAY, LEFT, 1 ; person
- object SPRITE_YOUNG_BOY, 3, 5, STAY, RIGHT, 2 ; person
- object SPRITE_FAT_BALD_GUY, 1, 2, STAY, NONE, 3 ; person
-
- ; warp-to
- warp_to 2, 7, PEWTER_NIDORAN_HOUSE_WIDTH
- warp_to 3, 7, PEWTER_NIDORAN_HOUSE_WIDTH
diff --git a/data/mapObjects/PewterPokecenter.asm b/data/mapObjects/PewterPokecenter.asm
deleted file mode 100755
index 4d460747..00000000
--- a/data/mapObjects/PewterPokecenter.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-PewterPokecenter_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 6, -1
- warp 4, 7, 6, -1
-
- db 0 ; signs
-
- db 6 ; objects
- object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
- object SPRITE_GENTLEMAN, 11, 7, STAY, LEFT, 2 ; person
- object SPRITE_JIGGLYPUFF, 1, 3, STAY, DOWN, 3 ; person
- object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person
- object SPRITE_LASS, 4, 3, STAY, UP, 5 ; person
- object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 6 ; person
-
- ; warp-to
- warp_to 3, 7, PEWTER_POKECENTER_WIDTH
- warp_to 4, 7, PEWTER_POKECENTER_WIDTH
diff --git a/data/mapObjects/PewterSpeechHouse.asm b/data/mapObjects/PewterSpeechHouse.asm
deleted file mode 100755
index e7134cb5..00000000
--- a/data/mapObjects/PewterSpeechHouse.asm
+++ /dev/null
@@ -1,16 +0,0 @@
-PewterSpeechHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 5, -1
- warp 3, 7, 5, -1
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_GAMBLER, 2, 3, STAY, RIGHT, 1 ; person
- object SPRITE_BUG_CATCHER, 4, 5, STAY, NONE, 2 ; person
-
- ; warp-to
- warp_to 2, 7, PEWTER_SPEECH_HOUSE_WIDTH
- warp_to 3, 7, PEWTER_SPEECH_HOUSE_WIDTH
diff --git a/data/mapObjects/PokemonFanClub.asm b/data/mapObjects/PokemonFanClub.asm
deleted file mode 100755
index 588ebdc2..00000000
--- a/data/mapObjects/PokemonFanClub.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-PokemonFanClub_Object:
- db $d ; border block
-
- db 2 ; warps
- warp 2, 7, 1, -1
- warp 3, 7, 1, -1
-
- db 0 ; signs
-
- db 6 ; objects
- object SPRITE_FISHER2, 6, 3, STAY, LEFT, 1 ; person
- object SPRITE_GIRL, 1, 3, STAY, RIGHT, 2 ; person
- object SPRITE_CLEFAIRY_2, 6, 4, STAY, LEFT, 3 ; person
- object SPRITE_SEEL, 1, 4, STAY, RIGHT, 4 ; person
- object SPRITE_GENTLEMAN, 3, 1, STAY, DOWN, 5 ; person
- object SPRITE_CABLE_CLUB_WOMAN, 5, 1, STAY, DOWN, 6 ; person
-
- ; warp-to
- warp_to 2, 7, POKEMON_FAN_CLUB_WIDTH
- warp_to 3, 7, POKEMON_FAN_CLUB_WIDTH
diff --git a/data/mapObjects/PokemonMansion1F.asm b/data/mapObjects/PokemonMansion1F.asm
deleted file mode 100755
index 109b5b8e..00000000
--- a/data/mapObjects/PokemonMansion1F.asm
+++ /dev/null
@@ -1,29 +0,0 @@
-PokemonMansion1F_Object:
- db $2e ; border block
-
- db 8 ; warps
- warp 4, 27, 0, -1
- warp 5, 27, 0, -1
- warp 6, 27, 0, -1
- warp 7, 27, 0, -1
- warp 5, 10, 0, POKEMON_MANSION_2F
- warp 21, 23, 0, POKEMON_MANSION_B1F
- warp 26, 27, 0, -1
- warp 27, 27, 0, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_OAK_AIDE, 17, 17, STAY, LEFT, 1, OPP_SCIENTIST, 4
- object SPRITE_BALL, 14, 3, STAY, NONE, 2, ESCAPE_ROPE
- object SPRITE_BALL, 18, 21, STAY, NONE, 3, CARBOS
-
- ; warp-to
- warp_to 4, 27, POKEMON_MANSION_1F_WIDTH
- warp_to 5, 27, POKEMON_MANSION_1F_WIDTH
- warp_to 6, 27, POKEMON_MANSION_1F_WIDTH
- warp_to 7, 27, POKEMON_MANSION_1F_WIDTH
- warp_to 5, 10, POKEMON_MANSION_1F_WIDTH ; POKEMON_MANSION_2F
- warp_to 21, 23, POKEMON_MANSION_1F_WIDTH ; POKEMON_MANSION_B1F
- warp_to 26, 27, POKEMON_MANSION_1F_WIDTH
- warp_to 27, 27, POKEMON_MANSION_1F_WIDTH
diff --git a/data/mapObjects/PokemonMansion2F.asm b/data/mapObjects/PokemonMansion2F.asm
deleted file mode 100755
index 6c0cc5f8..00000000
--- a/data/mapObjects/PokemonMansion2F.asm
+++ /dev/null
@@ -1,22 +0,0 @@
-PokemonMansion2F_Object:
- db $1 ; border block
-
- db 4 ; warps
- warp 5, 10, 4, POKEMON_MANSION_1F
- warp 7, 10, 0, POKEMON_MANSION_3F
- warp 25, 14, 2, POKEMON_MANSION_3F
- warp 6, 1, 1, POKEMON_MANSION_3F
-
- db 0 ; signs
-
- db 4 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, 3, 17, WALK, 2, 1, OPP_BURGLAR, 7
- object SPRITE_BALL, 28, 7, STAY, NONE, 2, CALCIUM
- object SPRITE_BOOK_MAP_DEX, 18, 2, STAY, NONE, 3 ; person
- object SPRITE_BOOK_MAP_DEX, 3, 22, STAY, NONE, 4 ; person
-
- ; warp-to
- warp_to 5, 10, POKEMON_MANSION_2F_WIDTH ; POKEMON_MANSION_1F
- warp_to 7, 10, POKEMON_MANSION_2F_WIDTH ; POKEMON_MANSION_3F
- warp_to 25, 14, POKEMON_MANSION_2F_WIDTH ; POKEMON_MANSION_3F
- warp_to 6, 1, POKEMON_MANSION_2F_WIDTH ; POKEMON_MANSION_3F
diff --git a/data/mapObjects/PokemonMansion3F.asm b/data/mapObjects/PokemonMansion3F.asm
deleted file mode 100755
index 7c8c9c22..00000000
--- a/data/mapObjects/PokemonMansion3F.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-PokemonMansion3F_Object:
- db $1 ; border block
-
- db 3 ; warps
- warp 7, 10, 1, POKEMON_MANSION_2F
- warp 6, 1, 3, POKEMON_MANSION_2F
- warp 25, 14, 2, POKEMON_MANSION_2F
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, 5, 11, WALK, 2, 1, OPP_BURGLAR, 8
- object SPRITE_OAK_AIDE, 20, 11, STAY, LEFT, 2, OPP_SCIENTIST, 12
- object SPRITE_BALL, 1, 16, STAY, NONE, 3, MAX_POTION
- object SPRITE_BALL, 25, 5, STAY, NONE, 4, IRON
- object SPRITE_BOOK_MAP_DEX, 6, 12, STAY, NONE, 5 ; person
-
- ; warp-to
- warp_to 7, 10, POKEMON_MANSION_3F_WIDTH ; POKEMON_MANSION_2F
- warp_to 6, 1, POKEMON_MANSION_3F_WIDTH ; POKEMON_MANSION_2F
- warp_to 25, 14, POKEMON_MANSION_3F_WIDTH ; POKEMON_MANSION_2F
diff --git a/data/mapObjects/PokemonMansionB1F.asm b/data/mapObjects/PokemonMansionB1F.asm
deleted file mode 100755
index ac232799..00000000
--- a/data/mapObjects/PokemonMansionB1F.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-PokemonMansionB1F_Object:
- db $1 ; border block
-
- db 1 ; warps
- warp 23, 22, 5, POKEMON_MANSION_1F
-
- db 0 ; signs
-
- db 8 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, 16, 23, STAY, NONE, 1, OPP_BURGLAR, 9
- object SPRITE_OAK_AIDE, 27, 11, STAY, DOWN, 2, OPP_SCIENTIST, 13
- object SPRITE_BALL, 10, 2, STAY, NONE, 3, RARE_CANDY
- object SPRITE_BALL, 1, 22, STAY, NONE, 4, FULL_RESTORE
- object SPRITE_BALL, 19, 25, STAY, NONE, 5, TM_14
- object SPRITE_BALL, 5, 4, STAY, NONE, 6, TM_22
- object SPRITE_BOOK_MAP_DEX, 16, 20, STAY, NONE, 7 ; person
- object SPRITE_BALL, 5, 13, STAY, NONE, 8, SECRET_KEY
-
- ; warp-to
- warp_to 23, 22, POKEMON_MANSION_B1F_WIDTH ; POKEMON_MANSION_1F
diff --git a/data/mapObjects/PokemonTower1F.asm b/data/mapObjects/PokemonTower1F.asm
deleted file mode 100755
index cf62836b..00000000
--- a/data/mapObjects/PokemonTower1F.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-PokemonTower1F_Object:
- db $1 ; border block
-
- db 3 ; warps
- warp 10, 17, 1, -1
- warp 11, 17, 1, -1
- warp 18, 9, 1, POKEMON_TOWER_2F
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_CABLE_CLUB_WOMAN, 15, 13, STAY, UP, 1 ; person
- object SPRITE_MOM_GEISHA, 6, 8, STAY, NONE, 2 ; person
- object SPRITE_BALDING_GUY, 8, 12, STAY, NONE, 3 ; person
- object SPRITE_GIRL, 13, 7, STAY, NONE, 4 ; person
- object SPRITE_MEDIUM, 17, 7, STAY, LEFT, 5 ; person
-
- ; warp-to
- warp_to 10, 17, POKEMON_TOWER_1F_WIDTH
- warp_to 11, 17, POKEMON_TOWER_1F_WIDTH
- warp_to 18, 9, POKEMON_TOWER_1F_WIDTH ; POKEMON_TOWER_2F
diff --git a/data/mapObjects/PokemonTower2F.asm b/data/mapObjects/PokemonTower2F.asm
deleted file mode 100755
index 5ce437d1..00000000
--- a/data/mapObjects/PokemonTower2F.asm
+++ /dev/null
@@ -1,16 +0,0 @@
-PokemonTower2F_Object:
- db $1 ; border block
-
- db 2 ; warps
- warp 3, 9, 0, POKEMON_TOWER_3F
- warp 18, 9, 2, POKEMON_TOWER_1F
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_BLUE, 14, 5, STAY, NONE, 1 ; person
- object SPRITE_MEDIUM, 3, 7, STAY, RIGHT, 2 ; person
-
- ; warp-to
- warp_to 3, 9, POKEMON_TOWER_2F_WIDTH ; POKEMON_TOWER_3F
- warp_to 18, 9, POKEMON_TOWER_2F_WIDTH ; POKEMON_TOWER_1F
diff --git a/data/mapObjects/PokemonTower3F.asm b/data/mapObjects/PokemonTower3F.asm
deleted file mode 100755
index 79b83f88..00000000
--- a/data/mapObjects/PokemonTower3F.asm
+++ /dev/null
@@ -1,18 +0,0 @@
-PokemonTower3F_Object:
- db $1 ; border block
-
- db 2 ; warps
- warp 3, 9, 0, POKEMON_TOWER_2F
- warp 18, 9, 1, POKEMON_TOWER_4F
-
- db 0 ; signs
-
- db 4 ; objects
- object SPRITE_MEDIUM, 12, 3, STAY, LEFT, 1, OPP_CHANNELER, 5
- object SPRITE_MEDIUM, 9, 8, STAY, DOWN, 2, OPP_CHANNELER, 6
- object SPRITE_MEDIUM, 10, 13, STAY, DOWN, 3, OPP_CHANNELER, 8
- object SPRITE_BALL, 12, 1, STAY, NONE, 4, ESCAPE_ROPE
-
- ; warp-to
- warp_to 3, 9, POKEMON_TOWER_3F_WIDTH ; POKEMON_TOWER_2F
- warp_to 18, 9, POKEMON_TOWER_3F_WIDTH ; POKEMON_TOWER_4F
diff --git a/data/mapObjects/PokemonTower4F.asm b/data/mapObjects/PokemonTower4F.asm
deleted file mode 100755
index db86c02c..00000000
--- a/data/mapObjects/PokemonTower4F.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-PokemonTower4F_Object:
- db $1 ; border block
-
- db 2 ; warps
- warp 3, 9, 0, POKEMON_TOWER_5F
- warp 18, 9, 1, POKEMON_TOWER_3F
-
- db 0 ; signs
-
- db 6 ; objects
- object SPRITE_MEDIUM, 5, 10, STAY, RIGHT, 1, OPP_CHANNELER, 9
- object SPRITE_MEDIUM, 15, 7, STAY, DOWN, 2, OPP_CHANNELER, 10
- object SPRITE_MEDIUM, 14, 12, STAY, LEFT, 3, OPP_CHANNELER, 12
- object SPRITE_BALL, 12, 10, STAY, NONE, 4, ELIXER
- object SPRITE_BALL, 9, 10, STAY, NONE, 5, AWAKENING
- object SPRITE_BALL, 12, 16, STAY, NONE, 6, HP_UP
-
- ; warp-to
- warp_to 3, 9, POKEMON_TOWER_4F_WIDTH ; POKEMON_TOWER_5F
- warp_to 18, 9, POKEMON_TOWER_4F_WIDTH ; POKEMON_TOWER_3F
diff --git a/data/mapObjects/PokemonTower5F.asm b/data/mapObjects/PokemonTower5F.asm
deleted file mode 100755
index b482871f..00000000
--- a/data/mapObjects/PokemonTower5F.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-PokemonTower5F_Object:
- db $1 ; border block
-
- db 2 ; warps
- warp 3, 9, 0, POKEMON_TOWER_4F
- warp 18, 9, 0, POKEMON_TOWER_6F
-
- db 0 ; signs
-
- db 6 ; objects
- object SPRITE_MEDIUM, 12, 8, STAY, NONE, 1 ; person
- object SPRITE_MEDIUM, 17, 7, STAY, LEFT, 2, OPP_CHANNELER, 14
- object SPRITE_MEDIUM, 14, 3, STAY, LEFT, 3, OPP_CHANNELER, 16
- object SPRITE_MEDIUM, 6, 10, STAY, RIGHT, 4, OPP_CHANNELER, 17
- object SPRITE_MEDIUM, 9, 16, STAY, RIGHT, 5, OPP_CHANNELER, 18
- object SPRITE_BALL, 6, 14, STAY, NONE, 6, NUGGET
-
- ; warp-to
- warp_to 3, 9, POKEMON_TOWER_5F_WIDTH ; POKEMON_TOWER_4F
- warp_to 18, 9, POKEMON_TOWER_5F_WIDTH ; POKEMON_TOWER_6F
diff --git a/data/mapObjects/PokemonTower6F.asm b/data/mapObjects/PokemonTower6F.asm
deleted file mode 100755
index 823fe78a..00000000
--- a/data/mapObjects/PokemonTower6F.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-PokemonTower6F_Object:
- db $1 ; border block
-
- db 2 ; warps
- warp 18, 9, 1, POKEMON_TOWER_5F
- warp 9, 16, 0, POKEMON_TOWER_7F
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_MEDIUM, 12, 10, STAY, RIGHT, 1, OPP_CHANNELER, 19
- object SPRITE_MEDIUM, 9, 5, STAY, DOWN, 2, OPP_CHANNELER, 20
- object SPRITE_MEDIUM, 16, 5, STAY, LEFT, 3, OPP_CHANNELER, 21
- object SPRITE_BALL, 6, 8, STAY, NONE, 4, RARE_CANDY
- object SPRITE_BALL, 14, 14, STAY, NONE, 5, X_ACCURACY
-
- ; warp-to
- warp_to 18, 9, POKEMON_TOWER_6F_WIDTH ; POKEMON_TOWER_5F
- warp_to 9, 16, POKEMON_TOWER_6F_WIDTH ; POKEMON_TOWER_7F
diff --git a/data/mapObjects/PokemonTower7F.asm b/data/mapObjects/PokemonTower7F.asm
deleted file mode 100755
index ccd4f23c..00000000
--- a/data/mapObjects/PokemonTower7F.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-PokemonTower7F_Object:
- db $1 ; border block
-
- db 1 ; warps
- warp 9, 16, 1, POKEMON_TOWER_6F
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_JESSIE, 10, 8, STAY, DOWN, 1
- object SPRITE_JAMES, 11, 8, STAY, DOWN, 2
- object SPRITE_MR_FUJI, 10, 3, STAY, DOWN, 3
-
- ; warp-to
- warp_to 9, 16, POKEMON_TOWER_7F_WIDTH ; POKEMON_TOWER_6F
diff --git a/data/mapObjects/PowerPlant.asm b/data/mapObjects/PowerPlant.asm
deleted file mode 100755
index a8548b1c..00000000
--- a/data/mapObjects/PowerPlant.asm
+++ /dev/null
@@ -1,30 +0,0 @@
-PowerPlant_Object:
- db $2e ; border block
-
- db 3 ; warps
- warp 4, 35, 3, -1
- warp 5, 35, 3, -1
- warp 0, 11, 3, -1
-
- db 0 ; signs
-
- db 14 ; objects
- object SPRITE_BALL, 9, 20, STAY, NONE, 1, VOLTORB, 40
- object SPRITE_BALL, 32, 18, STAY, NONE, 2, VOLTORB, 40
- object SPRITE_BALL, 21, 25, STAY, NONE, 3, VOLTORB, 40
- object SPRITE_BALL, 25, 18, STAY, NONE, 4, ELECTRODE, 43
- object SPRITE_BALL, 23, 34, STAY, NONE, 5, VOLTORB, 40
- object SPRITE_BALL, 26, 28, STAY, NONE, 6, VOLTORB, 40
- object SPRITE_BALL, 21, 14, STAY, NONE, 7, ELECTRODE, 43
- object SPRITE_BALL, 37, 32, STAY, NONE, 8, VOLTORB, 40
- object SPRITE_BIRD, 4, 9, STAY, UP, 9, ZAPDOS, 50
- object SPRITE_BALL, 7, 25, STAY, NONE, 10, CARBOS
- object SPRITE_BALL, 28, 3, STAY, NONE, 11, HP_UP
- object SPRITE_BALL, 34, 3, STAY, NONE, 12, RARE_CANDY
- object SPRITE_BALL, 26, 32, STAY, NONE, 13, TM_25
- object SPRITE_BALL, 20, 32, STAY, NONE, 14, TM_33
-
- ; warp-to
- warp_to 4, 35, POWER_PLANT_WIDTH
- warp_to 5, 35, POWER_PLANT_WIDTH
- warp_to 0, 11, POWER_PLANT_WIDTH
diff --git a/data/mapObjects/RedsHouse1F.asm b/data/mapObjects/RedsHouse1F.asm
deleted file mode 100755
index a54b5411..00000000
--- a/data/mapObjects/RedsHouse1F.asm
+++ /dev/null
@@ -1,18 +0,0 @@
-RedsHouse1F_Object:
- db $a ; border block
-
- db 3 ; warps
- warp 2, 7, 0, -1 ; exit1
- warp 3, 7, 0, -1 ; exit2
- warp 7, 1, 0, REDS_HOUSE_2F ; staircase
-
- db 1 ; signs
- sign 3, 1, 2 ; TV
-
- db 1 ; objects
- object SPRITE_MOM, 5, 4, STAY, LEFT, 1 ; Mom
-
- ; warp-to
- warp_to 2, 7, REDS_HOUSE_1F_WIDTH
- warp_to 3, 7, REDS_HOUSE_1F_WIDTH
- warp_to 7, 1, REDS_HOUSE_1F_WIDTH
diff --git a/data/mapObjects/RedsHouse2F.asm b/data/mapObjects/RedsHouse2F.asm
deleted file mode 100755
index 98e9c236..00000000
--- a/data/mapObjects/RedsHouse2F.asm
+++ /dev/null
@@ -1,12 +0,0 @@
-RedsHouse2F_Object:
- db $a ; border block
-
- db 1 ; warps
- warp 7, 1, 2, REDS_HOUSE_1F
-
- db 0 ; signs
-
- db 0 ; objects
-
- ; warp-to
- warp_to 7, 1, REDS_HOUSE_2F_WIDTH
diff --git a/data/mapObjects/RockTunnel1F.asm b/data/mapObjects/RockTunnel1F.asm
deleted file mode 100755
index 1cf5a12f..00000000
--- a/data/mapObjects/RockTunnel1F.asm
+++ /dev/null
@@ -1,34 +0,0 @@
-RockTunnel1F_Object:
- db $3 ; border block
-
- db 8 ; warps
- warp 15, 3, 1, -1
- warp 15, 0, 1, -1
- warp 15, 33, 2, -1
- warp 15, 35, 2, -1
- warp 37, 3, 0, ROCK_TUNNEL_B1F
- warp 5, 3, 1, ROCK_TUNNEL_B1F
- warp 17, 11, 2, ROCK_TUNNEL_B1F
- warp 37, 17, 3, ROCK_TUNNEL_B1F
-
- db 1 ; signs
- sign 11, 29, 8 ; RockTunnel1Text8
-
- db 7 ; objects
- object SPRITE_HIKER, 7, 5, STAY, DOWN, 1, OPP_HIKER, 12
- object SPRITE_HIKER, 5, 16, STAY, DOWN, 2, OPP_HIKER, 13
- object SPRITE_HIKER, 17, 15, STAY, LEFT, 3, OPP_HIKER, 14
- object SPRITE_BLACK_HAIR_BOY_2, 23, 8, STAY, LEFT, 4, OPP_POKEMANIAC, 7
- object SPRITE_LASS, 37, 21, STAY, LEFT, 5, OPP_JR_TRAINER_F, 17
- object SPRITE_LASS, 22, 24, STAY, DOWN, 6, OPP_JR_TRAINER_F, 18
- object SPRITE_LASS, 32, 24, STAY, RIGHT, 7, OPP_JR_TRAINER_F, 19
-
- ; warp-to
- warp_to 15, 3, ROCK_TUNNEL_1F_WIDTH
- warp_to 15, 0, ROCK_TUNNEL_1F_WIDTH
- warp_to 15, 33, ROCK_TUNNEL_1F_WIDTH
- warp_to 15, 35, ROCK_TUNNEL_1F_WIDTH
- warp_to 37, 3, ROCK_TUNNEL_1F_WIDTH ; ROCK_TUNNEL_B1F
- warp_to 5, 3, ROCK_TUNNEL_1F_WIDTH ; ROCK_TUNNEL_B1F
- warp_to 17, 11, ROCK_TUNNEL_1F_WIDTH ; ROCK_TUNNEL_B1F
- warp_to 37, 17, ROCK_TUNNEL_1F_WIDTH ; ROCK_TUNNEL_B1F
diff --git a/data/mapObjects/RockTunnelB1F.asm b/data/mapObjects/RockTunnelB1F.asm
deleted file mode 100755
index f562168e..00000000
--- a/data/mapObjects/RockTunnelB1F.asm
+++ /dev/null
@@ -1,26 +0,0 @@
-RockTunnelB1F_Object:
- db $3 ; border block
-
- db 4 ; warps
- warp 33, 25, 4, ROCK_TUNNEL_1F
- warp 27, 3, 5, ROCK_TUNNEL_1F
- warp 23, 11, 6, ROCK_TUNNEL_1F
- warp 3, 3, 7, ROCK_TUNNEL_1F
-
- db 0 ; signs
-
- db 8 ; objects
- object SPRITE_LASS, 11, 13, STAY, DOWN, 1, OPP_JR_TRAINER_F, 9
- object SPRITE_HIKER, 6, 10, 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, 20, 21, STAY, RIGHT, 4, OPP_POKEMANIAC, 4
- object SPRITE_HIKER, 30, 10, STAY, DOWN, 5, OPP_HIKER, 10
- object SPRITE_LASS, 14, 28, STAY, RIGHT, 6, OPP_JR_TRAINER_F, 10
- object SPRITE_HIKER, 33, 5, STAY, RIGHT, 7, OPP_HIKER, 11
- object SPRITE_BLACK_HAIR_BOY_2, 26, 30, STAY, DOWN, 8, OPP_POKEMANIAC, 5
-
- ; warp-to
- warp_to 33, 25, ROCK_TUNNEL_B1F_WIDTH ; ROCK_TUNNEL_1F
- warp_to 27, 3, ROCK_TUNNEL_B1F_WIDTH ; ROCK_TUNNEL_1F
- warp_to 23, 11, ROCK_TUNNEL_B1F_WIDTH ; ROCK_TUNNEL_1F
- warp_to 3, 3, ROCK_TUNNEL_B1F_WIDTH ; ROCK_TUNNEL_1F
diff --git a/data/mapObjects/RockTunnelPokecenter.asm b/data/mapObjects/RockTunnelPokecenter.asm
deleted file mode 100755
index dfd08017..00000000
--- a/data/mapObjects/RockTunnelPokecenter.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-RockTunnelPokecenter_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 0, -1
- warp 4, 7, 0, -1
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
- object SPRITE_GENTLEMAN, 7, 3, STAY, DOWN, 2 ; person
- object SPRITE_FISHER2, 2, 5, STAY, NONE, 3 ; person
- object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person
- object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
-
- ; warp-to
- warp_to 3, 7, ROCK_TUNNEL_POKECENTER_WIDTH
- warp_to 4, 7, ROCK_TUNNEL_POKECENTER_WIDTH
diff --git a/data/mapObjects/RocketHideoutB1F.asm b/data/mapObjects/RocketHideoutB1F.asm
deleted file mode 100755
index 99537510..00000000
--- a/data/mapObjects/RocketHideoutB1F.asm
+++ /dev/null
@@ -1,27 +0,0 @@
-RocketHideoutB1F_Object:
- db $2e ; border block
-
- db 5 ; warps
- warp 23, 2, 0, ROCKET_HIDEOUT_B2F
- warp 21, 2, 2, GAME_CORNER
- warp 24, 19, 0, ROCKET_HIDEOUT_ELEVATOR
- warp 21, 24, 3, ROCKET_HIDEOUT_B2F
- warp 25, 19, 1, ROCKET_HIDEOUT_ELEVATOR
-
- db 0 ; signs
-
- db 7 ; objects
- object SPRITE_ROCKET, 26, 8, STAY, LEFT, 1, OPP_ROCKET, 8
- object SPRITE_ROCKET, 12, 6, STAY, RIGHT, 2, OPP_ROCKET, 9
- object SPRITE_ROCKET, 18, 17, STAY, DOWN, 3, OPP_ROCKET, 10
- object SPRITE_ROCKET, 15, 25, STAY, RIGHT, 4, OPP_ROCKET, 11
- object SPRITE_ROCKET, 28, 18, STAY, LEFT, 5, OPP_ROCKET, 12
- object SPRITE_BALL, 11, 14, STAY, NONE, 6, ESCAPE_ROPE
- object SPRITE_BALL, 9, 17, STAY, NONE, 7, HYPER_POTION
-
- ; warp-to
- warp_to 23, 2, ROCKET_HIDEOUT_B1F_WIDTH ; ROCKET_HIDEOUT_B2F
- warp_to 21, 2, ROCKET_HIDEOUT_B1F_WIDTH ; GAME_CORNER
- warp_to 24, 19, ROCKET_HIDEOUT_B1F_WIDTH ; ROCKET_HIDEOUT_ELEVATOR
- warp_to 21, 24, ROCKET_HIDEOUT_B1F_WIDTH ; ROCKET_HIDEOUT_B2F
- warp_to 25, 19, ROCKET_HIDEOUT_B1F_WIDTH ; ROCKET_HIDEOUT_ELEVATOR
diff --git a/data/mapObjects/RocketHideoutB2F.asm b/data/mapObjects/RocketHideoutB2F.asm
deleted file mode 100755
index 36fe9289..00000000
--- a/data/mapObjects/RocketHideoutB2F.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-RocketHideoutB2F_Object:
- db $2e ; border block
-
- db 5 ; warps
- warp 27, 8, 0, ROCKET_HIDEOUT_B1F
- warp 21, 8, 0, ROCKET_HIDEOUT_B3F
- warp 24, 19, 0, ROCKET_HIDEOUT_ELEVATOR
- warp 21, 22, 3, ROCKET_HIDEOUT_B1F
- warp 25, 19, 1, ROCKET_HIDEOUT_ELEVATOR
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_ROCKET, 20, 12, STAY, DOWN, 1, OPP_ROCKET, 13
- object SPRITE_BALL, 1, 11, STAY, NONE, 2, MOON_STONE
- object SPRITE_BALL, 16, 8, STAY, NONE, 3, NUGGET
- object SPRITE_BALL, 6, 12, STAY, NONE, 4, TM_07
- object SPRITE_BALL, 3, 21, STAY, NONE, 5, SUPER_POTION
-
- ; warp-to
- warp_to 27, 8, ROCKET_HIDEOUT_B2F_WIDTH ; ROCKET_HIDEOUT_B1F
- warp_to 21, 8, ROCKET_HIDEOUT_B2F_WIDTH ; ROCKET_HIDEOUT_B3F
- warp_to 24, 19, ROCKET_HIDEOUT_B2F_WIDTH ; ROCKET_HIDEOUT_ELEVATOR
- warp_to 21, 22, ROCKET_HIDEOUT_B2F_WIDTH ; ROCKET_HIDEOUT_B1F
- warp_to 25, 19, ROCKET_HIDEOUT_B2F_WIDTH ; ROCKET_HIDEOUT_ELEVATOR
diff --git a/data/mapObjects/RocketHideoutB3F.asm b/data/mapObjects/RocketHideoutB3F.asm
deleted file mode 100755
index 6169dbed..00000000
--- a/data/mapObjects/RocketHideoutB3F.asm
+++ /dev/null
@@ -1,18 +0,0 @@
-RocketHideoutB3F_Object:
- db $2e ; border block
-
- db 2 ; warps
- warp 25, 6, 1, ROCKET_HIDEOUT_B2F
- warp 19, 18, 0, ROCKET_HIDEOUT_B4F
-
- db 0 ; signs
-
- db 4 ; objects
- object SPRITE_ROCKET, 10, 22, STAY, RIGHT, 1, OPP_ROCKET, 14
- object SPRITE_ROCKET, 26, 12, STAY, UP, 2, OPP_ROCKET, 15
- object SPRITE_BALL, 26, 17, STAY, NONE, 3, TM_10
- object SPRITE_BALL, 20, 14, STAY, NONE, 4, RARE_CANDY
-
- ; warp-to
- warp_to 25, 6, ROCKET_HIDEOUT_B3F_WIDTH ; ROCKET_HIDEOUT_B2F
- warp_to 19, 18, ROCKET_HIDEOUT_B3F_WIDTH ; ROCKET_HIDEOUT_B4F
diff --git a/data/mapObjects/RocketHideoutB4F.asm b/data/mapObjects/RocketHideoutB4F.asm
deleted file mode 100755
index ba746951..00000000
--- a/data/mapObjects/RocketHideoutB4F.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-RocketHideoutB4F_Object:
- db $2e ; border block
-
- db 3 ; warps
- warp 19, 10, 1, ROCKET_HIDEOUT_B3F
- warp 24, 15, 0, ROCKET_HIDEOUT_ELEVATOR
- warp 25, 15, 1, ROCKET_HIDEOUT_ELEVATOR
-
- db 0 ; signs
-
- db 9 ; objects
- object SPRITE_GIOVANNI, 25, 3, STAY, DOWN, 1, OPP_GIOVANNI, 1
- object SPRITE_JAMES, 25, 10, STAY, DOWN, 2
- object SPRITE_JESSIE, 24, 10, STAY, DOWN, 3
- object SPRITE_ROCKET, 11, 2, STAY, DOWN, 4, OPP_ROCKET, 18
- object SPRITE_BALL, 10, 12, STAY, NONE, 5, HP_UP
- object SPRITE_BALL, 9, 4, STAY, NONE, 6, TM_02
- object SPRITE_BALL, 12, 20, STAY, NONE, 7, IRON
- object SPRITE_BALL, 25, 2, STAY, NONE, 8, SILPH_SCOPE
- object SPRITE_BALL, 10, 2, STAY, NONE, 9, LIFT_KEY
-
- ; warp-to
- warp_to 19, 10, ROCKET_HIDEOUT_B4F_WIDTH ; ROCKET_HIDEOUT_B3F
- warp_to 24, 15, ROCKET_HIDEOUT_B4F_WIDTH ; ROCKET_HIDEOUT_ELEVATOR
- warp_to 25, 15, ROCKET_HIDEOUT_B4F_WIDTH ; ROCKET_HIDEOUT_ELEVATOR
diff --git a/data/mapObjects/RocketHideoutElevator.asm b/data/mapObjects/RocketHideoutElevator.asm
deleted file mode 100755
index bc4fd7ff..00000000
--- a/data/mapObjects/RocketHideoutElevator.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-RocketHideoutElevator_Object:
- db $f ; border block
-
- db 2 ; warps
- warp 2, 1, 2, ROCKET_HIDEOUT_B1F
- warp 3, 1, 4, ROCKET_HIDEOUT_B1F
-
- db 1 ; signs
- sign 1, 1, 1 ; RocketHideoutElevatorText1
-
- db 0 ; objects
-
- ; warp-to
- warp_to 2, 1, ROCKET_HIDEOUT_ELEVATOR_WIDTH ; ROCKET_HIDEOUT_B1F
- warp_to 3, 1, ROCKET_HIDEOUT_ELEVATOR_WIDTH ; ROCKET_HIDEOUT_B1F
diff --git a/data/mapObjects/Route1.asm b/data/mapObjects/Route1.asm
deleted file mode 100755
index 0815fe67..00000000
--- a/data/mapObjects/Route1.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route1_Object:
- db $b ; border block
-
- db 0 ; warps
-
- db 1 ; signs
- sign 9, 27, 3 ; Route1Text3
-
- db 2 ; objects
- object SPRITE_BUG_CATCHER, 5, 24, WALK, 1, 1 ; person
- object SPRITE_BUG_CATCHER, 15, 13, WALK, 2, 2 ; person
-
- ; warp-to (unused)
- warp_to 2, 7, 4
diff --git a/data/mapObjects/Route10.asm b/data/mapObjects/Route10.asm
deleted file mode 100755
index 12850577..00000000
--- a/data/mapObjects/Route10.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-Route10_Object:
- db $2c ; border block
-
- db 4 ; warps
- warp 11, 19, 0, ROCK_TUNNEL_POKECENTER
- warp 8, 17, 0, ROCK_TUNNEL_1F
- warp 8, 53, 2, ROCK_TUNNEL_1F
- warp 6, 39, 0, POWER_PLANT
-
- db 4 ; signs
- sign 7, 19, 7 ; Route10Text7
- sign 12, 19, 8 ; PokeCenterSignText
- sign 9, 55, 9 ; Route10Text9
- sign 5, 41, 10 ; Route10Text10
-
- db 6 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, 10, 44, STAY, LEFT, 1, OPP_POKEMANIAC, 1
- object SPRITE_HIKER, 3, 57, STAY, UP, 2, OPP_HIKER, 7
- object SPRITE_BLACK_HAIR_BOY_2, 14, 64, STAY, LEFT, 3, OPP_POKEMANIAC, 2
- object SPRITE_LASS, 7, 25, STAY, LEFT, 4, OPP_JR_TRAINER_F, 7
- object SPRITE_HIKER, 3, 61, STAY, DOWN, 5, OPP_HIKER, 8
- object SPRITE_LASS, 7, 54, STAY, DOWN, 6, OPP_JR_TRAINER_F, 8
-
- ; warp-to
- warp_to 11, 19, ROUTE_10_WIDTH ; ROCK_TUNNEL_POKECENTER
- warp_to 8, 17, ROUTE_10_WIDTH ; ROCK_TUNNEL_1F
- warp_to 8, 53, ROUTE_10_WIDTH ; ROCK_TUNNEL_1F
- warp_to 6, 39, ROUTE_10_WIDTH ; POWER_PLANT
diff --git a/data/mapObjects/Route11.asm b/data/mapObjects/Route11.asm
deleted file mode 100755
index a72bf347..00000000
--- a/data/mapObjects/Route11.asm
+++ /dev/null
@@ -1,31 +0,0 @@
-Route11_Object:
- db $f ; border block
-
- db 5 ; warps
- warp 49, 8, 0, ROUTE_11_GATE_1F
- warp 49, 9, 0, ROUTE_11_GATE_1F
- warp 58, 8, 2, ROUTE_11_GATE_1F
- warp 58, 9, 2, ROUTE_11_GATE_1F
- warp 4, 5, 0, DIGLETTS_CAVE_ROUTE_11
-
- db 1 ; signs
- sign 1, 5, 11 ; Route11Text11
-
- db 10 ; objects
- object SPRITE_GAMBLER, 10, 14, STAY, DOWN, 1, OPP_GAMBLER, 1
- object SPRITE_GAMBLER, 26, 9, STAY, DOWN, 2, OPP_GAMBLER, 2
- object SPRITE_BUG_CATCHER, 13, 5, STAY, LEFT, 3, OPP_YOUNGSTER, 9
- object SPRITE_BLACK_HAIR_BOY_2, 36, 11, STAY, DOWN, 4, OPP_ENGINEER, 2
- object SPRITE_BUG_CATCHER, 22, 4, STAY, UP, 5, OPP_YOUNGSTER, 10
- object SPRITE_GAMBLER, 45, 7, STAY, DOWN, 6, OPP_GAMBLER, 3
- object SPRITE_GAMBLER, 33, 3, STAY, UP, 7, OPP_GAMBLER, 4
- object SPRITE_BUG_CATCHER, 43, 5, STAY, RIGHT, 8, OPP_YOUNGSTER, 11
- object SPRITE_BLACK_HAIR_BOY_2, 45, 16, STAY, LEFT, 9, OPP_ENGINEER, 3
- object SPRITE_BUG_CATCHER, 22, 12, STAY, UP, 10, OPP_YOUNGSTER, 12
-
- ; warp-to
- warp_to 49, 8, ROUTE_11_WIDTH ; ROUTE_11_GATE_1F
- warp_to 49, 9, ROUTE_11_WIDTH ; ROUTE_11_GATE_1F
- warp_to 58, 8, ROUTE_11_WIDTH ; ROUTE_11_GATE_1F
- warp_to 58, 9, ROUTE_11_WIDTH ; ROUTE_11_GATE_1F
- warp_to 4, 5, ROUTE_11_WIDTH ; DIGLETTS_CAVE_ROUTE_11
diff --git a/data/mapObjects/Route11Gate1F.asm b/data/mapObjects/Route11Gate1F.asm
deleted file mode 100755
index 5c4a120c..00000000
--- a/data/mapObjects/Route11Gate1F.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-Route11Gate1F_Object:
- db $a ; border block
-
- db 5 ; warps
- warp 0, 4, 0, -1
- warp 0, 5, 1, -1
- warp 7, 4, 2, -1
- warp 7, 5, 3, -1
- warp 6, 8, 0, ROUTE_11_GATE_2F
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GUARD, 4, 1, STAY, NONE, 1 ; person
-
- ; warp-to
- warp_to 0, 4, ROUTE_11_GATE_1F_WIDTH
- warp_to 0, 5, ROUTE_11_GATE_1F_WIDTH
- warp_to 7, 4, ROUTE_11_GATE_1F_WIDTH
- warp_to 7, 5, ROUTE_11_GATE_1F_WIDTH
- warp_to 6, 8, ROUTE_11_GATE_1F_WIDTH ; ROUTE_11_GATE_2F
diff --git a/data/mapObjects/Route11Gate2F.asm b/data/mapObjects/Route11Gate2F.asm
deleted file mode 100755
index bf305bba..00000000
--- a/data/mapObjects/Route11Gate2F.asm
+++ /dev/null
@@ -1,16 +0,0 @@
-Route11Gate2F_Object:
- db $a ; border block
-
- db 1 ; warps
- warp 7, 7, 4, ROUTE_11_GATE_1F
-
- db 2 ; signs
- sign 1, 2, 3 ; Route11GateUpstairsText3
- sign 6, 2, 4 ; Route11GateUpstairsText4
-
- db 2 ; objects
- object SPRITE_BUG_CATCHER, 4, 2, WALK, 2, 1 ; person
- object SPRITE_OAK_AIDE, 2, 6, STAY, NONE, 2 ; person
-
- ; warp-to
- warp_to 7, 7, ROUTE_11_GATE_2F_WIDTH ; ROUTE_11_GATE_1F
diff --git a/data/mapObjects/Route12.asm b/data/mapObjects/Route12.asm
deleted file mode 100755
index 8043b5db..00000000
--- a/data/mapObjects/Route12.asm
+++ /dev/null
@@ -1,30 +0,0 @@
-Route12_Object:
- db $43 ; border block
-
- db 4 ; warps
- warp 10, 15, 0, ROUTE_12_GATE_1F
- warp 11, 15, 0, ROUTE_12_GATE_1F
- warp 10, 21, 2, ROUTE_12_GATE_1F
- warp 11, 77, 0, ROUTE_12_SUPER_ROD_HOUSE
-
- db 2 ; signs
- sign 13, 13, 11 ; Route12Text11
- sign 11, 63, 12 ; Route12Text12
-
- db 10 ; objects
- object SPRITE_SNORLAX, 10, 62, STAY, DOWN, 1 ; person
- object SPRITE_FISHER2, 14, 31, STAY, LEFT, 2, OPP_FISHER, 3
- object SPRITE_FISHER2, 5, 39, STAY, UP, 3, OPP_FISHER, 4
- object SPRITE_BLACK_HAIR_BOY_1, 11, 92, STAY, LEFT, 4, OPP_JR_TRAINER_M, 9
- object SPRITE_BLACK_HAIR_BOY_2, 14, 76, STAY, UP, 5, OPP_ROCKER, 2
- object SPRITE_FISHER2, 12, 40, STAY, LEFT, 6, OPP_FISHER, 5
- object SPRITE_FISHER2, 9, 52, STAY, RIGHT, 7, OPP_FISHER, 6
- object SPRITE_FISHER2, 6, 87, STAY, DOWN, 8, OPP_FISHER, 11
- object SPRITE_BALL, 14, 35, STAY, NONE, 9, TM_16
- object SPRITE_BALL, 5, 89, STAY, NONE, 10, IRON
-
- ; warp-to
- warp_to 10, 15, ROUTE_12_WIDTH ; ROUTE_12_GATE_1F
- warp_to 11, 15, ROUTE_12_WIDTH ; ROUTE_12_GATE_1F
- warp_to 10, 21, ROUTE_12_WIDTH ; ROUTE_12_GATE_1F
- warp_to 11, 77, ROUTE_12_WIDTH ; ROUTE_12_SUPER_ROD_HOUSE
diff --git a/data/mapObjects/Route12Gate1F.asm b/data/mapObjects/Route12Gate1F.asm
deleted file mode 100755
index 94f6b91a..00000000
--- a/data/mapObjects/Route12Gate1F.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-Route12Gate1F_Object:
- db $a ; border block
-
- db 5 ; warps
- warp 4, 0, 0, -1
- warp 5, 0, 1, -1
- warp 4, 7, 2, -1
- warp 5, 7, 2, -1
- warp 8, 6, 0, ROUTE_12_GATE_2F
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GUARD, 1, 3, STAY, NONE, 1 ; person
-
- ; warp-to
- warp_to 4, 0, ROUTE_12_GATE_1F_WIDTH
- warp_to 5, 0, ROUTE_12_GATE_1F_WIDTH
- warp_to 4, 7, ROUTE_12_GATE_1F_WIDTH
- warp_to 5, 7, ROUTE_12_GATE_1F_WIDTH
- warp_to 8, 6, ROUTE_12_GATE_1F_WIDTH ; ROUTE_12_GATE_2F
diff --git a/data/mapObjects/Route12Gate2F.asm b/data/mapObjects/Route12Gate2F.asm
deleted file mode 100755
index cc6c1c19..00000000
--- a/data/mapObjects/Route12Gate2F.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-Route12Gate2F_Object:
- db $a ; border block
-
- db 1 ; warps
- warp 7, 7, 4, ROUTE_12_GATE_1F
-
- db 2 ; signs
- sign 1, 2, 2 ; Route12GateUpstairsText2
- sign 6, 2, 3 ; Route12GateUpstairsText3
-
- db 1 ; objects
- object SPRITE_BRUNETTE_GIRL, 3, 4, WALK, 1, 1 ; person
-
- ; warp-to
- warp_to 7, 7, ROUTE_12_GATE_2F_WIDTH ; ROUTE_12_GATE_1F
diff --git a/data/mapObjects/Route12SuperRodHouse.asm b/data/mapObjects/Route12SuperRodHouse.asm
deleted file mode 100755
index 458378a2..00000000
--- a/data/mapObjects/Route12SuperRodHouse.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-Route12SuperRodHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 3, -1
- warp 3, 7, 3, -1
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_FISHER, 2, 4, STAY, RIGHT, 1 ; person
-
- ; warp-to
- warp_to 2, 7, ROUTE_12_SUPER_ROD_HOUSE_WIDTH
- warp_to 3, 7, ROUTE_12_SUPER_ROD_HOUSE_WIDTH
diff --git a/data/mapObjects/Route13.asm b/data/mapObjects/Route13.asm
deleted file mode 100755
index 3f460901..00000000
--- a/data/mapObjects/Route13.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-Route13_Object:
- db $43 ; border block
-
- db 0 ; warps
-
- db 3 ; signs
- sign 15, 13, 11 ; Route13Text11
- sign 33, 5, 12 ; Route13Text12
- sign 31, 11, 13 ; Route13Text13
-
- db 10 ; objects
- object SPRITE_BLACK_HAIR_BOY_1, 49, 10, STAY, RIGHT, 1, OPP_BIRD_KEEPER, 1
- object SPRITE_LASS, 48, 10, STAY, DOWN, 2, OPP_JR_TRAINER_F, 12
- object SPRITE_LASS, 27, 9, STAY, DOWN, 3, OPP_JR_TRAINER_F, 13
- object SPRITE_LASS, 23, 10, STAY, LEFT, 4, OPP_JR_TRAINER_F, 14
- object SPRITE_LASS, 50, 5, STAY, DOWN, 5, OPP_JR_TRAINER_F, 15
- object SPRITE_BLACK_HAIR_BOY_1, 12, 4, STAY, RIGHT, 6, OPP_BIRD_KEEPER, 2
- object SPRITE_FOULARD_WOMAN, 33, 6, STAY, DOWN, 7, OPP_BEAUTY, 4
- object SPRITE_FOULARD_WOMAN, 32, 6, STAY, DOWN, 8, OPP_BEAUTY, 5
- object SPRITE_BIKER, 10, 7, STAY, UP, 9, OPP_BIKER, 1
- object SPRITE_BLACK_HAIR_BOY_1, 7, 13, STAY, UP, 10, OPP_BIRD_KEEPER, 3
diff --git a/data/mapObjects/Route14.asm b/data/mapObjects/Route14.asm
deleted file mode 100755
index 565e587f..00000000
--- a/data/mapObjects/Route14.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-Route14_Object:
- db $43 ; border block
-
- db 0 ; warps
-
- db 1 ; signs
- sign 17, 13, 11 ; Route14Text11
-
- db 10 ; objects
- object SPRITE_BLACK_HAIR_BOY_1, 4, 4, STAY, DOWN, 1, OPP_BIRD_KEEPER, 14
- object SPRITE_BLACK_HAIR_BOY_1, 15, 6, STAY, DOWN, 2, OPP_BIRD_KEEPER, 15
- object SPRITE_BLACK_HAIR_BOY_1, 12, 11, STAY, DOWN, 3, OPP_BIRD_KEEPER, 16
- object SPRITE_BLACK_HAIR_BOY_1, 14, 15, STAY, UP, 4, OPP_BIRD_KEEPER, 17
- object SPRITE_BLACK_HAIR_BOY_1, 15, 31, STAY, LEFT, 5, OPP_BIRD_KEEPER, 4
- object SPRITE_BLACK_HAIR_BOY_1, 6, 49, STAY, UP, 6, OPP_BIRD_KEEPER, 5
- object SPRITE_BIKER, 5, 39, STAY, DOWN, 7, OPP_BIKER, 13
- object SPRITE_BIKER, 4, 30, STAY, RIGHT, 8, OPP_BIKER, 14
- object SPRITE_BIKER, 15, 30, STAY, LEFT, 9, OPP_BIKER, 15
- object SPRITE_BIKER, 4, 31, STAY, RIGHT, 10, OPP_BIKER, 2
diff --git a/data/mapObjects/Route15.asm b/data/mapObjects/Route15.asm
deleted file mode 100755
index 10cd8090..00000000
--- a/data/mapObjects/Route15.asm
+++ /dev/null
@@ -1,30 +0,0 @@
-Route15_Object:
- db $43 ; border block
-
- db 4 ; warps
- warp 7, 8, 0, ROUTE_15_GATE_1F
- warp 7, 9, 0, ROUTE_15_GATE_1F
- warp 14, 8, 2, ROUTE_15_GATE_1F
- warp 14, 9, 2, ROUTE_15_GATE_1F
-
- db 1 ; signs
- sign 39, 9, 12 ; Route15Text12
-
- db 11 ; objects
- object SPRITE_LASS, 41, 11, STAY, DOWN, 1, OPP_JR_TRAINER_F, 20
- object SPRITE_LASS, 53, 10, STAY, LEFT, 2, OPP_JR_TRAINER_F, 21
- object SPRITE_BLACK_HAIR_BOY_1, 31, 13, STAY, UP, 3, OPP_BIRD_KEEPER, 6
- object SPRITE_BLACK_HAIR_BOY_1, 35, 13, STAY, UP, 4, OPP_BIRD_KEEPER, 7
- object SPRITE_FOULARD_WOMAN, 53, 11, STAY, DOWN, 5, OPP_BEAUTY, 9
- object SPRITE_FOULARD_WOMAN, 41, 10, STAY, RIGHT, 6, OPP_BEAUTY, 10
- object SPRITE_BIKER, 48, 10, STAY, DOWN, 7, OPP_BIKER, 3
- object SPRITE_BIKER, 46, 10, STAY, DOWN, 8, OPP_BIKER, 4
- object SPRITE_LASS, 37, 5, STAY, RIGHT, 9, OPP_JR_TRAINER_F, 22
- object SPRITE_LASS, 18, 13, STAY, UP, 10, OPP_JR_TRAINER_F, 23
- object SPRITE_BALL, 18, 5, STAY, NONE, 11, TM_20
-
- ; warp-to
- warp_to 7, 8, ROUTE_15_WIDTH ; ROUTE_15_GATE_1F
- warp_to 7, 9, ROUTE_15_WIDTH ; ROUTE_15_GATE_1F
- warp_to 14, 8, ROUTE_15_WIDTH ; ROUTE_15_GATE_1F
- warp_to 14, 9, ROUTE_15_WIDTH ; ROUTE_15_GATE_1F
diff --git a/data/mapObjects/Route15Gate1F.asm b/data/mapObjects/Route15Gate1F.asm
deleted file mode 100755
index 23b1f5a7..00000000
--- a/data/mapObjects/Route15Gate1F.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-Route15Gate1F_Object:
- db $a ; border block
-
- db 5 ; warps
- warp 0, 4, 0, -1
- warp 0, 5, 1, -1
- warp 7, 4, 2, -1
- warp 7, 5, 3, -1
- warp 6, 8, 0, ROUTE_15_GATE_2F
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GUARD, 4, 1, STAY, NONE, 1 ; person
-
- ; warp-to
- warp_to 0, 4, ROUTE_15_GATE_1F_WIDTH
- warp_to 0, 5, ROUTE_15_GATE_1F_WIDTH
- warp_to 7, 4, ROUTE_15_GATE_1F_WIDTH
- warp_to 7, 5, ROUTE_15_GATE_1F_WIDTH
- warp_to 6, 8, ROUTE_15_GATE_1F_WIDTH ; ROUTE_15_GATE_2F
diff --git a/data/mapObjects/Route15Gate2F.asm b/data/mapObjects/Route15Gate2F.asm
deleted file mode 100755
index 162f2b1f..00000000
--- a/data/mapObjects/Route15Gate2F.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route15Gate2F_Object:
- db $a ; border block
-
- db 1 ; warps
- warp 7, 7, 4, ROUTE_15_GATE_1F
-
- db 1 ; signs
- sign 6, 2, 2 ; Route15GateUpstairsText2
-
- db 1 ; objects
- object SPRITE_OAK_AIDE, 4, 2, STAY, DOWN, 1
-
- ; warp-to
- warp_to 7, 7, ROUTE_15_GATE_2F_WIDTH ; ROUTE_15_GATE_1F
diff --git a/data/mapObjects/Route16.asm b/data/mapObjects/Route16.asm
deleted file mode 100755
index 93531d13..00000000
--- a/data/mapObjects/Route16.asm
+++ /dev/null
@@ -1,37 +0,0 @@
-Route16_Object:
- db $f ; border block
-
- db 9 ; warps
- warp 17, 10, 0, ROUTE_16_GATE_1F
- warp 17, 11, 0, ROUTE_16_GATE_1F
- warp 24, 10, 2, ROUTE_16_GATE_1F
- warp 24, 11, 2, ROUTE_16_GATE_1F
- warp 17, 4, 4, ROUTE_16_GATE_1F
- warp 17, 5, 4, ROUTE_16_GATE_1F
- warp 24, 4, 6, ROUTE_16_GATE_1F
- warp 24, 5, 6, ROUTE_16_GATE_1F
- warp 7, 5, 0, ROUTE_16_FLY_HOUSE
-
- db 2 ; signs
- sign 27, 11, 8 ; Route16Text8
- sign 5, 17, 9 ; Route16Text9
-
- db 7 ; objects
- object SPRITE_BIKER, 17, 12, STAY, LEFT, 1, OPP_BIKER, 5
- object SPRITE_BIKER, 14, 13, STAY, RIGHT, 2, OPP_CUE_BALL, 1
- object SPRITE_BIKER, 11, 12, STAY, UP, 3, OPP_CUE_BALL, 2
- object SPRITE_BIKER, 9, 11, STAY, LEFT, 4, OPP_BIKER, 6
- object SPRITE_BIKER, 6, 10, STAY, RIGHT, 5, OPP_CUE_BALL, 3
- object SPRITE_BIKER, 3, 12, STAY, RIGHT, 6, OPP_BIKER, 7
- object SPRITE_SNORLAX, 26, 10, STAY, DOWN, 7 ; person
-
- ; warp-to
- warp_to 17, 10, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F
- warp_to 17, 11, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F
- warp_to 24, 10, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F
- warp_to 24, 11, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F
- warp_to 17, 4, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F
- warp_to 17, 5, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F
- warp_to 24, 4, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F
- warp_to 24, 5, ROUTE_16_WIDTH ; ROUTE_16_GATE_1F
- warp_to 7, 5, ROUTE_16_WIDTH ; ROUTE_16_FLY_HOUSE
diff --git a/data/mapObjects/Route16FlyHouse.asm b/data/mapObjects/Route16FlyHouse.asm
deleted file mode 100755
index ec493fef..00000000
--- a/data/mapObjects/Route16FlyHouse.asm
+++ /dev/null
@@ -1,16 +0,0 @@
-Route16FlyHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 8, -1
- warp 3, 7, 8, -1
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_BRUNETTE_GIRL, 2, 3, STAY, RIGHT, 1 ; person
- object SPRITE_BIRD, 6, 4, WALK, 0, 2 ; person
-
- ; warp-to
- warp_to 2, 7, ROUTE_16_FLY_HOUSE_WIDTH
- warp_to 3, 7, ROUTE_16_FLY_HOUSE_WIDTH
diff --git a/data/mapObjects/Route16Gate1F.asm b/data/mapObjects/Route16Gate1F.asm
deleted file mode 100755
index 1d5baa1d..00000000
--- a/data/mapObjects/Route16Gate1F.asm
+++ /dev/null
@@ -1,30 +0,0 @@
-Route16Gate1F_Object:
- db $a ; border block
-
- db 9 ; warps
- warp 0, 8, 0, -1
- warp 0, 9, 1, -1
- warp 7, 8, 2, -1
- warp 7, 9, 2, -1
- warp 0, 2, 4, -1
- warp 0, 3, 5, -1
- warp 7, 2, 6, -1
- warp 7, 3, 7, -1
- warp 6, 12, 0, ROUTE_16_GATE_2F
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_GUARD, 4, 5, STAY, DOWN, 1 ; person
- object SPRITE_GAMBLER, 4, 3, STAY, NONE, 2 ; person
-
- ; warp-to
- warp_to 0, 8, ROUTE_16_GATE_1F_WIDTH
- warp_to 0, 9, ROUTE_16_GATE_1F_WIDTH
- warp_to 7, 8, ROUTE_16_GATE_1F_WIDTH
- warp_to 7, 9, ROUTE_16_GATE_1F_WIDTH
- warp_to 0, 2, ROUTE_16_GATE_1F_WIDTH
- warp_to 0, 3, ROUTE_16_GATE_1F_WIDTH
- warp_to 7, 2, ROUTE_16_GATE_1F_WIDTH
- warp_to 7, 3, ROUTE_16_GATE_1F_WIDTH
- warp_to 6, 12, ROUTE_16_GATE_1F_WIDTH ; ROUTE_16_GATE_2F
diff --git a/data/mapObjects/Route16Gate2F.asm b/data/mapObjects/Route16Gate2F.asm
deleted file mode 100755
index 5914f854..00000000
--- a/data/mapObjects/Route16Gate2F.asm
+++ /dev/null
@@ -1,16 +0,0 @@
-Route16Gate2F_Object:
- db $a ; border block
-
- db 1 ; warps
- warp 7, 7, 8, ROUTE_16_GATE_1F
-
- db 2 ; signs
- sign 1, 2, 3 ; Route16GateUpstairsText3
- sign 6, 2, 4 ; Route16GateUpstairsText4
-
- db 2 ; objects
- object SPRITE_YOUNG_BOY, 4, 2, STAY, NONE, 1 ; person
- object SPRITE_LITTLE_GIRL, 2, 5, WALK, 2, 2 ; person
-
- ; warp-to
- warp_to 7, 7, ROUTE_16_GATE_2F_WIDTH ; ROUTE_16_GATE_1F
diff --git a/data/mapObjects/Route17.asm b/data/mapObjects/Route17.asm
deleted file mode 100755
index f5bc4307..00000000
--- a/data/mapObjects/Route17.asm
+++ /dev/null
@@ -1,24 +0,0 @@
-Route17_Object:
- db $43 ; border block
-
- db 0 ; warps
-
- db 6 ; signs
- sign 9, 51, 11 ; Route17Text11
- sign 9, 63, 12 ; Route17Text12
- sign 9, 75, 13 ; Route17Text13
- sign 9, 87, 14 ; Route17Text14
- sign 9, 111, 15 ; Route17Text15
- sign 9, 141, 16 ; Route17Text16
-
- db 10 ; objects
- object SPRITE_BIKER, 12, 19, STAY, LEFT, 1, OPP_CUE_BALL, 4
- object SPRITE_BIKER, 11, 16, STAY, RIGHT, 2, OPP_CUE_BALL, 5
- object SPRITE_BIKER, 4, 18, STAY, UP, 3, OPP_BIKER, 8
- object SPRITE_BIKER, 7, 32, STAY, LEFT, 4, OPP_BIKER, 9
- object SPRITE_BIKER, 14, 34, STAY, RIGHT, 5, OPP_BIKER, 10
- object SPRITE_BIKER, 17, 58, STAY, LEFT, 6, OPP_CUE_BALL, 6
- object SPRITE_BIKER, 2, 68, STAY, RIGHT, 7, OPP_CUE_BALL, 7
- object SPRITE_BIKER, 14, 98, STAY, RIGHT, 8, OPP_CUE_BALL, 8
- object SPRITE_BIKER, 5, 98, STAY, LEFT, 9, OPP_BIKER, 11
- object SPRITE_BIKER, 10, 118, STAY, DOWN, 10, OPP_BIKER, 12
diff --git a/data/mapObjects/Route18.asm b/data/mapObjects/Route18.asm
deleted file mode 100755
index dc6cc6b6..00000000
--- a/data/mapObjects/Route18.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-Route18_Object:
- db $43 ; border block
-
- db 4 ; warps
- warp 33, 8, 0, ROUTE_18_GATE_1F
- warp 33, 9, 0, ROUTE_18_GATE_1F
- warp 40, 8, 2, ROUTE_18_GATE_1F
- warp 40, 9, 2, ROUTE_18_GATE_1F
-
- db 2 ; signs
- sign 43, 7, 4 ; Route18Text4
- sign 33, 5, 5 ; Route18Text5
-
- db 3 ; objects
- object SPRITE_BLACK_HAIR_BOY_1, 36, 11, STAY, RIGHT, 1, OPP_BIRD_KEEPER, 8
- object SPRITE_BLACK_HAIR_BOY_1, 40, 15, STAY, LEFT, 2, OPP_BIRD_KEEPER, 9
- object SPRITE_BLACK_HAIR_BOY_1, 42, 13, STAY, LEFT, 3, OPP_BIRD_KEEPER, 10
-
- ; warp-to
- warp_to 33, 8, ROUTE_18_WIDTH ; ROUTE_18_GATE_1F
- warp_to 33, 9, ROUTE_18_WIDTH ; ROUTE_18_GATE_1F
- warp_to 40, 8, ROUTE_18_WIDTH ; ROUTE_18_GATE_1F
- warp_to 40, 9, ROUTE_18_WIDTH ; ROUTE_18_GATE_1F
diff --git a/data/mapObjects/Route18Gate1F.asm b/data/mapObjects/Route18Gate1F.asm
deleted file mode 100755
index 83cb386a..00000000
--- a/data/mapObjects/Route18Gate1F.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-Route18Gate1F_Object:
- db $a ; border block
-
- db 5 ; warps
- warp 0, 4, 0, -1
- warp 0, 5, 1, -1
- warp 7, 4, 2, -1
- warp 7, 5, 3, -1
- warp 6, 8, 0, ROUTE_18_GATE_2F
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GUARD, 4, 1, STAY, DOWN, 1 ; person
-
- ; warp-to
- warp_to 0, 4, ROUTE_18_GATE_1F_WIDTH
- warp_to 0, 5, ROUTE_18_GATE_1F_WIDTH
- warp_to 7, 4, ROUTE_18_GATE_1F_WIDTH
- warp_to 7, 5, ROUTE_18_GATE_1F_WIDTH
- warp_to 6, 8, ROUTE_18_GATE_1F_WIDTH ; ROUTE_18_GATE_2F
diff --git a/data/mapObjects/Route18Gate2F.asm b/data/mapObjects/Route18Gate2F.asm
deleted file mode 100755
index 1981a7f0..00000000
--- a/data/mapObjects/Route18Gate2F.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-Route18Gate2F_Object:
- db $a ; border block
-
- db 1 ; warps
- warp 7, 7, 4, ROUTE_18_GATE_1F
-
- db 2 ; signs
- sign 1, 2, 2 ; Route18GateUpstairsText2
- sign 6, 2, 3 ; Route18GateUpstairsText3
-
- db 1 ; objects
- object SPRITE_COOK, 4, 2, WALK, 2, 1 ; person
-
- ; warp-to
- warp_to 7, 7, ROUTE_18_GATE_2F_WIDTH ; ROUTE_18_GATE_1F
diff --git a/data/mapObjects/Route19.asm b/data/mapObjects/Route19.asm
deleted file mode 100755
index d1b3034b..00000000
--- a/data/mapObjects/Route19.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-Route19_Object:
- db $43 ; border block
-
- db 1 ; warps
- warp 5, 9, 0, BEACH_HOUSE
-
- db 1 ; signs
- sign 11, 11, 11
-
- db 10 ; objects
- object SPRITE_BLACK_HAIR_BOY_1, 9, 7, STAY, RIGHT, 1, OPP_SWIMMER, 2
- object SPRITE_BLACK_HAIR_BOY_1, 12, 9, STAY, LEFT, 2, OPP_SWIMMER, 3
- object SPRITE_SWIMMER, 13, 25, STAY, LEFT, 3, OPP_SWIMMER, 4
- object SPRITE_SWIMMER, 4, 27, STAY, RIGHT, 4, OPP_SWIMMER, 5
- object SPRITE_SWIMMER, 16, 31, STAY, UP, 5, OPP_SWIMMER, 6
- object SPRITE_SWIMMER, 9, 13, STAY, DOWN, 6, OPP_SWIMMER, 7
- object SPRITE_SWIMMER, 8, 43, STAY, LEFT, 7, OPP_BEAUTY, 12
- object SPRITE_SWIMMER, 11, 43, STAY, RIGHT, 8, OPP_BEAUTY, 13
- object SPRITE_SWIMMER, 9, 42, STAY, UP, 9, OPP_SWIMMER, 8
- object SPRITE_SWIMMER, 10, 44, STAY, DOWN, 10, OPP_BEAUTY, 14
-
- ; warp-to
- warp_to 5, 9, ROUTE_19_WIDTH ; BEACH_HOUSE
diff --git a/data/mapObjects/Route2.asm b/data/mapObjects/Route2.asm
deleted file mode 100755
index 9595fec0..00000000
--- a/data/mapObjects/Route2.asm
+++ /dev/null
@@ -1,36 +0,0 @@
-Route2_Object:
- db $f ; border block
-
- db 7 ; warps
- warp 12, 9, 0, DIGLETTS_CAVE_ROUTE_2
- warp 3, 11, 1, VIRIDIAN_FOREST_NORTH_GATE
- warp 15, 19, 0, ROUTE_2_TRADE_HOUSE
- warp 16, 35, 1, ROUTE_2_GATE
- warp 15, 39, 2, ROUTE_2_GATE
- warp 3, 43, 2, VIRIDIAN_FOREST_SOUTH_GATE
- warp 17, 35, 1, ROUTE_2_GATE
-
- db 2 ; signs
- sign 5, 65, 3 ; Route2Text3
- sign 11, 11, 4 ; Route2Text4
-
- db 2 ; objects
- object SPRITE_BALL, 13, 54, STAY, NONE, 1, MOON_STONE
- object SPRITE_BALL, 13, 45, STAY, NONE, 2, HP_UP
-
- ; warp-to
- warp_to 12, 9, ROUTE_2_WIDTH ; DIGLETTS_CAVE_ROUTE_2
- warp_to 3, 11, ROUTE_2_WIDTH ; VIRIDIAN_FOREST_NORTH_GATE
- warp_to 15, 19, ROUTE_2_WIDTH ; ROUTE_2_TRADE_HOUSE
- warp_to 16, 35, ROUTE_2_WIDTH ; ROUTE_2_GATE
- warp_to 15, 39, ROUTE_2_WIDTH ; ROUTE_2_GATE
- warp_to 3, 43, ROUTE_2_WIDTH ; VIRIDIAN_FOREST_SOUTH_GATE
- warp_to 17, 35, ROUTE_2_WIDTH ; ROUTE_2_GATE
-
- ; unused
- warp_to 2, 7, 4
- dw $c712
- db $9, $7
- warp_to 2, 7, 4
- warp_to 2, 7, 4
- warp_to 2, 7, 4
diff --git a/data/mapObjects/Route20.asm b/data/mapObjects/Route20.asm
deleted file mode 100755
index 7bceef97..00000000
--- a/data/mapObjects/Route20.asm
+++ /dev/null
@@ -1,26 +0,0 @@
-Route20_Object:
- db $43 ; border block
-
- db 2 ; warps
- warp 48, 5, 0, SEAFOAM_ISLANDS_1F
- warp 58, 9, 2, SEAFOAM_ISLANDS_1F
-
- db 2 ; signs
- sign 51, 7, 11 ; Route20Text11
- sign 57, 11, 12 ; Route20Text12
-
- db 10 ; objects
- object SPRITE_SWIMMER, 87, 8, STAY, UP, 1, OPP_SWIMMER, 9
- object SPRITE_SWIMMER, 68, 11, STAY, UP, 2, OPP_BEAUTY, 15
- object SPRITE_SWIMMER, 45, 10, STAY, DOWN, 3, OPP_BEAUTY, 6
- object SPRITE_SWIMMER, 55, 14, STAY, RIGHT, 4, OPP_JR_TRAINER_F, 24
- object SPRITE_SWIMMER, 38, 13, STAY, DOWN, 5, OPP_SWIMMER, 10
- object SPRITE_SWIMMER, 87, 13, STAY, UP, 6, OPP_SWIMMER, 11
- object SPRITE_BLACK_HAIR_BOY_1, 34, 9, STAY, UP, 7, OPP_BIRD_KEEPER, 11
- object SPRITE_SWIMMER, 25, 7, STAY, UP, 8, OPP_BEAUTY, 7
- object SPRITE_SWIMMER, 24, 12, STAY, DOWN, 9, OPP_JR_TRAINER_F, 16
- object SPRITE_SWIMMER, 15, 8, STAY, UP, 10, OPP_BEAUTY, 8
-
- ; warp-to
- warp_to 48, 5, ROUTE_20_WIDTH ; SEAFOAM_ISLANDS_1F
- warp_to 58, 9, ROUTE_20_WIDTH ; SEAFOAM_ISLANDS_1F
diff --git a/data/mapObjects/Route21.asm b/data/mapObjects/Route21.asm
deleted file mode 100755
index b7759b59..00000000
--- a/data/mapObjects/Route21.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-Route21_Object:
- db $43 ; border block
-
- db 0 ; warps
-
- db 0 ; signs
-
- db 9 ; objects
- object SPRITE_FISHER2, 4, 24, STAY, LEFT, 1, OPP_FISHER, 7
- object SPRITE_FISHER2, 6, 25, STAY, DOWN, 2, OPP_FISHER, 9
- object SPRITE_SWIMMER, 10, 31, STAY, UP, 3, OPP_SWIMMER, 12
- object SPRITE_SWIMMER, 12, 30, STAY, RIGHT, 4, OPP_CUE_BALL, 9
- object SPRITE_SWIMMER, 16, 63, STAY, DOWN, 5, OPP_SWIMMER, 13
- object SPRITE_SWIMMER, 5, 71, STAY, RIGHT, 6, OPP_SWIMMER, 14
- object SPRITE_SWIMMER, 15, 71, STAY, LEFT, 7, OPP_SWIMMER, 15
- object SPRITE_FISHER2, 14, 56, STAY, LEFT, 8, OPP_FISHER, 8
- object SPRITE_FISHER2, 17, 57, STAY, RIGHT, 9, OPP_FISHER, 10
diff --git a/data/mapObjects/Route22.asm b/data/mapObjects/Route22.asm
deleted file mode 100755
index 56e759fd..00000000
--- a/data/mapObjects/Route22.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-Route22_Object:
- db $2c ; border block
-
- db 1 ; warps
- warp 8, 5, 0, ROUTE_22_GATE
-
- db 1 ; signs
- sign 7, 11, 3 ; Route22FrontGateText
-
- db 2 ; objects
- object SPRITE_BLUE, 25, 5, STAY, NONE, 1 ; person
- object SPRITE_BLUE, 25, 5, STAY, NONE, 2 ; person
-
- ; warp-to
- warp_to 8, 5, ROUTE_22_WIDTH ; ROUTE_22_GATE
diff --git a/data/mapObjects/Route22Gate.asm b/data/mapObjects/Route22Gate.asm
deleted file mode 100755
index e59ca6cf..00000000
--- a/data/mapObjects/Route22Gate.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-Route22Gate_Object:
- db $a ; border block
-
- db 4 ; warps
- warp 4, 7, 0, -1
- warp 5, 7, 0, -1
- warp 4, 0, 0, -1
- warp 5, 0, 0, -1
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GUARD, 6, 2, STAY, LEFT, 1 ; person
-
- ; warp-to
- warp_to 4, 7, ROUTE_22_GATE_WIDTH
- warp_to 5, 7, ROUTE_22_GATE_WIDTH
- warp_to 4, 0, ROUTE_22_GATE_WIDTH
- warp_to 5, 0, ROUTE_22_GATE_WIDTH
diff --git a/data/mapObjects/Route23.asm b/data/mapObjects/Route23.asm
deleted file mode 100755
index b510c285..00000000
--- a/data/mapObjects/Route23.asm
+++ /dev/null
@@ -1,26 +0,0 @@
-Route23_Object:
- db $f ; border block
-
- db 4 ; warps
- warp 7, 139, 2, ROUTE_22_GATE
- warp 8, 139, 3, ROUTE_22_GATE
- warp 4, 31, 0, VICTORY_ROAD_1F
- warp 14, 31, 1, VICTORY_ROAD_2F
-
- db 1 ; signs
- sign 3, 33, 8 ; Route23Text8
-
- db 7 ; objects
- object SPRITE_GUARD, 4, 35, STAY, DOWN, 1 ; person
- object SPRITE_GUARD, 10, 56, STAY, DOWN, 2 ; person
- object SPRITE_SWIMMER, 8, 85, STAY, DOWN, 3 ; person
- object SPRITE_SWIMMER, 11, 96, STAY, DOWN, 4 ; person
- object SPRITE_GUARD, 12, 105, STAY, DOWN, 5 ; person
- object SPRITE_GUARD, 8, 119, STAY, DOWN, 6 ; person
- object SPRITE_GUARD, 8, 136, STAY, DOWN, 7 ; person
-
- ; warp-to
- warp_to 7, 139, ROUTE_23_WIDTH ; ROUTE_22_GATE
- warp_to 8, 139, ROUTE_23_WIDTH ; ROUTE_22_GATE
- warp_to 4, 31, ROUTE_23_WIDTH ; VICTORY_ROAD_1F
- warp_to 14, 31, ROUTE_23_WIDTH ; VICTORY_ROAD_2F
diff --git a/data/mapObjects/Route24.asm b/data/mapObjects/Route24.asm
deleted file mode 100755
index 5f41c519..00000000
--- a/data/mapObjects/Route24.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-Route24_Object:
- db $2c ; border block
-
- db 0 ; warps
-
- db 0 ; signs
-
- db 9 ; objects
- object SPRITE_BLACK_HAIR_BOY_1, 11, 15, STAY, LEFT, 1, OPP_ROCKET, 6
- object SPRITE_BLACK_HAIR_BOY_1, 5, 20, STAY, UP, 2, OPP_JR_TRAINER_M, 2
- object SPRITE_BLACK_HAIR_BOY_1, 11, 19, STAY, LEFT, 3, OPP_JR_TRAINER_M, 3
- object SPRITE_LASS, 10, 22, STAY, RIGHT, 4, OPP_LASS, 7
- object SPRITE_BUG_CATCHER, 11, 25, STAY, LEFT, 5, OPP_YOUNGSTER, 4
- object SPRITE_LASS, 10, 28, STAY, RIGHT, 6, OPP_LASS, 8
- object SPRITE_BUG_CATCHER, 11, 31, STAY, LEFT, 7, OPP_BUG_CATCHER, 9
- object SPRITE_BALL, 10, 5, STAY, NONE, 8, TM_45
- object SPRITE_BLACK_HAIR_BOY_1, 6, 5, STAY, DOWN, 9
diff --git a/data/mapObjects/Route25.asm b/data/mapObjects/Route25.asm
deleted file mode 100755
index a85f85ca..00000000
--- a/data/mapObjects/Route25.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-Route25_Object:
- db $2c ; border block
-
- db 1 ; warps
- warp 45, 3, 0, BILLS_HOUSE
-
- db 1 ; signs
- sign 43, 3, 11 ; Route25Text11
-
- db 10 ; objects
- object SPRITE_BUG_CATCHER, 14, 2, STAY, DOWN, 1, OPP_YOUNGSTER, 5
- object SPRITE_BUG_CATCHER, 18, 5, STAY, UP, 2, OPP_YOUNGSTER, 6
- object SPRITE_BLACK_HAIR_BOY_1, 24, 4, STAY, DOWN, 3, OPP_JR_TRAINER_M, 2
- object SPRITE_LASS, 18, 8, STAY, RIGHT, 4, OPP_LASS, 9
- object SPRITE_BUG_CATCHER, 32, 3, STAY, LEFT, 5, OPP_YOUNGSTER, 7
- object SPRITE_LASS, 37, 4, STAY, DOWN, 6, OPP_LASS, 10
- object SPRITE_HIKER, 8, 4, STAY, RIGHT, 7, OPP_HIKER, 2
- object SPRITE_HIKER, 23, 9, STAY, UP, 8, OPP_HIKER, 3
- object SPRITE_HIKER, 13, 7, STAY, RIGHT, 9, OPP_HIKER, 4
- object SPRITE_BALL, 22, 2, STAY, NONE, 10, TM_19
-
- ; warp-to
- warp_to 45, 3, ROUTE_25_WIDTH ; BILLS_HOUSE
diff --git a/data/mapObjects/Route2Gate.asm b/data/mapObjects/Route2Gate.asm
deleted file mode 100755
index a7feb780..00000000
--- a/data/mapObjects/Route2Gate.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-Route2Gate_Object:
- db $a ; border block
-
- db 4 ; warps
- warp 4, 0, 3, -1
- warp 5, 0, 3, -1
- warp 4, 7, 4, -1
- warp 5, 7, 4, -1
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_OAK_AIDE, 1, 4, STAY, LEFT, 1 ; person
- object SPRITE_BUG_CATCHER, 5, 4, WALK, 2, 2 ; person
-
- ; warp-to
- warp_to 4, 0, ROUTE_2_GATE_WIDTH
- warp_to 5, 0, ROUTE_2_GATE_WIDTH
- warp_to 4, 7, ROUTE_2_GATE_WIDTH
- warp_to 5, 7, ROUTE_2_GATE_WIDTH
diff --git a/data/mapObjects/Route2TradeHouse.asm b/data/mapObjects/Route2TradeHouse.asm
deleted file mode 100755
index 29948d6b..00000000
--- a/data/mapObjects/Route2TradeHouse.asm
+++ /dev/null
@@ -1,16 +0,0 @@
-Route2TradeHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 2, -1
- warp 3, 7, 2, -1
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_OAK_AIDE, 2, 4, STAY, RIGHT, 1 ; person
- object SPRITE_GAMEBOY_KID, 4, 1, STAY, DOWN, 2 ; person
-
- ; warp-to
- warp_to 2, 7, ROUTE_2_TRADE_HOUSE_WIDTH
- warp_to 3, 7, ROUTE_2_TRADE_HOUSE_WIDTH
diff --git a/data/mapObjects/Route3.asm b/data/mapObjects/Route3.asm
deleted file mode 100755
index 372ea6cf..00000000
--- a/data/mapObjects/Route3.asm
+++ /dev/null
@@ -1,18 +0,0 @@
-Route3_Object:
- db $2c ; border block
-
- db 0 ; warps
-
- db 1 ; signs
- sign 59, 9, 10 ; Route3Text10
-
- db 9 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, 57, 11, STAY, NONE, 1 ; person
- object SPRITE_BUG_CATCHER, 10, 6, STAY, RIGHT, 2, OPP_BUG_CATCHER, 4
- object SPRITE_BUG_CATCHER, 14, 4, STAY, DOWN, 3, OPP_YOUNGSTER, 1
- object SPRITE_LASS, 16, 9, STAY, LEFT, 4, OPP_LASS, 1
- object SPRITE_BUG_CATCHER, 19, 5, STAY, DOWN, 5, OPP_BUG_CATCHER, 5
- object SPRITE_LASS, 23, 4, STAY, LEFT, 6, OPP_LASS, 2
- object SPRITE_BUG_CATCHER, 22, 9, STAY, LEFT, 7, OPP_YOUNGSTER, 2
- object SPRITE_BUG_CATCHER, 24, 6, STAY, RIGHT, 8, OPP_BUG_CATCHER, 6
- object SPRITE_LASS, 33, 10, STAY, UP, 9, OPP_LASS, 3
diff --git a/data/mapObjects/Route4.asm b/data/mapObjects/Route4.asm
deleted file mode 100755
index 4ab88f8f..00000000
--- a/data/mapObjects/Route4.asm
+++ /dev/null
@@ -1,22 +0,0 @@
-Route4_Object:
- db $2c ; border block
-
- db 3 ; warps
- warp 11, 5, 0, MT_MOON_POKECENTER
- warp 18, 5, 0, MT_MOON_1F
- warp 24, 5, 7, MT_MOON_B1F
-
- db 3 ; signs
- sign 12, 5, 4 ; PokeCenterSignText
- sign 17, 7, 5 ; Route4Text5
- sign 27, 7, 6 ; Route4Text6
-
- db 3 ; objects
- object SPRITE_LASS, 9, 8, WALK, 0, 1 ; person
- object SPRITE_LASS, 63, 3, STAY, RIGHT, 2, OPP_LASS, 4
- object SPRITE_BALL, 57, 3, STAY, NONE, 3, TM_04
-
- ; warp-to
- warp_to 11, 5, ROUTE_4_WIDTH ; MT_MOON_POKECENTER
- warp_to 18, 5, ROUTE_4_WIDTH ; MT_MOON_1F
- warp_to 24, 5, ROUTE_4_WIDTH ; MT_MOON_B1F
diff --git a/data/mapObjects/Route5.asm b/data/mapObjects/Route5.asm
deleted file mode 100755
index fd74edf6..00000000
--- a/data/mapObjects/Route5.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-Route5_Object:
- db $a ; border block
-
- db 5 ; warps
- warp 10, 29, 2, ROUTE_5_GATE
- warp 9, 29, 2, ROUTE_5_GATE
- warp 10, 33, 0, ROUTE_5_GATE
- warp 17, 27, 0, UNDERGROUND_PATH_ROUTE_5
- warp 10, 21, 0, DAYCARE
-
- db 1 ; signs
- sign 17, 29, 1 ; Route5Text1
-
- db 0 ; objects
-
- ; warp-to
- warp_to 10, 29, ROUTE_5_WIDTH ; ROUTE_5_GATE
- warp_to 9, 29, ROUTE_5_WIDTH ; ROUTE_5_GATE
- warp_to 10, 33, ROUTE_5_WIDTH ; ROUTE_5_GATE
- warp_to 17, 27, ROUTE_5_WIDTH ; UNDERGROUND_PATH_ROUTE_5
- warp_to 10, 21, ROUTE_5_WIDTH ; DAYCARE
diff --git a/data/mapObjects/Route5Gate.asm b/data/mapObjects/Route5Gate.asm
deleted file mode 100755
index e0e06a1d..00000000
--- a/data/mapObjects/Route5Gate.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-Route5Gate_Object:
- db $a ; border block
-
- db 4 ; warps
- warp 3, 5, 2, -1
- warp 4, 5, 2, -1
- warp 3, 0, 1, -1
- warp 4, 0, 0, -1
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GUARD, 1, 3, STAY, RIGHT, 1 ; person
-
- ; warp-to
- warp_to 3, 5, ROUTE_5_GATE_WIDTH
- warp_to 4, 5, ROUTE_5_GATE_WIDTH
- warp_to 3, 0, ROUTE_5_GATE_WIDTH
- warp_to 4, 0, ROUTE_5_GATE_WIDTH
diff --git a/data/mapObjects/Route6.asm b/data/mapObjects/Route6.asm
deleted file mode 100755
index 13825be1..00000000
--- a/data/mapObjects/Route6.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-Route6_Object:
- db $f ; border block
-
- db 4 ; warps
- warp 9, 1, 2, ROUTE_6_GATE
- warp 10, 1, 2, ROUTE_6_GATE
- warp 10, 7, 0, ROUTE_6_GATE
- warp 17, 13, 0, UNDERGROUND_PATH_ROUTE_6
-
- db 1 ; signs
- sign 19, 15, 7 ; Route6Text7
-
- db 6 ; objects
- object SPRITE_BLACK_HAIR_BOY_1, 10, 21, STAY, RIGHT, 1, OPP_JR_TRAINER_M, 10
- object SPRITE_LASS, 11, 21, STAY, LEFT, 2, OPP_JR_TRAINER_F, 25
- object SPRITE_BUG_CATCHER, 0, 15, STAY, RIGHT, 3, OPP_BUG_CATCHER, 10
- object SPRITE_BLACK_HAIR_BOY_1, 11, 31, STAY, LEFT, 4, OPP_JR_TRAINER_M, 5
- object SPRITE_LASS, 11, 30, STAY, LEFT, 5, OPP_JR_TRAINER_F, 3
- object SPRITE_BUG_CATCHER, 19, 26, STAY, LEFT, 6, OPP_BUG_CATCHER, 11
-
- ; warp-to
- warp_to 9, 1, ROUTE_6_WIDTH ; ROUTE_6_GATE
- warp_to 10, 1, ROUTE_6_WIDTH ; ROUTE_6_GATE
- warp_to 10, 7, ROUTE_6_WIDTH ; ROUTE_6_GATE
- warp_to 17, 13, ROUTE_6_WIDTH ; UNDERGROUND_PATH_ROUTE_6
diff --git a/data/mapObjects/Route6Gate.asm b/data/mapObjects/Route6Gate.asm
deleted file mode 100755
index 8ed96d04..00000000
--- a/data/mapObjects/Route6Gate.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-Route6Gate_Object:
- db $a ; border block
-
- db 4 ; warps
- warp 3, 5, 2, -1
- warp 4, 5, 2, -1
- warp 3, 0, 1, -1
- warp 4, 0, 1, -1
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GUARD, 6, 2, STAY, LEFT, 1 ; person
-
- ; warp-to
- warp_to 3, 5, ROUTE_6_GATE_WIDTH
- warp_to 4, 5, ROUTE_6_GATE_WIDTH
- warp_to 3, 0, ROUTE_6_GATE_WIDTH
- warp_to 4, 0, ROUTE_6_GATE_WIDTH
diff --git a/data/mapObjects/Route7.asm b/data/mapObjects/Route7.asm
deleted file mode 100755
index 3da2fd4b..00000000
--- a/data/mapObjects/Route7.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-Route7_Object:
- db $f ; border block
-
- db 5 ; warps
- warp 18, 9, 2, ROUTE_7_GATE
- warp 18, 10, 2, ROUTE_7_GATE
- warp 11, 9, 0, ROUTE_7_GATE
- warp 11, 10, 0, ROUTE_7_GATE
- warp 5, 13, 0, UNDERGROUND_PATH_ROUTE_7
-
- db 1 ; signs
- sign 3, 13, 1 ; Route7Text1
-
- db 0 ; objects
-
- ; warp-to
- warp_to 18, 9, ROUTE_7_WIDTH ; ROUTE_7_GATE
- warp_to 18, 10, ROUTE_7_WIDTH ; ROUTE_7_GATE
- warp_to 11, 9, ROUTE_7_WIDTH ; ROUTE_7_GATE
- warp_to 11, 10, ROUTE_7_WIDTH ; ROUTE_7_GATE
- warp_to 5, 13, ROUTE_7_WIDTH ; UNDERGROUND_PATH_ROUTE_7
diff --git a/data/mapObjects/Route7Gate.asm b/data/mapObjects/Route7Gate.asm
deleted file mode 100755
index c9dc8dca..00000000
--- a/data/mapObjects/Route7Gate.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-Route7Gate_Object:
- db $a ; border block
-
- db 4 ; warps
- warp 0, 3, 3, -1
- warp 0, 4, 3, -1
- warp 5, 3, 1, -1
- warp 5, 4, 1, -1
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GUARD, 3, 1, STAY, DOWN, 1 ; person
-
- ; warp-to
- warp_to 0, 3, ROUTE_7_GATE_WIDTH
- warp_to 0, 4, ROUTE_7_GATE_WIDTH
- warp_to 5, 3, ROUTE_7_GATE_WIDTH
- warp_to 5, 4, ROUTE_7_GATE_WIDTH
diff --git a/data/mapObjects/Route8.asm b/data/mapObjects/Route8.asm
deleted file mode 100755
index 2fc0045c..00000000
--- a/data/mapObjects/Route8.asm
+++ /dev/null
@@ -1,30 +0,0 @@
-Route8_Object:
- db $2c ; border block
-
- db 5 ; warps
- warp 1, 9, 0, ROUTE_8_GATE
- warp 1, 10, 0, ROUTE_8_GATE
- warp 8, 9, 2, ROUTE_8_GATE
- warp 8, 10, 2, ROUTE_8_GATE
- warp 13, 3, 0, UNDERGROUND_PATH_ROUTE_8
-
- db 1 ; signs
- sign 17, 3, 10 ; Route8Text10
-
- db 9 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, 8, 5, STAY, RIGHT, 1, OPP_SUPER_NERD, 3
- object SPRITE_GAMBLER, 13, 9, STAY, UP, 2, OPP_GAMBLER, 5
- object SPRITE_BLACK_HAIR_BOY_2, 42, 6, STAY, UP, 3, OPP_SUPER_NERD, 4
- object SPRITE_LASS, 26, 3, STAY, LEFT, 4, OPP_LASS, 13
- object SPRITE_BLACK_HAIR_BOY_2, 26, 4, STAY, RIGHT, 5, OPP_SUPER_NERD, 5
- object SPRITE_LASS, 26, 5, STAY, LEFT, 6, OPP_LASS, 14
- object SPRITE_LASS, 26, 6, STAY, RIGHT, 7, OPP_LASS, 15
- object SPRITE_GAMBLER, 46, 13, STAY, DOWN, 8, OPP_GAMBLER, 7
- object SPRITE_LASS, 51, 12, STAY, LEFT, 9, OPP_LASS, 16
-
- ; warp-to
- warp_to 1, 9, ROUTE_8_WIDTH ; ROUTE_8_GATE
- warp_to 1, 10, ROUTE_8_WIDTH ; ROUTE_8_GATE
- warp_to 8, 9, ROUTE_8_WIDTH ; ROUTE_8_GATE
- warp_to 8, 10, ROUTE_8_WIDTH ; ROUTE_8_GATE
- warp_to 13, 3, ROUTE_8_WIDTH ; UNDERGROUND_PATH_ROUTE_8
diff --git a/data/mapObjects/Route8Gate.asm b/data/mapObjects/Route8Gate.asm
deleted file mode 100755
index 008a0fcb..00000000
--- a/data/mapObjects/Route8Gate.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-Route8Gate_Object:
- db $a ; border block
-
- db 4 ; warps
- warp 0, 3, 1, -1
- warp 0, 4, 1, -1
- warp 5, 3, 3, -1
- warp 5, 4, 3, -1
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GUARD, 2, 1, STAY, DOWN, 1 ; person
-
- ; warp-to
- warp_to 0, 3, ROUTE_8_GATE_WIDTH
- warp_to 0, 4, ROUTE_8_GATE_WIDTH
- warp_to 5, 3, ROUTE_8_GATE_WIDTH
- warp_to 5, 4, ROUTE_8_GATE_WIDTH
diff --git a/data/mapObjects/Route9.asm b/data/mapObjects/Route9.asm
deleted file mode 100755
index c531cf7a..00000000
--- a/data/mapObjects/Route9.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-Route9_Object:
- db $2c ; border block
-
- db 0 ; warps
-
- db 1 ; signs
- sign 25, 7, 11 ; Route9Text11
-
- db 10 ; objects
- object SPRITE_LASS, 13, 10, STAY, LEFT, 1, OPP_JR_TRAINER_F, 5
- object SPRITE_BLACK_HAIR_BOY_1, 24, 7, STAY, LEFT, 2, OPP_YOUNGSTER, 14
- object SPRITE_BLACK_HAIR_BOY_1, 31, 7, STAY, RIGHT, 3, OPP_JR_TRAINER_M, 8
- object SPRITE_LASS, 48, 8, STAY, RIGHT, 4, OPP_JR_TRAINER_F, 6
- object SPRITE_HIKER, 16, 15, STAY, LEFT, 5, OPP_HIKER, 11
- object SPRITE_HIKER, 43, 3, STAY, LEFT, 6, OPP_HIKER, 6
- object SPRITE_BUG_CATCHER, 22, 2, STAY, DOWN, 7, OPP_BUG_CATCHER, 13
- object SPRITE_HIKER, 45, 15, STAY, RIGHT, 8, OPP_HIKER, 5
- object SPRITE_BUG_CATCHER, 40, 8, STAY, RIGHT, 9, OPP_BUG_CATCHER, 14
- object SPRITE_BALL, 10, 15, STAY, NONE, 10, TM_30
diff --git a/data/mapObjects/SSAnne1F.asm b/data/mapObjects/SSAnne1F.asm
deleted file mode 100755
index 3e454f06..00000000
--- a/data/mapObjects/SSAnne1F.asm
+++ /dev/null
@@ -1,34 +0,0 @@
-SSAnne1F_Object:
- db $c ; border block
-
- db 11 ; warps
- warp 26, 0, 1, VERMILION_DOCK
- warp 27, 0, 1, VERMILION_DOCK
- warp 31, 8, 0, SS_ANNE_1F_ROOMS
- warp 23, 8, 1, SS_ANNE_1F_ROOMS
- warp 19, 8, 2, SS_ANNE_1F_ROOMS
- warp 15, 8, 3, SS_ANNE_1F_ROOMS
- warp 11, 8, 4, SS_ANNE_1F_ROOMS
- warp 7, 8, 5, SS_ANNE_1F_ROOMS
- warp 2, 6, 6, SS_ANNE_2F
- warp 37, 15, 5, SS_ANNE_B1F
- warp 3, 16, 0, SS_ANNE_KITCHEN
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_WAITER, 12, 6, WALK, 2, 1 ; person
- object SPRITE_SAILOR, 27, 5, STAY, NONE, 2 ; person
-
- ; warp-to
- warp_to 26, 0, SS_ANNE_1F_WIDTH ; VERMILION_DOCK
- warp_to 27, 0, SS_ANNE_1F_WIDTH ; VERMILION_DOCK
- warp_to 31, 8, SS_ANNE_1F_WIDTH ; SS_ANNE_1F_ROOMS
- warp_to 23, 8, SS_ANNE_1F_WIDTH ; SS_ANNE_1F_ROOMS
- warp_to 19, 8, SS_ANNE_1F_WIDTH ; SS_ANNE_1F_ROOMS
- warp_to 15, 8, SS_ANNE_1F_WIDTH ; SS_ANNE_1F_ROOMS
- warp_to 11, 8, SS_ANNE_1F_WIDTH ; SS_ANNE_1F_ROOMS
- warp_to 7, 8, SS_ANNE_1F_WIDTH ; SS_ANNE_1F_ROOMS
- warp_to 2, 6, SS_ANNE_1F_WIDTH ; SS_ANNE_2F
- warp_to 37, 15, SS_ANNE_1F_WIDTH ; SS_ANNE_B1F
- warp_to 3, 16, SS_ANNE_1F_WIDTH ; SS_ANNE_KITCHEN
diff --git a/data/mapObjects/SSAnne1FRooms.asm b/data/mapObjects/SSAnne1FRooms.asm
deleted file mode 100755
index fcd36532..00000000
--- a/data/mapObjects/SSAnne1FRooms.asm
+++ /dev/null
@@ -1,33 +0,0 @@
-SSAnne1FRooms_Object:
- db $c ; border block
-
- db 6 ; warps
- warp 0, 0, 2, SS_ANNE_1F
- warp 10, 0, 3, SS_ANNE_1F
- warp 20, 0, 4, SS_ANNE_1F
- warp 0, 10, 5, SS_ANNE_1F
- warp 10, 10, 6, SS_ANNE_1F
- warp 20, 10, 7, SS_ANNE_1F
-
- db 0 ; signs
-
- db 11 ; objects
- object SPRITE_GENTLEMAN, 2, 3, STAY, LEFT, 1, OPP_GENTLEMAN, 1
- object SPRITE_GENTLEMAN, 11, 4, STAY, UP, 2, OPP_GENTLEMAN, 2
- object SPRITE_BUG_CATCHER, 11, 14, STAY, UP, 3, OPP_YOUNGSTER, 8
- object SPRITE_LASS, 13, 11, STAY, LEFT, 4, OPP_LASS, 11
- object SPRITE_GIRL, 22, 3, WALK, 1, 5 ; person
- object SPRITE_FAT_BALD_GUY, 0, 14, STAY, NONE, 6 ; person
- object SPRITE_LITTLE_GIRL, 2, 11, STAY, DOWN, 7 ; person
- object SPRITE_JIGGLYPUFF, 3, 11, STAY, DOWN, 8 ; person
- object SPRITE_GIRL, 10, 13, STAY, RIGHT, 9 ; person
- object SPRITE_BALL, 12, 15, STAY, NONE, 10, TM_08
- object SPRITE_GENTLEMAN, 21, 13, WALK, 2, 11 ; person
-
- ; warp-to
- warp_to 0, 0, SS_ANNE_1F_ROOMS_WIDTH ; SS_ANNE_1F
- warp_to 10, 0, SS_ANNE_1F_ROOMS_WIDTH ; SS_ANNE_1F
- warp_to 20, 0, SS_ANNE_1F_ROOMS_WIDTH ; SS_ANNE_1F
- warp_to 0, 10, SS_ANNE_1F_ROOMS_WIDTH ; SS_ANNE_1F
- warp_to 10, 10, SS_ANNE_1F_ROOMS_WIDTH ; SS_ANNE_1F
- warp_to 20, 10, SS_ANNE_1F_ROOMS_WIDTH ; SS_ANNE_1F
diff --git a/data/mapObjects/SSAnne2F.asm b/data/mapObjects/SSAnne2F.asm
deleted file mode 100755
index 6abd5ac4..00000000
--- a/data/mapObjects/SSAnne2F.asm
+++ /dev/null
@@ -1,30 +0,0 @@
-SSAnne2F_Object:
- db $c ; border block
-
- db 9 ; warps
- warp 9, 11, 0, SS_ANNE_2F_ROOMS
- warp 13, 11, 2, SS_ANNE_2F_ROOMS
- warp 17, 11, 4, SS_ANNE_2F_ROOMS
- warp 21, 11, 6, SS_ANNE_2F_ROOMS
- warp 25, 11, 8, SS_ANNE_2F_ROOMS
- warp 29, 11, 10, SS_ANNE_2F_ROOMS
- warp 2, 4, 8, SS_ANNE_1F
- warp 2, 12, 1, SS_ANNE_3F
- warp 36, 4, 0, SS_ANNE_CAPTAINS_ROOM
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_WAITER, 3, 7, WALK, 1, 1 ; person
- object SPRITE_BLUE, 36, 4, STAY, DOWN, 2, OPP_SONY1, 1
-
- ; warp-to
- warp_to 9, 11, SS_ANNE_2F_WIDTH ; SS_ANNE_2F_ROOMS
- warp_to 13, 11, SS_ANNE_2F_WIDTH ; SS_ANNE_2F_ROOMS
- warp_to 17, 11, SS_ANNE_2F_WIDTH ; SS_ANNE_2F_ROOMS
- warp_to 21, 11, SS_ANNE_2F_WIDTH ; SS_ANNE_2F_ROOMS
- warp_to 25, 11, SS_ANNE_2F_WIDTH ; SS_ANNE_2F_ROOMS
- warp_to 29, 11, SS_ANNE_2F_WIDTH ; SS_ANNE_2F_ROOMS
- warp_to 2, 4, SS_ANNE_2F_WIDTH ; SS_ANNE_1F
- warp_to 2, 12, SS_ANNE_2F_WIDTH ; SS_ANNE_3F
- warp_to 36, 4, SS_ANNE_2F_WIDTH ; SS_ANNE_CAPTAINS_ROOM
diff --git a/data/mapObjects/SSAnne2FRooms.asm b/data/mapObjects/SSAnne2FRooms.asm
deleted file mode 100755
index ebb053a8..00000000
--- a/data/mapObjects/SSAnne2FRooms.asm
+++ /dev/null
@@ -1,47 +0,0 @@
-SSAnne2FRooms_Object:
- db $c ; border block
-
- db 12 ; warps
- warp 2, 5, 0, SS_ANNE_2F
- warp 3, 5, 0, SS_ANNE_2F
- warp 12, 5, 1, SS_ANNE_2F
- warp 13, 5, 1, SS_ANNE_2F
- warp 22, 5, 2, SS_ANNE_2F
- warp 23, 5, 2, SS_ANNE_2F
- warp 2, 15, 3, SS_ANNE_2F
- warp 3, 15, 3, SS_ANNE_2F
- warp 12, 15, 4, SS_ANNE_2F
- warp 13, 15, 4, SS_ANNE_2F
- warp 22, 15, 5, SS_ANNE_2F
- warp 23, 15, 5, SS_ANNE_2F
-
- db 0 ; signs
-
- db 13 ; objects
- object SPRITE_GENTLEMAN, 10, 2, STAY, RIGHT, 1, OPP_GENTLEMAN, 3
- object SPRITE_FISHER2, 13, 4, STAY, LEFT, 2, OPP_FISHER, 1
- object SPRITE_GENTLEMAN, 0, 14, STAY, RIGHT, 3, OPP_GENTLEMAN, 5
- object SPRITE_LASS, 2, 11, STAY, DOWN, 4, OPP_LASS, 12
- object SPRITE_GENTLEMAN, 1, 2, STAY, DOWN, 5 ; person
- object SPRITE_BALL, 12, 1, STAY, NONE, 6, MAX_ETHER
- object SPRITE_GENTLEMAN, 21, 2, STAY, DOWN, 7 ; person
- object SPRITE_OLD_PERSON, 22, 1, STAY, DOWN, 8 ; person
- object SPRITE_BALL, 0, 12, STAY, NONE, 9, RARE_CANDY
- object SPRITE_GENTLEMAN, 12, 12, STAY, DOWN, 10 ; person
- object SPRITE_YOUNG_BOY, 11, 14, STAY, NONE, 11 ; person
- object SPRITE_BRUNETTE_GIRL, 22, 12, STAY, LEFT, 12 ; person
- object SPRITE_FOULARD_WOMAN, 20, 12, STAY, RIGHT, 13 ; person
-
- ; warp-to
- warp_to 2, 5, SS_ANNE_2F_ROOMS_WIDTH ; SS_ANNE_2F
- warp_to 3, 5, SS_ANNE_2F_ROOMS_WIDTH ; SS_ANNE_2F
- warp_to 12, 5, SS_ANNE_2F_ROOMS_WIDTH ; SS_ANNE_2F
- warp_to 13, 5, SS_ANNE_2F_ROOMS_WIDTH ; SS_ANNE_2F
- warp_to 22, 5, SS_ANNE_2F_ROOMS_WIDTH ; SS_ANNE_2F
- warp_to 23, 5, SS_ANNE_2F_ROOMS_WIDTH ; SS_ANNE_2F
- warp_to 2, 15, SS_ANNE_2F_ROOMS_WIDTH ; SS_ANNE_2F
- warp_to 3, 15, SS_ANNE_2F_ROOMS_WIDTH ; SS_ANNE_2F
- warp_to 12, 15, SS_ANNE_2F_ROOMS_WIDTH ; SS_ANNE_2F
- warp_to 13, 15, SS_ANNE_2F_ROOMS_WIDTH ; SS_ANNE_2F
- warp_to 22, 15, SS_ANNE_2F_ROOMS_WIDTH ; SS_ANNE_2F
- warp_to 23, 15, SS_ANNE_2F_ROOMS_WIDTH ; SS_ANNE_2F
diff --git a/data/mapObjects/SSAnne3F.asm b/data/mapObjects/SSAnne3F.asm
deleted file mode 100755
index f0bfc17b..00000000
--- a/data/mapObjects/SSAnne3F.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-SSAnne3F_Object:
- db $c ; border block
-
- db 2 ; warps
- warp 0, 3, 0, SS_ANNE_BOW
- warp 19, 3, 7, SS_ANNE_2F
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_SAILOR, 9, 3, WALK, 2, 1 ; person
-
- ; warp-to
- warp_to 0, 3, SS_ANNE_3F_WIDTH ; SS_ANNE_BOW
- warp_to 19, 3, SS_ANNE_3F_WIDTH ; SS_ANNE_2F
diff --git a/data/mapObjects/SSAnneB1F.asm b/data/mapObjects/SSAnneB1F.asm
deleted file mode 100755
index fe54ea24..00000000
--- a/data/mapObjects/SSAnneB1F.asm
+++ /dev/null
@@ -1,22 +0,0 @@
-SSAnneB1F_Object:
- db $c ; border block
-
- db 6 ; warps
- warp 23, 3, 8, SS_ANNE_B1F_ROOMS
- warp 19, 3, 6, SS_ANNE_B1F_ROOMS
- warp 15, 3, 4, SS_ANNE_B1F_ROOMS
- warp 11, 3, 2, SS_ANNE_B1F_ROOMS
- warp 7, 3, 0, SS_ANNE_B1F_ROOMS
- warp 27, 5, 9, SS_ANNE_1F
-
- db 0 ; signs
-
- db 0 ; objects
-
- ; warp-to
- warp_to 23, 3, SS_ANNE_B1F_WIDTH ; SS_ANNE_B1F_ROOMS
- warp_to 19, 3, SS_ANNE_B1F_WIDTH ; SS_ANNE_B1F_ROOMS
- warp_to 15, 3, SS_ANNE_B1F_WIDTH ; SS_ANNE_B1F_ROOMS
- warp_to 11, 3, SS_ANNE_B1F_WIDTH ; SS_ANNE_B1F_ROOMS
- warp_to 7, 3, SS_ANNE_B1F_WIDTH ; SS_ANNE_B1F_ROOMS
- warp_to 27, 5, SS_ANNE_B1F_WIDTH ; SS_ANNE_1F
diff --git a/data/mapObjects/SSAnneB1FRooms.asm b/data/mapObjects/SSAnneB1FRooms.asm
deleted file mode 100755
index 1d31b89c..00000000
--- a/data/mapObjects/SSAnneB1FRooms.asm
+++ /dev/null
@@ -1,41 +0,0 @@
-SSAnneB1FRooms_Object:
- db $c ; border block
-
- db 10 ; warps
- warp 2, 5, 4, SS_ANNE_B1F
- warp 3, 5, 4, SS_ANNE_B1F
- warp 12, 5, 3, SS_ANNE_B1F
- warp 13, 5, 3, SS_ANNE_B1F
- warp 22, 5, 2, SS_ANNE_B1F
- warp 23, 5, 2, SS_ANNE_B1F
- warp 2, 15, 1, SS_ANNE_B1F
- warp 3, 15, 1, SS_ANNE_B1F
- warp 12, 15, 0, SS_ANNE_B1F
- warp 13, 15, 0, SS_ANNE_B1F
-
- db 0 ; signs
-
- db 11 ; objects
- object SPRITE_SAILOR, 0, 13, STAY, DOWN, 1, OPP_SAILOR, 3
- object SPRITE_SAILOR, 2, 11, STAY, DOWN, 2, OPP_SAILOR, 4
- object SPRITE_SAILOR, 12, 3, STAY, LEFT, 3, OPP_SAILOR, 5
- object SPRITE_SAILOR, 22, 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, 10, 13, STAY, RIGHT, 7 ; person
- object SPRITE_SLOWBRO, 11, 12, STAY, NONE, 8 ; person
- object SPRITE_BALL, 20, 2, STAY, NONE, 9, ETHER
- object SPRITE_BALL, 10, 2, STAY, NONE, 10, TM_44
- object SPRITE_BALL, 12, 11, STAY, NONE, 11, MAX_POTION
-
- ; warp-to
- warp_to 2, 5, SS_ANNE_B1F_ROOMS_WIDTH ; SS_ANNE_B1F
- warp_to 3, 5, SS_ANNE_B1F_ROOMS_WIDTH ; SS_ANNE_B1F
- warp_to 12, 5, SS_ANNE_B1F_ROOMS_WIDTH ; SS_ANNE_B1F
- warp_to 13, 5, SS_ANNE_B1F_ROOMS_WIDTH ; SS_ANNE_B1F
- warp_to 22, 5, SS_ANNE_B1F_ROOMS_WIDTH ; SS_ANNE_B1F
- warp_to 23, 5, SS_ANNE_B1F_ROOMS_WIDTH ; SS_ANNE_B1F
- warp_to 2, 15, SS_ANNE_B1F_ROOMS_WIDTH ; SS_ANNE_B1F
- warp_to 3, 15, SS_ANNE_B1F_ROOMS_WIDTH ; SS_ANNE_B1F
- warp_to 12, 15, SS_ANNE_B1F_ROOMS_WIDTH ; SS_ANNE_B1F
- warp_to 13, 15, SS_ANNE_B1F_ROOMS_WIDTH ; SS_ANNE_B1F
diff --git a/data/mapObjects/SSAnneBow.asm b/data/mapObjects/SSAnneBow.asm
deleted file mode 100755
index 8873c8f8..00000000
--- a/data/mapObjects/SSAnneBow.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-SSAnneBow_Object:
- db $23 ; border block
-
- db 2 ; warps
- warp 13, 6, 0, SS_ANNE_3F
- warp 13, 7, 0, SS_ANNE_3F
-
- db 0 ; signs
-
- db 5 ; objects
- 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, 11, STAY, NONE, 3 ; person
- object SPRITE_SAILOR, 4, 4, STAY, DOWN, 4, OPP_SAILOR, 1
- object SPRITE_SAILOR, 10, 8, STAY, UP, 5, OPP_SAILOR, 2
-
- ; warp-to
- warp_to 13, 6, SS_ANNE_BOW_WIDTH ; SS_ANNE_3F
- warp_to 13, 7, SS_ANNE_BOW_WIDTH ; SS_ANNE_3F
diff --git a/data/mapObjects/SSAnneCaptainsRoom.asm b/data/mapObjects/SSAnneCaptainsRoom.asm
deleted file mode 100755
index 545656cc..00000000
--- a/data/mapObjects/SSAnneCaptainsRoom.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-SSAnneCaptainsRoom_Object:
- db $c ; border block
-
- db 1 ; warps
- warp 0, 7, 8, SS_ANNE_2F
-
- db 2 ; signs
- sign 4, 1, 2 ; SSAnne7Text2
- sign 1, 2, 3 ; SSAnne7Text3
-
- db 1 ; objects
- object SPRITE_SS_CAPTAIN, 4, 2, STAY, UP, 1 ; person
-
- ; warp-to
- warp_to 0, 7, SS_ANNE_CAPTAINS_ROOM_WIDTH ; SS_ANNE_2F
diff --git a/data/mapObjects/SSAnneKitchen.asm b/data/mapObjects/SSAnneKitchen.asm
deleted file mode 100755
index b5771e68..00000000
--- a/data/mapObjects/SSAnneKitchen.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-SSAnneKitchen_Object:
- db $c ; border block
-
- db 1 ; warps
- warp 6, 0, 10, SS_ANNE_1F
-
- db 0 ; signs
-
- db 7 ; objects
- object SPRITE_COOK, 1, 8, WALK, 1, 1 ; person
- object SPRITE_COOK, 5, 8, WALK, 1, 2 ; person
- object SPRITE_COOK, 9, 7, WALK, 1, 3 ; person
- object SPRITE_COOK, 13, 6, STAY, NONE, 4 ; person
- object SPRITE_COOK, 13, 8, STAY, NONE, 5 ; person
- object SPRITE_COOK, 13, 10, STAY, NONE, 6 ; person
- object SPRITE_COOK, 11, 13, STAY, UP, 7 ; person
-
- ; warp-to
- warp_to 6, 0, SS_ANNE_KITCHEN_WIDTH ; SS_ANNE_1F
diff --git a/data/mapObjects/SafariZoneCenter.asm b/data/mapObjects/SafariZoneCenter.asm
deleted file mode 100755
index e54cec74..00000000
--- a/data/mapObjects/SafariZoneCenter.asm
+++ /dev/null
@@ -1,31 +0,0 @@
-SafariZoneCenter_Object:
- db $0 ; border block
-
- db 9 ; warps
- warp 14, 25, 2, SAFARI_ZONE_GATE
- warp 15, 25, 3, SAFARI_ZONE_GATE
- warp 0, 10, 4, SAFARI_ZONE_WEST
- warp 0, 11, 5, SAFARI_ZONE_WEST
- warp 14, 0, 4, SAFARI_ZONE_NORTH
- warp 15, 0, 5, SAFARI_ZONE_NORTH
- warp 29, 10, 2, SAFARI_ZONE_EAST
- warp 29, 11, 3, SAFARI_ZONE_EAST
- warp 17, 19, 0, SAFARI_ZONE_CENTER_REST_HOUSE
-
- db 2 ; signs
- sign 18, 20, 2 ; SafariZoneCenterText2
- sign 14, 22, 3 ; SafariZoneCenterText3
-
- db 1 ; objects
- object SPRITE_BALL, 14, 10, STAY, NONE, 1, NUGGET
-
- ; warp-to
- warp_to 14, 25, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_GATE
- warp_to 15, 25, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_GATE
- warp_to 0, 10, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_WEST
- warp_to 0, 11, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_WEST
- warp_to 14, 0, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_NORTH
- warp_to 15, 0, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_NORTH
- warp_to 29, 10, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_EAST
- warp_to 29, 11, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_EAST
- warp_to 17, 19, SAFARI_ZONE_CENTER_WIDTH ; SAFARI_ZONE_CENTER_REST_HOUSE
diff --git a/data/mapObjects/SafariZoneCenterRestHouse.asm b/data/mapObjects/SafariZoneCenterRestHouse.asm
deleted file mode 100755
index 9eda9970..00000000
--- a/data/mapObjects/SafariZoneCenterRestHouse.asm
+++ /dev/null
@@ -1,16 +0,0 @@
-SafariZoneCenterRestHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 8, SAFARI_ZONE_CENTER
- warp 3, 7, 8, SAFARI_ZONE_CENTER
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_GIRL, 3, 2, STAY, DOWN, 1 ; person
- object SPRITE_OAK_AIDE, 1, 4, WALK, 1, 2 ; person
-
- ; warp-to
- warp_to 2, 7, SAFARI_ZONE_CENTER_REST_HOUSE_WIDTH ; SAFARI_ZONE_CENTER
- warp_to 3, 7, SAFARI_ZONE_CENTER_REST_HOUSE_WIDTH ; SAFARI_ZONE_CENTER
diff --git a/data/mapObjects/SafariZoneEast.asm b/data/mapObjects/SafariZoneEast.asm
deleted file mode 100755
index df612ea9..00000000
--- a/data/mapObjects/SafariZoneEast.asm
+++ /dev/null
@@ -1,27 +0,0 @@
-SafariZoneEast_Object:
- db $0 ; border block
-
- db 5 ; warps
- warp 0, 4, 6, SAFARI_ZONE_NORTH
- warp 0, 5, 7, SAFARI_ZONE_NORTH
- warp 0, 22, 6, SAFARI_ZONE_CENTER
- warp 0, 23, 6, SAFARI_ZONE_CENTER
- warp 25, 9, 0, SAFARI_ZONE_EAST_REST_HOUSE
-
- db 3 ; signs
- sign 26, 10, 5 ; SafariZoneEastText5
- sign 6, 4, 6 ; SafariZoneEastText6
- sign 5, 23, 7 ; SafariZoneEastText7
-
- db 4 ; objects
- object SPRITE_BALL, 21, 10, STAY, NONE, 1, FULL_RESTORE
- object SPRITE_BALL, 3, 7, STAY, NONE, 2, MAX_POTION
- object SPRITE_BALL, 20, 13, STAY, NONE, 3, CARBOS
- object SPRITE_BALL, 15, 12, STAY, NONE, 4, TM_37
-
- ; warp-to
- warp_to 0, 4, SAFARI_ZONE_EAST_WIDTH ; SAFARI_ZONE_NORTH
- warp_to 0, 5, SAFARI_ZONE_EAST_WIDTH ; SAFARI_ZONE_NORTH
- warp_to 0, 22, SAFARI_ZONE_EAST_WIDTH ; SAFARI_ZONE_CENTER
- warp_to 0, 23, SAFARI_ZONE_EAST_WIDTH ; SAFARI_ZONE_CENTER
- warp_to 25, 9, SAFARI_ZONE_EAST_WIDTH ; SAFARI_ZONE_EAST_REST_HOUSE
diff --git a/data/mapObjects/SafariZoneEastRestHouse.asm b/data/mapObjects/SafariZoneEastRestHouse.asm
deleted file mode 100755
index e7c68343..00000000
--- a/data/mapObjects/SafariZoneEastRestHouse.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-SafariZoneEastRestHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 4, SAFARI_ZONE_EAST
- warp 3, 7, 4, SAFARI_ZONE_EAST
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_OAK_AIDE, 1, 3, WALK, 1, 1 ; person
- object SPRITE_ROCKER, 4, 2, STAY, NONE, 2 ; person
- object SPRITE_LAPRAS_GIVER, 5, 2, STAY, NONE, 3 ; person
-
- ; warp-to
- warp_to 2, 7, SAFARI_ZONE_EAST_REST_HOUSE_WIDTH ; SAFARI_ZONE_EAST
- warp_to 3, 7, SAFARI_ZONE_EAST_REST_HOUSE_WIDTH ; SAFARI_ZONE_EAST
diff --git a/data/mapObjects/SafariZoneGate.asm b/data/mapObjects/SafariZoneGate.asm
deleted file mode 100755
index 6749b45b..00000000
--- a/data/mapObjects/SafariZoneGate.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-SafariZoneGate_Object:
- db $a ; border block
-
- db 4 ; warps
- warp 3, 5, 4, -1
- warp 4, 5, 4, -1
- warp 3, 0, 0, SAFARI_ZONE_CENTER
- warp 4, 0, 1, SAFARI_ZONE_CENTER
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_WHITE_PLAYER, 6, 2, STAY, LEFT, 1 ; person
- object SPRITE_WHITE_PLAYER, 1, 4, STAY, RIGHT, 2 ; person
-
- ; warp-to
- warp_to 3, 5, SAFARI_ZONE_GATE_WIDTH
- warp_to 4, 5, SAFARI_ZONE_GATE_WIDTH
- warp_to 3, 0, SAFARI_ZONE_GATE_WIDTH ; SAFARI_ZONE_CENTER
- warp_to 4, 0, SAFARI_ZONE_GATE_WIDTH ; SAFARI_ZONE_CENTER
diff --git a/data/mapObjects/SafariZoneNorth.asm b/data/mapObjects/SafariZoneNorth.asm
deleted file mode 100755
index 9eda7b4b..00000000
--- a/data/mapObjects/SafariZoneNorth.asm
+++ /dev/null
@@ -1,35 +0,0 @@
-SafariZoneNorth_Object:
- db $0 ; border block
-
- db 9 ; warps
- warp 2, 35, 0, SAFARI_ZONE_WEST
- warp 3, 35, 1, SAFARI_ZONE_WEST
- warp 8, 35, 2, SAFARI_ZONE_WEST
- warp 9, 35, 3, SAFARI_ZONE_WEST
- warp 20, 35, 4, SAFARI_ZONE_CENTER
- warp 21, 35, 5, SAFARI_ZONE_CENTER
- warp 39, 30, 0, SAFARI_ZONE_EAST
- warp 39, 31, 1, SAFARI_ZONE_EAST
- warp 35, 3, 0, SAFARI_ZONE_NORTH_REST_HOUSE
-
- db 5 ; signs
- sign 36, 4, 3 ; SafariZoneNorthText3
- sign 4, 25, 4 ; SafariZoneNorthText4
- sign 13, 31, 5 ; SafariZoneNorthText5
- sign 19, 33, 6 ; SafariZoneNorthText6
- sign 26, 28, 7 ; SafariZoneNorthText7
-
- db 2 ; objects
- object SPRITE_BALL, 25, 1, STAY, NONE, 1, PROTEIN
- object SPRITE_BALL, 19, 7, STAY, NONE, 2, TM_40
-
- ; warp-to
- warp_to 2, 35, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_WEST
- warp_to 3, 35, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_WEST
- warp_to 8, 35, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_WEST
- warp_to 9, 35, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_WEST
- warp_to 20, 35, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_CENTER
- warp_to 21, 35, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_CENTER
- warp_to 39, 30, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_EAST
- warp_to 39, 31, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_EAST
- warp_to 35, 3, SAFARI_ZONE_NORTH_WIDTH ; SAFARI_ZONE_NORTH_REST_HOUSE
diff --git a/data/mapObjects/SafariZoneNorthRestHouse.asm b/data/mapObjects/SafariZoneNorthRestHouse.asm
deleted file mode 100755
index 34b3ab4f..00000000
--- a/data/mapObjects/SafariZoneNorthRestHouse.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-SafariZoneNorthRestHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 8, SAFARI_ZONE_NORTH
- warp 3, 7, 8, SAFARI_ZONE_NORTH
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_OAK_AIDE, 6, 3, WALK, 2, 1 ; person
- object SPRITE_WHITE_PLAYER, 3, 4, STAY, NONE, 2 ; person
- object SPRITE_GENTLEMAN, 1, 5, WALK, 1, 3 ; person
-
- ; warp-to
- warp_to 2, 7, SAFARI_ZONE_NORTH_REST_HOUSE_WIDTH ; SAFARI_ZONE_NORTH
- warp_to 3, 7, SAFARI_ZONE_NORTH_REST_HOUSE_WIDTH ; SAFARI_ZONE_NORTH
diff --git a/data/mapObjects/SafariZoneSecretHouse.asm b/data/mapObjects/SafariZoneSecretHouse.asm
deleted file mode 100755
index 2a5fc22d..00000000
--- a/data/mapObjects/SafariZoneSecretHouse.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-SafariZoneSecretHouse_Object:
- db $17 ; border block
-
- db 2 ; warps
- warp 2, 7, 6, SAFARI_ZONE_WEST
- warp 3, 7, 6, SAFARI_ZONE_WEST
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_FISHER, 3, 3, STAY, DOWN, 1 ; person
-
- ; warp-to
- warp_to 2, 7, SAFARI_ZONE_SECRET_HOUSE_WIDTH ; SAFARI_ZONE_WEST
- warp_to 3, 7, SAFARI_ZONE_SECRET_HOUSE_WIDTH ; SAFARI_ZONE_WEST
diff --git a/data/mapObjects/SafariZoneWest.asm b/data/mapObjects/SafariZoneWest.asm
deleted file mode 100755
index 7faced72..00000000
--- a/data/mapObjects/SafariZoneWest.asm
+++ /dev/null
@@ -1,34 +0,0 @@
-SafariZoneWest_Object:
- db $0 ; border block
-
- db 8 ; warps
- warp 20, 0, 0, SAFARI_ZONE_NORTH
- warp 21, 0, 1, SAFARI_ZONE_NORTH
- warp 26, 0, 2, SAFARI_ZONE_NORTH
- warp 27, 0, 3, SAFARI_ZONE_NORTH
- warp 29, 22, 2, SAFARI_ZONE_CENTER
- warp 29, 23, 3, SAFARI_ZONE_CENTER
- warp 3, 3, 0, SAFARI_ZONE_SECRET_HOUSE
- warp 11, 11, 0, SAFARI_ZONE_WEST_REST_HOUSE
-
- db 4 ; signs
- sign 12, 12, 5 ; SafariZoneWestText5
- sign 17, 3, 6 ; SafariZoneWestText6
- sign 26, 4, 7 ; SafariZoneWestText7
- sign 24, 22, 8 ; SafariZoneWestText8
-
- db 4 ; objects
- object SPRITE_BALL, 8, 20, STAY, NONE, 1, MAX_POTION
- object SPRITE_BALL, 9, 7, STAY, NONE, 2, TM_32
- object SPRITE_BALL, 18, 18, STAY, NONE, 3, MAX_REVIVE
- object SPRITE_BALL, 19, 7, STAY, NONE, 4, GOLD_TEETH
-
- ; warp-to
- warp_to 20, 0, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_NORTH
- warp_to 21, 0, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_NORTH
- warp_to 26, 0, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_NORTH
- warp_to 27, 0, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_NORTH
- warp_to 29, 22, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_CENTER
- warp_to 29, 23, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_CENTER
- warp_to 3, 3, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_SECRET_HOUSE
- warp_to 11, 11, SAFARI_ZONE_WEST_WIDTH ; SAFARI_ZONE_WEST_REST_HOUSE
diff --git a/data/mapObjects/SafariZoneWestRestHouse.asm b/data/mapObjects/SafariZoneWestRestHouse.asm
deleted file mode 100755
index 9f1bc0ed..00000000
--- a/data/mapObjects/SafariZoneWestRestHouse.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-SafariZoneWestRestHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 7, SAFARI_ZONE_WEST
- warp 3, 7, 7, SAFARI_ZONE_WEST
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_OAK_AIDE, 4, 4, WALK, 0, 1 ; person
- object SPRITE_BLACK_HAIR_BOY_1, 0, 2, STAY, RIGHT, 2 ; person
- object SPRITE_ERIKA, 6, 2, STAY, DOWN, 3 ; person
-
- ; warp-to
- warp_to 2, 7, SAFARI_ZONE_WEST_REST_HOUSE_WIDTH ; SAFARI_ZONE_WEST
- warp_to 3, 7, SAFARI_ZONE_WEST_REST_HOUSE_WIDTH ; SAFARI_ZONE_WEST
diff --git a/data/mapObjects/SaffronCity.asm b/data/mapObjects/SaffronCity.asm
deleted file mode 100755
index fd8ed6b1..00000000
--- a/data/mapObjects/SaffronCity.asm
+++ /dev/null
@@ -1,50 +0,0 @@
-SaffronCity_Object:
- db $f ; border block
-
- db 8 ; warps
- warp 7, 5, 0, COPYCATS_HOUSE_1F
- warp 26, 3, 0, FIGHTING_DOJO
- warp 34, 3, 0, SAFFRON_GYM
- warp 13, 11, 0, SAFFRON_PIDGEY_HOUSE
- warp 25, 11, 0, SAFFRON_MART
- warp 18, 21, 0, SILPH_CO_1F
- warp 9, 29, 0, SAFFRON_POKECENTER
- warp 29, 29, 0, MR_PSYCHICS_HOUSE
-
- db 10 ; signs
- sign 17, 5, 16 ; SaffronCityText16
- sign 27, 5, 17 ; SaffronCityText17
- sign 35, 5, 18 ; SaffronCityText18
- sign 26, 11, 19 ; MartSignText
- sign 39, 19, 20 ; SaffronCityText20
- sign 5, 21, 21 ; SaffronCityText21
- sign 15, 21, 22 ; SaffronCityText22
- sign 10, 29, 23 ; PokeCenterSignText
- sign 27, 29, 24 ; SaffronCityText24
- sign 1, 19, 25 ; SaffronCityText25
-
- db 14 ; objects
- object SPRITE_ROCKET, 7, 6, STAY, NONE, 1 ; person
- object SPRITE_ROCKET, 20, 8, WALK, 2, 2 ; person
- object SPRITE_ROCKET, 34, 4, STAY, NONE, 3 ; person
- object SPRITE_ROCKET, 13, 12, STAY, NONE, 4 ; person
- object SPRITE_ROCKET, 11, 25, WALK, 2, 5 ; person
- object SPRITE_ROCKET, 32, 13, WALK, 2, 6 ; person
- object SPRITE_ROCKET, 18, 30, WALK, 2, 7 ; person
- object SPRITE_OAK_AIDE, 8, 14, WALK, 0, 8 ; person
- object SPRITE_LAPRAS_GIVER, 23, 23, STAY, NONE, 9 ; person
- object SPRITE_ERIKA, 17, 30, WALK, 2, 10 ; person
- object SPRITE_GENTLEMAN, 30, 12, STAY, DOWN, 11 ; person
- object SPRITE_BIRD, 31, 12, STAY, DOWN, 12 ; person
- object SPRITE_ROCKER, 18, 8, STAY, UP, 13 ; person
- object SPRITE_ROCKET, 18, 22, STAY, DOWN, 14 ; person
-
- ; warp-to
- warp_to 7, 5, SAFFRON_CITY_WIDTH ; COPYCATS_HOUSE_1F
- warp_to 26, 3, SAFFRON_CITY_WIDTH ; FIGHTING_DOJO
- warp_to 34, 3, SAFFRON_CITY_WIDTH ; SAFFRON_GYM
- warp_to 13, 11, SAFFRON_CITY_WIDTH ; SAFFRON_PIDGEY_HOUSE
- warp_to 25, 11, SAFFRON_CITY_WIDTH ; SAFFRON_MART
- warp_to 18, 21, SAFFRON_CITY_WIDTH ; SILPH_CO_1F
- warp_to 9, 29, SAFFRON_CITY_WIDTH ; SAFFRON_POKECENTER
- warp_to 29, 29, SAFFRON_CITY_WIDTH ; MR_PSYCHICS_HOUSE
diff --git a/data/mapObjects/SaffronGym.asm b/data/mapObjects/SaffronGym.asm
deleted file mode 100755
index 4cb80bcd..00000000
--- a/data/mapObjects/SaffronGym.asm
+++ /dev/null
@@ -1,83 +0,0 @@
-SaffronGym_Object:
- db $2e ; border block
-
- db 32 ; warps
- warp 8, 17, 2, -1
- warp 9, 17, 2, -1
- warp 1, 3, 22, SAFFRON_GYM
- warp 5, 3, 15, SAFFRON_GYM
- warp 1, 5, 18, SAFFRON_GYM
- warp 5, 5, 8, SAFFRON_GYM
- warp 1, 9, 27, SAFFRON_GYM
- warp 5, 9, 16, SAFFRON_GYM
- warp 1, 11, 5, SAFFRON_GYM
- warp 5, 11, 13, SAFFRON_GYM
- warp 1, 15, 23, SAFFRON_GYM
- warp 5, 15, 30, SAFFRON_GYM
- warp 1, 17, 17, SAFFRON_GYM
- warp 5, 17, 9, SAFFRON_GYM
- warp 9, 3, 26, SAFFRON_GYM
- warp 11, 3, 3, SAFFRON_GYM
- warp 9, 5, 7, SAFFRON_GYM
- warp 11, 5, 12, SAFFRON_GYM
- warp 11, 11, 4, SAFFRON_GYM
- warp 11, 15, 31, SAFFRON_GYM
- warp 15, 3, 24, SAFFRON_GYM
- warp 19, 3, 28, SAFFRON_GYM
- warp 15, 5, 2, SAFFRON_GYM
- warp 19, 5, 10, SAFFRON_GYM
- warp 15, 9, 20, SAFFRON_GYM
- warp 19, 9, 29, SAFFRON_GYM
- warp 15, 11, 14, SAFFRON_GYM
- warp 19, 11, 6, SAFFRON_GYM
- warp 15, 15, 21, SAFFRON_GYM
- warp 19, 15, 25, SAFFRON_GYM
- warp 15, 17, 11, SAFFRON_GYM
- warp 19, 17, 19, SAFFRON_GYM
-
- db 0 ; signs
-
- db 9 ; objects
- object SPRITE_LASS, 9, 8, STAY, DOWN, 1, OPP_SABRINA, 1
- object SPRITE_MEDIUM, 10, 1, STAY, DOWN, 2, OPP_CHANNELER, 22
- object SPRITE_BUG_CATCHER, 17, 1, STAY, DOWN, 3, OPP_PSYCHIC_TR, 1
- object SPRITE_MEDIUM, 3, 7, STAY, DOWN, 4, OPP_CHANNELER, 23
- object SPRITE_BUG_CATCHER, 17, 7, STAY, DOWN, 5, OPP_PSYCHIC_TR, 2
- object SPRITE_MEDIUM, 3, 13, STAY, DOWN, 6, OPP_CHANNELER, 24
- object SPRITE_BUG_CATCHER, 17, 13, STAY, DOWN, 7, OPP_PSYCHIC_TR, 3
- object SPRITE_BUG_CATCHER, 3, 1, STAY, DOWN, 8, OPP_PSYCHIC_TR, 4
- object SPRITE_GYM_HELPER, 10, 15, STAY, DOWN, 9 ; person
-
- ; warp-to
- warp_to 8, 17, SAFFRON_GYM_WIDTH
- warp_to 9, 17, SAFFRON_GYM_WIDTH
- warp_to 1, 3, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 5, 3, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 1, 5, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 5, 5, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 1, 9, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 5, 9, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 1, 11, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 5, 11, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 1, 15, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 5, 15, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 1, 17, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 5, 17, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 9, 3, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 11, 3, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 9, 5, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 11, 5, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 11, 11, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 11, 15, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 15, 3, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 19, 3, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 15, 5, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 19, 5, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 15, 9, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 19, 9, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 15, 11, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 19, 11, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 15, 15, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 19, 15, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 15, 17, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
- warp_to 19, 17, SAFFRON_GYM_WIDTH ; SAFFRON_GYM
diff --git a/data/mapObjects/SaffronMart.asm b/data/mapObjects/SaffronMart.asm
deleted file mode 100755
index c376f2de..00000000
--- a/data/mapObjects/SaffronMart.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-SaffronMart_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 4, -1
- warp 4, 7, 4, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person
- object SPRITE_BLACK_HAIR_BOY_2, 4, 2, STAY, NONE, 2 ; person
- object SPRITE_LASS, 6, 5, WALK, 0, 3 ; person
-
- ; warp-to
- warp_to 3, 7, SAFFRON_MART_WIDTH
- warp_to 4, 7, SAFFRON_MART_WIDTH
diff --git a/data/mapObjects/SaffronPidgeyHouse.asm b/data/mapObjects/SaffronPidgeyHouse.asm
deleted file mode 100755
index 65a851bf..00000000
--- a/data/mapObjects/SaffronPidgeyHouse.asm
+++ /dev/null
@@ -1,18 +0,0 @@
-SaffronPidgeyHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 3, -1
- warp 3, 7, 3, -1
-
- db 0 ; signs
-
- db 4 ; objects
- object SPRITE_BRUNETTE_GIRL, 2, 3, STAY, RIGHT, 1 ; person
- object SPRITE_BIRD, 0, 4, WALK, 1, 2 ; person
- object SPRITE_BUG_CATCHER, 4, 1, STAY, DOWN, 3 ; person
- object SPRITE_PAPER_SHEET, 3, 3, STAY, NONE, 4 ; person
-
- ; warp-to
- warp_to 2, 7, SAFFRON_PIDGEY_HOUSE_WIDTH
- warp_to 3, 7, SAFFRON_PIDGEY_HOUSE_WIDTH
diff --git a/data/mapObjects/SaffronPokecenter.asm b/data/mapObjects/SaffronPokecenter.asm
deleted file mode 100755
index db28f048..00000000
--- a/data/mapObjects/SaffronPokecenter.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-SaffronPokecenter_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 6, -1
- warp 4, 7, 6, -1
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
- object SPRITE_FOULARD_WOMAN, 5, 5, STAY, NONE, 2 ; person
- object SPRITE_GENTLEMAN, 8, 3, STAY, DOWN, 3 ; person
- object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person
- object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
-
- ; warp-to
- warp_to 3, 7, SAFFRON_POKECENTER_WIDTH
- warp_to 4, 7, SAFFRON_POKECENTER_WIDTH
diff --git a/data/mapObjects/SeafoamIslands1F.asm b/data/mapObjects/SeafoamIslands1F.asm
deleted file mode 100755
index 67b3f0e5..00000000
--- a/data/mapObjects/SeafoamIslands1F.asm
+++ /dev/null
@@ -1,26 +0,0 @@
-SeafoamIslands1F_Object:
- db $7d ; border block
-
- db 7 ; warps
- warp 4, 17, 0, -1
- warp 5, 17, 0, -1
- warp 26, 17, 1, -1
- warp 27, 17, 1, -1
- warp 7, 5, 1, SEAFOAM_ISLANDS_B1F
- warp 25, 3, 6, SEAFOAM_ISLANDS_B1F
- warp 23, 15, 4, SEAFOAM_ISLANDS_B1F
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_BOULDER, 18, 10, STAY, BOULDER_MOVEMENT_BYTE_2, 1 ; person
- object SPRITE_BOULDER, 26, 7, STAY, BOULDER_MOVEMENT_BYTE_2, 2 ; person
-
- ; warp-to
- warp_to 4, 17, SEAFOAM_ISLANDS_1F_WIDTH
- warp_to 5, 17, SEAFOAM_ISLANDS_1F_WIDTH
- warp_to 26, 17, SEAFOAM_ISLANDS_1F_WIDTH
- warp_to 27, 17, SEAFOAM_ISLANDS_1F_WIDTH
- warp_to 7, 5, SEAFOAM_ISLANDS_1F_WIDTH ; SEAFOAM_ISLANDS_B1F
- warp_to 25, 3, SEAFOAM_ISLANDS_1F_WIDTH ; SEAFOAM_ISLANDS_B1F
- warp_to 23, 15, SEAFOAM_ISLANDS_1F_WIDTH ; SEAFOAM_ISLANDS_B1F
diff --git a/data/mapObjects/SeafoamIslandsB1F.asm b/data/mapObjects/SeafoamIslandsB1F.asm
deleted file mode 100755
index 426ca0c3..00000000
--- a/data/mapObjects/SeafoamIslandsB1F.asm
+++ /dev/null
@@ -1,26 +0,0 @@
-SeafoamIslandsB1F_Object:
- db $7d ; border block
-
- db 7 ; warps
- warp 4, 2, 0, SEAFOAM_ISLANDS_B2F
- warp 7, 5, 4, SEAFOAM_ISLANDS_1F
- warp 13, 7, 2, SEAFOAM_ISLANDS_B2F
- warp 19, 15, 3, SEAFOAM_ISLANDS_B2F
- warp 23, 15, 6, SEAFOAM_ISLANDS_1F
- warp 25, 11, 5, SEAFOAM_ISLANDS_B2F
- warp 25, 3, 5, SEAFOAM_ISLANDS_1F
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_BOULDER, 17, 6, STAY, BOULDER_MOVEMENT_BYTE_2, 1 ; person
- object SPRITE_BOULDER, 22, 6, STAY, BOULDER_MOVEMENT_BYTE_2, 2 ; person
-
- ; warp-to
- warp_to 4, 2, SEAFOAM_ISLANDS_B1F_WIDTH ; SEAFOAM_ISLANDS_B2F
- warp_to 7, 5, SEAFOAM_ISLANDS_B1F_WIDTH ; SEAFOAM_ISLANDS_1F
- warp_to 13, 7, SEAFOAM_ISLANDS_B1F_WIDTH ; SEAFOAM_ISLANDS_B2F
- warp_to 19, 15, SEAFOAM_ISLANDS_B1F_WIDTH ; SEAFOAM_ISLANDS_B2F
- warp_to 23, 15, SEAFOAM_ISLANDS_B1F_WIDTH ; SEAFOAM_ISLANDS_1F
- warp_to 25, 11, SEAFOAM_ISLANDS_B1F_WIDTH ; SEAFOAM_ISLANDS_B2F
- warp_to 25, 3, SEAFOAM_ISLANDS_B1F_WIDTH ; SEAFOAM_ISLANDS_1F
diff --git a/data/mapObjects/SeafoamIslandsB2F.asm b/data/mapObjects/SeafoamIslandsB2F.asm
deleted file mode 100755
index 9c1a7898..00000000
--- a/data/mapObjects/SeafoamIslandsB2F.asm
+++ /dev/null
@@ -1,26 +0,0 @@
-SeafoamIslandsB2F_Object:
- db $7d ; border block
-
- db 7 ; warps
- warp 5, 3, 0, SEAFOAM_ISLANDS_B1F
- warp 5, 13, 0, SEAFOAM_ISLANDS_B3F
- warp 13, 7, 2, SEAFOAM_ISLANDS_B1F
- warp 19, 15, 3, SEAFOAM_ISLANDS_B1F
- warp 25, 3, 3, SEAFOAM_ISLANDS_B3F
- warp 25, 11, 5, SEAFOAM_ISLANDS_B1F
- warp 25, 14, 4, SEAFOAM_ISLANDS_B3F
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_BOULDER, 18, 6, STAY, BOULDER_MOVEMENT_BYTE_2, 1 ; person
- object SPRITE_BOULDER, 23, 6, STAY, BOULDER_MOVEMENT_BYTE_2, 2 ; person
-
- ; warp-to
- warp_to 5, 3, SEAFOAM_ISLANDS_B2F_WIDTH ; SEAFOAM_ISLANDS_B1F
- warp_to 5, 13, SEAFOAM_ISLANDS_B2F_WIDTH ; SEAFOAM_ISLANDS_B3F
- warp_to 13, 7, SEAFOAM_ISLANDS_B2F_WIDTH ; SEAFOAM_ISLANDS_B1F
- warp_to 19, 15, SEAFOAM_ISLANDS_B2F_WIDTH ; SEAFOAM_ISLANDS_B1F
- warp_to 25, 3, SEAFOAM_ISLANDS_B2F_WIDTH ; SEAFOAM_ISLANDS_B3F
- warp_to 25, 11, SEAFOAM_ISLANDS_B2F_WIDTH ; SEAFOAM_ISLANDS_B1F
- warp_to 25, 14, SEAFOAM_ISLANDS_B2F_WIDTH ; SEAFOAM_ISLANDS_B3F
diff --git a/data/mapObjects/SeafoamIslandsB3F.asm b/data/mapObjects/SeafoamIslandsB3F.asm
deleted file mode 100755
index d194e1cd..00000000
--- a/data/mapObjects/SeafoamIslandsB3F.asm
+++ /dev/null
@@ -1,30 +0,0 @@
-SeafoamIslandsB3F_Object:
- db $7d ; border block
-
- db 7 ; warps
- warp 5, 12, 1, SEAFOAM_ISLANDS_B2F
- warp 8, 6, 2, SEAFOAM_ISLANDS_B4F
- warp 25, 4, 3, SEAFOAM_ISLANDS_B4F
- warp 25, 3, 4, SEAFOAM_ISLANDS_B2F
- warp 25, 14, 6, SEAFOAM_ISLANDS_B2F
- warp 20, 17, 0, SEAFOAM_ISLANDS_B4F
- warp 21, 17, 1, SEAFOAM_ISLANDS_B4F
-
- db 0 ; signs
-
- db 6 ; objects
- object SPRITE_BOULDER, 5, 14, STAY, BOULDER_MOVEMENT_BYTE_2, 1 ; person
- object SPRITE_BOULDER, 3, 15, STAY, BOULDER_MOVEMENT_BYTE_2, 2 ; person
- object SPRITE_BOULDER, 8, 14, STAY, BOULDER_MOVEMENT_BYTE_2, 3 ; person
- object SPRITE_BOULDER, 9, 14, STAY, BOULDER_MOVEMENT_BYTE_2, 4 ; person
- object SPRITE_BOULDER, 18, 6, STAY, NONE, 5 ; person
- object SPRITE_BOULDER, 19, 6, STAY, NONE, 6 ; person
-
- ; warp-to
- warp_to 5, 12, SEAFOAM_ISLANDS_B3F_WIDTH ; SEAFOAM_ISLANDS_B2F
- warp_to 8, 6, SEAFOAM_ISLANDS_B3F_WIDTH ; SEAFOAM_ISLANDS_B4F
- warp_to 25, 4, SEAFOAM_ISLANDS_B3F_WIDTH ; SEAFOAM_ISLANDS_B4F
- warp_to 25, 3, SEAFOAM_ISLANDS_B3F_WIDTH ; SEAFOAM_ISLANDS_B2F
- warp_to 25, 14, SEAFOAM_ISLANDS_B3F_WIDTH ; SEAFOAM_ISLANDS_B2F
- warp_to 20, 17, SEAFOAM_ISLANDS_B3F_WIDTH ; SEAFOAM_ISLANDS_B4F
- warp_to 21, 17, SEAFOAM_ISLANDS_B3F_WIDTH ; SEAFOAM_ISLANDS_B4F
diff --git a/data/mapObjects/SeafoamIslandsB4F.asm b/data/mapObjects/SeafoamIslandsB4F.asm
deleted file mode 100755
index 62d88b0c..00000000
--- a/data/mapObjects/SeafoamIslandsB4F.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-SeafoamIslandsB4F_Object:
- db $7d ; border block
-
- db 4 ; warps
- warp 20, 17, 5, SEAFOAM_ISLANDS_B3F
- warp 21, 17, 6, SEAFOAM_ISLANDS_B3F
- warp 11, 7, 1, SEAFOAM_ISLANDS_B3F
- warp 25, 4, 2, SEAFOAM_ISLANDS_B3F
-
- db 2 ; signs
- sign 9, 15, 4 ; SeafoamIslands5Text4
- sign 23, 1, 5 ; SeafoamIslands5Text5
-
- db 3 ; objects
- object SPRITE_BOULDER, 4, 15, STAY, NONE, 1 ; person
- object SPRITE_BOULDER, 5, 15, STAY, NONE, 2 ; person
- object SPRITE_BIRD, 6, 1, STAY, DOWN, 3, ARTICUNO, 50
-
- ; warp-to
- warp_to 20, 17, SEAFOAM_ISLANDS_B4F_WIDTH ; SEAFOAM_ISLANDS_B3F
- warp_to 21, 17, SEAFOAM_ISLANDS_B4F_WIDTH ; SEAFOAM_ISLANDS_B3F
- warp_to 11, 7, SEAFOAM_ISLANDS_B4F_WIDTH ; SEAFOAM_ISLANDS_B3F
- warp_to 25, 4, SEAFOAM_ISLANDS_B4F_WIDTH ; SEAFOAM_ISLANDS_B3F
diff --git a/data/mapObjects/SilphCo10F.asm b/data/mapObjects/SilphCo10F.asm
deleted file mode 100755
index 1c8948d3..00000000
--- a/data/mapObjects/SilphCo10F.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-SilphCo10F_Object:
- db $2e ; border block
-
- db 6 ; warps
- warp 8, 0, 0, SILPH_CO_9F
- warp 10, 0, 0, SILPH_CO_11F
- warp 12, 0, 0, SILPH_CO_ELEVATOR
- warp 9, 11, 3, SILPH_CO_4F
- warp 13, 15, 5, SILPH_CO_4F
- warp 13, 7, 6, SILPH_CO_4F
-
- db 0 ; signs
-
- db 6 ; objects
- object SPRITE_ROCKET, 1, 9, STAY, RIGHT, 1, OPP_ROCKET, 39
- object SPRITE_OAK_AIDE, 10, 2, STAY, LEFT, 2, OPP_SCIENTIST, 11
- object SPRITE_ERIKA, 9, 15, WALK, 0, 3 ; person
- object SPRITE_BALL, 2, 12, STAY, NONE, 4, TM_26
- object SPRITE_BALL, 4, 14, STAY, NONE, 5, RARE_CANDY
- object SPRITE_BALL, 5, 11, STAY, NONE, 6, CARBOS
-
- ; warp-to
- warp_to 8, 0, SILPH_CO_10F_WIDTH ; SILPH_CO_9F
- warp_to 10, 0, SILPH_CO_10F_WIDTH ; SILPH_CO_11F
- warp_to 12, 0, SILPH_CO_10F_WIDTH ; SILPH_CO_ELEVATOR
- warp_to 9, 11, SILPH_CO_10F_WIDTH ; SILPH_CO_4F
- warp_to 13, 15, SILPH_CO_10F_WIDTH ; SILPH_CO_4F
- warp_to 13, 7, SILPH_CO_10F_WIDTH ; SILPH_CO_4F
diff --git a/data/mapObjects/SilphCo11F.asm b/data/mapObjects/SilphCo11F.asm
deleted file mode 100755
index ec6331b2..00000000
--- a/data/mapObjects/SilphCo11F.asm
+++ /dev/null
@@ -1,24 +0,0 @@
-SilphCo11F_Object:
- db $d ; border block
-
- db 4 ; warps
- warp 9, 0, 1, SILPH_CO_10F
- warp 13, 0, 0, SILPH_CO_ELEVATOR
- warp 5, 5, 9, -1
- warp 3, 2, 3, SILPH_CO_7F
-
- db 0 ; signs
-
- db 6 ; objects
- object SPRITE_MR_MASTERBALL, 7, 5, STAY, DOWN, 1 ; person
- object SPRITE_FOULARD_WOMAN, 10, 5, STAY, DOWN, 2 ; person
- object SPRITE_GIOVANNI, 6, 9, STAY, DOWN, 3, OPP_GIOVANNI, 2
- object SPRITE_JAMES, 2, 8, STAY, UP, 4
- object SPRITE_ROCKET, 15, 9, STAY, UP, 5, OPP_ROCKET, 40
- object SPRITE_JESSIE, 3, 8, STAY, UP, 6
-
- ; warp-to
- warp_to 9, 0, SILPH_CO_11F_WIDTH ; SILPH_CO_10F
- warp_to 13, 0, SILPH_CO_11F_WIDTH ; SILPH_CO_ELEVATOR
- warp_to 5, 5, SILPH_CO_11F_WIDTH
- warp_to 3, 2, SILPH_CO_11F_WIDTH ; SILPH_CO_7F
diff --git a/data/mapObjects/SilphCo1F.asm b/data/mapObjects/SilphCo1F.asm
deleted file mode 100755
index fc040091..00000000
--- a/data/mapObjects/SilphCo1F.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-SilphCo1F_Object:
- db $2e ; border block
-
- db 5 ; warps
- warp 10, 17, 5, -1
- warp 11, 17, 5, -1
- warp 26, 0, 0, SILPH_CO_2F
- warp 20, 0, 0, SILPH_CO_ELEVATOR
- warp 16, 10, 6, SILPH_CO_3F
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_CABLE_CLUB_WOMAN, 4, 2, STAY, DOWN, 1 ; person
-
- ; warp-to
- warp_to 10, 17, SILPH_CO_1F_WIDTH
- warp_to 11, 17, SILPH_CO_1F_WIDTH
- warp_to 26, 0, SILPH_CO_1F_WIDTH ; SILPH_CO_2F
- warp_to 20, 0, SILPH_CO_1F_WIDTH ; SILPH_CO_ELEVATOR
- warp_to 16, 10, SILPH_CO_1F_WIDTH ; SILPH_CO_3F
diff --git a/data/mapObjects/SilphCo2F.asm b/data/mapObjects/SilphCo2F.asm
deleted file mode 100755
index bc30d78d..00000000
--- a/data/mapObjects/SilphCo2F.asm
+++ /dev/null
@@ -1,29 +0,0 @@
-SilphCo2F_Object:
- db $2e ; border block
-
- db 7 ; warps
- warp 24, 0, 2, SILPH_CO_1F
- warp 26, 0, 0, SILPH_CO_3F
- warp 20, 0, 0, SILPH_CO_ELEVATOR
- warp 3, 3, 6, SILPH_CO_3F
- warp 13, 3, 4, SILPH_CO_8F
- warp 27, 15, 5, SILPH_CO_8F
- warp 9, 15, 4, SILPH_CO_6F
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_ERIKA, 10, 1, STAY, UP, 1 ; person
- object SPRITE_OAK_AIDE, 5, 12, STAY, DOWN, 2, OPP_SCIENTIST, 2
- object SPRITE_OAK_AIDE, 24, 13, STAY, LEFT, 3, OPP_SCIENTIST, 3
- object SPRITE_ROCKET, 16, 11, STAY, UP, 4, OPP_ROCKET, 23
- object SPRITE_ROCKET, 24, 7, STAY, UP, 5, OPP_ROCKET, 24
-
- ; warp-to
- warp_to 24, 0, SILPH_CO_2F_WIDTH ; SILPH_CO_1F
- warp_to 26, 0, SILPH_CO_2F_WIDTH ; SILPH_CO_3F
- warp_to 20, 0, SILPH_CO_2F_WIDTH ; SILPH_CO_ELEVATOR
- warp_to 3, 3, SILPH_CO_2F_WIDTH ; SILPH_CO_3F
- warp_to 13, 3, SILPH_CO_2F_WIDTH ; SILPH_CO_8F
- warp_to 27, 15, SILPH_CO_2F_WIDTH ; SILPH_CO_8F
- warp_to 9, 15, SILPH_CO_2F_WIDTH ; SILPH_CO_6F
diff --git a/data/mapObjects/SilphCo3F.asm b/data/mapObjects/SilphCo3F.asm
deleted file mode 100755
index f45cdf81..00000000
--- a/data/mapObjects/SilphCo3F.asm
+++ /dev/null
@@ -1,34 +0,0 @@
-SilphCo3F_Object:
- db $2e ; border block
-
- db 10 ; warps
- warp 26, 0, 1, SILPH_CO_2F
- warp 24, 0, 0, SILPH_CO_4F
- warp 20, 0, 0, SILPH_CO_ELEVATOR
- warp 23, 11, 9, SILPH_CO_3F
- warp 3, 3, 5, SILPH_CO_5F
- warp 3, 15, 6, SILPH_CO_5F
- warp 27, 3, 3, SILPH_CO_2F
- warp 3, 11, 3, SILPH_CO_9F
- warp 11, 11, 4, SILPH_CO_7F
- warp 27, 15, 3, SILPH_CO_3F
-
- db 0 ; signs
-
- db 4 ; objects
- object SPRITE_LAPRAS_GIVER, 24, 8, STAY, NONE, 1 ; person
- object SPRITE_ROCKET, 20, 7, STAY, LEFT, 2, OPP_ROCKET, 25
- object SPRITE_OAK_AIDE, 7, 9, STAY, DOWN, 3, OPP_SCIENTIST, 4
- object SPRITE_BALL, 8, 5, STAY, NONE, 4, HYPER_POTION
-
- ; warp-to
- warp_to 26, 0, SILPH_CO_3F_WIDTH ; SILPH_CO_2F
- warp_to 24, 0, SILPH_CO_3F_WIDTH ; SILPH_CO_4F
- warp_to 20, 0, SILPH_CO_3F_WIDTH ; SILPH_CO_ELEVATOR
- warp_to 23, 11, SILPH_CO_3F_WIDTH ; SILPH_CO_3F
- warp_to 3, 3, SILPH_CO_3F_WIDTH ; SILPH_CO_5F
- warp_to 3, 15, SILPH_CO_3F_WIDTH ; SILPH_CO_5F
- warp_to 27, 3, SILPH_CO_3F_WIDTH ; SILPH_CO_2F
- warp_to 3, 11, SILPH_CO_3F_WIDTH ; SILPH_CO_9F
- warp_to 11, 11, SILPH_CO_3F_WIDTH ; SILPH_CO_7F
- warp_to 27, 15, SILPH_CO_3F_WIDTH ; SILPH_CO_3F
diff --git a/data/mapObjects/SilphCo4F.asm b/data/mapObjects/SilphCo4F.asm
deleted file mode 100755
index 3d865bbc..00000000
--- a/data/mapObjects/SilphCo4F.asm
+++ /dev/null
@@ -1,31 +0,0 @@
-SilphCo4F_Object:
- db $2e ; border block
-
- db 7 ; warps
- warp 24, 0, 1, SILPH_CO_3F
- warp 26, 0, 1, SILPH_CO_5F
- warp 20, 0, 0, SILPH_CO_ELEVATOR
- warp 11, 7, 3, SILPH_CO_10F
- warp 17, 3, 3, SILPH_CO_6F
- warp 3, 15, 4, SILPH_CO_10F
- warp 17, 11, 5, SILPH_CO_10F
-
- db 0 ; signs
-
- db 7 ; objects
- object SPRITE_LAPRAS_GIVER, 6, 2, STAY, NONE, 1 ; person
- object SPRITE_ROCKET, 9, 14, STAY, RIGHT, 2, OPP_ROCKET, 26
- object SPRITE_OAK_AIDE, 14, 6, STAY, LEFT, 3, OPP_SCIENTIST, 5
- object SPRITE_ROCKET, 26, 10, STAY, UP, 4, OPP_ROCKET, 27
- 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
-
- ; warp-to
- warp_to 24, 0, SILPH_CO_4F_WIDTH ; SILPH_CO_3F
- warp_to 26, 0, SILPH_CO_4F_WIDTH ; SILPH_CO_5F
- warp_to 20, 0, SILPH_CO_4F_WIDTH ; SILPH_CO_ELEVATOR
- warp_to 11, 7, SILPH_CO_4F_WIDTH ; SILPH_CO_10F
- warp_to 17, 3, SILPH_CO_4F_WIDTH ; SILPH_CO_6F
- warp_to 3, 15, SILPH_CO_4F_WIDTH ; SILPH_CO_10F
- warp_to 17, 11, SILPH_CO_4F_WIDTH ; SILPH_CO_10F
diff --git a/data/mapObjects/SilphCo5F.asm b/data/mapObjects/SilphCo5F.asm
deleted file mode 100755
index c10f17c8..00000000
--- a/data/mapObjects/SilphCo5F.asm
+++ /dev/null
@@ -1,35 +0,0 @@
-SilphCo5F_Object:
- db $2e ; border block
-
- db 7 ; warps
- warp 24, 0, 1, SILPH_CO_6F
- warp 26, 0, 1, SILPH_CO_4F
- warp 20, 0, 0, SILPH_CO_ELEVATOR
- warp 27, 3, 5, SILPH_CO_7F
- warp 9, 15, 4, SILPH_CO_9F
- warp 11, 5, 4, SILPH_CO_3F
- warp 3, 15, 5, SILPH_CO_3F
-
- db 0 ; signs
-
- db 11 ; objects
- object SPRITE_LAPRAS_GIVER, 13, 9, STAY, NONE, 1 ; person
- object SPRITE_ROCKET, 8, 16, STAY, RIGHT, 2, OPP_ROCKET, 28
- object SPRITE_OAK_AIDE, 8, 3, STAY, RIGHT, 3, OPP_SCIENTIST, 6
- object SPRITE_ROCKER, 18, 10, STAY, UP, 4, OPP_JUGGLER, 1
- object SPRITE_ROCKET, 28, 4, STAY, UP, 5, OPP_ROCKET, 29
- object SPRITE_BALL, 2, 13, STAY, NONE, 6, TM_09
- object SPRITE_BALL, 4, 6, STAY, NONE, 7, PROTEIN
- object SPRITE_BALL, 21, 16, STAY, NONE, 8, CARD_KEY
- object SPRITE_CLIPBOARD, 22, 12, STAY, NONE, 9 ; person
- object SPRITE_CLIPBOARD, 25, 10, STAY, NONE, 10 ; person
- object SPRITE_CLIPBOARD, 24, 6, STAY, NONE, 11 ; person
-
- ; warp-to
- warp_to 24, 0, SILPH_CO_5F_WIDTH ; SILPH_CO_6F
- warp_to 26, 0, SILPH_CO_5F_WIDTH ; SILPH_CO_4F
- warp_to 20, 0, SILPH_CO_5F_WIDTH ; SILPH_CO_ELEVATOR
- warp_to 27, 3, SILPH_CO_5F_WIDTH ; SILPH_CO_7F
- warp_to 9, 15, SILPH_CO_5F_WIDTH ; SILPH_CO_9F
- warp_to 11, 5, SILPH_CO_5F_WIDTH ; SILPH_CO_3F
- warp_to 3, 15, SILPH_CO_5F_WIDTH ; SILPH_CO_3F
diff --git a/data/mapObjects/SilphCo6F.asm b/data/mapObjects/SilphCo6F.asm
deleted file mode 100755
index ad2ac32f..00000000
--- a/data/mapObjects/SilphCo6F.asm
+++ /dev/null
@@ -1,30 +0,0 @@
-SilphCo6F_Object:
- db $2e ; border block
-
- db 5 ; warps
- warp 16, 0, 1, SILPH_CO_7F
- warp 14, 0, 0, SILPH_CO_5F
- warp 18, 0, 0, SILPH_CO_ELEVATOR
- warp 3, 3, 4, SILPH_CO_4F
- warp 23, 3, 6, SILPH_CO_2F
-
- db 0 ; signs
-
- db 10 ; objects
- object SPRITE_LAPRAS_GIVER, 10, 6, STAY, NONE, 1 ; person
- object SPRITE_LAPRAS_GIVER, 20, 6, STAY, NONE, 2 ; person
- object SPRITE_ERIKA, 21, 6, STAY, DOWN, 3 ; person
- object SPRITE_ERIKA, 11, 10, STAY, RIGHT, 4 ; person
- object SPRITE_LAPRAS_GIVER, 18, 13, STAY, UP, 5 ; person
- object SPRITE_ROCKET, 17, 3, STAY, RIGHT, 6, OPP_ROCKET, 30
- object SPRITE_OAK_AIDE, 7, 8, STAY, DOWN, 7, OPP_SCIENTIST, 7
- object SPRITE_ROCKET, 14, 15, STAY, LEFT, 8, OPP_ROCKET, 31
- object SPRITE_BALL, 3, 12, STAY, NONE, 9, HP_UP
- object SPRITE_BALL, 2, 15, STAY, NONE, 10, X_ACCURACY
-
- ; warp-to
- warp_to 16, 0, SILPH_CO_6F_WIDTH ; SILPH_CO_7F
- warp_to 14, 0, SILPH_CO_6F_WIDTH ; SILPH_CO_5F
- warp_to 18, 0, SILPH_CO_6F_WIDTH ; SILPH_CO_ELEVATOR
- warp_to 3, 3, SILPH_CO_6F_WIDTH ; SILPH_CO_4F
- warp_to 23, 3, SILPH_CO_6F_WIDTH ; SILPH_CO_2F
diff --git a/data/mapObjects/SilphCo7F.asm b/data/mapObjects/SilphCo7F.asm
deleted file mode 100755
index 255f4b33..00000000
--- a/data/mapObjects/SilphCo7F.asm
+++ /dev/null
@@ -1,33 +0,0 @@
-SilphCo7F_Object:
- db $2e ; border block
-
- db 6 ; warps
- warp 16, 0, 1, SILPH_CO_8F
- warp 22, 0, 0, SILPH_CO_6F
- warp 18, 0, 0, SILPH_CO_ELEVATOR
- warp 5, 7, 3, SILPH_CO_11F
- warp 5, 3, 8, SILPH_CO_3F
- warp 21, 15, 3, SILPH_CO_5F
-
- db 0 ; signs
-
- db 11 ; objects
- object SPRITE_LAPRAS_GIVER, 1, 5, STAY, NONE, 1 ; person
- object SPRITE_LAPRAS_GIVER, 13, 13, STAY, UP, 2 ; person
- object SPRITE_LAPRAS_GIVER, 7, 10, STAY, NONE, 3 ; person
- object SPRITE_ERIKA, 10, 8, STAY, NONE, 4 ; person
- object SPRITE_ROCKET, 13, 1, STAY, DOWN, 5, OPP_ROCKET, 32
- object SPRITE_OAK_AIDE, 2, 13, STAY, DOWN, 6, OPP_SCIENTIST, 8
- object SPRITE_ROCKET, 20, 2, STAY, LEFT, 7, OPP_ROCKET, 33
- object SPRITE_ROCKET, 19, 14, STAY, RIGHT, 8, OPP_ROCKET, 34
- object SPRITE_BLUE, 3, 7, STAY, UP, 9 ; person
- object SPRITE_BALL, 1, 9, STAY, NONE, 10, CALCIUM
- object SPRITE_BALL, 24, 11, STAY, NONE, 11, TM_03
-
- ; warp-to
- warp_to 16, 0, SILPH_CO_7F_WIDTH ; SILPH_CO_8F
- warp_to 22, 0, SILPH_CO_7F_WIDTH ; SILPH_CO_6F
- warp_to 18, 0, SILPH_CO_7F_WIDTH ; SILPH_CO_ELEVATOR
- warp_to 5, 7, SILPH_CO_7F_WIDTH ; SILPH_CO_11F
- warp_to 5, 3, SILPH_CO_7F_WIDTH ; SILPH_CO_3F
- warp_to 21, 15, SILPH_CO_7F_WIDTH ; SILPH_CO_5F
diff --git a/data/mapObjects/SilphCo8F.asm b/data/mapObjects/SilphCo8F.asm
deleted file mode 100755
index d05c7844..00000000
--- a/data/mapObjects/SilphCo8F.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-SilphCo8F_Object:
- db $2e ; border block
-
- db 7 ; warps
- warp 16, 0, 1, SILPH_CO_9F
- warp 14, 0, 0, SILPH_CO_7F
- warp 18, 0, 0, SILPH_CO_ELEVATOR
- warp 3, 11, 6, SILPH_CO_8F
- warp 3, 15, 4, SILPH_CO_2F
- warp 11, 5, 5, SILPH_CO_2F
- warp 11, 9, 3, SILPH_CO_8F
-
- db 0 ; signs
-
- db 4 ; objects
- object SPRITE_LAPRAS_GIVER, 4, 2, STAY, NONE, 1 ; person
- object SPRITE_ROCKET, 19, 2, STAY, LEFT, 2, OPP_ROCKET, 35
- object SPRITE_OAK_AIDE, 10, 2, STAY, DOWN, 3, OPP_SCIENTIST, 9
- object SPRITE_ROCKET, 12, 15, STAY, RIGHT, 4, OPP_ROCKET, 36
-
- ; warp-to
- warp_to 16, 0, SILPH_CO_8F_WIDTH ; SILPH_CO_9F
- warp_to 14, 0, SILPH_CO_8F_WIDTH ; SILPH_CO_7F
- warp_to 18, 0, SILPH_CO_8F_WIDTH ; SILPH_CO_ELEVATOR
- warp_to 3, 11, SILPH_CO_8F_WIDTH ; SILPH_CO_8F
- warp_to 3, 15, SILPH_CO_8F_WIDTH ; SILPH_CO_2F
- warp_to 11, 5, SILPH_CO_8F_WIDTH ; SILPH_CO_2F
- warp_to 11, 9, SILPH_CO_8F_WIDTH ; SILPH_CO_8F_WIDTH
diff --git a/data/mapObjects/SilphCo9F.asm b/data/mapObjects/SilphCo9F.asm
deleted file mode 100755
index 28ef5f10..00000000
--- a/data/mapObjects/SilphCo9F.asm
+++ /dev/null
@@ -1,24 +0,0 @@
-SilphCo9F_Object:
- db $2e ; border block
-
- db 5 ; warps
- warp 14, 0, 0, SILPH_CO_10F
- warp 16, 0, 0, SILPH_CO_8F
- warp 18, 0, 0, SILPH_CO_ELEVATOR
- warp 9, 3, 7, SILPH_CO_3F
- warp 17, 15, 4, SILPH_CO_5F
-
- db 0 ; signs
-
- db 4 ; objects
- object SPRITE_NURSE, 3, 14, STAY, DOWN, 1 ; person
- object SPRITE_ROCKET, 2, 4, STAY, UP, 2, OPP_ROCKET, 37
- object SPRITE_OAK_AIDE, 21, 13, STAY, DOWN, 3, OPP_SCIENTIST, 10
- object SPRITE_ROCKET, 13, 16, STAY, UP, 4, OPP_ROCKET, 38
-
- ; warp-to
- warp_to 14, 0, SILPH_CO_9F_WIDTH ; SILPH_CO_10F
- warp_to 16, 0, SILPH_CO_9F_WIDTH ; SILPH_CO_8F
- warp_to 18, 0, SILPH_CO_9F_WIDTH ; SILPH_CO_ELEVATOR
- warp_to 9, 3, SILPH_CO_9F_WIDTH ; SILPH_CO_3F
- warp_to 17, 15, SILPH_CO_9F_WIDTH ; SILPH_CO_5F
diff --git a/data/mapObjects/SilphCoElevator.asm b/data/mapObjects/SilphCoElevator.asm
deleted file mode 100755
index 9c4b5a79..00000000
--- a/data/mapObjects/SilphCoElevator.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-SilphCoElevator_Object:
- db $f ; border block
-
- db 2 ; warps
- warp 1, 3, 0, 237
- warp 2, 3, 0, 237
-
- db 1 ; signs
- sign 3, 0, 1 ; SilphCoElevatorText1
-
- db 0 ; objects
-
- ; warp-to
- warp_to 1, 3, SILPH_CO_ELEVATOR_WIDTH
- warp_to 2, 3, SILPH_CO_ELEVATOR_WIDTH
diff --git a/data/mapObjects/TradeCenter.asm b/data/mapObjects/TradeCenter.asm
deleted file mode 100644
index e6df8087..00000000
--- a/data/mapObjects/TradeCenter.asm
+++ /dev/null
@@ -1,9 +0,0 @@
-TradeCenter_Object:
- db $e ; border block
-
- db 0 ; warps
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_RED, 2, 2, STAY, 0, 1 ; person
diff --git a/data/mapObjects/UndergroundPathNorthSouth.asm b/data/mapObjects/UndergroundPathNorthSouth.asm
deleted file mode 100755
index 35e21cca..00000000
--- a/data/mapObjects/UndergroundPathNorthSouth.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-UndergroundPathNorthSouth_Object:
- db $1 ; border block
-
- db 2 ; warps
- warp 5, 4, 2, UNDERGROUND_PATH_ROUTE_5
- warp 2, 41, 2, UNDERGROUND_PATH_ROUTE_6
-
- db 0 ; signs
-
- db 0 ; objects
-
- ; warp-to
- warp_to 5, 4, UNDERGROUND_PATH_NORTH_SOUTH_WIDTH ; UNDERGROUND_PATH_ROUTE_5
- warp_to 2, 41, UNDERGROUND_PATH_NORTH_SOUTH_WIDTH ; UNDERGROUND_PATH_ROUTE_6
diff --git a/data/mapObjects/UndergroundPathRoute5.asm b/data/mapObjects/UndergroundPathRoute5.asm
deleted file mode 100755
index af71ebb4..00000000
--- a/data/mapObjects/UndergroundPathRoute5.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-UndergroundPathRoute5_Object:
- db $a ; border block
-
- db 3 ; warps
- warp 3, 7, 3, -1
- warp 4, 7, 3, -1
- warp 4, 4, 0, UNDERGROUND_PATH_NORTH_SOUTH
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_LITTLE_GIRL, 2, 3, STAY, NONE, 1 ; person
-
- ; warp-to
- warp_to 3, 7, UNDERGROUND_PATH_ROUTE_5_WIDTH
- warp_to 4, 7, UNDERGROUND_PATH_ROUTE_5_WIDTH
- warp_to 4, 4, UNDERGROUND_PATH_ROUTE_5_WIDTH ; UNDERGROUND_PATH_NORTH_SOUTH
diff --git a/data/mapObjects/UndergroundPathRoute6.asm b/data/mapObjects/UndergroundPathRoute6.asm
deleted file mode 100755
index 5a40ade2..00000000
--- a/data/mapObjects/UndergroundPathRoute6.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-UndergroundPathRoute6_Object:
- db $a ; border block
-
- db 3 ; warps
- warp 3, 7, 3, -1
- warp 4, 7, 3, -1
- warp 4, 4, 1, UNDERGROUND_PATH_NORTH_SOUTH
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GIRL, 2, 3, STAY, NONE, 1 ; person
-
- ; warp-to
- warp_to 3, 7, UNDERGROUND_PATH_ROUTE_6_WIDTH
- warp_to 4, 7, UNDERGROUND_PATH_ROUTE_6_WIDTH
- warp_to 4, 4, UNDERGROUND_PATH_ROUTE_6_WIDTH ; UNDERGROUND_PATH_NORTH_SOUTH
diff --git a/data/mapObjects/UndergroundPathRoute7.asm b/data/mapObjects/UndergroundPathRoute7.asm
deleted file mode 100755
index 4666e0c9..00000000
--- a/data/mapObjects/UndergroundPathRoute7.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-UndergroundPathRoute7_Object:
- db $a ; border block
-
- db 3 ; warps
- warp 3, 7, 4, -1
- warp 4, 7, 4, -1
- warp 4, 4, 0, UNDERGROUND_PATH_WEST_EAST
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_FAT_BALD_GUY, 2, 4, STAY, NONE, 1 ; person
-
- ; warp-to
- warp_to 3, 7, UNDERGROUND_PATH_ROUTE_7_WIDTH
- warp_to 4, 7, UNDERGROUND_PATH_ROUTE_7_WIDTH
- warp_to 4, 4, UNDERGROUND_PATH_ROUTE_7_WIDTH ; UNDERGROUND_PATH_WEST_EAST
diff --git a/data/mapObjects/UndergroundPathRoute7Copy.asm b/data/mapObjects/UndergroundPathRoute7Copy.asm
deleted file mode 100755
index c020646e..00000000
--- a/data/mapObjects/UndergroundPathRoute7Copy.asm
+++ /dev/null
@@ -1,18 +0,0 @@
-UndergroundPathRoute7Copy_Object:
- db $a ; border block
-
- db 3 ; warps
- warp 3, 7, 5, -1
- warp 4, 7, 5, -1
- warp 4, 4, 0, UNDERGROUND_PATH_WEST_EAST
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_GIRL, 3, 2, STAY, NONE, 1 ; person
- object SPRITE_FAT_BALD_GUY, 2, 4, STAY, NONE, 2 ; person
-
- ; warp-to
- warp_to 3, 7, UNDERGROUND_PATH_ROUTE_7_COPY_WIDTH
- warp_to 4, 7, UNDERGROUND_PATH_ROUTE_7_COPY_WIDTH
- warp_to 4, 4, UNDERGROUND_PATH_ROUTE_7_COPY_WIDTH ; UNDERGROUND_PATH_WEST_EAST
diff --git a/data/mapObjects/UndergroundPathRoute8.asm b/data/mapObjects/UndergroundPathRoute8.asm
deleted file mode 100755
index 8be0d474..00000000
--- a/data/mapObjects/UndergroundPathRoute8.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-UndergroundPathRoute8_Object:
- db $a ; border block
-
- db 3 ; warps
- warp 3, 7, 4, -1
- warp 4, 7, 4, -1
- warp 4, 4, 1, UNDERGROUND_PATH_WEST_EAST
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GIRL, 3, 4, STAY, NONE, 1 ; person
-
- ; warp-to
- warp_to 3, 7, UNDERGROUND_PATH_ROUTE_8_WIDTH
- warp_to 4, 7, UNDERGROUND_PATH_ROUTE_8_WIDTH
- warp_to 4, 4, UNDERGROUND_PATH_ROUTE_8_WIDTH ; UNDERGROUND_PATH_WEST_EAST
diff --git a/data/mapObjects/UndergroundPathWestEast.asm b/data/mapObjects/UndergroundPathWestEast.asm
deleted file mode 100755
index fa064aca..00000000
--- a/data/mapObjects/UndergroundPathWestEast.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-UndergroundPathWestEast_Object:
- db $1 ; border block
-
- db 2 ; warps
- warp 2, 5, 2, UNDERGROUND_PATH_ROUTE_7
- warp 47, 2, 2, UNDERGROUND_PATH_ROUTE_8
-
- db 0 ; signs
-
- db 0 ; objects
-
- ; warp-to
- warp_to 2, 5, UNDERGROUND_PATH_WEST_EAST_WIDTH ; UNDERGROUND_PATH_ROUTE_7
- warp_to 47, 2, UNDERGROUND_PATH_WEST_EAST_WIDTH ; UNDERGROUND_PATH_ROUTE_8
diff --git a/data/mapObjects/VermilionCity.asm b/data/mapObjects/VermilionCity.asm
deleted file mode 100755
index 646f126a..00000000
--- a/data/mapObjects/VermilionCity.asm
+++ /dev/null
@@ -1,42 +0,0 @@
-VermilionCity_Object:
- db $43 ; border block
-
- db 9 ; warps
- warp 11, 3, 0, VERMILION_POKECENTER
- warp 9, 13, 0, POKEMON_FAN_CLUB
- warp 23, 13, 0, VERMILION_MART
- warp 12, 19, 0, VERMILION_GYM
- warp 23, 19, 0, VERMILION_PIDGEY_HOUSE
- warp 18, 31, 0, VERMILION_DOCK
- warp 19, 31, 0, VERMILION_DOCK
- warp 15, 13, 0, VERMILION_TRADE_HOUSE
- warp 7, 3, 0, VERMILION_OLD_ROD_HOUSE
-
- db 7 ; signs
- sign 27, 3, 8 ; VermilionCityText7
- sign 37, 13, 9 ; VermilionCityText8
- sign 24, 13, 10 ; MartSignText
- sign 12, 3, 11 ; PokeCenterSignText
- sign 7, 13, 12 ; VermilionCityText11
- sign 7, 19, 13 ; VermilionCityText12
- sign 29, 15, 14 ; VermilionCityText13
-
- db 7 ; objects
- object SPRITE_LASS, 19, 7, WALK, 2, 1 ; person
- object SPRITE_GAMBLER, 14, 6, STAY, NONE, 2 ; person
- object SPRITE_SAILOR, 19, 30, STAY, UP, 3 ; person
- object SPRITE_GAMBLER, 30, 7, STAY, NONE, 4 ; person
- object SPRITE_SLOWBRO, 29, 9, WALK, 1, 5 ; person
- object SPRITE_SAILOR, 25, 27, WALK, 2, 6 ; person
- object SPRITE_OFFICER_JENNY, 19, 15, STAY, NONE, 7 ; person
-
- ; warp-to
- warp_to 11, 3, VERMILION_CITY_WIDTH ; VERMILION_POKECENTER
- warp_to 9, 13, VERMILION_CITY_WIDTH ; POKEMON_FAN_CLUB
- warp_to 23, 13, VERMILION_CITY_WIDTH ; VERMILION_MART
- warp_to 12, 19, VERMILION_CITY_WIDTH ; VERMILION_GYM
- warp_to 23, 19, VERMILION_CITY_WIDTH ; VERMILION_PIDGEY_HOUSE
- warp_to 18, 31, VERMILION_CITY_WIDTH ; VERMILION_DOCK
- warp_to 19, 31, VERMILION_CITY_WIDTH ; VERMILION_DOCK
- warp_to 15, 13, VERMILION_CITY_WIDTH ; VERMILION_TRADE_HOUSE
- warp_to 7, 3, VERMILION_CITY_WIDTH ; VERMILION_OLD_ROD_HOUSE
diff --git a/data/mapObjects/VermilionDock.asm b/data/mapObjects/VermilionDock.asm
deleted file mode 100755
index 6f07554a..00000000
--- a/data/mapObjects/VermilionDock.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-VermilionDock_Object:
- db $f ; border block
-
- db 2 ; warps
- warp 14, 0, 5, -1
- warp 14, 2, 1, SS_ANNE_1F
-
- db 0 ; signs
-
- db 0 ; objects
-
- ; warp-to
- warp_to 14, 0, VERMILION_DOCK_WIDTH
- warp_to 14, 2, VERMILION_DOCK_WIDTH ; SS_ANNE_1F
diff --git a/data/mapObjects/VermilionGym.asm b/data/mapObjects/VermilionGym.asm
deleted file mode 100755
index 4ace83be..00000000
--- a/data/mapObjects/VermilionGym.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-VermilionGym_Object:
- db $3 ; border block
-
- db 2 ; warps
- warp 4, 17, 3, -1
- warp 5, 17, 3, -1
-
- db 0 ; signs
-
- db 5 ; objects
- 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, 10, STAY, RIGHT, 4, OPP_SAILOR, 8
- object SPRITE_GYM_HELPER, 4, 14, STAY, DOWN, 5 ; person
-
- ; warp-to
- warp_to 4, 17, VERMILION_GYM_WIDTH
- warp_to 5, 17, VERMILION_GYM_WIDTH
diff --git a/data/mapObjects/VermilionMart.asm b/data/mapObjects/VermilionMart.asm
deleted file mode 100755
index 74bcf35f..00000000
--- a/data/mapObjects/VermilionMart.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-VermilionMart_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 2, -1
- warp 4, 7, 2, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person
- object SPRITE_BLACK_HAIR_BOY_1, 5, 6, STAY, NONE, 2 ; person
- object SPRITE_LASS, 3, 3, WALK, 2, 3 ; person
-
- ; warp-to
- warp_to 3, 7, VERMILION_MART_WIDTH
- warp_to 4, 7, VERMILION_MART_WIDTH
diff --git a/data/mapObjects/VermilionOldRodHouse.asm b/data/mapObjects/VermilionOldRodHouse.asm
deleted file mode 100755
index f5b4b96a..00000000
--- a/data/mapObjects/VermilionOldRodHouse.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-VermilionOldRodHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 8, -1
- warp 3, 7, 8, -1
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_FISHER, 2, 4, STAY, RIGHT, 1 ; person
-
- ; warp-to
- warp_to 2, 7, VERMILION_OLD_ROD_HOUSE_WIDTH
- warp_to 3, 7, VERMILION_OLD_ROD_HOUSE_WIDTH
diff --git a/data/mapObjects/VermilionPidgeyHouse.asm b/data/mapObjects/VermilionPidgeyHouse.asm
deleted file mode 100755
index 0e820f86..00000000
--- a/data/mapObjects/VermilionPidgeyHouse.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-VermilionPidgeyHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 4, -1
- warp 3, 7, 4, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_BUG_CATCHER, 5, 3, STAY, LEFT, 1 ; person
- object SPRITE_BIRD, 3, 5, WALK, 2, 2 ; person
- object SPRITE_PAPER_SHEET, 4, 3, STAY, NONE, 3 ; person
-
- ; warp-to
- warp_to 2, 7, VERMILION_PIDGEY_HOUSE_WIDTH
- warp_to 3, 7, VERMILION_PIDGEY_HOUSE_WIDTH
diff --git a/data/mapObjects/VermilionPokecenter.asm b/data/mapObjects/VermilionPokecenter.asm
deleted file mode 100755
index a99bdf28..00000000
--- a/data/mapObjects/VermilionPokecenter.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-VermilionPokecenter_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 0, -1
- warp 4, 7, 0, -1
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
- object SPRITE_FISHER, 10, 5, STAY, NONE, 2 ; person
- object SPRITE_SAILOR, 5, 4, STAY, NONE, 3 ; person
- object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person
- object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
-
- ; warp-to
- warp_to 3, 7, VERMILION_POKECENTER_WIDTH
- warp_to 4, 7, VERMILION_POKECENTER_WIDTH
diff --git a/data/mapObjects/VermilionTradeHouse.asm b/data/mapObjects/VermilionTradeHouse.asm
deleted file mode 100755
index fcf8a8e9..00000000
--- a/data/mapObjects/VermilionTradeHouse.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-VermilionTradeHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 7, -1
- warp 3, 7, 7, -1
-
- db 0 ; signs
-
- db 1 ; objects
- object SPRITE_GENTLEMAN, 3, 5, STAY, UP, 1 ; person
-
- ; warp-to
- warp_to 2, 7, VERMILION_TRADE_HOUSE_WIDTH
- warp_to 3, 7, VERMILION_TRADE_HOUSE_WIDTH
diff --git a/data/mapObjects/VictoryRoad1F.asm b/data/mapObjects/VictoryRoad1F.asm
deleted file mode 100755
index cc0c47ce..00000000
--- a/data/mapObjects/VictoryRoad1F.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-VictoryRoad1F_Object:
- db $7d ; border block
-
- db 3 ; warps
- warp 8, 17, 2, -1
- warp 9, 17, 2, -1
- warp 1, 1, 0, VICTORY_ROAD_2F
-
- db 0 ; signs
-
- db 7 ; objects
- 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, 11, 0, STAY, NONE, 3, TM_43
- object SPRITE_BALL, 9, 2, STAY, NONE, 4, RARE_CANDY
- object SPRITE_BOULDER, 5, 15, STAY, BOULDER_MOVEMENT_BYTE_2, 5 ; person
- object SPRITE_BOULDER, 14, 2, STAY, BOULDER_MOVEMENT_BYTE_2, 6 ; person
- object SPRITE_BOULDER, 2, 10, STAY, BOULDER_MOVEMENT_BYTE_2, 7 ; person
-
- ; warp-to
- warp_to 8, 17, VICTORY_ROAD_1F_WIDTH
- warp_to 9, 17, VICTORY_ROAD_1F_WIDTH
- warp_to 1, 1, VICTORY_ROAD_1F_WIDTH ; VICTORY_ROAD_2F
diff --git a/data/mapObjects/VictoryRoad2F.asm b/data/mapObjects/VictoryRoad2F.asm
deleted file mode 100755
index 55559bca..00000000
--- a/data/mapObjects/VictoryRoad2F.asm
+++ /dev/null
@@ -1,37 +0,0 @@
-VictoryRoad2F_Object:
- db $7d ; border block
-
- db 7 ; warps
- warp 0, 8, 2, VICTORY_ROAD_1F
- warp 29, 7, 3, -1
- warp 29, 8, 3, -1
- warp 23, 7, 0, VICTORY_ROAD_3F
- warp 25, 14, 2, VICTORY_ROAD_3F
- warp 27, 7, 1, VICTORY_ROAD_3F
- warp 1, 1, 3, VICTORY_ROAD_3F
-
- db 0 ; signs
-
- db 13 ; objects
- object SPRITE_HIKER, 12, 9, STAY, LEFT, 1, OPP_BLACKBELT, 9
- object SPRITE_BLACK_HAIR_BOY_2, 21, 13, STAY, LEFT, 2, OPP_JUGGLER, 2
- object SPRITE_BLACK_HAIR_BOY_1, 19, 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, 26, 3, STAY, LEFT, 5, OPP_JUGGLER, 5
- object SPRITE_BIRD, 11, 5, STAY, UP, 6, MOLTRES, 50
- object SPRITE_BALL, 27, 5, STAY, NONE, 7, TM_17
- object SPRITE_BALL, 18, 9, STAY, NONE, 8, FULL_HEAL
- object SPRITE_BALL, 9, 11, STAY, NONE, 9, TM_05
- object SPRITE_BALL, 11, 0, STAY, NONE, 10, GUARD_SPEC
- object SPRITE_BOULDER, 4, 14, STAY, BOULDER_MOVEMENT_BYTE_2, 11 ; person
- object SPRITE_BOULDER, 5, 5, STAY, BOULDER_MOVEMENT_BYTE_2, 12 ; person
- object SPRITE_BOULDER, 23, 16, STAY, BOULDER_MOVEMENT_BYTE_2, 13 ; person
-
- ; warp-to
- warp_to 0, 8, VICTORY_ROAD_2F_WIDTH ; VICTORY_ROAD_1F
- warp_to 29, 7, VICTORY_ROAD_2F_WIDTH
- warp_to 29, 8, VICTORY_ROAD_2F_WIDTH
- warp_to 23, 7, VICTORY_ROAD_2F_WIDTH ; VICTORY_ROAD_3F
- warp_to 25, 14, VICTORY_ROAD_2F_WIDTH ; VICTORY_ROAD_3F
- warp_to 27, 7, VICTORY_ROAD_2F_WIDTH ; VICTORY_ROAD_3F
- warp_to 1, 1, VICTORY_ROAD_2F_WIDTH ; VICTORY_ROAD_3F
diff --git a/data/mapObjects/VictoryRoad3F.asm b/data/mapObjects/VictoryRoad3F.asm
deleted file mode 100755
index 2eb42417..00000000
--- a/data/mapObjects/VictoryRoad3F.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-VictoryRoad3F_Object:
- db $7d ; border block
-
- db 4 ; warps
- warp 23, 7, 3, VICTORY_ROAD_2F
- warp 26, 8, 5, VICTORY_ROAD_2F
- warp 27, 15, 4, VICTORY_ROAD_2F
- warp 2, 0, 6, VICTORY_ROAD_2F
-
- db 0 ; signs
-
- db 10 ; objects
- object SPRITE_BLACK_HAIR_BOY_1, 28, 5, STAY, LEFT, 1, OPP_COOLTRAINER_M, 2
- object SPRITE_LASS, 7, 13, STAY, RIGHT, 2, OPP_COOLTRAINER_F, 2
- object SPRITE_BLACK_HAIR_BOY_1, 6, 14, STAY, LEFT, 3, OPP_COOLTRAINER_M, 3
- object SPRITE_LASS, 13, 3, STAY, RIGHT, 4, OPP_COOLTRAINER_F, 3
- object SPRITE_BALL, 26, 5, STAY, NONE, 5, MAX_REVIVE
- object SPRITE_BALL, 7, 7, STAY, NONE, 6, TM_47
- object SPRITE_BOULDER, 22, 3, STAY, BOULDER_MOVEMENT_BYTE_2, 7 ; person
- object SPRITE_BOULDER, 13, 12, STAY, BOULDER_MOVEMENT_BYTE_2, 8 ; person
- object SPRITE_BOULDER, 24, 10, STAY, BOULDER_MOVEMENT_BYTE_2, 9 ; person
- object SPRITE_BOULDER, 22, 15, STAY, BOULDER_MOVEMENT_BYTE_2, 10 ; person
-
- ; warp-to
- warp_to 23, 7, VICTORY_ROAD_3F_WIDTH ; VICTORY_ROAD_2F
- warp_to 26, 8, VICTORY_ROAD_3F_WIDTH ; VICTORY_ROAD_2F
- warp_to 27, 15, VICTORY_ROAD_3F_WIDTH ; VICTORY_ROAD_2F
- warp_to 2, 0, VICTORY_ROAD_3F_WIDTH ; VICTORY_ROAD_2F
diff --git a/data/mapObjects/ViridianCity.asm b/data/mapObjects/ViridianCity.asm
deleted file mode 100755
index 9a2a554d..00000000
--- a/data/mapObjects/ViridianCity.asm
+++ /dev/null
@@ -1,34 +0,0 @@
-ViridianCity_Object:
- db $f ; border block
-
- db 5 ; warps
- warp 23, 25, 0, VIRIDIAN_POKECENTER
- warp 29, 19, 0, VIRIDIAN_MART
- warp 21, 15, 0, VIRIDIAN_SCHOOL_HOUSE
- warp 21, 9, 0, VIRIDIAN_NICKNAME_HOUSE
- warp 32, 7, 0, VIRIDIAN_GYM
-
- db 6 ; signs
- sign 17, 17, 9 ; ViridianCityText8
- sign 19, 1, 10 ; ViridianCityText9
- sign 21, 29, 11 ; ViridianCityText10
- sign 30, 19, 12 ; MartSignText
- sign 24, 25, 13 ; PokeCenterSignText
- sign 27, 7, 14 ; ViridianCityText13
-
- db 8 ; objects
- object SPRITE_BUG_CATCHER, 13, 20, WALK, 0, 1 ; person
- object SPRITE_GAMBLER, 30, 8, STAY, NONE, 2 ; person
- object SPRITE_BUG_CATCHER, 30, 25, WALK, 0, 3 ; person
- object SPRITE_GIRL, 17, 9, STAY, RIGHT, 4 ; person
- object SPRITE_LYING_OLD_MAN, 18, 9, STAY, NONE, 5 ; person
- object SPRITE_FISHER2, 6, 23, STAY, DOWN, 6 ; person
- object SPRITE_GAMBLER, 17, 5, WALK, 2, 7 ; person
- object SPRITE_GAMBLER, 18, 9, STAY, NONE, 8
-
- ; warp-to
- warp_to 23, 25, VIRIDIAN_CITY_WIDTH ; VIRIDIAN_POKECENTER
- warp_to 29, 19, VIRIDIAN_CITY_WIDTH ; VIRIDIAN_MART
- warp_to 21, 15, VIRIDIAN_CITY_WIDTH ; VIRIDIAN_SCHOOL_HOUSE
- warp_to 21, 9, VIRIDIAN_CITY_WIDTH ; VIRIDIAN_NICKNAME_HOUSE
- warp_to 32, 7, VIRIDIAN_CITY_WIDTH ; VIRIDIAN_GYM
diff --git a/data/mapObjects/ViridianForest.asm b/data/mapObjects/ViridianForest.asm
deleted file mode 100755
index 94f74b96..00000000
--- a/data/mapObjects/ViridianForest.asm
+++ /dev/null
@@ -1,38 +0,0 @@
-ViridianForest_Object:
- db $3 ; border block
-
- db 6 ; warps
- warp 1, 0, 2, VIRIDIAN_FOREST_NORTH_GATE
- warp 2, 0, 2, VIRIDIAN_FOREST_NORTH_GATE
- warp 15, 47, 1, VIRIDIAN_FOREST_SOUTH_GATE
- warp 16, 47, 1, VIRIDIAN_FOREST_SOUTH_GATE
- warp 17, 47, 1, VIRIDIAN_FOREST_SOUTH_GATE
- warp 18, 47, 1, VIRIDIAN_FOREST_SOUTH_GATE
-
- db 6 ; signs
- sign 24, 40, 11 ; ViridianForestText9
- sign 16, 32, 12 ; ViridianForestText10
- sign 26, 17, 13 ; ViridianForestText11
- sign 4, 24, 14 ; ViridianForestText12
- sign 18, 45, 15 ; ViridianForestText13
- sign 2, 1, 16 ; ViridianForestText14
-
- db 10 ; objects
- object SPRITE_BUG_CATCHER, 16, 43, STAY, NONE, 1 ; person
- object SPRITE_BUG_CATCHER, 30, 33, STAY, LEFT, 2, OPP_BUG_CATCHER, 1
- object SPRITE_BUG_CATCHER, 30, 19, STAY, LEFT, 3, OPP_BUG_CATCHER, 2
- object SPRITE_BUG_CATCHER, 2, 18, STAY, LEFT, 4, OPP_BUG_CATCHER, 3
- object SPRITE_LASS, 2, 41, STAY, NONE, 5, OPP_LASS, 19
- object SPRITE_BUG_CATCHER, 13, 17, STAY, RIGHT, 6, OPP_BUG_CATCHER, 15
- object SPRITE_BALL, 25, 11, STAY, NONE, 7, POTION
- object SPRITE_BALL, 12, 29, STAY, NONE, 8, POTION
- object SPRITE_BALL, 1, 31, STAY, NONE, 9, POKE_BALL
- object SPRITE_BUG_CATCHER, 27, 40, STAY, NONE, 10 ; person
-
- ; warp-to
- warp_to 1, 0, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_NORTH_GATE
- warp_to 2, 0, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_NORTH_GATE
- warp_to 15, 47, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_SOUTH_GATE
- warp_to 16, 47, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_SOUTH_GATE
- warp_to 17, 47, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_SOUTH_GATE
- warp_to 18, 47, VIRIDIAN_FOREST_WIDTH ; VIRIDIAN_FOREST_SOUTH_GATE
diff --git a/data/mapObjects/ViridianForestNorthGate.asm b/data/mapObjects/ViridianForestNorthGate.asm
deleted file mode 100755
index 81e7fece..00000000
--- a/data/mapObjects/ViridianForestNorthGate.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-ViridianForestNorthGate_Object:
- db $a ; border block
-
- db 4 ; warps
- warp 4, 0, 1, -1
- warp 5, 0, 1, -1
- warp 4, 7, 0, VIRIDIAN_FOREST
- warp 5, 7, 0, VIRIDIAN_FOREST
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, 3, 2, STAY, NONE, 1 ; person
- object SPRITE_OLD_PERSON, 2, 5, STAY, NONE, 2 ; person
-
- ; warp-to
- warp_to 4, 0, VIRIDIAN_FOREST_NORTH_GATE_WIDTH
- warp_to 5, 0, VIRIDIAN_FOREST_NORTH_GATE_WIDTH
- warp_to 4, 7, VIRIDIAN_FOREST_NORTH_GATE_WIDTH ; VIRIDIAN_FOREST
- warp_to 5, 7, VIRIDIAN_FOREST_NORTH_GATE_WIDTH ; VIRIDIAN_FOREST
diff --git a/data/mapObjects/ViridianForestSouthGate.asm b/data/mapObjects/ViridianForestSouthGate.asm
deleted file mode 100755
index 47432513..00000000
--- a/data/mapObjects/ViridianForestSouthGate.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-ViridianForestSouthGate_Object:
- db $a ; border block
-
- db 4 ; warps
- warp 4, 0, 3, VIRIDIAN_FOREST
- warp 5, 0, 3, VIRIDIAN_FOREST
- warp 4, 7, 5, -1
- warp 5, 7, 5, -1
-
- db 0 ; signs
-
- db 2 ; objects
- object SPRITE_GIRL, 8, 4, STAY, LEFT, 1 ; person
- object SPRITE_LITTLE_GIRL, 2, 4, WALK, 1, 2 ; person
-
- ; warp-to
- warp_to 4, 0, VIRIDIAN_FOREST_SOUTH_GATE_WIDTH ; VIRIDIAN_FOREST
- warp_to 5, 0, VIRIDIAN_FOREST_SOUTH_GATE_WIDTH ; VIRIDIAN_FOREST
- warp_to 4, 7, VIRIDIAN_FOREST_SOUTH_GATE_WIDTH
- warp_to 5, 7, VIRIDIAN_FOREST_SOUTH_GATE_WIDTH
diff --git a/data/mapObjects/ViridianGym.asm b/data/mapObjects/ViridianGym.asm
deleted file mode 100755
index e3fd17bd..00000000
--- a/data/mapObjects/ViridianGym.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-ViridianGym_Object:
- db $3 ; border block
-
- db 2 ; warps
- warp 16, 17, 4, -1
- warp 17, 17, 4, -1
-
- db 0 ; signs
-
- db 11 ; objects
- object SPRITE_GIOVANNI, 2, 1, STAY, DOWN, 1, OPP_GIOVANNI, 3
- object SPRITE_BLACK_HAIR_BOY_1, 12, 7, STAY, DOWN, 2, OPP_COOLTRAINER_M, 9
- object SPRITE_HIKER, 11, 11, STAY, UP, 3, OPP_BLACKBELT, 6
- object SPRITE_ROCKER, 10, 7, STAY, DOWN, 4, OPP_TAMER, 3
- object SPRITE_HIKER, 3, 7, STAY, LEFT, 5, OPP_BLACKBELT, 7
- object SPRITE_BLACK_HAIR_BOY_1, 13, 5, STAY, RIGHT, 6, OPP_COOLTRAINER_M, 10
- object SPRITE_HIKER, 10, 1, STAY, DOWN, 7, OPP_BLACKBELT, 8
- object SPRITE_ROCKER, 2, 16, 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, 16, 15, STAY, DOWN, 10 ; person
- object SPRITE_BALL, 16, 9, STAY, NONE, 11, REVIVE
-
- ; warp-to
- warp_to 16, 17, VIRIDIAN_GYM_WIDTH
- warp_to 17, 17, VIRIDIAN_GYM_WIDTH
diff --git a/data/mapObjects/ViridianMart.asm b/data/mapObjects/ViridianMart.asm
deleted file mode 100755
index b3e7fee5..00000000
--- a/data/mapObjects/ViridianMart.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-ViridianMart_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 1, -1
- warp 4, 7, 1, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person
- object SPRITE_BUG_CATCHER, 5, 5, WALK, 1, 2 ; person
- object SPRITE_BLACK_HAIR_BOY_1, 3, 3, STAY, NONE, 3 ; person
-
- ; warp-to
- warp_to 3, 7, VIRIDIAN_MART_WIDTH
- warp_to 4, 7, VIRIDIAN_MART_WIDTH
diff --git a/data/mapObjects/ViridianNicknameHouse.asm b/data/mapObjects/ViridianNicknameHouse.asm
deleted file mode 100755
index aaf20a91..00000000
--- a/data/mapObjects/ViridianNicknameHouse.asm
+++ /dev/null
@@ -1,18 +0,0 @@
-ViridianNicknameHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 3, -1
- warp 3, 7, 3, -1
-
- db 0 ; signs
-
- db 4 ; objects
- object SPRITE_BALDING_GUY, 5, 3, STAY, NONE, 1 ; person
- object SPRITE_LITTLE_GIRL, 1, 4, WALK, 1, 2 ; person
- object SPRITE_BIRD, 5, 5, WALK, 2, 3 ; person
- object SPRITE_CLIPBOARD, 4, 0, STAY, NONE, 4 ; person
-
- ; warp-to
- warp_to 2, 7, VIRIDIAN_NICKNAME_HOUSE_WIDTH
- warp_to 3, 7, VIRIDIAN_NICKNAME_HOUSE_WIDTH
diff --git a/data/mapObjects/ViridianPokecenter.asm b/data/mapObjects/ViridianPokecenter.asm
deleted file mode 100755
index 70024ede..00000000
--- a/data/mapObjects/ViridianPokecenter.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-ViridianPokecenter_Object:
- db $0 ; border block
-
- db 2 ; warps
- warp 3, 7, 0, -1
- warp 4, 7, 0, -1
-
- db 0 ; signs
-
- db 5 ; objects
- object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
- object SPRITE_GENTLEMAN, 10, 5, WALK, 1, 2 ; person
- object SPRITE_BLACK_HAIR_BOY_1, 4, 3, STAY, UP, 3 ; person
- object SPRITE_CABLE_CLUB_WOMAN, 11, 2, STAY, DOWN, 4 ; person
- object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
-
- ; warp-to
- warp_to 3, 7, VIRIDIAN_POKECENTER_WIDTH
- warp_to 4, 7, VIRIDIAN_POKECENTER_WIDTH
diff --git a/data/mapObjects/ViridianSchoolHouse.asm b/data/mapObjects/ViridianSchoolHouse.asm
deleted file mode 100755
index 29b0614c..00000000
--- a/data/mapObjects/ViridianSchoolHouse.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-ViridianSchoolHouse_Object:
- db $a ; border block
-
- db 2 ; warps
- warp 2, 7, 2, -1
- warp 3, 7, 2, -1
-
- db 0 ; signs
-
- db 3 ; objects
- object SPRITE_BRUNETTE_GIRL, 3, 5, STAY, UP, 1 ; person
- object SPRITE_LASS, 4, 1, STAY, DOWN, 2 ; person
- object SPRITE_LITTLE_GIRL, 4, 5, STAY, UP, 3 ; person
-
- ; warp-to
- warp_to 2, 7, VIRIDIAN_SCHOOL_HOUSE_WIDTH
- warp_to 3, 7, VIRIDIAN_SCHOOL_HOUSE_WIDTH
diff --git a/data/mapObjects/WardensHouse.asm b/data/mapObjects/WardensHouse.asm
deleted file mode 100755
index d8445738..00000000
--- a/data/mapObjects/WardensHouse.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-WardensHouse_Object:
- db $17 ; border block
-
- db 2 ; warps
- warp 4, 7, 3, -1
- warp 5, 7, 3, -1
-
- db 2 ; signs
- sign 4, 3, 4 ; FuchsiaHouse2Text4
- sign 5, 3, 5 ; FuchsiaHouse2Text5
-
- db 3 ; objects
- object SPRITE_WARDEN, 2, 3, STAY, NONE, 1 ; person
- object SPRITE_BALL, 8, 3, STAY, NONE, 2, RARE_CANDY
- object SPRITE_BOULDER, 8, 4, STAY, BOULDER_MOVEMENT_BYTE_2, 3 ; person
-
- ; warp-to
- warp_to 4, 7, WARDENS_HOUSE_WIDTH
- warp_to 5, 7, WARDENS_HOUSE_WIDTH
diff --git a/data/map_header_banks.asm b/data/map_header_banks.asm
deleted file mode 100644
index f52f0d5f..00000000
--- a/data/map_header_banks.asm
+++ /dev/null
@@ -1,251 +0,0 @@
-; see also MapHeaderPointers
-MapHeaderBanks:
- db BANK(PalletTown_h)
- db BANK(ViridianCity_h)
- db BANK(PewterCity_h)
- db BANK(CeruleanCity_h)
- db BANK(LavenderTown_h)
- db BANK(VermilionCity_h)
- db BANK(CeladonCity_h)
- db BANK(FuchsiaCity_h)
- db BANK(CinnabarIsland_h)
- db BANK(IndigoPlateau_h)
- db BANK(SaffronCity_h)
- db $01 ; UNUSED_MAP_0B
- db BANK(Route1_h)
- db BANK(Route2_h)
- db BANK(Route3_h)
- db BANK(Route4_h)
- db BANK(Route5_h)
- db BANK(Route6_h)
- db BANK(Route7_h)
- db BANK(Route8_h)
- db BANK(Route9_h)
- db BANK(Route10_h)
- db BANK(Route11_h)
- db BANK(Route12_h)
- db BANK(Route13_h)
- db BANK(Route14_h)
- db BANK(Route15_h)
- db BANK(Route16_h)
- db BANK(Route17_h)
- db BANK(Route18_h)
- db BANK(Route19_h)
- db BANK(Route20_h)
- db BANK(Route21_h)
- db BANK(Route22_h)
- db BANK(Route23_h)
- db BANK(Route24_h)
- db BANK(Route25_h)
- db BANK(RedsHouse1F_h)
- db BANK(RedsHouse2F_h)
- db BANK(BluesHouse_h)
- db BANK(OaksLab_h)
- db BANK(ViridianPokecenter_h)
- db BANK(ViridianMart_h)
- db BANK(ViridianSchoolHouse_h)
- db BANK(ViridianNicknameHouse_h)
- db BANK(ViridianGym_h)
- db BANK(DiglettsCaveRoute2_h)
- db BANK(ViridianForestNorthGate_h)
- db BANK(Route2TradeHouse_h)
- db BANK(Route2Gate_h)
- db BANK(ViridianForestSouthGate_h)
- db BANK(ViridianForest_h)
- db BANK(Museum1F_h)
- db BANK(Museum2F_h)
- db BANK(PewterGym_h)
- db BANK(PewterNidoranHouse_h)
- db BANK(PewterMart_h)
- db BANK(PewterSpeechHouse_h)
- db BANK(PewterPokecenter_h)
- db BANK(MtMoon1F_h)
- db BANK(MtMoonB1F_h)
- db BANK(MtMoonB2F_h)
- db BANK(CeruleanTrashedHouse_h)
- db BANK(CeruleanTradeHouse_h)
- db BANK(CeruleanPokecenter_h)
- db BANK(CeruleanGym_h)
- db BANK(BikeShop_h)
- db BANK(CeruleanMart_h)
- db BANK(MtMoonPokecenter_h)
- db BANK(CeruleanTrashedHouse_h)
- db BANK(Route5Gate_h)
- db BANK(UndergroundPathRoute5_h)
- db BANK(Daycare_h)
- db BANK(Route6Gate_h)
- db BANK(UndergroundPathRoute6_h)
- db BANK(UndergroundPathRoute6_h) ; UNDERGROUND_PATH_ROUTE_6_COPY
- db BANK(Route7Gate_h)
- db BANK(UndergroundPathRoute7_h)
- db BANK(UndergroundPathRoute7Copy_h)
- db BANK(Route8Gate_h)
- db BANK(UndergroundPathRoute8_h)
- db BANK(RockTunnelPokecenter_h)
- db BANK(RockTunnel1F_h)
- db BANK(PowerPlant_h)
- db BANK(Route11Gate1F_h)
- db BANK(DiglettsCaveRoute11_h)
- db BANK(Route11Gate2F_h)
- db BANK(Route12Gate1F_h)
- db BANK(BillsHouse_h)
- db BANK(VermilionPokecenter_h)
- db BANK(PokemonFanClub_h)
- db BANK(VermilionMart_h)
- db BANK(VermilionGym_h)
- db BANK(VermilionPidgeyHouse_h)
- db BANK(VermilionDock_h)
- db BANK(SSAnne1F_h)
- db BANK(SSAnne2F_h)
- db BANK(SSAnne3F_h)
- db BANK(SSAnneB1F_h)
- db BANK(SSAnneBow_h)
- db BANK(SSAnneKitchen_h)
- db BANK(SSAnneCaptainsRoom_h)
- db BANK(SSAnne1FRooms_h)
- db BANK(SSAnne2FRooms_h)
- db BANK(SSAnneB1FRooms_h)
- db $1D ; UNUSED_MAP_69
- db $1D ; UNUSED_MAP_6A
- db $1D ; UNUSED_MAP_6B
- db BANK(VictoryRoad1F_h)
- db $1D ; UNUSED_MAP_6D
- db $1D ; UNUSED_MAP_6E
- db $1D ; UNUSED_MAP_6F
- db $1D ; UNUSED_MAP_70
- db BANK(LancesRoom_h)
- db $1D ; UNUSED_MAP_72
- db $1D ; UNUSED_MAP_73
- db $1D ; UNUSED_MAP_74
- db $1D ; UNUSED_MAP_75
- db BANK(HallOfFame_h)
- db BANK(UndergroundPathNorthSouth_h)
- db BANK(ChampionsRoom_h)
- db BANK(UndergroundPathWestEast_h)
- db BANK(CeladonMart1F_h)
- db BANK(CeladonMart2F_h)
- db BANK(CeladonMart3F_h)
- db BANK(CeladonMart4F_h)
- db BANK(CeladonMartRoof_h)
- db BANK(CeladonMartElevator_h)
- db BANK(CeladonMansion1F_h)
- db BANK(CeladonMansion2F_h)
- db BANK(CeladonMansion3F_h)
- db BANK(CeladonMansionRoof_h)
- db BANK(CeladonMansionRoofHouse_h)
- db BANK(CeladonPokecenter_h)
- db BANK(CeladonGym_h)
- db BANK(GameCorner_h)
- db BANK(CeladonMart5F_h)
- db BANK(GameCornerPrizeRoom_h)
- db BANK(CeladonDiner_h)
- db BANK(CeladonChiefHouse_h)
- db BANK(CeladonHotel_h)
- db BANK(LavenderPokecenter_h)
- db BANK(PokemonTower1F_h)
- db BANK(PokemonTower2F_h)
- db BANK(PokemonTower3F_h)
- db BANK(PokemonTower4F_h)
- db BANK(PokemonTower5F_h)
- db BANK(PokemonTower6F_h)
- db BANK(PokemonTower7F_h)
- db BANK(MrFujisHouse_h)
- db BANK(LavenderMart_h)
- db BANK(LavenderCuboneHouse_h)
- db BANK(FuchsiaMart_h)
- db BANK(FuchsiaBillsGrandpasHouse_h)
- db BANK(FuchsiaPokecenter_h)
- db BANK(WardensHouse_h)
- db BANK(SafariZoneGate_h)
- db BANK(FuchsiaGym_h)
- db BANK(FuchsiaMeetingRoom_h)
- db BANK(SeafoamIslandsB1F_h)
- db BANK(SeafoamIslandsB2F_h)
- db BANK(SeafoamIslandsB3F_h)
- db BANK(SeafoamIslandsB4F_h)
- db BANK(VermilionOldRodHouse_h)
- db BANK(FuchsiaGoodRodHouse_h)
- db BANK(PokemonMansion1F_h)
- db BANK(CinnabarGym_h)
- db BANK(CinnabarLab_h)
- db BANK(CinnabarLabTradeRoom_h)
- db BANK(CinnabarLabMetronomeRoom_h)
- db BANK(CinnabarLabFossilRoom_h)
- db BANK(CinnabarPokecenter_h)
- db BANK(CinnabarMart_h)
- db BANK(CinnabarMart_h)
- db BANK(IndigoPlateauLobby_h)
- db BANK(CopycatsHouse1F_h)
- db BANK(CopycatsHouse2F_h)
- db BANK(FightingDojo_h)
- db BANK(SaffronGym_h)
- db BANK(SaffronPidgeyHouse_h)
- db BANK(SaffronMart_h)
- db BANK(SilphCo1F_h)
- db BANK(SaffronPokecenter_h)
- db BANK(MrPsychicsHouse_h)
- db BANK(Route15Gate1F_h)
- db BANK(Route15Gate2F_h)
- db BANK(Route16Gate1F_h)
- db BANK(Route16Gate2F_h)
- db BANK(Route16FlyHouse_h)
- db BANK(Route12SuperRodHouse_h)
- db BANK(Route18Gate1F_h)
- db BANK(Route18Gate2F_h)
- db BANK(SeafoamIslands1F_h)
- db BANK(Route22Gate_h)
- db BANK(VictoryRoad2F_h)
- db BANK(Route12Gate2F_h)
- db BANK(VermilionTradeHouse_h)
- db BANK(DiglettsCave_h)
- db BANK(VictoryRoad3F_h)
- db BANK(RocketHideoutB1F_h)
- db BANK(RocketHideoutB2F_h)
- db BANK(RocketHideoutB3F_h)
- db BANK(RocketHideoutB4F_h)
- db BANK(RocketHideoutElevator_h)
- db $01 ; UNUSED_MAP_CC
- db $01 ; UNUSED_MAP_CD
- db $01 ; UNUSED_MAP_CE
- db BANK(SilphCo2F_h)
- db BANK(SilphCo3F_h)
- db BANK(SilphCo4F_h)
- db BANK(SilphCo5F_h)
- db BANK(SilphCo6F_h)
- db BANK(SilphCo7F_h)
- db BANK(SilphCo8F_h)
- db BANK(PokemonMansion2F_h)
- db BANK(PokemonMansion3F_h)
- db BANK(PokemonMansionB1F_h)
- db BANK(SafariZoneEast_h)
- db BANK(SafariZoneNorth_h)
- db BANK(SafariZoneWest_h)
- db BANK(SafariZoneCenter_h)
- db BANK(SafariZoneCenterRestHouse_h)
- db BANK(SafariZoneSecretHouse_h)
- db BANK(SafariZoneWestRestHouse_h)
- db BANK(SafariZoneEastRestHouse_h)
- db BANK(SafariZoneNorthRestHouse_h)
- db BANK(CeruleanCave2F_h)
- db BANK(CeruleanCaveB1F_h)
- db BANK(CeruleanCave1F_h)
- db BANK(NameRatersHouse_h)
- db BANK(CeruleanBadgeHouse_h)
- db $01 ; UNUSED_MAP_E7
- db BANK(RockTunnelB1F_h)
- db BANK(SilphCo9F_h)
- db BANK(SilphCo10F_h)
- db BANK(SilphCo11F_h)
- db BANK(SilphCoElevator_h)
- db $11 ; UNUSED_MAP_ED
- db $11 ; UNUSED_MAP_EE
- db BANK(TradeCenter_h)
- db BANK(Colosseum_h)
- db $11 ; UNUSED_MAP_F1
- db $11 ; UNUSED_MAP_F2
- db $11 ; UNUSED_MAP_F3
- db $11 ; UNUSED_MAP_F4
- db BANK(LoreleisRoom_h)
- db BANK(BrunosRoom_h)
- db BANK(AgathasRoom_h)
- db BANK(BeachHouse_h)
diff --git a/data/map_songs.asm b/data/map_songs.asm
deleted file mode 100644
index 63417ade..00000000
--- a/data/map_songs.asm
+++ /dev/null
@@ -1,250 +0,0 @@
-MapSongBanks:
- db MUSIC_PALLET_TOWN, BANK(Music_PalletTown) ; PALLET_TOWN
- db MUSIC_CITIES1, BANK(Music_Cities1) ; VIRIDIAN_CITY
- db MUSIC_CITIES1, BANK(Music_Cities1) ; PEWTER_CITY
- db MUSIC_CITIES2, BANK(Music_Cities2) ; CERULEAN_CITY
- db MUSIC_LAVENDER, BANK(Music_Lavender) ; LAVENDER_TOWN
- db MUSIC_VERMILION, BANK(Music_Vermilion) ; VERMILION_CITY
- db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_CITY
- db MUSIC_CITIES2, BANK(Music_Cities2) ; FUCHSIA_CITY
- db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; CINNABAR_ISLAND
- db MUSIC_INDIGO_PLATEAU, BANK(Music_IndigoPlateau) ; INDIGO_PLATEAU
- db MUSIC_CITIES1, BANK(Music_Cities1) ; SAFFRON_CITY
- db MUSIC_CITIES1, BANK(Music_Cities1) ; UNUSED_MAP_0B
- db MUSIC_ROUTES1, BANK(Music_Routes1) ; ROUTE_1
- db MUSIC_ROUTES1, BANK(Music_Routes1) ; ROUTE_2
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_3
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_4
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_5
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_6
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_7
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_8
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_9
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_10
- db MUSIC_ROUTES4, BANK(Music_Routes4) ; ROUTE_11
- db MUSIC_ROUTES4, BANK(Music_Routes4) ; ROUTE_12
- db MUSIC_ROUTES4, BANK(Music_Routes4) ; ROUTE_13
- db MUSIC_ROUTES4, BANK(Music_Routes4) ; ROUTE_14
- db MUSIC_ROUTES4, BANK(Music_Routes4) ; ROUTE_15
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_16
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_17
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_18
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_19
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_20
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_21
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_22
- db MUSIC_INDIGO_PLATEAU, BANK(Music_IndigoPlateau) ; ROUTE_23
- db MUSIC_ROUTES2, BANK(Music_Routes2) ; ROUTE_24
- db MUSIC_ROUTES2, BANK(Music_Routes2) ; ROUTE_25
- db MUSIC_PALLET_TOWN, BANK(Music_PalletTown) ; REDS_HOUSE_1F
- db MUSIC_PALLET_TOWN, BANK(Music_PalletTown) ; REDS_HOUSE_2F
- db MUSIC_PALLET_TOWN, BANK(Music_PalletTown) ; BLUES_HOUSE
- db MUSIC_OAKS_LAB, BANK(Music_OaksLab) ; OAKS_LAB
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; VIRIDIAN_POKECENTER
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; VIRIDIAN_MART
- db MUSIC_CITIES1, BANK(Music_Cities1) ; VIRIDIAN_SCHOOL_HOUSE
- db MUSIC_CITIES1, BANK(Music_Cities1) ; VIRIDIAN_NICKNAME_HOUSE
- db MUSIC_GYM, BANK(Music_Gym) ; VIRIDIAN_GYM
- db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; DIGLETTS_CAVE_ROUTE_2
- db MUSIC_CITIES1, BANK(Music_Cities1) ; VIRIDIAN_FOREST_NORTH_GATE
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_2_TRADE_HOUSE
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_2_GATE
- db MUSIC_CITIES1, BANK(Music_Cities1) ; VIRIDIAN_FOREST_SOUTH_GATE
- db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; VIRIDIAN_FOREST
- db MUSIC_CITIES1, BANK(Music_Cities1) ; MUSEUM_1F
- db MUSIC_CITIES1, BANK(Music_Cities1) ; MUSEUM_2F
- db MUSIC_GYM, BANK(Music_Gym) ; PEWTER_GYM
- db MUSIC_CITIES1, BANK(Music_Cities1) ; PEWTER_NIDORAN_HOUSE
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; PEWTER_MART
- db MUSIC_CITIES1, BANK(Music_Cities1) ; PEWTER_SPEECH_HOUSE
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; PEWTER_POKECENTER
- db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; MT_MOON_1F
- db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; MT_MOON_B1F
- db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; MT_MOON_B2F
- db MUSIC_CITIES2, BANK(Music_Cities2) ; CERULEAN_TRASHED_HOUSE
- db MUSIC_CITIES2, BANK(Music_Cities2) ; CERULEAN_TRADE_HOUSE
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CERULEAN_POKECENTER
- db MUSIC_GYM, BANK(Music_Gym) ; CERULEAN_GYM
- db MUSIC_CITIES2, BANK(Music_Cities2) ; BIKE_SHOP
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CERULEAN_MART
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; MT_MOON_POKECENTER
- db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; CERULEAN_TRASHED_HOUSE_COPY
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_5_GATE
- db MUSIC_CITIES1, BANK(Music_Cities1) ; UNDERGROUND_PATH_ROUTE_5
- db MUSIC_CITIES1, BANK(Music_Cities1) ; DAYCARE
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_6_GATE
- db MUSIC_CITIES1, BANK(Music_Cities1) ; UNDERGROUND_PATH_ROUTE_6
- db MUSIC_VERMILION, BANK(Music_Vermilion) ; UNDERGROUND_PATH_ROUTE_6_COPY
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_7_GATE
- db MUSIC_CITIES1, BANK(Music_Cities1) ; UNDERGROUND_PATH_ROUTE_7
- db MUSIC_CELADON, BANK(Music_Celadon) ; UNDERGROUND_PATH_ROUTE_7_COPY
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_8_GATE
- db MUSIC_CITIES1, BANK(Music_Cities1) ; UNDERGROUND_PATH_ROUTE_8
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; ROCK_TUNNEL_POKECENTER
- db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; ROCK_TUNNEL_1F
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; POWER_PLANT
- db MUSIC_VERMILION, BANK(Music_Vermilion) ; ROUTE_11_GATE_1F
- db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; DIGLETTS_CAVE_ROUTE_11
- db MUSIC_VERMILION, BANK(Music_Vermilion) ; ROUTE_11_GATE_2F
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_12_GATE_1F
- db MUSIC_CITIES2, BANK(Music_Cities2) ; BILLS_HOUSE
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; VERMILION_POKECENTER
- db MUSIC_VERMILION, BANK(Music_Vermilion) ; POKEMON_FAN_CLUB
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; VERMILION_MART
- db MUSIC_GYM, BANK(Music_Gym) ; VERMILION_GYM
- db MUSIC_VERMILION, BANK(Music_Vermilion) ; VERMILION_PIDGEY_HOUSE
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; VERMILION_DOCK
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_1F
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_2F
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_3F
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_B1F
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_BOW
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_KITCHEN
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_CAPTAINS_ROOM
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_1F_ROOMS
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_2F_ROOMS
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_B1F_ROOMS
- db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; UNUSED_MAP_69
- db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; UNUSED_MAP_6A
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; UNUSED_MAP_6B
- db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; VICTORY_ROAD_1F
- db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; UNUSED_MAP_6D
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; UNUSED_MAP_6E
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_6F
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_70
- db MUSIC_INDIGO_PLATEAU, BANK(Music_IndigoPlateau) ; LANCES_ROOM
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; UNUSED_MAP_72
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; UNUSED_MAP_73
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; UNUSED_MAP_74
- db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; UNUSED_MAP_75
- db MUSIC_PALLET_TOWN, BANK(Music_PalletTown) ; HALL_OF_FAME
- db MUSIC_ROUTES1, BANK(Music_Routes1) ; UNDERGROUND_PATH_NORTH_SOUTH
- db MUSIC_INDIGO_PLATEAU, BANK(Music_IndigoPlateau) ; CHAMPIONS_ROOM
- db MUSIC_ROUTES1, BANK(Music_Routes1) ; UNDERGROUND_PATH_WEST_EAST
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_1F
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_2F
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_3F
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_4F
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_ROOF
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_ELEVATOR
- db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_MANSION_1F
- db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_MANSION_2F
- db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_MANSION_3F
- db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_MANSION_ROOF
- db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_MANSION_ROOF_HOUSE
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_POKECENTER
- db MUSIC_GYM, BANK(Music_Gym) ; CELADON_GYM
- db MUSIC_GAME_CORNER, BANK(Music_GameCorner) ; GAME_CORNER
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_5F
- db MUSIC_CELADON, BANK(Music_Celadon) ; GAME_CORNER_PRIZE_ROOM
- db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_DINER
- db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_CHIEF_HOUSE
- db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_HOTEL
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; LAVENDER_POKECENTER
- db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_1F
- db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_2F
- db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_3F
- db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_4F
- db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_5F
- db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_6F
- db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_7F
- db MUSIC_LAVENDER, BANK(Music_Lavender) ; MR_FUJIS_HOUSE
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; LAVENDER_MART
- db MUSIC_LAVENDER, BANK(Music_Lavender) ; LAVENDER_CUBONE_HOUSE
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; FUCHSIA_MART
- db MUSIC_CITIES2, BANK(Music_Cities2) ; FUCHSIA_BILLS_GRANDPAS_HOUSE
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; FUCHSIA_POKECENTER
- db MUSIC_CITIES2, BANK(Music_Cities2) ; WARDENS_HOUSE
- db MUSIC_CITIES2, BANK(Music_Cities2) ; SAFARI_ZONE_GATE
- db MUSIC_GYM, BANK(Music_Gym) ; FUCHSIA_GYM
- db MUSIC_CITIES2, BANK(Music_Cities2) ; FUCHSIA_MEETING_ROOM
- db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; SEAFOAM_ISLANDS_B1F
- db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; SEAFOAM_ISLANDS_B2F
- db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; SEAFOAM_ISLANDS_B3F
- db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; SEAFOAM_ISLANDS_B4F
- db MUSIC_CITIES2, BANK(Music_Cities2) ; VERMILION_OLD_ROD_HOUSE
- db MUSIC_CITIES2, BANK(Music_Cities2) ; FUCHSIA_GOOD_ROD_HOUSE
- db MUSIC_CINNABAR_MANSION, BANK(Music_CinnabarMansion) ; POKEMON_MANSION_1F
- db MUSIC_GYM, BANK(Music_Gym) ; CINNABAR_GYM
- db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; CINNABAR_LAB
- db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; CINNABAR_LAB_TRADE_ROOM
- db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; CINNABAR_LAB_METRONOME_ROOM
- db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; CINNABAR_LAB_FOSSIL_ROOM
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CINNABAR_POKECENTER
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CINNABAR_MART
- db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; CINNABAR_MART_COPY
- db MUSIC_INDIGO_PLATEAU, BANK(Music_IndigoPlateau) ; INDIGO_PLATEAU_LOBBY
- db MUSIC_CITIES1, BANK(Music_Cities1) ; COPYCATS_HOUSE_1F
- db MUSIC_CITIES1, BANK(Music_Cities1) ; COPYCATS_HOUSE_2F
- db MUSIC_CITIES1, BANK(Music_Cities1) ; FIGHTING_DOJO
- db MUSIC_GYM, BANK(Music_Gym) ; SAFFRON_GYM
- db MUSIC_CITIES1, BANK(Music_Cities1) ; SAFFRON_PIDGEY_HOUSE
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; SAFFRON_MART
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_1F
- db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; SAFFRON_POKECENTER
- db MUSIC_CITIES1, BANK(Music_Cities1) ; MR_PSYCHICS_HOUSE
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_15_GATE_1F
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_15_GATE_2F
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_16_GATE_1F
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_16_GATE_2F
- db MUSIC_CELADON, BANK(Music_Celadon) ; ROUTE_16_FLY_HOUSE
- db MUSIC_CELADON, BANK(Music_Celadon) ; ROUTE_12_SUPER_ROD_HOUSE
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_18_GATE_1F
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_18_GATE_2F
- db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; SEAFOAM_ISLANDS_1F
- db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; ROUTE_22_GATE
- db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; VICTORY_ROAD_2F
- db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_12_GATE_2F
- db MUSIC_VERMILION, BANK(Music_Vermilion) ; VERMILION_TRADE_HOUSE
- db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; DIGLETTS_CAVE
- db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; VICTORY_ROAD_3F
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; ROCKET_HIDEOUT_B1F
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; ROCKET_HIDEOUT_B2F
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; ROCKET_HIDEOUT_B3F
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; ROCKET_HIDEOUT_B4F
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; ROCKET_HIDEOUT_ELEVATOR
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; UNUSED_MAP_CC
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; UNUSED_MAP_CD
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; UNUSED_MAP_CE
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_2F
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_3F
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_4F
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_5F
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_6F
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_7F
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_8F
- db MUSIC_CINNABAR_MANSION, BANK(Music_CinnabarMansion) ; POKEMON_MANSION_2F
- db MUSIC_CINNABAR_MANSION, BANK(Music_CinnabarMansion) ; POKEMON_MANSION_3F
- db MUSIC_CINNABAR_MANSION, BANK(Music_CinnabarMansion) ; POKEMON_MANSION_B1F
- db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_EAST
- db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_NORTH
- db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_WEST
- db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_CENTER
- db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_CENTER_REST_HOUSE
- db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_SECRET_HOUSE
- db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_WEST_REST_HOUSE
- db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_EAST_REST_HOUSE
- db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_NORTH_REST_HOUSE
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; CERULEAN_CAVE_2F
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; CERULEAN_CAVE_B1F
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; CERULEAN_CAVE_1F
- db MUSIC_CITIES2, BANK(Music_Cities2) ; NAME_RATERS_HOUSE
- db MUSIC_CITIES1, BANK(Music_Cities1) ; CERULEAN_BADGE_HOUSE
- db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; UNUSED_MAP_E7
- db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; ROCK_TUNNEL_B1F
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_9F
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_10F
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_11F
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_ELEVATOR
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_ED
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_EE
- db MUSIC_CELADON, BANK(Music_Celadon) ; TRADE_CENTER
- db MUSIC_CELADON, BANK(Music_Celadon) ; COLOSSEUM
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_F1
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_F2
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_F3
- db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_F4
- db MUSIC_GYM, BANK(Music_Gym) ; LORELEIS_ROOM
- db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; BRUNOS_ROOM
- db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; AGATHAS_ROOM
- db MUSIC_ROUTES3, BANK(Music_Routes3) ; BEACH_HOUSE
diff --git a/data/maps/badge_maps.asm b/data/maps/badge_maps.asm
new file mode 100644
index 00000000..6b68be02
--- /dev/null
+++ b/data/maps/badge_maps.asm
@@ -0,0 +1,10 @@
+MapBadgeFlags:
+ db PEWTER_GYM, 1 << BIT_BOULDERBADGE
+ db CERULEAN_GYM, 1 << BIT_CASCADEBADGE
+ db VERMILION_GYM, 1 << BIT_THUNDERBADGE
+ db CELADON_GYM, 1 << BIT_RAINBOWBADGE
+ db FUCHSIA_GYM, 1 << BIT_SOULBADGE
+ db SAFFRON_GYM, 1 << BIT_MARSHBADGE
+ db CINNABAR_GYM, 1 << BIT_VOLCANOBADGE
+ db VIRIDIAN_GYM, 1 << BIT_EARTHBADGE
+ db -1 ; end
diff --git a/data/maps/dungeon_maps.asm b/data/maps/dungeon_maps.asm
new file mode 100644
index 00000000..d647923c
--- /dev/null
+++ b/data/maps/dungeon_maps.asm
@@ -0,0 +1,27 @@
+; GetBattleTransitionID_IsDungeonMap fails to recognize
+; VICTORY_ROAD_2F, VICTORY_ROAD_3F, all ROCKET_HIDEOUT maps,
+; POKEMON_MANSION_1F, SEAFOAM_ISLANDS_[B1F-B4F], POWER_PLANT,
+; DIGLETTS_CAVE, and SILPH_CO_[9-11]F as dungeon maps
+
+; GetBattleTransitionID_IsDungeonMap checks if wCurMap
+; is equal to one of these maps
+DungeonMaps1:
+ db VIRIDIAN_FOREST
+ db ROCK_TUNNEL_1F
+ db SEAFOAM_ISLANDS_1F
+ db ROCK_TUNNEL_B1F
+ db -1 ; end
+
+; GetBattleTransitionID_IsDungeonMap checks if wCurMap
+; is in between or equal to each pair of maps
+DungeonMaps2:
+ ; all MT_MOON maps
+ db MT_MOON_1F, MT_MOON_B2F
+ ; all SS_ANNE maps, VICTORY_ROAD_1F, LANCES_ROOM, and HALL_OF_FAME
+ db SS_ANNE_1F, HALL_OF_FAME
+ ; all POKEMON_TOWER maps and Lavender Town buildings
+ db LAVENDER_POKECENTER, LAVENDER_CUBONE_HOUSE
+ ; SILPH_CO_[2-8]F, POKEMON_MANSION[2F-B1F], SAFARI_ZONE, and
+ ; CERULEAN_CAVE maps, except for SILPH_CO_1F
+ db SILPH_CO_2F, CERULEAN_CAVE_1F
+ db -1 ; end
diff --git a/data/maps/force_bike_surf.asm b/data/maps/force_bike_surf.asm
new file mode 100755
index 00000000..74eba325
--- /dev/null
+++ b/data/maps/force_bike_surf.asm
@@ -0,0 +1,15 @@
+force_bike_surf: MACRO
+ db \1, \3, \2
+ENDM
+
+ForcedBikeOrSurfMaps:
+ ; map id, x, y
+ force_bike_surf ROUTE_16, 17, 10
+ force_bike_surf ROUTE_16, 17, 11
+ force_bike_surf ROUTE_18, 33, 8
+ force_bike_surf ROUTE_18, 33, 9
+ force_bike_surf SEAFOAM_ISLANDS_B3F, 18, 7
+ force_bike_surf SEAFOAM_ISLANDS_B3F, 19, 7
+ force_bike_surf SEAFOAM_ISLANDS_B4F, 4, 14
+ force_bike_surf SEAFOAM_ISLANDS_B4F, 5, 14
+ db -1 ; end
diff --git a/data/maps/headers/AgathasRoom.asm b/data/maps/headers/AgathasRoom.asm
new file mode 100755
index 00000000..d04e0cfd
--- /dev/null
+++ b/data/maps/headers/AgathasRoom.asm
@@ -0,0 +1,3 @@
+
+ map_header AgathasRoom, AGATHAS_ROOM, CEMETERY, 0
+ end_map_header
diff --git a/data/mapHeaders/BeachHouse.asm b/data/maps/headers/BeachHouse.asm
index b1b69e5a..b1b69e5a 100644
--- a/data/mapHeaders/BeachHouse.asm
+++ b/data/maps/headers/BeachHouse.asm
diff --git a/data/maps/headers/BikeShop.asm b/data/maps/headers/BikeShop.asm
new file mode 100755
index 00000000..b4b520e2
--- /dev/null
+++ b/data/maps/headers/BikeShop.asm
@@ -0,0 +1,3 @@
+
+ map_header BikeShop, BIKE_SHOP, CLUB, 0
+ end_map_header
diff --git a/data/maps/headers/BillsHouse.asm b/data/maps/headers/BillsHouse.asm
new file mode 100755
index 00000000..6063175d
--- /dev/null
+++ b/data/maps/headers/BillsHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header BillsHouse, BILLS_HOUSE, INTERIOR, 0
+ end_map_header
diff --git a/data/maps/headers/BluesHouse.asm b/data/maps/headers/BluesHouse.asm
new file mode 100755
index 00000000..33cee254
--- /dev/null
+++ b/data/maps/headers/BluesHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header BluesHouse, BLUES_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/BrunosRoom.asm b/data/maps/headers/BrunosRoom.asm
new file mode 100755
index 00000000..a0b2d4fd
--- /dev/null
+++ b/data/maps/headers/BrunosRoom.asm
@@ -0,0 +1,3 @@
+
+ map_header BrunosRoom, BRUNOS_ROOM, GYM, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonChiefHouse.asm b/data/maps/headers/CeladonChiefHouse.asm
new file mode 100755
index 00000000..34f17273
--- /dev/null
+++ b/data/maps/headers/CeladonChiefHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonChiefHouse, CELADON_CHIEF_HOUSE, MANSION, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonCity.asm b/data/maps/headers/CeladonCity.asm
new file mode 100755
index 00000000..6faa6f48
--- /dev/null
+++ b/data/maps/headers/CeladonCity.asm
@@ -0,0 +1,5 @@
+
+ map_header CeladonCity, CELADON_CITY, OVERWORLD, WEST | EAST
+ connection west, Route16, ROUTE_16, 4
+ connection east, Route7, ROUTE_7, 4
+ end_map_header
diff --git a/data/maps/headers/CeladonDiner.asm b/data/maps/headers/CeladonDiner.asm
new file mode 100755
index 00000000..b18d9633
--- /dev/null
+++ b/data/maps/headers/CeladonDiner.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonDiner, CELADON_DINER, LOBBY, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonGym.asm b/data/maps/headers/CeladonGym.asm
new file mode 100755
index 00000000..2302c65a
--- /dev/null
+++ b/data/maps/headers/CeladonGym.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonGym, CELADON_GYM, GYM, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonHotel.asm b/data/maps/headers/CeladonHotel.asm
new file mode 100755
index 00000000..2339c14d
--- /dev/null
+++ b/data/maps/headers/CeladonHotel.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonHotel, CELADON_HOTEL, POKECENTER, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonMansion1F.asm b/data/maps/headers/CeladonMansion1F.asm
new file mode 100755
index 00000000..45970028
--- /dev/null
+++ b/data/maps/headers/CeladonMansion1F.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonMansion1F, CELADON_MANSION_1F, MANSION, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonMansion2F.asm b/data/maps/headers/CeladonMansion2F.asm
new file mode 100755
index 00000000..d5e3e77b
--- /dev/null
+++ b/data/maps/headers/CeladonMansion2F.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonMansion2F, CELADON_MANSION_2F, MANSION, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonMansion3F.asm b/data/maps/headers/CeladonMansion3F.asm
new file mode 100755
index 00000000..7566caad
--- /dev/null
+++ b/data/maps/headers/CeladonMansion3F.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonMansion3F, CELADON_MANSION_3F, MANSION, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonMansionRoof.asm b/data/maps/headers/CeladonMansionRoof.asm
new file mode 100755
index 00000000..9cbae6f6
--- /dev/null
+++ b/data/maps/headers/CeladonMansionRoof.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonMansionRoof, CELADON_MANSION_ROOF, MANSION, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonMansionRoofHouse.asm b/data/maps/headers/CeladonMansionRoofHouse.asm
new file mode 100755
index 00000000..cb80fac8
--- /dev/null
+++ b/data/maps/headers/CeladonMansionRoofHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonMansionRoofHouse, CELADON_MANSION_ROOF_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonMart1F.asm b/data/maps/headers/CeladonMart1F.asm
new file mode 100755
index 00000000..30bd9ba9
--- /dev/null
+++ b/data/maps/headers/CeladonMart1F.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonMart1F, CELADON_MART_1F, LOBBY, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonMart2F.asm b/data/maps/headers/CeladonMart2F.asm
new file mode 100755
index 00000000..d78dfe28
--- /dev/null
+++ b/data/maps/headers/CeladonMart2F.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonMart2F, CELADON_MART_2F, LOBBY, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonMart3F.asm b/data/maps/headers/CeladonMart3F.asm
new file mode 100755
index 00000000..ad415eee
--- /dev/null
+++ b/data/maps/headers/CeladonMart3F.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonMart3F, CELADON_MART_3F, LOBBY, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonMart4F.asm b/data/maps/headers/CeladonMart4F.asm
new file mode 100755
index 00000000..b9ce5b34
--- /dev/null
+++ b/data/maps/headers/CeladonMart4F.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonMart4F, CELADON_MART_4F, LOBBY, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonMart5F.asm b/data/maps/headers/CeladonMart5F.asm
new file mode 100755
index 00000000..04d65b2b
--- /dev/null
+++ b/data/maps/headers/CeladonMart5F.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonMart5F, CELADON_MART_5F, LOBBY, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonMartElevator.asm b/data/maps/headers/CeladonMartElevator.asm
new file mode 100755
index 00000000..2a98ccb0
--- /dev/null
+++ b/data/maps/headers/CeladonMartElevator.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonMartElevator, CELADON_MART_ELEVATOR, LOBBY, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonMartRoof.asm b/data/maps/headers/CeladonMartRoof.asm
new file mode 100755
index 00000000..823ff25f
--- /dev/null
+++ b/data/maps/headers/CeladonMartRoof.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonMartRoof, CELADON_MART_ROOF, LOBBY, 0
+ end_map_header
diff --git a/data/maps/headers/CeladonPokecenter.asm b/data/maps/headers/CeladonPokecenter.asm
new file mode 100755
index 00000000..378a41ec
--- /dev/null
+++ b/data/maps/headers/CeladonPokecenter.asm
@@ -0,0 +1,3 @@
+
+ map_header CeladonPokecenter, CELADON_POKECENTER, POKECENTER, 0
+ end_map_header
diff --git a/data/maps/headers/CeruleanBadgeHouse.asm b/data/maps/headers/CeruleanBadgeHouse.asm
new file mode 100755
index 00000000..47a97b14
--- /dev/null
+++ b/data/maps/headers/CeruleanBadgeHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header CeruleanBadgeHouse, CERULEAN_BADGE_HOUSE, SHIP, 0
+ end_map_header
diff --git a/data/maps/headers/CeruleanCave1F.asm b/data/maps/headers/CeruleanCave1F.asm
new file mode 100755
index 00000000..7c80bbeb
--- /dev/null
+++ b/data/maps/headers/CeruleanCave1F.asm
@@ -0,0 +1,3 @@
+
+ map_header CeruleanCave1F, CERULEAN_CAVE_1F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/CeruleanCave2F.asm b/data/maps/headers/CeruleanCave2F.asm
new file mode 100755
index 00000000..353e265b
--- /dev/null
+++ b/data/maps/headers/CeruleanCave2F.asm
@@ -0,0 +1,3 @@
+
+ map_header CeruleanCave2F, CERULEAN_CAVE_2F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/CeruleanCaveB1F.asm b/data/maps/headers/CeruleanCaveB1F.asm
new file mode 100755
index 00000000..d759aa6b
--- /dev/null
+++ b/data/maps/headers/CeruleanCaveB1F.asm
@@ -0,0 +1,3 @@
+
+ map_header CeruleanCaveB1F, CERULEAN_CAVE_B1F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/CeruleanCity.asm b/data/maps/headers/CeruleanCity.asm
new file mode 100755
index 00000000..c925713c
--- /dev/null
+++ b/data/maps/headers/CeruleanCity.asm
@@ -0,0 +1,7 @@
+
+ map_header CeruleanCity, CERULEAN_CITY, OVERWORLD, NORTH | SOUTH | WEST | EAST
+ connection north, Route24, ROUTE_24, 5
+ connection south, Route5, ROUTE_5, 5
+ connection west, Route4, ROUTE_4, 4
+ connection east, Route9, ROUTE_9, 4
+ end_map_header
diff --git a/data/maps/headers/CeruleanGym.asm b/data/maps/headers/CeruleanGym.asm
new file mode 100755
index 00000000..b1010ac3
--- /dev/null
+++ b/data/maps/headers/CeruleanGym.asm
@@ -0,0 +1,3 @@
+
+ map_header CeruleanGym, CERULEAN_GYM, GYM, 0
+ end_map_header
diff --git a/data/maps/headers/CeruleanMart.asm b/data/maps/headers/CeruleanMart.asm
new file mode 100755
index 00000000..2ee31666
--- /dev/null
+++ b/data/maps/headers/CeruleanMart.asm
@@ -0,0 +1,3 @@
+
+ map_header CeruleanMart, CERULEAN_MART, MART, 0
+ end_map_header
diff --git a/data/maps/headers/CeruleanPokecenter.asm b/data/maps/headers/CeruleanPokecenter.asm
new file mode 100755
index 00000000..b79e7aff
--- /dev/null
+++ b/data/maps/headers/CeruleanPokecenter.asm
@@ -0,0 +1,3 @@
+
+ map_header CeruleanPokecenter, CERULEAN_POKECENTER, POKECENTER, 0
+ end_map_header
diff --git a/data/maps/headers/CeruleanTradeHouse.asm b/data/maps/headers/CeruleanTradeHouse.asm
new file mode 100755
index 00000000..20970b77
--- /dev/null
+++ b/data/maps/headers/CeruleanTradeHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header CeruleanTradeHouse, CERULEAN_TRADE_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/CeruleanTrashedHouse.asm b/data/maps/headers/CeruleanTrashedHouse.asm
new file mode 100755
index 00000000..192a4195
--- /dev/null
+++ b/data/maps/headers/CeruleanTrashedHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header CeruleanTrashedHouse, CERULEAN_TRASHED_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/ChampionsRoom.asm b/data/maps/headers/ChampionsRoom.asm
new file mode 100755
index 00000000..aadc70a6
--- /dev/null
+++ b/data/maps/headers/ChampionsRoom.asm
@@ -0,0 +1,3 @@
+
+ map_header ChampionsRoom, CHAMPIONS_ROOM, GYM, $0
+ end_map_header
diff --git a/data/maps/headers/CinnabarGym.asm b/data/maps/headers/CinnabarGym.asm
new file mode 100755
index 00000000..cc6dc1d7
--- /dev/null
+++ b/data/maps/headers/CinnabarGym.asm
@@ -0,0 +1,3 @@
+
+ map_header CinnabarGym, CINNABAR_GYM, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/CinnabarIsland.asm b/data/maps/headers/CinnabarIsland.asm
new file mode 100755
index 00000000..a94498be
--- /dev/null
+++ b/data/maps/headers/CinnabarIsland.asm
@@ -0,0 +1,5 @@
+
+ map_header CinnabarIsland, CINNABAR_ISLAND, OVERWORLD, NORTH | EAST
+ connection north, Route21, ROUTE_21, 0
+ connection east, Route20, ROUTE_20, 0
+ end_map_header
diff --git a/data/maps/headers/CinnabarLab.asm b/data/maps/headers/CinnabarLab.asm
new file mode 100755
index 00000000..e8081e75
--- /dev/null
+++ b/data/maps/headers/CinnabarLab.asm
@@ -0,0 +1,3 @@
+
+ map_header CinnabarLab, CINNABAR_LAB, LAB, 0
+ end_map_header
diff --git a/data/maps/headers/CinnabarLabFossilRoom.asm b/data/maps/headers/CinnabarLabFossilRoom.asm
new file mode 100755
index 00000000..3cb88437
--- /dev/null
+++ b/data/maps/headers/CinnabarLabFossilRoom.asm
@@ -0,0 +1,3 @@
+
+ map_header CinnabarLabFossilRoom, CINNABAR_LAB_FOSSIL_ROOM, LAB, 0
+ end_map_header
diff --git a/data/maps/headers/CinnabarLabMetronomeRoom.asm b/data/maps/headers/CinnabarLabMetronomeRoom.asm
new file mode 100755
index 00000000..d77338c8
--- /dev/null
+++ b/data/maps/headers/CinnabarLabMetronomeRoom.asm
@@ -0,0 +1,3 @@
+
+ map_header CinnabarLabMetronomeRoom, CINNABAR_LAB_METRONOME_ROOM, LAB, 0
+ end_map_header
diff --git a/data/maps/headers/CinnabarLabTradeRoom.asm b/data/maps/headers/CinnabarLabTradeRoom.asm
new file mode 100755
index 00000000..c23d9c15
--- /dev/null
+++ b/data/maps/headers/CinnabarLabTradeRoom.asm
@@ -0,0 +1,3 @@
+
+ map_header CinnabarLabTradeRoom, CINNABAR_LAB_TRADE_ROOM, LAB, 0
+ end_map_header
diff --git a/data/maps/headers/CinnabarMart.asm b/data/maps/headers/CinnabarMart.asm
new file mode 100755
index 00000000..c68d582a
--- /dev/null
+++ b/data/maps/headers/CinnabarMart.asm
@@ -0,0 +1,3 @@
+
+ map_header CinnabarMart, CINNABAR_MART, MART, 0
+ end_map_header
diff --git a/data/maps/headers/CinnabarPokecenter.asm b/data/maps/headers/CinnabarPokecenter.asm
new file mode 100755
index 00000000..d910133b
--- /dev/null
+++ b/data/maps/headers/CinnabarPokecenter.asm
@@ -0,0 +1,3 @@
+
+ map_header CinnabarPokecenter, CINNABAR_POKECENTER, POKECENTER, 0
+ end_map_header
diff --git a/data/maps/headers/Colosseum.asm b/data/maps/headers/Colosseum.asm
new file mode 100755
index 00000000..faf03eb4
--- /dev/null
+++ b/data/maps/headers/Colosseum.asm
@@ -0,0 +1,3 @@
+
+ map_header Colosseum, COLOSSEUM, CLUB, 0
+ end_map_header
diff --git a/data/maps/headers/CopycatsHouse1F.asm b/data/maps/headers/CopycatsHouse1F.asm
new file mode 100755
index 00000000..532cef93
--- /dev/null
+++ b/data/maps/headers/CopycatsHouse1F.asm
@@ -0,0 +1,3 @@
+
+ map_header CopycatsHouse1F, COPYCATS_HOUSE_1F, REDS_HOUSE_1, 0
+ end_map_header
diff --git a/data/maps/headers/CopycatsHouse2F.asm b/data/maps/headers/CopycatsHouse2F.asm
new file mode 100755
index 00000000..38b1fbbb
--- /dev/null
+++ b/data/maps/headers/CopycatsHouse2F.asm
@@ -0,0 +1,3 @@
+
+ map_header CopycatsHouse2F, COPYCATS_HOUSE_2F, REDS_HOUSE_2, 0
+ end_map_header
diff --git a/data/maps/headers/Daycare.asm b/data/maps/headers/Daycare.asm
new file mode 100755
index 00000000..dabeedd9
--- /dev/null
+++ b/data/maps/headers/Daycare.asm
@@ -0,0 +1,3 @@
+
+ map_header Daycare, DAYCARE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/DiglettsCave.asm b/data/maps/headers/DiglettsCave.asm
new file mode 100755
index 00000000..d3777d31
--- /dev/null
+++ b/data/maps/headers/DiglettsCave.asm
@@ -0,0 +1,3 @@
+
+ map_header DiglettsCave, DIGLETTS_CAVE, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/DiglettsCaveRoute11.asm b/data/maps/headers/DiglettsCaveRoute11.asm
new file mode 100755
index 00000000..d8bdd704
--- /dev/null
+++ b/data/maps/headers/DiglettsCaveRoute11.asm
@@ -0,0 +1,3 @@
+
+ map_header DiglettsCaveRoute11, DIGLETTS_CAVE_ROUTE_11, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/DiglettsCaveRoute2.asm b/data/maps/headers/DiglettsCaveRoute2.asm
new file mode 100755
index 00000000..86f5ae35
--- /dev/null
+++ b/data/maps/headers/DiglettsCaveRoute2.asm
@@ -0,0 +1,3 @@
+
+ map_header DiglettsCaveRoute2, DIGLETTS_CAVE_ROUTE_2, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/FightingDojo.asm b/data/maps/headers/FightingDojo.asm
new file mode 100755
index 00000000..7ecadc57
--- /dev/null
+++ b/data/maps/headers/FightingDojo.asm
@@ -0,0 +1,3 @@
+
+ map_header FightingDojo, FIGHTING_DOJO, DOJO, 0
+ end_map_header
diff --git a/data/maps/headers/FuchsiaBillsGrandpasHouse.asm b/data/maps/headers/FuchsiaBillsGrandpasHouse.asm
new file mode 100755
index 00000000..10ba48e9
--- /dev/null
+++ b/data/maps/headers/FuchsiaBillsGrandpasHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header FuchsiaBillsGrandpasHouse, FUCHSIA_BILLS_GRANDPAS_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/FuchsiaCity.asm b/data/maps/headers/FuchsiaCity.asm
new file mode 100755
index 00000000..6028bce0
--- /dev/null
+++ b/data/maps/headers/FuchsiaCity.asm
@@ -0,0 +1,6 @@
+
+ map_header FuchsiaCity, FUCHSIA_CITY, OVERWORLD, SOUTH | WEST | EAST
+ connection south, Route19, ROUTE_19, 5
+ connection west, Route18, ROUTE_18, 4
+ connection east, Route15, ROUTE_15, 4
+ end_map_header
diff --git a/data/maps/headers/FuchsiaGoodRodHouse.asm b/data/maps/headers/FuchsiaGoodRodHouse.asm
new file mode 100755
index 00000000..d21611c1
--- /dev/null
+++ b/data/maps/headers/FuchsiaGoodRodHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header FuchsiaGoodRodHouse, FUCHSIA_GOOD_ROD_HOUSE, SHIP, 0
+ end_map_header
diff --git a/data/maps/headers/FuchsiaGym.asm b/data/maps/headers/FuchsiaGym.asm
new file mode 100755
index 00000000..44be2971
--- /dev/null
+++ b/data/maps/headers/FuchsiaGym.asm
@@ -0,0 +1,3 @@
+
+ map_header FuchsiaGym, FUCHSIA_GYM, GYM, 0
+ end_map_header
diff --git a/data/maps/headers/FuchsiaMart.asm b/data/maps/headers/FuchsiaMart.asm
new file mode 100755
index 00000000..120fe305
--- /dev/null
+++ b/data/maps/headers/FuchsiaMart.asm
@@ -0,0 +1,3 @@
+
+ map_header FuchsiaMart, FUCHSIA_MART, MART, 0
+ end_map_header
diff --git a/data/maps/headers/FuchsiaMeetingRoom.asm b/data/maps/headers/FuchsiaMeetingRoom.asm
new file mode 100755
index 00000000..a5ab4f04
--- /dev/null
+++ b/data/maps/headers/FuchsiaMeetingRoom.asm
@@ -0,0 +1,3 @@
+
+ map_header FuchsiaMeetingRoom, FUCHSIA_MEETING_ROOM, LAB, 0
+ end_map_header
diff --git a/data/maps/headers/FuchsiaPokecenter.asm b/data/maps/headers/FuchsiaPokecenter.asm
new file mode 100755
index 00000000..c1c683bd
--- /dev/null
+++ b/data/maps/headers/FuchsiaPokecenter.asm
@@ -0,0 +1,3 @@
+
+ map_header FuchsiaPokecenter, FUCHSIA_POKECENTER, POKECENTER, 0
+ end_map_header
diff --git a/data/maps/headers/GameCorner.asm b/data/maps/headers/GameCorner.asm
new file mode 100755
index 00000000..ad367b93
--- /dev/null
+++ b/data/maps/headers/GameCorner.asm
@@ -0,0 +1,3 @@
+
+ map_header GameCorner, GAME_CORNER, LOBBY, 0
+ end_map_header
diff --git a/data/maps/headers/GameCornerPrizeRoom.asm b/data/maps/headers/GameCornerPrizeRoom.asm
new file mode 100755
index 00000000..4668cbb8
--- /dev/null
+++ b/data/maps/headers/GameCornerPrizeRoom.asm
@@ -0,0 +1,3 @@
+
+ map_header GameCornerPrizeRoom, GAME_CORNER_PRIZE_ROOM, LOBBY, 0
+ end_map_header
diff --git a/data/maps/headers/HallOfFame.asm b/data/maps/headers/HallOfFame.asm
new file mode 100755
index 00000000..e2dc3fb3
--- /dev/null
+++ b/data/maps/headers/HallOfFame.asm
@@ -0,0 +1,3 @@
+
+ map_header HallOfFame, HALL_OF_FAME, GYM, 0
+ end_map_header
diff --git a/data/maps/headers/IndigoPlateau.asm b/data/maps/headers/IndigoPlateau.asm
new file mode 100755
index 00000000..ff394dfe
--- /dev/null
+++ b/data/maps/headers/IndigoPlateau.asm
@@ -0,0 +1,4 @@
+
+ map_header IndigoPlateau, INDIGO_PLATEAU, PLATEAU, SOUTH
+ connection south, Route23, ROUTE_23, 0
+ end_map_header
diff --git a/data/maps/headers/IndigoPlateauLobby.asm b/data/maps/headers/IndigoPlateauLobby.asm
new file mode 100755
index 00000000..b13afa12
--- /dev/null
+++ b/data/maps/headers/IndigoPlateauLobby.asm
@@ -0,0 +1,3 @@
+
+ map_header IndigoPlateauLobby, INDIGO_PLATEAU_LOBBY, MART, 0
+ end_map_header
diff --git a/data/maps/headers/LancesRoom.asm b/data/maps/headers/LancesRoom.asm
new file mode 100755
index 00000000..0b69970e
--- /dev/null
+++ b/data/maps/headers/LancesRoom.asm
@@ -0,0 +1,3 @@
+
+ map_header LancesRoom, LANCES_ROOM, DOJO, 0
+ end_map_header
diff --git a/data/maps/headers/LavenderCuboneHouse.asm b/data/maps/headers/LavenderCuboneHouse.asm
new file mode 100755
index 00000000..dfd38ff1
--- /dev/null
+++ b/data/maps/headers/LavenderCuboneHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header LavenderCuboneHouse, LAVENDER_CUBONE_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/LavenderMart.asm b/data/maps/headers/LavenderMart.asm
new file mode 100755
index 00000000..82c239e6
--- /dev/null
+++ b/data/maps/headers/LavenderMart.asm
@@ -0,0 +1,3 @@
+
+ map_header LavenderMart, LAVENDER_MART, MART, 0
+ end_map_header
diff --git a/data/maps/headers/LavenderPokecenter.asm b/data/maps/headers/LavenderPokecenter.asm
new file mode 100755
index 00000000..c0cd0adf
--- /dev/null
+++ b/data/maps/headers/LavenderPokecenter.asm
@@ -0,0 +1,3 @@
+
+ map_header LavenderPokecenter, LAVENDER_POKECENTER, POKECENTER, 0
+ end_map_header
diff --git a/data/maps/headers/LavenderTown.asm b/data/maps/headers/LavenderTown.asm
new file mode 100755
index 00000000..7c1c9c46
--- /dev/null
+++ b/data/maps/headers/LavenderTown.asm
@@ -0,0 +1,6 @@
+
+ map_header LavenderTown, LAVENDER_TOWN, OVERWORLD, NORTH | SOUTH | WEST
+ connection north, Route10, ROUTE_10, 0
+ connection south, Route12, ROUTE_12, 0
+ connection west, Route8, ROUTE_8, 0
+ end_map_header
diff --git a/data/maps/headers/LoreleisRoom.asm b/data/maps/headers/LoreleisRoom.asm
new file mode 100755
index 00000000..feff946c
--- /dev/null
+++ b/data/maps/headers/LoreleisRoom.asm
@@ -0,0 +1,3 @@
+
+ map_header LoreleisRoom, LORELEIS_ROOM, GYM, 0
+ end_map_header
diff --git a/data/maps/headers/MrFujisHouse.asm b/data/maps/headers/MrFujisHouse.asm
new file mode 100755
index 00000000..023cb501
--- /dev/null
+++ b/data/maps/headers/MrFujisHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header MrFujisHouse, MR_FUJIS_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/MrPsychicsHouse.asm b/data/maps/headers/MrPsychicsHouse.asm
new file mode 100755
index 00000000..628db044
--- /dev/null
+++ b/data/maps/headers/MrPsychicsHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header MrPsychicsHouse, MR_PSYCHICS_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/MtMoon1F.asm b/data/maps/headers/MtMoon1F.asm
new file mode 100755
index 00000000..8de2be3e
--- /dev/null
+++ b/data/maps/headers/MtMoon1F.asm
@@ -0,0 +1,3 @@
+
+ map_header MtMoon1F, MT_MOON_1F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/MtMoonB1F.asm b/data/maps/headers/MtMoonB1F.asm
new file mode 100755
index 00000000..9c97b5c7
--- /dev/null
+++ b/data/maps/headers/MtMoonB1F.asm
@@ -0,0 +1,3 @@
+
+ map_header MtMoonB1F, MT_MOON_B1F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/MtMoonB2F.asm b/data/maps/headers/MtMoonB2F.asm
new file mode 100755
index 00000000..0ed1f96e
--- /dev/null
+++ b/data/maps/headers/MtMoonB2F.asm
@@ -0,0 +1,3 @@
+
+ map_header MtMoonB2F, MT_MOON_B2F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/MtMoonPokecenter.asm b/data/maps/headers/MtMoonPokecenter.asm
new file mode 100755
index 00000000..0425eae7
--- /dev/null
+++ b/data/maps/headers/MtMoonPokecenter.asm
@@ -0,0 +1,3 @@
+
+ map_header MtMoonPokecenter, MT_MOON_POKECENTER, POKECENTER, 0
+ end_map_header
diff --git a/data/maps/headers/Museum1F.asm b/data/maps/headers/Museum1F.asm
new file mode 100755
index 00000000..d92176d2
--- /dev/null
+++ b/data/maps/headers/Museum1F.asm
@@ -0,0 +1,3 @@
+
+ map_header Museum1F, MUSEUM_1F, MUSEUM, 0
+ end_map_header
diff --git a/data/maps/headers/Museum2F.asm b/data/maps/headers/Museum2F.asm
new file mode 100755
index 00000000..d5bf8918
--- /dev/null
+++ b/data/maps/headers/Museum2F.asm
@@ -0,0 +1,3 @@
+
+ map_header Museum2F, MUSEUM_2F, MUSEUM, 0
+ end_map_header
diff --git a/data/maps/headers/NameRatersHouse.asm b/data/maps/headers/NameRatersHouse.asm
new file mode 100755
index 00000000..3f9010f0
--- /dev/null
+++ b/data/maps/headers/NameRatersHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header NameRatersHouse, NAME_RATERS_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/OaksLab.asm b/data/maps/headers/OaksLab.asm
new file mode 100755
index 00000000..42bb76e8
--- /dev/null
+++ b/data/maps/headers/OaksLab.asm
@@ -0,0 +1,3 @@
+
+ map_header OaksLab, OAKS_LAB, DOJO, 0
+ end_map_header
diff --git a/data/maps/headers/PalletTown.asm b/data/maps/headers/PalletTown.asm
new file mode 100755
index 00000000..2745bdc1
--- /dev/null
+++ b/data/maps/headers/PalletTown.asm
@@ -0,0 +1,5 @@
+
+ map_header PalletTown, PALLET_TOWN, OVERWORLD, NORTH | SOUTH
+ connection north, Route1, ROUTE_1, 0
+ connection south, Route21, ROUTE_21, 0
+ end_map_header
diff --git a/data/maps/headers/PewterCity.asm b/data/maps/headers/PewterCity.asm
new file mode 100755
index 00000000..268adb7a
--- /dev/null
+++ b/data/maps/headers/PewterCity.asm
@@ -0,0 +1,5 @@
+
+ map_header PewterCity, PEWTER_CITY, OVERWORLD, SOUTH | EAST
+ connection south, Route2, ROUTE_2, 5
+ connection east, Route3, ROUTE_3, 4
+ end_map_header
diff --git a/data/maps/headers/PewterGym.asm b/data/maps/headers/PewterGym.asm
new file mode 100755
index 00000000..a1659e42
--- /dev/null
+++ b/data/maps/headers/PewterGym.asm
@@ -0,0 +1,3 @@
+
+ map_header PewterGym, PEWTER_GYM, GYM, 0
+ end_map_header
diff --git a/data/maps/headers/PewterMart.asm b/data/maps/headers/PewterMart.asm
new file mode 100755
index 00000000..c9b24eb2
--- /dev/null
+++ b/data/maps/headers/PewterMart.asm
@@ -0,0 +1,3 @@
+
+ map_header PewterMart, PEWTER_MART, MART, 0
+ end_map_header
diff --git a/data/maps/headers/PewterNidoranHouse.asm b/data/maps/headers/PewterNidoranHouse.asm
new file mode 100755
index 00000000..ee2e46ca
--- /dev/null
+++ b/data/maps/headers/PewterNidoranHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header PewterNidoranHouse, PEWTER_NIDORAN_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/PewterPokecenter.asm b/data/maps/headers/PewterPokecenter.asm
new file mode 100755
index 00000000..4e420bf8
--- /dev/null
+++ b/data/maps/headers/PewterPokecenter.asm
@@ -0,0 +1,3 @@
+
+ map_header PewterPokecenter, PEWTER_POKECENTER, POKECENTER, 0
+ end_map_header
diff --git a/data/maps/headers/PewterSpeechHouse.asm b/data/maps/headers/PewterSpeechHouse.asm
new file mode 100755
index 00000000..a378d61e
--- /dev/null
+++ b/data/maps/headers/PewterSpeechHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header PewterSpeechHouse, PEWTER_SPEECH_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/PokemonFanClub.asm b/data/maps/headers/PokemonFanClub.asm
new file mode 100755
index 00000000..b4ff8e1c
--- /dev/null
+++ b/data/maps/headers/PokemonFanClub.asm
@@ -0,0 +1,3 @@
+
+ map_header PokemonFanClub, POKEMON_FAN_CLUB, INTERIOR, 0
+ end_map_header
diff --git a/data/maps/headers/PokemonMansion1F.asm b/data/maps/headers/PokemonMansion1F.asm
new file mode 100755
index 00000000..9407f956
--- /dev/null
+++ b/data/maps/headers/PokemonMansion1F.asm
@@ -0,0 +1,3 @@
+
+ map_header PokemonMansion1F, POKEMON_MANSION_1F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/PokemonMansion2F.asm b/data/maps/headers/PokemonMansion2F.asm
new file mode 100755
index 00000000..deb7c84f
--- /dev/null
+++ b/data/maps/headers/PokemonMansion2F.asm
@@ -0,0 +1,3 @@
+
+ map_header PokemonMansion2F, POKEMON_MANSION_2F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/PokemonMansion3F.asm b/data/maps/headers/PokemonMansion3F.asm
new file mode 100755
index 00000000..e4baa709
--- /dev/null
+++ b/data/maps/headers/PokemonMansion3F.asm
@@ -0,0 +1,3 @@
+
+ map_header PokemonMansion3F, POKEMON_MANSION_3F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/PokemonMansionB1F.asm b/data/maps/headers/PokemonMansionB1F.asm
new file mode 100755
index 00000000..0aae67e6
--- /dev/null
+++ b/data/maps/headers/PokemonMansionB1F.asm
@@ -0,0 +1,3 @@
+
+ map_header PokemonMansionB1F, POKEMON_MANSION_B1F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/PokemonTower1F.asm b/data/maps/headers/PokemonTower1F.asm
new file mode 100755
index 00000000..185fd2c0
--- /dev/null
+++ b/data/maps/headers/PokemonTower1F.asm
@@ -0,0 +1,3 @@
+
+ map_header PokemonTower1F, POKEMON_TOWER_1F, CEMETERY, 0
+ end_map_header
diff --git a/data/maps/headers/PokemonTower2F.asm b/data/maps/headers/PokemonTower2F.asm
new file mode 100755
index 00000000..5a6046c8
--- /dev/null
+++ b/data/maps/headers/PokemonTower2F.asm
@@ -0,0 +1,3 @@
+
+ map_header PokemonTower2F, POKEMON_TOWER_2F, CEMETERY, 0
+ end_map_header
diff --git a/data/maps/headers/PokemonTower3F.asm b/data/maps/headers/PokemonTower3F.asm
new file mode 100755
index 00000000..49ebc4e7
--- /dev/null
+++ b/data/maps/headers/PokemonTower3F.asm
@@ -0,0 +1,3 @@
+
+ map_header PokemonTower3F, POKEMON_TOWER_3F, CEMETERY, 0
+ end_map_header
diff --git a/data/maps/headers/PokemonTower4F.asm b/data/maps/headers/PokemonTower4F.asm
new file mode 100755
index 00000000..0eb9a0d6
--- /dev/null
+++ b/data/maps/headers/PokemonTower4F.asm
@@ -0,0 +1,3 @@
+
+ map_header PokemonTower4F, POKEMON_TOWER_4F, CEMETERY, 0
+ end_map_header
diff --git a/data/maps/headers/PokemonTower5F.asm b/data/maps/headers/PokemonTower5F.asm
new file mode 100755
index 00000000..e58c63c6
--- /dev/null
+++ b/data/maps/headers/PokemonTower5F.asm
@@ -0,0 +1,3 @@
+
+ map_header PokemonTower5F, POKEMON_TOWER_5F, CEMETERY, 0
+ end_map_header
diff --git a/data/maps/headers/PokemonTower6F.asm b/data/maps/headers/PokemonTower6F.asm
new file mode 100755
index 00000000..ba53347b
--- /dev/null
+++ b/data/maps/headers/PokemonTower6F.asm
@@ -0,0 +1,3 @@
+
+ map_header PokemonTower6F, POKEMON_TOWER_6F, CEMETERY, 0
+ end_map_header
diff --git a/data/maps/headers/PokemonTower7F.asm b/data/maps/headers/PokemonTower7F.asm
new file mode 100755
index 00000000..bd9f839b
--- /dev/null
+++ b/data/maps/headers/PokemonTower7F.asm
@@ -0,0 +1,3 @@
+
+ map_header PokemonTower7F, POKEMON_TOWER_7F, CEMETERY, 0
+ end_map_header
diff --git a/data/maps/headers/PowerPlant.asm b/data/maps/headers/PowerPlant.asm
new file mode 100755
index 00000000..88d82ae2
--- /dev/null
+++ b/data/maps/headers/PowerPlant.asm
@@ -0,0 +1,3 @@
+
+ map_header PowerPlant, POWER_PLANT, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/RedsHouse1F.asm b/data/maps/headers/RedsHouse1F.asm
new file mode 100755
index 00000000..018bdc80
--- /dev/null
+++ b/data/maps/headers/RedsHouse1F.asm
@@ -0,0 +1,3 @@
+
+ map_header RedsHouse1F, REDS_HOUSE_1F, REDS_HOUSE_1, 0
+ end_map_header
diff --git a/data/maps/headers/RedsHouse2F.asm b/data/maps/headers/RedsHouse2F.asm
new file mode 100755
index 00000000..10332e2c
--- /dev/null
+++ b/data/maps/headers/RedsHouse2F.asm
@@ -0,0 +1,3 @@
+
+ map_header RedsHouse2F, REDS_HOUSE_2F, REDS_HOUSE_2, $00
+ end_map_header
diff --git a/data/maps/headers/RockTunnel1F.asm b/data/maps/headers/RockTunnel1F.asm
new file mode 100755
index 00000000..268ee645
--- /dev/null
+++ b/data/maps/headers/RockTunnel1F.asm
@@ -0,0 +1,3 @@
+
+ map_header RockTunnel1F, ROCK_TUNNEL_1F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/RockTunnelB1F.asm b/data/maps/headers/RockTunnelB1F.asm
new file mode 100755
index 00000000..7b13f647
--- /dev/null
+++ b/data/maps/headers/RockTunnelB1F.asm
@@ -0,0 +1,3 @@
+
+ map_header RockTunnelB1F, ROCK_TUNNEL_B1F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/RockTunnelPokecenter.asm b/data/maps/headers/RockTunnelPokecenter.asm
new file mode 100755
index 00000000..a873854b
--- /dev/null
+++ b/data/maps/headers/RockTunnelPokecenter.asm
@@ -0,0 +1,3 @@
+
+ map_header RockTunnelPokecenter, ROCK_TUNNEL_POKECENTER, POKECENTER, 0
+ end_map_header
diff --git a/data/maps/headers/RocketHideoutB1F.asm b/data/maps/headers/RocketHideoutB1F.asm
new file mode 100755
index 00000000..521a6693
--- /dev/null
+++ b/data/maps/headers/RocketHideoutB1F.asm
@@ -0,0 +1,3 @@
+
+ map_header RocketHideoutB1F, ROCKET_HIDEOUT_B1F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/RocketHideoutB2F.asm b/data/maps/headers/RocketHideoutB2F.asm
new file mode 100755
index 00000000..ab2a965d
--- /dev/null
+++ b/data/maps/headers/RocketHideoutB2F.asm
@@ -0,0 +1,3 @@
+
+ map_header RocketHideoutB2F, ROCKET_HIDEOUT_B2F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/RocketHideoutB3F.asm b/data/maps/headers/RocketHideoutB3F.asm
new file mode 100755
index 00000000..0a04b00e
--- /dev/null
+++ b/data/maps/headers/RocketHideoutB3F.asm
@@ -0,0 +1,3 @@
+
+ map_header RocketHideoutB3F, ROCKET_HIDEOUT_B3F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/RocketHideoutB4F.asm b/data/maps/headers/RocketHideoutB4F.asm
new file mode 100755
index 00000000..11512c01
--- /dev/null
+++ b/data/maps/headers/RocketHideoutB4F.asm
@@ -0,0 +1,3 @@
+
+ map_header RocketHideoutB4F, ROCKET_HIDEOUT_B4F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/RocketHideoutElevator.asm b/data/maps/headers/RocketHideoutElevator.asm
new file mode 100755
index 00000000..90ece237
--- /dev/null
+++ b/data/maps/headers/RocketHideoutElevator.asm
@@ -0,0 +1,3 @@
+
+ map_header RocketHideoutElevator, ROCKET_HIDEOUT_ELEVATOR, LOBBY, 0
+ end_map_header
diff --git a/data/maps/headers/Route1.asm b/data/maps/headers/Route1.asm
new file mode 100755
index 00000000..6eeb0347
--- /dev/null
+++ b/data/maps/headers/Route1.asm
@@ -0,0 +1,5 @@
+
+ map_header Route1, ROUTE_1, OVERWORLD, NORTH | SOUTH
+ connection north, ViridianCity, VIRIDIAN_CITY, -5
+ connection south, PalletTown, PALLET_TOWN, 0
+ end_map_header
diff --git a/data/maps/headers/Route10.asm b/data/maps/headers/Route10.asm
new file mode 100755
index 00000000..ba498b0a
--- /dev/null
+++ b/data/maps/headers/Route10.asm
@@ -0,0 +1,5 @@
+
+ map_header Route10, ROUTE_10, OVERWORLD, SOUTH | WEST
+ connection south, LavenderTown, LAVENDER_TOWN, 0
+ connection west, Route9, ROUTE_9, 0
+ end_map_header
diff --git a/data/maps/headers/Route11.asm b/data/maps/headers/Route11.asm
new file mode 100755
index 00000000..d8f2e72f
--- /dev/null
+++ b/data/maps/headers/Route11.asm
@@ -0,0 +1,5 @@
+
+ map_header Route11, ROUTE_11, OVERWORLD, WEST | EAST
+ connection west, VermilionCity, VERMILION_CITY, -4
+ connection east, Route12, ROUTE_12, -27
+ end_map_header
diff --git a/data/maps/headers/Route11Gate1F.asm b/data/maps/headers/Route11Gate1F.asm
new file mode 100755
index 00000000..aa97b791
--- /dev/null
+++ b/data/maps/headers/Route11Gate1F.asm
@@ -0,0 +1,3 @@
+
+ map_header Route11Gate1F, ROUTE_11_GATE_1F, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route11Gate2F.asm b/data/maps/headers/Route11Gate2F.asm
new file mode 100755
index 00000000..560d38db
--- /dev/null
+++ b/data/maps/headers/Route11Gate2F.asm
@@ -0,0 +1,3 @@
+
+ map_header Route11Gate2F, ROUTE_11_GATE_2F, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route12.asm b/data/maps/headers/Route12.asm
new file mode 100755
index 00000000..931ddf1d
--- /dev/null
+++ b/data/maps/headers/Route12.asm
@@ -0,0 +1,6 @@
+
+ map_header Route12, ROUTE_12, OVERWORLD, NORTH | SOUTH | WEST
+ connection north, LavenderTown, LAVENDER_TOWN, 0
+ connection south, Route13, ROUTE_13, -20
+ connection west, Route11, ROUTE_11, 27
+ end_map_header
diff --git a/data/maps/headers/Route12Gate1F.asm b/data/maps/headers/Route12Gate1F.asm
new file mode 100755
index 00000000..047a670c
--- /dev/null
+++ b/data/maps/headers/Route12Gate1F.asm
@@ -0,0 +1,3 @@
+
+ map_header Route12Gate1F, ROUTE_12_GATE_1F, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route12Gate2F.asm b/data/maps/headers/Route12Gate2F.asm
new file mode 100755
index 00000000..e1366736
--- /dev/null
+++ b/data/maps/headers/Route12Gate2F.asm
@@ -0,0 +1,3 @@
+
+ map_header Route12Gate2F, ROUTE_12_GATE_2F, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route12SuperRodHouse.asm b/data/maps/headers/Route12SuperRodHouse.asm
new file mode 100755
index 00000000..2195a9b1
--- /dev/null
+++ b/data/maps/headers/Route12SuperRodHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header Route12SuperRodHouse, ROUTE_12_SUPER_ROD_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/Route13.asm b/data/maps/headers/Route13.asm
new file mode 100755
index 00000000..242aaa02
--- /dev/null
+++ b/data/maps/headers/Route13.asm
@@ -0,0 +1,5 @@
+
+ map_header Route13, ROUTE_13, OVERWORLD, NORTH | WEST
+ connection north, Route12, ROUTE_12, 20
+ connection west, Route14, ROUTE_14, 0
+ end_map_header
diff --git a/data/maps/headers/Route14.asm b/data/maps/headers/Route14.asm
new file mode 100755
index 00000000..c0c39c56
--- /dev/null
+++ b/data/maps/headers/Route14.asm
@@ -0,0 +1,5 @@
+
+ map_header Route14, ROUTE_14, OVERWORLD, WEST | EAST
+ connection west, Route15, ROUTE_15, 18
+ connection east, Route13, ROUTE_13, 0
+ end_map_header
diff --git a/data/maps/headers/Route15.asm b/data/maps/headers/Route15.asm
new file mode 100755
index 00000000..28a811d2
--- /dev/null
+++ b/data/maps/headers/Route15.asm
@@ -0,0 +1,5 @@
+
+ map_header Route15, ROUTE_15, OVERWORLD, WEST | EAST
+ connection west, FuchsiaCity, FUCHSIA_CITY, -4
+ connection east, Route14, ROUTE_14, -18
+ end_map_header
diff --git a/data/maps/headers/Route15Gate1F.asm b/data/maps/headers/Route15Gate1F.asm
new file mode 100755
index 00000000..a23d15a0
--- /dev/null
+++ b/data/maps/headers/Route15Gate1F.asm
@@ -0,0 +1,3 @@
+
+ map_header Route15Gate1F, ROUTE_15_GATE_1F, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route15Gate2F.asm b/data/maps/headers/Route15Gate2F.asm
new file mode 100755
index 00000000..8ca89872
--- /dev/null
+++ b/data/maps/headers/Route15Gate2F.asm
@@ -0,0 +1,3 @@
+
+ map_header Route15Gate2F, ROUTE_15_GATE_2F, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route16.asm b/data/maps/headers/Route16.asm
new file mode 100755
index 00000000..423c7af2
--- /dev/null
+++ b/data/maps/headers/Route16.asm
@@ -0,0 +1,5 @@
+
+ map_header Route16, ROUTE_16, OVERWORLD, SOUTH | EAST
+ connection south, Route17, ROUTE_17, 0
+ connection east, CeladonCity, CELADON_CITY, -4
+ end_map_header
diff --git a/data/maps/headers/Route16FlyHouse.asm b/data/maps/headers/Route16FlyHouse.asm
new file mode 100755
index 00000000..240b6df4
--- /dev/null
+++ b/data/maps/headers/Route16FlyHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header Route16FlyHouse, ROUTE_16_FLY_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/Route16Gate1F.asm b/data/maps/headers/Route16Gate1F.asm
new file mode 100755
index 00000000..74fd1b7f
--- /dev/null
+++ b/data/maps/headers/Route16Gate1F.asm
@@ -0,0 +1,3 @@
+
+ map_header Route16Gate1F, ROUTE_16_GATE_1F, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route16Gate2F.asm b/data/maps/headers/Route16Gate2F.asm
new file mode 100755
index 00000000..ed889f4b
--- /dev/null
+++ b/data/maps/headers/Route16Gate2F.asm
@@ -0,0 +1,3 @@
+
+ map_header Route16Gate2F, ROUTE_16_GATE_2F, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route17.asm b/data/maps/headers/Route17.asm
new file mode 100755
index 00000000..5e853299
--- /dev/null
+++ b/data/maps/headers/Route17.asm
@@ -0,0 +1,5 @@
+
+ map_header Route17, ROUTE_17, OVERWORLD, NORTH | SOUTH
+ connection north, Route16, ROUTE_16, 0
+ connection south, Route18, ROUTE_18, 0
+ end_map_header
diff --git a/data/maps/headers/Route18.asm b/data/maps/headers/Route18.asm
new file mode 100755
index 00000000..34573051
--- /dev/null
+++ b/data/maps/headers/Route18.asm
@@ -0,0 +1,5 @@
+
+ map_header Route18, ROUTE_18, OVERWORLD, NORTH | EAST
+ connection north, Route17, ROUTE_17, 0
+ connection east, FuchsiaCity, FUCHSIA_CITY, -4
+ end_map_header
diff --git a/data/maps/headers/Route18Gate1F.asm b/data/maps/headers/Route18Gate1F.asm
new file mode 100755
index 00000000..2847e0e3
--- /dev/null
+++ b/data/maps/headers/Route18Gate1F.asm
@@ -0,0 +1,3 @@
+
+ map_header Route18Gate1F, ROUTE_18_GATE_1F, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route18Gate2F.asm b/data/maps/headers/Route18Gate2F.asm
new file mode 100755
index 00000000..f25fa700
--- /dev/null
+++ b/data/maps/headers/Route18Gate2F.asm
@@ -0,0 +1,3 @@
+
+ map_header Route18Gate2F, ROUTE_18_GATE_2F, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route19.asm b/data/maps/headers/Route19.asm
new file mode 100755
index 00000000..7f01c804
--- /dev/null
+++ b/data/maps/headers/Route19.asm
@@ -0,0 +1,5 @@
+
+ map_header Route19, ROUTE_19, OVERWORLD, NORTH | WEST
+ connection north, FuchsiaCity, FUCHSIA_CITY, -5
+ connection west, Route20, ROUTE_20, 18
+ end_map_header
diff --git a/data/maps/headers/Route2.asm b/data/maps/headers/Route2.asm
new file mode 100755
index 00000000..521eef69
--- /dev/null
+++ b/data/maps/headers/Route2.asm
@@ -0,0 +1,5 @@
+
+ map_header Route2, ROUTE_2, OVERWORLD, NORTH | SOUTH
+ connection north, PewterCity, PEWTER_CITY, -5
+ connection south, ViridianCity, VIRIDIAN_CITY, -5
+ end_map_header
diff --git a/data/maps/headers/Route20.asm b/data/maps/headers/Route20.asm
new file mode 100755
index 00000000..3495b785
--- /dev/null
+++ b/data/maps/headers/Route20.asm
@@ -0,0 +1,5 @@
+
+ map_header Route20, ROUTE_20, OVERWORLD, WEST | EAST
+ connection west, CinnabarIsland, CINNABAR_ISLAND, 0
+ connection east, Route19, ROUTE_19, -18
+ end_map_header
diff --git a/data/maps/headers/Route21.asm b/data/maps/headers/Route21.asm
new file mode 100755
index 00000000..803bf217
--- /dev/null
+++ b/data/maps/headers/Route21.asm
@@ -0,0 +1,5 @@
+
+ map_header Route21, ROUTE_21, OVERWORLD, NORTH | SOUTH
+ connection north, PalletTown, PALLET_TOWN, 0
+ connection south, CinnabarIsland, CINNABAR_ISLAND, 0
+ end_map_header
diff --git a/data/maps/headers/Route22.asm b/data/maps/headers/Route22.asm
new file mode 100755
index 00000000..e235efa1
--- /dev/null
+++ b/data/maps/headers/Route22.asm
@@ -0,0 +1,5 @@
+
+ map_header Route22, ROUTE_22, OVERWORLD, NORTH | EAST
+ connection north, Route23, ROUTE_23, 0
+ connection east, ViridianCity, VIRIDIAN_CITY, -4
+ end_map_header
diff --git a/data/maps/headers/Route22Gate.asm b/data/maps/headers/Route22Gate.asm
new file mode 100755
index 00000000..a9d1dd37
--- /dev/null
+++ b/data/maps/headers/Route22Gate.asm
@@ -0,0 +1,3 @@
+
+ map_header Route22Gate, ROUTE_22_GATE, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route23.asm b/data/maps/headers/Route23.asm
new file mode 100755
index 00000000..e1535c9d
--- /dev/null
+++ b/data/maps/headers/Route23.asm
@@ -0,0 +1,5 @@
+
+ map_header Route23, ROUTE_23, PLATEAU, NORTH | SOUTH
+ connection north, IndigoPlateau, INDIGO_PLATEAU, 0
+ connection south, Route22, ROUTE_22, 0
+ end_map_header
diff --git a/data/maps/headers/Route24.asm b/data/maps/headers/Route24.asm
new file mode 100755
index 00000000..faf53660
--- /dev/null
+++ b/data/maps/headers/Route24.asm
@@ -0,0 +1,5 @@
+
+ map_header Route24, ROUTE_24, OVERWORLD, SOUTH | EAST
+ connection south, CeruleanCity, CERULEAN_CITY, -5
+ connection east, Route25, ROUTE_25, 0
+ end_map_header
diff --git a/data/maps/headers/Route25.asm b/data/maps/headers/Route25.asm
new file mode 100755
index 00000000..1873d19b
--- /dev/null
+++ b/data/maps/headers/Route25.asm
@@ -0,0 +1,4 @@
+
+ map_header Route25, ROUTE_25, OVERWORLD, WEST
+ connection west, Route24, ROUTE_24, 0
+ end_map_header
diff --git a/data/maps/headers/Route2Gate.asm b/data/maps/headers/Route2Gate.asm
new file mode 100755
index 00000000..730d8f2d
--- /dev/null
+++ b/data/maps/headers/Route2Gate.asm
@@ -0,0 +1,3 @@
+
+ map_header Route2Gate, ROUTE_2_GATE, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route2TradeHouse.asm b/data/maps/headers/Route2TradeHouse.asm
new file mode 100755
index 00000000..b9937dad
--- /dev/null
+++ b/data/maps/headers/Route2TradeHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header Route2TradeHouse, ROUTE_2_TRADE_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/Route3.asm b/data/maps/headers/Route3.asm
new file mode 100755
index 00000000..ddbd7783
--- /dev/null
+++ b/data/maps/headers/Route3.asm
@@ -0,0 +1,5 @@
+
+ map_header Route3, ROUTE_3, OVERWORLD, NORTH | WEST
+ connection north, Route4, ROUTE_4, 25
+ connection west, PewterCity, PEWTER_CITY, -4
+ end_map_header
diff --git a/data/maps/headers/Route4.asm b/data/maps/headers/Route4.asm
new file mode 100755
index 00000000..6c43171a
--- /dev/null
+++ b/data/maps/headers/Route4.asm
@@ -0,0 +1,5 @@
+
+ map_header Route4, ROUTE_4, OVERWORLD, SOUTH | EAST
+ connection south, Route3, ROUTE_3, -25
+ connection east, CeruleanCity, CERULEAN_CITY, -4
+ end_map_header
diff --git a/data/maps/headers/Route5.asm b/data/maps/headers/Route5.asm
new file mode 100755
index 00000000..ea84090c
--- /dev/null
+++ b/data/maps/headers/Route5.asm
@@ -0,0 +1,5 @@
+
+ map_header Route5, ROUTE_5, OVERWORLD, NORTH | SOUTH
+ connection north, CeruleanCity, CERULEAN_CITY, -5
+ connection south, SaffronCity, SAFFRON_CITY, -5
+ end_map_header
diff --git a/data/maps/headers/Route5Gate.asm b/data/maps/headers/Route5Gate.asm
new file mode 100755
index 00000000..a0115533
--- /dev/null
+++ b/data/maps/headers/Route5Gate.asm
@@ -0,0 +1,3 @@
+
+ map_header Route5Gate, ROUTE_5_GATE, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route6.asm b/data/maps/headers/Route6.asm
new file mode 100755
index 00000000..956aa4d6
--- /dev/null
+++ b/data/maps/headers/Route6.asm
@@ -0,0 +1,5 @@
+
+ map_header Route6, ROUTE_6, OVERWORLD, NORTH | SOUTH
+ connection north, SaffronCity, SAFFRON_CITY, -5
+ connection south, VermilionCity, VERMILION_CITY, -5
+ end_map_header
diff --git a/data/maps/headers/Route6Gate.asm b/data/maps/headers/Route6Gate.asm
new file mode 100755
index 00000000..f80b57c8
--- /dev/null
+++ b/data/maps/headers/Route6Gate.asm
@@ -0,0 +1,3 @@
+
+ map_header Route6Gate, ROUTE_6_GATE, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route7.asm b/data/maps/headers/Route7.asm
new file mode 100755
index 00000000..8368c3fe
--- /dev/null
+++ b/data/maps/headers/Route7.asm
@@ -0,0 +1,5 @@
+
+ map_header Route7, ROUTE_7, OVERWORLD, WEST | EAST
+ connection west, CeladonCity, CELADON_CITY, -4
+ connection east, SaffronCity, SAFFRON_CITY, -4
+ end_map_header
diff --git a/data/maps/headers/Route7Gate.asm b/data/maps/headers/Route7Gate.asm
new file mode 100755
index 00000000..e9b9b16d
--- /dev/null
+++ b/data/maps/headers/Route7Gate.asm
@@ -0,0 +1,3 @@
+
+ map_header Route7Gate, ROUTE_7_GATE, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route8.asm b/data/maps/headers/Route8.asm
new file mode 100755
index 00000000..8df9e023
--- /dev/null
+++ b/data/maps/headers/Route8.asm
@@ -0,0 +1,5 @@
+
+ map_header Route8, ROUTE_8, OVERWORLD, WEST | EAST
+ connection west, SaffronCity, SAFFRON_CITY, -4
+ connection east, LavenderTown, LAVENDER_TOWN, 0
+ end_map_header
diff --git a/data/maps/headers/Route8Gate.asm b/data/maps/headers/Route8Gate.asm
new file mode 100755
index 00000000..f6a320a4
--- /dev/null
+++ b/data/maps/headers/Route8Gate.asm
@@ -0,0 +1,3 @@
+
+ map_header Route8Gate, ROUTE_8_GATE, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/Route9.asm b/data/maps/headers/Route9.asm
new file mode 100755
index 00000000..c1ed9225
--- /dev/null
+++ b/data/maps/headers/Route9.asm
@@ -0,0 +1,5 @@
+
+ map_header Route9, ROUTE_9, OVERWORLD, WEST | EAST
+ connection west, CeruleanCity, CERULEAN_CITY, -4
+ connection east, Route10, ROUTE_10, 0
+ end_map_header
diff --git a/data/maps/headers/SSAnne1F.asm b/data/maps/headers/SSAnne1F.asm
new file mode 100755
index 00000000..80d25e2d
--- /dev/null
+++ b/data/maps/headers/SSAnne1F.asm
@@ -0,0 +1,3 @@
+
+ map_header SSAnne1F, SS_ANNE_1F, SHIP, 0
+ end_map_header
diff --git a/data/maps/headers/SSAnne1FRooms.asm b/data/maps/headers/SSAnne1FRooms.asm
new file mode 100755
index 00000000..8bdd8d00
--- /dev/null
+++ b/data/maps/headers/SSAnne1FRooms.asm
@@ -0,0 +1,3 @@
+
+ map_header SSAnne1FRooms, SS_ANNE_1F_ROOMS, SHIP, 0
+ end_map_header
diff --git a/data/maps/headers/SSAnne2F.asm b/data/maps/headers/SSAnne2F.asm
new file mode 100755
index 00000000..b2fe14d7
--- /dev/null
+++ b/data/maps/headers/SSAnne2F.asm
@@ -0,0 +1,3 @@
+
+ map_header SSAnne2F, SS_ANNE_2F, SHIP, 0
+ end_map_header
diff --git a/data/maps/headers/SSAnne2FRooms.asm b/data/maps/headers/SSAnne2FRooms.asm
new file mode 100755
index 00000000..2d349e4c
--- /dev/null
+++ b/data/maps/headers/SSAnne2FRooms.asm
@@ -0,0 +1,3 @@
+
+ map_header SSAnne2FRooms, SS_ANNE_2F_ROOMS, SHIP, 0
+ end_map_header
diff --git a/data/maps/headers/SSAnne3F.asm b/data/maps/headers/SSAnne3F.asm
new file mode 100755
index 00000000..f391a0cd
--- /dev/null
+++ b/data/maps/headers/SSAnne3F.asm
@@ -0,0 +1,3 @@
+
+ map_header SSAnne3F, SS_ANNE_3F, SHIP, 0
+ end_map_header
diff --git a/data/maps/headers/SSAnneB1F.asm b/data/maps/headers/SSAnneB1F.asm
new file mode 100755
index 00000000..c21d7cff
--- /dev/null
+++ b/data/maps/headers/SSAnneB1F.asm
@@ -0,0 +1,3 @@
+
+ map_header SSAnneB1F, SS_ANNE_B1F, SHIP, 0
+ end_map_header
diff --git a/data/maps/headers/SSAnneB1FRooms.asm b/data/maps/headers/SSAnneB1FRooms.asm
new file mode 100755
index 00000000..1b8b4620
--- /dev/null
+++ b/data/maps/headers/SSAnneB1FRooms.asm
@@ -0,0 +1,3 @@
+
+ map_header SSAnneB1FRooms, SS_ANNE_B1F_ROOMS, SHIP, 0
+ end_map_header
diff --git a/data/maps/headers/SSAnneBow.asm b/data/maps/headers/SSAnneBow.asm
new file mode 100755
index 00000000..2195e970
--- /dev/null
+++ b/data/maps/headers/SSAnneBow.asm
@@ -0,0 +1,3 @@
+
+ map_header SSAnneBow, SS_ANNE_BOW, SHIP, 0
+ end_map_header
diff --git a/data/maps/headers/SSAnneCaptainsRoom.asm b/data/maps/headers/SSAnneCaptainsRoom.asm
new file mode 100755
index 00000000..a24f930d
--- /dev/null
+++ b/data/maps/headers/SSAnneCaptainsRoom.asm
@@ -0,0 +1,3 @@
+
+ map_header SSAnneCaptainsRoom, SS_ANNE_CAPTAINS_ROOM, SHIP, 0
+ end_map_header
diff --git a/data/maps/headers/SSAnneKitchen.asm b/data/maps/headers/SSAnneKitchen.asm
new file mode 100755
index 00000000..47e84fbe
--- /dev/null
+++ b/data/maps/headers/SSAnneKitchen.asm
@@ -0,0 +1,3 @@
+
+ map_header SSAnneKitchen, SS_ANNE_KITCHEN, SHIP, 0
+ end_map_header
diff --git a/data/maps/headers/SafariZoneCenter.asm b/data/maps/headers/SafariZoneCenter.asm
new file mode 100755
index 00000000..ccc58ed1
--- /dev/null
+++ b/data/maps/headers/SafariZoneCenter.asm
@@ -0,0 +1,3 @@
+
+ map_header SafariZoneCenter, SAFARI_ZONE_CENTER, FOREST, 0
+ end_map_header
diff --git a/data/maps/headers/SafariZoneCenterRestHouse.asm b/data/maps/headers/SafariZoneCenterRestHouse.asm
new file mode 100755
index 00000000..a866003f
--- /dev/null
+++ b/data/maps/headers/SafariZoneCenterRestHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header SafariZoneCenterRestHouse, SAFARI_ZONE_CENTER_REST_HOUSE, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/SafariZoneEast.asm b/data/maps/headers/SafariZoneEast.asm
new file mode 100755
index 00000000..c23e9334
--- /dev/null
+++ b/data/maps/headers/SafariZoneEast.asm
@@ -0,0 +1,3 @@
+
+ map_header SafariZoneEast, SAFARI_ZONE_EAST, FOREST, 0
+ end_map_header
diff --git a/data/maps/headers/SafariZoneEastRestHouse.asm b/data/maps/headers/SafariZoneEastRestHouse.asm
new file mode 100755
index 00000000..1f8d76c6
--- /dev/null
+++ b/data/maps/headers/SafariZoneEastRestHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header SafariZoneEastRestHouse, SAFARI_ZONE_EAST_REST_HOUSE, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/SafariZoneGate.asm b/data/maps/headers/SafariZoneGate.asm
new file mode 100755
index 00000000..7816460d
--- /dev/null
+++ b/data/maps/headers/SafariZoneGate.asm
@@ -0,0 +1,3 @@
+
+ map_header SafariZoneGate, SAFARI_ZONE_GATE, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/SafariZoneNorth.asm b/data/maps/headers/SafariZoneNorth.asm
new file mode 100755
index 00000000..32639d22
--- /dev/null
+++ b/data/maps/headers/SafariZoneNorth.asm
@@ -0,0 +1,3 @@
+
+ map_header SafariZoneNorth, SAFARI_ZONE_NORTH, FOREST, 0
+ end_map_header
diff --git a/data/maps/headers/SafariZoneNorthRestHouse.asm b/data/maps/headers/SafariZoneNorthRestHouse.asm
new file mode 100755
index 00000000..ec083803
--- /dev/null
+++ b/data/maps/headers/SafariZoneNorthRestHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header SafariZoneNorthRestHouse, SAFARI_ZONE_NORTH_REST_HOUSE, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/SafariZoneSecretHouse.asm b/data/maps/headers/SafariZoneSecretHouse.asm
new file mode 100755
index 00000000..630577c4
--- /dev/null
+++ b/data/maps/headers/SafariZoneSecretHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header SafariZoneSecretHouse, SAFARI_ZONE_SECRET_HOUSE, LAB, 0
+ end_map_header
diff --git a/data/maps/headers/SafariZoneWest.asm b/data/maps/headers/SafariZoneWest.asm
new file mode 100755
index 00000000..a1117d09
--- /dev/null
+++ b/data/maps/headers/SafariZoneWest.asm
@@ -0,0 +1,3 @@
+
+ map_header SafariZoneWest, SAFARI_ZONE_WEST, FOREST, 0
+ end_map_header
diff --git a/data/maps/headers/SafariZoneWestRestHouse.asm b/data/maps/headers/SafariZoneWestRestHouse.asm
new file mode 100755
index 00000000..e4618e1d
--- /dev/null
+++ b/data/maps/headers/SafariZoneWestRestHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header SafariZoneWestRestHouse, SAFARI_ZONE_WEST_REST_HOUSE, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/SaffronCity.asm b/data/maps/headers/SaffronCity.asm
new file mode 100755
index 00000000..ee1f71e4
--- /dev/null
+++ b/data/maps/headers/SaffronCity.asm
@@ -0,0 +1,7 @@
+
+ map_header SaffronCity, SAFFRON_CITY, OVERWORLD, NORTH | SOUTH | WEST | EAST
+ connection north, Route5, ROUTE_5, 5
+ connection south, Route6, ROUTE_6, 5
+ connection west, Route7, ROUTE_7, 4
+ connection east, Route8, ROUTE_8, 4
+ end_map_header
diff --git a/data/maps/headers/SaffronGym.asm b/data/maps/headers/SaffronGym.asm
new file mode 100755
index 00000000..14ee3323
--- /dev/null
+++ b/data/maps/headers/SaffronGym.asm
@@ -0,0 +1,3 @@
+
+ map_header SaffronGym, SAFFRON_GYM, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/SaffronMart.asm b/data/maps/headers/SaffronMart.asm
new file mode 100755
index 00000000..f03132d2
--- /dev/null
+++ b/data/maps/headers/SaffronMart.asm
@@ -0,0 +1,3 @@
+
+ map_header SaffronMart, SAFFRON_MART, MART, 0
+ end_map_header
diff --git a/data/maps/headers/SaffronPidgeyHouse.asm b/data/maps/headers/SaffronPidgeyHouse.asm
new file mode 100755
index 00000000..e9f8dde7
--- /dev/null
+++ b/data/maps/headers/SaffronPidgeyHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header SaffronPidgeyHouse, SAFFRON_PIDGEY_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/SaffronPokecenter.asm b/data/maps/headers/SaffronPokecenter.asm
new file mode 100755
index 00000000..9b250050
--- /dev/null
+++ b/data/maps/headers/SaffronPokecenter.asm
@@ -0,0 +1,3 @@
+
+ map_header SaffronPokecenter, SAFFRON_POKECENTER, POKECENTER, 0
+ end_map_header
diff --git a/data/maps/headers/SeafoamIslands1F.asm b/data/maps/headers/SeafoamIslands1F.asm
new file mode 100755
index 00000000..db530549
--- /dev/null
+++ b/data/maps/headers/SeafoamIslands1F.asm
@@ -0,0 +1,3 @@
+
+ map_header SeafoamIslands1F, SEAFOAM_ISLANDS_1F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/SeafoamIslandsB1F.asm b/data/maps/headers/SeafoamIslandsB1F.asm
new file mode 100755
index 00000000..589eef93
--- /dev/null
+++ b/data/maps/headers/SeafoamIslandsB1F.asm
@@ -0,0 +1,3 @@
+
+ map_header SeafoamIslandsB1F, SEAFOAM_ISLANDS_B1F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/SeafoamIslandsB2F.asm b/data/maps/headers/SeafoamIslandsB2F.asm
new file mode 100755
index 00000000..f7e624ed
--- /dev/null
+++ b/data/maps/headers/SeafoamIslandsB2F.asm
@@ -0,0 +1,3 @@
+
+ map_header SeafoamIslandsB2F, SEAFOAM_ISLANDS_B2F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/SeafoamIslandsB3F.asm b/data/maps/headers/SeafoamIslandsB3F.asm
new file mode 100755
index 00000000..b57da3c0
--- /dev/null
+++ b/data/maps/headers/SeafoamIslandsB3F.asm
@@ -0,0 +1,3 @@
+
+ map_header SeafoamIslandsB3F, SEAFOAM_ISLANDS_B3F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/SeafoamIslandsB4F.asm b/data/maps/headers/SeafoamIslandsB4F.asm
new file mode 100755
index 00000000..bae1e3a2
--- /dev/null
+++ b/data/maps/headers/SeafoamIslandsB4F.asm
@@ -0,0 +1,3 @@
+
+ map_header SeafoamIslandsB4F, SEAFOAM_ISLANDS_B4F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/SilphCo10F.asm b/data/maps/headers/SilphCo10F.asm
new file mode 100755
index 00000000..7a6786e7
--- /dev/null
+++ b/data/maps/headers/SilphCo10F.asm
@@ -0,0 +1,3 @@
+
+ map_header SilphCo10F, SILPH_CO_10F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/SilphCo11F.asm b/data/maps/headers/SilphCo11F.asm
new file mode 100755
index 00000000..72eaaca2
--- /dev/null
+++ b/data/maps/headers/SilphCo11F.asm
@@ -0,0 +1,3 @@
+
+ map_header SilphCo11F, SILPH_CO_11F, INTERIOR, 0
+ end_map_header
diff --git a/data/maps/headers/SilphCo1F.asm b/data/maps/headers/SilphCo1F.asm
new file mode 100755
index 00000000..4c4ac97d
--- /dev/null
+++ b/data/maps/headers/SilphCo1F.asm
@@ -0,0 +1,3 @@
+
+ map_header SilphCo1F, SILPH_CO_1F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/SilphCo2F.asm b/data/maps/headers/SilphCo2F.asm
new file mode 100755
index 00000000..7dc44a55
--- /dev/null
+++ b/data/maps/headers/SilphCo2F.asm
@@ -0,0 +1,3 @@
+
+ map_header SilphCo2F, SILPH_CO_2F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/SilphCo3F.asm b/data/maps/headers/SilphCo3F.asm
new file mode 100755
index 00000000..99e4aa15
--- /dev/null
+++ b/data/maps/headers/SilphCo3F.asm
@@ -0,0 +1,3 @@
+
+ map_header SilphCo3F, SILPH_CO_3F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/SilphCo4F.asm b/data/maps/headers/SilphCo4F.asm
new file mode 100755
index 00000000..8eed0f9a
--- /dev/null
+++ b/data/maps/headers/SilphCo4F.asm
@@ -0,0 +1,3 @@
+
+ map_header SilphCo4F, SILPH_CO_4F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/SilphCo5F.asm b/data/maps/headers/SilphCo5F.asm
new file mode 100755
index 00000000..3b40c360
--- /dev/null
+++ b/data/maps/headers/SilphCo5F.asm
@@ -0,0 +1,3 @@
+
+ map_header SilphCo5F, SILPH_CO_5F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/SilphCo6F.asm b/data/maps/headers/SilphCo6F.asm
new file mode 100755
index 00000000..3d2b3b8c
--- /dev/null
+++ b/data/maps/headers/SilphCo6F.asm
@@ -0,0 +1,3 @@
+
+ map_header SilphCo6F, SILPH_CO_6F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/SilphCo7F.asm b/data/maps/headers/SilphCo7F.asm
new file mode 100755
index 00000000..1591837a
--- /dev/null
+++ b/data/maps/headers/SilphCo7F.asm
@@ -0,0 +1,3 @@
+
+ map_header SilphCo7F, SILPH_CO_7F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/SilphCo8F.asm b/data/maps/headers/SilphCo8F.asm
new file mode 100755
index 00000000..e676fa86
--- /dev/null
+++ b/data/maps/headers/SilphCo8F.asm
@@ -0,0 +1,3 @@
+
+ map_header SilphCo8F, SILPH_CO_8F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/SilphCo9F.asm b/data/maps/headers/SilphCo9F.asm
new file mode 100755
index 00000000..89f0300a
--- /dev/null
+++ b/data/maps/headers/SilphCo9F.asm
@@ -0,0 +1,3 @@
+
+ map_header SilphCo9F, SILPH_CO_9F, FACILITY, 0
+ end_map_header
diff --git a/data/maps/headers/SilphCoElevator.asm b/data/maps/headers/SilphCoElevator.asm
new file mode 100755
index 00000000..4dd9cd9f
--- /dev/null
+++ b/data/maps/headers/SilphCoElevator.asm
@@ -0,0 +1,3 @@
+
+ map_header SilphCoElevator, SILPH_CO_ELEVATOR, LOBBY, 0
+ end_map_header
diff --git a/data/maps/headers/TradeCenter.asm b/data/maps/headers/TradeCenter.asm
new file mode 100755
index 00000000..268d76b2
--- /dev/null
+++ b/data/maps/headers/TradeCenter.asm
@@ -0,0 +1,3 @@
+
+ map_header TradeCenter, TRADE_CENTER, CLUB, 0
+ end_map_header
diff --git a/data/maps/headers/UndergroundPathNorthSouth.asm b/data/maps/headers/UndergroundPathNorthSouth.asm
new file mode 100755
index 00000000..4bb03c79
--- /dev/null
+++ b/data/maps/headers/UndergroundPathNorthSouth.asm
@@ -0,0 +1,3 @@
+
+ map_header UndergroundPathNorthSouth, UNDERGROUND_PATH_NORTH_SOUTH, UNDERGROUND, 0
+ end_map_header
diff --git a/data/maps/headers/UndergroundPathRoute5.asm b/data/maps/headers/UndergroundPathRoute5.asm
new file mode 100755
index 00000000..18287254
--- /dev/null
+++ b/data/maps/headers/UndergroundPathRoute5.asm
@@ -0,0 +1,3 @@
+
+ map_header UndergroundPathRoute5, UNDERGROUND_PATH_ROUTE_5, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/UndergroundPathRoute6.asm b/data/maps/headers/UndergroundPathRoute6.asm
new file mode 100755
index 00000000..67772543
--- /dev/null
+++ b/data/maps/headers/UndergroundPathRoute6.asm
@@ -0,0 +1,3 @@
+
+ map_header UndergroundPathRoute6, UNDERGROUND_PATH_ROUTE_6, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/UndergroundPathRoute7.asm b/data/maps/headers/UndergroundPathRoute7.asm
new file mode 100755
index 00000000..d70548ed
--- /dev/null
+++ b/data/maps/headers/UndergroundPathRoute7.asm
@@ -0,0 +1,3 @@
+
+ map_header UndergroundPathRoute7, UNDERGROUND_PATH_ROUTE_7, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/UndergroundPathRoute7Copy.asm b/data/maps/headers/UndergroundPathRoute7Copy.asm
new file mode 100755
index 00000000..30bb70a8
--- /dev/null
+++ b/data/maps/headers/UndergroundPathRoute7Copy.asm
@@ -0,0 +1,3 @@
+
+ map_header UndergroundPathRoute7Copy, UNDERGROUND_PATH_ROUTE_7, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/UndergroundPathRoute8.asm b/data/maps/headers/UndergroundPathRoute8.asm
new file mode 100755
index 00000000..102d8413
--- /dev/null
+++ b/data/maps/headers/UndergroundPathRoute8.asm
@@ -0,0 +1,3 @@
+
+ map_header UndergroundPathRoute8, UNDERGROUND_PATH_ROUTE_8, GATE, 0
+ end_map_header
diff --git a/data/maps/headers/UndergroundPathWestEast.asm b/data/maps/headers/UndergroundPathWestEast.asm
new file mode 100755
index 00000000..05976e87
--- /dev/null
+++ b/data/maps/headers/UndergroundPathWestEast.asm
@@ -0,0 +1,3 @@
+
+ map_header UndergroundPathWestEast, UNDERGROUND_PATH_WEST_EAST, UNDERGROUND, 0
+ end_map_header
diff --git a/data/maps/headers/VermilionCity.asm b/data/maps/headers/VermilionCity.asm
new file mode 100755
index 00000000..e211562c
--- /dev/null
+++ b/data/maps/headers/VermilionCity.asm
@@ -0,0 +1,5 @@
+
+ map_header VermilionCity, VERMILION_CITY, OVERWORLD, NORTH | EAST
+ connection north, Route6, ROUTE_6, 5
+ connection east, Route11, ROUTE_11, 4
+ end_map_header
diff --git a/data/maps/headers/VermilionDock.asm b/data/maps/headers/VermilionDock.asm
new file mode 100755
index 00000000..9a9b61c2
--- /dev/null
+++ b/data/maps/headers/VermilionDock.asm
@@ -0,0 +1,3 @@
+
+ map_header VermilionDock, VERMILION_DOCK, SHIP_PORT, 0
+ end_map_header
diff --git a/data/maps/headers/VermilionGym.asm b/data/maps/headers/VermilionGym.asm
new file mode 100755
index 00000000..ca75b8c1
--- /dev/null
+++ b/data/maps/headers/VermilionGym.asm
@@ -0,0 +1,3 @@
+
+ map_header VermilionGym, VERMILION_GYM, GYM, 0
+ end_map_header
diff --git a/data/maps/headers/VermilionMart.asm b/data/maps/headers/VermilionMart.asm
new file mode 100755
index 00000000..5777db4b
--- /dev/null
+++ b/data/maps/headers/VermilionMart.asm
@@ -0,0 +1,3 @@
+
+ map_header VermilionMart, VERMILION_MART, MART, 0
+ end_map_header
diff --git a/data/maps/headers/VermilionOldRodHouse.asm b/data/maps/headers/VermilionOldRodHouse.asm
new file mode 100755
index 00000000..f9c890e0
--- /dev/null
+++ b/data/maps/headers/VermilionOldRodHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header VermilionOldRodHouse, VERMILION_OLD_ROD_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/VermilionPidgeyHouse.asm b/data/maps/headers/VermilionPidgeyHouse.asm
new file mode 100755
index 00000000..afb81784
--- /dev/null
+++ b/data/maps/headers/VermilionPidgeyHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header VermilionPidgeyHouse, VERMILION_PIDGEY_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/VermilionPokecenter.asm b/data/maps/headers/VermilionPokecenter.asm
new file mode 100755
index 00000000..af9827ac
--- /dev/null
+++ b/data/maps/headers/VermilionPokecenter.asm
@@ -0,0 +1,3 @@
+
+ map_header VermilionPokecenter, VERMILION_POKECENTER, POKECENTER, 0
+ end_map_header
diff --git a/data/maps/headers/VermilionTradeHouse.asm b/data/maps/headers/VermilionTradeHouse.asm
new file mode 100755
index 00000000..3cb82c47
--- /dev/null
+++ b/data/maps/headers/VermilionTradeHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header VermilionTradeHouse, VERMILION_TRADE_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/VictoryRoad1F.asm b/data/maps/headers/VictoryRoad1F.asm
new file mode 100755
index 00000000..dae95f16
--- /dev/null
+++ b/data/maps/headers/VictoryRoad1F.asm
@@ -0,0 +1,3 @@
+
+ map_header VictoryRoad1F, VICTORY_ROAD_1F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/VictoryRoad2F.asm b/data/maps/headers/VictoryRoad2F.asm
new file mode 100755
index 00000000..99079ad3
--- /dev/null
+++ b/data/maps/headers/VictoryRoad2F.asm
@@ -0,0 +1,3 @@
+
+ map_header VictoryRoad2F, VICTORY_ROAD_2F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/VictoryRoad3F.asm b/data/maps/headers/VictoryRoad3F.asm
new file mode 100755
index 00000000..bc15cad7
--- /dev/null
+++ b/data/maps/headers/VictoryRoad3F.asm
@@ -0,0 +1,3 @@
+
+ map_header VictoryRoad3F, VICTORY_ROAD_3F, CAVERN, 0
+ end_map_header
diff --git a/data/maps/headers/ViridianCity.asm b/data/maps/headers/ViridianCity.asm
new file mode 100755
index 00000000..0771cc81
--- /dev/null
+++ b/data/maps/headers/ViridianCity.asm
@@ -0,0 +1,6 @@
+
+ map_header ViridianCity, VIRIDIAN_CITY, OVERWORLD, NORTH | SOUTH | WEST
+ connection north, Route2, ROUTE_2, 5
+ connection south, Route1, ROUTE_1, 5
+ connection west, Route22, ROUTE_22, 4
+ end_map_header
diff --git a/data/maps/headers/ViridianForest.asm b/data/maps/headers/ViridianForest.asm
new file mode 100755
index 00000000..d531ec86
--- /dev/null
+++ b/data/maps/headers/ViridianForest.asm
@@ -0,0 +1,3 @@
+
+ map_header ViridianForest, VIRIDIAN_FOREST, FOREST, 0
+ end_map_header
diff --git a/data/maps/headers/ViridianForestNorthGate.asm b/data/maps/headers/ViridianForestNorthGate.asm
new file mode 100755
index 00000000..5bfcd6ed
--- /dev/null
+++ b/data/maps/headers/ViridianForestNorthGate.asm
@@ -0,0 +1,3 @@
+
+ map_header ViridianForestNorthGate, VIRIDIAN_FOREST_NORTH_GATE, FOREST_GATE, 0
+ end_map_header
diff --git a/data/maps/headers/ViridianForestSouthGate.asm b/data/maps/headers/ViridianForestSouthGate.asm
new file mode 100755
index 00000000..87a49284
--- /dev/null
+++ b/data/maps/headers/ViridianForestSouthGate.asm
@@ -0,0 +1,3 @@
+
+ map_header ViridianForestSouthGate, VIRIDIAN_FOREST_SOUTH_GATE, FOREST_GATE, 0
+ end_map_header
diff --git a/data/maps/headers/ViridianGym.asm b/data/maps/headers/ViridianGym.asm
new file mode 100755
index 00000000..640a71b6
--- /dev/null
+++ b/data/maps/headers/ViridianGym.asm
@@ -0,0 +1,3 @@
+
+ map_header ViridianGym, VIRIDIAN_GYM, GYM, 0
+ end_map_header
diff --git a/data/maps/headers/ViridianMart.asm b/data/maps/headers/ViridianMart.asm
new file mode 100755
index 00000000..817b5265
--- /dev/null
+++ b/data/maps/headers/ViridianMart.asm
@@ -0,0 +1,3 @@
+
+ map_header ViridianMart, VIRIDIAN_MART, MART, 0
+ end_map_header
diff --git a/data/maps/headers/ViridianNicknameHouse.asm b/data/maps/headers/ViridianNicknameHouse.asm
new file mode 100755
index 00000000..5a7c272f
--- /dev/null
+++ b/data/maps/headers/ViridianNicknameHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header ViridianNicknameHouse, VIRIDIAN_NICKNAME_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/ViridianPokecenter.asm b/data/maps/headers/ViridianPokecenter.asm
new file mode 100755
index 00000000..daac19f3
--- /dev/null
+++ b/data/maps/headers/ViridianPokecenter.asm
@@ -0,0 +1,3 @@
+
+ map_header ViridianPokecenter, VIRIDIAN_POKECENTER, POKECENTER, 0
+ end_map_header
diff --git a/data/maps/headers/ViridianSchoolHouse.asm b/data/maps/headers/ViridianSchoolHouse.asm
new file mode 100755
index 00000000..f5b77212
--- /dev/null
+++ b/data/maps/headers/ViridianSchoolHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header ViridianSchoolHouse, VIRIDIAN_SCHOOL_HOUSE, HOUSE, 0
+ end_map_header
diff --git a/data/maps/headers/WardensHouse.asm b/data/maps/headers/WardensHouse.asm
new file mode 100755
index 00000000..08216f59
--- /dev/null
+++ b/data/maps/headers/WardensHouse.asm
@@ -0,0 +1,3 @@
+
+ map_header WardensHouse, WARDENS_HOUSE, LAB, 0
+ end_map_header
diff --git a/data/maps/hide_show_data.asm b/data/maps/hide_show_data.asm
new file mode 100755
index 00000000..0e26900f
--- /dev/null
+++ b/data/maps/hide_show_data.asm
@@ -0,0 +1,581 @@
+; default hidden/shown objects for each map
+
+MapHSPointers:
+; entries correspond to map ids
+ dw PalletTownHS
+ dw ViridianCityHS
+ dw PewterCityHS
+ dw CeruleanCityHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw SaffronCityHS
+ dw NoHS
+ dw NoHS
+ dw Route2HS
+ dw NoHS
+ dw Route4HS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw Route9HS
+ dw NoHS
+ dw NoHS
+ dw Route12HS
+ dw NoHS
+ dw NoHS
+ dw Route15HS
+ dw Route16HS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw Route22HS
+ dw NoHS
+ dw Route24HS
+ dw Route25HS
+ dw NoHS
+ dw NoHS
+ dw BluesHouseHS
+ dw OaksLabHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw ViridianGymHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw ViridianForestHS
+ dw Museum1FHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw MtMoon1FHS
+ dw NoHS
+ dw MtMoonB2FHS
+ dw NoHS
+ dw CeruleanTradeHouseHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw PowerPlantHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw BillsHouseHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw SSAnne2FHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw SSAnne1FRoomsHS
+ dw SSAnne2FRoomsHS
+ dw SSAnneB1FRoomsHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw VictoryRoad1FHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw ChampionsRoomHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw CeladonMansionRoofHouseHS
+ dw NoHS
+ dw NoHS
+ dw GameCornerHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw PokemonTower2FHS
+ dw PokemonTower3FHS
+ dw PokemonTower4FHS
+ dw PokemonTower5FHS
+ dw PokemonTower6FHS
+ dw PokemonTower7FHS
+ dw MrFujisHouseHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw WardensHouseHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw SeafoamIslandsB1FHS
+ dw SeafoamIslandsB2FHS
+ dw SeafoamIslandsB3FHS
+ dw SeafoamIslandsB4FHS
+ dw NoHS
+ dw NoHS
+ dw PokemonMansion1FHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw FightingDojoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw SilphCo1FHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw SeafoamIslands1FHS
+ dw NoHS
+ dw VictoryRoad2FHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw VictoryRoad3FHS
+ dw RocketHideoutB1FHS
+ dw RocketHideoutB2FHS
+ dw RocketHideoutB3FHS
+ dw RocketHideoutB4FHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw SilphCo2FHS
+ dw SilphCo3FHS
+ dw SilphCo4FHS
+ dw SilphCo5FHS
+ dw SilphCo6FHS
+ dw SilphCo7FHS
+ dw SilphCo8FHS
+ dw PokemonMansion2FHS
+ dw PokemonMansion3FHS
+ dw PokemonMansionB1FHS
+ dw SafariZoneEastHS
+ dw SafariZoneNorthHS
+ dw SafariZoneWestHS
+ dw SafariZoneCenterHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw CeruleanCave2FHS
+ dw CeruleanCaveB1FHS
+ dw CeruleanCaveHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw SilphCo9FHS
+ dw SilphCo10FHS
+ dw SilphCo11FHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw UnusedMapF4HS
+ dw NoHS
+ dw NoHS
+ dw NoHS
+ dw NoHS ; beach house
+ dw -1 ; end
+
+NoHS:
+ db $FF, $FF, $FF
+
+MissableObjects:
+; entries correspond to HS_* constants (see constants/hide_show_constants)
+; format: map id, object id, HIDE/SHOW
+
+PalletTownHS:
+ db PALLET_TOWN, $01, HIDE
+ViridianCityHS:
+ db VIRIDIAN_CITY, $05, SHOW
+ db VIRIDIAN_CITY, $07, HIDE
+ db VIRIDIAN_CITY, $08, HIDE
+PewterCityHS:
+ db PEWTER_CITY, $03, SHOW
+ db PEWTER_CITY, $05, SHOW
+CeruleanCityHS:
+ db CERULEAN_CITY, $01, HIDE
+ db CERULEAN_CITY, $02, SHOW
+ db CERULEAN_CITY, $06, HIDE
+ db CERULEAN_CITY, $0A, SHOW
+ db CERULEAN_CITY, $0B, SHOW
+SaffronCityHS:
+ db SAFFRON_CITY, $01, SHOW
+ db SAFFRON_CITY, $02, SHOW
+ db SAFFRON_CITY, $03, SHOW
+ db SAFFRON_CITY, $04, SHOW
+ db SAFFRON_CITY, $05, SHOW
+ db SAFFRON_CITY, $06, SHOW
+ db SAFFRON_CITY, $07, SHOW
+ db SAFFRON_CITY, $08, HIDE
+ db SAFFRON_CITY, $09, HIDE
+ db SAFFRON_CITY, $0A, HIDE
+ db SAFFRON_CITY, $0B, HIDE
+ db SAFFRON_CITY, $0C, HIDE
+ db SAFFRON_CITY, $0D, HIDE
+ db SAFFRON_CITY, $0E, SHOW
+ db SAFFRON_CITY, $0F, HIDE
+Route2HS:
+ db ROUTE_2, $01, SHOW
+ db ROUTE_2, $02, SHOW
+Route4HS:
+ db ROUTE_4, $03, SHOW
+Route9HS:
+ db ROUTE_9, $0A, SHOW
+Route12HS:
+ db ROUTE_12, $01, SHOW
+ db ROUTE_12, $09, SHOW
+ db ROUTE_12, $0A, SHOW
+Route15HS:
+ db ROUTE_15, $0B, SHOW
+Route16HS:
+ db ROUTE_16, $07, SHOW
+Route22HS:
+ db ROUTE_22, $01, HIDE
+ db ROUTE_22, $02, HIDE
+Route24HS:
+ db ROUTE_24, $01, SHOW
+ db ROUTE_24, $08, SHOW
+Route25HS:
+ db ROUTE_25, $0A, SHOW
+BluesHouseHS:
+ db BLUES_HOUSE, $01, SHOW
+ db BLUES_HOUSE, $02, HIDE
+ db BLUES_HOUSE, $03, SHOW
+OaksLabHS:
+ db OAKS_LAB, $01, SHOW
+ db OAKS_LAB, $02, SHOW
+ db OAKS_LAB, $03, HIDE
+ db OAKS_LAB, $04, SHOW
+ db OAKS_LAB, $05, SHOW
+ db OAKS_LAB, $06, HIDE
+ViridianGymHS:
+ db VIRIDIAN_GYM, $01, SHOW
+ db VIRIDIAN_GYM, $0B, SHOW
+Museum1FHS:
+ db MUSEUM_1F, $05, SHOW
+CeruleanTradeHouseHS: ; bulbasaur adoption house
+ db CERULEAN_TRADE_HOUSE, $02, SHOW
+CeruleanCaveHS:
+ db CERULEAN_CAVE_1F, $01, SHOW
+ db CERULEAN_CAVE_1F, $02, SHOW
+ db CERULEAN_CAVE_1F, $03, SHOW
+ db CERULEAN_CAVE_1F, $04, SHOW
+PokemonTower2FHS:
+ db POKEMON_TOWER_2F, $01, SHOW
+PokemonTower3FHS:
+ db POKEMON_TOWER_3F, $04, SHOW
+PokemonTower4FHS:
+ db POKEMON_TOWER_4F, $04, SHOW
+ db POKEMON_TOWER_4F, $05, SHOW
+ db POKEMON_TOWER_4F, $06, SHOW
+PokemonTower5FHS:
+ db POKEMON_TOWER_5F, $06, SHOW
+PokemonTower6FHS:
+ db POKEMON_TOWER_6F, $04, SHOW
+ db POKEMON_TOWER_6F, $05, SHOW
+PokemonTower7FHS:
+ db POKEMON_TOWER_7F, $01, HIDE ; jessie & james?
+ db POKEMON_TOWER_7F, $02, HIDE
+ db POKEMON_TOWER_7F, $03, SHOW
+MrFujisHouseHS:
+ db MR_FUJIS_HOUSE, $05, HIDE
+CeladonMansionRoofHouseHS:
+ db CELADON_MANSION_ROOF_HOUSE, $02, SHOW
+GameCornerHS:
+ db GAME_CORNER, $0B, SHOW
+WardensHouseHS:
+ db WARDENS_HOUSE, $02, SHOW
+PokemonMansion1FHS:
+ db POKEMON_MANSION_1F, $02, SHOW
+ db POKEMON_MANSION_1F, $03, SHOW
+FightingDojoHS:
+ db FIGHTING_DOJO, $06, SHOW
+ db FIGHTING_DOJO, $07, SHOW
+SilphCo1FHS:
+ db SILPH_CO_1F, $01, HIDE
+PowerPlantHS:
+ db POWER_PLANT, $01, SHOW
+ db POWER_PLANT, $02, SHOW
+ db POWER_PLANT, $03, SHOW
+ db POWER_PLANT, $04, SHOW
+ db POWER_PLANT, $05, SHOW
+ db POWER_PLANT, $06, SHOW
+ db POWER_PLANT, $07, SHOW
+ db POWER_PLANT, $08, SHOW
+ db POWER_PLANT, $09, SHOW
+ db POWER_PLANT, $0A, SHOW
+ db POWER_PLANT, $0B, SHOW
+ db POWER_PLANT, $0C, SHOW
+ db POWER_PLANT, $0D, SHOW
+ db POWER_PLANT, $0E, SHOW
+VictoryRoad2FHS:
+ db VICTORY_ROAD_2F, $06, SHOW
+ db VICTORY_ROAD_2F, $07, SHOW
+ db VICTORY_ROAD_2F, $08, SHOW
+ db VICTORY_ROAD_2F, $09, SHOW
+ db VICTORY_ROAD_2F, $0A, SHOW
+ db VICTORY_ROAD_2F, $0D, SHOW
+BillsHouseHS:
+ db BILLS_HOUSE, $01, SHOW
+ db BILLS_HOUSE, $02, HIDE
+ db BILLS_HOUSE, $03, HIDE
+ViridianForestHS:
+ db VIRIDIAN_FOREST, $07, SHOW
+ db VIRIDIAN_FOREST, $08, SHOW
+ db VIRIDIAN_FOREST, $09, SHOW
+MtMoon1FHS:
+ db MT_MOON_1F, $08, SHOW
+ db MT_MOON_1F, $09, SHOW
+ db MT_MOON_1F, $0A, SHOW
+ db MT_MOON_1F, $0B, SHOW
+ db MT_MOON_1F, $0C, SHOW
+ db MT_MOON_1F, $0D, SHOW
+MtMoonB2FHS:
+ db MT_MOON_B2F, $02, HIDE
+ db MT_MOON_B2F, $06, HIDE
+ db MT_MOON_B2F, $07, SHOW
+ db MT_MOON_B2F, $08, SHOW
+ db MT_MOON_B2F, $09, SHOW
+ db MT_MOON_B2F, $0A, SHOW
+SSAnne2FHS:
+ db SS_ANNE_2F, $02, HIDE
+SSAnne1FRoomsHS:
+ db SS_ANNE_1F_ROOMS, $0A, SHOW
+SSAnne2FRoomsHS:
+ db SS_ANNE_2F_ROOMS, $06, SHOW
+ db SS_ANNE_2F_ROOMS, $09, SHOW
+SSAnneB1FRoomsHS:
+ db SS_ANNE_B1F_ROOMS, $09, SHOW
+ db SS_ANNE_B1F_ROOMS, $0A, SHOW
+ db SS_ANNE_B1F_ROOMS, $0B, SHOW
+VictoryRoad3FHS:
+ db VICTORY_ROAD_3F, $05, SHOW
+ db VICTORY_ROAD_3F, $06, SHOW
+ db VICTORY_ROAD_3F, $0A, SHOW
+RocketHideoutB1FHS:
+ db ROCKET_HIDEOUT_B1F, $06, SHOW
+ db ROCKET_HIDEOUT_B1F, $07, SHOW
+RocketHideoutB2FHS:
+ db ROCKET_HIDEOUT_B2F, $02, SHOW
+ db ROCKET_HIDEOUT_B2F, $03, SHOW
+ db ROCKET_HIDEOUT_B2F, $04, SHOW
+ db ROCKET_HIDEOUT_B2F, $05, SHOW
+RocketHideoutB3FHS:
+ db ROCKET_HIDEOUT_B3F, $03, SHOW
+ db ROCKET_HIDEOUT_B3F, $04, SHOW
+RocketHideoutB4FHS:
+ db ROCKET_HIDEOUT_B4F, $01, SHOW
+ db ROCKET_HIDEOUT_B4F, $02, HIDE
+ db ROCKET_HIDEOUT_B4F, $03, HIDE
+ db ROCKET_HIDEOUT_B4F, $05, SHOW
+ db ROCKET_HIDEOUT_B4F, $06, SHOW
+ db ROCKET_HIDEOUT_B4F, $07, SHOW
+ db ROCKET_HIDEOUT_B4F, $08, HIDE
+ db ROCKET_HIDEOUT_B4F, $09, HIDE
+SilphCo2FHS:
+ db SILPH_CO_2F, $01, SHOW
+ db SILPH_CO_2F, $02, SHOW
+ db SILPH_CO_2F, $03, SHOW
+ db SILPH_CO_2F, $04, SHOW
+ db SILPH_CO_2F, $05, SHOW
+SilphCo3FHS:
+ db SILPH_CO_3F, $02, SHOW
+ db SILPH_CO_3F, $03, SHOW
+ db SILPH_CO_3F, $04, SHOW
+SilphCo4FHS:
+ db SILPH_CO_4F, $02, SHOW
+ db SILPH_CO_4F, $03, SHOW
+ db SILPH_CO_4F, $04, SHOW
+ db SILPH_CO_4F, $05, SHOW
+ db SILPH_CO_4F, $06, SHOW
+ db SILPH_CO_4F, $07, SHOW
+SilphCo5FHS:
+ db SILPH_CO_5F, $02, SHOW
+ db SILPH_CO_5F, $03, SHOW
+ db SILPH_CO_5F, $04, SHOW
+ db SILPH_CO_5F, $05, SHOW
+ db SILPH_CO_5F, $06, SHOW
+ db SILPH_CO_5F, $07, SHOW
+ db SILPH_CO_5F, $08, SHOW
+SilphCo6FHS:
+ db SILPH_CO_6F, $06, SHOW
+ db SILPH_CO_6F, $07, SHOW
+ db SILPH_CO_6F, $08, SHOW
+ db SILPH_CO_6F, $09, SHOW
+ db SILPH_CO_6F, $0A, SHOW
+SilphCo7FHS:
+ db SILPH_CO_7F, $05, SHOW
+ db SILPH_CO_7F, $06, SHOW
+ db SILPH_CO_7F, $07, SHOW
+ db SILPH_CO_7F, $08, SHOW
+ db SILPH_CO_7F, $09, SHOW
+ db SILPH_CO_7F, $0A, SHOW
+ db SILPH_CO_7F, $0B, SHOW
+ db SILPH_CO_7F, $0C, SHOW
+SilphCo8FHS:
+ db SILPH_CO_8F, $02, SHOW
+ db SILPH_CO_8F, $03, SHOW
+ db SILPH_CO_8F, $04, SHOW
+SilphCo9FHS:
+ db SILPH_CO_9F, $02, SHOW
+ db SILPH_CO_9F, $03, SHOW
+ db SILPH_CO_9F, $04, SHOW
+SilphCo10FHS:
+ db SILPH_CO_10F, $01, SHOW
+ db SILPH_CO_10F, $02, SHOW
+ db SILPH_CO_10F, $03, SHOW
+ db SILPH_CO_10F, $04, SHOW
+ db SILPH_CO_10F, $05, SHOW
+ db SILPH_CO_10F, $06, SHOW
+SilphCo11FHS:
+ db SILPH_CO_11F, $03, SHOW
+ db SILPH_CO_11F, $04, SHOW
+ db SILPH_CO_11F, $05, SHOW
+ db SILPH_CO_11F, $06, SHOW
+UnusedMapF4HS:
+ db UNUSED_MAP_F4, $02, SHOW
+PokemonMansion2FHS:
+ db POKEMON_MANSION_2F, $02, SHOW
+PokemonMansion3FHS:
+ db POKEMON_MANSION_3F, $03, SHOW
+ db POKEMON_MANSION_3F, $04, SHOW
+PokemonMansionB1FHS:
+ db POKEMON_MANSION_B1F, $03, SHOW
+ db POKEMON_MANSION_B1F, $04, SHOW
+ db POKEMON_MANSION_B1F, $05, SHOW
+ db POKEMON_MANSION_B1F, $06, SHOW
+ db POKEMON_MANSION_B1F, $08, SHOW
+SafariZoneEastHS:
+ db SAFARI_ZONE_EAST, $01, SHOW
+ db SAFARI_ZONE_EAST, $02, SHOW
+ db SAFARI_ZONE_EAST, $03, SHOW
+ db SAFARI_ZONE_EAST, $04, SHOW
+SafariZoneNorthHS:
+ db SAFARI_ZONE_NORTH, $01, SHOW
+ db SAFARI_ZONE_NORTH, $02, SHOW
+SafariZoneWestHS:
+ db SAFARI_ZONE_WEST, $01, SHOW
+ db SAFARI_ZONE_WEST, $02, SHOW
+ db SAFARI_ZONE_WEST, $03, SHOW
+ db SAFARI_ZONE_WEST, $04, SHOW
+SafariZoneCenterHS:
+ db SAFARI_ZONE_CENTER, $01, SHOW
+CeruleanCave2FHS:
+ db CERULEAN_CAVE_2F, $01, SHOW
+ db CERULEAN_CAVE_2F, $02, SHOW
+ db CERULEAN_CAVE_2F, $03, SHOW
+ db CERULEAN_CAVE_2F, $04, SHOW
+CeruleanCaveB1FHS:
+ db CERULEAN_CAVE_B1F, $01, SHOW
+ db CERULEAN_CAVE_B1F, $02, SHOW
+ db CERULEAN_CAVE_B1F, $03, SHOW
+ db CERULEAN_CAVE_B1F, $04, SHOW
+ db CERULEAN_CAVE_B1F, $05, SHOW
+VictoryRoad1FHS:
+ db VICTORY_ROAD_1F, $03, SHOW
+ db VICTORY_ROAD_1F, $04, SHOW
+ChampionsRoomHS:
+ db CHAMPIONS_ROOM, $02, HIDE
+SeafoamIslands1FHS:
+ db SEAFOAM_ISLANDS_1F, $01, SHOW
+ db SEAFOAM_ISLANDS_1F, $02, SHOW
+SeafoamIslandsB1FHS:
+ db SEAFOAM_ISLANDS_B1F, $01, HIDE
+ db SEAFOAM_ISLANDS_B1F, $02, HIDE
+SeafoamIslandsB2FHS:
+ db SEAFOAM_ISLANDS_B2F, $01, HIDE
+ db SEAFOAM_ISLANDS_B2F, $02, HIDE
+SeafoamIslandsB3FHS:
+ db SEAFOAM_ISLANDS_B3F, $02, SHOW
+ db SEAFOAM_ISLANDS_B3F, $03, SHOW
+ db SEAFOAM_ISLANDS_B3F, $05, HIDE
+ db SEAFOAM_ISLANDS_B3F, $06, HIDE
+SeafoamIslandsB4FHS:
+ db SEAFOAM_ISLANDS_B4F, $01, HIDE
+ db SEAFOAM_ISLANDS_B4F, $02, HIDE
+ db SEAFOAM_ISLANDS_B4F, $03, SHOW
+
+BluesHouseHSCopy:
+; doesn't seem to be referenced
+ db BLUES_HOUSE, $01, SHOW
+ db BLUES_HOUSE, $02, HIDE
+ db BLUES_HOUSE, $03, SHOW
+
+ db $FF, $01, SHOW
diff --git a/data/maps/map_header_banks.asm b/data/maps/map_header_banks.asm
new file mode 100644
index 00000000..98e5b5f5
--- /dev/null
+++ b/data/maps/map_header_banks.asm
@@ -0,0 +1,251 @@
+; see also MapHeaderPointers
+MapHeaderBanks::
+ db BANK(PalletTown_h)
+ db BANK(ViridianCity_h)
+ db BANK(PewterCity_h)
+ db BANK(CeruleanCity_h)
+ db BANK(LavenderTown_h)
+ db BANK(VermilionCity_h)
+ db BANK(CeladonCity_h)
+ db BANK(FuchsiaCity_h)
+ db BANK(CinnabarIsland_h)
+ db BANK(IndigoPlateau_h)
+ db BANK(SaffronCity_h)
+ db $01 ; UNUSED_MAP_0B
+ db BANK(Route1_h)
+ db BANK(Route2_h)
+ db BANK(Route3_h)
+ db BANK(Route4_h)
+ db BANK(Route5_h)
+ db BANK(Route6_h)
+ db BANK(Route7_h)
+ db BANK(Route8_h)
+ db BANK(Route9_h)
+ db BANK(Route10_h)
+ db BANK(Route11_h)
+ db BANK(Route12_h)
+ db BANK(Route13_h)
+ db BANK(Route14_h)
+ db BANK(Route15_h)
+ db BANK(Route16_h)
+ db BANK(Route17_h)
+ db BANK(Route18_h)
+ db BANK(Route19_h)
+ db BANK(Route20_h)
+ db BANK(Route21_h)
+ db BANK(Route22_h)
+ db BANK(Route23_h)
+ db BANK(Route24_h)
+ db BANK(Route25_h)
+ db BANK(RedsHouse1F_h)
+ db BANK(RedsHouse2F_h)
+ db BANK(BluesHouse_h)
+ db BANK(OaksLab_h)
+ db BANK(ViridianPokecenter_h)
+ db BANK(ViridianMart_h)
+ db BANK(ViridianSchoolHouse_h)
+ db BANK(ViridianNicknameHouse_h)
+ db BANK(ViridianGym_h)
+ db BANK(DiglettsCaveRoute2_h)
+ db BANK(ViridianForestNorthGate_h)
+ db BANK(Route2TradeHouse_h)
+ db BANK(Route2Gate_h)
+ db BANK(ViridianForestSouthGate_h)
+ db BANK(ViridianForest_h)
+ db BANK(Museum1F_h)
+ db BANK(Museum2F_h)
+ db BANK(PewterGym_h)
+ db BANK(PewterNidoranHouse_h)
+ db BANK(PewterMart_h)
+ db BANK(PewterSpeechHouse_h)
+ db BANK(PewterPokecenter_h)
+ db BANK(MtMoon1F_h)
+ db BANK(MtMoonB1F_h)
+ db BANK(MtMoonB2F_h)
+ db BANK(CeruleanTrashedHouse_h)
+ db BANK(CeruleanTradeHouse_h)
+ db BANK(CeruleanPokecenter_h)
+ db BANK(CeruleanGym_h)
+ db BANK(BikeShop_h)
+ db BANK(CeruleanMart_h)
+ db BANK(MtMoonPokecenter_h)
+ db BANK(CeruleanTrashedHouse_h)
+ db BANK(Route5Gate_h)
+ db BANK(UndergroundPathRoute5_h)
+ db BANK(Daycare_h)
+ db BANK(Route6Gate_h)
+ db BANK(UndergroundPathRoute6_h)
+ db BANK(UndergroundPathRoute6_h) ; UNDERGROUND_PATH_ROUTE_6_COPY
+ db BANK(Route7Gate_h)
+ db BANK(UndergroundPathRoute7_h)
+ db BANK(UndergroundPathRoute7Copy_h)
+ db BANK(Route8Gate_h)
+ db BANK(UndergroundPathRoute8_h)
+ db BANK(RockTunnelPokecenter_h)
+ db BANK(RockTunnel1F_h)
+ db BANK(PowerPlant_h)
+ db BANK(Route11Gate1F_h)
+ db BANK(DiglettsCaveRoute11_h)
+ db BANK(Route11Gate2F_h)
+ db BANK(Route12Gate1F_h)
+ db BANK(BillsHouse_h)
+ db BANK(VermilionPokecenter_h)
+ db BANK(PokemonFanClub_h)
+ db BANK(VermilionMart_h)
+ db BANK(VermilionGym_h)
+ db BANK(VermilionPidgeyHouse_h)
+ db BANK(VermilionDock_h)
+ db BANK(SSAnne1F_h)
+ db BANK(SSAnne2F_h)
+ db BANK(SSAnne3F_h)
+ db BANK(SSAnneB1F_h)
+ db BANK(SSAnneBow_h)
+ db BANK(SSAnneKitchen_h)
+ db BANK(SSAnneCaptainsRoom_h)
+ db BANK(SSAnne1FRooms_h)
+ db BANK(SSAnne2FRooms_h)
+ db BANK(SSAnneB1FRooms_h)
+ db $1D ; UNUSED_MAP_69
+ db $1D ; UNUSED_MAP_6A
+ db $1D ; UNUSED_MAP_6B
+ db BANK(VictoryRoad1F_h)
+ db $1D ; UNUSED_MAP_6D
+ db $1D ; UNUSED_MAP_6E
+ db $1D ; UNUSED_MAP_6F
+ db $1D ; UNUSED_MAP_70
+ db BANK(LancesRoom_h)
+ db $1D ; UNUSED_MAP_72
+ db $1D ; UNUSED_MAP_73
+ db $1D ; UNUSED_MAP_74
+ db $1D ; UNUSED_MAP_75
+ db BANK(HallOfFame_h)
+ db BANK(UndergroundPathNorthSouth_h)
+ db BANK(ChampionsRoom_h)
+ db BANK(UndergroundPathWestEast_h)
+ db BANK(CeladonMart1F_h)
+ db BANK(CeladonMart2F_h)
+ db BANK(CeladonMart3F_h)
+ db BANK(CeladonMart4F_h)
+ db BANK(CeladonMartRoof_h)
+ db BANK(CeladonMartElevator_h)
+ db BANK(CeladonMansion1F_h)
+ db BANK(CeladonMansion2F_h)
+ db BANK(CeladonMansion3F_h)
+ db BANK(CeladonMansionRoof_h)
+ db BANK(CeladonMansionRoofHouse_h)
+ db BANK(CeladonPokecenter_h)
+ db BANK(CeladonGym_h)
+ db BANK(GameCorner_h)
+ db BANK(CeladonMart5F_h)
+ db BANK(GameCornerPrizeRoom_h)
+ db BANK(CeladonDiner_h)
+ db BANK(CeladonChiefHouse_h)
+ db BANK(CeladonHotel_h)
+ db BANK(LavenderPokecenter_h)
+ db BANK(PokemonTower1F_h)
+ db BANK(PokemonTower2F_h)
+ db BANK(PokemonTower3F_h)
+ db BANK(PokemonTower4F_h)
+ db BANK(PokemonTower5F_h)
+ db BANK(PokemonTower6F_h)
+ db BANK(PokemonTower7F_h)
+ db BANK(MrFujisHouse_h)
+ db BANK(LavenderMart_h)
+ db BANK(LavenderCuboneHouse_h)
+ db BANK(FuchsiaMart_h)
+ db BANK(FuchsiaBillsGrandpasHouse_h)
+ db BANK(FuchsiaPokecenter_h)
+ db BANK(WardensHouse_h)
+ db BANK(SafariZoneGate_h)
+ db BANK(FuchsiaGym_h)
+ db BANK(FuchsiaMeetingRoom_h)
+ db BANK(SeafoamIslandsB1F_h)
+ db BANK(SeafoamIslandsB2F_h)
+ db BANK(SeafoamIslandsB3F_h)
+ db BANK(SeafoamIslandsB4F_h)
+ db BANK(VermilionOldRodHouse_h)
+ db BANK(FuchsiaGoodRodHouse_h)
+ db BANK(PokemonMansion1F_h)
+ db BANK(CinnabarGym_h)
+ db BANK(CinnabarLab_h)
+ db BANK(CinnabarLabTradeRoom_h)
+ db BANK(CinnabarLabMetronomeRoom_h)
+ db BANK(CinnabarLabFossilRoom_h)
+ db BANK(CinnabarPokecenter_h)
+ db BANK(CinnabarMart_h)
+ db BANK(CinnabarMart_h)
+ db BANK(IndigoPlateauLobby_h)
+ db BANK(CopycatsHouse1F_h)
+ db BANK(CopycatsHouse2F_h)
+ db BANK(FightingDojo_h)
+ db BANK(SaffronGym_h)
+ db BANK(SaffronPidgeyHouse_h)
+ db BANK(SaffronMart_h)
+ db BANK(SilphCo1F_h)
+ db BANK(SaffronPokecenter_h)
+ db BANK(MrPsychicsHouse_h)
+ db BANK(Route15Gate1F_h)
+ db BANK(Route15Gate2F_h)
+ db BANK(Route16Gate1F_h)
+ db BANK(Route16Gate2F_h)
+ db BANK(Route16FlyHouse_h)
+ db BANK(Route12SuperRodHouse_h)
+ db BANK(Route18Gate1F_h)
+ db BANK(Route18Gate2F_h)
+ db BANK(SeafoamIslands1F_h)
+ db BANK(Route22Gate_h)
+ db BANK(VictoryRoad2F_h)
+ db BANK(Route12Gate2F_h)
+ db BANK(VermilionTradeHouse_h)
+ db BANK(DiglettsCave_h)
+ db BANK(VictoryRoad3F_h)
+ db BANK(RocketHideoutB1F_h)
+ db BANK(RocketHideoutB2F_h)
+ db BANK(RocketHideoutB3F_h)
+ db BANK(RocketHideoutB4F_h)
+ db BANK(RocketHideoutElevator_h)
+ db $01 ; UNUSED_MAP_CC
+ db $01 ; UNUSED_MAP_CD
+ db $01 ; UNUSED_MAP_CE
+ db BANK(SilphCo2F_h)
+ db BANK(SilphCo3F_h)
+ db BANK(SilphCo4F_h)
+ db BANK(SilphCo5F_h)
+ db BANK(SilphCo6F_h)
+ db BANK(SilphCo7F_h)
+ db BANK(SilphCo8F_h)
+ db BANK(PokemonMansion2F_h)
+ db BANK(PokemonMansion3F_h)
+ db BANK(PokemonMansionB1F_h)
+ db BANK(SafariZoneEast_h)
+ db BANK(SafariZoneNorth_h)
+ db BANK(SafariZoneWest_h)
+ db BANK(SafariZoneCenter_h)
+ db BANK(SafariZoneCenterRestHouse_h)
+ db BANK(SafariZoneSecretHouse_h)
+ db BANK(SafariZoneWestRestHouse_h)
+ db BANK(SafariZoneEastRestHouse_h)
+ db BANK(SafariZoneNorthRestHouse_h)
+ db BANK(CeruleanCave2F_h)
+ db BANK(CeruleanCaveB1F_h)
+ db BANK(CeruleanCave1F_h)
+ db BANK(NameRatersHouse_h)
+ db BANK(CeruleanBadgeHouse_h)
+ db $01 ; UNUSED_MAP_E7
+ db BANK(RockTunnelB1F_h)
+ db BANK(SilphCo9F_h)
+ db BANK(SilphCo10F_h)
+ db BANK(SilphCo11F_h)
+ db BANK(SilphCoElevator_h)
+ db $11 ; UNUSED_MAP_ED
+ db $11 ; UNUSED_MAP_EE
+ db BANK(TradeCenter_h)
+ db BANK(Colosseum_h)
+ db $11 ; UNUSED_MAP_F1
+ db $11 ; UNUSED_MAP_F2
+ db $11 ; UNUSED_MAP_F3
+ db $11 ; UNUSED_MAP_F4
+ db BANK(LoreleisRoom_h)
+ db BANK(BrunosRoom_h)
+ db BANK(AgathasRoom_h)
+ db BANK(BeachHouse_h)
diff --git a/data/map_header_pointers.asm b/data/maps/map_header_pointers.asm
index 6ea31795..6ea31795 100644
--- a/data/map_header_pointers.asm
+++ b/data/maps/map_header_pointers.asm
diff --git a/data/maps/names.asm b/data/maps/names.asm
new file mode 100755
index 00000000..6bdb66d5
--- /dev/null
+++ b/data/maps/names.asm
@@ -0,0 +1,54 @@
+MapNames:
+PalletTownName: db "PALLET TOWN@"
+ViridianCityName: db "VIRIDIAN CITY@"
+PewterCityName: db "PEWTER CITY@"
+CeruleanCityName: db "CERULEAN CITY@"
+LavenderTownName: db "LAVENDER TOWN@"
+VermilionCityName: db "VERMILION CITY@"
+CeladonCityName: db "CELADON CITY@"
+FuchsiaCityName: db "FUCHSIA CITY@"
+CinnabarIslandName: db "CINNABAR ISLAND@"
+IndigoPlateauName: db "INDIGO PLATEAU@"
+SaffronCityName: db "SAFFRON CITY@"
+Route1Name: db "ROUTE 1@"
+Route2Name: db "ROUTE 2@"
+Route3Name: db "ROUTE 3@"
+Route4Name: db "ROUTE 4@"
+Route5Name: db "ROUTE 5@"
+Route6Name: db "ROUTE 6@"
+Route7Name: db "ROUTE 7@"
+Route8Name: db "ROUTE 8@"
+Route9Name: db "ROUTE 9@"
+Route10Name: db "ROUTE 10@"
+Route11Name: db "ROUTE 11@"
+Route12Name: db "ROUTE 12@"
+Route13Name: db "ROUTE 13@"
+Route14Name: db "ROUTE 14@"
+Route15Name: db "ROUTE 15@"
+Route16Name: db "ROUTE 16@"
+Route17Name: db "ROUTE 17@"
+Route18Name: db "ROUTE 18@"
+Route19Name: db "SEA ROUTE 19@"
+Route20Name: db "SEA ROUTE 20@"
+Route21Name: db "SEA ROUTE 21@"
+Route22Name: db "ROUTE 22@"
+Route23Name: db "ROUTE 23@"
+Route24Name: db "ROUTE 24@"
+Route25Name: db "ROUTE 25@"
+ViridianForestName: db "VIRIDIAN FOREST@"
+MountMoonName: db "MT.MOON@"
+RockTunnelName: db "ROCK TUNNEL@"
+SeaCottageName: db "SEA COTTAGE@"
+SSAnneName: db "S.S.ANNE@"
+PokemonLeagueName: db "#MON LEAGUE@"
+UndergroundPathName: db "UNDERGROUND PATH@"
+PokemonTowerName: db "#MON TOWER@"
+SeafoamIslandsName: db "SEAFOAM ISLANDS@"
+VictoryRoadName: db "VICTORY ROAD@"
+DiglettsCaveName: db "DIGLETT's CAVE@"
+RocketHQName: db "ROCKET HQ@"
+SilphCoName: db "SILPH CO.@"
+PokemonMansionName: db "<PKMN> MANSION@"
+SafariZoneName: db "SAFARI ZONE@"
+CeruleanCaveName: db "CERULEAN CAVE@"
+PowerPlantName: db "POWER PLANT@"
diff --git a/data/maps/objects/AgathasRoom.asm b/data/maps/objects/AgathasRoom.asm
new file mode 100755
index 00000000..0f00ea20
--- /dev/null
+++ b/data/maps/objects/AgathasRoom.asm
@@ -0,0 +1,15 @@
+AgathasRoom_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 4, 11, 2, BRUNOS_ROOM
+ warp 5, 11, 3, BRUNOS_ROOM
+ warp 4, 0, 0, LANCES_ROOM
+ warp 5, 0, 0, LANCES_ROOM
+
+ def_signs
+
+ def_objects
+ object SPRITE_AGATHA, 5, 2, STAY, DOWN, 1, OPP_AGATHA, 1
+
+ def_warps_to AGATHAS_ROOM
diff --git a/data/maps/objects/BeachHouse.asm b/data/maps/objects/BeachHouse.asm
new file mode 100644
index 00000000..1ba99f87
--- /dev/null
+++ b/data/maps/objects/BeachHouse.asm
@@ -0,0 +1,18 @@
+BeachHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 0, LAST_MAP
+ warp 3, 7, 0, LAST_MAP
+
+ def_signs
+ sign 3, 0, 3
+ sign 7, 0, 4
+ sign 11, 0, 5
+ sign 13, 1, 6
+
+ def_objects
+ object SPRITE_FISHING_GURU, 2, 3, STAY, DOWN, 1 ; surfin' dude
+ object SPRITE_PIKACHU, 5, 3, WALK, 1, 2 ; pikachu
+
+ def_warps_to BEACH_HOUSE
diff --git a/data/maps/objects/BikeShop.asm b/data/maps/objects/BikeShop.asm
new file mode 100755
index 00000000..6a6fe6d6
--- /dev/null
+++ b/data/maps/objects/BikeShop.asm
@@ -0,0 +1,15 @@
+BikeShop_Object:
+ db $e ; border block
+
+ def_warps
+ warp 2, 7, 4, LAST_MAP
+ warp 3, 7, 4, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_BIKE_SHOP_CLERK, 6, 2, STAY, NONE, 1 ; person
+ object SPRITE_MIDDLE_AGED_WOMAN, 5, 6, WALK, UP_DOWN, 2 ; person
+ object SPRITE_YOUNGSTER, 1, 3, STAY, UP, 3 ; person
+
+ def_warps_to BIKE_SHOP
diff --git a/data/maps/objects/BillsHouse.asm b/data/maps/objects/BillsHouse.asm
new file mode 100755
index 00000000..fad8df05
--- /dev/null
+++ b/data/maps/objects/BillsHouse.asm
@@ -0,0 +1,15 @@
+BillsHouse_Object:
+ db $d ; border block
+
+ def_warps
+ warp 2, 7, 0, LAST_MAP
+ warp 3, 7, 0, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_MONSTER, 6, 5, STAY, NONE, 1 ; person
+ object SPRITE_SUPER_NERD, 4, 4, STAY, NONE, 2 ; person
+ object SPRITE_SUPER_NERD, 6, 5, STAY, NONE, 3 ; person
+
+ def_warps_to BILLS_HOUSE
diff --git a/data/maps/objects/BluesHouse.asm b/data/maps/objects/BluesHouse.asm
new file mode 100755
index 00000000..f4931a47
--- /dev/null
+++ b/data/maps/objects/BluesHouse.asm
@@ -0,0 +1,15 @@
+BluesHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 1, LAST_MAP
+ warp 3, 7, 1, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_DAISY, 2, 3, STAY, RIGHT, 1, 0 ; Daisy, sitting by map
+ object SPRITE_DAISY, 6, 4, WALK, UP_DOWN, 2, 0 ; Daisy, walking around
+ object SPRITE_POKEDEX, 3, 3, STAY, NONE, 3, 0 ; map on table
+
+ def_warps_to BLUES_HOUSE
diff --git a/data/maps/objects/BrunosRoom.asm b/data/maps/objects/BrunosRoom.asm
new file mode 100755
index 00000000..f5399874
--- /dev/null
+++ b/data/maps/objects/BrunosRoom.asm
@@ -0,0 +1,15 @@
+BrunosRoom_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 4, 11, 2, LORELEIS_ROOM
+ warp 5, 11, 3, LORELEIS_ROOM
+ warp 4, 0, 0, AGATHAS_ROOM
+ warp 5, 0, 1, AGATHAS_ROOM
+
+ def_signs
+
+ def_objects
+ object SPRITE_BRUNO, 5, 2, STAY, DOWN, 1, OPP_BRUNO, 1
+
+ def_warps_to BRUNOS_ROOM
diff --git a/data/maps/objects/CeladonChiefHouse.asm b/data/maps/objects/CeladonChiefHouse.asm
new file mode 100755
index 00000000..97b9e4c9
--- /dev/null
+++ b/data/maps/objects/CeladonChiefHouse.asm
@@ -0,0 +1,15 @@
+CeladonChiefHouse_Object:
+ db $f ; border block
+
+ def_warps
+ warp 2, 7, 11, LAST_MAP
+ warp 3, 7, 11, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_GRAMPS, 4, 2, STAY, DOWN, 1 ; person
+ object SPRITE_ROCKET, 1, 4, WALK, ANY_DIR, 2 ; person
+ object SPRITE_SAILOR, 5, 6, STAY, LEFT, 3 ; person
+
+ def_warps_to CELADON_CHIEF_HOUSE
diff --git a/data/maps/objects/CeladonCity.asm b/data/maps/objects/CeladonCity.asm
new file mode 100755
index 00000000..ddf0afdb
--- /dev/null
+++ b/data/maps/objects/CeladonCity.asm
@@ -0,0 +1,41 @@
+CeladonCity_Object:
+ db $f ; border block
+
+ def_warps
+ warp 8, 13, 0, CELADON_MART_1F
+ warp 10, 13, 2, CELADON_MART_1F
+ warp 24, 9, 0, CELADON_MANSION_1F
+ warp 24, 3, 2, CELADON_MANSION_1F
+ warp 25, 3, 2, CELADON_MANSION_1F
+ warp 41, 9, 0, CELADON_POKECENTER
+ warp 12, 27, 0, CELADON_GYM
+ warp 28, 19, 0, GAME_CORNER
+ warp 39, 19, 0, CELADON_MART_5F ; beta warp! no longer used
+ warp 33, 19, 0, GAME_CORNER_PRIZE_ROOM
+ warp 31, 27, 0, CELADON_DINER
+ warp 35, 27, 0, CELADON_CHIEF_HOUSE
+ warp 43, 27, 0, CELADON_HOTEL
+
+ def_signs
+ sign 27, 15, 10 ; CeladonCityText10
+ sign 19, 15, 11 ; CeladonCityText11
+ sign 42, 9, 12 ; PokeCenterSignText
+ sign 13, 29, 13 ; CeladonCityText13
+ sign 21, 9, 14 ; CeladonCityText14
+ sign 12, 13, 15 ; CeladonCityText15
+ sign 39, 21, 16 ; CeladonCityText16
+ sign 33, 21, 17 ; CeladonCityText17
+ sign 27, 21, 18 ; CeladonCityText18
+
+ def_objects
+ object SPRITE_LITTLE_GIRL, 8, 17, WALK, ANY_DIR, 1 ; person
+ object SPRITE_GRAMPS, 11, 28, STAY, UP, 2 ; person
+ object SPRITE_GIRL, 14, 19, WALK, UP_DOWN, 3 ; person
+ object SPRITE_GRAMPS, 25, 22, STAY, DOWN, 4 ; person
+ object SPRITE_GRAMPS, 22, 16, STAY, DOWN, 5 ; person
+ object SPRITE_FISHER, 32, 12, STAY, LEFT, 6 ; person
+ object SPRITE_MONSTER, 30, 12, STAY, RIGHT, 7 ; person
+ object SPRITE_ROCKET, 32, 29, WALK, LEFT_RIGHT, 8 ; person
+ object SPRITE_ROCKET, 42, 14, WALK, LEFT_RIGHT, 9 ; person
+
+ def_warps_to CELADON_CITY
diff --git a/data/maps/objects/CeladonDiner.asm b/data/maps/objects/CeladonDiner.asm
new file mode 100755
index 00000000..37c8c876
--- /dev/null
+++ b/data/maps/objects/CeladonDiner.asm
@@ -0,0 +1,17 @@
+CeladonDiner_Object:
+ db $f ; border block
+
+ def_warps
+ warp 3, 7, 10, LAST_MAP
+ warp 4, 7, 10, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_COOK, 8, 5, WALK, LEFT_RIGHT, 1 ; person
+ object SPRITE_MIDDLE_AGED_WOMAN, 7, 2, STAY, NONE, 2 ; person
+ object SPRITE_MIDDLE_AGED_MAN, 1, 4, STAY, DOWN, 3 ; person
+ object SPRITE_FISHER, 5, 3, STAY, RIGHT, 4 ; person
+ object SPRITE_GYM_GUIDE, 0, 1, STAY, DOWN, 5 ; person
+
+ def_warps_to CELADON_DINER
diff --git a/data/maps/objects/CeladonGym.asm b/data/maps/objects/CeladonGym.asm
new file mode 100755
index 00000000..197a254b
--- /dev/null
+++ b/data/maps/objects/CeladonGym.asm
@@ -0,0 +1,20 @@
+CeladonGym_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 4, 17, 6, LAST_MAP
+ warp 5, 17, 6, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_ERIKA, 4, 3, STAY, DOWN, 1, OPP_ERIKA, 1
+ object SPRITE_COOLTRAINER_F, 2, 11, STAY, RIGHT, 2, OPP_LASS, 17
+ object SPRITE_BEAUTY, 7, 10, STAY, LEFT, 3, OPP_BEAUTY, 1
+ object SPRITE_COOLTRAINER_F, 9, 5, STAY, DOWN, 4, OPP_JR_TRAINER_F, 11
+ object SPRITE_BEAUTY, 1, 5, STAY, DOWN, 5, OPP_BEAUTY, 2
+ object SPRITE_COOLTRAINER_F, 6, 3, STAY, DOWN, 6, OPP_LASS, 18
+ object SPRITE_BEAUTY, 3, 3, STAY, DOWN, 7, OPP_BEAUTY, 3
+ object SPRITE_COOLTRAINER_F, 5, 3, STAY, DOWN, 8, OPP_COOLTRAINER_F, 1
+
+ def_warps_to CELADON_GYM
diff --git a/data/maps/objects/CeladonHotel.asm b/data/maps/objects/CeladonHotel.asm
new file mode 100755
index 00000000..a516f141
--- /dev/null
+++ b/data/maps/objects/CeladonHotel.asm
@@ -0,0 +1,15 @@
+CeladonHotel_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 12, LAST_MAP
+ warp 4, 7, 12, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_GRANNY, 3, 1, STAY, DOWN, 1 ; person
+ object SPRITE_BEAUTY, 2, 4, STAY, NONE, 2 ; person
+ object SPRITE_SUPER_NERD, 8, 4, WALK, LEFT_RIGHT, 3 ; person
+
+ def_warps_to CELADON_HOTEL
diff --git a/data/maps/objects/CeladonMansion1F.asm b/data/maps/objects/CeladonMansion1F.asm
new file mode 100755
index 00000000..63eb686c
--- /dev/null
+++ b/data/maps/objects/CeladonMansion1F.asm
@@ -0,0 +1,20 @@
+CeladonMansion1F_Object:
+ db $f ; border block
+
+ def_warps
+ warp 4, 11, 2, LAST_MAP
+ warp 5, 11, 2, LAST_MAP
+ warp 4, 0, 4, LAST_MAP
+ warp 7, 1, 1, CELADON_MANSION_2F
+ warp 2, 1, 2, CELADON_MANSION_2F
+
+ def_signs
+ sign 4, 9, 5 ; CeladonMansion1Text5
+
+ def_objects
+ object SPRITE_MONSTER, 0, 5, STAY, RIGHT, 1 ; person
+ object SPRITE_GRANNY, 1, 5, STAY, DOWN, 2 ; person
+ object SPRITE_FAIRY, 1, 8, WALK, LEFT_RIGHT, 3 ; person
+ object SPRITE_MONSTER, 4, 4, WALK, UP_DOWN, 4 ; person
+
+ def_warps_to CELADON_MANSION_1F
diff --git a/data/maps/objects/CeladonMansion2F.asm b/data/maps/objects/CeladonMansion2F.asm
new file mode 100755
index 00000000..211abbda
--- /dev/null
+++ b/data/maps/objects/CeladonMansion2F.asm
@@ -0,0 +1,15 @@
+CeladonMansion2F_Object:
+ db $f ; border block
+
+ def_warps
+ warp 6, 1, 0, CELADON_MANSION_3F
+ warp 7, 1, 3, CELADON_MANSION_1F
+ warp 2, 1, 4, CELADON_MANSION_1F
+ warp 4, 1, 3, CELADON_MANSION_3F
+
+ def_signs
+ sign 4, 9, 1 ; CeladonMansion2Text1
+
+ def_objects
+
+ def_warps_to CELADON_MANSION_2F
diff --git a/data/maps/objects/CeladonMansion3F.asm b/data/maps/objects/CeladonMansion3F.asm
new file mode 100755
index 00000000..442f3c23
--- /dev/null
+++ b/data/maps/objects/CeladonMansion3F.asm
@@ -0,0 +1,22 @@
+CeladonMansion3F_Object:
+ db $f ; border block
+
+ def_warps
+ warp 6, 1, 0, CELADON_MANSION_2F
+ warp 7, 1, 0, CELADON_MANSION_ROOF
+ warp 2, 1, 1, CELADON_MANSION_ROOF
+ warp 4, 1, 3, CELADON_MANSION_2F
+
+ def_signs
+ sign 1, 3, 5 ; CeladonMansion3Text5
+ sign 4, 3, 6 ; CeladonMansion3Text6
+ sign 1, 6, 7 ; CeladonMansion3Text7
+ sign 4, 9, 8 ; CeladonMansion3Text8
+
+ def_objects
+ object SPRITE_BIKE_SHOP_CLERK, 0, 4, STAY, UP, 1 ; person
+ object SPRITE_CLERK, 3, 4, STAY, UP, 2 ; person
+ object SPRITE_SUPER_NERD, 0, 7, STAY, UP, 3 ; person
+ object SPRITE_SILPH_WORKER, 2, 3, STAY, NONE, 4 ; person
+
+ def_warps_to CELADON_MANSION_3F
diff --git a/data/maps/objects/CeladonMansionRoof.asm b/data/maps/objects/CeladonMansionRoof.asm
new file mode 100755
index 00000000..e3eb8aa7
--- /dev/null
+++ b/data/maps/objects/CeladonMansionRoof.asm
@@ -0,0 +1,14 @@
+CeladonMansionRoof_Object:
+ db $9 ; border block
+
+ def_warps
+ warp 6, 1, 1, CELADON_MANSION_3F
+ warp 2, 1, 2, CELADON_MANSION_3F
+ warp 2, 7, 0, CELADON_MANSION_ROOF_HOUSE
+
+ def_signs
+ sign 3, 7, 1 ; CeladonMansion4Text1
+
+ def_objects
+
+ def_warps_to CELADON_MANSION_ROOF
diff --git a/data/maps/objects/CeladonMansionRoofHouse.asm b/data/maps/objects/CeladonMansionRoofHouse.asm
new file mode 100755
index 00000000..1656bdcf
--- /dev/null
+++ b/data/maps/objects/CeladonMansionRoofHouse.asm
@@ -0,0 +1,14 @@
+CeladonMansionRoofHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 2, CELADON_MANSION_ROOF
+ warp 3, 7, 2, CELADON_MANSION_ROOF
+
+ def_signs
+
+ def_objects
+ object SPRITE_HIKER, 2, 2, STAY, DOWN, 1 ; person
+ object SPRITE_POKE_BALL, 4, 3, STAY, NONE, 2 ; person
+
+ def_warps_to CELADON_MANSION_ROOF_HOUSE
diff --git a/data/maps/objects/CeladonMart1F.asm b/data/maps/objects/CeladonMart1F.asm
new file mode 100755
index 00000000..3edcbe3f
--- /dev/null
+++ b/data/maps/objects/CeladonMart1F.asm
@@ -0,0 +1,19 @@
+CeladonMart1F_Object:
+ db $f ; border block
+
+ def_warps
+ warp 2, 7, 0, LAST_MAP
+ warp 3, 7, 0, LAST_MAP
+ warp 16, 7, 1, LAST_MAP
+ warp 17, 7, 1, LAST_MAP
+ warp 12, 1, 0, CELADON_MART_2F
+ warp 1, 1, 0, CELADON_MART_ELEVATOR
+
+ def_signs
+ sign 11, 4, 2 ; CeladonMart1Text2
+ sign 14, 1, 3 ; CeladonMart1Text3
+
+ def_objects
+ object SPRITE_LINK_RECEPTIONIST, 8, 3, STAY, DOWN, 1 ; person
+
+ def_warps_to CELADON_MART_1F
diff --git a/data/maps/objects/CeladonMart2F.asm b/data/maps/objects/CeladonMart2F.asm
new file mode 100755
index 00000000..19b2aa59
--- /dev/null
+++ b/data/maps/objects/CeladonMart2F.asm
@@ -0,0 +1,18 @@
+CeladonMart2F_Object:
+ db $f ; border block
+
+ def_warps
+ warp 12, 1, 4, CELADON_MART_1F
+ warp 16, 1, 1, CELADON_MART_3F
+ warp 1, 1, 0, CELADON_MART_ELEVATOR
+
+ def_signs
+ sign 14, 1, 5 ; CeladonMart2Text5
+
+ def_objects
+ object SPRITE_CLERK, 5, 3, STAY, DOWN, 1 ; person
+ object SPRITE_CLERK, 6, 3, STAY, DOWN, 2 ; person
+ object SPRITE_MIDDLE_AGED_MAN, 19, 5, STAY, NONE, 3 ; person
+ object SPRITE_GIRL, 14, 4, WALK, UP_DOWN, 4 ; person
+
+ def_warps_to CELADON_MART_2F
diff --git a/data/maps/objects/CeladonMart3F.asm b/data/maps/objects/CeladonMart3F.asm
new file mode 100755
index 00000000..e1e8c8f2
--- /dev/null
+++ b/data/maps/objects/CeladonMart3F.asm
@@ -0,0 +1,30 @@
+CeladonMart3F_Object:
+ db $f ; border block
+
+ def_warps
+ warp 12, 1, 0, CELADON_MART_4F
+ warp 16, 1, 1, CELADON_MART_2F
+ warp 1, 1, 0, CELADON_MART_ELEVATOR
+
+ def_signs
+ sign 2, 4, 6 ; CeladonMart3Text6
+ sign 3, 4, 7 ; CeladonMart3Text7
+ sign 5, 4, 8 ; CeladonMart3Text8
+ sign 6, 4, 9 ; CeladonMart3Text9
+ sign 2, 6, 10 ; CeladonMart3Text10
+ sign 3, 6, 11 ; CeladonMart3Text11
+ sign 5, 6, 12 ; CeladonMart3Text12
+ sign 6, 6, 13 ; CeladonMart3Text13
+ sign 14, 1, 14 ; CeladonMart3Text14
+ sign 4, 1, 15 ; CeladonMart3Text15
+ sign 6, 1, 16 ; CeladonMart3Text16
+ sign 10, 1, 17 ; CeladonMart3Text17
+
+ def_objects
+ object SPRITE_CLERK, 16, 5, STAY, NONE, 1 ; person
+ object SPRITE_GAMEBOY_KID, 11, 6, STAY, RIGHT, 2 ; person
+ object SPRITE_GAMEBOY_KID, 7, 2, STAY, DOWN, 3 ; person
+ object SPRITE_GAMEBOY_KID, 8, 2, STAY, DOWN, 4 ; person
+ object SPRITE_LITTLE_BOY, 2, 5, STAY, UP, 5 ; person
+
+ def_warps_to CELADON_MART_3F
diff --git a/data/maps/objects/CeladonMart4F.asm b/data/maps/objects/CeladonMart4F.asm
new file mode 100755
index 00000000..72ed0338
--- /dev/null
+++ b/data/maps/objects/CeladonMart4F.asm
@@ -0,0 +1,17 @@
+CeladonMart4F_Object:
+ db $f ; border block
+
+ def_warps
+ warp 12, 1, 0, CELADON_MART_3F
+ warp 16, 1, 1, CELADON_MART_5F
+ warp 1, 1, 0, CELADON_MART_ELEVATOR
+
+ def_signs
+ sign 14, 1, 4 ; CeladonMart4Text4
+
+ def_objects
+ object SPRITE_CLERK, 5, 7, STAY, NONE, 1 ; person
+ object SPRITE_SUPER_NERD, 15, 5, WALK, LEFT_RIGHT, 2 ; person
+ object SPRITE_YOUNGSTER, 5, 2, WALK, LEFT_RIGHT, 3 ; person
+
+ def_warps_to CELADON_MART_4F
diff --git a/data/maps/objects/CeladonMart5F.asm b/data/maps/objects/CeladonMart5F.asm
new file mode 100755
index 00000000..2583526c
--- /dev/null
+++ b/data/maps/objects/CeladonMart5F.asm
@@ -0,0 +1,18 @@
+CeladonMart5F_Object:
+ db $f ; border block
+
+ def_warps
+ warp 12, 1, 0, CELADON_MART_ROOF
+ warp 16, 1, 1, CELADON_MART_4F
+ warp 1, 1, 0, CELADON_MART_ELEVATOR
+
+ def_signs
+ sign 14, 1, 5 ; CeladonMart5Text5
+
+ def_objects
+ object SPRITE_GENTLEMAN, 14, 5, WALK, UP_DOWN, 1 ; person
+ object SPRITE_SAILOR, 2, 6, STAY, NONE, 2 ; person
+ object SPRITE_CLERK, 5, 3, STAY, DOWN, 3 ; person
+ object SPRITE_CLERK, 6, 3, STAY, DOWN, 4 ; person
+
+ def_warps_to CELADON_MART_5F
diff --git a/data/maps/objects/CeladonMartElevator.asm b/data/maps/objects/CeladonMartElevator.asm
new file mode 100755
index 00000000..d03984a6
--- /dev/null
+++ b/data/maps/objects/CeladonMartElevator.asm
@@ -0,0 +1,13 @@
+CeladonMartElevator_Object:
+ db $f ; border block
+
+ def_warps
+ warp 1, 3, 5, CELADON_MART_1F
+ warp 2, 3, 5, CELADON_MART_1F
+
+ def_signs
+ sign 3, 0, 1 ; CeladonMartElevatorText1
+
+ def_objects
+
+ def_warps_to CELADON_MART_ELEVATOR
diff --git a/data/maps/objects/CeladonMartRoof.asm b/data/maps/objects/CeladonMartRoof.asm
new file mode 100755
index 00000000..49b5ab6f
--- /dev/null
+++ b/data/maps/objects/CeladonMartRoof.asm
@@ -0,0 +1,17 @@
+CeladonMartRoof_Object:
+ db $42 ; border block
+
+ def_warps
+ warp 15, 2, 0, CELADON_MART_5F
+
+ def_signs
+ sign 10, 1, 3 ; CeladonMartRoofText3
+ sign 11, 1, 4 ; CeladonMartRoofText4
+ sign 12, 2, 5 ; CeladonMartRoofText5
+ sign 13, 2, 6 ; CeladonMartRoofText6
+
+ def_objects
+ object SPRITE_SUPER_NERD, 10, 4, STAY, LEFT, 1 ; person
+ object SPRITE_LITTLE_GIRL, 5, 5, WALK, ANY_DIR, 2 ; person
+
+ def_warps_to CELADON_MART_ROOF
diff --git a/data/maps/objects/CeladonPokecenter.asm b/data/maps/objects/CeladonPokecenter.asm
new file mode 100755
index 00000000..0a298fd0
--- /dev/null
+++ b/data/maps/objects/CeladonPokecenter.asm
@@ -0,0 +1,17 @@
+CeladonPokecenter_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 5, LAST_MAP
+ warp 4, 7, 5, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
+ object SPRITE_GENTLEMAN, 7, 3, STAY, DOWN, 2 ; person
+ object SPRITE_BEAUTY, 10, 5, WALK, ANY_DIR, 3 ; person
+ object SPRITE_LINK_RECEPTIONIST, 11, 2, STAY, DOWN, 4 ; person
+ object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
+
+ def_warps_to CELADON_POKECENTER
diff --git a/data/maps/objects/CeruleanBadgeHouse.asm b/data/maps/objects/CeruleanBadgeHouse.asm
new file mode 100755
index 00000000..50d2087a
--- /dev/null
+++ b/data/maps/objects/CeruleanBadgeHouse.asm
@@ -0,0 +1,14 @@
+CeruleanBadgeHouse_Object:
+ db $c ; border block
+
+ def_warps
+ warp 2, 0, 9, LAST_MAP
+ warp 2, 7, 8, LAST_MAP
+ warp 3, 7, 8, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_MIDDLE_AGED_MAN, 5, 3, STAY, RIGHT, 1 ; person
+
+ def_warps_to CERULEAN_BADGE_HOUSE
diff --git a/data/maps/objects/CeruleanCave1F.asm b/data/maps/objects/CeruleanCave1F.asm
new file mode 100755
index 00000000..8c3d260e
--- /dev/null
+++ b/data/maps/objects/CeruleanCave1F.asm
@@ -0,0 +1,23 @@
+CeruleanCave1F_Object:
+ db $7d ; border block
+
+ def_warps
+ warp 24, 17, 6, LAST_MAP
+ warp 25, 17, 6, LAST_MAP
+ warp 27, 1, 0, CERULEAN_CAVE_2F
+ warp 23, 7, 1, CERULEAN_CAVE_2F
+ warp 18, 9, 2, CERULEAN_CAVE_2F
+ warp 7, 1, 3, CERULEAN_CAVE_2F
+ warp 1, 3, 4, CERULEAN_CAVE_2F
+ warp 3, 11, 5, CERULEAN_CAVE_2F
+ warp 0, 6, 0, CERULEAN_CAVE_B1F
+
+ def_signs
+
+ def_objects
+ object SPRITE_POKE_BALL, 29, 16, STAY, NONE, 1, RARE_CANDY
+ object SPRITE_POKE_BALL, 7, 11, STAY, NONE, 2, MAX_ELIXER
+ object SPRITE_POKE_BALL, 29, 9, STAY, NONE, 3, MAX_REVIVE
+ object SPRITE_POKE_BALL, 18, 3, STAY, NONE, 4, ULTRA_BALL
+
+ def_warps_to CERULEAN_CAVE_1F
diff --git a/data/maps/objects/CeruleanCave2F.asm b/data/maps/objects/CeruleanCave2F.asm
new file mode 100755
index 00000000..787ae539
--- /dev/null
+++ b/data/maps/objects/CeruleanCave2F.asm
@@ -0,0 +1,20 @@
+CeruleanCave2F_Object:
+ db $7d ; border block
+
+ def_warps
+ warp 29, 1, 2, CERULEAN_CAVE_1F
+ warp 22, 6, 3, CERULEAN_CAVE_1F
+ warp 19, 7, 4, CERULEAN_CAVE_1F
+ warp 9, 1, 5, CERULEAN_CAVE_1F
+ warp 1, 3, 6, CERULEAN_CAVE_1F
+ warp 3, 11, 7, CERULEAN_CAVE_1F
+
+ def_signs
+
+ def_objects
+ object SPRITE_POKE_BALL, 0, 11, STAY, NONE, 1, RARE_CANDY
+ object SPRITE_POKE_BALL, 16, 7, STAY, NONE, 2, ULTRA_BALL
+ object SPRITE_POKE_BALL, 19, 11, STAY, NONE, 3, MAX_REVIVE
+ object SPRITE_POKE_BALL, 27, 9, STAY, NONE, 4, FULL_RESTORE
+
+ def_warps_to CERULEAN_CAVE_2F
diff --git a/data/maps/objects/CeruleanCaveB1F.asm b/data/maps/objects/CeruleanCaveB1F.asm
new file mode 100755
index 00000000..3493ab7e
--- /dev/null
+++ b/data/maps/objects/CeruleanCaveB1F.asm
@@ -0,0 +1,16 @@
+CeruleanCaveB1F_Object:
+ db $7d ; border block
+
+ def_warps
+ warp 3, 6, 8, CERULEAN_CAVE_1F
+
+ def_signs
+
+ def_objects
+ object SPRITE_MONSTER, 27, 13, STAY, DOWN, 1, MEWTWO, 70
+ object SPRITE_POKE_BALL, 26, 1, STAY, NONE, 2, ULTRA_BALL
+ object SPRITE_POKE_BALL, 2, 13, STAY, NONE, 3, ULTRA_BALL
+ object SPRITE_POKE_BALL, 3, 13, STAY, NONE, 4, MAX_REVIVE
+ object SPRITE_POKE_BALL, 15, 3, STAY, NONE, 5, MAX_ELIXER
+
+ def_warps_to CERULEAN_CAVE_B1F
diff --git a/data/maps/objects/CeruleanCity.asm b/data/maps/objects/CeruleanCity.asm
new file mode 100755
index 00000000..fae56fc1
--- /dev/null
+++ b/data/maps/objects/CeruleanCity.asm
@@ -0,0 +1,37 @@
+CeruleanCity_Object:
+ db $a ; border block
+
+ def_warps
+ warp 27, 11, 0, CERULEAN_TRASHED_HOUSE
+ warp 13, 15, 0, CERULEAN_TRADE_HOUSE
+ warp 19, 17, 0, CERULEAN_POKECENTER
+ warp 30, 19, 0, CERULEAN_GYM
+ warp 13, 25, 0, BIKE_SHOP
+ warp 25, 25, 0, CERULEAN_MART
+ warp 4, 11, 0, CERULEAN_CAVE_1F
+ warp 27, 9, 2, CERULEAN_TRASHED_HOUSE
+ warp 9, 11, 1, CERULEAN_BADGE_HOUSE
+ warp 9, 9, 0, CERULEAN_BADGE_HOUSE
+
+ def_signs
+ sign 23, 19, 12 ; CeruleanCityText12
+ sign 17, 29, 13 ; CeruleanCityText13
+ sign 26, 25, 14 ; MartSignText
+ sign 20, 17, 15 ; PokeCenterSignText
+ sign 11, 25, 16 ; CeruleanCityText16
+ sign 27, 21, 17 ; CeruleanCityText17
+
+ def_objects
+ object SPRITE_BLUE, 20, 2, STAY, DOWN, 1 ; person
+ object SPRITE_ROCKET, 30, 8, STAY, NONE, 2, OPP_ROCKET, 5
+ object SPRITE_COOLTRAINER_M, 31, 20, STAY, DOWN, 3 ; person
+ object SPRITE_SUPER_NERD, 15, 18, WALK, UP_DOWN, 4 ; person
+ object SPRITE_SUPER_NERD, 9, 21, WALK, LEFT_RIGHT, 5 ; person
+ object SPRITE_OFFICER_JENNY, 28, 12, STAY, DOWN, 6 ; person
+ object SPRITE_COOLTRAINER_F, 29, 26, STAY, LEFT, 7 ; person
+ object SPRITE_POKE_BALL, 28, 26, STAY, DOWN, 8 ; person
+ object SPRITE_COOLTRAINER_F, 9, 27, WALK, LEFT_RIGHT, 9 ; person
+ object SPRITE_SUPER_NERD, 4, 12, STAY, DOWN, 10 ; person
+ object SPRITE_OFFICER_JENNY, 27, 12, STAY, DOWN, 11 ; person
+
+ def_warps_to CERULEAN_CITY
diff --git a/data/maps/objects/CeruleanGym.asm b/data/maps/objects/CeruleanGym.asm
new file mode 100755
index 00000000..26709cae
--- /dev/null
+++ b/data/maps/objects/CeruleanGym.asm
@@ -0,0 +1,16 @@
+CeruleanGym_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 4, 13, 3, LAST_MAP
+ warp 5, 13, 3, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_BRUNETTE_GIRL, 4, 2, STAY, DOWN, 1, OPP_MISTY, 1
+ object SPRITE_COOLTRAINER_F, 2, 3, STAY, RIGHT, 2, OPP_JR_TRAINER_F, 1
+ object SPRITE_SWIMMER, 8, 7, STAY, LEFT, 3, OPP_SWIMMER, 1
+ object SPRITE_GYM_GUIDE, 7, 10, STAY, DOWN, 4 ; person
+
+ def_warps_to CERULEAN_GYM
diff --git a/data/maps/objects/CeruleanMart.asm b/data/maps/objects/CeruleanMart.asm
new file mode 100755
index 00000000..144edd80
--- /dev/null
+++ b/data/maps/objects/CeruleanMart.asm
@@ -0,0 +1,15 @@
+CeruleanMart_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 5, LAST_MAP
+ warp 4, 7, 5, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_CLERK, 0, 5, STAY, RIGHT, 1 ; person
+ object SPRITE_COOLTRAINER_M, 3, 4, WALK, UP_DOWN, 2 ; person
+ object SPRITE_COOLTRAINER_F, 6, 2, WALK, LEFT_RIGHT, 3 ; person
+
+ def_warps_to CERULEAN_MART
diff --git a/data/maps/objects/CeruleanPokecenter.asm b/data/maps/objects/CeruleanPokecenter.asm
new file mode 100755
index 00000000..b90db6a5
--- /dev/null
+++ b/data/maps/objects/CeruleanPokecenter.asm
@@ -0,0 +1,17 @@
+CeruleanPokecenter_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 2, LAST_MAP
+ warp 4, 7, 2, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
+ object SPRITE_SUPER_NERD, 10, 5, WALK, ANY_DIR, 2 ; person
+ object SPRITE_GENTLEMAN, 4, 3, STAY, UP, 3 ; person
+ object SPRITE_LINK_RECEPTIONIST, 11, 2, STAY, DOWN, 4 ; person
+ object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
+
+ def_warps_to CERULEAN_POKECENTER
diff --git a/data/maps/objects/CeruleanTradeHouse.asm b/data/maps/objects/CeruleanTradeHouse.asm
new file mode 100755
index 00000000..a52548fe
--- /dev/null
+++ b/data/maps/objects/CeruleanTradeHouse.asm
@@ -0,0 +1,16 @@
+CeruleanTradeHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 1, LAST_MAP
+ warp 3, 7, 1, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_GIRL, 3, 1, STAY, DOWN, 1 ; person
+ object SPRITE_BULBASAUR, 4, 1, STAY, DOWN, 2 ; person
+ object SPRITE_ODDISH, 1, 4, STAY, NONE, 3 ; person
+ object SPRITE_SANDSHREW, 5, 3, STAY, LEFT, 4 ; person
+
+ def_warps_to CERULEAN_TRADE_HOUSE
diff --git a/data/maps/objects/CeruleanTrashedHouse.asm b/data/maps/objects/CeruleanTrashedHouse.asm
new file mode 100755
index 00000000..9f502319
--- /dev/null
+++ b/data/maps/objects/CeruleanTrashedHouse.asm
@@ -0,0 +1,16 @@
+CeruleanTrashedHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 0, LAST_MAP
+ warp 3, 7, 0, LAST_MAP
+ warp 3, 0, 7, LAST_MAP
+
+ def_signs
+ sign 3, 0, 3 ; CeruleanHouseTrashedText3
+
+ def_objects
+ object SPRITE_FISHING_GURU, 2, 1, STAY, DOWN, 1 ; person
+ object SPRITE_GIRL, 5, 6, WALK, LEFT_RIGHT, 2 ; person
+
+ def_warps_to CERULEAN_TRASHED_HOUSE
diff --git a/data/maps/objects/ChampionsRoom.asm b/data/maps/objects/ChampionsRoom.asm
new file mode 100755
index 00000000..2380fd04
--- /dev/null
+++ b/data/maps/objects/ChampionsRoom.asm
@@ -0,0 +1,16 @@
+ChampionsRoom_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 3, 7, 1, LANCES_ROOM
+ warp 4, 7, 2, LANCES_ROOM
+ warp 3, 0, 0, HALL_OF_FAME
+ warp 4, 0, 0, HALL_OF_FAME
+
+ def_signs
+
+ def_objects
+ object SPRITE_BLUE, 4, 2, STAY, DOWN, 1 ; person
+ object SPRITE_OAK, 3, 7, STAY, UP, 2 ; person
+
+ def_warps_to CHAMPIONS_ROOM
diff --git a/data/maps/objects/CinnabarGym.asm b/data/maps/objects/CinnabarGym.asm
new file mode 100755
index 00000000..a680d3fd
--- /dev/null
+++ b/data/maps/objects/CinnabarGym.asm
@@ -0,0 +1,21 @@
+CinnabarGym_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 16, 17, 1, LAST_MAP
+ warp 17, 17, 1, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_SILPH_PRESIDENT, 3, 3, STAY, DOWN, 1, OPP_BLAINE, 1
+ object SPRITE_SUPER_NERD, 17, 2, STAY, DOWN, 2, OPP_SUPER_NERD, 9
+ object SPRITE_SUPER_NERD, 17, 8, STAY, DOWN, 3, OPP_BURGLAR, 4
+ object SPRITE_SUPER_NERD, 11, 4, STAY, DOWN, 4, OPP_SUPER_NERD, 10
+ object SPRITE_SUPER_NERD, 11, 8, STAY, DOWN, 5, OPP_BURGLAR, 5
+ object SPRITE_SUPER_NERD, 11, 14, STAY, DOWN, 6, OPP_SUPER_NERD, 11
+ object SPRITE_SUPER_NERD, 3, 14, STAY, DOWN, 7, OPP_BURGLAR, 6
+ object SPRITE_SUPER_NERD, 3, 8, STAY, DOWN, 8, OPP_SUPER_NERD, 12
+ object SPRITE_GYM_GUIDE, 16, 13, STAY, DOWN, 9 ; person
+
+ def_warps_to CINNABAR_GYM
diff --git a/data/maps/objects/CinnabarIsland.asm b/data/maps/objects/CinnabarIsland.asm
new file mode 100755
index 00000000..1dd11a43
--- /dev/null
+++ b/data/maps/objects/CinnabarIsland.asm
@@ -0,0 +1,22 @@
+CinnabarIsland_Object:
+ db $43 ; border block
+
+ def_warps
+ warp 6, 3, 1, POKEMON_MANSION_1F
+ warp 18, 3, 0, CINNABAR_GYM
+ warp 6, 9, 0, CINNABAR_LAB
+ warp 11, 11, 0, CINNABAR_POKECENTER
+ warp 15, 11, 0, CINNABAR_MART
+
+ def_signs
+ sign 9, 5, 3 ; CinnabarIslandText3
+ sign 16, 11, 4 ; MartSignText
+ sign 12, 11, 5 ; PokeCenterSignText
+ sign 9, 11, 6 ; CinnabarIslandText6
+ sign 13, 3, 7 ; CinnabarIslandText7
+
+ def_objects
+ object SPRITE_GIRL, 12, 5, WALK, LEFT_RIGHT, 1 ; person
+ object SPRITE_GAMBLER, 14, 6, STAY, NONE, 2 ; person
+
+ def_warps_to CINNABAR_ISLAND
diff --git a/data/maps/objects/CinnabarLab.asm b/data/maps/objects/CinnabarLab.asm
new file mode 100755
index 00000000..0e007e3a
--- /dev/null
+++ b/data/maps/objects/CinnabarLab.asm
@@ -0,0 +1,20 @@
+CinnabarLab_Object:
+ db $17 ; border block
+
+ def_warps
+ warp 2, 7, 2, LAST_MAP
+ warp 3, 7, 2, LAST_MAP
+ warp 8, 4, 0, CINNABAR_LAB_TRADE_ROOM
+ warp 12, 4, 0, CINNABAR_LAB_METRONOME_ROOM
+ warp 16, 4, 0, CINNABAR_LAB_FOSSIL_ROOM
+
+ def_signs
+ sign 3, 2, 2 ; Lab1Text2
+ sign 9, 4, 3 ; Lab1Text3
+ sign 13, 4, 4 ; Lab1Text4
+ sign 17, 4, 5 ; Lab1Text5
+
+ def_objects
+ object SPRITE_FISHING_GURU, 1, 3, STAY, NONE, 1 ; person
+
+ def_warps_to CINNABAR_LAB
diff --git a/data/maps/objects/CinnabarLabFossilRoom.asm b/data/maps/objects/CinnabarLabFossilRoom.asm
new file mode 100755
index 00000000..8269eaeb
--- /dev/null
+++ b/data/maps/objects/CinnabarLabFossilRoom.asm
@@ -0,0 +1,14 @@
+CinnabarLabFossilRoom_Object:
+ db $17 ; border block
+
+ def_warps
+ warp 2, 7, 4, CINNABAR_LAB
+ warp 3, 7, 4, CINNABAR_LAB
+
+ def_signs
+
+ def_objects
+ object SPRITE_SCIENTIST, 5, 2, WALK, LEFT_RIGHT, 1 ; person
+ object SPRITE_SCIENTIST, 7, 6, STAY, UP, 2 ; person
+
+ def_warps_to CINNABAR_LAB_FOSSIL_ROOM
diff --git a/data/maps/objects/CinnabarLabMetronomeRoom.asm b/data/maps/objects/CinnabarLabMetronomeRoom.asm
new file mode 100755
index 00000000..b5969dfa
--- /dev/null
+++ b/data/maps/objects/CinnabarLabMetronomeRoom.asm
@@ -0,0 +1,17 @@
+CinnabarLabMetronomeRoom_Object:
+ db $17 ; border block
+
+ def_warps
+ warp 2, 7, 3, CINNABAR_LAB
+ warp 3, 7, 3, CINNABAR_LAB
+
+ def_signs
+ sign 0, 4, 3 ; Lab3Text3
+ sign 1, 4, 4 ; Lab3Text4
+ sign 2, 1, 5 ; Lab3Text5
+
+ def_objects
+ object SPRITE_SCIENTIST, 7, 2, STAY, DOWN, 1 ; person
+ object SPRITE_SCIENTIST, 2, 3, WALK, LEFT_RIGHT, 2 ; person
+
+ def_warps_to CINNABAR_LAB_METRONOME_ROOM
diff --git a/data/maps/objects/CinnabarLabTradeRoom.asm b/data/maps/objects/CinnabarLabTradeRoom.asm
new file mode 100755
index 00000000..e23a19cf
--- /dev/null
+++ b/data/maps/objects/CinnabarLabTradeRoom.asm
@@ -0,0 +1,15 @@
+CinnabarLabTradeRoom_Object:
+ db $17 ; border block
+
+ def_warps
+ warp 2, 7, 2, CINNABAR_LAB
+ warp 3, 7, 2, CINNABAR_LAB
+
+ def_signs
+
+ def_objects
+ object SPRITE_SUPER_NERD, 3, 2, STAY, DOWN, 1 ; person
+ object SPRITE_GRAMPS, 1, 4, STAY, NONE, 2 ; person
+ object SPRITE_BEAUTY, 5, 5, STAY, UP, 3 ; person
+
+ def_warps_to CINNABAR_LAB_TRADE_ROOM
diff --git a/data/maps/objects/CinnabarMart.asm b/data/maps/objects/CinnabarMart.asm
new file mode 100755
index 00000000..2413d993
--- /dev/null
+++ b/data/maps/objects/CinnabarMart.asm
@@ -0,0 +1,15 @@
+CinnabarMart_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 4, LAST_MAP
+ warp 4, 7, 4, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_CLERK, 0, 5, STAY, RIGHT, 1 ; person
+ object SPRITE_ERIKA, 6, 2, STAY, NONE, 2 ; person
+ object SPRITE_SCIENTIST, 3, 4, STAY, NONE, 3 ; person
+
+ def_warps_to CINNABAR_MART
diff --git a/data/maps/objects/CinnabarPokecenter.asm b/data/maps/objects/CinnabarPokecenter.asm
new file mode 100755
index 00000000..0a2a11aa
--- /dev/null
+++ b/data/maps/objects/CinnabarPokecenter.asm
@@ -0,0 +1,17 @@
+CinnabarPokecenter_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 3, LAST_MAP
+ warp 4, 7, 3, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
+ object SPRITE_COOLTRAINER_F, 9, 4, WALK, ANY_DIR, 2 ; person
+ object SPRITE_GENTLEMAN, 2, 6, STAY, NONE, 3 ; person
+ object SPRITE_LINK_RECEPTIONIST, 11, 2, STAY, DOWN, 4 ; person
+ object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
+
+ def_warps_to CINNABAR_POKECENTER
diff --git a/data/maps/objects/Colosseum.asm b/data/maps/objects/Colosseum.asm
new file mode 100644
index 00000000..dac9bc09
--- /dev/null
+++ b/data/maps/objects/Colosseum.asm
@@ -0,0 +1,11 @@
+Colosseum_Object:
+ db $e ; border block
+
+ def_warps
+
+ def_signs
+
+ def_objects
+ object SPRITE_RED, 2, 2, STAY, 0, 1 ; person
+
+ def_warps_to COLOSSEUM
diff --git a/data/maps/objects/CopycatsHouse1F.asm b/data/maps/objects/CopycatsHouse1F.asm
new file mode 100755
index 00000000..bc635385
--- /dev/null
+++ b/data/maps/objects/CopycatsHouse1F.asm
@@ -0,0 +1,16 @@
+CopycatsHouse1F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 0, LAST_MAP
+ warp 3, 7, 0, LAST_MAP
+ warp 7, 1, 0, COPYCATS_HOUSE_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_MIDDLE_AGED_WOMAN, 2, 2, STAY, DOWN, 1 ; person
+ object SPRITE_MIDDLE_AGED_MAN, 5, 4, STAY, LEFT, 2 ; person
+ object SPRITE_CHANSEY, 1, 4, STAY, NONE, 3 ; person
+
+ def_warps_to COPYCATS_HOUSE_1F
diff --git a/data/maps/objects/CopycatsHouse2F.asm b/data/maps/objects/CopycatsHouse2F.asm
new file mode 100755
index 00000000..e04edee7
--- /dev/null
+++ b/data/maps/objects/CopycatsHouse2F.asm
@@ -0,0 +1,18 @@
+CopycatsHouse2F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 7, 1, 2, COPYCATS_HOUSE_1F
+
+ def_signs
+ sign 3, 5, 6 ; CopycatsHouse2FText6
+ sign 0, 1, 7 ; CopycatsHouse2FText7
+
+ def_objects
+ object SPRITE_BRUNETTE_GIRL, 4, 3, WALK, ANY_DIR, 1 ; person
+ object SPRITE_BIRD, 4, 6, WALK, LEFT_RIGHT, 2 ; person
+ object SPRITE_MONSTER, 5, 1, STAY, DOWN, 3 ; person
+ object SPRITE_BIRD, 2, 0, STAY, DOWN, 4 ; person
+ object SPRITE_FAIRY, 1, 6, STAY, RIGHT, 5 ; person
+
+ def_warps_to COPYCATS_HOUSE_2F
diff --git a/data/maps/objects/Daycare.asm b/data/maps/objects/Daycare.asm
new file mode 100755
index 00000000..2feecff3
--- /dev/null
+++ b/data/maps/objects/Daycare.asm
@@ -0,0 +1,13 @@
+Daycare_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 4, LAST_MAP
+ warp 3, 7, 4, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_GENTLEMAN, 2, 3, STAY, RIGHT, 1 ; person
+
+ def_warps_to DAYCARE
diff --git a/data/maps/objects/DiglettsCave.asm b/data/maps/objects/DiglettsCave.asm
new file mode 100755
index 00000000..dc4889e5
--- /dev/null
+++ b/data/maps/objects/DiglettsCave.asm
@@ -0,0 +1,12 @@
+DiglettsCave_Object:
+ db $19 ; border block
+
+ def_warps
+ warp 5, 5, 2, DIGLETTS_CAVE_ROUTE_2
+ warp 37, 31, 2, DIGLETTS_CAVE_ROUTE_11
+
+ def_signs
+
+ def_objects
+
+ def_warps_to DIGLETTS_CAVE
diff --git a/data/maps/objects/DiglettsCaveRoute11.asm b/data/maps/objects/DiglettsCaveRoute11.asm
new file mode 100755
index 00000000..f6c884d9
--- /dev/null
+++ b/data/maps/objects/DiglettsCaveRoute11.asm
@@ -0,0 +1,14 @@
+DiglettsCaveRoute11_Object:
+ db $7d ; border block
+
+ def_warps
+ warp 2, 7, 4, LAST_MAP
+ warp 3, 7, 4, LAST_MAP
+ warp 4, 4, 1, DIGLETTS_CAVE
+
+ def_signs
+
+ def_objects
+ object SPRITE_GAMBLER, 2, 3, STAY, NONE, 1 ; person
+
+ def_warps_to DIGLETTS_CAVE_ROUTE_11
diff --git a/data/maps/objects/DiglettsCaveRoute2.asm b/data/maps/objects/DiglettsCaveRoute2.asm
new file mode 100755
index 00000000..948a82e3
--- /dev/null
+++ b/data/maps/objects/DiglettsCaveRoute2.asm
@@ -0,0 +1,14 @@
+DiglettsCaveRoute2_Object:
+ db $7d ; border block
+
+ def_warps
+ warp 2, 7, 0, LAST_MAP
+ warp 3, 7, 0, LAST_MAP
+ warp 4, 4, 0, DIGLETTS_CAVE
+
+ def_signs
+
+ def_objects
+ object SPRITE_FISHING_GURU, 3, 3, STAY, NONE, 1 ; person
+
+ def_warps_to DIGLETTS_CAVE_ROUTE_2
diff --git a/data/maps/objects/FightingDojo.asm b/data/maps/objects/FightingDojo.asm
new file mode 100755
index 00000000..5345a7aa
--- /dev/null
+++ b/data/maps/objects/FightingDojo.asm
@@ -0,0 +1,19 @@
+FightingDojo_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 4, 11, 1, LAST_MAP
+ warp 5, 11, 1, LAST_MAP
+
+ def_signs
+
+ def_objects
+ 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_POKE_BALL, 4, 1, STAY, NONE, 6 ; person
+ object SPRITE_POKE_BALL, 5, 1, STAY, NONE, 7 ; person
+
+ def_warps_to FIGHTING_DOJO
diff --git a/data/maps/objects/FuchsiaBillsGrandpasHouse.asm b/data/maps/objects/FuchsiaBillsGrandpasHouse.asm
new file mode 100755
index 00000000..30aff6c5
--- /dev/null
+++ b/data/maps/objects/FuchsiaBillsGrandpasHouse.asm
@@ -0,0 +1,15 @@
+FuchsiaBillsGrandpasHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 1, LAST_MAP
+ warp 3, 7, 1, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_MIDDLE_AGED_WOMAN, 2, 3, STAY, RIGHT, 1 ; person
+ object SPRITE_GAMBLER, 7, 2, STAY, UP, 2 ; person
+ object SPRITE_YOUNGSTER, 5, 5, STAY, NONE, 3 ; person
+
+ def_warps_to FUCHSIA_BILLS_GRANDPAS_HOUSE
diff --git a/data/maps/objects/FuchsiaCity.asm b/data/maps/objects/FuchsiaCity.asm
new file mode 100755
index 00000000..a601a896
--- /dev/null
+++ b/data/maps/objects/FuchsiaCity.asm
@@ -0,0 +1,43 @@
+FuchsiaCity_Object:
+ db $f ; border block
+
+ def_warps
+ warp 5, 13, 0, FUCHSIA_MART
+ warp 11, 27, 0, FUCHSIA_BILLS_GRANDPAS_HOUSE
+ warp 19, 27, 0, FUCHSIA_POKECENTER
+ warp 27, 27, 0, WARDENS_HOUSE
+ warp 18, 3, 0, SAFARI_ZONE_GATE
+ warp 5, 27, 0, FUCHSIA_GYM
+ warp 22, 13, 0, FUCHSIA_MEETING_ROOM
+ warp 31, 27, 1, FUCHSIA_GOOD_ROD_HOUSE
+ warp 31, 24, 0, FUCHSIA_GOOD_ROD_HOUSE
+
+ def_signs
+ sign 15, 23, 11 ; FuchsiaCityText11
+ sign 25, 15, 12 ; FuchsiaCityText12
+ sign 17, 5, 13 ; FuchsiaCityText13
+ sign 6, 13, 14 ; MartSignText
+ sign 20, 27, 15 ; PokeCenterSignText
+ sign 27, 29, 16 ; FuchsiaCityText16
+ sign 21, 15, 17 ; FuchsiaCityText17
+ sign 5, 29, 18 ; FuchsiaCityText18
+ sign 33, 7, 19 ; FuchsiaCityText19
+ sign 27, 7, 20 ; FuchsiaCityText20
+ sign 13, 7, 21 ; FuchsiaCityText21
+ sign 31, 13, 22 ; FuchsiaCityText22
+ sign 13, 15, 23 ; FuchsiaCityText23
+ sign 7, 7, 24 ; FuchsiaCityText24
+
+ def_objects
+ object SPRITE_YOUNGSTER, 10, 12, WALK, LEFT_RIGHT, 1 ; person
+ object SPRITE_GAMBLER, 28, 17, WALK, LEFT_RIGHT, 2 ; person
+ object SPRITE_FISHER, 30, 14, STAY, DOWN, 3 ; person
+ object SPRITE_YOUNGSTER, 24, 8, STAY, UP, 4 ; person
+ object SPRITE_CHANSEY, 31, 5, STAY, DOWN, 5 ; person
+ object SPRITE_POKE_BALL, 25, 6, STAY, NONE, 6 ; person
+ object SPRITE_MONSTER, 12, 6, WALK, LEFT_RIGHT, 7 ; person
+ object SPRITE_MONSTER, 30, 12, WALK, LEFT_RIGHT, 8 ; person
+ object SPRITE_SEEL, 8, 17, WALK, ANY_DIR, 9 ; person
+ object SPRITE_FOSSIL, 6, 5, STAY, NONE, 10 ; person
+
+ def_warps_to FUCHSIA_CITY
diff --git a/data/maps/objects/FuchsiaGoodRodHouse.asm b/data/maps/objects/FuchsiaGoodRodHouse.asm
new file mode 100755
index 00000000..434cec8b
--- /dev/null
+++ b/data/maps/objects/FuchsiaGoodRodHouse.asm
@@ -0,0 +1,14 @@
+FuchsiaGoodRodHouse_Object:
+ db $c ; border block
+
+ def_warps
+ warp 2, 0, 8, LAST_MAP
+ warp 2, 7, 7, LAST_MAP
+ warp 3, 7, 7, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_FISHING_GURU, 5, 3, STAY, RIGHT, 1 ; person
+
+ def_warps_to FUCHSIA_GOOD_ROD_HOUSE
diff --git a/data/maps/objects/FuchsiaGym.asm b/data/maps/objects/FuchsiaGym.asm
new file mode 100755
index 00000000..95b2e42e
--- /dev/null
+++ b/data/maps/objects/FuchsiaGym.asm
@@ -0,0 +1,20 @@
+FuchsiaGym_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 4, 17, 5, LAST_MAP
+ warp 5, 17, 5, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_SILPH_WORKER, 4, 10, STAY, DOWN, 1, OPP_KOGA, 1
+ object SPRITE_ROCKER, 8, 13, STAY, DOWN, 2, OPP_JUGGLER, 7
+ object SPRITE_ROCKER, 7, 8, STAY, RIGHT, 3, OPP_JUGGLER, 3
+ object SPRITE_ROCKER, 1, 12, 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_GUIDE, 7, 15, STAY, DOWN, 8 ; person
+
+ def_warps_to FUCHSIA_GYM
diff --git a/data/maps/objects/FuchsiaMart.asm b/data/maps/objects/FuchsiaMart.asm
new file mode 100755
index 00000000..0a238a87
--- /dev/null
+++ b/data/maps/objects/FuchsiaMart.asm
@@ -0,0 +1,15 @@
+FuchsiaMart_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 0, LAST_MAP
+ warp 4, 7, 0, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_CLERK, 0, 5, STAY, RIGHT, 1 ; person
+ object SPRITE_MIDDLE_AGED_MAN, 4, 2, STAY, NONE, 2 ; person
+ object SPRITE_COOLTRAINER_F, 6, 5, WALK, UP_DOWN, 3 ; person
+
+ def_warps_to FUCHSIA_MART
diff --git a/data/maps/objects/FuchsiaMeetingRoom.asm b/data/maps/objects/FuchsiaMeetingRoom.asm
new file mode 100755
index 00000000..e4c2a83b
--- /dev/null
+++ b/data/maps/objects/FuchsiaMeetingRoom.asm
@@ -0,0 +1,15 @@
+FuchsiaMeetingRoom_Object:
+ db $17 ; border block
+
+ def_warps
+ warp 4, 7, 6, LAST_MAP
+ warp 5, 7, 6, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_SAFARI_ZONE_WORKER, 4, 1, STAY, DOWN, 1 ; person
+ object SPRITE_SAFARI_ZONE_WORKER, 0, 2, STAY, UP, 2 ; person
+ object SPRITE_SAFARI_ZONE_WORKER, 10, 1, STAY, DOWN, 3 ; person
+
+ def_warps_to FUCHSIA_MEETING_ROOM
diff --git a/data/maps/objects/FuchsiaPokecenter.asm b/data/maps/objects/FuchsiaPokecenter.asm
new file mode 100755
index 00000000..4eb9d196
--- /dev/null
+++ b/data/maps/objects/FuchsiaPokecenter.asm
@@ -0,0 +1,17 @@
+FuchsiaPokecenter_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 2, LAST_MAP
+ warp 4, 7, 2, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
+ object SPRITE_ROCKER, 4, 3, STAY, UP, 2 ; person
+ object SPRITE_COOLTRAINER_F, 6, 5, WALK, LEFT_RIGHT, 3 ; person
+ object SPRITE_LINK_RECEPTIONIST, 11, 2, STAY, DOWN, 4 ; person
+ object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
+
+ def_warps_to FUCHSIA_POKECENTER
diff --git a/data/maps/objects/GameCorner.asm b/data/maps/objects/GameCorner.asm
new file mode 100755
index 00000000..4e425e86
--- /dev/null
+++ b/data/maps/objects/GameCorner.asm
@@ -0,0 +1,25 @@
+GameCorner_Object:
+ db $f ; border block
+
+ def_warps
+ warp 15, 17, 7, LAST_MAP
+ warp 16, 17, 7, LAST_MAP
+ warp 17, 4, 1, ROCKET_HIDEOUT_B1F
+
+ def_signs
+ sign 9, 4, 12 ; CeladonGameCornerText12
+
+ def_objects
+ object SPRITE_BEAUTY, 2, 6, STAY, DOWN, 1 ; person
+ object SPRITE_CLERK, 5, 6, STAY, DOWN, 2 ; person
+ object SPRITE_MIDDLE_AGED_MAN, 2, 10, STAY, LEFT, 3 ; person
+ object SPRITE_BEAUTY, 2, 13, STAY, LEFT, 4 ; person
+ object SPRITE_FISHING_GURU, 5, 11, STAY, RIGHT, 5 ; person
+ object SPRITE_MIDDLE_AGED_WOMAN, 8, 11, STAY, LEFT, 6 ; person
+ object SPRITE_GYM_GUIDE, 8, 14, STAY, LEFT, 7 ; person
+ object SPRITE_GAMBLER, 11, 15, STAY, RIGHT, 8 ; person
+ object SPRITE_MIDDLE_AGED_MAN, 14, 11, STAY, LEFT, 9 ; person
+ object SPRITE_FISHING_GURU, 17, 13, STAY, RIGHT, 10 ; person
+ object SPRITE_ROCKET, 9, 5, STAY, UP, 11, OPP_ROCKET, 7
+
+ def_warps_to GAME_CORNER
diff --git a/data/maps/objects/GameCornerPrizeRoom.asm b/data/maps/objects/GameCornerPrizeRoom.asm
new file mode 100755
index 00000000..d55decf1
--- /dev/null
+++ b/data/maps/objects/GameCornerPrizeRoom.asm
@@ -0,0 +1,17 @@
+GameCornerPrizeRoom_Object:
+ db $f ; border block
+
+ def_warps
+ warp 4, 7, 9, LAST_MAP
+ warp 5, 7, 9, LAST_MAP
+
+ def_signs
+ sign 2, 2, 3 ; CeladonPrizeRoomText3
+ sign 4, 2, 4 ; CeladonPrizeRoomText4
+ sign 6, 2, 5 ; CeladonPrizeRoomText5
+
+ def_objects
+ object SPRITE_BALDING_GUY, 1, 4, STAY, NONE, 1 ; person
+ object SPRITE_GAMBLER, 7, 3, WALK, LEFT_RIGHT, 2 ; person
+
+ def_warps_to GAME_CORNER_PRIZE_ROOM
diff --git a/data/maps/objects/HallOfFame.asm b/data/maps/objects/HallOfFame.asm
new file mode 100755
index 00000000..caa55bf6
--- /dev/null
+++ b/data/maps/objects/HallOfFame.asm
@@ -0,0 +1,13 @@
+HallOfFame_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 4, 7, 2, CHAMPIONS_ROOM
+ warp 5, 7, 3, CHAMPIONS_ROOM
+
+ def_signs
+
+ def_objects
+ object SPRITE_OAK, 5, 2, STAY, DOWN, 1 ; person
+
+ def_warps_to HALL_OF_FAME
diff --git a/data/maps/objects/IndigoPlateau.asm b/data/maps/objects/IndigoPlateau.asm
new file mode 100755
index 00000000..d67c9f8a
--- /dev/null
+++ b/data/maps/objects/IndigoPlateau.asm
@@ -0,0 +1,12 @@
+IndigoPlateau_Object:
+ db $e ; border block
+
+ def_warps
+ warp 9, 5, 0, INDIGO_PLATEAU_LOBBY
+ warp 10, 5, 0, INDIGO_PLATEAU_LOBBY
+
+ def_signs
+
+ def_objects
+
+ def_warps_to INDIGO_PLATEAU
diff --git a/data/maps/objects/IndigoPlateauLobby.asm b/data/maps/objects/IndigoPlateauLobby.asm
new file mode 100755
index 00000000..db101be0
--- /dev/null
+++ b/data/maps/objects/IndigoPlateauLobby.asm
@@ -0,0 +1,19 @@
+IndigoPlateauLobby_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 7, 11, 0, LAST_MAP
+ warp 8, 11, 1, LAST_MAP
+ warp 8, 0, 0, LORELEIS_ROOM
+
+ def_signs
+
+ def_objects
+ object SPRITE_NURSE, 7, 5, STAY, DOWN, 1 ; person
+ object SPRITE_GYM_GUIDE, 4, 9, STAY, RIGHT, 2 ; person
+ object SPRITE_COOLTRAINER_F, 5, 1, STAY, DOWN, 3 ; person
+ object SPRITE_CLERK, 0, 5, STAY, RIGHT, 4 ; person
+ object SPRITE_LINK_RECEPTIONIST, 13, 6, STAY, DOWN, 5 ; person
+ object SPRITE_CHANSEY, 8, 5, STAY, DOWN, 6 ; person
+
+ def_warps_to INDIGO_PLATEAU_LOBBY
diff --git a/data/maps/objects/LancesRoom.asm b/data/maps/objects/LancesRoom.asm
new file mode 100755
index 00000000..a8dc4777
--- /dev/null
+++ b/data/maps/objects/LancesRoom.asm
@@ -0,0 +1,14 @@
+LancesRoom_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 24, 16, 2, AGATHAS_ROOM
+ warp 5, 0, 0, CHAMPIONS_ROOM
+ warp 6, 0, 0, CHAMPIONS_ROOM
+
+ def_signs
+
+ def_objects
+ object SPRITE_LANCE, 6, 1, STAY, DOWN, 1, OPP_LANCE, 1
+
+ def_warps_to LANCES_ROOM
diff --git a/data/maps/objects/LavenderCuboneHouse.asm b/data/maps/objects/LavenderCuboneHouse.asm
new file mode 100755
index 00000000..7e7443e2
--- /dev/null
+++ b/data/maps/objects/LavenderCuboneHouse.asm
@@ -0,0 +1,14 @@
+LavenderCuboneHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 4, LAST_MAP
+ warp 3, 7, 4, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_MONSTER, 3, 5, STAY, UP, 1 ; person
+ object SPRITE_BRUNETTE_GIRL, 2, 4, STAY, RIGHT, 2 ; person
+
+ def_warps_to LAVENDER_CUBONE_HOUSE
diff --git a/data/maps/objects/LavenderMart.asm b/data/maps/objects/LavenderMart.asm
new file mode 100755
index 00000000..00d5a64b
--- /dev/null
+++ b/data/maps/objects/LavenderMart.asm
@@ -0,0 +1,15 @@
+LavenderMart_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 3, LAST_MAP
+ warp 4, 7, 3, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_CLERK, 0, 5, STAY, RIGHT, 1 ; person
+ object SPRITE_BALDING_GUY, 3, 4, STAY, NONE, 2 ; person
+ object SPRITE_COOLTRAINER_M, 7, 2, STAY, NONE, 3 ; person
+
+ def_warps_to LAVENDER_MART
diff --git a/data/maps/objects/LavenderPokecenter.asm b/data/maps/objects/LavenderPokecenter.asm
new file mode 100755
index 00000000..667b584f
--- /dev/null
+++ b/data/maps/objects/LavenderPokecenter.asm
@@ -0,0 +1,17 @@
+LavenderPokecenter_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 0, LAST_MAP
+ warp 4, 7, 0, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
+ object SPRITE_GENTLEMAN, 5, 3, STAY, NONE, 2 ; person
+ object SPRITE_LITTLE_GIRL, 10, 5, WALK, LEFT_RIGHT, 3 ; person
+ object SPRITE_LINK_RECEPTIONIST, 11, 2, STAY, DOWN, 4 ; person
+ object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
+
+ def_warps_to LAVENDER_POKECENTER
diff --git a/data/maps/objects/LavenderTown.asm b/data/maps/objects/LavenderTown.asm
new file mode 100755
index 00000000..f34659c1
--- /dev/null
+++ b/data/maps/objects/LavenderTown.asm
@@ -0,0 +1,25 @@
+LavenderTown_Object:
+ db $2c ; border block
+
+ def_warps
+ warp 3, 5, 0, LAVENDER_POKECENTER
+ warp 14, 5, 0, POKEMON_TOWER_1F
+ warp 7, 9, 0, MR_FUJIS_HOUSE
+ warp 15, 13, 0, LAVENDER_MART
+ warp 3, 13, 0, LAVENDER_CUBONE_HOUSE
+ warp 7, 13, 0, NAME_RATERS_HOUSE
+
+ def_signs
+ sign 11, 9, 4 ; LavenderTownText4
+ sign 9, 3, 5 ; LavenderTownText5
+ sign 16, 13, 6 ; MartSignText
+ sign 4, 5, 7 ; PokeCenterSignText
+ sign 5, 9, 8 ; LavenderTownText8
+ sign 17, 7, 9 ; LavenderTownText9
+
+ def_objects
+ object SPRITE_LITTLE_GIRL, 15, 9, WALK, ANY_DIR, 1 ; person
+ object SPRITE_COOLTRAINER_M, 9, 10, STAY, NONE, 2 ; person
+ object SPRITE_SUPER_NERD, 8, 7, WALK, LEFT_RIGHT, 3 ; person
+
+ def_warps_to LAVENDER_TOWN
diff --git a/data/maps/objects/LoreleisRoom.asm b/data/maps/objects/LoreleisRoom.asm
new file mode 100755
index 00000000..91a306b8
--- /dev/null
+++ b/data/maps/objects/LoreleisRoom.asm
@@ -0,0 +1,15 @@
+LoreleisRoom_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 4, 11, 2, INDIGO_PLATEAU_LOBBY
+ warp 5, 11, 2, INDIGO_PLATEAU_LOBBY
+ warp 4, 0, 0, BRUNOS_ROOM
+ warp 5, 0, 1, BRUNOS_ROOM
+
+ def_signs
+
+ def_objects
+ object SPRITE_LORELEI, 5, 2, STAY, DOWN, 1, OPP_LORELEI, 1
+
+ def_warps_to LORELEIS_ROOM
diff --git a/data/maps/objects/MrFujisHouse.asm b/data/maps/objects/MrFujisHouse.asm
new file mode 100755
index 00000000..6ec762f6
--- /dev/null
+++ b/data/maps/objects/MrFujisHouse.asm
@@ -0,0 +1,18 @@
+MrFujisHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 2, LAST_MAP
+ warp 3, 7, 2, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_SUPER_NERD, 3, 5, STAY, NONE, 1 ; person
+ object SPRITE_LITTLE_GIRL, 6, 3, STAY, DOWN, 2 ; person
+ object SPRITE_MONSTER, 6, 4, STAY, UP, 3 ; person
+ object SPRITE_MONSTER, 1, 3, STAY, NONE, 4 ; person
+ object SPRITE_MR_FUJI, 3, 1, STAY, NONE, 5 ; person
+ object SPRITE_POKEDEX, 3, 3, STAY, NONE, 6 ; person
+
+ def_warps_to MR_FUJIS_HOUSE
diff --git a/data/maps/objects/MrPsychicsHouse.asm b/data/maps/objects/MrPsychicsHouse.asm
new file mode 100755
index 00000000..44367b20
--- /dev/null
+++ b/data/maps/objects/MrPsychicsHouse.asm
@@ -0,0 +1,13 @@
+MrPsychicsHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 7, LAST_MAP
+ warp 3, 7, 7, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_FISHING_GURU, 5, 3, STAY, LEFT, 1 ; person
+
+ def_warps_to MR_PSYCHICS_HOUSE
diff --git a/data/maps/objects/MtMoon1F.asm b/data/maps/objects/MtMoon1F.asm
new file mode 100755
index 00000000..8b40ac4f
--- /dev/null
+++ b/data/maps/objects/MtMoon1F.asm
@@ -0,0 +1,29 @@
+MtMoon1F_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 14, 35, 1, LAST_MAP
+ warp 15, 35, 1, LAST_MAP
+ warp 5, 5, 0, MT_MOON_B1F
+ warp 17, 11, 2, MT_MOON_B1F
+ warp 25, 15, 3, MT_MOON_B1F
+
+ def_signs
+ sign 15, 23, 14 ; MtMoon1Text14
+
+ def_objects
+ object SPRITE_HIKER, 5, 6, STAY, DOWN, 1, OPP_HIKER, 1
+ object SPRITE_YOUNGSTER, 12, 16, STAY, RIGHT, 2, OPP_YOUNGSTER, 3
+ object SPRITE_COOLTRAINER_F, 30, 4, STAY, DOWN, 3, OPP_LASS, 5
+ object SPRITE_SUPER_NERD, 24, 31, STAY, UP, 4, OPP_SUPER_NERD, 1
+ object SPRITE_COOLTRAINER_F, 16, 23, STAY, DOWN, 5, OPP_LASS, 6
+ object SPRITE_YOUNGSTER, 7, 22, STAY, DOWN, 6, OPP_BUG_CATCHER, 7
+ object SPRITE_YOUNGSTER, 30, 27, STAY, RIGHT, 7, OPP_BUG_CATCHER, 8
+ object SPRITE_POKE_BALL, 2, 20, STAY, NONE, 8, POTION
+ object SPRITE_POKE_BALL, 2, 2, STAY, NONE, 9, MOON_STONE
+ object SPRITE_POKE_BALL, 35, 31, STAY, NONE, 10, RARE_CANDY
+ object SPRITE_POKE_BALL, 36, 23, STAY, NONE, 11, ESCAPE_ROPE
+ object SPRITE_POKE_BALL, 20, 33, STAY, NONE, 12, POTION
+ object SPRITE_POKE_BALL, 5, 32, STAY, NONE, 13, TM_WATER_GUN
+
+ def_warps_to MT_MOON_1F
diff --git a/data/maps/objects/MtMoonB1F.asm b/data/maps/objects/MtMoonB1F.asm
new file mode 100755
index 00000000..69fa3c17
--- /dev/null
+++ b/data/maps/objects/MtMoonB1F.asm
@@ -0,0 +1,18 @@
+MtMoonB1F_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 5, 5, 2, MT_MOON_1F
+ warp 17, 11, 0, MT_MOON_B2F
+ warp 25, 9, 3, MT_MOON_1F
+ warp 25, 15, 4, MT_MOON_1F
+ warp 21, 17, 1, MT_MOON_B2F
+ warp 13, 27, 2, MT_MOON_B2F
+ warp 23, 3, 3, MT_MOON_B2F
+ warp 27, 3, 2, LAST_MAP
+
+ def_signs
+
+ def_objects
+
+ def_warps_to MT_MOON_B1F
diff --git a/data/maps/objects/MtMoonB2F.asm b/data/maps/objects/MtMoonB2F.asm
new file mode 100755
index 00000000..b2c1ff1d
--- /dev/null
+++ b/data/maps/objects/MtMoonB2F.asm
@@ -0,0 +1,24 @@
+MtMoonB2F_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 25, 9, 1, MT_MOON_B1F
+ warp 21, 17, 4, MT_MOON_B1F
+ warp 15, 27, 5, MT_MOON_B1F
+ warp 5, 7, 6, MT_MOON_B1F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SUPER_NERD, 12, 8, STAY, RIGHT, 1, OPP_SUPER_NERD, 2
+ object SPRITE_JESSIE, 9, 3, STAY, LEFT, 2
+ object SPRITE_ROCKET, 15, 22, STAY, DOWN, 3, OPP_ROCKET, 2
+ object SPRITE_ROCKET, 29, 11, STAY, UP, 4, OPP_ROCKET, 3
+ object SPRITE_ROCKET, 29, 17, STAY, LEFT, 5, OPP_ROCKET, 1
+ object SPRITE_JAMES, 9, 4, STAY, LEFT, 6
+ object SPRITE_FOSSIL, 12, 6, STAY, NONE, 7 ; person
+ object SPRITE_FOSSIL, 13, 6, STAY, NONE, 8 ; person
+ object SPRITE_POKE_BALL, 25, 21, STAY, NONE, 9, HP_UP
+ object SPRITE_POKE_BALL, 29, 5, STAY, NONE, 10, TM_MEGA_PUNCH
+
+ def_warps_to MT_MOON_B2F
diff --git a/data/maps/objects/MtMoonPokecenter.asm b/data/maps/objects/MtMoonPokecenter.asm
new file mode 100755
index 00000000..e94dd27d
--- /dev/null
+++ b/data/maps/objects/MtMoonPokecenter.asm
@@ -0,0 +1,19 @@
+MtMoonPokecenter_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 0, LAST_MAP
+ warp 4, 7, 0, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
+ object SPRITE_YOUNGSTER, 4, 3, STAY, UP, 2 ; person
+ object SPRITE_GENTLEMAN, 7, 3, STAY, UP, 3 ; person
+ object SPRITE_MIDDLE_AGED_MAN, 10, 6, WALK, LEFT_RIGHT, 4 ; person
+ object SPRITE_CLIPBOARD, 7, 2, STAY, NONE, 5 ; person
+ object SPRITE_LINK_RECEPTIONIST, 11, 2, STAY, DOWN, 6 ; person
+ object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 7 ; person
+
+ def_warps_to MT_MOON_POKECENTER
diff --git a/data/maps/objects/Museum1F.asm b/data/maps/objects/Museum1F.asm
new file mode 100755
index 00000000..3628173c
--- /dev/null
+++ b/data/maps/objects/Museum1F.asm
@@ -0,0 +1,20 @@
+Museum1F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 10, 7, 0, LAST_MAP
+ warp 11, 7, 0, LAST_MAP
+ warp 16, 7, 1, LAST_MAP
+ warp 17, 7, 1, LAST_MAP
+ warp 7, 7, 0, MUSEUM_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SCIENTIST, 12, 4, STAY, LEFT, 1 ; person
+ object SPRITE_GAMBLER, 1, 4, STAY, NONE, 2 ; person
+ object SPRITE_SCIENTIST, 15, 2, STAY, DOWN, 3 ; person
+ object SPRITE_SCIENTIST, 17, 4, STAY, NONE, 4 ; person
+ object SPRITE_OLD_AMBER, 16, 2, STAY, NONE, 5 ; person
+
+ def_warps_to MUSEUM_1F
diff --git a/data/maps/objects/Museum2F.asm b/data/maps/objects/Museum2F.asm
new file mode 100755
index 00000000..72f98f9b
--- /dev/null
+++ b/data/maps/objects/Museum2F.asm
@@ -0,0 +1,18 @@
+Museum2F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 7, 7, 4, MUSEUM_1F
+
+ def_signs
+ sign 11, 2, 6 ; Museum2FText6
+ sign 2, 5, 7 ; Museum2FText7
+
+ def_objects
+ object SPRITE_YOUNGSTER, 1, 7, WALK, LEFT_RIGHT, 1 ; person
+ object SPRITE_GRAMPS, 0, 5, STAY, DOWN, 2 ; person
+ object SPRITE_SCIENTIST, 7, 5, STAY, DOWN, 3 ; person
+ object SPRITE_BRUNETTE_GIRL, 11, 5, STAY, NONE, 4 ; person
+ object SPRITE_HIKER, 12, 5, STAY, DOWN, 5 ; person
+
+ def_warps_to MUSEUM_2F
diff --git a/data/maps/objects/NameRatersHouse.asm b/data/maps/objects/NameRatersHouse.asm
new file mode 100755
index 00000000..935a6887
--- /dev/null
+++ b/data/maps/objects/NameRatersHouse.asm
@@ -0,0 +1,13 @@
+NameRatersHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 5, LAST_MAP
+ warp 3, 7, 5, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_SILPH_PRESIDENT, 5, 3, STAY, LEFT, 1 ; person
+
+ def_warps_to NAME_RATERS_HOUSE
diff --git a/data/maps/objects/OaksLab.asm b/data/maps/objects/OaksLab.asm
new file mode 100755
index 00000000..366fc894
--- /dev/null
+++ b/data/maps/objects/OaksLab.asm
@@ -0,0 +1,21 @@
+OaksLab_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 4, 11, 2, LAST_MAP
+ warp 5, 11, 2, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_BLUE, 4, 3, STAY, NONE, 1, OPP_RIVAL1, 1
+ object SPRITE_POKE_BALL, 7, 3, STAY, NONE, 2 ; person
+ object SPRITE_OAK, 5, 2, STAY, DOWN, 3 ; person
+ object SPRITE_POKEDEX, 2, 1, STAY, NONE, 4 ; person
+ object SPRITE_POKEDEX, 3, 1, STAY, NONE, 5 ; person
+ object SPRITE_OAK, 5, 10, STAY, UP, 6 ; person
+ object SPRITE_GIRL, 1, 9, WALK, UP_DOWN, 7 ; person
+ object SPRITE_SCIENTIST, 2, 10, STAY, NONE, 8 ; person
+ object SPRITE_SCIENTIST, 8, 10, STAY, NONE, 9 ; person
+
+ def_warps_to OAKS_LAB
diff --git a/data/maps/objects/PalletTown.asm b/data/maps/objects/PalletTown.asm
new file mode 100755
index 00000000..c84dc921
--- /dev/null
+++ b/data/maps/objects/PalletTown.asm
@@ -0,0 +1,20 @@
+PalletTown_Object:
+ db $b ; border block
+
+ def_warps
+ warp 5, 5, 0, REDS_HOUSE_1F
+ warp 13, 5, 0, BLUES_HOUSE
+ warp 12, 11, 1, OAKS_LAB
+
+ def_signs
+ sign 13, 13, 4 ; PalletTownText4
+ sign 7, 9, 5 ; PalletTownText5
+ sign 3, 5, 6 ; PalletTownText6
+ sign 11, 5, 7 ; PalletTownText7
+
+ def_objects
+ object SPRITE_OAK, 10, 4, STAY, NONE, 1 ; person
+ object SPRITE_GIRL, 3, 8, WALK, ANY_DIR, 2 ; person
+ object SPRITE_FISHER, 11, 14, WALK, ANY_DIR, 3 ; person
+
+ def_warps_to PALLET_TOWN
diff --git a/data/maps/objects/PewterCity.asm b/data/maps/objects/PewterCity.asm
new file mode 100755
index 00000000..13d228f2
--- /dev/null
+++ b/data/maps/objects/PewterCity.asm
@@ -0,0 +1,29 @@
+PewterCity_Object:
+ db $a ; border block
+
+ def_warps
+ warp 14, 7, 0, MUSEUM_1F
+ warp 19, 5, 2, MUSEUM_1F
+ warp 16, 17, 0, PEWTER_GYM
+ warp 29, 13, 0, PEWTER_NIDORAN_HOUSE
+ warp 23, 17, 0, PEWTER_MART
+ warp 7, 29, 0, PEWTER_SPEECH_HOUSE
+ warp 13, 25, 0, PEWTER_POKECENTER
+
+ def_signs
+ sign 19, 29, 6 ; PewterCityText6
+ sign 33, 19, 7 ; PewterCityText7
+ sign 24, 17, 8 ; MartSignText
+ sign 14, 25, 9 ; PokeCenterSignText
+ sign 15, 9, 10 ; PewterCityText10
+ sign 11, 17, 11 ; PewterCityText11
+ sign 25, 23, 12 ; PewterCityText12
+
+ def_objects
+ object SPRITE_COOLTRAINER_F, 8, 15, STAY, NONE, 1 ; person
+ object SPRITE_COOLTRAINER_M, 17, 25, STAY, NONE, 2 ; person
+ object SPRITE_SUPER_NERD, 27, 17, STAY, NONE, 3 ; person
+ object SPRITE_SUPER_NERD, 26, 25, WALK, LEFT_RIGHT, 4 ; person
+ object SPRITE_YOUNGSTER, 35, 16, STAY, DOWN, 5 ; person
+
+ def_warps_to PEWTER_CITY
diff --git a/data/maps/objects/PewterGym.asm b/data/maps/objects/PewterGym.asm
new file mode 100755
index 00000000..9c21701a
--- /dev/null
+++ b/data/maps/objects/PewterGym.asm
@@ -0,0 +1,15 @@
+PewterGym_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 4, 13, 2, LAST_MAP
+ warp 5, 13, 2, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_SUPER_NERD, 4, 1, STAY, DOWN, 1, OPP_BROCK, 1
+ object SPRITE_COOLTRAINER_M, 3, 6, STAY, RIGHT, 2, OPP_JR_TRAINER_M, 1
+ object SPRITE_GYM_GUIDE, 7, 10, STAY, DOWN, 3 ; person
+
+ def_warps_to PEWTER_GYM
diff --git a/data/maps/objects/PewterMart.asm b/data/maps/objects/PewterMart.asm
new file mode 100755
index 00000000..9685d5c7
--- /dev/null
+++ b/data/maps/objects/PewterMart.asm
@@ -0,0 +1,15 @@
+PewterMart_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 4, LAST_MAP
+ warp 4, 7, 4, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_CLERK, 0, 5, STAY, RIGHT, 1 ; person
+ object SPRITE_YOUNGSTER, 3, 3, WALK, UP_DOWN, 2 ; person
+ object SPRITE_SUPER_NERD, 5, 5, STAY, NONE, 3 ; person
+
+ def_warps_to PEWTER_MART
diff --git a/data/maps/objects/PewterNidoranHouse.asm b/data/maps/objects/PewterNidoranHouse.asm
new file mode 100755
index 00000000..b1fd0a74
--- /dev/null
+++ b/data/maps/objects/PewterNidoranHouse.asm
@@ -0,0 +1,15 @@
+PewterNidoranHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 3, LAST_MAP
+ warp 3, 7, 3, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_MONSTER, 4, 5, STAY, LEFT, 1 ; person
+ object SPRITE_LITTLE_BOY, 3, 5, STAY, RIGHT, 2 ; person
+ object SPRITE_MIDDLE_AGED_MAN, 1, 2, STAY, NONE, 3 ; person
+
+ def_warps_to PEWTER_NIDORAN_HOUSE
diff --git a/data/maps/objects/PewterPokecenter.asm b/data/maps/objects/PewterPokecenter.asm
new file mode 100755
index 00000000..e9a40d20
--- /dev/null
+++ b/data/maps/objects/PewterPokecenter.asm
@@ -0,0 +1,18 @@
+PewterPokecenter_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 6, LAST_MAP
+ warp 4, 7, 6, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
+ object SPRITE_GENTLEMAN, 11, 7, STAY, LEFT, 2 ; person
+ object SPRITE_JIGGLYPUFF, 1, 3, STAY, DOWN, 3 ; person
+ object SPRITE_LINK_RECEPTIONIST, 11, 2, STAY, DOWN, 4 ; person
+ object SPRITE_COOLTRAINER_F, 4, 3, STAY, UP, 5 ; person
+ object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 6 ; person
+
+ def_warps_to PEWTER_POKECENTER
diff --git a/data/maps/objects/PewterSpeechHouse.asm b/data/maps/objects/PewterSpeechHouse.asm
new file mode 100755
index 00000000..4dafb7be
--- /dev/null
+++ b/data/maps/objects/PewterSpeechHouse.asm
@@ -0,0 +1,14 @@
+PewterSpeechHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 5, LAST_MAP
+ warp 3, 7, 5, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_GAMBLER, 2, 3, STAY, RIGHT, 1 ; person
+ object SPRITE_YOUNGSTER, 4, 5, STAY, NONE, 2 ; person
+
+ def_warps_to PEWTER_SPEECH_HOUSE
diff --git a/data/maps/objects/PokemonFanClub.asm b/data/maps/objects/PokemonFanClub.asm
new file mode 100755
index 00000000..eb3e945e
--- /dev/null
+++ b/data/maps/objects/PokemonFanClub.asm
@@ -0,0 +1,18 @@
+PokemonFanClub_Object:
+ db $d ; border block
+
+ def_warps
+ warp 2, 7, 1, LAST_MAP
+ warp 3, 7, 1, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_FISHER, 6, 3, STAY, LEFT, 1 ; person
+ object SPRITE_GIRL, 1, 3, STAY, RIGHT, 2 ; person
+ object SPRITE_CLEFAIRY, 6, 4, STAY, LEFT, 3 ; person
+ object SPRITE_SEEL, 1, 4, STAY, RIGHT, 4 ; person
+ object SPRITE_GENTLEMAN, 3, 1, STAY, DOWN, 5 ; person
+ object SPRITE_LINK_RECEPTIONIST, 5, 1, STAY, DOWN, 6 ; person
+
+ def_warps_to POKEMON_FAN_CLUB
diff --git a/data/maps/objects/PokemonMansion1F.asm b/data/maps/objects/PokemonMansion1F.asm
new file mode 100755
index 00000000..70eef1a1
--- /dev/null
+++ b/data/maps/objects/PokemonMansion1F.asm
@@ -0,0 +1,21 @@
+PokemonMansion1F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 4, 27, 0, LAST_MAP
+ warp 5, 27, 0, LAST_MAP
+ warp 6, 27, 0, LAST_MAP
+ warp 7, 27, 0, LAST_MAP
+ warp 5, 10, 0, POKEMON_MANSION_2F
+ warp 21, 23, 0, POKEMON_MANSION_B1F
+ warp 26, 27, 0, LAST_MAP
+ warp 27, 27, 0, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_SCIENTIST, 17, 17, STAY, LEFT, 1, OPP_SCIENTIST, 4
+ object SPRITE_POKE_BALL, 14, 3, STAY, NONE, 2, ESCAPE_ROPE
+ object SPRITE_POKE_BALL, 18, 21, STAY, NONE, 3, CARBOS
+
+ def_warps_to POKEMON_MANSION_1F
diff --git a/data/maps/objects/PokemonMansion2F.asm b/data/maps/objects/PokemonMansion2F.asm
new file mode 100755
index 00000000..8d504eef
--- /dev/null
+++ b/data/maps/objects/PokemonMansion2F.asm
@@ -0,0 +1,18 @@
+PokemonMansion2F_Object:
+ db $1 ; border block
+
+ def_warps
+ warp 5, 10, 4, POKEMON_MANSION_1F
+ warp 7, 10, 0, POKEMON_MANSION_3F
+ warp 25, 14, 2, POKEMON_MANSION_3F
+ warp 6, 1, 1, POKEMON_MANSION_3F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SUPER_NERD, 3, 17, WALK, LEFT_RIGHT, 1, OPP_BURGLAR, 7
+ object SPRITE_POKE_BALL, 28, 7, STAY, NONE, 2, CALCIUM
+ object SPRITE_POKEDEX, 18, 2, STAY, NONE, 3 ; person
+ object SPRITE_POKEDEX, 3, 22, STAY, NONE, 4 ; person
+
+ def_warps_to POKEMON_MANSION_2F
diff --git a/data/maps/objects/PokemonMansion3F.asm b/data/maps/objects/PokemonMansion3F.asm
new file mode 100755
index 00000000..fdf16a8d
--- /dev/null
+++ b/data/maps/objects/PokemonMansion3F.asm
@@ -0,0 +1,18 @@
+PokemonMansion3F_Object:
+ db $1 ; border block
+
+ def_warps
+ warp 7, 10, 1, POKEMON_MANSION_2F
+ warp 6, 1, 3, POKEMON_MANSION_2F
+ warp 25, 14, 2, POKEMON_MANSION_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SUPER_NERD, 5, 11, WALK, LEFT_RIGHT, 1, OPP_BURGLAR, 8
+ object SPRITE_SCIENTIST, 20, 11, STAY, LEFT, 2, OPP_SCIENTIST, 12
+ object SPRITE_POKE_BALL, 1, 16, STAY, NONE, 3, MAX_POTION
+ object SPRITE_POKE_BALL, 25, 5, STAY, NONE, 4, IRON
+ object SPRITE_POKEDEX, 6, 12, STAY, NONE, 5 ; person
+
+ def_warps_to POKEMON_MANSION_3F
diff --git a/data/maps/objects/PokemonMansionB1F.asm b/data/maps/objects/PokemonMansionB1F.asm
new file mode 100755
index 00000000..bf0ea0a4
--- /dev/null
+++ b/data/maps/objects/PokemonMansionB1F.asm
@@ -0,0 +1,19 @@
+PokemonMansionB1F_Object:
+ db $1 ; border block
+
+ def_warps
+ warp 23, 22, 5, POKEMON_MANSION_1F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SUPER_NERD, 16, 23, STAY, NONE, 1, OPP_BURGLAR, 9
+ object SPRITE_SCIENTIST, 27, 11, STAY, DOWN, 2, OPP_SCIENTIST, 13
+ object SPRITE_POKE_BALL, 10, 2, STAY, NONE, 3, RARE_CANDY
+ object SPRITE_POKE_BALL, 1, 22, STAY, NONE, 4, FULL_RESTORE
+ object SPRITE_POKE_BALL, 19, 25, STAY, NONE, 5, TM_BLIZZARD
+ object SPRITE_POKE_BALL, 5, 4, STAY, NONE, 6, TM_SOLARBEAM
+ object SPRITE_POKEDEX, 16, 20, STAY, NONE, 7 ; person
+ object SPRITE_POKE_BALL, 5, 13, STAY, NONE, 8, SECRET_KEY
+
+ def_warps_to POKEMON_MANSION_B1F
diff --git a/data/maps/objects/PokemonTower1F.asm b/data/maps/objects/PokemonTower1F.asm
new file mode 100755
index 00000000..b73c7562
--- /dev/null
+++ b/data/maps/objects/PokemonTower1F.asm
@@ -0,0 +1,18 @@
+PokemonTower1F_Object:
+ db $1 ; border block
+
+ def_warps
+ warp 10, 17, 1, LAST_MAP
+ warp 11, 17, 1, LAST_MAP
+ warp 18, 9, 1, POKEMON_TOWER_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_LINK_RECEPTIONIST, 15, 13, STAY, UP, 1 ; person
+ object SPRITE_MIDDLE_AGED_WOMAN, 6, 8, STAY, NONE, 2 ; person
+ object SPRITE_BALDING_GUY, 8, 12, STAY, NONE, 3 ; person
+ object SPRITE_GIRL, 13, 7, STAY, NONE, 4 ; person
+ object SPRITE_CHANNELER, 17, 7, STAY, LEFT, 5 ; person
+
+ def_warps_to POKEMON_TOWER_1F
diff --git a/data/maps/objects/PokemonTower2F.asm b/data/maps/objects/PokemonTower2F.asm
new file mode 100755
index 00000000..27bd2f1b
--- /dev/null
+++ b/data/maps/objects/PokemonTower2F.asm
@@ -0,0 +1,14 @@
+PokemonTower2F_Object:
+ db $1 ; border block
+
+ def_warps
+ warp 3, 9, 0, POKEMON_TOWER_3F
+ warp 18, 9, 2, POKEMON_TOWER_1F
+
+ def_signs
+
+ def_objects
+ object SPRITE_BLUE, 14, 5, STAY, NONE, 1 ; person
+ object SPRITE_CHANNELER, 3, 7, STAY, RIGHT, 2 ; person
+
+ def_warps_to POKEMON_TOWER_2F
diff --git a/data/maps/objects/PokemonTower3F.asm b/data/maps/objects/PokemonTower3F.asm
new file mode 100755
index 00000000..af1b17dc
--- /dev/null
+++ b/data/maps/objects/PokemonTower3F.asm
@@ -0,0 +1,16 @@
+PokemonTower3F_Object:
+ db $1 ; border block
+
+ def_warps
+ warp 3, 9, 0, POKEMON_TOWER_2F
+ warp 18, 9, 1, POKEMON_TOWER_4F
+
+ def_signs
+
+ def_objects
+ object SPRITE_CHANNELER, 12, 3, STAY, LEFT, 1, OPP_CHANNELER, 5
+ object SPRITE_CHANNELER, 9, 8, STAY, DOWN, 2, OPP_CHANNELER, 6
+ object SPRITE_CHANNELER, 10, 13, STAY, DOWN, 3, OPP_CHANNELER, 8
+ object SPRITE_POKE_BALL, 12, 1, STAY, NONE, 4, ESCAPE_ROPE
+
+ def_warps_to POKEMON_TOWER_3F
diff --git a/data/maps/objects/PokemonTower4F.asm b/data/maps/objects/PokemonTower4F.asm
new file mode 100755
index 00000000..64801e23
--- /dev/null
+++ b/data/maps/objects/PokemonTower4F.asm
@@ -0,0 +1,18 @@
+PokemonTower4F_Object:
+ db $1 ; border block
+
+ def_warps
+ warp 3, 9, 0, POKEMON_TOWER_5F
+ warp 18, 9, 1, POKEMON_TOWER_3F
+
+ def_signs
+
+ def_objects
+ object SPRITE_CHANNELER, 5, 10, STAY, RIGHT, 1, OPP_CHANNELER, 9
+ object SPRITE_CHANNELER, 15, 7, STAY, DOWN, 2, OPP_CHANNELER, 10
+ object SPRITE_CHANNELER, 14, 12, STAY, LEFT, 3, OPP_CHANNELER, 12
+ object SPRITE_POKE_BALL, 12, 10, STAY, NONE, 4, ELIXER
+ object SPRITE_POKE_BALL, 9, 10, STAY, NONE, 5, AWAKENING
+ object SPRITE_POKE_BALL, 12, 16, STAY, NONE, 6, HP_UP
+
+ def_warps_to POKEMON_TOWER_4F
diff --git a/data/maps/objects/PokemonTower5F.asm b/data/maps/objects/PokemonTower5F.asm
new file mode 100755
index 00000000..33482ed5
--- /dev/null
+++ b/data/maps/objects/PokemonTower5F.asm
@@ -0,0 +1,18 @@
+PokemonTower5F_Object:
+ db $1 ; border block
+
+ def_warps
+ warp 3, 9, 0, POKEMON_TOWER_4F
+ warp 18, 9, 0, POKEMON_TOWER_6F
+
+ def_signs
+
+ def_objects
+ object SPRITE_CHANNELER, 12, 8, STAY, NONE, 1 ; person
+ object SPRITE_CHANNELER, 17, 7, STAY, LEFT, 2, OPP_CHANNELER, 14
+ object SPRITE_CHANNELER, 14, 3, STAY, LEFT, 3, OPP_CHANNELER, 16
+ object SPRITE_CHANNELER, 6, 10, STAY, RIGHT, 4, OPP_CHANNELER, 17
+ object SPRITE_CHANNELER, 9, 16, STAY, RIGHT, 5, OPP_CHANNELER, 18
+ object SPRITE_POKE_BALL, 6, 14, STAY, NONE, 6, NUGGET
+
+ def_warps_to POKEMON_TOWER_5F
diff --git a/data/maps/objects/PokemonTower6F.asm b/data/maps/objects/PokemonTower6F.asm
new file mode 100755
index 00000000..8e7b276c
--- /dev/null
+++ b/data/maps/objects/PokemonTower6F.asm
@@ -0,0 +1,17 @@
+PokemonTower6F_Object:
+ db $1 ; border block
+
+ def_warps
+ warp 18, 9, 1, POKEMON_TOWER_5F
+ warp 9, 16, 0, POKEMON_TOWER_7F
+
+ def_signs
+
+ def_objects
+ object SPRITE_CHANNELER, 12, 10, STAY, RIGHT, 1, OPP_CHANNELER, 19
+ object SPRITE_CHANNELER, 9, 5, STAY, DOWN, 2, OPP_CHANNELER, 20
+ object SPRITE_CHANNELER, 16, 5, STAY, LEFT, 3, OPP_CHANNELER, 21
+ object SPRITE_POKE_BALL, 6, 8, STAY, NONE, 4, RARE_CANDY
+ object SPRITE_POKE_BALL, 14, 14, STAY, NONE, 5, X_ACCURACY
+
+ def_warps_to POKEMON_TOWER_6F
diff --git a/data/maps/objects/PokemonTower7F.asm b/data/maps/objects/PokemonTower7F.asm
new file mode 100755
index 00000000..e5fe486b
--- /dev/null
+++ b/data/maps/objects/PokemonTower7F.asm
@@ -0,0 +1,14 @@
+PokemonTower7F_Object:
+ db $1 ; border block
+
+ def_warps
+ warp 9, 16, 1, POKEMON_TOWER_6F
+
+ def_signs
+
+ def_objects
+ object SPRITE_JESSIE, 10, 8, STAY, DOWN, 1
+ object SPRITE_JAMES, 11, 8, STAY, DOWN, 2
+ object SPRITE_MR_FUJI, 10, 3, STAY, DOWN, 3
+
+ def_warps_to POKEMON_TOWER_7F
diff --git a/data/maps/objects/PowerPlant.asm b/data/maps/objects/PowerPlant.asm
new file mode 100755
index 00000000..6802ce4f
--- /dev/null
+++ b/data/maps/objects/PowerPlant.asm
@@ -0,0 +1,27 @@
+PowerPlant_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 4, 35, 3, LAST_MAP
+ warp 5, 35, 3, LAST_MAP
+ warp 0, 11, 3, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_POKE_BALL, 9, 20, STAY, NONE, 1, VOLTORB, 40
+ object SPRITE_POKE_BALL, 32, 18, STAY, NONE, 2, VOLTORB, 40
+ object SPRITE_POKE_BALL, 21, 25, STAY, NONE, 3, VOLTORB, 40
+ object SPRITE_POKE_BALL, 25, 18, STAY, NONE, 4, ELECTRODE, 43
+ object SPRITE_POKE_BALL, 23, 34, STAY, NONE, 5, VOLTORB, 40
+ object SPRITE_POKE_BALL, 26, 28, STAY, NONE, 6, VOLTORB, 40
+ object SPRITE_POKE_BALL, 21, 14, STAY, NONE, 7, ELECTRODE, 43
+ object SPRITE_POKE_BALL, 37, 32, STAY, NONE, 8, VOLTORB, 40
+ object SPRITE_BIRD, 4, 9, STAY, UP, 9, ZAPDOS, 50
+ object SPRITE_POKE_BALL, 7, 25, STAY, NONE, 10, CARBOS
+ object SPRITE_POKE_BALL, 28, 3, STAY, NONE, 11, HP_UP
+ object SPRITE_POKE_BALL, 34, 3, STAY, NONE, 12, RARE_CANDY
+ object SPRITE_POKE_BALL, 26, 32, STAY, NONE, 13, TM_THUNDER
+ object SPRITE_POKE_BALL, 20, 32, STAY, NONE, 14, TM_REFLECT
+
+ def_warps_to POWER_PLANT
diff --git a/data/maps/objects/RedsHouse1F.asm b/data/maps/objects/RedsHouse1F.asm
new file mode 100755
index 00000000..f7cd0819
--- /dev/null
+++ b/data/maps/objects/RedsHouse1F.asm
@@ -0,0 +1,15 @@
+RedsHouse1F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 0, LAST_MAP ; exit1
+ warp 3, 7, 0, LAST_MAP ; exit2
+ warp 7, 1, 0, REDS_HOUSE_2F ; staircase
+
+ def_signs
+ sign 3, 1, 2 ; TV
+
+ def_objects
+ object SPRITE_MOM, 5, 4, STAY, LEFT, 1 ; Mom
+
+ def_warps_to REDS_HOUSE_1F
diff --git a/data/maps/objects/RedsHouse2F.asm b/data/maps/objects/RedsHouse2F.asm
new file mode 100755
index 00000000..826e68fd
--- /dev/null
+++ b/data/maps/objects/RedsHouse2F.asm
@@ -0,0 +1,11 @@
+RedsHouse2F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 7, 1, 2, REDS_HOUSE_1F
+
+ def_signs
+
+ def_objects
+
+ def_warps_to REDS_HOUSE_2F
diff --git a/data/maps/objects/RockTunnel1F.asm b/data/maps/objects/RockTunnel1F.asm
new file mode 100755
index 00000000..b3d4da48
--- /dev/null
+++ b/data/maps/objects/RockTunnel1F.asm
@@ -0,0 +1,26 @@
+RockTunnel1F_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 15, 3, 1, LAST_MAP
+ warp 15, 0, 1, LAST_MAP
+ warp 15, 33, 2, LAST_MAP
+ warp 15, 35, 2, LAST_MAP
+ warp 37, 3, 0, ROCK_TUNNEL_B1F
+ warp 5, 3, 1, ROCK_TUNNEL_B1F
+ warp 17, 11, 2, ROCK_TUNNEL_B1F
+ warp 37, 17, 3, ROCK_TUNNEL_B1F
+
+ def_signs
+ sign 11, 29, 8 ; RockTunnel1Text8
+
+ def_objects
+ object SPRITE_HIKER, 7, 5, STAY, DOWN, 1, OPP_HIKER, 12
+ object SPRITE_HIKER, 5, 16, STAY, DOWN, 2, OPP_HIKER, 13
+ object SPRITE_HIKER, 17, 15, STAY, LEFT, 3, OPP_HIKER, 14
+ object SPRITE_SUPER_NERD, 23, 8, STAY, LEFT, 4, OPP_POKEMANIAC, 7
+ object SPRITE_COOLTRAINER_F, 37, 21, STAY, LEFT, 5, OPP_JR_TRAINER_F, 17
+ object SPRITE_COOLTRAINER_F, 22, 24, STAY, DOWN, 6, OPP_JR_TRAINER_F, 18
+ object SPRITE_COOLTRAINER_F, 32, 24, STAY, RIGHT, 7, OPP_JR_TRAINER_F, 19
+
+ def_warps_to ROCK_TUNNEL_1F
diff --git a/data/maps/objects/RockTunnelB1F.asm b/data/maps/objects/RockTunnelB1F.asm
new file mode 100755
index 00000000..3fadaa5b
--- /dev/null
+++ b/data/maps/objects/RockTunnelB1F.asm
@@ -0,0 +1,22 @@
+RockTunnelB1F_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 33, 25, 4, ROCK_TUNNEL_1F
+ warp 27, 3, 5, ROCK_TUNNEL_1F
+ warp 23, 11, 6, ROCK_TUNNEL_1F
+ warp 3, 3, 7, ROCK_TUNNEL_1F
+
+ def_signs
+
+ def_objects
+ object SPRITE_COOLTRAINER_F, 11, 13, STAY, DOWN, 1, OPP_JR_TRAINER_F, 9
+ object SPRITE_HIKER, 6, 10, STAY, DOWN, 2, OPP_HIKER, 9
+ object SPRITE_SUPER_NERD, 3, 5, STAY, DOWN, 3, OPP_POKEMANIAC, 3
+ object SPRITE_SUPER_NERD, 20, 21, STAY, RIGHT, 4, OPP_POKEMANIAC, 4
+ object SPRITE_HIKER, 30, 10, STAY, DOWN, 5, OPP_HIKER, 10
+ object SPRITE_COOLTRAINER_F, 14, 28, STAY, RIGHT, 6, OPP_JR_TRAINER_F, 10
+ object SPRITE_HIKER, 33, 5, STAY, RIGHT, 7, OPP_HIKER, 11
+ object SPRITE_SUPER_NERD, 26, 30, STAY, DOWN, 8, OPP_POKEMANIAC, 5
+
+ def_warps_to ROCK_TUNNEL_B1F
diff --git a/data/maps/objects/RockTunnelPokecenter.asm b/data/maps/objects/RockTunnelPokecenter.asm
new file mode 100755
index 00000000..7b99d491
--- /dev/null
+++ b/data/maps/objects/RockTunnelPokecenter.asm
@@ -0,0 +1,17 @@
+RockTunnelPokecenter_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 0, LAST_MAP
+ warp 4, 7, 0, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
+ object SPRITE_GENTLEMAN, 7, 3, STAY, DOWN, 2 ; person
+ object SPRITE_FISHER, 2, 5, STAY, NONE, 3 ; person
+ object SPRITE_LINK_RECEPTIONIST, 11, 2, STAY, DOWN, 4 ; person
+ object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
+
+ def_warps_to ROCK_TUNNEL_POKECENTER
diff --git a/data/maps/objects/RocketHideoutB1F.asm b/data/maps/objects/RocketHideoutB1F.asm
new file mode 100755
index 00000000..81049d63
--- /dev/null
+++ b/data/maps/objects/RocketHideoutB1F.asm
@@ -0,0 +1,22 @@
+RocketHideoutB1F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 23, 2, 0, ROCKET_HIDEOUT_B2F
+ warp 21, 2, 2, GAME_CORNER
+ warp 24, 19, 0, ROCKET_HIDEOUT_ELEVATOR
+ warp 21, 24, 3, ROCKET_HIDEOUT_B2F
+ warp 25, 19, 1, ROCKET_HIDEOUT_ELEVATOR
+
+ def_signs
+
+ def_objects
+ object SPRITE_ROCKET, 26, 8, STAY, LEFT, 1, OPP_ROCKET, 8
+ object SPRITE_ROCKET, 12, 6, STAY, RIGHT, 2, OPP_ROCKET, 9
+ object SPRITE_ROCKET, 18, 17, STAY, DOWN, 3, OPP_ROCKET, 10
+ object SPRITE_ROCKET, 15, 25, STAY, RIGHT, 4, OPP_ROCKET, 11
+ object SPRITE_ROCKET, 28, 18, STAY, LEFT, 5, OPP_ROCKET, 12
+ object SPRITE_POKE_BALL, 11, 14, STAY, NONE, 6, ESCAPE_ROPE
+ object SPRITE_POKE_BALL, 9, 17, STAY, NONE, 7, HYPER_POTION
+
+ def_warps_to ROCKET_HIDEOUT_B1F
diff --git a/data/maps/objects/RocketHideoutB2F.asm b/data/maps/objects/RocketHideoutB2F.asm
new file mode 100755
index 00000000..f6ce5113
--- /dev/null
+++ b/data/maps/objects/RocketHideoutB2F.asm
@@ -0,0 +1,20 @@
+RocketHideoutB2F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 27, 8, 0, ROCKET_HIDEOUT_B1F
+ warp 21, 8, 0, ROCKET_HIDEOUT_B3F
+ warp 24, 19, 0, ROCKET_HIDEOUT_ELEVATOR
+ warp 21, 22, 3, ROCKET_HIDEOUT_B1F
+ warp 25, 19, 1, ROCKET_HIDEOUT_ELEVATOR
+
+ def_signs
+
+ def_objects
+ object SPRITE_ROCKET, 20, 12, STAY, DOWN, 1, OPP_ROCKET, 13
+ object SPRITE_POKE_BALL, 1, 11, STAY, NONE, 2, MOON_STONE
+ object SPRITE_POKE_BALL, 16, 8, STAY, NONE, 3, NUGGET
+ object SPRITE_POKE_BALL, 6, 12, STAY, NONE, 4, TM_HORN_DRILL
+ object SPRITE_POKE_BALL, 3, 21, STAY, NONE, 5, SUPER_POTION
+
+ def_warps_to ROCKET_HIDEOUT_B2F
diff --git a/data/maps/objects/RocketHideoutB3F.asm b/data/maps/objects/RocketHideoutB3F.asm
new file mode 100755
index 00000000..4cba5422
--- /dev/null
+++ b/data/maps/objects/RocketHideoutB3F.asm
@@ -0,0 +1,16 @@
+RocketHideoutB3F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 25, 6, 1, ROCKET_HIDEOUT_B2F
+ warp 19, 18, 0, ROCKET_HIDEOUT_B4F
+
+ def_signs
+
+ def_objects
+ object SPRITE_ROCKET, 10, 22, STAY, RIGHT, 1, OPP_ROCKET, 14
+ object SPRITE_ROCKET, 26, 12, STAY, UP, 2, OPP_ROCKET, 15
+ object SPRITE_POKE_BALL, 26, 17, STAY, NONE, 3, TM_DOUBLE_EDGE
+ object SPRITE_POKE_BALL, 20, 14, STAY, NONE, 4, RARE_CANDY
+
+ def_warps_to ROCKET_HIDEOUT_B3F
diff --git a/data/maps/objects/RocketHideoutB4F.asm b/data/maps/objects/RocketHideoutB4F.asm
new file mode 100755
index 00000000..3541befc
--- /dev/null
+++ b/data/maps/objects/RocketHideoutB4F.asm
@@ -0,0 +1,22 @@
+RocketHideoutB4F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 19, 10, 1, ROCKET_HIDEOUT_B3F
+ warp 24, 15, 0, ROCKET_HIDEOUT_ELEVATOR
+ warp 25, 15, 1, ROCKET_HIDEOUT_ELEVATOR
+
+ def_signs
+
+ def_objects
+ object SPRITE_GIOVANNI, 25, 3, STAY, DOWN, 1, OPP_GIOVANNI, 1
+ object SPRITE_JAMES, 25, 10, STAY, DOWN, 2
+ object SPRITE_JESSIE, 24, 10, STAY, DOWN, 3
+ object SPRITE_ROCKET, 11, 2, STAY, DOWN, 4, OPP_ROCKET, 18
+ object SPRITE_POKE_BALL, 10, 12, STAY, NONE, 5, HP_UP
+ object SPRITE_POKE_BALL, 9, 4, STAY, NONE, 6, TM_RAZOR_WIND
+ object SPRITE_POKE_BALL, 12, 20, STAY, NONE, 7, IRON
+ object SPRITE_POKE_BALL, 25, 2, STAY, NONE, 8, SILPH_SCOPE
+ object SPRITE_POKE_BALL, 10, 2, STAY, NONE, 9, LIFT_KEY
+
+ def_warps_to ROCKET_HIDEOUT_B4F
diff --git a/data/maps/objects/RocketHideoutElevator.asm b/data/maps/objects/RocketHideoutElevator.asm
new file mode 100755
index 00000000..20ab4956
--- /dev/null
+++ b/data/maps/objects/RocketHideoutElevator.asm
@@ -0,0 +1,13 @@
+RocketHideoutElevator_Object:
+ db $f ; border block
+
+ def_warps
+ warp 2, 1, 2, ROCKET_HIDEOUT_B1F
+ warp 3, 1, 4, ROCKET_HIDEOUT_B1F
+
+ def_signs
+ sign 1, 1, 1 ; RocketHideoutElevatorText1
+
+ def_objects
+
+ def_warps_to ROCKET_HIDEOUT_ELEVATOR
diff --git a/data/maps/objects/Route1.asm b/data/maps/objects/Route1.asm
new file mode 100755
index 00000000..ee1b03a5
--- /dev/null
+++ b/data/maps/objects/Route1.asm
@@ -0,0 +1,16 @@
+Route1_Object:
+ db $b ; border block
+
+ def_warps
+
+ def_signs
+ sign 9, 27, 3 ; Route1Text3
+
+ def_objects
+ object SPRITE_YOUNGSTER, 5, 24, WALK, UP_DOWN, 1 ; person
+ object SPRITE_YOUNGSTER, 15, 13, WALK, LEFT_RIGHT, 2 ; person
+
+ def_warps_to ROUTE_1
+
+ ; unused
+ warp_to 2, 7, 4
diff --git a/data/maps/objects/Route10.asm b/data/maps/objects/Route10.asm
new file mode 100755
index 00000000..54a0936e
--- /dev/null
+++ b/data/maps/objects/Route10.asm
@@ -0,0 +1,24 @@
+Route10_Object:
+ db $2c ; border block
+
+ def_warps
+ warp 11, 19, 0, ROCK_TUNNEL_POKECENTER
+ warp 8, 17, 0, ROCK_TUNNEL_1F
+ warp 8, 53, 2, ROCK_TUNNEL_1F
+ warp 6, 39, 0, POWER_PLANT
+
+ def_signs
+ sign 7, 19, 7 ; Route10Text7
+ sign 12, 19, 8 ; PokeCenterSignText
+ sign 9, 55, 9 ; Route10Text9
+ sign 5, 41, 10 ; Route10Text10
+
+ def_objects
+ object SPRITE_SUPER_NERD, 10, 44, STAY, LEFT, 1, OPP_POKEMANIAC, 1
+ object SPRITE_HIKER, 3, 57, STAY, UP, 2, OPP_HIKER, 7
+ object SPRITE_SUPER_NERD, 14, 64, STAY, LEFT, 3, OPP_POKEMANIAC, 2
+ object SPRITE_COOLTRAINER_F, 7, 25, STAY, LEFT, 4, OPP_JR_TRAINER_F, 7
+ object SPRITE_HIKER, 3, 61, STAY, DOWN, 5, OPP_HIKER, 8
+ object SPRITE_COOLTRAINER_F, 7, 54, STAY, DOWN, 6, OPP_JR_TRAINER_F, 8
+
+ def_warps_to ROUTE_10
diff --git a/data/maps/objects/Route11.asm b/data/maps/objects/Route11.asm
new file mode 100755
index 00000000..0814aeb1
--- /dev/null
+++ b/data/maps/objects/Route11.asm
@@ -0,0 +1,26 @@
+Route11_Object:
+ db $f ; border block
+
+ def_warps
+ warp 49, 8, 0, ROUTE_11_GATE_1F
+ warp 49, 9, 0, ROUTE_11_GATE_1F
+ warp 58, 8, 2, ROUTE_11_GATE_1F
+ warp 58, 9, 2, ROUTE_11_GATE_1F
+ warp 4, 5, 0, DIGLETTS_CAVE_ROUTE_11
+
+ def_signs
+ sign 1, 5, 11 ; Route11Text11
+
+ def_objects
+ object SPRITE_GAMBLER, 10, 14, STAY, DOWN, 1, OPP_GAMBLER, 1
+ object SPRITE_GAMBLER, 26, 9, STAY, DOWN, 2, OPP_GAMBLER, 2
+ object SPRITE_YOUNGSTER, 13, 5, STAY, LEFT, 3, OPP_YOUNGSTER, 9
+ object SPRITE_SUPER_NERD, 36, 11, STAY, DOWN, 4, OPP_ENGINEER, 2
+ object SPRITE_YOUNGSTER, 22, 4, STAY, UP, 5, OPP_YOUNGSTER, 10
+ object SPRITE_GAMBLER, 45, 7, STAY, DOWN, 6, OPP_GAMBLER, 3
+ object SPRITE_GAMBLER, 33, 3, STAY, UP, 7, OPP_GAMBLER, 4
+ object SPRITE_YOUNGSTER, 43, 5, STAY, RIGHT, 8, OPP_YOUNGSTER, 11
+ object SPRITE_SUPER_NERD, 45, 16, STAY, LEFT, 9, OPP_ENGINEER, 3
+ object SPRITE_YOUNGSTER, 22, 12, STAY, UP, 10, OPP_YOUNGSTER, 12
+
+ def_warps_to ROUTE_11
diff --git a/data/maps/objects/Route11Gate1F.asm b/data/maps/objects/Route11Gate1F.asm
new file mode 100755
index 00000000..d0c9c461
--- /dev/null
+++ b/data/maps/objects/Route11Gate1F.asm
@@ -0,0 +1,16 @@
+Route11Gate1F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 0, 4, 0, LAST_MAP
+ warp 0, 5, 1, LAST_MAP
+ warp 7, 4, 2, LAST_MAP
+ warp 7, 5, 3, LAST_MAP
+ warp 6, 8, 0, ROUTE_11_GATE_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_GUARD, 4, 1, STAY, NONE, 1 ; person
+
+ def_warps_to ROUTE_11_GATE_1F
diff --git a/data/maps/objects/Route11Gate2F.asm b/data/maps/objects/Route11Gate2F.asm
new file mode 100755
index 00000000..fa48409c
--- /dev/null
+++ b/data/maps/objects/Route11Gate2F.asm
@@ -0,0 +1,15 @@
+Route11Gate2F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 7, 7, 4, ROUTE_11_GATE_1F
+
+ def_signs
+ sign 1, 2, 3 ; Route11GateUpstairsText3
+ sign 6, 2, 4 ; Route11GateUpstairsText4
+
+ def_objects
+ object SPRITE_YOUNGSTER, 4, 2, WALK, LEFT_RIGHT, 1 ; person
+ object SPRITE_SCIENTIST, 2, 6, STAY, NONE, 2 ; person
+
+ def_warps_to ROUTE_11_GATE_2F
diff --git a/data/maps/objects/Route12.asm b/data/maps/objects/Route12.asm
new file mode 100755
index 00000000..bdb74d68
--- /dev/null
+++ b/data/maps/objects/Route12.asm
@@ -0,0 +1,26 @@
+Route12_Object:
+ db $43 ; border block
+
+ def_warps
+ warp 10, 15, 0, ROUTE_12_GATE_1F
+ warp 11, 15, 0, ROUTE_12_GATE_1F
+ warp 10, 21, 2, ROUTE_12_GATE_1F
+ warp 11, 77, 0, ROUTE_12_SUPER_ROD_HOUSE
+
+ def_signs
+ sign 13, 13, 11 ; Route12Text11
+ sign 11, 63, 12 ; Route12Text12
+
+ def_objects
+ object SPRITE_SNORLAX, 10, 62, STAY, DOWN, 1 ; person
+ object SPRITE_FISHER, 14, 31, STAY, LEFT, 2, OPP_FISHER, 3
+ object SPRITE_FISHER, 5, 39, STAY, UP, 3, OPP_FISHER, 4
+ object SPRITE_COOLTRAINER_M, 11, 92, STAY, LEFT, 4, OPP_JR_TRAINER_M, 9
+ object SPRITE_SUPER_NERD, 14, 76, STAY, UP, 5, OPP_ROCKER, 2
+ object SPRITE_FISHER, 12, 40, STAY, LEFT, 6, OPP_FISHER, 5
+ object SPRITE_FISHER, 9, 52, STAY, RIGHT, 7, OPP_FISHER, 6
+ object SPRITE_FISHER, 6, 87, STAY, DOWN, 8, OPP_FISHER, 11
+ object SPRITE_POKE_BALL, 14, 35, STAY, NONE, 9, TM_PAY_DAY
+ object SPRITE_POKE_BALL, 5, 89, STAY, NONE, 10, IRON
+
+ def_warps_to ROUTE_12
diff --git a/data/maps/objects/Route12Gate1F.asm b/data/maps/objects/Route12Gate1F.asm
new file mode 100755
index 00000000..356bf67a
--- /dev/null
+++ b/data/maps/objects/Route12Gate1F.asm
@@ -0,0 +1,16 @@
+Route12Gate1F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 4, 0, 0, LAST_MAP
+ warp 5, 0, 1, LAST_MAP
+ warp 4, 7, 2, LAST_MAP
+ warp 5, 7, 2, LAST_MAP
+ warp 8, 6, 0, ROUTE_12_GATE_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_GUARD, 1, 3, STAY, NONE, 1 ; person
+
+ def_warps_to ROUTE_12_GATE_1F
diff --git a/data/maps/objects/Route12Gate2F.asm b/data/maps/objects/Route12Gate2F.asm
new file mode 100755
index 00000000..413adf25
--- /dev/null
+++ b/data/maps/objects/Route12Gate2F.asm
@@ -0,0 +1,14 @@
+Route12Gate2F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 7, 7, 4, ROUTE_12_GATE_1F
+
+ def_signs
+ sign 1, 2, 2 ; Route12GateUpstairsText2
+ sign 6, 2, 3 ; Route12GateUpstairsText3
+
+ def_objects
+ object SPRITE_BRUNETTE_GIRL, 3, 4, WALK, UP_DOWN, 1 ; person
+
+ def_warps_to ROUTE_12_GATE_2F
diff --git a/data/maps/objects/Route12SuperRodHouse.asm b/data/maps/objects/Route12SuperRodHouse.asm
new file mode 100755
index 00000000..4cd43639
--- /dev/null
+++ b/data/maps/objects/Route12SuperRodHouse.asm
@@ -0,0 +1,13 @@
+Route12SuperRodHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 3, LAST_MAP
+ warp 3, 7, 3, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_FISHING_GURU, 2, 4, STAY, RIGHT, 1 ; person
+
+ def_warps_to ROUTE_12_SUPER_ROD_HOUSE
diff --git a/data/maps/objects/Route13.asm b/data/maps/objects/Route13.asm
new file mode 100755
index 00000000..365eea7d
--- /dev/null
+++ b/data/maps/objects/Route13.asm
@@ -0,0 +1,23 @@
+Route13_Object:
+ db $43 ; border block
+
+ def_warps
+
+ def_signs
+ sign 15, 13, 11 ; Route13Text11
+ sign 33, 5, 12 ; Route13Text12
+ sign 31, 11, 13 ; Route13Text13
+
+ def_objects
+ object SPRITE_COOLTRAINER_M, 49, 10, STAY, RIGHT, 1, OPP_BIRD_KEEPER, 1
+ object SPRITE_COOLTRAINER_F, 48, 10, STAY, DOWN, 2, OPP_JR_TRAINER_F, 12
+ object SPRITE_COOLTRAINER_F, 27, 9, STAY, DOWN, 3, OPP_JR_TRAINER_F, 13
+ object SPRITE_COOLTRAINER_F, 23, 10, STAY, LEFT, 4, OPP_JR_TRAINER_F, 14
+ object SPRITE_COOLTRAINER_F, 50, 5, STAY, DOWN, 5, OPP_JR_TRAINER_F, 15
+ object SPRITE_COOLTRAINER_M, 12, 4, STAY, RIGHT, 6, OPP_BIRD_KEEPER, 2
+ object SPRITE_BEAUTY, 33, 6, STAY, DOWN, 7, OPP_BEAUTY, 4
+ object SPRITE_BEAUTY, 32, 6, STAY, DOWN, 8, OPP_BEAUTY, 5
+ object SPRITE_BIKER, 10, 7, STAY, UP, 9, OPP_BIKER, 1
+ object SPRITE_COOLTRAINER_M, 7, 13, STAY, UP, 10, OPP_BIRD_KEEPER, 3
+
+ def_warps_to ROUTE_13
diff --git a/data/maps/objects/Route14.asm b/data/maps/objects/Route14.asm
new file mode 100755
index 00000000..4a2240e6
--- /dev/null
+++ b/data/maps/objects/Route14.asm
@@ -0,0 +1,21 @@
+Route14_Object:
+ db $43 ; border block
+
+ def_warps
+
+ def_signs
+ sign 17, 13, 11 ; Route14Text11
+
+ def_objects
+ object SPRITE_COOLTRAINER_M, 4, 4, STAY, DOWN, 1, OPP_BIRD_KEEPER, 14
+ object SPRITE_COOLTRAINER_M, 15, 6, STAY, DOWN, 2, OPP_BIRD_KEEPER, 15
+ object SPRITE_COOLTRAINER_M, 12, 11, STAY, DOWN, 3, OPP_BIRD_KEEPER, 16
+ object SPRITE_COOLTRAINER_M, 14, 15, STAY, UP, 4, OPP_BIRD_KEEPER, 17
+ object SPRITE_COOLTRAINER_M, 15, 31, STAY, LEFT, 5, OPP_BIRD_KEEPER, 4
+ object SPRITE_COOLTRAINER_M, 6, 49, STAY, UP, 6, OPP_BIRD_KEEPER, 5
+ object SPRITE_BIKER, 5, 39, STAY, DOWN, 7, OPP_BIKER, 13
+ object SPRITE_BIKER, 4, 30, STAY, RIGHT, 8, OPP_BIKER, 14
+ object SPRITE_BIKER, 15, 30, STAY, LEFT, 9, OPP_BIKER, 15
+ object SPRITE_BIKER, 4, 31, STAY, RIGHT, 10, OPP_BIKER, 2
+
+ def_warps_to ROUTE_14
diff --git a/data/maps/objects/Route15.asm b/data/maps/objects/Route15.asm
new file mode 100755
index 00000000..884e1704
--- /dev/null
+++ b/data/maps/objects/Route15.asm
@@ -0,0 +1,26 @@
+Route15_Object:
+ db $43 ; border block
+
+ def_warps
+ warp 7, 8, 0, ROUTE_15_GATE_1F
+ warp 7, 9, 0, ROUTE_15_GATE_1F
+ warp 14, 8, 2, ROUTE_15_GATE_1F
+ warp 14, 9, 2, ROUTE_15_GATE_1F
+
+ def_signs
+ sign 39, 9, 12 ; Route15Text12
+
+ def_objects
+ object SPRITE_COOLTRAINER_F, 41, 11, STAY, DOWN, 1, OPP_JR_TRAINER_F, 20
+ object SPRITE_COOLTRAINER_F, 53, 10, STAY, LEFT, 2, OPP_JR_TRAINER_F, 21
+ object SPRITE_COOLTRAINER_M, 31, 13, STAY, UP, 3, OPP_BIRD_KEEPER, 6
+ object SPRITE_COOLTRAINER_M, 35, 13, STAY, UP, 4, OPP_BIRD_KEEPER, 7
+ object SPRITE_BEAUTY, 53, 11, STAY, DOWN, 5, OPP_BEAUTY, 9
+ object SPRITE_BEAUTY, 41, 10, STAY, RIGHT, 6, OPP_BEAUTY, 10
+ object SPRITE_BIKER, 48, 10, STAY, DOWN, 7, OPP_BIKER, 3
+ object SPRITE_BIKER, 46, 10, STAY, DOWN, 8, OPP_BIKER, 4
+ object SPRITE_COOLTRAINER_F, 37, 5, STAY, RIGHT, 9, OPP_JR_TRAINER_F, 22
+ object SPRITE_COOLTRAINER_F, 18, 13, STAY, UP, 10, OPP_JR_TRAINER_F, 23
+ object SPRITE_POKE_BALL, 18, 5, STAY, NONE, 11, TM_RAGE
+
+ def_warps_to ROUTE_15
diff --git a/data/maps/objects/Route15Gate1F.asm b/data/maps/objects/Route15Gate1F.asm
new file mode 100755
index 00000000..e611e98b
--- /dev/null
+++ b/data/maps/objects/Route15Gate1F.asm
@@ -0,0 +1,16 @@
+Route15Gate1F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 0, 4, 0, LAST_MAP
+ warp 0, 5, 1, LAST_MAP
+ warp 7, 4, 2, LAST_MAP
+ warp 7, 5, 3, LAST_MAP
+ warp 6, 8, 0, ROUTE_15_GATE_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_GUARD, 4, 1, STAY, NONE, 1 ; person
+
+ def_warps_to ROUTE_15_GATE_1F
diff --git a/data/maps/objects/Route15Gate2F.asm b/data/maps/objects/Route15Gate2F.asm
new file mode 100755
index 00000000..608b69e5
--- /dev/null
+++ b/data/maps/objects/Route15Gate2F.asm
@@ -0,0 +1,13 @@
+Route15Gate2F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 7, 7, 4, ROUTE_15_GATE_1F
+
+ def_signs
+ sign 6, 2, 2 ; Route15GateUpstairsText2
+
+ def_objects
+ object SPRITE_SCIENTIST, 4, 2, STAY, DOWN, 1
+
+ def_warps_to ROUTE_15_GATE_2F
diff --git a/data/maps/objects/Route16.asm b/data/maps/objects/Route16.asm
new file mode 100755
index 00000000..50a8a4bf
--- /dev/null
+++ b/data/maps/objects/Route16.asm
@@ -0,0 +1,28 @@
+Route16_Object:
+ db $f ; border block
+
+ def_warps
+ warp 17, 10, 0, ROUTE_16_GATE_1F
+ warp 17, 11, 0, ROUTE_16_GATE_1F
+ warp 24, 10, 2, ROUTE_16_GATE_1F
+ warp 24, 11, 2, ROUTE_16_GATE_1F
+ warp 17, 4, 4, ROUTE_16_GATE_1F
+ warp 17, 5, 4, ROUTE_16_GATE_1F
+ warp 24, 4, 6, ROUTE_16_GATE_1F
+ warp 24, 5, 6, ROUTE_16_GATE_1F
+ warp 7, 5, 0, ROUTE_16_FLY_HOUSE
+
+ def_signs
+ sign 27, 11, 8 ; Route16Text8
+ sign 5, 17, 9 ; Route16Text9
+
+ def_objects
+ object SPRITE_BIKER, 17, 12, STAY, LEFT, 1, OPP_BIKER, 5
+ object SPRITE_BIKER, 14, 13, STAY, RIGHT, 2, OPP_CUE_BALL, 1
+ object SPRITE_BIKER, 11, 12, STAY, UP, 3, OPP_CUE_BALL, 2
+ object SPRITE_BIKER, 9, 11, STAY, LEFT, 4, OPP_BIKER, 6
+ object SPRITE_BIKER, 6, 10, STAY, RIGHT, 5, OPP_CUE_BALL, 3
+ object SPRITE_BIKER, 3, 12, STAY, RIGHT, 6, OPP_BIKER, 7
+ object SPRITE_SNORLAX, 26, 10, STAY, DOWN, 7 ; person
+
+ def_warps_to ROUTE_16
diff --git a/data/maps/objects/Route16FlyHouse.asm b/data/maps/objects/Route16FlyHouse.asm
new file mode 100755
index 00000000..be6cdc61
--- /dev/null
+++ b/data/maps/objects/Route16FlyHouse.asm
@@ -0,0 +1,14 @@
+Route16FlyHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 8, LAST_MAP
+ warp 3, 7, 8, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_BRUNETTE_GIRL, 2, 3, STAY, RIGHT, 1 ; person
+ object SPRITE_BIRD, 6, 4, WALK, ANY_DIR, 2 ; person
+
+ def_warps_to ROUTE_16_FLY_HOUSE
diff --git a/data/maps/objects/Route16Gate1F.asm b/data/maps/objects/Route16Gate1F.asm
new file mode 100755
index 00000000..4f876e7f
--- /dev/null
+++ b/data/maps/objects/Route16Gate1F.asm
@@ -0,0 +1,21 @@
+Route16Gate1F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 0, 8, 0, LAST_MAP
+ warp 0, 9, 1, LAST_MAP
+ warp 7, 8, 2, LAST_MAP
+ warp 7, 9, 2, LAST_MAP
+ warp 0, 2, 4, LAST_MAP
+ warp 0, 3, 5, LAST_MAP
+ warp 7, 2, 6, LAST_MAP
+ warp 7, 3, 7, LAST_MAP
+ warp 6, 12, 0, ROUTE_16_GATE_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_GUARD, 4, 5, STAY, DOWN, 1 ; person
+ object SPRITE_GAMBLER, 4, 3, STAY, NONE, 2 ; person
+
+ def_warps_to ROUTE_16_GATE_1F
diff --git a/data/maps/objects/Route16Gate2F.asm b/data/maps/objects/Route16Gate2F.asm
new file mode 100755
index 00000000..53511ae5
--- /dev/null
+++ b/data/maps/objects/Route16Gate2F.asm
@@ -0,0 +1,15 @@
+Route16Gate2F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 7, 7, 8, ROUTE_16_GATE_1F
+
+ def_signs
+ sign 1, 2, 3 ; Route16GateUpstairsText3
+ sign 6, 2, 4 ; Route16GateUpstairsText4
+
+ def_objects
+ object SPRITE_LITTLE_BOY, 4, 2, STAY, NONE, 1 ; person
+ object SPRITE_LITTLE_GIRL, 2, 5, WALK, LEFT_RIGHT, 2 ; person
+
+ def_warps_to ROUTE_16_GATE_2F
diff --git a/data/maps/objects/Route17.asm b/data/maps/objects/Route17.asm
new file mode 100755
index 00000000..f170b695
--- /dev/null
+++ b/data/maps/objects/Route17.asm
@@ -0,0 +1,26 @@
+Route17_Object:
+ db $43 ; border block
+
+ def_warps
+
+ def_signs
+ sign 9, 51, 11 ; Route17Text11
+ sign 9, 63, 12 ; Route17Text12
+ sign 9, 75, 13 ; Route17Text13
+ sign 9, 87, 14 ; Route17Text14
+ sign 9, 111, 15 ; Route17Text15
+ sign 9, 141, 16 ; Route17Text16
+
+ def_objects
+ object SPRITE_BIKER, 12, 19, STAY, LEFT, 1, OPP_CUE_BALL, 4
+ object SPRITE_BIKER, 11, 16, STAY, RIGHT, 2, OPP_CUE_BALL, 5
+ object SPRITE_BIKER, 4, 18, STAY, UP, 3, OPP_BIKER, 8
+ object SPRITE_BIKER, 7, 32, STAY, LEFT, 4, OPP_BIKER, 9
+ object SPRITE_BIKER, 14, 34, STAY, RIGHT, 5, OPP_BIKER, 10
+ object SPRITE_BIKER, 17, 58, STAY, LEFT, 6, OPP_CUE_BALL, 6
+ object SPRITE_BIKER, 2, 68, STAY, RIGHT, 7, OPP_CUE_BALL, 7
+ object SPRITE_BIKER, 14, 98, STAY, RIGHT, 8, OPP_CUE_BALL, 8
+ object SPRITE_BIKER, 5, 98, STAY, LEFT, 9, OPP_BIKER, 11
+ object SPRITE_BIKER, 10, 118, STAY, DOWN, 10, OPP_BIKER, 12
+
+ def_warps_to ROUTE_17
diff --git a/data/maps/objects/Route18.asm b/data/maps/objects/Route18.asm
new file mode 100755
index 00000000..cbb881fe
--- /dev/null
+++ b/data/maps/objects/Route18.asm
@@ -0,0 +1,19 @@
+Route18_Object:
+ db $43 ; border block
+
+ def_warps
+ warp 33, 8, 0, ROUTE_18_GATE_1F
+ warp 33, 9, 0, ROUTE_18_GATE_1F
+ warp 40, 8, 2, ROUTE_18_GATE_1F
+ warp 40, 9, 2, ROUTE_18_GATE_1F
+
+ def_signs
+ sign 43, 7, 4 ; Route18Text4
+ sign 33, 5, 5 ; Route18Text5
+
+ def_objects
+ object SPRITE_COOLTRAINER_M, 36, 11, STAY, RIGHT, 1, OPP_BIRD_KEEPER, 8
+ object SPRITE_COOLTRAINER_M, 40, 15, STAY, LEFT, 2, OPP_BIRD_KEEPER, 9
+ object SPRITE_COOLTRAINER_M, 42, 13, STAY, LEFT, 3, OPP_BIRD_KEEPER, 10
+
+ def_warps_to ROUTE_18
diff --git a/data/maps/objects/Route18Gate1F.asm b/data/maps/objects/Route18Gate1F.asm
new file mode 100755
index 00000000..3bfdefaa
--- /dev/null
+++ b/data/maps/objects/Route18Gate1F.asm
@@ -0,0 +1,16 @@
+Route18Gate1F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 0, 4, 0, LAST_MAP
+ warp 0, 5, 1, LAST_MAP
+ warp 7, 4, 2, LAST_MAP
+ warp 7, 5, 3, LAST_MAP
+ warp 6, 8, 0, ROUTE_18_GATE_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_GUARD, 4, 1, STAY, DOWN, 1 ; person
+
+ def_warps_to ROUTE_18_GATE_1F
diff --git a/data/maps/objects/Route18Gate2F.asm b/data/maps/objects/Route18Gate2F.asm
new file mode 100755
index 00000000..a2080d46
--- /dev/null
+++ b/data/maps/objects/Route18Gate2F.asm
@@ -0,0 +1,14 @@
+Route18Gate2F_Object:
+ db $a ; border block
+
+ def_warps
+ warp 7, 7, 4, ROUTE_18_GATE_1F
+
+ def_signs
+ sign 1, 2, 2 ; Route18GateUpstairsText2
+ sign 6, 2, 3 ; Route18GateUpstairsText3
+
+ def_objects
+ object SPRITE_COOK, 4, 2, WALK, LEFT_RIGHT, 1 ; person
+
+ def_warps_to ROUTE_18_GATE_2F
diff --git a/data/maps/objects/Route19.asm b/data/maps/objects/Route19.asm
new file mode 100755
index 00000000..340c48f0
--- /dev/null
+++ b/data/maps/objects/Route19.asm
@@ -0,0 +1,22 @@
+Route19_Object:
+ db $43 ; border block
+
+ def_warps
+ warp 5, 9, 0, BEACH_HOUSE
+
+ def_signs
+ sign 11, 11, 11
+
+ def_objects
+ object SPRITE_COOLTRAINER_M, 9, 7, STAY, RIGHT, 1, OPP_SWIMMER, 2
+ object SPRITE_COOLTRAINER_M, 12, 9, STAY, LEFT, 2, OPP_SWIMMER, 3
+ object SPRITE_SWIMMER, 13, 25, STAY, LEFT, 3, OPP_SWIMMER, 4
+ object SPRITE_SWIMMER, 4, 27, STAY, RIGHT, 4, OPP_SWIMMER, 5
+ object SPRITE_SWIMMER, 16, 31, STAY, UP, 5, OPP_SWIMMER, 6
+ object SPRITE_SWIMMER, 9, 13, STAY, DOWN, 6, OPP_SWIMMER, 7
+ object SPRITE_SWIMMER, 8, 43, STAY, LEFT, 7, OPP_BEAUTY, 12
+ object SPRITE_SWIMMER, 11, 43, STAY, RIGHT, 8, OPP_BEAUTY, 13
+ object SPRITE_SWIMMER, 9, 42, STAY, UP, 9, OPP_SWIMMER, 8
+ object SPRITE_SWIMMER, 10, 44, STAY, DOWN, 10, OPP_BEAUTY, 14
+
+ def_warps_to ROUTE_19
diff --git a/data/maps/objects/Route2.asm b/data/maps/objects/Route2.asm
new file mode 100755
index 00000000..e939b0dd
--- /dev/null
+++ b/data/maps/objects/Route2.asm
@@ -0,0 +1,29 @@
+Route2_Object:
+ db $f ; border block
+
+ def_warps
+ warp 12, 9, 0, DIGLETTS_CAVE_ROUTE_2
+ warp 3, 11, 1, VIRIDIAN_FOREST_NORTH_GATE
+ warp 15, 19, 0, ROUTE_2_TRADE_HOUSE
+ warp 16, 35, 1, ROUTE_2_GATE
+ warp 15, 39, 2, ROUTE_2_GATE
+ warp 3, 43, 2, VIRIDIAN_FOREST_SOUTH_GATE
+ warp 17, 35, 1, ROUTE_2_GATE
+
+ def_signs
+ sign 5, 65, 3 ; Route2Text3
+ sign 11, 11, 4 ; Route2Text4
+
+ def_objects
+ object SPRITE_POKE_BALL, 13, 54, STAY, NONE, 1, MOON_STONE
+ object SPRITE_POKE_BALL, 13, 45, STAY, NONE, 2, HP_UP
+
+ def_warps_to ROUTE_2
+
+ ; unused
+ warp_to 2, 7, 4
+ dw $c712
+ db $9, $7
+ warp_to 2, 7, 4
+ warp_to 2, 7, 4
+ warp_to 2, 7, 4
diff --git a/data/maps/objects/Route20.asm b/data/maps/objects/Route20.asm
new file mode 100755
index 00000000..19e7cce7
--- /dev/null
+++ b/data/maps/objects/Route20.asm
@@ -0,0 +1,24 @@
+Route20_Object:
+ db $43 ; border block
+
+ def_warps
+ warp 48, 5, 0, SEAFOAM_ISLANDS_1F
+ warp 58, 9, 2, SEAFOAM_ISLANDS_1F
+
+ def_signs
+ sign 51, 7, 11 ; Route20Text11
+ sign 57, 11, 12 ; Route20Text12
+
+ def_objects
+ object SPRITE_SWIMMER, 87, 8, STAY, UP, 1, OPP_SWIMMER, 9
+ object SPRITE_SWIMMER, 68, 11, STAY, UP, 2, OPP_BEAUTY, 15
+ object SPRITE_SWIMMER, 45, 10, STAY, DOWN, 3, OPP_BEAUTY, 6
+ object SPRITE_SWIMMER, 55, 14, STAY, RIGHT, 4, OPP_JR_TRAINER_F, 24
+ object SPRITE_SWIMMER, 38, 13, STAY, DOWN, 5, OPP_SWIMMER, 10
+ object SPRITE_SWIMMER, 87, 13, STAY, UP, 6, OPP_SWIMMER, 11
+ object SPRITE_COOLTRAINER_M, 34, 9, STAY, UP, 7, OPP_BIRD_KEEPER, 11
+ object SPRITE_SWIMMER, 25, 7, STAY, UP, 8, OPP_BEAUTY, 7
+ object SPRITE_SWIMMER, 24, 12, STAY, DOWN, 9, OPP_JR_TRAINER_F, 16
+ object SPRITE_SWIMMER, 15, 8, STAY, UP, 10, OPP_BEAUTY, 8
+
+ def_warps_to ROUTE_20
diff --git a/data/maps/objects/Route21.asm b/data/maps/objects/Route21.asm
new file mode 100755
index 00000000..71817640
--- /dev/null
+++ b/data/maps/objects/Route21.asm
@@ -0,0 +1,19 @@
+Route21_Object:
+ db $43 ; border block
+
+ def_warps
+
+ def_signs
+
+ def_objects
+ object SPRITE_FISHER, 4, 24, STAY, LEFT, 1, OPP_FISHER, 7
+ object SPRITE_FISHER, 6, 25, STAY, DOWN, 2, OPP_FISHER, 9
+ object SPRITE_SWIMMER, 10, 31, STAY, UP, 3, OPP_SWIMMER, 12
+ object SPRITE_SWIMMER, 12, 30, STAY, RIGHT, 4, OPP_CUE_BALL, 9
+ object SPRITE_SWIMMER, 16, 63, STAY, DOWN, 5, OPP_SWIMMER, 13
+ object SPRITE_SWIMMER, 5, 71, STAY, RIGHT, 6, OPP_SWIMMER, 14
+ object SPRITE_SWIMMER, 15, 71, STAY, LEFT, 7, OPP_SWIMMER, 15
+ object SPRITE_FISHER, 14, 56, STAY, LEFT, 8, OPP_FISHER, 8
+ object SPRITE_FISHER, 17, 57, STAY, RIGHT, 9, OPP_FISHER, 10
+
+ def_warps_to ROUTE_21
diff --git a/data/maps/objects/Route22.asm b/data/maps/objects/Route22.asm
new file mode 100755
index 00000000..857b8a86
--- /dev/null
+++ b/data/maps/objects/Route22.asm
@@ -0,0 +1,14 @@
+Route22_Object:
+ db $2c ; border block
+
+ def_warps
+ warp 8, 5, 0, ROUTE_22_GATE
+
+ def_signs
+ sign 7, 11, 3 ; Route22FrontGateText
+
+ def_objects
+ object SPRITE_BLUE, 25, 5, STAY, NONE, 1 ; person
+ object SPRITE_BLUE, 25, 5, STAY, NONE, 2 ; person
+
+ def_warps_to ROUTE_22
diff --git a/data/maps/objects/Route22Gate.asm b/data/maps/objects/Route22Gate.asm
new file mode 100755
index 00000000..53944c52
--- /dev/null
+++ b/data/maps/objects/Route22Gate.asm
@@ -0,0 +1,15 @@
+Route22Gate_Object:
+ db $a ; border block
+
+ def_warps
+ warp 4, 7, 0, LAST_MAP
+ warp 5, 7, 0, LAST_MAP
+ warp 4, 0, 0, LAST_MAP
+ warp 5, 0, 0, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_GUARD, 6, 2, STAY, LEFT, 1 ; person
+
+ def_warps_to ROUTE_22_GATE
diff --git a/data/maps/objects/Route23.asm b/data/maps/objects/Route23.asm
new file mode 100755
index 00000000..bd74afb4
--- /dev/null
+++ b/data/maps/objects/Route23.asm
@@ -0,0 +1,22 @@
+Route23_Object:
+ db $f ; border block
+
+ def_warps
+ warp 7, 139, 2, ROUTE_22_GATE
+ warp 8, 139, 3, ROUTE_22_GATE
+ warp 4, 31, 0, VICTORY_ROAD_1F
+ warp 14, 31, 1, VICTORY_ROAD_2F
+
+ def_signs
+ sign 3, 33, 8 ; Route23Text8
+
+ def_objects
+ object SPRITE_GUARD, 4, 35, STAY, DOWN, 1 ; person
+ object SPRITE_GUARD, 10, 56, STAY, DOWN, 2 ; person
+ object SPRITE_SWIMMER, 8, 85, STAY, DOWN, 3 ; person
+ object SPRITE_SWIMMER, 11, 96, STAY, DOWN, 4 ; person
+ object SPRITE_GUARD, 12, 105, STAY, DOWN, 5 ; person
+ object SPRITE_GUARD, 8, 119, STAY, DOWN, 6 ; person
+ object SPRITE_GUARD, 8, 136, STAY, DOWN, 7 ; person
+
+ def_warps_to ROUTE_23
diff --git a/data/maps/objects/Route24.asm b/data/maps/objects/Route24.asm
new file mode 100755
index 00000000..b3cf1298
--- /dev/null
+++ b/data/maps/objects/Route24.asm
@@ -0,0 +1,19 @@
+Route24_Object:
+ db $2c ; border block
+
+ def_warps
+
+ def_signs
+
+ def_objects
+ object SPRITE_COOLTRAINER_M, 11, 15, STAY, LEFT, 1, OPP_ROCKET, 6
+ object SPRITE_COOLTRAINER_M, 5, 20, STAY, UP, 2, OPP_JR_TRAINER_M, 2
+ object SPRITE_COOLTRAINER_M, 11, 19, STAY, LEFT, 3, OPP_JR_TRAINER_M, 3
+ object SPRITE_COOLTRAINER_F, 10, 22, STAY, RIGHT, 4, OPP_LASS, 7
+ object SPRITE_YOUNGSTER, 11, 25, STAY, LEFT, 5, OPP_YOUNGSTER, 4
+ object SPRITE_COOLTRAINER_F, 10, 28, STAY, RIGHT, 6, OPP_LASS, 8
+ object SPRITE_YOUNGSTER, 11, 31, STAY, LEFT, 7, OPP_BUG_CATCHER, 9
+ object SPRITE_POKE_BALL, 10, 5, STAY, NONE, 8, TM_THUNDER_WAVE
+ object SPRITE_COOLTRAINER_M, 6, 5, STAY, DOWN, 9
+
+ def_warps_to ROUTE_24
diff --git a/data/maps/objects/Route25.asm b/data/maps/objects/Route25.asm
new file mode 100755
index 00000000..4f0be4d4
--- /dev/null
+++ b/data/maps/objects/Route25.asm
@@ -0,0 +1,22 @@
+Route25_Object:
+ db $2c ; border block
+
+ def_warps
+ warp 45, 3, 0, BILLS_HOUSE
+
+ def_signs
+ sign 43, 3, 11 ; Route25Text11
+
+ def_objects
+ object SPRITE_YOUNGSTER, 14, 2, STAY, DOWN, 1, OPP_YOUNGSTER, 5
+ object SPRITE_YOUNGSTER, 18, 5, STAY, UP, 2, OPP_YOUNGSTER, 6
+ object SPRITE_COOLTRAINER_M, 24, 4, STAY, DOWN, 3, OPP_JR_TRAINER_M, 2
+ object SPRITE_COOLTRAINER_F, 18, 8, STAY, RIGHT, 4, OPP_LASS, 9
+ object SPRITE_YOUNGSTER, 32, 3, STAY, LEFT, 5, OPP_YOUNGSTER, 7
+ object SPRITE_COOLTRAINER_F, 37, 4, STAY, DOWN, 6, OPP_LASS, 10
+ object SPRITE_HIKER, 8, 4, STAY, RIGHT, 7, OPP_HIKER, 2
+ object SPRITE_HIKER, 23, 9, STAY, UP, 8, OPP_HIKER, 3
+ object SPRITE_HIKER, 13, 7, STAY, RIGHT, 9, OPP_HIKER, 4
+ object SPRITE_POKE_BALL, 22, 2, STAY, NONE, 10, TM_SEISMIC_TOSS
+
+ def_warps_to ROUTE_25
diff --git a/data/maps/objects/Route2Gate.asm b/data/maps/objects/Route2Gate.asm
new file mode 100755
index 00000000..3151ce79
--- /dev/null
+++ b/data/maps/objects/Route2Gate.asm
@@ -0,0 +1,16 @@
+Route2Gate_Object:
+ db $a ; border block
+
+ def_warps
+ warp 4, 0, 3, LAST_MAP
+ warp 5, 0, 3, LAST_MAP
+ warp 4, 7, 4, LAST_MAP
+ warp 5, 7, 4, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_SCIENTIST, 1, 4, STAY, LEFT, 1 ; person
+ object SPRITE_YOUNGSTER, 5, 4, WALK, LEFT_RIGHT, 2 ; person
+
+ def_warps_to ROUTE_2_GATE
diff --git a/data/maps/objects/Route2TradeHouse.asm b/data/maps/objects/Route2TradeHouse.asm
new file mode 100755
index 00000000..d14df485
--- /dev/null
+++ b/data/maps/objects/Route2TradeHouse.asm
@@ -0,0 +1,14 @@
+Route2TradeHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 2, LAST_MAP
+ warp 3, 7, 2, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_SCIENTIST, 2, 4, STAY, RIGHT, 1 ; person
+ object SPRITE_GAMEBOY_KID, 4, 1, STAY, DOWN, 2 ; person
+
+ def_warps_to ROUTE_2_TRADE_HOUSE
diff --git a/data/maps/objects/Route3.asm b/data/maps/objects/Route3.asm
new file mode 100755
index 00000000..153fa795
--- /dev/null
+++ b/data/maps/objects/Route3.asm
@@ -0,0 +1,20 @@
+Route3_Object:
+ db $2c ; border block
+
+ def_warps
+
+ def_signs
+ sign 59, 9, 10 ; Route3Text10
+
+ def_objects
+ object SPRITE_SUPER_NERD, 57, 11, STAY, NONE, 1 ; person
+ object SPRITE_YOUNGSTER, 10, 6, STAY, RIGHT, 2, OPP_BUG_CATCHER, 4
+ object SPRITE_YOUNGSTER, 14, 4, STAY, DOWN, 3, OPP_YOUNGSTER, 1
+ object SPRITE_COOLTRAINER_F, 16, 9, STAY, LEFT, 4, OPP_LASS, 1
+ object SPRITE_YOUNGSTER, 19, 5, STAY, DOWN, 5, OPP_BUG_CATCHER, 5
+ object SPRITE_COOLTRAINER_F, 23, 4, STAY, LEFT, 6, OPP_LASS, 2
+ object SPRITE_YOUNGSTER, 22, 9, STAY, LEFT, 7, OPP_YOUNGSTER, 2
+ object SPRITE_YOUNGSTER, 24, 6, STAY, RIGHT, 8, OPP_BUG_CATCHER, 6
+ object SPRITE_COOLTRAINER_F, 33, 10, STAY, UP, 9, OPP_LASS, 3
+
+ def_warps_to ROUTE_3
diff --git a/data/maps/objects/Route4.asm b/data/maps/objects/Route4.asm
new file mode 100755
index 00000000..79e79b79
--- /dev/null
+++ b/data/maps/objects/Route4.asm
@@ -0,0 +1,19 @@
+Route4_Object:
+ db $2c ; border block
+
+ def_warps
+ warp 11, 5, 0, MT_MOON_POKECENTER
+ warp 18, 5, 0, MT_MOON_1F
+ warp 24, 5, 7, MT_MOON_B1F
+
+ def_signs
+ sign 12, 5, 4 ; PokeCenterSignText
+ sign 17, 7, 5 ; Route4Text5
+ sign 27, 7, 6 ; Route4Text6
+
+ def_objects
+ object SPRITE_COOLTRAINER_F, 9, 8, WALK, ANY_DIR, 1 ; person
+ object SPRITE_COOLTRAINER_F, 63, 3, STAY, RIGHT, 2, OPP_LASS, 4
+ object SPRITE_POKE_BALL, 57, 3, STAY, NONE, 3, TM_WHIRLWIND
+
+ def_warps_to ROUTE_4
diff --git a/data/maps/objects/Route5.asm b/data/maps/objects/Route5.asm
new file mode 100755
index 00000000..98f76683
--- /dev/null
+++ b/data/maps/objects/Route5.asm
@@ -0,0 +1,16 @@
+Route5_Object:
+ db $a ; border block
+
+ def_warps
+ warp 10, 29, 2, ROUTE_5_GATE
+ warp 9, 29, 2, ROUTE_5_GATE
+ warp 10, 33, 0, ROUTE_5_GATE
+ warp 17, 27, 0, UNDERGROUND_PATH_ROUTE_5
+ warp 10, 21, 0, DAYCARE
+
+ def_signs
+ sign 17, 29, 1 ; Route5Text1
+
+ def_objects
+
+ def_warps_to ROUTE_5
diff --git a/data/maps/objects/Route5Gate.asm b/data/maps/objects/Route5Gate.asm
new file mode 100755
index 00000000..81c8c43e
--- /dev/null
+++ b/data/maps/objects/Route5Gate.asm
@@ -0,0 +1,15 @@
+Route5Gate_Object:
+ db $a ; border block
+
+ def_warps
+ warp 3, 5, 2, LAST_MAP
+ warp 4, 5, 2, LAST_MAP
+ warp 3, 0, 1, LAST_MAP
+ warp 4, 0, 0, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_GUARD, 1, 3, STAY, RIGHT, 1 ; person
+
+ def_warps_to ROUTE_5_GATE
diff --git a/data/maps/objects/Route6.asm b/data/maps/objects/Route6.asm
new file mode 100755
index 00000000..f18c66f5
--- /dev/null
+++ b/data/maps/objects/Route6.asm
@@ -0,0 +1,21 @@
+Route6_Object:
+ db $f ; border block
+
+ def_warps
+ warp 9, 1, 2, ROUTE_6_GATE
+ warp 10, 1, 2, ROUTE_6_GATE
+ warp 10, 7, 0, ROUTE_6_GATE
+ warp 17, 13, 0, UNDERGROUND_PATH_ROUTE_6
+
+ def_signs
+ sign 19, 15, 7 ; Route6Text7
+
+ def_objects
+ object SPRITE_COOLTRAINER_M, 10, 21, STAY, RIGHT, 1, OPP_JR_TRAINER_M, 10
+ object SPRITE_COOLTRAINER_F, 11, 21, STAY, LEFT, 2, OPP_JR_TRAINER_F, 25
+ object SPRITE_YOUNGSTER, 0, 15, STAY, RIGHT, 3, OPP_BUG_CATCHER, 10
+ object SPRITE_COOLTRAINER_M, 11, 31, STAY, LEFT, 4, OPP_JR_TRAINER_M, 5
+ object SPRITE_COOLTRAINER_F, 11, 30, STAY, LEFT, 5, OPP_JR_TRAINER_F, 3
+ object SPRITE_YOUNGSTER, 19, 26, STAY, LEFT, 6, OPP_BUG_CATCHER, 11
+
+ def_warps_to ROUTE_6
diff --git a/data/maps/objects/Route6Gate.asm b/data/maps/objects/Route6Gate.asm
new file mode 100755
index 00000000..2ef5a8b5
--- /dev/null
+++ b/data/maps/objects/Route6Gate.asm
@@ -0,0 +1,15 @@
+Route6Gate_Object:
+ db $a ; border block
+
+ def_warps
+ warp 3, 5, 2, LAST_MAP
+ warp 4, 5, 2, LAST_MAP
+ warp 3, 0, 1, LAST_MAP
+ warp 4, 0, 1, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_GUARD, 6, 2, STAY, LEFT, 1 ; person
+
+ def_warps_to ROUTE_6_GATE
diff --git a/data/maps/objects/Route7.asm b/data/maps/objects/Route7.asm
new file mode 100755
index 00000000..64b0387f
--- /dev/null
+++ b/data/maps/objects/Route7.asm
@@ -0,0 +1,16 @@
+Route7_Object:
+ db $f ; border block
+
+ def_warps
+ warp 18, 9, 2, ROUTE_7_GATE
+ warp 18, 10, 2, ROUTE_7_GATE
+ warp 11, 9, 0, ROUTE_7_GATE
+ warp 11, 10, 0, ROUTE_7_GATE
+ warp 5, 13, 0, UNDERGROUND_PATH_ROUTE_7
+
+ def_signs
+ sign 3, 13, 1 ; Route7Text1
+
+ def_objects
+
+ def_warps_to ROUTE_7
diff --git a/data/maps/objects/Route7Gate.asm b/data/maps/objects/Route7Gate.asm
new file mode 100755
index 00000000..85064914
--- /dev/null
+++ b/data/maps/objects/Route7Gate.asm
@@ -0,0 +1,15 @@
+Route7Gate_Object:
+ db $a ; border block
+
+ def_warps
+ warp 0, 3, 3, LAST_MAP
+ warp 0, 4, 3, LAST_MAP
+ warp 5, 3, 1, LAST_MAP
+ warp 5, 4, 1, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_GUARD, 3, 1, STAY, DOWN, 1 ; person
+
+ def_warps_to ROUTE_7_GATE
diff --git a/data/maps/objects/Route8.asm b/data/maps/objects/Route8.asm
new file mode 100755
index 00000000..aaa69ea2
--- /dev/null
+++ b/data/maps/objects/Route8.asm
@@ -0,0 +1,25 @@
+Route8_Object:
+ db $2c ; border block
+
+ def_warps
+ warp 1, 9, 0, ROUTE_8_GATE
+ warp 1, 10, 0, ROUTE_8_GATE
+ warp 8, 9, 2, ROUTE_8_GATE
+ warp 8, 10, 2, ROUTE_8_GATE
+ warp 13, 3, 0, UNDERGROUND_PATH_ROUTE_8
+
+ def_signs
+ sign 17, 3, 10 ; Route8Text10
+
+ def_objects
+ object SPRITE_SUPER_NERD, 8, 5, STAY, RIGHT, 1, OPP_SUPER_NERD, 3
+ object SPRITE_GAMBLER, 13, 9, STAY, UP, 2, OPP_GAMBLER, 5
+ object SPRITE_SUPER_NERD, 42, 6, STAY, UP, 3, OPP_SUPER_NERD, 4
+ object SPRITE_COOLTRAINER_F, 26, 3, STAY, LEFT, 4, OPP_LASS, 13
+ object SPRITE_SUPER_NERD, 26, 4, STAY, RIGHT, 5, OPP_SUPER_NERD, 5
+ object SPRITE_COOLTRAINER_F, 26, 5, STAY, LEFT, 6, OPP_LASS, 14
+ object SPRITE_COOLTRAINER_F, 26, 6, STAY, RIGHT, 7, OPP_LASS, 15
+ object SPRITE_GAMBLER, 46, 13, STAY, DOWN, 8, OPP_GAMBLER, 7
+ object SPRITE_COOLTRAINER_F, 51, 12, STAY, LEFT, 9, OPP_LASS, 16
+
+ def_warps_to ROUTE_8
diff --git a/data/maps/objects/Route8Gate.asm b/data/maps/objects/Route8Gate.asm
new file mode 100755
index 00000000..64b935da
--- /dev/null
+++ b/data/maps/objects/Route8Gate.asm
@@ -0,0 +1,15 @@
+Route8Gate_Object:
+ db $a ; border block
+
+ def_warps
+ warp 0, 3, 1, LAST_MAP
+ warp 0, 4, 1, LAST_MAP
+ warp 5, 3, 3, LAST_MAP
+ warp 5, 4, 3, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_GUARD, 2, 1, STAY, DOWN, 1 ; person
+
+ def_warps_to ROUTE_8_GATE
diff --git a/data/maps/objects/Route9.asm b/data/maps/objects/Route9.asm
new file mode 100755
index 00000000..f67f337b
--- /dev/null
+++ b/data/maps/objects/Route9.asm
@@ -0,0 +1,21 @@
+Route9_Object:
+ db $2c ; border block
+
+ def_warps
+
+ def_signs
+ sign 25, 7, 11 ; Route9Text11
+
+ def_objects
+ object SPRITE_COOLTRAINER_F, 13, 10, STAY, LEFT, 1, OPP_JR_TRAINER_F, 5
+ object SPRITE_COOLTRAINER_M, 24, 7, STAY, LEFT, 2, OPP_YOUNGSTER, 14
+ object SPRITE_COOLTRAINER_M, 31, 7, STAY, RIGHT, 3, OPP_JR_TRAINER_M, 8
+ object SPRITE_COOLTRAINER_F, 48, 8, STAY, RIGHT, 4, OPP_JR_TRAINER_F, 6
+ object SPRITE_HIKER, 16, 15, STAY, LEFT, 5, OPP_HIKER, 11
+ object SPRITE_HIKER, 43, 3, STAY, LEFT, 6, OPP_HIKER, 6
+ object SPRITE_YOUNGSTER, 22, 2, STAY, DOWN, 7, OPP_BUG_CATCHER, 13
+ object SPRITE_HIKER, 45, 15, STAY, RIGHT, 8, OPP_HIKER, 5
+ object SPRITE_YOUNGSTER, 40, 8, STAY, RIGHT, 9, OPP_BUG_CATCHER, 14
+ object SPRITE_POKE_BALL, 10, 15, STAY, NONE, 10, TM_TELEPORT
+
+ def_warps_to ROUTE_9
diff --git a/data/maps/objects/SSAnne1F.asm b/data/maps/objects/SSAnne1F.asm
new file mode 100755
index 00000000..bf4e7292
--- /dev/null
+++ b/data/maps/objects/SSAnne1F.asm
@@ -0,0 +1,23 @@
+SSAnne1F_Object:
+ db $c ; border block
+
+ def_warps
+ warp 26, 0, 1, VERMILION_DOCK
+ warp 27, 0, 1, VERMILION_DOCK
+ warp 31, 8, 0, SS_ANNE_1F_ROOMS
+ warp 23, 8, 1, SS_ANNE_1F_ROOMS
+ warp 19, 8, 2, SS_ANNE_1F_ROOMS
+ warp 15, 8, 3, SS_ANNE_1F_ROOMS
+ warp 11, 8, 4, SS_ANNE_1F_ROOMS
+ warp 7, 8, 5, SS_ANNE_1F_ROOMS
+ warp 2, 6, 6, SS_ANNE_2F
+ warp 37, 15, 5, SS_ANNE_B1F
+ warp 3, 16, 0, SS_ANNE_KITCHEN
+
+ def_signs
+
+ def_objects
+ object SPRITE_WAITER, 12, 6, WALK, LEFT_RIGHT, 1 ; person
+ object SPRITE_SAILOR, 27, 5, STAY, NONE, 2 ; person
+
+ def_warps_to SS_ANNE_1F
diff --git a/data/maps/objects/SSAnne1FRooms.asm b/data/maps/objects/SSAnne1FRooms.asm
new file mode 100755
index 00000000..afb30af4
--- /dev/null
+++ b/data/maps/objects/SSAnne1FRooms.asm
@@ -0,0 +1,27 @@
+SSAnne1FRooms_Object:
+ db $c ; border block
+
+ def_warps
+ warp 0, 0, 2, SS_ANNE_1F
+ warp 10, 0, 3, SS_ANNE_1F
+ warp 20, 0, 4, SS_ANNE_1F
+ warp 0, 10, 5, SS_ANNE_1F
+ warp 10, 10, 6, SS_ANNE_1F
+ warp 20, 10, 7, SS_ANNE_1F
+
+ def_signs
+
+ def_objects
+ object SPRITE_GENTLEMAN, 2, 3, STAY, LEFT, 1, OPP_GENTLEMAN, 1
+ object SPRITE_GENTLEMAN, 11, 4, STAY, UP, 2, OPP_GENTLEMAN, 2
+ object SPRITE_YOUNGSTER, 11, 14, STAY, UP, 3, OPP_YOUNGSTER, 8
+ object SPRITE_COOLTRAINER_F, 13, 11, STAY, LEFT, 4, OPP_LASS, 11
+ object SPRITE_GIRL, 22, 3, WALK, UP_DOWN, 5 ; person
+ object SPRITE_MIDDLE_AGED_MAN, 0, 14, STAY, NONE, 6 ; person
+ object SPRITE_LITTLE_GIRL, 2, 11, STAY, DOWN, 7 ; person
+ object SPRITE_JIGGLYPUFF, 3, 11, STAY, DOWN, 8 ; person
+ object SPRITE_GIRL, 10, 13, STAY, RIGHT, 9 ; person
+ object SPRITE_POKE_BALL, 12, 15, STAY, NONE, 10, TM_BODY_SLAM
+ object SPRITE_GENTLEMAN, 21, 13, WALK, LEFT_RIGHT, 11 ; person
+
+ def_warps_to SS_ANNE_1F_ROOMS
diff --git a/data/maps/objects/SSAnne2F.asm b/data/maps/objects/SSAnne2F.asm
new file mode 100755
index 00000000..dda0fee6
--- /dev/null
+++ b/data/maps/objects/SSAnne2F.asm
@@ -0,0 +1,21 @@
+SSAnne2F_Object:
+ db $c ; border block
+
+ def_warps
+ warp 9, 11, 0, SS_ANNE_2F_ROOMS
+ warp 13, 11, 2, SS_ANNE_2F_ROOMS
+ warp 17, 11, 4, SS_ANNE_2F_ROOMS
+ warp 21, 11, 6, SS_ANNE_2F_ROOMS
+ warp 25, 11, 8, SS_ANNE_2F_ROOMS
+ warp 29, 11, 10, SS_ANNE_2F_ROOMS
+ warp 2, 4, 8, SS_ANNE_1F
+ warp 2, 12, 1, SS_ANNE_3F
+ warp 36, 4, 0, SS_ANNE_CAPTAINS_ROOM
+
+ def_signs
+
+ def_objects
+ object SPRITE_WAITER, 3, 7, WALK, UP_DOWN, 1 ; person
+ object SPRITE_BLUE, 36, 4, STAY, DOWN, 2, OPP_RIVAL1, 1
+
+ def_warps_to SS_ANNE_2F
diff --git a/data/maps/objects/SSAnne2FRooms.asm b/data/maps/objects/SSAnne2FRooms.asm
new file mode 100755
index 00000000..78a2dd38
--- /dev/null
+++ b/data/maps/objects/SSAnne2FRooms.asm
@@ -0,0 +1,35 @@
+SSAnne2FRooms_Object:
+ db $c ; border block
+
+ def_warps
+ warp 2, 5, 0, SS_ANNE_2F
+ warp 3, 5, 0, SS_ANNE_2F
+ warp 12, 5, 1, SS_ANNE_2F
+ warp 13, 5, 1, SS_ANNE_2F
+ warp 22, 5, 2, SS_ANNE_2F
+ warp 23, 5, 2, SS_ANNE_2F
+ warp 2, 15, 3, SS_ANNE_2F
+ warp 3, 15, 3, SS_ANNE_2F
+ warp 12, 15, 4, SS_ANNE_2F
+ warp 13, 15, 4, SS_ANNE_2F
+ warp 22, 15, 5, SS_ANNE_2F
+ warp 23, 15, 5, SS_ANNE_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_GENTLEMAN, 10, 2, STAY, RIGHT, 1, OPP_GENTLEMAN, 3
+ object SPRITE_FISHER, 13, 4, STAY, LEFT, 2, OPP_FISHER, 1
+ object SPRITE_GENTLEMAN, 0, 14, STAY, RIGHT, 3, OPP_GENTLEMAN, 5
+ object SPRITE_COOLTRAINER_F, 2, 11, STAY, DOWN, 4, OPP_LASS, 12
+ object SPRITE_GENTLEMAN, 1, 2, STAY, DOWN, 5 ; person
+ object SPRITE_POKE_BALL, 12, 1, STAY, NONE, 6, MAX_ETHER
+ object SPRITE_GENTLEMAN, 21, 2, STAY, DOWN, 7 ; person
+ object SPRITE_GRAMPS, 22, 1, STAY, DOWN, 8 ; person
+ object SPRITE_POKE_BALL, 0, 12, STAY, NONE, 9, RARE_CANDY
+ object SPRITE_GENTLEMAN, 12, 12, STAY, DOWN, 10 ; person
+ object SPRITE_LITTLE_BOY, 11, 14, STAY, NONE, 11 ; person
+ object SPRITE_BRUNETTE_GIRL, 22, 12, STAY, LEFT, 12 ; person
+ object SPRITE_BEAUTY, 20, 12, STAY, RIGHT, 13 ; person
+
+ def_warps_to SS_ANNE_2F_ROOMS
diff --git a/data/maps/objects/SSAnne3F.asm b/data/maps/objects/SSAnne3F.asm
new file mode 100755
index 00000000..f230aeb9
--- /dev/null
+++ b/data/maps/objects/SSAnne3F.asm
@@ -0,0 +1,13 @@
+SSAnne3F_Object:
+ db $c ; border block
+
+ def_warps
+ warp 0, 3, 0, SS_ANNE_BOW
+ warp 19, 3, 7, SS_ANNE_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SAILOR, 9, 3, WALK, LEFT_RIGHT, 1 ; person
+
+ def_warps_to SS_ANNE_3F
diff --git a/data/maps/objects/SSAnneB1F.asm b/data/maps/objects/SSAnneB1F.asm
new file mode 100755
index 00000000..619dd33c
--- /dev/null
+++ b/data/maps/objects/SSAnneB1F.asm
@@ -0,0 +1,16 @@
+SSAnneB1F_Object:
+ db $c ; border block
+
+ def_warps
+ warp 23, 3, 8, SS_ANNE_B1F_ROOMS
+ warp 19, 3, 6, SS_ANNE_B1F_ROOMS
+ warp 15, 3, 4, SS_ANNE_B1F_ROOMS
+ warp 11, 3, 2, SS_ANNE_B1F_ROOMS
+ warp 7, 3, 0, SS_ANNE_B1F_ROOMS
+ warp 27, 5, 9, SS_ANNE_1F
+
+ def_signs
+
+ def_objects
+
+ def_warps_to SS_ANNE_B1F
diff --git a/data/maps/objects/SSAnneB1FRooms.asm b/data/maps/objects/SSAnneB1FRooms.asm
new file mode 100755
index 00000000..c7540482
--- /dev/null
+++ b/data/maps/objects/SSAnneB1FRooms.asm
@@ -0,0 +1,31 @@
+SSAnneB1FRooms_Object:
+ db $c ; border block
+
+ def_warps
+ warp 2, 5, 4, SS_ANNE_B1F
+ warp 3, 5, 4, SS_ANNE_B1F
+ warp 12, 5, 3, SS_ANNE_B1F
+ warp 13, 5, 3, SS_ANNE_B1F
+ warp 22, 5, 2, SS_ANNE_B1F
+ warp 23, 5, 2, SS_ANNE_B1F
+ warp 2, 15, 1, SS_ANNE_B1F
+ warp 3, 15, 1, SS_ANNE_B1F
+ warp 12, 15, 0, SS_ANNE_B1F
+ warp 13, 15, 0, SS_ANNE_B1F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SAILOR, 0, 13, STAY, DOWN, 1, OPP_SAILOR, 3
+ object SPRITE_SAILOR, 2, 11, STAY, DOWN, 2, OPP_SAILOR, 4
+ object SPRITE_SAILOR, 12, 3, STAY, LEFT, 3, OPP_SAILOR, 5
+ object SPRITE_SAILOR, 22, 2, STAY, DOWN, 4, OPP_SAILOR, 6
+ object SPRITE_SAILOR, 0, 2, STAY, RIGHT, 5, OPP_SAILOR, 7
+ object SPRITE_FISHER, 0, 4, STAY, RIGHT, 6, OPP_FISHER, 2
+ object SPRITE_SUPER_NERD, 10, 13, STAY, RIGHT, 7 ; person
+ object SPRITE_MONSTER, 11, 12, STAY, NONE, 8 ; person
+ object SPRITE_POKE_BALL, 20, 2, STAY, NONE, 9, ETHER
+ object SPRITE_POKE_BALL, 10, 2, STAY, NONE, 10, TM_REST
+ object SPRITE_POKE_BALL, 12, 11, STAY, NONE, 11, MAX_POTION
+
+ def_warps_to SS_ANNE_B1F_ROOMS
diff --git a/data/maps/objects/SSAnneBow.asm b/data/maps/objects/SSAnneBow.asm
new file mode 100755
index 00000000..080fe623
--- /dev/null
+++ b/data/maps/objects/SSAnneBow.asm
@@ -0,0 +1,17 @@
+SSAnneBow_Object:
+ db $23 ; border block
+
+ def_warps
+ warp 13, 6, 0, SS_ANNE_3F
+ warp 13, 7, 0, SS_ANNE_3F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SUPER_NERD, 5, 2, STAY, UP, 1 ; person
+ object SPRITE_SAILOR, 4, 9, STAY, NONE, 2 ; person
+ object SPRITE_COOLTRAINER_M, 7, 11, STAY, NONE, 3 ; person
+ object SPRITE_SAILOR, 4, 4, STAY, DOWN, 4, OPP_SAILOR, 1
+ object SPRITE_SAILOR, 10, 8, STAY, UP, 5, OPP_SAILOR, 2
+
+ def_warps_to SS_ANNE_BOW
diff --git a/data/maps/objects/SSAnneCaptainsRoom.asm b/data/maps/objects/SSAnneCaptainsRoom.asm
new file mode 100755
index 00000000..c07be59e
--- /dev/null
+++ b/data/maps/objects/SSAnneCaptainsRoom.asm
@@ -0,0 +1,14 @@
+SSAnneCaptainsRoom_Object:
+ db $c ; border block
+
+ def_warps
+ warp 0, 7, 8, SS_ANNE_2F
+
+ def_signs
+ sign 4, 1, 2 ; SSAnne7Text2
+ sign 1, 2, 3 ; SSAnne7Text3
+
+ def_objects
+ object SPRITE_CAPTAIN, 4, 2, STAY, UP, 1 ; person
+
+ def_warps_to SS_ANNE_CAPTAINS_ROOM
diff --git a/data/maps/objects/SSAnneKitchen.asm b/data/maps/objects/SSAnneKitchen.asm
new file mode 100755
index 00000000..75fc497f
--- /dev/null
+++ b/data/maps/objects/SSAnneKitchen.asm
@@ -0,0 +1,18 @@
+SSAnneKitchen_Object:
+ db $c ; border block
+
+ def_warps
+ warp 6, 0, 10, SS_ANNE_1F
+
+ def_signs
+
+ def_objects
+ object SPRITE_COOK, 1, 8, WALK, UP_DOWN, 1 ; person
+ object SPRITE_COOK, 5, 8, WALK, UP_DOWN, 2 ; person
+ object SPRITE_COOK, 9, 7, WALK, UP_DOWN, 3 ; person
+ object SPRITE_COOK, 13, 6, STAY, NONE, 4 ; person
+ object SPRITE_COOK, 13, 8, STAY, NONE, 5 ; person
+ object SPRITE_COOK, 13, 10, STAY, NONE, 6 ; person
+ object SPRITE_COOK, 11, 13, STAY, UP, 7 ; person
+
+ def_warps_to SS_ANNE_KITCHEN
diff --git a/data/maps/objects/SafariZoneCenter.asm b/data/maps/objects/SafariZoneCenter.asm
new file mode 100755
index 00000000..59f4e2a4
--- /dev/null
+++ b/data/maps/objects/SafariZoneCenter.asm
@@ -0,0 +1,22 @@
+SafariZoneCenter_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 14, 25, 2, SAFARI_ZONE_GATE
+ warp 15, 25, 3, SAFARI_ZONE_GATE
+ warp 0, 10, 4, SAFARI_ZONE_WEST
+ warp 0, 11, 5, SAFARI_ZONE_WEST
+ warp 14, 0, 4, SAFARI_ZONE_NORTH
+ warp 15, 0, 5, SAFARI_ZONE_NORTH
+ warp 29, 10, 2, SAFARI_ZONE_EAST
+ warp 29, 11, 3, SAFARI_ZONE_EAST
+ warp 17, 19, 0, SAFARI_ZONE_CENTER_REST_HOUSE
+
+ def_signs
+ sign 18, 20, 2 ; SafariZoneCenterText2
+ sign 14, 22, 3 ; SafariZoneCenterText3
+
+ def_objects
+ object SPRITE_POKE_BALL, 14, 10, STAY, NONE, 1, NUGGET
+
+ def_warps_to SAFARI_ZONE_CENTER
diff --git a/data/maps/objects/SafariZoneCenterRestHouse.asm b/data/maps/objects/SafariZoneCenterRestHouse.asm
new file mode 100755
index 00000000..5b256347
--- /dev/null
+++ b/data/maps/objects/SafariZoneCenterRestHouse.asm
@@ -0,0 +1,14 @@
+SafariZoneCenterRestHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 8, SAFARI_ZONE_CENTER
+ warp 3, 7, 8, SAFARI_ZONE_CENTER
+
+ def_signs
+
+ def_objects
+ object SPRITE_GIRL, 3, 2, STAY, DOWN, 1 ; person
+ object SPRITE_SCIENTIST, 1, 4, WALK, UP_DOWN, 2 ; person
+
+ def_warps_to SAFARI_ZONE_CENTER_REST_HOUSE
diff --git a/data/maps/objects/SafariZoneEast.asm b/data/maps/objects/SafariZoneEast.asm
new file mode 100755
index 00000000..999c51b0
--- /dev/null
+++ b/data/maps/objects/SafariZoneEast.asm
@@ -0,0 +1,22 @@
+SafariZoneEast_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 0, 4, 6, SAFARI_ZONE_NORTH
+ warp 0, 5, 7, SAFARI_ZONE_NORTH
+ warp 0, 22, 6, SAFARI_ZONE_CENTER
+ warp 0, 23, 6, SAFARI_ZONE_CENTER
+ warp 25, 9, 0, SAFARI_ZONE_EAST_REST_HOUSE
+
+ def_signs
+ sign 26, 10, 5 ; SafariZoneEastText5
+ sign 6, 4, 6 ; SafariZoneEastText6
+ sign 5, 23, 7 ; SafariZoneEastText7
+
+ def_objects
+ object SPRITE_POKE_BALL, 21, 10, STAY, NONE, 1, FULL_RESTORE
+ object SPRITE_POKE_BALL, 3, 7, STAY, NONE, 2, MAX_POTION
+ object SPRITE_POKE_BALL, 20, 13, STAY, NONE, 3, CARBOS
+ object SPRITE_POKE_BALL, 15, 12, STAY, NONE, 4, TM_EGG_BOMB
+
+ def_warps_to SAFARI_ZONE_EAST
diff --git a/data/maps/objects/SafariZoneEastRestHouse.asm b/data/maps/objects/SafariZoneEastRestHouse.asm
new file mode 100755
index 00000000..31940542
--- /dev/null
+++ b/data/maps/objects/SafariZoneEastRestHouse.asm
@@ -0,0 +1,15 @@
+SafariZoneEastRestHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 4, SAFARI_ZONE_EAST
+ warp 3, 7, 4, SAFARI_ZONE_EAST
+
+ def_signs
+
+ def_objects
+ object SPRITE_SCIENTIST, 1, 3, WALK, UP_DOWN, 1 ; person
+ object SPRITE_ROCKER, 4, 2, STAY, NONE, 2 ; person
+ object SPRITE_SILPH_WORKER, 5, 2, STAY, NONE, 3 ; person
+
+ def_warps_to SAFARI_ZONE_EAST_REST_HOUSE
diff --git a/data/maps/objects/SafariZoneGate.asm b/data/maps/objects/SafariZoneGate.asm
new file mode 100755
index 00000000..2423ae8a
--- /dev/null
+++ b/data/maps/objects/SafariZoneGate.asm
@@ -0,0 +1,16 @@
+SafariZoneGate_Object:
+ db $a ; border block
+
+ def_warps
+ warp 3, 5, 4, LAST_MAP
+ warp 4, 5, 4, LAST_MAP
+ warp 3, 0, 0, SAFARI_ZONE_CENTER
+ warp 4, 0, 1, SAFARI_ZONE_CENTER
+
+ def_signs
+
+ def_objects
+ object SPRITE_SAFARI_ZONE_WORKER, 6, 2, STAY, LEFT, 1 ; person
+ object SPRITE_SAFARI_ZONE_WORKER, 1, 4, STAY, RIGHT, 2 ; person
+
+ def_warps_to SAFARI_ZONE_GATE
diff --git a/data/maps/objects/SafariZoneNorth.asm b/data/maps/objects/SafariZoneNorth.asm
new file mode 100755
index 00000000..2094e742
--- /dev/null
+++ b/data/maps/objects/SafariZoneNorth.asm
@@ -0,0 +1,26 @@
+SafariZoneNorth_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 2, 35, 0, SAFARI_ZONE_WEST
+ warp 3, 35, 1, SAFARI_ZONE_WEST
+ warp 8, 35, 2, SAFARI_ZONE_WEST
+ warp 9, 35, 3, SAFARI_ZONE_WEST
+ warp 20, 35, 4, SAFARI_ZONE_CENTER
+ warp 21, 35, 5, SAFARI_ZONE_CENTER
+ warp 39, 30, 0, SAFARI_ZONE_EAST
+ warp 39, 31, 1, SAFARI_ZONE_EAST
+ warp 35, 3, 0, SAFARI_ZONE_NORTH_REST_HOUSE
+
+ def_signs
+ sign 36, 4, 3 ; SafariZoneNorthText3
+ sign 4, 25, 4 ; SafariZoneNorthText4
+ sign 13, 31, 5 ; SafariZoneNorthText5
+ sign 19, 33, 6 ; SafariZoneNorthText6
+ sign 26, 28, 7 ; SafariZoneNorthText7
+
+ def_objects
+ object SPRITE_POKE_BALL, 25, 1, STAY, NONE, 1, PROTEIN
+ object SPRITE_POKE_BALL, 19, 7, STAY, NONE, 2, TM_SKULL_BASH
+
+ def_warps_to SAFARI_ZONE_NORTH
diff --git a/data/maps/objects/SafariZoneNorthRestHouse.asm b/data/maps/objects/SafariZoneNorthRestHouse.asm
new file mode 100755
index 00000000..38087622
--- /dev/null
+++ b/data/maps/objects/SafariZoneNorthRestHouse.asm
@@ -0,0 +1,15 @@
+SafariZoneNorthRestHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 8, SAFARI_ZONE_NORTH
+ warp 3, 7, 8, SAFARI_ZONE_NORTH
+
+ def_signs
+
+ def_objects
+ object SPRITE_SCIENTIST, 6, 3, WALK, LEFT_RIGHT, 1 ; person
+ object SPRITE_SAFARI_ZONE_WORKER, 3, 4, STAY, NONE, 2 ; person
+ object SPRITE_GENTLEMAN, 1, 5, WALK, UP_DOWN, 3 ; person
+
+ def_warps_to SAFARI_ZONE_NORTH_REST_HOUSE
diff --git a/data/maps/objects/SafariZoneSecretHouse.asm b/data/maps/objects/SafariZoneSecretHouse.asm
new file mode 100755
index 00000000..1431d711
--- /dev/null
+++ b/data/maps/objects/SafariZoneSecretHouse.asm
@@ -0,0 +1,13 @@
+SafariZoneSecretHouse_Object:
+ db $17 ; border block
+
+ def_warps
+ warp 2, 7, 6, SAFARI_ZONE_WEST
+ warp 3, 7, 6, SAFARI_ZONE_WEST
+
+ def_signs
+
+ def_objects
+ object SPRITE_FISHING_GURU, 3, 3, STAY, DOWN, 1 ; person
+
+ def_warps_to SAFARI_ZONE_SECRET_HOUSE
diff --git a/data/maps/objects/SafariZoneWest.asm b/data/maps/objects/SafariZoneWest.asm
new file mode 100755
index 00000000..d53ee37b
--- /dev/null
+++ b/data/maps/objects/SafariZoneWest.asm
@@ -0,0 +1,26 @@
+SafariZoneWest_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 20, 0, 0, SAFARI_ZONE_NORTH
+ warp 21, 0, 1, SAFARI_ZONE_NORTH
+ warp 26, 0, 2, SAFARI_ZONE_NORTH
+ warp 27, 0, 3, SAFARI_ZONE_NORTH
+ warp 29, 22, 2, SAFARI_ZONE_CENTER
+ warp 29, 23, 3, SAFARI_ZONE_CENTER
+ warp 3, 3, 0, SAFARI_ZONE_SECRET_HOUSE
+ warp 11, 11, 0, SAFARI_ZONE_WEST_REST_HOUSE
+
+ def_signs
+ sign 12, 12, 5 ; SafariZoneWestText5
+ sign 17, 3, 6 ; SafariZoneWestText6
+ sign 26, 4, 7 ; SafariZoneWestText7
+ sign 24, 22, 8 ; SafariZoneWestText8
+
+ def_objects
+ object SPRITE_POKE_BALL, 8, 20, STAY, NONE, 1, MAX_POTION
+ object SPRITE_POKE_BALL, 9, 7, STAY, NONE, 2, TM_DOUBLE_TEAM
+ object SPRITE_POKE_BALL, 18, 18, STAY, NONE, 3, MAX_REVIVE
+ object SPRITE_POKE_BALL, 19, 7, STAY, NONE, 4, GOLD_TEETH
+
+ def_warps_to SAFARI_ZONE_WEST
diff --git a/data/maps/objects/SafariZoneWestRestHouse.asm b/data/maps/objects/SafariZoneWestRestHouse.asm
new file mode 100755
index 00000000..26bb481e
--- /dev/null
+++ b/data/maps/objects/SafariZoneWestRestHouse.asm
@@ -0,0 +1,15 @@
+SafariZoneWestRestHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 7, SAFARI_ZONE_WEST
+ warp 3, 7, 7, SAFARI_ZONE_WEST
+
+ def_signs
+
+ def_objects
+ object SPRITE_SCIENTIST, 4, 4, WALK, ANY_DIR, 1 ; person
+ object SPRITE_COOLTRAINER_M, 0, 2, STAY, RIGHT, 2 ; person
+ object SPRITE_ERIKA, 6, 2, STAY, DOWN, 3 ; person
+
+ def_warps_to SAFARI_ZONE_WEST_REST_HOUSE
diff --git a/data/maps/objects/SaffronCity.asm b/data/maps/objects/SaffronCity.asm
new file mode 100755
index 00000000..49f94706
--- /dev/null
+++ b/data/maps/objects/SaffronCity.asm
@@ -0,0 +1,42 @@
+SaffronCity_Object:
+ db $f ; border block
+
+ def_warps
+ warp 7, 5, 0, COPYCATS_HOUSE_1F
+ warp 26, 3, 0, FIGHTING_DOJO
+ warp 34, 3, 0, SAFFRON_GYM
+ warp 13, 11, 0, SAFFRON_PIDGEY_HOUSE
+ warp 25, 11, 0, SAFFRON_MART
+ warp 18, 21, 0, SILPH_CO_1F
+ warp 9, 29, 0, SAFFRON_POKECENTER
+ warp 29, 29, 0, MR_PSYCHICS_HOUSE
+
+ def_signs
+ sign 17, 5, 16 ; SaffronCityText16
+ sign 27, 5, 17 ; SaffronCityText17
+ sign 35, 5, 18 ; SaffronCityText18
+ sign 26, 11, 19 ; MartSignText
+ sign 39, 19, 20 ; SaffronCityText20
+ sign 5, 21, 21 ; SaffronCityText21
+ sign 15, 21, 22 ; SaffronCityText22
+ sign 10, 29, 23 ; PokeCenterSignText
+ sign 27, 29, 24 ; SaffronCityText24
+ sign 1, 19, 25 ; SaffronCityText25
+
+ def_objects
+ object SPRITE_ROCKET, 7, 6, STAY, NONE, 1 ; person
+ object SPRITE_ROCKET, 20, 8, WALK, LEFT_RIGHT, 2 ; person
+ object SPRITE_ROCKET, 34, 4, STAY, NONE, 3 ; person
+ object SPRITE_ROCKET, 13, 12, STAY, NONE, 4 ; person
+ object SPRITE_ROCKET, 11, 25, WALK, LEFT_RIGHT, 5 ; person
+ object SPRITE_ROCKET, 32, 13, WALK, LEFT_RIGHT, 6 ; person
+ object SPRITE_ROCKET, 18, 30, WALK, LEFT_RIGHT, 7 ; person
+ object SPRITE_SCIENTIST, 8, 14, WALK, ANY_DIR, 8 ; person
+ object SPRITE_SILPH_WORKER, 23, 23, STAY, NONE, 9 ; person
+ object SPRITE_ERIKA, 17, 30, WALK, LEFT_RIGHT, 10 ; person
+ object SPRITE_GENTLEMAN, 30, 12, STAY, DOWN, 11 ; person
+ object SPRITE_BIRD, 31, 12, STAY, DOWN, 12 ; person
+ object SPRITE_ROCKER, 18, 8, STAY, UP, 13 ; person
+ object SPRITE_ROCKET, 18, 22, STAY, DOWN, 14 ; person
+
+ def_warps_to SAFFRON_CITY
diff --git a/data/maps/objects/SaffronGym.asm b/data/maps/objects/SaffronGym.asm
new file mode 100755
index 00000000..8cec0421
--- /dev/null
+++ b/data/maps/objects/SaffronGym.asm
@@ -0,0 +1,51 @@
+SaffronGym_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 8, 17, 2, LAST_MAP
+ warp 9, 17, 2, LAST_MAP
+ warp 1, 3, 22, SAFFRON_GYM
+ warp 5, 3, 15, SAFFRON_GYM
+ warp 1, 5, 18, SAFFRON_GYM
+ warp 5, 5, 8, SAFFRON_GYM
+ warp 1, 9, 27, SAFFRON_GYM
+ warp 5, 9, 16, SAFFRON_GYM
+ warp 1, 11, 5, SAFFRON_GYM
+ warp 5, 11, 13, SAFFRON_GYM
+ warp 1, 15, 23, SAFFRON_GYM
+ warp 5, 15, 30, SAFFRON_GYM
+ warp 1, 17, 17, SAFFRON_GYM
+ warp 5, 17, 9, SAFFRON_GYM
+ warp 9, 3, 26, SAFFRON_GYM
+ warp 11, 3, 3, SAFFRON_GYM
+ warp 9, 5, 7, SAFFRON_GYM
+ warp 11, 5, 12, SAFFRON_GYM
+ warp 11, 11, 4, SAFFRON_GYM
+ warp 11, 15, 31, SAFFRON_GYM
+ warp 15, 3, 24, SAFFRON_GYM
+ warp 19, 3, 28, SAFFRON_GYM
+ warp 15, 5, 2, SAFFRON_GYM
+ warp 19, 5, 10, SAFFRON_GYM
+ warp 15, 9, 20, SAFFRON_GYM
+ warp 19, 9, 29, SAFFRON_GYM
+ warp 15, 11, 14, SAFFRON_GYM
+ warp 19, 11, 6, SAFFRON_GYM
+ warp 15, 15, 21, SAFFRON_GYM
+ warp 19, 15, 25, SAFFRON_GYM
+ warp 15, 17, 11, SAFFRON_GYM
+ warp 19, 17, 19, SAFFRON_GYM
+
+ def_signs
+
+ def_objects
+ object SPRITE_COOLTRAINER_F, 9, 8, STAY, DOWN, 1, OPP_SABRINA, 1
+ object SPRITE_CHANNELER, 10, 1, STAY, DOWN, 2, OPP_CHANNELER, 22
+ object SPRITE_YOUNGSTER, 17, 1, STAY, DOWN, 3, OPP_PSYCHIC_TR, 1
+ object SPRITE_CHANNELER, 3, 7, STAY, DOWN, 4, OPP_CHANNELER, 23
+ object SPRITE_YOUNGSTER, 17, 7, STAY, DOWN, 5, OPP_PSYCHIC_TR, 2
+ object SPRITE_CHANNELER, 3, 13, STAY, DOWN, 6, OPP_CHANNELER, 24
+ object SPRITE_YOUNGSTER, 17, 13, STAY, DOWN, 7, OPP_PSYCHIC_TR, 3
+ object SPRITE_YOUNGSTER, 3, 1, STAY, DOWN, 8, OPP_PSYCHIC_TR, 4
+ object SPRITE_GYM_GUIDE, 10, 15, STAY, DOWN, 9 ; person
+
+ def_warps_to SAFFRON_GYM
diff --git a/data/maps/objects/SaffronMart.asm b/data/maps/objects/SaffronMart.asm
new file mode 100755
index 00000000..0a9aed7a
--- /dev/null
+++ b/data/maps/objects/SaffronMart.asm
@@ -0,0 +1,15 @@
+SaffronMart_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 4, LAST_MAP
+ warp 4, 7, 4, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_CLERK, 0, 5, STAY, RIGHT, 1 ; person
+ object SPRITE_SUPER_NERD, 4, 2, STAY, NONE, 2 ; person
+ object SPRITE_COOLTRAINER_F, 6, 5, WALK, ANY_DIR, 3 ; person
+
+ def_warps_to SAFFRON_MART
diff --git a/data/maps/objects/SaffronPidgeyHouse.asm b/data/maps/objects/SaffronPidgeyHouse.asm
new file mode 100755
index 00000000..59af6fc0
--- /dev/null
+++ b/data/maps/objects/SaffronPidgeyHouse.asm
@@ -0,0 +1,16 @@
+SaffronPidgeyHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 3, LAST_MAP
+ warp 3, 7, 3, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_BRUNETTE_GIRL, 2, 3, STAY, RIGHT, 1 ; person
+ object SPRITE_BIRD, 0, 4, WALK, UP_DOWN, 2 ; person
+ object SPRITE_YOUNGSTER, 4, 1, STAY, DOWN, 3 ; person
+ object SPRITE_PAPER, 3, 3, STAY, NONE, 4 ; person
+
+ def_warps_to SAFFRON_PIDGEY_HOUSE
diff --git a/data/maps/objects/SaffronPokecenter.asm b/data/maps/objects/SaffronPokecenter.asm
new file mode 100755
index 00000000..ab52a72c
--- /dev/null
+++ b/data/maps/objects/SaffronPokecenter.asm
@@ -0,0 +1,17 @@
+SaffronPokecenter_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 6, LAST_MAP
+ warp 4, 7, 6, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
+ object SPRITE_BEAUTY, 5, 5, STAY, NONE, 2 ; person
+ object SPRITE_GENTLEMAN, 8, 3, STAY, DOWN, 3 ; person
+ object SPRITE_LINK_RECEPTIONIST, 11, 2, STAY, DOWN, 4 ; person
+ object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
+
+ def_warps_to SAFFRON_POKECENTER
diff --git a/data/maps/objects/SeafoamIslands1F.asm b/data/maps/objects/SeafoamIslands1F.asm
new file mode 100755
index 00000000..913ca7c7
--- /dev/null
+++ b/data/maps/objects/SeafoamIslands1F.asm
@@ -0,0 +1,19 @@
+SeafoamIslands1F_Object:
+ db $7d ; border block
+
+ def_warps
+ warp 4, 17, 0, LAST_MAP
+ warp 5, 17, 0, LAST_MAP
+ warp 26, 17, 1, LAST_MAP
+ warp 27, 17, 1, LAST_MAP
+ warp 7, 5, 1, SEAFOAM_ISLANDS_B1F
+ warp 25, 3, 6, SEAFOAM_ISLANDS_B1F
+ warp 23, 15, 4, SEAFOAM_ISLANDS_B1F
+
+ def_signs
+
+ def_objects
+ object SPRITE_BOULDER, 18, 10, STAY, BOULDER_MOVEMENT_BYTE_2, 1 ; person
+ object SPRITE_BOULDER, 26, 7, STAY, BOULDER_MOVEMENT_BYTE_2, 2 ; person
+
+ def_warps_to SEAFOAM_ISLANDS_1F
diff --git a/data/maps/objects/SeafoamIslandsB1F.asm b/data/maps/objects/SeafoamIslandsB1F.asm
new file mode 100755
index 00000000..c9a4d235
--- /dev/null
+++ b/data/maps/objects/SeafoamIslandsB1F.asm
@@ -0,0 +1,19 @@
+SeafoamIslandsB1F_Object:
+ db $7d ; border block
+
+ def_warps
+ warp 4, 2, 0, SEAFOAM_ISLANDS_B2F
+ warp 7, 5, 4, SEAFOAM_ISLANDS_1F
+ warp 13, 7, 2, SEAFOAM_ISLANDS_B2F
+ warp 19, 15, 3, SEAFOAM_ISLANDS_B2F
+ warp 23, 15, 6, SEAFOAM_ISLANDS_1F
+ warp 25, 11, 5, SEAFOAM_ISLANDS_B2F
+ warp 25, 3, 5, SEAFOAM_ISLANDS_1F
+
+ def_signs
+
+ def_objects
+ object SPRITE_BOULDER, 17, 6, STAY, BOULDER_MOVEMENT_BYTE_2, 1 ; person
+ object SPRITE_BOULDER, 22, 6, STAY, BOULDER_MOVEMENT_BYTE_2, 2 ; person
+
+ def_warps_to SEAFOAM_ISLANDS_B1F
diff --git a/data/maps/objects/SeafoamIslandsB2F.asm b/data/maps/objects/SeafoamIslandsB2F.asm
new file mode 100755
index 00000000..ff9e55fd
--- /dev/null
+++ b/data/maps/objects/SeafoamIslandsB2F.asm
@@ -0,0 +1,19 @@
+SeafoamIslandsB2F_Object:
+ db $7d ; border block
+
+ def_warps
+ warp 5, 3, 0, SEAFOAM_ISLANDS_B1F
+ warp 5, 13, 0, SEAFOAM_ISLANDS_B3F
+ warp 13, 7, 2, SEAFOAM_ISLANDS_B1F
+ warp 19, 15, 3, SEAFOAM_ISLANDS_B1F
+ warp 25, 3, 3, SEAFOAM_ISLANDS_B3F
+ warp 25, 11, 5, SEAFOAM_ISLANDS_B1F
+ warp 25, 14, 4, SEAFOAM_ISLANDS_B3F
+
+ def_signs
+
+ def_objects
+ object SPRITE_BOULDER, 18, 6, STAY, BOULDER_MOVEMENT_BYTE_2, 1 ; person
+ object SPRITE_BOULDER, 23, 6, STAY, BOULDER_MOVEMENT_BYTE_2, 2 ; person
+
+ def_warps_to SEAFOAM_ISLANDS_B2F
diff --git a/data/maps/objects/SeafoamIslandsB3F.asm b/data/maps/objects/SeafoamIslandsB3F.asm
new file mode 100755
index 00000000..418cdde6
--- /dev/null
+++ b/data/maps/objects/SeafoamIslandsB3F.asm
@@ -0,0 +1,23 @@
+SeafoamIslandsB3F_Object:
+ db $7d ; border block
+
+ def_warps
+ warp 5, 12, 1, SEAFOAM_ISLANDS_B2F
+ warp 8, 6, 2, SEAFOAM_ISLANDS_B4F
+ warp 25, 4, 3, SEAFOAM_ISLANDS_B4F
+ warp 25, 3, 4, SEAFOAM_ISLANDS_B2F
+ warp 25, 14, 6, SEAFOAM_ISLANDS_B2F
+ warp 20, 17, 0, SEAFOAM_ISLANDS_B4F
+ warp 21, 17, 1, SEAFOAM_ISLANDS_B4F
+
+ def_signs
+
+ def_objects
+ object SPRITE_BOULDER, 5, 14, STAY, BOULDER_MOVEMENT_BYTE_2, 1 ; person
+ object SPRITE_BOULDER, 3, 15, STAY, BOULDER_MOVEMENT_BYTE_2, 2 ; person
+ object SPRITE_BOULDER, 8, 14, STAY, BOULDER_MOVEMENT_BYTE_2, 3 ; person
+ object SPRITE_BOULDER, 9, 14, STAY, BOULDER_MOVEMENT_BYTE_2, 4 ; person
+ object SPRITE_BOULDER, 18, 6, STAY, NONE, 5 ; person
+ object SPRITE_BOULDER, 19, 6, STAY, NONE, 6 ; person
+
+ def_warps_to SEAFOAM_ISLANDS_B3F
diff --git a/data/maps/objects/SeafoamIslandsB4F.asm b/data/maps/objects/SeafoamIslandsB4F.asm
new file mode 100755
index 00000000..f2d35831
--- /dev/null
+++ b/data/maps/objects/SeafoamIslandsB4F.asm
@@ -0,0 +1,19 @@
+SeafoamIslandsB4F_Object:
+ db $7d ; border block
+
+ def_warps
+ warp 20, 17, 5, SEAFOAM_ISLANDS_B3F
+ warp 21, 17, 6, SEAFOAM_ISLANDS_B3F
+ warp 11, 7, 1, SEAFOAM_ISLANDS_B3F
+ warp 25, 4, 2, SEAFOAM_ISLANDS_B3F
+
+ def_signs
+ sign 9, 15, 4 ; SeafoamIslands5Text4
+ sign 23, 1, 5 ; SeafoamIslands5Text5
+
+ def_objects
+ object SPRITE_BOULDER, 4, 15, STAY, NONE, 1 ; person
+ object SPRITE_BOULDER, 5, 15, STAY, NONE, 2 ; person
+ object SPRITE_BIRD, 6, 1, STAY, DOWN, 3, ARTICUNO, 50
+
+ def_warps_to SEAFOAM_ISLANDS_B4F
diff --git a/data/maps/objects/SilphCo10F.asm b/data/maps/objects/SilphCo10F.asm
new file mode 100755
index 00000000..6840c13a
--- /dev/null
+++ b/data/maps/objects/SilphCo10F.asm
@@ -0,0 +1,22 @@
+SilphCo10F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 8, 0, 0, SILPH_CO_9F
+ warp 10, 0, 0, SILPH_CO_11F
+ warp 12, 0, 0, SILPH_CO_ELEVATOR
+ warp 9, 11, 3, SILPH_CO_4F
+ warp 13, 15, 5, SILPH_CO_4F
+ warp 13, 7, 6, SILPH_CO_4F
+
+ def_signs
+
+ def_objects
+ object SPRITE_ROCKET, 1, 9, STAY, RIGHT, 1, OPP_ROCKET, 39
+ object SPRITE_SCIENTIST, 10, 2, STAY, LEFT, 2, OPP_SCIENTIST, 11
+ object SPRITE_ERIKA, 9, 15, WALK, ANY_DIR, 3 ; person
+ object SPRITE_POKE_BALL, 2, 12, STAY, NONE, 4, TM_EARTHQUAKE
+ object SPRITE_POKE_BALL, 4, 14, STAY, NONE, 5, RARE_CANDY
+ object SPRITE_POKE_BALL, 5, 11, STAY, NONE, 6, CARBOS
+
+ def_warps_to SILPH_CO_10F
diff --git a/data/maps/objects/SilphCo11F.asm b/data/maps/objects/SilphCo11F.asm
new file mode 100755
index 00000000..dab1144c
--- /dev/null
+++ b/data/maps/objects/SilphCo11F.asm
@@ -0,0 +1,20 @@
+SilphCo11F_Object:
+ db $d ; border block
+
+ def_warps
+ warp 9, 0, 1, SILPH_CO_10F
+ warp 13, 0, 0, SILPH_CO_ELEVATOR
+ warp 5, 5, 9, LAST_MAP
+ warp 3, 2, 3, SILPH_CO_7F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SILPH_PRESIDENT, 7, 5, STAY, DOWN, 1 ; person
+ object SPRITE_BEAUTY, 10, 5, STAY, DOWN, 2 ; person
+ object SPRITE_GIOVANNI, 6, 9, STAY, DOWN, 3, OPP_GIOVANNI, 2
+ object SPRITE_JAMES, 2, 8, STAY, UP, 4
+ object SPRITE_ROCKET, 15, 9, STAY, UP, 5, OPP_ROCKET, 40
+ object SPRITE_JESSIE, 3, 8, STAY, UP, 6
+
+ def_warps_to SILPH_CO_11F
diff --git a/data/maps/objects/SilphCo1F.asm b/data/maps/objects/SilphCo1F.asm
new file mode 100755
index 00000000..7a9bdb61
--- /dev/null
+++ b/data/maps/objects/SilphCo1F.asm
@@ -0,0 +1,16 @@
+SilphCo1F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 10, 17, 5, LAST_MAP
+ warp 11, 17, 5, LAST_MAP
+ warp 26, 0, 0, SILPH_CO_2F
+ warp 20, 0, 0, SILPH_CO_ELEVATOR
+ warp 16, 10, 6, SILPH_CO_3F
+
+ def_signs
+
+ def_objects
+ object SPRITE_LINK_RECEPTIONIST, 4, 2, STAY, DOWN, 1 ; person
+
+ def_warps_to SILPH_CO_1F
diff --git a/data/maps/objects/SilphCo2F.asm b/data/maps/objects/SilphCo2F.asm
new file mode 100755
index 00000000..186d1581
--- /dev/null
+++ b/data/maps/objects/SilphCo2F.asm
@@ -0,0 +1,22 @@
+SilphCo2F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 24, 0, 2, SILPH_CO_1F
+ warp 26, 0, 0, SILPH_CO_3F
+ warp 20, 0, 0, SILPH_CO_ELEVATOR
+ warp 3, 3, 6, SILPH_CO_3F
+ warp 13, 3, 4, SILPH_CO_8F
+ warp 27, 15, 5, SILPH_CO_8F
+ warp 9, 15, 4, SILPH_CO_6F
+
+ def_signs
+
+ def_objects
+ object SPRITE_ERIKA, 10, 1, STAY, UP, 1 ; person
+ object SPRITE_SCIENTIST, 5, 12, STAY, DOWN, 2, OPP_SCIENTIST, 2
+ object SPRITE_SCIENTIST, 24, 13, STAY, LEFT, 3, OPP_SCIENTIST, 3
+ object SPRITE_ROCKET, 16, 11, STAY, UP, 4, OPP_ROCKET, 23
+ object SPRITE_ROCKET, 24, 7, STAY, UP, 5, OPP_ROCKET, 24
+
+ def_warps_to SILPH_CO_2F
diff --git a/data/maps/objects/SilphCo3F.asm b/data/maps/objects/SilphCo3F.asm
new file mode 100755
index 00000000..e9ea1cce
--- /dev/null
+++ b/data/maps/objects/SilphCo3F.asm
@@ -0,0 +1,24 @@
+SilphCo3F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 26, 0, 1, SILPH_CO_2F
+ warp 24, 0, 0, SILPH_CO_4F
+ warp 20, 0, 0, SILPH_CO_ELEVATOR
+ warp 23, 11, 9, SILPH_CO_3F
+ warp 3, 3, 5, SILPH_CO_5F
+ warp 3, 15, 6, SILPH_CO_5F
+ warp 27, 3, 3, SILPH_CO_2F
+ warp 3, 11, 3, SILPH_CO_9F
+ warp 11, 11, 4, SILPH_CO_7F
+ warp 27, 15, 3, SILPH_CO_3F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SILPH_WORKER, 24, 8, STAY, NONE, 1 ; person
+ object SPRITE_ROCKET, 20, 7, STAY, LEFT, 2, OPP_ROCKET, 25
+ object SPRITE_SCIENTIST, 7, 9, STAY, DOWN, 3, OPP_SCIENTIST, 4
+ object SPRITE_POKE_BALL, 8, 5, STAY, NONE, 4, HYPER_POTION
+
+ def_warps_to SILPH_CO_3F
diff --git a/data/maps/objects/SilphCo4F.asm b/data/maps/objects/SilphCo4F.asm
new file mode 100755
index 00000000..6c30b526
--- /dev/null
+++ b/data/maps/objects/SilphCo4F.asm
@@ -0,0 +1,24 @@
+SilphCo4F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 24, 0, 1, SILPH_CO_3F
+ warp 26, 0, 1, SILPH_CO_5F
+ warp 20, 0, 0, SILPH_CO_ELEVATOR
+ warp 11, 7, 3, SILPH_CO_10F
+ warp 17, 3, 3, SILPH_CO_6F
+ warp 3, 15, 4, SILPH_CO_10F
+ warp 17, 11, 5, SILPH_CO_10F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SILPH_WORKER, 6, 2, STAY, NONE, 1 ; person
+ object SPRITE_ROCKET, 9, 14, STAY, RIGHT, 2, OPP_ROCKET, 26
+ object SPRITE_SCIENTIST, 14, 6, STAY, LEFT, 3, OPP_SCIENTIST, 5
+ object SPRITE_ROCKET, 26, 10, STAY, UP, 4, OPP_ROCKET, 27
+ object SPRITE_POKE_BALL, 3, 9, STAY, NONE, 5, FULL_HEAL
+ object SPRITE_POKE_BALL, 4, 7, STAY, NONE, 6, MAX_REVIVE
+ object SPRITE_POKE_BALL, 5, 8, STAY, NONE, 7, ESCAPE_ROPE
+
+ def_warps_to SILPH_CO_4F
diff --git a/data/maps/objects/SilphCo5F.asm b/data/maps/objects/SilphCo5F.asm
new file mode 100755
index 00000000..553ec0c3
--- /dev/null
+++ b/data/maps/objects/SilphCo5F.asm
@@ -0,0 +1,28 @@
+SilphCo5F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 24, 0, 1, SILPH_CO_6F
+ warp 26, 0, 1, SILPH_CO_4F
+ warp 20, 0, 0, SILPH_CO_ELEVATOR
+ warp 27, 3, 5, SILPH_CO_7F
+ warp 9, 15, 4, SILPH_CO_9F
+ warp 11, 5, 4, SILPH_CO_3F
+ warp 3, 15, 5, SILPH_CO_3F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SILPH_WORKER, 13, 9, STAY, NONE, 1 ; person
+ object SPRITE_ROCKET, 8, 16, STAY, RIGHT, 2, OPP_ROCKET, 28
+ object SPRITE_SCIENTIST, 8, 3, STAY, RIGHT, 3, OPP_SCIENTIST, 6
+ object SPRITE_ROCKER, 18, 10, STAY, UP, 4, OPP_JUGGLER, 1
+ object SPRITE_ROCKET, 28, 4, STAY, UP, 5, OPP_ROCKET, 29
+ object SPRITE_POKE_BALL, 2, 13, STAY, NONE, 6, TM_TAKE_DOWN
+ object SPRITE_POKE_BALL, 4, 6, STAY, NONE, 7, PROTEIN
+ object SPRITE_POKE_BALL, 21, 16, STAY, NONE, 8, CARD_KEY
+ object SPRITE_CLIPBOARD, 22, 12, STAY, NONE, 9 ; person
+ object SPRITE_CLIPBOARD, 25, 10, STAY, NONE, 10 ; person
+ object SPRITE_CLIPBOARD, 24, 6, STAY, NONE, 11 ; person
+
+ def_warps_to SILPH_CO_5F
diff --git a/data/maps/objects/SilphCo6F.asm b/data/maps/objects/SilphCo6F.asm
new file mode 100755
index 00000000..3dba7414
--- /dev/null
+++ b/data/maps/objects/SilphCo6F.asm
@@ -0,0 +1,25 @@
+SilphCo6F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 16, 0, 1, SILPH_CO_7F
+ warp 14, 0, 0, SILPH_CO_5F
+ warp 18, 0, 0, SILPH_CO_ELEVATOR
+ warp 3, 3, 4, SILPH_CO_4F
+ warp 23, 3, 6, SILPH_CO_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SILPH_WORKER, 10, 6, STAY, NONE, 1 ; person
+ object SPRITE_SILPH_WORKER, 20, 6, STAY, NONE, 2 ; person
+ object SPRITE_ERIKA, 21, 6, STAY, DOWN, 3 ; person
+ object SPRITE_ERIKA, 11, 10, STAY, RIGHT, 4 ; person
+ object SPRITE_SILPH_WORKER, 18, 13, STAY, UP, 5 ; person
+ object SPRITE_ROCKET, 17, 3, STAY, RIGHT, 6, OPP_ROCKET, 30
+ object SPRITE_SCIENTIST, 7, 8, STAY, DOWN, 7, OPP_SCIENTIST, 7
+ object SPRITE_ROCKET, 14, 15, STAY, LEFT, 8, OPP_ROCKET, 31
+ object SPRITE_POKE_BALL, 3, 12, STAY, NONE, 9, HP_UP
+ object SPRITE_POKE_BALL, 2, 15, STAY, NONE, 10, X_ACCURACY
+
+ def_warps_to SILPH_CO_6F
diff --git a/data/maps/objects/SilphCo7F.asm b/data/maps/objects/SilphCo7F.asm
new file mode 100755
index 00000000..55f2ade6
--- /dev/null
+++ b/data/maps/objects/SilphCo7F.asm
@@ -0,0 +1,27 @@
+SilphCo7F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 16, 0, 1, SILPH_CO_8F
+ warp 22, 0, 0, SILPH_CO_6F
+ warp 18, 0, 0, SILPH_CO_ELEVATOR
+ warp 5, 7, 3, SILPH_CO_11F
+ warp 5, 3, 8, SILPH_CO_3F
+ warp 21, 15, 3, SILPH_CO_5F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SILPH_WORKER, 1, 5, STAY, NONE, 1 ; person
+ object SPRITE_SILPH_WORKER, 13, 13, STAY, UP, 2 ; person
+ object SPRITE_SILPH_WORKER, 7, 10, STAY, NONE, 3 ; person
+ object SPRITE_ERIKA, 10, 8, STAY, NONE, 4 ; person
+ object SPRITE_ROCKET, 13, 1, STAY, DOWN, 5, OPP_ROCKET, 32
+ object SPRITE_SCIENTIST, 2, 13, STAY, DOWN, 6, OPP_SCIENTIST, 8
+ object SPRITE_ROCKET, 20, 2, STAY, LEFT, 7, OPP_ROCKET, 33
+ object SPRITE_ROCKET, 19, 14, STAY, RIGHT, 8, OPP_ROCKET, 34
+ object SPRITE_BLUE, 3, 7, STAY, UP, 9 ; person
+ object SPRITE_POKE_BALL, 1, 9, STAY, NONE, 10, CALCIUM
+ object SPRITE_POKE_BALL, 24, 11, STAY, NONE, 11, TM_SWORDS_DANCE
+
+ def_warps_to SILPH_CO_7F
diff --git a/data/maps/objects/SilphCo8F.asm b/data/maps/objects/SilphCo8F.asm
new file mode 100755
index 00000000..1a50df07
--- /dev/null
+++ b/data/maps/objects/SilphCo8F.asm
@@ -0,0 +1,21 @@
+SilphCo8F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 16, 0, 1, SILPH_CO_9F
+ warp 14, 0, 0, SILPH_CO_7F
+ warp 18, 0, 0, SILPH_CO_ELEVATOR
+ warp 3, 11, 6, SILPH_CO_8F
+ warp 3, 15, 4, SILPH_CO_2F
+ warp 11, 5, 5, SILPH_CO_2F
+ warp 11, 9, 3, SILPH_CO_8F
+
+ def_signs
+
+ def_objects
+ object SPRITE_SILPH_WORKER, 4, 2, STAY, NONE, 1 ; person
+ object SPRITE_ROCKET, 19, 2, STAY, LEFT, 2, OPP_ROCKET, 35
+ object SPRITE_SCIENTIST, 10, 2, STAY, DOWN, 3, OPP_SCIENTIST, 9
+ object SPRITE_ROCKET, 12, 15, STAY, RIGHT, 4, OPP_ROCKET, 36
+
+ def_warps_to SILPH_CO_8F
diff --git a/data/maps/objects/SilphCo9F.asm b/data/maps/objects/SilphCo9F.asm
new file mode 100755
index 00000000..e6de70fd
--- /dev/null
+++ b/data/maps/objects/SilphCo9F.asm
@@ -0,0 +1,19 @@
+SilphCo9F_Object:
+ db $2e ; border block
+
+ def_warps
+ warp 14, 0, 0, SILPH_CO_10F
+ warp 16, 0, 0, SILPH_CO_8F
+ warp 18, 0, 0, SILPH_CO_ELEVATOR
+ warp 9, 3, 7, SILPH_CO_3F
+ warp 17, 15, 4, SILPH_CO_5F
+
+ def_signs
+
+ def_objects
+ object SPRITE_NURSE, 3, 14, STAY, DOWN, 1 ; person
+ object SPRITE_ROCKET, 2, 4, STAY, UP, 2, OPP_ROCKET, 37
+ object SPRITE_SCIENTIST, 21, 13, STAY, DOWN, 3, OPP_SCIENTIST, 10
+ object SPRITE_ROCKET, 13, 16, STAY, UP, 4, OPP_ROCKET, 38
+
+ def_warps_to SILPH_CO_9F
diff --git a/data/maps/objects/SilphCoElevator.asm b/data/maps/objects/SilphCoElevator.asm
new file mode 100755
index 00000000..d894ba65
--- /dev/null
+++ b/data/maps/objects/SilphCoElevator.asm
@@ -0,0 +1,13 @@
+SilphCoElevator_Object:
+ db $f ; border block
+
+ def_warps
+ warp 1, 3, 0, UNUSED_MAP_ED
+ warp 2, 3, 0, UNUSED_MAP_ED
+
+ def_signs
+ sign 3, 0, 1 ; SilphCoElevatorText1
+
+ def_objects
+
+ def_warps_to SILPH_CO_ELEVATOR
diff --git a/data/maps/objects/TradeCenter.asm b/data/maps/objects/TradeCenter.asm
new file mode 100644
index 00000000..ff74a4fa
--- /dev/null
+++ b/data/maps/objects/TradeCenter.asm
@@ -0,0 +1,11 @@
+TradeCenter_Object:
+ db $e ; border block
+
+ def_warps
+
+ def_signs
+
+ def_objects
+ object SPRITE_RED, 2, 2, STAY, 0, 1 ; person
+
+ def_warps_to TRADE_CENTER
diff --git a/data/maps/objects/UndergroundPathNorthSouth.asm b/data/maps/objects/UndergroundPathNorthSouth.asm
new file mode 100755
index 00000000..abf2d715
--- /dev/null
+++ b/data/maps/objects/UndergroundPathNorthSouth.asm
@@ -0,0 +1,12 @@
+UndergroundPathNorthSouth_Object:
+ db $1 ; border block
+
+ def_warps
+ warp 5, 4, 2, UNDERGROUND_PATH_ROUTE_5
+ warp 2, 41, 2, UNDERGROUND_PATH_ROUTE_6
+
+ def_signs
+
+ def_objects
+
+ def_warps_to UNDERGROUND_PATH_NORTH_SOUTH
diff --git a/data/maps/objects/UndergroundPathRoute5.asm b/data/maps/objects/UndergroundPathRoute5.asm
new file mode 100755
index 00000000..0e0f64e0
--- /dev/null
+++ b/data/maps/objects/UndergroundPathRoute5.asm
@@ -0,0 +1,14 @@
+UndergroundPathRoute5_Object:
+ db $a ; border block
+
+ def_warps
+ warp 3, 7, 3, LAST_MAP
+ warp 4, 7, 3, LAST_MAP
+ warp 4, 4, 0, UNDERGROUND_PATH_NORTH_SOUTH
+
+ def_signs
+
+ def_objects
+ object SPRITE_LITTLE_GIRL, 2, 3, STAY, NONE, 1 ; person
+
+ def_warps_to UNDERGROUND_PATH_ROUTE_5
diff --git a/data/maps/objects/UndergroundPathRoute6.asm b/data/maps/objects/UndergroundPathRoute6.asm
new file mode 100755
index 00000000..ff4d66b3
--- /dev/null
+++ b/data/maps/objects/UndergroundPathRoute6.asm
@@ -0,0 +1,14 @@
+UndergroundPathRoute6_Object:
+ db $a ; border block
+
+ def_warps
+ warp 3, 7, 3, LAST_MAP
+ warp 4, 7, 3, LAST_MAP
+ warp 4, 4, 1, UNDERGROUND_PATH_NORTH_SOUTH
+
+ def_signs
+
+ def_objects
+ object SPRITE_GIRL, 2, 3, STAY, NONE, 1 ; person
+
+ def_warps_to UNDERGROUND_PATH_ROUTE_6
diff --git a/data/maps/objects/UndergroundPathRoute7.asm b/data/maps/objects/UndergroundPathRoute7.asm
new file mode 100755
index 00000000..2532c380
--- /dev/null
+++ b/data/maps/objects/UndergroundPathRoute7.asm
@@ -0,0 +1,14 @@
+UndergroundPathRoute7_Object:
+ db $a ; border block
+
+ def_warps
+ warp 3, 7, 4, LAST_MAP
+ warp 4, 7, 4, LAST_MAP
+ warp 4, 4, 0, UNDERGROUND_PATH_WEST_EAST
+
+ def_signs
+
+ def_objects
+ object SPRITE_MIDDLE_AGED_MAN, 2, 4, STAY, NONE, 1 ; person
+
+ def_warps_to UNDERGROUND_PATH_ROUTE_7
diff --git a/data/maps/objects/UndergroundPathRoute7Copy.asm b/data/maps/objects/UndergroundPathRoute7Copy.asm
new file mode 100755
index 00000000..57e6d093
--- /dev/null
+++ b/data/maps/objects/UndergroundPathRoute7Copy.asm
@@ -0,0 +1,15 @@
+UndergroundPathRoute7Copy_Object:
+ db $a ; border block
+
+ def_warps
+ warp 3, 7, 5, LAST_MAP
+ warp 4, 7, 5, LAST_MAP
+ warp 4, 4, 0, UNDERGROUND_PATH_WEST_EAST
+
+ def_signs
+
+ def_objects
+ object SPRITE_GIRL, 3, 2, STAY, NONE, 1 ; person
+ object SPRITE_MIDDLE_AGED_MAN, 2, 4, STAY, NONE, 2 ; person
+
+ def_warps_to UNDERGROUND_PATH_ROUTE_7_COPY
diff --git a/data/maps/objects/UndergroundPathRoute8.asm b/data/maps/objects/UndergroundPathRoute8.asm
new file mode 100755
index 00000000..d84188ab
--- /dev/null
+++ b/data/maps/objects/UndergroundPathRoute8.asm
@@ -0,0 +1,14 @@
+UndergroundPathRoute8_Object:
+ db $a ; border block
+
+ def_warps
+ warp 3, 7, 4, LAST_MAP
+ warp 4, 7, 4, LAST_MAP
+ warp 4, 4, 1, UNDERGROUND_PATH_WEST_EAST
+
+ def_signs
+
+ def_objects
+ object SPRITE_GIRL, 3, 4, STAY, NONE, 1 ; person
+
+ def_warps_to UNDERGROUND_PATH_ROUTE_8
diff --git a/data/maps/objects/UndergroundPathWestEast.asm b/data/maps/objects/UndergroundPathWestEast.asm
new file mode 100755
index 00000000..15141e93
--- /dev/null
+++ b/data/maps/objects/UndergroundPathWestEast.asm
@@ -0,0 +1,12 @@
+UndergroundPathWestEast_Object:
+ db $1 ; border block
+
+ def_warps
+ warp 2, 5, 2, UNDERGROUND_PATH_ROUTE_7
+ warp 47, 2, 2, UNDERGROUND_PATH_ROUTE_8
+
+ def_signs
+
+ def_objects
+
+ def_warps_to UNDERGROUND_PATH_WEST_EAST
diff --git a/data/maps/objects/VermilionCity.asm b/data/maps/objects/VermilionCity.asm
new file mode 100755
index 00000000..3ea219c3
--- /dev/null
+++ b/data/maps/objects/VermilionCity.asm
@@ -0,0 +1,33 @@
+VermilionCity_Object:
+ db $43 ; border block
+
+ def_warps
+ warp 11, 3, 0, VERMILION_POKECENTER
+ warp 9, 13, 0, POKEMON_FAN_CLUB
+ warp 23, 13, 0, VERMILION_MART
+ warp 12, 19, 0, VERMILION_GYM
+ warp 23, 19, 0, VERMILION_PIDGEY_HOUSE
+ warp 18, 31, 0, VERMILION_DOCK
+ warp 19, 31, 0, VERMILION_DOCK
+ warp 15, 13, 0, VERMILION_TRADE_HOUSE
+ warp 7, 3, 0, VERMILION_OLD_ROD_HOUSE
+
+ def_signs
+ sign 27, 3, 8 ; VermilionCityText7
+ sign 37, 13, 9 ; VermilionCityText8
+ sign 24, 13, 10 ; MartSignText
+ sign 12, 3, 11 ; PokeCenterSignText
+ sign 7, 13, 12 ; VermilionCityText11
+ sign 7, 19, 13 ; VermilionCityText12
+ sign 29, 15, 14 ; VermilionCityText13
+
+ def_objects
+ object SPRITE_COOLTRAINER_F, 19, 7, WALK, LEFT_RIGHT, 1 ; person
+ object SPRITE_GAMBLER, 14, 6, STAY, NONE, 2 ; person
+ object SPRITE_SAILOR, 19, 30, STAY, UP, 3 ; person
+ object SPRITE_GAMBLER, 30, 7, STAY, NONE, 4 ; person
+ object SPRITE_MONSTER, 29, 9, WALK, UP_DOWN, 5 ; person
+ object SPRITE_SAILOR, 25, 27, WALK, LEFT_RIGHT, 6 ; person
+ object SPRITE_OFFICER_JENNY, 19, 15, STAY, NONE, 7 ; person
+
+ def_warps_to VERMILION_CITY
diff --git a/data/maps/objects/VermilionDock.asm b/data/maps/objects/VermilionDock.asm
new file mode 100755
index 00000000..f8143aaa
--- /dev/null
+++ b/data/maps/objects/VermilionDock.asm
@@ -0,0 +1,12 @@
+VermilionDock_Object:
+ db $f ; border block
+
+ def_warps
+ warp 14, 0, 5, LAST_MAP
+ warp 14, 2, 1, SS_ANNE_1F
+
+ def_signs
+
+ def_objects
+
+ def_warps_to VERMILION_DOCK
diff --git a/data/maps/objects/VermilionGym.asm b/data/maps/objects/VermilionGym.asm
new file mode 100755
index 00000000..ce0fd9f0
--- /dev/null
+++ b/data/maps/objects/VermilionGym.asm
@@ -0,0 +1,17 @@
+VermilionGym_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 4, 17, 3, LAST_MAP
+ warp 5, 17, 3, LAST_MAP
+
+ def_signs
+
+ def_objects
+ 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_SUPER_NERD, 3, 8, STAY, LEFT, 3, OPP_ROCKER, 1
+ object SPRITE_SAILOR, 0, 10, STAY, RIGHT, 4, OPP_SAILOR, 8
+ object SPRITE_GYM_GUIDE, 4, 14, STAY, DOWN, 5 ; person
+
+ def_warps_to VERMILION_GYM
diff --git a/data/maps/objects/VermilionMart.asm b/data/maps/objects/VermilionMart.asm
new file mode 100755
index 00000000..c473b5d1
--- /dev/null
+++ b/data/maps/objects/VermilionMart.asm
@@ -0,0 +1,15 @@
+VermilionMart_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 2, LAST_MAP
+ warp 4, 7, 2, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_CLERK, 0, 5, STAY, RIGHT, 1 ; person
+ object SPRITE_COOLTRAINER_M, 5, 6, STAY, NONE, 2 ; person
+ object SPRITE_COOLTRAINER_F, 3, 3, WALK, LEFT_RIGHT, 3 ; person
+
+ def_warps_to VERMILION_MART
diff --git a/data/maps/objects/VermilionOldRodHouse.asm b/data/maps/objects/VermilionOldRodHouse.asm
new file mode 100755
index 00000000..878262f2
--- /dev/null
+++ b/data/maps/objects/VermilionOldRodHouse.asm
@@ -0,0 +1,13 @@
+VermilionOldRodHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 8, LAST_MAP
+ warp 3, 7, 8, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_FISHING_GURU, 2, 4, STAY, RIGHT, 1 ; person
+
+ def_warps_to VERMILION_OLD_ROD_HOUSE
diff --git a/data/maps/objects/VermilionPidgeyHouse.asm b/data/maps/objects/VermilionPidgeyHouse.asm
new file mode 100755
index 00000000..0a357409
--- /dev/null
+++ b/data/maps/objects/VermilionPidgeyHouse.asm
@@ -0,0 +1,15 @@
+VermilionPidgeyHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 4, LAST_MAP
+ warp 3, 7, 4, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_YOUNGSTER, 5, 3, STAY, LEFT, 1 ; person
+ object SPRITE_BIRD, 3, 5, WALK, LEFT_RIGHT, 2 ; person
+ object SPRITE_PAPER, 4, 3, STAY, NONE, 3 ; person
+
+ def_warps_to VERMILION_PIDGEY_HOUSE
diff --git a/data/maps/objects/VermilionPokecenter.asm b/data/maps/objects/VermilionPokecenter.asm
new file mode 100755
index 00000000..f52bf24e
--- /dev/null
+++ b/data/maps/objects/VermilionPokecenter.asm
@@ -0,0 +1,17 @@
+VermilionPokecenter_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 0, LAST_MAP
+ warp 4, 7, 0, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
+ object SPRITE_FISHING_GURU, 10, 5, STAY, NONE, 2 ; person
+ object SPRITE_SAILOR, 5, 4, STAY, NONE, 3 ; person
+ object SPRITE_LINK_RECEPTIONIST, 11, 2, STAY, DOWN, 4 ; person
+ object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
+
+ def_warps_to VERMILION_POKECENTER
diff --git a/data/maps/objects/VermilionTradeHouse.asm b/data/maps/objects/VermilionTradeHouse.asm
new file mode 100755
index 00000000..5eace66e
--- /dev/null
+++ b/data/maps/objects/VermilionTradeHouse.asm
@@ -0,0 +1,13 @@
+VermilionTradeHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 7, LAST_MAP
+ warp 3, 7, 7, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_GENTLEMAN, 3, 5, STAY, UP, 1 ; person
+
+ def_warps_to VERMILION_TRADE_HOUSE
diff --git a/data/maps/objects/VictoryRoad1F.asm b/data/maps/objects/VictoryRoad1F.asm
new file mode 100755
index 00000000..e3798128
--- /dev/null
+++ b/data/maps/objects/VictoryRoad1F.asm
@@ -0,0 +1,20 @@
+VictoryRoad1F_Object:
+ db $7d ; border block
+
+ def_warps
+ warp 8, 17, 2, LAST_MAP
+ warp 9, 17, 2, LAST_MAP
+ warp 1, 1, 0, VICTORY_ROAD_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_COOLTRAINER_F, 7, 5, STAY, RIGHT, 1, OPP_COOLTRAINER_F, 5
+ object SPRITE_COOLTRAINER_M, 3, 2, STAY, DOWN, 2, OPP_COOLTRAINER_M, 5
+ object SPRITE_POKE_BALL, 11, 0, STAY, NONE, 3, TM_SKY_ATTACK
+ object SPRITE_POKE_BALL, 9, 2, STAY, NONE, 4, RARE_CANDY
+ object SPRITE_BOULDER, 5, 15, STAY, BOULDER_MOVEMENT_BYTE_2, 5 ; person
+ object SPRITE_BOULDER, 14, 2, STAY, BOULDER_MOVEMENT_BYTE_2, 6 ; person
+ object SPRITE_BOULDER, 2, 10, STAY, BOULDER_MOVEMENT_BYTE_2, 7 ; person
+
+ def_warps_to VICTORY_ROAD_1F
diff --git a/data/maps/objects/VictoryRoad2F.asm b/data/maps/objects/VictoryRoad2F.asm
new file mode 100755
index 00000000..84a32fa2
--- /dev/null
+++ b/data/maps/objects/VictoryRoad2F.asm
@@ -0,0 +1,30 @@
+VictoryRoad2F_Object:
+ db $7d ; border block
+
+ def_warps
+ warp 0, 8, 2, VICTORY_ROAD_1F
+ warp 29, 7, 3, LAST_MAP
+ warp 29, 8, 3, LAST_MAP
+ warp 23, 7, 0, VICTORY_ROAD_3F
+ warp 25, 14, 2, VICTORY_ROAD_3F
+ warp 27, 7, 1, VICTORY_ROAD_3F
+ warp 1, 1, 3, VICTORY_ROAD_3F
+
+ def_signs
+
+ def_objects
+ object SPRITE_HIKER, 12, 9, STAY, LEFT, 1, OPP_BLACKBELT, 9
+ object SPRITE_SUPER_NERD, 21, 13, STAY, LEFT, 2, OPP_JUGGLER, 2
+ object SPRITE_COOLTRAINER_M, 19, 8, STAY, DOWN, 3, OPP_TAMER, 5
+ object SPRITE_SUPER_NERD, 4, 2, STAY, DOWN, 4, OPP_POKEMANIAC, 6
+ object SPRITE_SUPER_NERD, 26, 3, STAY, LEFT, 5, OPP_JUGGLER, 5
+ object SPRITE_BIRD, 11, 5, STAY, UP, 6, MOLTRES, 50
+ object SPRITE_POKE_BALL, 27, 5, STAY, NONE, 7, TM_SUBMISSION
+ object SPRITE_POKE_BALL, 18, 9, STAY, NONE, 8, FULL_HEAL
+ object SPRITE_POKE_BALL, 9, 11, STAY, NONE, 9, TM_MEGA_KICK
+ object SPRITE_POKE_BALL, 11, 0, STAY, NONE, 10, GUARD_SPEC
+ object SPRITE_BOULDER, 4, 14, STAY, BOULDER_MOVEMENT_BYTE_2, 11 ; person
+ object SPRITE_BOULDER, 5, 5, STAY, BOULDER_MOVEMENT_BYTE_2, 12 ; person
+ object SPRITE_BOULDER, 23, 16, STAY, BOULDER_MOVEMENT_BYTE_2, 13 ; person
+
+ def_warps_to VICTORY_ROAD_2F
diff --git a/data/maps/objects/VictoryRoad3F.asm b/data/maps/objects/VictoryRoad3F.asm
new file mode 100755
index 00000000..fcab3e74
--- /dev/null
+++ b/data/maps/objects/VictoryRoad3F.asm
@@ -0,0 +1,24 @@
+VictoryRoad3F_Object:
+ db $7d ; border block
+
+ def_warps
+ warp 23, 7, 3, VICTORY_ROAD_2F
+ warp 26, 8, 5, VICTORY_ROAD_2F
+ warp 27, 15, 4, VICTORY_ROAD_2F
+ warp 2, 0, 6, VICTORY_ROAD_2F
+
+ def_signs
+
+ def_objects
+ object SPRITE_COOLTRAINER_M, 28, 5, STAY, LEFT, 1, OPP_COOLTRAINER_M, 2
+ object SPRITE_COOLTRAINER_F, 7, 13, STAY, RIGHT, 2, OPP_COOLTRAINER_F, 2
+ object SPRITE_COOLTRAINER_M, 6, 14, STAY, LEFT, 3, OPP_COOLTRAINER_M, 3
+ object SPRITE_COOLTRAINER_F, 13, 3, STAY, RIGHT, 4, OPP_COOLTRAINER_F, 3
+ object SPRITE_POKE_BALL, 26, 5, STAY, NONE, 5, MAX_REVIVE
+ object SPRITE_POKE_BALL, 7, 7, STAY, NONE, 6, TM_EXPLOSION
+ object SPRITE_BOULDER, 22, 3, STAY, BOULDER_MOVEMENT_BYTE_2, 7 ; person
+ object SPRITE_BOULDER, 13, 12, STAY, BOULDER_MOVEMENT_BYTE_2, 8 ; person
+ object SPRITE_BOULDER, 24, 10, STAY, BOULDER_MOVEMENT_BYTE_2, 9 ; person
+ object SPRITE_BOULDER, 22, 15, STAY, BOULDER_MOVEMENT_BYTE_2, 10 ; person
+
+ def_warps_to VICTORY_ROAD_3F
diff --git a/data/maps/objects/ViridianCity.asm b/data/maps/objects/ViridianCity.asm
new file mode 100755
index 00000000..9e3e30bb
--- /dev/null
+++ b/data/maps/objects/ViridianCity.asm
@@ -0,0 +1,29 @@
+ViridianCity_Object:
+ db $f ; border block
+
+ def_warps
+ warp 23, 25, 0, VIRIDIAN_POKECENTER
+ warp 29, 19, 0, VIRIDIAN_MART
+ warp 21, 15, 0, VIRIDIAN_SCHOOL_HOUSE
+ warp 21, 9, 0, VIRIDIAN_NICKNAME_HOUSE
+ warp 32, 7, 0, VIRIDIAN_GYM
+
+ def_signs
+ sign 17, 17, 9 ; ViridianCityText8
+ sign 19, 1, 10 ; ViridianCityText9
+ sign 21, 29, 11 ; ViridianCityText10
+ sign 30, 19, 12 ; MartSignText
+ sign 24, 25, 13 ; PokeCenterSignText
+ sign 27, 7, 14 ; ViridianCityText13
+
+ def_objects
+ object SPRITE_YOUNGSTER, 13, 20, WALK, ANY_DIR, 1 ; person
+ object SPRITE_GAMBLER, 30, 8, STAY, NONE, 2 ; person
+ object SPRITE_YOUNGSTER, 30, 25, WALK, ANY_DIR, 3 ; person
+ object SPRITE_GIRL, 17, 9, STAY, RIGHT, 4 ; person
+ object SPRITE_GAMBLER_ASLEEP, 18, 9, STAY, NONE, 5 ; person
+ object SPRITE_FISHER, 6, 23, STAY, DOWN, 6 ; person
+ object SPRITE_GAMBLER, 17, 5, WALK, LEFT_RIGHT, 7 ; person
+ object SPRITE_GAMBLER, 18, 9, STAY, NONE, 8
+
+ def_warps_to VIRIDIAN_CITY
diff --git a/data/maps/objects/ViridianForest.asm b/data/maps/objects/ViridianForest.asm
new file mode 100755
index 00000000..56d48f6d
--- /dev/null
+++ b/data/maps/objects/ViridianForest.asm
@@ -0,0 +1,32 @@
+ViridianForest_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 1, 0, 2, VIRIDIAN_FOREST_NORTH_GATE
+ warp 2, 0, 2, VIRIDIAN_FOREST_NORTH_GATE
+ warp 15, 47, 1, VIRIDIAN_FOREST_SOUTH_GATE
+ warp 16, 47, 1, VIRIDIAN_FOREST_SOUTH_GATE
+ warp 17, 47, 1, VIRIDIAN_FOREST_SOUTH_GATE
+ warp 18, 47, 1, VIRIDIAN_FOREST_SOUTH_GATE
+
+ def_signs
+ sign 24, 40, 11 ; ViridianForestText9
+ sign 16, 32, 12 ; ViridianForestText10
+ sign 26, 17, 13 ; ViridianForestText11
+ sign 4, 24, 14 ; ViridianForestText12
+ sign 18, 45, 15 ; ViridianForestText13
+ sign 2, 1, 16 ; ViridianForestText14
+
+ def_objects
+ object SPRITE_YOUNGSTER, 16, 43, STAY, NONE, 1 ; person
+ object SPRITE_YOUNGSTER, 30, 33, STAY, LEFT, 2, OPP_BUG_CATCHER, 1
+ object SPRITE_YOUNGSTER, 30, 19, STAY, LEFT, 3, OPP_BUG_CATCHER, 2
+ object SPRITE_YOUNGSTER, 2, 18, STAY, LEFT, 4, OPP_BUG_CATCHER, 3
+ object SPRITE_COOLTRAINER_F, 2, 41, STAY, NONE, 5, OPP_LASS, 19
+ object SPRITE_YOUNGSTER, 13, 17, STAY, RIGHT, 6, OPP_BUG_CATCHER, 15
+ object SPRITE_POKE_BALL, 25, 11, STAY, NONE, 7, POTION
+ object SPRITE_POKE_BALL, 12, 29, STAY, NONE, 8, POTION
+ object SPRITE_POKE_BALL, 1, 31, STAY, NONE, 9, POKE_BALL
+ object SPRITE_YOUNGSTER, 27, 40, STAY, NONE, 10 ; person
+
+ def_warps_to VIRIDIAN_FOREST
diff --git a/data/maps/objects/ViridianForestNorthGate.asm b/data/maps/objects/ViridianForestNorthGate.asm
new file mode 100755
index 00000000..137b8b3b
--- /dev/null
+++ b/data/maps/objects/ViridianForestNorthGate.asm
@@ -0,0 +1,16 @@
+ViridianForestNorthGate_Object:
+ db $a ; border block
+
+ def_warps
+ warp 4, 0, 1, LAST_MAP
+ warp 5, 0, 1, LAST_MAP
+ warp 4, 7, 0, VIRIDIAN_FOREST
+ warp 5, 7, 0, VIRIDIAN_FOREST
+
+ def_signs
+
+ def_objects
+ object SPRITE_SUPER_NERD, 3, 2, STAY, NONE, 1 ; person
+ object SPRITE_GRAMPS, 2, 5, STAY, NONE, 2 ; person
+
+ def_warps_to VIRIDIAN_FOREST_NORTH_GATE
diff --git a/data/maps/objects/ViridianForestSouthGate.asm b/data/maps/objects/ViridianForestSouthGate.asm
new file mode 100755
index 00000000..c73205cd
--- /dev/null
+++ b/data/maps/objects/ViridianForestSouthGate.asm
@@ -0,0 +1,16 @@
+ViridianForestSouthGate_Object:
+ db $a ; border block
+
+ def_warps
+ warp 4, 0, 3, VIRIDIAN_FOREST
+ warp 5, 0, 3, VIRIDIAN_FOREST
+ warp 4, 7, 5, LAST_MAP
+ warp 5, 7, 5, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_GIRL, 8, 4, STAY, LEFT, 1 ; person
+ object SPRITE_LITTLE_GIRL, 2, 4, WALK, UP_DOWN, 2 ; person
+
+ def_warps_to VIRIDIAN_FOREST_SOUTH_GATE
diff --git a/data/maps/objects/ViridianGym.asm b/data/maps/objects/ViridianGym.asm
new file mode 100755
index 00000000..cc158928
--- /dev/null
+++ b/data/maps/objects/ViridianGym.asm
@@ -0,0 +1,23 @@
+ViridianGym_Object:
+ db $3 ; border block
+
+ def_warps
+ warp 16, 17, 4, LAST_MAP
+ warp 17, 17, 4, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_GIOVANNI, 2, 1, STAY, DOWN, 1, OPP_GIOVANNI, 3
+ object SPRITE_COOLTRAINER_M, 12, 7, STAY, DOWN, 2, OPP_COOLTRAINER_M, 9
+ object SPRITE_HIKER, 11, 11, STAY, UP, 3, OPP_BLACKBELT, 6
+ object SPRITE_ROCKER, 10, 7, STAY, DOWN, 4, OPP_TAMER, 3
+ object SPRITE_HIKER, 3, 7, STAY, LEFT, 5, OPP_BLACKBELT, 7
+ object SPRITE_COOLTRAINER_M, 13, 5, STAY, RIGHT, 6, OPP_COOLTRAINER_M, 10
+ object SPRITE_HIKER, 10, 1, STAY, DOWN, 7, OPP_BLACKBELT, 8
+ object SPRITE_ROCKER, 2, 16, STAY, RIGHT, 8, OPP_TAMER, 4
+ object SPRITE_COOLTRAINER_M, 6, 5, STAY, DOWN, 9, OPP_COOLTRAINER_M, 1
+ object SPRITE_GYM_GUIDE, 16, 15, STAY, DOWN, 10 ; person
+ object SPRITE_POKE_BALL, 16, 9, STAY, NONE, 11, REVIVE
+
+ def_warps_to VIRIDIAN_GYM
diff --git a/data/maps/objects/ViridianMart.asm b/data/maps/objects/ViridianMart.asm
new file mode 100755
index 00000000..cbb5a4a3
--- /dev/null
+++ b/data/maps/objects/ViridianMart.asm
@@ -0,0 +1,15 @@
+ViridianMart_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 1, LAST_MAP
+ warp 4, 7, 1, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_CLERK, 0, 5, STAY, RIGHT, 1 ; person
+ object SPRITE_YOUNGSTER, 5, 5, WALK, UP_DOWN, 2 ; person
+ object SPRITE_COOLTRAINER_M, 3, 3, STAY, NONE, 3 ; person
+
+ def_warps_to VIRIDIAN_MART
diff --git a/data/maps/objects/ViridianNicknameHouse.asm b/data/maps/objects/ViridianNicknameHouse.asm
new file mode 100755
index 00000000..c2e6b70f
--- /dev/null
+++ b/data/maps/objects/ViridianNicknameHouse.asm
@@ -0,0 +1,16 @@
+ViridianNicknameHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 3, LAST_MAP
+ warp 3, 7, 3, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_BALDING_GUY, 5, 3, STAY, NONE, 1 ; person
+ object SPRITE_LITTLE_GIRL, 1, 4, WALK, UP_DOWN, 2 ; person
+ object SPRITE_BIRD, 5, 5, WALK, LEFT_RIGHT, 3 ; person
+ object SPRITE_CLIPBOARD, 4, 0, STAY, NONE, 4 ; person
+
+ def_warps_to VIRIDIAN_NICKNAME_HOUSE
diff --git a/data/maps/objects/ViridianPokecenter.asm b/data/maps/objects/ViridianPokecenter.asm
new file mode 100755
index 00000000..ef510f72
--- /dev/null
+++ b/data/maps/objects/ViridianPokecenter.asm
@@ -0,0 +1,17 @@
+ViridianPokecenter_Object:
+ db $0 ; border block
+
+ def_warps
+ warp 3, 7, 0, LAST_MAP
+ warp 4, 7, 0, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_NURSE, 3, 1, STAY, DOWN, 1 ; person
+ object SPRITE_GENTLEMAN, 10, 5, WALK, UP_DOWN, 2 ; person
+ object SPRITE_COOLTRAINER_M, 4, 3, STAY, UP, 3 ; person
+ object SPRITE_LINK_RECEPTIONIST, 11, 2, STAY, DOWN, 4 ; person
+ object SPRITE_CHANSEY, 4, 1, STAY, DOWN, 5 ; person
+
+ def_warps_to VIRIDIAN_POKECENTER
diff --git a/data/maps/objects/ViridianSchoolHouse.asm b/data/maps/objects/ViridianSchoolHouse.asm
new file mode 100755
index 00000000..632baaba
--- /dev/null
+++ b/data/maps/objects/ViridianSchoolHouse.asm
@@ -0,0 +1,15 @@
+ViridianSchoolHouse_Object:
+ db $a ; border block
+
+ def_warps
+ warp 2, 7, 2, LAST_MAP
+ warp 3, 7, 2, LAST_MAP
+
+ def_signs
+
+ def_objects
+ object SPRITE_BRUNETTE_GIRL, 3, 5, STAY, UP, 1 ; person
+ object SPRITE_COOLTRAINER_F, 4, 1, STAY, DOWN, 2 ; person
+ object SPRITE_LITTLE_GIRL, 4, 5, STAY, UP, 3 ; person
+
+ def_warps_to VIRIDIAN_SCHOOL_HOUSE
diff --git a/data/maps/objects/WardensHouse.asm b/data/maps/objects/WardensHouse.asm
new file mode 100755
index 00000000..68210d65
--- /dev/null
+++ b/data/maps/objects/WardensHouse.asm
@@ -0,0 +1,17 @@
+WardensHouse_Object:
+ db $17 ; border block
+
+ def_warps
+ warp 4, 7, 3, LAST_MAP
+ warp 5, 7, 3, LAST_MAP
+
+ def_signs
+ sign 4, 3, 4 ; FuchsiaHouse2Text4
+ sign 5, 3, 5 ; FuchsiaHouse2Text5
+
+ def_objects
+ object SPRITE_WARDEN, 2, 3, STAY, NONE, 1 ; person
+ object SPRITE_POKE_BALL, 8, 3, STAY, NONE, 2, RARE_CANDY
+ object SPRITE_BOULDER, 8, 4, STAY, BOULDER_MOVEMENT_BYTE_2, 3 ; person
+
+ def_warps_to WARDENS_HOUSE
diff --git a/data/maps/rest_house_maps.asm b/data/maps/rest_house_maps.asm
new file mode 100644
index 00000000..88f0845a
--- /dev/null
+++ b/data/maps/rest_house_maps.asm
@@ -0,0 +1,5 @@
+SafariZoneRestHouses:
+ db SAFARI_ZONE_WEST_REST_HOUSE
+ db SAFARI_ZONE_EAST_REST_HOUSE
+ db SAFARI_ZONE_NORTH_REST_HOUSE
+ db -1 ; end
diff --git a/data/maps/songs.asm b/data/maps/songs.asm
new file mode 100644
index 00000000..1b043bfa
--- /dev/null
+++ b/data/maps/songs.asm
@@ -0,0 +1,250 @@
+MapSongBanks::
+ db MUSIC_PALLET_TOWN, BANK(Music_PalletTown) ; PALLET_TOWN
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; VIRIDIAN_CITY
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; PEWTER_CITY
+ db MUSIC_CITIES2, BANK(Music_Cities2) ; CERULEAN_CITY
+ db MUSIC_LAVENDER, BANK(Music_Lavender) ; LAVENDER_TOWN
+ db MUSIC_VERMILION, BANK(Music_Vermilion) ; VERMILION_CITY
+ db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_CITY
+ db MUSIC_CITIES2, BANK(Music_Cities2) ; FUCHSIA_CITY
+ db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; CINNABAR_ISLAND
+ db MUSIC_INDIGO_PLATEAU, BANK(Music_IndigoPlateau) ; INDIGO_PLATEAU
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; SAFFRON_CITY
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; UNUSED_MAP_0B
+ db MUSIC_ROUTES1, BANK(Music_Routes1) ; ROUTE_1
+ db MUSIC_ROUTES1, BANK(Music_Routes1) ; ROUTE_2
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_3
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_4
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_5
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_6
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_7
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_8
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_9
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_10
+ db MUSIC_ROUTES4, BANK(Music_Routes4) ; ROUTE_11
+ db MUSIC_ROUTES4, BANK(Music_Routes4) ; ROUTE_12
+ db MUSIC_ROUTES4, BANK(Music_Routes4) ; ROUTE_13
+ db MUSIC_ROUTES4, BANK(Music_Routes4) ; ROUTE_14
+ db MUSIC_ROUTES4, BANK(Music_Routes4) ; ROUTE_15
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_16
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_17
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_18
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_19
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_20
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_21
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; ROUTE_22
+ db MUSIC_INDIGO_PLATEAU, BANK(Music_IndigoPlateau) ; ROUTE_23
+ db MUSIC_ROUTES2, BANK(Music_Routes2) ; ROUTE_24
+ db MUSIC_ROUTES2, BANK(Music_Routes2) ; ROUTE_25
+ db MUSIC_PALLET_TOWN, BANK(Music_PalletTown) ; REDS_HOUSE_1F
+ db MUSIC_PALLET_TOWN, BANK(Music_PalletTown) ; REDS_HOUSE_2F
+ db MUSIC_PALLET_TOWN, BANK(Music_PalletTown) ; BLUES_HOUSE
+ db MUSIC_OAKS_LAB, BANK(Music_OaksLab) ; OAKS_LAB
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; VIRIDIAN_POKECENTER
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; VIRIDIAN_MART
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; VIRIDIAN_SCHOOL_HOUSE
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; VIRIDIAN_NICKNAME_HOUSE
+ db MUSIC_GYM, BANK(Music_Gym) ; VIRIDIAN_GYM
+ db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; DIGLETTS_CAVE_ROUTE_2
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; VIRIDIAN_FOREST_NORTH_GATE
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_2_TRADE_HOUSE
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_2_GATE
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; VIRIDIAN_FOREST_SOUTH_GATE
+ db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; VIRIDIAN_FOREST
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; MUSEUM_1F
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; MUSEUM_2F
+ db MUSIC_GYM, BANK(Music_Gym) ; PEWTER_GYM
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; PEWTER_NIDORAN_HOUSE
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; PEWTER_MART
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; PEWTER_SPEECH_HOUSE
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; PEWTER_POKECENTER
+ db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; MT_MOON_1F
+ db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; MT_MOON_B1F
+ db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; MT_MOON_B2F
+ db MUSIC_CITIES2, BANK(Music_Cities2) ; CERULEAN_TRASHED_HOUSE
+ db MUSIC_CITIES2, BANK(Music_Cities2) ; CERULEAN_TRADE_HOUSE
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CERULEAN_POKECENTER
+ db MUSIC_GYM, BANK(Music_Gym) ; CERULEAN_GYM
+ db MUSIC_CITIES2, BANK(Music_Cities2) ; BIKE_SHOP
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CERULEAN_MART
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; MT_MOON_POKECENTER
+ db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; CERULEAN_TRASHED_HOUSE_COPY
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_5_GATE
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; UNDERGROUND_PATH_ROUTE_5
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; DAYCARE
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_6_GATE
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; UNDERGROUND_PATH_ROUTE_6
+ db MUSIC_VERMILION, BANK(Music_Vermilion) ; UNDERGROUND_PATH_ROUTE_6_COPY
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_7_GATE
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; UNDERGROUND_PATH_ROUTE_7
+ db MUSIC_CELADON, BANK(Music_Celadon) ; UNDERGROUND_PATH_ROUTE_7_COPY
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_8_GATE
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; UNDERGROUND_PATH_ROUTE_8
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; ROCK_TUNNEL_POKECENTER
+ db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; ROCK_TUNNEL_1F
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; POWER_PLANT
+ db MUSIC_VERMILION, BANK(Music_Vermilion) ; ROUTE_11_GATE_1F
+ db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; DIGLETTS_CAVE_ROUTE_11
+ db MUSIC_VERMILION, BANK(Music_Vermilion) ; ROUTE_11_GATE_2F
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_12_GATE_1F
+ db MUSIC_CITIES2, BANK(Music_Cities2) ; BILLS_HOUSE
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; VERMILION_POKECENTER
+ db MUSIC_VERMILION, BANK(Music_Vermilion) ; POKEMON_FAN_CLUB
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; VERMILION_MART
+ db MUSIC_GYM, BANK(Music_Gym) ; VERMILION_GYM
+ db MUSIC_VERMILION, BANK(Music_Vermilion) ; VERMILION_PIDGEY_HOUSE
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; VERMILION_DOCK
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_1F
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_2F
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_3F
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_B1F
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_BOW
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_KITCHEN
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_CAPTAINS_ROOM
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_1F_ROOMS
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_2F_ROOMS
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; SS_ANNE_B1F_ROOMS
+ db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; UNUSED_MAP_69
+ db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; UNUSED_MAP_6A
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; UNUSED_MAP_6B
+ db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; VICTORY_ROAD_1F
+ db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; UNUSED_MAP_6D
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; UNUSED_MAP_6E
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_6F
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_70
+ db MUSIC_INDIGO_PLATEAU, BANK(Music_IndigoPlateau) ; LANCES_ROOM
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; UNUSED_MAP_72
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; UNUSED_MAP_73
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; UNUSED_MAP_74
+ db MUSIC_SS_ANNE, BANK(Music_SSAnne) ; UNUSED_MAP_75
+ db MUSIC_PALLET_TOWN, BANK(Music_PalletTown) ; HALL_OF_FAME
+ db MUSIC_ROUTES1, BANK(Music_Routes1) ; UNDERGROUND_PATH_NORTH_SOUTH
+ db MUSIC_INDIGO_PLATEAU, BANK(Music_IndigoPlateau) ; CHAMPIONS_ROOM
+ db MUSIC_ROUTES1, BANK(Music_Routes1) ; UNDERGROUND_PATH_WEST_EAST
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_1F
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_2F
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_3F
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_4F
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_ROOF
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_ELEVATOR
+ db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_MANSION_1F
+ db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_MANSION_2F
+ db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_MANSION_3F
+ db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_MANSION_ROOF
+ db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_MANSION_ROOF_HOUSE
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_POKECENTER
+ db MUSIC_GYM, BANK(Music_Gym) ; CELADON_GYM
+ db MUSIC_GAME_CORNER, BANK(Music_GameCorner) ; GAME_CORNER
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CELADON_MART_5F
+ db MUSIC_CELADON, BANK(Music_Celadon) ; GAME_CORNER_PRIZE_ROOM
+ db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_DINER
+ db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_CHIEF_HOUSE
+ db MUSIC_CELADON, BANK(Music_Celadon) ; CELADON_HOTEL
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; LAVENDER_POKECENTER
+ db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_1F
+ db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_2F
+ db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_3F
+ db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_4F
+ db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_5F
+ db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_6F
+ db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; POKEMON_TOWER_7F
+ db MUSIC_LAVENDER, BANK(Music_Lavender) ; MR_FUJIS_HOUSE
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; LAVENDER_MART
+ db MUSIC_LAVENDER, BANK(Music_Lavender) ; LAVENDER_CUBONE_HOUSE
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; FUCHSIA_MART
+ db MUSIC_CITIES2, BANK(Music_Cities2) ; FUCHSIA_BILLS_GRANDPAS_HOUSE
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; FUCHSIA_POKECENTER
+ db MUSIC_CITIES2, BANK(Music_Cities2) ; WARDENS_HOUSE
+ db MUSIC_CITIES2, BANK(Music_Cities2) ; SAFARI_ZONE_GATE
+ db MUSIC_GYM, BANK(Music_Gym) ; FUCHSIA_GYM
+ db MUSIC_CITIES2, BANK(Music_Cities2) ; FUCHSIA_MEETING_ROOM
+ db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; SEAFOAM_ISLANDS_B1F
+ db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; SEAFOAM_ISLANDS_B2F
+ db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; SEAFOAM_ISLANDS_B3F
+ db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; SEAFOAM_ISLANDS_B4F
+ db MUSIC_CITIES2, BANK(Music_Cities2) ; VERMILION_OLD_ROD_HOUSE
+ db MUSIC_CITIES2, BANK(Music_Cities2) ; FUCHSIA_GOOD_ROD_HOUSE
+ db MUSIC_CINNABAR_MANSION, BANK(Music_CinnabarMansion) ; POKEMON_MANSION_1F
+ db MUSIC_GYM, BANK(Music_Gym) ; CINNABAR_GYM
+ db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; CINNABAR_LAB
+ db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; CINNABAR_LAB_TRADE_ROOM
+ db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; CINNABAR_LAB_METRONOME_ROOM
+ db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; CINNABAR_LAB_FOSSIL_ROOM
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CINNABAR_POKECENTER
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; CINNABAR_MART
+ db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; CINNABAR_MART_COPY
+ db MUSIC_INDIGO_PLATEAU, BANK(Music_IndigoPlateau) ; INDIGO_PLATEAU_LOBBY
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; COPYCATS_HOUSE_1F
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; COPYCATS_HOUSE_2F
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; FIGHTING_DOJO
+ db MUSIC_GYM, BANK(Music_Gym) ; SAFFRON_GYM
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; SAFFRON_PIDGEY_HOUSE
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; SAFFRON_MART
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_1F
+ db MUSIC_POKECENTER, BANK(Music_Pokecenter) ; SAFFRON_POKECENTER
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; MR_PSYCHICS_HOUSE
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_15_GATE_1F
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_15_GATE_2F
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_16_GATE_1F
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_16_GATE_2F
+ db MUSIC_CELADON, BANK(Music_Celadon) ; ROUTE_16_FLY_HOUSE
+ db MUSIC_CELADON, BANK(Music_Celadon) ; ROUTE_12_SUPER_ROD_HOUSE
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_18_GATE_1F
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_18_GATE_2F
+ db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; SEAFOAM_ISLANDS_1F
+ db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; ROUTE_22_GATE
+ db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; VICTORY_ROAD_2F
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; ROUTE_12_GATE_2F
+ db MUSIC_VERMILION, BANK(Music_Vermilion) ; VERMILION_TRADE_HOUSE
+ db MUSIC_DUNGEON2, BANK(Music_Dungeon2) ; DIGLETTS_CAVE
+ db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; VICTORY_ROAD_3F
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; ROCKET_HIDEOUT_B1F
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; ROCKET_HIDEOUT_B2F
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; ROCKET_HIDEOUT_B3F
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; ROCKET_HIDEOUT_B4F
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; ROCKET_HIDEOUT_ELEVATOR
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; UNUSED_MAP_CC
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; UNUSED_MAP_CD
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; UNUSED_MAP_CE
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_2F
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_3F
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_4F
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_5F
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_6F
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_7F
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_8F
+ db MUSIC_CINNABAR_MANSION, BANK(Music_CinnabarMansion) ; POKEMON_MANSION_2F
+ db MUSIC_CINNABAR_MANSION, BANK(Music_CinnabarMansion) ; POKEMON_MANSION_3F
+ db MUSIC_CINNABAR_MANSION, BANK(Music_CinnabarMansion) ; POKEMON_MANSION_B1F
+ db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_EAST
+ db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_NORTH
+ db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_WEST
+ db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_CENTER
+ db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_CENTER_REST_HOUSE
+ db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_SECRET_HOUSE
+ db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_WEST_REST_HOUSE
+ db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_EAST_REST_HOUSE
+ db MUSIC_SAFARI_ZONE, BANK(Music_SafariZone) ; SAFARI_ZONE_NORTH_REST_HOUSE
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; CERULEAN_CAVE_2F
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; CERULEAN_CAVE_B1F
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; CERULEAN_CAVE_1F
+ db MUSIC_CITIES2, BANK(Music_Cities2) ; NAME_RATERS_HOUSE
+ db MUSIC_CITIES1, BANK(Music_Cities1) ; CERULEAN_BADGE_HOUSE
+ db MUSIC_CINNABAR, BANK(Music_Cinnabar) ; UNUSED_MAP_E7
+ db MUSIC_DUNGEON3, BANK(Music_Dungeon3) ; ROCK_TUNNEL_B1F
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_9F
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_10F
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_11F
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SILPH_CO_ELEVATOR
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_ED
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_EE
+ db MUSIC_CELADON, BANK(Music_Celadon) ; TRADE_CENTER
+ db MUSIC_CELADON, BANK(Music_Celadon) ; COLOSSEUM
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_F1
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_F2
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_F3
+ db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; UNUSED_MAP_F4
+ db MUSIC_GYM, BANK(Music_Gym) ; LORELEIS_ROOM
+ db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; BRUNOS_ROOM
+ db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; AGATHAS_ROOM
+ db MUSIC_ROUTES3, BANK(Music_Routes3) ; BEACH_HOUSE
diff --git a/data/maps/special_warps.asm b/data/maps/special_warps.asm
new file mode 100755
index 00000000..80f88cc4
--- /dev/null
+++ b/data/maps/special_warps.asm
@@ -0,0 +1,91 @@
+; Format: (size 2 bytes)
+; 00: target map ID
+; 01: which dungeon warp in the source map was used
+DungeonWarpList:
+ db SEAFOAM_ISLANDS_B1F, 1
+ db SEAFOAM_ISLANDS_B1F, 2
+ db SEAFOAM_ISLANDS_B2F, 1
+ db SEAFOAM_ISLANDS_B2F, 2
+ db SEAFOAM_ISLANDS_B3F, 1
+ db SEAFOAM_ISLANDS_B3F, 2
+ db SEAFOAM_ISLANDS_B4F, 1
+ db SEAFOAM_ISLANDS_B4F, 2
+ db VICTORY_ROAD_2F, 2
+ db POKEMON_MANSION_1F, 1
+ db POKEMON_MANSION_1F, 2
+ db POKEMON_MANSION_2F, 3
+ db -1 ; end
+
+
+fly_warp: MACRO
+ event_displacement \1_WIDTH, \2, \3
+ db ((\3) & $01) ;sub-block Y
+ db ((\2) & $01) ;sub-block X
+ENDM
+
+DungeonWarpData:
+ fly_warp SEAFOAM_ISLANDS_B1F, 18, 7
+ fly_warp SEAFOAM_ISLANDS_B1F, 23, 7
+ fly_warp SEAFOAM_ISLANDS_B2F, 19, 7
+ fly_warp SEAFOAM_ISLANDS_B2F, 22, 7
+ fly_warp SEAFOAM_ISLANDS_B3F, 18, 7
+ fly_warp SEAFOAM_ISLANDS_B3F, 19, 7
+ fly_warp SEAFOAM_ISLANDS_B4F, 4, 14
+ fly_warp SEAFOAM_ISLANDS_B4F, 5, 14
+ fly_warp VICTORY_ROAD_2F, 22, 16
+ fly_warp POKEMON_MANSION_1F, 16, 14
+ fly_warp POKEMON_MANSION_1F, 16, 14
+ fly_warp POKEMON_MANSION_2F, 18, 14
+
+
+special_warp_spec: MACRO
+ db \1
+ fly_warp \1, \2, \3
+ db \4
+ENDM
+
+FirstMapSpec:
+ special_warp_spec REDS_HOUSE_2F, 3, 6, REDS_HOUSE_2
+TradeCenterSpec1:
+ special_warp_spec TRADE_CENTER, 3, 4, CLUB
+TradeCenterSpec2:
+ special_warp_spec TRADE_CENTER, 6, 4, CLUB
+ColosseumSpec1:
+ special_warp_spec COLOSSEUM, 3, 4, CLUB
+ColosseumSpec2:
+ special_warp_spec COLOSSEUM, 6, 4, CLUB
+
+
+fly_warp_spec: MACRO
+ db \1, 0
+ dw \2
+ENDM
+
+FlyWarpDataPtr:
+ fly_warp_spec PALLET_TOWN, .PalletTown
+ fly_warp_spec VIRIDIAN_CITY, .ViridianCity
+ fly_warp_spec PEWTER_CITY, .PewterCity
+ fly_warp_spec CERULEAN_CITY, .CeruleanCity
+ fly_warp_spec LAVENDER_TOWN, .LavenderTown
+ fly_warp_spec VERMILION_CITY, .VermilionCity
+ fly_warp_spec CELADON_CITY, .CeladonCity
+ fly_warp_spec FUCHSIA_CITY, .FuchsiaCity
+ fly_warp_spec CINNABAR_ISLAND, .CinnabarIsland
+ fly_warp_spec INDIGO_PLATEAU, .IndigoPlateau
+ fly_warp_spec SAFFRON_CITY, .SaffronCity
+ fly_warp_spec ROUTE_4, .Route4
+ fly_warp_spec ROUTE_10, .Route10
+
+.PalletTown: fly_warp PALLET_TOWN, 5, 6
+.ViridianCity: fly_warp VIRIDIAN_CITY, 23, 26
+.PewterCity: fly_warp PEWTER_CITY, 13, 26
+.CeruleanCity: fly_warp CERULEAN_CITY, 19, 18
+.LavenderTown: fly_warp LAVENDER_TOWN, 3, 6
+.VermilionCity: fly_warp VERMILION_CITY, 11, 4
+.CeladonCity: fly_warp CELADON_CITY, 41, 10
+.FuchsiaCity: fly_warp FUCHSIA_CITY, 19, 28
+.CinnabarIsland: fly_warp CINNABAR_ISLAND, 11, 12
+.IndigoPlateau: fly_warp INDIGO_PLATEAU, 9, 6
+.SaffronCity: fly_warp SAFFRON_CITY, 9, 30
+.Route4: fly_warp ROUTE_4, 11, 6
+.Route10: fly_warp ROUTE_10, 11, 20
diff --git a/data/maps/sprite_sets.asm b/data/maps/sprite_sets.asm
new file mode 100755
index 00000000..cce86d1a
--- /dev/null
+++ b/data/maps/sprite_sets.asm
@@ -0,0 +1,191 @@
+MapSpriteSets:
+ db $01 ; PALLET_TOWN
+ db $01 ; VIRIDIAN_CITY
+ db $02 ; PEWTER_CITY
+ db $02 ; CERULEAN_CITY
+ db $03 ; LAVENDER_TOWN
+ db $04 ; VERMILION_CITY
+ db $05 ; CELADON_CITY
+ db $0a ; FUCHSIA_CITY
+ db $01 ; CINNABAR_ISLAND
+ db $06 ; INDIGO_PLATEAU
+ db $07 ; SAFFRON_CITY
+ db $01 ; unused map ID
+ db $01 ; ROUTE_1
+ db $f1 ; ROUTE_2
+ db $02 ; ROUTE_3
+ db $02 ; ROUTE_4
+ db $f9 ; ROUTE_5
+ db $fa ; ROUTE_6
+ db $fb ; ROUTE_7
+ db $fc ; ROUTE_8
+ db $02 ; ROUTE_9
+ db $f2 ; ROUTE_10
+ db $f3 ; ROUTE_11
+ db $f4 ; ROUTE_12
+ db $08 ; ROUTE_13
+ db $08 ; ROUTE_14
+ db $f5 ; ROUTE_15
+ db $f6 ; ROUTE_16
+ db $09 ; ROUTE_17
+ db $f7 ; ROUTE_18
+ db $0a ; ROUTE_19
+ db $f8 ; ROUTE_20
+ db $01 ; ROUTE_21
+ db $01 ; ROUTE_22
+ db $06 ; ROUTE_23
+ db $02 ; ROUTE_24
+ db $02 ; ROUTE_25
+
+EAST_WEST EQU 1
+NORTH_SOUTH EQU 2
+
+; Format:
+; 00: determines whether the map is split EAST_WEST or NORTH_SOUTH
+; 01: coordinate of dividing line
+; 02: sprite set ID if in the West or North side
+; 03: sprite set ID if in the East or South side
+SplitMapSpriteSets:
+ db NORTH_SOUTH, 37, $02, $01 ; $f1
+ db NORTH_SOUTH, 50, $02, $03 ; $f2
+ db EAST_WEST, 57, $04, $08 ; $f3
+ db NORTH_SOUTH, 21, $03, $08 ; $f4
+ db EAST_WEST, 8, $0A, $08 ; $f5
+ db EAST_WEST, 24, $09, $05 ; $f6
+ db EAST_WEST, 34, $09, $0A ; $f7
+ db EAST_WEST, 53, $01, $0A ; $f8
+ db NORTH_SOUTH, 33, $02, $07 ; $f9
+ db NORTH_SOUTH, 2, $07, $04 ; $fa
+ db EAST_WEST, 17, $05, $07 ; $fb
+ db EAST_WEST, 3, $07, $03 ; $fc
+
+SpriteSets:
+; sprite set $01
+ db SPRITE_PIKACHU
+ db SPRITE_BLUE
+ db SPRITE_YOUNGSTER
+ db SPRITE_GIRL
+ db SPRITE_FISHER
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_GAMBLER
+ db SPRITE_OAK
+ db SPRITE_SWIMMER
+ db SPRITE_POKE_BALL
+ db SPRITE_GAMBLER_ASLEEP
+
+; sprite set $02
+ db SPRITE_PIKACHU
+ db SPRITE_YOUNGSTER
+ db SPRITE_ROCKET
+ db SPRITE_SUPER_NERD
+ db SPRITE_HIKER
+ db SPRITE_BLUE
+ db SPRITE_OFFICER_JENNY
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_POKE_BALL
+ db SPRITE_UNUSED_GAMBLER_ASLEEP_2
+
+; sprite set $03
+ db SPRITE_PIKACHU
+ db SPRITE_LITTLE_GIRL
+ db SPRITE_GIRL
+ db SPRITE_SUPER_NERD
+ db SPRITE_HIKER
+ db SPRITE_GAMBLER
+ db SPRITE_MONSTER
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_POKE_BALL
+ db SPRITE_UNUSED_GAMBLER_ASLEEP_2
+
+; sprite set $04
+ db SPRITE_PIKACHU
+ db SPRITE_OFFICER_JENNY
+ db SPRITE_SUPER_NERD
+ db SPRITE_YOUNGSTER
+ db SPRITE_GAMBLER
+ db SPRITE_MONSTER
+ db SPRITE_SAILOR
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_POKE_BALL
+ db SPRITE_UNUSED_GAMBLER_ASLEEP_2
+
+; sprite set $05
+ db SPRITE_PIKACHU
+ db SPRITE_LITTLE_GIRL
+ db SPRITE_LITTLE_BOY
+ db SPRITE_GIRL
+ db SPRITE_FISHER
+ db SPRITE_MIDDLE_AGED_MAN
+ db SPRITE_GRAMPS
+ db SPRITE_MONSTER
+ db SPRITE_ROCKET
+ db SPRITE_POKE_BALL
+ db SPRITE_SNORLAX
+
+; sprite set $06
+ db SPRITE_PIKACHU
+ db SPRITE_GYM_GUIDE
+ db SPRITE_MONSTER
+ db SPRITE_BLUE
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_SWIMMER
+ db SPRITE_GUARD
+ db SPRITE_GAMBLER
+ db SPRITE_POKE_BALL
+ db SPRITE_UNUSED_GAMBLER_ASLEEP_2
+
+; sprite set $07
+ db SPRITE_PIKACHU
+ db SPRITE_ROCKET
+ db SPRITE_SCIENTIST
+ db SPRITE_SILPH_WORKER
+ db SPRITE_ERIKA
+ db SPRITE_GENTLEMAN
+ db SPRITE_BIRD
+ db SPRITE_ROCKER
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_POKE_BALL
+ db SPRITE_UNUSED_GAMBLER_ASLEEP_2
+
+; sprite set $08
+ db SPRITE_PIKACHU
+ db SPRITE_BIKER
+ db SPRITE_SUPER_NERD
+ db SPRITE_MIDDLE_AGED_MAN
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_BEAUTY
+ db SPRITE_FISHER
+ db SPRITE_ROCKER
+ db SPRITE_POKE_BALL
+ db SPRITE_SNORLAX
+
+; sprite set $09
+ db SPRITE_PIKACHU
+ db SPRITE_BIKER
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_SILPH_WORKER
+ db SPRITE_FISHER
+ db SPRITE_ROCKER
+ db SPRITE_HIKER
+ db SPRITE_GAMBLER
+ db SPRITE_MIDDLE_AGED_MAN
+ db SPRITE_POKE_BALL
+ db SPRITE_SNORLAX
+
+; sprite set $0a
+ db SPRITE_PIKACHU
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_CHANSEY
+ db SPRITE_FISHER
+ db SPRITE_GAMBLER
+ db SPRITE_MONSTER
+ db SPRITE_SEEL
+ db SPRITE_SWIMMER
+ db SPRITE_YOUNGSTER
+ db SPRITE_POKE_BALL
+ db SPRITE_FOSSIL
diff --git a/data/maps/town_map_entries.asm b/data/maps/town_map_entries.asm
new file mode 100755
index 00000000..6e754558
--- /dev/null
+++ b/data/maps/town_map_entries.asm
@@ -0,0 +1,118 @@
+external_map: MACRO
+ dn \2, \1
+ dw \3
+ENDM
+
+; the appearance of towns and routes in the town map
+ExternalMapEntries:
+ ; x, y, name
+ external_map 2, 11, PalletTownName
+ external_map 2, 8, ViridianCityName
+ external_map 2, 3, PewterCityName
+ external_map 10, 2, CeruleanCityName
+ external_map 14, 5, LavenderTownName
+ external_map 10, 9, VermilionCityName
+ external_map 7, 5, CeladonCityName
+ external_map 8, 13, FuchsiaCityName
+ external_map 2, 15, CinnabarIslandName
+ external_map 0, 2, IndigoPlateauName
+ external_map 10, 5, SaffronCityName
+ external_map 0, 0, PalletTownName ; unused
+ external_map 2, 10, Route1Name
+ external_map 2, 6, Route2Name
+ external_map 4, 3, Route3Name
+ external_map 8, 2, Route4Name
+ external_map 10, 3, Route5Name
+ external_map 10, 8, Route6Name
+ external_map 8, 5, Route7Name
+ external_map 13, 5, Route8Name
+ external_map 13, 2, Route9Name
+ external_map 14, 4, Route10Name
+ external_map 12, 9, Route11Name
+ external_map 14, 9, Route12Name
+ external_map 13, 11, Route13Name
+ external_map 11, 12, Route14Name
+ external_map 10, 13, Route15Name
+ external_map 5, 5, Route16Name
+ external_map 4, 8, Route17Name
+ external_map 6, 13, Route18Name
+ external_map 6, 15, Route19Name
+ external_map 4, 15, Route20Name
+ external_map 2, 13, Route21Name
+ external_map 0, 8, Route22Name
+ external_map 0, 6, Route23Name
+ external_map 10, 1, Route24Name
+ external_map 11, 0, Route25Name
+
+
+internal_map: MACRO
+ db \1 + 1
+ dn \3, \2
+ dw \4
+ENDM
+
+; the appearance of buildings and dungeons in the town map
+InternalMapEntries:
+ ; maximum map id subject to this rule, x, y, name
+ internal_map OAKS_LAB, 2, 11, PalletTownName
+ internal_map VIRIDIAN_GYM, 2, 8, ViridianCityName
+ internal_map VIRIDIAN_FOREST_SOUTH_GATE, 2, 6, Route2Name
+ internal_map VIRIDIAN_FOREST, 2, 4, ViridianForestName
+ internal_map PEWTER_POKECENTER, 2, 3, PewterCityName
+ internal_map MT_MOON_B2F, 6, 2, MountMoonName
+ internal_map CERULEAN_MART, 10, 2, CeruleanCityName
+ internal_map MT_MOON_POKECENTER, 5, 2, Route4Name
+ internal_map CERULEAN_TRASHED_HOUSE_COPY, 10, 2, CeruleanCityName
+ internal_map DAYCARE, 10, 4, Route5Name
+ internal_map UNDERGROUND_PATH_ROUTE_6_COPY, 10, 6, Route6Name
+ internal_map UNDERGROUND_PATH_ROUTE_7_COPY, 9, 5, Route7Name
+ internal_map UNDERGROUND_PATH_ROUTE_8, 11, 5, Route8Name
+ internal_map ROCK_TUNNEL_1F, 14, 3, RockTunnelName
+ internal_map POWER_PLANT, 15, 4, PowerPlantName
+ internal_map ROUTE_11_GATE_2F, 13, 9, Route11Name
+ internal_map ROUTE_12_GATE_1F, 14, 7, Route12Name
+ internal_map BILLS_HOUSE, 12, 0, SeaCottageName
+ internal_map VERMILION_DOCK, 10, 9, VermilionCityName
+ internal_map SS_ANNE_B1F_ROOMS, 9, 10, SSAnneName
+ internal_map VICTORY_ROAD_1F, 0, 4, VictoryRoadName
+ internal_map HALL_OF_FAME, 0, 2, PokemonLeagueName
+ internal_map UNDERGROUND_PATH_NORTH_SOUTH, 10, 5, UndergroundPathName
+ internal_map CHAMPIONS_ROOM, 0, 2, PokemonLeagueName
+ internal_map UNDERGROUND_PATH_WEST_EAST, 10, 5, UndergroundPathName
+ internal_map CELADON_HOTEL, 7, 5, CeladonCityName
+ internal_map LAVENDER_POKECENTER, 14, 5, LavenderTownName
+ internal_map POKEMON_TOWER_7F, 15, 5, PokemonTowerName
+ internal_map LAVENDER_CUBONE_HOUSE, 14, 5, LavenderTownName
+ internal_map WARDENS_HOUSE, 8, 13, FuchsiaCityName
+ internal_map SAFARI_ZONE_GATE, 8, 12, SafariZoneName
+ internal_map FUCHSIA_MEETING_ROOM, 8, 13, FuchsiaCityName
+ internal_map SEAFOAM_ISLANDS_B4F, 5, 15, SeafoamIslandsName
+ internal_map VERMILION_OLD_ROD_HOUSE, 10, 9, VermilionCityName
+ internal_map FUCHSIA_GOOD_ROD_HOUSE, 8, 13, FuchsiaCityName
+ internal_map POKEMON_MANSION_1F, 2, 15, PokemonMansionName
+ internal_map CINNABAR_MART_COPY, 2, 15, CinnabarIslandName
+ internal_map INDIGO_PLATEAU_LOBBY, 0, 2, IndigoPlateauName
+ internal_map MR_PSYCHICS_HOUSE, 10, 5, SaffronCityName
+ internal_map ROUTE_15_GATE_2F, 9, 13, Route15Name
+ internal_map ROUTE_16_FLY_HOUSE, 4, 5, Route16Name
+ internal_map ROUTE_12_SUPER_ROD_HOUSE, 14, 10, Route12Name
+ internal_map ROUTE_18_GATE_2F, 7, 13, Route18Name
+ internal_map SEAFOAM_ISLANDS_1F, 5, 15, SeafoamIslandsName
+ internal_map ROUTE_22_GATE, 0, 7, Route22Name
+ internal_map VICTORY_ROAD_2F, 0, 4, VictoryRoadName
+ internal_map ROUTE_12_GATE_2F, 14, 7, Route12Name
+ internal_map VERMILION_TRADE_HOUSE, 10, 9, VermilionCityName
+ internal_map DIGLETTS_CAVE, 3, 4, DiglettsCaveName
+ internal_map VICTORY_ROAD_3F, 0, 4, VictoryRoadName
+ internal_map UNUSED_MAP_CE, 7, 5, RocketHQName
+ internal_map SILPH_CO_8F, 10, 5, SilphCoName
+ internal_map POKEMON_MANSION_B1F, 2, 15, PokemonMansionName
+ internal_map SAFARI_ZONE_NORTH_REST_HOUSE, 8, 12, SafariZoneName
+ internal_map CERULEAN_CAVE_1F, 9, 1, CeruleanCaveName
+ internal_map NAME_RATERS_HOUSE, 14, 5, LavenderTownName
+ internal_map CERULEAN_BADGE_HOUSE, 10, 2, CeruleanCityName
+ internal_map ROCK_TUNNEL_B1F, 14, 3, RockTunnelName
+ internal_map SILPH_CO_ELEVATOR, 10, 5, SilphCoName
+ internal_map AGATHAS_ROOM, 0, 2, PokemonLeagueName
+ internal_map BEACH_HOUSE, 6, 15, Route19Name
+ db -1 ; end
diff --git a/data/town_map_order.asm b/data/maps/town_map_order.asm
index a082c376..a082c376 100755
--- a/data/town_map_order.asm
+++ b/data/maps/town_map_order.asm
diff --git a/data/mart_inventories.asm b/data/mart_inventories.asm
deleted file mode 100755
index b821f4d7..00000000
--- a/data/mart_inventories.asm
+++ /dev/null
@@ -1,64 +0,0 @@
-; mart inventories are below
-; they are texts
-
-; Viridian
-ViridianCashierText::
- TX_MART POKE_BALL,POTION,ANTIDOTE,PARLYZ_HEAL,BURN_HEAL
-
-; Pewter
-PewterCashierText::
- TX_MART POKE_BALL,POTION,ESCAPE_ROPE,ANTIDOTE,BURN_HEAL,AWAKENING,PARLYZ_HEAL
-
-; Cerulean
-CeruleanCashierText::
- TX_MART POKE_BALL,POTION,ESCAPE_ROPE,REPEL,ANTIDOTE,BURN_HEAL,AWAKENING,PARLYZ_HEAL
-
-; Bike shop
- TX_MART BICYCLE
-
-; Vermilion
-VermilionCashierText::
- TX_MART POKE_BALL,SUPER_POTION,ICE_HEAL,AWAKENING,PARLYZ_HEAL,REPEL
-
-; Lavender
-LavenderCashierText::
- TX_MART GREAT_BALL,SUPER_POTION,REVIVE,ESCAPE_ROPE,SUPER_REPEL,ANTIDOTE,BURN_HEAL,ICE_HEAL,PARLYZ_HEAL
-
-; Celadon Dept. Store 2F (1)
-CeladonMart2Clerk1Text::
- TX_MART GREAT_BALL,SUPER_POTION,REVIVE,SUPER_REPEL,ANTIDOTE,BURN_HEAL,ICE_HEAL,AWAKENING,PARLYZ_HEAL
-
-; Celadon Dept. Store 2F (2)
-CeladonMart2Clerk2Text::
- TX_MART TM_32,TM_33,TM_02,TM_07,TM_37,TM_01,TM_05,TM_09,TM_17
-
-; Celadon Dept. Store 4F
-CeladonMart4ClerkText::
- TX_MART POKE_DOLL,FIRE_STONE,THUNDER_STONE,WATER_STONE,LEAF_STONE
-
-; Celadon Dept. Store 5F (1)
-CeladonMart5Clerk1Text::
- TX_MART X_ACCURACY,GUARD_SPEC,DIRE_HIT,X_ATTACK,X_DEFEND,X_SPEED,X_SPECIAL
-
-; Celadon Dept. Store 5F (2)
-CeladonMart5Clerk2Text::
- TX_MART HP_UP,PROTEIN,IRON,CARBOS,CALCIUM
-
-; Fuchsia
-FuchsiaCashierText::
- TX_MART ULTRA_BALL,GREAT_BALL,HYPER_POTION,REVIVE,FULL_HEAL,SUPER_REPEL
-
-; unused?
- TX_MART GREAT_BALL,HYPER_POTION,SUPER_POTION,FULL_HEAL,REVIVE
-
-; Cinnabar
-CinnabarCashierText::
- TX_MART ULTRA_BALL,GREAT_BALL,HYPER_POTION,MAX_REPEL,ESCAPE_ROPE,FULL_HEAL,REVIVE
-
-; Saffron
-SaffronCashierText::
- TX_MART GREAT_BALL,HYPER_POTION,MAX_REPEL,ESCAPE_ROPE,FULL_HEAL,REVIVE
-
-; Indigo
-IndigoCashierText::
- TX_MART ULTRA_BALL,GREAT_BALL,FULL_RESTORE,MAX_POTION,FULL_HEAL,REVIVE,MAX_REPEL
diff --git a/data/mon_party_sprites.asm b/data/mon_party_sprites.asm
deleted file mode 100755
index b94fa0d3..00000000
--- a/data/mon_party_sprites.asm
+++ /dev/null
@@ -1,77 +0,0 @@
-MonPartyData:
- dn SPRITE_GRASS, SPRITE_GRASS ;Bulbasaur/Ivysaur
- dn SPRITE_GRASS, SPRITE_MON ;Venusaur/Charmander
- dn SPRITE_MON, SPRITE_MON ;Charmeleon/Charizard
- dn SPRITE_WATER, SPRITE_WATER ;Squirtle/Wartortle
- dn SPRITE_WATER, SPRITE_BUG ;Blastoise/Caterpie
- dn SPRITE_BUG, SPRITE_BUG ;Metapod/Butterfree
- dn SPRITE_BUG, SPRITE_BUG ;Weedle/Kakuna
- dn SPRITE_BUG, SPRITE_BIRD_M ;Beedrill/Pidgey
- dn SPRITE_BIRD_M, SPRITE_BIRD_M ;Pidgeotto/Pidgeot
- dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Rattata/Raticate
- dn SPRITE_BIRD_M, SPRITE_BIRD_M ;Spearow/Fearow
- dn SPRITE_SNAKE, SPRITE_SNAKE ;Ekans/Arbok
- dn SPRITE_PIKACHU_FAMILY, SPRITE_PIKACHU_FAMILY ;Pikachu/Raichu
- dn SPRITE_MON, SPRITE_MON ;Sandshrew/Sandslash
- dn SPRITE_MON, SPRITE_MON ;NidoranF/Nidorina
- dn SPRITE_MON, SPRITE_MON ;Nidoqueen/NidoranM
- dn SPRITE_MON, SPRITE_MON ;Nidorino/Nidoking
- dn SPRITE_FAIRY, SPRITE_FAIRY ;Clefairy/Clefable
- dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Vulpix/Ninetales
- dn SPRITE_FAIRY, SPRITE_FAIRY ;Jigglypuff/Wigglytuff
- dn SPRITE_MON, SPRITE_MON ;Zubat/Golbat
- dn SPRITE_GRASS, SPRITE_GRASS ;Oddish/Gloom
- dn SPRITE_GRASS, SPRITE_BUG ;Vileplume/Paras
- dn SPRITE_BUG, SPRITE_BUG ;Parasect/Venonat
- dn SPRITE_BUG, SPRITE_MON ;Venomoth/Diglett
- dn SPRITE_MON, SPRITE_MON ;Dugtrio/Meowth
- dn SPRITE_MON, SPRITE_MON ;Persian/Psyduck
- dn SPRITE_MON, SPRITE_MON ;Golduck/Mankey
- dn SPRITE_MON, SPRITE_QUADRUPED ;Primeape/Growlithe
- dn SPRITE_QUADRUPED, SPRITE_MON ;Arcanine/Poliwag
- dn SPRITE_MON, SPRITE_MON ;Poliwhirl/Poliwrath
- dn SPRITE_MON, SPRITE_MON ;Abra/Kadabra
- dn SPRITE_MON, SPRITE_MON ;Alakazam/Machop
- dn SPRITE_MON, SPRITE_MON ;Machoke/Machamp
- dn SPRITE_GRASS, SPRITE_GRASS ;Bellsprout/Weepinbell
- dn SPRITE_GRASS, SPRITE_WATER ;Victreebel/Tentacool
- dn SPRITE_WATER, SPRITE_MON ;Tentacruel/Geodude
- dn SPRITE_MON, SPRITE_MON ;Graveler/Golem
- dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Ponyta/Rapidash
- dn SPRITE_QUADRUPED, SPRITE_MON ;Slowpoke/Slowbro
- dn SPRITE_BALL_M, SPRITE_BALL_M ;Magnemite/Magneton
- dn SPRITE_BIRD_M, SPRITE_BIRD_M ;Farfetch'd/Doduo
- dn SPRITE_BIRD_M, SPRITE_WATER ;Dodrio/Seel
- dn SPRITE_WATER, SPRITE_MON ;Dewgong/Grimer
- dn SPRITE_MON, SPRITE_HELIX ;Muk/Shellder
- dn SPRITE_HELIX, SPRITE_MON ;Cloyster/Gastly
- dn SPRITE_MON, SPRITE_MON ;Haunter/Gengar
- dn SPRITE_SNAKE, SPRITE_MON ;Onix/Drowzee
- dn SPRITE_MON, SPRITE_WATER ;Hypno/Krabby
- dn SPRITE_WATER, SPRITE_BALL_M ;Kingler/Voltorb
- dn SPRITE_BALL_M, SPRITE_GRASS ;Electrode/Exeggcute
- dn SPRITE_GRASS, SPRITE_MON ;Exeggutor/Cubone
- dn SPRITE_MON, SPRITE_MON ;Marowak/Hitmonlee
- dn SPRITE_MON, SPRITE_MON ;Hitmonchan/Lickitung
- dn SPRITE_MON, SPRITE_MON ;Koffing/Weezing
- dn SPRITE_QUADRUPED, SPRITE_MON ;Rhyhorn/Rhydon
- dn SPRITE_FAIRY, SPRITE_GRASS ;Chansey/Tangela
- dn SPRITE_MON, SPRITE_WATER ;Kangaskhan/Horsea
- dn SPRITE_WATER, SPRITE_WATER ;Seadra/Goldeen
- dn SPRITE_WATER, SPRITE_HELIX ;Seaking/Staryu
- dn SPRITE_HELIX, SPRITE_MON ;Starmie/Mr.Mime
- dn SPRITE_BUG, SPRITE_MON ;Scyther/Jynx
- dn SPRITE_MON, SPRITE_MON ;Electabuzz/Magmar
- dn SPRITE_BUG, SPRITE_QUADRUPED ;Pinsir/Tauros
- dn SPRITE_WATER, SPRITE_SNAKE ;Magikarp/Gyarados
- dn SPRITE_WATER, SPRITE_MON ;Lapras/Ditto
- dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Eevee/Vaporeon
- dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Jolteon/Flareon
- dn SPRITE_MON, SPRITE_HELIX ;Porygon/Omanyte
- dn SPRITE_HELIX, SPRITE_HELIX ;Omastar/Kabuto
- dn SPRITE_HELIX, SPRITE_BIRD_M ;Kabutops/Aerodactyl
- dn SPRITE_MON, SPRITE_BIRD_M ;Snorlax/Articuno
- dn SPRITE_BIRD_M, SPRITE_BIRD_M ;Zapdos/Moltres
- dn SPRITE_SNAKE, SPRITE_SNAKE ;Dratini/Dragonair
- dn SPRITE_SNAKE, SPRITE_MON ;Dragonite/Mewtwo
- dn SPRITE_MON, 0 ;Mew/Padding
diff --git a/data/moves.asm b/data/moves.asm
deleted file mode 100755
index 44859681..00000000
--- a/data/moves.asm
+++ /dev/null
@@ -1,178 +0,0 @@
-Moves:
-; Characteristics of each move.
-
-move: macro
- db \1 ; animation (interchangeable with move id)
- db \2 ; effect
- db \3 ; power
- db \4 ; type
- db \5 percent ; accuracy
- db \6 ; pp
-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
- move MEGA_PUNCH, NO_ADDITIONAL_EFFECT, 80, NORMAL, 85, 20
- move PAY_DAY, PAY_DAY_EFFECT, 40, NORMAL, 100, 20
- move FIRE_PUNCH, BURN_SIDE_EFFECT1, 75, FIRE, 100, 15
- move ICE_PUNCH, FREEZE_SIDE_EFFECT, 75, ICE, 100, 15
- move THUNDERPUNCH, PARALYZE_SIDE_EFFECT1, 75, ELECTRIC, 100, 15
- move SCRATCH, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35
- move VICEGRIP, NO_ADDITIONAL_EFFECT, 55, NORMAL, 100, 30
- move GUILLOTINE, OHKO_EFFECT, 1, NORMAL, 30, 5
- move RAZOR_WIND, CHARGE_EFFECT, 80, NORMAL, 75, 10
- move SWORDS_DANCE, ATTACK_UP2_EFFECT, 0, NORMAL, 100, 30
- move CUT, NO_ADDITIONAL_EFFECT, 50, NORMAL, 95, 30
- move GUST, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35
- move WING_ATTACK, NO_ADDITIONAL_EFFECT, 35, FLYING, 100, 35
- move WHIRLWIND, SWITCH_AND_TELEPORT_EFFECT, 0, NORMAL, 85, 20
- move FLY, FLY_EFFECT, 70, FLYING, 95, 15
- move BIND, TRAPPING_EFFECT, 15, NORMAL, 75, 20
- move SLAM, NO_ADDITIONAL_EFFECT, 80, NORMAL, 75, 20
- move VINE_WHIP, NO_ADDITIONAL_EFFECT, 35, GRASS, 100, 10
- move STOMP, FLINCH_SIDE_EFFECT2, 65, NORMAL, 100, 20
- move DOUBLE_KICK, ATTACK_TWICE_EFFECT, 30, FIGHTING, 100, 30
- move MEGA_KICK, NO_ADDITIONAL_EFFECT, 120, NORMAL, 75, 5
- move JUMP_KICK, JUMP_KICK_EFFECT, 70, FIGHTING, 95, 25
- move ROLLING_KICK, FLINCH_SIDE_EFFECT2, 60, FIGHTING, 85, 15
- move SAND_ATTACK, ACCURACY_DOWN1_EFFECT, 0, NORMAL, 100, 15
- move HEADBUTT, FLINCH_SIDE_EFFECT2, 70, NORMAL, 100, 15
- move HORN_ATTACK, NO_ADDITIONAL_EFFECT, 65, NORMAL, 100, 25
- move FURY_ATTACK, TWO_TO_FIVE_ATTACKS_EFFECT, 15, NORMAL, 85, 20
- move HORN_DRILL, OHKO_EFFECT, 1, NORMAL, 30, 5
- move TACKLE, NO_ADDITIONAL_EFFECT, 35, NORMAL, 95, 35
- move BODY_SLAM, PARALYZE_SIDE_EFFECT2, 85, NORMAL, 100, 15
- move WRAP, TRAPPING_EFFECT, 15, NORMAL, 85, 20
- move TAKE_DOWN, RECOIL_EFFECT, 90, NORMAL, 85, 20
- move THRASH, THRASH_PETAL_DANCE_EFFECT, 90, NORMAL, 100, 20
- move DOUBLE_EDGE, RECOIL_EFFECT, 100, NORMAL, 100, 15
- move TAIL_WHIP, DEFENSE_DOWN1_EFFECT, 0, NORMAL, 100, 30
- move POISON_STING, POISON_SIDE_EFFECT1, 15, POISON, 100, 35
- move TWINEEDLE, TWINEEDLE_EFFECT, 25, BUG, 100, 20
- move PIN_MISSILE, TWO_TO_FIVE_ATTACKS_EFFECT, 14, BUG, 85, 20
- move LEER, DEFENSE_DOWN1_EFFECT, 0, NORMAL, 100, 30
- move BITE, FLINCH_SIDE_EFFECT1, 60, NORMAL, 100, 25
- move GROWL, ATTACK_DOWN1_EFFECT, 0, NORMAL, 100, 40
- move ROAR, SWITCH_AND_TELEPORT_EFFECT, 0, NORMAL, 100, 20
- move SING, SLEEP_EFFECT, 0, NORMAL, 55, 15
- move SUPERSONIC, CONFUSION_EFFECT, 0, NORMAL, 55, 20
- move SONICBOOM, SPECIAL_DAMAGE_EFFECT, 1, NORMAL, 90, 20
- move DISABLE, DISABLE_EFFECT, 0, NORMAL, 55, 20
- move ACID, DEFENSE_DOWN_SIDE_EFFECT, 40, POISON, 100, 30
- move EMBER, BURN_SIDE_EFFECT1, 40, FIRE, 100, 25
- move FLAMETHROWER, BURN_SIDE_EFFECT1, 95, FIRE, 100, 15
- move MIST, MIST_EFFECT, 0, ICE, 100, 30
- move WATER_GUN, NO_ADDITIONAL_EFFECT, 40, WATER, 100, 25
- move HYDRO_PUMP, NO_ADDITIONAL_EFFECT, 120, WATER, 80, 5
- move SURF, NO_ADDITIONAL_EFFECT, 95, WATER, 100, 15
- move ICE_BEAM, FREEZE_SIDE_EFFECT, 95, ICE, 100, 10
- move BLIZZARD, FREEZE_SIDE_EFFECT, 120, ICE, 90, 5
- move PSYBEAM, CONFUSION_SIDE_EFFECT, 65, PSYCHIC, 100, 20
- move BUBBLEBEAM, SPEED_DOWN_SIDE_EFFECT, 65, WATER, 100, 20
- move AURORA_BEAM, ATTACK_DOWN_SIDE_EFFECT, 65, ICE, 100, 20
- move HYPER_BEAM, HYPER_BEAM_EFFECT, 150, NORMAL, 90, 5
- move PECK, NO_ADDITIONAL_EFFECT, 35, FLYING, 100, 35
- move DRILL_PECK, NO_ADDITIONAL_EFFECT, 80, FLYING, 100, 20
- move SUBMISSION, RECOIL_EFFECT, 80, FIGHTING, 80, 25
- move LOW_KICK, FLINCH_SIDE_EFFECT2, 50, FIGHTING, 90, 20
- move COUNTER, NO_ADDITIONAL_EFFECT, 1, FIGHTING, 100, 20
- move SEISMIC_TOSS, SPECIAL_DAMAGE_EFFECT, 1, FIGHTING, 100, 20
- move STRENGTH, NO_ADDITIONAL_EFFECT, 80, NORMAL, 100, 15
- move ABSORB, DRAIN_HP_EFFECT, 20, GRASS, 100, 20
- move MEGA_DRAIN, DRAIN_HP_EFFECT, 40, GRASS, 100, 10
- move LEECH_SEED, LEECH_SEED_EFFECT, 0, GRASS, 90, 10
- move GROWTH, SPECIAL_UP1_EFFECT, 0, NORMAL, 100, 40
- move RAZOR_LEAF, NO_ADDITIONAL_EFFECT, 55, GRASS, 95, 25
- move SOLARBEAM, CHARGE_EFFECT, 120, GRASS, 100, 10
- move POISONPOWDER, POISON_EFFECT, 0, POISON, 75, 35
- move STUN_SPORE, PARALYZE_EFFECT, 0, GRASS, 75, 30
- move SLEEP_POWDER, SLEEP_EFFECT, 0, GRASS, 75, 15
- move PETAL_DANCE, THRASH_PETAL_DANCE_EFFECT, 70, GRASS, 100, 20
- move STRING_SHOT, SPEED_DOWN1_EFFECT, 0, BUG, 95, 40
- move DRAGON_RAGE, SPECIAL_DAMAGE_EFFECT, 1, DRAGON, 100, 10
- move FIRE_SPIN, TRAPPING_EFFECT, 15, FIRE, 70, 15
- move THUNDERSHOCK, PARALYZE_SIDE_EFFECT1, 40, ELECTRIC, 100, 30
- move THUNDERBOLT, PARALYZE_SIDE_EFFECT1, 95, ELECTRIC, 100, 15
- move THUNDER_WAVE, PARALYZE_EFFECT, 0, ELECTRIC, 100, 20
- move THUNDER, PARALYZE_SIDE_EFFECT1, 120, ELECTRIC, 70, 10
- move ROCK_THROW, NO_ADDITIONAL_EFFECT, 50, ROCK, 65, 15
- move EARTHQUAKE, NO_ADDITIONAL_EFFECT, 100, GROUND, 100, 10
- move FISSURE, OHKO_EFFECT, 1, GROUND, 30, 5
- move DIG, CHARGE_EFFECT, 100, GROUND, 100, 10
- move TOXIC, POISON_EFFECT, 0, POISON, 85, 10
- move CONFUSION, CONFUSION_SIDE_EFFECT, 50, PSYCHIC, 100, 25
- move PSYCHIC_M, SPECIAL_DOWN_SIDE_EFFECT, 90, PSYCHIC, 100, 10
- move HYPNOSIS, SLEEP_EFFECT, 0, PSYCHIC, 60, 20
- move MEDITATE, ATTACK_UP1_EFFECT, 0, PSYCHIC, 100, 40
- move AGILITY, SPEED_UP2_EFFECT, 0, PSYCHIC, 100, 30
- move QUICK_ATTACK, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 30
- move RAGE, RAGE_EFFECT, 20, NORMAL, 100, 20
- move TELEPORT, SWITCH_AND_TELEPORT_EFFECT, 0, PSYCHIC, 100, 20
- move NIGHT_SHADE, SPECIAL_DAMAGE_EFFECT, 0, GHOST, 100, 15
- move MIMIC, MIMIC_EFFECT, 0, NORMAL, 100, 10
- move SCREECH, DEFENSE_DOWN2_EFFECT, 0, NORMAL, 85, 40
- move DOUBLE_TEAM, EVASION_UP1_EFFECT, 0, NORMAL, 100, 15
- move RECOVER, HEAL_EFFECT, 0, NORMAL, 100, 20
- move HARDEN, DEFENSE_UP1_EFFECT, 0, NORMAL, 100, 30
- move MINIMIZE, EVASION_UP1_EFFECT, 0, NORMAL, 100, 20
- move SMOKESCREEN, ACCURACY_DOWN1_EFFECT, 0, NORMAL, 100, 20
- move CONFUSE_RAY, CONFUSION_EFFECT, 0, GHOST, 100, 10
- move WITHDRAW, DEFENSE_UP1_EFFECT, 0, WATER, 100, 40
- move DEFENSE_CURL, DEFENSE_UP1_EFFECT, 0, NORMAL, 100, 40
- move BARRIER, DEFENSE_UP2_EFFECT, 0, PSYCHIC, 100, 30
- move LIGHT_SCREEN, LIGHT_SCREEN_EFFECT, 0, PSYCHIC, 100, 30
- move HAZE, HAZE_EFFECT, 0, ICE, 100, 30
- move REFLECT, REFLECT_EFFECT, 0, PSYCHIC, 100, 20
- move FOCUS_ENERGY, FOCUS_ENERGY_EFFECT, 0, NORMAL, 100, 30
- move BIDE, BIDE_EFFECT, 0, NORMAL, 100, 10
- move METRONOME, METRONOME_EFFECT, 0, NORMAL, 100, 10
- move MIRROR_MOVE, MIRROR_MOVE_EFFECT, 0, FLYING, 100, 20
- move SELFDESTRUCT, EXPLODE_EFFECT, 130, NORMAL, 100, 5
- move EGG_BOMB, NO_ADDITIONAL_EFFECT, 100, NORMAL, 75, 10
- move LICK, PARALYZE_SIDE_EFFECT2, 20, GHOST, 100, 30
- move SMOG, POISON_SIDE_EFFECT2, 20, POISON, 70, 20
- move SLUDGE, POISON_SIDE_EFFECT2, 65, POISON, 100, 20
- move BONE_CLUB, FLINCH_SIDE_EFFECT1, 65, GROUND, 85, 20
- move FIRE_BLAST, BURN_SIDE_EFFECT2, 120, FIRE, 85, 5
- move WATERFALL, NO_ADDITIONAL_EFFECT, 80, WATER, 100, 15
- move CLAMP, TRAPPING_EFFECT, 35, WATER, 75, 10
- move SWIFT, SWIFT_EFFECT, 60, NORMAL, 100, 20
- move SKULL_BASH, CHARGE_EFFECT, 100, NORMAL, 100, 15
- move SPIKE_CANNON, TWO_TO_FIVE_ATTACKS_EFFECT, 20, NORMAL, 100, 15
- move CONSTRICT, SPEED_DOWN_SIDE_EFFECT, 10, NORMAL, 100, 35
- move AMNESIA, SPECIAL_UP2_EFFECT, 0, PSYCHIC, 100, 20
- move KINESIS, ACCURACY_DOWN1_EFFECT, 0, PSYCHIC, 80, 15
- move SOFTBOILED, HEAL_EFFECT, 0, NORMAL, 100, 10
- move HI_JUMP_KICK, JUMP_KICK_EFFECT, 85, FIGHTING, 90, 20
- move GLARE, PARALYZE_EFFECT, 0, NORMAL, 75, 30
- move DREAM_EATER, DREAM_EATER_EFFECT, 100, PSYCHIC, 100, 15
- move POISON_GAS, POISON_EFFECT, 0, POISON, 55, 40
- move BARRAGE, TWO_TO_FIVE_ATTACKS_EFFECT, 15, NORMAL, 85, 20
- move LEECH_LIFE, DRAIN_HP_EFFECT, 20, BUG, 100, 15
- move LOVELY_KISS, SLEEP_EFFECT, 0, NORMAL, 75, 10
- move SKY_ATTACK, CHARGE_EFFECT, 140, FLYING, 90, 5
- move TRANSFORM, TRANSFORM_EFFECT, 0, NORMAL, 100, 10
- move BUBBLE, SPEED_DOWN_SIDE_EFFECT, 20, WATER, 100, 30
- move DIZZY_PUNCH, NO_ADDITIONAL_EFFECT, 70, NORMAL, 100, 10
- move SPORE, SLEEP_EFFECT, 0, GRASS, 100, 15
- move FLASH, ACCURACY_DOWN1_EFFECT, 0, NORMAL, 70, 20
- move PSYWAVE, SPECIAL_DAMAGE_EFFECT, 1, PSYCHIC, 80, 15
- move SPLASH, SPLASH_EFFECT, 0, NORMAL, 100, 40
- move ACID_ARMOR, DEFENSE_UP2_EFFECT, 0, POISON, 100, 40
- move CRABHAMMER, NO_ADDITIONAL_EFFECT, 90, WATER, 85, 10
- move EXPLOSION, EXPLODE_EFFECT, 170, NORMAL, 100, 5
- move FURY_SWIPES, TWO_TO_FIVE_ATTACKS_EFFECT, 18, NORMAL, 80, 15
- move BONEMERANG, ATTACK_TWICE_EFFECT, 50, GROUND, 90, 10
- move REST, HEAL_EFFECT, 0, PSYCHIC, 100, 10
- move ROCK_SLIDE, NO_ADDITIONAL_EFFECT, 75, ROCK, 90, 10
- move HYPER_FANG, FLINCH_SIDE_EFFECT1, 80, NORMAL, 90, 15
- move SHARPEN, ATTACK_UP1_EFFECT, 0, NORMAL, 100, 30
- move CONVERSION, CONVERSION_EFFECT, 0, NORMAL, 100, 30
- move TRI_ATTACK, NO_ADDITIONAL_EFFECT, 80, NORMAL, 100, 10
- move SUPER_FANG, SUPER_FANG_EFFECT, 1, NORMAL, 90, 10
- move SLASH, NO_ADDITIONAL_EFFECT, 70, NORMAL, 100, 20
- move SUBSTITUTE, SUBSTITUTE_EFFECT, 0, NORMAL, 100, 10
- move STRUGGLE, RECOIL_EFFECT, 50, NORMAL, 100, 10
diff --git a/data/moves/animations.asm b/data/moves/animations.asm
new file mode 100755
index 00000000..34191472
--- /dev/null
+++ b/data/moves/animations.asm
@@ -0,0 +1,1269 @@
+AttackAnimationPointers:
+ dw PoundAnim
+ dw KarateChopAnim
+ dw DoubleSlapAnim
+ dw CometPunchAnim
+ dw MegaPunchAnim
+ dw PayDayAnim
+ dw FirePunchAnim
+ dw IcePunchAnim
+ dw ThunderPunchAnim
+ dw ScratchAnim
+ dw VicegripAnim
+ dw GuillotineAnim
+ dw RazorWindAnim
+ dw SwordsDanceAnim
+ dw CutAnim
+ dw GustAnim
+ dw WingAttackAnim
+ dw WhirlwindAnim
+ dw FlyAnim
+ dw BindAnim
+ dw SlamAnim
+ dw VineWhipAnim
+ dw StompAnim
+ dw DoubleKickAnim
+ dw MegaKickAnim
+ dw JumpKickAnim
+ dw RollingKickAnim
+ dw SandAttackAnim
+ dw HeatButtAnim
+ dw HornAttackAnim
+ dw FuryAttackAnim
+ dw HornDrillAnim
+ dw TackleAnim
+ dw BodySlamAnim
+ dw WrapAnim
+ dw TakeDownAnim
+ dw ThrashAnim
+ dw DoubleEdgeAnim
+ dw TailWhipAnim
+ dw PoisonStingAnim
+ dw TwineedleAnim
+ dw PinMissileAnim
+ dw LeerAnim
+ dw BiteAnim
+ dw GrowlAnim
+ dw RoarAnim
+ dw SingAnim
+ dw SupersonicAnim
+ dw SonicBoomAnim
+ dw DisableAnim
+ dw AcidAnim
+ dw EmberAnim
+ dw FlamethrowerAnim
+ dw MistAnim
+ dw WaterGunAnim
+ dw HydroPumpAnim
+ dw SurfAnim
+ dw IceBeamAnim
+ dw BlizzardAnim
+ dw PsyBeamAnim
+ dw BubbleBeamAnim
+ dw AuroraBeamAnim
+ dw HyperBeamAnim
+ dw PeckAnim
+ dw DrillPeckAnim
+ dw SubmissionAnim
+ dw LowKickAnim
+ dw CounterAnim
+ dw SeismicTossAnim
+ dw StrengthAnim
+ dw AbsorbAnim
+ dw MegaDrainAnim
+ dw LeechSeedAnim
+ dw GrowthAnim
+ dw RazorLeafAnim
+ dw SolarBeamAnim
+ dw PoisonPowderAnim
+ dw StunSporeAnim
+ dw SleepPowderAnim
+ dw PetalDanceAnim
+ dw StringShotAnim
+ dw DragonRageAnim
+ dw FireSpinAnim
+ dw ThunderShockAnim
+ dw ThunderBoltAnim
+ dw ThunderWaveAnim
+ dw ThunderAnim
+ dw RockThrowAnim
+ dw EarthquakeAnim
+ dw FissureAnim
+ dw DigAnim
+ dw ToxicAnim
+ dw ConfusionAnim
+ dw PsychicAnim
+ dw HypnosisAnim
+ dw MeditateAnim
+ dw AgilityAnim
+ dw QuickAttackAnim
+ dw RageAnim
+ dw TeleportAnim
+ dw NightShadeAnim
+ dw MimicAnim
+ dw ScreechAnim
+ dw DoubleTeamAnim
+ dw RecoverAnim
+ dw HardenAnim
+ dw MinimizeAnim
+ dw SmokeScreenAnim
+ dw ConfuseRayAnim
+ dw WithdrawAnim
+ dw DefenseCurlAnim
+ dw BarrierAnim
+ dw LightScreenAnim
+ dw HazeAnim
+ dw ReflectAnim
+ dw FocusEnergyAnim
+ dw BideAnim
+ dw MetronomeAnim
+ dw MirrorMoveAnim
+ dw SelfdestructAnim
+ dw EggBombAnim
+ dw LickAnim
+ dw SmogAnim
+ dw SludgeAnim
+ dw BoneClubAnim
+ dw FireBlastAnim
+ dw WaterfallAnim
+ dw ClampAnim
+ dw SwiftAnim
+ dw SkullBashAnim
+ dw SpikeCannonAnim
+ dw ConstrictAnim
+ dw AmnesiaAnim
+ dw KinesisAnim
+ dw SoftboiledAnim
+ dw HiJumpKickAnim
+ dw GlareAnim
+ dw DreamEaterAnim
+ dw PoisonGasAnim
+ dw BarrageAnim
+ dw LeechLifeAnim
+ dw LovelyKissAnim
+ dw SkyAttackAnim
+ dw TransformAnim
+ dw BubbleAnim
+ dw DizzyPunchAnim
+ dw SporeAnim
+ dw FlashAnim
+ dw PsywaveAnim
+ dw SplashAnim
+ dw AcidArmorAnim
+ dw CrabHammerAnim
+ dw ExplosionAnim
+ dw FurySwipesAnim
+ dw BonemerangAnim
+ dw RestAnim
+ dw RockSlideAnim
+ dw HyperFangAnim
+ dw SharpenAnim
+ dw ConversionAnim
+ dw TriAttackAnim
+ dw SuperFangAnim
+ dw SlashAnim
+ dw SubstituteAnim
+ dw StruggleAnim
+ dw ShowPicAnim
+ dw EnemyFlashAnim
+ dw PlayerFlashAnim
+ dw EnemyHUDShakeAnim
+ dw TradeBallDropAnim
+ dw TradeBallAppear1Anim
+ dw TradeBallAppear2Anim
+ dw TradeBallPoofAnim
+ dw XStatItemAnim
+ dw XStatItemAnim
+ dw ShrinkingSquareAnim
+ dw ShrinkingSquareAnim
+ dw XStatItemBlackAnim
+ dw XStatItemBlackAnim
+ dw ShrinkingSquareBlackAnim
+ dw ShrinkingSquareBlackAnim
+ dw UnusedAnim
+ dw UnusedAnim
+ dw ParalyzeAnim
+ dw ParalyzeAnim
+ dw PoisonAnim
+ dw PoisonAnim
+ dw SleepPlayerAnim
+ dw SleepEnemyAnim
+ dw ConfusedPlayerAnim
+ dw ConfusedEnemyAnim
+ dw FaintAnim
+ dw BallTossAnim
+ dw BallShakeAnim
+ dw BallPoofAnim
+ dw BallBlockAnim
+ dw GreatTossAnim
+ dw UltraTossAnim
+ dw ShakeScreenAnim
+ dw HidePicAnim
+ dw ThrowRockAnim
+ dw ThrowBaitAnim
+
+; each animation is a list of subanimations
+; and/or special effects, terminated by -1
+
+;\1: sound_id
+;\2: special_effect_id or subanimation_id
+; if \2 is a subanimation_id:
+;\3: tileset_id
+;\4: delay
+battle_anim: MACRO
+ IF _NARG == 4
+ db (\3 << 6) | \4
+ db \1 - 1
+ db \2
+ ELSE
+ db \2
+ db \1 - 1
+ ENDC
+ENDM
+
+PoundAnim:
+StruggleAnim:
+ battle_anim POUND, SUBANIM_01, 0, 8
+ db -1 ; end
+
+KarateChopAnim:
+ battle_anim KARATE_CHOP, SUBANIM_03, 0, 8
+ db -1 ; end
+
+DoubleSlapAnim:
+ battle_anim DOUBLESLAP, SUBANIM_01, 0, 5
+ battle_anim DOUBLESLAP, SUBANIM_01, 0, 5
+ db -1 ; end
+
+CometPunchAnim:
+ battle_anim COMET_PUNCH, SUBANIM_02, 0, 4
+ battle_anim COMET_PUNCH, SUBANIM_02, 0, 4
+ db -1 ; end
+
+MegaPunchAnim:
+ battle_anim MEGA_PUNCH, SUBANIM_04, 1, 6
+ db -1 ; end
+
+PayDayAnim:
+ battle_anim POUND, SUBANIM_01, 0, 8
+ battle_anim PAY_DAY, SUBANIM_52, 0, 4
+ db -1 ; end
+
+FirePunchAnim:
+ battle_anim FIRE_PUNCH, SUBANIM_02, 0, 6
+ battle_anim NO_MOVE, SUBANIM_11, 1, 6
+ db -1 ; end
+
+IcePunchAnim:
+ battle_anim ICE_PUNCH, SUBANIM_02, 0, 6
+ battle_anim NO_MOVE, SUBANIM_2F, 0, 16
+ db -1 ; end
+
+ThunderPunchAnim:
+ battle_anim THUNDERPUNCH, SUBANIM_02, 0, 6
+ battle_anim NO_MOVE, SE_DARK_SCREEN_PALETTE
+ battle_anim NO_MOVE, SUBANIM_2B, 1, 6
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+ScratchAnim:
+ battle_anim SCRATCH, SUBANIM_0F, 0, 6
+ db -1 ; end
+
+VicegripAnim:
+ battle_anim VICEGRIP, SUBANIM_2A, 0, 8
+ db -1 ; end
+
+GuillotineAnim:
+ battle_anim GUILLOTINE, SUBANIM_2A, 0, 6
+ db -1 ; end
+
+RazorWindAnim:
+ battle_anim RAZOR_WIND, SUBANIM_16, 0, 4
+ db -1 ; end
+
+SwordsDanceAnim:
+ battle_anim SWORDS_DANCE, SUBANIM_18, 1, 6
+ battle_anim SWORDS_DANCE, SUBANIM_18, 1, 6
+ battle_anim SWORDS_DANCE, SUBANIM_18, 1, 6
+ db -1 ; end
+
+CutAnim:
+ battle_anim CUT, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SUBANIM_16, 0, 4
+ db -1 ; end
+
+GustAnim:
+ battle_anim GUST, SUBANIM_10, 1, 6
+ battle_anim NO_MOVE, SUBANIM_02, 0, 6
+ db -1 ; end
+
+WingAttackAnim:
+ battle_anim WING_ATTACK, SUBANIM_04, 1, 6
+ db -1 ; end
+
+WhirlwindAnim:
+ battle_anim WHIRLWIND, SUBANIM_10, 1, 6
+ battle_anim NO_MOVE, SE_SLIDE_ENEMY_MON_OFF
+ db -1 ; end
+
+FlyAnim:
+ battle_anim FLY, SUBANIM_04, 1, 6
+ battle_anim NO_MOVE, SE_SHOW_MON_PIC
+ db -1 ; end
+
+BindAnim:
+ battle_anim BIND, SUBANIM_23, 0, 4
+ battle_anim BIND, SUBANIM_23, 0, 4
+ db -1 ; end
+
+SlamAnim:
+ battle_anim SLAM, SUBANIM_02, 0, 6
+ db -1 ; end
+
+VineWhipAnim:
+ battle_anim VINE_WHIP, SUBANIM_16, 0, 1
+ battle_anim NO_MOVE, SUBANIM_01, 0, 8
+ db -1 ; end
+
+StompAnim:
+ battle_anim STOMP, SUBANIM_05, 1, 8
+ db -1 ; end
+
+DoubleKickAnim:
+ battle_anim DOUBLE_KICK, SUBANIM_01, 0, 8
+ battle_anim DOUBLE_KICK, SUBANIM_01, 0, 8
+ db -1 ; end
+
+MegaKickAnim:
+ battle_anim MEGA_KICK, SUBANIM_04, 1, 6
+ db -1 ; end
+
+JumpKickAnim:
+ battle_anim JUMP_KICK, SUBANIM_04, 1, 6
+ db -1 ; end
+
+RollingKickAnim:
+ battle_anim ROLLING_KICK, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SUBANIM_04, 1, 6
+ db -1 ; end
+
+SandAttackAnim:
+ battle_anim SAND_ATTACK, SUBANIM_28, 1, 6
+ db -1 ; end
+
+HeatButtAnim:
+ battle_anim HEADBUTT, SUBANIM_05, 1, 6
+ db -1 ; end
+
+HornAttackAnim:
+ battle_anim HORN_ATTACK, SUBANIM_45, 0, 6
+ battle_anim NO_MOVE, SUBANIM_05, 1, 6
+ db -1 ; end
+
+FuryAttackAnim:
+ battle_anim FURY_ATTACK, SUBANIM_46, 0, 2
+ battle_anim NO_MOVE, SUBANIM_46, 0, 2
+ db -1 ; end
+
+HornDrillAnim:
+ battle_anim HORN_DRILL, SUBANIM_05, 1, 2
+ battle_anim NO_MOVE, SUBANIM_05, 1, 2
+ battle_anim NO_MOVE, SUBANIM_05, 1, 2
+ battle_anim NO_MOVE, SUBANIM_05, 1, 2
+ battle_anim NO_MOVE, SUBANIM_05, 1, 2
+ db -1 ; end
+
+TackleAnim:
+ battle_anim LEECH_SEED, SE_MOVE_MON_HORIZONTALLY
+ battle_anim NO_MOVE, SE_RESET_MON_POSITION
+ db -1 ; end
+
+BodySlamAnim:
+ battle_anim LEECH_SEED, SE_MOVE_MON_HORIZONTALLY
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_RESET_MON_POSITION
+ db -1 ; end
+
+WrapAnim:
+ battle_anim WRAP, SUBANIM_23, 0, 4
+ battle_anim WRAP, SUBANIM_23, 0, 4
+ battle_anim WRAP, SUBANIM_23, 0, 4
+ db -1 ; end
+
+TakeDownAnim:
+ battle_anim LEECH_SEED, SE_MOVE_MON_HORIZONTALLY
+ battle_anim TAKE_DOWN, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_RESET_MON_POSITION
+ db -1 ; end
+
+ThrashAnim:
+ battle_anim THRASH, SUBANIM_04, 1, 6
+ db -1 ; end
+
+DoubleEdgeAnim:
+ battle_anim LEECH_SEED, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SUBANIM_2D, 0, 6
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_MOVE_MON_HORIZONTALLY
+ battle_anim DOUBLE_EDGE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_RESET_MON_POSITION
+ db -1 ; end
+
+TailWhipAnim:
+ battle_anim AMNESIA, SE_MOVE_MON_HORIZONTALLY
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim AMNESIA, SE_RESET_MON_POSITION
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim AMNESIA, SE_MOVE_MON_HORIZONTALLY
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim AMNESIA, SE_RESET_MON_POSITION
+ db -1 ; end
+
+PoisonStingAnim:
+ battle_anim POISON_STING, SUBANIM_00, 0, 6
+ db -1 ; end
+
+TwineedleAnim:
+ battle_anim TWINEEDLE, SUBANIM_01, 0, 5
+ battle_anim TWINEEDLE, SUBANIM_01, 0, 5
+ db -1 ; end
+
+PinMissileAnim:
+ battle_anim PIN_MISSILE, SUBANIM_01, 0, 3
+ db -1 ; end
+
+LeerAnim:
+ battle_anim LEECH_SEED, SE_DARK_SCREEN_PALETTE
+ battle_anim LEER, SE_DARK_SCREEN_FLASH
+ battle_anim LEER, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+BiteAnim:
+ battle_anim BITE, SUBANIM_02, 0, 8
+ db -1 ; end
+
+GrowlAnim:
+ battle_anim GROWL, SUBANIM_12, 1, 6
+ db -1 ; end
+
+RoarAnim:
+ battle_anim ROAR, SUBANIM_15, 1, 6
+ battle_anim ROAR, SUBANIM_15, 1, 6
+ battle_anim ROAR, SUBANIM_15, 1, 6
+ db -1 ; end
+
+SingAnim:
+ battle_anim SING, SUBANIM_12, 1, 6
+ battle_anim NO_MOVE, SUBANIM_40, 1, 16
+ battle_anim NO_MOVE, SUBANIM_40, 1, 16
+ db -1 ; end
+
+SupersonicAnim:
+ battle_anim SUPERSONIC, SUBANIM_31, 0, 6
+ db -1 ; end
+
+SonicBoomAnim:
+ battle_anim ROAR, SUBANIM_15, 1, 6
+ battle_anim ROAR, SUBANIM_15, 1, 6
+ battle_anim GUST, SUBANIM_10, 1, 6
+ battle_anim NO_MOVE, SUBANIM_05, 1, 6
+ db -1 ; end
+
+DisableAnim:
+ battle_anim LEECH_SEED, SE_DARK_SCREEN_PALETTE
+ battle_anim LEER, SE_DARK_SCREEN_FLASH
+ battle_anim LEER, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+AcidAnim:
+ battle_anim ACID, SUBANIM_13, 1, 6
+ battle_anim ACID, SUBANIM_14, 1, 6
+ db -1 ; end
+
+EmberAnim:
+ battle_anim EMBER, SUBANIM_11, 1, 6
+ db -1 ; end
+
+FlamethrowerAnim:
+ battle_anim FLAMETHROWER, SUBANIM_1F, 1, 6
+ battle_anim FLAMETHROWER, SUBANIM_0C, 1, 6
+ battle_anim FLAMETHROWER, SUBANIM_0D, 1, 6
+ db -1 ; end
+
+MistAnim:
+ battle_anim NO_MOVE, SE_LIGHT_SCREEN_PALETTE
+ battle_anim SURF, SE_WATER_DROPLETS_EVERYWHERE
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+WaterGunAnim:
+ battle_anim WATER_GUN, SUBANIM_2C, 0, 6
+ db -1 ; end
+
+HydroPumpAnim:
+ battle_anim HYDRO_PUMP, SUBANIM_1A, 0, 6
+ battle_anim HYDRO_PUMP, SUBANIM_1A, 0, 6
+ db -1 ; end
+
+SurfAnim:
+ battle_anim SURF, SE_WATER_DROPLETS_EVERYWHERE
+ battle_anim HYDRO_PUMP, SUBANIM_1A, 0, 6
+ db -1 ; end
+
+IceBeamAnim:
+ battle_anim ICE_BEAM, SUBANIM_2E, 0, 3
+ battle_anim NO_MOVE, SUBANIM_2F, 0, 16
+ db -1 ; end
+
+BlizzardAnim:
+ battle_anim BLIZZARD, SUBANIM_38, 0, 4
+ battle_anim HYDRO_PUMP, SUBANIM_38, 0, 4
+ db -1 ; end
+
+PsyBeamAnim:
+ battle_anim PSYBEAM, SUBANIM_2E, 0, 3
+ battle_anim NO_MOVE, SE_FLASH_SCREEN_LONG
+ db -1 ; end
+
+BubbleBeamAnim:
+ battle_anim BUBBLEBEAM, SUBANIM_35, 0, 18
+ db -1 ; end
+
+AuroraBeamAnim:
+ battle_anim AURORA_BEAM, SUBANIM_2E, 0, 3
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ db -1 ; end
+
+HyperBeamAnim:
+ battle_anim LEECH_SEED, SE_DARK_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_SPIRAL_BALLS_INWARD
+ battle_anim HYPER_BEAM, SUBANIM_2E, 0, 2
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim MEGA_PUNCH, SUBANIM_04, 1, 6
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+PeckAnim:
+ battle_anim PECK, SUBANIM_01, 0, 8
+ db -1 ; end
+
+DrillPeckAnim:
+ battle_anim DRILL_PECK, SUBANIM_04, 1, 6
+ db -1 ; end
+
+SubmissionAnim:
+ battle_anim SUBMISSION, SE_SLIDE_MON_OFF
+ battle_anim NO_MOVE, SUBANIM_01, 0, 6
+ battle_anim NO_MOVE, SE_SHOW_MON_PIC
+ db -1 ; end
+
+LowKickAnim:
+ battle_anim LOW_KICK, SE_SLIDE_MON_OFF
+ battle_anim NO_MOVE, SUBANIM_04, 1, 6
+ battle_anim NO_MOVE, SE_SHOW_MON_PIC
+ db -1 ; end
+
+CounterAnim:
+ battle_anim COUNTER, SE_SLIDE_MON_OFF
+ battle_anim NO_MOVE, SUBANIM_04, 1, 6
+ battle_anim NO_MOVE, SE_SHOW_MON_PIC
+ db -1 ; end
+
+SeismicTossAnim:
+ battle_anim NO_MOVE, SE_BLINK_ENEMY_MON
+ battle_anim BARRAGE, SUBANIM_4E, 1, 1
+ battle_anim NO_MOVE, SE_HIDE_ENEMY_MON_PIC
+ battle_anim NO_MOVE, SE_SLIDE_MON_OFF
+ battle_anim SEISMIC_TOSS, SUBANIM_4F, 1, 2
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_SHOW_MON_PIC
+ battle_anim SEISMIC_TOSS, SUBANIM_50, 1, 1
+ battle_anim NO_MOVE, SE_SHOW_ENEMY_MON_PIC
+ battle_anim NO_MOVE, SE_SHAKE_SCREEN
+ db -1 ; end
+
+StrengthAnim:
+ battle_anim LEECH_SEED, SE_MOVE_MON_HORIZONTALLY
+ battle_anim NO_MOVE, SE_RESET_MON_POSITION
+ battle_anim FIRE_PUNCH, SUBANIM_04, 1, 6
+ db -1 ; end
+
+AbsorbAnim:
+ battle_anim ABSORB, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SUBANIM_21, 0, 6
+ battle_anim NO_MOVE, SUBANIM_22, 0, 6
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+MegaDrainAnim:
+ battle_anim MEGA_DRAIN, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SUBANIM_21, 0, 6
+ battle_anim NO_MOVE, SUBANIM_22, 0, 6
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+LeechSeedAnim:
+ battle_anim LEECH_SEED, SUBANIM_1B, 1, 6
+ battle_anim STUN_SPORE, SUBANIM_1C, 1, 21
+ db -1 ; end
+
+GrowthAnim:
+ battle_anim GROWTH, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_SPIRAL_BALLS_INWARD
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+RazorLeafAnim:
+ battle_anim RAZOR_LEAF, SE_LEAVES_FALLING
+ battle_anim SWIFT, SUBANIM_44, 1, 1
+ battle_anim RAZOR_WIND, SUBANIM_16, 0, 1
+ db -1 ; end
+
+SolarBeamAnim:
+ battle_anim SOLARBEAM, SUBANIM_2E, 0, 6
+ battle_anim NO_MOVE, SUBANIM_01, 0, 6
+ db -1 ; end
+
+PoisonPowderAnim:
+ battle_anim POISONPOWDER, SUBANIM_36, 0, 6
+ db -1 ; end
+
+StunSporeAnim:
+ battle_anim STUN_SPORE, SUBANIM_36, 0, 6
+ db -1 ; end
+
+SleepPowderAnim:
+ battle_anim SLEEP_POWDER, SUBANIM_36, 0, 6
+ db -1 ; end
+
+PetalDanceAnim:
+ battle_anim PETAL_DANCE, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_PETALS_FALLING
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+StringShotAnim:
+ battle_anim STRING_SHOT, SUBANIM_37, 0, 8
+ db -1 ; end
+
+DragonRageAnim:
+ battle_anim DRAGON_RAGE, SUBANIM_1F, 1, 6
+ battle_anim NO_MOVE, SUBANIM_0C, 1, 6
+ battle_anim NO_MOVE, SUBANIM_0D, 1, 6
+ battle_anim NO_MOVE, SUBANIM_0E, 1, 6
+ db -1 ; end
+
+FireSpinAnim:
+ battle_anim FIRE_SPIN, SUBANIM_0C, 1, 6
+ battle_anim NO_MOVE, SUBANIM_0D, 1, 6
+ battle_anim NO_MOVE, SUBANIM_0E, 1, 6
+ db -1 ; end
+
+ThunderShockAnim:
+ battle_anim THUNDERSHOCK, SUBANIM_29, 1, 2
+ db -1 ; end
+
+ThunderBoltAnim:
+ battle_anim THUNDERBOLT, SUBANIM_29, 1, 1
+ battle_anim THUNDERBOLT, SUBANIM_29, 1, 1
+ db -1 ; end
+
+ThunderWaveAnim:
+ battle_anim THUNDER_WAVE, SUBANIM_29, 1, 2
+ battle_anim NO_MOVE, SUBANIM_23, 0, 2
+ battle_anim NO_MOVE, SUBANIM_23, 0, 4
+ db -1 ; end
+
+ThunderAnim:
+ battle_anim THUNDER, SE_DARK_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SUBANIM_2B, 1, 6
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim THUNDERBOLT, SUBANIM_29, 1, 2
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+RockThrowAnim:
+ battle_anim ROCK_THROW, SUBANIM_30, 0, 4
+ db -1 ; end
+
+EarthquakeAnim:
+ battle_anim EARTHQUAKE, SE_SHAKE_SCREEN
+ battle_anim EARTHQUAKE, SE_SHAKE_SCREEN
+ db -1 ; end
+
+FissureAnim:
+ battle_anim FISSURE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_SHAKE_SCREEN
+ battle_anim FISSURE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_SHAKE_SCREEN
+ db -1 ; end
+
+DigAnim:
+ battle_anim DIG, SUBANIM_04, 1, 6
+ battle_anim NO_MOVE, SE_SLIDE_MON_UP
+ db -1 ; end
+
+ToxicAnim:
+ battle_anim SURF, SE_WATER_DROPLETS_EVERYWHERE
+ battle_anim TOXIC, SUBANIM_14, 1, 6
+ db -1 ; end
+
+ConfusionAnim:
+ battle_anim CONFUSION, SE_FLASH_SCREEN_LONG
+ db -1 ; end
+
+PsychicAnim:
+ battle_anim PSYCHIC_M, SE_FLASH_SCREEN_LONG
+ battle_anim NO_MOVE, SE_WAVY_SCREEN
+ db -1 ; end
+
+HypnosisAnim:
+ battle_anim HYPNOSIS, SE_FLASH_SCREEN_LONG
+ db -1 ; end
+
+MeditateAnim:
+ battle_anim MEDITATE, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SUBANIM_43, 1, 6
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+AgilityAnim:
+ battle_anim AGILITY, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+QuickAttackAnim:
+ battle_anim QUICK_ATTACK, SE_SLIDE_MON_OFF
+ battle_anim NO_MOVE, SUBANIM_04, 1, 6
+ battle_anim NO_MOVE, SE_SHOW_MON_PIC
+ db -1 ; end
+
+RageAnim:
+ battle_anim RAGE, SUBANIM_01, 0, 6
+ db -1 ; end
+
+TeleportAnim:
+ battle_anim TELEPORT, SE_SQUISH_MON_PIC
+ battle_anim NO_MOVE, SE_SHOOT_BALLS_UPWARD
+ db -1 ; end
+
+NightShadeAnim:
+ battle_anim CONFUSION, SE_FLASH_SCREEN_LONG
+ battle_anim NO_MOVE, SE_WAVY_SCREEN
+ db -1 ; end
+
+MimicAnim:
+ battle_anim MIMIC, SUBANIM_21, 1, 6
+ battle_anim MIMIC, SUBANIM_22, 1, 6
+ db -1 ; end
+
+ScreechAnim:
+ battle_anim SCREECH, SUBANIM_12, 1, 6
+ db -1 ; end
+
+DoubleTeamAnim:
+ battle_anim NO_MOVE, SE_DARK_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ battle_anim DOUBLE_TEAM, SE_SHAKE_BACK_AND_FORTH
+ battle_anim NO_MOVE, SE_SHOW_MON_PIC
+ battle_anim BARRIER, SUBANIM_33, 1, 6
+ db -1 ; end
+
+RecoverAnim:
+ battle_anim RECOVER, SE_BLINK_MON
+ battle_anim NO_MOVE, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_SPIRAL_BALLS_INWARD
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+HardenAnim:
+ battle_anim HARDEN, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SUBANIM_43, 1, 6
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+MinimizeAnim:
+ battle_anim MINIMIZE, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_SPIRAL_BALLS_INWARD
+ battle_anim NO_MOVE, SE_MINIMIZE_MON
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+SmokeScreenAnim:
+ battle_anim SMOKESCREEN, SUBANIM_28, 1, 6
+ battle_anim NO_MOVE, SUBANIM_0A, 0, 4
+ battle_anim NO_MOVE, SE_DARKEN_MON_PALETTE
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_DARK_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_DARKEN_MON_PALETTE
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+ConfuseRayAnim:
+ battle_anim CONFUSE_RAY, SE_DARK_SCREEN_PALETTE
+ battle_anim NO_MOVE, SUBANIM_3E, 1, 6
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+WithdrawAnim:
+ battle_anim DEFENSE_CURL, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_SLIDE_MON_DOWN
+ battle_anim NO_MOVE, SUBANIM_51, 0, 6
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_SHOW_MON_PIC
+ db -1 ; end
+
+DefenseCurlAnim:
+ battle_anim DEFENSE_CURL, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SUBANIM_43, 0, 6
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+BarrierAnim:
+ battle_anim BARRIER, SUBANIM_33, 1, 6
+ battle_anim BARRIER, SUBANIM_33, 1, 6
+ db -1 ; end
+
+LightScreenAnim:
+ battle_anim NO_MOVE, SE_LIGHT_SCREEN_PALETTE
+ battle_anim LIGHT_SCREEN, SUBANIM_33, 1, 6
+ battle_anim LIGHT_SCREEN, SUBANIM_33, 1, 6
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+HazeAnim:
+ battle_anim NO_MOVE, SE_DARKEN_MON_PALETTE
+ battle_anim SURF, SE_WATER_DROPLETS_EVERYWHERE
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+ReflectAnim:
+ battle_anim NO_MOVE, SE_DARK_SCREEN_PALETTE
+ battle_anim REFLECT, SUBANIM_33, 1, 6
+ battle_anim REFLECT, SUBANIM_33, 1, 6
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+FocusEnergyAnim:
+ battle_anim FOCUS_ENERGY, SE_SPIRAL_BALLS_INWARD
+ db -1 ; end
+
+BideAnim:
+ battle_anim BIDE, SUBANIM_04, 1, 6
+ db -1 ; end
+
+MetronomeAnim:
+ battle_anim AMNESIA, SE_MOVE_MON_HORIZONTALLY
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim AMNESIA, SE_RESET_MON_POSITION
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim AMNESIA, SE_MOVE_MON_HORIZONTALLY
+ battle_anim NO_MOVE, SE_DELAY_ANIMATION_10
+ battle_anim AMNESIA, SE_RESET_MON_POSITION
+ db -1 ; end
+
+MirrorMoveAnim:
+ battle_anim MIRROR_MOVE, SUBANIM_01, 0, 8
+ db -1 ; end
+
+SelfdestructAnim:
+ battle_anim SELFDESTRUCT, SUBANIM_34, 1, 3
+ db -1 ; end
+
+EggBombAnim:
+ battle_anim EGG_BOMB, SUBANIM_41, 1, 4
+ battle_anim EGG_BOMB, SUBANIM_42, 1, 4
+ db -1 ; end
+
+LickAnim:
+ battle_anim SLUDGE, SUBANIM_14, 1, 6
+ db -1 ; end
+
+SmogAnim:
+ battle_anim LEECH_SEED, SE_DARKEN_MON_PALETTE
+ battle_anim SMOG, SUBANIM_19, 1, 6
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+SludgeAnim:
+ battle_anim SLUDGE, SUBANIM_13, 1, 6
+ battle_anim SLUDGE, SUBANIM_14, 1, 6
+ db -1 ; end
+
+BoneClubAnim:
+ battle_anim BONE_CLUB, SUBANIM_02, 0, 8
+ db -1 ; end
+
+FireBlastAnim:
+ battle_anim FIRE_BLAST, SUBANIM_1F, 1, 6
+ battle_anim NO_MOVE, SUBANIM_20, 1, 6
+ battle_anim NO_MOVE, SUBANIM_20, 1, 6
+ battle_anim NO_MOVE, SUBANIM_0C, 1, 6
+ battle_anim NO_MOVE, SUBANIM_0D, 1, 6
+ db -1 ; end
+
+WaterfallAnim:
+ battle_anim LEECH_SEED, SE_SLIDE_MON_DOWN
+ battle_anim HYDRO_PUMP, SUBANIM_1A, 0, 6
+ battle_anim NO_MOVE, SUBANIM_02, 0, 8
+ battle_anim NO_MOVE, SE_SLIDE_MON_UP
+ db -1 ; end
+
+ClampAnim:
+ battle_anim CLAMP, SUBANIM_2A, 0, 8
+ battle_anim CONSTRICT, SUBANIM_23, 0, 6
+ battle_anim CONSTRICT, SUBANIM_23, 0, 6
+ db -1 ; end
+
+SwiftAnim:
+ battle_anim SWIFT, SUBANIM_3F, 1, 3
+ db -1 ; end
+
+SkullBashAnim:
+ battle_anim SKULL_BASH, SUBANIM_05, 1, 6
+ db -1 ; end
+
+SpikeCannonAnim:
+ battle_anim SPIKE_CANNON, SUBANIM_04, 1, 4
+ db -1 ; end
+
+ConstrictAnim:
+ battle_anim CONSTRICT, SUBANIM_23, 0, 6
+ battle_anim CONSTRICT, SUBANIM_23, 0, 6
+ battle_anim CONSTRICT, SUBANIM_23, 0, 6
+ db -1 ; end
+
+AmnesiaAnim:
+ battle_anim AMNESIA, SUBANIM_25, 0, 8
+ battle_anim AMNESIA, SUBANIM_25, 0, 8
+ db -1 ; end
+
+KinesisAnim:
+ battle_anim KINESIS, SUBANIM_01, 0, 8
+ db -1 ; end
+
+SoftboiledAnim:
+ battle_anim LEECH_SEED, SE_SLIDE_MON_HALF_OFF
+ battle_anim SOFTBOILED, SUBANIM_4C, 0, 8
+ battle_anim NO_MOVE, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_SPIRAL_BALLS_INWARD
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_SHOW_MON_PIC
+ db -1 ; end
+
+HiJumpKickAnim:
+ battle_anim HI_JUMP_KICK, SUBANIM_04, 1, 6
+ db -1 ; end
+
+GlareAnim:
+ battle_anim LEECH_SEED, SE_DARK_SCREEN_PALETTE
+ battle_anim GLARE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+DreamEaterAnim:
+ battle_anim DREAM_EATER, SE_FLASH_SCREEN_LONG
+ battle_anim DREAM_EATER, SE_DARK_SCREEN_PALETTE
+ battle_anim DREAM_EATER, SUBANIM_02, 0, 8
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+PoisonGasAnim:
+ battle_anim POISON_GAS, SUBANIM_19, 1, 6
+ db -1 ; end
+
+BarrageAnim:
+ battle_anim BARRAGE, SUBANIM_41, 1, 3
+ battle_anim NO_MOVE, SUBANIM_55, 0, 5
+ db -1 ; end
+
+LeechLifeAnim:
+ battle_anim LEECH_LIFE, SUBANIM_02, 0, 8
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SUBANIM_21, 0, 6
+ battle_anim NO_MOVE, SUBANIM_22, 0, 6
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ db -1 ; end
+
+LovelyKissAnim:
+ battle_anim LOVELY_KISS, SUBANIM_12, 0, 6
+ db -1 ; end
+
+SkyAttackAnim:
+ battle_anim SKY_ATTACK, SE_SQUISH_MON_PIC
+ battle_anim NO_MOVE, SE_SHOOT_BALLS_UPWARD
+ battle_anim HI_JUMP_KICK, SUBANIM_04, 1, 6
+ battle_anim NO_MOVE, SE_SHOW_MON_PIC
+ db -1 ; end
+
+TransformAnim:
+ battle_anim TRANSFORM, SUBANIM_21, 1, 6
+ battle_anim TRANSFORM, SUBANIM_22, 1, 4
+ battle_anim NO_MOVE, SUBANIM_47, 0, 8
+ battle_anim NO_MOVE, SE_TRANSFORM_MON
+ db -1 ; end
+
+BubbleAnim:
+ battle_anim BUBBLE, SUBANIM_35, 0, 22
+ db -1 ; end
+
+DizzyPunchAnim:
+ battle_anim DIZZY_PUNCH, SUBANIM_17, 0, 6
+ battle_anim DIZZY_PUNCH, SUBANIM_17, 0, 6
+ battle_anim DIZZY_PUNCH, SUBANIM_17, 0, 6
+ battle_anim DOUBLESLAP, SUBANIM_02, 0, 6
+ db -1 ; end
+
+SporeAnim:
+ battle_anim SPORE, SUBANIM_36, 0, 6
+ db -1 ; end
+
+FlashAnim:
+ battle_anim LEECH_SEED, SE_LIGHT_SCREEN_PALETTE
+ battle_anim GLARE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+PsywaveAnim:
+ battle_anim SUPERSONIC, SUBANIM_31, 0, 6
+ battle_anim CONFUSION, SE_WAVY_SCREEN
+ db -1 ; end
+
+SplashAnim:
+ battle_anim SPLASH, SE_BOUNCE_UP_AND_DOWN
+ db -1 ; end
+
+AcidArmorAnim:
+ battle_anim ACID_ARMOR, SE_SLIDE_MON_DOWN_AND_HIDE
+ db -1 ; end
+
+CrabHammerAnim:
+ battle_anim CRABHAMMER, SUBANIM_05, 1, 6
+ battle_anim NO_MOVE, SUBANIM_2A, 0, 6
+ db -1 ; end
+
+ExplosionAnim:
+ battle_anim EXPLOSION, SUBANIM_34, 1, 3
+ db -1 ; end
+
+FurySwipesAnim:
+ battle_anim FURY_SWIPES, SUBANIM_0F, 0, 4
+ db -1 ; end
+
+BonemerangAnim:
+ battle_anim BONEMERANG, SUBANIM_02, 0, 6
+ db -1 ; end
+
+RestAnim:
+ battle_anim REST, SUBANIM_3A, 0, 16
+ battle_anim REST, SUBANIM_3A, 0, 16
+ db -1 ; end
+
+RockSlideAnim:
+ battle_anim ROCK_SLIDE, SUBANIM_1D, 0, 4
+ battle_anim ROCK_SLIDE, SUBANIM_1E, 0, 3
+ battle_anim HYPER_FANG, SUBANIM_04, 1, 6
+ db -1 ; end
+
+HyperFangAnim:
+ battle_anim HYPER_FANG, SUBANIM_02, 0, 6
+ db -1 ; end
+
+SharpenAnim:
+ battle_anim SHARPEN, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SUBANIM_43, 1, 6
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+ConversionAnim:
+ battle_anim CONVERSION, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SUBANIM_21, 1, 6
+ battle_anim NO_MOVE, SUBANIM_22, 1, 6
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ db -1 ; end
+
+TriAttackAnim:
+ battle_anim TRI_ATTACK, SE_DARK_SCREEN_FLASH
+ battle_anim NO_MOVE, SUBANIM_4D, 1, 6
+ battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH
+ db -1 ; end
+
+SuperFangAnim:
+ battle_anim LEECH_SEED, SE_DARK_SCREEN_PALETTE
+ battle_anim SUPER_FANG, SUBANIM_04, 1, 6
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+SlashAnim:
+ battle_anim SLASH, SUBANIM_0F, 0, 6
+ db -1 ; end
+
+SubstituteAnim:
+ battle_anim SUBSTITUTE, SE_SLIDE_MON_OFF
+ battle_anim NO_MOVE, SUBANIM_47, 0, 8
+ battle_anim NO_MOVE, SE_SUBSTITUTE_MON
+ db -1 ; end
+
+BallTossAnim:
+ battle_anim NO_MOVE, SUBANIM_06, 0, 3
+ db -1 ; end
+
+GreatTossAnim:
+ battle_anim NO_MOVE, SUBANIM_07, 0, 3
+ db -1 ; end
+
+UltraTossAnim:
+ battle_anim NO_MOVE, SUBANIM_08, 0, 2
+ db -1 ; end
+
+BallShakeAnim:
+ battle_anim NO_MOVE, SUBANIM_09, 0, 4
+ db -1 ; end
+
+BallPoofAnim:
+ battle_anim NO_MOVE, SUBANIM_0A, 0, 4
+ db -1 ; end
+
+ShowPicAnim:
+ battle_anim NO_MOVE, SE_SHOW_ENEMY_MON_PIC
+ db -1 ; end
+
+HidePicAnim:
+ battle_anim NO_MOVE, SE_HIDE_ENEMY_MON_PIC
+ db -1 ; end
+
+EnemyFlashAnim:
+ battle_anim NO_MOVE, SE_SHOW_MON_PIC
+ db -1 ; end
+
+PlayerFlashAnim:
+ battle_anim NO_MOVE, SE_FLASH_MON_PIC
+ db -1 ; end
+
+EnemyHUDShakeAnim:
+ battle_anim NO_MOVE, SE_SHAKE_ENEMY_HUD
+ db -1 ; end
+
+TradeBallDropAnim:
+ battle_anim NO_MOVE, SUBANIM_48, 2, 6
+ db -1 ; end
+
+TradeBallAppear1Anim:
+ battle_anim NO_MOVE, SUBANIM_49, 2, 4
+ db -1 ; end
+
+TradeBallAppear2Anim:
+ battle_anim NO_MOVE, SUBANIM_4A, 2, 6
+ db -1 ; end
+
+TradeBallPoofAnim:
+ battle_anim NO_MOVE, SUBANIM_4B, 2, 6
+ db -1 ; end
+
+XStatItemAnim:
+ battle_anim NO_MOVE, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_SPIRAL_BALLS_INWARD
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+ShrinkingSquareAnim:
+ battle_anim NO_MOVE, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SUBANIM_43, 1, 6
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+XStatItemBlackAnim:
+ battle_anim NO_MOVE, SE_DARKEN_MON_PALETTE
+ battle_anim NO_MOVE, SE_SPIRAL_BALLS_INWARD
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+ShrinkingSquareBlackAnim:
+ battle_anim NO_MOVE, SE_DARKEN_MON_PALETTE
+ battle_anim NO_MOVE, SUBANIM_43, 1, 6
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+UnusedAnim:
+ battle_anim NO_MOVE, SE_LIGHT_SCREEN_PALETTE
+ battle_anim NO_MOVE, SE_SHOOT_MANY_BALLS_UPWARD
+ battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE
+ db -1 ; end
+
+ParalyzeAnim:
+ battle_anim BIND, SUBANIM_24, 0, 4
+ battle_anim BIND, SUBANIM_24, 0, 4
+ db -1 ; end
+
+PoisonAnim:
+ battle_anim BIND, SUBANIM_27, 0, 8
+ battle_anim BIND, SUBANIM_27, 0, 8
+ db -1 ; end
+
+SleepPlayerAnim:
+ battle_anim REST, SUBANIM_3A, 0, 16
+ battle_anim REST, SUBANIM_3A, 0, 16
+ db -1 ; end
+
+SleepEnemyAnim:
+ battle_anim REST, SUBANIM_3B, 0, 16
+ battle_anim REST, SUBANIM_3B, 0, 16
+ db -1 ; end
+
+ConfusedPlayerAnim:
+ battle_anim AMNESIA, SUBANIM_25, 0, 8
+ battle_anim AMNESIA, SUBANIM_25, 0, 8
+ db -1 ; end
+
+ConfusedEnemyAnim:
+ battle_anim AMNESIA, SUBANIM_26, 0, 8
+ battle_anim AMNESIA, SUBANIM_26, 0, 8
+ db -1 ; end
+
+BallBlockAnim:
+ battle_anim NO_MOVE, SUBANIM_0B, 0, 3
+ db -1 ; end
+
+FaintAnim:
+ battle_anim DIG, SE_SLIDE_MON_DOWN
+ db -1 ; end
+
+ShakeScreenAnim:
+ battle_anim NO_MOVE, SE_SHAKE_SCREEN
+ db -1 ; end
+
+ThrowRockAnim:
+ battle_anim BARRAGE, SUBANIM_53, 0, 3
+ db -1 ; end
+
+ThrowBaitAnim:
+ battle_anim BARRAGE, SUBANIM_54, 0, 3
+ db -1 ; end
diff --git a/data/moves/effects_pointers.asm b/data/moves/effects_pointers.asm
new file mode 100644
index 00000000..a5e3d852
--- /dev/null
+++ b/data/moves/effects_pointers.asm
@@ -0,0 +1,88 @@
+MoveEffectPointerTable:
+; entries correspond to *_EFFECT constants
+ dw SleepEffect ; EFFECT_01
+ dw PoisonEffect ; POISON_SIDE_EFFECT1
+ dw DrainHPEffect ; DRAIN_HP_EFFECT
+ dw FreezeBurnParalyzeEffect ; BURN_SIDE_EFFECT1
+ dw FreezeBurnParalyzeEffect ; FREEZE_SIDE_EFFECT
+ dw FreezeBurnParalyzeEffect ; PARALYZE_SIDE_EFFECT1
+ dw ExplodeEffect ; EXPLODE_EFFECT
+ dw DrainHPEffect ; DREAM_EATER_EFFECT
+ dw NULL ; MIRROR_MOVE_EFFECT
+ dw StatModifierUpEffect ; ATTACK_UP1_EFFECT
+ dw StatModifierUpEffect ; DEFENSE_UP1_EFFECT
+ dw StatModifierUpEffect ; SPEED_UP1_EFFECT
+ dw StatModifierUpEffect ; SPECIAL_UP1_EFFECT
+ dw StatModifierUpEffect ; ACCURACY_UP1_EFFECT
+ dw StatModifierUpEffect ; EVASION_UP1_EFFECT
+ dw PayDayEffect ; PAY_DAY_EFFECT
+ dw NULL ; SWIFT_EFFECT
+ dw StatModifierDownEffect ; ATTACK_DOWN1_EFFECT
+ dw StatModifierDownEffect ; DEFENSE_DOWN1_EFFECT
+ dw StatModifierDownEffect ; SPEED_DOWN1_EFFECT
+ dw StatModifierDownEffect ; SPECIAL_DOWN1_EFFECT
+ dw StatModifierDownEffect ; ACCURACY_DOWN1_EFFECT
+ dw StatModifierDownEffect ; EVASION_DOWN1_EFFECT
+ dw ConversionEffect ; CONVERSION_EFFECT
+ dw HazeEffect ; HAZE_EFFECT
+ dw BideEffect ; BIDE_EFFECT
+ dw ThrashPetalDanceEffect ; THRASH_PETAL_DANCE_EFFECT
+ dw SwitchAndTeleportEffect ; SWITCH_AND_TELEPORT_EFFECT
+ dw TwoToFiveAttacksEffect ; TWO_TO_FIVE_ATTACKS_EFFECT
+ dw TwoToFiveAttacksEffect ; EFFECT_1E
+ dw FlinchSideEffect ; FLINCH_SIDE_EFFECT1
+ dw SleepEffect ; SLEEP_EFFECT
+ dw PoisonEffect ; POISON_SIDE_EFFECT2
+ dw FreezeBurnParalyzeEffect ; BURN_SIDE_EFFECT2
+ dw FreezeBurnParalyzeEffect ; unused effect
+ dw FreezeBurnParalyzeEffect ; PARALYZE_SIDE_EFFECT2
+ dw FlinchSideEffect ; FLINCH_SIDE_EFFECT2
+ dw OneHitKOEffect ; OHKO_EFFECT
+ dw ChargeEffect ; CHARGE_EFFECT
+ dw NULL ; SUPER_FANG_EFFECT
+ dw NULL ; SPECIAL_DAMAGE_EFFECT
+ dw TrappingEffect ; TRAPPING_EFFECT
+ dw ChargeEffect ; FLY_EFFECT
+ dw TwoToFiveAttacksEffect ; ATTACK_TWICE_EFFECT
+ dw NULL ; JUMP_KICK_EFFECT
+ dw MistEffect ; MIST_EFFECT
+ dw FocusEnergyEffect ; FOCUS_ENERGY_EFFECT
+ dw RecoilEffect ; RECOIL_EFFECT
+ dw ConfusionEffect ; CONFUSION_EFFECT
+ dw StatModifierUpEffect ; ATTACK_UP2_EFFECT
+ dw StatModifierUpEffect ; DEFENSE_UP2_EFFECT
+ dw StatModifierUpEffect ; SPEED_UP2_EFFECT
+ dw StatModifierUpEffect ; SPECIAL_UP2_EFFECT
+ dw StatModifierUpEffect ; ACCURACY_UP2_EFFECT
+ dw StatModifierUpEffect ; EVASION_UP2_EFFECT
+ dw HealEffect ; HEAL_EFFECT
+ dw TransformEffect ; TRANSFORM_EFFECT
+ dw StatModifierDownEffect ; ATTACK_DOWN2_EFFECT
+ dw StatModifierDownEffect ; DEFENSE_DOWN2_EFFECT
+ dw StatModifierDownEffect ; SPEED_DOWN2_EFFECT
+ dw StatModifierDownEffect ; SPECIAL_DOWN2_EFFECT
+ dw StatModifierDownEffect ; ACCURACY_DOWN2_EFFECT
+ dw StatModifierDownEffect ; EVASION_DOWN2_EFFECT
+ dw ReflectLightScreenEffect ; LIGHT_SCREEN_EFFECT
+ dw ReflectLightScreenEffect ; REFLECT_EFFECT
+ dw PoisonEffect ; POISON_EFFECT
+ dw ParalyzeEffect ; PARALYZE_EFFECT
+ dw StatModifierDownEffect ; ATTACK_DOWN_SIDE_EFFECT
+ dw StatModifierDownEffect ; DEFENSE_DOWN_SIDE_EFFECT
+ dw StatModifierDownEffect ; SPEED_DOWN_SIDE_EFFECT
+ dw StatModifierDownEffect ; SPECIAL_DOWN_SIDE_EFFECT
+ dw StatModifierDownEffect ; unused effect
+ dw StatModifierDownEffect ; unused effect
+ dw StatModifierDownEffect ; unused effect
+ dw StatModifierDownEffect ; unused effect
+ dw ConfusionSideEffect ; CONFUSION_SIDE_EFFECT
+ dw TwoToFiveAttacksEffect ; TWINEEDLE_EFFECT
+ dw NULL ; unused effect
+ dw SubstituteEffect ; SUBSTITUTE_EFFECT
+ dw HyperBeamEffect ; HYPER_BEAM_EFFECT
+ dw RageEffect ; RAGE_EFFECT
+ dw MimicEffect ; MIMIC_EFFECT
+ dw NULL ; METRONOME_EFFECT
+ dw LeechSeedEffect ; LEECH_SEED_EFFECT
+ dw SplashEffect ; SPLASH_EFFECT
+ dw DisableEffect ; DISABLE_EFFECT
diff --git a/data/moves/field_move_names.asm b/data/moves/field_move_names.asm
new file mode 100644
index 00000000..b68ed828
--- /dev/null
+++ b/data/moves/field_move_names.asm
@@ -0,0 +1,10 @@
+FieldMoveNames:
+ db "CUT@"
+ db "FLY@"
+ db "@"
+ db "SURF@"
+ db "STRENGTH@"
+ db "FLASH@"
+ db "DIG@"
+ db "TELEPORT@"
+ db "SOFTBOILED@"
diff --git a/data/moves/field_moves.asm b/data/moves/field_moves.asm
new file mode 100644
index 00000000..d7e9219b
--- /dev/null
+++ b/data/moves/field_moves.asm
@@ -0,0 +1,14 @@
+FieldMoveDisplayData:
+ ; move id, FieldMoveNames index, leftmost tile
+ ; (leftmost tile = -1 + tile column in which the first
+ ; letter of the move's name should be displayed)
+ db CUT, 1, $0C
+ db FLY, 2, $0C
+ db ANIM_B4, 3, $0C ; unused
+ db SURF, 4, $0C
+ db STRENGTH, 5, $0A
+ db FLASH, 6, $0C
+ db DIG, 7, $0C
+ db TELEPORT, 8, $0A
+ db SOFTBOILED, 9, $08
+ db -1 ; end
diff --git a/data/moves/grammar.asm b/data/moves/grammar.asm
new file mode 100644
index 00000000..5855c98c
--- /dev/null
+++ b/data/moves/grammar.asm
@@ -0,0 +1,74 @@
+ExclamationPointMoveSets:
+; a grammar mistake was fixed (only concerning japanese)
+; BIDE is in category 3, moved from category 2
+; set 0
+ db SWORDS_DANCE
+ db GROWTH
+ db 0 ; end set
+
+; set 1
+ db RECOVER
+ db SELFDESTRUCT
+ db AMNESIA
+ db 0 ; end set
+
+; set 2
+ db MEDITATE
+ db AGILITY
+ db TELEPORT
+ db MIMIC
+ db DOUBLE_TEAM
+ db BIDE
+ db BARRAGE
+ db 0 ; end set
+
+; set 3
+ db POUND
+ db SCRATCH
+ db VICEGRIP
+ db WING_ATTACK
+ db FLY
+ db BIND
+ db SLAM
+ db HORN_ATTACK
+ db BODY_SLAM
+ db WRAP
+ db THRASH
+ db TAIL_WHIP
+ db LEER
+ db BITE
+ db GROWL
+ db ROAR
+ db SING
+ db PECK
+ db COUNTER
+ db STRENGTH
+ db ABSORB
+ db STRING_SHOT
+ db EARTHQUAKE
+ db FISSURE
+ db DIG
+ db TOXIC
+ db SCREECH
+ db HARDEN
+ db MINIMIZE
+ db WITHDRAW
+ db DEFENSE_CURL
+ db METRONOME
+ db LICK
+ db CLAMP
+ db CONSTRICT
+ db POISON_GAS
+ db LEECH_LIFE
+ db BUBBLE
+ db FLASH
+ db SPLASH
+ db ACID_ARMOR
+ db FURY_SWIPES
+ db REST
+ db SHARPEN
+ db SLASH
+ db SUBSTITUTE
+ db 0 ; end set
+
+ db -1 ; end
diff --git a/data/moves/hm_moves.asm b/data/moves/hm_moves.asm
new file mode 100644
index 00000000..4f14b8df
--- /dev/null
+++ b/data/moves/hm_moves.asm
@@ -0,0 +1,10 @@
+; This file is INCLUDEd twice:
+; - for HMMoves in home/names.asm
+; - for HMMoveArray in engine/pokemon/bills_pc.asm
+
+ db CUT
+ db FLY
+ db SURF
+ db STRENGTH
+ db FLASH
+ db -1 ; end
diff --git a/data/moves/moves.asm b/data/moves/moves.asm
new file mode 100755
index 00000000..85b6dcfc
--- /dev/null
+++ b/data/moves/moves.asm
@@ -0,0 +1,178 @@
+Moves:
+; Characteristics of each move.
+
+move: MACRO
+ db \1 ; animation (interchangeable with move id)
+ db \2 ; effect
+ db \3 ; power
+ db \4 ; type
+ db \5 percent ; accuracy
+ db \6 ; pp
+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
+ move MEGA_PUNCH, NO_ADDITIONAL_EFFECT, 80, NORMAL, 85, 20
+ move PAY_DAY, PAY_DAY_EFFECT, 40, NORMAL, 100, 20
+ move FIRE_PUNCH, BURN_SIDE_EFFECT1, 75, FIRE, 100, 15
+ move ICE_PUNCH, FREEZE_SIDE_EFFECT, 75, ICE, 100, 15
+ move THUNDERPUNCH, PARALYZE_SIDE_EFFECT1, 75, ELECTRIC, 100, 15
+ move SCRATCH, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35
+ move VICEGRIP, NO_ADDITIONAL_EFFECT, 55, NORMAL, 100, 30
+ move GUILLOTINE, OHKO_EFFECT, 1, NORMAL, 30, 5
+ move RAZOR_WIND, CHARGE_EFFECT, 80, NORMAL, 75, 10
+ move SWORDS_DANCE, ATTACK_UP2_EFFECT, 0, NORMAL, 100, 30
+ move CUT, NO_ADDITIONAL_EFFECT, 50, NORMAL, 95, 30
+ move GUST, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35
+ move WING_ATTACK, NO_ADDITIONAL_EFFECT, 35, FLYING, 100, 35
+ move WHIRLWIND, SWITCH_AND_TELEPORT_EFFECT, 0, NORMAL, 85, 20
+ move FLY, FLY_EFFECT, 70, FLYING, 95, 15
+ move BIND, TRAPPING_EFFECT, 15, NORMAL, 75, 20
+ move SLAM, NO_ADDITIONAL_EFFECT, 80, NORMAL, 75, 20
+ move VINE_WHIP, NO_ADDITIONAL_EFFECT, 35, GRASS, 100, 10
+ move STOMP, FLINCH_SIDE_EFFECT2, 65, NORMAL, 100, 20
+ move DOUBLE_KICK, ATTACK_TWICE_EFFECT, 30, FIGHTING, 100, 30
+ move MEGA_KICK, NO_ADDITIONAL_EFFECT, 120, NORMAL, 75, 5
+ move JUMP_KICK, JUMP_KICK_EFFECT, 70, FIGHTING, 95, 25
+ move ROLLING_KICK, FLINCH_SIDE_EFFECT2, 60, FIGHTING, 85, 15
+ move SAND_ATTACK, ACCURACY_DOWN1_EFFECT, 0, NORMAL, 100, 15
+ move HEADBUTT, FLINCH_SIDE_EFFECT2, 70, NORMAL, 100, 15
+ move HORN_ATTACK, NO_ADDITIONAL_EFFECT, 65, NORMAL, 100, 25
+ move FURY_ATTACK, TWO_TO_FIVE_ATTACKS_EFFECT, 15, NORMAL, 85, 20
+ move HORN_DRILL, OHKO_EFFECT, 1, NORMAL, 30, 5
+ move TACKLE, NO_ADDITIONAL_EFFECT, 35, NORMAL, 95, 35
+ move BODY_SLAM, PARALYZE_SIDE_EFFECT2, 85, NORMAL, 100, 15
+ move WRAP, TRAPPING_EFFECT, 15, NORMAL, 85, 20
+ move TAKE_DOWN, RECOIL_EFFECT, 90, NORMAL, 85, 20
+ move THRASH, THRASH_PETAL_DANCE_EFFECT, 90, NORMAL, 100, 20
+ move DOUBLE_EDGE, RECOIL_EFFECT, 100, NORMAL, 100, 15
+ move TAIL_WHIP, DEFENSE_DOWN1_EFFECT, 0, NORMAL, 100, 30
+ move POISON_STING, POISON_SIDE_EFFECT1, 15, POISON, 100, 35
+ move TWINEEDLE, TWINEEDLE_EFFECT, 25, BUG, 100, 20
+ move PIN_MISSILE, TWO_TO_FIVE_ATTACKS_EFFECT, 14, BUG, 85, 20
+ move LEER, DEFENSE_DOWN1_EFFECT, 0, NORMAL, 100, 30
+ move BITE, FLINCH_SIDE_EFFECT1, 60, NORMAL, 100, 25
+ move GROWL, ATTACK_DOWN1_EFFECT, 0, NORMAL, 100, 40
+ move ROAR, SWITCH_AND_TELEPORT_EFFECT, 0, NORMAL, 100, 20
+ move SING, SLEEP_EFFECT, 0, NORMAL, 55, 15
+ move SUPERSONIC, CONFUSION_EFFECT, 0, NORMAL, 55, 20
+ move SONICBOOM, SPECIAL_DAMAGE_EFFECT, 1, NORMAL, 90, 20
+ move DISABLE, DISABLE_EFFECT, 0, NORMAL, 55, 20
+ move ACID, DEFENSE_DOWN_SIDE_EFFECT, 40, POISON, 100, 30
+ move EMBER, BURN_SIDE_EFFECT1, 40, FIRE, 100, 25
+ move FLAMETHROWER, BURN_SIDE_EFFECT1, 95, FIRE, 100, 15
+ move MIST, MIST_EFFECT, 0, ICE, 100, 30
+ move WATER_GUN, NO_ADDITIONAL_EFFECT, 40, WATER, 100, 25
+ move HYDRO_PUMP, NO_ADDITIONAL_EFFECT, 120, WATER, 80, 5
+ move SURF, NO_ADDITIONAL_EFFECT, 95, WATER, 100, 15
+ move ICE_BEAM, FREEZE_SIDE_EFFECT, 95, ICE, 100, 10
+ move BLIZZARD, FREEZE_SIDE_EFFECT, 120, ICE, 90, 5
+ move PSYBEAM, CONFUSION_SIDE_EFFECT, 65, PSYCHIC_TYPE, 100, 20
+ move BUBBLEBEAM, SPEED_DOWN_SIDE_EFFECT, 65, WATER, 100, 20
+ move AURORA_BEAM, ATTACK_DOWN_SIDE_EFFECT, 65, ICE, 100, 20
+ move HYPER_BEAM, HYPER_BEAM_EFFECT, 150, NORMAL, 90, 5
+ move PECK, NO_ADDITIONAL_EFFECT, 35, FLYING, 100, 35
+ move DRILL_PECK, NO_ADDITIONAL_EFFECT, 80, FLYING, 100, 20
+ move SUBMISSION, RECOIL_EFFECT, 80, FIGHTING, 80, 25
+ move LOW_KICK, FLINCH_SIDE_EFFECT2, 50, FIGHTING, 90, 20
+ move COUNTER, NO_ADDITIONAL_EFFECT, 1, FIGHTING, 100, 20
+ move SEISMIC_TOSS, SPECIAL_DAMAGE_EFFECT, 1, FIGHTING, 100, 20
+ move STRENGTH, NO_ADDITIONAL_EFFECT, 80, NORMAL, 100, 15
+ move ABSORB, DRAIN_HP_EFFECT, 20, GRASS, 100, 20
+ move MEGA_DRAIN, DRAIN_HP_EFFECT, 40, GRASS, 100, 10
+ move LEECH_SEED, LEECH_SEED_EFFECT, 0, GRASS, 90, 10
+ move GROWTH, SPECIAL_UP1_EFFECT, 0, NORMAL, 100, 40
+ move RAZOR_LEAF, NO_ADDITIONAL_EFFECT, 55, GRASS, 95, 25
+ move SOLARBEAM, CHARGE_EFFECT, 120, GRASS, 100, 10
+ move POISONPOWDER, POISON_EFFECT, 0, POISON, 75, 35
+ move STUN_SPORE, PARALYZE_EFFECT, 0, GRASS, 75, 30
+ move SLEEP_POWDER, SLEEP_EFFECT, 0, GRASS, 75, 15
+ move PETAL_DANCE, THRASH_PETAL_DANCE_EFFECT, 70, GRASS, 100, 20
+ move STRING_SHOT, SPEED_DOWN1_EFFECT, 0, BUG, 95, 40
+ move DRAGON_RAGE, SPECIAL_DAMAGE_EFFECT, 1, DRAGON, 100, 10
+ move FIRE_SPIN, TRAPPING_EFFECT, 15, FIRE, 70, 15
+ move THUNDERSHOCK, PARALYZE_SIDE_EFFECT1, 40, ELECTRIC, 100, 30
+ move THUNDERBOLT, PARALYZE_SIDE_EFFECT1, 95, ELECTRIC, 100, 15
+ move THUNDER_WAVE, PARALYZE_EFFECT, 0, ELECTRIC, 100, 20
+ move THUNDER, PARALYZE_SIDE_EFFECT1, 120, ELECTRIC, 70, 10
+ move ROCK_THROW, NO_ADDITIONAL_EFFECT, 50, ROCK, 65, 15
+ move EARTHQUAKE, NO_ADDITIONAL_EFFECT, 100, GROUND, 100, 10
+ move FISSURE, OHKO_EFFECT, 1, GROUND, 30, 5
+ move DIG, CHARGE_EFFECT, 100, GROUND, 100, 10
+ move TOXIC, POISON_EFFECT, 0, POISON, 85, 10
+ move CONFUSION, CONFUSION_SIDE_EFFECT, 50, PSYCHIC_TYPE, 100, 25
+ move PSYCHIC_M, SPECIAL_DOWN_SIDE_EFFECT, 90, PSYCHIC_TYPE, 100, 10
+ move HYPNOSIS, SLEEP_EFFECT, 0, PSYCHIC_TYPE, 60, 20
+ move MEDITATE, ATTACK_UP1_EFFECT, 0, PSYCHIC_TYPE, 100, 40
+ move AGILITY, SPEED_UP2_EFFECT, 0, PSYCHIC_TYPE, 100, 30
+ move QUICK_ATTACK, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 30
+ move RAGE, RAGE_EFFECT, 20, NORMAL, 100, 20
+ move TELEPORT, SWITCH_AND_TELEPORT_EFFECT, 0, PSYCHIC_TYPE, 100, 20
+ move NIGHT_SHADE, SPECIAL_DAMAGE_EFFECT, 0, GHOST, 100, 15
+ move MIMIC, MIMIC_EFFECT, 0, NORMAL, 100, 10
+ move SCREECH, DEFENSE_DOWN2_EFFECT, 0, NORMAL, 85, 40
+ move DOUBLE_TEAM, EVASION_UP1_EFFECT, 0, NORMAL, 100, 15
+ move RECOVER, HEAL_EFFECT, 0, NORMAL, 100, 20
+ move HARDEN, DEFENSE_UP1_EFFECT, 0, NORMAL, 100, 30
+ move MINIMIZE, EVASION_UP1_EFFECT, 0, NORMAL, 100, 20
+ move SMOKESCREEN, ACCURACY_DOWN1_EFFECT, 0, NORMAL, 100, 20
+ move CONFUSE_RAY, CONFUSION_EFFECT, 0, GHOST, 100, 10
+ move WITHDRAW, DEFENSE_UP1_EFFECT, 0, WATER, 100, 40
+ move DEFENSE_CURL, DEFENSE_UP1_EFFECT, 0, NORMAL, 100, 40
+ move BARRIER, DEFENSE_UP2_EFFECT, 0, PSYCHIC_TYPE, 100, 30
+ move LIGHT_SCREEN, LIGHT_SCREEN_EFFECT, 0, PSYCHIC_TYPE, 100, 30
+ move HAZE, HAZE_EFFECT, 0, ICE, 100, 30
+ move REFLECT, REFLECT_EFFECT, 0, PSYCHIC_TYPE, 100, 20
+ move FOCUS_ENERGY, FOCUS_ENERGY_EFFECT, 0, NORMAL, 100, 30
+ move BIDE, BIDE_EFFECT, 0, NORMAL, 100, 10
+ move METRONOME, METRONOME_EFFECT, 0, NORMAL, 100, 10
+ move MIRROR_MOVE, MIRROR_MOVE_EFFECT, 0, FLYING, 100, 20
+ move SELFDESTRUCT, EXPLODE_EFFECT, 130, NORMAL, 100, 5
+ move EGG_BOMB, NO_ADDITIONAL_EFFECT, 100, NORMAL, 75, 10
+ move LICK, PARALYZE_SIDE_EFFECT2, 20, GHOST, 100, 30
+ move SMOG, POISON_SIDE_EFFECT2, 20, POISON, 70, 20
+ move SLUDGE, POISON_SIDE_EFFECT2, 65, POISON, 100, 20
+ move BONE_CLUB, FLINCH_SIDE_EFFECT1, 65, GROUND, 85, 20
+ move FIRE_BLAST, BURN_SIDE_EFFECT2, 120, FIRE, 85, 5
+ move WATERFALL, NO_ADDITIONAL_EFFECT, 80, WATER, 100, 15
+ move CLAMP, TRAPPING_EFFECT, 35, WATER, 75, 10
+ move SWIFT, SWIFT_EFFECT, 60, NORMAL, 100, 20
+ move SKULL_BASH, CHARGE_EFFECT, 100, NORMAL, 100, 15
+ move SPIKE_CANNON, TWO_TO_FIVE_ATTACKS_EFFECT, 20, NORMAL, 100, 15
+ move CONSTRICT, SPEED_DOWN_SIDE_EFFECT, 10, NORMAL, 100, 35
+ move AMNESIA, SPECIAL_UP2_EFFECT, 0, PSYCHIC_TYPE, 100, 20
+ move KINESIS, ACCURACY_DOWN1_EFFECT, 0, PSYCHIC_TYPE, 80, 15
+ move SOFTBOILED, HEAL_EFFECT, 0, NORMAL, 100, 10
+ move HI_JUMP_KICK, JUMP_KICK_EFFECT, 85, FIGHTING, 90, 20
+ move GLARE, PARALYZE_EFFECT, 0, NORMAL, 75, 30
+ move DREAM_EATER, DREAM_EATER_EFFECT, 100, PSYCHIC_TYPE, 100, 15
+ move POISON_GAS, POISON_EFFECT, 0, POISON, 55, 40
+ move BARRAGE, TWO_TO_FIVE_ATTACKS_EFFECT, 15, NORMAL, 85, 20
+ move LEECH_LIFE, DRAIN_HP_EFFECT, 20, BUG, 100, 15
+ move LOVELY_KISS, SLEEP_EFFECT, 0, NORMAL, 75, 10
+ move SKY_ATTACK, CHARGE_EFFECT, 140, FLYING, 90, 5
+ move TRANSFORM, TRANSFORM_EFFECT, 0, NORMAL, 100, 10
+ move BUBBLE, SPEED_DOWN_SIDE_EFFECT, 20, WATER, 100, 30
+ move DIZZY_PUNCH, NO_ADDITIONAL_EFFECT, 70, NORMAL, 100, 10
+ move SPORE, SLEEP_EFFECT, 0, GRASS, 100, 15
+ move FLASH, ACCURACY_DOWN1_EFFECT, 0, NORMAL, 70, 20
+ move PSYWAVE, SPECIAL_DAMAGE_EFFECT, 1, PSYCHIC_TYPE, 80, 15
+ move SPLASH, SPLASH_EFFECT, 0, NORMAL, 100, 40
+ move ACID_ARMOR, DEFENSE_UP2_EFFECT, 0, POISON, 100, 40
+ move CRABHAMMER, NO_ADDITIONAL_EFFECT, 90, WATER, 85, 10
+ move EXPLOSION, EXPLODE_EFFECT, 170, NORMAL, 100, 5
+ move FURY_SWIPES, TWO_TO_FIVE_ATTACKS_EFFECT, 18, NORMAL, 80, 15
+ move BONEMERANG, ATTACK_TWICE_EFFECT, 50, GROUND, 90, 10
+ move REST, HEAL_EFFECT, 0, PSYCHIC_TYPE, 100, 10
+ move ROCK_SLIDE, NO_ADDITIONAL_EFFECT, 75, ROCK, 90, 10
+ move HYPER_FANG, FLINCH_SIDE_EFFECT1, 80, NORMAL, 90, 15
+ move SHARPEN, ATTACK_UP1_EFFECT, 0, NORMAL, 100, 30
+ move CONVERSION, CONVERSION_EFFECT, 0, NORMAL, 100, 30
+ move TRI_ATTACK, NO_ADDITIONAL_EFFECT, 80, NORMAL, 100, 10
+ move SUPER_FANG, SUPER_FANG_EFFECT, 1, NORMAL, 90, 10
+ move SLASH, NO_ADDITIONAL_EFFECT, 70, NORMAL, 100, 20
+ move SUBSTITUTE, SUBSTITUTE_EFFECT, 0, NORMAL, 100, 10
+ move STRUGGLE, RECOIL_EFFECT, 50, NORMAL, 100, 10
diff --git a/text/move_names.asm b/data/moves/names.asm
index cbb1a322..cbb1a322 100644
--- a/text/move_names.asm
+++ b/data/moves/names.asm
diff --git a/data/moves/sfx.asm b/data/moves/sfx.asm
new file mode 100644
index 00000000..c1f12084
--- /dev/null
+++ b/data/moves/sfx.asm
@@ -0,0 +1,168 @@
+MoveSoundTable:
+ ; ID, pitch mod, tempo mod
+ db SFX_POUND, $00, $80 ; POUND
+ db SFX_BATTLE_0C, $10, $80 ; KARATE_CHOP
+ db SFX_DOUBLESLAP, $00, $80 ; DOUBLESLAP
+ db SFX_BATTLE_0B, $01, $80 ; COMET_PUNCH
+ db SFX_BATTLE_0D, $00, $40 ; MEGA_PUNCH
+ db SFX_SILPH_SCOPE, $00, $ff ; PAY_DAY
+ db SFX_BATTLE_0D, $10, $60 ; FIRE_PUNCH
+ db SFX_BATTLE_0D, $20, $80 ; ICE_PUNCH
+ db SFX_BATTLE_0D, $00, $a0 ; THUNDERPUNCH
+ db SFX_DAMAGE, $00, $80 ; SCRATCH
+ db SFX_BATTLE_0F, $20, $40 ; VICEGRIP
+ db SFX_BATTLE_0F, $00, $80 ; GUILLOTINE
+ db SFX_BATTLE_0E, $00, $a0 ; RAZOR_WIND
+ db SFX_NOT_VERY_EFFECTIVE, $10, $c0 ; SWORDS_DANCE
+ db SFX_NOT_VERY_EFFECTIVE, $00, $a0 ; CUT
+ db SFX_BATTLE_12, $00, $c0 ; GUST
+ db SFX_BATTLE_12, $10, $a0 ; WING_ATTACK
+ db SFX_BATTLE_13, $00, $e0 ; WHIRLWIND
+ db SFX_NOT_VERY_EFFECTIVE, $20, $c0 ; FLY
+ db SFX_BATTLE_14, $00, $80 ; BIND
+ db SFX_BATTLE_22, $00, $80 ; SLAM
+ db SFX_VINE_WHIP, $01, $80 ; VINE_WHIP
+ db SFX_BATTLE_20, $00, $80 ; STOMP
+ db SFX_BATTLE_17, $f0, $40 ; DOUBLE_KICK
+ db SFX_SUPER_EFFECTIVE, $00, $80 ; MEGA_KICK
+ db SFX_BATTLE_17, $00, $80 ; JUMP_KICK
+ db SFX_BATTLE_21, $10, $80 ; ROLLING_KICK
+ db SFX_BATTLE_1B, $01, $a0 ; SAND_ATTACK
+ db SFX_BATTLE_18, $00, $80 ; HEADBUTT
+ db SFX_BATTLE_1E, $00, $60 ; HORN_ATTACK
+ db SFX_BATTLE_1E, $01, $40 ; FURY_ATTACK
+ db SFX_HORN_DRILL, $00, $a0 ; HORN_DRILL
+ db SFX_SUPER_EFFECTIVE, $10, $a0 ; TACKLE
+ db SFX_BATTLE_20, $00, $c0 ; BODY_SLAM
+ db SFX_BATTLE_14, $10, $60 ; WRAP
+ db SFX_SUPER_EFFECTIVE, $00, $a0 ; TAKE_DOWN
+ db SFX_BATTLE_22, $11, $c0 ; THRASH
+ db SFX_SUPER_EFFECTIVE, $20, $c0 ; DOUBLE_EDGE
+ db SFX_BATTLE_21, $00, $80 ; TAIL_WHIP
+ db SFX_BATTLE_1B, $00, $80 ; POISON_STING
+ db SFX_BATTLE_1B, $20, $c0 ; TWINEEDLE
+ db SFX_BATTLE_19, $00, $80 ; PIN_MISSILE
+ db SFX_BATTLE_31, $ff, $40 ; LEER
+ db SFX_BATTLE_1E, $00, $80 ; BITE
+ db SFX_BATTLE_0B, $00, $c0 ; GROWL
+ db SFX_BATTLE_0B, $00, $40 ; ROAR
+ db SFX_BATTLE_35, $00, $80 ; SING
+ db SFX_BATTLE_27, $40, $60 ; SUPERSONIC
+ db SFX_BATTLE_27, $00, $80 ; SONICBOOM
+ db SFX_BATTLE_27, $ff, $40 ; DISABLE
+ db SFX_BATTLE_2A, $80, $c0 ; ACID
+ db SFX_BATTLE_19, $10, $a0 ; EMBER
+ db SFX_BATTLE_19, $21, $e0 ; FLAMETHROWER
+ db SFX_BATTLE_29, $00, $80 ; MIST
+ db SFX_BATTLE_24, $20, $60 ; WATER_GUN
+ db SFX_BATTLE_2A, $00, $80 ; HYDRO_PUMP
+ db SFX_BATTLE_2C, $00, $80 ; SURF
+ db SFX_BATTLE_28, $40, $80 ; ICE_BEAM
+ db SFX_BATTLE_29, $f0, $e0 ; BLIZZARD
+ db SFX_PSYBEAM, $00, $80 ; PSYBEAM
+ db SFX_BATTLE_2A, $f0, $60 ; BUBBLEBEAM
+ db SFX_BATTLE_28, $00, $80 ; AURORA_BEAM
+ db SFX_BATTLE_36, $00, $80 ; HYPER_BEAM
+ db SFX_PECK, $01, $a0 ; PECK
+ db SFX_BATTLE_13, $f0, $20 ; DRILL_PECK
+ db SFX_BATTLE_23, $01, $c0 ; SUBMISSION
+ db SFX_BATTLE_23, $00, $80 ; LOW_KICK
+ db SFX_SUPER_EFFECTIVE, $00, $e0 ; COUNTER
+ db SFX_BATTLE_26, $01, $60 ; SEISMIC_TOSS
+ db SFX_BATTLE_26, $20, $40 ; STRENGTH
+ db SFX_BATTLE_24, $00, $80 ; ABSORB
+ db SFX_BATTLE_24, $40, $c0 ; MEGA_DRAIN
+ db SFX_BATTLE_1B, $03, $60 ; LEECH_SEED
+ db SFX_BATTLE_25, $11, $e0 ; GROWTH
+ db SFX_BATTLE_12, $20, $e0 ; RAZOR_LEAF
+ db SFX_BATTLE_2E, $00, $80 ; SOLARBEAM
+ db SFX_BATTLE_1C, $00, $80 ; POISONPOWDER
+ db SFX_BATTLE_1C, $11, $a0 ; STUN_SPORE
+ db SFX_BATTLE_1C, $01, $c0 ; SLEEP_POWDER
+ db SFX_BATTLE_13, $14, $c0 ; PETAL_DANCE
+ db SFX_BATTLE_1B, $02, $a0 ; STRING_SHOT
+ db SFX_BATTLE_29, $f0, $80 ; DRAGON_RAGE
+ db SFX_BATTLE_29, $20, $c0 ; FIRE_SPIN
+ db SFX_BATTLE_2F, $00, $20 ; THUNDERSHOCK
+ db SFX_BATTLE_2F, $20, $80 ; THUNDERBOLT
+ db SFX_BATTLE_2E, $12, $60 ; THUNDER_WAVE
+ db SFX_BATTLE_26, $00, $80 ; THUNDER
+ db SFX_BATTLE_14, $01, $e0 ; ROCK_THROW
+ db SFX_BATTLE_29, $0f, $e0 ; EARTHQUAKE
+ db SFX_BATTLE_29, $11, $20 ; FISSURE
+ db SFX_DAMAGE, $10, $40 ; DIG
+ db SFX_BATTLE_0F, $10, $c0 ; TOXIC
+ db SFX_BATTLE_14, $00, $20 ; CONFUSION
+ db SFX_PSYCHIC_M, $00, $80 ; PSYCHIC_M
+ db SFX_BATTLE_35, $11, $18 ; HYPNOSIS
+ db SFX_BATTLE_09, $20, $c0 ; MEDITATE
+ db SFX_FAINT_FALL, $20, $c0 ; AGILITY
+ db SFX_BATTLE_25, $00, $10 ; QUICK_ATTACK
+ db SFX_BATTLE_26, $f0, $20 ; RAGE
+ db SFX_BATTLE_33, $f0, $c0 ; TELEPORT
+ db SFX_NOT_VERY_EFFECTIVE, $f0, $e0 ; NIGHT_SHADE
+ db SFX_BATTLE_09, $f0, $40 ; MIMIC
+ db SFX_BATTLE_31, $00, $80 ; SCREECH
+ db SFX_BATTLE_33, $80, $40 ; DOUBLE_TEAM
+ db SFX_BATTLE_33, $00, $80 ; RECOVER
+ db SFX_BATTLE_14, $11, $20 ; HARDEN
+ db SFX_BATTLE_14, $22, $10 ; MINIMIZE
+ db SFX_BATTLE_1B, $f1, $ff ; SMOKESCREEN
+ db SFX_BATTLE_13, $f1, $ff ; CONFUSE_RAY
+ db SFX_BATTLE_14, $33, $30 ; WITHDRAW
+ db SFX_BATTLE_32, $40, $c0 ; DEFENSE_CURL
+ db SFX_BATTLE_0E, $20, $20 ; BARRIER
+ db SFX_BATTLE_0E, $f0, $10 ; LIGHT_SCREEN
+ db SFX_BATTLE_0F, $f8, $10 ; HAZE
+ db SFX_NOT_VERY_EFFECTIVE, $f0, $10 ; REFLECT
+ db SFX_BATTLE_25, $00, $80 ; FOCUS_ENERGY
+ db SFX_BATTLE_18, $00, $c0 ; BIDE
+ db SFX_BATTLE_32, $c0, $ff ; METRONOME
+ db SFX_BATTLE_09, $f2, $20 ; MIRROR_MOVE
+ db SFX_BATTLE_34, $00, $80 ; SELFDESTRUCT
+ db SFX_BATTLE_34, $00, $40 ; EGG_BOMB
+ db SFX_BATTLE_09, $00, $40 ; LICK
+ db SFX_NOT_VERY_EFFECTIVE, $10, $ff ; SMOG
+ db SFX_BATTLE_2A, $20, $20 ; SLUDGE
+ db SFX_BATTLE_32, $00, $80 ; BONE_CLUB
+ db SFX_BATTLE_29, $1f, $20 ; FIRE_BLAST
+ db SFX_BATTLE_25, $2f, $80 ; WATERFALL
+ db SFX_BATTLE_0F, $1f, $ff ; CLAMP
+ db SFX_BATTLE_2B, $1f, $60 ; SWIFT
+ db SFX_BATTLE_26, $1e, $20 ; SKULL_BASH
+ db SFX_BATTLE_26, $1f, $18 ; SPIKE_CANNON
+ db SFX_BATTLE_14, $0f, $80 ; CONSTRICT
+ db SFX_BATTLE_09, $f8, $10 ; AMNESIA
+ db SFX_FAINT_FALL, $18, $20 ; KINESIS
+ db SFX_BATTLE_32, $08, $40 ; SOFTBOILED
+ db SFX_BATTLE_17, $01, $e0 ; HI_JUMP_KICK
+ db SFX_NOT_VERY_EFFECTIVE, $09, $ff ; GLARE
+ db SFX_BATTLE_35, $42, $01 ; DREAM_EATER
+ db SFX_BATTLE_1C, $00, $ff ; POISON_GAS
+ db SFX_BATTLE_32, $08, $e0 ; BARRAGE
+ db SFX_BATTLE_24, $00, $80 ; LEECH_LIFE
+ db SFX_BATTLE_09, $88, $10 ; LOVELY_KISS
+ db SFX_BATTLE_25, $48, $ff ; SKY_ATTACK
+ db SFX_FAINT_FALL, $ff, $ff ; TRANSFORM
+ db SFX_BATTLE_24, $ff, $10 ; BUBBLE
+ db SFX_FAINT_FALL, $ff, $04 ; DIZZY_PUNCH
+ db SFX_BATTLE_1C, $01, $ff ; SPORE
+ db SFX_BATTLE_13, $f8, $ff ; FLASH
+ db SFX_BATTLE_0C, $f0, $f0 ; PSYWAVE
+ db SFX_BATTLE_0F, $08, $10 ; SPLASH
+ db SFX_BATTLE_0D, $f0, $ff ; ACID_ARMOR
+ db SFX_SUPER_EFFECTIVE, $f0, $ff ; CRABHAMMER
+ db SFX_BATTLE_34, $10, $ff ; EXPLOSION
+ db SFX_BATTLE_0E, $f0, $20 ; FURY_SWIPES
+ db SFX_BATTLE_2B, $f0, $60 ; BONEMERANG
+ db SFX_BATTLE_21, $12, $10 ; REST
+ db SFX_BATTLE_36, $f0, $20 ; ROCK_SLIDE
+ db SFX_BATTLE_1E, $12, $ff ; HYPER_FANG
+ db SFX_BATTLE_31, $80, $04 ; SHARPEN
+ db SFX_BATTLE_33, $f0, $10 ; CONVERSION
+ db SFX_BATTLE_29, $f8, $ff ; TRI_ATTACK
+ db SFX_BATTLE_26, $f0, $ff ; SUPER_FANG
+ db SFX_NOT_VERY_EFFECTIVE, $01, $ff ; SLASH
+ db SFX_BATTLE_2C, $d8, $04 ; SUBSTITUTE
+ db SFX_BATTLE_0B, $00, $80 ; STRUGGLE
+ db SFX_BATTLE_0B, $00, $80
diff --git a/data/moves/tmhm_moves.asm b/data/moves/tmhm_moves.asm
new file mode 100755
index 00000000..a313af28
--- /dev/null
+++ b/data/moves/tmhm_moves.asm
@@ -0,0 +1,30 @@
+; The add_hm and add_tm macros in constants/item_constants.asm simultaneously
+; define constants for the item IDs and for the corresponding move values.
+
+TechnicalMachines:
+
+n = 1
+REPT NUM_TMS
+IF n < 10
+MOVE_FOR_TM EQUS "TM0{d:n}_MOVE"
+ELSE
+MOVE_FOR_TM EQUS "TM{d:n}_MOVE"
+ENDC
+ db MOVE_FOR_TM
+PURGE MOVE_FOR_TM
+n = n + 1
+ENDR
+
+n = 1
+REPT NUM_HMS
+IF n < 10
+MOVE_FOR_HM EQUS "HM0{d:n}_MOVE"
+ELSE
+MOVE_FOR_HM EQUS "HM{d:n}_MOVE"
+ENDC
+ db MOVE_FOR_HM
+PURGE MOVE_FOR_HM
+n = n + 1
+ENDR
+
+ db -1 ; end
diff --git a/data/player_names.asm b/data/player_names.asm
new file mode 100644
index 00000000..cf461a7a
--- /dev/null
+++ b/data/player_names.asm
@@ -0,0 +1,13 @@
+DefaultNamesPlayer:
+ db "NEW NAME"
+ next "YELLOW"
+ next "ASH"
+ next "JACK"
+ db "@"
+
+DefaultNamesRival:
+ db "NEW NAME"
+ next "BLUE"
+ next "GARY"
+ next "JOHN"
+ db "@"
diff --git a/data/player_names_list.asm b/data/player_names_list.asm
new file mode 100644
index 00000000..a5f38919
--- /dev/null
+++ b/data/player_names_list.asm
@@ -0,0 +1,11 @@
+DefaultNamesPlayerList:
+ db "NEW NAME@"
+ db "YELLOW@"
+ db "ASH@"
+ db "JACK@"
+
+DefaultNamesRivalList:
+ db "NEW NAME@"
+ db "BLUE@"
+ db "GARY@"
+ db "JOHN@"
diff --git a/data/pokedex_entries.asm b/data/pokedex_entries.asm
deleted file mode 100755
index a1dad53a..00000000
--- a/data/pokedex_entries.asm
+++ /dev/null
@@ -1,1265 +0,0 @@
-PokedexEntryPointers:
- dw RhydonDexEntry
- dw KangaskhanDexEntry
- dw NidoranMDexEntry
- dw ClefairyDexEntry
- dw SpearowDexEntry
- dw VoltorbDexEntry
- dw NidokingDexEntry
- dw SlowbroDexEntry
- dw IvysaurDexEntry
- dw ExeggutorDexEntry
- dw LickitungDexEntry
- dw ExeggcuteDexEntry
- dw GrimerDexEntry
- dw GengarDexEntry
- dw NidoranFDexEntry
- dw NidoqueenDexEntry
- dw CuboneDexEntry
- dw RhyhornDexEntry
- dw LaprasDexEntry
- dw ArcanineDexEntry
- dw MewDexEntry
- dw GyaradosDexEntry
- dw ShellderDexEntry
- dw TentacoolDexEntry
- dw GastlyDexEntry
- dw ScytherDexEntry
- dw StaryuDexEntry
- dw BlastoiseDexEntry
- dw PinsirDexEntry
- dw TangelaDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw GrowlitheDexEntry
- dw OnixDexEntry
- dw FearowDexEntry
- dw PidgeyDexEntry
- dw SlowpokeDexEntry
- dw KadabraDexEntry
- dw GravelerDexEntry
- dw ChanseyDexEntry
- dw MachokeDexEntry
- dw MrMimeDexEntry
- dw HitmonleeDexEntry
- dw HitmonchanDexEntry
- dw ArbokDexEntry
- dw ParasectDexEntry
- dw PsyduckDexEntry
- dw DrowzeeDexEntry
- dw GolemDexEntry
- dw MissingNoDexEntry
- dw MagmarDexEntry
- dw MissingNoDexEntry
- dw ElectabuzzDexEntry
- dw MagnetonDexEntry
- dw KoffingDexEntry
- dw MissingNoDexEntry
- dw MankeyDexEntry
- dw SeelDexEntry
- dw DiglettDexEntry
- dw TaurosDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw FarfetchdDexEntry
- dw VenonatDexEntry
- dw DragoniteDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw DoduoDexEntry
- dw PoliwagDexEntry
- dw JynxDexEntry
- dw MoltresDexEntry
- dw ArticunoDexEntry
- dw ZapdosDexEntry
- dw DittoDexEntry
- dw MeowthDexEntry
- dw KrabbyDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw VulpixDexEntry
- dw NinetalesDexEntry
- dw PikachuDexEntry
- dw RaichuDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw DratiniDexEntry
- dw DragonairDexEntry
- dw KabutoDexEntry
- dw KabutopsDexEntry
- dw HorseaDexEntry
- dw SeadraDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw SandshrewDexEntry
- dw SandslashDexEntry
- dw OmanyteDexEntry
- dw OmastarDexEntry
- dw JigglypuffDexEntry
- dw WigglytuffDexEntry
- dw EeveeDexEntry
- dw FlareonDexEntry
- dw JolteonDexEntry
- dw VaporeonDexEntry
- dw MachopDexEntry
- dw ZubatDexEntry
- dw EkansDexEntry
- dw ParasDexEntry
- dw PoliwhirlDexEntry
- dw PoliwrathDexEntry
- dw WeedleDexEntry
- dw KakunaDexEntry
- dw BeedrillDexEntry
- dw MissingNoDexEntry
- dw DodrioDexEntry
- dw PrimeapeDexEntry
- dw DugtrioDexEntry
- dw VenomothDexEntry
- dw DewgongDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw CaterpieDexEntry
- dw MetapodDexEntry
- dw ButterfreeDexEntry
- dw MachampDexEntry
- dw MissingNoDexEntry
- dw GolduckDexEntry
- dw HypnoDexEntry
- dw GolbatDexEntry
- dw MewtwoDexEntry
- dw SnorlaxDexEntry
- dw MagikarpDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw MukDexEntry
- dw MissingNoDexEntry
- dw KinglerDexEntry
- dw CloysterDexEntry
- dw MissingNoDexEntry
- dw ElectrodeDexEntry
- dw ClefableDexEntry
- dw WeezingDexEntry
- dw PersianDexEntry
- dw MarowakDexEntry
- dw MissingNoDexEntry
- dw HaunterDexEntry
- dw AbraDexEntry
- dw AlakazamDexEntry
- dw PidgeottoDexEntry
- dw PidgeotDexEntry
- dw StarmieDexEntry
- dw BulbasaurDexEntry
- dw VenusaurDexEntry
- dw TentacruelDexEntry
- dw MissingNoDexEntry
- dw GoldeenDexEntry
- dw SeakingDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw PonytaDexEntry
- dw RapidashDexEntry
- dw RattataDexEntry
- dw RaticateDexEntry
- dw NidorinoDexEntry
- dw NidorinaDexEntry
- dw GeodudeDexEntry
- dw PorygonDexEntry
- dw AerodactylDexEntry
- dw MissingNoDexEntry
- dw MagnemiteDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw CharmanderDexEntry
- dw SquirtleDexEntry
- dw CharmeleonDexEntry
- dw WartortleDexEntry
- dw CharizardDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw MissingNoDexEntry
- dw OddishDexEntry
- dw GloomDexEntry
- dw VileplumeDexEntry
- dw BellsproutDexEntry
- dw WeepinbellDexEntry
- dw VictreebelDexEntry
-
-; string: species name
-; height in feet, inches
-; weight in pounds
-; text entry
-
-BulbasaurDexEntry:
- db "SEED@"
- db 2,4
- dw 150
- TX_FAR _BulbasaurDexEntry
- db "@"
-
-IvysaurDexEntry:
- db "SEED@"
- db 3,3
- dw 290
- TX_FAR _IvysaurDexEntry
- db "@"
-
-VenusaurDexEntry:
- db "SEED@"
- db 6,7
- dw 2210
- TX_FAR _VenusaurDexEntry
- db "@"
-
-CharmanderDexEntry:
- db "LIZARD@"
- db 2,0
- dw 190
- TX_FAR _CharmanderDexEntry
- db "@"
-
-CharmeleonDexEntry:
- db "FLAME@"
- db 3,7
- dw 420
- TX_FAR _CharmeleonDexEntry
- db "@"
-
-CharizardDexEntry:
- db "FLAME@"
- db 5,7
- dw 2000
- TX_FAR _CharizardDexEntry
- db "@"
-
-SquirtleDexEntry:
- db "TINYTURTLE@"
- db 1,8
- dw 200
- TX_FAR _SquirtleDexEntry
- db "@"
-
-WartortleDexEntry:
- db "TURTLE@"
- db 3,3
- dw 500
- TX_FAR _WartortleDexEntry
- db "@"
-
-BlastoiseDexEntry:
- db "SHELLFISH@"
- db 5,3
- dw 1890
- TX_FAR _BlastoiseDexEntry
- db "@"
-
-CaterpieDexEntry:
- db "WORM@"
- db 1,0
- dw 60
- TX_FAR _CaterpieDexEntry
- db "@"
-
-MetapodDexEntry:
- db "COCOON@"
- db 2,4
- dw 220
- TX_FAR _MetapodDexEntry
- db "@"
-
-ButterfreeDexEntry:
- db "BUTTERFLY@"
- db 3,7
- dw 710
- TX_FAR _ButterfreeDexEntry
- db "@"
-
-WeedleDexEntry:
- db "HAIRY BUG@"
- db 1,0
- dw 70
- TX_FAR _WeedleDexEntry
- db "@"
-
-KakunaDexEntry:
- db "COCOON@"
- db 2,0
- dw 220
- TX_FAR _KakunaDexEntry
- db "@"
-
-BeedrillDexEntry:
- db "POISON BEE@"
- db 3,3
- dw 650
- TX_FAR _BeedrillDexEntry
- db "@"
-
-PidgeyDexEntry:
- db "TINY BIRD@"
- db 1,0
- dw 40
- TX_FAR _PidgeyDexEntry
- db "@"
-
-PidgeottoDexEntry:
- db "BIRD@"
- db 3,7
- dw 660
- TX_FAR _PidgeottoDexEntry
- db "@"
-
-PidgeotDexEntry:
- db "BIRD@"
- db 4,11
- dw 870
- TX_FAR _PidgeotDexEntry
- db "@"
-
-RattataDexEntry:
- db "RAT@"
- db 1,0
- dw 80
- TX_FAR _RattataDexEntry
- db "@"
-
-RaticateDexEntry:
- db "RAT@"
- db 2,4
- dw 410
- TX_FAR _RaticateDexEntry
- db "@"
-
-SpearowDexEntry:
- db "TINY BIRD@"
- db 1,0
- dw 40
- TX_FAR _SpearowDexEntry
- db "@"
-
-FearowDexEntry:
- db "BEAK@"
- db 3,11
- dw 840
- TX_FAR _FearowDexEntry
- db "@"
-
-EkansDexEntry:
- db "SNAKE@"
- db 6,7
- dw 150
- TX_FAR _EkansDexEntry
- db "@"
-
-ArbokDexEntry:
- db "COBRA@"
- db 11,6
- dw 1430
- TX_FAR _ArbokDexEntry
- db "@"
-
-PikachuDexEntry:
- db "MOUSE@"
- db 1,4
- dw 130
- TX_FAR _PikachuDexEntry
- db "@"
-
-RaichuDexEntry:
- db "MOUSE@"
- db 2,7
- dw 660
- TX_FAR _RaichuDexEntry
- db "@"
-
-SandshrewDexEntry:
- db "MOUSE@"
- db 2,0
- dw 260
- TX_FAR _SandshrewDexEntry
- db "@"
-
-SandslashDexEntry:
- db "MOUSE@"
- db 3,3
- dw 650
- TX_FAR _SandslashDexEntry
- db "@"
-
-NidoranFDexEntry:
- db "POISON PIN@"
- db 1,4
- dw 150
- TX_FAR _NidoranFDexEntry
- db "@"
-
-NidorinaDexEntry:
- db "POISON PIN@"
- db 2,7
- dw 440
- TX_FAR _NidorinaDexEntry
- db "@"
-
-NidoqueenDexEntry:
- db "DRILL@"
- db 4,3
- dw 1320
- TX_FAR _NidoqueenDexEntry
- db "@"
-
-NidoranMDexEntry:
- db "POISON PIN@"
- db 1,8
- dw 200
- TX_FAR _NidoranMDexEntry
- db "@"
-
-NidorinoDexEntry:
- db "POISON PIN@"
- db 2,11
- dw 430
- TX_FAR _NidorinoDexEntry
- db "@"
-
-NidokingDexEntry:
- db "DRILL@"
- db 4,7
- dw 1370
- TX_FAR _NidokingDexEntry
- db "@"
-
-ClefairyDexEntry:
- db "FAIRY@"
- db 2,0
- dw 170
- TX_FAR _ClefairyDexEntry
- db "@"
-
-ClefableDexEntry:
- db "FAIRY@"
- db 4,3
- dw 880
- TX_FAR _ClefableDexEntry
- db "@"
-
-VulpixDexEntry:
- db "FOX@"
- db 2,0
- dw 220
- TX_FAR _VulpixDexEntry
- db "@"
-
-NinetalesDexEntry:
- db "FOX@"
- db 3,7
- dw 440
- TX_FAR _NinetalesDexEntry
- db "@"
-
-JigglypuffDexEntry:
- db "BALLOON@"
- db 1,8
- dw 120
- TX_FAR _JigglypuffDexEntry
- db "@"
-
-WigglytuffDexEntry:
- db "BALLOON@"
- db 3,3
- dw 260
- TX_FAR _WigglytuffDexEntry
- db "@"
-
-ZubatDexEntry:
- db "BAT@"
- db 2,7
- dw 170
- TX_FAR _ZubatDexEntry
- db "@"
-
-GolbatDexEntry:
- db "BAT@"
- db 5,3
- dw 1210
- TX_FAR _GolbatDexEntry
- db "@"
-
-OddishDexEntry:
- db "WEED@"
- db 1,8
- dw 120
- TX_FAR _OddishDexEntry
- db "@"
-
-GloomDexEntry:
- db "WEED@"
- db 2,7
- dw 190
- TX_FAR _GloomDexEntry
- db "@"
-
-VileplumeDexEntry:
- db "FLOWER@"
- db 3,11
- dw 410
- TX_FAR _VileplumeDexEntry
- db "@"
-
-ParasDexEntry:
- db "MUSHROOM@"
- db 1,0
- dw 120
- TX_FAR _ParasDexEntry
- db "@"
-
-ParasectDexEntry:
- db "MUSHROOM@"
- db 3,3
- dw 650
- TX_FAR _ParasectDexEntry
- db "@"
-
-VenonatDexEntry:
- db "INSECT@"
- db 3,3
- dw 660
- TX_FAR _VenonatDexEntry
- db "@"
-
-VenomothDexEntry:
- db "POISONMOTH@"
- db 4,11
- dw 280
- TX_FAR _VenomothDexEntry
- db "@"
-
-DiglettDexEntry:
- db "MOLE@"
- db 0,8
- dw 20
- TX_FAR _DiglettDexEntry
- db "@"
-
-DugtrioDexEntry:
- db "MOLE@"
- db 2,4
- dw 730
- TX_FAR _DugtrioDexEntry
- db "@"
-
-MeowthDexEntry:
- db "SCRATCHCAT@"
- db 1,4
- dw 90
- TX_FAR _MeowthDexEntry
- db "@"
-
-PersianDexEntry:
- db "CLASSY CAT@"
- db 3,3
- dw 710
- TX_FAR _PersianDexEntry
- db "@"
-
-PsyduckDexEntry:
- db "DUCK@"
- db 2,7
- dw 430
- TX_FAR _PsyduckDexEntry
- db "@"
-
-GolduckDexEntry:
- db "DUCK@"
- db 5,7
- dw 1690
- TX_FAR _GolduckDexEntry
- db "@"
-
-MankeyDexEntry:
- db "PIG MONKEY@"
- db 1,8
- dw 620
- TX_FAR _MankeyDexEntry
- db "@"
-
-PrimeapeDexEntry:
- db "PIG MONKEY@"
- db 3,3
- dw 710
- TX_FAR _PrimeapeDexEntry
- db "@"
-
-GrowlitheDexEntry:
- db "PUPPY@"
- db 2,4
- dw 420
- TX_FAR _GrowlitheDexEntry
- db "@"
-
-ArcanineDexEntry:
- db "LEGENDARY@"
- db 6,3
- dw 3420
- TX_FAR _ArcanineDexEntry
- db "@"
-
-PoliwagDexEntry:
- db "TADPOLE@"
- db 2,0
- dw 270
- TX_FAR _PoliwagDexEntry
- db "@"
-
-PoliwhirlDexEntry:
- db "TADPOLE@"
- db 3,3
- dw 440
- TX_FAR _PoliwhirlDexEntry
- db "@"
-
-PoliwrathDexEntry:
- db "TADPOLE@"
- db 4,3
- dw 1190
- TX_FAR _PoliwrathDexEntry
- db "@"
-
-AbraDexEntry:
- db "PSI@"
- db 2,11
- dw 430
- TX_FAR _AbraDexEntry
- db "@"
-
-KadabraDexEntry:
- db "PSI@"
- db 4,3
- dw 1250
- TX_FAR _KadabraDexEntry
- db "@"
-
-AlakazamDexEntry:
- db "PSI@"
- db 4,11
- dw 1060
- TX_FAR _AlakazamDexEntry
- db "@"
-
-MachopDexEntry:
- db "SUPERPOWER@"
- db 2,7
- dw 430
- TX_FAR _MachopDexEntry
- db "@"
-
-MachokeDexEntry:
- db "SUPERPOWER@"
- db 4,11
- dw 1550
- TX_FAR _MachokeDexEntry
- db "@"
-
-MachampDexEntry:
- db "SUPERPOWER@"
- db 5,3
- dw 2870
- TX_FAR _MachampDexEntry
- db "@"
-
-BellsproutDexEntry:
- db "FLOWER@"
- db 2,4
- dw 90
- TX_FAR _BellsproutDexEntry
- db "@"
-
-WeepinbellDexEntry:
- db "FLYCATCHER@"
- db 3,3
- dw 140
- TX_FAR _WeepinbellDexEntry
- db "@"
-
-VictreebelDexEntry:
- db "FLYCATCHER@"
- db 5,7
- dw 340
- TX_FAR _VictreebelDexEntry
- db "@"
-
-TentacoolDexEntry:
- db "JELLYFISH@"
- db 2,11
- dw 1000
- TX_FAR _TentacoolDexEntry
- db "@"
-
-TentacruelDexEntry:
- db "JELLYFISH@"
- db 5,3
- dw 1210
- TX_FAR _TentacruelDexEntry
- db "@"
-
-GeodudeDexEntry:
- db "ROCK@"
- db 1,4
- dw 440
- TX_FAR _GeodudeDexEntry
- db "@"
-
-GravelerDexEntry:
- db "ROCK@"
- db 3,3
- dw 2320
- TX_FAR _GravelerDexEntry
- db "@"
-
-GolemDexEntry:
- db "MEGATON@"
- db 4,7
- dw 6620
- TX_FAR _GolemDexEntry
- db "@"
-
-PonytaDexEntry:
- db "FIRE HORSE@"
- db 3,3
- dw 660
- TX_FAR _PonytaDexEntry
- db "@"
-
-RapidashDexEntry:
- db "FIRE HORSE@"
- db 5,7
- dw 2090
- TX_FAR _RapidashDexEntry
- db "@"
-
-SlowpokeDexEntry:
- db "DOPEY@"
- db 3,11
- dw 790
- TX_FAR _SlowpokeDexEntry
- db "@"
-
-SlowbroDexEntry:
- db "HERMITCRAB@"
- db 5,3
- dw 1730
- TX_FAR _SlowbroDexEntry
- db "@"
-
-MagnemiteDexEntry:
- db "MAGNET@"
- db 1,0
- dw 130
- TX_FAR _MagnemiteDexEntry
- db "@"
-
-MagnetonDexEntry:
- db "MAGNET@"
- db 3,3
- dw 1320
- TX_FAR _MagnetonDexEntry
- db "@"
-
-FarfetchdDexEntry:
- db "WILD DUCK@"
- db 2,7
- dw 330
- TX_FAR _FarfetchdDexEntry
- db "@"
-
-DoduoDexEntry:
- db "TWIN BIRD@"
- db 4,7
- dw 860
- TX_FAR _DoduoDexEntry
- db "@"
-
-DodrioDexEntry:
- db "TRIPLEBIRD@"
- db 5,11
- dw 1880
- TX_FAR _DodrioDexEntry
- db "@"
-
-SeelDexEntry:
- db "SEA LION@"
- db 3,7
- dw 1980
- TX_FAR _SeelDexEntry
- db "@"
-
-DewgongDexEntry:
- db "SEA LION@"
- db 5,7
- dw 2650
- TX_FAR _DewgongDexEntry
- db "@"
-
-GrimerDexEntry:
- db "SLUDGE@"
- db 2,11
- dw 660
- TX_FAR _GrimerDexEntry
- db "@"
-
-MukDexEntry:
- db "SLUDGE@"
- db 3,11
- dw 660
- TX_FAR _MukDexEntry
- db "@"
-
-ShellderDexEntry:
- db "BIVALVE@"
- db 1,0
- dw 90
- TX_FAR _ShellderDexEntry
- db "@"
-
-CloysterDexEntry:
- db "BIVALVE@"
- db 4,11
- dw 2920
- TX_FAR _CloysterDexEntry
- db "@"
-
-GastlyDexEntry:
- db "GAS@"
- db 4,3
- dw 2
- TX_FAR _GastlyDexEntry
- db "@"
-
-HaunterDexEntry:
- db "GAS@"
- db 5,3
- dw 2
- TX_FAR _HaunterDexEntry
- db "@"
-
-GengarDexEntry:
- db "SHADOW@"
- db 4,11
- dw 890
- TX_FAR _GengarDexEntry
- db "@"
-
-OnixDexEntry:
- db "ROCK SNAKE@"
- db 28,10
- dw 4630
- TX_FAR _OnixDexEntry
- db "@"
-
-DrowzeeDexEntry:
- db "HYPNOSIS@"
- db 3,3
- dw 710
- TX_FAR _DrowzeeDexEntry
- db "@"
-
-HypnoDexEntry:
- db "HYPNOSIS@"
- db 5,3
- dw 1670
- TX_FAR _HypnoDexEntry
- db "@"
-
-KrabbyDexEntry:
- db "RIVER CRAB@"
- db 1,4
- dw 140
- TX_FAR _KrabbyDexEntry
- db "@"
-
-KinglerDexEntry:
- db "PINCER@"
- db 4,3
- dw 1320
- TX_FAR _KinglerDexEntry
- db "@"
-
-VoltorbDexEntry:
- db "BALL@"
- db 1,8
- dw 230
- TX_FAR _VoltorbDexEntry
- db "@"
-
-ElectrodeDexEntry:
- db "BALL@"
- db 3,11
- dw 1470
- TX_FAR _ElectrodeDexEntry
- db "@"
-
-ExeggcuteDexEntry:
- db "EGG@"
- db 1,4
- dw 60
- TX_FAR _ExeggcuteDexEntry
- db "@"
-
-ExeggutorDexEntry:
- db "COCONUT@"
- db 6,7
- dw 2650
- TX_FAR _ExeggutorDexEntry
- db "@"
-
-CuboneDexEntry:
- db "LONELY@"
- db 1,4
- dw 140
- TX_FAR _CuboneDexEntry
- db "@"
-
-MarowakDexEntry:
- db "BONEKEEPER@"
- db 3,3
- dw 990
- TX_FAR _MarowakDexEntry
- db "@"
-
-HitmonleeDexEntry:
- db "KICKING@"
- db 4,11
- dw 1100
- TX_FAR _HitmonleeDexEntry
- db "@"
-
-HitmonchanDexEntry:
- db "PUNCHING@"
- db 4,7
- dw 1110
- TX_FAR _HitmonchanDexEntry
- db "@"
-
-LickitungDexEntry:
- db "LICKING@"
- db 3,11
- dw 1440
- TX_FAR _LickitungDexEntry
- db "@"
-
-KoffingDexEntry:
- db "POISON GAS@"
- db 2,0
- dw 20
- TX_FAR _KoffingDexEntry
- db "@"
-
-WeezingDexEntry:
- db "POISON GAS@"
- db 3,11
- dw 210
- TX_FAR _WeezingDexEntry
- db "@"
-
-RhyhornDexEntry:
- db "SPIKES@"
- db 3,3
- dw 2540
- TX_FAR _RhyhornDexEntry
- db "@"
-
-RhydonDexEntry:
- db "DRILL@"
- db 6,3
- dw 2650
- TX_FAR _RhydonDexEntry
- db "@"
-
-ChanseyDexEntry:
- db "EGG@"
- db 3,7
- dw 760
- TX_FAR _ChanseyDexEntry
- db "@"
-
-TangelaDexEntry:
- db "VINE@"
- db 3,3
- dw 770
- TX_FAR _TangelaDexEntry
- db "@"
-
-KangaskhanDexEntry:
- db "PARENT@"
- db 7,3
- dw 1760
- TX_FAR _KangaskhanDexEntry
- db "@"
-
-HorseaDexEntry:
- db "DRAGON@"
- db 1,4
- dw 180
- TX_FAR _HorseaDexEntry
- db "@"
-
-SeadraDexEntry:
- db "DRAGON@"
- db 3,11
- dw 550
- TX_FAR _SeadraDexEntry
- db "@"
-
-GoldeenDexEntry:
- db "GOLDFISH@"
- db 2,0
- dw 330
- TX_FAR _GoldeenDexEntry
- db "@"
-
-SeakingDexEntry:
- db "GOLDFISH@"
- db 4,3
- dw 860
- TX_FAR _SeakingDexEntry
- db "@"
-
-StaryuDexEntry:
- db "STARSHAPE@"
- db 2,7
- dw 760
- TX_FAR _StaryuDexEntry
- db "@"
-
-StarmieDexEntry:
- db "MYSTERIOUS@"
- db 3,7
- dw 1760
- TX_FAR _StarmieDexEntry
- db "@"
-
-MrMimeDexEntry:
- db "BARRIER@"
- db 4,3
- dw 1200
- TX_FAR _MrMimeDexEntry
- db "@"
-
-ScytherDexEntry:
- db "MANTIS@"
- db 4,11
- dw 1230
- TX_FAR _ScytherDexEntry
- db "@"
-
-JynxDexEntry:
- db "HUMANSHAPE@"
- db 4,7
- dw 900
- TX_FAR _JynxDexEntry
- db "@"
-
-ElectabuzzDexEntry:
- db "ELECTRIC@"
- db 3,7
- dw 660
- TX_FAR _ElectabuzzDexEntry
- db "@"
-
-MagmarDexEntry:
- db "SPITFIRE@"
- db 4,3
- dw 980
- TX_FAR _MagmarDexEntry
- db "@"
-
-PinsirDexEntry:
- db "STAGBEETLE@"
- db 4,11
- dw 1210
- TX_FAR _PinsirDexEntry
- db "@"
-
-TaurosDexEntry:
- db "WILD BULL@"
- db 4,7
- dw 1950
- TX_FAR _TaurosDexEntry
- db "@"
-
-MagikarpDexEntry:
- db "FISH@"
- db 2,11
- dw 220
- TX_FAR _MagikarpDexEntry
- db "@"
-
-GyaradosDexEntry:
- db "ATROCIOUS@"
- db 21,4
- dw 5180
- TX_FAR _GyaradosDexEntry
- db "@"
-
-LaprasDexEntry:
- db "TRANSPORT@"
- db 8,2
- dw 4850
- TX_FAR _LaprasDexEntry
- db "@"
-
-DittoDexEntry:
- db "TRANSFORM@"
- db 1,0
- dw 90
- TX_FAR _DittoDexEntry
- db "@"
-
-EeveeDexEntry:
- db "EVOLUTION@"
- db 1,0
- dw 140
- TX_FAR _EeveeDexEntry
- db "@"
-
-VaporeonDexEntry:
- db "BUBBLE JET@"
- db 3,3
- dw 640
- TX_FAR _VaporeonDexEntry
- db "@"
-
-JolteonDexEntry:
- db "LIGHTNING@"
- db 2,7
- dw 540
- TX_FAR _JolteonDexEntry
- db "@"
-
-FlareonDexEntry:
- db "FLAME@"
- db 2,11
- dw 550
- TX_FAR _FlareonDexEntry
- db "@"
-
-PorygonDexEntry:
- db "VIRTUAL@"
- db 2,7
- dw 800
- TX_FAR _PorygonDexEntry
- db "@"
-
-OmanyteDexEntry:
- db "SPIRAL@"
- db 1,4
- dw 170
- TX_FAR _OmanyteDexEntry
- db "@"
-
-OmastarDexEntry:
- db "SPIRAL@"
- db 3,3
- dw 770
- TX_FAR _OmastarDexEntry
- db "@"
-
-KabutoDexEntry:
- db "SHELLFISH@"
- db 1,8
- dw 250
- TX_FAR _KabutoDexEntry
- db "@"
-
-KabutopsDexEntry:
- db "SHELLFISH@"
- db 4,3
- dw 890
- TX_FAR _KabutopsDexEntry
- db "@"
-
-AerodactylDexEntry:
- db "FOSSIL@"
- db 5,11
- dw 1300
- TX_FAR _AerodactylDexEntry
- db "@"
-
-SnorlaxDexEntry:
- db "SLEEPING@"
- db 6,11
- dw 10140
- TX_FAR _SnorlaxDexEntry
- db "@"
-
-ArticunoDexEntry:
- db "FREEZE@"
- db 5,7
- dw 1220
- TX_FAR _ArticunoDexEntry
- db "@"
-
-ZapdosDexEntry:
- db "ELECTRIC@"
- db 5,3
- dw 1160
- TX_FAR _ZapdosDexEntry
- db "@"
-
-MoltresDexEntry:
- db "FLAME@"
- db 6,7
- dw 1320
- TX_FAR _MoltresDexEntry
- db "@"
-
-DratiniDexEntry:
- db "DRAGON@"
- db 5,11
- dw 70
- TX_FAR _DratiniDexEntry
- db "@"
-
-DragonairDexEntry:
- db "DRAGON@"
- db 13,1
- dw 360
- TX_FAR _DragonairDexEntry
- db "@"
-
-DragoniteDexEntry:
- db "DRAGON@"
- db 7,3
- dw 4630
- TX_FAR _DragoniteDexEntry
- db "@"
-
-MewtwoDexEntry:
- db "GENETIC@"
- db 6,7
- dw 2690
- TX_FAR _MewtwoDexEntry
- db "@"
-
-MewDexEntry:
- db "NEW SPECIE@"
- db 1,4
- dw 90
- TX_FAR _MewDexEntry
- db "@"
-
-MissingNoDexEntry:
- db "???@"
- db 10 ; 1.0 m
- db 100 ; 10.0 kg
- text "コメント さくせいちゅう@" ; コメント作成中 (Comment to be written)
-
-; what the game sees
-; db "???@"
-; db 10,100 ; 10 feet, 100 inches
-; dw 35072 ; dw ("コ" << 8 | 0), 3507.2 lbs
-; db "メント さくせいちゅう@" ; a whole bunch of sound effects
diff --git a/data/pokemon/base_stats.asm b/data/pokemon/base_stats.asm
new file mode 100755
index 00000000..b4360286
--- /dev/null
+++ b/data/pokemon/base_stats.asm
@@ -0,0 +1,154 @@
+BaseStats::
+MonBaseStats::
+INCLUDE "data/pokemon/base_stats/bulbasaur.asm"
+MonBaseStatsEnd::
+INCLUDE "data/pokemon/base_stats/ivysaur.asm"
+INCLUDE "data/pokemon/base_stats/venusaur.asm"
+INCLUDE "data/pokemon/base_stats/charmander.asm"
+INCLUDE "data/pokemon/base_stats/charmeleon.asm"
+INCLUDE "data/pokemon/base_stats/charizard.asm"
+INCLUDE "data/pokemon/base_stats/squirtle.asm"
+INCLUDE "data/pokemon/base_stats/wartortle.asm"
+INCLUDE "data/pokemon/base_stats/blastoise.asm"
+INCLUDE "data/pokemon/base_stats/caterpie.asm"
+INCLUDE "data/pokemon/base_stats/metapod.asm"
+INCLUDE "data/pokemon/base_stats/butterfree.asm"
+INCLUDE "data/pokemon/base_stats/weedle.asm"
+INCLUDE "data/pokemon/base_stats/kakuna.asm"
+INCLUDE "data/pokemon/base_stats/beedrill.asm"
+INCLUDE "data/pokemon/base_stats/pidgey.asm"
+INCLUDE "data/pokemon/base_stats/pidgeotto.asm"
+INCLUDE "data/pokemon/base_stats/pidgeot.asm"
+INCLUDE "data/pokemon/base_stats/rattata.asm"
+INCLUDE "data/pokemon/base_stats/raticate.asm"
+INCLUDE "data/pokemon/base_stats/spearow.asm"
+INCLUDE "data/pokemon/base_stats/fearow.asm"
+INCLUDE "data/pokemon/base_stats/ekans.asm"
+INCLUDE "data/pokemon/base_stats/arbok.asm"
+INCLUDE "data/pokemon/base_stats/pikachu.asm"
+INCLUDE "data/pokemon/base_stats/raichu.asm"
+INCLUDE "data/pokemon/base_stats/sandshrew.asm"
+INCLUDE "data/pokemon/base_stats/sandslash.asm"
+INCLUDE "data/pokemon/base_stats/nidoranf.asm"
+INCLUDE "data/pokemon/base_stats/nidorina.asm"
+INCLUDE "data/pokemon/base_stats/nidoqueen.asm"
+INCLUDE "data/pokemon/base_stats/nidoranm.asm"
+INCLUDE "data/pokemon/base_stats/nidorino.asm"
+INCLUDE "data/pokemon/base_stats/nidoking.asm"
+INCLUDE "data/pokemon/base_stats/clefairy.asm"
+INCLUDE "data/pokemon/base_stats/clefable.asm"
+INCLUDE "data/pokemon/base_stats/vulpix.asm"
+INCLUDE "data/pokemon/base_stats/ninetales.asm"
+INCLUDE "data/pokemon/base_stats/jigglypuff.asm"
+INCLUDE "data/pokemon/base_stats/wigglytuff.asm"
+INCLUDE "data/pokemon/base_stats/zubat.asm"
+INCLUDE "data/pokemon/base_stats/golbat.asm"
+INCLUDE "data/pokemon/base_stats/oddish.asm"
+INCLUDE "data/pokemon/base_stats/gloom.asm"
+INCLUDE "data/pokemon/base_stats/vileplume.asm"
+INCLUDE "data/pokemon/base_stats/paras.asm"
+INCLUDE "data/pokemon/base_stats/parasect.asm"
+INCLUDE "data/pokemon/base_stats/venonat.asm"
+INCLUDE "data/pokemon/base_stats/venomoth.asm"
+INCLUDE "data/pokemon/base_stats/diglett.asm"
+INCLUDE "data/pokemon/base_stats/dugtrio.asm"
+INCLUDE "data/pokemon/base_stats/meowth.asm"
+INCLUDE "data/pokemon/base_stats/persian.asm"
+INCLUDE "data/pokemon/base_stats/psyduck.asm"
+INCLUDE "data/pokemon/base_stats/golduck.asm"
+INCLUDE "data/pokemon/base_stats/mankey.asm"
+INCLUDE "data/pokemon/base_stats/primeape.asm"
+INCLUDE "data/pokemon/base_stats/growlithe.asm"
+INCLUDE "data/pokemon/base_stats/arcanine.asm"
+INCLUDE "data/pokemon/base_stats/poliwag.asm"
+INCLUDE "data/pokemon/base_stats/poliwhirl.asm"
+INCLUDE "data/pokemon/base_stats/poliwrath.asm"
+INCLUDE "data/pokemon/base_stats/abra.asm"
+INCLUDE "data/pokemon/base_stats/kadabra.asm"
+INCLUDE "data/pokemon/base_stats/alakazam.asm"
+INCLUDE "data/pokemon/base_stats/machop.asm"
+INCLUDE "data/pokemon/base_stats/machoke.asm"
+INCLUDE "data/pokemon/base_stats/machamp.asm"
+INCLUDE "data/pokemon/base_stats/bellsprout.asm"
+INCLUDE "data/pokemon/base_stats/weepinbell.asm"
+INCLUDE "data/pokemon/base_stats/victreebel.asm"
+INCLUDE "data/pokemon/base_stats/tentacool.asm"
+INCLUDE "data/pokemon/base_stats/tentacruel.asm"
+INCLUDE "data/pokemon/base_stats/geodude.asm"
+INCLUDE "data/pokemon/base_stats/graveler.asm"
+INCLUDE "data/pokemon/base_stats/golem.asm"
+INCLUDE "data/pokemon/base_stats/ponyta.asm"
+INCLUDE "data/pokemon/base_stats/rapidash.asm"
+INCLUDE "data/pokemon/base_stats/slowpoke.asm"
+INCLUDE "data/pokemon/base_stats/slowbro.asm"
+INCLUDE "data/pokemon/base_stats/magnemite.asm"
+INCLUDE "data/pokemon/base_stats/magneton.asm"
+INCLUDE "data/pokemon/base_stats/farfetchd.asm"
+INCLUDE "data/pokemon/base_stats/doduo.asm"
+INCLUDE "data/pokemon/base_stats/dodrio.asm"
+INCLUDE "data/pokemon/base_stats/seel.asm"
+INCLUDE "data/pokemon/base_stats/dewgong.asm"
+INCLUDE "data/pokemon/base_stats/grimer.asm"
+INCLUDE "data/pokemon/base_stats/muk.asm"
+INCLUDE "data/pokemon/base_stats/shellder.asm"
+INCLUDE "data/pokemon/base_stats/cloyster.asm"
+INCLUDE "data/pokemon/base_stats/gastly.asm"
+INCLUDE "data/pokemon/base_stats/haunter.asm"
+INCLUDE "data/pokemon/base_stats/gengar.asm"
+INCLUDE "data/pokemon/base_stats/onix.asm"
+INCLUDE "data/pokemon/base_stats/drowzee.asm"
+INCLUDE "data/pokemon/base_stats/hypno.asm"
+INCLUDE "data/pokemon/base_stats/krabby.asm"
+INCLUDE "data/pokemon/base_stats/kingler.asm"
+INCLUDE "data/pokemon/base_stats/voltorb.asm"
+INCLUDE "data/pokemon/base_stats/electrode.asm"
+INCLUDE "data/pokemon/base_stats/exeggcute.asm"
+INCLUDE "data/pokemon/base_stats/exeggutor.asm"
+INCLUDE "data/pokemon/base_stats/cubone.asm"
+INCLUDE "data/pokemon/base_stats/marowak.asm"
+INCLUDE "data/pokemon/base_stats/hitmonlee.asm"
+INCLUDE "data/pokemon/base_stats/hitmonchan.asm"
+INCLUDE "data/pokemon/base_stats/lickitung.asm"
+INCLUDE "data/pokemon/base_stats/koffing.asm"
+INCLUDE "data/pokemon/base_stats/weezing.asm"
+INCLUDE "data/pokemon/base_stats/rhyhorn.asm"
+INCLUDE "data/pokemon/base_stats/rhydon.asm"
+INCLUDE "data/pokemon/base_stats/chansey.asm"
+INCLUDE "data/pokemon/base_stats/tangela.asm"
+INCLUDE "data/pokemon/base_stats/kangaskhan.asm"
+INCLUDE "data/pokemon/base_stats/horsea.asm"
+INCLUDE "data/pokemon/base_stats/seadra.asm"
+INCLUDE "data/pokemon/base_stats/goldeen.asm"
+INCLUDE "data/pokemon/base_stats/seaking.asm"
+INCLUDE "data/pokemon/base_stats/staryu.asm"
+INCLUDE "data/pokemon/base_stats/starmie.asm"
+INCLUDE "data/pokemon/base_stats/mrmime.asm"
+INCLUDE "data/pokemon/base_stats/scyther.asm"
+INCLUDE "data/pokemon/base_stats/jynx.asm"
+INCLUDE "data/pokemon/base_stats/electabuzz.asm"
+INCLUDE "data/pokemon/base_stats/magmar.asm"
+INCLUDE "data/pokemon/base_stats/pinsir.asm"
+INCLUDE "data/pokemon/base_stats/tauros.asm"
+INCLUDE "data/pokemon/base_stats/magikarp.asm"
+INCLUDE "data/pokemon/base_stats/gyarados.asm"
+INCLUDE "data/pokemon/base_stats/lapras.asm"
+INCLUDE "data/pokemon/base_stats/ditto.asm"
+INCLUDE "data/pokemon/base_stats/eevee.asm"
+INCLUDE "data/pokemon/base_stats/vaporeon.asm"
+INCLUDE "data/pokemon/base_stats/jolteon.asm"
+INCLUDE "data/pokemon/base_stats/flareon.asm"
+INCLUDE "data/pokemon/base_stats/porygon.asm"
+INCLUDE "data/pokemon/base_stats/omanyte.asm"
+INCLUDE "data/pokemon/base_stats/omastar.asm"
+INCLUDE "data/pokemon/base_stats/kabuto.asm"
+INCLUDE "data/pokemon/base_stats/kabutops.asm"
+INCLUDE "data/pokemon/base_stats/aerodactyl.asm"
+INCLUDE "data/pokemon/base_stats/snorlax.asm"
+INCLUDE "data/pokemon/base_stats/articuno.asm"
+INCLUDE "data/pokemon/base_stats/zapdos.asm"
+INCLUDE "data/pokemon/base_stats/moltres.asm"
+INCLUDE "data/pokemon/base_stats/dratini.asm"
+INCLUDE "data/pokemon/base_stats/dragonair.asm"
+INCLUDE "data/pokemon/base_stats/dragonite.asm"
+INCLUDE "data/pokemon/base_stats/mewtwo.asm"
+INCLUDE "data/pokemon/base_stats/mew.asm"
diff --git a/data/pokemon/base_stats/abra.asm b/data/pokemon/base_stats/abra.asm
new file mode 100644
index 00000000..54c9a9c9
--- /dev/null
+++ b/data/pokemon/base_stats/abra.asm
@@ -0,0 +1,24 @@
+ db DEX_ABRA ; pokedex id
+
+ db 25, 20, 15, 90, 105
+ ; hp atk def spd spc
+
+ db PSYCHIC_TYPE, PSYCHIC_TYPE ; type
+ db 200 ; catch rate
+ db 73 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/abra.pic", 0, 1 ; sprite dimensions
+ dw AbraPicFront, AbraPicBack
+
+ db TELEPORT, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ PSYCHIC_M, TELEPORT, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, METRONOME, SKULL_BASH, REST, THUNDER_WAVE, \
+ PSYWAVE, TRI_ATTACK, SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/aerodactyl.asm b/data/pokemon/base_stats/aerodactyl.asm
new file mode 100644
index 00000000..5ed73b3e
--- /dev/null
+++ b/data/pokemon/base_stats/aerodactyl.asm
@@ -0,0 +1,23 @@
+ db DEX_AERODACTYL ; pokedex id
+
+ db 80, 105, 65, 130, 60
+ ; hp atk def spd spc
+
+ db ROCK, FLYING ; type
+ db 45 ; catch rate
+ db 202 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/aerodactyl.pic", 0, 1 ; sprite dimensions
+ dw AerodactylPicFront, AerodactylPicBack
+
+ db WING_ATTACK, AGILITY, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, WHIRLWIND, TOXIC, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, DRAGON_RAGE, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, FIRE_BLAST, SWIFT, SKY_ATTACK, \
+ REST, SUBSTITUTE, FLY
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/alakazam.asm b/data/pokemon/base_stats/alakazam.asm
new file mode 100644
index 00000000..c3e1c4cd
--- /dev/null
+++ b/data/pokemon/base_stats/alakazam.asm
@@ -0,0 +1,25 @@
+ db DEX_ALAKAZAM ; pokedex id
+
+ db 55, 50, 45, 120, 135
+ ; hp atk def spd spc
+
+ db PSYCHIC_TYPE, PSYCHIC_TYPE ; type
+ db 50 ; catch rate
+ db 186 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/alakazam.pic", 0, 1 ; sprite dimensions
+ dw AlakazamPicFront, AlakazamPicBack
+
+ db TELEPORT, KINESIS, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, DIG, PSYCHIC_M, TELEPORT, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, METRONOME, SKULL_BASH, \
+ REST, THUNDER_WAVE, PSYWAVE, TRI_ATTACK, SUBSTITUTE, \
+ FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/arbok.asm b/data/pokemon/base_stats/arbok.asm
new file mode 100644
index 00000000..f981efae
--- /dev/null
+++ b/data/pokemon/base_stats/arbok.asm
@@ -0,0 +1,23 @@
+ db DEX_ARBOK ; pokedex id
+
+ db 60, 85, 69, 80, 65
+ ; hp atk def spd spc
+
+ db POISON, POISON ; type
+ db 90 ; catch rate
+ db 147 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/arbok.pic", 0, 1 ; sprite dimensions
+ dw ArbokPicFront, ArbokPicBack
+
+ db WRAP, LEER, POISON_STING, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, HYPER_BEAM, \
+ RAGE, MEGA_DRAIN, EARTHQUAKE, FISSURE, DIG, \
+ MIMIC, DOUBLE_TEAM, BIDE, SKULL_BASH, REST, \
+ ROCK_SLIDE, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/arcanine.asm b/data/pokemon/base_stats/arcanine.asm
new file mode 100644
index 00000000..380be0a8
--- /dev/null
+++ b/data/pokemon/base_stats/arcanine.asm
@@ -0,0 +1,23 @@
+ db DEX_ARCANINE ; pokedex id
+
+ db 90, 110, 80, 95, 80
+ ; hp atk def spd spc
+
+ db FIRE, FIRE ; type
+ db 75 ; catch rate
+ db 213 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/arcanine.pic", 0, 1 ; sprite dimensions
+ dw ArcaninePicFront, ArcaninePicBack
+
+ db ROAR, EMBER, LEER, TAKE_DOWN ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, HYPER_BEAM, \
+ RAGE, DRAGON_RAGE, DIG, TELEPORT, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, FIRE_BLAST, SWIFT, \
+ SKULL_BASH, REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/articuno.asm b/data/pokemon/base_stats/articuno.asm
new file mode 100644
index 00000000..d53fc4fc
--- /dev/null
+++ b/data/pokemon/base_stats/articuno.asm
@@ -0,0 +1,23 @@
+ db DEX_ARTICUNO ; pokedex id
+
+ db 90, 85, 100, 85, 125
+ ; hp atk def spd spc
+
+ db ICE, FLYING ; type
+ db 3 ; catch rate
+ db 215 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/articuno.pic", 0, 1 ; sprite dimensions
+ dw ArticunoPicFront, ArticunoPicBack
+
+ db PECK, ICE_BEAM, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, WHIRLWIND, TOXIC, TAKE_DOWN, DOUBLE_EDGE, \
+ BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, HYPER_BEAM, \
+ RAGE, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ SWIFT, SKY_ATTACK, REST, SUBSTITUTE, FLY
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/beedrill.asm b/data/pokemon/base_stats/beedrill.asm
new file mode 100644
index 00000000..ac1c5757
--- /dev/null
+++ b/data/pokemon/base_stats/beedrill.asm
@@ -0,0 +1,23 @@
+ db DEX_BEEDRILL ; pokedex id
+
+ db 65, 80, 40, 75, 45
+ ; hp atk def spd spc
+
+ db BUG, POISON ; type
+ db 45 ; catch rate
+ db 159 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/beedrill.pic", 0, 1 ; sprite dimensions
+ dw BeedrillPicFront, BeedrillPicBack
+
+ db FURY_ATTACK, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, TAKE_DOWN, DOUBLE_EDGE, HYPER_BEAM, \
+ RAGE, MEGA_DRAIN, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, SWIFT, SKULL_BASH, REST, SUBSTITUTE, \
+ CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/bellsprout.asm b/data/pokemon/base_stats/bellsprout.asm
new file mode 100644
index 00000000..8b46be24
--- /dev/null
+++ b/data/pokemon/base_stats/bellsprout.asm
@@ -0,0 +1,22 @@
+ db DEX_BELLSPROUT ; pokedex id
+
+ db 50, 75, 35, 40, 70
+ ; hp atk def spd spc
+
+ db GRASS, POISON ; type
+ db 255 ; catch rate
+ db 84 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/bellsprout.pic", 0, 1 ; sprite dimensions
+ dw BellsproutPicFront, BellsproutPicBack
+
+ db VINE_WHIP, GROWTH, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, TAKE_DOWN, DOUBLE_EDGE, RAGE, \
+ MEGA_DRAIN, SOLARBEAM, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, REST, SUBSTITUTE, CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/blastoise.asm b/data/pokemon/base_stats/blastoise.asm
new file mode 100644
index 00000000..041db750
--- /dev/null
+++ b/data/pokemon/base_stats/blastoise.asm
@@ -0,0 +1,25 @@
+ db DEX_BLASTOISE ; pokedex id
+
+ db 79, 83, 100, 78, 85
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 45 ; catch rate
+ db 210 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/blastoise.pic", 0, 1 ; sprite dimensions
+ dw BlastoisePicFront, BlastoisePicBack
+
+ db TACKLE, TAIL_WHIP, BUBBLE, WATER_GUN ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ EARTHQUAKE, FISSURE, DIG, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, SKULL_BASH, REST, SUBSTITUTE, \
+ SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/bulbasaur.asm b/data/pokemon/base_stats/bulbasaur.asm
new file mode 100644
index 00000000..a20d2744
--- /dev/null
+++ b/data/pokemon/base_stats/bulbasaur.asm
@@ -0,0 +1,22 @@
+ db DEX_BULBASAUR ; pokedex id
+
+ db 45, 49, 49, 45, 65
+ ; hp atk def spd spc
+
+ db GRASS, POISON ; type
+ db 45 ; catch rate
+ db 64 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/bulbasaur.pic", 0, 1 ; sprite dimensions
+ dw BulbasaurPicFront, BulbasaurPicBack
+
+ db TACKLE, GROWL, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ RAGE, MEGA_DRAIN, SOLARBEAM, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, REST, SUBSTITUTE, CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/butterfree.asm b/data/pokemon/base_stats/butterfree.asm
new file mode 100644
index 00000000..ca480b58
--- /dev/null
+++ b/data/pokemon/base_stats/butterfree.asm
@@ -0,0 +1,23 @@
+ db DEX_BUTTERFREE ; pokedex id
+
+ db 60, 45, 50, 70, 80
+ ; hp atk def spd spc
+
+ db BUG, FLYING ; type
+ db 45 ; catch rate
+ db 160 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/butterfree.pic", 0, 1 ; sprite dimensions
+ dw ButterfreePicFront, ButterfreePicBack
+
+ db CONFUSION, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, WHIRLWIND, TOXIC, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, MEGA_DRAIN, SOLARBEAM, PSYCHIC_M, \
+ TELEPORT, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ SWIFT, REST, PSYWAVE, SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/caterpie.asm b/data/pokemon/base_stats/caterpie.asm
new file mode 100644
index 00000000..1f048547
--- /dev/null
+++ b/data/pokemon/base_stats/caterpie.asm
@@ -0,0 +1,20 @@
+ db DEX_CATERPIE ; pokedex id
+
+ db 45, 30, 35, 45, 20
+ ; hp atk def spd spc
+
+ db BUG, BUG ; type
+ db 255 ; catch rate
+ db 53 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/caterpie.pic", 0, 1 ; sprite dimensions
+ dw CaterpiePicFront, CaterpiePicBack
+
+ db TACKLE, STRING_SHOT, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/chansey.asm b/data/pokemon/base_stats/chansey.asm
new file mode 100644
index 00000000..81da1513
--- /dev/null
+++ b/data/pokemon/base_stats/chansey.asm
@@ -0,0 +1,27 @@
+ db DEX_CHANSEY ; pokedex id
+
+ db 250, 5, 5, 50, 105
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 30 ; catch rate
+ db 255 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/chansey.pic", 0, 1 ; sprite dimensions
+ dw ChanseyPicFront, ChanseyPicBack
+
+ db POUND, TAIL_WHIP, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ SOLARBEAM, THUNDERBOLT, THUNDER, PSYCHIC_M, TELEPORT, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, METRONOME, \
+ EGG_BOMB, FIRE_BLAST, SKULL_BASH, SOFTBOILED, REST, \
+ THUNDER_WAVE, PSYWAVE, TRI_ATTACK, SUBSTITUTE, STRENGTH, \
+ FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/charizard.asm b/data/pokemon/base_stats/charizard.asm
new file mode 100644
index 00000000..7154f472
--- /dev/null
+++ b/data/pokemon/base_stats/charizard.asm
@@ -0,0 +1,25 @@
+ db DEX_CHARIZARD ; pokedex id
+
+ db 78, 84, 78, 100, 85
+ ; hp atk def spd spc
+
+ db FIRE, FLYING ; type
+ db 45 ; catch rate
+ db 209 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/charizard.pic", 0, 1 ; sprite dimensions
+ dw CharizardPicFront, CharizardPicBack
+
+ db SCRATCH, GROWL, EMBER, LEER ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, SWORDS_DANCE, MEGA_KICK, TOXIC, BODY_SLAM, \
+ TAKE_DOWN, DOUBLE_EDGE, HYPER_BEAM, SUBMISSION, COUNTER, \
+ SEISMIC_TOSS, RAGE, DRAGON_RAGE, EARTHQUAKE, FISSURE, \
+ DIG, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ FIRE_BLAST, SWIFT, SKULL_BASH, REST, SUBSTITUTE, \
+ CUT, FLY, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/charmander.asm b/data/pokemon/base_stats/charmander.asm
new file mode 100644
index 00000000..4e3a7f59
--- /dev/null
+++ b/data/pokemon/base_stats/charmander.asm
@@ -0,0 +1,24 @@
+ db DEX_CHARMANDER ; pokedex id
+
+ db 39, 52, 43, 65, 50
+ ; hp atk def spd spc
+
+ db FIRE, FIRE ; type
+ db 45 ; catch rate
+ db 65 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/charmander.pic", 0, 1 ; sprite dimensions
+ dw CharmanderPicFront, CharmanderPicBack
+
+ db SCRATCH, GROWL, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, SWORDS_DANCE, MEGA_KICK, TOXIC, BODY_SLAM, \
+ TAKE_DOWN, DOUBLE_EDGE, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, DRAGON_RAGE, DIG, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, FIRE_BLAST, SWIFT, SKULL_BASH, \
+ REST, SUBSTITUTE, CUT, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/charmeleon.asm b/data/pokemon/base_stats/charmeleon.asm
new file mode 100644
index 00000000..e85ef0de
--- /dev/null
+++ b/data/pokemon/base_stats/charmeleon.asm
@@ -0,0 +1,24 @@
+ db DEX_CHARMELEON ; pokedex id
+
+ db 58, 64, 58, 80, 65
+ ; hp atk def spd spc
+
+ db FIRE, FIRE ; type
+ db 45 ; catch rate
+ db 142 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/charmeleon.pic", 0, 1 ; sprite dimensions
+ dw CharmeleonPicFront, CharmeleonPicBack
+
+ db SCRATCH, GROWL, EMBER, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, SWORDS_DANCE, MEGA_KICK, TOXIC, BODY_SLAM, \
+ TAKE_DOWN, DOUBLE_EDGE, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, DRAGON_RAGE, DIG, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, FIRE_BLAST, SWIFT, SKULL_BASH, \
+ REST, SUBSTITUTE, CUT, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/clefable.asm b/data/pokemon/base_stats/clefable.asm
new file mode 100644
index 00000000..c01ac2e6
--- /dev/null
+++ b/data/pokemon/base_stats/clefable.asm
@@ -0,0 +1,26 @@
+ db DEX_CLEFABLE ; pokedex id
+
+ db 95, 70, 73, 60, 85
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 25 ; catch rate
+ db 129 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/clefable.pic", 0, 1 ; sprite dimensions
+ dw ClefablePicFront, ClefablePicBack
+
+ db SING, DOUBLESLAP, MINIMIZE, METRONOME ; level 1 learnset
+ db GROWTH_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ SOLARBEAM, THUNDERBOLT, THUNDER, PSYCHIC_M, TELEPORT, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, METRONOME, \
+ FIRE_BLAST, SKULL_BASH, REST, THUNDER_WAVE, PSYWAVE, \
+ TRI_ATTACK, SUBSTITUTE, STRENGTH, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/clefairy.asm b/data/pokemon/base_stats/clefairy.asm
new file mode 100644
index 00000000..a00ccafe
--- /dev/null
+++ b/data/pokemon/base_stats/clefairy.asm
@@ -0,0 +1,26 @@
+ db DEX_CLEFAIRY ; pokedex id
+
+ db 70, 45, 48, 35, 60
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 150 ; catch rate
+ db 68 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/clefairy.pic", 0, 1 ; sprite dimensions
+ dw ClefairyPicFront, ClefairyPicBack
+
+ db POUND, GROWL, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, SOLARBEAM, \
+ THUNDERBOLT, THUNDER, PSYCHIC_M, TELEPORT, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, METRONOME, FIRE_BLAST, \
+ SKULL_BASH, REST, THUNDER_WAVE, PSYWAVE, TRI_ATTACK, \
+ SUBSTITUTE, STRENGTH, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/cloyster.asm b/data/pokemon/base_stats/cloyster.asm
new file mode 100644
index 00000000..eb691a50
--- /dev/null
+++ b/data/pokemon/base_stats/cloyster.asm
@@ -0,0 +1,24 @@
+ db DEX_CLOYSTER ; pokedex id
+
+ db 50, 95, 180, 70, 85
+ ; hp atk def spd spc
+
+ db WATER, ICE ; type
+ db 60 ; catch rate
+ db 203 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/cloyster.pic", 0, 1 ; sprite dimensions
+ dw CloysterPicFront, CloysterPicBack
+
+ db WITHDRAW, SUPERSONIC, CLAMP, AURORA_BEAM ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, \
+ ICE_BEAM, BLIZZARD, HYPER_BEAM, RAGE, TELEPORT, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, SELFDESTRUCT, \
+ SWIFT, REST, EXPLOSION, TRI_ATTACK, SUBSTITUTE, \
+ SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/cubone.asm b/data/pokemon/base_stats/cubone.asm
new file mode 100644
index 00000000..53224fb8
--- /dev/null
+++ b/data/pokemon/base_stats/cubone.asm
@@ -0,0 +1,24 @@
+ db DEX_CUBONE ; pokedex id
+
+ db 50, 50, 95, 35, 40
+ ; hp atk def spd spc
+
+ db GROUND, GROUND ; type
+ db 190 ; catch rate
+ db 87 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/cubone.pic", 0, 1 ; sprite dimensions
+ dw CubonePicFront, CubonePicBack
+
+ db GROWL, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, EARTHQUAKE, \
+ FISSURE, DIG, MIMIC, DOUBLE_TEAM, BIDE, \
+ FIRE_BLAST, SKULL_BASH, REST, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/dewgong.asm b/data/pokemon/base_stats/dewgong.asm
new file mode 100644
index 00000000..7bb63662
--- /dev/null
+++ b/data/pokemon/base_stats/dewgong.asm
@@ -0,0 +1,23 @@
+ db DEX_DEWGONG ; pokedex id
+
+ db 90, 70, 80, 70, 95
+ ; hp atk def spd spc
+
+ db WATER, ICE ; type
+ db 75 ; catch rate
+ db 176 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/dewgong.pic", 0, 1 ; sprite dimensions
+ dw DewgongPicFront, DewgongPicBack
+
+ db HEADBUTT, GROWL, AURORA_BEAM, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, HYPER_BEAM, \
+ PAY_DAY, RAGE, MIMIC, DOUBLE_TEAM, BIDE, \
+ SKULL_BASH, REST, SUBSTITUTE, SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/diglett.asm b/data/pokemon/base_stats/diglett.asm
new file mode 100644
index 00000000..76721d69
--- /dev/null
+++ b/data/pokemon/base_stats/diglett.asm
@@ -0,0 +1,22 @@
+ db DEX_DIGLETT ; pokedex id
+
+ db 10, 55, 25, 95, 45
+ ; hp atk def spd spc
+
+ db GROUND, GROUND ; type
+ db 255 ; catch rate
+ db 81 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/diglett.pic", 0, 1 ; sprite dimensions
+ dw DiglettPicFront, DiglettPicBack
+
+ db SCRATCH, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, RAGE, \
+ EARTHQUAKE, FISSURE, DIG, MIMIC, DOUBLE_TEAM, \
+ BIDE, REST, ROCK_SLIDE, SUBSTITUTE, CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/ditto.asm b/data/pokemon/base_stats/ditto.asm
new file mode 100644
index 00000000..a8a175ec
--- /dev/null
+++ b/data/pokemon/base_stats/ditto.asm
@@ -0,0 +1,20 @@
+ db DEX_DITTO ; pokedex id
+
+ db 48, 48, 48, 48, 48
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 35 ; catch rate
+ db 61 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/ditto.pic", 0, 1 ; sprite dimensions
+ dw DittoPicFront, DittoPicBack
+
+ db TRANSFORM, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/dodrio.asm b/data/pokemon/base_stats/dodrio.asm
new file mode 100644
index 00000000..481c021b
--- /dev/null
+++ b/data/pokemon/base_stats/dodrio.asm
@@ -0,0 +1,23 @@
+ db DEX_DODRIO ; pokedex id
+
+ db 60, 110, 70, 100, 60
+ ; hp atk def spd spc
+
+ db NORMAL, FLYING ; type
+ db 45 ; catch rate
+ db 158 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/dodrio.pic", 0, 1 ; sprite dimensions
+ dw DodrioPicFront, DodrioPicBack
+
+ db PECK, GROWL, FURY_ATTACK, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm WHIRLWIND, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, SKULL_BASH, SKY_ATTACK, REST, TRI_ATTACK, \
+ SUBSTITUTE, FLY
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/doduo.asm b/data/pokemon/base_stats/doduo.asm
new file mode 100644
index 00000000..af9e2cf7
--- /dev/null
+++ b/data/pokemon/base_stats/doduo.asm
@@ -0,0 +1,23 @@
+ db DEX_DODUO ; pokedex id
+
+ db 35, 85, 45, 75, 35
+ ; hp atk def spd spc
+
+ db NORMAL, FLYING ; type
+ db 190 ; catch rate
+ db 96 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/doduo.pic", 0, 1 ; sprite dimensions
+ dw DoduoPicFront, DoduoPicBack
+
+ db PECK, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm WHIRLWIND, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ RAGE, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ SKULL_BASH, SKY_ATTACK, REST, TRI_ATTACK, SUBSTITUTE, \
+ FLY
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/dragonair.asm b/data/pokemon/base_stats/dragonair.asm
new file mode 100644
index 00000000..c50c8e74
--- /dev/null
+++ b/data/pokemon/base_stats/dragonair.asm
@@ -0,0 +1,24 @@
+ db DEX_DRAGONAIR ; pokedex id
+
+ db 61, 84, 65, 70, 70
+ ; hp atk def spd spc
+
+ db DRAGON, DRAGON ; type
+ db 27 ; catch rate
+ db 144 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/dragonair.pic", 0, 1 ; sprite dimensions
+ dw DragonairPicFront, DragonairPicBack
+
+ db WRAP, LEER, THUNDER_WAVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, RAGE, \
+ DRAGON_RAGE, THUNDERBOLT, THUNDER, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, FIRE_BLAST, SWIFT, SKULL_BASH, \
+ REST, THUNDER_WAVE, SUBSTITUTE, SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/dragonite.asm b/data/pokemon/base_stats/dragonite.asm
new file mode 100644
index 00000000..ff4aa45a
--- /dev/null
+++ b/data/pokemon/base_stats/dragonite.asm
@@ -0,0 +1,25 @@
+ db DEX_DRAGONITE ; pokedex id
+
+ db 91, 134, 95, 80, 100
+ ; hp atk def spd spc
+
+ db DRAGON, FLYING ; type
+ db 9 ; catch rate
+ db 218 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/dragonite.pic", 0, 1 ; sprite dimensions
+ dw DragonitePicFront, DragonitePicBack
+
+ db WRAP, LEER, THUNDER_WAVE, AGILITY ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, RAGE, DRAGON_RAGE, THUNDERBOLT, THUNDER, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, FIRE_BLAST, \
+ SWIFT, SKULL_BASH, REST, THUNDER_WAVE, SUBSTITUTE, \
+ SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/dratini.asm b/data/pokemon/base_stats/dratini.asm
new file mode 100644
index 00000000..28ac755b
--- /dev/null
+++ b/data/pokemon/base_stats/dratini.asm
@@ -0,0 +1,24 @@
+ db DEX_DRATINI ; pokedex id
+
+ db 41, 64, 45, 50, 50
+ ; hp atk def spd spc
+
+ db DRAGON, DRAGON ; type
+ db 45 ; catch rate
+ db 67 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/dratini.pic", 0, 1 ; sprite dimensions
+ dw DratiniPicFront, DratiniPicBack
+
+ db WRAP, LEER, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, ICE_BEAM, BLIZZARD, RAGE, DRAGON_RAGE, \
+ THUNDERBOLT, THUNDER, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, FIRE_BLAST, SWIFT, SKULL_BASH, REST, \
+ THUNDER_WAVE, SUBSTITUTE, SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/drowzee.asm b/data/pokemon/base_stats/drowzee.asm
new file mode 100644
index 00000000..0c71b320
--- /dev/null
+++ b/data/pokemon/base_stats/drowzee.asm
@@ -0,0 +1,24 @@
+ db DEX_DROWZEE ; pokedex id
+
+ db 60, 48, 45, 42, 90
+ ; hp atk def spd spc
+
+ db PSYCHIC_TYPE, PSYCHIC_TYPE ; type
+ db 190 ; catch rate
+ db 102 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/drowzee.pic", 0, 1 ; sprite dimensions
+ dw DrowzeePicFront, DrowzeePicBack
+
+ db POUND, HYPNOSIS, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ PSYCHIC_M, TELEPORT, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, METRONOME, SKULL_BASH, DREAM_EATER, REST, \
+ THUNDER_WAVE, PSYWAVE, TRI_ATTACK, SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/dugtrio.asm b/data/pokemon/base_stats/dugtrio.asm
new file mode 100644
index 00000000..e29c120b
--- /dev/null
+++ b/data/pokemon/base_stats/dugtrio.asm
@@ -0,0 +1,23 @@
+ db DEX_DUGTRIO ; pokedex id
+
+ db 35, 80, 50, 120, 70
+ ; hp atk def spd spc
+
+ db GROUND, GROUND ; type
+ db 50 ; catch rate
+ db 153 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/dugtrio.pic", 0, 1 ; sprite dimensions
+ dw DugtrioPicFront, DugtrioPicBack
+
+ db SCRATCH, GROWL, DIG, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, HYPER_BEAM, \
+ RAGE, EARTHQUAKE, FISSURE, DIG, MIMIC, \
+ DOUBLE_TEAM, BIDE, REST, ROCK_SLIDE, SUBSTITUTE, \
+ CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/eevee.asm b/data/pokemon/base_stats/eevee.asm
new file mode 100644
index 00000000..add50a6d
--- /dev/null
+++ b/data/pokemon/base_stats/eevee.asm
@@ -0,0 +1,22 @@
+ db DEX_EEVEE ; pokedex id
+
+ db 55, 55, 50, 55, 65
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 45 ; catch rate
+ db 92 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/eevee.pic", 0, 1 ; sprite dimensions
+ dw EeveePicFront, EeveePicBack
+
+ db TACKLE, TAIL_WHIP, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, RAGE, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, SWIFT, \
+ SKULL_BASH, REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/ekans.asm b/data/pokemon/base_stats/ekans.asm
new file mode 100644
index 00000000..0b6a8945
--- /dev/null
+++ b/data/pokemon/base_stats/ekans.asm
@@ -0,0 +1,23 @@
+ db DEX_EKANS ; pokedex id
+
+ db 35, 60, 44, 55, 40
+ ; hp atk def spd spc
+
+ db POISON, POISON ; type
+ db 255 ; catch rate
+ db 62 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/ekans.pic", 0, 1 ; sprite dimensions
+ dw EkansPicFront, EkansPicBack
+
+ db WRAP, LEER, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, RAGE, \
+ MEGA_DRAIN, EARTHQUAKE, FISSURE, DIG, MIMIC, \
+ DOUBLE_TEAM, BIDE, SKULL_BASH, REST, ROCK_SLIDE, \
+ SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/electabuzz.asm b/data/pokemon/base_stats/electabuzz.asm
new file mode 100644
index 00000000..dfd153bb
--- /dev/null
+++ b/data/pokemon/base_stats/electabuzz.asm
@@ -0,0 +1,25 @@
+ db DEX_ELECTABUZZ ; pokedex id
+
+ db 65, 83, 57, 105, 85
+ ; hp atk def spd spc
+
+ db ELECTRIC, ELECTRIC ; type
+ db 45 ; catch rate
+ db 156 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/electabuzz.pic", 0, 1 ; sprite dimensions
+ dw ElectabuzzPicFront, ElectabuzzPicBack
+
+ db QUICK_ATTACK, LEER, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, THUNDERBOLT, THUNDER, PSYCHIC_M, TELEPORT, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, METRONOME, \
+ SWIFT, SKULL_BASH, REST, THUNDER_WAVE, PSYWAVE, \
+ SUBSTITUTE, STRENGTH, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/electrode.asm b/data/pokemon/base_stats/electrode.asm
new file mode 100644
index 00000000..ae2e6cf4
--- /dev/null
+++ b/data/pokemon/base_stats/electrode.asm
@@ -0,0 +1,23 @@
+ db DEX_ELECTRODE ; pokedex id
+
+ db 60, 50, 70, 140, 80
+ ; hp atk def spd spc
+
+ db ELECTRIC, ELECTRIC ; type
+ db 60 ; catch rate
+ db 150 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/electrode.pic", 0, 1 ; sprite dimensions
+ dw ElectrodePicFront, ElectrodePicBack
+
+ db TACKLE, SCREECH, SONICBOOM, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, HYPER_BEAM, RAGE, THUNDERBOLT, \
+ THUNDER, TELEPORT, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, SELFDESTRUCT, SWIFT, SKULL_BASH, REST, \
+ THUNDER_WAVE, EXPLOSION, SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/exeggcute.asm b/data/pokemon/base_stats/exeggcute.asm
new file mode 100644
index 00000000..418c3948
--- /dev/null
+++ b/data/pokemon/base_stats/exeggcute.asm
@@ -0,0 +1,23 @@
+ db DEX_EXEGGCUTE ; pokedex id
+
+ db 60, 40, 80, 40, 60
+ ; hp atk def spd spc
+
+ db GRASS, PSYCHIC_TYPE ; type
+ db 90 ; catch rate
+ db 98 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/exeggcute.pic", 0, 1 ; sprite dimensions
+ dw ExeggcutePicFront, ExeggcutePicBack
+
+ db BARRAGE, HYPNOSIS, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, DOUBLE_EDGE, RAGE, PSYCHIC_M, \
+ TELEPORT, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ SELFDESTRUCT, EGG_BOMB, REST, PSYWAVE, EXPLOSION, \
+ SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/exeggutor.asm b/data/pokemon/base_stats/exeggutor.asm
new file mode 100644
index 00000000..236d706e
--- /dev/null
+++ b/data/pokemon/base_stats/exeggutor.asm
@@ -0,0 +1,23 @@
+ db DEX_EXEGGUTOR ; pokedex id
+
+ db 95, 95, 85, 55, 125
+ ; hp atk def spd spc
+
+ db GRASS, PSYCHIC_TYPE ; type
+ db 45 ; catch rate
+ db 212 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/exeggutor.pic", 0, 1 ; sprite dimensions
+ dw ExeggutorPicFront, ExeggutorPicBack
+
+ db BARRAGE, HYPNOSIS, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, DOUBLE_EDGE, HYPER_BEAM, RAGE, \
+ MEGA_DRAIN, SOLARBEAM, PSYCHIC_M, TELEPORT, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, SELFDESTRUCT, EGG_BOMB, \
+ REST, PSYWAVE, EXPLOSION, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/farfetchd.asm b/data/pokemon/base_stats/farfetchd.asm
new file mode 100644
index 00000000..d608b3fb
--- /dev/null
+++ b/data/pokemon/base_stats/farfetchd.asm
@@ -0,0 +1,23 @@
+ db DEX_FARFETCHD ; pokedex id
+
+ db 52, 65, 55, 60, 58
+ ; hp atk def spd spc
+
+ db NORMAL, FLYING ; type
+ db 45 ; catch rate
+ db 94 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/farfetchd.pic", 0, 1 ; sprite dimensions
+ dw FarfetchdPicFront, FarfetchdPicBack
+
+ db PECK, SAND_ATTACK, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, SWORDS_DANCE, WHIRLWIND, TOXIC, BODY_SLAM, \
+ TAKE_DOWN, DOUBLE_EDGE, RAGE, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, SWIFT, SKULL_BASH, REST, \
+ SUBSTITUTE, CUT, FLY
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/fearow.asm b/data/pokemon/base_stats/fearow.asm
new file mode 100644
index 00000000..afb89921
--- /dev/null
+++ b/data/pokemon/base_stats/fearow.asm
@@ -0,0 +1,22 @@
+ db DEX_FEAROW ; pokedex id
+
+ db 65, 90, 65, 100, 61
+ ; hp atk def spd spc
+
+ db NORMAL, FLYING ; type
+ db 90 ; catch rate
+ db 162 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/fearow.pic", 0, 1 ; sprite dimensions
+ dw FearowPicFront, FearowPicBack
+
+ db PECK, GROWL, LEER, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, WHIRLWIND, TOXIC, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, MIMIC, DOUBLE_TEAM, BIDE, \
+ SWIFT, SKY_ATTACK, REST, SUBSTITUTE, FLY
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/flareon.asm b/data/pokemon/base_stats/flareon.asm
new file mode 100644
index 00000000..0a714783
--- /dev/null
+++ b/data/pokemon/base_stats/flareon.asm
@@ -0,0 +1,22 @@
+ db DEX_FLAREON ; pokedex id
+
+ db 65, 130, 60, 65, 110
+ ; hp atk def spd spc
+
+ db FIRE, FIRE ; type
+ db 45 ; catch rate
+ db 198 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/flareon.pic", 0, 1 ; sprite dimensions
+ dw FlareonPicFront, FlareonPicBack
+
+ db TACKLE, TAIL_WHIP, QUICK_ATTACK, EMBER ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, HYPER_BEAM, \
+ RAGE, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ FIRE_BLAST, SWIFT, SKULL_BASH, REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/gastly.asm b/data/pokemon/base_stats/gastly.asm
new file mode 100644
index 00000000..fc8c86ef
--- /dev/null
+++ b/data/pokemon/base_stats/gastly.asm
@@ -0,0 +1,22 @@
+ db DEX_GASTLY ; pokedex id
+
+ db 30, 35, 30, 80, 100
+ ; hp atk def spd spc
+
+ db GHOST, POISON ; type
+ db 190 ; catch rate
+ db 95 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/gastly.pic", 0, 1 ; sprite dimensions
+ dw GastlyPicFront, GastlyPicBack
+
+ db LICK, CONFUSE_RAY, NIGHT_SHADE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, RAGE, MEGA_DRAIN, THUNDERBOLT, THUNDER, \
+ PSYCHIC_M, MIMIC, DOUBLE_TEAM, BIDE, SELFDESTRUCT, \
+ DREAM_EATER, REST, PSYWAVE, EXPLOSION, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/gengar.asm b/data/pokemon/base_stats/gengar.asm
new file mode 100644
index 00000000..dc9105c6
--- /dev/null
+++ b/data/pokemon/base_stats/gengar.asm
@@ -0,0 +1,25 @@
+ db DEX_GENGAR ; pokedex id
+
+ db 60, 65, 60, 110, 130
+ ; hp atk def spd spc
+
+ db GHOST, POISON ; type
+ db 45 ; catch rate
+ db 190 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/gengar.pic", 0, 1 ; sprite dimensions
+ dw GengarPicFront, GengarPicBack
+
+ db LICK, CONFUSE_RAY, NIGHT_SHADE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, MEGA_DRAIN, THUNDERBOLT, THUNDER, PSYCHIC_M, \
+ MIMIC, DOUBLE_TEAM, BIDE, METRONOME, SELFDESTRUCT, \
+ SKULL_BASH, DREAM_EATER, REST, PSYWAVE, EXPLOSION, \
+ SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/geodude.asm b/data/pokemon/base_stats/geodude.asm
new file mode 100644
index 00000000..a2225f5c
--- /dev/null
+++ b/data/pokemon/base_stats/geodude.asm
@@ -0,0 +1,24 @@
+ db DEX_GEODUDE ; pokedex id
+
+ db 40, 80, 100, 20, 30
+ ; hp atk def spd spc
+
+ db ROCK, GROUND ; type
+ db 255 ; catch rate
+ db 86 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/geodude.pic", 0, 1 ; sprite dimensions
+ dw GeodudePicFront, GeodudePicBack
+
+ db TACKLE, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, EARTHQUAKE, \
+ FISSURE, DIG, MIMIC, DOUBLE_TEAM, BIDE, \
+ METRONOME, SELFDESTRUCT, FIRE_BLAST, REST, EXPLOSION, \
+ ROCK_SLIDE, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/gloom.asm b/data/pokemon/base_stats/gloom.asm
new file mode 100644
index 00000000..8c24985c
--- /dev/null
+++ b/data/pokemon/base_stats/gloom.asm
@@ -0,0 +1,22 @@
+ db DEX_GLOOM ; pokedex id
+
+ db 60, 65, 70, 40, 85
+ ; hp atk def spd spc
+
+ db GRASS, POISON ; type
+ db 120 ; catch rate
+ db 132 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/gloom.pic", 0, 1 ; sprite dimensions
+ dw GloomPicFront, GloomPicBack
+
+ db ABSORB, POISONPOWDER, STUN_SPORE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, TAKE_DOWN, DOUBLE_EDGE, RAGE, \
+ MEGA_DRAIN, SOLARBEAM, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, REST, SUBSTITUTE, CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/golbat.asm b/data/pokemon/base_stats/golbat.asm
new file mode 100644
index 00000000..6eb60490
--- /dev/null
+++ b/data/pokemon/base_stats/golbat.asm
@@ -0,0 +1,22 @@
+ db DEX_GOLBAT ; pokedex id
+
+ db 75, 80, 70, 90, 75
+ ; hp atk def spd spc
+
+ db POISON, FLYING ; type
+ db 90 ; catch rate
+ db 171 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/golbat.pic", 0, 1 ; sprite dimensions
+ dw GolbatPicFront, GolbatPicBack
+
+ db LEECH_LIFE, SCREECH, BITE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, WHIRLWIND, TOXIC, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, MEGA_DRAIN, MIMIC, DOUBLE_TEAM, \
+ BIDE, SWIFT, REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/goldeen.asm b/data/pokemon/base_stats/goldeen.asm
new file mode 100644
index 00000000..662c6c93
--- /dev/null
+++ b/data/pokemon/base_stats/goldeen.asm
@@ -0,0 +1,23 @@
+ db DEX_GOLDEEN ; pokedex id
+
+ db 45, 67, 60, 63, 50
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 225 ; catch rate
+ db 111 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/goldeen.pic", 0, 1 ; sprite dimensions
+ dw GoldeenPicFront, GoldeenPicBack
+
+ db PECK, TAIL_WHIP, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, ICE_BEAM, BLIZZARD, RAGE, MIMIC, \
+ DOUBLE_TEAM, BIDE, SWIFT, SKULL_BASH, REST, \
+ SUBSTITUTE, SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/golduck.asm b/data/pokemon/base_stats/golduck.asm
new file mode 100644
index 00000000..b7c035c6
--- /dev/null
+++ b/data/pokemon/base_stats/golduck.asm
@@ -0,0 +1,25 @@
+ db DEX_GOLDUCK ; pokedex id
+
+ db 80, 82, 78, 85, 80
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 75 ; catch rate
+ db 174 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/golduck.pic", 0, 1 ; sprite dimensions
+ dw GolduckPicFront, GolduckPicBack
+
+ db SCRATCH, TAIL_WHIP, DISABLE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, PAY_DAY, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, DIG, MIMIC, DOUBLE_TEAM, BIDE, \
+ SWIFT, SKULL_BASH, REST, SUBSTITUTE, SURF, \
+ STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/golem.asm b/data/pokemon/base_stats/golem.asm
new file mode 100644
index 00000000..a8f5cbf9
--- /dev/null
+++ b/data/pokemon/base_stats/golem.asm
@@ -0,0 +1,24 @@
+ db DEX_GOLEM ; pokedex id
+
+ db 80, 110, 130, 45, 55
+ ; hp atk def spd spc
+
+ db ROCK, GROUND ; type
+ db 45 ; catch rate
+ db 177 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/golem.pic", 0, 1 ; sprite dimensions
+ dw GolemPicFront, GolemPicBack
+
+ db TACKLE, DEFENSE_CURL, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, EARTHQUAKE, FISSURE, DIG, MIMIC, \
+ DOUBLE_TEAM, BIDE, METRONOME, SELFDESTRUCT, FIRE_BLAST, \
+ REST, EXPLOSION, ROCK_SLIDE, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/graveler.asm b/data/pokemon/base_stats/graveler.asm
new file mode 100644
index 00000000..d5dfda81
--- /dev/null
+++ b/data/pokemon/base_stats/graveler.asm
@@ -0,0 +1,24 @@
+ db DEX_GRAVELER ; pokedex id
+
+ db 55, 95, 115, 35, 45
+ ; hp atk def spd spc
+
+ db ROCK, GROUND ; type
+ db 120 ; catch rate
+ db 134 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/graveler.pic", 0, 1 ; sprite dimensions
+ dw GravelerPicFront, GravelerPicBack
+
+ db TACKLE, DEFENSE_CURL, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, EARTHQUAKE, \
+ FISSURE, DIG, MIMIC, DOUBLE_TEAM, BIDE, \
+ METRONOME, SELFDESTRUCT, FIRE_BLAST, REST, EXPLOSION, \
+ ROCK_SLIDE, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/grimer.asm b/data/pokemon/base_stats/grimer.asm
new file mode 100644
index 00000000..b2e0f08a
--- /dev/null
+++ b/data/pokemon/base_stats/grimer.asm
@@ -0,0 +1,22 @@
+ db DEX_GRIMER ; pokedex id
+
+ db 80, 80, 50, 25, 40
+ ; hp atk def spd spc
+
+ db POISON, POISON ; type
+ db 190 ; catch rate
+ db 90 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/grimer.pic", 0, 1 ; sprite dimensions
+ dw GrimerPicFront, GrimerPicBack
+
+ db POUND, DISABLE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, RAGE, MEGA_DRAIN, THUNDERBOLT, \
+ THUNDER, MIMIC, DOUBLE_TEAM, BIDE, SELFDESTRUCT, \
+ FIRE_BLAST, REST, EXPLOSION, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/growlithe.asm b/data/pokemon/base_stats/growlithe.asm
new file mode 100644
index 00000000..2c70184f
--- /dev/null
+++ b/data/pokemon/base_stats/growlithe.asm
@@ -0,0 +1,23 @@
+ db DEX_GROWLITHE ; pokedex id
+
+ db 55, 70, 45, 60, 50
+ ; hp atk def spd spc
+
+ db FIRE, FIRE ; type
+ db 190 ; catch rate
+ db 91 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/growlithe.pic", 0, 1 ; sprite dimensions
+ dw GrowlithePicFront, GrowlithePicBack
+
+ db BITE, ROAR, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, RAGE, \
+ DRAGON_RAGE, DIG, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, FIRE_BLAST, SWIFT, SKULL_BASH, REST, \
+ SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/gyarados.asm b/data/pokemon/base_stats/gyarados.asm
new file mode 100644
index 00000000..13c30ff8
--- /dev/null
+++ b/data/pokemon/base_stats/gyarados.asm
@@ -0,0 +1,24 @@
+ db DEX_GYARADOS ; pokedex id
+
+ db 95, 125, 79, 81, 100
+ ; hp atk def spd spc
+
+ db WATER, FLYING ; type
+ db 45 ; catch rate
+ db 214 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/gyarados.pic", 0, 1 ; sprite dimensions
+ dw GyaradosPicFront, GyaradosPicBack
+
+ db TACKLE, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, ICE_BEAM, BLIZZARD, HYPER_BEAM, RAGE, \
+ DRAGON_RAGE, THUNDERBOLT, THUNDER, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, FIRE_BLAST, SKULL_BASH, REST, \
+ SUBSTITUTE, SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/haunter.asm b/data/pokemon/base_stats/haunter.asm
new file mode 100644
index 00000000..cf9df9ec
--- /dev/null
+++ b/data/pokemon/base_stats/haunter.asm
@@ -0,0 +1,22 @@
+ db DEX_HAUNTER ; pokedex id
+
+ db 45, 50, 45, 95, 115
+ ; hp atk def spd spc
+
+ db GHOST, POISON ; type
+ db 90 ; catch rate
+ db 126 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/haunter.pic", 0, 1 ; sprite dimensions
+ dw HaunterPicFront, HaunterPicBack
+
+ db LICK, CONFUSE_RAY, NIGHT_SHADE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, RAGE, MEGA_DRAIN, THUNDERBOLT, THUNDER, \
+ PSYCHIC_M, MIMIC, DOUBLE_TEAM, BIDE, SELFDESTRUCT, \
+ DREAM_EATER, REST, PSYWAVE, EXPLOSION, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/hitmonchan.asm b/data/pokemon/base_stats/hitmonchan.asm
new file mode 100644
index 00000000..1b7651ff
--- /dev/null
+++ b/data/pokemon/base_stats/hitmonchan.asm
@@ -0,0 +1,23 @@
+ db DEX_HITMONCHAN ; pokedex id
+
+ db 50, 105, 79, 76, 35
+ ; hp atk def spd spc
+
+ db FIGHTING, FIGHTING ; type
+ db 45 ; catch rate
+ db 140 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/hitmonchan.pic", 0, 1 ; sprite dimensions
+ dw HitmonchanPicFront, HitmonchanPicBack
+
+ db COMET_PUNCH, AGILITY, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ MIMIC, DOUBLE_TEAM, BIDE, METRONOME, SWIFT, \
+ SKULL_BASH, REST, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/hitmonlee.asm b/data/pokemon/base_stats/hitmonlee.asm
new file mode 100644
index 00000000..51da5f75
--- /dev/null
+++ b/data/pokemon/base_stats/hitmonlee.asm
@@ -0,0 +1,23 @@
+ db DEX_HITMONLEE ; pokedex id
+
+ db 50, 120, 53, 87, 35
+ ; hp atk def spd spc
+
+ db FIGHTING, FIGHTING ; type
+ db 45 ; catch rate
+ db 139 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/hitmonlee.pic", 0, 1 ; sprite dimensions
+ dw HitmonleePicFront, HitmonleePicBack
+
+ db DOUBLE_KICK, MEDITATE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ MIMIC, DOUBLE_TEAM, BIDE, METRONOME, SWIFT, \
+ SKULL_BASH, REST, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/horsea.asm b/data/pokemon/base_stats/horsea.asm
new file mode 100644
index 00000000..1a5a5aff
--- /dev/null
+++ b/data/pokemon/base_stats/horsea.asm
@@ -0,0 +1,23 @@
+ db DEX_HORSEA ; pokedex id
+
+ db 30, 40, 70, 60, 70
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 225 ; catch rate
+ db 83 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/horsea.pic", 0, 1 ; sprite dimensions
+ dw HorseaPicFront, HorseaPicBack
+
+ db BUBBLE, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, \
+ ICE_BEAM, BLIZZARD, RAGE, MIMIC, DOUBLE_TEAM, \
+ BIDE, SWIFT, SKULL_BASH, REST, SUBSTITUTE, \
+ SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/hypno.asm b/data/pokemon/base_stats/hypno.asm
new file mode 100644
index 00000000..b43cd961
--- /dev/null
+++ b/data/pokemon/base_stats/hypno.asm
@@ -0,0 +1,25 @@
+ db DEX_HYPNO ; pokedex id
+
+ db 85, 73, 70, 67, 115
+ ; hp atk def spd spc
+
+ db PSYCHIC_TYPE, PSYCHIC_TYPE ; type
+ db 75 ; catch rate
+ db 165 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/hypno.pic", 0, 1 ; sprite dimensions
+ dw HypnoPicFront, HypnoPicBack
+
+ db POUND, HYPNOSIS, DISABLE, CONFUSION ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, PSYCHIC_M, TELEPORT, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, METRONOME, SKULL_BASH, DREAM_EATER, \
+ REST, THUNDER_WAVE, PSYWAVE, TRI_ATTACK, SUBSTITUTE, \
+ FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/ivysaur.asm b/data/pokemon/base_stats/ivysaur.asm
new file mode 100644
index 00000000..3d69a8d7
--- /dev/null
+++ b/data/pokemon/base_stats/ivysaur.asm
@@ -0,0 +1,22 @@
+ db DEX_IVYSAUR ; pokedex id
+
+ db 60, 62, 63, 60, 80
+ ; hp atk def spd spc
+
+ db GRASS, POISON ; type
+ db 45 ; catch rate
+ db 141 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/ivysaur.pic", 0, 1 ; sprite dimensions
+ dw IvysaurPicFront, IvysaurPicBack
+
+ db TACKLE, GROWL, LEECH_SEED, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ RAGE, MEGA_DRAIN, SOLARBEAM, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, REST, SUBSTITUTE, CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/jigglypuff.asm b/data/pokemon/base_stats/jigglypuff.asm
new file mode 100644
index 00000000..8348431d
--- /dev/null
+++ b/data/pokemon/base_stats/jigglypuff.asm
@@ -0,0 +1,26 @@
+ db DEX_JIGGLYPUFF ; pokedex id
+
+ db 115, 45, 20, 20, 25
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 170 ; catch rate
+ db 76 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/jigglypuff.pic", 0, 1 ; sprite dimensions
+ dw JigglypuffPicFront, JigglypuffPicBack
+
+ db SING, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, SOLARBEAM, \
+ THUNDERBOLT, THUNDER, PSYCHIC_M, TELEPORT, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, FIRE_BLAST, SKULL_BASH, \
+ REST, THUNDER_WAVE, PSYWAVE, TRI_ATTACK, SUBSTITUTE, \
+ STRENGTH, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/jolteon.asm b/data/pokemon/base_stats/jolteon.asm
new file mode 100644
index 00000000..3db8c96a
--- /dev/null
+++ b/data/pokemon/base_stats/jolteon.asm
@@ -0,0 +1,23 @@
+ db DEX_JOLTEON ; pokedex id
+
+ db 65, 65, 60, 130, 110
+ ; hp atk def spd spc
+
+ db ELECTRIC, ELECTRIC ; type
+ db 45 ; catch rate
+ db 197 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/jolteon.pic", 0, 1 ; sprite dimensions
+ dw JolteonPicFront, JolteonPicBack
+
+ db TACKLE, TAIL_WHIP, QUICK_ATTACK, THUNDERSHOCK ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, HYPER_BEAM, \
+ RAGE, THUNDERBOLT, THUNDER, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, SWIFT, SKULL_BASH, REST, \
+ THUNDER_WAVE, SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/jynx.asm b/data/pokemon/base_stats/jynx.asm
new file mode 100644
index 00000000..f4fe28c7
--- /dev/null
+++ b/data/pokemon/base_stats/jynx.asm
@@ -0,0 +1,25 @@
+ db DEX_JYNX ; pokedex id
+
+ db 65, 50, 35, 95, 95
+ ; hp atk def spd spc
+
+ db ICE, PSYCHIC_TYPE ; type
+ db 45 ; catch rate
+ db 137 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/jynx.pic", 0, 1 ; sprite dimensions
+ dw JynxPicFront, JynxPicBack
+
+ db POUND, LOVELY_KISS, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ PSYCHIC_M, TELEPORT, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, METRONOME, SKULL_BASH, REST, PSYWAVE, \
+ SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/kabuto.asm b/data/pokemon/base_stats/kabuto.asm
new file mode 100644
index 00000000..d5d96d1f
--- /dev/null
+++ b/data/pokemon/base_stats/kabuto.asm
@@ -0,0 +1,23 @@
+ db DEX_KABUTO ; pokedex id
+
+ db 30, 80, 90, 55, 45
+ ; hp atk def spd spc
+
+ db ROCK, WATER ; type
+ db 45 ; catch rate
+ db 119 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/kabuto.pic", 0, 1 ; sprite dimensions
+ dw KabutoPicFront, KabutoPicBack
+
+ db SCRATCH, HARDEN, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, ICE_BEAM, BLIZZARD, RAGE, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, REST, SUBSTITUTE, \
+ SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/kabutops.asm b/data/pokemon/base_stats/kabutops.asm
new file mode 100644
index 00000000..f067949e
--- /dev/null
+++ b/data/pokemon/base_stats/kabutops.asm
@@ -0,0 +1,24 @@
+ db DEX_KABUTOPS ; pokedex id
+
+ db 60, 115, 105, 80, 70
+ ; hp atk def spd spc
+
+ db ROCK, WATER ; type
+ db 45 ; catch rate
+ db 201 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/kabutops.pic", 0, 1 ; sprite dimensions
+ dw KabutopsPicFront, KabutopsPicBack
+
+ db SCRATCH, HARDEN, ABSORB, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, SWORDS_DANCE, MEGA_KICK, TOXIC, BODY_SLAM, \
+ TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, \
+ BLIZZARD, HYPER_BEAM, SUBMISSION, SEISMIC_TOSS, RAGE, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, SKULL_BASH, \
+ REST, SUBSTITUTE, CUT, SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/kadabra.asm b/data/pokemon/base_stats/kadabra.asm
new file mode 100644
index 00000000..30d2feef
--- /dev/null
+++ b/data/pokemon/base_stats/kadabra.asm
@@ -0,0 +1,24 @@
+ db DEX_KADABRA ; pokedex id
+
+ db 40, 35, 30, 105, 120
+ ; hp atk def spd spc
+
+ db PSYCHIC_TYPE, PSYCHIC_TYPE ; type
+ db 100 ; catch rate
+ db 145 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/kadabra.pic", 0, 1 ; sprite dimensions
+ dw KadabraPicFront, KadabraPicBack
+
+ db TELEPORT, KINESIS, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ DIG, PSYCHIC_M, TELEPORT, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, METRONOME, SKULL_BASH, REST, \
+ THUNDER_WAVE, PSYWAVE, TRI_ATTACK, SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/kakuna.asm b/data/pokemon/base_stats/kakuna.asm
new file mode 100644
index 00000000..39870dc4
--- /dev/null
+++ b/data/pokemon/base_stats/kakuna.asm
@@ -0,0 +1,20 @@
+ db DEX_KAKUNA ; pokedex id
+
+ db 45, 25, 50, 35, 25
+ ; hp atk def spd spc
+
+ db BUG, POISON ; type
+ db 120 ; catch rate
+ db 71 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/kakuna.pic", 0, 1 ; sprite dimensions
+ dw KakunaPicFront, KakunaPicBack
+
+ db HARDEN, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/kangaskhan.asm b/data/pokemon/base_stats/kangaskhan.asm
new file mode 100644
index 00000000..7d3cf971
--- /dev/null
+++ b/data/pokemon/base_stats/kangaskhan.asm
@@ -0,0 +1,25 @@
+ db DEX_KANGASKHAN ; pokedex id
+
+ db 105, 95, 80, 90, 40
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 45 ; catch rate
+ db 175 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/kangaskhan.pic", 0, 1 ; sprite dimensions
+ dw KangaskhanPicFront, KangaskhanPicBack
+
+ db COMET_PUNCH, RAGE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ THUNDERBOLT, THUNDER, EARTHQUAKE, FISSURE, MIMIC, \
+ DOUBLE_TEAM, BIDE, FIRE_BLAST, SKULL_BASH, REST, \
+ ROCK_SLIDE, SUBSTITUTE, SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/kingler.asm b/data/pokemon/base_stats/kingler.asm
new file mode 100644
index 00000000..c0d75d62
--- /dev/null
+++ b/data/pokemon/base_stats/kingler.asm
@@ -0,0 +1,23 @@
+ db DEX_KINGLER ; pokedex id
+
+ db 55, 130, 115, 75, 50
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 60 ; catch rate
+ db 206 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/kingler.pic", 0, 1 ; sprite dimensions
+ dw KinglerPicFront, KinglerPicBack
+
+ db BUBBLE, LEER, VICEGRIP, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, HYPER_BEAM, \
+ RAGE, MIMIC, DOUBLE_TEAM, BIDE, REST, \
+ SUBSTITUTE, CUT, SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/koffing.asm b/data/pokemon/base_stats/koffing.asm
new file mode 100644
index 00000000..5b63ebc8
--- /dev/null
+++ b/data/pokemon/base_stats/koffing.asm
@@ -0,0 +1,22 @@
+ db DEX_KOFFING ; pokedex id
+
+ db 40, 65, 95, 35, 60
+ ; hp atk def spd spc
+
+ db POISON, POISON ; type
+ db 190 ; catch rate
+ db 114 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/koffing.pic", 0, 1 ; sprite dimensions
+ dw KoffingPicFront, KoffingPicBack
+
+ db TACKLE, SMOG, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, RAGE, THUNDERBOLT, THUNDER, MIMIC, \
+ DOUBLE_TEAM, BIDE, SELFDESTRUCT, FIRE_BLAST, REST, \
+ EXPLOSION, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/krabby.asm b/data/pokemon/base_stats/krabby.asm
new file mode 100644
index 00000000..dd0f739a
--- /dev/null
+++ b/data/pokemon/base_stats/krabby.asm
@@ -0,0 +1,23 @@
+ db DEX_KRABBY ; pokedex id
+
+ db 30, 105, 90, 50, 25
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 225 ; catch rate
+ db 115 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/krabby.pic", 0, 1 ; sprite dimensions
+ dw KrabbyPicFront, KrabbyPicBack
+
+ db BUBBLE, LEER, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, RAGE, \
+ MIMIC, DOUBLE_TEAM, BIDE, REST, SUBSTITUTE, \
+ CUT, SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/lapras.asm b/data/pokemon/base_stats/lapras.asm
new file mode 100644
index 00000000..eb45e08c
--- /dev/null
+++ b/data/pokemon/base_stats/lapras.asm
@@ -0,0 +1,25 @@
+ db DEX_LAPRAS ; pokedex id
+
+ db 130, 85, 80, 60, 95
+ ; hp atk def spd spc
+
+ db WATER, ICE ; type
+ db 45 ; catch rate
+ db 219 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/lapras.pic", 0, 1 ; sprite dimensions
+ dw LaprasPicFront, LaprasPicBack
+
+ db WATER_GUN, GROWL, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, HYPER_BEAM, \
+ RAGE, SOLARBEAM, DRAGON_RAGE, THUNDERBOLT, THUNDER, \
+ PSYCHIC_M, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ SKULL_BASH, REST, PSYWAVE, SUBSTITUTE, SURF, \
+ STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/lickitung.asm b/data/pokemon/base_stats/lickitung.asm
new file mode 100644
index 00000000..eef13946
--- /dev/null
+++ b/data/pokemon/base_stats/lickitung.asm
@@ -0,0 +1,25 @@
+ db DEX_LICKITUNG ; pokedex id
+
+ db 90, 55, 75, 30, 60
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 45 ; catch rate
+ db 127 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/lickitung.pic", 0, 1 ; sprite dimensions
+ dw LickitungPicFront, LickitungPicBack
+
+ db WRAP, SUPERSONIC, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, SWORDS_DANCE, MEGA_KICK, TOXIC, BODY_SLAM, \
+ TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, \
+ BLIZZARD, HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, THUNDERBOLT, THUNDER, EARTHQUAKE, FISSURE, \
+ MIMIC, DOUBLE_TEAM, BIDE, FIRE_BLAST, SKULL_BASH, \
+ REST, SUBSTITUTE, CUT, SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/machamp.asm b/data/pokemon/base_stats/machamp.asm
new file mode 100644
index 00000000..e00ccea6
--- /dev/null
+++ b/data/pokemon/base_stats/machamp.asm
@@ -0,0 +1,24 @@
+ db DEX_MACHAMP ; pokedex id
+
+ db 90, 130, 80, 55, 65
+ ; hp atk def spd spc
+
+ db FIGHTING, FIGHTING ; type
+ db 45 ; catch rate
+ db 193 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/machamp.pic", 0, 1 ; sprite dimensions
+ dw MachampPicFront, MachampPicBack
+
+ db KARATE_CHOP, LOW_KICK, LEER, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, EARTHQUAKE, FISSURE, DIG, MIMIC, \
+ DOUBLE_TEAM, BIDE, METRONOME, FIRE_BLAST, SKULL_BASH, \
+ REST, ROCK_SLIDE, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/machoke.asm b/data/pokemon/base_stats/machoke.asm
new file mode 100644
index 00000000..0e1a1d46
--- /dev/null
+++ b/data/pokemon/base_stats/machoke.asm
@@ -0,0 +1,24 @@
+ db DEX_MACHOKE ; pokedex id
+
+ db 80, 100, 70, 45, 50
+ ; hp atk def spd spc
+
+ db FIGHTING, FIGHTING ; type
+ db 90 ; catch rate
+ db 146 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/machoke.pic", 0, 1 ; sprite dimensions
+ dw MachokePicFront, MachokePicBack
+
+ db KARATE_CHOP, LOW_KICK, LEER, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ EARTHQUAKE, FISSURE, DIG, MIMIC, DOUBLE_TEAM, \
+ BIDE, METRONOME, FIRE_BLAST, SKULL_BASH, REST, \
+ ROCK_SLIDE, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/machop.asm b/data/pokemon/base_stats/machop.asm
new file mode 100644
index 00000000..3c7b8491
--- /dev/null
+++ b/data/pokemon/base_stats/machop.asm
@@ -0,0 +1,24 @@
+ db DEX_MACHOP ; pokedex id
+
+ db 70, 80, 50, 35, 35
+ ; hp atk def spd spc
+
+ db FIGHTING, FIGHTING ; type
+ db 180 ; catch rate
+ db 88 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/machop.pic", 0, 1 ; sprite dimensions
+ dw MachopPicFront, MachopPicBack
+
+ db KARATE_CHOP, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ EARTHQUAKE, FISSURE, DIG, MIMIC, DOUBLE_TEAM, \
+ BIDE, METRONOME, FIRE_BLAST, SKULL_BASH, REST, \
+ ROCK_SLIDE, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/magikarp.asm b/data/pokemon/base_stats/magikarp.asm
new file mode 100644
index 00000000..8d7eef46
--- /dev/null
+++ b/data/pokemon/base_stats/magikarp.asm
@@ -0,0 +1,20 @@
+ db DEX_MAGIKARP ; pokedex id
+
+ db 20, 10, 55, 80, 20
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 255 ; catch rate
+ db 20 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/magikarp.pic", 0, 1 ; sprite dimensions
+ dw MagikarpPicFront, MagikarpPicBack
+
+ db SPLASH, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/magmar.asm b/data/pokemon/base_stats/magmar.asm
new file mode 100644
index 00000000..1619e211
--- /dev/null
+++ b/data/pokemon/base_stats/magmar.asm
@@ -0,0 +1,24 @@
+ db DEX_MAGMAR ; pokedex id
+
+ db 65, 95, 57, 93, 85
+ ; hp atk def spd spc
+
+ db FIRE, FIRE ; type
+ db 45 ; catch rate
+ db 167 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/magmar.pic", 0, 1 ; sprite dimensions
+ dw MagmarPicFront, MagmarPicBack
+
+ db EMBER, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, PSYCHIC_M, TELEPORT, MIMIC, DOUBLE_TEAM, \
+ BIDE, METRONOME, FIRE_BLAST, SKULL_BASH, REST, \
+ PSYWAVE, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/magnemite.asm b/data/pokemon/base_stats/magnemite.asm
new file mode 100644
index 00000000..cb249496
--- /dev/null
+++ b/data/pokemon/base_stats/magnemite.asm
@@ -0,0 +1,23 @@
+ db DEX_MAGNEMITE ; pokedex id
+
+ db 25, 35, 70, 45, 95
+ ; hp atk def spd spc
+
+ db ELECTRIC, ELECTRIC ; type
+ db 190 ; catch rate
+ db 89 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/magnemite.pic", 0, 1 ; sprite dimensions
+ dw MagnemitePicFront, MagnemitePicBack
+
+ db TACKLE, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, DOUBLE_EDGE, RAGE, THUNDERBOLT, \
+ THUNDER, TELEPORT, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, SWIFT, REST, THUNDER_WAVE, SUBSTITUTE, \
+ FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/magneton.asm b/data/pokemon/base_stats/magneton.asm
new file mode 100644
index 00000000..36db2428
--- /dev/null
+++ b/data/pokemon/base_stats/magneton.asm
@@ -0,0 +1,23 @@
+ db DEX_MAGNETON ; pokedex id
+
+ db 50, 60, 95, 70, 120
+ ; hp atk def spd spc
+
+ db ELECTRIC, ELECTRIC ; type
+ db 60 ; catch rate
+ db 161 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/magneton.pic", 0, 1 ; sprite dimensions
+ dw MagnetonPicFront, MagnetonPicBack
+
+ db TACKLE, SONICBOOM, THUNDERSHOCK, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, DOUBLE_EDGE, HYPER_BEAM, RAGE, \
+ THUNDERBOLT, THUNDER, TELEPORT, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, SWIFT, REST, THUNDER_WAVE, \
+ SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/mankey.asm b/data/pokemon/base_stats/mankey.asm
new file mode 100644
index 00000000..cb60435b
--- /dev/null
+++ b/data/pokemon/base_stats/mankey.asm
@@ -0,0 +1,24 @@
+ db DEX_MANKEY ; pokedex id
+
+ db 40, 80, 35, 70, 35
+ ; hp atk def spd spc
+
+ db FIGHTING, FIGHTING ; type
+ db 190 ; catch rate
+ db 74 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/mankey.pic", 0, 1 ; sprite dimensions
+ dw MankeyPicFront, MankeyPicBack
+
+ db SCRATCH, LEER, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, PAY_DAY, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, THUNDERBOLT, THUNDER, DIG, MIMIC, \
+ DOUBLE_TEAM, BIDE, METRONOME, SWIFT, SKULL_BASH, \
+ REST, ROCK_SLIDE, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/marowak.asm b/data/pokemon/base_stats/marowak.asm
new file mode 100644
index 00000000..bdd1636e
--- /dev/null
+++ b/data/pokemon/base_stats/marowak.asm
@@ -0,0 +1,25 @@
+ db DEX_MAROWAK ; pokedex id
+
+ db 60, 80, 110, 45, 50
+ ; hp atk def spd spc
+
+ db GROUND, GROUND ; type
+ db 75 ; catch rate
+ db 124 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/marowak.pic", 0, 1 ; sprite dimensions
+ dw MarowakPicFront, MarowakPicBack
+
+ db BONE_CLUB, TAIL_WHIP, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ EARTHQUAKE, FISSURE, DIG, MIMIC, DOUBLE_TEAM, \
+ BIDE, FIRE_BLAST, SKULL_BASH, REST, SUBSTITUTE, \
+ STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/meowth.asm b/data/pokemon/base_stats/meowth.asm
new file mode 100644
index 00000000..9b06043b
--- /dev/null
+++ b/data/pokemon/base_stats/meowth.asm
@@ -0,0 +1,23 @@
+ db DEX_MEOWTH ; pokedex id
+
+ db 40, 45, 35, 90, 40
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 255 ; catch rate
+ db 69 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/meowth.pic", 0, 1 ; sprite dimensions
+ dw MeowthPicFront, MeowthPicBack
+
+ db SCRATCH, GROWL, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, PAY_DAY, RAGE, THUNDERBOLT, THUNDER, \
+ MIMIC, DOUBLE_TEAM, BIDE, SWIFT, SKULL_BASH, \
+ REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/metapod.asm b/data/pokemon/base_stats/metapod.asm
new file mode 100644
index 00000000..5d3d1740
--- /dev/null
+++ b/data/pokemon/base_stats/metapod.asm
@@ -0,0 +1,20 @@
+ db DEX_METAPOD ; pokedex id
+
+ db 50, 20, 55, 30, 25
+ ; hp atk def spd spc
+
+ db BUG, BUG ; type
+ db 120 ; catch rate
+ db 72 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/metapod.pic", 0, 1 ; sprite dimensions
+ dw MetapodPicFront, MetapodPicBack
+
+ db HARDEN, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/mew.asm b/data/pokemon/base_stats/mew.asm
new file mode 100644
index 00000000..caa7fb85
--- /dev/null
+++ b/data/pokemon/base_stats/mew.asm
@@ -0,0 +1,30 @@
+ db DEX_MEW ; pokedex id
+
+ db 100, 100, 100, 100, 100
+ ; hp atk def spd spc
+
+ db PSYCHIC_TYPE, PSYCHIC_TYPE ; type
+ db 45 ; catch rate
+ db 64 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/mew.pic", 0, 1 ; sprite dimensions
+ dw MewPicFront, MewPicBack
+
+ db POUND, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, RAZOR_WIND, SWORDS_DANCE, WHIRLWIND, MEGA_KICK, \
+ TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, HYPER_BEAM, \
+ PAY_DAY, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ MEGA_DRAIN, SOLARBEAM, DRAGON_RAGE, THUNDERBOLT, THUNDER, \
+ EARTHQUAKE, FISSURE, DIG, PSYCHIC_M, TELEPORT, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, METRONOME, \
+ SELFDESTRUCT, EGG_BOMB, FIRE_BLAST, SWIFT, SKULL_BASH, \
+ SOFTBOILED, DREAM_EATER, SKY_ATTACK, REST, THUNDER_WAVE, \
+ PSYWAVE, EXPLOSION, ROCK_SLIDE, TRI_ATTACK, SUBSTITUTE, \
+ CUT, FLY, SURF, STRENGTH, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/mewtwo.asm b/data/pokemon/base_stats/mewtwo.asm
new file mode 100644
index 00000000..99ff53fe
--- /dev/null
+++ b/data/pokemon/base_stats/mewtwo.asm
@@ -0,0 +1,26 @@
+ db DEX_MEWTWO ; pokedex id
+
+ db 106, 110, 90, 130, 154
+ ; hp atk def spd spc
+
+ db PSYCHIC_TYPE, PSYCHIC_TYPE ; type
+ db 3 ; catch rate
+ db 220 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/mewtwo.pic", 0, 1 ; sprite dimensions
+ dw MewtwoPicFront, MewtwoPicBack
+
+ db CONFUSION, DISABLE, SWIFT, PSYCHIC_M ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ SOLARBEAM, THUNDERBOLT, THUNDER, PSYCHIC_M, TELEPORT, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, METRONOME, \
+ SELFDESTRUCT, FIRE_BLAST, SKULL_BASH, REST, THUNDER_WAVE, \
+ PSYWAVE, TRI_ATTACK, SUBSTITUTE, STRENGTH, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/moltres.asm b/data/pokemon/base_stats/moltres.asm
new file mode 100644
index 00000000..50b23fd8
--- /dev/null
+++ b/data/pokemon/base_stats/moltres.asm
@@ -0,0 +1,23 @@
+ db DEX_MOLTRES ; pokedex id
+
+ db 90, 100, 90, 90, 125
+ ; hp atk def spd spc
+
+ db FIRE, FLYING ; type
+ db 3 ; catch rate
+ db 217 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/moltres.pic", 0, 1 ; sprite dimensions
+ dw MoltresPicFront, MoltresPicBack
+
+ db PECK, FIRE_SPIN, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, WHIRLWIND, TOXIC, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, FIRE_BLAST, SWIFT, SKY_ATTACK, REST, \
+ SUBSTITUTE, FLY
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/mrmime.asm b/data/pokemon/base_stats/mrmime.asm
new file mode 100644
index 00000000..e6cdba21
--- /dev/null
+++ b/data/pokemon/base_stats/mrmime.asm
@@ -0,0 +1,25 @@
+ db DEX_MR_MIME ; pokedex id
+
+ db 40, 45, 65, 90, 100
+ ; hp atk def spd spc
+
+ db PSYCHIC_TYPE, PSYCHIC_TYPE ; type
+ db 45 ; catch rate
+ db 136 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/mr.mime.pic", 0, 1 ; sprite dimensions
+ dw MrMimePicFront, MrMimePicBack
+
+ db CONFUSION, BARRIER, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, SOLARBEAM, THUNDERBOLT, THUNDER, PSYCHIC_M, \
+ TELEPORT, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ METRONOME, SKULL_BASH, REST, THUNDER_WAVE, PSYWAVE, \
+ SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/muk.asm b/data/pokemon/base_stats/muk.asm
new file mode 100644
index 00000000..42885050
--- /dev/null
+++ b/data/pokemon/base_stats/muk.asm
@@ -0,0 +1,22 @@
+ db DEX_MUK ; pokedex id
+
+ db 105, 105, 75, 50, 65
+ ; hp atk def spd spc
+
+ db POISON, POISON ; type
+ db 75 ; catch rate
+ db 157 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/muk.pic", 0, 1 ; sprite dimensions
+ dw MukPicFront, MukPicBack
+
+ db POUND, DISABLE, POISON_GAS, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, HYPER_BEAM, RAGE, MEGA_DRAIN, \
+ THUNDERBOLT, THUNDER, MIMIC, DOUBLE_TEAM, BIDE, \
+ SELFDESTRUCT, FIRE_BLAST, REST, EXPLOSION, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/nidoking.asm b/data/pokemon/base_stats/nidoking.asm
new file mode 100644
index 00000000..602ed2ff
--- /dev/null
+++ b/data/pokemon/base_stats/nidoking.asm
@@ -0,0 +1,26 @@
+ db DEX_NIDOKING ; pokedex id
+
+ db 81, 92, 77, 85, 75
+ ; hp atk def spd spc
+
+ db POISON, GROUND ; type
+ db 45 ; catch rate
+ db 195 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/nidoking.pic", 0, 1 ; sprite dimensions
+ dw NidokingPicFront, NidokingPicBack
+
+ db TACKLE, HORN_ATTACK, POISON_STING, THRASH ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, HORN_DRILL, BODY_SLAM, \
+ TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, \
+ BLIZZARD, HYPER_BEAM, PAY_DAY, SUBMISSION, COUNTER, \
+ SEISMIC_TOSS, RAGE, THUNDERBOLT, THUNDER, EARTHQUAKE, \
+ FISSURE, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ FIRE_BLAST, SKULL_BASH, REST, ROCK_SLIDE, SUBSTITUTE, \
+ SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/nidoqueen.asm b/data/pokemon/base_stats/nidoqueen.asm
new file mode 100644
index 00000000..5fba3fed
--- /dev/null
+++ b/data/pokemon/base_stats/nidoqueen.asm
@@ -0,0 +1,26 @@
+ db DEX_NIDOQUEEN ; pokedex id
+
+ db 90, 82, 87, 76, 75
+ ; hp atk def spd spc
+
+ db POISON, GROUND ; type
+ db 45 ; catch rate
+ db 194 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/nidoqueen.pic", 0, 1 ; sprite dimensions
+ dw NidoqueenPicFront, NidoqueenPicBack
+
+ db TACKLE, SCRATCH, TAIL_WHIP, BODY_SLAM ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, HORN_DRILL, BODY_SLAM, \
+ TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, \
+ BLIZZARD, HYPER_BEAM, PAY_DAY, SUBMISSION, COUNTER, \
+ SEISMIC_TOSS, RAGE, THUNDERBOLT, THUNDER, EARTHQUAKE, \
+ FISSURE, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ FIRE_BLAST, SKULL_BASH, REST, ROCK_SLIDE, SUBSTITUTE, \
+ SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/nidoranf.asm b/data/pokemon/base_stats/nidoranf.asm
new file mode 100644
index 00000000..814e2dd7
--- /dev/null
+++ b/data/pokemon/base_stats/nidoranf.asm
@@ -0,0 +1,22 @@
+ db DEX_NIDORAN_F ; pokedex id
+
+ db 55, 47, 52, 41, 40
+ ; hp atk def spd spc
+
+ db POISON, POISON ; type
+ db 235 ; catch rate
+ db 59 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/nidoranf.pic", 0, 1 ; sprite dimensions
+ dw NidoranFPicFront, NidoranFPicBack
+
+ db GROWL, TACKLE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, BLIZZARD, \
+ RAGE, THUNDERBOLT, THUNDER, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, SKULL_BASH, REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/nidoranm.asm b/data/pokemon/base_stats/nidoranm.asm
new file mode 100644
index 00000000..05b3050a
--- /dev/null
+++ b/data/pokemon/base_stats/nidoranm.asm
@@ -0,0 +1,23 @@
+ db DEX_NIDORAN_M ; pokedex id
+
+ db 46, 57, 40, 50, 40
+ ; hp atk def spd spc
+
+ db POISON, POISON ; type
+ db 235 ; catch rate
+ db 60 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/nidoranm.pic", 0, 1 ; sprite dimensions
+ dw NidoranMPicFront, NidoranMPicBack
+
+ db LEER, TACKLE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ BLIZZARD, RAGE, THUNDERBOLT, THUNDER, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, SKULL_BASH, REST, \
+ SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/nidorina.asm b/data/pokemon/base_stats/nidorina.asm
new file mode 100644
index 00000000..9831db3e
--- /dev/null
+++ b/data/pokemon/base_stats/nidorina.asm
@@ -0,0 +1,23 @@
+ db DEX_NIDORINA ; pokedex id
+
+ db 70, 62, 67, 56, 55
+ ; hp atk def spd spc
+
+ db POISON, POISON ; type
+ db 120 ; catch rate
+ db 117 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/nidorina.pic", 0, 1 ; sprite dimensions
+ dw NidorinaPicFront, NidorinaPicBack
+
+ db GROWL, TACKLE, SCRATCH, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, RAGE, \
+ THUNDERBOLT, THUNDER, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, SKULL_BASH, REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/nidorino.asm b/data/pokemon/base_stats/nidorino.asm
new file mode 100644
index 00000000..d8abd036
--- /dev/null
+++ b/data/pokemon/base_stats/nidorino.asm
@@ -0,0 +1,23 @@
+ db DEX_NIDORINO ; pokedex id
+
+ db 61, 72, 57, 65, 55
+ ; hp atk def spd spc
+
+ db POISON, POISON ; type
+ db 120 ; catch rate
+ db 118 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/nidorino.pic", 0, 1 ; sprite dimensions
+ dw NidorinoPicFront, NidorinoPicBack
+
+ db LEER, TACKLE, HORN_ATTACK, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, RAGE, \
+ THUNDERBOLT, THUNDER, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, SKULL_BASH, REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/ninetales.asm b/data/pokemon/base_stats/ninetales.asm
new file mode 100644
index 00000000..7373d2e9
--- /dev/null
+++ b/data/pokemon/base_stats/ninetales.asm
@@ -0,0 +1,23 @@
+ db DEX_NINETALES ; pokedex id
+
+ db 73, 76, 75, 100, 100
+ ; hp atk def spd spc
+
+ db FIRE, FIRE ; type
+ db 75 ; catch rate
+ db 178 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/ninetales.pic", 0, 1 ; sprite dimensions
+ dw NinetalesPicFront, NinetalesPicBack
+
+ db EMBER, TAIL_WHIP, QUICK_ATTACK, ROAR ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, HYPER_BEAM, \
+ RAGE, DIG, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, FIRE_BLAST, SWIFT, SKULL_BASH, REST, \
+ SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/oddish.asm b/data/pokemon/base_stats/oddish.asm
new file mode 100644
index 00000000..de1498b9
--- /dev/null
+++ b/data/pokemon/base_stats/oddish.asm
@@ -0,0 +1,22 @@
+ db DEX_ODDISH ; pokedex id
+
+ db 45, 50, 55, 30, 75
+ ; hp atk def spd spc
+
+ db GRASS, POISON ; type
+ db 255 ; catch rate
+ db 78 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/oddish.pic", 0, 1 ; sprite dimensions
+ dw OddishPicFront, OddishPicBack
+
+ db ABSORB, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, TAKE_DOWN, DOUBLE_EDGE, RAGE, \
+ MEGA_DRAIN, SOLARBEAM, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, REST, SUBSTITUTE, CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/omanyte.asm b/data/pokemon/base_stats/omanyte.asm
new file mode 100644
index 00000000..1dff5d20
--- /dev/null
+++ b/data/pokemon/base_stats/omanyte.asm
@@ -0,0 +1,23 @@
+ db DEX_OMANYTE ; pokedex id
+
+ db 35, 40, 100, 35, 90
+ ; hp atk def spd spc
+
+ db ROCK, WATER ; type
+ db 45 ; catch rate
+ db 120 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/omanyte.pic", 0, 1 ; sprite dimensions
+ dw OmanytePicFront, OmanytePicBack
+
+ db WATER_GUN, WITHDRAW, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, ICE_BEAM, BLIZZARD, RAGE, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, REST, SUBSTITUTE, \
+ SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/omastar.asm b/data/pokemon/base_stats/omastar.asm
new file mode 100644
index 00000000..1deaf789
--- /dev/null
+++ b/data/pokemon/base_stats/omastar.asm
@@ -0,0 +1,24 @@
+ db DEX_OMASTAR ; pokedex id
+
+ db 70, 60, 125, 55, 115
+ ; hp atk def spd spc
+
+ db ROCK, WATER ; type
+ db 45 ; catch rate
+ db 199 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/omastar.pic", 0, 1 ; sprite dimensions
+ dw OmastarPicFront, OmastarPicBack
+
+ db WATER_GUN, WITHDRAW, HORN_ATTACK, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, HYPER_BEAM, \
+ SUBMISSION, SEISMIC_TOSS, RAGE, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, SKULL_BASH, REST, SUBSTITUTE, \
+ SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/onix.asm b/data/pokemon/base_stats/onix.asm
new file mode 100644
index 00000000..96048ee5
--- /dev/null
+++ b/data/pokemon/base_stats/onix.asm
@@ -0,0 +1,23 @@
+ db DEX_ONIX ; pokedex id
+
+ db 35, 45, 160, 70, 30
+ ; hp atk def spd spc
+
+ db ROCK, GROUND ; type
+ db 45 ; catch rate
+ db 108 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/onix.pic", 0, 1 ; sprite dimensions
+ dw OnixPicFront, OnixPicBack
+
+ db TACKLE, SCREECH, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, RAGE, \
+ EARTHQUAKE, FISSURE, DIG, MIMIC, DOUBLE_TEAM, \
+ BIDE, SELFDESTRUCT, SKULL_BASH, REST, EXPLOSION, \
+ ROCK_SLIDE, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/paras.asm b/data/pokemon/base_stats/paras.asm
new file mode 100644
index 00000000..82e9920e
--- /dev/null
+++ b/data/pokemon/base_stats/paras.asm
@@ -0,0 +1,23 @@
+ db DEX_PARAS ; pokedex id
+
+ db 35, 70, 55, 25, 55
+ ; hp atk def spd spc
+
+ db BUG, GRASS ; type
+ db 190 ; catch rate
+ db 70 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/paras.pic", 0, 1 ; sprite dimensions
+ dw ParasPicFront, ParasPicBack
+
+ db SCRATCH, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ RAGE, MEGA_DRAIN, SOLARBEAM, DIG, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, SKULL_BASH, REST, \
+ SUBSTITUTE, CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/parasect.asm b/data/pokemon/base_stats/parasect.asm
new file mode 100644
index 00000000..bcd47673
--- /dev/null
+++ b/data/pokemon/base_stats/parasect.asm
@@ -0,0 +1,23 @@
+ db DEX_PARASECT ; pokedex id
+
+ db 60, 95, 80, 30, 80
+ ; hp atk def spd spc
+
+ db BUG, GRASS ; type
+ db 75 ; catch rate
+ db 128 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/parasect.pic", 0, 1 ; sprite dimensions
+ dw ParasectPicFront, ParasectPicBack
+
+ db SCRATCH, STUN_SPORE, LEECH_LIFE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, MEGA_DRAIN, SOLARBEAM, DIG, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, SKULL_BASH, \
+ REST, SUBSTITUTE, CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/persian.asm b/data/pokemon/base_stats/persian.asm
new file mode 100644
index 00000000..4da05861
--- /dev/null
+++ b/data/pokemon/base_stats/persian.asm
@@ -0,0 +1,23 @@
+ db DEX_PERSIAN ; pokedex id
+
+ db 65, 70, 60, 115, 65
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 90 ; catch rate
+ db 148 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/persian.pic", 0, 1 ; sprite dimensions
+ dw PersianPicFront, PersianPicBack
+
+ db SCRATCH, GROWL, BITE, SCREECH ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, HYPER_BEAM, PAY_DAY, RAGE, THUNDERBOLT, \
+ THUNDER, MIMIC, DOUBLE_TEAM, BIDE, SWIFT, \
+ SKULL_BASH, REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/pidgeot.asm b/data/pokemon/base_stats/pidgeot.asm
new file mode 100644
index 00000000..b4370201
--- /dev/null
+++ b/data/pokemon/base_stats/pidgeot.asm
@@ -0,0 +1,23 @@
+ db DEX_PIDGEOT ; pokedex id
+
+ db 83, 80, 75, 91, 70
+ ; hp atk def spd spc
+
+ db NORMAL, FLYING ; type
+ db 45 ; catch rate
+ db 172 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/pidgeot.pic", 0, 1 ; sprite dimensions
+ dw PidgeotPicFront, PidgeotPicBack
+
+ db GUST, SAND_ATTACK, QUICK_ATTACK, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, WHIRLWIND, TOXIC, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, SWIFT, SKY_ATTACK, REST, SUBSTITUTE, \
+ FLY
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/pidgeotto.asm b/data/pokemon/base_stats/pidgeotto.asm
new file mode 100644
index 00000000..c44325db
--- /dev/null
+++ b/data/pokemon/base_stats/pidgeotto.asm
@@ -0,0 +1,22 @@
+ db DEX_PIDGEOTTO ; pokedex id
+
+ db 63, 60, 55, 71, 50
+ ; hp atk def spd spc
+
+ db NORMAL, FLYING ; type
+ db 120 ; catch rate
+ db 113 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/pidgeotto.pic", 0, 1 ; sprite dimensions
+ dw PidgeottoPicFront, PidgeottoPicBack
+
+ db GUST, SAND_ATTACK, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, WHIRLWIND, TOXIC, TAKE_DOWN, DOUBLE_EDGE, \
+ RAGE, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ SWIFT, SKY_ATTACK, REST, SUBSTITUTE, FLY
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/pidgey.asm b/data/pokemon/base_stats/pidgey.asm
new file mode 100644
index 00000000..0c1c241b
--- /dev/null
+++ b/data/pokemon/base_stats/pidgey.asm
@@ -0,0 +1,22 @@
+ db DEX_PIDGEY ; pokedex id
+
+ db 40, 45, 40, 56, 35
+ ; hp atk def spd spc
+
+ db NORMAL, FLYING ; type
+ db 255 ; catch rate
+ db 55 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/pidgey.pic", 0, 1 ; sprite dimensions
+ dw PidgeyPicFront, PidgeyPicBack
+
+ db GUST, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, WHIRLWIND, TOXIC, TAKE_DOWN, DOUBLE_EDGE, \
+ RAGE, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ SWIFT, SKY_ATTACK, REST, SUBSTITUTE, FLY
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/pikachu.asm b/data/pokemon/base_stats/pikachu.asm
new file mode 100644
index 00000000..8bef5f8b
--- /dev/null
+++ b/data/pokemon/base_stats/pikachu.asm
@@ -0,0 +1,24 @@
+ db DEX_PIKACHU ; pokedex id
+
+ db 35, 55, 30, 90, 50
+ ; hp atk def spd spc
+
+ db ELECTRIC, ELECTRIC ; type
+ db 190 ; catch rate
+ db 82 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/pikachu.pic", 0, 1 ; sprite dimensions
+ dw PikachuPicFront, PikachuPicBack
+
+ db THUNDERSHOCK, GROWL, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, PAY_DAY, SUBMISSION, SEISMIC_TOSS, RAGE, \
+ THUNDERBOLT, THUNDER, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, SWIFT, SKULL_BASH, REST, THUNDER_WAVE, \
+ SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/pinsir.asm b/data/pokemon/base_stats/pinsir.asm
new file mode 100644
index 00000000..e67a2896
--- /dev/null
+++ b/data/pokemon/base_stats/pinsir.asm
@@ -0,0 +1,23 @@
+ db DEX_PINSIR ; pokedex id
+
+ db 65, 125, 100, 85, 55
+ ; hp atk def spd spc
+
+ db BUG, BUG ; type
+ db 45 ; catch rate
+ db 200 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/pinsir.pic", 0, 1 ; sprite dimensions
+ dw PinsirPicFront, PinsirPicBack
+
+ db VICEGRIP, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, SUBMISSION, SEISMIC_TOSS, RAGE, MIMIC, \
+ DOUBLE_TEAM, BIDE, REST, SUBSTITUTE, CUT, \
+ STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/poliwag.asm b/data/pokemon/base_stats/poliwag.asm
new file mode 100644
index 00000000..04f0aae5
--- /dev/null
+++ b/data/pokemon/base_stats/poliwag.asm
@@ -0,0 +1,23 @@
+ db DEX_POLIWAG ; pokedex id
+
+ db 40, 50, 40, 90, 40
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 255 ; catch rate
+ db 77 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/poliwag.pic", 0, 1 ; sprite dimensions
+ dw PoliwagPicFront, PoliwagPicBack
+
+ db BUBBLE, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, ICE_BEAM, BLIZZARD, RAGE, PSYCHIC_M, \
+ MIMIC, DOUBLE_TEAM, BIDE, SKULL_BASH, REST, \
+ PSYWAVE, SUBSTITUTE, SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/poliwhirl.asm b/data/pokemon/base_stats/poliwhirl.asm
new file mode 100644
index 00000000..54673b74
--- /dev/null
+++ b/data/pokemon/base_stats/poliwhirl.asm
@@ -0,0 +1,25 @@
+ db DEX_POLIWHIRL ; pokedex id
+
+ db 65, 65, 65, 90, 50
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 120 ; catch rate
+ db 131 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/poliwhirl.pic", 0, 1 ; sprite dimensions
+ dw PoliwhirlPicFront, PoliwhirlPicBack
+
+ db BUBBLE, HYPNOSIS, WATER_GUN, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, EARTHQUAKE, \
+ FISSURE, PSYCHIC_M, MIMIC, DOUBLE_TEAM, BIDE, \
+ METRONOME, SKULL_BASH, REST, PSYWAVE, SUBSTITUTE, \
+ SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/poliwrath.asm b/data/pokemon/base_stats/poliwrath.asm
new file mode 100644
index 00000000..2c3b6bc5
--- /dev/null
+++ b/data/pokemon/base_stats/poliwrath.asm
@@ -0,0 +1,25 @@
+ db DEX_POLIWRATH ; pokedex id
+
+ db 90, 85, 95, 70, 70
+ ; hp atk def spd spc
+
+ db WATER, FIGHTING ; type
+ db 45 ; catch rate
+ db 185 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/poliwrath.pic", 0, 1 ; sprite dimensions
+ dw PoliwrathPicFront, PoliwrathPicBack
+
+ db HYPNOSIS, WATER_GUN, DOUBLESLAP, BODY_SLAM ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ EARTHQUAKE, FISSURE, PSYCHIC_M, MIMIC, DOUBLE_TEAM, \
+ BIDE, METRONOME, SKULL_BASH, REST, PSYWAVE, \
+ SUBSTITUTE, SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/ponyta.asm b/data/pokemon/base_stats/ponyta.asm
new file mode 100644
index 00000000..ee8e3389
--- /dev/null
+++ b/data/pokemon/base_stats/ponyta.asm
@@ -0,0 +1,22 @@
+ db DEX_PONYTA ; pokedex id
+
+ db 50, 85, 55, 90, 65
+ ; hp atk def spd spc
+
+ db FIRE, FIRE ; type
+ db 190 ; catch rate
+ db 152 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/ponyta.pic", 0, 1 ; sprite dimensions
+ dw PonytaPicFront, PonytaPicBack
+
+ db EMBER, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ RAGE, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ FIRE_BLAST, SWIFT, SKULL_BASH, REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/porygon.asm b/data/pokemon/base_stats/porygon.asm
new file mode 100644
index 00000000..8be8923e
--- /dev/null
+++ b/data/pokemon/base_stats/porygon.asm
@@ -0,0 +1,24 @@
+ db DEX_PORYGON ; pokedex id
+
+ db 65, 60, 70, 40, 75
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 45 ; catch rate
+ db 130 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/porygon.pic", 0, 1 ; sprite dimensions
+ dw PorygonPicFront, PorygonPicBack
+
+ db TACKLE, SHARPEN, CONVERSION, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, DOUBLE_EDGE, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, RAGE, THUNDERBOLT, THUNDER, PSYCHIC_M, \
+ TELEPORT, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ SWIFT, SKULL_BASH, REST, THUNDER_WAVE, PSYWAVE, \
+ TRI_ATTACK, SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/primeape.asm b/data/pokemon/base_stats/primeape.asm
new file mode 100644
index 00000000..57f6e901
--- /dev/null
+++ b/data/pokemon/base_stats/primeape.asm
@@ -0,0 +1,24 @@
+ db DEX_PRIMEAPE ; pokedex id
+
+ db 65, 105, 60, 95, 60
+ ; hp atk def spd spc
+
+ db FIGHTING, FIGHTING ; type
+ db 75 ; catch rate
+ db 149 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/primeape.pic", 0, 1 ; sprite dimensions
+ dw PrimeapePicFront, PrimeapePicBack
+
+ db SCRATCH, LEER, LOW_KICK, KARATE_CHOP ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, HYPER_BEAM, PAY_DAY, SUBMISSION, COUNTER, \
+ SEISMIC_TOSS, RAGE, THUNDERBOLT, THUNDER, DIG, \
+ MIMIC, DOUBLE_TEAM, BIDE, METRONOME, SWIFT, \
+ SKULL_BASH, REST, ROCK_SLIDE, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/psyduck.asm b/data/pokemon/base_stats/psyduck.asm
new file mode 100644
index 00000000..1f6c4437
--- /dev/null
+++ b/data/pokemon/base_stats/psyduck.asm
@@ -0,0 +1,24 @@
+ db DEX_PSYDUCK ; pokedex id
+
+ db 50, 52, 48, 55, 50
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 190 ; catch rate
+ db 80 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/psyduck.pic", 0, 1 ; sprite dimensions
+ dw PsyduckPicFront, PsyduckPicBack
+
+ db SCRATCH, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ PAY_DAY, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ DIG, MIMIC, DOUBLE_TEAM, BIDE, SWIFT, \
+ SKULL_BASH, REST, SUBSTITUTE, SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/raichu.asm b/data/pokemon/base_stats/raichu.asm
new file mode 100644
index 00000000..9ac93813
--- /dev/null
+++ b/data/pokemon/base_stats/raichu.asm
@@ -0,0 +1,24 @@
+ db DEX_RAICHU ; pokedex id
+
+ db 60, 90, 55, 100, 90
+ ; hp atk def spd spc
+
+ db ELECTRIC, ELECTRIC ; type
+ db 75 ; catch rate
+ db 122 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/raichu.pic", 0, 1 ; sprite dimensions
+ dw RaichuPicFront, RaichuPicBack
+
+ db THUNDERSHOCK, GROWL, THUNDER_WAVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, HYPER_BEAM, PAY_DAY, SUBMISSION, SEISMIC_TOSS, \
+ RAGE, THUNDERBOLT, THUNDER, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, SWIFT, SKULL_BASH, REST, \
+ THUNDER_WAVE, SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/rapidash.asm b/data/pokemon/base_stats/rapidash.asm
new file mode 100644
index 00000000..8a093859
--- /dev/null
+++ b/data/pokemon/base_stats/rapidash.asm
@@ -0,0 +1,23 @@
+ db DEX_RAPIDASH ; pokedex id
+
+ db 65, 100, 70, 105, 80
+ ; hp atk def spd spc
+
+ db FIRE, FIRE ; type
+ db 60 ; catch rate
+ db 192 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/rapidash.pic", 0, 1 ; sprite dimensions
+ dw RapidashPicFront, RapidashPicBack
+
+ db EMBER, TAIL_WHIP, STOMP, GROWL ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, FIRE_BLAST, SWIFT, SKULL_BASH, REST, \
+ SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/raticate.asm b/data/pokemon/base_stats/raticate.asm
new file mode 100644
index 00000000..9dc46afb
--- /dev/null
+++ b/data/pokemon/base_stats/raticate.asm
@@ -0,0 +1,23 @@
+ db DEX_RATICATE ; pokedex id
+
+ db 55, 81, 60, 97, 50
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 90 ; catch rate
+ db 116 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/raticate.pic", 0, 1 ; sprite dimensions
+ dw RaticatePicFront, RaticatePicBack
+
+ db TACKLE, TAIL_WHIP, QUICK_ATTACK, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, ICE_BEAM, BLIZZARD, HYPER_BEAM, RAGE, \
+ THUNDERBOLT, THUNDER, DIG, MIMIC, DOUBLE_TEAM, \
+ BIDE, SWIFT, SKULL_BASH, REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/rattata.asm b/data/pokemon/base_stats/rattata.asm
new file mode 100644
index 00000000..9cace629
--- /dev/null
+++ b/data/pokemon/base_stats/rattata.asm
@@ -0,0 +1,23 @@
+ db DEX_RATTATA ; pokedex id
+
+ db 30, 56, 35, 72, 25
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 255 ; catch rate
+ db 57 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/rattata.pic", 0, 1 ; sprite dimensions
+ dw RattataPicFront, RattataPicBack
+
+ db TACKLE, TAIL_WHIP, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, BLIZZARD, RAGE, THUNDERBOLT, THUNDER, \
+ DIG, MIMIC, DOUBLE_TEAM, BIDE, SWIFT, \
+ SKULL_BASH, REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/rhydon.asm b/data/pokemon/base_stats/rhydon.asm
new file mode 100644
index 00000000..f08f7255
--- /dev/null
+++ b/data/pokemon/base_stats/rhydon.asm
@@ -0,0 +1,26 @@
+ db DEX_RHYDON ; pokedex id
+
+ db 105, 130, 120, 40, 45
+ ; hp atk def spd spc
+
+ db GROUND, ROCK ; type
+ db 60 ; catch rate
+ db 204 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/rhydon.pic", 0, 1 ; sprite dimensions
+ dw RhydonPicFront, RhydonPicBack
+
+ db HORN_ATTACK, STOMP, TAIL_WHIP, FURY_ATTACK ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, HORN_DRILL, BODY_SLAM, \
+ TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, \
+ BLIZZARD, HYPER_BEAM, PAY_DAY, SUBMISSION, COUNTER, \
+ SEISMIC_TOSS, RAGE, THUNDERBOLT, THUNDER, EARTHQUAKE, \
+ FISSURE, DIG, MIMIC, DOUBLE_TEAM, BIDE, \
+ FIRE_BLAST, SKULL_BASH, REST, ROCK_SLIDE, SUBSTITUTE, \
+ SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/rhyhorn.asm b/data/pokemon/base_stats/rhyhorn.asm
new file mode 100644
index 00000000..3b8b1eb4
--- /dev/null
+++ b/data/pokemon/base_stats/rhyhorn.asm
@@ -0,0 +1,23 @@
+ db DEX_RHYHORN ; pokedex id
+
+ db 80, 85, 95, 25, 30
+ ; hp atk def spd spc
+
+ db GROUND, ROCK ; type
+ db 120 ; catch rate
+ db 135 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/rhyhorn.pic", 0, 1 ; sprite dimensions
+ dw RhyhornPicFront, RhyhornPicBack
+
+ db HORN_ATTACK, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ RAGE, THUNDERBOLT, THUNDER, EARTHQUAKE, FISSURE, \
+ DIG, MIMIC, DOUBLE_TEAM, BIDE, FIRE_BLAST, \
+ SKULL_BASH, REST, ROCK_SLIDE, SUBSTITUTE, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/sandshrew.asm b/data/pokemon/base_stats/sandshrew.asm
new file mode 100644
index 00000000..aa107190
--- /dev/null
+++ b/data/pokemon/base_stats/sandshrew.asm
@@ -0,0 +1,24 @@
+ db DEX_SANDSHREW ; pokedex id
+
+ db 50, 75, 85, 40, 30
+ ; hp atk def spd spc
+
+ db GROUND, GROUND ; type
+ db 255 ; catch rate
+ db 93 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/sandshrew.pic", 0, 1 ; sprite dimensions
+ dw SandshrewPicFront, SandshrewPicBack
+
+ db SCRATCH, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ SUBMISSION, SEISMIC_TOSS, RAGE, EARTHQUAKE, FISSURE, \
+ DIG, MIMIC, DOUBLE_TEAM, BIDE, SWIFT, \
+ SKULL_BASH, REST, ROCK_SLIDE, SUBSTITUTE, CUT, \
+ STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/sandslash.asm b/data/pokemon/base_stats/sandslash.asm
new file mode 100644
index 00000000..9c51bbba
--- /dev/null
+++ b/data/pokemon/base_stats/sandslash.asm
@@ -0,0 +1,24 @@
+ db DEX_SANDSLASH ; pokedex id
+
+ db 75, 100, 110, 65, 55
+ ; hp atk def spd spc
+
+ db GROUND, GROUND ; type
+ db 90 ; catch rate
+ db 163 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/sandslash.pic", 0, 1 ; sprite dimensions
+ dw SandslashPicFront, SandslashPicBack
+
+ db SCRATCH, SAND_ATTACK, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, SUBMISSION, SEISMIC_TOSS, RAGE, EARTHQUAKE, \
+ FISSURE, DIG, MIMIC, DOUBLE_TEAM, BIDE, \
+ SWIFT, SKULL_BASH, REST, ROCK_SLIDE, SUBSTITUTE, \
+ CUT, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/scyther.asm b/data/pokemon/base_stats/scyther.asm
new file mode 100644
index 00000000..de73eea4
--- /dev/null
+++ b/data/pokemon/base_stats/scyther.asm
@@ -0,0 +1,22 @@
+ db DEX_SCYTHER ; pokedex id
+
+ db 70, 110, 80, 105, 55
+ ; hp atk def spd spc
+
+ db BUG, FLYING ; type
+ db 45 ; catch rate
+ db 187 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/scyther.pic", 0, 1 ; sprite dimensions
+ dw ScytherPicFront, ScytherPicBack
+
+ db QUICK_ATTACK, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, TAKE_DOWN, DOUBLE_EDGE, HYPER_BEAM, \
+ RAGE, MIMIC, DOUBLE_TEAM, BIDE, SWIFT, \
+ SKULL_BASH, REST, SUBSTITUTE, CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/seadra.asm b/data/pokemon/base_stats/seadra.asm
new file mode 100644
index 00000000..89ab670f
--- /dev/null
+++ b/data/pokemon/base_stats/seadra.asm
@@ -0,0 +1,23 @@
+ db DEX_SEADRA ; pokedex id
+
+ db 55, 65, 95, 85, 95
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 75 ; catch rate
+ db 155 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/seadra.pic", 0, 1 ; sprite dimensions
+ dw SeadraPicFront, SeadraPicBack
+
+ db BUBBLE, SMOKESCREEN, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, \
+ ICE_BEAM, BLIZZARD, HYPER_BEAM, RAGE, MIMIC, \
+ DOUBLE_TEAM, BIDE, SWIFT, SKULL_BASH, REST, \
+ SUBSTITUTE, SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/seaking.asm b/data/pokemon/base_stats/seaking.asm
new file mode 100644
index 00000000..bcb0dd64
--- /dev/null
+++ b/data/pokemon/base_stats/seaking.asm
@@ -0,0 +1,23 @@
+ db DEX_SEAKING ; pokedex id
+
+ db 80, 92, 65, 68, 80
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 60 ; catch rate
+ db 170 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/seaking.pic", 0, 1 ; sprite dimensions
+ dw SeakingPicFront, SeakingPicBack
+
+ db PECK, TAIL_WHIP, SUPERSONIC, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, ICE_BEAM, BLIZZARD, HYPER_BEAM, RAGE, \
+ MIMIC, DOUBLE_TEAM, BIDE, SWIFT, SKULL_BASH, \
+ REST, SUBSTITUTE, SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/seel.asm b/data/pokemon/base_stats/seel.asm
new file mode 100644
index 00000000..eba3d34d
--- /dev/null
+++ b/data/pokemon/base_stats/seel.asm
@@ -0,0 +1,23 @@
+ db DEX_SEEL ; pokedex id
+
+ db 65, 45, 55, 45, 70
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 190 ; catch rate
+ db 100 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/seel.pic", 0, 1 ; sprite dimensions
+ dw SeelPicFront, SeelPicBack
+
+ db HEADBUTT, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, PAY_DAY, \
+ RAGE, MIMIC, DOUBLE_TEAM, BIDE, SKULL_BASH, \
+ REST, SUBSTITUTE, SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/shellder.asm b/data/pokemon/base_stats/shellder.asm
new file mode 100644
index 00000000..ed8cc154
--- /dev/null
+++ b/data/pokemon/base_stats/shellder.asm
@@ -0,0 +1,23 @@
+ db DEX_SHELLDER ; pokedex id
+
+ db 30, 65, 100, 40, 45
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 190 ; catch rate
+ db 97 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/shellder.pic", 0, 1 ; sprite dimensions
+ dw ShellderPicFront, ShellderPicBack
+
+ db TACKLE, WITHDRAW, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, \
+ ICE_BEAM, BLIZZARD, RAGE, TELEPORT, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, SELFDESTRUCT, SWIFT, \
+ REST, EXPLOSION, TRI_ATTACK, SUBSTITUTE, SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/slowbro.asm b/data/pokemon/base_stats/slowbro.asm
new file mode 100644
index 00000000..33f02f22
--- /dev/null
+++ b/data/pokemon/base_stats/slowbro.asm
@@ -0,0 +1,27 @@
+ db DEX_SLOWBRO ; pokedex id
+
+ db 95, 75, 110, 30, 80
+ ; hp atk def spd spc
+
+ db WATER, PSYCHIC_TYPE ; type
+ db 75 ; catch rate
+ db 164 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/slowbro.pic", 0, 1 ; sprite dimensions
+ dw SlowbroPicFront, SlowbroPicBack
+
+ db CONFUSION, DISABLE, HEADBUTT, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, PAY_DAY, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, EARTHQUAKE, FISSURE, DIG, PSYCHIC_M, \
+ TELEPORT, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ FIRE_BLAST, SWIFT, SKULL_BASH, REST, THUNDER_WAVE, \
+ PSYWAVE, TRI_ATTACK, SUBSTITUTE, SURF, STRENGTH, \
+ FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/slowpoke.asm b/data/pokemon/base_stats/slowpoke.asm
new file mode 100644
index 00000000..32eb6aa9
--- /dev/null
+++ b/data/pokemon/base_stats/slowpoke.asm
@@ -0,0 +1,25 @@
+ db DEX_SLOWPOKE ; pokedex id
+
+ db 90, 65, 65, 15, 40
+ ; hp atk def spd spc
+
+ db WATER, PSYCHIC_TYPE ; type
+ db 190 ; catch rate
+ db 99 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/slowpoke.pic", 0, 1 ; sprite dimensions
+ dw SlowpokePicFront, SlowpokePicBack
+
+ db CONFUSION, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, ICE_BEAM, BLIZZARD, PAY_DAY, RAGE, \
+ EARTHQUAKE, FISSURE, DIG, PSYCHIC_M, TELEPORT, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, FIRE_BLAST, \
+ SWIFT, SKULL_BASH, REST, THUNDER_WAVE, PSYWAVE, \
+ TRI_ATTACK, SUBSTITUTE, SURF, STRENGTH, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/snorlax.asm b/data/pokemon/base_stats/snorlax.asm
new file mode 100644
index 00000000..f835a4b9
--- /dev/null
+++ b/data/pokemon/base_stats/snorlax.asm
@@ -0,0 +1,27 @@
+ db DEX_SNORLAX ; pokedex id
+
+ db 160, 110, 65, 30, 65
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 25 ; catch rate
+ db 154 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/snorlax.pic", 0, 1 ; sprite dimensions
+ dw SnorlaxPicFront, SnorlaxPicBack
+
+ db HEADBUTT, AMNESIA, REST, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, PAY_DAY, SUBMISSION, COUNTER, SEISMIC_TOSS, \
+ RAGE, SOLARBEAM, THUNDERBOLT, THUNDER, EARTHQUAKE, \
+ FISSURE, PSYCHIC_M, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, METRONOME, SELFDESTRUCT, FIRE_BLAST, SKULL_BASH, \
+ REST, PSYWAVE, ROCK_SLIDE, SUBSTITUTE, SURF, \
+ STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/spearow.asm b/data/pokemon/base_stats/spearow.asm
new file mode 100644
index 00000000..c353fc89
--- /dev/null
+++ b/data/pokemon/base_stats/spearow.asm
@@ -0,0 +1,22 @@
+ db DEX_SPEAROW ; pokedex id
+
+ db 40, 60, 30, 70, 31
+ ; hp atk def spd spc
+
+ db NORMAL, FLYING ; type
+ db 255 ; catch rate
+ db 58 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/spearow.pic", 0, 1 ; sprite dimensions
+ dw SpearowPicFront, SpearowPicBack
+
+ db PECK, GROWL, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, WHIRLWIND, TOXIC, TAKE_DOWN, DOUBLE_EDGE, \
+ RAGE, MIMIC, DOUBLE_TEAM, BIDE, SWIFT, \
+ SKY_ATTACK, REST, SUBSTITUTE, FLY
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/squirtle.asm b/data/pokemon/base_stats/squirtle.asm
new file mode 100644
index 00000000..11db64ac
--- /dev/null
+++ b/data/pokemon/base_stats/squirtle.asm
@@ -0,0 +1,24 @@
+ db DEX_SQUIRTLE ; pokedex id
+
+ db 44, 48, 65, 43, 50
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 45 ; catch rate
+ db 66 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/squirtle.pic", 0, 1 ; sprite dimensions
+ dw SquirtlePicFront, SquirtlePicBack
+
+ db TACKLE, TAIL_WHIP, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, DIG, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, SKULL_BASH, \
+ REST, SUBSTITUTE, SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/starmie.asm b/data/pokemon/base_stats/starmie.asm
new file mode 100644
index 00000000..6f9681a2
--- /dev/null
+++ b/data/pokemon/base_stats/starmie.asm
@@ -0,0 +1,25 @@
+ db DEX_STARMIE ; pokedex id
+
+ db 60, 75, 85, 115, 100
+ ; hp atk def spd spc
+
+ db WATER, PSYCHIC_TYPE ; type
+ db 60 ; catch rate
+ db 207 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/starmie.pic", 0, 1 ; sprite dimensions
+ dw StarmiePicFront, StarmiePicBack
+
+ db TACKLE, WATER_GUN, HARDEN, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, \
+ ICE_BEAM, BLIZZARD, HYPER_BEAM, RAGE, THUNDERBOLT, \
+ THUNDER, PSYCHIC_M, TELEPORT, MIMIC, DOUBLE_TEAM, \
+ REFLECT, BIDE, SWIFT, SKULL_BASH, REST, \
+ THUNDER_WAVE, PSYWAVE, TRI_ATTACK, SUBSTITUTE, SURF, \
+ FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/staryu.asm b/data/pokemon/base_stats/staryu.asm
new file mode 100644
index 00000000..08b1250b
--- /dev/null
+++ b/data/pokemon/base_stats/staryu.asm
@@ -0,0 +1,24 @@
+ db DEX_STARYU ; pokedex id
+
+ db 30, 45, 55, 85, 70
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 225 ; catch rate
+ db 106 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/staryu.pic", 0, 1 ; sprite dimensions
+ dw StaryuPicFront, StaryuPicBack
+
+ db TACKLE, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, \
+ ICE_BEAM, BLIZZARD, RAGE, THUNDERBOLT, THUNDER, \
+ PSYCHIC_M, TELEPORT, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, SWIFT, SKULL_BASH, REST, THUNDER_WAVE, \
+ PSYWAVE, TRI_ATTACK, SUBSTITUTE, SURF, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/tangela.asm b/data/pokemon/base_stats/tangela.asm
new file mode 100644
index 00000000..bb0bafd1
--- /dev/null
+++ b/data/pokemon/base_stats/tangela.asm
@@ -0,0 +1,23 @@
+ db DEX_TANGELA ; pokedex id
+
+ db 65, 55, 115, 60, 100
+ ; hp atk def spd spc
+
+ db GRASS, GRASS ; type
+ db 45 ; catch rate
+ db 166 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/tangela.pic", 0, 1 ; sprite dimensions
+ dw TangelaPicFront, TangelaPicBack
+
+ db CONSTRICT, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, MEGA_DRAIN, SOLARBEAM, MIMIC, \
+ DOUBLE_TEAM, BIDE, SKULL_BASH, REST, SUBSTITUTE, \
+ CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/tauros.asm b/data/pokemon/base_stats/tauros.asm
new file mode 100644
index 00000000..311eecad
--- /dev/null
+++ b/data/pokemon/base_stats/tauros.asm
@@ -0,0 +1,24 @@
+ db DEX_TAUROS ; pokedex id
+
+ db 75, 100, 95, 110, 70
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 45 ; catch rate
+ db 211 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/tauros.pic", 0, 1 ; sprite dimensions
+ dw TaurosPicFront, TaurosPicBack
+
+ db TACKLE, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HORN_DRILL, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ ICE_BEAM, BLIZZARD, HYPER_BEAM, RAGE, THUNDERBOLT, \
+ THUNDER, EARTHQUAKE, FISSURE, MIMIC, DOUBLE_TEAM, \
+ BIDE, FIRE_BLAST, SKULL_BASH, REST, SUBSTITUTE, \
+ STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/tentacool.asm b/data/pokemon/base_stats/tentacool.asm
new file mode 100644
index 00000000..7f128c3f
--- /dev/null
+++ b/data/pokemon/base_stats/tentacool.asm
@@ -0,0 +1,23 @@
+ db DEX_TENTACOOL ; pokedex id
+
+ db 40, 40, 35, 70, 100
+ ; hp atk def spd spc
+
+ db WATER, POISON ; type
+ db 190 ; catch rate
+ db 105 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/tentacool.pic", 0, 1 ; sprite dimensions
+ dw TentacoolPicFront, TentacoolPicBack
+
+ db ACID, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, ICE_BEAM, BLIZZARD, RAGE, MEGA_DRAIN, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, SKULL_BASH, \
+ REST, SUBSTITUTE, CUT, SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/tentacruel.asm b/data/pokemon/base_stats/tentacruel.asm
new file mode 100644
index 00000000..eeea2d0f
--- /dev/null
+++ b/data/pokemon/base_stats/tentacruel.asm
@@ -0,0 +1,23 @@
+ db DEX_TENTACRUEL ; pokedex id
+
+ db 80, 70, 65, 100, 120
+ ; hp atk def spd spc
+
+ db WATER, POISON ; type
+ db 60 ; catch rate
+ db 205 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/tentacruel.pic", 0, 1 ; sprite dimensions
+ dw TentacruelPicFront, TentacruelPicBack
+
+ db ACID, SUPERSONIC, WRAP, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, ICE_BEAM, BLIZZARD, HYPER_BEAM, RAGE, \
+ MEGA_DRAIN, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ SKULL_BASH, REST, SUBSTITUTE, CUT, SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/vaporeon.asm b/data/pokemon/base_stats/vaporeon.asm
new file mode 100644
index 00000000..bc800fea
--- /dev/null
+++ b/data/pokemon/base_stats/vaporeon.asm
@@ -0,0 +1,23 @@
+ db DEX_VAPOREON ; pokedex id
+
+ db 130, 65, 60, 65, 110
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 45 ; catch rate
+ db 196 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/vaporeon.pic", 0, 1 ; sprite dimensions
+ dw VaporeonPicFront, VaporeonPicBack
+
+ db TACKLE, TAIL_WHIP, QUICK_ATTACK, WATER_GUN ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, \
+ WATER_GUN, ICE_BEAM, BLIZZARD, HYPER_BEAM, RAGE, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, SWIFT, \
+ SKULL_BASH, REST, SUBSTITUTE, SURF
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/venomoth.asm b/data/pokemon/base_stats/venomoth.asm
new file mode 100644
index 00000000..85c1de76
--- /dev/null
+++ b/data/pokemon/base_stats/venomoth.asm
@@ -0,0 +1,23 @@
+ db DEX_VENOMOTH ; pokedex id
+
+ db 70, 65, 60, 90, 90
+ ; hp atk def spd spc
+
+ db BUG, POISON ; type
+ db 75 ; catch rate
+ db 138 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/venomoth.pic", 0, 1 ; sprite dimensions
+ dw VenomothPicFront, VenomothPicBack
+
+ db TACKLE, DISABLE, SUPERSONIC, CONFUSION ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, WHIRLWIND, TOXIC, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, MEGA_DRAIN, SOLARBEAM, PSYCHIC_M, \
+ TELEPORT, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ SWIFT, REST, PSYWAVE, SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/venonat.asm b/data/pokemon/base_stats/venonat.asm
new file mode 100644
index 00000000..47590f61
--- /dev/null
+++ b/data/pokemon/base_stats/venonat.asm
@@ -0,0 +1,22 @@
+ db DEX_VENONAT ; pokedex id
+
+ db 60, 55, 50, 45, 40
+ ; hp atk def spd spc
+
+ db BUG, POISON ; type
+ db 190 ; catch rate
+ db 75 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/venonat.pic", 0, 1 ; sprite dimensions
+ dw VenonatPicFront, VenonatPicBack
+
+ db TACKLE, DISABLE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, DOUBLE_EDGE, RAGE, MEGA_DRAIN, \
+ SOLARBEAM, PSYCHIC_M, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, REST, PSYWAVE, SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/venusaur.asm b/data/pokemon/base_stats/venusaur.asm
new file mode 100644
index 00000000..d97b9c64
--- /dev/null
+++ b/data/pokemon/base_stats/venusaur.asm
@@ -0,0 +1,23 @@
+ db DEX_VENUSAUR ; pokedex id
+
+ db 80, 82, 83, 80, 100
+ ; hp atk def spd spc
+
+ db GRASS, POISON ; type
+ db 45 ; catch rate
+ db 208 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/venusaur.pic", 0, 1 ; sprite dimensions
+ dw VenusaurPicFront, VenusaurPicBack
+
+ db TACKLE, GROWL, LEECH_SEED, VINE_WHIP ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, MEGA_DRAIN, SOLARBEAM, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, REST, SUBSTITUTE, \
+ CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/victreebel.asm b/data/pokemon/base_stats/victreebel.asm
new file mode 100644
index 00000000..8fd9c2f9
--- /dev/null
+++ b/data/pokemon/base_stats/victreebel.asm
@@ -0,0 +1,23 @@
+ db DEX_VICTREEBEL ; pokedex id
+
+ db 80, 105, 65, 70, 100
+ ; hp atk def spd spc
+
+ db GRASS, POISON ; type
+ db 45 ; catch rate
+ db 191 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/victreebel.pic", 0, 1 ; sprite dimensions
+ dw VictreebelPicFront, VictreebelPicBack
+
+ db SLEEP_POWDER, STUN_SPORE, ACID, RAZOR_LEAF ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, MEGA_DRAIN, SOLARBEAM, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, REST, SUBSTITUTE, \
+ CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/vileplume.asm b/data/pokemon/base_stats/vileplume.asm
new file mode 100644
index 00000000..d6baddb9
--- /dev/null
+++ b/data/pokemon/base_stats/vileplume.asm
@@ -0,0 +1,23 @@
+ db DEX_VILEPLUME ; pokedex id
+
+ db 75, 80, 85, 50, 100
+ ; hp atk def spd spc
+
+ db GRASS, POISON ; type
+ db 45 ; catch rate
+ db 184 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/vileplume.pic", 0, 1 ; sprite dimensions
+ dw VileplumePicFront, VileplumePicBack
+
+ db STUN_SPORE, SLEEP_POWDER, ACID, PETAL_DANCE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, MEGA_DRAIN, SOLARBEAM, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, REST, SUBSTITUTE, \
+ CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/voltorb.asm b/data/pokemon/base_stats/voltorb.asm
new file mode 100644
index 00000000..6234d3a4
--- /dev/null
+++ b/data/pokemon/base_stats/voltorb.asm
@@ -0,0 +1,23 @@
+ db DEX_VOLTORB ; pokedex id
+
+ db 40, 30, 50, 100, 55
+ ; hp atk def spd spc
+
+ db ELECTRIC, ELECTRIC ; type
+ db 190 ; catch rate
+ db 103 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/voltorb.pic", 0, 1 ; sprite dimensions
+ dw VoltorbPicFront, VoltorbPicBack
+
+ db TACKLE, SCREECH, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, TAKE_DOWN, RAGE, THUNDERBOLT, THUNDER, \
+ TELEPORT, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ SELFDESTRUCT, SWIFT, REST, THUNDER_WAVE, EXPLOSION, \
+ SUBSTITUTE, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/vulpix.asm b/data/pokemon/base_stats/vulpix.asm
new file mode 100644
index 00000000..7aba033e
--- /dev/null
+++ b/data/pokemon/base_stats/vulpix.asm
@@ -0,0 +1,22 @@
+ db DEX_VULPIX ; pokedex id
+
+ db 38, 41, 40, 65, 65
+ ; hp atk def spd spc
+
+ db FIRE, FIRE ; type
+ db 190 ; catch rate
+ db 63 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/vulpix.pic", 0, 1 ; sprite dimensions
+ dw VulpixPicFront, VulpixPicBack
+
+ db EMBER, TAIL_WHIP, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, RAGE, \
+ DIG, MIMIC, DOUBLE_TEAM, REFLECT, BIDE, \
+ FIRE_BLAST, SWIFT, SKULL_BASH, REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/wartortle.asm b/data/pokemon/base_stats/wartortle.asm
new file mode 100644
index 00000000..df4c7314
--- /dev/null
+++ b/data/pokemon/base_stats/wartortle.asm
@@ -0,0 +1,24 @@
+ db DEX_WARTORTLE ; pokedex id
+
+ db 59, 63, 80, 58, 65
+ ; hp atk def spd spc
+
+ db WATER, WATER ; type
+ db 45 ; catch rate
+ db 143 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/wartortle.pic", 0, 1 ; sprite dimensions
+ dw WartortlePicFront, WartortlePicBack
+
+ db TACKLE, TAIL_WHIP, BUBBLE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, DIG, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, SKULL_BASH, \
+ REST, SUBSTITUTE, SURF, STRENGTH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/weedle.asm b/data/pokemon/base_stats/weedle.asm
new file mode 100644
index 00000000..67769f3b
--- /dev/null
+++ b/data/pokemon/base_stats/weedle.asm
@@ -0,0 +1,20 @@
+ db DEX_WEEDLE ; pokedex id
+
+ db 40, 35, 30, 50, 20
+ ; hp atk def spd spc
+
+ db BUG, POISON ; type
+ db 255 ; catch rate
+ db 52 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/weedle.pic", 0, 1 ; sprite dimensions
+ dw WeedlePicFront, WeedlePicBack
+
+ db POISON_STING, STRING_SHOT, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/weepinbell.asm b/data/pokemon/base_stats/weepinbell.asm
new file mode 100644
index 00000000..90a3dc49
--- /dev/null
+++ b/data/pokemon/base_stats/weepinbell.asm
@@ -0,0 +1,22 @@
+ db DEX_WEEPINBELL ; pokedex id
+
+ db 65, 90, 50, 55, 85
+ ; hp atk def spd spc
+
+ db GRASS, POISON ; type
+ db 120 ; catch rate
+ db 151 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/weepinbell.pic", 0, 1 ; sprite dimensions
+ dw WeepinbellPicFront, WeepinbellPicBack
+
+ db VINE_WHIP, GROWTH, WRAP, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm SWORDS_DANCE, TOXIC, TAKE_DOWN, DOUBLE_EDGE, RAGE, \
+ MEGA_DRAIN, SOLARBEAM, MIMIC, DOUBLE_TEAM, REFLECT, \
+ BIDE, REST, SUBSTITUTE, CUT
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/weezing.asm b/data/pokemon/base_stats/weezing.asm
new file mode 100644
index 00000000..f5618bb0
--- /dev/null
+++ b/data/pokemon/base_stats/weezing.asm
@@ -0,0 +1,22 @@
+ db DEX_WEEZING ; pokedex id
+
+ db 65, 90, 120, 60, 85
+ ; hp atk def spd spc
+
+ db POISON, POISON ; type
+ db 60 ; catch rate
+ db 173 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/weezing.pic", 0, 1 ; sprite dimensions
+ dw WeezingPicFront, WeezingPicBack
+
+ db TACKLE, SMOG, SLUDGE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm TOXIC, HYPER_BEAM, RAGE, THUNDERBOLT, THUNDER, \
+ MIMIC, DOUBLE_TEAM, BIDE, SELFDESTRUCT, FIRE_BLAST, \
+ REST, EXPLOSION, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/wigglytuff.asm b/data/pokemon/base_stats/wigglytuff.asm
new file mode 100644
index 00000000..2a6876b2
--- /dev/null
+++ b/data/pokemon/base_stats/wigglytuff.asm
@@ -0,0 +1,26 @@
+ db DEX_WIGGLYTUFF ; pokedex id
+
+ db 140, 70, 45, 45, 50
+ ; hp atk def spd spc
+
+ db NORMAL, NORMAL ; type
+ db 50 ; catch rate
+ db 109 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/wigglytuff.pic", 0, 1 ; sprite dimensions
+ dw WigglytuffPicFront, WigglytuffPicBack
+
+ db SING, DISABLE, DEFENSE_CURL, DOUBLESLAP ; level 1 learnset
+ db GROWTH_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, BODY_SLAM, TAKE_DOWN, \
+ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \
+ HYPER_BEAM, SUBMISSION, COUNTER, SEISMIC_TOSS, RAGE, \
+ SOLARBEAM, THUNDERBOLT, THUNDER, PSYCHIC_M, TELEPORT, \
+ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, FIRE_BLAST, \
+ SKULL_BASH, REST, THUNDER_WAVE, PSYWAVE, TRI_ATTACK, \
+ SUBSTITUTE, STRENGTH, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/zapdos.asm b/data/pokemon/base_stats/zapdos.asm
new file mode 100644
index 00000000..68b6396a
--- /dev/null
+++ b/data/pokemon/base_stats/zapdos.asm
@@ -0,0 +1,23 @@
+ db DEX_ZAPDOS ; pokedex id
+
+ db 90, 90, 85, 100, 125
+ ; hp atk def spd spc
+
+ db ELECTRIC, FLYING ; type
+ db 3 ; catch rate
+ db 216 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/zapdos.pic", 0, 1 ; sprite dimensions
+ dw ZapdosPicFront, ZapdosPicBack
+
+ db THUNDERSHOCK, DRILL_PECK, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_SLOW ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, WHIRLWIND, TOXIC, TAKE_DOWN, DOUBLE_EDGE, \
+ HYPER_BEAM, RAGE, THUNDERBOLT, THUNDER, MIMIC, \
+ DOUBLE_TEAM, REFLECT, BIDE, SWIFT, SKY_ATTACK, \
+ REST, THUNDER_WAVE, SUBSTITUTE, FLY, FLASH
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/base_stats/zubat.asm b/data/pokemon/base_stats/zubat.asm
new file mode 100644
index 00000000..9e4fa80f
--- /dev/null
+++ b/data/pokemon/base_stats/zubat.asm
@@ -0,0 +1,22 @@
+ db DEX_ZUBAT ; pokedex id
+
+ db 40, 45, 35, 55, 40
+ ; hp atk def spd spc
+
+ db POISON, FLYING ; type
+ db 255 ; catch rate
+ db 54 ; base exp
+
+ INCBIN "gfx/pokemon/front_yellow/zubat.pic", 0, 1 ; sprite dimensions
+ dw ZubatPicFront, ZubatPicBack
+
+ db LEECH_LIFE, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
+ db GROWTH_MEDIUM_FAST ; growth rate
+
+ ; tm/hm learnset
+ tmhm RAZOR_WIND, WHIRLWIND, TOXIC, TAKE_DOWN, DOUBLE_EDGE, \
+ RAGE, MEGA_DRAIN, MIMIC, DOUBLE_TEAM, BIDE, \
+ SWIFT, REST, SUBSTITUTE
+ ; end
+
+ db 0 ; padding
diff --git a/data/pokemon/cries.asm b/data/pokemon/cries.asm
new file mode 100755
index 00000000..e4bf07d9
--- /dev/null
+++ b/data/pokemon/cries.asm
@@ -0,0 +1,197 @@
+mon_cry: MACRO
+ db (\1 - CRY_SFX_START) / 3
+ db \2, \3
+ENDM
+
+CryData::
+ ; base cry, pitch, length
+ mon_cry SFX_CRY_11, $00, $80 ; Rhydon
+ mon_cry SFX_CRY_03, $00, $80 ; Kangaskhan
+ mon_cry SFX_CRY_00, $00, $80 ; Nidoran♂
+ mon_cry SFX_CRY_19, $CC, $01 ; Clefairy
+ mon_cry SFX_CRY_10, $00, $80 ; Spearow
+ mon_cry SFX_CRY_06, $ED, $80 ; Voltorb
+ mon_cry SFX_CRY_09, $00, $80 ; Nidoking
+ mon_cry SFX_CRY_1F, $00, $80 ; Slowbro
+ mon_cry SFX_CRY_0F, $20, $80 ; Ivysaur
+ mon_cry SFX_CRY_0D, $00, $80 ; Exeggutor
+ mon_cry SFX_CRY_0C, $00, $80 ; Lickitung
+ mon_cry SFX_CRY_0B, $00, $80 ; Exeggcute
+ mon_cry SFX_CRY_05, $00, $80 ; Grimer
+ mon_cry SFX_CRY_07, $00, $FF ; Gengar
+ mon_cry SFX_CRY_01, $00, $80 ; Nidoran♀
+ mon_cry SFX_CRY_0A, $00, $80 ; Nidoqueen
+ mon_cry SFX_CRY_19, $00, $80 ; Cubone
+ mon_cry SFX_CRY_04, $00, $80 ; Rhyhorn
+ mon_cry SFX_CRY_1B, $00, $80 ; Lapras
+ mon_cry SFX_CRY_15, $00, $80 ; Arcanine
+ mon_cry SFX_CRY_1E, $EE, $FF ; Mew
+ mon_cry SFX_CRY_17, $00, $80 ; Gyarados
+ mon_cry SFX_CRY_18, $00, $80 ; Shellder
+ mon_cry SFX_CRY_1A, $00, $80 ; Tentacool
+ mon_cry SFX_CRY_1C, $00, $80 ; Gastly
+ mon_cry SFX_CRY_16, $00, $80 ; Scyther
+ mon_cry SFX_CRY_1E, $02, $20 ; Staryu
+ mon_cry SFX_CRY_13, $00, $80 ; Blastoise
+ mon_cry SFX_CRY_14, $00, $80 ; Pinsir
+ mon_cry SFX_CRY_12, $00, $80 ; Tangela
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_1F, $20, $40 ; Growlithe
+ mon_cry SFX_CRY_17, $FF, $C0 ; Onix
+ mon_cry SFX_CRY_18, $40, $A0 ; Fearow
+ mon_cry SFX_CRY_0E, $DF, $04 ; Pidgey
+ mon_cry SFX_CRY_02, $00, $80 ; Slowpoke
+ mon_cry SFX_CRY_1C, $A8, $C0 ; Kadabra
+ mon_cry SFX_CRY_24, $00, $80 ; Graveler
+ mon_cry SFX_CRY_14, $0A, $C0 ; Chansey
+ mon_cry SFX_CRY_1F, $48, $60 ; Machoke
+ mon_cry SFX_CRY_20, $08, $40 ; Mr.Mime
+ mon_cry SFX_CRY_12, $80, $C0 ; Hitmonlee
+ mon_cry SFX_CRY_0C, $EE, $C0 ; Hitmonchan
+ mon_cry SFX_CRY_17, $E0, $10 ; Arbok
+ mon_cry SFX_CRY_1E, $42, $FF ; Parasect
+ mon_cry SFX_CRY_21, $20, $60 ; Psyduck
+ mon_cry SFX_CRY_0D, $88, $20 ; Drowzee
+ mon_cry SFX_CRY_12, $E0, $40 ; Golem
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_04, $FF, $30 ; Magmar
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_06, $8F, $FF ; Electabuzz
+ mon_cry SFX_CRY_1C, $20, $C0 ; Magneton
+ mon_cry SFX_CRY_12, $E6, $DD ; Koffing
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_0A, $DD, $60 ; Mankey
+ mon_cry SFX_CRY_0C, $88, $C0 ; Seel
+ mon_cry SFX_CRY_0B, $AA, $01 ; Diglett
+ mon_cry SFX_CRY_1D, $11, $40 ; Tauros
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_10, $DD, $01 ; Farfetch'd
+ mon_cry SFX_CRY_1A, $44, $40 ; Venonat
+ mon_cry SFX_CRY_0F, $3C, $C0 ; Dragonite
+ mon_cry SFX_CRY_00, $80, $10 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_1D, $E0, $80 ; MissingNo.
+ mon_cry SFX_CRY_0B, $BB, $01 ; Doduo
+ mon_cry SFX_CRY_0E, $FF, $FF ; Poliwag
+ mon_cry SFX_CRY_0D, $FF, $FF ; Jynx
+ mon_cry SFX_CRY_09, $F8, $40 ; Moltres
+ mon_cry SFX_CRY_09, $80, $40 ; Articuno
+ mon_cry SFX_CRY_18, $FF, $80 ; Zapdos
+ mon_cry SFX_CRY_0E, $FF, $FF ; Ditto
+ mon_cry SFX_CRY_19, $77, $10 ; Meowth
+ mon_cry SFX_CRY_20, $20, $E0 ; Krabby
+ mon_cry SFX_CRY_22, $FF, $40 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_0E, $E0, $60 ; MissingNo.
+ mon_cry SFX_CRY_24, $4F, $10 ; Vulpix
+ mon_cry SFX_CRY_24, $88, $60 ; Ninetales
+ mon_cry SFX_CRY_0F, $EE, $01 ; Pikachu
+ mon_cry SFX_CRY_09, $EE, $08 ; Raichu
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_0F, $60, $40 ; Dratini
+ mon_cry SFX_CRY_0F, $40, $80 ; Dragonair
+ mon_cry SFX_CRY_16, $BB, $40 ; Kabuto
+ mon_cry SFX_CRY_18, $EE, $01 ; Kabutops
+ mon_cry SFX_CRY_19, $99, $10 ; Horsea
+ mon_cry SFX_CRY_19, $3C, $01 ; Seadra
+ mon_cry SFX_CRY_0F, $40, $C0 ; MissingNo.
+ mon_cry SFX_CRY_0F, $20, $C0 ; MissingNo.
+ mon_cry SFX_CRY_00, $20, $40 ; Sandshrew
+ mon_cry SFX_CRY_00, $FF, $FF ; Sandslash
+ mon_cry SFX_CRY_1F, $F0, $01 ; Omanyte
+ mon_cry SFX_CRY_1F, $FF, $40 ; Omastar
+ mon_cry SFX_CRY_0E, $FF, $35 ; Jigglypuff
+ mon_cry SFX_CRY_0E, $68, $60 ; Wigglytuff
+ mon_cry SFX_CRY_1A, $88, $60 ; Eevee
+ mon_cry SFX_CRY_1A, $10, $20 ; Flareon
+ mon_cry SFX_CRY_1A, $3D, $80 ; Jolteon
+ mon_cry SFX_CRY_1A, $AA, $FF ; Vaporeon
+ mon_cry SFX_CRY_1F, $EE, $01 ; Machop
+ mon_cry SFX_CRY_1D, $E0, $80 ; Zubat
+ mon_cry SFX_CRY_17, $12, $40 ; Ekans
+ mon_cry SFX_CRY_1E, $20, $E0 ; Paras
+ mon_cry SFX_CRY_0E, $77, $60 ; Poliwhirl
+ mon_cry SFX_CRY_0E, $00, $FF ; Poliwrath
+ mon_cry SFX_CRY_15, $EE, $01 ; Weedle
+ mon_cry SFX_CRY_13, $FF, $01 ; Kakuna
+ mon_cry SFX_CRY_13, $60, $80 ; Beedrill
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_0B, $99, $20 ; Dodrio
+ mon_cry SFX_CRY_0A, $AF, $40 ; Primeape
+ mon_cry SFX_CRY_0B, $2A, $10 ; Dugtrio
+ mon_cry SFX_CRY_1A, $29, $80 ; Venomoth
+ mon_cry SFX_CRY_0C, $23, $FF ; Dewgong
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_16, $80, $20 ; Caterpie
+ mon_cry SFX_CRY_1C, $CC, $01 ; Metapod
+ mon_cry SFX_CRY_16, $77, $40 ; Butterfree
+ mon_cry SFX_CRY_1F, $08, $C0 ; Machamp
+ mon_cry SFX_CRY_11, $20, $10 ; MissingNo.
+ mon_cry SFX_CRY_21, $FF, $40 ; Golduck
+ mon_cry SFX_CRY_0D, $EE, $40 ; Hypno
+ mon_cry SFX_CRY_1D, $FA, $80 ; Golbat
+ mon_cry SFX_CRY_1E, $99, $FF ; Mewtwo
+ mon_cry SFX_CRY_05, $55, $01 ; Snorlax
+ mon_cry SFX_CRY_17, $80, $00 ; Magikarp
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_07, $EF, $FF ; Muk
+ mon_cry SFX_CRY_0F, $40, $80 ; MissingNo.
+ mon_cry SFX_CRY_20, $EE, $E0 ; Kingler
+ mon_cry SFX_CRY_18, $6F, $E0 ; Cloyster
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_06, $A8, $90 ; Electrode
+ mon_cry SFX_CRY_19, $AA, $20 ; Clefable
+ mon_cry SFX_CRY_12, $FF, $FF ; Weezing
+ mon_cry SFX_CRY_19, $99, $FF ; Persian
+ mon_cry SFX_CRY_08, $4F, $60 ; Marowak
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_1C, $30, $40 ; Haunter
+ mon_cry SFX_CRY_1C, $C0, $01 ; Abra
+ mon_cry SFX_CRY_1C, $98, $FF ; Alakazam
+ mon_cry SFX_CRY_14, $28, $C0 ; Pidgeotto
+ mon_cry SFX_CRY_14, $11, $FF ; Pidgeot
+ mon_cry SFX_CRY_1E, $00, $80 ; Starmie
+ mon_cry SFX_CRY_0F, $80, $01 ; Bulbasaur
+ mon_cry SFX_CRY_0F, $00, $C0 ; Venusaur
+ mon_cry SFX_CRY_1A, $EE, $FF ; Tentacruel
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_16, $80, $40 ; Goldeen
+ mon_cry SFX_CRY_16, $10, $FF ; Seaking
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_25, $00, $80 ; Ponyta
+ mon_cry SFX_CRY_25, $20, $C0 ; Rapidash
+ mon_cry SFX_CRY_22, $00, $80 ; Rattata
+ mon_cry SFX_CRY_22, $20, $FF ; Raticate
+ mon_cry SFX_CRY_00, $2C, $C0 ; Nidorino
+ mon_cry SFX_CRY_01, $2C, $E0 ; Nidorina
+ mon_cry SFX_CRY_24, $F0, $10 ; Geodude
+ mon_cry SFX_CRY_25, $AA, $FF ; Porygon
+ mon_cry SFX_CRY_23, $20, $F0 ; Aerodactyl
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_1C, $80, $60 ; Magnemite
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_04, $60, $40 ; Charmander
+ mon_cry SFX_CRY_1D, $60, $40 ; Squirtle
+ mon_cry SFX_CRY_04, $20, $40 ; Charmeleon
+ mon_cry SFX_CRY_1D, $20, $40 ; Wartortle
+ mon_cry SFX_CRY_04, $00, $80 ; Charizard
+ mon_cry SFX_CRY_1D, $00, $80 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_00, $00, $00 ; MissingNo.
+ mon_cry SFX_CRY_08, $DD, $01 ; Oddish
+ mon_cry SFX_CRY_08, $AA, $40 ; Gloom
+ mon_cry SFX_CRY_23, $22, $FF ; Vileplume
+ mon_cry SFX_CRY_21, $55, $01 ; Bellsprout
+ mon_cry SFX_CRY_25, $44, $20 ; Weepinbell
+ mon_cry SFX_CRY_25, $66, $CC ; Victreebel
diff --git a/data/pokemon/dex_entries.asm b/data/pokemon/dex_entries.asm
new file mode 100755
index 00000000..5b9acf27
--- /dev/null
+++ b/data/pokemon/dex_entries.asm
@@ -0,0 +1,1259 @@
+PokedexEntryPointers:
+ dw RhydonDexEntry
+ dw KangaskhanDexEntry
+ dw NidoranMDexEntry
+ dw ClefairyDexEntry
+ dw SpearowDexEntry
+ dw VoltorbDexEntry
+ dw NidokingDexEntry
+ dw SlowbroDexEntry
+ dw IvysaurDexEntry
+ dw ExeggutorDexEntry
+ dw LickitungDexEntry
+ dw ExeggcuteDexEntry
+ dw GrimerDexEntry
+ dw GengarDexEntry
+ dw NidoranFDexEntry
+ dw NidoqueenDexEntry
+ dw CuboneDexEntry
+ dw RhyhornDexEntry
+ dw LaprasDexEntry
+ dw ArcanineDexEntry
+ dw MewDexEntry
+ dw GyaradosDexEntry
+ dw ShellderDexEntry
+ dw TentacoolDexEntry
+ dw GastlyDexEntry
+ dw ScytherDexEntry
+ dw StaryuDexEntry
+ dw BlastoiseDexEntry
+ dw PinsirDexEntry
+ dw TangelaDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw GrowlitheDexEntry
+ dw OnixDexEntry
+ dw FearowDexEntry
+ dw PidgeyDexEntry
+ dw SlowpokeDexEntry
+ dw KadabraDexEntry
+ dw GravelerDexEntry
+ dw ChanseyDexEntry
+ dw MachokeDexEntry
+ dw MrMimeDexEntry
+ dw HitmonleeDexEntry
+ dw HitmonchanDexEntry
+ dw ArbokDexEntry
+ dw ParasectDexEntry
+ dw PsyduckDexEntry
+ dw DrowzeeDexEntry
+ dw GolemDexEntry
+ dw MissingNoDexEntry
+ dw MagmarDexEntry
+ dw MissingNoDexEntry
+ dw ElectabuzzDexEntry
+ dw MagnetonDexEntry
+ dw KoffingDexEntry
+ dw MissingNoDexEntry
+ dw MankeyDexEntry
+ dw SeelDexEntry
+ dw DiglettDexEntry
+ dw TaurosDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw FarfetchdDexEntry
+ dw VenonatDexEntry
+ dw DragoniteDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw DoduoDexEntry
+ dw PoliwagDexEntry
+ dw JynxDexEntry
+ dw MoltresDexEntry
+ dw ArticunoDexEntry
+ dw ZapdosDexEntry
+ dw DittoDexEntry
+ dw MeowthDexEntry
+ dw KrabbyDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw VulpixDexEntry
+ dw NinetalesDexEntry
+ dw PikachuDexEntry
+ dw RaichuDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw DratiniDexEntry
+ dw DragonairDexEntry
+ dw KabutoDexEntry
+ dw KabutopsDexEntry
+ dw HorseaDexEntry
+ dw SeadraDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw SandshrewDexEntry
+ dw SandslashDexEntry
+ dw OmanyteDexEntry
+ dw OmastarDexEntry
+ dw JigglypuffDexEntry
+ dw WigglytuffDexEntry
+ dw EeveeDexEntry
+ dw FlareonDexEntry
+ dw JolteonDexEntry
+ dw VaporeonDexEntry
+ dw MachopDexEntry
+ dw ZubatDexEntry
+ dw EkansDexEntry
+ dw ParasDexEntry
+ dw PoliwhirlDexEntry
+ dw PoliwrathDexEntry
+ dw WeedleDexEntry
+ dw KakunaDexEntry
+ dw BeedrillDexEntry
+ dw MissingNoDexEntry
+ dw DodrioDexEntry
+ dw PrimeapeDexEntry
+ dw DugtrioDexEntry
+ dw VenomothDexEntry
+ dw DewgongDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw CaterpieDexEntry
+ dw MetapodDexEntry
+ dw ButterfreeDexEntry
+ dw MachampDexEntry
+ dw MissingNoDexEntry
+ dw GolduckDexEntry
+ dw HypnoDexEntry
+ dw GolbatDexEntry
+ dw MewtwoDexEntry
+ dw SnorlaxDexEntry
+ dw MagikarpDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw MukDexEntry
+ dw MissingNoDexEntry
+ dw KinglerDexEntry
+ dw CloysterDexEntry
+ dw MissingNoDexEntry
+ dw ElectrodeDexEntry
+ dw ClefableDexEntry
+ dw WeezingDexEntry
+ dw PersianDexEntry
+ dw MarowakDexEntry
+ dw MissingNoDexEntry
+ dw HaunterDexEntry
+ dw AbraDexEntry
+ dw AlakazamDexEntry
+ dw PidgeottoDexEntry
+ dw PidgeotDexEntry
+ dw StarmieDexEntry
+ dw BulbasaurDexEntry
+ dw VenusaurDexEntry
+ dw TentacruelDexEntry
+ dw MissingNoDexEntry
+ dw GoldeenDexEntry
+ dw SeakingDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw PonytaDexEntry
+ dw RapidashDexEntry
+ dw RattataDexEntry
+ dw RaticateDexEntry
+ dw NidorinoDexEntry
+ dw NidorinaDexEntry
+ dw GeodudeDexEntry
+ dw PorygonDexEntry
+ dw AerodactylDexEntry
+ dw MissingNoDexEntry
+ dw MagnemiteDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw CharmanderDexEntry
+ dw SquirtleDexEntry
+ dw CharmeleonDexEntry
+ dw WartortleDexEntry
+ dw CharizardDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw MissingNoDexEntry
+ dw OddishDexEntry
+ dw GloomDexEntry
+ dw VileplumeDexEntry
+ dw BellsproutDexEntry
+ dw WeepinbellDexEntry
+ dw VictreebelDexEntry
+
+; string: species name
+; height in feet, inches
+; weight in pounds
+; text entry
+
+BulbasaurDexEntry:
+ db "SEED@"
+ db 2,4
+ dw 150
+ text_far _BulbasaurDexEntry
+ text_end
+
+IvysaurDexEntry:
+ db "SEED@"
+ db 3,3
+ dw 290
+ text_far _IvysaurDexEntry
+ text_end
+
+VenusaurDexEntry:
+ db "SEED@"
+ db 6,7
+ dw 2210
+ text_far _VenusaurDexEntry
+ text_end
+
+CharmanderDexEntry:
+ db "LIZARD@"
+ db 2,0
+ dw 190
+ text_far _CharmanderDexEntry
+ text_end
+
+CharmeleonDexEntry:
+ db "FLAME@"
+ db 3,7
+ dw 420
+ text_far _CharmeleonDexEntry
+ text_end
+
+CharizardDexEntry:
+ db "FLAME@"
+ db 5,7
+ dw 2000
+ text_far _CharizardDexEntry
+ text_end
+
+SquirtleDexEntry:
+ db "TINYTURTLE@"
+ db 1,8
+ dw 200
+ text_far _SquirtleDexEntry
+ text_end
+
+WartortleDexEntry:
+ db "TURTLE@"
+ db 3,3
+ dw 500
+ text_far _WartortleDexEntry
+ text_end
+
+BlastoiseDexEntry:
+ db "SHELLFISH@"
+ db 5,3
+ dw 1890
+ text_far _BlastoiseDexEntry
+ text_end
+
+CaterpieDexEntry:
+ db "WORM@"
+ db 1,0
+ dw 60
+ text_far _CaterpieDexEntry
+ text_end
+
+MetapodDexEntry:
+ db "COCOON@"
+ db 2,4
+ dw 220
+ text_far _MetapodDexEntry
+ text_end
+
+ButterfreeDexEntry:
+ db "BUTTERFLY@"
+ db 3,7
+ dw 710
+ text_far _ButterfreeDexEntry
+ text_end
+
+WeedleDexEntry:
+ db "HAIRY BUG@"
+ db 1,0
+ dw 70
+ text_far _WeedleDexEntry
+ text_end
+
+KakunaDexEntry:
+ db "COCOON@"
+ db 2,0
+ dw 220
+ text_far _KakunaDexEntry
+ text_end
+
+BeedrillDexEntry:
+ db "POISON BEE@"
+ db 3,3
+ dw 650
+ text_far _BeedrillDexEntry
+ text_end
+
+PidgeyDexEntry:
+ db "TINY BIRD@"
+ db 1,0
+ dw 40
+ text_far _PidgeyDexEntry
+ text_end
+
+PidgeottoDexEntry:
+ db "BIRD@"
+ db 3,7
+ dw 660
+ text_far _PidgeottoDexEntry
+ text_end
+
+PidgeotDexEntry:
+ db "BIRD@"
+ db 4,11
+ dw 870
+ text_far _PidgeotDexEntry
+ text_end
+
+RattataDexEntry:
+ db "RAT@"
+ db 1,0
+ dw 80
+ text_far _RattataDexEntry
+ text_end
+
+RaticateDexEntry:
+ db "RAT@"
+ db 2,4
+ dw 410
+ text_far _RaticateDexEntry
+ text_end
+
+SpearowDexEntry:
+ db "TINY BIRD@"
+ db 1,0
+ dw 40
+ text_far _SpearowDexEntry
+ text_end
+
+FearowDexEntry:
+ db "BEAK@"
+ db 3,11
+ dw 840
+ text_far _FearowDexEntry
+ text_end
+
+EkansDexEntry:
+ db "SNAKE@"
+ db 6,7
+ dw 150
+ text_far _EkansDexEntry
+ text_end
+
+ArbokDexEntry:
+ db "COBRA@"
+ db 11,6
+ dw 1430
+ text_far _ArbokDexEntry
+ text_end
+
+PikachuDexEntry:
+ db "MOUSE@"
+ db 1,4
+ dw 130
+ text_far _PikachuDexEntry
+ text_end
+
+RaichuDexEntry:
+ db "MOUSE@"
+ db 2,7
+ dw 660
+ text_far _RaichuDexEntry
+ text_end
+
+SandshrewDexEntry:
+ db "MOUSE@"
+ db 2,0
+ dw 260
+ text_far _SandshrewDexEntry
+ text_end
+
+SandslashDexEntry:
+ db "MOUSE@"
+ db 3,3
+ dw 650
+ text_far _SandslashDexEntry
+ text_end
+
+NidoranFDexEntry:
+ db "POISON PIN@"
+ db 1,4
+ dw 150
+ text_far _NidoranFDexEntry
+ text_end
+
+NidorinaDexEntry:
+ db "POISON PIN@"
+ db 2,7
+ dw 440
+ text_far _NidorinaDexEntry
+ text_end
+
+NidoqueenDexEntry:
+ db "DRILL@"
+ db 4,3
+ dw 1320
+ text_far _NidoqueenDexEntry
+ text_end
+
+NidoranMDexEntry:
+ db "POISON PIN@"
+ db 1,8
+ dw 200
+ text_far _NidoranMDexEntry
+ text_end
+
+NidorinoDexEntry:
+ db "POISON PIN@"
+ db 2,11
+ dw 430
+ text_far _NidorinoDexEntry
+ text_end
+
+NidokingDexEntry:
+ db "DRILL@"
+ db 4,7
+ dw 1370
+ text_far _NidokingDexEntry
+ text_end
+
+ClefairyDexEntry:
+ db "FAIRY@"
+ db 2,0
+ dw 170
+ text_far _ClefairyDexEntry
+ text_end
+
+ClefableDexEntry:
+ db "FAIRY@"
+ db 4,3
+ dw 880
+ text_far _ClefableDexEntry
+ text_end
+
+VulpixDexEntry:
+ db "FOX@"
+ db 2,0
+ dw 220
+ text_far _VulpixDexEntry
+ text_end
+
+NinetalesDexEntry:
+ db "FOX@"
+ db 3,7
+ dw 440
+ text_far _NinetalesDexEntry
+ text_end
+
+JigglypuffDexEntry:
+ db "BALLOON@"
+ db 1,8
+ dw 120
+ text_far _JigglypuffDexEntry
+ text_end
+
+WigglytuffDexEntry:
+ db "BALLOON@"
+ db 3,3
+ dw 260
+ text_far _WigglytuffDexEntry
+ text_end
+
+ZubatDexEntry:
+ db "BAT@"
+ db 2,7
+ dw 170
+ text_far _ZubatDexEntry
+ text_end
+
+GolbatDexEntry:
+ db "BAT@"
+ db 5,3
+ dw 1210
+ text_far _GolbatDexEntry
+ text_end
+
+OddishDexEntry:
+ db "WEED@"
+ db 1,8
+ dw 120
+ text_far _OddishDexEntry
+ text_end
+
+GloomDexEntry:
+ db "WEED@"
+ db 2,7
+ dw 190
+ text_far _GloomDexEntry
+ text_end
+
+VileplumeDexEntry:
+ db "FLOWER@"
+ db 3,11
+ dw 410
+ text_far _VileplumeDexEntry
+ text_end
+
+ParasDexEntry:
+ db "MUSHROOM@"
+ db 1,0
+ dw 120
+ text_far _ParasDexEntry
+ text_end
+
+ParasectDexEntry:
+ db "MUSHROOM@"
+ db 3,3
+ dw 650
+ text_far _ParasectDexEntry
+ text_end
+
+VenonatDexEntry:
+ db "INSECT@"
+ db 3,3
+ dw 660
+ text_far _VenonatDexEntry
+ text_end
+
+VenomothDexEntry:
+ db "POISONMOTH@"
+ db 4,11
+ dw 280
+ text_far _VenomothDexEntry
+ text_end
+
+DiglettDexEntry:
+ db "MOLE@"
+ db 0,8
+ dw 20
+ text_far _DiglettDexEntry
+ text_end
+
+DugtrioDexEntry:
+ db "MOLE@"
+ db 2,4
+ dw 730
+ text_far _DugtrioDexEntry
+ text_end
+
+MeowthDexEntry:
+ db "SCRATCHCAT@"
+ db 1,4
+ dw 90
+ text_far _MeowthDexEntry
+ text_end
+
+PersianDexEntry:
+ db "CLASSY CAT@"
+ db 3,3
+ dw 710
+ text_far _PersianDexEntry
+ text_end
+
+PsyduckDexEntry:
+ db "DUCK@"
+ db 2,7
+ dw 430
+ text_far _PsyduckDexEntry
+ text_end
+
+GolduckDexEntry:
+ db "DUCK@"
+ db 5,7
+ dw 1690
+ text_far _GolduckDexEntry
+ text_end
+
+MankeyDexEntry:
+ db "PIG MONKEY@"
+ db 1,8
+ dw 620
+ text_far _MankeyDexEntry
+ text_end
+
+PrimeapeDexEntry:
+ db "PIG MONKEY@"
+ db 3,3
+ dw 710
+ text_far _PrimeapeDexEntry
+ text_end
+
+GrowlitheDexEntry:
+ db "PUPPY@"
+ db 2,4
+ dw 420
+ text_far _GrowlitheDexEntry
+ text_end
+
+ArcanineDexEntry:
+ db "LEGENDARY@"
+ db 6,3
+ dw 3420
+ text_far _ArcanineDexEntry
+ text_end
+
+PoliwagDexEntry:
+ db "TADPOLE@"
+ db 2,0
+ dw 270
+ text_far _PoliwagDexEntry
+ text_end
+
+PoliwhirlDexEntry:
+ db "TADPOLE@"
+ db 3,3
+ dw 440
+ text_far _PoliwhirlDexEntry
+ text_end
+
+PoliwrathDexEntry:
+ db "TADPOLE@"
+ db 4,3
+ dw 1190
+ text_far _PoliwrathDexEntry
+ text_end
+
+AbraDexEntry:
+ db "PSI@"
+ db 2,11
+ dw 430
+ text_far _AbraDexEntry
+ text_end
+
+KadabraDexEntry:
+ db "PSI@"
+ db 4,3
+ dw 1250
+ text_far _KadabraDexEntry
+ text_end
+
+AlakazamDexEntry:
+ db "PSI@"
+ db 4,11
+ dw 1060
+ text_far _AlakazamDexEntry
+ text_end
+
+MachopDexEntry:
+ db "SUPERPOWER@"
+ db 2,7
+ dw 430
+ text_far _MachopDexEntry
+ text_end
+
+MachokeDexEntry:
+ db "SUPERPOWER@"
+ db 4,11
+ dw 1550
+ text_far _MachokeDexEntry
+ text_end
+
+MachampDexEntry:
+ db "SUPERPOWER@"
+ db 5,3
+ dw 2870
+ text_far _MachampDexEntry
+ text_end
+
+BellsproutDexEntry:
+ db "FLOWER@"
+ db 2,4
+ dw 90
+ text_far _BellsproutDexEntry
+ text_end
+
+WeepinbellDexEntry:
+ db "FLYCATCHER@"
+ db 3,3
+ dw 140
+ text_far _WeepinbellDexEntry
+ text_end
+
+VictreebelDexEntry:
+ db "FLYCATCHER@"
+ db 5,7
+ dw 340
+ text_far _VictreebelDexEntry
+ text_end
+
+TentacoolDexEntry:
+ db "JELLYFISH@"
+ db 2,11
+ dw 1000
+ text_far _TentacoolDexEntry
+ text_end
+
+TentacruelDexEntry:
+ db "JELLYFISH@"
+ db 5,3
+ dw 1210
+ text_far _TentacruelDexEntry
+ text_end
+
+GeodudeDexEntry:
+ db "ROCK@"
+ db 1,4
+ dw 440
+ text_far _GeodudeDexEntry
+ text_end
+
+GravelerDexEntry:
+ db "ROCK@"
+ db 3,3
+ dw 2320
+ text_far _GravelerDexEntry
+ text_end
+
+GolemDexEntry:
+ db "MEGATON@"
+ db 4,7
+ dw 6620
+ text_far _GolemDexEntry
+ text_end
+
+PonytaDexEntry:
+ db "FIRE HORSE@"
+ db 3,3
+ dw 660
+ text_far _PonytaDexEntry
+ text_end
+
+RapidashDexEntry:
+ db "FIRE HORSE@"
+ db 5,7
+ dw 2090
+ text_far _RapidashDexEntry
+ text_end
+
+SlowpokeDexEntry:
+ db "DOPEY@"
+ db 3,11
+ dw 790
+ text_far _SlowpokeDexEntry
+ text_end
+
+SlowbroDexEntry:
+ db "HERMITCRAB@"
+ db 5,3
+ dw 1730
+ text_far _SlowbroDexEntry
+ text_end
+
+MagnemiteDexEntry:
+ db "MAGNET@"
+ db 1,0
+ dw 130
+ text_far _MagnemiteDexEntry
+ text_end
+
+MagnetonDexEntry:
+ db "MAGNET@"
+ db 3,3
+ dw 1320
+ text_far _MagnetonDexEntry
+ text_end
+
+FarfetchdDexEntry:
+ db "WILD DUCK@"
+ db 2,7
+ dw 330
+ text_far _FarfetchdDexEntry
+ text_end
+
+DoduoDexEntry:
+ db "TWIN BIRD@"
+ db 4,7
+ dw 860
+ text_far _DoduoDexEntry
+ text_end
+
+DodrioDexEntry:
+ db "TRIPLEBIRD@"
+ db 5,11
+ dw 1880
+ text_far _DodrioDexEntry
+ text_end
+
+SeelDexEntry:
+ db "SEA LION@"
+ db 3,7
+ dw 1980
+ text_far _SeelDexEntry
+ text_end
+
+DewgongDexEntry:
+ db "SEA LION@"
+ db 5,7
+ dw 2650
+ text_far _DewgongDexEntry
+ text_end
+
+GrimerDexEntry:
+ db "SLUDGE@"
+ db 2,11
+ dw 660
+ text_far _GrimerDexEntry
+ text_end
+
+MukDexEntry:
+ db "SLUDGE@"
+ db 3,11
+ dw 660
+ text_far _MukDexEntry
+ text_end
+
+ShellderDexEntry:
+ db "BIVALVE@"
+ db 1,0
+ dw 90
+ text_far _ShellderDexEntry
+ text_end
+
+CloysterDexEntry:
+ db "BIVALVE@"
+ db 4,11
+ dw 2920
+ text_far _CloysterDexEntry
+ text_end
+
+GastlyDexEntry:
+ db "GAS@"
+ db 4,3
+ dw 2
+ text_far _GastlyDexEntry
+ text_end
+
+HaunterDexEntry:
+ db "GAS@"
+ db 5,3
+ dw 2
+ text_far _HaunterDexEntry
+ text_end
+
+GengarDexEntry:
+ db "SHADOW@"
+ db 4,11
+ dw 890
+ text_far _GengarDexEntry
+ text_end
+
+OnixDexEntry:
+ db "ROCK SNAKE@"
+ db 28,10
+ dw 4630
+ text_far _OnixDexEntry
+ text_end
+
+DrowzeeDexEntry:
+ db "HYPNOSIS@"
+ db 3,3
+ dw 710
+ text_far _DrowzeeDexEntry
+ text_end
+
+HypnoDexEntry:
+ db "HYPNOSIS@"
+ db 5,3
+ dw 1670
+ text_far _HypnoDexEntry
+ text_end
+
+KrabbyDexEntry:
+ db "RIVER CRAB@"
+ db 1,4
+ dw 140
+ text_far _KrabbyDexEntry
+ text_end
+
+KinglerDexEntry:
+ db "PINCER@"
+ db 4,3
+ dw 1320
+ text_far _KinglerDexEntry
+ text_end
+
+VoltorbDexEntry:
+ db "BALL@"
+ db 1,8
+ dw 230
+ text_far _VoltorbDexEntry
+ text_end
+
+ElectrodeDexEntry:
+ db "BALL@"
+ db 3,11
+ dw 1470
+ text_far _ElectrodeDexEntry
+ text_end
+
+ExeggcuteDexEntry:
+ db "EGG@"
+ db 1,4
+ dw 60
+ text_far _ExeggcuteDexEntry
+ text_end
+
+ExeggutorDexEntry:
+ db "COCONUT@"
+ db 6,7
+ dw 2650
+ text_far _ExeggutorDexEntry
+ text_end
+
+CuboneDexEntry:
+ db "LONELY@"
+ db 1,4
+ dw 140
+ text_far _CuboneDexEntry
+ text_end
+
+MarowakDexEntry:
+ db "BONEKEEPER@"
+ db 3,3
+ dw 990
+ text_far _MarowakDexEntry
+ text_end
+
+HitmonleeDexEntry:
+ db "KICKING@"
+ db 4,11
+ dw 1100
+ text_far _HitmonleeDexEntry
+ text_end
+
+HitmonchanDexEntry:
+ db "PUNCHING@"
+ db 4,7
+ dw 1110
+ text_far _HitmonchanDexEntry
+ text_end
+
+LickitungDexEntry:
+ db "LICKING@"
+ db 3,11
+ dw 1440
+ text_far _LickitungDexEntry
+ text_end
+
+KoffingDexEntry:
+ db "POISON GAS@"
+ db 2,0
+ dw 20
+ text_far _KoffingDexEntry
+ text_end
+
+WeezingDexEntry:
+ db "POISON GAS@"
+ db 3,11
+ dw 210
+ text_far _WeezingDexEntry
+ text_end
+
+RhyhornDexEntry:
+ db "SPIKES@"
+ db 3,3
+ dw 2540
+ text_far _RhyhornDexEntry
+ text_end
+
+RhydonDexEntry:
+ db "DRILL@"
+ db 6,3
+ dw 2650
+ text_far _RhydonDexEntry
+ text_end
+
+ChanseyDexEntry:
+ db "EGG@"
+ db 3,7
+ dw 760
+ text_far _ChanseyDexEntry
+ text_end
+
+TangelaDexEntry:
+ db "VINE@"
+ db 3,3
+ dw 770
+ text_far _TangelaDexEntry
+ text_end
+
+KangaskhanDexEntry:
+ db "PARENT@"
+ db 7,3
+ dw 1760
+ text_far _KangaskhanDexEntry
+ text_end
+
+HorseaDexEntry:
+ db "DRAGON@"
+ db 1,4
+ dw 180
+ text_far _HorseaDexEntry
+ text_end
+
+SeadraDexEntry:
+ db "DRAGON@"
+ db 3,11
+ dw 550
+ text_far _SeadraDexEntry
+ text_end
+
+GoldeenDexEntry:
+ db "GOLDFISH@"
+ db 2,0
+ dw 330
+ text_far _GoldeenDexEntry
+ text_end
+
+SeakingDexEntry:
+ db "GOLDFISH@"
+ db 4,3
+ dw 860
+ text_far _SeakingDexEntry
+ text_end
+
+StaryuDexEntry:
+ db "STARSHAPE@"
+ db 2,7
+ dw 760
+ text_far _StaryuDexEntry
+ text_end
+
+StarmieDexEntry:
+ db "MYSTERIOUS@"
+ db 3,7
+ dw 1760
+ text_far _StarmieDexEntry
+ text_end
+
+MrMimeDexEntry:
+ db "BARRIER@"
+ db 4,3
+ dw 1200
+ text_far _MrMimeDexEntry
+ text_end
+
+ScytherDexEntry:
+ db "MANTIS@"
+ db 4,11
+ dw 1230
+ text_far _ScytherDexEntry
+ text_end
+
+JynxDexEntry:
+ db "HUMANSHAPE@"
+ db 4,7
+ dw 900
+ text_far _JynxDexEntry
+ text_end
+
+ElectabuzzDexEntry:
+ db "ELECTRIC@"
+ db 3,7
+ dw 660
+ text_far _ElectabuzzDexEntry
+ text_end
+
+MagmarDexEntry:
+ db "SPITFIRE@"
+ db 4,3
+ dw 980
+ text_far _MagmarDexEntry
+ text_end
+
+PinsirDexEntry:
+ db "STAGBEETLE@"
+ db 4,11
+ dw 1210
+ text_far _PinsirDexEntry
+ text_end
+
+TaurosDexEntry:
+ db "WILD BULL@"
+ db 4,7
+ dw 1950
+ text_far _TaurosDexEntry
+ text_end
+
+MagikarpDexEntry:
+ db "FISH@"
+ db 2,11
+ dw 220
+ text_far _MagikarpDexEntry
+ text_end
+
+GyaradosDexEntry:
+ db "ATROCIOUS@"
+ db 21,4
+ dw 5180
+ text_far _GyaradosDexEntry
+ text_end
+
+LaprasDexEntry:
+ db "TRANSPORT@"
+ db 8,2
+ dw 4850
+ text_far _LaprasDexEntry
+ text_end
+
+DittoDexEntry:
+ db "TRANSFORM@"
+ db 1,0
+ dw 90
+ text_far _DittoDexEntry
+ text_end
+
+EeveeDexEntry:
+ db "EVOLUTION@"
+ db 1,0
+ dw 140
+ text_far _EeveeDexEntry
+ text_end
+
+VaporeonDexEntry:
+ db "BUBBLE JET@"
+ db 3,3
+ dw 640
+ text_far _VaporeonDexEntry
+ text_end
+
+JolteonDexEntry:
+ db "LIGHTNING@"
+ db 2,7
+ dw 540
+ text_far _JolteonDexEntry
+ text_end
+
+FlareonDexEntry:
+ db "FLAME@"
+ db 2,11
+ dw 550
+ text_far _FlareonDexEntry
+ text_end
+
+PorygonDexEntry:
+ db "VIRTUAL@"
+ db 2,7
+ dw 800
+ text_far _PorygonDexEntry
+ text_end
+
+OmanyteDexEntry:
+ db "SPIRAL@"
+ db 1,4
+ dw 170
+ text_far _OmanyteDexEntry
+ text_end
+
+OmastarDexEntry:
+ db "SPIRAL@"
+ db 3,3
+ dw 770
+ text_far _OmastarDexEntry
+ text_end
+
+KabutoDexEntry:
+ db "SHELLFISH@"
+ db 1,8
+ dw 250
+ text_far _KabutoDexEntry
+ text_end
+
+KabutopsDexEntry:
+ db "SHELLFISH@"
+ db 4,3
+ dw 890
+ text_far _KabutopsDexEntry
+ text_end
+
+AerodactylDexEntry:
+ db "FOSSIL@"
+ db 5,11
+ dw 1300
+ text_far _AerodactylDexEntry
+ text_end
+
+SnorlaxDexEntry:
+ db "SLEEPING@"
+ db 6,11
+ dw 10140
+ text_far _SnorlaxDexEntry
+ text_end
+
+ArticunoDexEntry:
+ db "FREEZE@"
+ db 5,7
+ dw 1220
+ text_far _ArticunoDexEntry
+ text_end
+
+ZapdosDexEntry:
+ db "ELECTRIC@"
+ db 5,3
+ dw 1160
+ text_far _ZapdosDexEntry
+ text_end
+
+MoltresDexEntry:
+ db "FLAME@"
+ db 6,7
+ dw 1320
+ text_far _MoltresDexEntry
+ text_end
+
+DratiniDexEntry:
+ db "DRAGON@"
+ db 5,11
+ dw 70
+ text_far _DratiniDexEntry
+ text_end
+
+DragonairDexEntry:
+ db "DRAGON@"
+ db 13,1
+ dw 360
+ text_far _DragonairDexEntry
+ text_end
+
+DragoniteDexEntry:
+ db "DRAGON@"
+ db 7,3
+ dw 4630
+ text_far _DragoniteDexEntry
+ text_end
+
+MewtwoDexEntry:
+ db "GENETIC@"
+ db 6,7
+ dw 2690
+ text_far _MewtwoDexEntry
+ text_end
+
+MewDexEntry:
+ db "NEW SPECIE@"
+ db 1,4
+ dw 90
+ text_far _MewDexEntry
+ text_end
+
+MissingNoDexEntry:
+ db "???@"
+ db 10 ; 1.0 m
+ dw 100 ; 10.0 kg
+ db "コメント さくせいちゅう@" ; コメント作成中 (Comment to be written)
diff --git a/data/pokedex_order.asm b/data/pokemon/dex_order.asm
index 0e293946..0e293946 100755
--- a/data/pokedex_order.asm
+++ b/data/pokemon/dex_order.asm
diff --git a/text/pokedex.asm b/data/pokemon/dex_text.asm
index 7e84a83d..7e84a83d 100644
--- a/text/pokedex.asm
+++ b/data/pokemon/dex_text.asm
diff --git a/data/pokemon/evos_moves.asm b/data/pokemon/evos_moves.asm
new file mode 100755
index 00000000..19016d14
--- /dev/null
+++ b/data/pokemon/evos_moves.asm
@@ -0,0 +1,2161 @@
+; See constants/pokemon_data_constants.asm
+; The max number of evolutions per monster is MAX_EVOLUTIONS
+
+EvosMovesPointerTable:
+ dw RhydonEvosMoves
+ dw KangaskhanEvosMoves
+ dw NidoranMEvosMoves
+ dw ClefairyEvosMoves
+ dw SpearowEvosMoves
+ dw VoltorbEvosMoves
+ dw NidokingEvosMoves
+ dw SlowbroEvosMoves
+ dw IvysaurEvosMoves
+ dw ExeggutorEvosMoves
+ dw LickitungEvosMoves
+ dw ExeggcuteEvosMoves
+ dw GrimerEvosMoves
+ dw GengarEvosMoves
+ dw NidoranFEvosMoves
+ dw NidoqueenEvosMoves
+ dw CuboneEvosMoves
+ dw RhyhornEvosMoves
+ dw LaprasEvosMoves
+ dw ArcanineEvosMoves
+ dw MewEvosMoves
+ dw GyaradosEvosMoves
+ dw ShellderEvosMoves
+ dw TentacoolEvosMoves
+ dw GastlyEvosMoves
+ dw ScytherEvosMoves
+ dw StaryuEvosMoves
+ dw BlastoiseEvosMoves
+ dw PinsirEvosMoves
+ dw TangelaEvosMoves
+ dw MissingNo1FEvosMoves
+ dw MissingNo20EvosMoves
+ dw GrowlitheEvosMoves
+ dw OnixEvosMoves
+ dw FearowEvosMoves
+ dw PidgeyEvosMoves
+ dw SlowpokeEvosMoves
+ dw KadabraEvosMoves
+ dw GravelerEvosMoves
+ dw ChanseyEvosMoves
+ dw MachokeEvosMoves
+ dw MrMimeEvosMoves
+ dw HitmonleeEvosMoves
+ dw HitmonchanEvosMoves
+ dw ArbokEvosMoves
+ dw ParasectEvosMoves
+ dw PsyduckEvosMoves
+ dw DrowzeeEvosMoves
+ dw GolemEvosMoves
+ dw MissingNo32EvosMoves
+ dw MagmarEvosMoves
+ dw MissingNo34EvosMoves
+ dw ElectabuzzEvosMoves
+ dw MagnetonEvosMoves
+ dw KoffingEvosMoves
+ dw MissingNo38EvosMoves
+ dw MankeyEvosMoves
+ dw SeelEvosMoves
+ dw DiglettEvosMoves
+ dw TaurosEvosMoves
+ dw MissingNo3DEvosMoves
+ dw MissingNo3EEvosMoves
+ dw MissingNo3FEvosMoves
+ dw FarfetchdEvosMoves
+ dw VenonatEvosMoves
+ dw DragoniteEvosMoves
+ dw MissingNo43EvosMoves
+ dw MissingNo44EvosMoves
+ dw MissingNo45EvosMoves
+ dw DoduoEvosMoves
+ dw PoliwagEvosMoves
+ dw JynxEvosMoves
+ dw MoltresEvosMoves
+ dw ArticunoEvosMoves
+ dw ZapdosEvosMoves
+ dw DittoEvosMoves
+ dw MeowthEvosMoves
+ dw KrabbyEvosMoves
+ dw MissingNo4FEvosMoves
+ dw MissingNo50EvosMoves
+ dw MissingNo51EvosMoves
+ dw VulpixEvosMoves
+ dw NinetalesEvosMoves
+ dw PikachuEvosMoves
+ dw RaichuEvosMoves
+ dw MissingNo56EvosMoves
+ dw MissingNo57EvosMoves
+ dw DratiniEvosMoves
+ dw DragonairEvosMoves
+ dw KabutoEvosMoves
+ dw KabutopsEvosMoves
+ dw HorseaEvosMoves
+ dw SeadraEvosMoves
+ dw MissingNo5EEvosMoves
+ dw MissingNo5FEvosMoves
+ dw SandshrewEvosMoves
+ dw SandslashEvosMoves
+ dw OmanyteEvosMoves
+ dw OmastarEvosMoves
+ dw JigglypuffEvosMoves
+ dw WigglytuffEvosMoves
+ dw EeveeEvosMoves
+ dw FlareonEvosMoves
+ dw JolteonEvosMoves
+ dw VaporeonEvosMoves
+ dw MachopEvosMoves
+ dw ZubatEvosMoves
+ dw EkansEvosMoves
+ dw ParasEvosMoves
+ dw PoliwhirlEvosMoves
+ dw PoliwrathEvosMoves
+ dw WeedleEvosMoves
+ dw KakunaEvosMoves
+ dw BeedrillEvosMoves
+ dw MissingNo73EvosMoves
+ dw DodrioEvosMoves
+ dw PrimeapeEvosMoves
+ dw DugtrioEvosMoves
+ dw VenomothEvosMoves
+ dw DewgongEvosMoves
+ dw MissingNo79EvosMoves
+ dw MissingNo7AEvosMoves
+ dw CaterpieEvosMoves
+ dw MetapodEvosMoves
+ dw ButterfreeEvosMoves
+ dw MachampEvosMoves
+ dw MissingNo7FEvosMoves
+ dw GolduckEvosMoves
+ dw HypnoEvosMoves
+ dw GolbatEvosMoves
+ dw MewtwoEvosMoves
+ dw SnorlaxEvosMoves
+ dw MagikarpEvosMoves
+ dw MissingNo86EvosMoves
+ dw MissingNo87EvosMoves
+ dw MukEvosMoves
+ dw MissingNo8AEvosMoves
+ dw KinglerEvosMoves
+ dw CloysterEvosMoves
+ dw MissingNo8CEvosMoves
+ dw ElectrodeEvosMoves
+ dw ClefableEvosMoves
+ dw WeezingEvosMoves
+ dw PersianEvosMoves
+ dw MarowakEvosMoves
+ dw MissingNo92EvosMoves
+ dw HaunterEvosMoves
+ dw AbraEvosMoves
+ dw AlakazamEvosMoves
+ dw PidgeottoEvosMoves
+ dw PidgeotEvosMoves
+ dw StarmieEvosMoves
+ dw BulbasaurEvosMoves
+ dw VenusaurEvosMoves
+ dw TentacruelEvosMoves
+ dw MissingNo9CEvosMoves
+ dw GoldeenEvosMoves
+ dw SeakingEvosMoves
+ dw MissingNo9FEvosMoves
+ dw MissingNoA0EvosMoves
+ dw MissingNoA1EvosMoves
+ dw MissingNoA2EvosMoves
+ dw PonytaEvosMoves
+ dw RapidashEvosMoves
+ dw RattataEvosMoves
+ dw RaticateEvosMoves
+ dw NidorinoEvosMoves
+ dw NidorinaEvosMoves
+ dw GeodudeEvosMoves
+ dw PorygonEvosMoves
+ dw AerodactylEvosMoves
+ dw MissingNoACEvosMoves
+ dw MagnemiteEvosMoves
+ dw MissingNoAEEvosMoves
+ dw MissingNoAFEvosMoves
+ dw CharmanderEvosMoves
+ dw SquirtleEvosMoves
+ dw CharmeleonEvosMoves
+ dw WartortleEvosMoves
+ dw CharizardEvosMoves
+ dw MissingNoB5EvosMoves
+ dw FossilKabutopsEvosMoves
+ dw FossilAerodactylEvosMoves
+ dw MonGhostEvosMoves
+ dw OddishEvosMoves
+ dw GloomEvosMoves
+ dw VileplumeEvosMoves
+ dw BellsproutEvosMoves
+ dw WeepinbellEvosMoves
+ dw VictreebelEvosMoves
+
+RhydonEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 30, STOMP
+ db 35, TAIL_WHIP
+ db 40, FURY_ATTACK
+ db 48, HORN_DRILL
+ db 55, LEER
+ db 64, TAKE_DOWN
+ db 0
+
+KangaskhanEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 26, BITE
+ db 31, TAIL_WHIP
+ db 36, MEGA_PUNCH
+ db 41, LEER
+ db 46, DIZZY_PUNCH
+ db 0
+
+NidoranMEvosMoves:
+; Evolutions
+ db EV_LEVEL, 16, NIDORINO
+ db 0
+; Learnset
+ db 8, HORN_ATTACK
+ db 12, DOUBLE_KICK
+ db 17, POISON_STING
+ db 23, FOCUS_ENERGY
+ db 30, FURY_ATTACK
+ db 38, HORN_DRILL
+ db 0
+
+ClefairyEvosMoves:
+; Evolutions
+ db EV_ITEM, MOON_STONE, 1, CLEFABLE
+ db 0
+; Learnset
+ db 13, SING
+ db 18, DOUBLESLAP
+ db 24, MINIMIZE
+ db 31, METRONOME
+ db 39, DEFENSE_CURL
+ db 48, LIGHT_SCREEN
+ db 0
+
+SpearowEvosMoves:
+; Evolutions
+ db EV_LEVEL, 20, FEAROW
+ db 0
+; Learnset
+ db 9, LEER
+ db 15, FURY_ATTACK
+ db 22, MIRROR_MOVE
+ db 29, DRILL_PECK
+ db 36, AGILITY
+ db 0
+
+VoltorbEvosMoves:
+; Evolutions
+ db EV_LEVEL, 30, ELECTRODE
+ db 0
+; Learnset
+ db 17, SONICBOOM
+ db 22, SELFDESTRUCT
+ db 29, LIGHT_SCREEN
+ db 36, SWIFT
+ db 43, EXPLOSION
+ db 0
+
+NidokingEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 8, HORN_ATTACK
+ db 12, DOUBLE_KICK
+ db 23, THRASH
+ db 0
+
+SlowbroEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 18, DISABLE
+ db 22, HEADBUTT
+ db 27, GROWL
+ db 33, WATER_GUN
+ db 37, WITHDRAW
+ db 44, AMNESIA
+ db 55, PSYCHIC_M
+ db 0
+
+IvysaurEvosMoves:
+; Evolutions
+ db EV_LEVEL, 32, VENUSAUR
+ db 0
+; Learnset
+ db 7, LEECH_SEED
+ db 13, VINE_WHIP
+ db 22, POISONPOWDER
+ db 30, RAZOR_LEAF
+ db 38, GROWTH
+ db 46, SLEEP_POWDER
+ db 54, SOLARBEAM
+ db 0
+
+ExeggutorEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 28, STOMP
+ db 0
+
+LickitungEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 7, STOMP
+ db 15, DISABLE
+ db 23, DEFENSE_CURL
+ db 31, SLAM
+ db 39, SCREECH
+ db 0
+
+ExeggcuteEvosMoves:
+; Evolutions
+ db EV_ITEM, LEAF_STONE, 1, EXEGGUTOR
+ db 0
+; Learnset
+ db 25, REFLECT
+ db 28, LEECH_SEED
+ db 32, STUN_SPORE
+ db 37, POISONPOWDER
+ db 42, SOLARBEAM
+ db 48, SLEEP_POWDER
+ db 0
+
+GrimerEvosMoves:
+; Evolutions
+ db EV_LEVEL, 38, MUK
+ db 0
+; Learnset
+ db 30, POISON_GAS
+ db 33, MINIMIZE
+ db 37, SLUDGE
+ db 42, HARDEN
+ db 48, SCREECH
+ db 55, ACID_ARMOR
+ db 0
+
+GengarEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 29, HYPNOSIS
+ db 38, DREAM_EATER
+ db 0
+
+NidoranFEvosMoves:
+; Evolutions
+ db EV_LEVEL, 16, NIDORINA
+ db 0
+; Learnset
+ db 8, SCRATCH
+ db 12, DOUBLE_KICK
+ db 17, POISON_STING
+ db 23, TAIL_WHIP
+ db 30, BITE
+ db 38, FURY_SWIPES
+ db 0
+
+NidoqueenEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 8, SCRATCH
+ db 12, DOUBLE_KICK
+ db 23, BODY_SLAM
+ db 0
+
+CuboneEvosMoves:
+; Evolutions
+ db EV_LEVEL, 28, MAROWAK
+ db 0
+; Learnset
+ db 10, BONE_CLUB
+ db 13, TAIL_WHIP
+ db 18, HEADBUTT
+ db 25, LEER
+ db 31, FOCUS_ENERGY
+ db 38, THRASH
+ db 43, BONEMERANG
+ db 46, RAGE
+ db 0
+
+RhyhornEvosMoves:
+; Evolutions
+ db EV_LEVEL, 42, RHYDON
+ db 0
+; Learnset
+ db 30, STOMP
+ db 35, TAIL_WHIP
+ db 40, FURY_ATTACK
+ db 45, HORN_DRILL
+ db 50, LEER
+ db 55, TAKE_DOWN
+ db 0
+
+LaprasEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 16, SING
+ db 20, MIST
+ db 25, BODY_SLAM
+ db 31, CONFUSE_RAY
+ db 38, ICE_BEAM
+ db 46, HYDRO_PUMP
+ db 0
+
+ArcanineEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MewEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 10, TRANSFORM
+ db 20, MEGA_PUNCH
+ db 30, METRONOME
+ db 40, PSYCHIC_M
+ db 0
+
+GyaradosEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 20, BITE
+ db 25, DRAGON_RAGE
+ db 32, LEER
+ db 41, HYDRO_PUMP
+ db 52, HYPER_BEAM
+ db 0
+
+ShellderEvosMoves:
+; Evolutions
+ db EV_ITEM, WATER_STONE, 1, CLOYSTER
+ db 0
+; Learnset
+ db 18, SUPERSONIC
+ db 23, CLAMP
+ db 30, AURORA_BEAM
+ db 39, LEER
+ db 50, ICE_BEAM
+ db 0
+
+TentacoolEvosMoves:
+; Evolutions
+ db EV_LEVEL, 30, TENTACRUEL
+ db 0
+; Learnset
+ db 7, SUPERSONIC
+ db 13, WRAP
+ db 18, POISON_STING
+ db 22, WATER_GUN
+ db 27, CONSTRICT
+ db 33, BARRIER
+ db 40, SCREECH
+ db 48, HYDRO_PUMP
+ db 0
+
+GastlyEvosMoves:
+; Evolutions
+ db EV_LEVEL, 25, HAUNTER
+ db 0
+; Learnset
+ db 27, HYPNOSIS
+ db 35, DREAM_EATER
+ db 0
+
+ScytherEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 17, LEER
+ db 20, FOCUS_ENERGY
+ db 24, DOUBLE_TEAM
+ db 29, SLASH
+ db 35, SWORDS_DANCE
+ db 42, AGILITY
+ db 50, WING_ATTACK
+ db 0
+
+StaryuEvosMoves:
+; Evolutions
+ db EV_ITEM, WATER_STONE, 1, STARMIE
+ db 0
+; Learnset
+ db 17, WATER_GUN
+ db 22, HARDEN
+ db 27, RECOVER
+ db 32, SWIFT
+ db 37, MINIMIZE
+ db 42, LIGHT_SCREEN
+ db 47, HYDRO_PUMP
+ db 0
+
+BlastoiseEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 8, BUBBLE
+ db 15, WATER_GUN
+ db 24, BITE
+ db 31, WITHDRAW
+ db 42, SKULL_BASH
+ db 52, HYDRO_PUMP
+ db 0
+
+PinsirEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 21, BIND
+ db 25, SEISMIC_TOSS
+ db 30, GUILLOTINE
+ db 36, FOCUS_ENERGY
+ db 43, HARDEN
+ db 49, SLASH
+ db 54, SWORDS_DANCE
+ db 0
+
+TangelaEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 24, BIND
+ db 27, ABSORB
+ db 29, VINE_WHIP
+ db 32, POISONPOWDER
+ db 36, STUN_SPORE
+ db 39, SLEEP_POWDER
+ db 45, SLAM
+ db 48, GROWTH
+ db 0
+
+MissingNo1FEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNo20EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+GrowlitheEvosMoves:
+; Evolutions
+ db EV_ITEM, FIRE_STONE, 1, ARCANINE
+ db 0
+; Learnset
+ db 18, EMBER
+ db 23, LEER
+ db 30, TAKE_DOWN
+ db 39, AGILITY
+ db 50, FLAMETHROWER
+ db 0
+
+OnixEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 15, BIND
+ db 19, ROCK_THROW
+ db 25, RAGE
+ db 33, SLAM
+ db 43, HARDEN
+ db 0
+
+FearowEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 9, LEER
+ db 15, FURY_ATTACK
+ db 25, MIRROR_MOVE
+ db 34, DRILL_PECK
+ db 43, AGILITY
+ db 0
+
+PidgeyEvosMoves:
+; Evolutions
+ db EV_LEVEL, 18, PIDGEOTTO
+ db 0
+; Learnset
+ db 5, SAND_ATTACK
+ db 12, QUICK_ATTACK
+ db 19, WHIRLWIND
+ db 28, WING_ATTACK
+ db 36, AGILITY
+ db 44, MIRROR_MOVE
+ db 0
+
+SlowpokeEvosMoves:
+; Evolutions
+ db EV_LEVEL, 37, SLOWBRO
+ db 0
+; Learnset
+ db 18, DISABLE
+ db 22, HEADBUTT
+ db 27, GROWL
+ db 33, WATER_GUN
+ db 40, AMNESIA
+ db 48, PSYCHIC_M
+ db 0
+
+KadabraEvosMoves:
+; Evolutions
+ db EV_TRADE, 1, ALAKAZAM
+ db 0
+; Learnset
+ db 16, CONFUSION
+ db 20, DISABLE
+ db 27, PSYBEAM
+ db 31, RECOVER
+ db 38, PSYCHIC_M
+ db 42, REFLECT
+ db 0
+
+GravelerEvosMoves:
+; Evolutions
+ db EV_TRADE, 1, GOLEM
+ db 0
+; Learnset
+ db 11, DEFENSE_CURL
+ db 16, ROCK_THROW
+ db 21, SELFDESTRUCT
+ db 29, HARDEN
+ db 36, EARTHQUAKE
+ db 43, EXPLOSION
+ db 0
+
+ChanseyEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 12, DOUBLESLAP
+ db 24, SING
+ db 30, GROWL
+ db 38, MINIMIZE
+ db 44, DEFENSE_CURL
+ db 48, LIGHT_SCREEN
+ db 54, DOUBLE_EDGE
+ db 0
+
+MachokeEvosMoves:
+; Evolutions
+ db EV_TRADE, 1, MACHAMP
+ db 0
+; Learnset
+ db 20, LOW_KICK
+ db 25, LEER
+ db 36, FOCUS_ENERGY
+ db 44, SEISMIC_TOSS
+ db 52, SUBMISSION
+ db 0
+
+MrMimeEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 15, CONFUSION
+ db 23, LIGHT_SCREEN
+ db 31, DOUBLESLAP
+ db 39, MEDITATE
+ db 47, SUBSTITUTE
+ db 0
+
+HitmonleeEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 33, ROLLING_KICK
+ db 38, JUMP_KICK
+ db 43, FOCUS_ENERGY
+ db 48, HI_JUMP_KICK
+ db 53, MEGA_KICK
+ db 0
+
+HitmonchanEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 33, FIRE_PUNCH
+ db 38, ICE_PUNCH
+ db 43, THUNDERPUNCH
+ db 48, MEGA_PUNCH
+ db 53, COUNTER
+ db 0
+
+ArbokEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 10, POISON_STING
+ db 17, BITE
+ db 27, GLARE
+ db 36, SCREECH
+ db 47, ACID
+ db 0
+
+ParasectEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 13, STUN_SPORE
+ db 20, LEECH_LIFE
+ db 30, SPORE
+ db 39, SLASH
+ db 48, GROWTH
+ db 0
+
+PsyduckEvosMoves:
+; Evolutions
+ db EV_LEVEL, 33, GOLDUCK
+ db 0
+; Learnset
+ db 28, TAIL_WHIP
+ db 31, DISABLE
+ db 36, CONFUSION
+ db 43, FURY_SWIPES
+ db 52, HYDRO_PUMP
+ db 0
+
+DrowzeeEvosMoves:
+; Evolutions
+ db EV_LEVEL, 26, HYPNO
+ db 0
+; Learnset
+ db 12, DISABLE
+ db 17, CONFUSION
+ db 24, HEADBUTT
+ db 29, POISON_GAS
+ db 32, PSYCHIC_M
+ db 37, MEDITATE
+ db 0
+
+GolemEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 11, DEFENSE_CURL
+ db 16, ROCK_THROW
+ db 21, SELFDESTRUCT
+ db 29, HARDEN
+ db 36, EARTHQUAKE
+ db 43, EXPLOSION
+ db 0
+
+MissingNo32EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MagmarEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 36, LEER
+ db 39, CONFUSE_RAY
+ db 43, FIRE_PUNCH
+ db 48, SMOKESCREEN
+ db 52, SMOG
+ db 55, FLAMETHROWER
+ db 0
+
+MissingNo34EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+ElectabuzzEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 34, THUNDERSHOCK
+ db 37, SCREECH
+ db 42, THUNDERPUNCH
+ db 49, LIGHT_SCREEN
+ db 54, THUNDER
+ db 0
+
+MagnetonEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 21, SONICBOOM
+ db 25, THUNDERSHOCK
+ db 29, SUPERSONIC
+ db 38, THUNDER_WAVE
+ db 46, SWIFT
+ db 54, SCREECH
+ db 0
+
+KoffingEvosMoves:
+; Evolutions
+ db EV_LEVEL, 35, WEEZING
+ db 0
+; Learnset
+ db 32, SLUDGE
+ db 37, SMOKESCREEN
+ db 40, SELFDESTRUCT
+ db 45, HAZE
+ db 48, EXPLOSION
+ db 0
+
+MissingNo38EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MankeyEvosMoves:
+; Evolutions
+ db EV_LEVEL, 28, PRIMEAPE
+ db 0
+; Learnset
+ db 9, LOW_KICK
+ db 15, KARATE_CHOP
+ db 21, FURY_SWIPES
+ db 27, FOCUS_ENERGY
+ db 33, SEISMIC_TOSS
+ db 39, THRASH
+ db 45, SCREECH
+ db 0
+
+SeelEvosMoves:
+; Evolutions
+ db EV_LEVEL, 34, DEWGONG
+ db 0
+; Learnset
+ db 30, GROWL
+ db 35, AURORA_BEAM
+ db 40, REST
+ db 45, TAKE_DOWN
+ db 50, ICE_BEAM
+ db 0
+
+DiglettEvosMoves:
+; Evolutions
+ db EV_LEVEL, 26, DUGTRIO
+ db 0
+; Learnset
+ db 15, GROWL
+ db 19, DIG
+ db 24, SAND_ATTACK
+ db 31, SLASH
+ db 40, EARTHQUAKE
+ db 0
+
+TaurosEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 21, STOMP
+ db 28, TAIL_WHIP
+ db 35, LEER
+ db 44, RAGE
+ db 51, TAKE_DOWN
+ db 0
+
+MissingNo3DEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNo3EEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNo3FEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+FarfetchdEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 7, LEER
+ db 15, FURY_ATTACK
+ db 23, SWORDS_DANCE
+ db 31, AGILITY
+ db 39, SLASH
+ db 0
+
+VenonatEvosMoves:
+; Evolutions
+ db EV_LEVEL, 31, VENOMOTH
+ db 0
+; Learnset
+ db 11, SUPERSONIC
+ db 19, CONFUSION
+ db 22, POISONPOWDER
+ db 27, LEECH_LIFE
+ db 30, STUN_SPORE
+ db 35, PSYBEAM
+ db 38, SLEEP_POWDER
+ db 43, PSYCHIC_M
+ db 0
+
+DragoniteEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 10, THUNDER_WAVE
+ db 20, AGILITY
+ db 35, SLAM
+ db 45, DRAGON_RAGE
+ db 60, HYPER_BEAM
+ db 0
+
+MissingNo43EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNo44EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNo45EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+DoduoEvosMoves:
+; Evolutions
+ db EV_LEVEL, 31, DODRIO
+ db 0
+; Learnset
+ db 20, GROWL
+ db 24, FURY_ATTACK
+ db 30, DRILL_PECK
+ db 36, RAGE
+ db 40, TRI_ATTACK
+ db 44, AGILITY
+ db 0
+
+PoliwagEvosMoves:
+; Evolutions
+ db EV_LEVEL, 25, POLIWHIRL
+ db 0
+; Learnset
+ db 16, HYPNOSIS
+ db 19, WATER_GUN
+ db 25, DOUBLESLAP
+ db 31, BODY_SLAM
+ db 38, AMNESIA
+ db 45, HYDRO_PUMP
+ db 0
+
+JynxEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 18, LICK
+ db 23, DOUBLESLAP
+ db 31, ICE_PUNCH
+ db 39, BODY_SLAM
+ db 47, THRASH
+ db 58, BLIZZARD
+ db 0
+
+MoltresEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 51, LEER
+ db 55, AGILITY
+ db 60, SKY_ATTACK
+ db 0
+
+ArticunoEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 51, BLIZZARD
+ db 55, AGILITY
+ db 60, MIST
+ db 0
+
+ZapdosEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 51, THUNDER
+ db 55, AGILITY
+ db 60, LIGHT_SCREEN
+ db 0
+
+DittoEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MeowthEvosMoves:
+; Evolutions
+ db EV_LEVEL, 28, PERSIAN
+ db 0
+; Learnset
+ db 12, BITE
+ db 17, PAY_DAY
+ db 24, SCREECH
+ db 33, FURY_SWIPES
+ db 44, SLASH
+ db 0
+
+KrabbyEvosMoves:
+; Evolutions
+ db EV_LEVEL, 28, KINGLER
+ db 0
+; Learnset
+ db 20, VICEGRIP
+ db 25, GUILLOTINE
+ db 30, STOMP
+ db 35, CRABHAMMER
+ db 40, HARDEN
+ db 0
+
+MissingNo4FEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNo50EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNo51EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+VulpixEvosMoves:
+; Evolutions
+ db EV_ITEM, FIRE_STONE, 1, NINETALES
+ db 0
+; Learnset
+ db 16, QUICK_ATTACK
+ db 21, ROAR
+ db 28, CONFUSE_RAY
+ db 35, FLAMETHROWER
+ db 42, FIRE_SPIN
+ db 0
+
+NinetalesEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+PikachuEvosMoves:
+; Evolutions
+ db EV_ITEM, THUNDER_STONE, 1, RAICHU
+ db 0
+; Learnset
+ db 6, TAIL_WHIP
+ db 8, THUNDER_WAVE
+ db 11, QUICK_ATTACK
+ db 15, DOUBLE_TEAM
+ db 20, SLAM
+ db 26, THUNDERBOLT
+ db 33, AGILITY
+ db 41, THUNDER
+ db 50, LIGHT_SCREEN
+ db 0
+
+RaichuEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNo56EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNo57EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+DratiniEvosMoves:
+; Evolutions
+ db EV_LEVEL, 30, DRAGONAIR
+ db 0
+; Learnset
+ db 10, THUNDER_WAVE
+ db 20, AGILITY
+ db 30, SLAM
+ db 40, DRAGON_RAGE
+ db 50, HYPER_BEAM
+ db 0
+
+DragonairEvosMoves:
+; Evolutions
+ db EV_LEVEL, 55, DRAGONITE
+ db 0
+; Learnset
+ db 10, THUNDER_WAVE
+ db 20, AGILITY
+ db 35, SLAM
+ db 45, DRAGON_RAGE
+ db 55, HYPER_BEAM
+ db 0
+
+KabutoEvosMoves:
+; Evolutions
+ db EV_LEVEL, 40, KABUTOPS
+ db 0
+; Learnset
+ db 34, ABSORB
+ db 39, SLASH
+ db 44, LEER
+ db 49, HYDRO_PUMP
+ db 0
+
+KabutopsEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 34, ABSORB
+ db 39, SLASH
+ db 46, LEER
+ db 53, HYDRO_PUMP
+ db 0
+
+HorseaEvosMoves:
+; Evolutions
+ db EV_LEVEL, 32, SEADRA
+ db 0
+; Learnset
+ db 19, SMOKESCREEN
+ db 24, LEER
+ db 30, WATER_GUN
+ db 37, AGILITY
+ db 45, HYDRO_PUMP
+ db 0
+
+SeadraEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 19, SMOKESCREEN
+ db 24, LEER
+ db 30, WATER_GUN
+ db 41, AGILITY
+ db 52, HYDRO_PUMP
+ db 0
+
+MissingNo5EEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNo5FEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+SandshrewEvosMoves:
+; Evolutions
+ db EV_LEVEL, 22, SANDSLASH
+ db 0
+; Learnset
+ db 10, SAND_ATTACK
+ db 17, SLASH
+ db 24, POISON_STING
+ db 31, SWIFT
+ db 38, FURY_SWIPES
+ db 0
+
+SandslashEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 10, SAND_ATTACK
+ db 17, SLASH
+ db 27, POISON_STING
+ db 36, SWIFT
+ db 47, FURY_SWIPES
+ db 0
+
+OmanyteEvosMoves:
+; Evolutions
+ db EV_LEVEL, 40, OMASTAR
+ db 0
+; Learnset
+ db 34, HORN_ATTACK
+ db 39, LEER
+ db 46, SPIKE_CANNON
+ db 53, HYDRO_PUMP
+ db 0
+
+OmastarEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 34, HORN_ATTACK
+ db 39, LEER
+ db 44, SPIKE_CANNON
+ db 49, HYDRO_PUMP
+ db 0
+
+JigglypuffEvosMoves:
+; Evolutions
+ db EV_ITEM, MOON_STONE, 1, WIGGLYTUFF
+ db 0
+; Learnset
+ db 9, POUND
+ db 14, DISABLE
+ db 19, DEFENSE_CURL
+ db 24, DOUBLESLAP
+ db 29, REST
+ db 34, BODY_SLAM
+ db 39, DOUBLE_EDGE
+ db 0
+
+WigglytuffEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+EeveeEvosMoves:
+; Evolutions
+ db EV_ITEM, FIRE_STONE, 1, FLAREON
+ db EV_ITEM, THUNDER_STONE, 1, JOLTEON
+ db EV_ITEM, WATER_STONE, 1, VAPOREON
+ db 0
+; Learnset
+ db 8, SAND_ATTACK
+ db 16, GROWL
+ db 23, QUICK_ATTACK
+ db 30, BITE
+ db 36, FOCUS_ENERGY
+ db 42, TAKE_DOWN
+ db 0
+
+FlareonEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 8, SAND_ATTACK
+ db 16, EMBER
+ db 23, QUICK_ATTACK
+ db 30, BITE
+ db 36, FIRE_SPIN
+ db 42, SMOG
+ db 47, LEER
+ db 52, FLAMETHROWER
+ db 0
+
+JolteonEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 8, SAND_ATTACK
+ db 16, THUNDERSHOCK
+ db 23, QUICK_ATTACK
+ db 30, DOUBLE_KICK
+ db 36, PIN_MISSILE
+ db 42, THUNDER_WAVE
+ db 47, AGILITY
+ db 52, THUNDER
+ db 0
+
+VaporeonEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 8, SAND_ATTACK
+ db 16, WATER_GUN
+ db 23, QUICK_ATTACK
+ db 30, BITE
+ db 36, AURORA_BEAM
+ db 42, HAZE
+ db 42, MIST
+ db 47, ACID_ARMOR
+ db 52, HYDRO_PUMP
+ db 0
+
+MachopEvosMoves:
+; Evolutions
+ db EV_LEVEL, 28, MACHOKE
+ db 0
+; Learnset
+ db 20, LOW_KICK
+ db 25, LEER
+ db 32, FOCUS_ENERGY
+ db 39, SEISMIC_TOSS
+ db 46, SUBMISSION
+ db 0
+
+ZubatEvosMoves:
+; Evolutions
+ db EV_LEVEL, 22, GOLBAT
+ db 0
+; Learnset
+ db 10, SUPERSONIC
+ db 15, BITE
+ db 21, CONFUSE_RAY
+ db 28, WING_ATTACK
+ db 36, HAZE
+ db 0
+
+EkansEvosMoves:
+; Evolutions
+ db EV_LEVEL, 22, ARBOK
+ db 0
+; Learnset
+ db 10, POISON_STING
+ db 17, BITE
+ db 24, GLARE
+ db 31, SCREECH
+ db 38, ACID
+ db 0
+
+ParasEvosMoves:
+; Evolutions
+ db EV_LEVEL, 24, PARASECT
+ db 0
+; Learnset
+ db 13, STUN_SPORE
+ db 20, LEECH_LIFE
+ db 27, SPORE
+ db 34, SLASH
+ db 41, GROWTH
+ db 0
+
+PoliwhirlEvosMoves:
+; Evolutions
+ db EV_ITEM, WATER_STONE, 1, POLIWRATH
+ db 0
+; Learnset
+ db 16, HYPNOSIS
+ db 19, WATER_GUN
+ db 26, DOUBLESLAP
+ db 33, BODY_SLAM
+ db 41, AMNESIA
+ db 49, HYDRO_PUMP
+ db 0
+
+PoliwrathEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 16, HYPNOSIS
+ db 19, WATER_GUN
+ db 0
+
+WeedleEvosMoves:
+; Evolutions
+ db EV_LEVEL, 7, KAKUNA
+ db 0
+; Learnset
+ db 0
+
+KakunaEvosMoves:
+; Evolutions
+ db EV_LEVEL, 10, BEEDRILL
+ db 0
+; Learnset
+ db 0
+
+BeedrillEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 12, FURY_ATTACK
+ db 16, FOCUS_ENERGY
+ db 20, TWINEEDLE
+ db 25, RAGE
+ db 30, PIN_MISSILE
+ db 35, AGILITY
+ db 0
+
+MissingNo73EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+DodrioEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 20, GROWL
+ db 24, FURY_ATTACK
+ db 30, DRILL_PECK
+ db 39, RAGE
+ db 45, TRI_ATTACK
+ db 51, AGILITY
+ db 0
+
+PrimeapeEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 9, LOW_KICK
+ db 15, KARATE_CHOP
+ db 21, FURY_SWIPES
+ db 27, FOCUS_ENERGY
+ db 28, RAGE
+ db 37, SEISMIC_TOSS
+ db 46, THRASH
+ db 45, SCREECH
+ db 0
+
+DugtrioEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 15, GROWL
+ db 19, DIG
+ db 24, SAND_ATTACK
+ db 35, SLASH
+ db 47, EARTHQUAKE
+ db 0
+
+VenomothEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 22, POISONPOWDER
+ db 27, LEECH_LIFE
+ db 30, STUN_SPORE
+ db 38, PSYBEAM
+ db 43, SLEEP_POWDER
+ db 50, PSYCHIC_M
+ db 0
+
+DewgongEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 30, GROWL
+ db 35, AURORA_BEAM
+ db 44, REST
+ db 50, TAKE_DOWN
+ db 56, ICE_BEAM
+ db 0
+
+MissingNo79EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNo7AEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+CaterpieEvosMoves:
+; Evolutions
+ db EV_LEVEL, 7, METAPOD
+ db 0
+; Learnset
+ db 0
+
+MetapodEvosMoves:
+; Evolutions
+ db EV_LEVEL, 10, BUTTERFREE
+ db 0
+; Learnset
+ db 7, HARDEN
+ db 0
+
+ButterfreeEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 10, CONFUSION
+ db 13, POISONPOWDER
+ db 14, STUN_SPORE
+ db 15, SLEEP_POWDER
+ db 18, SUPERSONIC
+ db 23, WHIRLWIND
+ db 28, GUST
+ db 34, PSYBEAM
+ db 0
+
+MachampEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 20, LOW_KICK
+ db 25, LEER
+ db 36, FOCUS_ENERGY
+ db 44, SEISMIC_TOSS
+ db 52, SUBMISSION
+ db 0
+
+MissingNo7FEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+GolduckEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 28, TAIL_WHIP
+ db 31, DISABLE
+ db 39, CONFUSION
+ db 48, FURY_SWIPES
+ db 59, HYDRO_PUMP
+ db 0
+
+HypnoEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 12, DISABLE
+ db 17, CONFUSION
+ db 24, HEADBUTT
+ db 33, POISON_GAS
+ db 37, PSYCHIC_M
+ db 43, MEDITATE
+ db 0
+
+GolbatEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 10, SUPERSONIC
+ db 15, BITE
+ db 21, CONFUSE_RAY
+ db 32, WING_ATTACK
+ db 43, HAZE
+ db 0
+
+MewtwoEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 63, BARRIER
+ db 66, PSYCHIC_M
+ db 70, RECOVER
+ db 75, MIST
+ db 81, AMNESIA
+ db 0
+
+SnorlaxEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 35, BODY_SLAM
+ db 41, HARDEN
+ db 48, DOUBLE_EDGE
+ db 56, HYPER_BEAM
+ db 0
+
+MagikarpEvosMoves:
+; Evolutions
+ db EV_LEVEL, 20, GYARADOS
+ db 0
+; Learnset
+ db 15, TACKLE
+ db 0
+
+MissingNo86EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNo87EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MukEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 30, POISON_GAS
+ db 33, MINIMIZE
+ db 37, SLUDGE
+ db 45, HARDEN
+ db 53, SCREECH
+ db 60, ACID_ARMOR
+ db 0
+
+MissingNo8AEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+KinglerEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 20, VICEGRIP
+ db 25, GUILLOTINE
+ db 34, STOMP
+ db 42, CRABHAMMER
+ db 49, HARDEN
+ db 0
+
+CloysterEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 50, SPIKE_CANNON
+ db 0
+
+MissingNo8CEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+ElectrodeEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 17, SONICBOOM
+ db 22, SELFDESTRUCT
+ db 29, LIGHT_SCREEN
+ db 40, SWIFT
+ db 50, EXPLOSION
+ db 0
+
+ClefableEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+WeezingEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 32, SLUDGE
+ db 39, SMOKESCREEN
+ db 43, SELFDESTRUCT
+ db 49, HAZE
+ db 53, EXPLOSION
+ db 0
+
+PersianEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 12, BITE
+ db 17, PAY_DAY
+ db 24, SCREECH
+ db 37, FURY_SWIPES
+ db 51, SLASH
+ db 0
+
+MarowakEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 10, BONE_CLUB
+ db 13, TAIL_WHIP
+ db 18, HEADBUTT
+ db 25, LEER
+ db 33, FOCUS_ENERGY
+ db 41, THRASH
+ db 48, BONEMERANG
+ db 55, RAGE
+ db 0
+
+MissingNo92EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+HaunterEvosMoves:
+; Evolutions
+ db EV_TRADE, 1, GENGAR
+ db 0
+; Learnset
+ db 29, HYPNOSIS
+ db 38, DREAM_EATER
+ db 0
+
+AbraEvosMoves:
+; Evolutions
+ db EV_LEVEL, 16, KADABRA
+ db 0
+; Learnset
+ db 0
+
+AlakazamEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 16, CONFUSION
+ db 20, DISABLE
+ db 27, PSYBEAM
+ db 31, RECOVER
+ db 38, PSYCHIC_M
+ db 42, REFLECT
+ db 0
+
+PidgeottoEvosMoves:
+; Evolutions
+ db EV_LEVEL, 36, PIDGEOT
+ db 0
+; Learnset
+ db 5, SAND_ATTACK
+ db 12, QUICK_ATTACK
+ db 21, WHIRLWIND
+ db 31, WING_ATTACK
+ db 40, AGILITY
+ db 49, MIRROR_MOVE
+ db 0
+
+PidgeotEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 5, SAND_ATTACK
+ db 12, QUICK_ATTACK
+ db 21, WHIRLWIND
+ db 31, WING_ATTACK
+ db 44, AGILITY
+ db 54, MIRROR_MOVE
+ db 0
+
+StarmieEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+BulbasaurEvosMoves:
+; Evolutions
+ db EV_LEVEL, 16, IVYSAUR
+ db 0
+; Learnset
+ db 7, LEECH_SEED
+ db 13, VINE_WHIP
+ db 20, POISONPOWDER
+ db 27, RAZOR_LEAF
+ db 34, GROWTH
+ db 41, SLEEP_POWDER
+ db 48, SOLARBEAM
+ db 0
+
+VenusaurEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 7, LEECH_SEED
+ db 13, VINE_WHIP
+ db 22, POISONPOWDER
+ db 30, RAZOR_LEAF
+ db 43, GROWTH
+ db 55, SLEEP_POWDER
+ db 65, SOLARBEAM
+ db 0
+
+TentacruelEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 7, SUPERSONIC
+ db 13, WRAP
+ db 18, POISON_STING
+ db 22, WATER_GUN
+ db 27, CONSTRICT
+ db 35, BARRIER
+ db 43, SCREECH
+ db 50, HYDRO_PUMP
+ db 0
+
+MissingNo9CEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+GoldeenEvosMoves:
+; Evolutions
+ db EV_LEVEL, 33, SEAKING
+ db 0
+; Learnset
+ db 19, SUPERSONIC
+ db 24, HORN_ATTACK
+ db 30, FURY_ATTACK
+ db 37, WATERFALL
+ db 45, HORN_DRILL
+ db 54, AGILITY
+ db 0
+
+SeakingEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 19, SUPERSONIC
+ db 24, HORN_ATTACK
+ db 30, FURY_ATTACK
+ db 39, WATERFALL
+ db 48, HORN_DRILL
+ db 54, AGILITY
+ db 0
+
+MissingNo9FEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNoA0EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNoA1EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNoA2EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+PonytaEvosMoves:
+; Evolutions
+ db EV_LEVEL, 40, RAPIDASH
+ db 0
+; Learnset
+ db 30, TAIL_WHIP
+ db 32, STOMP
+ db 35, GROWL
+ db 39, FIRE_SPIN
+ db 43, TAKE_DOWN
+ db 48, AGILITY
+ db 0
+
+RapidashEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 30, TAIL_WHIP
+ db 32, STOMP
+ db 35, GROWL
+ db 39, FIRE_SPIN
+ db 47, TAKE_DOWN
+ db 55, AGILITY
+ db 0
+
+RattataEvosMoves:
+; Evolutions
+ db EV_LEVEL, 20, RATICATE
+ db 0
+; Learnset
+ db 7, QUICK_ATTACK
+ db 14, HYPER_FANG
+ db 23, FOCUS_ENERGY
+ db 34, SUPER_FANG
+ db 0
+
+RaticateEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 7, QUICK_ATTACK
+ db 14, HYPER_FANG
+ db 27, FOCUS_ENERGY
+ db 41, SUPER_FANG
+ db 0
+
+NidorinoEvosMoves:
+; Evolutions
+ db EV_ITEM, MOON_STONE, 1, NIDOKING
+ db 0
+; Learnset
+ db 8, HORN_ATTACK
+ db 12, DOUBLE_KICK
+ db 19, POISON_STING
+ db 27, FOCUS_ENERGY
+ db 36, FURY_ATTACK
+ db 46, HORN_DRILL
+ db 0
+
+NidorinaEvosMoves:
+; Evolutions
+ db EV_ITEM, MOON_STONE, 1, NIDOQUEEN
+ db 0
+; Learnset
+ db 8, SCRATCH
+ db 12, DOUBLE_KICK
+ db 19, POISON_STING
+ db 27, TAIL_WHIP
+ db 36, BITE
+ db 46, FURY_SWIPES
+ db 0
+
+GeodudeEvosMoves:
+; Evolutions
+ db EV_LEVEL, 25, GRAVELER
+ db 0
+; Learnset
+ db 11, DEFENSE_CURL
+ db 16, ROCK_THROW
+ db 21, SELFDESTRUCT
+ db 26, HARDEN
+ db 31, EARTHQUAKE
+ db 36, EXPLOSION
+ db 0
+
+PorygonEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 23, PSYBEAM
+ db 28, RECOVER
+ db 35, AGILITY
+ db 42, TRI_ATTACK
+ db 0
+
+AerodactylEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 33, SUPERSONIC
+ db 38, BITE
+ db 45, TAKE_DOWN
+ db 54, HYPER_BEAM
+ db 0
+
+MissingNoACEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MagnemiteEvosMoves:
+; Evolutions
+ db EV_LEVEL, 30, MAGNETON
+ db 0
+; Learnset
+ db 21, SONICBOOM
+ db 25, THUNDERSHOCK
+ db 29, SUPERSONIC
+ db 35, THUNDER_WAVE
+ db 41, SWIFT
+ db 47, SCREECH
+ db 0
+
+MissingNoAEEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MissingNoAFEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+CharmanderEvosMoves:
+; Evolutions
+ db EV_LEVEL, 16, CHARMELEON
+ db 0
+; Learnset
+ db 9, EMBER
+ db 15, LEER
+ db 22, RAGE
+ db 30, SLASH
+ db 38, FLAMETHROWER
+ db 46, FIRE_SPIN
+ db 0
+
+SquirtleEvosMoves:
+; Evolutions
+ db EV_LEVEL, 16, WARTORTLE
+ db 0
+; Learnset
+ db 8, BUBBLE
+ db 15, WATER_GUN
+ db 22, BITE
+ db 28, WITHDRAW
+ db 35, SKULL_BASH
+ db 42, HYDRO_PUMP
+ db 0
+
+CharmeleonEvosMoves:
+; Evolutions
+ db EV_LEVEL, 36, CHARIZARD
+ db 0
+; Learnset
+ db 9, EMBER
+ db 15, LEER
+ db 24, RAGE
+ db 33, SLASH
+ db 42, FLAMETHROWER
+ db 56, FIRE_SPIN
+ db 0
+
+WartortleEvosMoves:
+; Evolutions
+ db EV_LEVEL, 36, BLASTOISE
+ db 0
+; Learnset
+ db 8, BUBBLE
+ db 15, WATER_GUN
+ db 24, BITE
+ db 31, WITHDRAW
+ db 39, SKULL_BASH
+ db 47, HYDRO_PUMP
+ db 0
+
+CharizardEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 9, EMBER
+ db 15, LEER
+ db 24, RAGE
+ db 36, SLASH
+ db 46, FLAMETHROWER
+ db 55, FIRE_SPIN
+ db 0
+
+MissingNoB5EvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+FossilKabutopsEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+FossilAerodactylEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+MonGhostEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 0
+
+OddishEvosMoves:
+; Evolutions
+ db EV_LEVEL, 21, GLOOM
+ db 0
+; Learnset
+ db 15, POISONPOWDER
+ db 17, STUN_SPORE
+ db 19, SLEEP_POWDER
+ db 24, ACID
+ db 33, PETAL_DANCE
+ db 46, SOLARBEAM
+ db 0
+
+GloomEvosMoves:
+; Evolutions
+ db EV_ITEM, LEAF_STONE, 1, VILEPLUME
+ db 0
+; Learnset
+ db 15, POISONPOWDER
+ db 17, STUN_SPORE
+ db 19, SLEEP_POWDER
+ db 28, ACID
+ db 38, PETAL_DANCE
+ db 52, SOLARBEAM
+ db 0
+
+VileplumeEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 15, POISONPOWDER
+ db 17, STUN_SPORE
+ db 19, SLEEP_POWDER
+ db 0
+
+BellsproutEvosMoves:
+; Evolutions
+ db EV_LEVEL, 21, WEEPINBELL
+ db 0
+; Learnset
+ db 13, WRAP
+ db 15, POISONPOWDER
+ db 18, SLEEP_POWDER
+ db 21, STUN_SPORE
+ db 26, ACID
+ db 33, RAZOR_LEAF
+ db 42, SLAM
+ db 0
+
+WeepinbellEvosMoves:
+; Evolutions
+ db EV_ITEM, LEAF_STONE, 1, VICTREEBEL
+ db 0
+; Learnset
+ db 13, WRAP
+ db 15, POISONPOWDER
+ db 18, SLEEP_POWDER
+ db 23, STUN_SPORE
+ db 29, ACID
+ db 38, RAZOR_LEAF
+ db 49, SLAM
+ db 0
+
+VictreebelEvosMoves:
+; Evolutions
+ db 0
+; Learnset
+ db 13, WRAP
+ db 15, POISONPOWDER
+ db 18, SLEEP_POWDER
+ db 0
diff --git a/data/pokemon/menu_icons.asm b/data/pokemon/menu_icons.asm
new file mode 100755
index 00000000..0fbc9260
--- /dev/null
+++ b/data/pokemon/menu_icons.asm
@@ -0,0 +1,77 @@
+MonPartyData:
+ dn ICON_GRASS, ICON_GRASS ; Bulbasaur / Ivysaur
+ dn ICON_GRASS, ICON_MON ; Venusaur / Charmander
+ dn ICON_MON, ICON_MON ; Charmeleon / Charizard
+ dn ICON_WATER, ICON_WATER ; Squirtle / Wartortle
+ dn ICON_WATER, ICON_BUG ; Blastoise / Caterpie
+ dn ICON_BUG, ICON_BUG ; Metapod / Butterfree
+ dn ICON_BUG, ICON_BUG ; Weedle / Kakuna
+ dn ICON_BUG, ICON_BIRD ; Beedrill / Pidgey
+ dn ICON_BIRD, ICON_BIRD ; Pidgeotto / Pidgeot
+ dn ICON_QUADRUPED, ICON_QUADRUPED ; Rattata / Raticate
+ dn ICON_BIRD, ICON_BIRD ; Spearow / Fearow
+ dn ICON_SNAKE, ICON_SNAKE ; Ekans / Arbok
+ dn ICON_PIKACHU, ICON_PIKACHU ; Pikachu / Raichu
+ dn ICON_MON, ICON_MON ; Sandshrew / Sandslash
+ dn ICON_MON, ICON_MON ; NidoranF / Nidorina
+ dn ICON_MON, ICON_MON ; Nidoqueen / NidoranM
+ dn ICON_MON, ICON_MON ; Nidorino / Nidoking
+ dn ICON_FAIRY, ICON_FAIRY ; Clefairy / Clefable
+ dn ICON_QUADRUPED, ICON_QUADRUPED ; Vulpix / Ninetales
+ dn ICON_FAIRY, ICON_FAIRY ; Jigglypuff / Wigglytuff
+ dn ICON_MON, ICON_MON ; Zubat / Golbat
+ dn ICON_GRASS, ICON_GRASS ; Oddish / Gloom
+ dn ICON_GRASS, ICON_BUG ; Vileplume / Paras
+ dn ICON_BUG, ICON_BUG ; Parasect / Venonat
+ dn ICON_BUG, ICON_MON ; Venomoth / Diglett
+ dn ICON_MON, ICON_MON ; Dugtrio / Meowth
+ dn ICON_MON, ICON_MON ; Persian / Psyduck
+ dn ICON_MON, ICON_MON ; Golduck / Mankey
+ dn ICON_MON, ICON_QUADRUPED ; Primeape / Growlithe
+ dn ICON_QUADRUPED, ICON_MON ; Arcanine / Poliwag
+ dn ICON_MON, ICON_MON ; Poliwhirl / Poliwrath
+ dn ICON_MON, ICON_MON ; Abra / Kadabra
+ dn ICON_MON, ICON_MON ; Alakazam / Machop
+ dn ICON_MON, ICON_MON ; Machoke / Machamp
+ dn ICON_GRASS, ICON_GRASS ; Bellsprout / Weepinbell
+ dn ICON_GRASS, ICON_WATER ; Victreebel / Tentacool
+ dn ICON_WATER, ICON_MON ; Tentacruel / Geodude
+ dn ICON_MON, ICON_MON ; Graveler / Golem
+ dn ICON_QUADRUPED, ICON_QUADRUPED ; Ponyta / Rapidash
+ dn ICON_QUADRUPED, ICON_MON ; Slowpoke / Slowbro
+ dn ICON_BALL, ICON_BALL ; Magnemite / Magneton
+ dn ICON_BIRD, ICON_BIRD ; Farfetch'd / Doduo
+ dn ICON_BIRD, ICON_WATER ; Dodrio / Seel
+ dn ICON_WATER, ICON_MON ; Dewgong / Grimer
+ dn ICON_MON, ICON_HELIX ; Muk / Shellder
+ dn ICON_HELIX, ICON_MON ; Cloyster / Gastly
+ dn ICON_MON, ICON_MON ; Haunter / Gengar
+ dn ICON_SNAKE, ICON_MON ; Onix / Drowzee
+ dn ICON_MON, ICON_WATER ; Hypno / Krabby
+ dn ICON_WATER, ICON_BALL ; Kingler / Voltorb
+ dn ICON_BALL, ICON_GRASS ; Electrode / Exeggcute
+ dn ICON_GRASS, ICON_MON ; Exeggutor / Cubone
+ dn ICON_MON, ICON_MON ; Marowak / Hitmonlee
+ dn ICON_MON, ICON_MON ; Hitmonchan / Lickitung
+ dn ICON_MON, ICON_MON ; Koffing / Weezing
+ dn ICON_QUADRUPED, ICON_MON ; Rhyhorn / Rhydon
+ dn ICON_FAIRY, ICON_GRASS ; Chansey / Tangela
+ dn ICON_MON, ICON_WATER ; Kangaskhan / Horsea
+ dn ICON_WATER, ICON_WATER ; Seadra / Goldeen
+ dn ICON_WATER, ICON_HELIX ; Seaking / Staryu
+ dn ICON_HELIX, ICON_MON ; Starmie / Mr.Mime
+ dn ICON_BUG, ICON_MON ; Scyther / Jynx
+ dn ICON_MON, ICON_MON ; Electabuzz / Magmar
+ dn ICON_BUG, ICON_QUADRUPED ; Pinsir / Tauros
+ dn ICON_WATER, ICON_SNAKE ; Magikarp / Gyarados
+ dn ICON_WATER, ICON_MON ; Lapras / Ditto
+ dn ICON_QUADRUPED, ICON_QUADRUPED ; Eevee / Vaporeon
+ dn ICON_QUADRUPED, ICON_QUADRUPED ; Jolteon / Flareon
+ dn ICON_MON, ICON_HELIX ; Porygon / Omanyte
+ dn ICON_HELIX, ICON_HELIX ; Omastar / Kabuto
+ dn ICON_HELIX, ICON_BIRD ; Kabutops / Aerodactyl
+ dn ICON_MON, ICON_BIRD ; Snorlax / Articuno
+ dn ICON_BIRD, ICON_BIRD ; Zapdos / Moltres
+ dn ICON_SNAKE, ICON_SNAKE ; Dratini / Dragonair
+ dn ICON_SNAKE, ICON_MON ; Dragonite / Mewtwo
+ dn ICON_MON, 0 ; Mew / padding
diff --git a/data/pokemon/names.asm b/data/pokemon/names.asm
new file mode 100755
index 00000000..83a45b77
--- /dev/null
+++ b/data/pokemon/names.asm
@@ -0,0 +1,191 @@
+MonsterNames::
+ db "RHYDON@@@@"
+ db "KANGASKHAN"
+ db "NIDORAN♂@@"
+ db "CLEFAIRY@@"
+ db "SPEAROW@@@"
+ db "VOLTORB@@@"
+ db "NIDOKING@@"
+ db "SLOWBRO@@@"
+ db "IVYSAUR@@@"
+ db "EXEGGUTOR@"
+ db "LICKITUNG@"
+ db "EXEGGCUTE@"
+ db "GRIMER@@@@"
+ db "GENGAR@@@@"
+ db "NIDORAN♀@@"
+ db "NIDOQUEEN@"
+ db "CUBONE@@@@"
+ db "RHYHORN@@@"
+ db "LAPRAS@@@@"
+ db "ARCANINE@@"
+ db "MEW@@@@@@@"
+ db "GYARADOS@@"
+ db "SHELLDER@@"
+ db "TENTACOOL@"
+ db "GASTLY@@@@"
+ db "SCYTHER@@@"
+ db "STARYU@@@@"
+ db "BLASTOISE@"
+ db "PINSIR@@@@"
+ db "TANGELA@@@"
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "GROWLITHE@"
+ db "ONIX@@@@@@"
+ db "FEAROW@@@@"
+ db "PIDGEY@@@@"
+ db "SLOWPOKE@@"
+ db "KADABRA@@@"
+ db "GRAVELER@@"
+ db "CHANSEY@@@"
+ db "MACHOKE@@@"
+ db "MR.MIME@@@"
+ db "HITMONLEE@"
+ db "HITMONCHAN"
+ db "ARBOK@@@@@"
+ db "PARASECT@@"
+ db "PSYDUCK@@@"
+ db "DROWZEE@@@"
+ db "GOLEM@@@@@"
+ db "MISSINGNO."
+ db "MAGMAR@@@@"
+ db "MISSINGNO."
+ db "ELECTABUZZ"
+ db "MAGNETON@@"
+ db "KOFFING@@@"
+ db "MISSINGNO."
+ db "MANKEY@@@@"
+ db "SEEL@@@@@@"
+ db "DIGLETT@@@"
+ db "TAUROS@@@@"
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "FARFETCH'D"
+ db "VENONAT@@@"
+ db "DRAGONITE@"
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "DODUO@@@@@"
+ db "POLIWAG@@@"
+ db "JYNX@@@@@@"
+ db "MOLTRES@@@"
+ db "ARTICUNO@@"
+ db "ZAPDOS@@@@"
+ db "DITTO@@@@@"
+ db "MEOWTH@@@@"
+ db "KRABBY@@@@"
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "VULPIX@@@@"
+ db "NINETALES@"
+ db "PIKACHU@@@"
+ db "RAICHU@@@@"
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "DRATINI@@@"
+ db "DRAGONAIR@"
+ db "KABUTO@@@@"
+ db "KABUTOPS@@"
+ db "HORSEA@@@@"
+ db "SEADRA@@@@"
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "SANDSHREW@"
+ db "SANDSLASH@"
+ db "OMANYTE@@@"
+ db "OMASTAR@@@"
+ db "JIGGLYPUFF"
+ db "WIGGLYTUFF"
+ db "EEVEE@@@@@"
+ db "FLAREON@@@"
+ db "JOLTEON@@@"
+ db "VAPOREON@@"
+ db "MACHOP@@@@"
+ db "ZUBAT@@@@@"
+ db "EKANS@@@@@"
+ db "PARAS@@@@@"
+ db "POLIWHIRL@"
+ db "POLIWRATH@"
+ db "WEEDLE@@@@"
+ db "KAKUNA@@@@"
+ db "BEEDRILL@@"
+ db "MISSINGNO."
+ db "DODRIO@@@@"
+ db "PRIMEAPE@@"
+ db "DUGTRIO@@@"
+ db "VENOMOTH@@"
+ db "DEWGONG@@@"
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "CATERPIE@@"
+ db "METAPOD@@@"
+ db "BUTTERFREE"
+ db "MACHAMP@@@"
+ db "MISSINGNO."
+ db "GOLDUCK@@@"
+ db "HYPNO@@@@@"
+ db "GOLBAT@@@@"
+ db "MEWTWO@@@@"
+ db "SNORLAX@@@"
+ db "MAGIKARP@@"
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "MUK@@@@@@@"
+ db "MISSINGNO."
+ db "KINGLER@@@"
+ db "CLOYSTER@@"
+ db "MISSINGNO."
+ db "ELECTRODE@"
+ db "CLEFABLE@@"
+ db "WEEZING@@@"
+ db "PERSIAN@@@"
+ db "MAROWAK@@@"
+ db "MISSINGNO."
+ db "HAUNTER@@@"
+ db "ABRA@@@@@@"
+ db "ALAKAZAM@@"
+ db "PIDGEOTTO@"
+ db "PIDGEOT@@@"
+ db "STARMIE@@@"
+ db "BULBASAUR@"
+ db "VENUSAUR@@"
+ db "TENTACRUEL"
+ db "MISSINGNO."
+ db "GOLDEEN@@@"
+ db "SEAKING@@@"
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "PONYTA@@@@"
+ db "RAPIDASH@@"
+ db "RATTATA@@@"
+ db "RATICATE@@"
+ db "NIDORINO@@"
+ db "NIDORINA@@"
+ db "GEODUDE@@@"
+ db "PORYGON@@@"
+ db "AERODACTYL"
+ db "MISSINGNO."
+ db "MAGNEMITE@"
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "CHARMANDER"
+ db "SQUIRTLE@@"
+ db "CHARMELEON"
+ db "WARTORTLE@"
+ db "CHARIZARD@"
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "MISSINGNO."
+ db "ODDISH@@@@"
+ db "GLOOM@@@@@"
+ db "VILEPLUME@"
+ db "BELLSPROUT"
+ db "WEEPINBELL"
+ db "VICTREEBEL"
diff --git a/data/mon_palettes.asm b/data/pokemon/palettes.asm
index 8c4d0bc0..8c4d0bc0 100755
--- a/data/mon_palettes.asm
+++ b/data/pokemon/palettes.asm
diff --git a/data/predef_pointers.asm b/data/predef_pointers.asm
new file mode 100644
index 00000000..b8911f3c
--- /dev/null
+++ b/data/predef_pointers.asm
@@ -0,0 +1,111 @@
+add_predef: MACRO
+\1Predef::
+IF _NARG == 1
+ dba \1
+ELSE
+ dbw \2, \1
+ENDC
+ENDM
+
+PredefPointers::
+; these are pointers to ASM routines.
+; they appear to be used in overworld map scripts.
+ add_predef DrawPlayerHUDAndHPBar
+ add_predef CopyUncompressedPicToTilemap
+ add_predef AnimateSendingOutMon
+ add_predef ScaleSpriteByTwo
+ add_predef LoadMonBackPic
+ add_predef CopyDownscaledMonTiles
+ add_predef JumpMoveEffect, $03 ; wrong bank
+ add_predef HealParty
+ add_predef MoveAnimation
+ add_predef DivideBCDPredef
+ add_predef DivideBCDPredef2
+ add_predef AddBCDPredef
+ add_predef SubBCDPredef
+ add_predef DivideBCDPredef3
+ add_predef DivideBCDPredef4
+ add_predef InitPlayerData
+ add_predef FlagActionPredef
+ add_predef HideObject
+ add_predef IsObjectHidden
+ add_predef ApplyOutOfBattlePoisonDamage
+ add_predef AnyPartyAlive
+ add_predef ShowObject
+ add_predef ShowObject2
+ add_predef ReplaceTileBlock
+ add_predef InitPlayerData2
+ add_predef LoadTilesetHeader
+ add_predef LearnMoveFromLevelUp
+ add_predef LearnMove
+ add_predef GetQuantityOfItemInBag
+ add_predef CheckForHiddenObjectOrBookshelfOrCardKeyDoor, $03 ; home bank
+ add_predef GiveItem, $03 ; home bank
+ add_predef ChangeBGPalColor0_4Frames
+ add_predef FindPathToPlayer
+ add_predef PredefShakeScreenVertically
+ add_predef CalcPositionOfPlayerRelativeToNPC
+ add_predef ConvertNPCMovementDirectionsToJoypadMasks
+ add_predef PredefShakeScreenHorizontally
+ add_predef UpdateHPBar
+ add_predef HPBarLength
+ add_predef Diploma_TextBoxBorder
+ add_predef DoubleOrHalveSelectedStats
+ add_predef ShowPokedexMenu
+ add_predef EvolutionAfterBattle
+ add_predef SaveSAVtoSRAM0
+ add_predef InitOpponent
+ add_predef CableClub_Run
+ add_predef DrawBadges
+ add_predef ExternalClockTradeAnim
+ add_predef BattleTransition
+ add_predef CopyTileIDsFromList
+ add_predef PlayIntro
+ add_predef GetMoveSoundB
+ add_predef FlashScreen
+ add_predef GetTileAndCoordsInFrontOfPlayer
+ add_predef StatusScreen
+ add_predef StatusScreen2
+ add_predef InternalClockTradeAnim
+ add_predef TrainerEngage
+ add_predef IndexToPokedex
+ add_predef DisplayPicCenteredOrUpperRight
+ add_predef UsedCut
+ add_predef ShowPokedexData
+ add_predef WriteMonMoves
+ add_predef SaveSAV
+ add_predef LoadSGB
+ add_predef MarkTownVisitedAndLoadMissableObjects
+ add_predef SetPartyMonTypes
+ add_predef CanLearnTM
+ add_predef TMToMove
+ add_predef _RunPaletteCommand
+ add_predef StarterDex
+ add_predef _AddPartyMon
+ add_predef UpdateHPBar2
+ add_predef DrawEnemyHUDAndHPBar
+ add_predef LoadTownMap_Nest
+ add_predef PrintMonType
+ add_predef EmotionBubble
+ add_predef EmptyFunc ; return immediately
+ add_predef AskName
+ add_predef PewterGuys
+ add_predef SaveSAVtoSRAM2
+ add_predef LoadSAV2
+ add_predef LoadSAV
+ add_predef SaveSAVtoSRAM1
+ add_predef DoInGameTradeDialogue
+ add_predef HallOfFamePC
+ add_predef DisplayDexRating
+ add_predef _LeaveMapAnim, $1E ; wrong bank
+ add_predef EnterMapAnim, $1E ; wrong bank
+ add_predef GetTileTwoStepsInFrontOfPlayer
+ add_predef CheckForCollisionWhenPushingBoulder
+ add_predef PrintStrengthTxt
+ add_predef PickUpItem
+ add_predef PrintMoveType
+ add_predef LoadMovePPs
+ add_predef DrawHP
+ add_predef DrawHP2
+ add_predef DisplayElevatorFloorMenu
+ add_predef OaksAideScript
diff --git a/data/prize_mon_levels.asm b/data/prize_mon_levels.asm
deleted file mode 100755
index eb126d37..00000000
--- a/data/prize_mon_levels.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-PrizeMonLevelDictionary:
- db ABRA,15
- db VULPIX,18
- db WIGGLYTUFF,22
-
- db SCYTHER,30
- db PINSIR,30
- db PORYGON,26
diff --git a/data/prizes.asm b/data/prizes.asm
deleted file mode 100755
index b113c7cb..00000000
--- a/data/prizes.asm
+++ /dev/null
@@ -1,45 +0,0 @@
-PrizeDifferentMenuPtrs:
- dw PrizeMenuMon1Entries
- dw PrizeMenuMon1Cost
-
- dw PrizeMenuMon2Entries
- dw PrizeMenuMon2Cost
-
- dw PrizeMenuTMsEntries
- dw PrizeMenuTMsCost
-
-PrizeMenuMon1Entries:
- db ABRA
- db VULPIX
- db WIGGLYTUFF
- db "@"
-
-PrizeMenuMon1Cost:
- coins 230
- coins 1000
- coins 2680
- db "@"
-
-PrizeMenuMon2Entries:
- db SCYTHER
- db PINSIR
- db PORYGON
- db "@"
-
-PrizeMenuMon2Cost:
- coins 6500
- coins 6500
- coins 9999
- db "@"
-
-PrizeMenuTMsEntries:
- db TM_23
- db TM_15
- db TM_50
- db "@"
-
-PrizeMenuTMsCost:
- coins 3300
- coins 5500
- coins 7700
- db "@"
diff --git a/data/sgb/sgb_border.asm b/data/sgb/sgb_border.asm
new file mode 100755
index 00000000..9955acda
--- /dev/null
+++ b/data/sgb/sgb_border.asm
@@ -0,0 +1,87 @@
+BorderPalettes:
+ INCBIN "gfx/sgb/border.tilemap"
+
+ ds $100
+
+ RGB 24, 6, 6
+ RGB 31, 25, 9
+ RGB 25, 10, 10
+ RGB 0, 0, 0
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 18, 24, 18
+ RGB 25, 10, 10
+ RGB 15, 25, 15
+ RGB 0, 0, 0
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 18, 6, 31
+ RGB 31, 25, 9
+ RGB 15, 25, 15
+ RGB 0, 0, 0
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 12, 31, 6
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+SGBBorderGraphics:
+ INCBIN "gfx/sgb/border.2bpp"
diff --git a/data/sgb/sgb_packets.asm b/data/sgb/sgb_packets.asm
new file mode 100755
index 00000000..a0582416
--- /dev/null
+++ b/data/sgb/sgb_packets.asm
@@ -0,0 +1,244 @@
+ATTR_BLK: MACRO
+; This is a command macro.
+; Use ATTR_BLK_DATA for data sets.
+ db ($4 << 3) + ((\1 * 6) / 16 + 1)
+ db \1
+ENDM
+
+ATTR_BLK_DATA: MACRO
+ db \1 ; which regions are affected
+ db \2 + (\3 << 2) + (\4 << 4) ; palette for each region
+ db \5, \6, \7, \8 ; x1, y1, x2, y2
+ENDM
+
+PAL_SET: MACRO
+ db ($a << 3) + 1
+ dw \1, \2, \3, \4
+ ds 7, 0
+ENDM
+
+PAL_TRN: MACRO
+ db ($b << 3) + 1
+ ds 15, 0
+ENDM
+
+MLT_REQ: MACRO
+ db ($11 << 3) + 1
+ db \1 - 1
+ ds 14, 0
+ENDM
+
+CHR_TRN: MACRO
+ db ($13 << 3) + 1
+ db \1 + (\2 << 1)
+ ds 14, 0
+ENDM
+
+PCT_TRN: MACRO
+ db ($14 << 3) + 1
+ ds 15, 0
+ENDM
+
+MASK_EN: MACRO
+ db ($17 << 3) + 1
+ db \1
+ ds 14, 0
+ENDM
+
+DATA_SND: MACRO
+ db ($f << 3) + 1
+ dw \1 ; address
+ db \2 ; bank
+ db \3 ; length (1-11)
+ENDM
+
+
+BlkPacket_WholeScreen:
+ ATTR_BLK 1
+ ATTR_BLK_DATA %011, 0,0,0, 00,00, 19,17
+ ds 8, 0
+
+BlkPacket_Battle:
+ ATTR_BLK 5
+ 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
+
+BlkPacket_StatusScreen:
+ ATTR_BLK 1
+ ATTR_BLK_DATA %111, 1,1,0, 01,00, 07,06 ; mon: pal 1, HP bar: pal 0
+ ds 8, 0
+
+BlkPacket_Pokedex:
+ ATTR_BLK 1
+ ATTR_BLK_DATA %111, 1,1,0, 01,01, 08,08 ; mon: pal 1, everything else: pal 0
+ ds 8, 0
+
+BlkPacket_Slots:
+ ATTR_BLK 5
+ 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
+
+BlkPacket_Titlescreen:
+ ATTR_BLK 3
+ ATTR_BLK_DATA %011, 0,0,0, 00,00, 19,07
+ ATTR_BLK_DATA %011, 2,2,0, 00,08, 19,17
+ ATTR_BLK_DATA %010, 0,0,0, 09,08, 10,08
+ ds 12, 0
+
+BlkPacket_NidorinoIntro:
+ ATTR_BLK 3
+ 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, 0
+
+BlkPacket_PartyMenu:
+ ATTR_BLK 7
+ 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, 0
+
+BlkPacket_TrainerCard:
+ 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,13
+ ATTR_BLK_DATA %010, 3,3,0, 16,13, 17,13
+ 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
+ ds 2, 0
+
+BlkPacket_GameFreakIntro:
+ ATTR_BLK 3
+ 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, 0
+
+UnknownPacket_72751:
+ ATTR_BLK 1
+ ATTR_BLK_DATA %111, 1,1,0, 04,00, 15,05
+ ds 8
+
+
+PalPacket_Empty: PAL_SET 0, 0, 0, 0
+PalPacket_PartyMenu: PAL_SET PAL_MEWMON, PAL_GREENBAR, PAL_YELLOWBAR, PAL_REDBAR
+PalPacket_Black: PAL_SET PAL_BLACK, PAL_BLACK, PAL_BLACK, PAL_BLACK
+PalPacket_TownMap: PAL_SET PAL_TOWNMAP, 0, 0, 0
+PalPacket_Pokedex: PAL_SET PAL_BROWNMON, 0, 0, 0
+PalPacket_Slots: PAL_SET PAL_SLOTS1, PAL_SLOTS2, PAL_SLOTS3, PAL_SLOTS4
+PalPacket_Titlescreen: PAL_SET PAL_LOGO2, PAL_LOGO1, PAL_MEWMON, PAL_PURPLEMON
+PalPacket_TrainerCard: PAL_SET PAL_MEWMON, PAL_BADGE, PAL_REDMON, PAL_YELLOWMON
+PalPacket_Generic: PAL_SET PAL_MEWMON, 0, 0, 0
+PalPacket_NidorinoIntro: PAL_SET PAL_PURPLEMON, PAL_BLACK, 0, 0
+PalPacket_GameFreakIntro: PAL_SET PAL_GAMEFREAK, PAL_REDMON, PAL_VIRIDIAN, PAL_BLUEMON
+UnknownPalPacket_72811: PAL_SET PAL_25, PAL_25, PAL_25, PAL_25
+UnknownPalPacket_72821: PAL_SET PAL_25, PAL_27, PAL_25, PAL_25
+
+PalTrnPacket: PAL_TRN
+MltReq1Packet: MLT_REQ 1
+MltReq2Packet: MLT_REQ 2
+ChrTrnPacket: CHR_TRN 0, 0
+PctTrnPacket: PCT_TRN
+
+MaskEnFreezePacket: MASK_EN 1
+MaskEnCancelPacket: MASK_EN 0
+
+; These are DATA_SND packets containing SNES code.
+; This set of packets is found in several Japanese SGB-compatible titles.
+; It appears to be part of NCL's SGB devkit.
+
+DataSnd_728a1:
+ DATA_SND $85d, $0, 11
+ db $8C ; cpx #$8c (2)
+ db $D0, $F4 ; bne -$0c
+ db $60 ; rts
+ ds 7, 0
+
+DataSnd_728b1:
+ DATA_SND $852, $0, 11
+ db $A9, $E7 ; lda #$e7
+ db $9F, $01, $C0, $7E ; sta $7ec001, x
+ db $E8 ; inx
+ db $E8 ; inx
+ db $E8 ; inx
+ db $E8 ; inx
+ db $E0 ; cpx #$8c (1)
+
+DataSnd_728c1:
+ DATA_SND $847, $0, 11 ; 728c1 (1c:68c1)
+ db $C4 ; cmp #$c4 (2)
+ db $D0, $16 ; bne +$16
+ db $A5 ; lda dp
+ db $CB ; wai
+ db $C9, $05 ; cmp #$05
+ db $D0, $10 ; bne +$10
+ db $A2, $28 ; ldx #$28
+
+DataSnd_728d1:
+ DATA_SND $83c, $0, 11 ; 728d1 (1c:68d1)
+ db $F0, $12 ; beq +$12
+ db $A5 ; lda dp
+ db $C9, $C9 ; cmp #$c9
+ db $C8 ; iny
+ db $D0, $1C ; bne +$1c
+ db $A5 ; lda dp
+ db $CA ; dex
+ db $C9 ; cmp #$c4 (1)
+
+DataSnd_728e1:
+ DATA_SND $831, $0, 11
+ dbw $0C, $CAA5 ; tsb $caa5
+ db $C9, $7E ; cmp #$7e
+ db $D0, $06 ; bne +$06
+ db $A5 ; lda dp
+ db $CB ; wai
+ db $C9, $7E ; cmp #$7e
+
+DataSnd_728f1:
+ DATA_SND $826, $0, 11
+ db $39 ; bne +$39 (2)
+ dbw $CD, $C48 ; cmp $c48
+ db $D0, $34 ; bne +$34
+ db $A5 ; lda dp
+ db $C9, $C9 ; cmp #$c9
+ db $80, $D0 ; bra -$30
+
+DataSnd_72901:
+ DATA_SND $81b, $0, 11
+ db $EA ; nop
+ db $EA ; nop
+ db $EA ; nop
+ db $EA ; nop
+ db $EA ; nop
+ ; $820:
+ db $A9,$01 ; lda #01
+ dbw $CD,$C4F ; cmp $c4f
+ db $D0 ; bne +$39 (1)
+
+DataSnd_72911:
+ DATA_SND $810, $0, 11
+ dbw $4C, $820 ; jmp $820
+ db $EA ; nop
+ db $EA ; nop
+ db $EA ; nop
+ db $EA ; nop
+ db $EA ; nop
+ db $60 ; rts
+ db $EA ; nop
+ db $EA ; nop
diff --git a/data/sgb/sgb_palettes.asm b/data/sgb/sgb_palettes.asm
new file mode 100755
index 00000000..5ddca002
--- /dev/null
+++ b/data/sgb/sgb_palettes.asm
@@ -0,0 +1,84 @@
+SuperPalettes:
+; entries correspond to PAL_* constants
+ RGB 31,31,30, 23,26,19, 23,27,31, 06,06,06 ; PAL_ROUTE
+ RGB 31,31,30, 28,27,31, 23,27,31, 06,06,06 ; PAL_PALLET
+ RGB 31,31,30, 26,31,21, 23,27,31, 06,06,06 ; PAL_VIRIDIAN
+ RGB 31,31,30, 23,23,22, 23,27,31, 06,06,06 ; PAL_PEWTER
+ RGB 31,31,30, 22,23,31, 23,27,31, 06,06,06 ; PAL_CERULEAN
+ RGB 31,31,30, 27,23,29, 23,27,31, 06,06,06 ; PAL_LAVENDER
+ RGB 31,31,30, 31,25,16, 23,27,31, 06,06,06 ; PAL_VERMILION
+ RGB 31,31,30, 22,31,22, 23,27,31, 06,06,06 ; PAL_CELADON
+ RGB 31,31,30, 31,26,26, 23,27,31, 06,06,06 ; PAL_FUCHSIA
+ RGB 31,31,30, 31,15,14, 23,27,31, 06,06,06 ; PAL_CINNABAR
+ RGB 31,31,30, 17,17,25, 23,27,31, 06,06,06 ; PAL_INDIGO
+ RGB 31,31,30, 31,31,19, 23,27,31, 06,06,06 ; PAL_SAFFRON
+ RGB 31,31,30, 20,26,31, 17,23,10, 03,02,02 ; PAL_TOWNMAP
+ RGB 31,31,30, 30,30,17, 21,00,04, 21,00,04 ; PAL_LOGO1
+ RGB 31,31,30, 30,30,17, 18,18,24, 07,07,16 ; PAL_LOGO2
+ RGB 31,31,30, 24,20,30, 11,20,30, 03,02,02 ; PAL_0F
+ RGB 31,31,30, 31,30,22, 27,16,16, 06,06,06 ; PAL_MEWMON
+ RGB 31,31,30, 21,22,31, 09,10,20, 06,06,06 ; PAL_BLUEMON
+ RGB 31,31,30, 31,24,11, 26,09,06, 06,06,06 ; PAL_REDMON
+ RGB 31,31,30, 26,28,31, 07,24,28, 06,06,06 ; PAL_CYANMON
+ RGB 31,31,30, 27,22,30, 22,15,23, 06,06,06 ; PAL_PURPLEMON
+ RGB 31,31,30, 26,23,18, 18,14,10, 06,06,06 ; PAL_BROWNMON
+ RGB 31,31,30, 24,28,18, 13,21,15, 06,06,06 ; PAL_GREENMON
+ RGB 31,31,30, 31,24,26, 31,18,21, 06,06,06 ; PAL_PINKMON
+ RGB 31,31,30, 31,31,19, 28,23,09, 06,06,06 ; PAL_YELLOWMON
+ RGB 31,31,30, 25,25,18, 16,16,14, 06,06,06 ; PAL_GREYMON
+ RGB 31,31,30, 27,22,30, 26,09,06, 06,06,06 ; PAL_SLOTS1
+ RGB 31,31,30, 31,23,26, 29,29,08, 06,06,06 ; PAL_SLOTS2
+ RGB 31,31,30, 23,31,20, 29,29,08, 06,06,06 ; PAL_SLOTS3
+ RGB 31,31,30, 23,29,31, 29,29,08, 06,06,06 ; PAL_SLOTS4
+ RGB 31,31,30, 06,06,06, 06,06,06, 06,06,06 ; PAL_BLACK
+ RGB 31,31,30, 31,31,19, 00,21,00, 06,06,06 ; PAL_GREENBAR
+ RGB 31,31,30, 31,31,19, 28,23,09, 06,06,06 ; PAL_YELLOWBAR
+ RGB 31,31,30, 31,31,19, 26,09,06, 06,06,06 ; PAL_REDBAR
+ RGB 31,31,30, 20,15,11, 22,21,20, 06,06,06 ; PAL_BADGE
+ RGB 31,31,30, 20,15,11, 22,21,20, 06,06,06 ; PAL_CAVE
+ RGB 31,31,30, 28,24,14, 20,20,11, 06,06,06 ; PAL_GAMEFREAK
+ RGB 31,31,30, 31,30,22, 23,27,31, 06,06,06 ; PAL_25
+ RGB 31,31,30, 28,23,09, 18,14,10, 06,06,06 ; PAL_26
+ RGB 31,31,30, 16,16,16, 31,25,09, 06,06,06 ; PAL_27
+
+GBCBasePalettes:
+ RGB 31,31,31, 16,31,04, 11,23,31, 03,03,03 ; PAL_ROUTE
+ RGB 31,31,31, 23,17,31, 11,23,31, 03,03,03 ; PAL_PALLET
+ RGB 31,31,31, 19,31,00, 11,23,31, 03,03,03 ; PAL_VIRIDIAN
+ RGB 31,31,31, 18,18,15, 11,23,31, 03,03,03 ; PAL_PEWTER
+ RGB 31,31,31, 05,08,31, 11,23,31, 03,03,03 ; PAL_CERULEAN
+ RGB 31,31,31, 25,04,31, 11,23,31, 03,03,03 ; PAL_LAVENDER
+ RGB 31,31,31, 31,19,00, 11,23,31, 03,03,03 ; PAL_VERMILION
+ RGB 31,31,31, 05,31,05, 11,23,31, 03,03,03 ; PAL_CELADON
+ RGB 31,31,31, 31,15,15, 11,23,31, 03,03,03 ; PAL_FUCHSIA
+ RGB 31,31,31, 31,08,08, 11,23,31, 03,03,03 ; PAL_CINNABAR
+ RGB 31,31,31, 11,08,31, 11,23,31, 03,03,03 ; PAL_INDIGO
+ RGB 31,31,31, 31,31,00, 11,23,31, 03,03,03 ; PAL_SAFFRON
+ RGB 31,31,31, 00,21,31, 10,28,00, 01,01,01 ; PAL_TOWNMAP
+ RGB 31,31,31, 31,31,00, 31,00,00, 31,00,00 ; PAL_LOGO1
+ RGB 31,31,31, 31,31,00, 07,07,25, 00,00,17 ; PAL_LOGO2
+ RGB 31,31,31, 13,01,31, 00,09,31, 01,01,01 ; PAL_0F
+ RGB 31,31,31, 31,31,00, 31,01,01, 03,03,03 ; PAL_MEWMON
+ RGB 31,31,31, 16,18,31, 00,01,25, 03,03,03 ; PAL_BLUEMON
+ RGB 31,31,31, 31,17,00, 31,00,00, 03,03,03 ; PAL_REDMON
+ RGB 31,31,31, 16,26,31, 00,17,31, 03,03,03 ; PAL_CYANMON
+ RGB 31,31,31, 25,15,31, 19,00,22, 03,03,03 ; PAL_PURPLEMON
+ RGB 31,31,31, 29,18,10, 17,09,05, 03,03,03 ; PAL_BROWNMON
+ RGB 31,31,31, 17,31,11, 01,22,06, 03,03,03 ; PAL_GREENMON
+ RGB 31,31,31, 31,15,18, 31,00,06, 03,03,03 ; PAL_PINKMON
+ RGB 31,31,31, 31,31,00, 28,14,00, 03,03,03 ; PAL_YELLOWMON
+ RGB 31,31,31, 20,23,10, 11,11,05, 03,03,03 ; PAL_GREYMON
+ RGB 31,31,31, 25,01,31, 31,00,00, 03,03,03 ; PAL_SLOTS1
+ RGB 31,31,31, 31,04,19, 31,31,00, 03,03,03 ; PAL_SLOTS2
+ RGB 31,31,31, 08,31,00, 31,31,00, 03,03,03 ; PAL_SLOTS3
+ RGB 31,31,31, 00,31,31, 31,31,00, 03,03,03 ; PAL_SLOTS4
+ RGB 31,31,31, 03,03,03, 03,03,03, 03,03,03 ; PAL_BLACK
+ RGB 31,31,31, 31,31,00, 00,31,00, 03,03,03 ; PAL_GREENBAR
+ RGB 31,31,31, 31,31,00, 31,18,00, 03,03,03 ; PAL_YELLOWBAR
+ RGB 31,31,31, 31,31,00, 31,00,00, 03,03,03 ; PAL_REDBAR
+ RGB 31,31,31, 23,08,00, 17,14,11, 03,03,03 ; PAL_BADGE
+ RGB 31,31,31, 23,08,00, 17,14,11, 03,03,03 ; PAL_CAVE
+ RGB 31,31,31, 31,19,00, 19,19,00, 03,03,03 ; PAL_GAMEFREAK
+ RGB 31,31,31, 31,31,00, 11,23,31, 03,03,03 ; PAL_25
+ RGB 31,31,31, 31,18,00, 19,07,01, 03,03,03 ; PAL_26
+ RGB 31,31,31, 09,09,09, 31,21,00, 03,03,03 ; PAL_27
diff --git a/data/sgb_border.asm b/data/sgb_border.asm
deleted file mode 100755
index cc592487..00000000
--- a/data/sgb_border.asm
+++ /dev/null
@@ -1,87 +0,0 @@
-BorderPalettes:
- INCBIN "gfx/tilemaps/sgbborder.map"
-
- ds $100
-
- RGB 24, 6, 6
- RGB 31, 25, 9
- RGB 25, 10, 10
- RGB 0, 0, 0
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 18, 24, 18
- RGB 25, 10, 10
- RGB 15, 25, 15
- RGB 0, 0, 0
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 18, 6, 31
- RGB 31, 25, 9
- RGB 15, 25, 15
- RGB 0, 0, 0
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 12, 31, 6
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
-SGBBorderGraphics:
- INCBIN "gfx/pokemon_yellow.2bpp"
diff --git a/data/sgb_packets.asm b/data/sgb_packets.asm
deleted file mode 100755
index b188ad42..00000000
--- a/data/sgb_packets.asm
+++ /dev/null
@@ -1,233 +0,0 @@
-ATTR_BLK: MACRO
-; This is a command macro.
-; Use ATTR_BLK_DATA for data sets.
- db ($4 << 3) + ((\1 * 6) / 16 + 1)
- db \1
-ENDM
-ATTR_BLK_DATA: MACRO
- db \1 ; which regions are affected
- db \2 + (\3 << 2) + (\4 << 4) ; palette for each region
- db \5, \6, \7, \8 ; x1, y1, x2, y2
-ENDM
-
-PAL_SET: MACRO
- db ($a << 3) + 1
- dw \1, \2, \3, \4
- ds 7
-ENDM
-
-PAL_TRN: MACRO
- db ($b<< 3) + 1
- ds 15
-ENDM
-
-MLT_REQ: MACRO
- db ($11 << 3) + 1
- db \1 - 1
- ds 14
-ENDM
-
-CHR_TRN: MACRO
- db ($13 << 3) + 1
- db \1 + (\2 << 1)
- ds 14
-ENDM
-
-PCT_TRN: MACRO
- db ($14 << 3) + 1
- ds 15
-ENDM
-
-MASK_EN: MACRO
- db ($17 << 3) + 1
- db \1
- ds 14
-ENDM
-
-DATA_SND: MACRO
- db ($f << 3) + 1
- dw \1 ; address
- db \2 ; bank
- db \3 ; length (1-11)
-ENDM
-
-BlkPacket_WholeScreen:
- ATTR_BLK 1
- ATTR_BLK_DATA %011, 0,0,0, 00,00, 19,17
- ds 8
-
-BlkPacket_Battle:
- ATTR_BLK 5
- 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
-
-BlkPacket_StatusScreen:
- ATTR_BLK 1
- ATTR_BLK_DATA %111, 1,1,0, 01,00, 07,06 ; mon: pal 1, HP bar: pal 0
- ds 8
-
-BlkPacket_Pokedex:
- ATTR_BLK 1
- ATTR_BLK_DATA %111, 1,1,0, 01,01, 08,08 ; mon: pal 1, everything else: pal 0
- ds 8
-
-BlkPacket_Slots:
- ATTR_BLK 5
- 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
-
-BlkPacket_Titlescreen:
- ATTR_BLK 3
- ATTR_BLK_DATA %011, 0,0,0, 00,00, 19,07
- ATTR_BLK_DATA %011, 2,2,0, 00,08, 19,17
- ATTR_BLK_DATA %010, 0,0,0, 09,08, 10,08
- ds 12
-
-BlkPacket_NidorinoIntro:
- ATTR_BLK 3
- 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
-
-BlkPacket_PartyMenu:
- ATTR_BLK 7
- 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
-
-BlkPacket_TrainerCard:
- 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,13
- ATTR_BLK_DATA %010, 3,3,0, 16,13, 17,13
- 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
- ds 2
-
-BlkPacket_GameFreakIntro:
- ATTR_BLK 3
- 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
-
-UnknownPacket_72751:
- ATTR_BLK 1
- ATTR_BLK_DATA %111, 1,1,0, 04,00, 15,05
- ds 8
-
-PalPacket_Empty: PAL_SET 0, 0, 0, 0
-PalPacket_PartyMenu: PAL_SET PAL_MEWMON, PAL_GREENBAR, PAL_YELLOWBAR, PAL_REDBAR
-PalPacket_Black: PAL_SET PAL_BLACK, PAL_BLACK, PAL_BLACK, PAL_BLACK
-PalPacket_TownMap: PAL_SET PAL_TOWNMAP, 0, 0, 0
-PalPacket_Pokedex: PAL_SET PAL_BROWNMON, 0, 0, 0
-PalPacket_Slots: PAL_SET PAL_SLOTS1, PAL_SLOTS2, PAL_SLOTS3, PAL_SLOTS4
-PalPacket_Titlescreen: PAL_SET PAL_LOGO2, PAL_LOGO1, PAL_MEWMON, PAL_PURPLEMON
-PalPacket_TrainerCard: PAL_SET PAL_MEWMON, PAL_BADGE, PAL_REDMON, PAL_YELLOWMON
-PalPacket_Generic: PAL_SET PAL_MEWMON, 0, 0, 0
-PalPacket_NidorinoIntro: PAL_SET PAL_PURPLEMON, PAL_BLACK, 0, 0
-PalPacket_GameFreakIntro: PAL_SET PAL_GAMEFREAK, PAL_REDMON, PAL_VIRIDIAN, PAL_BLUEMON
-UnknownPalPacket_72811: PAL_SET PAL_25, PAL_25, PAL_25, PAL_25
-UnknownPalPacket_72821: PAL_SET PAL_25, PAL_27, PAL_25, PAL_25
-
-PalTrnPacket: PAL_TRN
-MltReq1Packet: MLT_REQ 1
-MltReq2Packet: MLT_REQ 2
-ChrTrnPacket: CHR_TRN 0, 0
-PctTrnPacket: PCT_TRN
-
-MaskEnFreezePacket: MASK_EN 1
-MaskEnCancelPacket: MASK_EN 0
-
-; These are DATA_SND packets containing SNES code.
-; This set of packets is found in several Japanese SGB-compatible titles.
-; It appears to be part of NCL's SGB devkit.
-
-DataSnd_728a1: DATA_SND $85d, $0, 11
- db $8C ; cpx #$8c (2)
- db $D0, $F4 ; bne -$0c
- db $60 ; rts
- ds 7
-
-DataSnd_728b1: DATA_SND $852, $0, 11
- db $A9, $E7 ; lda #$e7
- db $9F, $01, $C0, $7E ; sta $7ec001, x
- db $E8 ; inx
- db $E8 ; inx
- db $E8 ; inx
- db $E8 ; inx
- db $E0 ; cpx #$8c (1)
-
-DataSnd_728c1: DATA_SND $847, $0, 11 ; 728c1 (1c:68c1)
- db $C4 ; cmp #$c4 (2)
- db $D0, $16 ; bne +$16
- db $A5 ; lda dp
- db $CB ; wai
- db $C9, $05 ; cmp #$05
- db $D0, $10 ; bne +$10
- db $A2, $28 ; ldx #$28
-
-DataSnd_728d1: DATA_SND $83c, $0, 11 ; 728d1 (1c:68d1)
- db $F0, $12 ; beq +$12
- db $A5 ; lda dp
- db $C9, $C9 ; cmp #$c9
- db $C8 ; iny
- db $D0, $1C ; bne +$1c
- db $A5 ; lda dp
- db $CA ; dex
- db $C9 ; cmp #$c4 (1)
-
-DataSnd_728e1: DATA_SND $831, $0, 11
- dbw $0C, $CAA5 ; tsb $caa5
- db $C9, $7E ; cmp #$7e
- db $D0, $06 ; bne +$06
- db $A5 ; lda dp
- db $CB ; wai
- db $C9, $7E ; cmp #$7e
-
-DataSnd_728f1: DATA_SND $826, $0, 11
- db $39 ; bne +$39 (2)
- dbw $CD, $C48 ; cmp $c48
- db $D0, $34 ; bne +$34
- db $A5 ; lda dp
- db $C9, $C9 ; cmp #$c9
- db $80, $D0 ; bra -$30
-
-DataSnd_72901: DATA_SND $81b, $0, 11
- db $EA ; nop
- db $EA ; nop
- db $EA ; nop
- db $EA ; nop
- db $EA ; nop
- ; $820:
- db $A9,$01 ; lda #01
- dbw $CD,$C4F ; cmp $c4f
- db $D0 ; bne +$39 (1)
-
-DataSnd_72911: DATA_SND $810, $0, 11
- dbw $4C, $820 ; jmp $820
- db $EA ; nop
- db $EA ; nop
- db $EA ; nop
- db $EA ; nop
- db $EA ; nop
- db $60 ; rts
- db $EA ; nop
- db $EA ; nop
diff --git a/data/special_warps.asm b/data/special_warps.asm
deleted file mode 100755
index 6b536b67..00000000
--- a/data/special_warps.asm
+++ /dev/null
@@ -1,119 +0,0 @@
-; Format: (size 2 bytes)
-; 00: target map ID
-; 01: which dungeon warp in the source map was used
-DungeonWarpList:
- db SEAFOAM_ISLANDS_B1F,$01
- db SEAFOAM_ISLANDS_B1F,$02
- db SEAFOAM_ISLANDS_B2F,$01
- db SEAFOAM_ISLANDS_B2F,$02
- db SEAFOAM_ISLANDS_B3F,$01
- db SEAFOAM_ISLANDS_B3F,$02
- db SEAFOAM_ISLANDS_B4F,$01
- db SEAFOAM_ISLANDS_B4F,$02
- db VICTORY_ROAD_2F,$02
- db POKEMON_MANSION_1F,$01
- db POKEMON_MANSION_1F,$02
- db POKEMON_MANSION_2F,$03
- db $FF
-
-DungeonWarpData:
- FLYWARP_DATA SEAFOAM_ISLANDS_B1F_WIDTH,7,18
- FLYWARP_DATA SEAFOAM_ISLANDS_B1F_WIDTH,7,23
- FLYWARP_DATA SEAFOAM_ISLANDS_B2F_WIDTH,7,19
- FLYWARP_DATA SEAFOAM_ISLANDS_B2F_WIDTH,7,22
- FLYWARP_DATA SEAFOAM_ISLANDS_B3F_WIDTH,7,18
- FLYWARP_DATA SEAFOAM_ISLANDS_B3F_WIDTH,7,19
- FLYWARP_DATA SEAFOAM_ISLANDS_B4F_WIDTH,14,4
- FLYWARP_DATA SEAFOAM_ISLANDS_B4F_WIDTH,14,5
- FLYWARP_DATA VICTORY_ROAD_2F_WIDTH,16,22
- FLYWARP_DATA POKEMON_MANSION_1F_WIDTH,14,16
- FLYWARP_DATA POKEMON_MANSION_1F_WIDTH,14,16
- FLYWARP_DATA POKEMON_MANSION_2F_WIDTH,14,18
-
-;Format:
-; db Map_id
-; FLYWARP_DATA [Map Width][Y-pos][X-pos]
-; db Tileset_id
-FirstMapSpec:
- db REDS_HOUSE_2F
- FLYWARP_DATA REDS_HOUSE_2F_WIDTH,6,3
- db REDS_HOUSE_2
-
-TradeCenterSpec1:
- db TRADE_CENTER
- FLYWARP_DATA TRADE_CENTER_WIDTH,4,3
- db CLUB
-
-TradeCenterSpec2:
- db TRADE_CENTER
- FLYWARP_DATA TRADE_CENTER_WIDTH,4,6
- db CLUB
-
-ColosseumSpec1:
- db COLOSSEUM
- FLYWARP_DATA COLOSSEUM_WIDTH,4,3
- db CLUB
-
-ColosseumSpec2:
- db COLOSSEUM
- FLYWARP_DATA COLOSSEUM_WIDTH,4,6
- db CLUB
-
-FlyWarpDataPtr:
- db PALLET_TOWN, 0
- dw PalletTownFlyWarp
- db VIRIDIAN_CITY, 0
- dw ViridianCityFlyWarp
- db PEWTER_CITY, 0
- dw PewterCityFlyWarp
- db CERULEAN_CITY, 0
- dw CeruleanCityFlyWarp
- db LAVENDER_TOWN, 0
- dw LavenderTownFlyWarp
- db VERMILION_CITY, 0
- dw VermilionCityFlyWarp
- db CELADON_CITY, 0
- dw CeladonCityFlyWarp
- db FUCHSIA_CITY, 0
- dw FuchsiaCityFlyWarp
- db CINNABAR_ISLAND, 0
- dw CinnabarIslandFlyWarp
- db INDIGO_PLATEAU, 0
- dw IndigoPlateauFlyWarp
- db SAFFRON_CITY, 0
- dw SaffronCityFlyWarp
- db ROUTE_4, 0
- dw Route4FlyWarp
- db ROUTE_10, 0
- dw Route10FlyWarp
-
-; Original Format:
-; [Event Displacement][Y-block][X-block][Y-sub_block][X-sub_block]
-; Macro Format:
-; FLYWARP_DATA [Map Width][Y-pos][X-pos]
-PalletTownFlyWarp:
- FLYWARP_DATA PALLET_TOWN_WIDTH, 6, 5
-ViridianCityFlyWarp:
- FLYWARP_DATA VIRIDIAN_CITY_WIDTH, 26, 23
-PewterCityFlyWarp:
- FLYWARP_DATA PEWTER_CITY_WIDTH, 26, 13
-CeruleanCityFlyWarp:
- FLYWARP_DATA CERULEAN_CITY_WIDTH, 18, 19
-LavenderTownFlyWarp:
- FLYWARP_DATA LAVENDER_TOWN_WIDTH, 6, 3
-VermilionCityFlyWarp:
- FLYWARP_DATA VERMILION_CITY_WIDTH, 4, 11
-CeladonCityFlyWarp:
- FLYWARP_DATA CELADON_CITY_WIDTH, 10, 41
-FuchsiaCityFlyWarp:
- FLYWARP_DATA FUCHSIA_CITY_WIDTH, 28, 19
-CinnabarIslandFlyWarp:
- FLYWARP_DATA CINNABAR_ISLAND_WIDTH, 12, 11
-IndigoPlateauFlyWarp:
- FLYWARP_DATA INDIGO_PLATEAU_WIDTH, 6, 9
-SaffronCityFlyWarp:
- FLYWARP_DATA SAFFRON_CITY_WIDTH, 30, 9
-Route4FlyWarp:
- FLYWARP_DATA ROUTE_4_WIDTH, 6, 11
-Route10FlyWarp:
- FLYWARP_DATA ROUTE_10_WIDTH, 20, 11
diff --git a/data/sprite_sets.asm b/data/sprite_sets.asm
deleted file mode 100755
index d74c9d2f..00000000
--- a/data/sprite_sets.asm
+++ /dev/null
@@ -1,601 +0,0 @@
-MapSpriteSets:
- db $01 ; PALLET_TOWN
- db $01 ; VIRIDIAN_CITY
- db $02 ; PEWTER_CITY
- db $02 ; CERULEAN_CITY
- db $03 ; LAVENDER_TOWN
- db $04 ; VERMILION_CITY
- db $05 ; CELADON_CITY
- db $0a ; FUCHSIA_CITY
- db $01 ; CINNABAR_ISLAND
- db $06 ; INDIGO_PLATEAU
- db $07 ; SAFFRON_CITY
- db $01 ; unused map ID
- db $01 ; ROUTE_1
- db $f1 ; ROUTE_2
- db $02 ; ROUTE_3
- db $02 ; ROUTE_4
- db $f9 ; ROUTE_5
- db $fa ; ROUTE_6
- db $fb ; ROUTE_7
- db $fc ; ROUTE_8
- db $02 ; ROUTE_9
- db $f2 ; ROUTE_10
- db $f3 ; ROUTE_11
- db $f4 ; ROUTE_12
- db $08 ; ROUTE_13
- db $08 ; ROUTE_14
- db $f5 ; ROUTE_15
- db $f6 ; ROUTE_16
- db $09 ; ROUTE_17
- db $f7 ; ROUTE_18
- db $0a ; ROUTE_19
- db $f8 ; ROUTE_20
- db $01 ; ROUTE_21
- db $01 ; ROUTE_22
- db $06 ; ROUTE_23
- db $02 ; ROUTE_24
- db $02 ; ROUTE_25
-
-; Format:
-; 00: determines whether the map is split East/West or North/South
-; $01 = East/West divide
-; $02 = North/South divide
-; 01: coordinate of dividing line
-; 02: sprite set ID if in the West or North side
-; 03: sprite set ID if in the East or South side
-SplitMapSpriteSets:
- db $02,$25,$02,$01 ; $f1
- db $02,$32,$02,$03 ; $f2
- db $01,$39,$04,$08 ; $f3
- db $02,$15,$03,$08 ; $f4
- db $01,$08,$0A,$08 ; $f5
- db $01,$18,$09,$05 ; $f6
- db $01,$22,$09,$0A ; $f7
- db $01,$35,$01,$0A ; $f8
- db $02,$21,$02,$07 ; $f9
- db $02,$02,$07,$04 ; $fa
- db $01,$11,$05,$07 ; $fb
- db $01,$03,$07,$03 ; $fc
-
-SpriteSets:
-; sprite set $01
- db SPRITE_PIKACHU
- db SPRITE_BLUE
- db SPRITE_BUG_CATCHER
- db SPRITE_GIRL
- db SPRITE_FISHER2
- db SPRITE_BLACK_HAIR_BOY_1
- db SPRITE_GAMBLER
- db SPRITE_OAK
- db SPRITE_SWIMMER
- db SPRITE_BALL
- db SPRITE_LYING_OLD_MAN
-
-; sprite set $02
- db SPRITE_PIKACHU
- db SPRITE_BUG_CATCHER
- db SPRITE_ROCKET
- db SPRITE_BLACK_HAIR_BOY_2
- db SPRITE_HIKER
- db SPRITE_BLUE
- db SPRITE_OFFICER_JENNY
- db SPRITE_LASS
- db SPRITE_BLACK_HAIR_BOY_1
- db SPRITE_BALL
- db SPRITE_LYING_OLD_MAN_UNUSED_2
-
-; sprite set $03
- db SPRITE_PIKACHU
- db SPRITE_LITTLE_GIRL
- db SPRITE_GIRL
- db SPRITE_BLACK_HAIR_BOY_2
- db SPRITE_HIKER
- db SPRITE_GAMBLER
- db SPRITE_SLOWBRO
- db SPRITE_LASS
- db SPRITE_BLACK_HAIR_BOY_1
- db SPRITE_BALL
- db SPRITE_LYING_OLD_MAN_UNUSED_2
-
-; sprite set $04
- db SPRITE_PIKACHU
- db SPRITE_OFFICER_JENNY
- db SPRITE_BLACK_HAIR_BOY_2
- db SPRITE_BUG_CATCHER
- db SPRITE_GAMBLER
- db SPRITE_SLOWBRO
- db SPRITE_SAILOR
- db SPRITE_LASS
- db SPRITE_BLACK_HAIR_BOY_1
- db SPRITE_BALL
- db SPRITE_LYING_OLD_MAN_UNUSED_2
-
-; sprite set $05
- db SPRITE_PIKACHU
- db SPRITE_LITTLE_GIRL
- db SPRITE_YOUNG_BOY
- db SPRITE_GIRL
- db SPRITE_FISHER2
- db SPRITE_FAT_BALD_GUY
- db SPRITE_OLD_PERSON
- db SPRITE_SLOWBRO
- db SPRITE_ROCKET
- db SPRITE_BALL
- db SPRITE_SNORLAX
-
-; sprite set $06
- db SPRITE_PIKACHU
- db SPRITE_GYM_HELPER
- db SPRITE_SLOWBRO
- db SPRITE_BLUE
- db SPRITE_LASS
- db SPRITE_BLACK_HAIR_BOY_1
- db SPRITE_SWIMMER
- db SPRITE_GUARD
- db SPRITE_GAMBLER
- db SPRITE_BALL
- db SPRITE_LYING_OLD_MAN_UNUSED_2
-
-; sprite set $07
- db SPRITE_PIKACHU
- db SPRITE_ROCKET
- db SPRITE_OAK_AIDE
- db SPRITE_LAPRAS_GIVER
- db SPRITE_ERIKA
- db SPRITE_GENTLEMAN
- db SPRITE_BIRD
- db SPRITE_ROCKER
- db SPRITE_BLACK_HAIR_BOY_1
- db SPRITE_BALL
- db SPRITE_LYING_OLD_MAN_UNUSED_2
-
-; sprite set $08
- db SPRITE_PIKACHU
- db SPRITE_BIKER
- db SPRITE_BLACK_HAIR_BOY_2
- db SPRITE_FAT_BALD_GUY
- db SPRITE_LASS
- db SPRITE_BLACK_HAIR_BOY_1
- db SPRITE_FOULARD_WOMAN
- db SPRITE_FISHER2
- db SPRITE_ROCKER
- db SPRITE_BALL
- db SPRITE_SNORLAX
-
-; sprite set $09
- db SPRITE_PIKACHU
- db SPRITE_BIKER
- db SPRITE_BLACK_HAIR_BOY_1
- db SPRITE_LAPRAS_GIVER
- db SPRITE_FISHER2
- db SPRITE_ROCKER
- db SPRITE_HIKER
- db SPRITE_GAMBLER
- db SPRITE_FAT_BALD_GUY
- db SPRITE_BALL
- db SPRITE_SNORLAX
-
-; sprite set $0a
- db SPRITE_PIKACHU
- db SPRITE_BLACK_HAIR_BOY_1
- db SPRITE_CHANSEY
- db SPRITE_FISHER2
- db SPRITE_GAMBLER
- db SPRITE_SLOWBRO
- db SPRITE_SEEL
- db SPRITE_SWIMMER
- db SPRITE_BUG_CATCHER
- db SPRITE_BALL
- db SPRITE_OMANYTE
-
-SpriteSheetPointerTable:
- ; SPRITE_RED
- dw RedSprite
- db $c0 ; byte count
- db BANK(RedSprite)
-
- ; SPRITE_BLUE
- dw BlueSprite
- db $c0 ; byte count
- db BANK(BlueSprite)
-
- ; SPRITE_OAK
- dw OakSprite
- db $c0 ; byte count
- db BANK(OakSprite)
-
- ; SPRITE_BUG_CATCHER
- dw BugCatcherSprite
- db $c0 ; byte count
- db BANK(BugCatcherSprite)
-
- ; SPRITE_SLOWBRO
- dw SlowbroSprite
- db $c0 ; byte count
- db BANK(SlowbroSprite)
-
- ; SPRITE_LASS
- dw LassSprite
- db $c0 ; byte count
- db BANK(LassSprite)
-
- ; SPRITE_BLACK_HAIR_BOY_1
- dw BlackHairBoy1Sprite
- db $c0 ; byte count
- db BANK(BlackHairBoy1Sprite)
-
- ; SPRITE_LITTLE_GIRL
- dw LittleGirlSprite
- db $c0 ; byte count
- db BANK(LittleGirlSprite)
-
- ; SPRITE_BIRD
- dw BirdSprite
- db $c0 ; byte count
- db BANK(BirdSprite)
-
- ; SPRITE_FAT_BALD_GUY
- dw FatBaldGuySprite
- db $c0 ; byte count
- db BANK(FatBaldGuySprite)
-
- ; SPRITE_GAMBLER
- dw GamblerSprite
- db $c0 ; byte count
- db BANK(GamblerSprite)
-
- ; SPRITE_BLACK_HAIR_BOY_2
- dw BlackHairBoy2Sprite
- db $c0 ; byte count
- db BANK(BlackHairBoy2Sprite)
-
- ; SPRITE_GIRL
- dw GirlSprite
- db $c0 ; byte count
- db BANK(GirlSprite)
-
- ; SPRITE_HIKER
- dw HikerSprite
- db $c0 ; byte count
- db BANK(HikerSprite)
-
- ; SPRITE_FOULARD_WOMAN
- dw FoulardWomanSprite
- db $c0 ; byte count
- db BANK(FoulardWomanSprite)
-
- ; SPRITE_GENTLEMAN
- dw GentlemanSprite
- db $c0 ; byte count
- db BANK(GentlemanSprite)
-
- ; SPRITE_DAISY
- dw DaisySprite
- db $c0 ; byte count
- db BANK(DaisySprite)
-
- ; SPRITE_BIKER
- dw BikerSprite
- db $c0 ; byte count
- db BANK(BikerSprite)
-
- ; SPRITE_SAILOR
- dw SailorSprite
- db $c0 ; byte count
- db BANK(SailorSprite)
-
- ; SPRITE_COOK
- dw CookSprite
- db $c0 ; byte count
- db BANK(CookSprite)
-
- ; SPRITE_BIKE_SHOP_GUY
- dw BikeShopGuySprite
- db $c0 ; byte count
- db BANK(BikeShopGuySprite)
-
- ; SPRITE_MR_FUJI
- dw MrFujiSprite
- db $c0 ; byte count
- db BANK(MrFujiSprite)
-
- ; SPRITE_GIOVANNI
- dw GiovanniSprite
- db $c0 ; byte count
- db BANK(GiovanniSprite)
-
- ; SPRITE_ROCKET
- dw RocketSprite
- db $c0 ; byte count
- db BANK(RocketSprite)
-
- ; SPRITE_MEDIUM
- dw MediumSprite
- db $c0 ; byte count
- db BANK(MediumSprite)
-
- ; SPRITE_WAITER
- dw WaiterSprite
- db $c0 ; byte count
- db BANK(WaiterSprite)
-
- ; SPRITE_ERIKA
- dw ErikaSprite
- db $c0 ; byte count
- db BANK(ErikaSprite)
-
- ; SPRITE_MOM_GEISHA
- dw MomGeishaSprite
- db $c0 ; byte count
- db BANK(MomGeishaSprite)
-
- ; SPRITE_BRUNETTE_GIRL
- dw BrunetteGirlSprite
- db $c0 ; byte count
- db BANK(BrunetteGirlSprite)
-
- ; SPRITE_LANCE
- dw LanceSprite
- db $c0 ; byte count
- db BANK(LanceSprite)
-
- ; SPRITE_UNUSED_1
- dw RedSprite
- db $c0 ; byte count
- db BANK(RedSprite)
-
- ; SPRITE_OAK_AIDE
- dw OakAideSprite
- db $c0 ; byte count
- db BANK(OakAideSprite)
-
- ; SPRITE_ROCKER
- dw RockerSprite
- db $c0 ; byte count
- db BANK(RockerSprite)
-
- ; SPRITE_SWIMMER
- dw SwimmerSprite
- db $c0 ; byte count
- db BANK(SwimmerSprite)
-
- ; SPRITE_WHITE_PLAYER
- dw WhitePlayerSprite
- db $c0 ; byte count
- db BANK(WhitePlayerSprite)
-
- ; SPRITE_GYM_HELPER
- dw GymHelperSprite
- db $c0 ; byte count
- db BANK(GymHelperSprite)
-
- ; SPRITE_OLD_PERSON
- dw OldPersonSprite
- db $c0 ; byte count
- db BANK(OldPersonSprite)
-
- ; SPRITE_MART_GUY
- dw MartGuySprite
- db $c0 ; byte count
- db BANK(MartGuySprite)
-
- ; SPRITE_FISHER
- dw FisherSprite
- db $c0 ; byte count
- db BANK(FisherSprite)
-
- ; SPRITE_OLD_MEDIUM_WOMAN
- dw OldMediumWomanSprite
- db $c0 ; byte count
- db BANK(OldMediumWomanSprite)
-
- ; SPRITE_NURSE
- dw NurseSprite
- db $c0 ; byte count
- db BANK(NurseSprite)
-
- ; SPRITE_CABLE_CLUB_WOMAN
- dw CableClubWomanSprite
- db $c0 ; byte count
- db BANK(CableClubWomanSprite)
-
- ; SPRITE_MR_MASTERBALL
- dw MrMasterballSprite
- db $c0 ; byte count
- db BANK(MrMasterballSprite)
-
- ; SPRITE_LAPRAS_GIVER
- dw LaprasGiverSprite
- db $c0 ; byte count
- db BANK(LaprasGiverSprite)
-
- ; SPRITE_WARDEN
- dw WardenSprite
- db $c0 ; byte count
- db BANK(WardenSprite)
-
- ; SPRITE_SS_CAPTAIN
- dw SsCaptainSprite
- db $c0 ; byte count
- db BANK(SsCaptainSprite)
-
- ; SPRITE_FISHER2
- dw Fisher2Sprite
- db $c0 ; byte count
- db BANK(Fisher2Sprite)
-
- ; SPRITE_BLACKBELT
- dw BlackbeltSprite
- db $c0 ; byte count
- db BANK(BlackbeltSprite)
-
- ; SPRITE_GUARD
- dw GuardSprite
- db $c0 ; byte count
- db BANK(GuardSprite)
-
- ; SPRITE_UNUSED_2
- dw RedSprite
- db $c0 ; byte count
- db BANK(RedSprite)
-
- ; SPRITE_MOM
- dw MomSprite
- db $c0 ; byte count
- db BANK(MomSprite)
-
- ; SPRITE_BALDING_GUY
- dw BaldingGuySprite
- db $c0 ; byte count
- db BANK(BaldingGuySprite)
-
- ; SPRITE_YOUNG_BOY
- dw YoungBoySprite
- db $c0 ; byte count
- db BANK(YoungBoySprite)
-
- ; SPRITE_UNUSED_3
- dw RedSprite
- db $c0 ; byte count
- db BANK(RedSprite)
-
- ; SPRITE_GAMEBOY_KID
- dw GameboyKidSprite
- db $c0 ; byte count
- db BANK(GameboyKidSprite)
-
- ; SPRITE_CLEFAIRY
- dw ClefairySprite
- db $c0 ; byte count
- db BANK(ClefairySprite)
-
- ; SPRITE_AGATHA
- dw AgathaSprite
- db $c0 ; byte count
- db BANK(AgathaSprite)
-
- ; SPRITE_BRUNO
- dw BrunoSprite
- db $c0 ; byte count
- db BANK(BrunoSprite)
-
- ; SPRITE_LORELEI
- dw LoreleiSprite
- db $c0 ; byte count
- db BANK(LoreleiSprite)
-
- ; SPRITE_SEEL
- dw SeelSprite
- db $c0 ; byte count
- db BANK(SeelSprite)
-
- ; SPRITE_PIKACHU
- dw PikachuSprite
- db $c0
- db BANK(PikachuSprite)
-
- ; SPRITE_OFFICER_JENNY
- dw OfficerJennySprite
- db $c0
- db BANK(OfficerJennySprite)
-
- ; SPRITE_SANDSHREW
- dw SandshrewSprite
- db $c0
- db BANK(SandshrewSprite)
-
- ; SPRITE_ODDISH
- dw OddishSprite
- db $c0
- db BANK(OddishSprite)
-
- ; SPRITE_BULBASAUR
- dw BulbasaurSprite
- db $c0
- db BANK(BulbasaurSprite)
-
- ; SPRITE_JIGGLYPUFF
- dw JigglypuffSprite
- db $c0
- db BANK(JigglypuffSprite)
-
- ; SPRITE_CLEFAIRY_2
- dw Clefairy2Sprite
- db $c0
- db BANK(Clefairy2Sprite)
-
- ; SPRITE_CHANSEY
- dw ChanseySprite
- db $c0
- db BANK(ChanseySprite)
-
- ; SPRITE_JESSIE
- dw JessieSprite
- db $c0
- db BANK(JessieSprite)
-
- ; SPRITE_JAMES
- dw JamesSprite
- db $c0
- db BANK(JamesSprite)
-
- ; SPRITE_BALL
- dw BallSprite
- db $40 ; byte count
- db BANK(BallSprite)
-
- ; SPRITE_OMANYTE
- dw OmanyteSprite
- db $40 ; byte count
- db BANK(OmanyteSprite)
-
- ; SPRITE_BOULDER
- dw BoulderSprite
- db $40 ; byte count
- db BANK(BoulderSprite)
-
- ; SPRITE_PAPER_SHEET
- dw PaperSheetSprite
- db $40 ; byte count
- db BANK(PaperSheetSprite)
-
- ; SPRITE_BOOK_MAP_DEX
- dw BookMapDexSprite
- db $40 ; byte count
- db BANK(BookMapDexSprite)
-
- ; SPRITE_CLIPBOARD
- dw ClipboardSprite
- db $40 ; byte count
- db BANK(ClipboardSprite)
-
- ; SPRITE_SNORLAX
- dw SnorlaxSprite
- db $40 ; byte count
- db BANK(SnorlaxSprite)
-
- ; SPRITE_OLD_AMBER_COPY
- dw OldAmberSprite
- db $40 ; byte count
- db BANK(OldAmberSprite)
-
- ; SPRITE_OLD_AMBER
- dw OldAmberSprite
- db $40 ; byte count
- db BANK(OldAmberSprite)
-
- ; SPRITE_LYING_OLD_MAN_UNUSED_1
- dw LyingOldManSprite
- db $40 ; byte count
- db BANK(LyingOldManSprite)
-
- ; SPRITE_LYING_OLD_MAN_UNUSED_2
- dw LyingOldManSprite
- db $40 ; byte count
- db BANK(LyingOldManSprite)
-
- ; SPRITE_LYING_OLD_MAN
- dw LyingOldManSprite
- db $40 ; byte count
- db BANK(LyingOldManSprite)
diff --git a/data/sprites/facings.asm b/data/sprites/facings.asm
new file mode 100644
index 00000000..e87a9627
--- /dev/null
+++ b/data/sprites/facings.asm
@@ -0,0 +1,131 @@
+SpriteFacingAndAnimationTable:
+ dw .StandingDown ; facing down, walk animation frame 0
+ dw .WalkingDown ; facing down, walk animation frame 1
+ dw .StandingDown ; facing down, walk animation frame 2
+ dw .WalkingDown2 ; facing down, walk animation frame 3
+ dw .StandingUp ; facing up, walk animation frame 0
+ dw .WalkingUp ; facing up, walk animation frame 1
+ dw .StandingUp ; facing up, walk animation frame 2
+ dw .WalkingUp2 ; facing up, walk animation frame 3
+ dw .StandingLeft ; facing left, walk animation frame 0
+ dw .WalkingLeft ; facing left, walk animation frame 1
+ dw .StandingLeft ; facing left, walk animation frame 2
+ dw .WalkingLeft ; facing left, walk animation frame 3
+ dw .StandingRight ; facing right, walk animation frame 0
+ dw .WalkingRight ; facing right, walk animation frame 1
+ dw .StandingRight ; facing right, walk animation frame 2
+ dw .WalkingRight ; facing right, walk animation frame 3
+; The rest of this table is used for sprites $a and $b.
+; All orientation and animation parameters lead to the same result.
+; Used for immobile sprites like items on the ground.
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+ dw .StandingDown
+; special case
+ dw SpriteSpecialCase ; pikachu maybe?
+
+.StandingDown:
+ db $04
+; Sprite OAM Parameters
+ db $00, $00, $00, $00 ; top left
+ db $00, $08, $01, $00 ; top right
+ db $08, $00, $02, OAMFLAG_CANBEMASKED ; bottom left
+ db $08, $08, $03, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
+
+.WalkingDown:
+ db $04
+; Sprite OAM Parameters
+ db $00, $00, $80, $00 ; top left
+ db $00, $08, $81, $00 ; top right
+ db $08, $00, $82, OAMFLAG_CANBEMASKED ; bottom left
+ db $08, $08, $83, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
+
+.WalkingDown2:
+ db $04
+; Sprite OAM Parameters
+ db $00, $08, $80, OAM_HFLIP ; top left
+ db $00, $00, $81, OAM_HFLIP ; top right
+ db $08, $08, $82, OAM_HFLIP | OAMFLAG_CANBEMASKED ; bottom left
+ db $08, $00, $83, OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
+
+.StandingUp:
+ db $04
+; Sprite OAM Parameters
+ db $00, $00, $04, $00 ; top left
+ db $00, $08, $05, $00 ; top right
+ db $08, $00, $06, OAMFLAG_CANBEMASKED ; bottom left
+ db $08, $08, $07, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
+
+.WalkingUp:
+ db $04
+; Sprite OAM Parameters
+ db $00, $00, $84, $00 ; top left
+ db $00, $08, $85, $00 ; top right
+ db $08, $00, $86, OAMFLAG_CANBEMASKED ; bottom left
+ db $08, $08, $87, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
+
+.WalkingUp2:
+ db $04
+; Sprite OAM Parameters
+ db $00, $08, $84, OAM_HFLIP ; top left
+ db $00, $00, $85, OAM_HFLIP ; top right
+ db $08, $08, $86, OAM_HFLIP | OAMFLAG_CANBEMASKED ; bottom left
+ db $08, $00, $87, OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
+
+.StandingLeft:
+ db $04
+; Sprite OAM Parameters
+ db $00, $00, $08, $00 ; top left
+ db $00, $08, $09, $00 ; top right
+ db $08, $00, $0a, OAMFLAG_CANBEMASKED ; bottom left
+ db $08, $08, $0b, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
+
+.WalkingLeft:
+ db $04
+; Sprite OAM Parameters
+ db $00, $00, $88, $00 ; top left
+ db $00, $08, $89, $00 ; top right
+ db $08, $00, $8a, OAMFLAG_CANBEMASKED ; bottom left
+ db $08, $08, $8b, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
+
+.StandingRight:
+ db $04
+; Sprite OAM Parameters
+ db $00, $08, $08, OAM_HFLIP ; top left
+ db $00, $00, $09, OAM_HFLIP ; top right
+ db $08, $08, $0a, OAM_HFLIP | OAMFLAG_CANBEMASKED ; bottom left
+ db $08, $00, $0b, OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
+
+.WalkingRight:
+ db $04
+; Sprite OAM Parameters
+ db $00, $08, $88, OAM_HFLIP ; top left
+ db $00, $00, $89, OAM_HFLIP ; top right
+ db $08, $08, $8a, OAM_HFLIP | OAMFLAG_CANBEMASKED ; bottom left
+ db $08, $00, $8b, OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
+
+SpriteSpecialCase:
+ db $09
+; Sprite OAM Parameters
+ db -$4, -$4, $00, $00
+ db -$4, $04, $01, $00
+ db -$4, $0c, $00, OAM_HFLIP
+ db $04, -$4, $01, $00
+ db $04, $04, $02, $00
+ db $04, $0c, $01, $00
+ db $0c, -$4, $00, OAM_VFLIP | OAMFLAG_CANBEMASKED
+ db $0c, $04, $01, OAMFLAG_CANBEMASKED
+ db $0c, $0c, $00, OAM_VFLIP | OAM_HFLIP | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA
diff --git a/data/sprites/sprites.asm b/data/sprites/sprites.asm
new file mode 100644
index 00000000..b7bee609
--- /dev/null
+++ b/data/sprites/sprites.asm
@@ -0,0 +1,90 @@
+overworld_sprite: MACRO
+ dw \1
+ db \2 tiles
+ db BANK(\1)
+ENDM
+
+SpriteSheetPointerTable:
+ ; graphics, tile count
+ overworld_sprite RedSprite, 12 ; SPRITE_RED
+ overworld_sprite BlueSprite, 12 ; SPRITE_BLUE
+ overworld_sprite OakSprite, 12 ; SPRITE_OAK
+ overworld_sprite YoungsterSprite, 12 ; SPRITE_YOUNGSTER
+ overworld_sprite MonsterSprite, 12 ; SPRITE_MONSTER
+ overworld_sprite CooltrainerFSprite, 12 ; SPRITE_COOLTRAINER_F
+ overworld_sprite CooltrainerMSprite, 12 ; SPRITE_COOLTRAINER_M
+ overworld_sprite LittleGirlSprite, 12 ; SPRITE_LITTLE_GIRL
+ overworld_sprite BirdSprite, 12 ; SPRITE_BIRD
+ overworld_sprite MiddleAgedManSprite, 12 ; SPRITE_MIDDLE_AGED_MAN
+ overworld_sprite GamblerSprite, 12 ; SPRITE_GAMBLER
+ overworld_sprite SuperNerdSprite, 12 ; SPRITE_SUPER_NERD
+ overworld_sprite GirlSprite, 12 ; SPRITE_GIRL
+ overworld_sprite HikerSprite, 12 ; SPRITE_HIKER
+ overworld_sprite BeautySprite, 12 ; SPRITE_BEAUTY
+ overworld_sprite GentlemanSprite, 12 ; SPRITE_GENTLEMAN
+ overworld_sprite DaisySprite, 12 ; SPRITE_DAISY
+ overworld_sprite BikerSprite, 12 ; SPRITE_BIKER
+ overworld_sprite SailorSprite, 12 ; SPRITE_SAILOR
+ overworld_sprite CookSprite, 12 ; SPRITE_COOK
+ overworld_sprite BikeShopClerkSprite, 12 ; SPRITE_BIKE_SHOP_CLERK
+ overworld_sprite MrFujiSprite, 12 ; SPRITE_MR_FUJI
+ overworld_sprite GiovanniSprite, 12 ; SPRITE_GIOVANNI
+ overworld_sprite RocketSprite, 12 ; SPRITE_ROCKET
+ overworld_sprite ChannelerSprite, 12 ; SPRITE_CHANNELER
+ overworld_sprite WaiterSprite, 12 ; SPRITE_WAITER
+ overworld_sprite ErikaSprite, 12 ; SPRITE_ERIKA
+ overworld_sprite MiddleAgedWomanSprite, 12 ; SPRITE_MIDDLE_AGED_WOMAN
+ overworld_sprite BrunetteGirlSprite, 12 ; SPRITE_BRUNETTE_GIRL
+ overworld_sprite LanceSprite, 12 ; SPRITE_LANCE
+ overworld_sprite RedSprite, 12 ; SPRITE_UNUSED_SCIENTIST
+ overworld_sprite ScientistSprite, 12 ; SPRITE_SCIENTIST
+ overworld_sprite RockerSprite, 12 ; SPRITE_ROCKER
+ overworld_sprite SwimmerSprite, 12 ; SPRITE_SWIMMER
+ overworld_sprite SafariZoneWorkerSprite, 12 ; SPRITE_SAFARI_ZONE_WORKER
+ overworld_sprite GymGuideSprite, 12 ; SPRITE_GYM_GUIDE
+ overworld_sprite GrampsSprite, 12 ; SPRITE_GRAMPS
+ overworld_sprite ClerkSprite, 12 ; SPRITE_CLERK
+ overworld_sprite FishingGuruSprite, 12 ; SPRITE_FISHING_GURU
+ overworld_sprite GrannySprite, 12 ; SPRITE_GRANNY
+ overworld_sprite NurseSprite, 12 ; SPRITE_NURSE
+ overworld_sprite LinkReceptionistSprite, 12 ; SPRITE_LINK_RECEPTIONIST
+ overworld_sprite SilphPresidentSprite, 12 ; SPRITE_SILPH_PRESIDENT
+ overworld_sprite SilphWorkerSprite, 12 ; SPRITE_SILPH_WORKER
+ overworld_sprite WardenSprite, 12 ; SPRITE_WARDEN
+ overworld_sprite CaptainSprite, 12 ; SPRITE_CAPTAIN
+ overworld_sprite FisherSprite, 12 ; SPRITE_FISHER
+ overworld_sprite KogaSprite, 12 ; SPRITE_KOGA
+ overworld_sprite GuardSprite, 12 ; SPRITE_GUARD
+ overworld_sprite RedSprite, 12 ; SPRITE_UNUSED_GUARD
+ overworld_sprite MomSprite, 12 ; SPRITE_MOM
+ overworld_sprite BaldingGuySprite, 12 ; SPRITE_BALDING_GUY
+ overworld_sprite LittleBoySprite, 12 ; SPRITE_LITTLE_BOY
+ overworld_sprite RedSprite, 12 ; SPRITE_UNUSED_GAMEBOY_KID
+ overworld_sprite GameboyKidSprite, 12 ; SPRITE_GAMEBOY_KID
+ overworld_sprite FairySprite, 12 ; SPRITE_FAIRY
+ overworld_sprite AgathaSprite, 12 ; SPRITE_AGATHA
+ overworld_sprite BrunoSprite, 12 ; SPRITE_BRUNO
+ overworld_sprite LoreleiSprite, 12 ; SPRITE_LORELEI
+ overworld_sprite SeelSprite, 12 ; SPRITE_SEEL
+ overworld_sprite PikachuSprite, 12 ; SPRITE_PIKACHU
+ overworld_sprite OfficerJennySprite, 12 ; SPRITE_OFFICER_JENNY
+ overworld_sprite SandshrewSprite, 12 ; SPRITE_SANDSHREW
+ overworld_sprite OddishSprite, 12 ; SPRITE_ODDISH
+ overworld_sprite BulbasaurSprite, 12 ; SPRITE_BULBASAUR
+ overworld_sprite JigglypuffSprite, 12 ; SPRITE_JIGGLYPUFF
+ overworld_sprite ClefairySprite, 12 ; SPRITE_CLEFAIRY
+ overworld_sprite ChanseySprite, 12 ; SPRITE_CHANSEY
+ overworld_sprite JessieSprite, 12 ; SPRITE_JESSIE
+ overworld_sprite JamesSprite, 12 ; SPRITE_JAMES
+ overworld_sprite PokeBallSprite, 4 ; SPRITE_POKE_BALL
+ overworld_sprite FossilSprite, 4 ; SPRITE_FOSSIL
+ overworld_sprite BoulderSprite, 4 ; SPRITE_BOULDER
+ overworld_sprite PaperSprite, 4 ; SPRITE_PAPER
+ overworld_sprite PokedexSprite, 4 ; SPRITE_POKEDEX
+ overworld_sprite ClipboardSprite, 4 ; SPRITE_CLIPBOARD
+ overworld_sprite SnorlaxSprite, 4 ; SPRITE_SNORLAX
+ overworld_sprite OldAmberSprite, 4 ; SPRITE_UNUSED_OLD_AMBER
+ overworld_sprite OldAmberSprite, 4 ; SPRITE_OLD_AMBER
+ overworld_sprite GamblerAsleepSprite, 4 ; SPRITE_UNUSED_GAMBLER_ASLEEP_1
+ overworld_sprite GamblerAsleepSprite, 4 ; SPRITE_UNUSED_GAMBLER_ASLEEP_2
+ overworld_sprite GamblerAsleepSprite, 4 ; SPRITE_GAMBLER_ASLEEP
diff --git a/data/super_palettes.asm b/data/super_palettes.asm
deleted file mode 100755
index d04d461e..00000000
--- a/data/super_palettes.asm
+++ /dev/null
@@ -1,481 +0,0 @@
-SuperPalettes:
- ; PAL_ROUTE
- RGB 31, 31, 30
- RGB 23, 26, 19
- RGB 23, 27, 31
- RGB 6, 6, 6
-
- ; PAL_PALLET
- RGB 31, 31, 30
- RGB 28, 27, 31
- RGB 23, 27, 31
- RGB 6, 6, 6
-
- ; PAL_VIRIDIAN
- RGB 31, 31, 30
- RGB 26, 31, 21
- RGB 23, 27, 31
- RGB 6, 6, 6
-
- ; PAL_PEWTER
- RGB 31, 31, 30
- RGB 23, 23, 22
- RGB 23, 27, 31
- RGB 6, 6, 6
-
- ; PAL_CERULEAN
- RGB 31, 31, 30
- RGB 22, 23, 31
- RGB 23, 27, 31
- RGB 6, 6, 6
-
- ; PAL_LAVENDER
- RGB 31, 31, 30
- RGB 27, 23, 29
- RGB 23, 27, 31
- RGB 6, 6, 6
-
- ; PAL_VERMILION
- RGB 31, 31, 30
- RGB 31, 25, 16
- RGB 23, 27, 31
- RGB 6, 6, 6
-
- ; PAL_CELADON
- RGB 31, 31, 30
- RGB 22, 31, 22
- RGB 23, 27, 31
- RGB 6, 6, 6
-
- ; PAL_FUCHSIA
- RGB 31, 31, 30
- RGB 31, 26, 26
- RGB 23, 27, 31
- RGB 6, 6, 6
-
- ; PAL_CINNABAR
- RGB 31, 31, 30
- RGB 31, 15, 14
- RGB 23, 27, 31
- RGB 6, 6, 6
-
- ; PAL_INDIGO
- RGB 31, 31, 30
- RGB 17, 17, 25
- RGB 23, 27, 31
- RGB 6, 6, 6
-
- ; PAL_SAFFRON
- RGB 31, 31, 30
- RGB 31, 31, 19
- RGB 23, 27, 31
- RGB 6, 6, 6
-
- ; PAL_TOWNMAP
- RGB 31, 31, 30
- RGB 20, 26, 31
- RGB 17, 23, 10
- RGB 3, 2, 2
-
- ; PAL_LOGO1
- RGB 31, 31, 30
- RGB 30, 30, 17
- RGB 21, 0, 4
- RGB 21, 0, 4
-
- ; PAL_LOGO2
- RGB 31, 31, 30
- RGB 30, 30, 17
- RGB 18, 18, 24
- RGB 7, 7, 16
-
- ; PAL_0F
- RGB 31, 31, 30
- RGB 24, 20, 30
- RGB 11, 20, 30
- RGB 3, 2, 2
-
- ; PAL_MEWMON
- RGB 31, 31, 30
- RGB 31, 30, 22
- RGB 27, 16, 16
- RGB 6, 6, 6
-
- ; PAL_BLUEMON
- RGB 31, 31, 30
- RGB 21, 22, 31
- RGB 9, 10, 20
- RGB 6, 6, 6
-
- ; PAL_REDMON
- RGB 31, 31, 30
- RGB 31, 24, 11
- RGB 26, 9, 6
- RGB 6, 6, 6
-
- ; PAL_CYANMON
- RGB 31, 31, 30
- RGB 26, 28, 31
- RGB 7, 24, 28
- RGB 6, 6, 6
-
- ; PAL_PURPLEMON
- RGB 31, 31, 30
- RGB 27, 22, 30
- RGB 22, 15, 23
- RGB 6, 6, 6
-
- ; PAL_BROWNMON
- RGB 31, 31, 30
- RGB 26, 23, 18
- RGB 18, 14, 10
- RGB 6, 6, 6
-
- ; PAL_GREENMON
- RGB 31, 31, 30
- RGB 24, 28, 18
- RGB 13, 21, 15
- RGB 6, 6, 6
-
- ; PAL_PINKMON
- RGB 31, 31, 30
- RGB 31, 24, 26
- RGB 31, 18, 21
- RGB 6, 6, 6
-
- ; PAL_YELLOWMON
- RGB 31, 31, 30
- RGB 31, 31, 19
- RGB 28, 23, 9
- RGB 6, 6, 6
-
- ; PAL_GREYMON
- RGB 31, 31, 30
- RGB 25, 25, 18
- RGB 16, 16, 14
- RGB 6, 6, 6
-
- ; PAL_SLOTS1
- RGB 31, 31, 30
- RGB 27, 22, 30
- RGB 26, 9, 6
- RGB 6, 6, 6
-
- ; PAL_SLOTS2
- RGB 31, 31, 30
- RGB 31, 23, 26
- RGB 29, 29, 8
- RGB 6, 6, 6
-
- ; PAL_SLOTS3
- RGB 31, 31, 30
- RGB 23, 31, 20
- RGB 29, 29, 8
- RGB 6, 6, 6
-
- ; PAL_SLOTS4
- RGB 31, 31, 30
- RGB 23, 29, 31
- RGB 29, 29, 8
- RGB 6, 6, 6
-
- ; PAL_BLACK
- RGB 31, 31, 30
- RGB 6, 6, 6
- RGB 6, 6, 6
- RGB 6, 6, 6
-
- ; PAL_GREENBAR
- RGB 31, 31, 30
- RGB 31, 31, 19
- RGB 0, 21, 0
- RGB 6, 6, 6
-
- ; PAL_YELLOWBAR
- RGB 31, 31, 30
- RGB 31, 31, 19
- RGB 28, 23, 9
- RGB 6, 6, 6
-
- ; PAL_REDBAR
- RGB 31, 31, 30
- RGB 31, 31, 19
- RGB 26, 9, 6
- RGB 6, 6, 6
-
- ; PAL_BADGE
- RGB 31, 31, 30
- RGB 20, 15, 11
- RGB 22, 21, 20
- RGB 6, 6, 6
-
- ; PAL_CAVE
- RGB 31, 31, 30
- RGB 20, 15, 11
- RGB 22, 21, 20
- RGB 6, 6, 6
-
- ; PAL_GAMEFREAK
- RGB 31, 31, 30
- RGB 28, 24, 14
- RGB 20, 20, 11
- RGB 6, 6, 6
-
- ; PAL_25
- RGB 31, 31, 30
- RGB 31, 30, 22
- RGB 23, 27, 31
- RGB 6, 6, 6
-
- ; PAL_26
- RGB 31, 31, 30
- RGB 28, 23, 9
- RGB 18, 14, 10
- RGB 6, 6, 6
-
- ; PAL_27
- RGB 31, 31, 30
- RGB 16, 16, 16
- RGB 31, 25, 9
- RGB 6, 6, 6
-
-GBCBasePalettes:
- ; PAL_ROUTE
- RGB 31, 31, 31
- RGB 16, 31, 4
- RGB 11, 23, 31
- RGB 3, 3, 3
-
- ; PAL_PALLET
- RGB 31, 31, 31
- RGB 23, 17, 31
- RGB 11, 23, 31
- RGB 3, 3, 3
-
- ; PAL_VIRIDIAN
- RGB 31, 31, 31
- RGB 19, 31, 0
- RGB 11, 23, 31
- RGB 3, 3, 3
-
- ; PAL_PEWTER
- RGB 31, 31, 31
- RGB 18, 18, 15
- RGB 11, 23, 31
- RGB 3, 3, 3
-
- ; PAL_CERULEAN
- RGB 31, 31, 31
- RGB 5, 8, 31
- RGB 11, 23, 31
- RGB 3, 3, 3
-
- ; PAL_LAVENDER
- RGB 31, 31, 31
- RGB 25, 4, 31
- RGB 11, 23, 31
- RGB 3, 3, 3
-
- ; PAL_VERMILION
- RGB 31, 31, 31
- RGB 31, 19, 0
- RGB 11, 23, 31
- RGB 3, 3, 3
-
- ; PAL_CELADON
- RGB 31, 31, 31
- RGB 5, 31, 5
- RGB 11, 23, 31
- RGB 3, 3, 3
-
- ; PAL_FUCHSIA
- RGB 31, 31, 31
- RGB 31, 15, 15
- RGB 11, 23, 31
- RGB 3, 3, 3
-
- ; PAL_CINNABAR
- RGB 31, 31, 31
- RGB 31, 8, 8
- RGB 11, 23, 31
- RGB 3, 3, 3
-
- ; PAL_INDIGO
- RGB 31, 31, 31
- RGB 11, 8, 31
- RGB 11, 23, 31
- RGB 3, 3, 3
-
- ; PAL_SAFFRON
- RGB 31, 31, 31
- RGB 31, 31, 0
- RGB 11, 23, 31
- RGB 3, 3, 3
-
- ; PAL_TOWNMAP
- RGB 31, 31, 31
- RGB 0, 21, 31
- RGB 10, 28, 0
- RGB 1, 1, 1
-
- ; PAL_LOGO1
- RGB 31, 31, 31
- RGB 31, 31, 0
- RGB 31, 0, 0
- RGB 31, 0, 0
-
- ; PAL_LOGO2
- RGB 31, 31, 31
- RGB 31, 31, 0
- RGB 7, 7, 25
- RGB 0, 0, 17
-
- ; PAL_0F
- RGB 31, 31, 31
- RGB 13, 1, 31
- RGB 0, 9, 31
- RGB 1, 1, 1
-
- ; PAL_MEWMON
- RGB 31, 31, 31
- RGB 31, 31, 0
- RGB 31, 1, 1
- RGB 3, 3, 3
-
- ; PAL_BLUEMON
- RGB 31, 31, 31
- RGB 16, 18, 31
- RGB 0, 1, 25
- RGB 3, 3, 3
-
- ; PAL_REDMON
- RGB 31, 31, 31
- RGB 31, 17, 0
- RGB 31, 0, 0
- RGB 3, 3, 3
-
- ; PAL_CYANMON
- RGB 31, 31, 31
- RGB 16, 26, 31
- RGB 0, 17, 31
- RGB 3, 3, 3
-
- ; PAL_PURPLEMON
- RGB 31, 31, 31
- RGB 25, 15, 31
- RGB 19, 0, 22
- RGB 3, 3, 3
-
- ; PAL_BROWNMON
- RGB 31, 31, 31
- RGB 29, 18, 10
- RGB 17, 9, 5
- RGB 3, 3, 3
-
- ; PAL_GREENMON
- RGB 31, 31, 31
- RGB 17, 31, 11
- RGB 1, 22, 6
- RGB 3, 3, 3
-
- ; PAL_PINKMON
- RGB 31, 31, 31
- RGB 31, 15, 18
- RGB 31, 0, 6
- RGB 3, 3, 3
-
- ; PAL_YELLOWMON
- RGB 31, 31, 31
- RGB 31, 31, 0
- RGB 28, 14, 0
- RGB 3, 3, 3
-
- ; PAL_GREYMON
- RGB 31, 31, 31
- RGB 20, 23, 10
- RGB 11, 11, 5
- RGB 3, 3, 3
-
- ; PAL_SLOTS1
- RGB 31, 31, 31
- RGB 25, 1, 31
- RGB 31, 0, 0
- RGB 3, 3, 3
-
- ; PAL_SLOTS2
- RGB 31, 31, 31
- RGB 31, 4, 19
- RGB 31, 31, 0
- RGB 3, 3, 3
-
- ; PAL_SLOTS3
- RGB 31, 31, 31
- RGB 8, 31, 0
- RGB 31, 31, 0
- RGB 3, 3, 3
-
- ; PAL_SLOTS4
- RGB 31, 31, 31
- RGB 0, 31, 31
- RGB 31, 31, 0
- RGB 3, 3, 3
-
- ; PAL_BLACK
- RGB 31, 31, 31
- RGB 3, 3, 3
- RGB 3, 3, 3
- RGB 3, 3, 3
-
- ; PAL_GREENBAR
- RGB 31, 31, 31
- RGB 31, 31, 0
- RGB 0, 31, 0
- RGB 3, 3, 3
-
- ; PAL_YELLOWBAR
- RGB 31, 31, 31
- RGB 31, 31, 0
- RGB 31, 18, 0
- RGB 3, 3, 3
-
- ; PAL_REDBAR
- RGB 31, 31, 31
- RGB 31, 31, 0
- RGB 31, 0, 0
- RGB 3, 3, 3
-
- ; PAL_BADGE
- RGB 31, 31, 31
- RGB 23, 8, 0
- RGB 17, 14, 11
- RGB 3, 3, 3
-
- ; PAL_CAVE
- RGB 31, 31, 31
- RGB 23, 8, 0
- RGB 17, 14, 11
- RGB 3, 3, 3
-
- ; PAL_GAMEFREAK
- RGB 31, 31, 31
- RGB 31, 19, 0
- RGB 19, 19, 0
- RGB 3, 3, 3
-
- ; PAL_25
- RGB 31, 31, 31
- RGB 31, 31, 0
- RGB 11, 23, 31
- RGB 3, 3, 3
-
- ; PAL_26
- RGB 31, 31, 31
- RGB 31, 18, 0
- RGB 19, 7, 1
- RGB 3, 3, 3
-
- ; PAL_27
- RGB 31, 31, 31
- RGB 9, 9, 9
- RGB 31, 21, 0
- RGB 3, 3, 3
diff --git a/data/super_rod.asm b/data/super_rod.asm
deleted file mode 100755
index 01c6b588..00000000
--- a/data/super_rod.asm
+++ /dev/null
@@ -1,33 +0,0 @@
-FishingSlots::
- db PALLET_TOWN,STARYU,10,TENTACOOL,10,STARYU,5,TENTACOOL,20
- db VIRIDIAN_CITY,POLIWAG,5,POLIWAG,10,POLIWAG,15,POLIWAG,10
- db CERULEAN_CITY,GOLDEEN,25,GOLDEEN,30,SEAKING,30,SEAKING,40
- db VERMILION_CITY,TENTACOOL,15,TENTACOOL,20,TENTACOOL,10,HORSEA,5
- db CELADON_CITY,GOLDEEN,5,GOLDEEN,10,GOLDEEN,15,GOLDEEN,20
- db FUCHSIA_CITY,MAGIKARP,5,MAGIKARP,10,MAGIKARP,15,GYARADOS,15
- db CINNABAR_ISLAND,STARYU,15,TENTACOOL,15,STARYU,10,TENTACOOL,30
- db ROUTE_4,GOLDEEN,20,GOLDEEN,25,GOLDEEN,30,SEAKING,30
- db ROUTE_6,GOLDEEN,5,GOLDEEN,10,GOLDEEN,15,GOLDEEN,20
- db ROUTE_24,GOLDEEN,20,GOLDEEN,25,GOLDEEN,30,SEAKING,30
- db ROUTE_25,KRABBY,10,KRABBY,15,KINGLER,15,KINGLER,25
- db ROUTE_10,KRABBY,15,KRABBY,20,HORSEA,10,KINGLER,25
- db ROUTE_11,TENTACOOL,15,TENTACOOL,20,TENTACOOL,10,HORSEA,5
- db ROUTE_12,HORSEA,20,HORSEA,25,SEADRA,25,SEADRA,35
- db ROUTE_13,HORSEA,15,HORSEA,20,TENTACOOL,10,SEADRA,20
- db ROUTE_17,TENTACOOL,5,TENTACOOL,15,SHELLDER,25,SHELLDER,35
- db ROUTE_18,TENTACOOL,15,SHELLDER,20,SHELLDER,30,SHELLDER,40
- db ROUTE_19,TENTACOOL,15,STARYU,20,TENTACOOL,30,TENTACRUEL,30
- db ROUTE_20,TENTACOOL,20,TENTACRUEL,20,STARYU,30,TENTACRUEL,40
- db ROUTE_21,TENTACOOL,15,STARYU,20,TENTACOOL,30,TENTACRUEL,30
- db ROUTE_22,POLIWAG,5,POLIWAG,10,POLIWAG,15,POLIWHIRL,15
- db ROUTE_23,POLIWAG,25,POLIWAG,30,POLIWHIRL,30,POLIWHIRL,40
- db VERMILION_DOCK,TENTACOOL,10,TENTACOOL,15,STARYU,15,SHELLDER,10
- db SAFARI_ZONE_CENTER,MAGIKARP,5,MAGIKARP,10,DRATINI,10,DRAGONAIR,15
- db SAFARI_ZONE_EAST,MAGIKARP,5,MAGIKARP,10,MAGIKARP,15,DRATINI,15
- db SAFARI_ZONE_NORTH,MAGIKARP,5,MAGIKARP,10,MAGIKARP,15,DRATINI,15
- db SAFARI_ZONE_WEST,MAGIKARP,5,MAGIKARP,10,MAGIKARP,15,DRATINI,15
- db SEAFOAM_ISLANDS_B3F,KRABBY,25,STARYU,20,KINGLER,35,STARYU,40
- db SEAFOAM_ISLANDS_B4F,KRABBY,25,STARYU,20,KINGLER,35,STARYU,40
- db CERULEAN_CAVE_1F,GOLDEEN,25,SEAKING,35,SEAKING,45,SEAKING,55
- db CERULEAN_CAVE_B1F,GOLDEEN,30,SEAKING,40,SEAKING,50,SEAKING,60
- db $ff
diff --git a/data/text/alphabets.asm b/data/text/alphabets.asm
new file mode 100644
index 00000000..07e6cf96
--- /dev/null
+++ b/data/text/alphabets.asm
@@ -0,0 +1,15 @@
+LowerCaseAlphabet:
+ db "abcdefghi"
+ db "jklmnopqr"
+ db "stuvwxyz "
+ db "×():;[]<PK><MN>"
+ db "-?!♂♀/<DOT>,<ED>"
+ db "UPPER CASE@"
+
+UpperCaseAlphabet:
+ db "ABCDEFGHI"
+ db "JKLMNOPQR"
+ db "STUVWXYZ "
+ db "×():;[]<PK><MN>"
+ db "-?!♂♀/<DOT>,<ED>"
+ db "lower case@"
diff --git a/data/text/dakutens.asm b/data/text/dakutens.asm
new file mode 100644
index 00000000..7a53c71f
--- /dev/null
+++ b/data/text/dakutens.asm
@@ -0,0 +1,15 @@
+Dakutens:
+ db "かが", "きぎ", "くぐ", "けげ", "こご"
+ db "さざ", "しじ", "すず", "せぜ", "そぞ"
+ db "ただ", "ちぢ", "つづ", "てで", "とど"
+ db "はば", "ひび", "ふぶ", "へべ", "ほぼ"
+ db "カガ", "キギ", "クグ", "ケゲ", "コゴ"
+ db "サザ", "シジ", "スズ", "セゼ", "ソゾ"
+ db "タダ", "チヂ", "ツヅ", "テデ", "トド"
+ db "ハバ", "ヒビ", "フブ", "へべ", "ホボ"
+ db -1 ; end
+
+Handakutens:
+ db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ"
+ db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ"
+ db -1 ; end
diff --git a/data/text/text_1.asm b/data/text/text_1.asm
new file mode 100644
index 00000000..eb394afe
--- /dev/null
+++ b/data/text/text_1.asm
@@ -0,0 +1,154 @@
+_CardKeySuccessText1::
+ text "Bingo!@"
+ text_end
+
+_CardKeySuccessText2::
+ text_start
+ line "The CARD KEY"
+ cont "opened the door!"
+ done
+
+_CardKeyFailText::
+ text "Darn! It needs a"
+ line "CARD KEY!"
+ done
+
+_TrainerNameText::
+ text_ram wcd6d
+ text ": @"
+ text_end
+
+_NoNibbleText::
+ text "Not even a nibble!"
+ prompt
+
+_NothingHereText::
+ text "Looks like there's"
+ line "nothing here."
+ prompt
+
+_ItsABiteText::
+ text "Oh!"
+ line "It's a bite!"
+ prompt
+
+_ExclamationText::
+ text "!"
+ done
+
+_GroundRoseText::
+ text "Ground rose up"
+ line "somewhere!"
+ done
+
+_BoulderText::
+ text "This requires"
+ line "STRENGTH to move!"
+ done
+
+_MartSignText::
+ text "All your item"
+ line "needs fulfilled!"
+ cont "#MON MART"
+ done
+
+_PokeCenterSignText::
+ text "Heal Your #MON!"
+ line "#MON CENTER"
+ done
+
+_FoundItemText::
+ text "<PLAYER> found"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_NoMoreRoomForItemText::
+ text "No more room for"
+ line "items!"
+ done
+
+_OaksAideHiText::
+ text "Hi! Remember me?"
+ line "I'm PROF.OAK's"
+ cont "AIDE!"
+
+ para "If you caught @"
+ text_decimal hOaksAideRequirement, 1, 3
+ text_start
+ line "kinds of #MON,"
+ cont "I'm supposed to"
+ cont "give you an"
+ cont "@"
+ text_ram wOaksAideRewardItemName
+ text "!"
+
+ para "So, <PLAYER>! Have"
+ line "you caught at"
+ cont "least @"
+ text_decimal hOaksAideRequirement, 1, 3
+ text " kinds of"
+ cont "#MON?"
+ done
+
+_OaksAideUhOhText::
+ text "Let's see..."
+ line "Uh-oh! You have"
+ cont "caught only @"
+ text_decimal hOaksAideNumMonsOwned, 1, 3
+ text_start
+ cont "kinds of #MON!"
+
+ para "You need @"
+ text_decimal hOaksAideRequirement, 1, 3
+ text " kinds"
+ line "if you want the"
+ cont "@"
+ text_ram wOaksAideRewardItemName
+ text "."
+ done
+
+_OaksAideComeBackText::
+ text "Oh. I see."
+
+ para "When you get @"
+ text_decimal hOaksAideRequirement, 1, 3
+ text_start
+ line "kinds, come back"
+ cont "for @"
+ text_ram wOaksAideRewardItemName
+ text "."
+ done
+
+_OaksAideHereYouGoText::
+ text "Great! You have"
+ line "caught @"
+ text_decimal hOaksAideNumMonsOwned, 1, 3
+ text " kinds "
+ cont "of #MON!"
+ cont "Congratulations!"
+
+ para "Here you go!"
+ prompt
+
+_OaksAideGotItemText::
+ text "<PLAYER> got the"
+ line "@"
+ text_ram wOaksAideRewardItemName
+ text "!@"
+ text_end
+
+_OaksAideNoRoomText::
+ text "Oh! I see you"
+ line "don't have any"
+ cont "room for the"
+ cont "@"
+ text_ram wOaksAideRewardItemName
+ text "."
+ done
+
+_NurseChanseyText::
+ text "CHANSEY: Chaaan"
+ line "sey!"
+ done
diff --git a/data/text/text_2.asm b/data/text/text_2.asm
new file mode 100644
index 00000000..f1e5b68d
--- /dev/null
+++ b/data/text/text_2.asm
@@ -0,0 +1,1322 @@
+_AIBattleWithdrawText::
+ text_ram wTrainerName
+ text " with-"
+ line "drew @"
+ text_ram wEnemyMonNick
+ text "!"
+ prompt
+
+_AIBattleUseItemText::
+ text_ram wTrainerName
+ text_start
+ line "used @"
+ text_ram wcd6d
+ text_start
+ cont "on @"
+ text_ram wEnemyMonNick
+ text "!"
+ prompt
+
+_BoxFullTest::
+ text "The BOX is full!"
+ done
+
+_BoxWillBeClearedText::
+ text "The BOX will be"
+ line "cleared."
+ done
+
+_TradeWentToText::
+ text_ram wcf4b
+ text " went"
+ line "to @"
+ text_ram wLinkEnemyTrainerName
+ text "."
+ done
+
+_TradeForText::
+ text "For <PLAYER>'s"
+ line "@"
+ text_ram wcf4b
+ text ","
+ done
+
+_TradeSendsText::
+ text_ram wLinkEnemyTrainerName
+ text " sends"
+ line "@"
+ text_ram wcd6d
+ text "."
+ done
+
+_TradeWavesFarewellText::
+ text_ram wLinkEnemyTrainerName
+ text " waves"
+ line "farewell as"
+ done
+
+_TradeTransferredText::
+ text_ram wcd6d
+ text " is"
+ line "transferred."
+ done
+
+_TradeTakeCareText::
+ text "Take good care of"
+ line "@"
+ text_ram wcd6d
+ text "."
+ done
+
+_TradeWillTradeText::
+ text_ram wLinkEnemyTrainerName
+ text " will"
+ line "trade @"
+ text_ram wcd6d
+ text_start
+ done
+
+_TradeforText::
+ text "for <PLAYER>'s"
+ line "@"
+ text_ram wcf4b
+ text "."
+ done
+
+_PlaySlotMachineText::
+ text "A slot machine!"
+ line "Want to play?"
+ done
+
+_OutOfCoinsSlotMachineText::
+ text "Darn!"
+ line "Ran out of coins!"
+ done
+
+_BetHowManySlotMachineText::
+ text "Bet how many"
+ line "coins?"
+ done
+
+_StartSlotMachineText::
+ text "Start!"
+ done
+
+_NotEnoughCoinsSlotMachineText::
+ text "Not enough"
+ line "coins!"
+ prompt
+
+_OneMoreGoSlotMachineText::
+ text "One more "
+ line "go?"
+ done
+
+_LinedUpText::
+ text " lined up!"
+ line "Scored @"
+ text_ram wcf4b
+ text " coins!"
+ done
+
+_NotThisTimeText::
+ text "Not this time!"
+ prompt
+
+_YeahText::
+ text "Yeah!@"
+ text_end
+
+_DexSeenOwnedText::
+ text "#DEX Seen:@"
+ text_decimal wDexRatingNumMonsSeen, 1, 3
+ text_start
+ line " Owned:@"
+ text_decimal wDexRatingNumMonsOwned, 1, 3
+ text_end
+
+_DexRatingText::
+ text "#DEX Rating<COLON>"
+ done
+
+_GymStatueText1::
+ text_ram wGymCityName
+ text_start
+ line "#MON GYM"
+ cont "LEADER: @"
+ text_ram wGymLeaderName
+ text_start
+
+ para "WINNING TRAINERS:"
+ line "<RIVAL>"
+ done
+
+_GymStatueText2::
+ text_ram wGymCityName
+ text_start
+ line "#MON GYM"
+ cont "LEADER: @"
+ text_ram wGymLeaderName
+ text_start
+
+ para "WINNING TRAINERS:"
+ line "<RIVAL>"
+ cont "<PLAYER>"
+ done
+
+_ViridianCityPokecenterGuyText::
+ text "#MON CENTERs"
+ line "heal your tired,"
+ cont "hurt or fainted"
+ cont "#MON!"
+ done
+
+_PewterCityPokecenterGuyText::
+ text "Yawn!"
+
+ para "When JIGGLYPUFF"
+ line "sings, #MON"
+ cont "get drowsy..."
+
+ para "...Me too..."
+ line "Snore..."
+ done
+
+_CeruleanPokecenterGuyText::
+ text "BILL has lots of"
+ line "#MON!"
+
+ para "He collects rare"
+ line "ones too!"
+ done
+
+_LavenderPokecenterGuyText::
+ text "CUBONEs wear"
+ line "skulls, right?"
+
+ para "People will pay a"
+ line "lot for one!"
+ done
+
+_MtMoonPokecenterBenchGuyText::
+ text "If you have too"
+ line "many #MON, you"
+ cont "should store them"
+ cont "via PC!"
+ done
+
+_RockTunnelPokecenterGuyText::
+ text "I heard that"
+ line "GHOSTs haunt"
+ cont "LAVENDER TOWN!"
+ done
+
+_UnusedBenchGuyText1::
+ text "I wish I could"
+ line "catch #MON."
+ done
+
+_UnusedBenchGuyText2::
+ text "I'm tired from"
+ line "all the fun..."
+ done
+
+_UnusedBenchGuyText3::
+ text "SILPH's manager"
+ line "is hiding in the"
+ cont "SAFARI ZONE."
+ done
+
+_VermilionPokecenterGuyText::
+ text "It is true that a"
+ line "higher level"
+ cont "#MON will be"
+ cont "more powerful..."
+
+ para "But, all #MON"
+ line "will have weak"
+ cont "points against"
+ cont "specific types."
+
+ para "So, there is no"
+ line "universally"
+ cont "strong #MON."
+ done
+
+_CeladonCityPokecenterGuyText::
+ text "If I had a BIKE,"
+ line "I would go to"
+ cont "CYCLING ROAD!"
+ done
+
+_FuchsiaCityPokecenterGuyText::
+ text "If you're studying "
+ line "#MON, visit"
+ cont "the SAFARI ZONE."
+
+ para "It has all sorts"
+ line "of rare #MON."
+ done
+
+_CinnabarPokecenterGuyText::
+ text "#MON can still"
+ line "learn techniques"
+ cont "after canceling"
+ cont "evolution."
+
+ para "Evolution can wait"
+ line "until new moves"
+ cont "have been learned."
+ done
+
+_SaffronCityPokecenterGuyText1::
+ text "It would be great"
+ line "if the ELITE FOUR"
+ cont "came and stomped"
+ cont "TEAM ROCKET!"
+ done
+
+_SaffronCityPokecenterGuyText2::
+ text "TEAM ROCKET took"
+ line "off! We can go"
+ cont "out safely again!"
+ cont "That's great!"
+ done
+
+_CeladonCityHotelText::
+ text "My sis brought me"
+ line "on this vacation!"
+ done
+
+_BookcaseText::
+ text "Crammed full of"
+ line "#MON books!"
+ done
+
+_NewBicycleText::
+ text "A shiny new"
+ line "BICYCLE!"
+ done
+
+_PushStartText::
+ text "Push START to"
+ line "open the MENU!"
+ done
+
+_SaveOptionText::
+ text "The SAVE option is"
+ line "on the MENU"
+ cont "screen."
+ done
+
+_StrengthsAndWeaknessesText::
+ text "All #MON types"
+ line "have strong and"
+ cont "weak points"
+ cont "against others."
+ done
+
+_TimesUpText::
+ text "PA: Ding-dong!"
+
+ para "Time's up!"
+ prompt
+
+_GameOverText::
+ text "PA: Your SAFARI"
+ line "GAME is over!"
+ done
+
+_CinnabarGymQuizDummyIntroText::
+ text "#MON Quiz!"
+
+ para "Get it right and"
+ line "the door opens to"
+ cont "the next room!"
+
+ para "Get it wrong and"
+ line "face a trainer!"
+
+ para "If you want to"
+ line "conserve your"
+ cont "#MON for the"
+ cont "GYM LEADER..."
+
+ para "Then get it right!"
+ line "Here we go!"
+ prompt
+
+_CinnabarGymQuizIntroText::
+ text "#MON Quiz!"
+
+ para "Get it right and"
+ line "the door opens to"
+ cont "the next room!"
+
+ para "Get it wrong and"
+ line "face the trainer"
+ cont "blocking the way!"
+
+ para "If you want to"
+ line "conserve your"
+ cont "#MON for the"
+ cont "GYM LEADER..."
+
+ para "Then get it right!"
+ line "Here we go!"
+ para ""
+ done
+
+_CinnabarGymQuizShortIntroText::
+ text "#MON Quiz!"
+
+ line "Test your skill!"
+ para ""
+ done
+
+_CinnabarQuizQuestionsText1::
+ text "CATERPIE evolves"
+ line "into BUTTERFREE?"
+ done
+
+_CinnabarQuizQuestionsText2::
+ text "There are 9"
+ line "certified #MON"
+ cont "LEAGUE BADGEs?"
+ done
+
+_CinnabarQuizQuestionsText3::
+ text "POLIWAG evolves 3"
+ line "times?"
+ done
+
+_CinnabarQuizQuestionsText4::
+ text "Are thunder moves"
+ line "effective against"
+ cont "ground element-"
+ cont "type #MON?"
+ done
+
+_CinnabarQuizQuestionsText5::
+ text "#MON of the"
+ line "same kind and"
+ cont "level are not"
+ cont "identical?"
+ done
+
+_CinnabarQuizQuestionsText6::
+ text "TM28 contains"
+ line "TOMBSTONER?"
+ done
+
+_CinnabarGymQuizCorrectText::
+ text "You're absolutely"
+ line "correct!"
+
+ para "Go on through!@"
+ text_end
+
+_CinnabarGymQuizIncorrectText::
+ text "Sorry! Bad call!"
+ prompt
+
+_MagazinesText::
+ text "#MON magazines!"
+
+ para "#MON notebooks!"
+
+ para "#MON graphs!"
+ done
+
+_BillsHouseMonitorText::
+ text "TELEPORTER is"
+ line "displayed on the"
+ cont "PC monitor."
+ done
+
+_BillsHouseInitiatedText::
+ text "<PLAYER> initiated"
+ line "TELEPORTER's Cell"
+ cont "Separator!@"
+ text_end
+
+_BillsHousePokemonListText1::
+ text "BILL's favorite"
+ line "#MON list!"
+ prompt
+
+_BillsHousePokemonListText2::
+ text "Which #MON do"
+ line "you want to see?"
+ done
+
+_OakLabEmailText::
+ text "There's an e-mail"
+ line "message here!"
+
+ para "..."
+
+ para "Calling all"
+ line "#MON trainers!"
+
+ para "The elite trainers"
+ line "of #MON LEAGUE"
+ cont "are ready to take"
+ cont "on all comers!"
+
+ para "Bring your best"
+ line "#MON and see"
+ cont "how you rate as a"
+ cont "trainer!"
+
+ para "#MON LEAGUE HQ"
+ line "INDIGO PLATEAU"
+
+ para "PS: PROF.OAK,"
+ line "please visit us!"
+ cont "..."
+ done
+
+_GameCornerCoinCaseText::
+ text "A COIN CASE is"
+ line "required!"
+ done
+
+_GameCornerNoCoinsText::
+ text "You don't have"
+ line "any coins!"
+ done
+
+_GameCornerOutOfOrderText::
+ text "OUT OF ORDER"
+ line "This is broken."
+ done
+
+_GameCornerOutToLunchText::
+ text "OUT TO LUNCH"
+ line "This is reserved."
+ done
+
+_GameCornerSomeonesKeysText::
+ text "Someone's keys!"
+ line "They'll be back."
+ done
+
+_JustAMomentText::
+ text "Just a moment."
+ done
+
+TMNotebookText::
+ text "It's a pamphlet"
+ line "on TMs."
+
+ para "..."
+
+ para "There are 50 TMs"
+ line "in all."
+
+ para "There are also 5"
+ line "HMs that can be"
+ cont "used repeatedly."
+
+ para "SILPH CO.@"
+ text_end
+
+_TurnPageText::
+ text "Turn the page?"
+ done
+
+_ViridianSchoolNotebookText5::
+ text "GIRL: Hey! Don't"
+ line "look at my notes!@"
+ text_end
+
+_ViridianSchoolNotebookText1::
+ text "Looked at the"
+ line "notebook!"
+
+ para "First page..."
+
+ para "# BALLs are"
+ line "used to catch"
+ cont "#MON."
+
+ para "Up to 6 #MON"
+ line "can be carried."
+
+ para "People who raise"
+ line "and make #MON"
+ cont "fight are called"
+ cont "#MON trainers."
+ prompt
+
+_ViridianSchoolNotebookText2::
+ text "Second page..."
+
+ para "A healthy #MON"
+ line "may be hard to"
+ cont "catch, so weaken"
+ cont "it first!"
+
+ para "Poison, burns and"
+ line "other damage are"
+ cont "effective!"
+ prompt
+
+_ViridianSchoolNotebookText3::
+ text "Third page..."
+
+ para "#MON trainers"
+ line "seek others to"
+ cont "engage in #MON"
+ cont "fights."
+
+ para "Battles are"
+ line "constantly fought"
+ cont "at #MON GYMs."
+ prompt
+
+_ViridianSchoolNotebookText4::
+ text "Fourth page..."
+
+ para "The goal for"
+ line "#MON trainers"
+ cont "is to beat the "
+ cont "top 8 #MON"
+ cont "GYM LEADERs."
+
+ para "Do so to earn the"
+ line "right to face..."
+
+ para "The ELITE FOUR of"
+ line "#MON LEAGUE!"
+ prompt
+
+_EnemiesOnEverySideText::
+ text "Enemies on every"
+ line "side!"
+ done
+
+_WhatGoesAroundComesAroundText::
+ text "What goes around"
+ line "comes around!"
+ done
+
+_FightingDojoText::
+ text "FIGHTING DOJO"
+ done
+
+_IndigoPlateauHQText::
+ text "INDIGO PLATEAU"
+ line "#MON LEAGUE HQ"
+ done
+
+_RedBedroomSNESText::
+ text "<PLAYER> is"
+ line "playing the SNES!"
+ cont "...Okay!"
+ cont "It's time to go!"
+ done
+
+_Route15UpstairsBinocularsText::
+ text "Looked into the"
+ line "binoculars..."
+
+ para "A large, shining"
+ line "bird is flying"
+ cont "toward the sea."
+ done
+
+_AerodactylFossilText::
+ text "AERODACTYL Fossil"
+ line "A primitive and"
+ cont "rare #MON."
+ done
+
+_KabutopsFossilText::
+ text "KABUTOPS Fossil"
+ line "A primitive and"
+ cont "rare #MON."
+ done
+
+_FanClubPicture1Text::
+ text "My cute RAPIDASH."
+ done
+
+_FanClubPicture2Text::
+ text "My beloved FEAROW."
+ done
+
+_LinkCableHelpText1::
+ text "TRAINER TIPS"
+
+ para "Using a Game Link"
+ line "Cable"
+ prompt
+
+_LinkCableHelpText2::
+ text "Which heading do"
+ line "you want to read?"
+ done
+
+_LinkCableInfoText1::
+ text "When you have"
+ line "linked your GAME"
+ cont "BOY with another"
+ cont "GAME BOY, talk to"
+ cont "the attendant on"
+ cont "the right in any"
+ cont "#MON CENTER."
+ prompt
+
+_LinkCableInfoText2::
+ text "COLOSSEUM lets"
+ line "you play against"
+ cont "a friend."
+ prompt
+
+_LinkCableInfoText3::
+ text "TRADE CENTER is"
+ line "used for trading"
+ cont "#MON."
+ prompt
+
+_ViridianSchoolBlackboardText1::
+ text "The blackboard"
+ line "describes #MON"
+ cont "STATUS changes"
+ cont "during battles."
+ prompt
+
+_ViridianSchoolBlackboardText2::
+ text "Which heading do"
+ line "you want to read?"
+ done
+
+_ViridianBlackboardSleepText::
+ text "A #MON can't"
+ line "attack if it's"
+ cont "asleep!"
+
+ para "#MON will stay"
+ line "asleep even after"
+ cont "battles."
+
+ para "Use AWAKENING to"
+ line "wake them up!"
+ prompt
+
+_ViridianBlackboardPoisonText::
+ text "When poisoned, a"
+ line "#MON's health"
+ cont "steadily drops."
+
+ para "Poison lingers"
+ line "after battles."
+
+ para "Use an ANTIDOTE"
+ line "to cure poison!"
+ prompt
+
+_ViridianBlackboardPrlzText::
+ text "Paralysis could"
+ line "make #MON"
+ cont "moves misfire!"
+
+ para "Paralysis remains"
+ line "after battles."
+
+ para "Use PARLYZ HEAL"
+ line "for treatment!"
+ prompt
+
+_ViridianBlackboardBurnText::
+ text "A burn reduces"
+ line "power and speed."
+ cont "It also causes"
+ cont "ongoing damage."
+
+ para "Burns remain"
+ line "after battles."
+
+ para "Use BURN HEAL to"
+ line "cure a burn!"
+ prompt
+
+_ViridianBlackboardFrozenText::
+ text "If frozen, a"
+ line "#MON becomes"
+ cont "totally immobile!"
+
+ para "It stays frozen"
+ line "even after the"
+ cont "battle ends."
+
+ para "Use ICE HEAL to"
+ line "thaw out #MON!"
+ prompt
+
+_VermilionGymTrashText::
+ text "Nope, there's"
+ line "only trash here."
+ done
+
+_VermilionGymTrashSuccessText1::
+ text "Hey! There's a"
+ line "switch under the"
+ cont "trash!"
+ cont "Turn it on!"
+
+ para "The 1st electric"
+ line "lock opened!@"
+ text_end
+
+_VermilionGymTrashSuccessText2::
+ text "Hey! There's"
+ line "another switch"
+ cont "under the trash!"
+ cont "Turn it on!"
+ prompt
+
+_VermilionGymTrashSuccessText3::
+ text "The 2nd electric"
+ line "lock opened!"
+
+ para "The motorized door"
+ line "opened!@"
+ text_end
+
+_VermilionGymTrashFailText::
+ text "Nope! There's"
+ line "only trash here."
+ cont "Hey! The electric"
+ cont "locks were reset!@"
+ text_end
+
+_FoundHiddenItemText::
+ text "<PLAYER> found"
+ line "@"
+ text_ram wcd6d
+ text "!@"
+ text_end
+
+_HiddenItemBagFullText::
+ text "But, <PLAYER> has"
+ line "no more room for"
+ cont "other items!"
+ done
+
+_FoundHiddenCoinsText::
+ text "<PLAYER> found"
+ line "@"
+ text_bcd hCoins, 2 | LEADING_ZEROES | LEFT_ALIGN
+ text " coins!@"
+ text_end
+
+_FoundHiddenCoins2Text::
+ text "<PLAYER> found"
+ line "@"
+ text_bcd hCoins, 2 | LEADING_ZEROES | LEFT_ALIGN
+ text " coins!@"
+ text_end
+
+_DroppedHiddenCoinsText::
+ text_start
+ para "Oops! Dropped"
+ line "some coins!"
+ done
+
+_IndigoPlateauStatuesText1::
+ text "INDIGO PLATEAU"
+ prompt
+
+_IndigoPlateauStatuesText2::
+ text "The ultimate goal"
+ line "of trainers!"
+ cont "#MON LEAGUE HQ"
+ done
+
+_IndigoPlateauStatuesText3::
+ text "The highest"
+ line "#MON authority"
+ cont "#MON LEAGUE HQ"
+ done
+
+_PokemonBooksText::
+ text "Crammed full of"
+ line "#MON books!"
+ done
+
+_DiglettSculptureText::
+ text "It's a sculpture"
+ line "of DIGLETT."
+ done
+
+_ElevatorText::
+ text "This is an"
+ line "elevator."
+ done
+
+_TownMapText::
+ text "A TOWN MAP.@"
+ text_end
+
+_PokemonStuffText::
+ text "Wow! Tons of"
+ line "#MON stuff!"
+ done
+
+_OutOfSafariBallsText::
+ text "PA: Ding-dong!"
+
+ para "You are out of"
+ line "SAFARI BALLs!"
+ prompt
+
+_WildRanText::
+ text "Wild @"
+ text_ram wEnemyMonNick
+ text_start
+ line "ran!"
+ prompt
+
+_EnemyRanText::
+ text "Enemy @"
+ text_ram wEnemyMonNick
+ text_start
+ line "ran!"
+ prompt
+
+_HurtByPoisonText::
+ text "<USER>'s"
+ line "hurt by poison!"
+ prompt
+
+_HurtByBurnText::
+ text "<USER>'s"
+ line "hurt by the burn!"
+ prompt
+
+_HurtByLeechSeedText::
+ text "LEECH SEED saps"
+ line "<USER>!"
+ prompt
+
+_EnemyMonFaintedText::
+ text "Enemy @"
+ text_ram wEnemyMonNick
+ text_start
+ line "fainted!"
+ prompt
+
+_MoneyForWinningText::
+ text "<PLAYER> got ¥@"
+ text_bcd wAmountMoneyWon, 3 | LEADING_ZEROES | LEFT_ALIGN
+ text_start
+ line "for winning!"
+ prompt
+
+_TrainerDefeatedText::
+ text "<PLAYER> defeated"
+ line "@"
+ text_ram wTrainerName
+ text "!"
+ prompt
+
+_PlayerMonFaintedText::
+ text_ram wBattleMonNick
+ text_start
+ line "fainted!"
+ prompt
+
+_UseNextMonText::
+ text "Use next #MON?"
+ done
+
+_Sony1WinText::
+ text "<RIVAL>: Yeah! Am"
+ line "I great or what?"
+ prompt
+
+_PlayerBlackedOutText2::
+ text "<PLAYER> is out of"
+ line "useable #MON!"
+
+ para "<PLAYER> blacked"
+ line "out!"
+ prompt
+
+_LinkBattleLostText::
+ text "<PLAYER> lost to"
+ line "@"
+ text_ram wTrainerName
+ text "!"
+ prompt
+
+_TrainerAboutToUseText::
+ text_ram wTrainerName
+ text " is"
+ line "about to use"
+ cont"@"
+ text_ram wEnemyMonNick
+ text "!"
+
+ para "Will <PLAYER>"
+ line "change #MON?"
+ done
+
+_TrainerSentOutText::
+ text_ram wTrainerName
+ text " sent"
+ line "out @"
+ text_ram wEnemyMonNick
+ text "!"
+ done
+
+_NoWillText::
+ text "There's no will"
+ line "to fight!"
+ prompt
+
+_CantEscapeText::
+ text "Can't escape!"
+ prompt
+
+_NoRunningText::
+ text "No! There's no"
+ line "running from a"
+ cont "trainer battle!"
+ prompt
+
+_GotAwayText::
+ text "Got away safely!"
+ prompt
+
+_RunAwayText::
+ text "Hurry, get away!"
+ prompt
+
+_ItemsCantBeUsedHereText::
+ text "Items can't be"
+ line "used here."
+ prompt
+
+_AlreadyOutText::
+ text_ram wBattleMonNick
+ text " is"
+ line "already out!"
+ prompt
+
+_MoveNoPPText::
+ text "No PP left for"
+ line "this move!"
+ prompt
+
+_MoveDisabledText::
+ text "The move is"
+ line "disabled!"
+ prompt
+
+_NoMovesLeftText::
+ text_ram wBattleMonNick
+ text " has no"
+ line "moves left!"
+ done
+
+_MultiHitText::
+ text "Hit the enemy"
+ line "@"
+ text_decimal wPlayerNumHits,1,1
+ text " times!"
+ prompt
+
+_ScaredText::
+ text_ram wBattleMonNick
+ text " is too"
+ line "scared to move!"
+ prompt
+
+_GetOutText::
+ text "GHOST: Get out..."
+ line "Get out..."
+ prompt
+
+_FastAsleepText::
+ text "<USER>"
+ line "is fast asleep!"
+ prompt
+
+_WokeUpText::
+ text "<USER>"
+ line "woke up!"
+ prompt
+
+_IsFrozenText::
+ text "<USER>"
+ line "is frozen solid!"
+ prompt
+
+_FullyParalyzedText::
+ text "<USER>'s"
+ line "fully paralyzed!"
+ prompt
+
+_FlinchedText::
+ text "<USER>"
+ line "flinched!"
+ prompt
+
+_MustRechargeText::
+ text "<USER>"
+ line "must recharge!"
+ prompt
+
+_DisabledNoMoreText::
+ text "<USER>'s"
+ line "disabled no more!"
+ prompt
+
+_IsConfusedText::
+ text "<USER>"
+ line "is confused!"
+ prompt
+
+_HurtItselfText::
+ text "It hurt itself in"
+ line "its confusion!"
+ prompt
+
+_ConfusedNoMoreText::
+ text "<USER>'s"
+ line "confused no more!"
+ prompt
+
+_SavingEnergyText::
+ text "<USER>"
+ line "is saving energy!"
+ prompt
+
+_UnleashedEnergyText::
+ text "<USER>"
+ line "unleashed energy!"
+ prompt
+
+_ThrashingAboutText::
+ text "<USER>'s"
+ line "thrashing about!"
+ done
+
+_AttackContinuesText::
+ text "<USER>'s"
+ line "attack continues!"
+ done
+
+_CantMoveText::
+ text "<USER>"
+ line "can't move!"
+ prompt
+
+_MoveIsDisabledText::
+ text "<USER>'s"
+ line "@"
+ text_ram wcd6d
+ text " is"
+ cont "disabled!"
+ prompt
+
+_MonName1Text::
+ text "<USER>@"
+ text_end
+
+_Used1Text::
+ text_start
+ line "used @"
+ text_end
+
+_Used2Text::
+ text_start
+ line "used @"
+ text_end
+
+_InsteadText::
+ text "instead,"
+ cont "@"
+ text_end
+
+_CF4BText::
+ text_ram wcf4b
+ text "@"
+
+_ExclamationPoint1Text::
+ text "!"
+ done
+
+_ExclamationPoint2Text::
+ text "!"
+ done
+
+_ExclamationPoint3Text::
+ text "!"
+ done
+
+_ExclamationPoint4Text::
+ text "!"
+ done
+
+_ExclamationPoint5Text::
+ text "!"
+ done
+
+_AttackMissedText::
+ text "<USER>'s"
+ line "attack missed!"
+ prompt
+
+_KeptGoingAndCrashedText::
+ text "<USER>"
+ line "kept going and"
+ cont "crashed!"
+ prompt
+
+_UnaffectedText::
+ text "<TARGET>'s"
+ line "unaffected!"
+ prompt
+
+_DoesntAffectMonText::
+ text "It doesn't affect"
+ line "<TARGET>!"
+ prompt
+
+_CriticalHitText::
+ text "Critical hit!"
+ prompt
+
+_OHKOText::
+ text "One-hit KO!"
+ prompt
+
+_LoafingAroundText::
+ text_ram wBattleMonNick
+ text " is"
+ line "loafing around."
+ prompt
+
+_BeganToNapText::
+ text_ram wBattleMonNick
+ text " began"
+ line "to nap!"
+ prompt
+
+_WontObeyText::
+ text_ram wBattleMonNick
+ text " won't"
+ line "obey!"
+ prompt
+
+_TurnedAwayText::
+ text_ram wBattleMonNick
+ text " turned"
+ line "away!"
+ prompt
+
+_IgnoredOrdersText::
+ text_ram wBattleMonNick
+ text_start
+ line "ignored orders!"
+ prompt
+
+_SubstituteTookDamageText::
+ text "The SUBSTITUTE"
+ line "took damage for"
+ cont "<TARGET>!"
+ prompt
+
+_SubstituteBrokeText::
+ text "<TARGET>'s"
+ line "SUBSTITUTE broke!"
+ prompt
+
+_BuildingRageText::
+ text "<USER>'s"
+ line "RAGE is building!"
+ prompt
+
+_MirrorMoveFailedText::
+ text "The MIRROR MOVE"
+ next "failed!"
+ prompt
+
+_HitXTimesText::
+ text "Hit @"
+ text_decimal wEnemyNumHits, 1, 1
+ text " times!"
+ prompt
+
+_GainedText::
+ text_ram wcd6d
+ text " gained"
+ line "@"
+ text_end
+
+_WithExpAllText::
+ text "with EXP.ALL,"
+ cont "@"
+ text_end
+
+_BoostedText::
+ text "a boosted"
+ cont "@"
+ text_end
+
+_ExpPointsText::
+ text_decimal wExpAmountGained, 2, 4
+ text " EXP. Points!"
+ prompt
+
+_GrewLevelText::
+ text_ram wcd6d
+ text " grew"
+ line "to level @"
+ text_decimal wCurEnemyLVL, 1, 3
+ text "!@"
+ text_end
+
+_SuperEffectiveText::
+ text "It's super"
+ line "effective!"
+ prompt
+
+_NotVeryEffectiveText::
+ text "It's not very"
+ line "effective..."
+ prompt
+
+_SafariZoneEatingText::
+ text "Wild @"
+ text_ram wEnemyMonNick
+ text_start
+ line "is eating!"
+ prompt
+
+_SafariZoneAngryText::
+ text "Wild @"
+ text_ram wEnemyMonNick
+ text_start
+ line "is angry!"
+ prompt
+
+_WildMonAppearedText::
+ text "Wild @"
+ text_ram wEnemyMonNick
+ text_start
+ line "appeared!"
+ prompt
+
+_HookedMonAttackedText::
+ text "The hooked"
+ line "@"
+ text_ram wEnemyMonNick
+ text_start
+ cont "attacked!"
+ prompt
diff --git a/data/text/text_3.asm b/data/text/text_3.asm
new file mode 100644
index 00000000..bd418402
--- /dev/null
+++ b/data/text/text_3.asm
@@ -0,0 +1,637 @@
+_EnemyAppearedText::
+ text_ram wEnemyMonNick
+ text_start
+ line "appeared!"
+ prompt
+
+_TrainerWantsToFightText::
+ text_ram wTrainerName
+ text " wants"
+ line "to fight!"
+ prompt
+
+_UnveiledGhostText::
+ text "SILPH SCOPE"
+ line "unveiled the"
+ cont "GHOST's identity!"
+ prompt
+
+_GhostCantBeIDdText::
+ text "Darn! The GHOST"
+ line "can't be ID'd!"
+ prompt
+
+_GoText::
+ text "Go! @"
+ text_end
+
+_DoItText::
+ text "Do it! @"
+ text_end
+
+_GetmText::
+ text "Get'm! @"
+ text_end
+
+_EnemysWeakText::
+ text "The enemy's weak!"
+ line "Get'm! @"
+ text_end
+
+_PlayerMon1Text::
+ text_ram wBattleMonNick
+ text "!"
+ done
+
+_PlayerMon2Text::
+ text_ram wBattleMonNick
+ text " @"
+ text_end
+
+_EnoughText::
+ text "enough!@"
+ text_end
+
+_OKExclamationText::
+ text "OK!@"
+ text_end
+
+_GoodText::
+ text "good!@"
+ text_end
+
+_ComeBackText::
+ text_start
+ line "Come back!"
+ done
+
+; money related
+_PickUpPayDayMoneyText::
+ text "<PLAYER> picked up"
+ line "¥@"
+ text_bcd wTotalPayDayMoney, 3 | LEADING_ZEROES | LEFT_ALIGN
+ text "!"
+ prompt
+
+_ClearSaveDataText::
+ text "Clear all saved"
+ line "data?"
+ done
+
+_WhichFloorText::
+ text "Which floor do"
+ line "you want? "
+ done
+
+_SleepingPikachuText1::
+ text "There isn't any"
+ line "response..."
+ prompt
+
+_PartyMenuNormalText::
+ text "Choose a #MON."
+ done
+
+_PartyMenuItemUseText::
+ text "Use item on which"
+ line "#MON?"
+ done
+
+_PartyMenuBattleText::
+ text "Bring out which"
+ line "#MON?"
+ done
+
+_PartyMenuUseTMText::
+ text "Teach to which"
+ line "#MON?"
+ done
+
+_PartyMenuSwapMonText::
+ text "Move #MON"
+ line "where?"
+ done
+
+_PotionText::
+ text_ram wcd6d
+ text_start
+ line "recovered by @"
+ text_decimal wHPBarHPDifference, 2, 3
+ text "!"
+ done
+
+_AntidoteText::
+ text_ram wcd6d
+ text " was"
+ line "cured of poison!"
+ done
+
+_ParlyzHealText::
+ text_ram wcd6d
+ text "'s"
+ line "rid of paralysis!"
+ done
+
+_BurnHealText::
+ text_ram wcd6d
+ text "'s"
+ line "burn was healed!"
+ done
+
+_IceHealText::
+ text_ram wcd6d
+ text " was"
+ line "defrosted!"
+ done
+
+_AwakeningText::
+ text_ram wcd6d
+ text_start
+ line "woke up!"
+ done
+
+_FullHealText::
+ text_ram wcd6d
+ text "'s"
+ line "health returned!"
+ done
+
+_ReviveText::
+ text_ram wcd6d
+ text_start
+ line "is revitalized!"
+ done
+
+_RareCandyText::
+ text_ram wcd6d
+ text " grew"
+ line "to level @"
+ text_decimal wCurEnemyLVL, 1, 3
+ text "!@"
+ text_end
+
+_TurnedOnPC1Text::
+ text "<PLAYER> turned on"
+ line "the PC."
+ prompt
+
+_AccessedBillsPCText::
+ text "Accessed BILL's"
+ line "PC."
+
+ para "Accessed #MON"
+ line "Storage System."
+ prompt
+
+_AccessedSomeonesPCText::
+ text "Accessed someone's"
+ line "PC."
+
+ para "Accessed #MON"
+ line "Storage System."
+ prompt
+
+_AccessedMyPCText::
+ text "Accessed my PC."
+
+ para "Accessed Item"
+ line "Storage System."
+ prompt
+
+_TurnedOnPC2Text::
+ text "<PLAYER> turned on"
+ line "the PC."
+ prompt
+
+_WhatDoYouWantText::
+ text "What do you want"
+ line "to do?"
+ done
+
+_WhatToDepositText::
+ text "What do you want"
+ line "to deposit?"
+ done
+
+_DepositHowManyText::
+ text "How many?"
+ done
+
+_ItemWasStoredText::
+ text_ram wcd6d
+ text " was"
+ line "stored via PC."
+ prompt
+
+_NothingToDepositText::
+ text "You have nothing"
+ line "to deposit."
+ prompt
+
+_NoRoomToStoreText::
+ text "No room left to"
+ line "store items."
+ prompt
+
+_WhatToWithdrawText::
+ text "What do you want"
+ line "to withdraw?"
+ done
+
+_WithdrawHowManyText::
+ text "How many?"
+ done
+
+_WithdrewItemText::
+ text "Withdrew"
+ line "@"
+ text_ram wcd6d
+ text "."
+ prompt
+
+_NothingStoredText::
+ text "There is nothing"
+ line "stored."
+ prompt
+
+_CantCarryMoreText::
+ text "You can't carry"
+ line "any more items."
+ prompt
+
+_WhatToTossText::
+ text "What do you want"
+ line "to toss away?"
+ done
+
+_TossHowManyText::
+ text "How many?"
+ done
+
+_AccessedHoFPCText::
+ text "Accessed #MON"
+ line "LEAGUE's site."
+
+ para "Accessed the HALL"
+ line "OF FAME List."
+ prompt
+
+_SleepingPikachuText2::
+ text "There isn't any"
+ line "response..."
+ prompt
+
+_SwitchOnText::
+ text "Switch on!"
+ prompt
+
+_WhatText::
+ text "What?"
+ done
+
+_DepositWhichMonText::
+ text "Deposit which"
+ line "#MON?"
+ done
+
+_MonWasStoredText::
+ text_ram wcf4b
+ text " was"
+ line "stored in Box @"
+ text_ram wBoxNumString
+ text "."
+ prompt
+
+_CantDepositLastMonText::
+ text "You can't deposit"
+ line "the last #MON!"
+ prompt
+
+_BoxFullText::
+ text "Oops! This Box is"
+ line "full of #MON."
+ prompt
+
+_MonIsTakenOutText::
+ text_ram wcf4b
+ text " is"
+ line "taken out."
+ cont "Got @"
+ text_ram wcf4b
+ text "."
+ prompt
+
+_NoMonText::
+ text "What? There are"
+ line "no #MON here!"
+ prompt
+
+_CantTakeMonText::
+ text "You can't take"
+ line "any more #MON."
+
+ para "Deposit #MON"
+ line "first."
+ prompt
+
+_PikachuUnhappyText::
+ text_ram wcd6d
+ text " looks"
+ line "unhappy about it!"
+ prompt
+
+_ReleaseWhichMonText::
+ text "Release which"
+ line "#MON?"
+ done
+
+_OnceReleasedText::
+ text "Once released,"
+ line "@"
+ text_ram wcf4b
+ text " is"
+ cont "gone forever. OK?"
+ done
+
+_MonWasReleasedText::
+ text_ram wcf4b
+ text " was"
+ line "released outside."
+ cont "Bye @"
+
+_CF4BExclamationText::
+ text_ram wcf4b
+ text "!"
+ prompt
+
+_RequireCoinCaseText::
+ text "A COIN CASE is"
+ line "required!@"
+ text_end
+
+_ExchangeCoinsForPrizesText::
+ text "We exchange your"
+ line "coins for prizes."
+ prompt
+
+_WhichPrizeText::
+ text "Which prize do"
+ line "you want?"
+ done
+
+_HereYouGoText::
+ text "Here you go!@"
+ text_end
+
+_SoYouWantPrizeText::
+ text "So, you want"
+ line "@"
+ text_ram wcd6d
+ text "?"
+ done
+
+_SorryNeedMoreCoinsText::
+ text "Sorry, you need"
+ line "more coins.@"
+ text_end
+
+_OopsYouDontHaveEnoughRoomText::
+ text "Oops! You don't"
+ line "have enough room.@"
+ text_end
+
+_OhFineThenText::
+ text "Oh, fine then.@"
+ text_end
+
+_GetDexRatedText::
+ text "Want to get your"
+ line "#DEX rated?"
+ done
+
+_ClosedOaksPCText::
+ text "Closed link to"
+ line "PROF.OAK's PC.@"
+ text_end
+
+_AccessedOaksPCText::
+ text "Accessed PROF."
+ line "OAK's PC."
+
+ para "Accessed #DEX"
+ line "Rating System."
+ prompt
+
+_ExpressionText::
+ text "This expression is"
+ line "No. @"
+ text_decimal wExpressionNumber, 1, 2
+ text "."
+ prompt
+
+_NotEnoughMemoryText::
+ text "Not enough Yellow"
+ line "Version memory."
+ done
+
+_OakSpeechText1::
+ text "Hello there!"
+ line "Welcome to the"
+ cont "world of #MON!"
+
+ para "My name is OAK!"
+ line "People call me"
+ cont "the #MON PROF!"
+ prompt
+
+_OakSpeechText2A::
+ text "This world is"
+ line "inhabited by"
+ cont "creatures called"
+ cont "#MON!@"
+ text_end
+
+_OakSpeechText2B::
+ text $51,"For some people,"
+ line "#MON are"
+ cont "pets. Others use"
+ cont "them for fights."
+
+ para "Myself..."
+
+ para "I study #MON"
+ line "as a profession."
+ prompt
+
+_IntroducePlayerText::
+ text "First, what is"
+ line "your name?"
+ prompt
+
+_IntroduceRivalText::
+ text "This is my grand-"
+ line "son. He's been"
+ cont "your rival since"
+ cont "you were a baby."
+
+ para "...Erm, what is"
+ line "his name again?"
+ prompt
+
+_OakSpeechText3::
+ text "<PLAYER>!"
+
+ para "Your very own"
+ line "#MON legend is"
+ cont "about to unfold!"
+
+ para "A world of dreams"
+ line "and adventures"
+ cont "with #MON"
+ cont "awaits! Let's go!"
+ done
+
+_DoYouWantToNicknameText::
+ text "Do you want to"
+ line "give a nickname"
+ cont "to @"
+ text_ram wcd6d
+ text "?"
+ done
+
+_YourNameIsText::
+ text "Right! So your"
+ line "name is <PLAYER>!"
+ prompt
+
+_HisNameIsText::
+ text "That's right! I"
+ line "remember now! His"
+ cont "name is <RIVAL>!"
+ prompt
+
+_WillBeTradedText::
+ text_ram wNameOfPlayerMonToBeTraded
+ text " and"
+ line "@"
+ text_ram wcd6d
+ text " will"
+ cont "be traded."
+ done
+
+_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::
+ text_ram wcd6d
+ text " is over"
+ line "6’8” tall!"
+ prompt
+
+_ColosseumWeightText::
+ text_ram wcd6d
+ text " weighs"
+ line "over 44 pounds!"
+ prompt
+
+_ColosseumEvolvedText::
+ text_ram wcd6d
+ text " is an"
+ line "evolved #MON!"
+ prompt
+
+_ColosseumIneligibleText::
+ text "Your opponent is"
+ line "ineligible."
+ prompt
+
+_ColosseumWhereToText::
+ text "Where would you"
+ line "like to go?"
+ done
+
+_ColosseumPleaseWaitText::
+ text "OK, please wait"
+ line "just a moment."
+ done
+
+_ColosseumCanceledText::
+ text "The link was"
+ line "canceled."
+ done
+
+_ColosseumVersionText::
+ text "The game versions"
+ line "don't match."
+ prompt
+
+_TextIDErrorText::
+ text_decimal hSpriteIndexOrTextID, 1, 2
+ text " error."
+ done
+
+_ContCharText::
+ text "<_CONT>@"
+ text_end
+
+_NoPokemonText::
+ text "There are no"
+ line "#MON here!"
+ prompt
diff --git a/data/text/text_4.asm b/data/text/text_4.asm
new file mode 100644
index 00000000..4c3d6a9c
--- /dev/null
+++ b/data/text/text_4.asm
@@ -0,0 +1,56 @@
+_FileDataDestroyedText::
+ text "The file data is"
+ line "destroyed!"
+ prompt
+
+_WouldYouLikeToSaveText::
+ text "Would you like to"
+ line "SAVE the game?"
+ done
+
+_SavingText::
+ text "Saving..."
+ done
+
+_GameSavedText::
+ text "<PLAYER> saved"
+ line "the game!"
+ done
+
+_OlderFileWillBeErasedText::
+ text "The older file"
+ line "will be erased to"
+ cont "save. Okay?"
+ done
+
+_WhenYouChangeBoxText::
+ text "When you change a"
+ line "#MON BOX, data"
+ cont "will be saved."
+
+ para "Is that okay?"
+ done
+
+_ChooseABoxText::
+ text "Choose a"
+ line "<PKMN> BOX.@"
+ text_end
+
+_EvolvedText::
+ text_ram wcf4b
+ text " evolved"
+ done
+
+_IntoText::
+ text_start
+ line "into @"
+ text_ram wcd6d
+ text "!"
+ done
+
+_StoppedEvolvingText::
+ text "Huh? @"
+ text_ram wcf4b
+ text_start
+ line "stopped evolving!"
+ prompt
diff --git a/data/text/text_5.asm b/data/text/text_5.asm
new file mode 100644
index 00000000..fc758be9
--- /dev/null
+++ b/data/text/text_5.asm
@@ -0,0 +1,277 @@
+_IsEvolvingText::
+ text "What? @"
+ text_ram wcf4b
+ text_start
+ line "is evolving!"
+ done
+
+_FellAsleepText::
+ text "<TARGET>"
+ line "fell asleep!"
+ prompt
+
+_AlreadyAsleepText::
+ text "<TARGET>'s"
+ line "already asleep!"
+ prompt
+
+_PoisonedText::
+ text "<TARGET>"
+ line "was poisoned!"
+ prompt
+
+_BadlyPoisonedText::
+ text "<TARGET>'s"
+ line "badly poisoned!"
+ prompt
+
+_BurnedText::
+ text "<TARGET>"
+ line "was burned!"
+ prompt
+
+_FrozenText::
+ text "<TARGET>"
+ line "was frozen solid!"
+ prompt
+
+_FireDefrostedText::
+ text "Fire defrosted"
+ line "<TARGET>!"
+ prompt
+
+_MonsStatsRoseText::
+ text "<USER>'s"
+ line "@"
+ text_ram wcf4b
+ text "@"
+ text_end
+
+_GreatlyRoseText::
+ text "<SCROLL>greatly@"
+ text_end
+
+_RoseText::
+ text " rose!"
+ prompt
+
+_MonsStatsFellText::
+ text "<TARGET>'s"
+ line "@"
+ text_ram wcf4b
+ text "@"
+ text_end
+
+_GreatlyFellText::
+ text "<SCROLL>greatly@"
+ text_end
+
+_FellText::
+ text " fell!"
+ prompt
+
+_RanFromBattleText::
+ text "<USER>"
+ line "ran from battle!"
+ prompt
+
+_RanAwayScaredText::
+ text "<TARGET>"
+ line "ran away scared!"
+ prompt
+
+_WasBlownAwayText::
+ text "<TARGET>"
+ line "was blown away!"
+ prompt
+
+_ChargeMoveEffectText::
+ text "<USER>@"
+ text_end
+
+_MadeWhirlwindText::
+ text_start
+ line "made a whirlwind!"
+ prompt
+
+_TookInSunlightText::
+ text_start
+ line "took in sunlight!"
+ prompt
+
+_LoweredItsHeadText::
+ text_start
+ line "lowered its head!"
+ prompt
+
+_SkyAttackGlowingText::
+ text_start
+ line "is glowing!"
+ prompt
+
+_FlewUpHighText::
+ text_start
+ line "flew up high!"
+ prompt
+
+_DugAHoleText::
+ text_start
+ line "dug a hole!"
+ prompt
+
+_BecameConfusedText::
+ text "<TARGET>"
+ line "became confused!"
+ prompt
+
+_MimicLearnedMoveText::
+ text "<USER>"
+ line "learned"
+ cont "@"
+ text_ram wcd6d
+ text "!"
+ prompt
+
+_MoveWasDisabledText::
+ text "<TARGET>'s"
+ line "@"
+ text_ram wcd6d
+ text " was"
+ cont "disabled!"
+ prompt
+
+_NothingHappenedText::
+ text "Nothing happened!"
+ prompt
+
+_NoEffectText::
+ text "No effect!"
+ prompt
+
+_ButItFailedText::
+ text "But, it failed! "
+ prompt
+
+_DidntAffectText::
+ text "It didn't affect"
+ line "<TARGET>!"
+ prompt
+
+_IsUnaffectedText::
+ text "<TARGET>"
+ line "is unaffected!"
+ prompt
+
+_ParalyzedMayNotAttackText::
+ text "<TARGET>'s"
+ line "paralyzed! It may"
+ cont "not attack!"
+ prompt
+
+_SubstituteText::
+ text "It created a"
+ line "SUBSTITUTE!"
+ prompt
+
+_HasSubstituteText::
+ text "<USER>"
+ line "has a SUBSTITUTE!"
+ prompt
+
+_TooWeakSubstituteText::
+ text "Too weak to make"
+ line "a SUBSTITUTE!"
+ prompt
+
+_WasSeededText::
+ text "<TARGET>"
+ line "was seeded!"
+ prompt
+
+_EvadedAttackText::
+ text "<TARGET>"
+ line "evaded attack!"
+ prompt
+
+_HitWithRecoilText::
+ text "<USER>'s"
+ line "hit with recoil!"
+ prompt
+
+_ConvertedTypeText::
+ text "Converted type to"
+ line "<TARGET>'s!"
+ prompt
+
+_StatusChangesEliminatedText::
+ text "All STATUS changes"
+ line "are eliminated!"
+ prompt
+
+_GettingPumpedText::
+ text "<USER>'s"
+ line "getting pumped!"
+ prompt
+
+_StartedSleepingEffect::
+ text "<USER>"
+ line "started sleeping!"
+ done
+
+_FellAsleepBecameHealthyText::
+ text "<USER>"
+ line "fell asleep and"
+ cont "became healthy!"
+ done
+
+_RegainedHealthText::
+ text "<USER>"
+ line "regained health!"
+ prompt
+
+_TransformedText::
+ text "<USER>"
+ line "transformed into"
+ cont "@"
+ text_ram wcd6d
+ text "!"
+ prompt
+
+_LightScreenProtectedText::
+ text "<USER>'s"
+ line "protected against"
+ cont "special attacks!"
+ prompt
+
+_ReflectGainedArmorText::
+ text "<USER>"
+ line "gained armor!"
+ prompt
+
+_ShroudedInMistText::
+ text "<USER>'s"
+ line "shrouded in mist!"
+ prompt
+
+_CoinsScatteredText::
+ text "Coins scattered"
+ line "everywhere!"
+ prompt
+
+_SuckedHealthText::
+ text "Sucked health from"
+ line "<TARGET>!"
+ prompt
+
+_DreamWasEatenText::
+ text "<TARGET>'s"
+ line "dream was eaten!"
+ prompt
+
+_TradeCenterText1::
+ text "!"
+ done
+
+_ColosseumText1::
+ text "!"
+ done
diff --git a/data/text/text_6.asm b/data/text/text_6.asm
new file mode 100644
index 00000000..bcdc75a3
--- /dev/null
+++ b/data/text/text_6.asm
@@ -0,0 +1,10 @@
+TeachingHMsText::
+ text "Once a #MON"
+ line "learns an HM, the"
+ cont "technique can't"
+ cont "be replaced."
+
+ para "Better think care-"
+ line "fully before you"
+ cont "teach HM moves."
+ done
diff --git a/data/text/text_7.asm b/data/text/text_7.asm
new file mode 100644
index 00000000..88c7d884
--- /dev/null
+++ b/data/text/text_7.asm
@@ -0,0 +1,216 @@
+_PokemonText::
+ text "#MON!"
+ done
+
+_PokemartGreetingText::
+ text "Hi there!"
+ next "May I help you?"
+ done
+
+_PokemonFaintedText::
+ text_ram wcd6d
+ text_start
+ line "fainted!"
+ done
+
+_PlayerBlackedOutText::
+ text "<PLAYER> is out of"
+ line "useable #MON!"
+
+ para "<PLAYER> blacked"
+ line "out!"
+ prompt
+
+_RepelWoreOffText::
+ text "REPEL's effect"
+ line "wore off."
+ done
+
+_PokemartBuyingGreetingText::
+ text "Take your time."
+ done
+
+_PokemartTellBuyPriceText::
+ text_ram wcf4b
+ text "?"
+ line "That will be"
+ cont "¥@"
+ text_bcd hMoney, 3 | LEADING_ZEROES | LEFT_ALIGN
+ text ". OK?"
+ done
+
+_PokemartBoughtItemText::
+ text "Here you are!"
+ line "Thank you!"
+ prompt
+
+_PokemartNotEnoughMoneyText::
+ text "You don't have"
+ line "enough money."
+ prompt
+
+_PokemartItemBagFullText::
+ text "You can't carry"
+ line "any more items."
+ prompt
+
+_PokemonSellingGreetingText::
+ text "What would you"
+ line "like to sell?"
+ done
+
+_PokemartTellSellPriceText::
+ text "I can pay you"
+ line "¥@"
+ text_bcd hMoney, 3 | LEADING_ZEROES | LEFT_ALIGN
+ text " for that."
+ done
+
+_PokemartItemBagEmptyText::
+ text "You don't have"
+ line "anything to sell."
+ prompt
+
+_PokemartUnsellableItemText::
+ text "I can't put a"
+ line "price on that."
+ prompt
+
+_PokemartThankYouText::
+ text "Thank you!"
+ done
+
+_PokemartAnythingElseText::
+ text "Is there anything"
+ line "else I can do?"
+ done
+
+_LearnedMove1Text::
+ text_ram wLearnMoveMonName
+ text " learned"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_WhichMoveToForgetText::
+ text "Which move should"
+ next "be forgotten?"
+ done
+
+_AbandonLearningText::
+ text "Abandon learning"
+ line "@"
+ text_ram wcf4b
+ text "?"
+ done
+
+_DidNotLearnText::
+ text_ram wLearnMoveMonName
+ text_start
+ line "did not learn"
+ cont "@"
+ text_ram wcf4b
+ text "!"
+ prompt
+
+_TryingToLearnText::
+ text_ram wLearnMoveMonName
+ text " is"
+ line "trying to learn"
+ cont "@"
+ text_ram wcf4b
+ text "!"
+
+ para "But, @"
+ text_ram wLearnMoveMonName
+ text_start
+ line "can't learn more"
+ cont "than 4 moves!"
+
+ para "Delete an older"
+ line "move to make room"
+ cont "for @"
+ text_ram wcf4b
+ text "?"
+ done
+
+_OneTwoAndText::
+ text "1, 2 and...@"
+ text_end
+
+_PoofText::
+ text " Poof!@"
+ text_end
+
+_ForgotAndText::
+ text_start
+ para "@"
+ text_ram wLearnMoveMonName
+ text " forgot"
+ line "@"
+ text_ram wcd6d
+ text "!"
+
+ para "And..."
+ prompt
+
+_HMCantDeleteText::
+ text "HM techniques"
+ line "can't be deleted!"
+ prompt
+
+_PokemonCenterWelcomeText::
+ text "Welcome to our"
+ line "#MON CENTER!"
+
+ para "We heal your"
+ line "#MON back to"
+ cont "perfect health!"
+ prompt
+
+_ShallWeHealYourPokemonText::
+ text "Shall we heal your"
+ line "#MON?"
+ done
+
+_NeedYourPokemonText::
+ text "OK. We'll need"
+ line "your #MON."
+ done
+
+_PokemonFightingFitText::
+ text "Thank you!"
+ line "Your #MON are"
+ cont "fighting fit!"
+ prompt
+
+_PokemonCenterFarewellText::
+ text "We hope to see"
+ line "you again!"
+ done
+
+_LooksContentText::
+ text "It looks very"
+ line "content asleep."
+ done
+
+_CableClubNPCAreaReservedFor2FriendsLinkedByCableText::
+ text "This area is"
+ line "reserved for 2"
+ cont "friends who are"
+ cont "linked by cable."
+ done
+
+_CableClubNPCWelcomeText::
+ text "Welcome to the"
+ line "Cable Club!"
+ done
+
+_CableClubNPCPleaseApplyHereHaveToSaveText::
+ text "Please apply here."
+
+ para "Before opening"
+ line "the link, we have"
+ cont "to save the game."
+ done
diff --git a/data/text/text_8.asm b/data/text/text_8.asm
new file mode 100644
index 00000000..d8d11d50
--- /dev/null
+++ b/data/text/text_8.asm
@@ -0,0 +1,118 @@
+_CableClubNPCPleaseWaitText::
+ text "Please wait.@"
+ text_end
+
+_CableClubNPCLinkClosedBecauseOfInactivityText::
+ text "The link has been"
+ line "closed because of"
+ cont "inactivity."
+
+ para "Please contact"
+ line "your friend and"
+ cont "come again!"
+ done
+
+_CableClubNPCPleaseComeAgainText::
+ text "Please come again!"
+ done
+
+_CableClubNPCMakingPreparationsText::
+ text "We're making"
+ line "preparations."
+ cont "Please wait."
+ done
+
+_FlashLightsAreaText::
+ text "A blinding FLASH"
+ line "lights the area!"
+ prompt
+
+_WarpToLastPokemonCenterText::
+ text "Warp to the last"
+ line "#MON CENTER."
+ done
+
+_CannotUseTeleportNowText::
+ text_ram wcd6d
+ text " can't"
+ line "use TELEPORT now."
+ prompt
+
+_CannotFlyHereText::
+ text_ram wcd6d
+ text " can't"
+ line "FLY here."
+ prompt
+
+_NotHealthyEnoughText::
+ text "Not healthy"
+ line "enough."
+ prompt
+
+_NewBadgeRequiredText::
+ text "No! A new BADGE"
+ line "is required."
+ prompt
+
+_CannotUseItemsHereText::
+ text "You can't use items"
+ line "here."
+ prompt
+
+_CannotGetOffHereText::
+ text "You can't get off"
+ line "here."
+ prompt
+
+_UsedStrengthText::
+ text_ram wcd6d
+ text " used"
+ line "STRENGTH.@"
+ text_end
+
+_CanMoveBouldersText::
+ text_ram wcd6d
+ text " can"
+ line "move boulders."
+ prompt
+
+_CurrentTooFastText::
+ text "The current is"
+ line "much too fast!"
+ prompt
+
+_CyclingIsFunText::
+ text "Cycling is fun!"
+ line "Forget SURFing!"
+ prompt
+
+_GotMonText::
+ text "<PLAYER> got"
+ line "@"
+ text_ram wcd6d
+ text "!@"
+ text_end
+
+_SentToBoxText::
+ text "There's no more"
+ line "room for #MON!"
+ cont "@"
+ text_ram wBoxMonNicks
+ text " was"
+ cont "sent to #MON"
+ cont "BOX @"
+ text_ram wcf4b
+ text " on PC!"
+ done
+
+_BoxIsFullText::
+ text "There's no more"
+ line "room for #MON!"
+
+ para "The #MON BOX"
+ line "is full and can't"
+ cont "accept any more!"
+
+ para "Change the BOX at"
+ line "a #MON CENTER!"
+ done
diff --git a/data/text/text_9.asm b/data/text/text_9.asm
new file mode 100644
index 00000000..a5aff49c
--- /dev/null
+++ b/data/text/text_9.asm
@@ -0,0 +1,442 @@
+_ItemUseBallText00::
+ text "It dodged the"
+ line "thrown BALL!"
+
+ para "This #MON"
+ line "can't be caught!"
+ prompt
+
+_ItemUseBallText01::
+ text "You missed the"
+ line "#MON!"
+ prompt
+
+_ItemUseBallText02::
+ text "Darn! The #MON"
+ line "broke free!"
+ prompt
+
+_ItemUseBallText03::
+ text "Aww! It appeared"
+ line "to be caught! "
+ prompt
+
+_ItemUseBallText04::
+ text "Shoot! It was so"
+ line "close too!"
+ prompt
+
+_ItemUseBallText05::
+ text "All right!"
+ line "@"
+ text_ram wEnemyMonNick
+ text " was"
+ cont "caught!@"
+ text_end
+
+_ItemUseBallText07::
+ text_ram wBoxMonNicks
+ text " was"
+ line "transferred to"
+ cont "BILL's PC!"
+ prompt
+
+_ItemUseBallText08::
+ text_ram wBoxMonNicks
+ text " was"
+ line "transferred to"
+ cont "someone's PC!"
+ prompt
+
+_ItemUseBallText06::
+ text "New #DEX data"
+ line "will be added for"
+ cont "@"
+ text_ram wEnemyMonNick
+ text "!@"
+ text_end
+
+_SurfingGotOnText::
+ text "<PLAYER> got on"
+ line "@"
+ text_ram wcd6d
+ text "!"
+ prompt
+
+_SurfingNoPlaceToGetOffText::
+ text "There's no place"
+ line "to get off!"
+ prompt
+
+_RefusingText::
+ text_ram wcd6d
+ text_start
+ line "is refusing!"
+ prompt
+
+_VitaminStatRoseText::
+ text_ram wcd6d
+ text "'s"
+ line "@"
+ text_ram wcf4b
+ text " rose."
+ prompt
+
+_VitaminNoEffectText::
+ text "It won't have any"
+ line "effect."
+ prompt
+
+_ThrewBaitText::
+ text "<PLAYER> threw"
+ line "some BAIT."
+ done
+
+_ThrewRockText::
+ text "<PLAYER> threw a"
+ line "ROCK."
+ done
+
+_PlayedFluteNoEffectText::
+ text "Played the #"
+ line "FLUTE."
+
+ para "Now, that's a"
+ line "catchy tune!"
+ prompt
+
+_FluteWokeUpText::
+ text "All sleeping"
+ line "#MON woke up."
+ prompt
+
+_PlayedFluteHadEffectText::
+ text "<PLAYER> played the"
+ line "# FLUTE.@"
+ text_end
+
+_CoinCaseNumCoinsText::
+ text "Coins"
+ line "@"
+ text_bcd wPlayerCoins, 2 | LEADING_ZEROES | LEFT_ALIGN
+ text " "
+ prompt
+
+_ItemfinderFoundItemText::
+ text "Yes! ITEMFINDER"
+ line "indicates there's"
+ cont "an item nearby."
+ prompt
+
+_ItemfinderFoundNothingText::
+ text "Nope! ITEMFINDER"
+ line "isn't responding."
+ prompt
+
+_RaisePPWhichTechniqueText::
+ text "Raise PP of which"
+ line "technique?"
+ done
+
+_RestorePPWhichTechniqueText::
+ text "Restore PP of"
+ line "which technique?"
+ done
+
+_PPMaxedOutText::
+ text_ram wcf4b
+ text "'s PP"
+ line "is maxed out."
+ prompt
+
+_PPIncreasedText::
+ text_ram wcf4b
+ text "'s PP"
+ line "increased."
+ prompt
+
+_PPRestoredText::
+ text "PP was restored."
+ prompt
+
+_BootedUpTMText::
+ text "Booted up a TM!"
+ prompt
+
+_BootedUpHMText::
+ text "Booted up an HM!"
+ prompt
+
+_TeachMachineMoveText::
+ text "It contained"
+ line "@"
+ text_ram wcf4b
+ text "!"
+
+ para "Teach @"
+ text_ram wcf4b
+ text_start
+ line "to a #MON?"
+ done
+
+_MonCannotLearnMachineMoveText::
+ text_ram wcd6d
+ text " is not"
+ line "compatible with"
+ cont "@"
+ text_ram wcf4b
+ text "."
+
+ para "It can't learn"
+ line "@"
+ text_ram wcf4b
+ text "."
+ prompt
+
+_ItemUseNotTimeText::
+ text "OAK: <PLAYER>!"
+ line "This isn't the"
+ cont "time to use that! "
+ prompt
+
+_ItemUseNotYoursToUseText::
+ text "This isn't yours"
+ line "to use!"
+ prompt
+
+_ItemUseNoEffectText::
+ text "It won't have any"
+ line "effect."
+ prompt
+
+_ThrowBallAtTrainerMonText1::
+ text "The trainer"
+ line "blocked the BALL!"
+ prompt
+
+_ThrowBallAtTrainerMonText2::
+ text "Don't be a thief!"
+ prompt
+
+_NoCyclingAllowedHereText::
+ text "No cycling"
+ next "allowed here."
+ prompt
+
+_NoSurfingHereText::
+ text "No SURFing on"
+ line "@"
+ text_ram wcd6d
+ text " here!"
+ prompt
+
+_BoxFullCannotThrowBallText::
+ text "The #MON BOX"
+ line "is full! Can't"
+ cont "use that item!"
+ prompt
+
+_DontHavePokemonText::
+ text "You don't have a "
+ line "#MON!"
+ prompt
+
+_ItemUseText001::
+ text "<PLAYER> used@"
+ text_end
+
+_ItemUseText002::
+ text_ram wcf4b
+ text "!"
+ done
+
+_GotOnBicycleText1::
+ text "<PLAYER> got on the@"
+ text_end
+
+_GotOnBicycleText2::
+ text_ram wcf4b
+ text "!"
+ prompt
+
+_GotOffBicycleText1::
+ text "<PLAYER> got off@"
+ text_end
+
+_GotOffBicycleText2::
+ text "the @"
+ text_ram wcf4b
+ text "."
+ prompt
+
+_ThrewAwayItemText::
+ text "Threw away"
+ line "@"
+ text_ram wcd6d
+ text "."
+ prompt
+
+_IsItOKToTossItemText::
+ text "Is it OK to toss"
+ line "@"
+ text_ram wcf4b
+ text "?"
+ prompt
+
+_TooImportantToTossText::
+ text "That's too impor-"
+ line "tant to toss!"
+ prompt
+
+_AlreadyKnowsText::
+ text_ram wcd6d
+ text " knows"
+ line "@"
+ text_ram wcf4b
+ text "!"
+ prompt
+
+_ConnectCableText::
+ text "Okay, connect the"
+ line "cable like so!"
+ prompt
+
+_TradedForText::
+ text "<PLAYER> traded"
+ line "@"
+ text_ram wInGameTradeGiveMonName
+ text " for"
+ cont "@"
+ text_ram wInGameTradeReceiveMonName
+ text "!@"
+ text_end
+
+_WannaTrade1Text::
+ text "I'm looking for"
+ line "@"
+ text_ram wInGameTradeGiveMonName
+ text "! Wanna"
+
+ para "trade one for"
+ line "@"
+ text_ram wInGameTradeReceiveMonName
+ text "? "
+ done
+
+_NoTrade1Text::
+ text "Awww!"
+ line "Oh well..."
+ done
+
+_WrongMon1Text::
+ text "What? That's not"
+ line "@"
+ text_ram wInGameTradeGiveMonName
+ text "!"
+
+ para "If you get one,"
+ line "come back here!"
+ done
+
+_Thanks1Text::
+ text "Hey thanks!"
+ done
+
+_AfterTrade1Text::
+ text "Isn't my old"
+ line "@"
+ text_ram wInGameTradeReceiveMonName
+ text " great?"
+ done
+
+_WannaTrade2Text::
+ text "Hello there! Do"
+ line "you want to trade"
+
+ para "your @"
+ text_ram wInGameTradeGiveMonName
+ text_start
+ line "for @"
+ text_ram wInGameTradeReceiveMonName
+ text "?"
+ done
+
+_NoTrade2Text::
+ text "Well, if you"
+ line "don't want to..."
+ done
+
+_WrongMon2Text::
+ text "Hmmm? This isn't"
+ line "@"
+ text_ram wInGameTradeGiveMonName
+ text "."
+
+ para "Think of me when"
+ line "you get one."
+ done
+
+_Thanks2Text::
+ text "Thanks!"
+ done
+
+_AfterTrade2Text::
+ text "Hello there! Your"
+ line "old @"
+ text_ram wInGameTradeGiveMonName
+ text " is"
+ cont "magnificent!"
+ done
+
+_WannaTrade3Text::
+ text "Hi! Do you have"
+ line "@"
+ text_ram wInGameTradeGiveMonName
+ text "?"
+
+ para "Want to trade it"
+ line "for @"
+ text_ram wInGameTradeReceiveMonName
+ text "?"
+ done
+
+_NoTrade3Text::
+ text "That's too bad."
+ done
+
+_WrongMon3Text::
+ text "...This is no"
+ line "@"
+ text_ram wInGameTradeGiveMonName
+ text "."
+
+ para "If you get one,"
+ line "trade it with me!"
+ done
+
+_Thanks3Text::
+ text "Thanks, pal!"
+ done
+
+_AfterTrade3Text::
+ text "How is my old"
+ line "@"
+ text_ram wInGameTradeReceiveMonName
+ text "?"
+
+ para "My @"
+ text_ram wInGameTradeGiveMonName
+ text " is"
+ line "doing great!"
+ done
+
+_NothingToCutText::
+ text "There isn't"
+ line "anything to CUT!"
+ prompt
+
+_UsedCutText::
+ text_ram wcd6d
+ text " hacked"
+ line "away with CUT!"
+ prompt
diff --git a/data/text/unused_names.asm b/data/text/unused_names.asm
new file mode 100644
index 00000000..349a31cf
--- /dev/null
+++ b/data/text/unused_names.asm
@@ -0,0 +1,22 @@
+UnusedBadgeNames::
+ db "かみなりバッヂ@" ; THUNDER BADGE
+ db "かいがらバッヂ@" ; SHELL BADGE
+ db "おじぞうバッヂ@" ; JIZOU BADGE
+ db "はやぶさバッヂ@" ; FALCON BADGE
+ db "ひんやりバッヂ@" ; CHILL BADGE
+ db "なかよしバッヂ@" ; FRIENDSHIP BADGE
+ db "バラバッヂ@" ; ROSE BADGE
+ db "ひのたまバッヂ@" ; FIREBALL BADGE
+ db "ゴールドバッヂ@" ; GOLD BADGE
+
+UnusedRankingNames:
+ db "たまご@" ; EGG
+ db "ひよこ@" ; CHICK
+ db "ブロンズ@" ; BRONZE
+ db "シルバー@" ; SILVER
+ db "ゴールド@" ; GOLD
+ db "プチキャプテン@" ; PETIT CAPTAIN
+ db "キャプテン@" ; CAPTAIN
+ db "プチマスター@" ; PETIT MASTER
+ db "マスター@" ; MASTER
+ db "エクセレント" ; EXCELLENT
diff --git a/data/text_boxes.asm b/data/text_boxes.asm
new file mode 100644
index 00000000..34e6a414
--- /dev/null
+++ b/data/text_boxes.asm
@@ -0,0 +1,88 @@
+TextBoxFunctionTable:
+ ; text box ID, function address
+ dbw MONEY_BOX, DisplayMoneyBox
+ dbw BUY_SELL_QUIT_MENU, DoBuySellQuitMenu
+ dbw FIELD_MOVE_MON_MENU, DisplayFieldMoveMonMenu
+ db -1 ; end
+
+TextBoxCoordTable:
+ ; text box ID, upper-left X, upper-left Y, lower-right X, lower-right Y
+ db MESSAGE_BOX, 0, 12, 19, 17
+ db MENU_TEMPLATE_03, 0, 0, 19, 14
+ db MENU_TEMPLATE_07, 0, 0, 11, 6
+ db LIST_MENU_BOX, 4, 2, 19, 12
+ db MENU_TEMPLATE_10, 7, 0, 19, 17
+ db MON_SPRITE_POPUP, 6, 4, 14, 13
+ db -1 ; end
+
+text_box_text: MACRO
+ db \1 ; text box ID
+ db \2, \3, \4, \5 ; text box coordinates
+ dw \6 ; text pointer
+ db \7, \8 ; text coordinates
+ENDM
+
+TextBoxTextAndCoordTable:
+ ; text box ID, upper-left X, upper-left Y, lower-right X, lower-right Y, text pointer, text X, text Y
+ text_box_text JP_MOCHIMONO_MENU_TEMPLATE, 0, 0, 14, 17, JapaneseMochimonoText, 3, 0
+ text_box_text USE_TOSS_MENU_TEMPLATE, 13, 10, 19, 14, UseTossText, 15, 11
+ text_box_text JP_SAVE_MESSAGE_MENU_TEMPLATE, 0, 0, 7, 5, JapaneseSaveMessageText, 2, 2
+ text_box_text JP_SPEED_OPTIONS_MENU_TEMPLATE, 0, 6, 5, 10, JapaneseSpeedOptionsText, 2, 7
+ text_box_text BATTLE_MENU_TEMPLATE, 8, 12, 19, 17, BattleMenuText, 10, 14
+ text_box_text SAFARI_BATTLE_MENU_TEMPLATE, 0, 12, 19, 17, SafariZoneBattleMenuText, 2, 14
+ text_box_text SWITCH_STATS_CANCEL_MENU_TEMPLATE, 11, 11, 19, 17, SwitchStatsCancelText, 13, 12
+ text_box_text BUY_SELL_QUIT_MENU_TEMPLATE, 0, 0, 10, 6, BuySellQuitText, 2, 1
+ text_box_text MONEY_BOX_TEMPLATE, 11, 0, 19, 2, MoneyText, 13, 0
+ text_box_text JP_AH_MENU_TEMPLATE, 7, 6, 11, 10, JapaneseAhText, 8, 8
+ text_box_text JP_POKEDEX_MENU_TEMPLATE, 11, 8, 19, 17, JapanesePokedexMenu, 12, 10
+
+BuySellQuitText:
+ db "BUY"
+ next "SELL"
+ next "QUIT@"
+
+ db "@" ; unused
+
+UseTossText:
+ db "USE"
+ next "TOSS@"
+
+JapaneseSaveMessageText:
+ db "きろく"
+ next "メッセージ@"
+
+JapaneseSpeedOptionsText:
+ db "はやい"
+ next "おそい@"
+
+MoneyText:
+ db "MONEY@"
+
+JapaneseMochimonoText:
+ db "もちもの@"
+
+JapaneseMainMenuText:
+ db "つづきから"
+ next "さいしょから@"
+
+BattleMenuText:
+ db "FIGHT <PK><MN>"
+ next "ITEM RUN@"
+
+SafariZoneBattleMenuText:
+ db "BALL× BAIT"
+ next "THROW ROCK RUN@"
+
+SwitchStatsCancelText:
+ db "SWITCH"
+ next "STATS"
+ next "CANCEL@"
+
+JapaneseAhText:
+ db "アッ!@"
+
+JapanesePokedexMenu:
+ db "データをみる"
+ next "なきごえ"
+ next "ぶんぷをみる"
+ next "キャンセル@"
diff --git a/data/text_predef_pointers.asm b/data/text_predef_pointers.asm
new file mode 100644
index 00000000..df882ebd
--- /dev/null
+++ b/data/text_predef_pointers.asm
@@ -0,0 +1,74 @@
+add_tx_pre: MACRO
+\1_id::
+ dw \1
+ENDM
+
+TextPredefs::
+ add_tx_pre CardKeySuccessText ; 01
+ add_tx_pre CardKeyFailText ; 02
+ add_tx_pre RedBedroomPCText ; 03
+ add_tx_pre RedBedroomSNESText ; 04
+ add_tx_pre PushStartText ; 05
+ add_tx_pre SaveOptionText ; 06
+ add_tx_pre StrengthsAndWeaknessesText ; 07
+ add_tx_pre OakLabEmailText ; 08
+ add_tx_pre AerodactylFossilText ; 09
+ add_tx_pre Route15UpstairsBinocularsText ; 0A
+ add_tx_pre KabutopsFossilText ; 0B
+ add_tx_pre FanClubPicture1Text ; 0C
+ add_tx_pre FanClubPicture2Text ; 0D
+ add_tx_pre GymStatueText1 ; 0E
+ add_tx_pre GymStatueText2 ; 0F
+ add_tx_pre BookcaseText ; 10
+ add_tx_pre ViridianCityPokecenterBenchGuyText ; 11
+ add_tx_pre PewterCityPokecenterBenchGuyText ; 12
+ add_tx_pre CeruleanCityPokecenterBenchGuyText ; 13
+ add_tx_pre LavenderCityPokecenterBenchGuyText ; 14
+ add_tx_pre VermilionCityPokecenterBenchGuyText ; 15
+ add_tx_pre CeladonCityPokecenterBenchGuyText ; 16
+ add_tx_pre CeladonCityHotelText ; 17
+ add_tx_pre FuchsiaCityPokecenterBenchGuyText ; 18
+ add_tx_pre CinnabarIslandPokecenterBenchGuyText ; 19
+ add_tx_pre SaffronCityPokecenterBenchGuyText ; 1A
+ add_tx_pre MtMoonPokecenterBenchGuyText ; 1B
+ add_tx_pre RockTunnelPokecenterBenchGuyText ; 1C
+ add_tx_pre UnusedBenchGuyText1 ; 1D XXX unused
+ add_tx_pre UnusedBenchGuyText2 ; 1E XXX unused
+ add_tx_pre UnusedBenchGuyText3 ; 1F XXX unused
+ add_tx_pre UnusedPredefText ; 20 XXX unused
+ add_tx_pre PokemonCenterPCText ; 21
+ add_tx_pre ViridianSchoolNotebook ; 22
+ add_tx_pre ViridianSchoolBlackboard ; 23
+ add_tx_pre JustAMomentText ; 24
+ add_tx_pre OpenBillsPCText ; 25
+ add_tx_pre FoundHiddenItemText ; 26
+ add_tx_pre HiddenItemBagFullText ; 27 XXX unused
+ add_tx_pre VermilionGymTrashText ; 28
+ add_tx_pre IndigoPlateauHQText ; 29
+ add_tx_pre GameCornerOutOfOrderText ; 2A
+ add_tx_pre GameCornerOutToLunchText ; 2B
+ add_tx_pre GameCornerSomeonesKeysText ; 2C
+ add_tx_pre FoundHiddenCoinsText ; 2D
+ add_tx_pre DroppedHiddenCoinsText ; 2E
+ add_tx_pre BillsHouseMonitorText ; 2F
+ add_tx_pre BillsHouseInitiatedText ; 30
+ add_tx_pre BillsHousePokemonList ; 31
+ add_tx_pre MagazinesText ; 32
+ add_tx_pre CinnabarGymQuiz ; 33
+ add_tx_pre GameCornerNoCoinsText ; 34
+ add_tx_pre GameCornerCoinCaseText ; 35
+ add_tx_pre LinkCableHelp ; 36
+ add_tx_pre TMNotebook ; 37
+ add_tx_pre FightingDojoText ; 38
+ add_tx_pre EnemiesOnEverySideText ; 39
+ add_tx_pre WhatGoesAroundComesAroundText ; 3A
+ add_tx_pre NewBicycleText ; 3B
+ add_tx_pre IndigoPlateauStatues ; 3C
+ add_tx_pre VermilionGymTrashSuccessText1 ; 3D
+ add_tx_pre VermilionGymTrashSuccessText2 ; 3E XXX unused
+ add_tx_pre VermilionGymTrashSuccessText3 ; 3F
+ add_tx_pre VermilionGymTrashFailText ; 40
+ add_tx_pre TownMapText ; 41
+ add_tx_pre BookOrSculptureText ; 42
+ add_tx_pre ElevatorText ; 43
+ add_tx_pre PokemonStuffText ; 44
diff --git a/data/tilemaps.asm b/data/tilemaps.asm
new file mode 100644
index 00000000..97e687fd
--- /dev/null
+++ b/data/tilemaps.asm
@@ -0,0 +1,46 @@
+tile_ids: MACRO
+ dw \1
+ dn \3, \2
+ENDM
+
+TileIDListPointerTable:
+; entries correspond to TILEMAP_* constants (see constants/gfx_constants.asm)
+ ; tilemap pointer, width, height
+ tile_ids MonTiles, 7, 7
+ tile_ids SlideDownMonTiles_7x5, 7, 5
+ tile_ids SlideDownMonTiles_7x3, 7, 3
+ tile_ids GengarIntroTiles1, 7, 7
+ tile_ids GengarIntroTiles2, 7, 7
+ tile_ids GengarIntroTiles3, 7, 7
+ tile_ids GameBoyTiles, 6, 8
+ tile_ids LinkCableTiles, 12, 3
+
+DownscaledMonTiles_5x5:
+ INCBIN "gfx/pokemon/downscaled_5x5.tilemap"
+
+DownscaledMonTiles_3x3:
+ INCBIN "gfx/pokemon/downscaled_3x3.tilemap"
+
+MonTiles:
+ INCBIN "gfx/pokemon/front.tilemap"
+
+SlideDownMonTiles_7x5:
+ INCBIN "gfx/pokemon/slide_down_7x5.tilemap"
+
+SlideDownMonTiles_7x3:
+ INCBIN "gfx/pokemon/slide_down_7x3.tilemap"
+
+GengarIntroTiles1:
+ INCBIN "gfx/intro/gengar_1.tilemap"
+
+GengarIntroTiles2:
+ INCBIN "gfx/intro/gengar_2.tilemap"
+
+GengarIntroTiles3:
+ INCBIN "gfx/intro/gengar_3.tilemap"
+
+GameBoyTiles:
+ INCBIN "gfx/trade/game_boy.tilemap"
+
+LinkCableTiles:
+ INCBIN "gfx/trade/link_cable.tilemap"
diff --git a/data/tileset_headers.asm b/data/tileset_headers.asm
deleted file mode 100755
index c85a51e5..00000000
--- a/data/tileset_headers.asm
+++ /dev/null
@@ -1,27 +0,0 @@
-Tilesets:
-
- tileset Overworld_Block, Overworld_GFX, Overworld_Coll, $FF,$FF,$FF, $52, OUTDOOR
- tileset RedsHouse1_Block, RedsHouse1_GFX, RedsHouse1_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset Mart_Block, Mart_GFX, Mart_Coll, $18,$19,$1E, $FF, INDOOR
- tileset Forest_Block, Forest_GFX, Forest_Coll, $FF,$FF,$FF, $20, CAVE
- tileset RedsHouse2_Block, RedsHouse2_GFX, RedsHouse2_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset Dojo_Block, Dojo_GFX, Dojo_Coll, $3A,$FF,$FF, $FF, OUTDOOR
- tileset Pokecenter_Block, Pokecenter_GFX, Pokecenter_Coll, $18,$19,$1E, $FF, INDOOR
- tileset Gym_Block, Gym_GFX, Gym_Coll, $3A,$FF,$FF, $FF, OUTDOOR
- tileset House_Block, House_GFX, House_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset ForestGate_Block, ForestGate_GFX, ForestGate_Coll, $17,$32,$FF, $FF, INDOOR
- tileset Museum_Block, Museum_GFX, Museum_Coll, $17,$32,$FF, $FF, INDOOR
- tileset Underground_Block, Underground_GFX, Underground_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset Gate_Block, Gate_GFX, Gate_Coll, $17,$32,$FF, $FF, INDOOR
- tileset Ship_Block, Ship_GFX, Ship_Coll, $FF,$FF,$FF, $FF, CAVE
- tileset ShipPort_Block, ShipPort_GFX, ShipPort_Coll, $FF,$FF,$FF, $FF, CAVE
- tileset Cemetery_Block, Cemetery_GFX, Cemetery_Coll, $12,$FF,$FF, $FF, INDOOR
- tileset Interior_Block, Interior_GFX, Interior_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset Cavern_Block, Cavern_GFX, Cavern_Coll, $FF,$FF,$FF, $FF, CAVE
- tileset Lobby_Block, Lobby_GFX, Lobby_Coll, $15,$36,$FF, $FF, INDOOR
- tileset Mansion_Block, Mansion_GFX, Mansion_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset Lab_Block, Lab_GFX, Lab_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset Club_Block, Club_GFX, Club_Coll, $07,$17,$FF, $FF, INDOOR
- tileset Facility_Block, Facility_GFX, Facility_Coll, $12,$FF,$FF, $FF, CAVE
- tileset Plateau_Block, Plateau_GFX, Plateau_Coll, $FF,$FF,$FF, $45, CAVE
- tileset BeachHouse_Block, BeachHouse_GFX, BeachHouse_Coll, $FF,$FF,$FF, $FF, INDOOR
diff --git a/data/tilesets/bike_riding_tilesets.asm b/data/tilesets/bike_riding_tilesets.asm
new file mode 100755
index 00000000..b78c7c8c
--- /dev/null
+++ b/data/tilesets/bike_riding_tilesets.asm
@@ -0,0 +1,7 @@
+BikeRidingTilesets::
+ db OVERWORLD
+ db FOREST
+ db UNDERGROUND
+ db SHIP_PORT
+ db CAVERN
+ db -1 ; end
diff --git a/data/tilesets/bookshelf_tile_ids.asm b/data/tilesets/bookshelf_tile_ids.asm
new file mode 100644
index 00000000..55143d73
--- /dev/null
+++ b/data/tilesets/bookshelf_tile_ids.asm
@@ -0,0 +1,25 @@
+bookshelf_tile: MACRO
+ db \1, \2
+ db_tx_pre \3
+ENDM
+
+BookshelfTileIDs:
+ ; tileset id, bookshelf tile id, text id
+ bookshelf_tile PLATEAU, $30, IndigoPlateauStatues
+ bookshelf_tile HOUSE, $3D, TownMapText
+ bookshelf_tile HOUSE, $1E, BookOrSculptureText
+ bookshelf_tile MANSION, $32, BookOrSculptureText
+ bookshelf_tile REDS_HOUSE_1, $32, BookOrSculptureText
+ bookshelf_tile LAB, $28, BookOrSculptureText
+ bookshelf_tile LOBBY, $16, ElevatorText
+ bookshelf_tile GYM, $1D, BookOrSculptureText
+ bookshelf_tile DOJO, $1D, BookOrSculptureText
+ bookshelf_tile GATE, $22, BookOrSculptureText
+ bookshelf_tile MART, $54, PokemonStuffText
+ bookshelf_tile MART, $55, PokemonStuffText
+ bookshelf_tile POKECENTER, $54, PokemonStuffText
+ bookshelf_tile POKECENTER, $55, PokemonStuffText
+ bookshelf_tile LOBBY, $50, PokemonStuffText
+ bookshelf_tile LOBBY, $52, PokemonStuffText
+ bookshelf_tile SHIP, $36, BookOrSculptureText
+ db -1 ; end
diff --git a/data/tilesets/collision_tile_ids.asm b/data/tilesets/collision_tile_ids.asm
new file mode 100644
index 00000000..058a815c
--- /dev/null
+++ b/data/tilesets/collision_tile_ids.asm
@@ -0,0 +1,74 @@
+coll_tiles: MACRO
+REPT _NARG
+ db \1
+ shift
+ENDR
+ db -1 ; end
+ENDM
+
+Underground_Coll::
+ coll_tiles $0b, $0c, $13, $15, $18
+
+Overworld_Coll::
+ coll_tiles $00, $10, $1b, $20, $21, $23, $2c, $2d, $2e, $30, $31, $33, $39, $3c, $3e, $52, $54, $58, $5b
+
+RedsHouse1_Coll::
+RedsHouse2_Coll::
+ coll_tiles $01, $02, $03, $11, $12, $13, $14, $1c, $1a
+
+Mart_Coll::
+Pokecenter_Coll::
+ coll_tiles $11, $1a, $1c, $3c, $5e
+
+Dojo_Coll::
+Gym_Coll::
+ coll_tiles $11, $16, $19, $2b, $3c, $3d, $3f, $4a, $4c, $4d, $03
+
+Forest_Coll::
+ coll_tiles $1e, $20, $2e, $30, $34, $37, $39, $3a, $40, $51, $52, $5a, $5c, $5e, $5f
+
+House_Coll::
+ coll_tiles $01, $12, $14, $28, $32, $37, $44, $54, $5c
+
+ForestGate_Coll::
+Museum_Coll::
+Gate_Coll::
+ coll_tiles $01, $12, $14, $1a, $1c, $37, $38, $3b, $3c, $5e
+
+Ship_Coll::
+ coll_tiles $04, $0d, $17, $1d, $1e, $23, $34, $37, $39, $4a
+
+ShipPort_Coll::
+ coll_tiles $0a, $1a, $32, $3b
+
+Cemetery_Coll::
+ coll_tiles $01, $10, $13, $1b, $22, $42, $52
+
+Interior_Coll::
+ coll_tiles $04, $0f, $15, $1f, $3b, $45, $47, $55, $56
+
+Cavern_Coll::
+ coll_tiles $05, $15, $18, $1a, $20, $21, $22, $2a, $2d, $30
+
+ coll_tiles ; unused
+
+Lobby_Coll::
+ coll_tiles $14, $17, $1a, $1c, $20, $38, $45
+
+Mansion_Coll::
+ coll_tiles $01, $05, $11, $12, $14, $1a, $1c, $2c, $53
+
+Lab_Coll::
+ coll_tiles $0c, $26, $16, $1e, $34, $37
+
+Club_Coll::
+ coll_tiles $0f, $1a, $1f, $26, $28, $29, $2c, $2d, $2e, $2f, $41
+
+Facility_Coll::
+ coll_tiles $01, $10, $11, $13, $1b, $20, $21, $22, $30, $31, $32, $42, $43, $48, $52, $55, $58, $5e
+
+Plateau_Coll::
+ coll_tiles $1b, $23, $2c, $2d, $3b, $45
+
+BeachHouse_Coll::
+ coll_tiles $01, $11, $12, $14
diff --git a/data/tilesets/cut_tree_blocks.asm b/data/tilesets/cut_tree_blocks.asm
new file mode 100644
index 00000000..ddbe28fc
--- /dev/null
+++ b/data/tilesets/cut_tree_blocks.asm
@@ -0,0 +1,13 @@
+CutTreeBlockSwaps:
+ ; first byte = tileset block containing the cut tree
+ ; second byte = corresponding tileset block after the cut animation happens
+ db $32, $6D
+ db $33, $6C
+ db $34, $6F
+ db $35, $4C
+ db $60, $6E
+ db $0B, $0A
+ db $3C, $35
+ db $3F, $35
+ db $3D, $36
+ db -1 ; end
diff --git a/data/tilesets/door_tile_ids.asm b/data/tilesets/door_tile_ids.asm
new file mode 100644
index 00000000..5fca7114
--- /dev/null
+++ b/data/tilesets/door_tile_ids.asm
@@ -0,0 +1,60 @@
+DoorTileIDPointers:
+ dbw OVERWORLD, .OverworldDoorTileIDs
+ dbw FOREST, .ForestDoorTileIDs
+ dbw MART, .MartDoorTileIDs
+ dbw HOUSE, .HouseDoorTileIDs
+ dbw FOREST_GATE, .TilesetMuseumDoorTileIDs
+ dbw MUSEUM, .TilesetMuseumDoorTileIDs
+ dbw GATE, .TilesetMuseumDoorTileIDs
+ dbw SHIP, .ShipDoorTileIDs
+ dbw LOBBY, .LobbyDoorTileIDs
+ dbw MANSION, .MansionDoorTileIDs
+ dbw LAB, .LabDoorTileIDs
+ dbw FACILITY, .FacilityDoorTileIDs
+ dbw PLATEAU, .PlateauDoorTileIDs
+ dbw INTERIOR, .InteriorDoorTileIDs
+ db -1 ; end
+
+door_tiles: MACRO
+REPT _NARG
+ db \1
+ shift
+ENDR
+ db 0 ; end
+ENDM
+
+.OverworldDoorTileIDs:
+ door_tiles $1B, $58
+
+.ForestDoorTileIDs:
+ door_tiles $3a
+
+.MartDoorTileIDs:
+ door_tiles $5e
+
+.HouseDoorTileIDs:
+ door_tiles $54
+
+.TilesetMuseumDoorTileIDs:
+ door_tiles $3b
+
+.ShipDoorTileIDs:
+ door_tiles $1e
+
+.LobbyDoorTileIDs:
+ door_tiles $1c, $38, $1a
+
+.MansionDoorTileIDs:
+ door_tiles $1a, $1c, $53
+
+.LabDoorTileIDs:
+ door_tiles $34
+
+.FacilityDoorTileIDs:
+ door_tiles $43, $58, $1b
+
+.PlateauDoorTileIDs:
+ door_tiles $3b, $1b
+
+.InteriorDoorTileIDs:
+ door_tiles $04, $15
diff --git a/data/tilesets/dungeon_tilesets.asm b/data/tilesets/dungeon_tilesets.asm
new file mode 100755
index 00000000..2af36696
--- /dev/null
+++ b/data/tilesets/dungeon_tilesets.asm
@@ -0,0 +1,13 @@
+DungeonTilesets:
+ db FOREST
+ db MUSEUM
+ db SHIP
+ db CAVERN
+ db LOBBY
+ db MANSION
+ db GATE
+ db LAB
+ db FACILITY
+ db CEMETERY
+ db GYM
+ db -1 ; end
diff --git a/data/tilesets/escape_rope_tilesets.asm b/data/tilesets/escape_rope_tilesets.asm
new file mode 100644
index 00000000..6a40089c
--- /dev/null
+++ b/data/tilesets/escape_rope_tilesets.asm
@@ -0,0 +1,7 @@
+EscapeRopeTilesets:
+ db FOREST
+ db CEMETERY
+ db CAVERN
+ db FACILITY
+ db INTERIOR
+ db -1 ; end
diff --git a/data/tilesets/ledge_tiles.asm b/data/tilesets/ledge_tiles.asm
new file mode 100644
index 00000000..db293800
--- /dev/null
+++ b/data/tilesets/ledge_tiles.asm
@@ -0,0 +1,11 @@
+LedgeTiles:
+ ; player direction, tile player standing on, ledge tile, input required
+ db SPRITE_FACING_DOWN, $2C, $37, D_DOWN
+ db SPRITE_FACING_DOWN, $39, $36, D_DOWN
+ db SPRITE_FACING_DOWN, $39, $37, D_DOWN
+ db SPRITE_FACING_LEFT, $2C, $27, D_LEFT
+ db SPRITE_FACING_LEFT, $39, $27, D_LEFT
+ db SPRITE_FACING_RIGHT, $2C, $0D, D_RIGHT
+ db SPRITE_FACING_RIGHT, $2C, $1D, D_RIGHT
+ db SPRITE_FACING_RIGHT, $39, $0D, D_RIGHT
+ db -1 ; end
diff --git a/data/tilesets/pair_collision_tile_ids.asm b/data/tilesets/pair_collision_tile_ids.asm
new file mode 100644
index 00000000..84869556
--- /dev/null
+++ b/data/tilesets/pair_collision_tile_ids.asm
@@ -0,0 +1,24 @@
+; FORMAT: tileset number, tile 1, tile 2
+; terminated by -1
+; these entries indicate that the player may not cross between tile 1 and tile 2
+; it's mainly used to simulate differences in elevation
+
+TilePairCollisionsLand::
+ db CAVERN, $20, $05
+ db CAVERN, $41, $05
+ db FOREST, $30, $2E
+ db CAVERN, $2A, $05
+ db CAVERN, $05, $21
+ db FOREST, $52, $2E
+ db FOREST, $55, $2E
+ db FOREST, $56, $2E
+ db FOREST, $20, $2E
+ db FOREST, $5E, $2E
+ db FOREST, $5F, $2E
+ db -1 ; end
+
+TilePairCollisionsWater::
+ db FOREST, $14, $2E
+ db FOREST, $48, $2E
+ db CAVERN, $14, $05
+ db -1 ; end
diff --git a/data/tilesets/spinner_tiles.asm b/data/tilesets/spinner_tiles.asm
new file mode 100644
index 00000000..82506b6d
--- /dev/null
+++ b/data/tilesets/spinner_tiles.asm
@@ -0,0 +1,29 @@
+spinner: MACRO
+; \1: source
+; \2: offset (BANK() chokes on literals)
+; \3: dest
+ dw \1 tile \2
+ db 1
+ db BANK(\1)
+ dw vTileset tile \3
+ENDM
+
+FacilitySpinnerArrows:
+ spinner SpinnerArrowAnimTiles, 0, $20
+ spinner SpinnerArrowAnimTiles, 1, $21
+ spinner SpinnerArrowAnimTiles, 2, $30
+ spinner SpinnerArrowAnimTiles, 3, $31
+ spinner Facility_GFX, $20, $20
+ spinner Facility_GFX, $21, $21
+ spinner Facility_GFX, $30, $30
+ spinner Facility_GFX, $31, $31
+
+GymSpinnerArrows:
+ spinner SpinnerArrowAnimTiles, 1, $3c
+ spinner SpinnerArrowAnimTiles, 3, $3d
+ spinner SpinnerArrowAnimTiles, 0, $4c
+ spinner SpinnerArrowAnimTiles, 2, $4d
+ spinner Gym_GFX, $3c, $3c
+ spinner Gym_GFX, $3d, $3d
+ spinner Gym_GFX, $4c, $4c
+ spinner Gym_GFX, $4d, $4d
diff --git a/data/tilesets/tileset_headers.asm b/data/tilesets/tileset_headers.asm
new file mode 100755
index 00000000..4e055591
--- /dev/null
+++ b/data/tilesets/tileset_headers.asm
@@ -0,0 +1,35 @@
+tileset: MACRO
+ db BANK(\2) ; BANK(GFX)
+ dw \1, \2, \3 ; Block, GFX, Coll
+ db \4, \5, \6 ; counter tiles
+ db \7 ; grass tile
+ db \8 ; permission (indoor, cave, outdoor)
+ENDM
+
+Tilesets:
+ ; block, gfx, coll, 3 counter tiles, grass tile, permission
+ tileset Overworld_Block, Overworld_GFX, Overworld_Coll, $FF,$FF,$FF, $52, OUTDOOR
+ tileset RedsHouse1_Block, RedsHouse1_GFX, RedsHouse1_Coll, $FF,$FF,$FF, $FF, INDOOR
+ tileset Mart_Block, Mart_GFX, Mart_Coll, $18,$19,$1E, $FF, INDOOR
+ tileset Forest_Block, Forest_GFX, Forest_Coll, $FF,$FF,$FF, $20, CAVE
+ tileset RedsHouse2_Block, RedsHouse2_GFX, RedsHouse2_Coll, $FF,$FF,$FF, $FF, INDOOR
+ tileset Dojo_Block, Dojo_GFX, Dojo_Coll, $3A,$FF,$FF, $FF, OUTDOOR
+ tileset Pokecenter_Block, Pokecenter_GFX, Pokecenter_Coll, $18,$19,$1E, $FF, INDOOR
+ tileset Gym_Block, Gym_GFX, Gym_Coll, $3A,$FF,$FF, $FF, OUTDOOR
+ tileset House_Block, House_GFX, House_Coll, $FF,$FF,$FF, $FF, INDOOR
+ tileset ForestGate_Block, ForestGate_GFX, ForestGate_Coll, $17,$32,$FF, $FF, INDOOR
+ tileset Museum_Block, Museum_GFX, Museum_Coll, $17,$32,$FF, $FF, INDOOR
+ tileset Underground_Block, Underground_GFX, Underground_Coll, $FF,$FF,$FF, $FF, INDOOR
+ tileset Gate_Block, Gate_GFX, Gate_Coll, $17,$32,$FF, $FF, INDOOR
+ tileset Ship_Block, Ship_GFX, Ship_Coll, $FF,$FF,$FF, $FF, CAVE
+ tileset ShipPort_Block, ShipPort_GFX, ShipPort_Coll, $FF,$FF,$FF, $FF, CAVE
+ tileset Cemetery_Block, Cemetery_GFX, Cemetery_Coll, $12,$FF,$FF, $FF, INDOOR
+ tileset Interior_Block, Interior_GFX, Interior_Coll, $FF,$FF,$FF, $FF, INDOOR
+ tileset Cavern_Block, Cavern_GFX, Cavern_Coll, $FF,$FF,$FF, $FF, CAVE
+ tileset Lobby_Block, Lobby_GFX, Lobby_Coll, $15,$36,$FF, $FF, INDOOR
+ tileset Mansion_Block, Mansion_GFX, Mansion_Coll, $FF,$FF,$FF, $FF, INDOOR
+ tileset Lab_Block, Lab_GFX, Lab_Coll, $FF,$FF,$FF, $FF, INDOOR
+ tileset Club_Block, Club_GFX, Club_Coll, $07,$17,$FF, $FF, INDOOR
+ tileset Facility_Block, Facility_GFX, Facility_Coll, $12,$FF,$FF, $FF, CAVE
+ tileset Plateau_Block, Plateau_GFX, Plateau_Coll, $FF,$FF,$FF, $45, CAVE
+ tileset BeachHouse_Block, BeachHouse_GFX, BeachHouse_Coll, $FF,$FF,$FF, $FF, INDOOR
diff --git a/data/tilesets/warp_carpet_tile_ids.asm b/data/tilesets/warp_carpet_tile_ids.asm
new file mode 100644
index 00000000..be327599
--- /dev/null
+++ b/data/tilesets/warp_carpet_tile_ids.asm
@@ -0,0 +1,25 @@
+WarpTileListPointers:
+ dw .FacingDownWarpTiles
+ dw .FacingUpWarpTiles
+ dw .FacingLeftWarpTiles
+ dw .FacingRightWarpTiles
+
+warp_carpet_tiles: MACRO
+REPT _NARG
+ db \1
+ shift
+ENDR
+ db -1 ; end
+ENDM
+
+.FacingDownWarpTiles:
+ warp_carpet_tiles $01, $12, $17, $3D, $04, $18, $33
+
+.FacingUpWarpTiles:
+ warp_carpet_tiles $01, $5C
+
+.FacingLeftWarpTiles:
+ warp_carpet_tiles $1A, $4B
+
+.FacingRightWarpTiles:
+ warp_carpet_tiles $0F, $4E
diff --git a/data/tilesets/warp_pad_hole_tile_ids.asm b/data/tilesets/warp_pad_hole_tile_ids.asm
new file mode 100644
index 00000000..e12b3735
--- /dev/null
+++ b/data/tilesets/warp_pad_hole_tile_ids.asm
@@ -0,0 +1,7 @@
+WarpPadAndHoleData:
+ ; tileset id, tile id, value for [wStandingOnWarpPadOrHole]
+ db FACILITY, $20, 1 ; warp pad
+ db FACILITY, $11, 2 ; hole
+ db CAVERN, $22, 2 ; hole
+ db INTERIOR, $55, 1 ; warp pad
+ db -1 ; end
diff --git a/data/tilesets/warp_tile_ids.asm b/data/tilesets/warp_tile_ids.asm
new file mode 100755
index 00000000..7c207e27
--- /dev/null
+++ b/data/tilesets/warp_tile_ids.asm
@@ -0,0 +1,97 @@
+WarpTileIDPointers:
+ dw .OverworldWarpTileIDs
+ dw .RedsHouse1WarpTileIDs
+ dw .MartWarpTileIDs
+ dw .ForestWarpTileIDs
+ dw .RedsHouse2WarpTileIDs
+ dw .DojoWarpTileIDs
+ dw .PokecenterWarpTileIDs
+ dw .GymWarpTileIDs
+ dw .HouseWarpTileIDs
+ dw .ForestGateWarpTileIDs
+ dw .MuseumWarpTileIDs
+ dw .UndergroundWarpTileIDs
+ dw .GateWarpTileIDs
+ dw .ShipWarpTileIDs
+ dw .ShipPortWarpTileIDs
+ dw .CemeteryWarpTileIDs
+ dw .InteriorWarpTileIDs
+ dw .CavernWarpTileIDs
+ dw .LobbyWarpTileIDs
+ dw .MansionWarpTileIDs
+ dw .LabWarpTileIDs
+ dw .ClubWarpTileIDs
+ dw .FacilityWarpTileIDs
+ dw .PlateauWarpTileIDs
+ dw .BeachHouseWarpTileIDs
+
+warp_tiles: MACRO
+REPT _NARG
+ db \1
+ shift
+ENDR
+ db -1 ; end
+ENDM
+
+.OverworldWarpTileIDs:
+ warp_tiles $1B, $58
+
+.ForestGateWarpTileIDs:
+.MuseumWarpTileIDs:
+.GateWarpTileIDs:
+ db $3B
+ ; fallthrough
+.RedsHouse1WarpTileIDs:
+.RedsHouse2WarpTileIDs:
+ warp_tiles $1A, $1C
+
+.MartWarpTileIDs:
+.PokecenterWarpTileIDs:
+ warp_tiles $5E
+
+.ForestWarpTileIDs:
+ warp_tiles $5A, $5C, $3A
+
+.DojoWarpTileIDs:
+.GymWarpTileIDs:
+ warp_tiles $4A
+
+.HouseWarpTileIDs:
+ warp_tiles $54, $5C, $32
+
+.ShipWarpTileIDs:
+ warp_tiles $37, $39, $1E, $4A
+
+.InteriorWarpTileIDs:
+ warp_tiles $15, $55, $04
+
+.CavernWarpTileIDs:
+ warp_tiles $18, $1A, $22
+
+.LobbyWarpTileIDs:
+ warp_tiles $1A, $1C, $38
+
+.MansionWarpTileIDs:
+ warp_tiles $1A, $1C, $53
+
+.LabWarpTileIDs:
+ warp_tiles $34
+
+.FacilityWarpTileIDs:
+ db $43, $58, $20
+ ; fallthrough
+.CemeteryWarpTileIDs:
+ db $1B
+ ; fallthrough
+.UndergroundWarpTileIDs:
+ warp_tiles $13
+
+.PlateauWarpTileIDs:
+ db $1B, $3B
+ ; fallthrough
+.ShipPortWarpTileIDs:
+.ClubWarpTileIDs:
+ warp_tiles
+
+.BeachHouseWarpTileIDs:
+ warp_tiles ; end
diff --git a/data/tilesets/water_tilesets.asm b/data/tilesets/water_tilesets.asm
new file mode 100644
index 00000000..8abdce39
--- /dev/null
+++ b/data/tilesets/water_tilesets.asm
@@ -0,0 +1,12 @@
+; tilesets with water
+WaterTilesets:
+ db OVERWORLD
+ db FOREST
+ db DOJO
+ db GYM
+ db SHIP
+ db SHIP_PORT
+ db CAVERN
+ db FACILITY
+ db PLATEAU
+ db -1 ; end
diff --git a/data/tm_prices.asm b/data/tm_prices.asm
deleted file mode 100755
index ccc8be05..00000000
--- a/data/tm_prices.asm
+++ /dev/null
@@ -1,27 +0,0 @@
-TechnicalMachinePrices:
-; In thousands (nybbles).
- dn 3, 2 ; TM_01, TM_02
- dn 2, 1 ; TM_03, TM_04
- dn 3, 4 ; TM_05, TM_06
- dn 2, 4 ; TM_07, TM_08
- dn 3, 4 ; TM_09, TM_10
- dn 2, 1 ; TM_11, TM_12
- dn 4, 5 ; TM_13, TM_14
- dn 5, 5 ; TM_15, TM_16
- dn 3, 2 ; TM_17, TM_18
- dn 3, 2 ; TM_19, TM_20
- dn 5, 5 ; TM_21, TM_22
- dn 5, 2 ; TM_23, TM_24
- dn 5, 4 ; TM_25, TM_26
- dn 5, 2 ; TM_27, TM_28
- dn 4, 1 ; TM_29, TM_30
- dn 2, 1 ; TM_31, TM_32
- dn 1, 2 ; TM_33, TM_34
- dn 4, 2 ; TM_35, TM_36
- dn 2, 5 ; TM_37, TM_38
- dn 2, 4 ; TM_39, TM_40
- dn 2, 2 ; TM_41, TM_42
- dn 5, 2 ; TM_43, TM_44
- dn 2, 4 ; TM_45, TM_46
- dn 3, 4 ; TM_47, TM_48
- dn 4, 2 ; TM_49, TM_50
diff --git a/data/tms.asm b/data/tms.asm
deleted file mode 100755
index d61392c4..00000000
--- a/data/tms.asm
+++ /dev/null
@@ -1,57 +0,0 @@
-TechnicalMachines:
- db MEGA_PUNCH
- db RAZOR_WIND
- db SWORDS_DANCE
- db WHIRLWIND
- db MEGA_KICK
- db TOXIC
- db HORN_DRILL
- db BODY_SLAM
- db TAKE_DOWN
- db DOUBLE_EDGE
- db BUBBLEBEAM
- db WATER_GUN
- db ICE_BEAM
- db BLIZZARD
- db HYPER_BEAM
- db PAY_DAY
- db SUBMISSION
- db COUNTER
- db SEISMIC_TOSS
- db RAGE
- db MEGA_DRAIN
- db SOLARBEAM
- db DRAGON_RAGE
- db THUNDERBOLT
- db THUNDER
- db EARTHQUAKE
- db FISSURE
- db DIG
- db PSYCHIC_M
- db TELEPORT
- db MIMIC
- db DOUBLE_TEAM
- db REFLECT
- db BIDE
- db METRONOME
- db SELFDESTRUCT
- db EGG_BOMB
- db FIRE_BLAST
- db SWIFT
- db SKULL_BASH
- db SOFTBOILED
- db DREAM_EATER
- db SKY_ATTACK
- db REST
- db THUNDER_WAVE
- db PSYWAVE
- db EXPLOSION
- db ROCK_SLIDE
- db TRI_ATTACK
- db SUBSTITUTE
- db CUT
- db FLY
- db SURF
- db STRENGTH
- db FLASH
- db $ff ; terminator
diff --git a/data/town_map_entries.asm b/data/town_map_entries.asm
deleted file mode 100755
index eed56919..00000000
--- a/data/town_map_entries.asm
+++ /dev/null
@@ -1,102 +0,0 @@
-ExternalMapEntries:
- EMAP $2,$B,PalletTownName
- EMAP $2,$8,ViridianCityName
- EMAP $2,$3,PewterCityName
- EMAP $A,$2,CeruleanCityName
- EMAP $E,$5,LavenderTownName
- EMAP $A,$9,VermilionCityName
- EMAP $7,$5,CeladonCityName
- EMAP $8,$D,FuchsiaCityName
- EMAP $2,$F,CinnabarIslandName
- EMAP $0,$2,IndigoPlateauName
- EMAP $A,$5,SaffronCityName
- EMAP $0,$0,PalletTownName ; unused
- EMAP $2,$A,Route1Name
- EMAP $2,$6,Route2Name
- EMAP $4,$3,Route3Name
- EMAP $8,$2,Route4Name
- EMAP $A,$3,Route5Name
- EMAP $A,$8,Route6Name
- EMAP $8,$5,Route7Name
- EMAP $D,$5,Route8Name
- EMAP $D,$2,Route9Name
- EMAP $E,$4,Route10Name
- EMAP $C,$9,Route11Name
- EMAP $E,$9,Route12Name
- EMAP $D,$B,Route13Name
- EMAP $B,$C,Route14Name
- EMAP $A,$D,Route15Name
- EMAP $5,$5,Route16Name
- EMAP $4,$8,Route17Name
- EMAP $6,$D,Route18Name
- EMAP $6,$F,Route19Name
- EMAP $4,$F,Route20Name
- EMAP $2,$D,Route21Name
- EMAP $0,$8,Route22Name
- EMAP $0,$6,Route23Name
- EMAP $A,$1,Route24Name
- EMAP $B,$0,Route25Name
-
-InternalMapEntries:
- IMAP OAKS_LAB, $2,$B,PalletTownName
- IMAP VIRIDIAN_GYM, $2,$8,ViridianCityName
- IMAP VIRIDIAN_FOREST_SOUTH_GATE, $2,$6,Route2Name
- IMAP VIRIDIAN_FOREST, $2,$4,ViridianForestName
- IMAP PEWTER_POKECENTER, $2,$3,PewterCityName
- IMAP MT_MOON_B2F, $6,$2,MountMoonName
- IMAP CERULEAN_MART, $A,$2,CeruleanCityName
- IMAP MT_MOON_POKECENTER, $5,$2,Route4Name
- IMAP CERULEAN_TRASHED_HOUSE_COPY, $A,$2,CeruleanCityName
- IMAP DAYCARE, $A,$4,Route5Name
- IMAP UNDERGROUND_PATH_ROUTE_6_COPY, $A,$6,Route6Name
- IMAP UNDERGROUND_PATH_ROUTE_7_COPY, $9,$5,Route7Name
- IMAP UNDERGROUND_PATH_ROUTE_8, $B,$5,Route8Name
- IMAP ROCK_TUNNEL_1F, $E,$3,RockTunnelName
- IMAP POWER_PLANT, $F,$4,PowerPlantName
- IMAP ROUTE_11_GATE_2F, $D,$9,Route11Name
- IMAP ROUTE_12_GATE_1F, $E,$7,Route12Name
- IMAP BILLS_HOUSE, $C,$0,SeaCottageName
- IMAP VERMILION_DOCK, $A,$9,VermilionCityName
- IMAP SS_ANNE_B1F_ROOMS, $9,$A,SSAnneName
- IMAP VICTORY_ROAD_1F, $0,$4,VictoryRoadName
- IMAP HALL_OF_FAME, $0,$2,PokemonLeagueName
- IMAP UNDERGROUND_PATH_NORTH_SOUTH, $A,$5,UndergroundPathName
- IMAP CHAMPIONS_ROOM, $0,$2,PokemonLeagueName
- IMAP UNDERGROUND_PATH_WEST_EAST, $A,$5,UndergroundPathName
- IMAP CELADON_HOTEL, $7,$5,CeladonCityName
- IMAP LAVENDER_POKECENTER, $E,$5,LavenderTownName
- IMAP POKEMON_TOWER_7F, $F,$5,PokemonTowerName
- IMAP LAVENDER_CUBONE_HOUSE, $E,$5,LavenderTownName
- IMAP WARDENS_HOUSE, $8,$D,FuchsiaCityName
- IMAP SAFARI_ZONE_GATE, $8,$C,SafariZoneName
- IMAP FUCHSIA_MEETING_ROOM, $8,$D,FuchsiaCityName
- IMAP SEAFOAM_ISLANDS_B4F, $5,$F,SeafoamIslandsName
- IMAP VERMILION_OLD_ROD_HOUSE, $A,$9,VermilionCityName
- IMAP FUCHSIA_GOOD_ROD_HOUSE, $8,$D,FuchsiaCityName
- IMAP POKEMON_MANSION_1F, $2,$F,PokemonMansionName
- IMAP CINNABAR_MART_COPY, $2,$F,CinnabarIslandName
- IMAP INDIGO_PLATEAU_LOBBY, $0,$2,IndigoPlateauName
- IMAP MR_PSYCHICS_HOUSE, $A,$5,SaffronCityName
- IMAP ROUTE_15_GATE_2F, $9,$D,Route15Name
- IMAP ROUTE_16_FLY_HOUSE, $4,$5,Route16Name
- IMAP ROUTE_12_SUPER_ROD_HOUSE, $E,$A,Route12Name
- IMAP ROUTE_18_GATE_2F, $7,$D,Route18Name
- IMAP SEAFOAM_ISLANDS_1F, $5,$F,SeafoamIslandsName
- IMAP ROUTE_22_GATE, $0,$7,Route22Name
- IMAP VICTORY_ROAD_2F, $0,$4,VictoryRoadName
- IMAP ROUTE_12_GATE_2F, $E,$7,Route12Name
- IMAP VERMILION_TRADE_HOUSE, $A,$9,VermilionCityName
- IMAP DIGLETTS_CAVE, $3,$4,DiglettsCaveName
- IMAP VICTORY_ROAD_3F, $0,$4,VictoryRoadName
- IMAP UNUSED_MAP_CE, $7,$5,RocketHQName
- IMAP SILPH_CO_8F, $A,$5,SilphCoName
- IMAP POKEMON_MANSION_B1F, $2,$F,PokemonMansionName
- IMAP SAFARI_ZONE_NORTH_REST_HOUSE, $8,$C,SafariZoneName
- IMAP CERULEAN_CAVE_1F, $9,$1,CeruleanCaveName
- IMAP NAME_RATERS_HOUSE, $E,$5,LavenderTownName
- IMAP CERULEAN_BADGE_HOUSE, $A,$2,CeruleanCityName
- IMAP ROCK_TUNNEL_B1F, $E,$3,RockTunnelName
- IMAP SILPH_CO_ELEVATOR, $A,$5,SilphCoName
- IMAP AGATHAS_ROOM, $0,$2,PokemonLeagueName
- IMAP BEACH_HOUSE, $6,$F,Route19Name
- db $FF
diff --git a/data/trades.asm b/data/trades.asm
deleted file mode 100755
index 4fa52d30..00000000
--- a/data/trades.asm
+++ /dev/null
@@ -1,12 +0,0 @@
-TradeMons:
-; givemonster, getmonster, textstring, nickname (11 bytes), 14 bytes total
- 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@@@@@@"
diff --git a/data/trainer_moves.asm b/data/trainer_moves.asm
deleted file mode 100755
index 696253e3..00000000
--- a/data/trainer_moves.asm
+++ /dev/null
@@ -1,160 +0,0 @@
-; yellow has its own format.
-
-; entry = trainerclass, trainerid, moveset+, 0
-; moveset = partymon location, partymon's move, moveid
-
-SpecialTrainerMoves:
- db BUG_CATCHER,$f
- db 2,2,TACKLE
- db 2,3,STRING_SHOT
- db 0
-
- db YOUNGSTER,$e
- db 1,4,FISSURE
- db 0
-
- db BROCK,$1
- db 2,3,BIND
- db 2,4,BIDE
- db 0
-
- db MISTY,$1
- db 2,4,BUBBLEBEAM
- db 0
-
- db LT_SURGE,$1
- db 1,1,THUNDERBOLT
- db 1,2,MEGA_PUNCH
- db 1,3,MEGA_KICK
- db 1,4,GROWL
- db 0
-
- db ERIKA,$1
- db 1,3,MEGA_DRAIN
- db 2,1,RAZOR_LEAF
- db 3,1,PETAL_DANCE
- db 0
-
- db KOGA,$1
- db 1,1,TOXIC
- db 1,2,TACKLE
- db 2,1,TOXIC
- db 2,3,SUPERSONIC
- db 3,1,TOXIC
- db 3,2,DOUBLE_EDGE
- db 4,1,LEECH_LIFE
- db 4,2,DOUBLE_TEAM
- db 4,3,PSYCHIC_M
- db 4,4,TOXIC
- db 0
-
- db BLAINE,$1
- db 1,1,FLAMETHROWER
- db 1,4,CONFUSE_RAY
- db 3,1,FLAMETHROWER
- db 3,2,FIRE_BLAST
- db 3,3,REFLECT
- db 0
-
- db SABRINA,$1
- db 1,1,FLASH
- db 2,1,KINESIS
- db 2,4,PSYWAVE
- db 3,1,PSYWAVE
- db 0
-
- db GIOVANNI,$3
- db 1,3,FISSURE
- db 2,2,DOUBLE_TEAM
- db 3,1,EARTHQUAKE
- db 3,3,THUNDER
- db 4,1,EARTHQUAKE
- db 4,2,LEER
- db 4,3,THUNDER
- db 5,1,ROCK_SLIDE
- db 5,4,EARTHQUAKE
- db 0
-
- db LORELEI,$1
- db 1,1,BUBBLEBEAM
- db 2,3,ICE_BEAM
- db 3,1,PSYCHIC_M
- db 3,2,SURF
- db 4,3,LOVELY_KISS
- db 5,3,BLIZZARD
- db 0
-
- db BRUNO,$1
- db 1,1,ROCK_SLIDE
- db 1,2,SCREECH
- db 1,4,DIG
- db 2,3,FIRE_PUNCH
- db 2,4,DOUBLE_TEAM
- db 3,1,DOUBLE_KICK
- db 3,2,MEGA_KICK
- db 3,4,DOUBLE_TEAM
- db 4,1,ROCK_SLIDE
- db 4,2,SCREECH
- db 4,4,EARTHQUAKE
- db 5,2,KARATE_CHOP
- db 5,3,STRENGTH
- db 0
-
- db AGATHA,$1
- db 1,2,SUBSTITUTE
- db 1,3,LICK
- db 1,4,MEGA_DRAIN
- db 2,2,TOXIC
- db 2,4,LEECH_LIFE
- db 3,2,LICK
- db 4,1,WRAP
- db 5,2,PSYCHIC_M
- db 0
-
- db LANCE,$1
- db 1,1,DRAGON_RAGE
- db 2,1,THUNDER_WAVE
- db 2,3,THUNDERBOLT
- db 3,1,BUBBLEBEAM
- db 3,2,WRAP
- db 3,3,ICE_BEAM
- db 4,1,WING_ATTACK
- db 4,2,SWIFT
- db 4,3,FLY
- db 5,1,BLIZZARD
- db 5,2,FIRE_BLAST
- db 5,3,THUNDER
- db 0
-
- db SONY3,$1
- db 1,3,EARTHQUAKE
- db 2,4,KINESIS
- db 3,4,LEECH_SEED
- db 4,1,ICE_BEAM
- db 5,1,CONFUSE_RAY
- db 5,4,FIRE_SPIN
- db 6,3,QUICK_ATTACK
- db 0
-
- db SONY3,$2
- db 1,3,EARTHQUAKE
- db 2,4,KINESIS
- db 3,4,LEECH_SEED
- db 4,1,THUNDERBOLT
- db 5,1,ICE_BEAM
- db 6,2,REFLECT
- db 6,3,QUICK_ATTACK
- db 0
-
- db SONY3,$3
- db 1,3,EARTHQUAKE
- db 2,4,KINESIS
- db 3,4,LEECH_SEED
- db 4,1,CONFUSE_RAY
- db 4,4,FIRE_SPIN
- db 5,1,THUNDERBOLT
- db 6,1,AURORA_BEAM
- db 6,3,QUICK_ATTACK
- db 0
-
- db $ff
diff --git a/data/trainer_parties.asm b/data/trainer_parties.asm
deleted file mode 100755
index 0c3dcc8f..00000000
--- a/data/trainer_parties.asm
+++ /dev/null
@@ -1,699 +0,0 @@
-TrainerDataPointers:
- 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)
- ; all the next bytes are pokemon species
- ; null-terminated
-; if first byte == FF, then
- ; first byte is FF (obviously)
- ; every next two bytes are a level and species
- ; null-terminated
-
-YoungsterData:
- db 11,RATTATA,EKANS,0
- db 14,SPEAROW,0
-; Mt. Moon 1F
- db 10,RATTATA,RATTATA,ZUBAT,0
-; Route 24
- db 14,RATTATA,EKANS,ZUBAT,0
-; Route 25
- db 15,RATTATA,SPEAROW,0
- db 17,SLOWPOKE,0
- db 14,EKANS,SANDSHREW,0
-; SS Anne 1F Rooms
- db 21,NIDORAN_M,0
-; Route 11
- db 21,EKANS,0
- db 19,SANDSHREW,ZUBAT,0
- db 17,RATTATA,RATTATA,RATICATE,0
- db 18,NIDORAN_M,NIDORINO,0
-; Unused
- db 17,SPEAROW,RATTATA,RATTATA,SPEAROW,0
- db 24,SANDSHREW,0
-BugCatcherData:
- db 7,CATERPIE,CATERPIE,0
- db 6,METAPOD,CATERPIE,METAPOD,0
- db 10,CATERPIE,0
- db 10,CATERPIE,WEEDLE,CATERPIE,0
- db 9,WEEDLE,KAKUNA,CATERPIE,METAPOD,0
- db 11,CATERPIE,METAPOD,0
-; Mt. Moon 1F
- db 11,WEEDLE,KAKUNA,0
- db 10,CATERPIE,METAPOD,CATERPIE,0
-; Route 24
- db 14,CATERPIE,WEEDLE,0
-; Route 6
- db 16,WEEDLE,CATERPIE,WEEDLE,0
- db 20,BUTTERFREE,0
-; Unused
- db 18,METAPOD,CATERPIE,VENONAT,0
-; Route 9
- db 19,BEEDRILL,BEEDRILL,0
- db 20,CATERPIE,WEEDLE,VENONAT,0
- db 8,CATERPIE,METAPOD,0
-LassData:
- db 9,PIDGEY,PIDGEY,0
- db 10,RATTATA,NIDORAN_M,0
- db 14,JIGGLYPUFF,0
-; Route 4
- db 31,PARAS,PARAS,PARASECT,0
-; Mt. Moon 1F
- db 11,ODDISH,BELLSPROUT,0
- db 14,CLEFAIRY,0
-; Route 24
- db 16,PIDGEY,NIDORAN_F,0
- db 14,PIDGEY,NIDORAN_F,0
-; Route 25
- db 15,NIDORAN_M,NIDORAN_F,0
- db 13,ODDISH,PIDGEY,ODDISH,0
-; SS Anne 1F Rooms
- db 18,PIDGEY,NIDORAN_F,0
-; SS Anne 2F Rooms
- db 20,JIGGLYPUFF,0
-; Route 8
- db 23,NIDORAN_F,NIDORINA,0
- db 24,MEOWTH,MEOWTH,MEOWTH,0
- db 19,PIDGEY,RATTATA,NIDORAN_F,MEOWTH,NIDORAN_M,0
- db 22,CLEFAIRY,CLEFAIRY,0
-; Celadon Gym
- db 23,BELLSPROUT,WEEPINBELL,0
- db 23,ODDISH,GLOOM,0
- db 6,NIDORAN_F,NIDORAN_M,0
-SailorData:
-; SS Anne Stern
- db 18,MACHOP,SHELLDER,0
- db 17,MACHOP,TENTACOOL,0
-; SS Anne B1F Rooms
- db 21,SHELLDER,0
- db 17,HORSEA,SHELLDER,TENTACOOL,0
- db 18,TENTACOOL,STARYU,0
- db 17,HORSEA,HORSEA,HORSEA,0
- db 20,MACHOP,0
-; Vermilion Gym
- db 24,MAGNEMITE,0
-JrTrainerMData:
-; Pewter Gym
- db 9,DIGLETT,SANDSHREW,0
-; Route 24/Route 25
- db 14,RATTATA,EKANS,0
-; Route 24
- db 18,MANKEY,0
-; Route 6
- db 20,SQUIRTLE,0
- db 16,SPEAROW,RATICATE,0
-; Unused
- db 18,DIGLETT,DIGLETT,SANDSHREW,0
-; Route 9
- db 21,GROWLITHE,CHARMANDER,0
- db 19,RATTATA,DIGLETT,EKANS,SANDSHREW,0
-; Route 12
- db 29,NIDORAN_M,NIDORINO,0
- db 16,WEEPINBELL,0
-JrTrainerFData:
-; Cerulean Gym
- db 19,GOLDEEN,0
-; Route 6
- db 16,ODDISH,BELLSPROUT,0
- db 16,PIDGEY,PIDGEY,PIDGEY,0
-; Unused
- db 22,BULBASAUR,0
-; Route 9
- db 18,ODDISH,BELLSPROUT,ODDISH,BELLSPROUT,0
- db 23,MEOWTH,0
-; Route 10
- db 20,JIGGLYPUFF,CLEFAIRY,0
- db 21,PIDGEY,PIDGEOTTO,0
-; Rock Tunnel B1F
- db 21,JIGGLYPUFF,PIDGEY,MEOWTH,0
- db 22,ODDISH,BULBASAUR,0
-; Celadon Gym
- db 24,BULBASAUR,IVYSAUR,0
-; Route 13
- db 24,PIDGEY,MEOWTH,RATTATA,PIDGEY,MEOWTH,0
- db 30,POLIWAG,POLIWAG,0
- db 27,PIDGEY,MEOWTH,PIDGEY,PIDGEOTTO,0
- db 28,GOLDEEN,POLIWAG,HORSEA,0
-; Route 20
- db 31,GOLDEEN,SEAKING,0
-; Rock Tunnel 1F
- db 22,BELLSPROUT,CLEFAIRY,0
- db 20,MEOWTH,ODDISH,PIDGEY,0
- db 19,PIDGEY,RATTATA,RATTATA,BELLSPROUT,0
-; Route 15
- db 28,GLOOM,ODDISH,ODDISH,0
- db 29,PIDGEY,PIDGEOTTO,0
- db 33,CLEFAIRY,0
- db 29,BELLSPROUT,ODDISH,TANGELA,0
-; Route 20
- db 30,TENTACOOL,HORSEA,SEEL,0
- db 20,CUBONE,0
-PokemaniacData:
-; Route 10
- db 30,RHYHORN,LICKITUNG,0
- db 20,CUBONE,SLOWPOKE,0
-; Rock Tunnel B1F
- db 20,SLOWPOKE,SLOWPOKE,SLOWPOKE,0
- db 22,CHARMANDER,CUBONE,0
- db 25,SLOWPOKE,0
-; Victory Road 2F
- db 40,CHARMELEON,LAPRAS,LICKITUNG,0
-; Rock Tunnel 1F
- db 23,CUBONE,SLOWPOKE,0
-SuperNerdData:
-; Mt. Moon 1F
- db 11,MAGNEMITE,VOLTORB,0
-; Mt. Moon B2F
- db 12,GRIMER,VOLTORB,KOFFING,0
-; Route 8
- db 20,VOLTORB,KOFFING,VOLTORB,MAGNEMITE,0
- db 22,GRIMER,MUK,GRIMER,0
- db 26,KOFFING,0
-; Unused
- db 22,KOFFING,MAGNEMITE,WEEZING,0
- db 20,MAGNEMITE,MAGNEMITE,KOFFING,MAGNEMITE,0
- db 24,MAGNEMITE,VOLTORB,0
-; Cinnabar Gym
- db 36,VULPIX,VULPIX,NINETALES,0
- db 34,PONYTA,CHARMANDER,VULPIX,GROWLITHE,0
- db 41,RAPIDASH,0
- db 37,GROWLITHE,VULPIX,0
-HikerData:
-; Mt. Moon 1F
- db 10,GEODUDE,GEODUDE,ONIX,0
-; Route 25
- db 15,MACHOP,GEODUDE,0
- db 13,GEODUDE,GEODUDE,MACHOP,GEODUDE,0
- db 17,ONIX,0
-; Route 9
- db 21,GEODUDE,ONIX,0
- db 20,GEODUDE,MACHOP,GEODUDE,0
-; Route 10
- db 21,GEODUDE,ONIX,0
- db 19,ONIX,GRAVELER,0
-; Rock Tunnel B1F
- db 21,GEODUDE,GEODUDE,GRAVELER,0
- db 25,GEODUDE,0
-; Route 9/Rock Tunnel B1F
- db 20,MACHOP,ONIX,0
-; Rock Tunnel 1F
- db 19,GEODUDE,MACHOP,GEODUDE,GEODUDE,0
- db 20,ONIX,ONIX,GEODUDE,0
- db 21,GEODUDE,GRAVELER,0
-BikerData:
-; Route 13
- db 28,KOFFING,KOFFING,KOFFING,0
-; Route 14
- db 29,KOFFING,GRIMER,0
-; Route 15
- db 25,KOFFING,KOFFING,WEEZING,KOFFING,GRIMER,0
- db 28,KOFFING,GRIMER,WEEZING,0
-; Route 16
- db 29,GRIMER,KOFFING,0
- db 33,WEEZING,0
- db 26,GRIMER,GRIMER,GRIMER,GRIMER,0
-; Route 17
- ; From https://www.smogon.com/smog/issue27/glitch:
- ; 0E:5FC2 is offset of the ending 0 for this first Biker on Route 17.
- ; BaseStats + (MonBaseStatsEnd - MonBaseStats) * (000 - 1) = $5FC2;
- ; that's the formula from GetMonHeader for the base stats of mon #000.
- ; (BaseStats = $43DE and BANK(BaseStats) = $0E.)
- ; Finally, PokedexOrder lists 0 as the dex ID for every MissingNo.
- ; The result is that this data gets interpreted as the base stats
- ; for MissingNo: 0,33,MUK,0,29,VOLTORB,VOLTORB,0,...,28,GRIMER,GRIMER.
- db 28,WEEZING,KOFFING,WEEZING,0
- db 33,MUK,0
- db 29,VOLTORB,VOLTORB,0
- db 29,WEEZING,MUK,0
- db 25,KOFFING,WEEZING,KOFFING,KOFFING,WEEZING,0
-; Route 14
- db 26,KOFFING,KOFFING,GRIMER,KOFFING,0
- db 28,GRIMER,GRIMER,KOFFING,0
- db 29,KOFFING,MUK,0
-BurglarData:
-; Unused
- db 29,GROWLITHE,VULPIX,0
- db 33,GROWLITHE,0
- db 28,VULPIX,CHARMANDER,PONYTA,0
-; Cinnabar Gym
- db 36,GROWLITHE,VULPIX,NINETALES,0
- db 41,PONYTA,0
- db 37,VULPIX,GROWLITHE,0
-; Mansion 2F
- db 34,CHARMANDER,CHARMELEON,0
-; Mansion 3F
- db 38,NINETALES,0
-; Mansion B1F
- db 34,GROWLITHE,PONYTA,0
-EngineerData:
-; Unused
- db 21,VOLTORB,MAGNEMITE,0
-; Route 11
- db 21,MAGNEMITE,0
- db 18,MAGNEMITE,MAGNEMITE,MAGNETON,0
-Juggler1Data:
-; none
-FisherData:
-; SS Anne 2F Rooms
- db 17,GOLDEEN,TENTACOOL,GOLDEEN,0
-; SS Anne B1F Rooms
- db 17,TENTACOOL,STARYU,SHELLDER,0
-; Route 12
- db 22,GOLDEEN,POLIWAG,GOLDEEN,0
- db 24,TENTACOOL,GOLDEEN,0
- db 27,GOLDEEN,0
- db 21,POLIWAG,SHELLDER,GOLDEEN,HORSEA,0
-; Route 21
- db 28,SEAKING,GOLDEEN,SEAKING,SEAKING,0
- db 31,SHELLDER,CLOYSTER,0
- db 27,MAGIKARP,MAGIKARP,MAGIKARP,MAGIKARP,MAGIKARP,MAGIKARP,0
- db 33,SEAKING,GOLDEEN,0
-; Route 12
- db 24,MAGIKARP,MAGIKARP,0
-SwimmerData:
-; Cerulean Gym
- db 16,HORSEA,SHELLDER,0
-; Route 19
- db 30,TENTACOOL,SHELLDER,0
- db 29,GOLDEEN,HORSEA,STARYU,0
- db 30,POLIWAG,POLIWHIRL,0
- db 27,HORSEA,TENTACOOL,TENTACOOL,GOLDEEN,0
- db 29,GOLDEEN,SHELLDER,SEAKING,0
- db 30,HORSEA,HORSEA,0
- db 27,TENTACOOL,TENTACOOL,STARYU,HORSEA,TENTACRUEL,0
-; Route 20
- db 31,SHELLDER,CLOYSTER,0
- db 35,STARYU,0
- db 28,HORSEA,HORSEA,SEADRA,HORSEA,0
-; Route 21
- db 33,SEADRA,TENTACRUEL,0
- db 37,STARMIE,0
- db 33,STARYU,WARTORTLE,0
- db 32,POLIWHIRL,TENTACOOL,SEADRA,0
-CueBallData:
-; Route 16
- db 28,MACHOP,MANKEY,MACHOP,0
- db 29,MANKEY,MACHOP,0
- db 33,MACHOP,0
-; Route 17
- db 29,MANKEY,PRIMEAPE,0
- db 29,MACHOP,MACHOKE,0
- db 33,MACHOKE,0
- db 26,MANKEY,MANKEY,MACHOKE,MACHOP,0
- db 29,PRIMEAPE,MACHOKE,0
-; Route 21
- db 31,TENTACOOL,TENTACOOL,TENTACRUEL,0
-GamblerData:
-; Route 11
- db 18,POLIWAG,HORSEA,0
- db 18,BELLSPROUT,ODDISH,0
- db 18,VOLTORB,MAGNEMITE,0
- db 18,GROWLITHE,VULPIX,0
-; Route 8
- db 22,POLIWAG,POLIWAG,POLIWHIRL,0
-; Unused
- db 22,ONIX,GEODUDE,GRAVELER,0
-; Route 8
- db 24,GROWLITHE,VULPIX,0
-BeautyData:
-; Celadon Gym
- db 21,ODDISH,BELLSPROUT,ODDISH,BELLSPROUT,0
- db 24,BELLSPROUT,BELLSPROUT,0
- db 26,EXEGGCUTE,0
-; Route 13
- db 27,RATTATA,VULPIX,RATTATA,0
- db 29,CLEFAIRY,MEOWTH,0
-; Route 20
- db 35,SEAKING,0
- db 30,SHELLDER,SHELLDER,CLOYSTER,0
- db 31,POLIWAG,SEAKING,0
-; Route 15
- db 29,PIDGEOTTO,WIGGLYTUFF,0
- db 29,BULBASAUR,IVYSAUR,0
-; Unused
- db 33,WEEPINBELL,BELLSPROUT,WEEPINBELL,0
-; Route 19
- db 27,POLIWAG,GOLDEEN,SEAKING,GOLDEEN,POLIWAG,0
- db 30,GOLDEEN,SEAKING,0
- db 29,STARYU,STARYU,STARYU,0
-; Route 20
- db 30,SEADRA,HORSEA,SEADRA,0
-PsychicData:
-; Saffron Gym
- 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:
-; Vermilion Gym
- db 20,VOLTORB,VOLTORB,VOLTORB,0
-; Route 12
- db 29,VOLTORB,ELECTRODE,0
-JugglerData:
-; Silph Co. 5F
- db 29,KADABRA,MR_MIME,0
-; Victory Road 2F
- db 41,DROWZEE,HYPNO,KADABRA,KADABRA,0
-; Fuchsia Gym
- db 31,DROWZEE,DROWZEE,KADABRA,DROWZEE,0
- db 34,DROWZEE,HYPNO,0
-; Victory Road 2F
- db 48,MR_MIME,0
-; Unused
- db 33,HYPNO,0
-; Fuchsia Gym
- db 38,HYPNO,0
- db 34,DROWZEE,KADABRA,0
-TamerData:
-; Fuchsia Gym
- db 34,SANDSLASH,ARBOK,0
- db 33,ARBOK,SANDSLASH,ARBOK,0
-; Viridian Gym
- db 43,RHYHORN,0
- db 39,ARBOK,TAUROS,0
-; Victory Road 2F
- db 44,PERSIAN,GOLDUCK,0
-; Unused
- db 42,RHYHORN,PRIMEAPE,ARBOK,TAUROS,0
-BirdKeeperData:
-; Route 13
- db 29,PIDGEY,PIDGEOTTO,0
- db 25,SPEAROW,PIDGEY,PIDGEY,SPEAROW,SPEAROW,0
- db 26,PIDGEY,PIDGEOTTO,SPEAROW,FEAROW,0
-; Route 14
- db 33,FARFETCHD,0
- db 29,SPEAROW,FEAROW,0
-; Route 15
- db 26,PIDGEOTTO,FARFETCHD,DODUO,PIDGEY,0
- db 28,DODRIO,DODUO,DODUO,0
-; Route 18
- db 29,SPEAROW,FEAROW,0
- db 34,DODRIO,0
- db 26,SPEAROW,SPEAROW,FEAROW,SPEAROW,0
-; Route 20
- db 30,FEAROW,FEAROW,PIDGEOTTO,0
-; Unused
- db 39,PIDGEOTTO,PIDGEOTTO,PIDGEY,PIDGEOTTO,0
- db 42,FARFETCHD,FEAROW,0
-; Route 14
- 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:
-; Fighting Dojo
- db 37,HITMONLEE,HITMONCHAN,0
- db 31,MANKEY,MANKEY,PRIMEAPE,0
- db 32,MACHOP,MACHOKE,0
- db 36,PRIMEAPE,0
- db 31,MACHOP,MANKEY,PRIMEAPE,0
-; Viridian Gym
- db 40,MACHOP,MACHOKE,0
- db 43,MACHOKE,0
- db 38,MACHOKE,MACHOP,MACHOKE,0
-; Victory Road 2F
- db 43,MACHOKE,MACHOP,MACHOKE,0
-Green1Data:
- db 5,EEVEE,0
-; Route 22
- db $FF,9,SPEAROW,8,EEVEE,0
-; Cerulean City
- db $FF,18,SPEAROW,15,SANDSHREW,15,RATTATA,17,EEVEE,0
-ProfOakData:
-; Unused
- 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:
-; none
-ScientistData:
-; Unused
- db 34,KOFFING,VOLTORB,0
-; Silph Co. 2F
- db 26,GRIMER,WEEZING,KOFFING,WEEZING,0
- db 28,MAGNEMITE,VOLTORB,MAGNETON,0
-; Silph Co. 3F/Mansion 1F
- db 29,ELECTRODE,WEEZING,0
-; Silph Co. 4F
- db 33,ELECTRODE,0
-; Silph Co. 5F
- db 26,MAGNETON,KOFFING,WEEZING,MAGNEMITE,0
-; Silph Co. 6F
- db 25,VOLTORB,KOFFING,MAGNETON,MAGNEMITE,KOFFING,0
-; Silph Co. 7F
- db 29,ELECTRODE,MUK,0
-; Silph Co. 8F
- db 29,GRIMER,ELECTRODE,0
-; Silph Co. 9F
- db 28,VOLTORB,KOFFING,MAGNETON,0
-; Silph Co. 10F
- db 29,MAGNEMITE,KOFFING,0
-; Mansion 3F
- db 33,MAGNEMITE,MAGNETON,VOLTORB,0
-; Mansion B1F
- db 34,MAGNEMITE,ELECTRODE,0
-GiovanniData:
-; Rocket Hideout B4F
- db $FF,25,ONIX,24,RHYHORN,29,PERSIAN,0
-; Silph Co. 11F
- db $FF,37,NIDORINO,35,PERSIAN,37,RHYHORN,41,NIDOQUEEN,0
-; Viridian Gym
- db $FF,50,DUGTRIO,53,PERSIAN,53,NIDOQUEEN,55,NIDOKING,55,RHYDON,0
-RocketData:
-; Mt. Moon B2F
- db 13,RATTATA,ZUBAT,0
- db 11,SANDSHREW,RATTATA,ZUBAT,0
- db 12,ZUBAT,EKANS,0
- db 16,RATICATE,0
-; Cerulean City
- db 17,MACHOP,DROWZEE,0
-; Route 24
- db 15,EKANS,ZUBAT,0
-; Game Corner
- db 20,RATICATE,ZUBAT,0
-; Rocket Hideout B1F
- db 21,DROWZEE,MACHOP,0
- db 21,RATICATE,RATICATE,0
- db 20,GRIMER,KOFFING,KOFFING,0
- db 19,RATTATA,RATICATE,RATICATE,RATTATA,0
- db 22,GRIMER,KOFFING,0
-; Rocket Hideout B2F
- db 17,ZUBAT,KOFFING,GRIMER,ZUBAT,RATICATE,0
-; Rocket Hideout B3F
- db 20,RATTATA,RATICATE,DROWZEE,0
- db 21,MACHOP,MACHOP,0
-; Rocket Hideout B4F
- db 23,SANDSHREW,EKANS,SANDSLASH,0
- db 23,EKANS,SANDSHREW,ARBOK,0
- db 21,KOFFING,ZUBAT,0
-; Pokémon Tower 7F
- db 25,ZUBAT,ZUBAT,GOLBAT,0
- db 26,KOFFING,DROWZEE,0
- db 23,ZUBAT,RATTATA,RATICATE,ZUBAT,0
-; Unused
- db 26,DROWZEE,KOFFING,0
-; Silph Co. 2F
- db 29,CUBONE,ZUBAT,0
- db 25,GOLBAT,ZUBAT,ZUBAT,RATICATE,ZUBAT,0
-; Silph Co. 3F
- db 28,RATICATE,HYPNO,RATICATE,0
-; Silph Co. 4F
- db 29,MACHOP,DROWZEE,0
- db 28,EKANS,ZUBAT,CUBONE,0
-; Silph Co. 5F
- db 33,ARBOK,0
- db 33,HYPNO,0
-; Silph Co. 6F
- db 29,MACHOP,MACHOKE,0
- db 28,ZUBAT,ZUBAT,GOLBAT,0
-; Silph Co. 7F
- db 26,RATICATE,ARBOK,KOFFING,GOLBAT,0
- db 29,CUBONE,CUBONE,0
- db 29,SANDSHREW,SANDSLASH,0
-; Silph Co. 8F
- db 26,RATICATE,ZUBAT,GOLBAT,RATTATA,0
- db 28,WEEZING,GOLBAT,KOFFING,0
-; Silph Co. 9F
- db 28,DROWZEE,GRIMER,MACHOP,0
- db 28,GOLBAT,DROWZEE,HYPNO,0
-; Silph Co. 10F
- db 33,MACHOKE,0
-; Silph Co. 11F
- db 25,RATTATA,RATTATA,ZUBAT,RATTATA,EKANS,0
- db 32,CUBONE,DROWZEE,MAROWAK,0
-;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
-; unused JessieJames trainers
- db 16,KOFFING,0
- db 27,KOFFING,0
- db 29,WEEZING,0
- db 33,WEEZING,0
-CooltrainerMData:
-; Viridian Gym
- db 39,NIDORINO,NIDOKING,0
-; Victory Road 3F
- db 43,EXEGGUTOR,CLOYSTER,ARCANINE,0
- db 43,KINGLER,TENTACRUEL,BLASTOISE,0
-; Unused
- db 45,KINGLER,STARMIE,0
-; Victory Road 1F
- db 42,IVYSAUR,WARTORTLE,CHARMELEON,CHARIZARD,0
-; Unused
- db 44,IVYSAUR,WARTORTLE,CHARMELEON,0
- db 49,NIDOKING,0
- db 44,KINGLER,CLOYSTER,0
-; Viridian Gym
- db 39,SANDSLASH,DUGTRIO,0
- db 43,RHYHORN,0
-CooltrainerFData:
-; Celadon Gym
- db 24,WEEPINBELL,GLOOM,IVYSAUR,0
-; Victory Road 3F
- db 43,BELLSPROUT,WEEPINBELL,VICTREEBEL,0
- db 43,PARASECT,DEWGONG,CHANSEY,0
-; Unused
- db 46,VILEPLUME,BUTTERFREE,0
-; Victory Road 1F
- db 44,PERSIAN,NINETALES,0
-; Unused
- db 45,IVYSAUR,VENUSAUR,0
- db 45,NIDORINA,NIDOQUEEN,0
- db 43,PERSIAN,NINETALES,RAICHU,0
-BrunoData:
- db $FF,53,ONIX,55,HITMONCHAN,55,HITMONLEE,56,ONIX,58,MACHAMP,0
-BrockData:
- db $FF,10,GEODUDE,12,ONIX,0
-MistyData:
- db $FF,18,STARYU,21,STARMIE,0
-LtSurgeData:
- db $FF,28,RAICHU,0
-ErikaData:
- db $FF,30,TANGELA,32,WEEPINBELL,32,GLOOM,0
-KogaData:
- db $FF,44,VENONAT,46,VENONAT,48,VENONAT,50,VENOMOTH,0
-BlaineData:
- db $FF,48,NINETALES,50,RAPIDASH,54,ARCANINE,0
-SabrinaData:
- db $FF,50,ABRA,50,KADABRA,50,ALAKAZAM,0
-GentlemanData:
-; SS Anne 1F Rooms
- db 18,GROWLITHE,GROWLITHE,0
- db 19,NIDORAN_M,NIDORAN_F,0
-; SS Anne 2F Rooms/Vermilion Gym
- db 22,VOLTORB,MAGNEMITE,0
-; Unused
- db 48,PRIMEAPE,0
-; SS Anne 2F Rooms
- db 17,GROWLITHE,PONYTA,0
-Green2Data:
-; SS Anne 2F
- db $FF,19,SPEAROW,16,RATTATA,18,SANDSHREW,20,EEVEE,0
-; Pokémon Tower 2F
- 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
-; Silph Co. 7F
- 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
-; Route 22
- 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
-Green3Data:
- 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
-LoreleiData:
- db $FF,54,DEWGONG,53,CLOYSTER,54,SLOWBRO,56,JYNX,56,LAPRAS,0
-ChannelerData:
-; Unused
- db 22,GASTLY,0
- db 24,GASTLY,0
- db 23,GASTLY,GASTLY,0
- db 24,GASTLY,0
-; Pokémon Tower 3F
- db 23,GASTLY,0
- db 24,GASTLY,0
-; Unused
- db 24,HAUNTER,0
-; Pokémon Tower 3F
- db 22,GASTLY,0
-; Pokémon Tower 4F
- db 24,GASTLY,0
- db 23,GASTLY,GASTLY,0
-; Unused
- db 24,GASTLY,0
-; Pokémon Tower 4F
- db 22,GASTLY,0
-; Unused
- db 24,GASTLY,0
-; Pokémon Tower 5F
- db 23,HAUNTER,0
-; Unused
- db 24,GASTLY,0
-; Pokémon Tower 5F
- db 22,GASTLY,0
- db 24,GASTLY,0
- db 22,HAUNTER,0
-; Pokémon Tower 6F
- db 22,GASTLY,GASTLY,GASTLY,0
- db 24,GASTLY,0
- db 24,GASTLY,0
-; Saffron Gym
- db 34,GASTLY,HAUNTER,0
- db 38,HAUNTER,0
- db 33,GASTLY,GASTLY,HAUNTER,0
-AgathaData:
- db $FF,56,GENGAR,56,GOLBAT,55,HAUNTER,58,ARBOK,60,GENGAR,0
-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
deleted file mode 100755
index cc7ca605..00000000
--- a/data/trainer_types.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-FemaleTrainerList::
- db OPP_LASS
- db OPP_JR_TRAINER_F
- db OPP_BEAUTY
- db OPP_COOLTRAINER_F
- db $FF
-
-EvilTrainerList::
- 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/trainers/ai_pointers.asm b/data/trainers/ai_pointers.asm
new file mode 100644
index 00000000..9008be86
--- /dev/null
+++ b/data/trainers/ai_pointers.asm
@@ -0,0 +1,52 @@
+TrainerAIPointers:
+ ; one entry per trainer class
+ ; first byte, number of times (per Pokémon) it can occur
+ ; next two bytes, pointer to AI subroutine for trainer class
+ ; subroutines are defined in engine/battle/trainer_ai.asm
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, JugglerAI ; unused_juggler
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 3, JugglerAI ; juggler
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 2, BlackbeltAI ; blackbelt
+ dbw 3, GenericAI
+ dbw 3, GenericAI
+ dbw 1, GenericAI ; chief
+ dbw 3, GenericAI
+ dbw 1, GiovanniAI ; giovanni
+ dbw 3, GenericAI
+ dbw 2, CooltrainerMAI ; cooltrainerm
+ dbw 1, CooltrainerFAI ; cooltrainerf
+ dbw 2, BrunoAI ; bruno
+ dbw 5, BrockAI ; brock
+ dbw 1, MistyAI ; misty
+ dbw 1, LtSurgeAI ; surge
+ dbw 1, ErikaAI ; erika
+ dbw 2, KogaAI ; koga
+ dbw 2, BlaineAI ; blaine
+ dbw 1, SabrinaAI ; sabrina
+ dbw 3, GenericAI
+ dbw 1, Sony2AI ; sony2
+ dbw 1, Sony3AI ; sony3
+ dbw 2, LoreleiAI ; lorelei
+ dbw 3, GenericAI
+ dbw 2, AgathaAI ; agatha
+ dbw 1, LanceAI ; lance
diff --git a/data/trainers/encounter_types.asm b/data/trainers/encounter_types.asm
new file mode 100755
index 00000000..5bca2517
--- /dev/null
+++ b/data/trainers/encounter_types.asm
@@ -0,0 +1,17 @@
+FemaleTrainerList::
+ db OPP_LASS
+ db OPP_JR_TRAINER_F
+ db OPP_BEAUTY
+ db OPP_COOLTRAINER_F
+ db -1 ; end
+
+EvilTrainerList::
+ db OPP_UNUSED_JUGGLER
+ db OPP_GAMBLER
+ db OPP_ROCKER
+ db OPP_JUGGLER
+ db OPP_CHIEF
+ db OPP_SCIENTIST
+ db OPP_GIOVANNI
+ db OPP_ROCKET
+ db -1 ; end
diff --git a/data/trainers/move_choices.asm b/data/trainers/move_choices.asm
new file mode 100644
index 00000000..dd8277dc
--- /dev/null
+++ b/data/trainers/move_choices.asm
@@ -0,0 +1,57 @@
+move_choices: MACRO
+REPT _NARG
+ db \1
+ shift
+ENDR
+ db 0 ; end
+ENDM
+
+; move choice modification methods that are applied for each trainer class
+TrainerClassMoveChoiceModifications:
+ move_choices ; YOUNGSTER
+ move_choices 1 ; BUG CATCHER
+ move_choices 1 ; LASS
+ move_choices 1, 3 ; SAILOR
+ move_choices 1 ; JR_TRAINER_M
+ move_choices 1 ; JR_TRAINER_F
+ move_choices 1, 2, 3 ; POKEMANIAC
+ move_choices 1, 2 ; SUPER_NERD
+ move_choices 1 ; HIKER
+ move_choices 1 ; BIKER
+ move_choices 1, 3 ; BURGLAR
+ move_choices 1 ; ENGINEER
+ move_choices 1, 2 ; UNUSED_JUGGLER
+ move_choices 1, 3 ; FISHER
+ move_choices 1, 3 ; SWIMMER
+ move_choices ; CUE_BALL
+ move_choices 1 ; GAMBLER
+ move_choices 1, 3 ; BEAUTY
+ move_choices 1, 2 ; PSYCHIC_TR
+ move_choices 1 ; ROCKER
+ move_choices 1 ; JUGGLER
+ move_choices 1 ; TAMER
+ move_choices 1 ; BIRD_KEEPER
+ move_choices 1 ; BLACKBELT
+ move_choices 1 ; RIVAL1
+ move_choices 1, 3 ; PROF_OAK
+ move_choices 1, 2 ; CHIEF
+ move_choices 1, 2 ; SCIENTIST
+ move_choices 1, 3 ; GIOVANNI
+ move_choices 1 ; ROCKET
+ move_choices 1, 3 ; COOLTRAINER_M
+ move_choices 1, 3 ; COOLTRAINER_F
+ move_choices 1 ; BRUNO
+ move_choices 1 ; BROCK
+ move_choices 1, 3 ; MISTY
+ move_choices 1 ; LT_SURGE
+ move_choices 1, 3 ; ERIKA
+ move_choices 1, 3 ; KOGA
+ move_choices 1 ; BLAINE
+ move_choices 1 ; SABRINA
+ move_choices 1, 2 ; GENTLEMAN
+ move_choices 1, 3 ; RIVAL2
+ move_choices 1, 3 ; RIVAL3
+ move_choices 1, 2, 3 ; LORELEI
+ move_choices 1 ; CHANNELER
+ move_choices 1 ; AGATHA
+ move_choices 1, 3 ; LANCE
diff --git a/data/trainers/name_pointers.asm b/data/trainers/name_pointers.asm
new file mode 100644
index 00000000..98e2e406
--- /dev/null
+++ b/data/trainers/name_pointers.asm
@@ -0,0 +1,71 @@
+TrainerNamePointers:
+; what is the point of these?
+ dw .YoungsterName
+ dw .BugCatcherName
+ dw .LassName
+ dw wTrainerName
+ dw .JrTrainerMName
+ dw .JrTrainerFName
+ dw .PokemaniacName
+ dw .SuperNerdName
+ dw wTrainerName
+ dw wTrainerName
+ dw .BurglarName
+ dw .EngineerName
+ dw .UnusedJugglerName
+ dw wTrainerName
+ dw .SwimmerName
+ dw wTrainerName
+ dw wTrainerName
+ dw .BeautyName
+ dw wTrainerName
+ dw .RockerName
+ dw .JugglerName
+ dw wTrainerName
+ dw wTrainerName
+ dw .BlackbeltName
+ dw wTrainerName
+ dw .ProfOakName
+ dw .ChiefName
+ dw .ScientistName
+ dw wTrainerName
+ dw .RocketName
+ dw .CooltrainerMName
+ dw .CooltrainerFName
+ 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: db "YOUNGSTER@"
+.BugCatcherName: db "BUG CATCHER@"
+.LassName: db "LASS@"
+.JrTrainerMName: db "JR.TRAINER♂@"
+.JrTrainerFName: db "JR.TRAINER♀@"
+.PokemaniacName: db "POKéMANIAC@"
+.SuperNerdName: db "SUPER NERD@"
+.BurglarName: db "BURGLAR@"
+.EngineerName: db "ENGINEER@"
+.UnusedJugglerName: db "JUGGLER@"
+.SwimmerName: db "SWIMMER@"
+.BeautyName: db "BEAUTY@"
+.RockerName: db "ROCKER@"
+.JugglerName: db "JUGGLER@"
+.BlackbeltName: db "BLACKBELT@"
+.ProfOakName: db "PROF.OAK@"
+.ChiefName: db "CHIEF@"
+.ScientistName: db "SCIENTIST@"
+.RocketName: db "ROCKET@"
+.CooltrainerMName: db "COOLTRAINER♂@"
+.CooltrainerFName: db "COOLTRAINER♀@"
diff --git a/data/trainers/names.asm b/data/trainers/names.asm
new file mode 100755
index 00000000..d8e1f550
--- /dev/null
+++ b/data/trainers/names.asm
@@ -0,0 +1,48 @@
+TrainerNames::
+ db "YOUNGSTER@"
+ db "BUG CATCHER@"
+ db "LASS@"
+ db "SAILOR@"
+ db "JR.TRAINER♂@"
+ db "JR.TRAINER♀@"
+ db "POKéMANIAC@"
+ db "SUPER NERD@"
+ db "HIKER@"
+ db "BIKER@"
+ db "BURGLAR@"
+ db "ENGINEER@"
+ db "JUGGLER@"
+ db "FISHERMAN@"
+ db "SWIMMER@"
+ db "CUE BALL@"
+ db "GAMBLER@"
+ db "BEAUTY@"
+ db "PSYCHIC@"
+ db "ROCKER@"
+ db "JUGGLER@"
+ db "TAMER@"
+ db "BIRD KEEPER@"
+ db "BLACKBELT@"
+ db "RIVAL1@"
+ db "PROF.OAK@"
+ db "CHIEF@"
+ db "SCIENTIST@"
+ db "GIOVANNI@"
+ db "ROCKET@"
+ db "COOLTRAINER♂@"
+ db "COOLTRAINER♀@"
+ db "BRUNO@"
+ db "BROCK@"
+ db "MISTY@"
+ db "LT.SURGE@"
+ db "ERIKA@"
+ db "KOGA@"
+ db "BLAINE@"
+ db "SABRINA@"
+ db "GENTLEMAN@"
+ db "RIVAL2@"
+ db "RIVAL3@"
+ db "LORELEI@"
+ db "CHANNELER@"
+ db "AGATHA@"
+ db "LANCE@"
diff --git a/data/trainers/parties.asm b/data/trainers/parties.asm
new file mode 100755
index 00000000..af33a273
--- /dev/null
+++ b/data/trainers/parties.asm
@@ -0,0 +1,749 @@
+TrainerDataPointers:
+ 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 UnusedJugglerData
+ 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)
+ ; all the next bytes are pokemon species
+ ; null-terminated
+; if first byte == $FF, then
+ ; first byte is $FF (obviously)
+ ; every next two bytes are a level and species
+ ; null-terminated
+
+YoungsterData:
+; Route 3
+ db 11, RATTATA, EKANS, 0
+ db 14, SPEAROW, 0
+; Mt. Moon 1F
+ db 10, RATTATA, RATTATA, ZUBAT, 0
+; Route 24
+ db 14, RATTATA, EKANS, ZUBAT, 0
+; Route 25
+ db 15, RATTATA, SPEAROW, 0
+ db 17, SLOWPOKE, 0
+ db 14, EKANS, SANDSHREW, 0
+; SS Anne 1F Rooms
+ db 21, NIDORAN_M, 0
+; Route 11
+ db 21, EKANS, 0
+ db 19, SANDSHREW, ZUBAT, 0
+ db 17, RATTATA, RATTATA, RATICATE, 0
+ db 18, NIDORAN_M, NIDORINO, 0
+; Unused
+ db 17, SPEAROW, RATTATA, RATTATA, SPEAROW, 0
+ db 24, SANDSHREW, 0
+
+BugCatcherData:
+; Viridian Forest
+ db 7, CATERPIE, CATERPIE, 0
+ db 6, METAPOD, CATERPIE, METAPOD, 0
+ db 10, CATERPIE, 0
+; Route 3
+ db 10, CATERPIE, WEEDLE, CATERPIE, 0
+ db 9, WEEDLE, KAKUNA, CATERPIE, METAPOD, 0
+ db 11, CATERPIE, METAPOD, 0
+; Mt. Moon 1F
+ db 11, WEEDLE, KAKUNA, 0
+ db 10, CATERPIE, METAPOD, CATERPIE, 0
+; Route 24
+ db 14, CATERPIE, WEEDLE, 0
+; Route 6
+ db 16, WEEDLE, CATERPIE, WEEDLE, 0
+ db 20, BUTTERFREE, 0
+; Unused
+ db 18, METAPOD, CATERPIE, VENONAT, 0
+; Route 9
+ db 19, BEEDRILL, BEEDRILL, 0
+ db 20, CATERPIE, WEEDLE, VENONAT, 0
+ db 8, CATERPIE, METAPOD, 0
+
+LassData:
+; Route 3
+ db 9, PIDGEY, PIDGEY, 0
+ db 10, RATTATA, NIDORAN_M, 0
+ db 14, JIGGLYPUFF, 0
+; Route 4
+ db 31, PARAS, PARAS, PARASECT, 0
+; Mt. Moon 1F
+ db 11, ODDISH, BELLSPROUT, 0
+ db 14, CLEFAIRY, 0
+; Route 24
+ db 16, PIDGEY, NIDORAN_F, 0
+ db 14, PIDGEY, NIDORAN_F, 0
+; Route 25
+ db 15, NIDORAN_M, NIDORAN_F, 0
+ db 13, ODDISH, PIDGEY, ODDISH, 0
+; SS Anne 1F Rooms
+ db 18, PIDGEY, NIDORAN_F, 0
+; SS Anne 2F Rooms
+ db 20, JIGGLYPUFF, 0
+; Route 8
+ db 23, NIDORAN_F, NIDORINA, 0
+ db 24, MEOWTH, MEOWTH, MEOWTH, 0
+ db 19, PIDGEY, RATTATA, NIDORAN_F, MEOWTH, NIDORAN_M, 0
+ db 22, CLEFAIRY, CLEFAIRY, 0
+; Celadon Gym
+ db 23, BELLSPROUT, WEEPINBELL, 0
+ db 23, ODDISH, GLOOM, 0
+ db 6, NIDORAN_F, NIDORAN_M, 0
+
+SailorData:
+; SS Anne Stern
+ db 18, MACHOP, SHELLDER, 0
+ db 17, MACHOP, TENTACOOL, 0
+; SS Anne B1F Rooms
+ db 21, SHELLDER, 0
+ db 17, HORSEA, SHELLDER, TENTACOOL, 0
+ db 18, TENTACOOL, STARYU, 0
+ db 17, HORSEA, HORSEA, HORSEA, 0
+ db 20, MACHOP, 0
+; Vermilion Gym
+ db 24, MAGNEMITE, 0
+
+JrTrainerMData:
+; Pewter Gym
+ db 9, DIGLETT, SANDSHREW, 0
+; Route 24/Route 25
+ db 14, RATTATA, EKANS, 0
+; Route 24
+ db 18, MANKEY, 0
+; Route 6
+ db 20, SQUIRTLE, 0
+ db 16, SPEAROW, RATICATE, 0
+; Unused
+ db 18, DIGLETT, DIGLETT, SANDSHREW, 0
+; Route 9
+ db 21, GROWLITHE, CHARMANDER, 0
+ db 19, RATTATA, DIGLETT, EKANS, SANDSHREW, 0
+; Route 12
+ db 29, NIDORAN_M, NIDORINO, 0
+ db 16, WEEPINBELL, 0
+
+JrTrainerFData:
+; Cerulean Gym
+ db 19, GOLDEEN, 0
+; Route 6
+ db 16, ODDISH, BELLSPROUT, 0
+ db 16, PIDGEY, PIDGEY, PIDGEY, 0
+; Unused
+ db 22, BULBASAUR, 0
+; Route 9
+ db 18, ODDISH, BELLSPROUT, ODDISH, BELLSPROUT, 0
+ db 23, MEOWTH, 0
+; Route 10
+ db 20, JIGGLYPUFF, CLEFAIRY, 0
+ db 21, PIDGEY, PIDGEOTTO, 0
+; Rock Tunnel B1F
+ db 21, JIGGLYPUFF, PIDGEY, MEOWTH, 0
+ db 22, ODDISH, BULBASAUR, 0
+; Celadon Gym
+ db 24, BULBASAUR, IVYSAUR, 0
+; Route 13
+ db 24, PIDGEY, MEOWTH, RATTATA, PIDGEY, MEOWTH, 0
+ db 30, POLIWAG, POLIWAG, 0
+ db 27, PIDGEY, MEOWTH, PIDGEY, PIDGEOTTO, 0
+ db 28, GOLDEEN, POLIWAG, HORSEA, 0
+; Route 20
+ db 31, GOLDEEN, SEAKING, 0
+; Rock Tunnel 1F
+ db 22, BELLSPROUT, CLEFAIRY, 0
+ db 20, MEOWTH, ODDISH, PIDGEY, 0
+ db 19, PIDGEY, RATTATA, RATTATA, BELLSPROUT, 0
+; Route 15
+ db 28, GLOOM, ODDISH, ODDISH, 0
+ db 29, PIDGEY, PIDGEOTTO, 0
+ db 33, CLEFAIRY, 0
+ db 29, BELLSPROUT, ODDISH, TANGELA, 0
+; Route 20
+ db 30, TENTACOOL, HORSEA, SEEL, 0
+ db 20, CUBONE, 0
+
+PokemaniacData:
+; Route 10
+ db 30, RHYHORN, LICKITUNG, 0
+ db 20, CUBONE, SLOWPOKE, 0
+; Rock Tunnel B1F
+ db 20, SLOWPOKE, SLOWPOKE, SLOWPOKE, 0
+ db 22, CHARMANDER, CUBONE, 0
+ db 25, SLOWPOKE, 0
+; Victory Road 2F
+ db 40, CHARMELEON, LAPRAS, LICKITUNG, 0
+; Rock Tunnel 1F
+ db 23, CUBONE, SLOWPOKE, 0
+
+SuperNerdData:
+; Mt. Moon 1F
+ db 11, MAGNEMITE, VOLTORB, 0
+; Mt. Moon B2F
+ db 12, GRIMER, VOLTORB, KOFFING, 0
+; Route 8
+ db 20, VOLTORB, KOFFING, VOLTORB, MAGNEMITE, 0
+ db 22, GRIMER, MUK, GRIMER, 0
+ db 26, KOFFING, 0
+; Unused
+ db 22, KOFFING, MAGNEMITE, WEEZING, 0
+ db 20, MAGNEMITE, MAGNEMITE, KOFFING, MAGNEMITE, 0
+ db 24, MAGNEMITE, VOLTORB, 0
+; Cinnabar Gym
+ db 36, VULPIX, VULPIX, NINETALES, 0
+ db 34, PONYTA, CHARMANDER, VULPIX, GROWLITHE, 0
+ db 41, RAPIDASH, 0
+ db 37, GROWLITHE, VULPIX, 0
+
+HikerData:
+; Mt. Moon 1F
+ db 10, GEODUDE, GEODUDE, ONIX, 0
+; Route 25
+ db 15, MACHOP, GEODUDE, 0
+ db 13, GEODUDE, GEODUDE, MACHOP, GEODUDE, 0
+ db 17, ONIX, 0
+; Route 9
+ db 21, GEODUDE, ONIX, 0
+ db 20, GEODUDE, MACHOP, GEODUDE, 0
+; Route 10
+ db 21, GEODUDE, ONIX, 0
+ db 19, ONIX, GRAVELER, 0
+; Rock Tunnel B1F
+ db 21, GEODUDE, GEODUDE, GRAVELER, 0
+ db 25, GEODUDE, 0
+; Route 9/Rock Tunnel B1F
+ db 20, MACHOP, ONIX, 0
+; Rock Tunnel 1F
+ db 19, GEODUDE, MACHOP, GEODUDE, GEODUDE, 0
+ db 20, ONIX, ONIX, GEODUDE, 0
+ db 21, GEODUDE, GRAVELER, 0
+
+BikerData:
+; Route 13
+ db 28, KOFFING, KOFFING, KOFFING, 0
+; Route 14
+ db 29, KOFFING, GRIMER, 0
+; Route 15
+ db 25, KOFFING, KOFFING, WEEZING, KOFFING, GRIMER, 0
+ db 28, KOFFING, GRIMER, WEEZING, 0
+; Route 16
+ db 29, GRIMER, KOFFING, 0
+ db 33, WEEZING, 0
+ db 26, GRIMER, GRIMER, GRIMER, GRIMER, 0
+; Route 17
+ ; From https://www.smogon.com/smog/issue27/glitch:
+ ; 0E:5FC2 is offset of the ending 0 for this first Biker on Route 17.
+ ; BaseStats + (MonBaseStatsEnd - MonBaseStats) * (000 - 1) = $5FC2;
+ ; that's the formula from GetMonHeader for the base stats of mon #000.
+ ; (BaseStats = $43DE and BANK(BaseStats) = $0E.)
+ ; Finally, PokedexOrder lists 0 as the dex ID for every MissingNo.
+ ; The result is that this data gets interpreted as the base stats
+ ; for MissingNo: 0, 33, MUK, 0, 29, VOLTORB, VOLTORB, 0, ..., 28, GRIMER, GRIMER.
+ db 28, WEEZING, KOFFING, WEEZING, 0
+ db 33, MUK, 0
+ db 29, VOLTORB, VOLTORB, 0
+ db 29, WEEZING, MUK, 0
+ db 25, KOFFING, WEEZING, KOFFING, KOFFING, WEEZING, 0
+; Route 14
+ db 26, KOFFING, KOFFING, GRIMER, KOFFING, 0
+ db 28, GRIMER, GRIMER, KOFFING, 0
+ db 29, KOFFING, MUK, 0
+
+BurglarData:
+; Unused
+ db 29, GROWLITHE, VULPIX, 0
+ db 33, GROWLITHE, 0
+ db 28, VULPIX, CHARMANDER, PONYTA, 0
+; Cinnabar Gym
+ db 36, GROWLITHE, VULPIX, NINETALES, 0
+ db 41, PONYTA, 0
+ db 37, VULPIX, GROWLITHE, 0
+; Mansion 2F
+ db 34, CHARMANDER, CHARMELEON, 0
+; Mansion 3F
+ db 38, NINETALES, 0
+; Mansion B1F
+ db 34, GROWLITHE, PONYTA, 0
+
+EngineerData:
+; Unused
+ db 21, VOLTORB, MAGNEMITE, 0
+; Route 11
+ db 21, MAGNEMITE, 0
+ db 18, MAGNEMITE, MAGNEMITE, MAGNETON, 0
+
+UnusedJugglerData:
+; none
+
+FisherData:
+; SS Anne 2F Rooms
+ db 17, GOLDEEN, TENTACOOL, GOLDEEN, 0
+; SS Anne B1F Rooms
+ db 17, TENTACOOL, STARYU, SHELLDER, 0
+; Route 12
+ db 22, GOLDEEN, POLIWAG, GOLDEEN, 0
+ db 24, TENTACOOL, GOLDEEN, 0
+ db 27, GOLDEEN, 0
+ db 21, POLIWAG, SHELLDER, GOLDEEN, HORSEA, 0
+; Route 21
+ db 28, SEAKING, GOLDEEN, SEAKING, SEAKING, 0
+ db 31, SHELLDER, CLOYSTER, 0
+ db 27, MAGIKARP, MAGIKARP, MAGIKARP, MAGIKARP, MAGIKARP, MAGIKARP, 0
+ db 33, SEAKING, GOLDEEN, 0
+; Route 12
+ db 24, MAGIKARP, MAGIKARP, 0
+
+SwimmerData:
+; Cerulean Gym
+ db 16, HORSEA, SHELLDER, 0
+; Route 19
+ db 30, TENTACOOL, SHELLDER, 0
+ db 29, GOLDEEN, HORSEA, STARYU, 0
+ db 30, POLIWAG, POLIWHIRL, 0
+ db 27, HORSEA, TENTACOOL, TENTACOOL, GOLDEEN, 0
+ db 29, GOLDEEN, SHELLDER, SEAKING, 0
+ db 30, HORSEA, HORSEA, 0
+ db 27, TENTACOOL, TENTACOOL, STARYU, HORSEA, TENTACRUEL, 0
+; Route 20
+ db 31, SHELLDER, CLOYSTER, 0
+ db 35, STARYU, 0
+ db 28, HORSEA, HORSEA, SEADRA, HORSEA, 0
+; Route 21
+ db 33, SEADRA, TENTACRUEL, 0
+ db 37, STARMIE, 0
+ db 33, STARYU, WARTORTLE, 0
+ db 32, POLIWHIRL, TENTACOOL, SEADRA, 0
+
+CueBallData:
+; Route 16
+ db 28, MACHOP, MANKEY, MACHOP, 0
+ db 29, MANKEY, MACHOP, 0
+ db 33, MACHOP, 0
+; Route 17
+ db 29, MANKEY, PRIMEAPE, 0
+ db 29, MACHOP, MACHOKE, 0
+ db 33, MACHOKE, 0
+ db 26, MANKEY, MANKEY, MACHOKE, MACHOP, 0
+ db 29, PRIMEAPE, MACHOKE, 0
+; Route 21
+ db 31, TENTACOOL, TENTACOOL, TENTACRUEL, 0
+
+GamblerData:
+; Route 11
+ db 18, POLIWAG, HORSEA, 0
+ db 18, BELLSPROUT, ODDISH, 0
+ db 18, VOLTORB, MAGNEMITE, 0
+ db 18, GROWLITHE, VULPIX, 0
+; Route 8
+ db 22, POLIWAG, POLIWAG, POLIWHIRL, 0
+; Unused
+ db 22, ONIX, GEODUDE, GRAVELER, 0
+; Route 8
+ db 24, GROWLITHE, VULPIX, 0
+
+BeautyData:
+; Celadon Gym
+ db 21, ODDISH, BELLSPROUT, ODDISH, BELLSPROUT, 0
+ db 24, BELLSPROUT, BELLSPROUT, 0
+ db 26, EXEGGCUTE, 0
+; Route 13
+ db 27, RATTATA, VULPIX, RATTATA, 0
+ db 29, CLEFAIRY, MEOWTH, 0
+; Route 20
+ db 35, SEAKING, 0
+ db 30, SHELLDER, SHELLDER, CLOYSTER, 0
+ db 31, POLIWAG, SEAKING, 0
+; Route 15
+ db 29, PIDGEOTTO, WIGGLYTUFF, 0
+ db 29, BULBASAUR, IVYSAUR, 0
+; Unused
+ db 33, WEEPINBELL, BELLSPROUT, WEEPINBELL, 0
+; Route 19
+ db 27, POLIWAG, GOLDEEN, SEAKING, GOLDEEN, POLIWAG, 0
+ db 30, GOLDEEN, SEAKING, 0
+ db 29, STARYU, STARYU, STARYU, 0
+; Route 20
+ db 30, SEADRA, HORSEA, SEADRA, 0
+
+PsychicData:
+; Saffron Gym
+ 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:
+; Vermilion Gym
+ db 20, VOLTORB, VOLTORB, VOLTORB, 0
+; Route 12
+ db 29, VOLTORB, ELECTRODE, 0
+
+JugglerData:
+; Silph Co. 5F
+ db 29, KADABRA, MR_MIME, 0
+; Victory Road 2F
+ db 41, DROWZEE, HYPNO, KADABRA, KADABRA, 0
+; Fuchsia Gym
+ db 31, DROWZEE, DROWZEE, KADABRA, DROWZEE, 0
+ db 34, DROWZEE, HYPNO, 0
+; Victory Road 2F
+ db 48, MR_MIME, 0
+; Unused
+ db 33, HYPNO, 0
+; Fuchsia Gym
+ db 38, HYPNO, 0
+ db 34, DROWZEE, KADABRA, 0
+
+TamerData:
+; Fuchsia Gym
+ db 34, SANDSLASH, ARBOK, 0
+ db 33, ARBOK, SANDSLASH, ARBOK, 0
+; Viridian Gym
+ db 43, RHYHORN, 0
+ db 39, ARBOK, TAUROS, 0
+; Victory Road 2F
+ db 44, PERSIAN, GOLDUCK, 0
+; Unused
+ db 42, RHYHORN, PRIMEAPE, ARBOK, TAUROS, 0
+
+BirdKeeperData:
+; Route 13
+ db 29, PIDGEY, PIDGEOTTO, 0
+ db 25, SPEAROW, PIDGEY, PIDGEY, SPEAROW, SPEAROW, 0
+ db 26, PIDGEY, PIDGEOTTO, SPEAROW, FEAROW, 0
+; Route 14
+ db 33, FARFETCHD, 0
+ db 29, SPEAROW, FEAROW, 0
+; Route 15
+ db 26, PIDGEOTTO, FARFETCHD, DODUO, PIDGEY, 0
+ db 28, DODRIO, DODUO, DODUO, 0
+; Route 18
+ db 29, SPEAROW, FEAROW, 0
+ db 34, DODRIO, 0
+ db 26, SPEAROW, SPEAROW, FEAROW, SPEAROW, 0
+; Route 20
+ db 30, FEAROW, FEAROW, PIDGEOTTO, 0
+; Unused
+ db 39, PIDGEOTTO, PIDGEOTTO, PIDGEY, PIDGEOTTO, 0
+ db 42, FARFETCHD, FEAROW, 0
+; Route 14
+ 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:
+; Fighting Dojo
+ db 37, HITMONLEE, HITMONCHAN, 0
+ db 31, MANKEY, MANKEY, PRIMEAPE, 0
+ db 32, MACHOP, MACHOKE, 0
+ db 36, PRIMEAPE, 0
+ db 31, MACHOP, MANKEY, PRIMEAPE, 0
+; Viridian Gym
+ db 40, MACHOP, MACHOKE, 0
+ db 43, MACHOKE, 0
+ db 38, MACHOKE, MACHOP, MACHOKE, 0
+; Victory Road 2F
+ db 43, MACHOKE, MACHOP, MACHOKE, 0
+
+Green1Data:
+ db 5, EEVEE, 0
+; Route 22
+ db $FF, 9, SPEAROW, 8, EEVEE, 0
+; Cerulean City
+ db $FF, 18, SPEAROW, 15, SANDSHREW, 15, RATTATA, 17, EEVEE, 0
+
+ProfOakData:
+; Unused
+ 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:
+; none
+
+ScientistData:
+; Unused
+ db 34, KOFFING, VOLTORB, 0
+; Silph Co. 2F
+ db 26, GRIMER, WEEZING, KOFFING, WEEZING, 0
+ db 28, MAGNEMITE, VOLTORB, MAGNETON, 0
+; Silph Co. 3F/Mansion 1F
+ db 29, ELECTRODE, WEEZING, 0
+; Silph Co. 4F
+ db 33, ELECTRODE, 0
+; Silph Co. 5F
+ db 26, MAGNETON, KOFFING, WEEZING, MAGNEMITE, 0
+; Silph Co. 6F
+ db 25, VOLTORB, KOFFING, MAGNETON, MAGNEMITE, KOFFING, 0
+; Silph Co. 7F
+ db 29, ELECTRODE, MUK, 0
+; Silph Co. 8F
+ db 29, GRIMER, ELECTRODE, 0
+; Silph Co. 9F
+ db 28, VOLTORB, KOFFING, MAGNETON, 0
+; Silph Co. 10F
+ db 29, MAGNEMITE, KOFFING, 0
+; Mansion 3F
+ db 33, MAGNEMITE, MAGNETON, VOLTORB, 0
+; Mansion B1F
+ db 34, MAGNEMITE, ELECTRODE, 0
+
+GiovanniData:
+; Rocket Hideout B4F
+ db $FF, 25, ONIX, 24, RHYHORN, 29, PERSIAN, 0
+; Silph Co. 11F
+ db $FF, 37, NIDORINO, 35, PERSIAN, 37, RHYHORN, 41, NIDOQUEEN, 0
+; Viridian Gym
+ db $FF, 50, DUGTRIO, 53, PERSIAN, 53, NIDOQUEEN, 55, NIDOKING, 55, RHYDON, 0
+
+RocketData:
+; Mt. Moon B2F
+ db 13, RATTATA, ZUBAT, 0
+ db 11, SANDSHREW, RATTATA, ZUBAT, 0
+ db 12, ZUBAT, EKANS, 0
+ db 16, RATICATE, 0
+; Cerulean City
+ db 17, MACHOP, DROWZEE, 0
+; Route 24
+ db 15, EKANS, ZUBAT, 0
+; Game Corner
+ db 20, RATICATE, ZUBAT, 0
+; Rocket Hideout B1F
+ db 21, DROWZEE, MACHOP, 0
+ db 21, RATICATE, RATICATE, 0
+ db 20, GRIMER, KOFFING, KOFFING, 0
+ db 19, RATTATA, RATICATE, RATICATE, RATTATA, 0
+ db 22, GRIMER, KOFFING, 0
+; Rocket Hideout B2F
+ db 17, ZUBAT, KOFFING, GRIMER, ZUBAT, RATICATE, 0
+; Rocket Hideout B3F
+ db 20, RATTATA, RATICATE, DROWZEE, 0
+ db 21, MACHOP, MACHOP, 0
+; Rocket Hideout B4F
+ db 23, SANDSHREW, EKANS, SANDSLASH, 0
+ db 23, EKANS, SANDSHREW, ARBOK, 0
+ db 21, KOFFING, ZUBAT, 0
+; Pokémon Tower 7F
+ db 25, ZUBAT, ZUBAT, GOLBAT, 0
+ db 26, KOFFING, DROWZEE, 0
+ db 23, ZUBAT, RATTATA, RATICATE, ZUBAT, 0
+; Unused
+ db 26, DROWZEE, KOFFING, 0
+; Silph Co. 2F
+ db 29, CUBONE, ZUBAT, 0
+ db 25, GOLBAT, ZUBAT, ZUBAT, RATICATE, ZUBAT, 0
+; Silph Co. 3F
+ db 28, RATICATE, HYPNO, RATICATE, 0
+; Silph Co. 4F
+ db 29, MACHOP, DROWZEE, 0
+ db 28, EKANS, ZUBAT, CUBONE, 0
+; Silph Co. 5F
+ db 33, ARBOK, 0
+ db 33, HYPNO, 0
+; Silph Co. 6F
+ db 29, MACHOP, MACHOKE, 0
+ db 28, ZUBAT, ZUBAT, GOLBAT, 0
+; Silph Co. 7F
+ db 26, RATICATE, ARBOK, KOFFING, GOLBAT, 0
+ db 29, CUBONE, CUBONE, 0
+ db 29, SANDSHREW, SANDSLASH, 0
+; Silph Co. 8F
+ db 26, RATICATE, ZUBAT, GOLBAT, RATTATA, 0
+ db 28, WEEZING, GOLBAT, KOFFING, 0
+; Silph Co. 9F
+ db 28, DROWZEE, GRIMER, MACHOP, 0
+ db 28, GOLBAT, DROWZEE, HYPNO, 0
+; Silph Co. 10F
+ db 33, MACHOKE, 0
+; Silph Co. 11F
+ db 25, RATTATA, RATTATA, ZUBAT, RATTATA, EKANS, 0
+ db 32, CUBONE, DROWZEE, MAROWAK, 0
+;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
+; unused JessieJames trainers
+ db 16, KOFFING, 0
+ db 27, KOFFING, 0
+ db 29, WEEZING, 0
+ db 33, WEEZING, 0
+
+CooltrainerMData:
+; Viridian Gym
+ db 39, NIDORINO, NIDOKING, 0
+; Victory Road 3F
+ db 43, EXEGGUTOR, CLOYSTER, ARCANINE, 0
+ db 43, KINGLER, TENTACRUEL, BLASTOISE, 0
+; Unused
+ db 45, KINGLER, STARMIE, 0
+; Victory Road 1F
+ db 42, IVYSAUR, WARTORTLE, CHARMELEON, CHARIZARD, 0
+; Unused
+ db 44, IVYSAUR, WARTORTLE, CHARMELEON, 0
+ db 49, NIDOKING, 0
+ db 44, KINGLER, CLOYSTER, 0
+; Viridian Gym
+ db 39, SANDSLASH, DUGTRIO, 0
+ db 43, RHYHORN, 0
+
+CooltrainerFData:
+; Celadon Gym
+ db 24, WEEPINBELL, GLOOM, IVYSAUR, 0
+; Victory Road 3F
+ db 43, BELLSPROUT, WEEPINBELL, VICTREEBEL, 0
+ db 43, PARASECT, DEWGONG, CHANSEY, 0
+; Unused
+ db 46, VILEPLUME, BUTTERFREE, 0
+; Victory Road 1F
+ db 44, PERSIAN, NINETALES, 0
+; Unused
+ db 45, IVYSAUR, VENUSAUR, 0
+ db 45, NIDORINA, NIDOQUEEN, 0
+ db 43, PERSIAN, NINETALES, RAICHU, 0
+
+BrunoData:
+ db $FF, 53, ONIX, 55, HITMONCHAN, 55, HITMONLEE, 56, ONIX, 58, MACHAMP, 0
+
+BrockData:
+ db $FF, 10, GEODUDE, 12, ONIX, 0
+
+MistyData:
+ db $FF, 18, STARYU, 21, STARMIE, 0
+
+LtSurgeData:
+ db $FF, 28, RAICHU, 0
+
+ErikaData:
+ db $FF, 30, TANGELA, 32, WEEPINBELL, 32, GLOOM, 0
+
+KogaData:
+ db $FF, 44, VENONAT, 46, VENONAT, 48, VENONAT, 50, VENOMOTH, 0
+
+BlaineData:
+ db $FF, 48, NINETALES, 50, RAPIDASH, 54, ARCANINE, 0
+
+SabrinaData:
+ db $FF, 50, ABRA, 50, KADABRA, 50, ALAKAZAM, 0
+
+GentlemanData:
+; SS Anne 1F Rooms
+ db 18, GROWLITHE, GROWLITHE, 0
+ db 19, NIDORAN_M, NIDORAN_F, 0
+; SS Anne 2F Rooms/Vermilion Gym
+ db 22, VOLTORB, MAGNEMITE, 0
+; Unused
+ db 48, PRIMEAPE, 0
+; SS Anne 2F Rooms
+ db 17, GROWLITHE, PONYTA, 0
+
+Green2Data:
+; SS Anne 2F
+ db $FF, 19, SPEAROW, 16, RATTATA, 18, SANDSHREW, 20, EEVEE, 0
+; Pokémon Tower 2F
+ 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
+; Silph Co. 7F
+ 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
+; Route 22
+ 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
+
+Green3Data:
+ 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
+
+LoreleiData:
+ db $FF, 54, DEWGONG, 53, CLOYSTER, 54, SLOWBRO, 56, JYNX, 56, LAPRAS, 0
+
+ChannelerData:
+; Unused
+ db 22, GASTLY, 0
+ db 24, GASTLY, 0
+ db 23, GASTLY, GASTLY, 0
+ db 24, GASTLY, 0
+; Pokémon Tower 3F
+ db 23, GASTLY, 0
+ db 24, GASTLY, 0
+; Unused
+ db 24, HAUNTER, 0
+; Pokémon Tower 3F
+ db 22, GASTLY, 0
+; Pokémon Tower 4F
+ db 24, GASTLY, 0
+ db 23, GASTLY, GASTLY, 0
+; Unused
+ db 24, GASTLY, 0
+; Pokémon Tower 4F
+ db 22, GASTLY, 0
+; Unused
+ db 24, GASTLY, 0
+; Pokémon Tower 5F
+ db 23, HAUNTER, 0
+; Unused
+ db 24, GASTLY, 0
+; Pokémon Tower 5F
+ db 22, GASTLY, 0
+ db 24, GASTLY, 0
+ db 22, HAUNTER, 0
+; Pokémon Tower 6F
+ db 22, GASTLY, GASTLY, GASTLY, 0
+ db 24, GASTLY, 0
+ db 24, GASTLY, 0
+; Saffron Gym
+ db 34, GASTLY, HAUNTER, 0
+ db 38, HAUNTER, 0
+ db 33, GASTLY, GASTLY, HAUNTER, 0
+
+AgathaData:
+ db $FF, 56, GENGAR, 56, GOLBAT, 55, HAUNTER, 58, ARBOK, 60, GENGAR, 0
+
+LanceData:
+ db $FF, 58, GYARADOS, 56, DRAGONAIR, 56, DRAGONAIR, 60, AERODACTYL, 62, DRAGONITE, 0
diff --git a/data/trainers/pic_pointers_money.asm b/data/trainers/pic_pointers_money.asm
new file mode 100755
index 00000000..d4007394
--- /dev/null
+++ b/data/trainers/pic_pointers_money.asm
@@ -0,0 +1,55 @@
+pic_money: MACRO
+ dw \1
+ money \2
+ENDM
+
+TrainerPicAndMoneyPointers::
+ ; pic pointer, base reward money
+ ; money received after battle = base money × level of highest-level enemy mon
+ pic_money YoungsterPic, 1500
+ pic_money BugCatcherPic, 1000
+ pic_money LassPic, 1500
+ pic_money SailorPic, 3000
+ pic_money JrTrainerMPic, 2000
+ pic_money JrTrainerFPic, 2000
+ pic_money PokemaniacPic, 5000
+ pic_money SuperNerdPic, 2500
+ pic_money HikerPic, 3500
+ pic_money BikerPic, 2000
+ pic_money BurglarPic, 9000
+ pic_money EngineerPic, 5000
+ pic_money JugglerPic, 3500
+ pic_money FisherPic, 3500
+ pic_money SwimmerPic, 500
+ pic_money CueBallPic, 2500
+ pic_money GamblerPic, 7000
+ pic_money BeautyPic, 7000
+ pic_money PsychicPic, 1000
+ pic_money RockerPic, 2500
+ pic_money JugglerPic, 3500
+ pic_money TamerPic, 4000
+ pic_money BirdKeeperPic, 2500
+ pic_money BlackbeltPic, 2500
+ pic_money Rival1Pic, 3500
+ pic_money ProfOakPic, 9900
+ pic_money ChiefPic, 3000
+ pic_money ScientistPic, 5000
+ pic_money GiovanniPic, 9900
+ pic_money RocketPic, 3000
+ pic_money CooltrainerMPic, 3500
+ pic_money CooltrainerFPic, 3500
+ pic_money BrunoPic, 9900
+ pic_money BrockPic, 9900
+ pic_money MistyPic, 9900
+ pic_money LtSurgePic, 9900
+ pic_money ErikaPic, 9900
+ pic_money KogaPic, 9900
+ pic_money BlainePic, 9900
+ pic_money SabrinaPic, 9900
+ pic_money GentlemanPic, 7000
+ pic_money Rival2Pic, 6500
+ pic_money Rival3Pic, 9900
+ pic_money LoreleiPic, 9900
+ pic_money ChannelerPic, 3000
+ pic_money AgathaPic, 9900
+ pic_money LancePic, 9900
diff --git a/data/trainers/special_moves.asm b/data/trainers/special_moves.asm
new file mode 100755
index 00000000..f858fa57
--- /dev/null
+++ b/data/trainers/special_moves.asm
@@ -0,0 +1,160 @@
+; yellow has its own format.
+
+; entry = trainerclass, trainerid, moveset+, 0
+; moveset = partymon location, partymon's move, moveid
+
+SpecialTrainerMoves:
+ db BUG_CATCHER, 15
+ db 2, 2, TACKLE
+ db 2, 3, STRING_SHOT
+ db 0
+
+ db YOUNGSTER, 14
+ db 1, 4, FISSURE
+ db 0
+
+ db BROCK, 1
+ db 2, 3, BIND
+ db 2, 4, BIDE
+ db 0
+
+ db MISTY, 1
+ db 2, 4, BUBBLEBEAM
+ db 0
+
+ db LT_SURGE, 1
+ db 1, 1, THUNDERBOLT
+ db 1, 2, MEGA_PUNCH
+ db 1, 3, MEGA_KICK
+ db 1, 4, GROWL
+ db 0
+
+ db ERIKA, 1
+ db 1, 3, MEGA_DRAIN
+ db 2, 1, RAZOR_LEAF
+ db 3, 1, PETAL_DANCE
+ db 0
+
+ db KOGA, 1
+ db 1, 1, TOXIC
+ db 1, 2, TACKLE
+ db 2, 1, TOXIC
+ db 2, 3, SUPERSONIC
+ db 3, 1, TOXIC
+ db 3, 2, DOUBLE_EDGE
+ db 4, 1, LEECH_LIFE
+ db 4, 2, DOUBLE_TEAM
+ db 4, 3, PSYCHIC_M
+ db 4, 4, TOXIC
+ db 0
+
+ db BLAINE, 1
+ db 1, 1, FLAMETHROWER
+ db 1, 4, CONFUSE_RAY
+ db 3, 1, FLAMETHROWER
+ db 3, 2, FIRE_BLAST
+ db 3, 3, REFLECT
+ db 0
+
+ db SABRINA, 1
+ db 1, 1, FLASH
+ db 2, 1, KINESIS
+ db 2, 4, PSYWAVE
+ db 3, 1, PSYWAVE
+ db 0
+
+ db GIOVANNI, 3
+ db 1, 3, FISSURE
+ db 2, 2, DOUBLE_TEAM
+ db 3, 1, EARTHQUAKE
+ db 3, 3, THUNDER
+ db 4, 1, EARTHQUAKE
+ db 4, 2, LEER
+ db 4, 3, THUNDER
+ db 5, 1, ROCK_SLIDE
+ db 5, 4, EARTHQUAKE
+ db 0
+
+ db LORELEI, 1
+ db 1, 1, BUBBLEBEAM
+ db 2, 3, ICE_BEAM
+ db 3, 1, PSYCHIC_M
+ db 3, 2, SURF
+ db 4, 3, LOVELY_KISS
+ db 5, 3, BLIZZARD
+ db 0
+
+ db BRUNO, 1
+ db 1, 1, ROCK_SLIDE
+ db 1, 2, SCREECH
+ db 1, 4, DIG
+ db 2, 3, FIRE_PUNCH
+ db 2, 4, DOUBLE_TEAM
+ db 3, 1, DOUBLE_KICK
+ db 3, 2, MEGA_KICK
+ db 3, 4, DOUBLE_TEAM
+ db 4, 1, ROCK_SLIDE
+ db 4, 2, SCREECH
+ db 4, 4, EARTHQUAKE
+ db 5, 2, KARATE_CHOP
+ db 5, 3, STRENGTH
+ db 0
+
+ db AGATHA, 1
+ db 1, 2, SUBSTITUTE
+ db 1, 3, LICK
+ db 1, 4, MEGA_DRAIN
+ db 2, 2, TOXIC
+ db 2, 4, LEECH_LIFE
+ db 3, 2, LICK
+ db 4, 1, WRAP
+ db 5, 2, PSYCHIC_M
+ db 0
+
+ db LANCE, 1
+ db 1, 1, DRAGON_RAGE
+ db 2, 1, THUNDER_WAVE
+ db 2, 3, THUNDERBOLT
+ db 3, 1, BUBBLEBEAM
+ db 3, 2, WRAP
+ db 3, 3, ICE_BEAM
+ db 4, 1, WING_ATTACK
+ db 4, 2, SWIFT
+ db 4, 3, FLY
+ db 5, 1, BLIZZARD
+ db 5, 2, FIRE_BLAST
+ db 5, 3, THUNDER
+ db 0
+
+ db RIVAL3, 1
+ db 1, 3, EARTHQUAKE
+ db 2, 4, KINESIS
+ db 3, 4, LEECH_SEED
+ db 4, 1, ICE_BEAM
+ db 5, 1, CONFUSE_RAY
+ db 5, 4, FIRE_SPIN
+ db 6, 3, QUICK_ATTACK
+ db 0
+
+ db RIVAL3, 2
+ db 1, 3, EARTHQUAKE
+ db 2, 4, KINESIS
+ db 3, 4, LEECH_SEED
+ db 4, 1, THUNDERBOLT
+ db 5, 1, ICE_BEAM
+ db 6, 2, REFLECT
+ db 6, 3, QUICK_ATTACK
+ db 0
+
+ db RIVAL3, 3
+ db 1, 3, EARTHQUAKE
+ db 2, 4, KINESIS
+ db 3, 4, LEECH_SEED
+ db 4, 1, CONFUSE_RAY
+ db 4, 4, FIRE_SPIN
+ db 5, 1, THUNDERBOLT
+ db 6, 1, AURORA_BEAM
+ db 6, 3, QUICK_ATTACK
+ db 0
+
+ db -1 ; end
diff --git a/data/type_effects.asm b/data/type_effects.asm
deleted file mode 100755
index 1321a3d9..00000000
--- a/data/type_effects.asm
+++ /dev/null
@@ -1,89 +0,0 @@
-TypeEffects:
-; format: attacking type, defending type, damage multiplier
-; the multiplier is a (decimal) fixed-point number:
-; 20 is ×2.0
-; 05 is ×0.5
-; 00 is ×0
- db WATER,FIRE,20
- db FIRE,GRASS,20
- db FIRE,ICE,20
- db GRASS,WATER,20
- db ELECTRIC,WATER,20
- db WATER,ROCK,20
- db GROUND,FLYING,00
- db WATER,WATER,05
- db FIRE,FIRE,05
- db ELECTRIC,ELECTRIC,05
- db ICE,ICE,05
- db GRASS,GRASS,05
- db PSYCHIC,PSYCHIC,05
- db FIRE,WATER,05
- db GRASS,FIRE,05
- db WATER,GRASS,05
- db ELECTRIC,GRASS,05
- db NORMAL,ROCK,05
- db NORMAL,GHOST,00
- db GHOST,GHOST,20
- db FIRE,BUG,20
- db FIRE,ROCK,05
- db WATER,GROUND,20
- db ELECTRIC,GROUND,00
- db ELECTRIC,FLYING,20
- db GRASS,GROUND,20
- db GRASS,BUG,05
- db GRASS,POISON,05
- db GRASS,ROCK,20
- db GRASS,FLYING,05
- db ICE,WATER,05
- db ICE,GRASS,20
- db ICE,GROUND,20
- db ICE,FLYING,20
- db FIGHTING,NORMAL,20
- db FIGHTING,POISON,05
- db FIGHTING,FLYING,05
- db FIGHTING,PSYCHIC,05
- db FIGHTING,BUG,05
- db FIGHTING,ROCK,20
- db FIGHTING,ICE,20
- db FIGHTING,GHOST,00
- db POISON,GRASS,20
- db POISON,POISON,05
- db POISON,GROUND,05
- db POISON,BUG,20
- db POISON,ROCK,05
- db POISON,GHOST,05
- db GROUND,FIRE,20
- db GROUND,ELECTRIC,20
- db GROUND,GRASS,05
- db GROUND,BUG,05
- db GROUND,ROCK,20
- db GROUND,POISON,20
- db FLYING,ELECTRIC,05
- db FLYING,FIGHTING,20
- db FLYING,BUG,20
- db FLYING,GRASS,20
- db FLYING,ROCK,05
- db PSYCHIC,FIGHTING,20
- db PSYCHIC,POISON,20
- db BUG,FIRE,05
- db BUG,GRASS,20
- db BUG,FIGHTING,05
- db BUG,FLYING,05
- db BUG,PSYCHIC,20
- db BUG,GHOST,05
- db BUG,POISON,20
- db ROCK,FIRE,20
- db ROCK,FIGHTING,05
- db ROCK,GROUND,05
- db ROCK,FLYING,20
- db ROCK,BUG,20
- db ROCK,ICE,20
- db GHOST,NORMAL,00
- db GHOST,PSYCHIC,00
- db FIRE,DRAGON,05
- db WATER,DRAGON,05
- db ELECTRIC,DRAGON,05
- db GRASS,DRAGON,05
- db ICE,DRAGON,20
- db DRAGON,DRAGON,20
- db $FF
diff --git a/data/types/names.asm b/data/types/names.asm
new file mode 100755
index 00000000..b1c35f65
--- /dev/null
+++ b/data/types/names.asm
@@ -0,0 +1,40 @@
+TypeNames:
+
+ dw .Normal
+ dw .Fighting
+ dw .Flying
+ dw .Poison
+ dw .Ground
+ dw .Rock
+ dw .Bird
+ dw .Bug
+ dw .Ghost
+
+REPT FIRE - GHOST - 1
+ dw .Normal
+ENDR
+
+ dw .Fire
+ dw .Water
+ dw .Grass
+ dw .Electric
+ dw .Psychic
+ dw .Ice
+ dw .Dragon
+
+.Normal: db "NORMAL@"
+.Fighting: db "FIGHTING@"
+.Flying: db "FLYING@"
+.Poison: db "POISON@"
+.Fire: db "FIRE@"
+.Water: db "WATER@"
+.Grass: db "GRASS@"
+.Electric: db "ELECTRIC@"
+.Psychic: db "PSYCHIC@"
+.Ice: db "ICE@"
+.Ground: db "GROUND@"
+.Rock: db "ROCK@"
+.Bird: db "BIRD@"
+.Bug: db "BUG@"
+.Ghost: db "GHOST@"
+.Dragon: db "DRAGON@"
diff --git a/data/types/type_matchups.asm b/data/types/type_matchups.asm
new file mode 100755
index 00000000..52e3d956
--- /dev/null
+++ b/data/types/type_matchups.asm
@@ -0,0 +1,85 @@
+TypeEffects:
+ ; attacker, defender, *=
+ db WATER, FIRE, SUPER_EFFECTIVE
+ db FIRE, GRASS, SUPER_EFFECTIVE
+ db FIRE, ICE, SUPER_EFFECTIVE
+ db GRASS, WATER, SUPER_EFFECTIVE
+ db ELECTRIC, WATER, SUPER_EFFECTIVE
+ db WATER, ROCK, SUPER_EFFECTIVE
+ db GROUND, FLYING, NO_EFFECT
+ db WATER, WATER, NOT_VERY_EFFECTIVE
+ db FIRE, FIRE, NOT_VERY_EFFECTIVE
+ db ELECTRIC, ELECTRIC, NOT_VERY_EFFECTIVE
+ db ICE, ICE, NOT_VERY_EFFECTIVE
+ db GRASS, GRASS, NOT_VERY_EFFECTIVE
+ db PSYCHIC_TYPE, PSYCHIC_TYPE, NOT_VERY_EFFECTIVE
+ db FIRE, WATER, NOT_VERY_EFFECTIVE
+ db GRASS, FIRE, NOT_VERY_EFFECTIVE
+ db WATER, GRASS, NOT_VERY_EFFECTIVE
+ db ELECTRIC, GRASS, NOT_VERY_EFFECTIVE
+ db NORMAL, ROCK, NOT_VERY_EFFECTIVE
+ db NORMAL, GHOST, NO_EFFECT
+ db GHOST, GHOST, SUPER_EFFECTIVE
+ db FIRE, BUG, SUPER_EFFECTIVE
+ db FIRE, ROCK, NOT_VERY_EFFECTIVE
+ db WATER, GROUND, SUPER_EFFECTIVE
+ db ELECTRIC, GROUND, NO_EFFECT
+ db ELECTRIC, FLYING, SUPER_EFFECTIVE
+ db GRASS, GROUND, SUPER_EFFECTIVE
+ db GRASS, BUG, NOT_VERY_EFFECTIVE
+ db GRASS, POISON, NOT_VERY_EFFECTIVE
+ db GRASS, ROCK, SUPER_EFFECTIVE
+ db GRASS, FLYING, NOT_VERY_EFFECTIVE
+ db ICE, WATER, NOT_VERY_EFFECTIVE
+ db ICE, GRASS, SUPER_EFFECTIVE
+ db ICE, GROUND, SUPER_EFFECTIVE
+ db ICE, FLYING, SUPER_EFFECTIVE
+ db FIGHTING, NORMAL, SUPER_EFFECTIVE
+ db FIGHTING, POISON, NOT_VERY_EFFECTIVE
+ db FIGHTING, FLYING, NOT_VERY_EFFECTIVE
+ db FIGHTING, PSYCHIC_TYPE, NOT_VERY_EFFECTIVE
+ db FIGHTING, BUG, NOT_VERY_EFFECTIVE
+ db FIGHTING, ROCK, SUPER_EFFECTIVE
+ db FIGHTING, ICE, SUPER_EFFECTIVE
+ db FIGHTING, GHOST, NO_EFFECT
+ db POISON, GRASS, SUPER_EFFECTIVE
+ db POISON, POISON, NOT_VERY_EFFECTIVE
+ db POISON, GROUND, NOT_VERY_EFFECTIVE
+ db POISON, BUG, SUPER_EFFECTIVE
+ db POISON, ROCK, NOT_VERY_EFFECTIVE
+ db POISON, GHOST, NOT_VERY_EFFECTIVE
+ db GROUND, FIRE, SUPER_EFFECTIVE
+ db GROUND, ELECTRIC, SUPER_EFFECTIVE
+ db GROUND, GRASS, NOT_VERY_EFFECTIVE
+ db GROUND, BUG, NOT_VERY_EFFECTIVE
+ db GROUND, ROCK, SUPER_EFFECTIVE
+ db GROUND, POISON, SUPER_EFFECTIVE
+ db FLYING, ELECTRIC, NOT_VERY_EFFECTIVE
+ db FLYING, FIGHTING, SUPER_EFFECTIVE
+ db FLYING, BUG, SUPER_EFFECTIVE
+ db FLYING, GRASS, SUPER_EFFECTIVE
+ db FLYING, ROCK, NOT_VERY_EFFECTIVE
+ db PSYCHIC_TYPE, FIGHTING, SUPER_EFFECTIVE
+ db PSYCHIC_TYPE, POISON, SUPER_EFFECTIVE
+ db BUG, FIRE, NOT_VERY_EFFECTIVE
+ db BUG, GRASS, SUPER_EFFECTIVE
+ db BUG, FIGHTING, NOT_VERY_EFFECTIVE
+ db BUG, FLYING, NOT_VERY_EFFECTIVE
+ db BUG, PSYCHIC_TYPE, SUPER_EFFECTIVE
+ db BUG, GHOST, NOT_VERY_EFFECTIVE
+ db BUG, POISON, SUPER_EFFECTIVE
+ db ROCK, FIRE, SUPER_EFFECTIVE
+ db ROCK, FIGHTING, NOT_VERY_EFFECTIVE
+ db ROCK, GROUND, NOT_VERY_EFFECTIVE
+ db ROCK, FLYING, SUPER_EFFECTIVE
+ db ROCK, BUG, SUPER_EFFECTIVE
+ db ROCK, ICE, SUPER_EFFECTIVE
+ db GHOST, NORMAL, NO_EFFECT
+ db GHOST, PSYCHIC_TYPE, NO_EFFECT
+ db FIRE, DRAGON, NOT_VERY_EFFECTIVE
+ db WATER, DRAGON, NOT_VERY_EFFECTIVE
+ db ELECTRIC, DRAGON, NOT_VERY_EFFECTIVE
+ db GRASS, DRAGON, NOT_VERY_EFFECTIVE
+ db ICE, DRAGON, SUPER_EFFECTIVE
+ db DRAGON, DRAGON, SUPER_EFFECTIVE
+ db -1 ; end
diff --git a/data/warp_tile_ids.asm b/data/warp_tile_ids.asm
deleted file mode 100755
index 4edc48a5..00000000
--- a/data/warp_tile_ids.asm
+++ /dev/null
@@ -1,89 +0,0 @@
-WarpTileIDPointers:
- dw OverworldWarpTileIDs
- dw RedsHouse1WarpTileIDs
- dw MartWarpTileIDs
- dw ForestWarpTileIDs
- dw RedsHouse2WarpTileIDs
- dw DojoWarpTileIDs
- dw PokecenterWarpTileIDs
- dw GymWarpTileIDs
- dw HouseWarpTileIDs
- dw ForestGateWarpTileIDs
- dw MuseumWarpTileIDs
- dw UndergroundWarpTileIDs
- dw GateWarpTileIDs
- dw ShipWarpTileIDs
- dw ShipPortWarpTileIDs
- dw CemeteryWarpTileIDs
- dw InteriorWarpTileIDs
- dw CavernWarpTileIDs
- dw LobbyWarpTileIDs
- dw MansionWarpTileIDs
- dw LabWarpTileIDs
- dw ClubWarpTileIDs
- dw FacilityWarpTileIDs
- dw PlateauWarpTileIDs
- dw BeachHouseWarpTileIDs
-
-OverworldWarpTileIDs:
- db $1B,$58,$FF
-
-ForestGateWarpTileIDs:
-MuseumWarpTileIDs:
-GateWarpTileIDs:
- db $3B
-
-RedsHouse1WarpTileIDs:
-RedsHouse2WarpTileIDs:
- db $1A,$1C,$FF
-
-MartWarpTileIDs:
-PokecenterWarpTileIDs:
- db $5E,$FF
-
-ForestWarpTileIDs:
- db $5A,$5C,$3A,$FF
-
-DojoWarpTileIDs:
-GymWarpTileIDs:
- db $4A,$FF
-
-HouseWarpTileIDs:
- db $54,$5C,$32,$FF
-
-ShipWarpTileIDs:
- db $37,$39,$1E,$4A,$FF
-
-InteriorWarpTileIDs:
- db $15,$55,$04,$FF
-
-CavernWarpTileIDs:
- db $18,$1A,$22,$FF
-
-LobbyWarpTileIDs:
- db $1A,$1C,$38,$FF
-
-MansionWarpTileIDs:
- db $1A,$1C,$53,$FF
-
-LabWarpTileIDs:
- db $34,$FF
-
-FacilityWarpTileIDs:
- db $43,$58,$20
-
-CemeteryWarpTileIDs:
- db $1B
-
-UndergroundWarpTileIDs:
- db $13,$FF
-
-PlateauWarpTileIDs:
- db $1B,$3B
-
-ShipPortWarpTileIDs:
-ClubWarpTileIDs:
- db $FF
-
-BeachHouseWarpTileIDs:
- db $FF
diff --git a/data/wild/good_rod.asm b/data/wild/good_rod.asm
new file mode 100755
index 00000000..700a5516
--- /dev/null
+++ b/data/wild/good_rod.asm
@@ -0,0 +1,5 @@
+; random choice of 2 good rod encounters
+GoodRodMons:
+ ; level, species
+ db 10, GOLDEEN
+ db 10, POLIWAG
diff --git a/data/wild/grass_water.asm b/data/wild/grass_water.asm
new file mode 100755
index 00000000..a991e9ae
--- /dev/null
+++ b/data/wild/grass_water.asm
@@ -0,0 +1,323 @@
+WildDataPointers:
+ dw NoMons ; PALLET_TOWN
+ dw NoMons ; VIRIDIAN_CITY
+ dw NoMons ; PEWTER_CITY
+ dw NoMons ; CERULEAN_CITY
+ dw NoMons ; LAVENDER_TOWN
+ dw NoMons ; VERMILION_CITY
+ dw NoMons ; CELADON_CITY
+ dw NoMons ; FUCHSIA_CITY
+ dw NoMons ; CINNABAR_ISLAND
+ dw NoMons ; INDIGO_PLATEAU
+ dw NoMons ; SAFFRON_CITY
+ dw NoMons ; unused
+ dw Route1Mons ; ROUTE_1
+ dw Route2Mons ; ROUTE_2
+ dw Route3Mons ; ROUTE_3
+ dw Route4Mons ; ROUTE_4
+ dw Route5Mons ; ROUTE_5
+ dw Route6Mons ; ROUTE_6
+ dw Route7Mons ; ROUTE_7
+ dw Route8Mons ; ROUTE_8
+ dw Route9Mons ; ROUTE_9
+ dw Route10Mons ; ROUTE_10
+ dw Route11Mons ; ROUTE_11
+ dw Route12Mons ; ROUTE_12
+ dw Route13Mons ; ROUTE_13
+ dw Route14Mons ; ROUTE_14
+ dw Route15Mons ; ROUTE_15
+ dw Route16Mons ; ROUTE_16
+ dw Route17Mons ; ROUTE_17
+ dw Route18Mons ; ROUTE_18
+ dw Route19Mons ; ROUTE_19
+ dw Route20Mons ; ROUTE_20
+ dw Route21Mons ; ROUTE_21
+ dw Route22Mons ; ROUTE_22
+ dw Route23Mons ; ROUTE_23
+ dw Route24Mons ; ROUTE_24
+ dw Route25Mons ; ROUTE_25
+ dw NoMons ; REDS_HOUSE_1F
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw ForestMons ; ViridianForest
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw MoonMons1
+ dw MoonMonsB1
+ dw MoonMonsB2
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw TunnelMonsB1
+ dw PowerPlantMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw PlateauMons1
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw TowerMons1
+ dw TowerMons2
+ dw TowerMons3
+ dw TowerMons4
+ dw TowerMons5
+ dw TowerMons6
+ dw TowerMons7
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw IslandMonsB1
+ dw IslandMonsB2
+ dw IslandMonsB3
+ dw IslandMonsB4
+ dw NoMons
+ dw NoMons
+ dw MansionMons1
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw IslandMons1
+ dw NoMons
+ dw PlateauMons2
+ dw NoMons
+ dw NoMons
+ dw CaveMons
+ dw PlateauMons3
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw MansionMons2
+ dw MansionMons3
+ dw MansionMonsB1
+ dw ZoneMons1
+ dw ZoneMons2
+ dw ZoneMons3
+ dw ZoneMonsCenter
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw DungeonMons2
+ dw DungeonMonsB1
+ dw DungeonMons1
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw TunnelMonsB2
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw NoMons
+ dw -1 ; end
+
+; wild pokemon data is divided into two parts.
+; first part: pokemon found in grass
+; second part: pokemon found while surfing
+; each part goes as follows:
+ ; if first byte == 0, then
+ ; no wild pokemon on this map
+ ; if first byte != 0, then
+ ; first byte is encounter rate
+ ; followed by 20 bytes:
+ ; level, species (ten times)
+
+INCLUDE "data/wild/maps/nothing.asm"
+INCLUDE "data/wild/maps/Route1.asm"
+INCLUDE "data/wild/maps/Route2.asm"
+INCLUDE "data/wild/maps/Route22.asm"
+INCLUDE "data/wild/maps/ViridianForest.asm"
+INCLUDE "data/wild/maps/Route3.asm"
+INCLUDE "data/wild/maps/MtMoon1F.asm"
+INCLUDE "data/wild/maps/MtMoonB1F.asm"
+INCLUDE "data/wild/maps/MtMoonB2F.asm"
+INCLUDE "data/wild/maps/Route4.asm"
+INCLUDE "data/wild/maps/Route24.asm"
+INCLUDE "data/wild/maps/Route25.asm"
+INCLUDE "data/wild/maps/Route9.asm"
+INCLUDE "data/wild/maps/Route5.asm"
+INCLUDE "data/wild/maps/Route6.asm"
+INCLUDE "data/wild/maps/Route11.asm"
+INCLUDE "data/wild/maps/RockTunnel1F.asm"
+INCLUDE "data/wild/maps/RockTunnelB1F.asm"
+INCLUDE "data/wild/maps/Route10.asm"
+INCLUDE "data/wild/maps/Route12.asm"
+INCLUDE "data/wild/maps/Route8.asm"
+INCLUDE "data/wild/maps/Route7.asm"
+INCLUDE "data/wild/maps/PokemonTower1F.asm"
+INCLUDE "data/wild/maps/PokemonTower2F.asm"
+INCLUDE "data/wild/maps/PokemonTower3F.asm"
+INCLUDE "data/wild/maps/PokemonTower4F.asm"
+INCLUDE "data/wild/maps/PokemonTower5F.asm"
+INCLUDE "data/wild/maps/PokemonTower6F.asm"
+INCLUDE "data/wild/maps/PokemonTower7F.asm"
+INCLUDE "data/wild/maps/Route13.asm"
+INCLUDE "data/wild/maps/Route14.asm"
+INCLUDE "data/wild/maps/Route15.asm"
+INCLUDE "data/wild/maps/Route16.asm"
+INCLUDE "data/wild/maps/Route17.asm"
+INCLUDE "data/wild/maps/Route18.asm"
+INCLUDE "data/wild/maps/SafariZoneCenter.asm"
+INCLUDE "data/wild/maps/SafariZoneEast.asm"
+INCLUDE "data/wild/maps/SafariZoneNorth.asm"
+INCLUDE "data/wild/maps/SafariZoneWest.asm"
+INCLUDE "data/wild/maps/Route19.asm"
+INCLUDE "data/wild/maps/Route20.asm"
+INCLUDE "data/wild/maps/SeafoamIslands1F.asm"
+INCLUDE "data/wild/maps/SeafoamIslandsB1F.asm"
+INCLUDE "data/wild/maps/SeafoamIslandsB2F.asm"
+INCLUDE "data/wild/maps/SeafoamIslandsB3F.asm"
+INCLUDE "data/wild/maps/SeafoamIslandsB4F.asm"
+INCLUDE "data/wild/maps/PokemonMansion1F.asm"
+INCLUDE "data/wild/maps/PokemonMansion2F.asm"
+INCLUDE "data/wild/maps/PokemonMansion3F.asm"
+INCLUDE "data/wild/maps/PokemonMansionB1F.asm"
+INCLUDE "data/wild/maps/Route21.asm"
+INCLUDE "data/wild/maps/CeruleanCave1F.asm"
+INCLUDE "data/wild/maps/CeruleanCave2F.asm"
+INCLUDE "data/wild/maps/CeruleanCaveB1F.asm"
+INCLUDE "data/wild/maps/PowerPlant.asm"
+INCLUDE "data/wild/maps/Route23.asm"
+INCLUDE "data/wild/maps/VictoryRoad2F.asm"
+INCLUDE "data/wild/maps/VictoryRoad3F.asm"
+INCLUDE "data/wild/maps/VictoryRoad1F.asm"
+INCLUDE "data/wild/maps/DiglettsCave.asm"
diff --git a/data/wild/maps/CeruleanCave1F.asm b/data/wild/maps/CeruleanCave1F.asm
new file mode 100644
index 00000000..24a24f60
--- /dev/null
+++ b/data/wild/maps/CeruleanCave1F.asm
@@ -0,0 +1,14 @@
+DungeonMons1:
+ db 10 ; grass encounter rate
+ db 50, GOLBAT
+ db 55, GOLBAT
+ db 45, GRAVELER
+ db 55, GLOOM
+ db 55, WEEPINBELL
+ db 52, SANDSLASH
+ db 54, VENOMOTH
+ db 54, PARASECT
+ db 55, DITTO
+ db 60, DITTO
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/CeruleanCave2F.asm b/data/wild/maps/CeruleanCave2F.asm
new file mode 100644
index 00000000..07b34527
--- /dev/null
+++ b/data/wild/maps/CeruleanCave2F.asm
@@ -0,0 +1,14 @@
+DungeonMons2:
+ db 15 ; grass encounter rate
+ db 52, GOLBAT
+ db 57, GOLBAT
+ db 50, GRAVELER
+ db 56, SANDSLASH
+ db 50, RHYHORN
+ db 60, DITTO
+ db 58, GLOOM
+ db 58, WEEPINBELL
+ db 60, RHYDON
+ db 58, RHYDON
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/CeruleanCaveB1F.asm b/data/wild/maps/CeruleanCaveB1F.asm
new file mode 100644
index 00000000..969ab18f
--- /dev/null
+++ b/data/wild/maps/CeruleanCaveB1F.asm
@@ -0,0 +1,14 @@
+DungeonMonsB1:
+ db 25 ; grass encounter rate
+ db 54, GOLBAT
+ db 59, GOLBAT
+ db 55, GRAVELER
+ db 52, RHYHORN
+ db 62, RHYDON
+ db 60, DITTO
+ db 56, CHANSEY
+ db 65, DITTO
+ db 55, LICKITUNG
+ db 50, LICKITUNG
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/DiglettsCave.asm b/data/wild/maps/DiglettsCave.asm
new file mode 100755
index 00000000..d1e73af4
--- /dev/null
+++ b/data/wild/maps/DiglettsCave.asm
@@ -0,0 +1,14 @@
+CaveMons:
+ db 20 ; grass encounter rate
+ db 18, DIGLETT
+ db 19, DIGLETT
+ db 17, DIGLETT
+ db 20, DIGLETT
+ db 16, DIGLETT
+ db 15, DIGLETT
+ db 21, DIGLETT
+ db 22, DIGLETT
+ db 29, DUGTRIO
+ db 31, DUGTRIO
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/MtMoon1F.asm b/data/wild/maps/MtMoon1F.asm
new file mode 100755
index 00000000..2e426655
--- /dev/null
+++ b/data/wild/maps/MtMoon1F.asm
@@ -0,0 +1,14 @@
+MoonMons1:
+ db 10 ; grass encounter rate
+ db 8, ZUBAT
+ db 9, ZUBAT
+ db 10, GEODUDE
+ db 6, ZUBAT
+ db 7, ZUBAT
+ db 10, ZUBAT
+ db 10, GEODUDE
+ db 11, ZUBAT
+ db 12, SANDSHREW
+ db 11, CLEFAIRY
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/MtMoonB1F.asm b/data/wild/maps/MtMoonB1F.asm
new file mode 100755
index 00000000..1eee34ce
--- /dev/null
+++ b/data/wild/maps/MtMoonB1F.asm
@@ -0,0 +1,14 @@
+MoonMonsB1:
+ db 10 ; grass encounter rate
+ db 8, ZUBAT
+ db 9, ZUBAT
+ db 10, ZUBAT
+ db 10, GEODUDE
+ db 11, GEODUDE
+ db 11, ZUBAT
+ db 9, PARAS
+ db 11, PARAS
+ db 10, CLEFAIRY
+ db 12, CLEFAIRY
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/MtMoonB2F.asm b/data/wild/maps/MtMoonB2F.asm
new file mode 100755
index 00000000..d49ec585
--- /dev/null
+++ b/data/wild/maps/MtMoonB2F.asm
@@ -0,0 +1,14 @@
+MoonMonsB2:
+ db 10 ; grass encounter rate
+ db 10, ZUBAT
+ db 11, GEODUDE
+ db 13, PARAS
+ db 11, ZUBAT
+ db 11, ZUBAT
+ db 12, ZUBAT
+ db 13, ZUBAT
+ db 9, CLEFAIRY
+ db 11, CLEFAIRY
+ db 13, CLEFAIRY
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/PokemonMansion1F.asm b/data/wild/maps/PokemonMansion1F.asm
new file mode 100755
index 00000000..75fcadfe
--- /dev/null
+++ b/data/wild/maps/PokemonMansion1F.asm
@@ -0,0 +1,14 @@
+MansionMons1:
+ db 10 ; grass encounter rate
+ db 34, RATTATA
+ db 34, RATICATE
+ db 23, GRIMER
+ db 26, GROWLITHE
+ db 37, RATTATA
+ db 37, RATICATE
+ db 30, GROWLITHE
+ db 26, GRIMER
+ db 34, GROWLITHE
+ db 38, GROWLITHE
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/PokemonMansion2F.asm b/data/wild/maps/PokemonMansion2F.asm
new file mode 100755
index 00000000..2143532f
--- /dev/null
+++ b/data/wild/maps/PokemonMansion2F.asm
@@ -0,0 +1,14 @@
+MansionMons2:
+ db 10 ; grass encounter rate
+ db 37, RATTATA
+ db 37, RATICATE
+ db 26, GRIMER
+ db 29, GRIMER
+ db 40, RATTATA
+ db 40, RATICATE
+ db 32, GRIMER
+ db 35, GRIMER
+ db 35, MUK
+ db 38, MUK
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/PokemonMansion3F.asm b/data/wild/maps/PokemonMansion3F.asm
new file mode 100755
index 00000000..f0c77977
--- /dev/null
+++ b/data/wild/maps/PokemonMansion3F.asm
@@ -0,0 +1,14 @@
+MansionMons3:
+ db 10 ; grass encounter rate
+ db 40, RATTATA
+ db 40, RATICATE
+ db 32, GRIMER
+ db 35, GRIMER
+ db 43, RATTATA
+ db 43, RATICATE
+ db 38, GRIMER
+ db 38, GRIMER
+ db 38, MUK
+ db 41, MUK
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/PokemonMansionB1F.asm b/data/wild/maps/PokemonMansionB1F.asm
new file mode 100755
index 00000000..c0ad432b
--- /dev/null
+++ b/data/wild/maps/PokemonMansionB1F.asm
@@ -0,0 +1,14 @@
+MansionMonsB1:
+ db 10 ; grass encounter rate
+ db 35, GRIMER
+ db 38, GRIMER
+ db 37, RATICATE
+ db 40, RATICATE
+ db 41, MUK
+ db 43, RATICATE
+ db 24, DITTO
+ db 46, RATICATE
+ db 18, DITTO
+ db 12, DITTO
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/PokemonTower1F.asm b/data/wild/maps/PokemonTower1F.asm
new file mode 100755
index 00000000..95bef4a3
--- /dev/null
+++ b/data/wild/maps/PokemonTower1F.asm
@@ -0,0 +1,4 @@
+TowerMons1:
+ db 0 ; grass encounter rate
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/PokemonTower2F.asm b/data/wild/maps/PokemonTower2F.asm
new file mode 100755
index 00000000..77b7d415
--- /dev/null
+++ b/data/wild/maps/PokemonTower2F.asm
@@ -0,0 +1,4 @@
+TowerMons2:
+ db 0 ; grass encounter rate
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/PokemonTower3F.asm b/data/wild/maps/PokemonTower3F.asm
new file mode 100755
index 00000000..b608ea15
--- /dev/null
+++ b/data/wild/maps/PokemonTower3F.asm
@@ -0,0 +1,14 @@
+TowerMons3:
+ db 10 ; grass encounter rate
+ db 20, GASTLY
+ db 21, GASTLY
+ db 22, GASTLY
+ db 23, GASTLY
+ db 24, GASTLY
+ db 19, GASTLY
+ db 18, GASTLY
+ db 25, GASTLY
+ db 20, HAUNTER
+ db 25, HAUNTER
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/PokemonTower4F.asm b/data/wild/maps/PokemonTower4F.asm
new file mode 100755
index 00000000..425b200c
--- /dev/null
+++ b/data/wild/maps/PokemonTower4F.asm
@@ -0,0 +1,14 @@
+TowerMons4:
+ db 10 ; grass encounter rate
+ db 20, GASTLY
+ db 21, GASTLY
+ db 22, GASTLY
+ db 23, GASTLY
+ db 24, GASTLY
+ db 19, GASTLY
+ db 18, GASTLY
+ db 25, GASTLY
+ db 20, HAUNTER
+ db 25, HAUNTER
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/PokemonTower5F.asm b/data/wild/maps/PokemonTower5F.asm
new file mode 100755
index 00000000..5a0c96e1
--- /dev/null
+++ b/data/wild/maps/PokemonTower5F.asm
@@ -0,0 +1,14 @@
+TowerMons5:
+ db 15 ; grass encounter rate
+ db 22, GASTLY
+ db 23, GASTLY
+ db 24, GASTLY
+ db 25, GASTLY
+ db 26, GASTLY
+ db 21, GASTLY
+ db 20, CUBONE
+ db 27, GASTLY
+ db 22, HAUNTER
+ db 27, HAUNTER
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/PokemonTower6F.asm b/data/wild/maps/PokemonTower6F.asm
new file mode 100755
index 00000000..5e9d23f4
--- /dev/null
+++ b/data/wild/maps/PokemonTower6F.asm
@@ -0,0 +1,14 @@
+TowerMons6:
+ db 15 ; grass encounter rate
+ db 22, GASTLY
+ db 23, GASTLY
+ db 24, GASTLY
+ db 25, GASTLY
+ db 26, GASTLY
+ db 21, GASTLY
+ db 22, CUBONE
+ db 27, GASTLY
+ db 22, HAUNTER
+ db 27, HAUNTER
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/PokemonTower7F.asm b/data/wild/maps/PokemonTower7F.asm
new file mode 100755
index 00000000..8a3467ff
--- /dev/null
+++ b/data/wild/maps/PokemonTower7F.asm
@@ -0,0 +1,14 @@
+TowerMons7:
+ db 20 ; grass encounter rate
+ db 24, GASTLY
+ db 25, GASTLY
+ db 26, GASTLY
+ db 27, GASTLY
+ db 28, GASTLY
+ db 23, GASTLY
+ db 24, CUBONE
+ db 29, GASTLY
+ db 24, HAUNTER
+ db 29, HAUNTER
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/PowerPlant.asm b/data/wild/maps/PowerPlant.asm
new file mode 100755
index 00000000..a910420e
--- /dev/null
+++ b/data/wild/maps/PowerPlant.asm
@@ -0,0 +1,14 @@
+PowerPlantMons:
+ db 10 ; grass encounter rate
+ db 30, MAGNEMITE
+ db 35, MAGNEMITE
+ db 33, MAGNETON
+ db 33, VOLTORB
+ db 37, VOLTORB
+ db 33, GRIMER
+ db 37, GRIMER
+ db 38, MAGNETON
+ db 33, MUK
+ db 37, MUK
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/RockTunnel1F.asm b/data/wild/maps/RockTunnel1F.asm
new file mode 100755
index 00000000..5c64bac4
--- /dev/null
+++ b/data/wild/maps/RockTunnel1F.asm
@@ -0,0 +1,14 @@
+TunnelMonsB1:
+ db 15 ; grass encounter rate
+ db 15, ZUBAT
+ db 16, GEODUDE
+ db 17, ZUBAT
+ db 19, ZUBAT
+ db 18, GEODUDE
+ db 20, GEODUDE
+ db 21, ZUBAT
+ db 17, MACHOP
+ db 19, MACHOP
+ db 21, MACHOP
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/RockTunnelB1F.asm b/data/wild/maps/RockTunnelB1F.asm
new file mode 100755
index 00000000..3f034958
--- /dev/null
+++ b/data/wild/maps/RockTunnelB1F.asm
@@ -0,0 +1,14 @@
+TunnelMonsB2:
+ db 15 ; grass encounter rate
+ db 20, ZUBAT
+ db 17, GEODUDE
+ db 18, MACHOP
+ db 21, ZUBAT
+ db 22, ZUBAT
+ db 21, GEODUDE
+ db 20, MACHOP
+ db 14, ONIX
+ db 18, ONIX
+ db 22, ONIX
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route1.asm b/data/wild/maps/Route1.asm
new file mode 100755
index 00000000..df599383
--- /dev/null
+++ b/data/wild/maps/Route1.asm
@@ -0,0 +1,14 @@
+Route1Mons:
+ db 25 ; grass encounter rate
+ db 3, PIDGEY
+ db 4, PIDGEY
+ db 2, RATTATA
+ db 3, RATTATA
+ db 2, PIDGEY
+ db 3, PIDGEY
+ db 5, PIDGEY
+ db 4, RATTATA
+ db 6, PIDGEY
+ db 7, PIDGEY
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route10.asm b/data/wild/maps/Route10.asm
new file mode 100755
index 00000000..b7ca364c
--- /dev/null
+++ b/data/wild/maps/Route10.asm
@@ -0,0 +1,14 @@
+Route10Mons:
+ db 15 ; grass encounter rate
+ db 16, MAGNEMITE
+ db 18, RATTATA
+ db 18, MAGNEMITE
+ db 20, MAGNEMITE
+ db 17, NIDORAN_M
+ db 17, NIDORAN_F
+ db 22, MAGNEMITE
+ db 20, RATICATE
+ db 16, MACHOP
+ db 18, MACHOP
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route11.asm b/data/wild/maps/Route11.asm
new file mode 100755
index 00000000..eb00aa7e
--- /dev/null
+++ b/data/wild/maps/Route11.asm
@@ -0,0 +1,14 @@
+Route11Mons:
+ db 15 ; grass encounter rate
+ db 16, PIDGEY
+ db 15, RATTATA
+ db 18, PIDGEY
+ db 15, DROWZEE
+ db 17, RATTATA
+ db 17, DROWZEE
+ db 18, PIDGEOTTO
+ db 20, PIDGEOTTO
+ db 19, DROWZEE
+ db 17, RATICATE
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route12.asm b/data/wild/maps/Route12.asm
new file mode 100755
index 00000000..46c4106e
--- /dev/null
+++ b/data/wild/maps/Route12.asm
@@ -0,0 +1,24 @@
+Route12Mons:
+ db 15 ; grass encounter rate
+ db 25, ODDISH
+ db 25, BELLSPROUT
+ db 28, PIDGEY
+ db 28, PIDGEOTTO
+ db 27, ODDISH
+ db 27, BELLSPROUT
+ db 29, GLOOM
+ db 29, WEEPINBELL
+ db 26, FARFETCHD
+ db 31, FARFETCHD
+
+ db 3 ; water encounter rate
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWBRO
+ db 20, SLOWBRO
diff --git a/data/wild/maps/Route13.asm b/data/wild/maps/Route13.asm
new file mode 100755
index 00000000..d19e0d83
--- /dev/null
+++ b/data/wild/maps/Route13.asm
@@ -0,0 +1,24 @@
+Route13Mons:
+ db 15 ; grass encounter rate
+ db 25, ODDISH
+ db 25, BELLSPROUT
+ db 28, PIDGEOTTO
+ db 28, PIDGEY
+ db 27, ODDISH
+ db 27, BELLSPROUT
+ db 29, GLOOM
+ db 29, WEEPINBELL
+ db 26, FARFETCHD
+ db 31, FARFETCHD
+
+ db 3 ; water encounter rate
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWPOKE
+ db 15, SLOWBRO
+ db 20, SLOWBRO
diff --git a/data/wild/maps/Route14.asm b/data/wild/maps/Route14.asm
new file mode 100755
index 00000000..fe600bed
--- /dev/null
+++ b/data/wild/maps/Route14.asm
@@ -0,0 +1,14 @@
+Route14Mons:
+ db 15 ; grass encounter rate
+ db 26, ODDISH
+ db 26, BELLSPROUT
+ db 24, VENONAT
+ db 30, PIDGEOTTO
+ db 28, ODDISH
+ db 28, BELLSPROUT
+ db 30, GLOOM
+ db 30, WEEPINBELL
+ db 27, VENONAT
+ db 30, VENOMOTH
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route15.asm b/data/wild/maps/Route15.asm
new file mode 100755
index 00000000..4374acfb
--- /dev/null
+++ b/data/wild/maps/Route15.asm
@@ -0,0 +1,14 @@
+Route15Mons:
+ db 15 ; grass encounter rate
+ db 26, ODDISH
+ db 26, BELLSPROUT
+ db 24, VENONAT
+ db 32, PIDGEOTTO
+ db 28, ODDISH
+ db 28, BELLSPROUT
+ db 30, GLOOM
+ db 30, WEEPINBELL
+ db 27, VENONAT
+ db 30, VENOMOTH
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route16.asm b/data/wild/maps/Route16.asm
new file mode 100755
index 00000000..f858dcdb
--- /dev/null
+++ b/data/wild/maps/Route16.asm
@@ -0,0 +1,14 @@
+Route16Mons:
+ db 25 ; grass encounter rate
+ db 22, SPEAROW
+ db 22, DODUO
+ db 23, RATTATA
+ db 24, DODUO
+ db 24, RATTATA
+ db 26, DODUO
+ db 23, SPEAROW
+ db 24, FEAROW
+ db 25, RATICATE
+ db 26, RATICATE
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route17.asm b/data/wild/maps/Route17.asm
new file mode 100755
index 00000000..3f6316f3
--- /dev/null
+++ b/data/wild/maps/Route17.asm
@@ -0,0 +1,14 @@
+Route17Mons:
+ db 25 ; grass encounter rate
+ db 26, DODUO
+ db 27, FEAROW
+ db 27, DODUO
+ db 28, DODUO
+ db 28, PONYTA
+ db 30, PONYTA
+ db 29, FEAROW
+ db 28, DODUO
+ db 32, PONYTA
+ db 29, DODRIO
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route18.asm b/data/wild/maps/Route18.asm
new file mode 100755
index 00000000..b76cef02
--- /dev/null
+++ b/data/wild/maps/Route18.asm
@@ -0,0 +1,14 @@
+Route18Mons:
+ db 25 ; grass encounter rate
+ db 22, SPEAROW
+ db 22, DODUO
+ db 23, RATTATA
+ db 24, DODUO
+ db 24, RATTATA
+ db 26, DODUO
+ db 23, SPEAROW
+ db 24, FEAROW
+ db 25, RATICATE
+ db 26, RATICATE
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route19.asm b/data/wild/maps/Route19.asm
new file mode 100644
index 00000000..70b06ac8
--- /dev/null
+++ b/data/wild/maps/Route19.asm
@@ -0,0 +1,14 @@
+Route19Mons:
+ db 0 ; grass encounter rate
+
+ db 5 ; water encounter rate
+ db 5, TENTACOOL
+ db 10, TENTACOOL
+ db 15, TENTACOOL
+ db 5, TENTACOOL
+ db 10, TENTACOOL
+ db 15, TENTACOOL
+ db 20, TENTACOOL
+ db 30, TENTACOOL
+ db 35, TENTACOOL
+ db 40, TENTACOOL
diff --git a/data/wild/maps/Route2.asm b/data/wild/maps/Route2.asm
new file mode 100755
index 00000000..40093712
--- /dev/null
+++ b/data/wild/maps/Route2.asm
@@ -0,0 +1,14 @@
+Route2Mons:
+ db 25 ; grass encounter rate
+ db 3, RATTATA
+ db 3, PIDGEY
+ db 4, RATTATA
+ db 4, NIDORAN_M
+ db 4, NIDORAN_F
+ db 5, PIDGEY
+ db 6, NIDORAN_M
+ db 6, NIDORAN_F
+ db 7, PIDGEY
+ db 7, PIDGEY
+
+ db 0 ; water encounter rate
diff --git a/data/wildPokemon/route20.asm b/data/wild/maps/Route20.asm
index b955c330..b955c330 100644
--- a/data/wildPokemon/route20.asm
+++ b/data/wild/maps/Route20.asm
diff --git a/data/wild/maps/Route21.asm b/data/wild/maps/Route21.asm
new file mode 100755
index 00000000..e934e079
--- /dev/null
+++ b/data/wild/maps/Route21.asm
@@ -0,0 +1,24 @@
+Route21Mons:
+ db 25 ; grass encounter rate
+ db 15, PIDGEY
+ db 13, RATTATA
+ db 13, PIDGEY
+ db 11, PIDGEY
+ db 17, PIDGEY
+ db 15, RATTATA
+ db 15, RATICATE
+ db 17, PIDGEOTTO
+ db 19, PIDGEOTTO
+ db 15, PIDGEOTTO
+
+ db 5 ; water encounter rate
+ db 5, TENTACOOL
+ db 10, TENTACOOL
+ db 15, TENTACOOL
+ db 5, TENTACOOL
+ db 10, TENTACOOL
+ db 15, TENTACOOL
+ db 20, TENTACOOL
+ db 30, TENTACOOL
+ db 35, TENTACOOL
+ db 40, TENTACOOL
diff --git a/data/wild/maps/Route22.asm b/data/wild/maps/Route22.asm
new file mode 100755
index 00000000..1b50ded0
--- /dev/null
+++ b/data/wild/maps/Route22.asm
@@ -0,0 +1,14 @@
+Route22Mons:
+ db 25 ; grass encounter rate
+ db 2, NIDORAN_M
+ db 2, NIDORAN_F
+ db 3, MANKEY
+ db 3, RATTATA
+ db 4, NIDORAN_M
+ db 4, NIDORAN_F
+ db 5, MANKEY
+ db 2, SPEAROW
+ db 4, SPEAROW
+ db 6, SPEAROW
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route23.asm b/data/wild/maps/Route23.asm
new file mode 100755
index 00000000..cc1642e8
--- /dev/null
+++ b/data/wild/maps/Route23.asm
@@ -0,0 +1,14 @@
+Route23Mons:
+ db 10 ; grass encounter rate
+ db 41, NIDORINO
+ db 41, NIDORINA
+ db 36, MANKEY
+ db 44, NIDORINO
+ db 44, NIDORINA
+ db 40, FEAROW
+ db 41, MANKEY
+ db 45, FEAROW
+ db 41, PRIMEAPE
+ db 46, PRIMEAPE
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route24.asm b/data/wild/maps/Route24.asm
new file mode 100755
index 00000000..e493dfbf
--- /dev/null
+++ b/data/wild/maps/Route24.asm
@@ -0,0 +1,14 @@
+Route24Mons:
+ db 25 ; grass encounter rate
+ db 12, ODDISH
+ db 12, BELLSPROUT
+ db 13, PIDGEY
+ db 14, ODDISH
+ db 14, BELLSPROUT
+ db 15, PIDGEY
+ db 13, VENONAT
+ db 16, VENONAT
+ db 17, PIDGEY
+ db 17, PIDGEOTTO
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route25.asm b/data/wild/maps/Route25.asm
new file mode 100755
index 00000000..2daa060c
--- /dev/null
+++ b/data/wild/maps/Route25.asm
@@ -0,0 +1,14 @@
+Route25Mons:
+ db 15 ; grass encounter rate
+ db 12, ODDISH
+ db 12, BELLSPROUT
+ db 13, PIDGEY
+ db 14, ODDISH
+ db 14, BELLSPROUT
+ db 15, PIDGEY
+ db 13, VENONAT
+ db 16, VENONAT
+ db 17, PIDGEY
+ db 17, PIDGEOTTO
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route3.asm b/data/wild/maps/Route3.asm
new file mode 100755
index 00000000..be7afe95
--- /dev/null
+++ b/data/wild/maps/Route3.asm
@@ -0,0 +1,14 @@
+Route3Mons:
+ db 20 ; grass encounter rate
+ db 8, SPEAROW
+ db 9, SPEAROW
+ db 9, MANKEY
+ db 10, SPEAROW
+ db 8, SANDSHREW
+ db 10, RATTATA
+ db 10, SANDSHREW
+ db 12, RATTATA
+ db 11, SPEAROW
+ db 12, SPEAROW
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route4.asm b/data/wild/maps/Route4.asm
new file mode 100755
index 00000000..29f0aec4
--- /dev/null
+++ b/data/wild/maps/Route4.asm
@@ -0,0 +1,14 @@
+Route4Mons:
+ db 20 ; grass encounter rate
+ db 8, SPEAROW
+ db 9, SPEAROW
+ db 9, MANKEY
+ db 10, SPEAROW
+ db 8, SANDSHREW
+ db 10, RATTATA
+ db 10, SANDSHREW
+ db 12, RATTATA
+ db 11, SPEAROW
+ db 12, SPEAROW
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route5.asm b/data/wild/maps/Route5.asm
new file mode 100755
index 00000000..7517bcb9
--- /dev/null
+++ b/data/wild/maps/Route5.asm
@@ -0,0 +1,14 @@
+Route5Mons:
+ db 15 ; grass encounter rate
+ db 15, PIDGEY
+ db 14, RATTATA
+ db 7, ABRA
+ db 16, PIDGEY
+ db 16, RATTATA
+ db 17, PIDGEY
+ db 17, PIDGEOTTO
+ db 3, JIGGLYPUFF
+ db 5, JIGGLYPUFF
+ db 7, JIGGLYPUFF
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route6.asm b/data/wild/maps/Route6.asm
new file mode 100755
index 00000000..067d2694
--- /dev/null
+++ b/data/wild/maps/Route6.asm
@@ -0,0 +1,24 @@
+Route6Mons:
+ db 15 ; grass encounter rate
+ db 15, PIDGEY
+ db 14, RATTATA
+ db 7, ABRA
+ db 16, PIDGEY
+ db 16, RATTATA
+ db 17, PIDGEY
+ db 17, PIDGEOTTO
+ db 3, JIGGLYPUFF
+ db 5, JIGGLYPUFF
+ db 7, JIGGLYPUFF
+
+ db 3 ; water encounter rate
+ db 15, PSYDUCK
+ db 15, PSYDUCK
+ db 15, PSYDUCK
+ db 15, PSYDUCK
+ db 15, PSYDUCK
+ db 15, PSYDUCK
+ db 15, PSYDUCK
+ db 15, PSYDUCK
+ db 15, GOLDUCK
+ db 20, GOLDUCK
diff --git a/data/wild/maps/Route7.asm b/data/wild/maps/Route7.asm
new file mode 100755
index 00000000..1ebb1ce9
--- /dev/null
+++ b/data/wild/maps/Route7.asm
@@ -0,0 +1,14 @@
+Route7Mons:
+ db 15 ; grass encounter rate
+ db 20, PIDGEY
+ db 22, PIDGEY
+ db 20, RATTATA
+ db 15, ABRA
+ db 19, ABRA
+ db 24, PIDGEOTTO
+ db 26, ABRA
+ db 19, JIGGLYPUFF
+ db 24, JIGGLYPUFF
+ db 24, JIGGLYPUFF
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route8.asm b/data/wild/maps/Route8.asm
new file mode 100755
index 00000000..db07dbba
--- /dev/null
+++ b/data/wild/maps/Route8.asm
@@ -0,0 +1,14 @@
+Route8Mons:
+ db 15 ; grass encounter rate
+ db 20, PIDGEY
+ db 22, PIDGEY
+ db 20, RATTATA
+ db 15, ABRA
+ db 19, ABRA
+ db 24, PIDGEOTTO
+ db 19, JIGGLYPUFF
+ db 24, JIGGLYPUFF
+ db 20, KADABRA
+ db 27, KADABRA
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/Route9.asm b/data/wild/maps/Route9.asm
new file mode 100755
index 00000000..78512402
--- /dev/null
+++ b/data/wild/maps/Route9.asm
@@ -0,0 +1,14 @@
+Route9Mons:
+ db 15 ; grass encounter rate
+ db 16, NIDORAN_M
+ db 16, NIDORAN_F
+ db 18, RATTATA
+ db 18, NIDORAN_M
+ db 18, NIDORAN_F
+ db 17, SPEAROW
+ db 18, NIDORINO
+ db 18, NIDORINA
+ db 20, RATICATE
+ db 19, FEAROW
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/SafariZoneCenter.asm b/data/wild/maps/SafariZoneCenter.asm
new file mode 100755
index 00000000..125fbc6a
--- /dev/null
+++ b/data/wild/maps/SafariZoneCenter.asm
@@ -0,0 +1,14 @@
+ZoneMonsCenter:
+ db 30 ; grass encounter rate
+ db 14, NIDORAN_M
+ db 36, NIDORAN_F
+ db 24, EXEGGCUTE
+ db 20, RHYHORN
+ db 23, NIDORINO
+ db 27, PARASECT
+ db 27, PARAS
+ db 32, PARASECT
+ db 22, TANGELA
+ db 7, CHANSEY
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/SafariZoneEast.asm b/data/wild/maps/SafariZoneEast.asm
new file mode 100755
index 00000000..ba0a1954
--- /dev/null
+++ b/data/wild/maps/SafariZoneEast.asm
@@ -0,0 +1,14 @@
+ZoneMons1:
+ db 30 ; grass encounter rate
+ db 21, NIDORAN_M
+ db 29, NIDORAN_F
+ db 22, EXEGGCUTE
+ db 21, TAUROS
+ db 32, NIDORINA
+ db 19, CUBONE
+ db 26, EXEGGCUTE
+ db 24, MAROWAK
+ db 21, CHANSEY
+ db 15, SCYTHER
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/SafariZoneNorth.asm b/data/wild/maps/SafariZoneNorth.asm
new file mode 100755
index 00000000..fa6dd3b4
--- /dev/null
+++ b/data/wild/maps/SafariZoneNorth.asm
@@ -0,0 +1,14 @@
+ZoneMons2:
+ db 30 ; grass encounter rate
+ db 36, NIDORAN_M
+ db 14, NIDORAN_F
+ db 20, EXEGGCUTE
+ db 25, RHYHORN
+ db 23, NIDORINA
+ db 28, KANGASKHAN
+ db 16, CUBONE
+ db 33, KANGASKHAN
+ db 25, SCYTHER
+ db 15, PINSIR
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/SafariZoneWest.asm b/data/wild/maps/SafariZoneWest.asm
new file mode 100755
index 00000000..b1e2fe3a
--- /dev/null
+++ b/data/wild/maps/SafariZoneWest.asm
@@ -0,0 +1,14 @@
+ZoneMons3:
+ db 30 ; grass encounter rate
+ db 29, NIDORAN_M
+ db 21, NIDORAN_F
+ db 22, EXEGGCUTE
+ db 21, TAUROS
+ db 32, NIDORINO
+ db 19, CUBONE
+ db 26, EXEGGCUTE
+ db 24, MAROWAK
+ db 25, PINSIR
+ db 27, TANGELA
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/SeafoamIslands1F.asm b/data/wild/maps/SeafoamIslands1F.asm
new file mode 100755
index 00000000..e37005b2
--- /dev/null
+++ b/data/wild/maps/SeafoamIslands1F.asm
@@ -0,0 +1,14 @@
+IslandMons1:
+ db 15 ; grass encounter rate
+ db 18, ZUBAT
+ db 25, KRABBY
+ db 27, KRABBY
+ db 27, ZUBAT
+ db 36, ZUBAT
+ db 28, SLOWPOKE
+ db 30, SLOWPOKE
+ db 9, ZUBAT
+ db 27, GOLBAT
+ db 36, GOLBAT
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/SeafoamIslandsB1F.asm b/data/wild/maps/SeafoamIslandsB1F.asm
new file mode 100755
index 00000000..fd9ab09a
--- /dev/null
+++ b/data/wild/maps/SeafoamIslandsB1F.asm
@@ -0,0 +1,14 @@
+IslandMonsB1:
+ db 10 ; grass encounter rate
+ db 27, ZUBAT
+ db 26, KRABBY
+ db 36, ZUBAT
+ db 28, KRABBY
+ db 27, GOLBAT
+ db 29, SLOWPOKE
+ db 18, ZUBAT
+ db 28, KINGLER
+ db 22, SEEL
+ db 26, SEEL
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/SeafoamIslandsB2F.asm b/data/wild/maps/SeafoamIslandsB2F.asm
new file mode 100755
index 00000000..53961534
--- /dev/null
+++ b/data/wild/maps/SeafoamIslandsB2F.asm
@@ -0,0 +1,14 @@
+IslandMonsB2:
+ db 10 ; grass encounter rate
+ db 27, ZUBAT
+ db 27, KRABBY
+ db 36, ZUBAT
+ db 27, GOLBAT
+ db 28, KINGLER
+ db 24, SEEL
+ db 29, KRABBY
+ db 36, GOLBAT
+ db 31, SLOWPOKE
+ db 31, SLOWBRO
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/SeafoamIslandsB3F.asm b/data/wild/maps/SeafoamIslandsB3F.asm
new file mode 100755
index 00000000..5435d1e6
--- /dev/null
+++ b/data/wild/maps/SeafoamIslandsB3F.asm
@@ -0,0 +1,24 @@
+IslandMonsB3:
+ db 10 ; grass encounter rate
+ db 27, GOLBAT
+ db 36, ZUBAT
+ db 29, KRABBY
+ db 27, ZUBAT
+ db 30, KINGLER
+ db 26, SEEL
+ db 31, KRABBY
+ db 30, SEEL
+ db 28, DEWGONG
+ db 32, DEWGONG
+
+ db 5 ; water encounter rate
+ db 25, TENTACOOL
+ db 30, TENTACOOL
+ db 20, TENTACOOL
+ db 30, STARYU
+ db 35, TENTACOOL
+ db 30, STARYU
+ db 40, TENTACOOL
+ db 30, STARYU
+ db 30, STARYU
+ db 30, STARYU
diff --git a/data/wild/maps/SeafoamIslandsB4F.asm b/data/wild/maps/SeafoamIslandsB4F.asm
new file mode 100755
index 00000000..bfeb6821
--- /dev/null
+++ b/data/wild/maps/SeafoamIslandsB4F.asm
@@ -0,0 +1,24 @@
+IslandMonsB4:
+ db 10 ; grass encounter rate
+ db 36, GOLBAT
+ db 36, ZUBAT
+ db 30, KRABBY
+ db 32, KINGLER
+ db 28, SEEL
+ db 32, SEEL
+ db 27, GOLBAT
+ db 45, ZUBAT
+ db 30, DEWGONG
+ db 34, DEWGONG
+
+ db 5 ; water encounter rate
+ db 25, TENTACOOL
+ db 30, TENTACOOL
+ db 20, TENTACOOL
+ db 30, STARYU
+ db 35, TENTACOOL
+ db 30, STARYU
+ db 40, TENTACOOL
+ db 30, STARYU
+ db 30, STARYU
+ db 30, STARYU
diff --git a/data/wild/maps/VictoryRoad1F.asm b/data/wild/maps/VictoryRoad1F.asm
new file mode 100755
index 00000000..bcb16dc8
--- /dev/null
+++ b/data/wild/maps/VictoryRoad1F.asm
@@ -0,0 +1,14 @@
+PlateauMons1:
+ db 15 ; grass encounter rate
+ db 26, GEODUDE
+ db 31, GEODUDE
+ db 36, GEODUDE
+ db 39, ZUBAT
+ db 44, ZUBAT
+ db 41, GEODUDE
+ db 43, ONIX
+ db 45, ONIX
+ db 41, GRAVELER
+ db 47, GRAVELER
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/VictoryRoad2F.asm b/data/wild/maps/VictoryRoad2F.asm
new file mode 100755
index 00000000..89b736cd
--- /dev/null
+++ b/data/wild/maps/VictoryRoad2F.asm
@@ -0,0 +1,14 @@
+PlateauMons2:
+ db 10 ; grass encounter rate
+ db 31, GEODUDE
+ db 36, GEODUDE
+ db 41, GEODUDE
+ db 44, ZUBAT
+ db 39, GOLBAT
+ db 44, GRAVELER
+ db 45, ONIX
+ db 47, ONIX
+ db 39, MACHOKE
+ db 42, MACHOKE
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/VictoryRoad3F.asm b/data/wild/maps/VictoryRoad3F.asm
new file mode 100755
index 00000000..aec2d097
--- /dev/null
+++ b/data/wild/maps/VictoryRoad3F.asm
@@ -0,0 +1,14 @@
+PlateauMons3:
+ db 15 ; grass encounter rate
+ db 36, GEODUDE
+ db 44, GOLBAT
+ db 41, GEODUDE
+ db 49, ONIX
+ db 46, GEODUDE
+ db 41, GRAVELER
+ db 42, MACHOKE
+ db 45, MACHOKE
+ db 47, GRAVELER
+ db 47, GRAVELER
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/ViridianForest.asm b/data/wild/maps/ViridianForest.asm
new file mode 100755
index 00000000..e7b1288f
--- /dev/null
+++ b/data/wild/maps/ViridianForest.asm
@@ -0,0 +1,14 @@
+ForestMons:
+ db 25 ; grass encounter rate
+ db 3, CATERPIE
+ db 4, METAPOD
+ db 4, CATERPIE
+ db 5, CATERPIE
+ db 4, PIDGEY
+ db 6, PIDGEY
+ db 6, CATERPIE
+ db 6, METAPOD
+ db 8, PIDGEY
+ db 9, PIDGEOTTO
+
+ db 0 ; water encounter rate
diff --git a/data/wild/maps/nothing.asm b/data/wild/maps/nothing.asm
new file mode 100755
index 00000000..19570b50
--- /dev/null
+++ b/data/wild/maps/nothing.asm
@@ -0,0 +1,4 @@
+NoMons:
+ db 0 ; grass encounter rate
+
+ db 0 ; water encounter rate
diff --git a/data/wild/probabilities.asm b/data/wild/probabilities.asm
new file mode 100644
index 00000000..2c56c6b9
--- /dev/null
+++ b/data/wild/probabilities.asm
@@ -0,0 +1,15 @@
+WildMonEncounterSlotChances:
+; There are 10 slots for wild pokemon, and this is the table that defines how common each of
+; those 10 slots is. A random number is generated and then the first byte of each pair in this
+; table is compared against that random number. If the random number is less than or equal
+; to the first byte, then that slot is chosen. The second byte is double the slot number.
+ db 50, $00 ; 51/256 = 19.9% chance of slot 0
+ db 101, $02 ; 51/256 = 19.9% chance of slot 1
+ db 140, $04 ; 39/256 = 15.2% chance of slot 2
+ db 165, $06 ; 25/256 = 9.8% chance of slot 3
+ db 190, $08 ; 25/256 = 9.8% chance of slot 4
+ db 215, $0A ; 25/256 = 9.8% chance of slot 5
+ db 228, $0C ; 13/256 = 5.1% chance of slot 6
+ db 241, $0E ; 13/256 = 5.1% chance of slot 7
+ db 252, $10 ; 11/256 = 4.3% chance of slot 8
+ db 255, $12 ; 3/256 = 1.2% chance of slot 9
diff --git a/data/wild/super_rod.asm b/data/wild/super_rod.asm
new file mode 100755
index 00000000..154980cc
--- /dev/null
+++ b/data/wild/super_rod.asm
@@ -0,0 +1,33 @@
+FishingSlots::
+ db PALLET_TOWN, STARYU, 10, TENTACOOL, 10, STARYU, 5, TENTACOOL, 20
+ db VIRIDIAN_CITY, POLIWAG, 5, POLIWAG, 10, POLIWAG, 15, POLIWAG, 10
+ db CERULEAN_CITY, GOLDEEN, 25, GOLDEEN, 30, SEAKING, 30, SEAKING, 40
+ db VERMILION_CITY, TENTACOOL, 15, TENTACOOL, 20, TENTACOOL, 10, HORSEA, 5
+ db CELADON_CITY, GOLDEEN, 5, GOLDEEN, 10, GOLDEEN, 15, GOLDEEN, 20
+ db FUCHSIA_CITY, MAGIKARP, 5, MAGIKARP, 10, MAGIKARP, 15, GYARADOS, 15
+ db CINNABAR_ISLAND, STARYU, 15, TENTACOOL, 15, STARYU, 10, TENTACOOL, 30
+ db ROUTE_4, GOLDEEN, 20, GOLDEEN, 25, GOLDEEN, 30, SEAKING, 30
+ db ROUTE_6, GOLDEEN, 5, GOLDEEN, 10, GOLDEEN, 15, GOLDEEN, 20
+ db ROUTE_24, GOLDEEN, 20, GOLDEEN, 25, GOLDEEN, 30, SEAKING, 30
+ db ROUTE_25, KRABBY, 10, KRABBY, 15, KINGLER, 15, KINGLER, 25
+ db ROUTE_10, KRABBY, 15, KRABBY, 20, HORSEA, 10, KINGLER, 25
+ db ROUTE_11, TENTACOOL, 15, TENTACOOL, 20, TENTACOOL, 10, HORSEA, 5
+ db ROUTE_12, HORSEA, 20, HORSEA, 25, SEADRA, 25, SEADRA, 35
+ db ROUTE_13, HORSEA, 15, HORSEA, 20, TENTACOOL, 10, SEADRA, 20
+ db ROUTE_17, TENTACOOL, 5, TENTACOOL, 15, SHELLDER, 25, SHELLDER, 35
+ db ROUTE_18, TENTACOOL, 15, SHELLDER, 20, SHELLDER, 30, SHELLDER, 40
+ db ROUTE_19, TENTACOOL, 15, STARYU, 20, TENTACOOL, 30, TENTACRUEL, 30
+ db ROUTE_20, TENTACOOL, 20, TENTACRUEL, 20, STARYU, 30, TENTACRUEL, 40
+ db ROUTE_21, TENTACOOL, 15, STARYU, 20, TENTACOOL, 30, TENTACRUEL, 30
+ db ROUTE_22, POLIWAG, 5, POLIWAG, 10, POLIWAG, 15, POLIWHIRL, 15
+ db ROUTE_23, POLIWAG, 25, POLIWAG, 30, POLIWHIRL, 30, POLIWHIRL, 40
+ db VERMILION_DOCK, TENTACOOL, 10, TENTACOOL, 15, STARYU, 15, SHELLDER, 10
+ db SAFARI_ZONE_CENTER, MAGIKARP, 5, MAGIKARP, 10, DRATINI, 10, DRAGONAIR, 15
+ db SAFARI_ZONE_EAST, MAGIKARP, 5, MAGIKARP, 10, MAGIKARP, 15, DRATINI, 15
+ db SAFARI_ZONE_NORTH, MAGIKARP, 5, MAGIKARP, 10, MAGIKARP, 15, DRATINI, 15
+ db SAFARI_ZONE_WEST, MAGIKARP, 5, MAGIKARP, 10, MAGIKARP, 15, DRATINI, 15
+ db SEAFOAM_ISLANDS_B3F, KRABBY, 25, STARYU, 20, KINGLER, 35, STARYU, 40
+ db SEAFOAM_ISLANDS_B4F, KRABBY, 25, STARYU, 20, KINGLER, 35, STARYU, 40
+ db CERULEAN_CAVE_1F, GOLDEEN, 25, SEAKING, 35, SEAKING, 45, SEAKING, 55
+ db CERULEAN_CAVE_B1F, GOLDEEN, 30, SEAKING, 40, SEAKING, 50, SEAKING, 60
+ db -1 ; end
diff --git a/data/wildPokemon/ceruleancave1.asm b/data/wildPokemon/ceruleancave1.asm
deleted file mode 100644
index ff7be04e..00000000
--- a/data/wildPokemon/ceruleancave1.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-DungeonMons1:
- db $0A
- db 50,GOLBAT
- db 55,GOLBAT
- db 45,GRAVELER
- db 55,GLOOM
- db 55,WEEPINBELL
- db 52,SANDSLASH
- db 54,VENOMOTH
- db 54,PARASECT
- db 55,DITTO
- db 60,DITTO
- db $00
-
diff --git a/data/wildPokemon/ceruleancave2.asm b/data/wildPokemon/ceruleancave2.asm
deleted file mode 100644
index 1fd20019..00000000
--- a/data/wildPokemon/ceruleancave2.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-DungeonMons2:
- db $0F
- db 52,GOLBAT
- db 57,GOLBAT
- db 50,GRAVELER
- db 56,SANDSLASH
- db 50,RHYHORN
- db 60,DITTO
- db 58,GLOOM
- db 58,WEEPINBELL
- db 60,RHYDON
- db 58,RHYDON
- db $00
-
diff --git a/data/wildPokemon/ceruleancaveb1.asm b/data/wildPokemon/ceruleancaveb1.asm
deleted file mode 100644
index 5848678f..00000000
--- a/data/wildPokemon/ceruleancaveb1.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-DungeonMonsB1:
- db $19
- db 54,GOLBAT
- db 59,GOLBAT
- db 55,GRAVELER
- db 52,RHYHORN
- db 62,RHYDON
- db 60,DITTO
- db 56,CHANSEY
- db 65,DITTO
- db 55,LICKITUNG
- db 50,LICKITUNG
- db $00
-
diff --git a/data/wildPokemon/diglettscave.asm b/data/wildPokemon/diglettscave.asm
deleted file mode 100755
index 0b8ec1c7..00000000
--- a/data/wildPokemon/diglettscave.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-CaveMons:
- db $14
- db 18,DIGLETT
- db 19,DIGLETT
- db 17,DIGLETT
- db 20,DIGLETT
- db 16,DIGLETT
- db 15,DIGLETT
- db 21,DIGLETT
- db 22,DIGLETT
- db 29,DUGTRIO
- db 31,DUGTRIO
- db $00
-
diff --git a/data/wildPokemon/mansion1.asm b/data/wildPokemon/mansion1.asm
deleted file mode 100755
index 2e5a8f51..00000000
--- a/data/wildPokemon/mansion1.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-MansionMons1:
- db $0A
- db 34,RATTATA
- db 34,RATICATE
- db 23,GRIMER
- db 26,GROWLITHE
- db 37,RATTATA
- db 37,RATICATE
- db 30,GROWLITHE
- db 26,GRIMER
- db 34,GROWLITHE
- db 38,GROWLITHE
- db $00
-
diff --git a/data/wildPokemon/mansion2.asm b/data/wildPokemon/mansion2.asm
deleted file mode 100755
index e830560a..00000000
--- a/data/wildPokemon/mansion2.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-MansionMons2:
- db $0A
- db 37,RATTATA
- db 37,RATICATE
- db 26,GRIMER
- db 29,GRIMER
- db 40,RATTATA
- db 40,RATICATE
- db 32,GRIMER
- db 35,GRIMER
- db 35,MUK
- db 38,MUK
- db $00
-
diff --git a/data/wildPokemon/mansion3.asm b/data/wildPokemon/mansion3.asm
deleted file mode 100755
index cc180e3b..00000000
--- a/data/wildPokemon/mansion3.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-MansionMons3:
- db $0A
- db 40,RATTATA
- db 40,RATICATE
- db 32,GRIMER
- db 35,GRIMER
- db 43,RATTATA
- db 43,RATICATE
- db 38,GRIMER
- db 38,GRIMER
- db 38,MUK
- db 41,MUK
- db $00
-
diff --git a/data/wildPokemon/mansionb1.asm b/data/wildPokemon/mansionb1.asm
deleted file mode 100755
index dcace0d8..00000000
--- a/data/wildPokemon/mansionb1.asm
+++ /dev/null
@@ -1,13 +0,0 @@
-MansionMonsB1:
- db $0A
- db 35,GRIMER
- db 38,GRIMER
- db 37,RATICATE
- db 40,RATICATE
- db 41,MUK
- db 43,RATICATE
- db 24,DITTO
- db 46,RATICATE
- db 18,DITTO
- db 12,DITTO
- db $00
diff --git a/data/wildPokemon/mtmoon1.asm b/data/wildPokemon/mtmoon1.asm
deleted file mode 100755
index 75f19efd..00000000
--- a/data/wildPokemon/mtmoon1.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-MoonMons1:
- db $0A
- db 8,ZUBAT
- db 9,ZUBAT
- db 10,GEODUDE
- db 6,ZUBAT
- db 7,ZUBAT
- db 10,ZUBAT
- db 10,GEODUDE
- db 11,ZUBAT
- db 12,SANDSHREW
- db 11,CLEFAIRY
- db $00
-
diff --git a/data/wildPokemon/mtmoonb1.asm b/data/wildPokemon/mtmoonb1.asm
deleted file mode 100755
index 61c0b05c..00000000
--- a/data/wildPokemon/mtmoonb1.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-MoonMonsB1:
- db $0A
- db 8,ZUBAT
- db 9,ZUBAT
- db 10,ZUBAT
- db 10,GEODUDE
- db 11,GEODUDE
- db 11,ZUBAT
- db 9,PARAS
- db 11,PARAS
- db 10,CLEFAIRY
- db 12,CLEFAIRY
- db $00
-
diff --git a/data/wildPokemon/mtmoonb2.asm b/data/wildPokemon/mtmoonb2.asm
deleted file mode 100755
index 27c76500..00000000
--- a/data/wildPokemon/mtmoonb2.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-MoonMonsB2:
- db $0A
- db 10,ZUBAT
- db 11,GEODUDE
- db 13,PARAS
- db 11,ZUBAT
- db 11,ZUBAT
- db 12,ZUBAT
- db 13,ZUBAT
- db 9,CLEFAIRY
- db 11,CLEFAIRY
- db 13,CLEFAIRY
- db $00
-
diff --git a/data/wildPokemon/nomons.asm b/data/wildPokemon/nomons.asm
deleted file mode 100755
index 895cf2e0..00000000
--- a/data/wildPokemon/nomons.asm
+++ /dev/null
@@ -1,4 +0,0 @@
-NoMons:
- db $00
- db $00
-
diff --git a/data/wildPokemon/pokemontower1.asm b/data/wildPokemon/pokemontower1.asm
deleted file mode 100755
index 4911c790..00000000
--- a/data/wildPokemon/pokemontower1.asm
+++ /dev/null
@@ -1,4 +0,0 @@
-TowerMons1:
- db $00
- db $00
-
diff --git a/data/wildPokemon/pokemontower2.asm b/data/wildPokemon/pokemontower2.asm
deleted file mode 100755
index a849668d..00000000
--- a/data/wildPokemon/pokemontower2.asm
+++ /dev/null
@@ -1,4 +0,0 @@
-TowerMons2:
- db $00
- db $00
-
diff --git a/data/wildPokemon/pokemontower3.asm b/data/wildPokemon/pokemontower3.asm
deleted file mode 100755
index c071c972..00000000
--- a/data/wildPokemon/pokemontower3.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-TowerMons3:
- db $0A
- db 20,GASTLY
- db 21,GASTLY
- db 22,GASTLY
- db 23,GASTLY
- db 24,GASTLY
- db 19,GASTLY
- db 18,GASTLY
- db 25,GASTLY
- db 20,HAUNTER
- db 25,HAUNTER
- db $00
-
diff --git a/data/wildPokemon/pokemontower4.asm b/data/wildPokemon/pokemontower4.asm
deleted file mode 100755
index 35be620e..00000000
--- a/data/wildPokemon/pokemontower4.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-TowerMons4:
- db $0A
- db 20,GASTLY
- db 21,GASTLY
- db 22,GASTLY
- db 23,GASTLY
- db 24,GASTLY
- db 19,GASTLY
- db 18,GASTLY
- db 25,GASTLY
- db 20,HAUNTER
- db 25,HAUNTER
- db $00
-
diff --git a/data/wildPokemon/pokemontower5.asm b/data/wildPokemon/pokemontower5.asm
deleted file mode 100755
index 55fe2e27..00000000
--- a/data/wildPokemon/pokemontower5.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-TowerMons5:
- db $0F
- db 22,GASTLY
- db 23,GASTLY
- db 24,GASTLY
- db 25,GASTLY
- db 26,GASTLY
- db 21,GASTLY
- db 20,CUBONE
- db 27,GASTLY
- db 22,HAUNTER
- db 27,HAUNTER
- db $00
-
diff --git a/data/wildPokemon/pokemontower6.asm b/data/wildPokemon/pokemontower6.asm
deleted file mode 100755
index 6e914c5c..00000000
--- a/data/wildPokemon/pokemontower6.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-TowerMons6:
- db $0F
- db 22,GASTLY
- db 23,GASTLY
- db 24,GASTLY
- db 25,GASTLY
- db 26,GASTLY
- db 21,GASTLY
- db 22,CUBONE
- db 27,GASTLY
- db 22,HAUNTER
- db 27,HAUNTER
- db $00
-
diff --git a/data/wildPokemon/pokemontower7.asm b/data/wildPokemon/pokemontower7.asm
deleted file mode 100755
index 34ca6225..00000000
--- a/data/wildPokemon/pokemontower7.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-TowerMons7:
- db $14
- db 24,GASTLY
- db 25,GASTLY
- db 26,GASTLY
- db 27,GASTLY
- db 28,GASTLY
- db 23,GASTLY
- db 24,CUBONE
- db 29,GASTLY
- db 24,HAUNTER
- db 29,HAUNTER
- db $00
-
diff --git a/data/wildPokemon/powerplant.asm b/data/wildPokemon/powerplant.asm
deleted file mode 100755
index 8a1667a5..00000000
--- a/data/wildPokemon/powerplant.asm
+++ /dev/null
@@ -1,13 +0,0 @@
-PowerPlantMons:
- db $0A
- db 30,MAGNEMITE
- db 35,MAGNEMITE
- db 33,MAGNETON
- db 33,VOLTORB
- db 37,VOLTORB
- db 33,GRIMER
- db 37,GRIMER
- db 38,MAGNETON
- db 33,MUK
- db 37,MUK
- db $00
diff --git a/data/wildPokemon/rocktunnel1.asm b/data/wildPokemon/rocktunnel1.asm
deleted file mode 100755
index 9999490e..00000000
--- a/data/wildPokemon/rocktunnel1.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-TunnelMonsB1:
- db $0F
- db 15,ZUBAT
- db 16,GEODUDE
- db 17,ZUBAT
- db 19,ZUBAT
- db 18,GEODUDE
- db 20,GEODUDE
- db 21,ZUBAT
- db 17,MACHOP
- db 19,MACHOP
- db 21,MACHOP
- db $00
-
diff --git a/data/wildPokemon/rocktunnel2.asm b/data/wildPokemon/rocktunnel2.asm
deleted file mode 100755
index 41111909..00000000
--- a/data/wildPokemon/rocktunnel2.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-TunnelMonsB2:
- db $0F
- db 20,ZUBAT
- db 17,GEODUDE
- db 18,MACHOP
- db 21,ZUBAT
- db 22,ZUBAT
- db 21,GEODUDE
- db 20,MACHOP
- db 14,ONIX
- db 18,ONIX
- db 22,ONIX
- db $00
-
diff --git a/data/wildPokemon/route1.asm b/data/wildPokemon/route1.asm
deleted file mode 100755
index 4b85ba40..00000000
--- a/data/wildPokemon/route1.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route1Mons:
- db $19
- db 3,PIDGEY
- db 4,PIDGEY
- db 2,RATTATA
- db 3,RATTATA
- db 2,PIDGEY
- db 3,PIDGEY
- db 5,PIDGEY
- db 4,RATTATA
- db 6,PIDGEY
- db 7,PIDGEY
- db $00
-
diff --git a/data/wildPokemon/route10.asm b/data/wildPokemon/route10.asm
deleted file mode 100755
index af835c99..00000000
--- a/data/wildPokemon/route10.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route10Mons:
- db $0F
- db 16,MAGNEMITE
- db 18,RATTATA
- db 18,MAGNEMITE
- db 20,MAGNEMITE
- db 17,NIDORAN_M
- db 17,NIDORAN_F
- db 22,MAGNEMITE
- db 20,RATICATE
- db 16,MACHOP
- db 18,MACHOP
- db $00
-
diff --git a/data/wildPokemon/route11.asm b/data/wildPokemon/route11.asm
deleted file mode 100755
index 0b1425c0..00000000
--- a/data/wildPokemon/route11.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route11Mons:
- db $0F
- db 16,PIDGEY
- db 15,RATTATA
- db 18,PIDGEY
- db 15,DROWZEE
- db 17,RATTATA
- db 17,DROWZEE
- db 18,PIDGEOTTO
- db 20,PIDGEOTTO
- db 19,DROWZEE
- db 17,RATICATE
- db $00
-
diff --git a/data/wildPokemon/route12.asm b/data/wildPokemon/route12.asm
deleted file mode 100755
index 6dc3d739..00000000
--- a/data/wildPokemon/route12.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-Route12Mons:
- db $0F
- db 25,ODDISH
- db 25,BELLSPROUT
- db 28,PIDGEY
- db 28,PIDGEOTTO
- db 27,ODDISH
- db 27,BELLSPROUT
- db 29,GLOOM
- db 29,WEEPINBELL
- db 26,FARFETCHD
- db 31,FARFETCHD
-
- db $03
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWBRO
- db 20,SLOWBRO
-
diff --git a/data/wildPokemon/route13.asm b/data/wildPokemon/route13.asm
deleted file mode 100755
index 3b6ca152..00000000
--- a/data/wildPokemon/route13.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-Route13Mons:
- db $0F
- db 25,ODDISH
- db 25,BELLSPROUT
- db 28,PIDGEOTTO
- db 28,PIDGEY
- db 27,ODDISH
- db 27,BELLSPROUT
- db 29,GLOOM
- db 29,WEEPINBELL
- db 26,FARFETCHD
- db 31,FARFETCHD
-
- db $03
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWPOKE
- db 15,SLOWBRO
- db 20,SLOWBRO
-
diff --git a/data/wildPokemon/route14.asm b/data/wildPokemon/route14.asm
deleted file mode 100755
index 9eb0e4c5..00000000
--- a/data/wildPokemon/route14.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route14Mons:
- db $0F
- db 26,ODDISH
- db 26,BELLSPROUT
- db 24,VENONAT
- db 30,PIDGEOTTO
- db 28,ODDISH
- db 28,BELLSPROUT
- db 30,GLOOM
- db 30,WEEPINBELL
- db 27,VENONAT
- db 30,VENOMOTH
- db $00
-
diff --git a/data/wildPokemon/route15.asm b/data/wildPokemon/route15.asm
deleted file mode 100755
index 30d96ed2..00000000
--- a/data/wildPokemon/route15.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route15Mons:
- db $0F
- db 26,ODDISH
- db 26,BELLSPROUT
- db 24,VENONAT
- db 32,PIDGEOTTO
- db 28,ODDISH
- db 28,BELLSPROUT
- db 30,GLOOM
- db 30,WEEPINBELL
- db 27,VENONAT
- db 30,VENOMOTH
- db $00
-
diff --git a/data/wildPokemon/route16.asm b/data/wildPokemon/route16.asm
deleted file mode 100755
index eeefa9ba..00000000
--- a/data/wildPokemon/route16.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route16Mons:
- db $19
- db 22,SPEAROW
- db 22,DODUO
- db 23,RATTATA
- db 24,DODUO
- db 24,RATTATA
- db 26,DODUO
- db 23,SPEAROW
- db 24,FEAROW
- db 25,RATICATE
- db 26,RATICATE
- db $00
-
diff --git a/data/wildPokemon/route17.asm b/data/wildPokemon/route17.asm
deleted file mode 100755
index ce72f376..00000000
--- a/data/wildPokemon/route17.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route17Mons:
- db $19
- db 26,DODUO
- db 27,FEAROW
- db 27,DODUO
- db 28,DODUO
- db 28,PONYTA
- db 30,PONYTA
- db 29,FEAROW
- db 28,DODUO
- db 32,PONYTA
- db 29,DODRIO
- db $00
-
diff --git a/data/wildPokemon/route18.asm b/data/wildPokemon/route18.asm
deleted file mode 100755
index 62ce6c3e..00000000
--- a/data/wildPokemon/route18.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route18Mons:
- db $19
- db 22,SPEAROW
- db 22,DODUO
- db 23,RATTATA
- db 24,DODUO
- db 24,RATTATA
- db 26,DODUO
- db 23,SPEAROW
- db 24,FEAROW
- db 25,RATICATE
- db 26,RATICATE
- db $00
-
diff --git a/data/wildPokemon/route19.asm b/data/wildPokemon/route19.asm
deleted file mode 100644
index 77e1e3ef..00000000
--- a/data/wildPokemon/route19.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-Route19Mons:
- db $00
-
- db $05
- db 5,TENTACOOL
- db 10,TENTACOOL
- db 15,TENTACOOL
- db 5,TENTACOOL
- db 10,TENTACOOL
- db 15,TENTACOOL
- db 20,TENTACOOL
- db 30,TENTACOOL
- db 35,TENTACOOL
- db 40,TENTACOOL
-
diff --git a/data/wildPokemon/route2.asm b/data/wildPokemon/route2.asm
deleted file mode 100755
index 93f3726f..00000000
--- a/data/wildPokemon/route2.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route2Mons:
- db $19
- db 3,RATTATA
- db 3,PIDGEY
- db 4,RATTATA
- db 4,NIDORAN_M
- db 4,NIDORAN_F
- db 5,PIDGEY
- db 6,NIDORAN_M
- db 6,NIDORAN_F
- db 7,PIDGEY
- db 7,PIDGEY
- db $00
-
diff --git a/data/wildPokemon/route21.asm b/data/wildPokemon/route21.asm
deleted file mode 100755
index 11ac7e6b..00000000
--- a/data/wildPokemon/route21.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-Route21Mons:
- db $19
- db 15,PIDGEY
- db 13,RATTATA
- db 13,PIDGEY
- db 11,PIDGEY
- db 17,PIDGEY
- db 15,RATTATA
- db 15,RATICATE
- db 17,PIDGEOTTO
- db 19,PIDGEOTTO
- db 15,PIDGEOTTO
-
- db $05
- db 5,TENTACOOL
- db 10,TENTACOOL
- db 15,TENTACOOL
- db 5,TENTACOOL
- db 10,TENTACOOL
- db 15,TENTACOOL
- db 20,TENTACOOL
- db 30,TENTACOOL
- db 35,TENTACOOL
- db 40,TENTACOOL
-
diff --git a/data/wildPokemon/route22.asm b/data/wildPokemon/route22.asm
deleted file mode 100755
index 39f1f29c..00000000
--- a/data/wildPokemon/route22.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route22Mons:
- db $19
- db 2,NIDORAN_M
- db 2,NIDORAN_F
- db 3,MANKEY
- db 3,RATTATA
- db 4,NIDORAN_M
- db 4,NIDORAN_F
- db 5,MANKEY
- db 2,SPEAROW
- db 4,SPEAROW
- db 6,SPEAROW
- db $00
-
diff --git a/data/wildPokemon/route23.asm b/data/wildPokemon/route23.asm
deleted file mode 100755
index 43de8c2b..00000000
--- a/data/wildPokemon/route23.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route23Mons:
- db $0A
- db 41,NIDORINO
- db 41,NIDORINA
- db 36,MANKEY
- db 44,NIDORINO
- db 44,NIDORINA
- db 40,FEAROW
- db 41,MANKEY
- db 45,FEAROW
- db 41,PRIMEAPE
- db 46,PRIMEAPE
- db $00
-
diff --git a/data/wildPokemon/route24.asm b/data/wildPokemon/route24.asm
deleted file mode 100755
index df4a3bce..00000000
--- a/data/wildPokemon/route24.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route24Mons:
- db $19
- db 12,ODDISH
- db 12,BELLSPROUT
- db 13,PIDGEY
- db 14,ODDISH
- db 14,BELLSPROUT
- db 15,PIDGEY
- db 13,VENONAT
- db 16,VENONAT
- db 17,PIDGEY
- db 17,PIDGEOTTO
- db $00
-
diff --git a/data/wildPokemon/route25.asm b/data/wildPokemon/route25.asm
deleted file mode 100755
index 1546dd74..00000000
--- a/data/wildPokemon/route25.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route25Mons:
- db $0F
- db 12,ODDISH
- db 12,BELLSPROUT
- db 13,PIDGEY
- db 14,ODDISH
- db 14,BELLSPROUT
- db 15,PIDGEY
- db 13,VENONAT
- db 16,VENONAT
- db 17,PIDGEY
- db 17,PIDGEOTTO
- db $00
-
diff --git a/data/wildPokemon/route3.asm b/data/wildPokemon/route3.asm
deleted file mode 100755
index f867fbbf..00000000
--- a/data/wildPokemon/route3.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route3Mons:
- db $14
- db 8,SPEAROW
- db 9,SPEAROW
- db 9,MANKEY
- db 10,SPEAROW
- db 8,SANDSHREW
- db 10,RATTATA
- db 10,SANDSHREW
- db 12,RATTATA
- db 11,SPEAROW
- db 12,SPEAROW
- db $00
-
diff --git a/data/wildPokemon/route4.asm b/data/wildPokemon/route4.asm
deleted file mode 100755
index b62126d8..00000000
--- a/data/wildPokemon/route4.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route4Mons:
- db $14
- db 8,SPEAROW
- db 9,SPEAROW
- db 9,MANKEY
- db 10,SPEAROW
- db 8,SANDSHREW
- db 10,RATTATA
- db 10,SANDSHREW
- db 12,RATTATA
- db 11,SPEAROW
- db 12,SPEAROW
- db $00
-
diff --git a/data/wildPokemon/route5.asm b/data/wildPokemon/route5.asm
deleted file mode 100755
index 1e9703a7..00000000
--- a/data/wildPokemon/route5.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route5Mons:
- db $0F
- db 15,PIDGEY
- db 14,RATTATA
- db 7,ABRA
- db 16,PIDGEY
- db 16,RATTATA
- db 17,PIDGEY
- db 17,PIDGEOTTO
- db 3,JIGGLYPUFF
- db 5,JIGGLYPUFF
- db 7,JIGGLYPUFF
- db $00
-
diff --git a/data/wildPokemon/route6.asm b/data/wildPokemon/route6.asm
deleted file mode 100755
index b84e5029..00000000
--- a/data/wildPokemon/route6.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-Route6Mons:
- db $0F
- db 15,PIDGEY
- db 14,RATTATA
- db 7,ABRA
- db 16,PIDGEY
- db 16,RATTATA
- db 17,PIDGEY
- db 17,PIDGEOTTO
- db 3,JIGGLYPUFF
- db 5,JIGGLYPUFF
- db 7,JIGGLYPUFF
-
- db $03
- db 15,PSYDUCK
- db 15,PSYDUCK
- db 15,PSYDUCK
- db 15,PSYDUCK
- db 15,PSYDUCK
- db 15,PSYDUCK
- db 15,PSYDUCK
- db 15,PSYDUCK
- db 15,GOLDUCK
- db 20,GOLDUCK
-
diff --git a/data/wildPokemon/route7.asm b/data/wildPokemon/route7.asm
deleted file mode 100755
index dad77e69..00000000
--- a/data/wildPokemon/route7.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route7Mons:
- db $0F
- db 20,PIDGEY
- db 22,PIDGEY
- db 20,RATTATA
- db 15,ABRA
- db 19,ABRA
- db 24,PIDGEOTTO
- db 26,ABRA
- db 19,JIGGLYPUFF
- db 24,JIGGLYPUFF
- db 24,JIGGLYPUFF
- db $00
-
diff --git a/data/wildPokemon/route8.asm b/data/wildPokemon/route8.asm
deleted file mode 100755
index 8b47b163..00000000
--- a/data/wildPokemon/route8.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route8Mons:
- db $0F
- db 20,PIDGEY
- db 22,PIDGEY
- db 20,RATTATA
- db 15,ABRA
- db 19,ABRA
- db 24,PIDGEOTTO
- db 19,JIGGLYPUFF
- db 24,JIGGLYPUFF
- db 20,KADABRA
- db 27,KADABRA
- db $00
-
diff --git a/data/wildPokemon/route9.asm b/data/wildPokemon/route9.asm
deleted file mode 100755
index 95f5b451..00000000
--- a/data/wildPokemon/route9.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-Route9Mons:
- db $0F
- db 16,NIDORAN_M
- db 16,NIDORAN_F
- db 18,RATTATA
- db 18,NIDORAN_M
- db 18,NIDORAN_F
- db 17,SPEAROW
- db 18,NIDORINO
- db 18,NIDORINA
- db 20,RATICATE
- db 19,FEAROW
- db $00
-
diff --git a/data/wildPokemon/safarizone1.asm b/data/wildPokemon/safarizone1.asm
deleted file mode 100755
index c8632351..00000000
--- a/data/wildPokemon/safarizone1.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-ZoneMons1:
- db $1E
- db 21,NIDORAN_M
- db 29,NIDORAN_F
- db 22,EXEGGCUTE
- db 21,TAUROS
- db 32,NIDORINA
- db 19,CUBONE
- db 26,EXEGGCUTE
- db 24,MAROWAK
- db 21,CHANSEY
- db 15,SCYTHER
- db $00
-
diff --git a/data/wildPokemon/safarizone2.asm b/data/wildPokemon/safarizone2.asm
deleted file mode 100755
index 1e4a6744..00000000
--- a/data/wildPokemon/safarizone2.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-ZoneMons2:
- db $1E
- db 36,NIDORAN_M
- db 14,NIDORAN_F
- db 20,EXEGGCUTE
- db 25,RHYHORN
- db 23,NIDORINA
- db 28,KANGASKHAN
- db 16,CUBONE
- db 33,KANGASKHAN
- db 25,SCYTHER
- db 15,PINSIR
- db $00
-
diff --git a/data/wildPokemon/safarizone3.asm b/data/wildPokemon/safarizone3.asm
deleted file mode 100755
index 3424f1d7..00000000
--- a/data/wildPokemon/safarizone3.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-ZoneMons3:
- db $1E
- db 29,NIDORAN_M
- db 21,NIDORAN_F
- db 22,EXEGGCUTE
- db 21,TAUROS
- db 32,NIDORINO
- db 19,CUBONE
- db 26,EXEGGCUTE
- db 24,MAROWAK
- db 25,PINSIR
- db 27,TANGELA
- db $00
-
diff --git a/data/wildPokemon/safarizonecenter.asm b/data/wildPokemon/safarizonecenter.asm
deleted file mode 100755
index e563fff2..00000000
--- a/data/wildPokemon/safarizonecenter.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-ZoneMonsCenter:
- db $1E
- db 14,NIDORAN_M
- db 36,NIDORAN_F
- db 24,EXEGGCUTE
- db 20,RHYHORN
- db 23,NIDORINO
- db 27,PARASECT
- db 27,PARAS
- db 32,PARASECT
- db 22,TANGELA
- db 7,CHANSEY
- db $00
-
diff --git a/data/wildPokemon/seafoamisland1.asm b/data/wildPokemon/seafoamisland1.asm
deleted file mode 100755
index f4799c12..00000000
--- a/data/wildPokemon/seafoamisland1.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-IslandMons1:
- db $0F
- db 18,ZUBAT
- db 25,KRABBY
- db 27,KRABBY
- db 27,ZUBAT
- db 36,ZUBAT
- db 28,SLOWPOKE
- db 30,SLOWPOKE
- db 9,ZUBAT
- db 27,GOLBAT
- db 36,GOLBAT
- db $00
-
diff --git a/data/wildPokemon/seafoamislandb1.asm b/data/wildPokemon/seafoamislandb1.asm
deleted file mode 100755
index 2f0f255e..00000000
--- a/data/wildPokemon/seafoamislandb1.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-IslandMonsB1:
- db $0A
- db 27,ZUBAT
- db 26,KRABBY
- db 36,ZUBAT
- db 28,KRABBY
- db 27,GOLBAT
- db 29,SLOWPOKE
- db 18,ZUBAT
- db 28,KINGLER
- db 22,SEEL
- db 26,SEEL
- db $00
-
diff --git a/data/wildPokemon/seafoamislandb2.asm b/data/wildPokemon/seafoamislandb2.asm
deleted file mode 100755
index f3a23b07..00000000
--- a/data/wildPokemon/seafoamislandb2.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-IslandMonsB2:
- db $0A
- db 27,ZUBAT
- db 27,KRABBY
- db 36,ZUBAT
- db 27,GOLBAT
- db 28,KINGLER
- db 24,SEEL
- db 29,KRABBY
- db 36,GOLBAT
- db 31,SLOWPOKE
- db 31,SLOWBRO
- db $00
-
diff --git a/data/wildPokemon/seafoamislandb3.asm b/data/wildPokemon/seafoamislandb3.asm
deleted file mode 100755
index ddf6acd3..00000000
--- a/data/wildPokemon/seafoamislandb3.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-IslandMonsB3:
- db $0A
- db 27,GOLBAT
- db 36,ZUBAT
- db 29,KRABBY
- db 27,ZUBAT
- db 30,KINGLER
- db 26,SEEL
- db 31,KRABBY
- db 30,SEEL
- db 28,DEWGONG
- db 32,DEWGONG
-
- db $05
- db 25,TENTACOOL
- db 30,TENTACOOL
- db 20,TENTACOOL
- db 30,STARYU
- db 35,TENTACOOL
- db 30,STARYU
- db 40,TENTACOOL
- db 30,STARYU
- db 30,STARYU
- db 30,STARYU
-
diff --git a/data/wildPokemon/seafoamislandb4.asm b/data/wildPokemon/seafoamislandb4.asm
deleted file mode 100755
index dd842dda..00000000
--- a/data/wildPokemon/seafoamislandb4.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-IslandMonsB4:
- db $0A
- db 36,GOLBAT
- db 36,ZUBAT
- db 30,KRABBY
- db 32,KINGLER
- db 28,SEEL
- db 32,SEEL
- db 27,GOLBAT
- db 45,ZUBAT
- db 30,DEWGONG
- db 34,DEWGONG
-
- db $05
- db 25,TENTACOOL
- db 30,TENTACOOL
- db 20,TENTACOOL
- db 30,STARYU
- db 35,TENTACOOL
- db 30,STARYU
- db 40,TENTACOOL
- db 30,STARYU
- db 30,STARYU
- db 30,STARYU
-
diff --git a/data/wildPokemon/victoryroad1.asm b/data/wildPokemon/victoryroad1.asm
deleted file mode 100755
index f3e029fa..00000000
--- a/data/wildPokemon/victoryroad1.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-PlateauMons1:
- db $0F
- db 26,GEODUDE
- db 31,GEODUDE
- db 36,GEODUDE
- db 39,ZUBAT
- db 44,ZUBAT
- db 41,GEODUDE
- db 43,ONIX
- db 45,ONIX
- db 41,GRAVELER
- db 47,GRAVELER
- db $00
-
diff --git a/data/wildPokemon/victoryroad2.asm b/data/wildPokemon/victoryroad2.asm
deleted file mode 100755
index fcd910d2..00000000
--- a/data/wildPokemon/victoryroad2.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-PlateauMons2:
- db $0A
- db 31,GEODUDE
- db 36,GEODUDE
- db 41,GEODUDE
- db 44,ZUBAT
- db 39,GOLBAT
- db 44,GRAVELER
- db 45,ONIX
- db 47,ONIX
- db 39,MACHOKE
- db 42,MACHOKE
- db $00
-
diff --git a/data/wildPokemon/victoryroad3.asm b/data/wildPokemon/victoryroad3.asm
deleted file mode 100755
index ed4d773b..00000000
--- a/data/wildPokemon/victoryroad3.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-PlateauMons3:
- db $0F
- db 36,GEODUDE
- db 44,GOLBAT
- db 41,GEODUDE
- db 49,ONIX
- db 46,GEODUDE
- db 41,GRAVELER
- db 42,MACHOKE
- db 45,MACHOKE
- db 47,GRAVELER
- db 47,GRAVELER
- db $00
-
diff --git a/data/wildPokemon/viridianforest.asm b/data/wildPokemon/viridianforest.asm
deleted file mode 100755
index eb4889a7..00000000
--- a/data/wildPokemon/viridianforest.asm
+++ /dev/null
@@ -1,14 +0,0 @@
-ForestMons:
- db $19
- db 3,CATERPIE
- db 4,METAPOD
- db 4,CATERPIE
- db 5,CATERPIE
- db 4,PIDGEY
- db 6,PIDGEY
- db 6,CATERPIE
- db 6,METAPOD
- db 8,PIDGEY
- db 9,PIDGEOTTO
- db $00
-
diff --git a/data/wild_mons.asm b/data/wild_mons.asm
deleted file mode 100755
index ac4a8897..00000000
--- a/data/wild_mons.asm
+++ /dev/null
@@ -1,323 +0,0 @@
-WildDataPointers:
- dw NoMons ; PALLET_TOWN
- dw NoMons ; VIRIDIAN_CITY
- dw NoMons ; PEWTER_CITY
- dw NoMons ; CERULEAN_CITY
- dw NoMons ; LAVENDER_TOWN
- dw NoMons ; VERMILION_CITY
- dw NoMons ; CELADON_CITY
- dw NoMons ; FUCHSIA_CITY
- dw NoMons ; CINNABAR_ISLAND
- dw NoMons ; INDIGO_PLATEAU
- dw NoMons ; SAFFRON_CITY
- dw NoMons ; unused
- dw Route1Mons ; ROUTE_1
- dw Route2Mons ; ROUTE_2
- dw Route3Mons ; ROUTE_3
- dw Route4Mons ; ROUTE_4
- dw Route5Mons ; ROUTE_5
- dw Route6Mons ; ROUTE_6
- dw Route7Mons ; ROUTE_7
- dw Route8Mons ; ROUTE_8
- dw Route9Mons ; ROUTE_9
- dw Route10Mons ; ROUTE_10
- dw Route11Mons ; ROUTE_11
- dw Route12Mons ; ROUTE_12
- dw Route13Mons ; ROUTE_13
- dw Route14Mons ; ROUTE_14
- dw Route15Mons ; ROUTE_15
- dw Route16Mons ; ROUTE_16
- dw Route17Mons ; ROUTE_17
- dw Route18Mons ; ROUTE_18
- dw Route19Mons ; ROUTE_19
- dw Route20Mons ; ROUTE_20
- dw Route21Mons ; ROUTE_21
- dw Route22Mons ; ROUTE_22
- dw Route23Mons ; ROUTE_23
- dw Route24Mons ; ROUTE_24
- dw Route25Mons ; ROUTE_25
- dw NoMons ; REDS_HOUSE_1F
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw ForestMons ; ViridianForest
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw MoonMons1
- dw MoonMonsB1
- dw MoonMonsB2
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw TunnelMonsB1
- dw PowerPlantMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw PlateauMons1
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw TowerMons1
- dw TowerMons2
- dw TowerMons3
- dw TowerMons4
- dw TowerMons5
- dw TowerMons6
- dw TowerMons7
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw IslandMonsB1
- dw IslandMonsB2
- dw IslandMonsB3
- dw IslandMonsB4
- dw NoMons
- dw NoMons
- dw MansionMons1
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw IslandMons1
- dw NoMons
- dw PlateauMons2
- dw NoMons
- dw NoMons
- dw CaveMons
- dw PlateauMons3
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw MansionMons2
- dw MansionMons3
- dw MansionMonsB1
- dw ZoneMons1
- dw ZoneMons2
- dw ZoneMons3
- dw ZoneMonsCenter
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw DungeonMons2
- dw DungeonMonsB1
- dw DungeonMons1
- dw NoMons
- dw NoMons
- dw NoMons
- dw TunnelMonsB2
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw NoMons
- dw $FFFF
-
-; wild pokemon data is divided into two parts.
-; first part: pokemon found in grass
-; second part: pokemon found while surfing
-; each part goes as follows:
- ; if first byte == 00, then
- ; no wild pokemon on this map
- ; if first byte != 00, then
- ; first byte is encounter rate
- ; followed by 20 bytes:
- ; level, species (ten times)
-
-INCLUDE "data/wildPokemon/nomons.asm"
-INCLUDE "data/wildPokemon/route1.asm"
-INCLUDE "data/wildPokemon/route2.asm"
-INCLUDE "data/wildPokemon/route22.asm"
-INCLUDE "data/wildPokemon/viridianforest.asm"
-INCLUDE "data/wildPokemon/route3.asm"
-INCLUDE "data/wildPokemon/mtmoon1.asm"
-INCLUDE "data/wildPokemon/mtmoonb1.asm"
-INCLUDE "data/wildPokemon/mtmoonb2.asm"
-INCLUDE "data/wildPokemon/route4.asm"
-INCLUDE "data/wildPokemon/route24.asm"
-INCLUDE "data/wildPokemon/route25.asm"
-INCLUDE "data/wildPokemon/route9.asm"
-INCLUDE "data/wildPokemon/route5.asm"
-INCLUDE "data/wildPokemon/route6.asm"
-INCLUDE "data/wildPokemon/route11.asm"
-INCLUDE "data/wildPokemon/rocktunnel1.asm"
-INCLUDE "data/wildPokemon/rocktunnel2.asm"
-INCLUDE "data/wildPokemon/route10.asm"
-INCLUDE "data/wildPokemon/route12.asm"
-INCLUDE "data/wildPokemon/route8.asm"
-INCLUDE "data/wildPokemon/route7.asm"
-INCLUDE "data/wildPokemon/pokemontower1.asm"
-INCLUDE "data/wildPokemon/pokemontower2.asm"
-INCLUDE "data/wildPokemon/pokemontower3.asm"
-INCLUDE "data/wildPokemon/pokemontower4.asm"
-INCLUDE "data/wildPokemon/pokemontower5.asm"
-INCLUDE "data/wildPokemon/pokemontower6.asm"
-INCLUDE "data/wildPokemon/pokemontower7.asm"
-INCLUDE "data/wildPokemon/route13.asm"
-INCLUDE "data/wildPokemon/route14.asm"
-INCLUDE "data/wildPokemon/route15.asm"
-INCLUDE "data/wildPokemon/route16.asm"
-INCLUDE "data/wildPokemon/route17.asm"
-INCLUDE "data/wildPokemon/route18.asm"
-INCLUDE "data/wildPokemon/safarizonecenter.asm"
-INCLUDE "data/wildPokemon/safarizone1.asm"
-INCLUDE "data/wildPokemon/safarizone2.asm"
-INCLUDE "data/wildPokemon/safarizone3.asm"
-INCLUDE "data/wildPokemon/route19.asm"
-INCLUDE "data/wildPokemon/route20.asm"
-INCLUDE "data/wildPokemon/seafoamisland1.asm"
-INCLUDE "data/wildPokemon/seafoamislandb1.asm"
-INCLUDE "data/wildPokemon/seafoamislandb2.asm"
-INCLUDE "data/wildPokemon/seafoamislandb3.asm"
-INCLUDE "data/wildPokemon/seafoamislandb4.asm"
-INCLUDE "data/wildPokemon/mansion1.asm"
-INCLUDE "data/wildPokemon/mansion2.asm"
-INCLUDE "data/wildPokemon/mansion3.asm"
-INCLUDE "data/wildPokemon/mansionb1.asm"
-INCLUDE "data/wildPokemon/route21.asm"
-INCLUDE "data/wildPokemon/ceruleancave1.asm"
-INCLUDE "data/wildPokemon/ceruleancave2.asm"
-INCLUDE "data/wildPokemon/ceruleancaveb1.asm"
-INCLUDE "data/wildPokemon/powerplant.asm"
-INCLUDE "data/wildPokemon/route23.asm"
-INCLUDE "data/wildPokemon/victoryroad2.asm"
-INCLUDE "data/wildPokemon/victoryroad3.asm"
-INCLUDE "data/wildPokemon/victoryroad1.asm"
-INCLUDE "data/wildPokemon/diglettscave.asm"
diff --git a/data/yes_no_menu_strings.asm b/data/yes_no_menu_strings.asm
new file mode 100644
index 00000000..db2eeb4c
--- /dev/null
+++ b/data/yes_no_menu_strings.asm
@@ -0,0 +1,44 @@
+two_option_menu: MACRO
+ db \1, \2, \3
+ dw \4
+ENDM
+
+TwoOptionMenuStrings:
+; entries correspond to *_MENU constants
+ ; width, height, blank line before first menu item?, text pointer
+ two_option_menu 4, 3, FALSE, .YesNoMenu
+ two_option_menu 6, 3, FALSE, .NorthWestMenu
+ two_option_menu 6, 3, FALSE, .SouthEastMenu
+ two_option_menu 6, 3, FALSE, .YesNoMenu
+ two_option_menu 6, 3, FALSE, .NorthEastMenu
+ two_option_menu 7, 3, FALSE, .TradeCancelMenu
+ two_option_menu 7, 4, TRUE, .HealCancelMenu
+ two_option_menu 4, 3, FALSE, .NoYesMenu
+
+.NoYesMenu:
+ db "NO"
+ next "YES@"
+
+.YesNoMenu:
+ db "YES"
+ next "NO@"
+
+.NorthWestMenu:
+ db "NORTH"
+ next "WEST@"
+
+.SouthEastMenu:
+ db "SOUTH"
+ next "EAST@"
+
+.NorthEastMenu:
+ db "NORTH"
+ next "EAST@"
+
+.TradeCancelMenu:
+ db "TRADE"
+ next "CANCEL@"
+
+.HealCancelMenu:
+ db "HEAL"
+ next "CANCEL@"
diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md
index a82a52a8..cb4cfc81 100644
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -23,7 +23,7 @@ Fixes are written in the `diff` format. If you've used Git before, this should l
This bug (or feature!) results in all options being shifted left or right if the respective direction is pressed on the same frame the options menu is opened.
The bug also exists in pokegold and pokecrystal.
-**Fix:** Update [engine/menu/options.asm](/engine/menu/options.asm)
+**Fix:** Update [engine/menus/options.asm](/engine/menus/options.asm)
```diff
DisplayOptionMenu_:
diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm
deleted file mode 100755
index 71a98c59..00000000
--- a/engine/HoF_room_pc.asm
+++ /dev/null
@@ -1,323 +0,0 @@
-HallOfFamePC:
- callab AnimateHallOfFame
- call ClearScreen
- ld c, 100
- call DelayFrames
-
- call DisableLCD
- ld a, $a7
- ld [rWX], a
- xor a
- ld [rSCX], a
- ld [rSCY], a
- ld [hSCX], a
- ld [hSCY], a
- ld [hWY], a
- ld [rWY], a
- call CreditsLoadFont
- coord hl, 0, 0
- call FillFourRowsWithBlack
- coord hl, 0, 14
- call FillFourRowsWithBlack
- ld a, %11000000
- ld [rBGP], a
- call UpdateGBCPal_BGP
- call EnableLCD
- call StopAllMusic
- ld hl, vBGMap1
- call CreditsCopyTileMapToVRAM
- ld hl, vBGMap0
- call CreditsCopyTileMapToVRAM
- ld c, BANK(Music_Credits)
- ld a, MUSIC_CREDITS
- call PlayMusic
- ld c, 128
- call DelayFrames
- xor a
- ld [wHoFMonSpecies], a
- ld [wNumCreditsMonsDisplayed], a
- jp Credits
-
-FadeInCreditsText:
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- ld hl, HoFGBPalettes
- ld b, 4
-.loop
- ld a, [hli]
- ld [rBGP], a
- call UpdateGBCPal_BGP
- ld c, 5
- call DelayFrames
- dec b
- jr nz, .loop
- ret
-
-HoFGBPalettes:
- db %11000000
- db %11010000
- db %11100000
- db %11110000
-
-DisplayCreditsMon:
- ld hl, vBGMap1
- call CreditsCopyTileMapToVRAM
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld hl, rLCDC
- set 3, [hl]
- call SaveScreenTilesToBuffer2
- call FillMiddleOfScreenWithWhite
- call GetNextCreditsMon
- ld hl, vBGMap0 + 12
- call CreditsCopyTileMapToVRAM
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- call LoadScreenTilesFromBuffer2DisableBGTransfer
- ld hl, vBGMap0
- call CreditsCopyTileMapToVRAM
- ld a, %11111100 ; make the mon a black silhouette
- ld [rBGP], a
- call UpdateGBCPal_BGP
- ld hl, rLCDC
- res 3, [hl]
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- ld b, 0
- ld c, 10
- call ScrollCreditsMonLeft
- call FillLeftHalfOfScreenWithWhite
- ld c, 10
- call ScrollCreditsMonLeft
- call FillRightHalfOfScreenWithWhite
- ld c, 8
- call ScrollCreditsMonLeft
- ld a, %11000000
- ld [rBGP], a
- call UpdateGBCPal_BGP
- xor a
- ld [hSCX], a
- ret
-
-ScrollCreditsMonLeft:
- ld a, b
- ld [hSCX], a
- add 8
- ld b, a
- call DelayFrame
- dec c
- jr nz, ScrollCreditsMonLeft
- ret
-
-GetNextCreditsMon:
- ld hl, wNumCreditsMonsDisplayed
- ld c, [hl]
- inc [hl]
- ld b, 0
- ld hl, CreditsMons
- add hl, bc
- ld a, [hl]
- ld [wcf91], a
- ld [wd0b5], a
- coord hl, 8, 6
- call GetMonHeader
- call LoadFrontSpriteByMonIndex
- ret
-
-INCLUDE "data/credit_mons.asm"
-
-CreditsCopyTileMapToVRAM:
- ld a, l
- ld [H_AUTOBGTRANSFERDEST], a
- ld a, h
- ld [H_AUTOBGTRANSFERDEST + 1], a
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- jp Delay3
-
-CreditsLoadFont:
- call LoadFontTilePatterns
- ld hl, vChars1
- ld bc, $40 * $10
- call ZeroMemory
-
- call LoadTextBoxTilePatterns
- ld hl, vChars2 + $60 * $10
- ld bc, $10 * $10
- call ZeroMemory
-
- ld hl, vChars2 + $7e * $10
- ld bc, $1 * $10
- ld a, $ff
- call FillMemory
- ret
-
-ZeroMemory:
-; zero bc bytes at hl
- ld [hl], 0
- inc hl
- inc hl
- dec bc
- ld a, b
- or c
- jr nz, ZeroMemory
- ret
-
-FillFourRowsWithBlack:
- ld bc, SCREEN_WIDTH * 4
- ld a, $7e
- jp FillMemory
-
-FillMiddleOfScreenWithWhite:
- coord hl, 0, 4
- ld bc, SCREEN_WIDTH * 10
- ld a, " "
- jp FillMemory
-
-FillLeftHalfOfScreenWithWhite:
- coord hl, 0, 4
- push bc
- call FillHalfOfScreenWithWhite
- pop bc
- ret
-
-FillRightHalfOfScreenWithWhite:
- coord hl, 10, 4
- push bc
- call FillHalfOfScreenWithWhite
- pop bc
- ret
-
-FillHalfOfScreenWithWhite:
- ld b, 10
- ld c, 10
- ld a, " "
-.loop
- push bc
- push hl
-.innerLoop
- ld [hli], a
- dec c
- jr nz, .innerLoop
- pop hl
- ld bc, SCREEN_WIDTH
- add hl, bc
- pop bc
- dec b
- jr nz, .loop
- ret
-
-Credits: ; Roll credits
- ld de, CreditsOrder
- push de
-.nextCreditsScreen
- pop de
- coord hl, 9, 6
- push hl
- call FillMiddleOfScreenWithWhite
- pop hl
-.nextCreditsCommand
- ld a, [de]
- inc de
- push de
- cp $ff
- jr z, .fadeInTextAndShowMon
- cp $fe
- jr z, .showTextAndShowMon
- cp $fd
- jr z, .fadeInText
- cp $fc
- jr z, .showText
- cp $fb
- jr z, .showCopyrightText
- cp $fa
- jr z, .showTheEnd
- call PlaceCreditsText
- pop de
- jr .nextCreditsCommand
-
-.showCopyrightText
- callba LoadCopyrightTiles
- pop de
- jr .nextCreditsCommand
-
-
-.fadeInTextAndShowMon
- call FadeInCreditsText
- ld c, 102
- jr .next1
-
-.showTextAndShowMon
- ld c, 122
-.next1
- call DelayFrames
- call DisplayCreditsMon
- jr .nextCreditsScreen
-
-.fadeInText
- call FadeInCreditsText
- ld c, 132
- jr .next2
-
-.showText
- ld c, 152
-.next2
- call DelayFrames
- jr .nextCreditsScreen
-
-.showTheEnd
- call ShowTheEndGFX
- pop de
- ret
-
-ShowTheEndGFX:
- ld c, 24
- call DelayFrames
- call FillMiddleOfScreenWithWhite
- ld de, TheEndGfx
- ld hl, vChars2 + $600
- lb bc, BANK(TheEndGfx), (TheEndGfxEnd - TheEndGfx) / $10
- call CopyVideoData
- coord hl, 4, 8
- ld de, TheEndTextString
- call PlaceString
- coord hl, 4, 9
- inc de
- call PlaceString
- jp FadeInCreditsText
-
-TheEndTextString:
-; "T H E E N D"
- db $60, " ", $62, " ", $64, " ", $64, " ", $66, " ", $68, "@"
- db $61, " ", $63, " ", $65, " ", $65, " ", $67, " ", $69, "@"
-
-PlaceCreditsText:
- push hl
- push hl
- ld hl, CreditsTextPointers
- ld c, a
- ld b, 0
- add hl, bc
- add hl, bc
- ld e, [hl]
- inc hl
- ld d, [hl]
- pop hl
- ld a, [de]
- inc de
- ld c, a
- ld b, $ff
- add hl, bc
- call PlaceString
- pop hl
- ld bc, SCREEN_WIDTH * 2
- add hl, bc
- ret
-
-INCLUDE "data/credits_order.asm"
-
-INCLUDE "text/credits_text.asm"
-
-TheEndGfx:
- INCBIN "gfx/theend.2bpp"
-TheEndGfxEnd:
diff --git a/engine/add_mon.asm b/engine/add_mon.asm
deleted file mode 100644
index 40b776d4..00000000
--- a/engine/add_mon.asm
+++ /dev/null
@@ -1,522 +0,0 @@
-_AddPartyMon:
-; Adds a new mon to the player's or enemy's party.
-; [wMonDataLocation] is used in an unusual way in this function.
-; If the lower nybble is 0, the mon is added to the player's party, else the enemy's.
-; If the entire value is 0, then the player is allowed to name the mon.
- ld de, wPartyCount
- ld a, [wMonDataLocation]
- and $f
- jr z, .next
- ld de, wEnemyPartyCount
-.next
- ld a, [de]
- inc a
- cp PARTY_LENGTH + 1
- ret nc ; return if the party is already full
- ld [de], a
- ld a, [de]
- ld [hNewPartyLength], a
- add e
- ld e, a
- jr nc, .noCarry
- inc d
-.noCarry
- ld a, [wcf91]
- ld [de], a ; write species of new mon in party list
- inc de
- ld a, $ff ; terminator
- ld [de], a
- ld hl, wPartyMonOT
- ld a, [wMonDataLocation]
- and $f
- jr z, .next2
- ld hl, wEnemyMonOT
-.next2
- ld a, [hNewPartyLength]
- dec a
- call SkipFixedLengthTextEntries
- ld d, h
- ld e, l
- ld hl, wPlayerName
- ld bc, NAME_LENGTH
- call CopyData
- ld a, [wMonDataLocation]
- and a
- jr nz, .skipNaming
- ld hl, wPartyMonNicks
- ld a, [hNewPartyLength]
- dec a
- call SkipFixedLengthTextEntries
- ld a, NAME_MON_SCREEN
- ld [wNamingScreenType], a
- predef AskName
-.skipNaming
- ld hl, wPartyMons
- ld a, [wMonDataLocation]
- and $f
- jr z, .next3
- ld hl, wEnemyMons
-.next3
- ld a, [hNewPartyLength]
- dec a
- ld bc, wPartyMon2 - wPartyMon1
- call AddNTimes
- ld e, l
- ld d, h
- push hl
- ld a, [wcf91]
- ld [wd0b5], a
- call GetMonHeader
- ld hl, wMonHeader
- ld a, [hli]
- ld [de], a ; species
- inc de
- pop hl
- push hl
- ld a, [wMonDataLocation]
- and $f
- ld a, $98 ; set enemy trainer mon IVs to fixed average values
- ld b, $88
- jr nz, .next4
-
-; If the mon is being added to the player's party, update the pokedex.
- ld a, [wcf91]
- ld [wd11e], a
- push de
- predef IndexToPokedex
- pop de
- ld a, [wd11e]
- dec a
- ld c, a
- ld b, FLAG_TEST
- ld hl, wPokedexOwned
- call FlagAction
- ld a, c ; whether the mon was already flagged as owned
- ld [wUnusedD153], a ; not read
- ld a, [wd11e]
- dec a
- ld c, a
- ld b, FLAG_SET
- push bc
- call FlagAction
- pop bc
- ld hl, wPokedexSeen
- call FlagAction
-
- pop hl
- push hl
-
- ld a, [wIsInBattle]
- and a ; is this a wild mon caught in battle?
- jr nz, .copyEnemyMonData
-
-; Not wild.
- call Random ; generate random IVs
- ld b, a
- call Random
-
-.next4
- push bc
- ld bc, wPartyMon1DVs - wPartyMon1
- add hl, bc
- pop bc
- ld [hli], a
- ld [hl], b ; write IVs
- ld bc, (wPartyMon1HPExp - 1) - (wPartyMon1DVs + 1)
- add hl, bc
- ld a, 1
- ld c, a
- xor a
- ld b, a
- call CalcStat ; calc HP stat (set cur Hp to max HP)
- ld a, [H_MULTIPLICAND+1]
- ld [de], a
- inc de
- ld a, [H_MULTIPLICAND+2]
- ld [de], a
- inc de
- xor a
- ld [de], a ; box level
- inc de
- ld [de], a ; status ailments
- inc de
- jr .copyMonTypesAndMoves
-.copyEnemyMonData
- ld bc, wEnemyMon1DVs - wEnemyMon1
- add hl, bc
- ld a, [wEnemyMonDVs] ; copy IVs from cur enemy mon
- ld [hli], a
- ld a, [wEnemyMonDVs + 1]
- ld [hl], a
- ld a, [wEnemyMonHP] ; copy HP from cur enemy mon
- ld [de], a
- inc de
- ld a, [wEnemyMonHP+1]
- ld [de], a
- inc de
- xor a
- ld [de], a ; box level
- inc de
- ld a, [wEnemyMonStatus] ; copy status ailments from cur enemy mon
- ld [de], a
- inc de
-.copyMonTypesAndMoves
- ld hl, wMonHTypes
- ld a, [hli] ; type 1
- ld [de], a
- inc de
- ld a, [hli] ; type 2
- ld [de], a
- inc de
- ld a, [hli] ; catch rate (held item in gen 2)
- ld [de], a
- ld a, [wcf91]
- cp KADABRA
- jr nz, .skipGivingTwistedSpoon
- ld a, $60 ; twistedspoon in gen 2
- ld [de], a
-.skipGivingTwistedSpoon
- ld hl, wMonHMoves
- ld a, [hli]
- inc de
- push de
- ld [de], a
- ld a, [hli]
- inc de
- ld [de], a
- ld a, [hli]
- inc de
- ld [de], a
- ld a, [hli]
- inc de
- ld [de], a
- push de
- dec de
- dec de
- dec de
- xor a
- ld [wLearningMovesFromDayCare], a
- predef WriteMonMoves
- pop de
- ld a, [wPlayerID] ; set trainer ID to player ID
- inc de
- ld [de], a
- ld a, [wPlayerID + 1]
- inc de
- ld [de], a
- push de
- ld a, [wCurEnemyLVL]
- ld d, a
- callab CalcExperience
- pop de
- inc de
- ld a, [hExperience] ; write experience
- ld [de], a
- inc de
- ld a, [hExperience + 1]
- ld [de], a
- inc de
- ld a, [hExperience + 2]
- ld [de], a
- xor a
- ld b, NUM_STATS * 2
-.writeEVsLoop ; set all EVs to 0
- inc de
- ld [de], a
- dec b
- jr nz, .writeEVsLoop
- inc de
- inc de
- pop hl
- call AddPartyMon_WriteMovePP
- inc de
- ld a, [wCurEnemyLVL]
- ld [de], a
- inc de
- ld a, [wIsInBattle]
- dec a
- jr nz, .calcFreshStats
- ld hl, wEnemyMonMaxHP
- ld bc, $a
- call CopyData ; copy stats of cur enemy mon
- pop hl
- jr .done
-.calcFreshStats
- pop hl
- ld bc, wPartyMon1HPExp - 1 - wPartyMon1
- add hl, bc
- ld b, $0
- call CalcStats ; calculate fresh set of stats
-.done
- scf
- ret
-
-LoadMovePPs:
- call GetPredefRegisters
- ; fallthrough
-AddPartyMon_WriteMovePP:
- ld b, NUM_MOVES
-.pploop
- ld a, [hli] ; read move ID
- and a
- jr z, .empty
- dec a
- push hl
- push de
- push bc
- ld hl, Moves
- ld bc, MoveEnd - Moves
- call AddNTimes
- ld de, wcd6d
- ld a, BANK(Moves)
- call FarCopyData
- pop bc
- pop de
- pop hl
- ld a, [wcd6d + 5] ; PP is byte 5 of move data
-.empty
- inc de
- ld [de], a
- dec b
- jr nz, .pploop ; there are still moves to read
- ret
-
-; adds enemy mon [wcf91] (at position [wWhichPokemon] in enemy list) to own party
-; used in the cable club trade center
-_AddEnemyMonToPlayerParty:
- ld hl, wPartyCount
- ld a, [hl]
- cp PARTY_LENGTH
- scf
- ret z ; party full, return failure
- inc a
- ld [hl], a ; add 1 to party members
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [wcf91]
- ld [hli], a ; add mon as last list entry
- ld [hl], $ff ; write new sentinel
- ld hl, wPartyMons
- ld a, [wPartyCount]
- dec a
- ld bc, wPartyMon2 - wPartyMon1
- call AddNTimes
- ld e, l
- ld d, h
- ld hl, wLoadedMon
- call CopyData ; write new mon's data (from wLoadedMon)
- ld hl, wPartyMonOT
- ld a, [wPartyCount]
- dec a
- call SkipFixedLengthTextEntries
- ld d, h
- ld e, l
- ld hl, wEnemyMonOT
- ld a, [wWhichPokemon]
- call SkipFixedLengthTextEntries
- ld bc, NAME_LENGTH
- call CopyData ; write new mon's OT name (from an enemy mon)
- ld hl, wPartyMonNicks
- ld a, [wPartyCount]
- dec a
- call SkipFixedLengthTextEntries
- ld d, h
- ld e, l
- ld hl, wEnemyMonNicks
- ld a, [wWhichPokemon]
- call SkipFixedLengthTextEntries
- ld bc, NAME_LENGTH
- call CopyData ; write new mon's nickname (from an enemy mon)
- ld a, [wcf91]
- ld [wd11e], a
- predef IndexToPokedex
- ld a, [wd11e]
- dec a
- ld c, a
- ld b, FLAG_SET
- ld hl, wPokedexOwned
- push bc
- call FlagAction ; add to owned pokemon
- pop bc
- ld hl, wPokedexSeen
- call FlagAction ; add to seen pokemon
- and a
- ret ; return success
-
-_MoveMon:
- ld a, [wMoveMonType]
- and a ; BOX_TO_PARTY
- jr z, .checkPartyMonSlots
- cp DAYCARE_TO_PARTY
- jr z, .checkPartyMonSlots
- cp PARTY_TO_DAYCARE
- ld hl, wDayCareMon
- jr z, .findMonDataSrc
- ; else it's PARTY_TO_BOX
- ld hl, wNumInBox
- ld a, [hl]
- cp MONS_PER_BOX
- jr nz, .partyOrBoxNotFull
- jr .boxFull
-.checkPartyMonSlots
- ld hl, wPartyCount
- ld a, [hl]
- cp PARTY_LENGTH
- jr nz, .partyOrBoxNotFull
-.boxFull
- scf
- ret
-.partyOrBoxNotFull
- inc a
- ld [hl], a ; increment number of mons in party/box
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [wMoveMonType]
- cp DAYCARE_TO_PARTY
- ld a, [wDayCareMon]
- jr z, .copySpecies
- ld a, [wcf91]
-.copySpecies
- ld [hli], a ; write new mon ID
- ld [hl], $ff ; write new sentinel
-.findMonDataDest
- ld a, [wMoveMonType]
- dec a
- ld hl, wPartyMons
- ld bc, wPartyMon2 - wPartyMon1 ; $2c
- ld a, [wPartyCount]
- jr nz, .addMonOffset
- ; if it's PARTY_TO_BOX
- ld hl, wBoxMons
- ld bc, wBoxMon2 - wBoxMon1 ; $21
- ld a, [wNumInBox]
-.addMonOffset
- dec a
- call AddNTimes
-.findMonDataSrc
- push hl
- ld e, l
- ld d, h
- ld a, [wMoveMonType]
- and a
- ld hl, wBoxMons
- ld bc, wBoxMon2 - wBoxMon1 ; $21
- jr z, .addMonOffset2
- cp DAYCARE_TO_PARTY
- ld hl, wDayCareMon
- jr z, .copyMonData
- ld hl, wPartyMons
- ld bc, wPartyMon2 - wPartyMon1 ; $2c
-.addMonOffset2
- ld a, [wWhichPokemon]
- call AddNTimes
-.copyMonData
- push hl
- push de
- ld bc, wBoxMon2 - wBoxMon1
- call CopyData
- pop de
- pop hl
- ld a, [wMoveMonType]
- and a ; BOX_TO_PARTY
- jr z, .findOTdest
- cp DAYCARE_TO_PARTY
- jr z, .findOTdest
- ld bc, wBoxMon2 - wBoxMon1
- add hl, bc
- ld a, [hl] ; hl = Level
- inc de
- inc de
- inc de
- ld [de], a ; de = BoxLevel
-.findOTdest
- ld a, [wMoveMonType]
- cp PARTY_TO_DAYCARE
- ld de, wDayCareMonOT
- jr z, .findOTsrc
- dec a
- ld hl, wPartyMonOT
- ld a, [wPartyCount]
- jr nz, .addOToffset
- ld hl, wBoxMonOT
- ld a, [wNumInBox]
-.addOToffset
- dec a
- call SkipFixedLengthTextEntries
- ld d, h
- ld e, l
-.findOTsrc
- ld hl, wBoxMonOT
- ld a, [wMoveMonType]
- and a
- jr z, .addOToffset2
- ld hl, wDayCareMonOT
- cp DAYCARE_TO_PARTY
- jr z, .copyOT
- ld hl, wPartyMonOT
-.addOToffset2
- ld a, [wWhichPokemon]
- call SkipFixedLengthTextEntries
-.copyOT
- ld bc, NAME_LENGTH
- call CopyData
- ld a, [wMoveMonType]
-.findNickDest
- cp PARTY_TO_DAYCARE
- ld de, wDayCareMonName
- jr z, .findNickSrc
- dec a
- ld hl, wPartyMonNicks
- ld a, [wPartyCount]
- jr nz, .addNickOffset
- ld hl, wBoxMonNicks
- ld a, [wNumInBox]
-.addNickOffset
- dec a
- call SkipFixedLengthTextEntries
- ld d, h
- ld e, l
-.findNickSrc
- ld hl, wBoxMonNicks
- ld a, [wMoveMonType]
- and a
- jr z, .addNickOffset2
- ld hl, wDayCareMonName
- cp DAYCARE_TO_PARTY
- jr z, .copyNick
- ld hl, wPartyMonNicks
-.addNickOffset2
- ld a, [wWhichPokemon]
- call SkipFixedLengthTextEntries
-.copyNick
- ld bc, NAME_LENGTH
- call CopyData
- pop hl
- ld a, [wMoveMonType]
- cp PARTY_TO_BOX
- jr z, .done
- cp PARTY_TO_DAYCARE
- jr z, .done
- push hl
- srl a
- add $2
- ld [wMonDataLocation], a
- call LoadMonData
- callba CalcLevelFromExperience
- ld a, d
- ld [wCurEnemyLVL], a
- pop hl
- ld bc, wBoxMon2 - wBoxMon1
- add hl, bc
- ld [hli], a
- ld d, h
- ld e, l
- ld bc, -18
- add hl, bc
- ld b, $1
- call CalcStats
-.done
- and a
- ret
diff --git a/engine/bank3c.asm b/engine/bank3c.asm
index 9c0e281f..8eb32837 100644
--- a/engine/bank3c.asm
+++ b/engine/bank3c.asm
@@ -1,9 +1,9 @@
INCLUDE "engine/pikachu_pcm.asm"
INCLUDE "engine/overworld/advance_player_sprite.asm"
-INCLUDE "engine/black_out.asm"
+INCLUDE "engine/events/black_out.asm"
-SetMapSpecificScriptFlagsOnMapReload:
+SetMapSpecificScriptFlagsOnMapReload::
ld a, [wCurMap]
cp VERMILION_GYM ; ??? new thing about verm gym?
jr z, .verm_gym
@@ -65,7 +65,7 @@ BeachHouse_Block:
Func_f0a54:
ret
-LoadUnusedBluesHouseMissableObjectData:
+LoadUnusedBluesHouseMissableObjectData::
; referenced in an unused function
ld hl, .MissableObjectsMaps
.loop
@@ -112,7 +112,7 @@ TryApplyPikachuMovementData:
ret nz
push hl
push bc
- callab GetPikachuFacingDirectionAndReturnToE
+ callfar GetPikachuFacingDirectionAndReturnToE
pop bc
pop hl
ld a, b
@@ -123,12 +123,12 @@ TryApplyPikachuMovementData:
push af
ld a, $ff
ld [wUpdateSpritesEnabled], a
- callab LoadPikachuShadowIntoVRAM
+ callfar LoadPikachuShadowIntoVRAM
pop af
ld [wUpdateSpritesEnabled], a
pop hl
call ApplyPikachuMovementData
- callab RefreshPikachuFollow
+ callfar RefreshPikachuFollow
ret
Pic_f0abf:
@@ -140,7 +140,7 @@ INCBIN "gfx/pikachu/unknown_f0cf4.pic"
GFX_f0d82:
INCBIN "gfx/pikachu/unknown_f0d82.2bpp"
-PokecenterChanseyText:
+PokecenterChanseyText::
ld hl, NurseChanseyText
call PrintText
ld a, CHANSEY
@@ -149,10 +149,10 @@ PokecenterChanseyText:
ret
NurseChanseyText:
- TX_FAR _NurseChanseyText
- db "@"
+ text_far _NurseChanseyText
+ text_end
-INCLUDE "engine/HoF_room_pc.asm"
+INCLUDE "engine/movie/credits.asm"
INCLUDE "scripts/ViridianCity2.asm"
INCLUDE "scripts/VermilionCity2.asm"
INCLUDE "scripts/CeladonCity2.asm"
@@ -173,11 +173,11 @@ INCLUDE "scripts/SafariZoneGate2.asm"
INCLUDE "scripts/CinnabarGym3.asm"
INCLUDE "scripts/MtMoonPokecenter2.asm"
-INCLUDE "data/mapHeaders/BeachHouse.asm"
+INCLUDE "data/maps/headers/BeachHouse.asm"
INCLUDE "scripts/BeachHouse.asm"
BeachHouse_Blocks:
INCBIN "maps/BeachHouse.blk"
-INCLUDE "data/mapObjects/BeachHouse.asm"
+INCLUDE "data/maps/objects/BeachHouse.asm"
INCLUDE "scripts/BeachHouse2.asm"
INCLUDE "scripts/BillsHouse2.asm"
diff --git a/engine/bank3d.asm b/engine/bank3d.asm
index 6d0b3a50..e929e44e 100644
--- a/engine/bank3d.asm
+++ b/engine/bank3d.asm
@@ -4,7 +4,7 @@ INCLUDE "engine/battle/unused_stats_functions.asm"
INCLUDE "engine/battle/scroll_draw_trainer_pic.asm"
StarterPikachuBattleEntranceAnimation:
- coord hl, 0, 5
+ hlcoord 0, 5
ld c, 0
.loop1
inc c
@@ -60,14 +60,14 @@ ModifyPikachuHappiness::
cp PIKAHAPPY_WALKING
jr z, .checkanywhereinparty
push de
- callab IsThisPartymonStarterPikachu_Party
+ callfar IsThisPartymonStarterPikachu_Party
pop de
ret nc
jr .proceed
.checkanywhereinparty
push de
- callab IsStarterPikachuInOurParty
+ callfar IsStarterPikachuInOurParty
pop de
ret nc
@@ -172,9 +172,9 @@ PikachuMoods:
db $6c ; Unknown (d = 10)
db $00 ; Unknown (d = 11)
-RedPicBack: INCBIN "pic/trainer/redb.pic"
-OldManPic: INCBIN "pic/trainer/oldman.pic"
-ProfOakPicBack: INCBIN "pic/ytrainer/prof.oakb.pic"
+RedPicBack: INCBIN "gfx/player/redb.pic"
+OldManPic: INCBIN "gfx/battle/oldman.pic"
+ProfOakPicBack: INCBIN "gfx/battle/prof.oakb.pic"
LoadYellowTitleScreenGFX:
ld hl, PokemonLogoGraphics
@@ -200,35 +200,35 @@ LoadYellowTitleScreenGFX:
ret
TitleScreen_PlacePokemonLogo:
- coord hl, 2, 1
+ hlcoord 2, 1
ld de, TitleScreenPokemonLogoTilemap
lb bc, 7, 16
call Bank3D_CopyBox
ret
TitleScreen_PlacePikaSpeechBubble:
- coord hl, 6, 4
+ hlcoord 6, 4
ld de, TitleScreenPikaBubbleTilemap
lb bc, 4, 7
call Bank3D_CopyBox
- coord hl, 9, 8
+ hlcoord 9, 8
ld [hl], $64
inc hl
ld [hl], $65
ret
TitleScreen_PlacePikachu:
- coord hl, 4, 8
+ hlcoord 4, 8
ld de, TitleScreenPikachuTilemap
lb bc, 9, 12
call Bank3D_CopyBox
- coord hl, 16, 10
+ hlcoord 16, 10
ld [hl], $96
- coord hl, 16, 11
+ hlcoord 16, 11
ld [hl], $9d
- coord hl, 16, 12
+ hlcoord 16, 12
ld [hl], $a7
- coord hl, 16, 13
+ hlcoord 16, 13
ld [hl], $b1
ld hl, TitleScreenPikachuEyesOAMData
ld de, wOAMBuffer
@@ -298,45 +298,45 @@ TitleScreenPikachuTilemap:
db $00, $b9, $ba, $8a, $8a, $8a, $8a, $8a, $8a, $bb, $bc, $00
db $00, $00, $bd, $8a, $8a, $8a, $8a, $8a, $8a, $be, $bf, $00
-PokemonLogoGraphics: INCBIN "gfx/pokemon_logo.2bpp"
+PokemonLogoGraphics: INCBIN "gfx/title/pokemon_logo.2bpp"
PokemonLogoGraphicsEnd:
YellowLogoGraphics: INCBIN "gfx/yellow_titlescreen.2bpp"
YellowLogoGraphicsEnd:
-INCLUDE "engine/menu/link_menu.asm"
+INCLUDE "engine/menus/link_menu.asm"
HandleMenuInputDouble:
xor a
ld [wPartyMenuAnimMonEnabled], a
HandleMenuInputPokemonSelectionDouble:
- ld a, [H_DOWNARROWBLINKCNT1]
+ ldh a, [hDownArrowBlinkCount1]
push af
- ld a, [H_DOWNARROWBLINKCNT2]
+ ldh a, [hDownArrowBlinkCount2]
push af ; save existing values on stack
xor a
- ld [H_DOWNARROWBLINKCNT1], a ; blinking down arrow timing value 1
+ ldh [hDownArrowBlinkCount1], a ; blinking down arrow timing value 1
ld a, $06
- ld [H_DOWNARROWBLINKCNT2], a ; blinking down arrow timing value 2
+ ldh [hDownArrowBlinkCount2], a ; blinking down arrow timing value 2
.loop1
xor a
ld [wAnimCounter], a ; counter for pokemon shaking animation
call .UpdateCursorTile
call JoypadLowSensitivity
- ld a, [hJoy5]
+ ldh a, [hJoy5]
and a ; was a key pressed?
jr nz, .keyPressed
pop af
- ld [H_DOWNARROWBLINKCNT2], a
+ ldh [hDownArrowBlinkCount2], a
pop af
- ld [H_DOWNARROWBLINKCNT1], a ; restore previous values
+ ldh [hDownArrowBlinkCount1], a ; restore previous values
xor a
ld [wMenuWrappingEnabled], a ; disable menu wrapping
ret
.keyPressed
xor a
ld [wCheckFor180DegreeTurn], a
- ld a, [hJoy5]
+ ldh a, [hJoy5]
ld b, a
bit 6, a ; pressed Up key?
jr z, .checkIfDownPressed
@@ -365,7 +365,7 @@ HandleMenuInputPokemonSelectionDouble:
and b ; does the menu care about any of the pressed keys?
jp z, .loop1
.checkIfAButtonOrBButtonPressed
- ld a, [hJoy5]
+ ldh a, [hJoy5]
and A_BUTTON | B_BUTTON
jr z, .skipPlayingSound
.AButtonOrBButtonPressed
@@ -373,17 +373,17 @@ HandleMenuInputPokemonSelectionDouble:
call PlaySound ; play sound
.skipPlayingSound
pop af
- ld [H_DOWNARROWBLINKCNT2], a
+ ldh [hDownArrowBlinkCount2], a
pop af
- ld [H_DOWNARROWBLINKCNT1], a ; restore previous values
- ld a, [hJoy5]
+ ldh [hDownArrowBlinkCount1], a ; restore previous values
+ ldh a, [hJoy5]
ret
.UpdateCursorTile:
ld a, [wTopMenuItemY]
and a
jr z, .asm_f5ac0
- coord hl, 0, 0
+ hlcoord 0, 0
ld bc, SCREEN_WIDTH
.loop
add hl, bc
@@ -439,11 +439,7 @@ INCLUDE "engine/overworld/field_move_messages.asm"
INCLUDE "engine/items/inventory.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"
+INCLUDE "gfx/trainer_card.asm"
ReadSuperRodData:
ld a, [wCurMap]
@@ -485,11 +481,11 @@ GenerateRandomFishingEncounter:
ld d, [hl]
ret
-INCLUDE "data/super_rod.asm"
+INCLUDE "data/wild/super_rod.asm"
INCLUDE "engine/battle/bank3d_battle.asm"
INCLUDE "engine/items/tm_prices.asm"
-INCLUDE "engine/multiply_divide.asm"
-INCLUDE "engine/give_pokemon.asm"
+INCLUDE "engine/math/multiply_divide.asm"
+INCLUDE "engine/events/give_pokemon.asm"
INCLUDE "engine/battle/get_trainer_name.asm"
-INCLUDE "engine/random.asm"
+INCLUDE "engine/math/random.asm"
INCLUDE "engine/predefs.asm"
diff --git a/engine/bank3f.asm b/engine/bank3f.asm
index 23eadbb1..c26e9834 100644
--- a/engine/bank3f.asm
+++ b/engine/bank3f.asm
@@ -1,6 +1,6 @@
-INCLUDE "data/map_songs.asm"
-INCLUDE "data/map_header_pointers.asm"
-INCLUDE "data/map_header_banks.asm"
+INCLUDE "data/maps/songs.asm"
+INCLUDE "data/maps/map_header_pointers.asm"
+INCLUDE "data/maps/map_header_banks.asm"
INCLUDE "engine/pikachu_follow.asm"
INCLUDE "engine/pikachu_status.asm"
INCLUDE "engine/pikachu_emotions.asm"
@@ -16,8 +16,8 @@ SandshrewSprite: INCBIN "gfx/sprites/sandshrew.2bpp"
OddishSprite: INCBIN "gfx/sprites/oddish.2bpp"
BulbasaurSprite: INCBIN "gfx/sprites/bulbasaur.2bpp"
JigglypuffSprite: INCBIN "gfx/sprites/jigglypuff.2bpp"
-Clefairy2Sprite: INCBIN "gfx/sprites/clefairy2.2bpp"
+ClefairySprite: INCBIN "gfx/sprites/clefairy.2bpp"
ChanseySprite: INCBIN "gfx/sprites/chansey.2bpp"
-SurfingPikachuSprite: INCBIN "gfx/sprites/surfing_pikachu.2bpp"
+SurfingPikachuSprite:: INCBIN "gfx/sprites/surfing_pikachu.2bpp"
JessieSprite: INCBIN "gfx/sprites/jessie.2bpp"
JamesSprite: INCBIN "gfx/sprites/james.2bpp"
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm
index de1e67b9..4508dbaa 100755
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -19,11 +19,11 @@ DrawFrameBlock:
ld [wdef5], a
ld a, [wSubAnimTransform]
dec a
- jr z, .flipHorizontalAndVertical ; 1
+ jr z, .flipHorizontalAndVertical ; SUBANIMTYPE_HVFLIP
dec a
- jp z, .flipHorizontalTranslateDown ; 2
+ jp z, .flipHorizontalTranslateDown ; SUBANIMTYPE_HFLIP
dec a
- jr z, .flipBaseCoords ; 3
+ jr z, .flipBaseCoords ; SUBANIMTYPE_COORDFLIP
.noTransformation
ld a, [wBaseCoordY]
add [hl]
@@ -45,7 +45,7 @@ DrawFrameBlock:
ld b, a
ld a, 168
sub b ; flip X base coordinate
-.finishCopying ; finish copying values to OAM (when [wSubAnimTransform] not 1 or 2)
+.finishCopying ; finish copying values to OAM (when subanimation not transformed)
add [hl] ; X offset
ld [de], a ; store X
cp 88
@@ -159,15 +159,15 @@ DrawFrameBlock:
jp nz, .loop ; go back up if there are more tiles to draw
.afterDrawingTiles
ld a, [wFBMode]
- cp 2
+ cp FRAMEBLOCKMODE_02
jr z, .advanceFrameBlockDestAddr; skip delay and don't clean OAM buffer
ld a, [wSubAnimFrameDelay]
ld c, a
call DelayFrames
ld a, [wFBMode]
- cp 3
+ cp FRAMEBLOCKMODE_03
jr z, .advanceFrameBlockDestAddr ; skip cleaning OAM buffer
- cp 4
+ cp FRAMEBLOCKMODE_04
jr z, .done ; skip cleaning OAM buffer and don't advance the frame block destination address
ld a, [wAnimationID]
cp GROWL
@@ -190,7 +190,7 @@ DrawFrameBlock:
PlayAnimation:
xor a
- ld [$FF8B], a ; it looks like nothing reads this
+ ldh [hROMBankTemp], a ; it looks like nothing reads this
ld [wSubAnimTransform], a
ld a, [wAnimationID] ; get animation number
dec a
@@ -204,9 +204,9 @@ PlayAnimation:
ld l, a
.animationLoop
ld a, [hli]
- cp $FF
+ cp -1
jr z, .AnimationOver
- cp $C0 ; is this subanimation or a special effect?
+ cp FIRST_SE_ID ; is this subanimation or a special effect?
jr c, .playSubanimation
.doSpecialEffect
ld c, a
@@ -221,7 +221,7 @@ PlayAnimation:
jr .searchSpecialEffectTableLoop
.foundMatch
ld a, [hli]
- cp $FF ; is there a sound to play?
+ cp NO_MOVE - 1 ; is there a sound to play?
jr z, .skipPlayingSound
ld [wAnimSoundID], a ; store sound
push hl
@@ -268,16 +268,16 @@ PlayAnimation:
ld l, c
ld h, b
push hl
- ld a, [rOBP0]
+ ldh a, [rOBP0]
push af
ld a, [wAnimPalette]
- ld [rOBP0], a
+ ldh [rOBP0], a
call UpdateGBCPal_OBP0
call LoadAnimationTileset
call LoadSubanimation
call PlaySubanimation
pop af
- ld [rOBP0], a
+ ldh [rOBP0], a
call UpdateGBCPal_OBP0
.nextAnimationCommand
pop hl
@@ -296,11 +296,11 @@ LoadSubanimation:
ld d, a ; de = address of subanimation
ld a, [de]
ld b, a
- and 31
+ and %00011111
ld [wSubAnimCounter], a ; number of frame blocks
ld a, b
and %11100000
- cp 5 << 5 ; is subanimation type 5?
+ cp SUBANIMTYPE_ENEMY << 5
jr nz, .isNotType5
.isType5
call GetSubanimationTransform2
@@ -312,7 +312,7 @@ LoadSubanimation:
srl a
swap a
ld [wSubAnimTransform], a
- cp 4 ; is the animation reversed?
+ cp SUBANIMTYPE_REVERSE
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
@@ -332,27 +332,27 @@ LoadSubanimation:
ld [wSubAnimSubEntryAddr + 1], a
ret
-; called if the subanimation type is not 5
-; sets the transform to 0 (i.e. no transform) if it's the player's turn
+; called if the subanimation type is not SUBANIMTYPE_ENEMY
+; sets the transform to SUBANIMTYPE_NORMAL if it's the player's turn
; sets the transform to the subanimation type if it's the enemy's turn
GetSubanimationTransform1:
ld b, a
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ld a, b
ret nz
- xor a
+ xor a ; SUBANIMTYPE_NORMAL << 5
ret
-; called if the subanimation type is 5
-; sets the transform to 2 (i.e. horizontal and vertical flip) if it's the player's turn
-; sets the transform to 0 (i.e. no transform) if it's the enemy's turn
+; called if the subanimation type is SUBANIMTYPE_ENEMY
+; sets the transform to SUBANIMTYPE_HFLIP if it's the player's turn
+; sets the transform to SUBANIMTYPE_NORMAL if it's the enemy's turn
GetSubanimationTransform2:
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
- ld a, 2 << 5
+ ld a, SUBANIMTYPE_HFLIP << 5
ret z
- xor a
+ xor a ; SUBANIMTYPE_NORMAL << 5
ret
; loads tile patterns for battle animations
@@ -370,33 +370,33 @@ LoadAnimationTileset:
ld e, a
ld a, [hl]
ld d, a ; de = address of tileset
- ld hl, vSprites + $310
+ ld hl, vSprites tile $31
ld b, BANK(AnimationTileset1) ; ROM bank
ld a, [wTempTilesetNumTiles]
ld c, a ; number of tiles
jp CopyVideoData ; load tileset
-AnimationTilesetPointers:
- db 79 ; number of tiles
- dw AnimationTileset1
- db $FF
-
- db 79 ; number of tiles
- dw AnimationTileset2
- db $FF
+anim_tileset: MACRO
+ db \1
+ dw \2
+ db -1 ; padding
+ENDM
- db 64 ; number of tiles
- dw AnimationTileset1
- db $FF
+AnimationTilesetPointers:
+ ; number of tiles, gfx pointer
+ anim_tileset 79, AnimationTileset1
+ anim_tileset 79, AnimationTileset2
+ anim_tileset 64, AnimationTileset1
AnimationTileset1:
- INCBIN "gfx/attack_anim_1.2bpp"
+ INCBIN "gfx/battle/attack_anim_1.2bpp"
AnimationTileset2:
- INCBIN "gfx/attack_anim_2.2bpp"
+ INCBIN "gfx/battle/attack_anim_2.2bpp"
SlotMachineTiles2:
- INCBIN "gfx/slotmachine2.2bpp"
+ INCBIN "gfx/slots/slots_2.2bpp"
+SlotMachineTiles2End:
MoveAnimation:
push hl
@@ -435,7 +435,7 @@ MoveAnimation:
ld [wSubAnimSubEntryAddr], a
ld [wUnusedD09B], a
ld [wSubAnimTransform], a
- dec a
+ dec a ; NO_MOVE - 1
ld [wAnimSoundID], a
pop af
pop bc
@@ -445,11 +445,11 @@ MoveAnimation:
ShareMoveAnimations:
; some moves just reuse animations from status conditions
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ret z
- ; opponent’s turn
+ ; opponent's turn
ld a, [wAnimationID]
@@ -484,10 +484,10 @@ PlayApplyingAttackAnimation:
jp hl
AnimationTypePointerTable:
- dw ShakeScreenVertically ; enemy mon has used a damaging move without a side effect
+ dw ShakeScreenVertically ; enemy mon has used a damaging move without a side effect
dw ShakeScreenHorizontallyHeavy ; enemy mon has used a damaging move with a side effect
- dw ShakeScreenHorizontallySlow ; enemy mon has used a non-damaging move
- dw BlinkEnemyMonSprite ; player mon has used a damaging move without a side effect
+ dw ShakeScreenHorizontallySlow ; enemy mon has used a non-damaging move
+ dw BlinkEnemyMonSprite ; player mon has used a damaging move without a side effect
dw ShakeScreenHorizontallyLight ; player mon has used a damaging move with a side effect
dw ShakeScreenHorizontallySlow2 ; player mon has used a non-damaging move
@@ -521,18 +521,18 @@ AnimationShakeScreenHorizontallySlow:
push bc
push bc
.loop1
- ld a, [rWX]
+ ldh a, [rWX]
inc a
- ld [rWX], a
+ ldh [rWX], a
ld c, 2
call DelayFrames
dec b
jr nz, .loop1
pop bc
.loop2
- ld a, [rWX]
+ ldh a, [rWX]
dec a
- ld [rWX], a
+ ldh [rWX], a
ld c, 2
call DelayFrames
dec b
@@ -558,18 +558,18 @@ SetAnimationPalette:
ld b, $f0
.next
ld a, b
- ld [rOBP0], a
+ ldh [rOBP0], a
ld a, $6c
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
ret
.notSGB
ld a, $e4
ld [wAnimPalette], a
- ld [rOBP0], a
+ ldh [rOBP0], a
ld a, $6c
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
ret
@@ -577,13 +577,13 @@ SetAnimationPalette:
Func_78e98:
call SaveScreenTilesToBuffer2
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call ClearScreen
ld h, vBGMap0 / $100
call WriteLowerByteOfBGMapAndEnableBGTransfer
call Delay3
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call LoadScreenTilesFromBuffer2
ld h, vBGMap1 / $100
@@ -591,12 +591,12 @@ WriteLowerByteOfBGMapAndEnableBGTransfer:
ld l, vBGMap0 & $ff
call BattleAnimCopyTileMapToVRAM
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ret
PlaySubanimation:
ld a, [wAnimSoundID]
- cp $FF
+ cp NO_MOVE - 1
jr z, .skipPlayingSound
call GetMoveSound
call PlaySound
@@ -648,7 +648,7 @@ PlaySubanimation:
ld a, [wSubAnimSubEntryAddr]
ld l, a
ld a, [wSubAnimTransform]
- cp 4 ; is the animation reversed?
+ cp SUBANIMTYPE_REVERSE
ld bc, 3
jr nz, .nextSubanimationSubentry
ld bc, -3
@@ -697,90 +697,16 @@ DoSpecialEffectByAnimationId:
pop hl
ret
-; Format: Animation ID (1 byte), Address (2 bytes)
-AnimationIdSpecialEffects:
- db MEGA_PUNCH
- dw AnimationFlashScreen
-
- db GUILLOTINE
- dw AnimationFlashScreen
-
- db MEGA_KICK
- dw AnimationFlashScreen
-
- db HEADBUTT
- dw AnimationFlashScreen
-
- db TAIL_WHIP
- dw TailWhipAnimationUnused
-
- db GROWL
- dw DoGrowlSpecialEffects
-
- db DISABLE
- dw AnimationFlashScreen
-
- db BLIZZARD
- dw DoBlizzardSpecialEffects
-
- db BUBBLEBEAM
- dw AnimationFlashScreen
-
- db HYPER_BEAM
- dw FlashScreenEveryFourFrameBlocks
-
- db THUNDERBOLT
- dw FlashScreenEveryEightFrameBlocks
-
- db REFLECT
- dw AnimationFlashScreen
-
- db SELFDESTRUCT
- dw DoExplodeSpecialEffects
-
- db SPORE
- dw FlashScreenEveryFourFrameBlocks
-
- db EXPLOSION
- dw DoExplodeSpecialEffects
-
- db ROCK_SLIDE
- dw DoRockSlideSpecialEffects
-
- db TRADE_BALL_DROP_ANIM
- dw TradeHidePokemon
-
- db TRADE_BALL_SHAKE_ANIM
- dw TradeShakePokeball
-
- db TRADE_BALL_TILT_ANIM
- dw TradeJumpPokeball
-
- db TOSS_ANIM
- dw DoBallTossSpecialEffects
-
- db SHAKE_ANIM
- dw DoBallShakeSpecialEffects
-
- db POOF_ANIM
- dw DoPoofSpecialEffects
-
- db GREATTOSS_ANIM
- dw DoBallTossSpecialEffects
-
- db ULTRATOSS_ANIM
- dw DoBallTossSpecialEffects
-
- db $FF ; terminator
+INCLUDE "data/battle_anims/special_effects.asm"
DoBallTossSpecialEffects:
ld a, [wcf91]
cp 3 ; is it a Master Ball or Ultra Ball?
jr nc, .skipFlashingEffect
.flashingEffect ; do a flashing effect if it's Master Ball or Ultra Ball
- ld a, [rOBP0]
+ ldh a, [rOBP0]
xor %00111100 ; complement colors 1 and 2
- ld [rOBP0], a
+ ldh [rOBP0], a
call UpdateGBCPal_OBP0
.skipFlashingEffect
ld a, [wSubAnimCounter]
@@ -805,7 +731,7 @@ DoBallTossSpecialEffects:
cp 1
ret nz
.moveGhostMarowakLeft
- coord hl, 17, 0
+ hlcoord 17, 0
ld de, 20
lb bc, 7, 7
.loop
@@ -818,7 +744,7 @@ DoBallTossSpecialEffects:
dec b
jr nz, .loop
ld a, %00001000
- ld [rNR10], a ; Channel 1 sweep register
+ ldh [rNR10], a ; Channel 1 sweep register
ret
.isTrainerBattle ; if it's a trainer battle, shorten the animation by one frame
ld a, [wSubAnimCounter]
@@ -904,7 +830,7 @@ DoExplodeSpecialEffects:
cp 1 ; is it the end of the subanimation?
jr nz, FlashScreenEveryFourFrameBlocks
; if it's the end of the subanimation, make the attacking pokemon disappear
- coord hl, 1, 5
+ hlcoord 1, 5
jp AnimationHideMonPic ; make pokemon disappear
; flashes the screen when subanimation counter is 1 modulo 4
@@ -972,7 +898,7 @@ TradeShakePokeball:
BallMoveDistances1:
db -12, -12, -8
- db $ff ; terminator
+ db -1 ; end
; function to make the pokeball jump up
TradeJumpPokeball:
@@ -1005,15 +931,15 @@ TradeJumpPokeball:
ld c, 5
call DelayFrames
pop bc
- ld a, [hSCX] ; background scroll X
+ ldh a, [hSCX] ; background scroll X
sub 8 ; scroll to the left
- ld [hSCX], a
+ ldh [hSCX], a
pop de
jr .loop
BallMoveDistances2:
db 11, 12, -12, -7, 7, 12, -8, 8
- db $ff ; terminator
+ db -1 ; end
; this function copies the current musical note graphic
; so that there are two musical notes flying towards the defending pokemon
@@ -1034,87 +960,7 @@ TailWhipAnimationUnused:
ld c, 20
jp DelayFrames
-; Format: Special Effect ID (1 byte), Address (2 bytes)
-SpecialEffectPointers:
- db SE_DARK_SCREEN_FLASH ; $FE
- dw AnimationFlashScreen
- db SE_DARK_SCREEN_PALETTE ; $FD
- dw AnimationDarkScreenPalette
- db SE_RESET_SCREEN_PALETTE ; $FC
- dw AnimationResetScreenPalette
- db SE_SHAKE_SCREEN ; $FB
- dw AnimationShakeScreen
- db SE_WATER_DROPLETS_EVERYWHERE ; $FA
- dw AnimationWaterDropletsEverywhere
- db SE_DARKEN_MON_PALETTE ; $F9
- dw AnimationDarkenMonPalette
- db SE_FLASH_SCREEN_LONG ; $F8
- dw AnimationFlashScreenLong
- db SE_SLIDE_MON_UP ; $F7
- dw AnimationSlideMonUp
- db SE_SLIDE_MON_DOWN ; $F6
- dw AnimationSlideMonDown
- db SE_FLASH_MON_PIC ; $F5
- dw AnimationFlashMonPic
- db SE_SLIDE_MON_OFF ; $F4
- dw AnimationSlideMonOff
- db SE_BLINK_MON ; $F3
- dw AnimationBlinkMon
- db SE_MOVE_MON_HORIZONTALLY ; $F2
- dw AnimationMoveMonHorizontally
- db SE_RESET_MON_POSITION ; $F1
- dw AnimationResetMonPosition
- db SE_LIGHT_SCREEN_PALETTE ; $F0
- dw AnimationLightScreenPalette
- db SE_HIDE_MON_PIC ; $EF
- dw AnimationHideMonPic
- db SE_SQUISH_MON_PIC ; $EE
- dw AnimationSquishMonPic
- db SE_SHOOT_BALLS_UPWARD ; $ED
- dw AnimationShootBallsUpward
- db SE_SHOOT_MANY_BALLS_UPWARD ; $EC
- dw AnimationShootManyBallsUpward
- db SE_BOUNCE_UP_AND_DOWN ; $EB
- dw AnimationBoundUpAndDown
- db SE_MINIMIZE_MON ; $EA
- dw AnimationMinimizeMon
- db SE_SLIDE_MON_DOWN_AND_HIDE ; $E9
- dw AnimationSlideMonDownAndHide
- db SE_TRANSFORM_MON ; $E8
- dw AnimationTransformMon
- db SE_LEAVES_FALLING ; $E7
- dw AnimationLeavesFalling
- db SE_PETALS_FALLING ; $E6
- dw AnimationPetalsFalling
- db SE_SLIDE_MON_HALF_OFF ; $E5
- dw AnimationSlideMonHalfOff
- db SE_SHAKE_ENEMY_HUD ; $E4
- dw AnimationShakeEnemyHUD
- db SE_SHAKE_ENEMY_HUD_2 ; unused--same pointer as SE_SHAKE_ENEMY_HUD ($E4)
- dw AnimationShakeEnemyHUD
- db SE_SPIRAL_BALLS_INWARD ; $E2
- dw AnimationSpiralBallsInward
- db SE_DELAY_ANIMATION_10 ; $E1
- dw AnimationDelay10
- db SE_FLASH_ENEMY_MON_PIC ; unused--same as SE_FLASH_MON_PIC ($F5), but for the enemy mon
- dw AnimationFlashEnemyMonPic
- db SE_HIDE_ENEMY_MON_PIC ; $DF
- dw AnimationHideEnemyMonPic
- db SE_BLINK_ENEMY_MON ; $DE
- dw AnimationBlinkEnemyMon
- db SE_SHOW_MON_PIC ; $DD
- dw AnimationShowMonPic
- db SE_SHOW_ENEMY_MON_PIC ; $DC
- dw AnimationShowEnemyMonPic
- db SE_SLIDE_ENEMY_MON_OFF ; $DB
- dw AnimationSlideEnemyMonOff
- db SE_SHAKE_BACK_AND_FORTH ; $DA
- dw AnimationShakeBackAndForth
- db SE_SUBSTITUTE_MON ; $D9
- dw AnimationSubstitute
- db SE_WAVY_SCREEN ; $D8
- dw AnimationWavyScreen
- db $FF
+INCLUDE "data/battle_anims/special_effect_pointers.asm"
AnimationDelay10:
ld c, 10
@@ -1123,16 +969,16 @@ AnimationDelay10:
; calls a function with the turn flipped from player to enemy or vice versa
; input - hl - address of function to call
CallWithTurnFlipped:
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
push af
xor 1
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
ld de, .returnAddress
push de
jp hl
.returnAddress
pop af
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
ret
; flashes the screen for an extended period (48 frames)
@@ -1150,7 +996,7 @@ AnimationFlashScreenLong:
ld a, [hli]
cp $01 ; is it the end of the palettes?
jr z, .endOfPalettes
- ld [rBGP], a
+ ldh [rBGP], a
call UpdateGBCPal_BGP
call FlashScreenLongDelay
jr .innerLoop
@@ -1210,20 +1056,20 @@ FlashScreenLongDelay:
jp DelayFrames
AnimationFlashScreen:
- ld a, [rBGP]
+ ldh a, [rBGP]
push af ; save initial palette
ld a, %00011011 ; 0, 1, 2, 3 (inverted colors)
- ld [rBGP], a
+ ldh [rBGP], a
call UpdateGBCPal_BGP
ld c, 2
call DelayFrames
xor a ; white out background
- ld [rBGP], a
+ ldh [rBGP], a
call UpdateGBCPal_BGP
ld c, 2
call DelayFrames
pop af
- ld [rBGP], a ; restore initial palette
+ ldh [rBGP], a ; restore initial palette
call UpdateGBCPal_BGP
ret
@@ -1269,7 +1115,7 @@ SetAnimationBGPalette:
jr z, .next
ld a, c
.next
- ld [rBGP], a
+ ldh [rBGP], a
call UpdateGBCPal_BGP
ret
@@ -1356,14 +1202,14 @@ _AnimationWaterDroplets:
AnimationSlideMonUp:
; Slides the mon's sprite upwards.
ld c, 7
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
- coord hl, 1, 6
- coord de, 1, 5
+ hlcoord 1, 6
+ decoord 1, 5
ld a, $30
jr z, .next
- coord hl, 12, 1
- coord de, 12, 0
+ hlcoord 12, 1
+ decoord 12, 0
ld a, $ff
.next
ld [wSlideMonUpBottomRowLeftTile], a
@@ -1371,7 +1217,7 @@ AnimationSlideMonUp:
AnimationSlideMonDown:
; Slides the mon's sprite down out of the screen.
- xor a
+ xor a ; TILEMAP_MON_PIC
call GetTileIDList
.loop
call GetMonSpriteTileMapPointerFromRowCount
@@ -1424,11 +1270,11 @@ _AnimationSlideMonUp:
jr nz, .slideLoop
; Fill in the bottom row of the mon pic with the next row's tile IDs.
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
- coord hl, 1, 11
+ hlcoord 1, 11
jr z, .next
- coord hl, 12, 6
+ hlcoord 12, 6
.next
ld a, [wSlideMonUpBottomRowLeftTile]
inc a
@@ -1592,7 +1438,7 @@ AnimationFlashEnemyMonPic:
jp CallWithTurnFlipped
AnimationShowMonPic:
- xor a
+ xor a ; TILEMAP_MON_PIC
call GetTileIDList
call GetMonSpriteTileMapPointerFromRowCount
call CopyPicTiles
@@ -1607,16 +1453,16 @@ AnimationShowEnemyMonPic:
AnimationShakeBackAndForth:
; Shakes the mon's sprite back and forth rapidly. This is used in Double Team.
; The mon's sprite disappears after this animation.
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
- coord hl, 0, 5
- coord de, 2, 5
+ hlcoord 0, 5
+ decoord 2, 5
jr z, .next
- coord hl, 11, 0
- coord de, 13, 0
+ hlcoord 11, 0
+ decoord 13, 0
.next
- xor a
+ xor a ; TILEMAP_MON_PIC
ld c, $10
.loop
push af
@@ -1655,13 +1501,13 @@ AnimationMoveMonHorizontally:
; Shifts the mon's sprite horizontally to a fixed location. Used by lots of
; animations like Tackle/Body Slam.
call AnimationHideMonPic
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
- coord hl, 2, 5
+ hlcoord 2, 5
jr z, .next
- coord hl, 11, 0
+ hlcoord 11, 0
.next
- xor a
+ xor a ; TILEMAP_MON_PIC
push hl
call GetTileIDList
pop hl
@@ -1671,7 +1517,7 @@ AnimationMoveMonHorizontally:
AnimationResetMonPosition:
; Resets the mon's sprites to be located at the normal coordinates.
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ld a, 5 * SCREEN_WIDTH + 2
jr z, .next
@@ -1683,7 +1529,7 @@ AnimationResetMonPosition:
AnimationSpiralBallsInward:
; Creates an effect that looks like energy balls spiralling into the
; player mon's sprite. Used in Focus Energy, for example.
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playerTurn
ld a, -40
@@ -1772,7 +1618,7 @@ SpiralBallAnimationCoordinates:
db $58, $28
db $50, $30
db $50, $28
- db $FF ; list terminator
+ db -1 ; end
AnimationSquishMonPic:
; Squishes the mon's sprite horizontally making it
@@ -1780,15 +1626,15 @@ AnimationSquishMonPic:
ld c, 4
.loop
push bc
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playerTurn
- coord hl, 16, 0
- coord de, 14, 0
+ hlcoord 16, 0
+ decoord 14, 0
jr .next
.playerTurn
- coord hl, 5, 5
- coord de, 3, 5
+ hlcoord 5, 5
+ decoord 3, 5
.next
push de
xor a ; left
@@ -1833,7 +1679,7 @@ _AnimationSquishMonPic:
AnimationShootBallsUpward:
; Shoots one pillar of "energy" balls upwards. Used in Teleport/Sky Attack
; animations.
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playerTurn
lb bc, 0, 16 * 8
@@ -1901,7 +1747,7 @@ _AnimationShootBallsUpward:
AnimationShootManyBallsUpward:
; Shoots several pillars of "energy" balls upward.
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ld hl, UpwardBallsAnimXCoordinatesPlayerTurn
ld a, $50 ; y coordinate for "energy" ball pillar
@@ -1927,13 +1773,13 @@ UpwardBallsAnimXCoordinatesPlayerTurn:
; List of x coordinates for each pillar of "energy" balls in the
; AnimationShootManyBallsUpward animation. It's unused in the game.
db $10, $40, $28, $18, $38, $30
- db $FF ; list terminator
+ db -1 ; end
UpwardBallsAnimXCoordinatesEnemyTurn:
; List of x coordinates for each pillar of "energy" balls in the
; AnimationShootManyBallsUpward animation. It's unused in the game.
db $60, $90, $78, $68, $88, $80
- db $FF ; list terminator
+ db -1 ; end
AnimationMinimizeMon:
; Changes the mon's sprite to a mini black sprite. Used by the
@@ -1960,13 +1806,13 @@ AnimationMinimizeMon:
jp AnimationShowMonPic
MinimizedMonSprite:
- INCBIN "gfx/minimized_mon_sprite.1bpp"
+ INCBIN "gfx/battle/minimize.1bpp"
MinimizedMonSpriteEnd:
AnimationSlideMonDownAndHide:
; Slides the mon's sprite down and disappears. Used in Acid Armor.
- ld a, $1
- ld c, $2
+ ld a, TILEMAP_SLIDE_DOWN_MON_PIC_7X5
+ ld c, 2
.loop
push bc
push af
@@ -1985,7 +1831,7 @@ AnimationSlideMonDownAndHide:
jr nz, .loop
call AnimationHideMonPic
ld hl, wTempPic
- ld bc, $0310
+ ld bc, 7 * 7 tiles
xor a
call FillMemory
jp CopyTempPicToMonPic
@@ -1993,13 +1839,13 @@ AnimationSlideMonDownAndHide:
_AnimationSlideMonOff:
; Slides the mon's sprite off the screen horizontally by e tiles and waits
; [wSlideMonDelay] V-blanks each time the pic is slid by one tile.
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playerTurn
- coord hl, 12, 0
+ hlcoord 12, 0
jr .next
.playerTurn
- coord hl, 0, 5
+ hlcoord 0, 5
.next
ld d, 8 ; d's value is unused
.slideLoop ; iterates once for each time the pic slides by one tile
@@ -2008,7 +1854,7 @@ _AnimationSlideMonOff:
.rowLoop ; iterates once for each row
ld c, 8
.tileLoop ; iterates once for each tile in the row
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playerTurn2
call .EnemyNextTile
@@ -2069,7 +1915,7 @@ AnimationSlideMonHalfOff:
jp Delay3
CopyTempPicToMonPic:
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ld hl, vBackPic ; player turn
jr z, .next
@@ -2085,18 +1931,18 @@ AnimationWavyScreen:
call BattleAnimCopyTileMapToVRAM
call Delay3
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld a, SCREEN_HEIGHT_PIXELS
- ld [hWY], a
+ ldh [hAutoBGTransferEnabled], a
+ ld a, SCREEN_HEIGHT_PX
+ ldh [hWY], a
ld d, $80 ; terminator
- ld e, SCREEN_HEIGHT_PIXELS - 1
+ ld e, SCREEN_HEIGHT_PX - 1
ld c, $ff
ld hl, WavyScreenLineOffsets
.loop
push hl
.innerLoop
call WavyScreen_SetSCX
- ld a, [rLY]
+ ldh a, [rLY]
cp e ; is it the last visible line in the frame?
jr nz, .innerLoop ; keep going if not
pop hl
@@ -2109,11 +1955,11 @@ AnimationWavyScreen:
dec c
jr nz, .loop
xor a
- ld [hWY], a
+ ldh [hWY], a
call SaveScreenTilesToBuffer2
call ClearScreen
ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call Delay3
call LoadScreenTilesFromBuffer2
ld hl, vBGMap1
@@ -2121,11 +1967,11 @@ AnimationWavyScreen:
ret
WavyScreen_SetSCX:
- ld a, [rSTAT]
+ ldh a, [rSTAT]
and $3 ; is it H-blank?
jr nz, WavyScreen_SetSCX ; wait until it's H-blank
ld a, [hl]
- ld [rSCX], a
+ ldh [rSCX], a
inc hl
ld a, [hl]
cp d ; have we reached the end?
@@ -2144,48 +1990,48 @@ AnimationSubstitute:
; Changes the pokemon's sprite to the mini sprite
ld hl, wTempPic
xor a
- ld bc, $0310
+ ld bc, $310
call FillMemory
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playerTurn
- ld hl, SlowbroSprite ; facing down sprite
+ ld hl, MonsterSprite tile 0 ; facing down sprite
ld de, wTempPic + $120
- call CopySlowbroSpriteData
- ld hl, SlowbroSprite + $10
+ call CopyMonsterSpriteData
+ ld hl, MonsterSprite tile 1
ld de, wTempPic + $120 + $70
- call CopySlowbroSpriteData
- ld hl, SlowbroSprite + $20
+ call CopyMonsterSpriteData
+ ld hl, MonsterSprite tile 2
ld de, wTempPic + $120 + $10
- call CopySlowbroSpriteData
- ld hl, SlowbroSprite + $30
+ call CopyMonsterSpriteData
+ ld hl, MonsterSprite tile 3
ld de, wTempPic + $120 + $10 + $70
- call CopySlowbroSpriteData
+ call CopyMonsterSpriteData
jr .next
.playerTurn
- ld hl, SlowbroSprite + $40 ; facing up sprite
+ ld hl, MonsterSprite tile 4 ; facing up sprite
ld de, wTempPic + $120 + $70
- call CopySlowbroSpriteData
- ld hl, SlowbroSprite + $50
+ call CopyMonsterSpriteData
+ ld hl, MonsterSprite tile 5
ld de, wTempPic + $120 + $e0
- call CopySlowbroSpriteData
- ld hl, SlowbroSprite + $60
+ call CopyMonsterSpriteData
+ ld hl, MonsterSprite tile 6
ld de, wTempPic + $120 + $80
- call CopySlowbroSpriteData
- ld hl, SlowbroSprite + $70
+ call CopyMonsterSpriteData
+ ld hl, MonsterSprite tile 7
ld de, wTempPic + $120 + $f0
- call CopySlowbroSpriteData
+ call CopyMonsterSpriteData
.next
call CopyTempPicToMonPic
jp AnimationShowMonPic
-CopySlowbroSpriteData:
- ld bc, $0010
- ld a, BANK(SlowbroSprite)
+CopyMonsterSpriteData:
+ ld bc, 1 tiles
+ ld a, BANK(MonsterSprite)
jp FarCopyData
HideSubstituteShowMonAnim:
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ld hl, wPlayerMonMinimized
ld de, wPlayerBattleStatus1
@@ -2226,7 +2072,7 @@ HideSubstituteShowMonAnim:
call AnimationFlashMonPic
jp AnimationShowMonPic
.flyOrDig
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr nz, .enemy
ld a, [wPlayerMonMinimized]
@@ -2294,7 +2140,7 @@ AnimationTransformMon:
ld [wChangeMonPicEnemyTurnSpecies], a
ChangeMonPic:
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playerTurn
ld a, [wChangeMonPicEnemyTurnSpecies]
@@ -2303,7 +2149,7 @@ ChangeMonPic:
xor a
ld [wSpriteFlipped], a
call GetMonHeader
- coord hl, 12, 0
+ hlcoord 12, 0
call LoadFrontSpriteByMonIndex
jr .done
.playerTurn
@@ -2314,7 +2160,7 @@ ChangeMonPic:
ld [wd0b5], a
call GetMonHeader
predef LoadMonBackPic
- xor a
+ xor a ; TILEMAP_MON_PIC
call GetTileIDList
call GetMonSpriteTileMapPointerFromRowCount
call CopyPicTiles
@@ -2327,16 +2173,16 @@ ChangeMonPic:
AnimationHideEnemyMonPic:
; Hides the enemy mon's sprite
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ld hl, AnimationHideMonPic
call CallWithTurnFlipped
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
jp Delay3
Func_79929:
ld hl, wPlayerMonMinimized
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playerTurn
ld hl, wEnemyMonMinimized
@@ -2376,7 +2222,7 @@ InitMultipleObjectsOAM:
AnimationHideMonPic:
; Hides the mon's sprite.
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playerTurn
ld a, 12
@@ -2390,7 +2236,7 @@ ClearMonPicFromTileMap:
push bc
ld e, a
ld d, 0
- coord hl, 0, 0
+ hlcoord 0, 0
add hl, de
lb bc, 7, 7
call ClearScreenArea
@@ -2404,7 +2250,7 @@ ClearMonPicFromTileMap:
; in order to show only a portion of the mon sprite.
GetMonSpriteTileMapPointerFromRowCount:
push de
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr nz, .enemyTurn
ld a, 20 * 5 + 1
@@ -2412,7 +2258,7 @@ GetMonSpriteTileMapPointerFromRowCount:
.enemyTurn
ld a, 12
.next
- coord hl, 0, 0
+ hlcoord 0, 0
ld e, a
ld d, 0
add hl, de
@@ -2492,7 +2338,7 @@ GetMoveSound:
ld b, a
call IsCryMove
jr nc, .NotCryMove
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr nz, .next
ld a, [wBattleMonSpecies] ; get number of current monster
@@ -2534,184 +2380,17 @@ IsCryMove:
scf
ret
-MoveSoundTable:
- ; ID, pitch mod, tempo mod
- db SFX_POUND, $00, $80 ; POUND
- db SFX_BATTLE_0C, $10, $80 ; KARATE_CHOP
- db SFX_DOUBLESLAP, $00, $80 ; DOUBLESLAP
- db SFX_BATTLE_0B, $01, $80 ; COMET_PUNCH
- db SFX_BATTLE_0D, $00, $40 ; MEGA_PUNCH
- db SFX_SILPH_SCOPE, $00, $ff ; PAY_DAY
- db SFX_BATTLE_0D, $10, $60 ; FIRE_PUNCH
- db SFX_BATTLE_0D, $20, $80 ; ICE_PUNCH
- db SFX_BATTLE_0D, $00, $a0 ; THUNDERPUNCH
- db SFX_DAMAGE, $00, $80 ; SCRATCH
- db SFX_BATTLE_0F, $20, $40 ; VICEGRIP
- db SFX_BATTLE_0F, $00, $80 ; GUILLOTINE
- db SFX_BATTLE_0E, $00, $a0 ; RAZOR_WIND
- db SFX_NOT_VERY_EFFECTIVE, $10, $c0 ; SWORDS_DANCE
- db SFX_NOT_VERY_EFFECTIVE, $00, $a0 ; CUT
- db SFX_BATTLE_12, $00, $c0 ; GUST
- db SFX_BATTLE_12, $10, $a0 ; WING_ATTACK
- db SFX_BATTLE_13, $00, $e0 ; WHIRLWIND
- db SFX_NOT_VERY_EFFECTIVE, $20, $c0 ; FLY
- db SFX_BATTLE_14, $00, $80 ; BIND
- db SFX_BATTLE_22, $00, $80 ; SLAM
- db SFX_VINE_WHIP, $01, $80 ; VINE_WHIP
- db SFX_BATTLE_20, $00, $80 ; STOMP
- db SFX_BATTLE_17, $f0, $40 ; DOUBLE_KICK
- db SFX_SUPER_EFFECTIVE, $00, $80 ; MEGA_KICK
- db SFX_BATTLE_17, $00, $80 ; JUMP_KICK
- db SFX_BATTLE_21, $10, $80 ; ROLLING_KICK
- db SFX_BATTLE_1B, $01, $a0 ; SAND_ATTACK
- db SFX_BATTLE_18, $00, $80 ; HEADBUTT
- db SFX_BATTLE_1E, $00, $60 ; HORN_ATTACK
- db SFX_BATTLE_1E, $01, $40 ; FURY_ATTACK
- db SFX_HORN_DRILL, $00, $a0 ; HORN_DRILL
- db SFX_SUPER_EFFECTIVE, $10, $a0 ; TACKLE
- db SFX_BATTLE_20, $00, $c0 ; BODY_SLAM
- db SFX_BATTLE_14, $10, $60 ; WRAP
- db SFX_SUPER_EFFECTIVE, $00, $a0 ; TAKE_DOWN
- db SFX_BATTLE_22, $11, $c0 ; THRASH
- db SFX_SUPER_EFFECTIVE, $20, $c0 ; DOUBLE_EDGE
- db SFX_BATTLE_21, $00, $80 ; TAIL_WHIP
- db SFX_BATTLE_1B, $00, $80 ; POISON_STING
- db SFX_BATTLE_1B, $20, $c0 ; TWINEEDLE
- db SFX_BATTLE_19, $00, $80 ; PIN_MISSILE
- db SFX_BATTLE_31, $ff, $40 ; LEER
- db SFX_BATTLE_1E, $00, $80 ; BITE
- db SFX_BATTLE_0B, $00, $c0 ; GROWL
- db SFX_BATTLE_0B, $00, $40 ; ROAR
- db SFX_BATTLE_35, $00, $80 ; SING
- db SFX_BATTLE_27, $40, $60 ; SUPERSONIC
- db SFX_BATTLE_27, $00, $80 ; SONICBOOM
- db SFX_BATTLE_27, $ff, $40 ; DISABLE
- db SFX_BATTLE_2A, $80, $c0 ; ACID
- db SFX_BATTLE_19, $10, $a0 ; EMBER
- db SFX_BATTLE_19, $21, $e0 ; FLAMETHROWER
- db SFX_BATTLE_29, $00, $80 ; MIST
- db SFX_BATTLE_24, $20, $60 ; WATER_GUN
- db SFX_BATTLE_2A, $00, $80 ; HYDRO_PUMP
- db SFX_BATTLE_2C, $00, $80 ; SURF
- db SFX_BATTLE_28, $40, $80 ; ICE_BEAM
- db SFX_BATTLE_29, $f0, $e0 ; BLIZZARD
- db SFX_PSYBEAM, $00, $80 ; PSYBEAM
- db SFX_BATTLE_2A, $f0, $60 ; BUBBLEBEAM
- db SFX_BATTLE_28, $00, $80 ; AURORA_BEAM
- db SFX_BATTLE_36, $00, $80 ; HYPER_BEAM
- db SFX_PECK, $01, $a0 ; PECK
- db SFX_BATTLE_13, $f0, $20 ; DRILL_PECK
- db SFX_BATTLE_23, $01, $c0 ; SUBMISSION
- db SFX_BATTLE_23, $00, $80 ; LOW_KICK
- db SFX_SUPER_EFFECTIVE, $00, $e0 ; COUNTER
- db SFX_BATTLE_26, $01, $60 ; SEISMIC_TOSS
- db SFX_BATTLE_26, $20, $40 ; STRENGTH
- db SFX_BATTLE_24, $00, $80 ; ABSORB
- db SFX_BATTLE_24, $40, $c0 ; MEGA_DRAIN
- db SFX_BATTLE_1B, $03, $60 ; LEECH_SEED
- db SFX_BATTLE_25, $11, $e0 ; GROWTH
- db SFX_BATTLE_12, $20, $e0 ; RAZOR_LEAF
- db SFX_BATTLE_2E, $00, $80 ; SOLARBEAM
- db SFX_BATTLE_1C, $00, $80 ; POISONPOWDER
- db SFX_BATTLE_1C, $11, $a0 ; STUN_SPORE
- db SFX_BATTLE_1C, $01, $c0 ; SLEEP_POWDER
- db SFX_BATTLE_13, $14, $c0 ; PETAL_DANCE
- db SFX_BATTLE_1B, $02, $a0 ; STRING_SHOT
- db SFX_BATTLE_29, $f0, $80 ; DRAGON_RAGE
- db SFX_BATTLE_29, $20, $c0 ; FIRE_SPIN
- db SFX_BATTLE_2F, $00, $20 ; THUNDERSHOCK
- db SFX_BATTLE_2F, $20, $80 ; THUNDERBOLT
- db SFX_BATTLE_2E, $12, $60 ; THUNDER_WAVE
- db SFX_BATTLE_26, $00, $80 ; THUNDER
- db SFX_BATTLE_14, $01, $e0 ; ROCK_THROW
- db SFX_BATTLE_29, $0f, $e0 ; EARTHQUAKE
- db SFX_BATTLE_29, $11, $20 ; FISSURE
- db SFX_DAMAGE, $10, $40 ; DIG
- db SFX_BATTLE_0F, $10, $c0 ; TOXIC
- db SFX_BATTLE_14, $00, $20 ; CONFUSION
- db SFX_PSYCHIC_M, $00, $80 ; PSYCHIC_M
- db SFX_BATTLE_35, $11, $18 ; HYPNOSIS
- db SFX_BATTLE_09, $20, $c0 ; MEDITATE
- db SFX_FAINT_FALL, $20, $c0 ; AGILITY
- db SFX_BATTLE_25, $00, $10 ; QUICK_ATTACK
- db SFX_BATTLE_26, $f0, $20 ; RAGE
- db SFX_BATTLE_33, $f0, $c0 ; TELEPORT
- db SFX_NOT_VERY_EFFECTIVE, $f0, $e0 ; NIGHT_SHADE
- db SFX_BATTLE_09, $f0, $40 ; MIMIC
- db SFX_BATTLE_31, $00, $80 ; SCREECH
- db SFX_BATTLE_33, $80, $40 ; DOUBLE_TEAM
- db SFX_BATTLE_33, $00, $80 ; RECOVER
- db SFX_BATTLE_14, $11, $20 ; HARDEN
- db SFX_BATTLE_14, $22, $10 ; MINIMIZE
- db SFX_BATTLE_1B, $f1, $ff ; SMOKESCREEN
- db SFX_BATTLE_13, $f1, $ff ; CONFUSE_RAY
- db SFX_BATTLE_14, $33, $30 ; WITHDRAW
- db SFX_BATTLE_32, $40, $c0 ; DEFENSE_CURL
- db SFX_BATTLE_0E, $20, $20 ; BARRIER
- db SFX_BATTLE_0E, $f0, $10 ; LIGHT_SCREEN
- db SFX_BATTLE_0F, $f8, $10 ; HAZE
- db SFX_NOT_VERY_EFFECTIVE, $f0, $10 ; REFLECT
- db SFX_BATTLE_25, $00, $80 ; FOCUS_ENERGY
- db SFX_BATTLE_18, $00, $c0 ; BIDE
- db SFX_BATTLE_32, $c0, $ff ; METRONOME
- db SFX_BATTLE_09, $f2, $20 ; MIRROR_MOVE
- db SFX_BATTLE_34, $00, $80 ; SELFDESTRUCT
- db SFX_BATTLE_34, $00, $40 ; EGG_BOMB
- db SFX_BATTLE_09, $00, $40 ; LICK
- db SFX_NOT_VERY_EFFECTIVE, $10, $ff ; SMOG
- db SFX_BATTLE_2A, $20, $20 ; SLUDGE
- db SFX_BATTLE_32, $00, $80 ; BONE_CLUB
- db SFX_BATTLE_29, $1f, $20 ; FIRE_BLAST
- db SFX_BATTLE_25, $2f, $80 ; WATERFALL
- db SFX_BATTLE_0F, $1f, $ff ; CLAMP
- db SFX_BATTLE_2B, $1f, $60 ; SWIFT
- db SFX_BATTLE_26, $1e, $20 ; SKULL_BASH
- db SFX_BATTLE_26, $1f, $18 ; SPIKE_CANNON
- db SFX_BATTLE_14, $0f, $80 ; CONSTRICT
- db SFX_BATTLE_09, $f8, $10 ; AMNESIA
- db SFX_FAINT_FALL, $18, $20 ; KINESIS
- db SFX_BATTLE_32, $08, $40 ; SOFTBOILED
- db SFX_BATTLE_17, $01, $e0 ; HI_JUMP_KICK
- db SFX_NOT_VERY_EFFECTIVE, $09, $ff ; GLARE
- db SFX_BATTLE_35, $42, $01 ; DREAM_EATER
- db SFX_BATTLE_1C, $00, $ff ; POISON_GAS
- db SFX_BATTLE_32, $08, $e0 ; BARRAGE
- db SFX_BATTLE_24, $00, $80 ; LEECH_LIFE
- db SFX_BATTLE_09, $88, $10 ; LOVELY_KISS
- db SFX_BATTLE_25, $48, $ff ; SKY_ATTACK
- db SFX_FAINT_FALL, $ff, $ff ; TRANSFORM
- db SFX_BATTLE_24, $ff, $10 ; BUBBLE
- db SFX_FAINT_FALL, $ff, $04 ; DIZZY_PUNCH
- db SFX_BATTLE_1C, $01, $ff ; SPORE
- db SFX_BATTLE_13, $f8, $ff ; FLASH
- db SFX_BATTLE_0C, $f0, $f0 ; PSYWAVE
- db SFX_BATTLE_0F, $08, $10 ; SPLASH
- db SFX_BATTLE_0D, $f0, $ff ; ACID_ARMOR
- db SFX_SUPER_EFFECTIVE, $f0, $ff ; CRABHAMMER
- db SFX_BATTLE_34, $10, $ff ; EXPLOSION
- db SFX_BATTLE_0E, $f0, $20 ; FURY_SWIPES
- db SFX_BATTLE_2B, $f0, $60 ; BONEMERANG
- db SFX_BATTLE_21, $12, $10 ; REST
- db SFX_BATTLE_36, $f0, $20 ; ROCK_SLIDE
- db SFX_BATTLE_1E, $12, $ff ; HYPER_FANG
- db SFX_BATTLE_31, $80, $04 ; SHARPEN
- db SFX_BATTLE_33, $f0, $10 ; CONVERSION
- db SFX_BATTLE_29, $f8, $ff ; TRI_ATTACK
- db SFX_BATTLE_26, $f0, $ff ; SUPER_FANG
- db SFX_NOT_VERY_EFFECTIVE, $01, $ff ; SLASH
- db SFX_BATTLE_2C, $d8, $04 ; SUBSTITUTE
- db SFX_BATTLE_0B, $00, $80 ; STRUGGLE
- db SFX_BATTLE_0B, $00, $80
+INCLUDE "data/moves/sfx.asm"
CopyPicTiles:
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ld a, $31 ; base tile ID of player mon sprite
jr z, .next
; enemy turn
xor a ; base tile ID of enemy mon sprite
.next
- ld [hBaseTileID], a
+ ldh [hBaseTileID], a
jr CopyTileIDs_NoBGTransfer
; copy the tiles used when a mon is being sent out of or into a pokeball
@@ -2728,7 +2407,7 @@ CopyDownscaledMonTiles:
CopyTileIDs_NoBGTransfer:
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
; fall through
; b = number of rows
@@ -2738,7 +2417,7 @@ CopyTileIDs:
.rowLoop
push bc
push hl
- ld a, [hBaseTileID]
+ ldh a, [hBaseTileID]
ld b, a
.columnLoop
ld a, [de]
@@ -2754,108 +2433,17 @@ CopyTileIDs:
dec b
jr nz, .rowLoop
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
pop hl
ret
-TileIDListPointerTable:
- dw DownscaledMonTiles_7x7
- dn 7, 7
- dw DownscaledMonTiles_5x7
- dn 5, 7
- dw DownscaledMonTiles_3x7
- dn 3, 7
- dw GengarIntroTiles1
- dn 7, 7
- dw GengarIntroTiles2
- dn 7, 7
- dw GengarIntroTiles3
- dn 7, 7
- dw DownscaledMonTiles_79d7c
- dn 8, 6
- dw DownscaledMonTiles_79dac
- dn 3, 12
-
-DownscaledMonTiles_5x5:
- db $31, $38, $46, $54, $5B
- db $32, $39, $47, $55, $5C
- db $34, $3B, $49, $57, $5E
- db $36, $3D, $4B, $59, $60
- db $37, $3E, $4C, $5A, $61
-
-DownscaledMonTiles_3x3:
- db $31, $46, $5B
- db $34, $49, $5E
- db $37, $4C, $61
-
-DownscaledMonTiles_7x7:
- db $00, $07, $0E, $15, $1C, $23, $2A
- db $01, $08, $0F, $16, $1D, $24, $2B
- db $02, $09, $10, $17, $1E, $25, $2C
- db $03, $0A, $11, $18, $1F, $26, $2D
- db $04, $0B, $12, $19, $20, $27, $2E
- db $05, $0C, $13, $1A, $21, $28, $2F
- db $06, $0D, $14, $1B, $22, $29, $30
-
-DownscaledMonTiles_5x7:
- db $00, $07, $0E, $15, $1C, $23, $2A
- db $01, $08, $0F, $16, $1D, $24, $2B
- db $03, $0A, $11, $18, $1F, $26, $2D
- db $04, $0B, $12, $19, $20, $27, $2E
- db $05, $0C, $13, $1A, $21, $28, $2F
-
-DownscaledMonTiles_3x7:
- db $00, $07, $0E, $15, $1C, $23, $2A
- db $02, $09, $10, $17, $1E, $25, $2C
- db $04, $0B, $12, $19, $20, $27, $2E
-
-GengarIntroTiles1:
- db $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $19, $00
- db $02, $06, $0B, $10, $14, $1A, $00
- db $00, $07, $0C, $11, $15, $1B, $00
- db $03, $08, $0D, $12, $16, $1C, $00
- db $04, $09, $0E, $13, $17, $1D, $1F
- db $05, $0A, $0F, $01, $18, $1E, $20
-
-GengarIntroTiles2:
- db $00, $00, $00, $30, $00, $37, $00
- db $00, $00, $2B, $31, $34, $38, $3D
- db $21, $26, $2C, $01, $35, $39, $3E
- db $22, $27, $2D, $32, $36, $01, $00
- db $23, $28, $2E, $33, $01, $3A, $00
- db $24, $29, $2F, $01, $01, $3B, $00
- db $25, $2A, $01, $01, $01, $3C, $00
-
-GengarIntroTiles3:
- db $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $47, $4D, $00, $00, $00
- db $00, $00, $48, $4E, $52, $56, $5B
- db $3F, $43, $49, $4F, $53, $57, $5C
- db $40, $44, $4A, $50, $54, $58, $00
- db $41, $45, $4B, $51, $4C, $59, $5D
- db $42, $46, $4C, $4C, $55, $5A, $5E
-
-DownscaledMonTiles_79d7c:
- db $31, $32, $32, $32, $32, $33
- db $34, $35, $36, $36, $37, $38
- db $34, $39, $3A, $3A, $3B, $38
- db $3C, $3D, $3E, $3E, $3F, $40
- db $41, $42, $43, $43, $44, $45
- db $46, $47, $43, $48, $49, $4A
- db $41, $43, $4B, $4C, $4D, $4E
- db $4F, $50, $50, $50, $51, $52
-
-DownscaledMonTiles_79dac:
- db $43, $55, $56, $53, $53, $53, $53, $53, $53, $53, $53, $53
- db $43, $57, $58, $54, $54, $54, $54, $54, $54, $54, $54, $54
- db $43, $59, $5A, $43, $43, $43, $43, $43, $43, $43, $43, $43
+INCLUDE "data/tilemaps.asm"
AnimationLeavesFalling:
; Makes leaves float down from the top of the screen. This is used
; in Razor Leaf's animation.
ld a, [wAnimPalette]
- ld [rOBP0], a
+ ldh [rOBP0], a
call UpdateGBCPal_OBP0
ld d, $37 ; leaf tile
ld a, 3 ; number of leaves
@@ -3043,7 +2631,7 @@ AnimationShakeEnemyHUD:
call CopyVideoData
xor a
- ld [hSCX], a
+ ldh [hSCX], a
; Copy wTileMap to BG map 0. The regular BG (not the window) is set to use
; map 0 and can be scrolled with SCX, which allows a shaking effect.
@@ -3052,8 +2640,8 @@ AnimationShakeEnemyHUD:
; Now that the regular BG is showing the same thing the window was, move the
; window off the screen so that we can modify its contents below.
- ld a, SCREEN_HEIGHT_PIXELS
- ld [hWY], a
+ ld a, SCREEN_HEIGHT_PX
+ ldh [hWY], a
; Copy wTileMap to VRAM such that the row below the enemy HUD (in wTileMap) is
; lined up with row 0 of the window.
@@ -3061,11 +2649,11 @@ AnimationShakeEnemyHUD:
call BattleAnimCopyTileMapToVRAM
; update BGMap attributes
- ld a, [hGBC]
+ ldh a, [hGBC]
and a
jr z, .notGBC
ld c, 13
- callba LoadBGMapAttributes
+ farcall LoadBGMapAttributes
.notGBC
; Move the window so that the row below the enemy HUD (in BG map 0) lines up
@@ -3073,7 +2661,7 @@ AnimationShakeEnemyHUD:
; covers everything below the enemy HD with a copy that looks just like what
; was there before.
ld a, 7 * 8
- ld [hWY], a
+ ldh [hWY], a
; Write OAM entries so that the copy of the back pic from the top of this
; function shows up on screen. We need this because the back pic's Y coordinates
@@ -3097,19 +2685,19 @@ AnimationShakeEnemyHUD:
; Restore the original graphics.
call AnimationShowMonPic
call ClearSprites
- ld a, SCREEN_HEIGHT_PIXELS
- ld [hWY], a
+ ld a, SCREEN_HEIGHT_PX
+ ldh [hWY], a
ld hl, vBGMap1
call BattleAnimCopyTileMapToVRAM
; update BGMap attributes
- ld a, [hGBC]
+ ldh a, [hGBC]
and a
jr z, .notGBC2
ld c, 11
- callba LoadBGMapAttributes
+ farcall LoadBGMapAttributes
.notGBC2
xor a
- ld [hWY], a
+ ldh [hWY], a
call SaveScreenTilesToBuffer1
ld hl, vBGMap0
call BattleAnimCopyTileMapToVRAM
@@ -3122,7 +2710,7 @@ AnimationShakeEnemyHUD:
CopyTileIDsFromList:
call GetPredefRegisters
ld a, c
- ld [hBaseTileID], a
+ ldh [hBaseTileID], a
ld a, b
push hl
call GetTileIDList
@@ -3130,30 +2718,30 @@ CopyTileIDsFromList:
jp CopyTileIDs
ShakeEnemyHUD_ShakeBG:
- ld a, [hSCX]
+ ldh a, [hSCX]
ld [wTempSCX], a
.loop
ld a, [wTempSCX]
add d
- ld [hSCX], a
+ ldh [hSCX], a
ld c, 2
call DelayFrames
ld a, [wTempSCX]
sub d
- ld [hSCX], a
+ ldh [hSCX], a
ld c, 2
call DelayFrames
dec e
jr nz, .loop
ld a, [wTempSCX]
- ld [hSCX], a
+ ldh [hSCX], a
ret
BattleAnimCopyTileMapToVRAM:
ld a, h
- ld [H_AUTOBGTRANSFERDEST + 1], a
+ ldh [hAutoBGTransferDest + 1], a
ld a, l
- ld [H_AUTOBGTRANSFERDEST], a
+ ldh [hAutoBGTransferDest], a
jp Delay3
TossBallAnimation:
diff --git a/engine/battle/bank3d_battle.asm b/engine/battle/bank3d_battle.asm
index 5edc4571..48c3cde3 100644
--- a/engine/battle/bank3d_battle.asm
+++ b/engine/battle/bank3d_battle.asm
@@ -1,27 +1,28 @@
-InitBattle:
+InitBattle::
ld a, [wCurOpponent]
and a
- jr z, asm_f6003
+ jr z, DetermineWildOpponent
InitOpponent:
ld a, [wCurOpponent]
ld [wcf91], a
ld [wEnemyMonSpecies2], a
- jr asm_f601d
-asm_f6003:
+ jr InitBattleCommon
+
+DetermineWildOpponent:
ld a, [wd732]
bit 1, a
- jr z, .asm_f600f
- ld a, [hJoyHeld]
+ jr z, .asm_3ef2f
+ ldh a, [hJoyHeld]
bit 1, a ; B button pressed?
ret nz
-.asm_f600f
+.asm_3ef2f
ld a, [wNumberOfNoRandomBattleStepsLeft]
and a
ret nz
- callab TryDoWildEncounter
+ callfar TryDoWildEncounter
ret nz
-asm_f601d:
+InitBattleCommon:
ld a, [wMapPalOffset]
push af
ld hl, wLetterPrintingDelayFlags
@@ -34,37 +35,37 @@ asm_f601d:
jp c, InitWildBattle
ld [wTrainerClass], a
call GetTrainerInformation
- callab ReadTrainer
- callab DoBattleTransitionAndInitBattleVariables
+ callfar ReadTrainer
+ callfar DoBattleTransitionAndInitBattleVariables
call _LoadTrainerPic
xor a
ld [wEnemyMonSpecies2], a
- ld [$ffe1], a
+ ldh [hStartTileID], a
dec a
ld [wAICount], a
- coord hl, 12, 0
+ hlcoord 12, 0
predef CopyUncompressedPicToTilemap
ld a, $ff
ld [wEnemyMonPartyPos], a
ld a, $2
ld [wIsInBattle], a
- ; Is this a major story battle?
- ld a,[wLoneAttackNo]
+; Is this a major story battle?
+ ld a, [wLoneAttackNo]
and a
- jp z,InitBattle_Common
+ jp z, _InitBattleCommon
callabd_ModifyPikachuHappiness PIKAHAPPY_GYMLEADER ; useless since already in bank3d
- jp InitBattle_Common
+ jp _InitBattleCommon
InitWildBattle:
ld a, $1
ld [wIsInBattle], a
- callab LoadEnemyMonData
- callab DoBattleTransitionAndInitBattleVariables
+ callfar LoadEnemyMonData
+ callfar DoBattleTransitionAndInitBattleVariables
ld a, [wCurOpponent]
cp RESTLESS_SOUL
jr z, .isGhost
- callab IsGhostBattle
+ callfar IsGhostBattle
jr nz, .isNoGhost
.isGhost
ld hl, wMonHSpriteDim
@@ -101,49 +102,49 @@ InitWildBattle:
.spriteLoaded
xor a
ld [wTrainerClass], a
- ld [$ffe1], a
- coord hl, 12, 0
+ ldh [hStartTileID], a
+ hlcoord 12, 0
predef CopyUncompressedPicToTilemap
; common code that executes after init battle code specific to trainer or wild battles
-InitBattle_Common:
- ld b, $0
+_InitBattleCommon:
+ ld b, SET_PAL_BATTLE_BLACK
call RunPaletteCommand
- callab SlidePlayerAndEnemySilhouettesOnScreen
+ callfar SlidePlayerAndEnemySilhouettesOnScreen
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ld hl, .emptyString
call PrintText
call SaveScreenTilesToBuffer1
call ClearScreen
ld a, $98
- ld [$ffbd], a
+ ldh [hAutoBGTransferDest + 1], a
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call Delay3
ld a, $9c
- ld [$ffbd], a
+ ldh [hAutoBGTransferDest + 1], a
call LoadScreenTilesFromBuffer1
- coord hl, 9, 7
- ld bc, $50a
+ hlcoord 9, 7
+ lb bc, 5, 10
call ClearScreenArea
- coord hl, 1, 0
- ld bc, $40a
+ hlcoord 1, 0
+ lb bc, 4, 10
call ClearScreenArea
call ClearSprites
ld a, [wIsInBattle]
dec a ; is it a wild battle?
ld hl, DrawEnemyHUDAndHPBar
- ld b,BANK(DrawEnemyHUDAndHPBar)
+ ld b, BANK(DrawEnemyHUDAndHPBar)
call z, Bankswitch ; draw enemy HUD and HP bar if it's a wild battle
- callab StartBattle
- callab EndOfBattle
+ callfar StartBattle
+ callfar EndOfBattle
pop af
ld [wLetterPrintingDelayFlags], a
pop af
ld [wMapPalOffset], a
ld a, [wSavedTilesetType]
- ld [hTilesetType], a
+ ldh [hTilesetType], a
scf
ret
.emptyString
@@ -157,9 +158,9 @@ _LoadTrainerPic:
ld d, a ; de contains pointer to trainer pic
ld a, [wLinkState]
and a
- ld a, Bank(TrainerPics) ; this is where all the trainer pics are (not counting Red's)
+ ld a, BANK(TrainerPics) ; this is where all the trainer pics are (not counting Red's)
jr z, .loadSprite
- ld a, Bank(RedPicFront)
+ ld a, BANK(RedPicFront)
.loadSprite
call UncompressSpriteFromDE
ld de, vFrontPic
@@ -172,8 +173,8 @@ LoadMonBackPic:
; been loaded with GetMonHeader.
ld a, [wBattleMonSpecies2]
ld [wcf91], a
- coord hl, 1, 5
- ld bc,$708
+ hlcoord 1, 5
+ lb bc, 7, 8
call ClearScreenArea
ld hl, wMonHBackSprite - wMonHeader
call UncompressMonSprite
@@ -183,7 +184,7 @@ LoadMonBackPic:
ld hl, vSprites
ld de, vBackPic
ld c, (2*SPRITEBUFFERSIZE)/16 ; count of 16-byte chunks to be copied
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
ld b, a
jp CopyVideoData
@@ -192,8 +193,8 @@ AnimateSendingOutMon:
ld h, a
ld a, [wPredefRegisters + 1]
ld l, a
- ld a, [$ffe1]
- ld [H_DOWNARROWBLINKCNT1], a
+ ldh a, [hStartTileID]
+ ldh [hDownArrowBlinkCount1], a
ld b, $4c
ld a, [wIsInBattle]
and a
@@ -223,7 +224,7 @@ AnimateSendingOutMon:
ld bc, -123
.asm_f61f2
add hl, bc
- ld a, [H_DOWNARROWBLINKCNT1]
+ ldh a, [hDownArrowBlinkCount1]
add $31
jr CopyUncompressedPicToHL
@@ -232,8 +233,8 @@ CopyUncompressedPicToTilemap:
ld h, a
ld a, [wPredefRegisters + 1]
ld l, a
- ld a, [$ffe1]
-CopyUncompressedPicToHL:
+ ldh a, [hStartTileID]
+CopyUncompressedPicToHL::
ld bc, $707
ld de, $14
push af
@@ -281,11 +282,11 @@ CopyUncompressedPicToHL:
ret
INCLUDE "engine/battle/init_battle_variables.asm"
-INCLUDE "engine/battle/moveEffects/focus_energy_effect.asm"
-INCLUDE "engine/battle/moveEffects/heal_effect.asm"
-INCLUDE "engine/battle/moveEffects/transform_effect.asm"
-INCLUDE "engine/battle/moveEffects/reflect_light_screen_effect.asm"
-INCLUDE "engine/battle/moveEffects/mist_effect.asm"
-INCLUDE "engine/battle/moveEffects/one_hit_ko_effect.asm"
-INCLUDE "engine/battle/moveEffects/pay_day_effect.asm"
-INCLUDE "engine/battle/moveEffects/paralyze_effect.asm"
+INCLUDE "engine/battle/move_effects/focus_energy.asm"
+INCLUDE "engine/battle/move_effects/heal.asm"
+INCLUDE "engine/battle/move_effects/transform.asm"
+INCLUDE "engine/battle/move_effects/reflect_light_screen.asm"
+INCLUDE "engine/battle/move_effects/mist.asm"
+INCLUDE "engine/battle/move_effects/one_hit_ko.asm"
+INCLUDE "engine/battle/move_effects/pay_day.asm"
+INCLUDE "engine/battle/move_effects/paralyze.asm"
diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm
index e4392a01..82c3318c 100644
--- a/engine/battle/battle_transitions.asm
+++ b/engine/battle/battle_transitions.asm
@@ -1,17 +1,17 @@
BattleTransition:
ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call Delay3
xor a
- ld [hWY], a
+ ldh [hWY], a
dec a
ld [wUpdateSpritesEnabled], a
call DelayFrame
; Determine which OAM block is being used by the enemy trainer sprite (if there
; is one).
- ld hl, wSpriteStateData1 + 2
- ld a, [hSpriteIndexOrTextID] ; enemy trainer sprite index (0 if wild battle)
+ ld hl, wSpritePlayerStateData1ImageIndex
+ ldh a, [hSpriteIndexOrTextID] ; enemy trainer sprite index (0 if wild battle)
ld c, a
ld b, 0
ld de, $10
@@ -118,9 +118,6 @@ GetBattleTransitionID_CompareLevels:
ld [wBattleTransitionSpiralDirection], a
ret
-; fails to recognize VICTORY_ROAD_2F, VICTORY_ROAD_3F, all ROCKET_HIDEOUT maps,
-; POKEMON_MANSION_1F, SEAFOAM_ISLANDS_[B1F-B4F], POWER_PLANT, DIGLETTS_CAVE
-; and SILPH_CO_[9-11]F as dungeon maps
GetBattleTransitionID_IsDungeonMap:
ld a, [wCurMap]
ld e, a
@@ -151,51 +148,21 @@ GetBattleTransitionID_IsDungeonMap:
res 2, c
ret
-; GetBattleTransitionID_IsDungeonMap checks if wCurMap
-; is equal to one of these maps
-DungeonMaps1:
- db VIRIDIAN_FOREST
- db ROCK_TUNNEL_1F
- db SEAFOAM_ISLANDS_1F
- db ROCK_TUNNEL_B1F
- db $FF
-
-; GetBattleTransitionID_IsDungeonMap checks if wCurMap
-; is in between or equal to each pair of maps
-DungeonMaps2:
- ; all MT_MOON maps
- db MT_MOON_1F
- db MT_MOON_B2F
-
- ; all SS_ANNE maps, VICTORY_ROAD_1F, LANCES_ROOM, and HALL_OF_FAME
- db SS_ANNE_1F
- db HALL_OF_FAME
-
- ; all POKEMON_TOWER maps and Lavender Town buildings
- db LAVENDER_POKECENTER
- db LAVENDER_CUBONE_HOUSE
-
- ; SILPH_CO_[2-8]F, POKEMON_MANSION[2F-B1F], SAFARI_ZONE, and
- ; CERULEAN_CAVE maps, except for SILPH_CO_1F
- db SILPH_CO_2F
- db CERULEAN_CAVE_1F
- db $FF
+INCLUDE "data/maps/dungeon_maps.asm"
LoadBattleTransitionTile:
- ld hl, vChars1 + $7f0
+ ld hl, vChars1 tile $7f
ld de, BattleTransitionTile
- lb bc, BANK(BattleTransitionTile), (BattleTransitionTileEnd - BattleTransitionTile) / $10
+ lb bc, BANK(BattleTransitionTile), 1
jp CopyVideoData
-BattleTransitionTile:
- INCBIN "gfx/battle_transition.2bpp"
-BattleTransitionTileEnd:
+BattleTransitionTile: INCBIN "gfx/overworld/battle_transition.2bpp"
BattleTransition_BlackScreen:
ld a, $ff
- ld [rBGP], a
- ld [rOBP0], a
- ld [rOBP1], a
+ ldh [rBGP], a
+ ldh [rOBP0], a
+ ldh [rOBP1], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
@@ -212,7 +179,7 @@ BattleTransition_Spiral:
call BattleTransition_InwardSpiral
jr .done
.outwardSpiral
- coord hl, 10, 10
+ hlcoord 10, 10
ld a, $3
ld [wOutwardSpiralCurrentDirection], a
ld a, l
@@ -241,7 +208,7 @@ BattleTransition_Spiral:
BattleTransition_InwardSpiral:
ld a, 7
ld [wInwardSpiralUpdateScreenCounter], a
- coord hl, 0, 0
+ hlcoord 0, 0
ld c, SCREEN_HEIGHT - 1
ld de, SCREEN_WIDTH
call BattleTransition_InwardSpiral_
@@ -359,9 +326,9 @@ BattleTransition_FlashScreen_:
ld hl, BattleTransition_FlashScreenPalettes
.loop
ld a, [hli]
- cp $1
+ cp 1
jr z, .done
- ld [rBGP], a
+ ldh [rBGP], a
call UpdateGBCPal_BGP
ld c, 2
call DelayFrames
@@ -372,8 +339,19 @@ BattleTransition_FlashScreen_:
ret
BattleTransition_FlashScreenPalettes:
- db $F9,$FE,$FF,$FE,$F9,$E4,$90,$40,$00,$40,$90,$E4
- db $01 ; terminator
+ db %11111001
+ db %11111110
+ db %11111111
+ db %11111110
+ db %11111001
+ db %11100100
+ db %10010000
+ db %01000000
+ db %00000000
+ db %01000000
+ db %10010000
+ db %11100100
+ db 1 ; end
; used for low level trainer dungeon battles
BattleTransition_Shrink:
@@ -381,25 +359,25 @@ BattleTransition_Shrink:
.loop
push bc
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- coord hl, 0, 7
- coord de, 0, 8
+ ldh [hAutoBGTransferEnabled], a
+ hlcoord 0, 7
+ decoord 0, 8
ld bc, -SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
- coord hl, 0, 10
- coord de, 0, 9
+ hlcoord 0, 10
+ decoord 0, 9
ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
- coord hl, 8, 0
- coord de, 9, 0
+ hlcoord 8, 0
+ decoord 9, 0
ld bc, -2
call BattleTransition_CopyTiles2
- coord hl, 11, 0
- coord de, 10, 0
+ hlcoord 11, 0
+ decoord 10, 0
ld bc, 2
call BattleTransition_CopyTiles2
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ld c, 6
call DelayFrames
pop bc
@@ -413,23 +391,23 @@ BattleTransition_Shrink:
BattleTransition_Split:
ld c, 9
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
.loop
push bc
- coord hl, 0, 16
- coord de, 0, 17
+ hlcoord 0, 16
+ decoord 0, 17
ld bc, -SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
- coord hl, 0, 1
- coord de, 0, 0
+ hlcoord 0, 1
+ decoord 0, 0
ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
- coord hl, 18, 0
- coord de, 19, 0
+ hlcoord 18, 0
+ decoord 19, 0
ld bc, -2
call BattleTransition_CopyTiles2
- coord hl, 1, 0
- coord de, 0, 0
+ hlcoord 1, 0
+ decoord 0, 0
ld bc, 2
call BattleTransition_CopyTiles2
call BattleTransition_TransferDelay3
@@ -525,10 +503,10 @@ BattleTransition_CopyTiles2:
; used for high level wild dungeon battles
BattleTransition_VerticalStripes:
ld c, SCREEN_HEIGHT
- coord hl, 0, 0
- coord de, 1, 17
+ hlcoord 0, 0
+ decoord 1, 17
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
.loop
push bc
push hl
@@ -564,10 +542,10 @@ BattleTransition_VerticalStripes_:
; used for low level wild dungeon battles
BattleTransition_HorizontalStripes:
ld c, SCREEN_WIDTH
- coord hl, 0, 0
- coord de, 19, 1
+ hlcoord 0, 0
+ decoord 19, 1
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
.loop
push bc
push hl
@@ -614,7 +592,7 @@ BattleTransition_FlashScreen:
ld b, $3
call BattleTransition_FlashScreen_
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ret
BattleTransition_Circle_Sub1:
@@ -633,10 +611,10 @@ BattleTransition_Circle_Sub1:
BattleTransition_TransferDelay3:
ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call Delay3
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ret
; used for low level wild non-dungeon battles
@@ -683,87 +661,41 @@ BattleTransition_Circle_Sub2:
ld l, a
jp BattleTransition_Circle_Sub3
-BattleTransition_HalfCircle1:
- db $01
- dw BattleTransition_CircleData1
- dwCoord 18, 6
-
- db $01
- dw BattleTransition_CircleData2
- dwCoord 19, 3
-
- db $01
- dw BattleTransition_CircleData3
- dwCoord 18, 0
-
- db $01
- dw BattleTransition_CircleData4
- dwCoord 14, 0
-
- db $01
- dw BattleTransition_CircleData5
- dwCoord 10, 0
+; halves
+ const_def
+ const CIRCLE_LEFT
+ const CIRCLE_RIGHT
- db $00
- dw BattleTransition_CircleData5
- dwCoord 9, 0
+half_circle: MACRO
+ ; quadrant x, circle data, target coord
+ db \1
+ dw \2
+ dwcoord \3, \4
+ENDM
- db $00
- dw BattleTransition_CircleData4
- dwCoord 5, 0
-
- db $00
- dw BattleTransition_CircleData3
- dwCoord 1, 0
-
- db $00
- dw BattleTransition_CircleData2
- dwCoord 0, 3
-
- db $00
- dw BattleTransition_CircleData1
- dwCoord 1, 6
+BattleTransition_HalfCircle1:
+ half_circle CIRCLE_RIGHT, BattleTransition_CircleData1, 18, 6
+ half_circle CIRCLE_RIGHT, BattleTransition_CircleData2, 19, 3
+ half_circle CIRCLE_RIGHT, BattleTransition_CircleData3, 18, 0
+ half_circle CIRCLE_RIGHT, BattleTransition_CircleData4, 14, 0
+ half_circle CIRCLE_RIGHT, BattleTransition_CircleData5, 10, 0
+ half_circle CIRCLE_LEFT, BattleTransition_CircleData5, 9, 0
+ half_circle CIRCLE_LEFT, BattleTransition_CircleData4, 5, 0
+ half_circle CIRCLE_LEFT, BattleTransition_CircleData3, 1, 0
+ half_circle CIRCLE_LEFT, BattleTransition_CircleData2, 0, 3
+ half_circle CIRCLE_LEFT, BattleTransition_CircleData1, 1, 6
BattleTransition_HalfCircle2:
- db $00
- dw BattleTransition_CircleData1
- dwCoord 1, 11
-
- db $00
- dw BattleTransition_CircleData2
- dwCoord 0, 14
-
- db $00
- dw BattleTransition_CircleData3
- dwCoord 1, 17
-
- db $00
- dw BattleTransition_CircleData4
- dwCoord 5, 17
-
- db $00
- dw BattleTransition_CircleData5
- dwCoord 9, 17
-
- db $01
- dw BattleTransition_CircleData5
- dwCoord 10, 17
-
- db $01
- dw BattleTransition_CircleData4
- dwCoord 14, 17
-
- db $01
- dw BattleTransition_CircleData3
- dwCoord 18, 17
-
- db $01
- dw BattleTransition_CircleData2
- dwCoord 19, 14
-
- db $01
- dw BattleTransition_CircleData1
- dwCoord 18, 11
+ half_circle CIRCLE_LEFT, BattleTransition_CircleData1, 1, 11
+ half_circle CIRCLE_LEFT, BattleTransition_CircleData2, 0, 14
+ half_circle CIRCLE_LEFT, BattleTransition_CircleData3, 1, 17
+ half_circle CIRCLE_LEFT, BattleTransition_CircleData4, 5, 17
+ half_circle CIRCLE_LEFT, BattleTransition_CircleData5, 9, 17
+ half_circle CIRCLE_RIGHT, BattleTransition_CircleData5, 10, 17
+ half_circle CIRCLE_RIGHT, BattleTransition_CircleData4, 14, 17
+ half_circle CIRCLE_RIGHT, BattleTransition_CircleData3, 18, 17
+ half_circle CIRCLE_RIGHT, BattleTransition_CircleData2, 19, 14
+ half_circle CIRCLE_RIGHT, BattleTransition_CircleData1, 18, 11
BattleTransition_Circle_Sub3:
push hl
@@ -792,7 +724,7 @@ BattleTransition_Circle_Sub3:
add hl, bc
ld a, [de]
inc de
- cp $ff
+ cp -1
ret z
and a
jr z, BattleTransition_Circle_Sub3
@@ -810,17 +742,8 @@ BattleTransition_Circle_Sub3:
jr nz, .loop2
jr BattleTransition_Circle_Sub3
-BattleTransition_CircleData1:
- db $02,$03,$05,$04,$09,$FF
-
-BattleTransition_CircleData2:
- db $01,$01,$02,$02,$04,$02,$04,$02,$03,$FF
-
-BattleTransition_CircleData3:
- db $02,$01,$03,$01,$04,$01,$04,$01,$04,$01,$03,$01,$02,$01,$01,$01,$01,$FF
-
-BattleTransition_CircleData4:
- db $04,$01,$04,$00,$03,$01,$03,$00,$02,$01,$02,$00,$01,$FF
-
-BattleTransition_CircleData5:
- db $04,$00,$03,$00,$03,$00,$02,$00,$02,$00,$01,$00,$01,$00,$01,$FF
+BattleTransition_CircleData1: db 2, 3, 5, 4, 9, -1
+BattleTransition_CircleData2: db 1, 1, 2, 2, 4, 2, 4, 2, 3, -1
+BattleTransition_CircleData3: db 2, 1, 3, 1, 4, 1, 4, 1, 4, 1, 3, 1, 2, 1, 1, 1, 1, -1
+BattleTransition_CircleData4: db 4, 1, 4, 0, 3, 1, 3, 0, 2, 1, 2, 0, 1, -1
+BattleTransition_CircleData5: db 4, 0, 3, 0, 3, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, -1
diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm
index 1c85efe9..95c06bf5 100644
--- a/engine/battle/common_text.asm
+++ b/engine/battle/common_text.asm
@@ -5,18 +5,18 @@ PrintBeginningBattleText:
ld a, [wCurMap]
cp POKEMON_TOWER_3F
jr c, .notPokemonTower
- cp MR_FUJIS_HOUSE
+ cp POKEMON_TOWER_7F + 1
jr c, .pokemonTower
.notPokemonTower
- ld a,[wBattleType]
+ ld a, [wBattleType]
cp BATTLE_TYPE_PIKACHU
- jr nz,.notPikachuBattle
- callab IsPlayerPikachuAsleepInParty
- ld e,$24
- jr c,.asm_f4026
- ld e,$a
+ jr nz, .notPikachuBattle
+ callfar IsPlayerPikachuAsleepInParty
+ ld e, $24
+ jr c, .asm_f4026
+ ld e, $a
.asm_f4026
- callab PlayPikachuSoundClip
+ callfar PlayPikachuSoundClip
jr .continue
.notPikachuBattle
ld a, [wEnemyMonSpecies2]
@@ -39,7 +39,7 @@ PrintBeginningBattleText:
and a
jr nz, .doNotDrawPokeballs
push hl
- callab DrawAllPokeballs
+ callfar DrawAllPokeballs
pop hl
.doNotDrawPokeballs
call PrintText
@@ -54,7 +54,7 @@ PrintBeginningBattleText:
ld a, b
and a
jr z, .noSilphScope
- callab LoadEnemyMonData
+ callfar LoadEnemyMonData
jr .notPokemonTower
.noSilphScope
ld hl, EnemyAppearedText
@@ -70,8 +70,8 @@ PrintBeginningBattleText:
call PrintText
ld hl, UnveiledGhostText
call PrintText
- callab LoadEnemyMonData
- callab MarowakAnim
+ callfar LoadEnemyMonData
+ callfar MarowakAnim
ld hl, WildMonAppearedText
call PrintText
@@ -87,28 +87,28 @@ PrintBeginningBattleText:
ret
WildMonAppearedText:
- TX_FAR _WildMonAppearedText
- db "@"
+ text_far _WildMonAppearedText
+ text_end
HookedMonAttackedText:
- TX_FAR _HookedMonAttackedText
- db "@"
+ text_far _HookedMonAttackedText
+ text_end
EnemyAppearedText:
- TX_FAR _EnemyAppearedText
- db "@"
+ text_far _EnemyAppearedText
+ text_end
TrainerWantsToFightText:
- TX_FAR _TrainerWantsToFightText
- db "@"
+ text_far _TrainerWantsToFightText
+ text_end
UnveiledGhostText:
- TX_FAR _UnveiledGhostText
- db "@"
+ text_far _UnveiledGhostText
+ text_end
GhostCantBeIDdText:
- TX_FAR _GhostCantBeIDdText
- db "@"
+ text_far _GhostCantBeIDdText
+ text_end
PrintSendOutMonMessage:
ld hl, wEnemyMonHP
@@ -117,16 +117,16 @@ PrintSendOutMonMessage:
ld hl, GoText
jr z, .printText
xor a
- ld [H_MULTIPLICAND], a
+ ldh [hMultiplicand], a
ld hl, wEnemyMonHP
ld a, [hli]
ld [wLastSwitchInEnemyMonHP], a
- ld [H_MULTIPLICAND + 1], a
+ ldh [hMultiplicand + 1], a
ld a, [hl]
ld [wLastSwitchInEnemyMonHP + 1], a
- ld [H_MULTIPLICAND + 2], a
+ ldh [hMultiplicand + 2], a
ld a, 25
- ld [H_MULTIPLIER], a
+ ldh [hMultiplier], a
call Multiply
ld hl, wEnemyMonMaxHP
ld a, [hli]
@@ -137,9 +137,9 @@ PrintSendOutMonMessage:
rr b
ld a, b
ld b, 4
- ld [H_DIVISOR], a ; enemy mon max HP divided by 4
+ ldh [hDivisor], a ; enemy mon max HP divided by 4
call Divide
- ld a, [H_QUOTIENT + 3] ; a = (enemy mon current HP * 25) / (enemy max HP / 4); this approximates the current percentage of max HP
+ ldh a, [hQuotient + 3] ; a = (enemy mon current HP * 25) / (enemy max HP / 4); this approximates the current percentage of max HP
ld hl, GoText ; 70% or greater
cp 70
jr nc, .printText
@@ -154,39 +154,39 @@ PrintSendOutMonMessage:
jp PrintText
GoText:
- TX_FAR _GoText
- TX_ASM
+ text_far _GoText
+ text_asm
jr PrintPlayerMon1Text
DoItText:
- TX_FAR _DoItText
- TX_ASM
+ text_far _DoItText
+ text_asm
jr PrintPlayerMon1Text
GetmText:
- TX_FAR _GetmText
- TX_ASM
+ text_far _GetmText
+ text_asm
jr PrintPlayerMon1Text
EnemysWeakText:
- TX_FAR _EnemysWeakText
- TX_ASM
+ text_far _EnemysWeakText
+ text_asm
PrintPlayerMon1Text:
ld hl, PlayerMon1Text
ret
PlayerMon1Text:
- TX_FAR _PlayerMon1Text
- db "@"
+ text_far _PlayerMon1Text
+ text_end
RetreatMon:
ld hl, PlayerMon2Text
jp PrintText
PlayerMon2Text:
- TX_FAR _PlayerMon2Text
- TX_ASM
+ text_far _PlayerMon2Text
+ text_asm
push de
push bc
ld hl, wEnemyMonHP + 1
@@ -195,14 +195,14 @@ PlayerMon2Text:
dec hl
ld a, [de]
sub b
- ld [H_MULTIPLICAND + 2], a
+ ldh [hMultiplicand + 2], a
dec de
ld b, [hl]
ld a, [de]
sbc b
- ld [H_MULTIPLICAND + 1], a
+ ldh [hMultiplicand + 1], a
ld a, 25
- ld [H_MULTIPLIER], a
+ ldh [hMultiplier], a
call Multiply
ld hl, wEnemyMonMaxHP
ld a, [hli]
@@ -213,11 +213,11 @@ PlayerMon2Text:
rr b
ld a, b
ld b, 4
- ld [H_DIVISOR], a
+ ldh [hDivisor], a
call Divide
pop bc
pop de
- ld a, [H_QUOTIENT + 3] ; a = ((LastSwitchInEnemyMonHP - CurrentEnemyMonHP) / 25) / (EnemyMonMaxHP / 4)
+ ldh a, [hQuotient + 3] ; a = ((LastSwitchInEnemyMonHP - CurrentEnemyMonHP) / 25) / (EnemyMonMaxHP / 4)
; Assuming that the enemy mon hasn't gained HP since the last switch in,
; a approximates the percentage that the enemy mon's total HP has decreased
; since the last switch in.
@@ -236,18 +236,18 @@ PlayerMon2Text:
ret
EnoughText:
- TX_FAR _EnoughText
- TX_ASM
+ text_far _EnoughText
+ text_asm
jr PrintComeBackText
OKExclamationText:
- TX_FAR _OKExclamationText
- TX_ASM
+ text_far _OKExclamationText
+ text_asm
jr PrintComeBackText
GoodText:
- TX_FAR _GoodText
- TX_ASM
+ text_far _GoodText
+ text_asm
jr PrintComeBackText
PrintComeBackText:
@@ -255,5 +255,5 @@ PrintComeBackText:
ret
ComeBackText:
- TX_FAR _ComeBackText
- db "@"
+ text_far _ComeBackText
+ text_end
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 60146902..f66f509f 100755
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -1,107 +1,17 @@
BattleCore:
-; These are move effects (second value from the Moves table in bank $E).
-ResidualEffects1:
-; most non-side effects
- db CONVERSION_EFFECT
- db HAZE_EFFECT
- db SWITCH_AND_TELEPORT_EFFECT
- db MIST_EFFECT
- db FOCUS_ENERGY_EFFECT
- db CONFUSION_EFFECT
- db HEAL_EFFECT
- db TRANSFORM_EFFECT
- db LIGHT_SCREEN_EFFECT
- db REFLECT_EFFECT
- db POISON_EFFECT
- db PARALYZE_EFFECT
- db SUBSTITUTE_EFFECT
- db MIMIC_EFFECT
- db LEECH_SEED_EFFECT
- db SPLASH_EFFECT
- db -1
-SetDamageEffects:
-; moves that do damage but not through normal calculations
-; e.g., Super Fang, Psywave
- db SUPER_FANG_EFFECT
- db SPECIAL_DAMAGE_EFFECT
- db -1
-ResidualEffects2:
-; non-side effects not included in ResidualEffects1
-; stat-affecting moves, sleep-inflicting moves, and Bide
-; e.g., Meditate, Bide, Hypnosis
- db $01
- db ATTACK_UP1_EFFECT
- db DEFENSE_UP1_EFFECT
- db SPEED_UP1_EFFECT
- db SPECIAL_UP1_EFFECT
- db ACCURACY_UP1_EFFECT
- db EVASION_UP1_EFFECT
- db ATTACK_DOWN1_EFFECT
- db DEFENSE_DOWN1_EFFECT
- db SPEED_DOWN1_EFFECT
- db SPECIAL_DOWN1_EFFECT
- db ACCURACY_DOWN1_EFFECT
- db EVASION_DOWN1_EFFECT
- db BIDE_EFFECT
- db SLEEP_EFFECT
- db ATTACK_UP2_EFFECT
- db DEFENSE_UP2_EFFECT
- db SPEED_UP2_EFFECT
- db SPECIAL_UP2_EFFECT
- db ACCURACY_UP2_EFFECT
- db EVASION_UP2_EFFECT
- db ATTACK_DOWN2_EFFECT
- db DEFENSE_DOWN2_EFFECT
- db SPEED_DOWN2_EFFECT
- db SPECIAL_DOWN2_EFFECT
- db ACCURACY_DOWN2_EFFECT
- db EVASION_DOWN2_EFFECT
- db -1
-AlwaysHappenSideEffects:
-; Attacks that aren't finished after they faint the opponent.
- db DRAIN_HP_EFFECT
- db EXPLODE_EFFECT
- db DREAM_EATER_EFFECT
- db PAY_DAY_EFFECT
- db TWO_TO_FIVE_ATTACKS_EFFECT
- db $1E
- db ATTACK_TWICE_EFFECT
- db RECOIL_EFFECT
- db TWINEEDLE_EFFECT
- db RAGE_EFFECT
- db -1
-SpecialEffects:
-; Effects from arrays 2, 4, and 5B, minus Twineedle and Rage.
-; Includes all effects that do not need to be called at the end of
-; ExecutePlayerMove (or ExecuteEnemyMove), because they have already been handled
- db DRAIN_HP_EFFECT
- db EXPLODE_EFFECT
- db DREAM_EATER_EFFECT
- db PAY_DAY_EFFECT
- db SWIFT_EFFECT
- db TWO_TO_FIVE_ATTACKS_EFFECT
- db $1E
- db CHARGE_EFFECT
- db SUPER_FANG_EFFECT
- db SPECIAL_DAMAGE_EFFECT
- db FLY_EFFECT
- db ATTACK_TWICE_EFFECT
- db JUMP_KICK_EFFECT
- db RECOIL_EFFECT
- ; fallthrough to Next EffectsArray
-SpecialEffectsCont:
-; damaging moves whose effect is executed prior to damage calculation
- db THRASH_PETAL_DANCE_EFFECT
- db TRAPPING_EFFECT
- db -1
+INCLUDE "data/battle/residual_effects_1.asm"
+INCLUDE "data/battle/set_damage_effects.asm"
+INCLUDE "data/battle/residual_effects_2.asm"
+INCLUDE "data/battle/always_happen_effects.asm"
+INCLUDE "data/battle/special_effects.asm"
SlidePlayerAndEnemySilhouettesOnScreen:
call LoadPlayerBackPic
ld a, MESSAGE_BOX ; the usual text box at the bottom of the screen
ld [wTextBoxID], a
call DisplayTextBoxID
- coord hl, 1, 5
+ hlcoord 1, 5
lb bc, 3, 7
call ClearScreenArea
call DisableLCD
@@ -117,7 +27,7 @@ SlidePlayerAndEnemySilhouettesOnScreen:
or c
jr nz, .clearBackgroundLoop
; copy the work RAM tile map to VRAM
- coord hl, 0, 0
+ hlcoord 0, 0
ld de, vBGMap0
ld b, 18 ; number of rows
.copyRowLoop
@@ -138,25 +48,25 @@ SlidePlayerAndEnemySilhouettesOnScreen:
jr nz, .copyRowLoop
call EnableLCD
ld a, $90
- ld [hWY], a
- ld [rWY], a
+ ldh [hWY], a
+ ldh [rWY], a
xor a
- ld [hTilesetType], a
- ld [hSCY], a
+ ldh [hTilesetType], a
+ ldh [hSCY], a
dec a
ld [wUpdateSpritesEnabled], a
call Delay3
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ld b, $70
ld c, $90
ld a, c
- ld [hSCX], a
+ ldh [hSCX], a
call DelayFrame
ld a, %11100100 ; inverted palette for silhouette effect
- ld [rBGP], a
- ld [rOBP0], a
- ld [rOBP1], a
+ ldh [rBGP], a
+ ldh [rOBP0], a
+ ldh [rOBP1], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
@@ -171,26 +81,26 @@ SlidePlayerAndEnemySilhouettesOnScreen:
call SetScrollXForSlidingPlayerBodyLeft ; end background scrolling on line $60
call SlidePlayerHeadLeft
ld a, c
- ld [hSCX], a
+ ldh [hSCX], a
dec c
dec c
jr nz, .slideSilhouettesLoop
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ld a, $31
- ld [hStartTileID], a
- coord hl, 1, 5
+ ldh [hStartTileID], a
+ hlcoord 1, 5
predef CopyUncompressedPicToTilemap
xor a
- ld [hWY], a
- ld [rWY], a
+ ldh [hWY], a
+ ldh [rWY], a
inc a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call Delay3
ld b, SET_PAL_BATTLE
call RunPaletteCommand
call HideSprites
- jpab PrintBeginningBattleText
+ jpfar PrintBeginningBattleText
; when a battle is starting, silhouettes of the player's pic and the enemy's pic are slid onto the screen
; the lower of the player's pic (his body) is part of the background, but his head is a sprite
@@ -211,13 +121,13 @@ SlidePlayerHeadLeft:
ret
SetScrollXForSlidingPlayerBodyLeft:
- ld a, [rLY]
+ ldh a, [rLY]
cp l
jr nz, SetScrollXForSlidingPlayerBodyLeft
ld a, h
- ld [rSCX], a
+ ldh [rSCX], a
.loop
- ld a, [rLY]
+ ldh a, [rLY]
cp h
jr z, .loop
ret
@@ -277,7 +187,7 @@ StartBattle:
ld hl, .outOfSafariBallsText
jp PrintText
.notOutOfSafariBalls
- callab PrintSafariZoneBattleText
+ callfar PrintSafariZoneBattleText
ld a, [wEnemyMonSpeed + 1]
add a
ld b, a ; init b (which is later compared with random value) to (enemy speed % 256) * 2
@@ -306,8 +216,8 @@ StartBattle:
jr EnemyRan ; if b was greater than the random value, the enemy runs
.outOfSafariBallsText
- TX_FAR _OutOfSafariBallsText
- db "@"
+ text_far _OutOfSafariBallsText
+ text_end
.playerSendOutFirstMon
xor a
@@ -331,7 +241,7 @@ StartBattle:
ld [wcf91], a
ld [wBattleMonSpecies2], a
call LoadScreenTilesFromBuffer1
- coord hl, 1, 5
+ hlcoord 1, 5
ld a, $9
call SlideTrainerPicOffScreen
call SaveScreenTilesToBuffer1
@@ -365,16 +275,16 @@ EnemyRan:
ld a, SFX_RUN
call PlaySoundWaitForCurrent
xor a
- ld [H_WHOSETURN], a
- jpab AnimationSlideEnemyMonOff
+ ldh [hWhoseTurn], a
+ jpfar AnimationSlideEnemyMonOff
WildRanText:
- TX_FAR _WildRanText
- db "@"
+ text_far _WildRanText
+ text_end
EnemyRanText:
- TX_FAR _EnemyRanText
- db "@"
+ text_far _EnemyRanText
+ text_end
MainInBattleLoop:
call ReadPlayerMonCurHPAndStatus
@@ -464,7 +374,7 @@ MainInBattleLoop:
jr nz, .specialMoveNotUsed
ld [wPlayerSelectedMove], a
.specialMoveNotUsed
- callab SwitchEnemyMon
+ callfar SwitchEnemyMon
.noLinkBattle
ld a, [wPlayerSelectedMove]
cp QUICK_ATTACK
@@ -497,7 +407,7 @@ MainInBattleLoop:
jr nc, .playerMovesFirst ; if player is faster
jr .enemyMovesFirst ; if enemy is faster
.speedEqual ; 50/50 chance for both players
- ld a, [hSerialConnectionStatus]
+ ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
jr z, .invertOutcome
call BattleRandom
@@ -511,8 +421,8 @@ MainInBattleLoop:
jr .playerMovesFirst
.enemyMovesFirst
ld a, $1
- ld [H_WHOSETURN], a
- callab TrainerAI
+ ldh [hWhoseTurn], a
+ callfar TrainerAI
jr c, .AIActionUsedEnemyFirst
call ExecuteEnemyMove
ld a, [wEscapedFromBattle]
@@ -549,8 +459,8 @@ MainInBattleLoop:
jp z, HandlePlayerMonFainted
call DrawHUDsAndHPBars
ld a, $1
- ld [H_WHOSETURN], a
- callab TrainerAI
+ ldh [hWhoseTurn], a
+ callfar TrainerAI
jr c, .AIActionUsedPlayerFirst
call ExecuteEnemyMove
ld a, [wEscapedFromBattle]
@@ -569,7 +479,7 @@ MainInBattleLoop:
HandlePoisonBurnLeechSeed:
ld hl, wBattleMonHP
ld de, wBattleMonStatus
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playersTurn
ld hl, wEnemyMonHP
@@ -594,7 +504,7 @@ HandlePoisonBurnLeechSeed:
call HandlePoisonBurnLeechSeed_DecreaseOwnHP
.notBurnedOrPoisoned
ld de, wPlayerBattleStatus2
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playersTurn2
ld de, wEnemyBattleStatus2
@@ -603,16 +513,16 @@ HandlePoisonBurnLeechSeed:
add a
jr nc, .notLeechSeeded
push hl
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
push af
xor $1
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
xor a
ld [wAnimationType], a
ld a, ABSORB
call PlayMoveAnimation ; play leech seed animation (from opposing mon)
pop af
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
pop hl
call HandlePoisonBurnLeechSeed_DecreaseOwnHP
call HandlePoisonBurnLeechSeed_IncreaseEnemyHP
@@ -631,16 +541,16 @@ HandlePoisonBurnLeechSeed:
ret
HurtByPoisonText:
- TX_FAR _HurtByPoisonText
- db "@"
+ text_far _HurtByPoisonText
+ text_end
HurtByBurnText:
- TX_FAR _HurtByBurnText
- db "@"
+ text_far _HurtByBurnText
+ text_end
HurtByLeechSeedText:
- TX_FAR _HurtByLeechSeedText
- db "@"
+ text_far _HurtByLeechSeedText
+ text_end
; decreases the mon's current HP by 1/16 of the Max HP (multiplied by number of toxic ticks if active)
; note that the toxic ticks are considered even if the damage is not poison (hence the Leech Seed glitch)
@@ -670,7 +580,7 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP:
.nonZeroDamage
ld hl, wPlayerBattleStatus3
ld de, wPlayerToxicCounter
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playersTurn
ld hl, wEnemyBattleStatus3
@@ -681,7 +591,7 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP:
ld a, [de] ; increment toxic counter
inc a
ld [de], a
- ld hl, $0000
+ ld hl, 0
.toxicTicksLoop
add hl, bc
dec a
@@ -717,7 +627,7 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP:
HandlePoisonBurnLeechSeed_IncreaseEnemyHP:
push hl
ld hl, wEnemyMonMaxHP
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playersTurn
ld hl, wBattleMonMaxHP
@@ -754,23 +664,23 @@ HandlePoisonBurnLeechSeed_IncreaseEnemyHP:
ld [hl], a
ld [wHPBarNewHP], a
.noOverfullHeal
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
xor $1
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
call UpdateCurMonHPBar
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
xor $1
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
pop hl
ret
UpdateCurMonHPBar:
- coord hl, 10, 9 ; tile pointer to player HP bar
- ld a, [H_WHOSETURN]
+ hlcoord 10, 9 ; tile pointer to player HP bar
+ ldh a, [hWhoseTurn]
and a
ld a, $1
jr z, .playersTurn
- coord hl, 2, 2 ; tile pointer to enemy HP bar
+ hlcoord 2, 2 ; tile pointer to enemy HP bar
xor a
.playersTurn
push bc
@@ -866,10 +776,10 @@ FaintEnemyPokemon:
ld hl, wPlayerUsedMove
ld [hli], a
ld [hl], a
- coord hl, 12, 5
- coord de, 12, 6
+ hlcoord 12, 5
+ decoord 12, 6
call SlideDownFaintedMonPic
- coord hl, 0, 0
+ hlcoord 0, 0
lb bc, 4, 11
call ClearScreenArea
ld a, [wIsInBattle]
@@ -936,7 +846,7 @@ FaintEnemyPokemon:
.giveExpToMonsThatFought
xor a
ld [wBoostExpByExpAll], a
- callab GainExperience
+ callfar GainExperience
pop af
ret z ; return if no exp all
@@ -954,11 +864,11 @@ FaintEnemyPokemon:
jr nz, .gainExpFlagsLoop
ld a, b
ld [wPartyGainExpFlags], a
- jpab GainExperience
+ jpfar GainExperience
EnemyMonFaintedText:
- TX_FAR _EnemyMonFaintedText
- db "@"
+ text_far _EnemyMonFaintedText
+ text_end
EndLowHealthAlarm:
; This function is called when the player has the won the battle. It turns off
@@ -993,11 +903,11 @@ ReplaceFaintedEnemyMon:
ld e, $30
call GetBattleHealthBarColor
setpal SHADE_BLACK, SHADE_DARK, SHADE_LIGHT, SHADE_WHITE
- ld [rOBP0], a
- ld [rOBP1], a
+ ldh [rOBP0], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
- callab DrawEnemyPokeballs
+ callfar DrawEnemyPokeballs
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jr nz, .notLinkBattle
@@ -1025,7 +935,7 @@ TrainerBattleVictory:
ld b, MUSIC_DEFEATED_TRAINER
.gymleader
ld a, [wTrainerClass]
- cp SONY3 ; final battle against rival
+ cp RIVAL3 ; final battle against rival
jr nz, .notrival
ld b, MUSIC_DEFEATED_GYM_LEADER
ld hl, wFlags_D733
@@ -1053,12 +963,12 @@ TrainerBattleVictory:
predef_jump AddBCDPredef
MoneyForWinningText:
- TX_FAR _MoneyForWinningText
- db "@"
+ text_far _MoneyForWinningText
+ text_end
TrainerDefeatedText:
- TX_FAR _TrainerDefeatedText
- db "@"
+ text_far _TrainerDefeatedText
+ text_end
PlayBattleVictoryMusic:
push af
@@ -1124,11 +1034,11 @@ RemoveFaintedPlayerMon:
ld [hl], a
ld [wBattleMonStatus], a
call ReadPlayerMonCurHPAndStatus
- coord hl, 9, 7
+ hlcoord 9, 7
lb bc, 5, 11
call ClearScreenArea
- coord hl, 1, 10
- coord de, 1, 11
+ hlcoord 1, 10
+ decoord 1, 11
call SlideDownFaintedMonPic
ld a, $1
ld [wBattleResult], a
@@ -1143,10 +1053,10 @@ RemoveFaintedPlayerMon:
ld a, [wPlayerMonNumber]
ld [wWhichPokemon], a
- callab IsThisPartymonStarterPikachu_Party
+ callfar IsThisPartymonStarterPikachu_Party
jr nc, .notPlayerPikachu
ld e, $3
- callab PlayPikachuSoundClip
+ callfar PlayPikachuSoundClip
jr .printText
.notPlayerPikachu
ld a, [wBattleMonSpecies]
@@ -1173,8 +1083,8 @@ RemoveFaintedPlayerMon:
ret
PlayerMonFaintedText:
- TX_FAR _PlayerMonFaintedText
- db "@"
+ text_far _PlayerMonFaintedText
+ text_end
; asks if you want to use next mon
; stores whether you ran in C flag
@@ -1188,7 +1098,7 @@ DoUseNextMonDialogue:
ld hl, UseNextMonText
call PrintText
.displayYesNoBox
- coord hl, 13, 9
+ hlcoord 13, 9
lb bc, 10, 14
ld a, TWO_OPTION_MENU
ld [wTextBoxID], a
@@ -1207,8 +1117,8 @@ DoUseNextMonDialogue:
jp TryRunningFromBattle
UseNextMonText:
- TX_FAR _UseNextMonText
- db "@"
+ text_far _UseNextMonText
+ text_end
; choose next player mon to send out
; stores whether enemy mon has no HP left in Z flag
@@ -1263,9 +1173,9 @@ HandlePlayerBlackOut:
cp LINK_STATE_BATTLING
jr z, .notSony1Battle
ld a, [wCurOpponent]
- cp OPP_SONY1
+ cp OPP_RIVAL1
jr nz, .notSony1Battle
- coord hl, 0, 0 ; sony 1 battle
+ hlcoord 0, 0 ; sony 1 battle
lb bc, 8, 21
call ClearScreenArea
call ScrollTrainerPicAfterBattle
@@ -1294,19 +1204,19 @@ HandlePlayerBlackOut:
ret
Sony1WinText:
- TX_FAR _Sony1WinText
- db "@"
+ text_far _Sony1WinText
+ text_end
PlayerBlackedOutText2:
- TX_FAR _PlayerBlackedOutText2
- db "@"
+ text_far _PlayerBlackedOutText2
+ text_end
LinkBattleLostText:
- TX_FAR _LinkBattleLostText
- db "@"
+ text_far _LinkBattleLostText
+ text_end
; slides pic of fainted mon downwards until it disappears
-; bug: when this is called, [H_AUTOBGTRANSFERENABLED] is non-zero, so there is screen tearing
+; bug: when this is called, [hAutoBGTransferEnabled] is non-zero, so there is screen tearing
SlideDownFaintedMonPic:
ld a, [wd730]
push af
@@ -1359,9 +1269,9 @@ SevenSpacesText:
; slides the player or enemy trainer off screen
; a is the number of tiles to slide it horizontally (always 9 for the player trainer or 8 for the enemy trainer)
; if a is 8, the slide is to the right, else it is to the left
-; bug: when this is called, [H_AUTOBGTRANSFERENABLED] is non-zero, so there is screen tearing
+; bug: when this is called, [hAutoBGTransferEnabled] is non-zero, so there is screen tearing
SlideTrainerPicOffScreen:
- ld [hSlideAmount], a
+ ldh [hSlideAmount], a
ld c, a
.slideStepLoop ; each iteration, the trainer pic is slid one tile left/right
push bc
@@ -1369,10 +1279,10 @@ SlideTrainerPicOffScreen:
ld b, 7 ; number of rows
.rowLoop
push hl
- ld a, [hSlideAmount]
+ ldh a, [hSlideAmount]
ld c, a
.columnLoop
- ld a, [hSlideAmount]
+ ldh a, [hSlideAmount]
cp 8
jr z, .slideRight
.slideLeft ; slide player sprite off screen
@@ -1435,7 +1345,7 @@ EnemySendOutFirstMon:
ld [wAICount], a
ld hl, wPlayerBattleStatus1
res 5, [hl]
- coord hl, 18, 0
+ hlcoord 18, 0
ld a, 8
call SlideTrainerPicOffScreen
call PrintEmptyString
@@ -1505,7 +1415,7 @@ EnemySendOutFirstMon:
jr nz, .next4
ld hl, TrainerAboutToUseText
call PrintText
- coord hl, 0, 7
+ hlcoord 0, 7
lb bc, 8, 1
ld a, TWO_OPTION_MENU
ld [wTextBoxID], a
@@ -1540,7 +1450,7 @@ EnemySendOutFirstMon:
call LoadScreenTilesFromBuffer1
.next4
call ClearSprites
- coord hl, 0, 0
+ hlcoord 0, 0
lb bc, 4, 11
call ClearScreenArea
ld b, SET_PAL_BATTLE
@@ -1555,8 +1465,8 @@ EnemySendOutFirstMon:
ld de, vFrontPic
call LoadMonFrontSprite
ld a, -$31
- ld [hStartTileID], a
- coord hl, 15, 6
+ ldh [hStartTileID], a
+ hlcoord 15, 6
predef AnimateSendingOutMon
ld a, [wEnemyMonSpecies2]
call PlayCry
@@ -1571,16 +1481,16 @@ EnemySendOutFirstMon:
jp SwitchPlayerMon
TrainerAboutToUseText:
- TX_FAR _TrainerAboutToUseText
- db "@"
+ text_far _TrainerAboutToUseText
+ text_end
TrainerSentOutText:
- TX_FAR _TrainerSentOutText
- db "@"
+ text_far _TrainerSentOutText
+ text_end
; tests if the player has any pokemon that are not fainted
; sets d = 0 if all fainted, d != 0 if some mons are still alive
-AnyPartyAlive:
+AnyPartyAlive::
ld a, [wPartyCount]
ld e, a
xor a
@@ -1616,8 +1526,8 @@ HasMonFainted:
ret
NoWillText:
- TX_FAR _NoWillText
- db "@"
+ text_far _NoWillText
+ text_end
; try to run from battle (hl = player speed, de = enemy speed)
; stores whether the attempt was successful in carry flag
@@ -1639,32 +1549,32 @@ TryRunningFromBattle:
inc a
ld [wNumRunAttempts], a
ld a, [hli]
- ld [H_MULTIPLICAND + 1], a
+ ldh [hMultiplicand + 1], a
ld a, [hl]
- ld [H_MULTIPLICAND + 2], a
+ ldh [hMultiplicand + 2], a
ld a, [de]
- ld [hEnemySpeed], a
+ ldh [hEnemySpeed], a
inc de
ld a, [de]
- ld [hEnemySpeed + 1], a
+ ldh [hEnemySpeed + 1], a
call LoadScreenTilesFromBuffer1
- ld de, H_MULTIPLICAND + 1
+ ld de, hMultiplicand + 1
ld hl, hEnemySpeed
ld c, 2
call StringCmp
jr nc, .canEscape ; jump if player speed greater than enemy speed
xor a
- ld [H_MULTIPLICAND], a
+ ldh [hMultiplicand], a
ld a, 32
- ld [H_MULTIPLIER], a
+ ldh [hMultiplier], a
call Multiply ; multiply player speed by 32
- ld a, [H_PRODUCT + 2]
- ld [H_DIVIDEND], a
- ld a, [H_PRODUCT + 3]
- ld [H_DIVIDEND + 1], a
- ld a, [hEnemySpeed]
+ ldh a, [hProduct + 2]
+ ldh [hDividend], a
+ ldh a, [hProduct + 3]
+ ldh [hDividend + 1], a
+ ldh a, [hEnemySpeed]
ld b, a
- ld a, [hEnemySpeed + 1]
+ ldh a, [hEnemySpeed + 1]
; divide enemy speed by 4
srl b
rr a
@@ -1672,10 +1582,10 @@ TryRunningFromBattle:
rr a
and a
jr z, .canEscape ; jump if enemy speed divided by 4, mod 256 is 0
- ld [H_DIVISOR], a ; ((enemy speed / 4) % 256)
+ ldh [hDivisor], a ; ((enemy speed / 4) % 256)
ld b, $2
call Divide ; divide (player speed * 32) by ((enemy speed / 4) % 256)
- ld a, [H_QUOTIENT + 2]
+ ldh a, [hQuotient + 2]
and a ; is the quotient greater than 256?
jr nz, .canEscape ; if so, the player can escape
ld a, [wNumRunAttempts]
@@ -1685,15 +1595,15 @@ TryRunningFromBattle:
dec c
jr z, .compareWithRandomValue
ld b, 30
- ld a, [H_QUOTIENT + 3]
+ ldh a, [hQuotient + 3]
add b
- ld [H_QUOTIENT + 3], a
+ ldh [hQuotient + 3], a
jr c, .canEscape
jr .loop
.compareWithRandomValue
call BattleRandom
ld b, a
- ld a, [H_QUOTIENT + 3]
+ ldh a, [hQuotient + 3]
cp b
jr nc, .canEscape ; if the random value was less than or equal to the quotient
; plus 30 times the number of attempts, the player can escape
@@ -1741,16 +1651,16 @@ TryRunningFromBattle:
ret
CantEscapeText:
- TX_FAR _CantEscapeText
- db "@"
+ text_far _CantEscapeText
+ text_end
NoRunningText:
- TX_FAR _NoRunningText
- db "@"
+ text_far _NoRunningText
+ text_end
GotAwayText:
- TX_FAR _GotAwayText
- db "@"
+ text_far _GotAwayText
+ text_end
; copies from party data to battle mon data when sending out a new player mon
LoadBattleMonFromParty:
@@ -1851,7 +1761,7 @@ LoadEnemyMonFromParty:
ret
SendOutMon:
- callab PrintSendOutMonMessage
+ callfar PrintSendOutMonMessage
ld hl, wEnemyMonHP
ld a, [hli]
or [hl] ; is enemy mon HP zero?
@@ -1861,7 +1771,7 @@ SendOutMon:
call DrawPlayerHUDAndHPBar
predef LoadMonBackPic
xor a
- ld [hStartTileID], a
+ ldh [hStartTileID], a
ld hl, wBattleAndStartSavedMenuItem
ld [hli], a
ld [hl], a
@@ -1884,27 +1794,27 @@ SendOutMon:
call RunPaletteCommand
ld hl, wEnemyBattleStatus1
res USING_TRAPPING_MOVE, [hl]
- callab IsThisPartymonStarterPikachu
+ callfar IsThisPartymonStarterPikachu
jr c, .starterPikachu
ld a, $1
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
ld a, POOF_ANIM
call PlayMoveAnimation
- coord hl, 4, 11
+ hlcoord 4, 11
predef AnimateSendingOutMon
jr .playRegularCry
.starterPikachu
xor a
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- callab StarterPikachuBattleEntranceAnimation
- callab IsPlayerPikachuAsleepInParty
+ ldh [hAutoBGTransferEnabled], a
+ callfar StarterPikachuBattleEntranceAnimation
+ callfar IsPlayerPikachuAsleepInParty
ld e, $24
jr c, .asm_3cd81
ld e, $a
.asm_3cd81
- callab PlayPikachuSoundClip
+ callfar PlayPikachuSoundClip
jr .done
.playRegularCry
ld a, [wcf91]
@@ -1919,42 +1829,42 @@ AnimateRetreatingPlayerMon:
push af
ld a, [wPlayerMonNumber]
ld [wWhichPokemon], a
- callab IsThisPartymonStarterPikachu
+ callfar IsThisPartymonStarterPikachu
pop bc
ld a, b
ld [wWhichPokemon], a
jr c, .starterPikachu
- coord hl, 1, 5
+ hlcoord 1, 5
lb bc, 7, 7
call ClearScreenArea
- coord hl, 3, 7
+ hlcoord 3, 7
lb bc, 5, 5
xor a
ld [wDownscaledMonSize], a
- ld [hBaseTileID], a
+ ldh [hBaseTileID], a
predef CopyDownscaledMonTiles
ld c, 4
call DelayFrames
call .clearScreenArea
- coord hl, 4, 9
+ hlcoord 4, 9
lb bc, 3, 3
ld a, 1
ld [wDownscaledMonSize], a
xor a
- ld [hBaseTileID], a
+ ldh [hBaseTileID], a
predef CopyDownscaledMonTiles
call Delay3
call .clearScreenArea
ld a, $4c
- Coorda 5, 11
+ ldcoord_a 5, 11
jr .clearScreenArea
.starterPikachu
xor a
- ld [H_WHOSETURN], a
- callab AnimationSlideMonOff
+ ldh [hWhoseTurn], a
+ callfar AnimationSlideMonOff
ret
.clearScreenArea
- coord hl, 1, 5
+ hlcoord 1, 5
lb bc, 7, 7
call ClearScreenArea
ret
@@ -1977,15 +1887,15 @@ DrawHUDsAndHPBars:
DrawPlayerHUDAndHPBar:
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- coord hl, 9, 7
+ ldh [hAutoBGTransferEnabled], a
+ hlcoord 9, 7
lb bc, 5, 11
call ClearScreenArea
- callab PlacePlayerHUDTiles
- coord hl, 18, 9
+ callfar PlacePlayerHUDTiles
+ hlcoord 18, 9
ld [hl], $73
ld de, wBattleMonNick
- coord hl, 10, 7
+ hlcoord 10, 7
call CenterMonName
call PlaceString
ld hl, wBattleMonSpecies
@@ -1996,7 +1906,7 @@ DrawPlayerHUDAndHPBar:
ld de, wLoadedMonLevel
ld bc, wBattleMonPP - wBattleMonLevel
call CopyData
- coord hl, 14, 8
+ hlcoord 14, 8
push hl
inc hl
ld de, wLoadedMonStatus
@@ -2007,10 +1917,10 @@ DrawPlayerHUDAndHPBar:
.doNotPrintLevel
ld a, [wLoadedMonSpecies]
ld [wcf91], a
- coord hl, 10, 9
+ hlcoord 10, 9
predef DrawHP
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ld hl, wPlayerHPBarColor
call GetBattleHealthBarColor
ld hl, wBattleMonHP
@@ -2038,16 +1948,16 @@ DrawPlayerHUDAndHPBar:
DrawEnemyHUDAndHPBar:
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- coord hl, 0, 0
+ ldh [hAutoBGTransferEnabled], a
+ hlcoord 0, 0
lb bc, 4, 12
call ClearScreenArea
- callab PlaceEnemyHUDTiles
+ callfar PlaceEnemyHUDTiles
ld de, wEnemyMonNick
- coord hl, 1, 0
+ hlcoord 1, 0
call CenterMonName
call PlaceString
- coord hl, 4, 1
+ hlcoord 4, 1
push hl
inc hl
ld de, wEnemyMonStatus
@@ -2060,9 +1970,9 @@ DrawEnemyHUDAndHPBar:
.skipPrintLevel
ld hl, wEnemyMonHP
ld a, [hli]
- ld [H_MULTIPLICAND + 1], a
+ ldh [hMultiplicand + 1], a
ld a, [hld]
- ld [H_MULTIPLICAND + 2], a
+ ldh [hMultiplicand + 2], a
or [hl] ; is current HP zero?
jr nz, .hpNonzero
; current HP is 0
@@ -2073,45 +1983,45 @@ DrawEnemyHUDAndHPBar:
jp .drawHPBar
.hpNonzero
xor a
- ld [H_MULTIPLICAND], a
+ ldh [hMultiplicand], a
ld a, 48
- ld [H_MULTIPLIER], a
+ ldh [hMultiplier], a
call Multiply ; multiply current HP by 48
ld hl, wEnemyMonMaxHP
ld a, [hli]
ld b, a
ld a, [hl]
- ld [H_DIVISOR], a
+ ldh [hDivisor], a
ld a, b
and a ; is max HP > 255?
jr z, .doDivide
; if max HP > 255, scale both (current HP * 48) and max HP by dividing by 4 so that max HP fits in one byte
; (it needs to be one byte so it can be used as the divisor for the Divide function)
- ld a, [H_DIVISOR]
+ ldh a, [hDivisor]
srl b
rr a
srl b
rr a
- ld [H_DIVISOR], a
- ld a, [H_PRODUCT + 2]
+ ldh [hDivisor], a
+ ldh a, [hProduct + 2]
ld b, a
srl b
- ld a, [H_PRODUCT + 3]
+ ldh a, [hProduct + 3]
rr a
srl b
rr a
- ld [H_PRODUCT + 3], a
+ ldh [hProduct + 3], a
ld a, b
- ld [H_PRODUCT + 2], a
+ ldh [hProduct + 2], a
.doDivide
- ld a, [H_PRODUCT + 2]
- ld [H_DIVIDEND], a
- ld a, [H_PRODUCT + 3]
- ld [H_DIVIDEND + 1], a
+ ldh a, [hProduct + 2]
+ ldh [hDividend], a
+ ldh a, [hProduct + 3]
+ ldh [hDividend + 1], a
ld a, $2
ld b, a
call Divide ; divide (current HP * 48) by max HP
- ld a, [H_QUOTIENT + 3]
+ ldh a, [hQuotient + 3]
; set variables for DrawHPBar
ld e, a
ld a, $6
@@ -2120,10 +2030,10 @@ DrawEnemyHUDAndHPBar:
.drawHPBar
xor a
ld [wHPBarType], a
- coord hl, 2, 2
+ hlcoord 2, 2
call DrawHPBar
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ld hl, wEnemyHPBarColor
GetBattleHealthBarColor:
@@ -2161,7 +2071,7 @@ CenterMonName:
pop de
ret
-DisplayBattleMenu:
+DisplayBattleMenu::
call LoadScreenTilesFromBuffer1 ; restore saved screen
ld a, [wBattleType]
and a
@@ -2206,12 +2116,12 @@ DisplayBattleMenu:
ld bc, NAME_LENGTH
call CopyData
; the following simulates the keystrokes by drawing menus on screen
- coord hl, 9, 14
+ hlcoord 9, 14
ld [hl], "▶"
ld c, 20
call DelayFrames
ld [hl], " "
- coord hl, 9, 16
+ hlcoord 9, 16
ld [hl], "▶"
ld c, 20
call DelayFrames
@@ -2238,14 +2148,14 @@ DisplayBattleMenu:
ld a, " "
jr z, .safariLeftColumn
; put cursor in left column for normal battle menu (i.e. when it's not a Safari battle)
- Coorda 15, 14 ; clear upper cursor position in right column
- Coorda 15, 16 ; clear lower cursor position in right column
+ ldcoord_a 15, 14 ; clear upper cursor position in right column
+ ldcoord_a 15, 16 ; clear lower cursor position in right column
ld b, $9 ; top menu item X
jr .leftColumn_WaitForInput
.safariLeftColumn
- Coorda 13, 14
- Coorda 13, 16
- coord hl, 7, 14
+ ldcoord_a 13, 14
+ ldcoord_a 13, 16
+ hlcoord 7, 14
ld de, wNumSafariBalls
lb bc, 1, 2
call PrintNumber
@@ -2271,14 +2181,14 @@ DisplayBattleMenu:
ld a, " "
jr z, .safariRightColumn
; put cursor in right column for normal battle menu (i.e. when it's not a Safari battle)
- Coorda 9, 14 ; clear upper cursor position in left column
- Coorda 9, 16 ; clear lower cursor position in left column
+ ldcoord_a 9, 14 ; clear upper cursor position in left column
+ ldcoord_a 9, 16 ; clear lower cursor position in left column
ld b, $f ; top menu item X
jr .rightColumn_WaitForInput
.safariRightColumn
- Coorda 1, 14 ; clear upper cursor position in left column
- Coorda 1, 16 ; clear lower cursor position in left column
- coord hl, 7, 14
+ ldcoord_a 1, 14 ; clear upper cursor position in left column
+ ldcoord_a 1, 16 ; clear lower cursor position in left column
+ hlcoord 7, 14
ld de, wNumSafariBalls
lb bc, 1, 2
call PrintNumber
@@ -2348,8 +2258,8 @@ DisplayBattleMenu:
jp DisplayBattleMenu
.RunAwayText
- TX_FAR _RunAwayText
- db "@"
+ text_far _RunAwayText
+ text_end
.upperLeftMenuItemWasNotSelected ; a menu item other than the upper left item was selected
cp $2
@@ -2485,8 +2395,8 @@ UseBagItem:
ret
ItemsCantBeUsedHereText:
- TX_FAR _ItemsCantBeUsedHereText
- db "@"
+ text_far _ItemsCantBeUsedHereText
+ text_end
PartyMenuOrRockOrRun:
dec a ; was Run selected?
@@ -2517,7 +2427,7 @@ PartyMenuOrRockOrRun:
call GBPalNormal
jp DisplayBattleMenu
.partyMonDeselected
- coord hl, 11, 11
+ hlcoord 11, 11
ld bc, 6 * SCREEN_WIDTH + 9
ld a, " "
call FillMemory
@@ -2562,7 +2472,7 @@ PartyMenuOrRockOrRun:
predef StatusScreen2
; now we need to reload the enemy mon pic
ld a, 1
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
ld a, [wEnemyBattleStatus2]
bit HAS_SUBSTITUTE_UP, a ; does the enemy mon have a substitute?
ld hl, AnimationSubstitute
@@ -2609,7 +2519,7 @@ PartyMenuOrRockOrRun:
; fall through to SwitchPlayerMon
SwitchPlayerMon:
- callab RetreatMon
+ callfar RetreatMon
ld c, 50
call DelayFrames
call AnimateRetreatingPlayerMon
@@ -2632,8 +2542,8 @@ SwitchPlayerMon:
ret
AlreadyOutText:
- TX_FAR _AlreadyOutText
- db "@"
+ text_far _AlreadyOutText
+ text_end
BattleMenu_RunWasSelected:
call LoadScreenTilesFromBuffer1
@@ -2662,18 +2572,18 @@ MoveSelectionMenu:
ld de, wMoves
ld bc, NUM_MOVES
call CopyData
- callab FormatMovesString
+ callfar FormatMovesString
ret
.writemoves
ld de, wMovesString
- ld a, [hFlags_0xFFFA]
+ ldh a, [hFlagsFFFA]
set 2, a
- ld [hFlags_0xFFFA], a
+ ldh [hFlagsFFFA], a
call PlaceString
- ld a, [hFlags_0xFFFA]
+ ldh a, [hFlagsFFFA]
res 2, a
- ld [hFlags_0xFFFA], a
+ ldh [hFlagsFFFA], a
ret
.regularmenu
@@ -2681,17 +2591,17 @@ MoveSelectionMenu:
ret z
ld hl, wBattleMonMoves
call .loadmoves
- coord hl, 4, 12
+ hlcoord 4, 12
lb bc, 4, 14
di ; out of pure coincidence, it is possible for vblank to occur between the di and ei
; so it is necessary to put the di ei block to not cause tearing
call TextBoxBorder
- coord hl, 4, 12
+ hlcoord 4, 12
ld [hl], $7a
- coord hl, 10, 12
+ hlcoord 10, 12
ld [hl], $7e
ei
- coord hl, 6, 13
+ hlcoord 6, 13
call .writemoves
ld b, $5
ld a, $c
@@ -2699,10 +2609,10 @@ MoveSelectionMenu:
.mimicmenu
ld hl, wEnemyMonMoves
call .loadmoves
- coord hl, 0, 7
+ hlcoord 0, 7
lb bc, 4, 14
call TextBoxBorder
- coord hl, 2, 8
+ hlcoord 2, 8
call .writemoves
ld b, $1
ld a, $7
@@ -2713,10 +2623,10 @@ MoveSelectionMenu:
ld bc, wPartyMon2 - wPartyMon1
call AddNTimes
call .loadmoves
- coord hl, 4, 7
+ hlcoord 4, 7
lb bc, 4, 14
call TextBoxBorder
- coord hl, 6, 8
+ hlcoord 6, 8
call .writemoves
ld b, $5
ld a, $7
@@ -2770,7 +2680,7 @@ SelectMenuItem:
jr z, .battleselect
dec a
jr nz, .select
- coord hl, 1, 14
+ hlcoord 1, 14
ld de, WhichTechniqueString
call PlaceString
jr .select
@@ -2782,16 +2692,16 @@ SelectMenuItem:
ld a, [wMenuItemToSwap]
and a
jr z, .select
- coord hl, 5, 13
+ hlcoord 5, 13
dec a
ld bc, SCREEN_WIDTH
call AddNTimes
ld [hl], "▷"
.select
- ld hl, hFlags_0xFFFA
+ ld hl, hFlagsFFFA
set 1, [hl]
call HandleMenuInput
- ld hl, hFlags_0xFFFA
+ ld hl, hFlagsFFFA
res 1, [hl]
bit 6, a
jp nz, SelectMenuItem_CursorUp ; up
@@ -2860,12 +2770,12 @@ SelectMenuItem:
jp MoveSelectionMenu
MoveNoPPText:
- TX_FAR _MoveNoPPText
- db "@"
+ text_far _MoveNoPPText
+ text_end
MoveDisabledText:
- TX_FAR _MoveDisabledText
- db "@"
+ text_far _MoveDisabledText
+ text_end
WhichTechniqueString:
db "WHICH TECHNIQUE?@"
@@ -2899,7 +2809,7 @@ Func_3d4f5:
jr nz, .asm_3d4fd
ld a, $1
.asm_3d4fd
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
call LoadScreenTilesFromBuffer1
call Func_3d536
ld a, [wTestBattlePlayerSelectedMove]
@@ -2909,7 +2819,7 @@ Func_3d4f5:
xor a
ld [wAnimationType], a
predef MoveAnimation
- callab Func_78e98
+ callfar Func_78e98
jp MoveSelectionMenu
Func_3d523:
@@ -2925,10 +2835,10 @@ asm_3d52d:
jp MoveSelectionMenu
Func_3d536:
- coord hl, 10, 16
+ hlcoord 10, 16
lb bc, 2, 10
call ClearScreenArea
- coord hl, 10, 17
+ hlcoord 10, 17
ld de, wTestBattlePlayerSelectedMove
lb bc, LEADING_ZEROES | 1, 3
call PrintNumber
@@ -2939,7 +2849,7 @@ Func_3d536:
ret nc
ld [wd11e], a
call GetMoveName
- coord hl, 13, 17
+ hlcoord 13, 17
jp PlaceString
AnyMoveToSelect:
@@ -2989,8 +2899,8 @@ AnyMoveToSelect:
ret
NoMovesLeftText:
- TX_FAR _NoMovesLeftText
- db "@"
+ text_far _NoMovesLeftText
+ text_end
SwapMovesInMenu:
ld a, [wPlayerBattleStatus3]
@@ -3073,8 +2983,8 @@ SwapMovesInMenu:
PrintMenuItem:
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- coord hl, 0, 8
+ ldh [hAutoBGTransferEnabled], a
+ hlcoord 0, 8
lb bc, 3, 9
call TextBoxBorder
ld a, [wPlayerDisabledMove]
@@ -3086,7 +2996,7 @@ PrintMenuItem:
ld a, [wCurrentMenuItem]
cp b
jr nz, .notDisabled
- coord hl, 1, 10
+ hlcoord 1, 10
ld de, DisabledText
call PlaceString
jr .moveDisabled
@@ -3094,7 +3004,7 @@ PrintMenuItem:
ld hl, wCurrentMenuItem
dec [hl]
xor a
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
ld hl, wBattleMonMoves
ld a, [wCurrentMenuItem]
ld c, a
@@ -3107,7 +3017,7 @@ PrintMenuItem:
ld [wWhichPokemon], a
ld a, BATTLE_MON_DATA
ld [wMonDataLocation], a
- callab GetMaxPP
+ callfar GetMaxPP
ld hl, wCurrentMenuItem
ld c, [hl]
inc [hl]
@@ -3118,27 +3028,27 @@ PrintMenuItem:
and $3f
ld [wcd6d], a
; print TYPE/<type> and <curPP>/<maxPP>
- coord hl, 1, 9
+ hlcoord 1, 9
ld de, TypeText
call PlaceString
- coord hl, 7, 11
+ hlcoord 7, 11
ld [hl], "/"
- coord hl, 5, 9
+ hlcoord 5, 9
ld [hl], "/"
- coord hl, 5, 11
+ hlcoord 5, 11
ld de, wcd6d
lb bc, 1, 2
call PrintNumber
- coord hl, 8, 11
+ hlcoord 8, 11
ld de, wMaxPP
lb bc, 1, 2
call PrintNumber
call GetCurrentMove
- coord hl, 2, 10
+ hlcoord 2, 10
predef PrintMoveType
.moveDisabled
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
jp Delay3
DisabledText:
@@ -3202,7 +3112,7 @@ SelectEnemyMove:
ld a, [wIsInBattle]
dec a
jr z, .chooseRandomMove ; wild encounter
- callab AIEnemyTrainerChooseMoves
+ callfar AIEnemyTrainerChooseMoves
.chooseRandomMove
push hl
call BattleRandom
@@ -3267,7 +3177,7 @@ LinkBattleExchangeData:
ld a, b
.doExchange
ld [wSerialExchangeNybbleSendData], a
- callab PrintWaitingText
+ callfar PrintWaitingText
.syncLoop1
call Serial_ExchangeNybble
call DelayFrame
@@ -3290,7 +3200,7 @@ LinkBattleExchangeData:
ExecutePlayerMove:
xor a
- ld [H_WHOSETURN], a ; set player's turn
+ ldh [hWhoseTurn], a ; set player's turn
ld a, [wPlayerSelectedMove]
inc a
jp z, ExecutePlayerMoveDone ; for selected move = FF, skip most of player's turn
@@ -3443,7 +3353,7 @@ MirrorMoveCheck:
.moveDidNotMiss
call ApplyAttackToEnemyPokemon
call PrintCriticalOHKOText
- callab DisplayEffectiveness
+ callfar DisplayEffectiveness
ld a, 1
ld [wMoveDidntMiss], a
.notDone
@@ -3486,8 +3396,8 @@ MirrorMoveCheck:
jp ExecutePlayerMoveDone
MultiHitText:
- TX_FAR _MultiHitText
- db "@"
+ text_far _MultiHitText
+ text_end
ExecutePlayerMoveDone:
xor a
@@ -3499,29 +3409,29 @@ PrintGhostText:
; print the ghost battle messages
call IsGhostBattle
ret nz
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr nz, .Ghost
- ld a, [wBattleMonStatus] ; player’s turn
+ ld a, [wBattleMonStatus] ; player's turn
and SLP | (1 << FRZ)
ret nz
ld hl, ScaredText
call PrintText
xor a
ret
-.Ghost ; ghost’s turn
+.Ghost ; ghost's turn
ld hl, GetOutText
call PrintText
xor a
ret
ScaredText:
- TX_FAR _ScaredText
- db "@"
+ text_far _ScaredText
+ text_end
GetOutText:
- TX_FAR _GetOutText
- db "@"
+ text_far _GetOutText
+ text_end
IsGhostBattle:
ld a, [wIsInBattle]
@@ -3804,69 +3714,69 @@ CheckPlayerStatusConditions:
ret
FastAsleepText:
- TX_FAR _FastAsleepText
- db "@"
+ text_far _FastAsleepText
+ text_end
WokeUpText:
- TX_FAR _WokeUpText
- db "@"
+ text_far _WokeUpText
+ text_end
IsFrozenText:
- TX_FAR _IsFrozenText
- db "@"
+ text_far _IsFrozenText
+ text_end
FullyParalyzedText:
- TX_FAR _FullyParalyzedText
- db "@"
+ text_far _FullyParalyzedText
+ text_end
FlinchedText:
- TX_FAR _FlinchedText
- db "@"
+ text_far _FlinchedText
+ text_end
MustRechargeText:
- TX_FAR _MustRechargeText
- db "@"
+ text_far _MustRechargeText
+ text_end
DisabledNoMoreText:
- TX_FAR _DisabledNoMoreText
- db "@"
+ text_far _DisabledNoMoreText
+ text_end
IsConfusedText:
- TX_FAR _IsConfusedText
- db "@"
+ text_far _IsConfusedText
+ text_end
HurtItselfText:
- TX_FAR _HurtItselfText
- db "@"
+ text_far _HurtItselfText
+ text_end
ConfusedNoMoreText:
- TX_FAR _ConfusedNoMoreText
- db "@"
+ text_far _ConfusedNoMoreText
+ text_end
SavingEnergyText:
- TX_FAR _SavingEnergyText
- db "@"
+ text_far _SavingEnergyText
+ text_end
UnleashedEnergyText:
- TX_FAR _UnleashedEnergyText
- db "@"
+ text_far _UnleashedEnergyText
+ text_end
ThrashingAboutText:
- TX_FAR _ThrashingAboutText
- db "@"
+ text_far _ThrashingAboutText
+ text_end
AttackContinuesText:
- TX_FAR _AttackContinuesText
- db "@"
+ text_far _AttackContinuesText
+ text_end
CantMoveText:
- TX_FAR _CantMoveText
- db "@"
+ text_far _CantMoveText
+ text_end
PrintMoveIsDisabledText:
ld hl, wPlayerSelectedMove
ld de, wPlayerBattleStatus1
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .removeChargingUp
inc hl
@@ -3882,8 +3792,8 @@ PrintMoveIsDisabledText:
jp PrintText
MoveIsDisabledText:
- TX_FAR _MoveIsDisabledText
- db "@"
+ text_far _MoveIsDisabledText
+ text_end
HandleSelfConfusionDamage:
ld hl, HurtItselfText
@@ -3922,11 +3832,11 @@ HandleSelfConfusionDamage:
xor a
ld [wAnimationType], a
inc a
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
call PlayMoveAnimation
call DrawPlayerHUDAndHPBar
xor a
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
jp ApplyDamageToPlayerPokemon
PrintMonName1Text:
@@ -3939,9 +3849,9 @@ PrintMonName1Text:
; this likely had to do with Japanese grammar that got translated,
; but the functionality didn't get removed
MonName1Text:
- TX_FAR _MonName1Text
- TX_ASM
- ld a, [H_WHOSETURN]
+ text_far _MonName1Text
+ text_asm
+ ldh a, [hWhoseTurn]
and a
ld a, [wPlayerMoveNum]
ld hl, wPlayerUsedMove
@@ -3964,13 +3874,13 @@ MonName1Text:
ret
Used1Text:
- TX_FAR _Used1Text
- TX_ASM
+ text_far _Used1Text
+ text_asm
jr PrintInsteadText
Used2Text:
- TX_FAR _Used2Text
- TX_ASM
+ text_far _Used2Text
+ text_asm
; fall through
PrintInsteadText:
@@ -3981,8 +3891,8 @@ PrintInsteadText:
ret
InsteadText:
- TX_FAR _InsteadText
- TX_ASM
+ text_far _InsteadText
+ text_asm
; fall through
PrintMoveName:
@@ -3990,8 +3900,8 @@ PrintMoveName:
ret
_PrintMoveName:
- TX_FAR _CF4BText
- TX_ASM
+ text_far _CF4BText
+ text_asm
ld hl, ExclamationPointPointerTable
ld a, [wd11e] ; exclamation point num
add a
@@ -4013,24 +3923,24 @@ ExclamationPointPointerTable:
dw ExclamationPoint5Text
ExclamationPoint1Text:
- TX_FAR _ExclamationPoint1Text
- db "@"
+ text_far _ExclamationPoint1Text
+ text_end
ExclamationPoint2Text:
- TX_FAR _ExclamationPoint2Text
- db "@"
+ text_far _ExclamationPoint2Text
+ text_end
ExclamationPoint3Text:
- TX_FAR _ExclamationPoint3Text
- db "@"
+ text_far _ExclamationPoint3Text
+ text_end
ExclamationPoint4Text:
- TX_FAR _ExclamationPoint4Text
- db "@"
+ text_far _ExclamationPoint4Text
+ text_end
ExclamationPoint5Text:
- TX_FAR _ExclamationPoint5Text
- db "@"
+ text_far _ExclamationPoint5Text
+ text_end
; this function does nothing useful
; if the move being used is in set [1-4] from ExclamationPointMoveSets,
@@ -4061,26 +3971,11 @@ DetermineExclamationPointTextNum:
pop bc
ret
-ExclamationPointMoveSets:
-; a grammar mistake was fixed (only concerning japanese)
-; BIDE is in category 3, moved from category 2
- db SWORDS_DANCE, GROWTH
- db $00
- db RECOVER, SELFDESTRUCT, AMNESIA
- db $00
- db MEDITATE, AGILITY, TELEPORT, MIMIC, DOUBLE_TEAM, BIDE, BARRAGE
- db $00
- db POUND, SCRATCH, VICEGRIP, WING_ATTACK, FLY, BIND, SLAM, HORN_ATTACK, BODY_SLAM
- db WRAP, THRASH, TAIL_WHIP, LEER, BITE, GROWL, ROAR, SING, PECK, COUNTER
- db STRENGTH, ABSORB, STRING_SHOT, EARTHQUAKE, FISSURE, DIG, TOXIC, SCREECH, HARDEN
- db MINIMIZE, WITHDRAW, DEFENSE_CURL, METRONOME, LICK, CLAMP, CONSTRICT, POISON_GAS
- db LEECH_LIFE, BUBBLE, FLASH, SPLASH, ACID_ARMOR, FURY_SWIPES, REST, SHARPEN, SLASH, SUBSTITUTE
- db $00
- db $FF ; terminator
+INCLUDE "data/moves/grammar.asm"
PrintMoveFailureText:
ld de, wPlayerMoveEffect
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playersTurn
ld de, wEnemyMoveEffect
@@ -4128,7 +4023,7 @@ PrintMoveFailureText:
call PrintText
ld b, $4
predef PredefShakeScreenHorizontally
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr nz, .enemyTurn
jp ApplyDamageToPlayerPokemon
@@ -4136,24 +4031,24 @@ PrintMoveFailureText:
jp ApplyDamageToEnemyPokemon
AttackMissedText:
- TX_FAR _AttackMissedText
- db "@"
+ text_far _AttackMissedText
+ text_end
KeptGoingAndCrashedText:
- TX_FAR _KeptGoingAndCrashedText
- db "@"
+ text_far _KeptGoingAndCrashedText
+ text_end
UnaffectedText:
- TX_FAR _UnaffectedText
- db "@"
+ text_far _UnaffectedText
+ text_end
PrintDoesntAffectText:
ld hl, DoesntAffectMonText
jp PrintText
DoesntAffectMonText:
- TX_FAR _DoesntAffectMonText
- db "@"
+ text_far _DoesntAffectMonText
+ text_end
; if there was a critical hit or an OHKO was successful, print the corresponding text
PrintCriticalOHKOText:
@@ -4181,12 +4076,12 @@ CriticalOHKOTextPointers:
dw OHKOText
CriticalHitText:
- TX_FAR _CriticalHitText
- db "@"
+ text_far _CriticalHitText
+ text_end
OHKOText:
- TX_FAR _OHKOText
- db "@"
+ text_far _OHKOText
+ text_end
; checks if a traded mon will disobey due to lack of badges
; stores whether the mon will use a move in Z flag
@@ -4216,16 +4111,16 @@ CheckForDisobedience:
.monIsTraded
; what level might disobey?
ld hl, wObtainedBadges
- bit 7, [hl]
+ bit BIT_EARTHBADGE, [hl]
ld a, 101
jr nz, .next
- bit 5, [hl]
+ bit BIT_MARSHBADGE, [hl]
ld a, 70
jr nz, .next
- bit 3, [hl]
+ bit BIT_RAINBOWBADGE, [hl]
ld a, 50
jr nz, .next
- bit 1, [hl]
+ bit BIT_CASCADEBADGE, [hl]
ld a, 30
jr nz, .next
ld a, 10
@@ -4370,24 +4265,24 @@ CheckForDisobedience:
ret
LoafingAroundText:
- TX_FAR _LoafingAroundText
- db "@"
+ text_far _LoafingAroundText
+ text_end
BeganToNapText:
- TX_FAR _BeganToNapText
- db "@"
+ text_far _BeganToNapText
+ text_end
WontObeyText:
- TX_FAR _WontObeyText
- db "@"
+ text_far _WontObeyText
+ text_end
TurnedAwayText:
- TX_FAR _TurnedAwayText
- db "@"
+ text_far _TurnedAwayText
+ text_end
IgnoredOrdersText:
- TX_FAR _IgnoredOrdersText
- db "@"
+ text_far _IgnoredOrdersText
+ text_end
; sets b, c, d, and e for the CalculateDamage routine in the case of an attack by the player mon
GetDamageVarsForPlayerAttack:
@@ -4401,7 +4296,7 @@ GetDamageVarsForPlayerAttack:
ld d, a ; d = move power
ret z ; return if move power is zero
ld a, [hl] ; a = [wPlayerMoveType]
- cp FIRE ; types >= FIRE are all special
+ cp SPECIAL ; types >= SPECIAL are all special
jr nc, .specialAttack
.physicalAttack
ld hl, wEnemyMonDefense
@@ -4422,9 +4317,9 @@ GetDamageVarsForPlayerAttack:
; in the case of a critical hit, reset the player's attack and the enemy's defense to their base values
ld c, 3 ; defense stat
call GetEnemyMonStat
- ld a, [H_PRODUCT + 2]
+ ldh a, [hProduct + 2]
ld b, a
- ld a, [H_PRODUCT + 3]
+ ldh a, [hProduct + 3]
ld c, a
push bc
ld hl, wPartyMon1Attack
@@ -4444,8 +4339,8 @@ GetDamageVarsForPlayerAttack:
; if the enemy has used Light Screen, double the enemy's special
sla c
rl b
-; reflect and light screen boosts do not cap the stat at 999, so weird things will happen during stats scaling if
-; a Pokemon with 512 or more Defense has used Reflect, or if a Pokemon with 512 or more Special has used Light Screen
+; reflect and light screen boosts do not cap the stat at MAX_STAT_VALUE, so weird things will happen during stats scaling
+; if a Pokemon with 512 or more Defense has used Reflect, or if a Pokemon with 512 or more Special has used Light Screen
.specialAttackCritCheck
ld hl, wBattleMonSpecial
ld a, [wCriticalHitOrOHKO]
@@ -4454,9 +4349,9 @@ GetDamageVarsForPlayerAttack:
; in the case of a critical hit, reset the player's and enemy's specials to their base values
ld c, 5 ; special stat
call GetEnemyMonStat
- ld a, [H_PRODUCT + 2]
+ ldh a, [hProduct + 2]
ld b, a
- ld a, [H_PRODUCT + 3]
+ ldh a, [hProduct + 3]
ld c, a
push bc
ld hl, wPartyMon1Special
@@ -4514,7 +4409,7 @@ GetDamageVarsForEnemyAttack:
and a
ret z ; return if move power is zero
ld a, [hl] ; a = [wEnemyMoveType]
- cp FIRE ; types >= FIRE are all special
+ cp SPECIAL ; types >= SPECIAL are all special
jr nc, .specialAttack
.physicalAttack
ld hl, wBattleMonDefense
@@ -4543,7 +4438,7 @@ GetDamageVarsForEnemyAttack:
push bc
ld c, 2 ; attack stat
call GetEnemyMonStat
- ld hl, H_PRODUCT + 2
+ ld hl, hProduct + 2
pop bc
jr .scaleStats
.specialAttack
@@ -4557,8 +4452,8 @@ GetDamageVarsForEnemyAttack:
; if the player has used Light Screen, double the player's special
sla c
rl b
-; reflect and light screen boosts do not cap the stat at 999, so weird things will happen during stats scaling if
-; a Pokemon with 512 or more Defense has used Reflect, or if a Pokemon with 512 or more Special has used Light Screen
+; reflect and light screen boosts do not cap the stat at MAX_STAT_VALUE, so weird things will happen during stats scaling
+; if a Pokemon with 512 or more Defense has used Reflect, or if a Pokemon with 512 or more Special has used Light Screen
.specialAttackCritCheck
ld hl, wEnemyMonSpecial
ld a, [wCriticalHitOrOHKO]
@@ -4575,7 +4470,7 @@ GetDamageVarsForEnemyAttack:
push bc
ld c, 5 ; special stat
call GetEnemyMonStat
- ld hl, H_PRODUCT + 2
+ ld hl, hProduct + 2
pop bc
; if either the offensive or defensive stat is too large to store in a byte, scale both stats by dividing them by 4
; this allows values with up to 10 bits (values up to 1023) to be handled
@@ -4633,9 +4528,9 @@ GetEnemyMonStat:
ld bc, wEnemyMon2 - wEnemyMon1
call AddNTimes
ld a, [hli]
- ld [H_MULTIPLICAND + 1], a
+ ldh [hMultiplicand + 1], a
ld a, [hl]
- ld [H_MULTIPLICAND + 2], a
+ ldh [hMultiplicand + 2], a
pop bc
pop de
ret
@@ -4666,7 +4561,7 @@ CalculateDamage:
; d: base power
; e: level
- ld a, [H_WHOSETURN] ; whose turn?
+ ldh a, [hWhoseTurn] ; whose turn?
and a
ld a, [wPlayerMoveEffect]
jr z, .effect
@@ -4698,7 +4593,7 @@ CalculateDamage:
.skipbp
xor a
- ld hl, H_DIVIDEND
+ ld hl, hDividend
ldi [hl], a
ldi [hl], a
ld [hl], a
@@ -4747,76 +4642,82 @@ CalculateDamage:
ld b, 4
call Divide
+; Update wCurDamage.
+; Capped at MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE: 999 - 2 = 997.
ld hl, wDamage
ld b, [hl]
- ld a, [H_QUOTIENT + 3]
+ ldh a, [hQuotient + 3]
add b
- ld [H_QUOTIENT + 3], a
- jr nc, .asm_3e142
+ ldh [hQuotient + 3], a
+ jr nc, .dont_cap_1
- ld a, [H_QUOTIENT + 2]
+ ldh a, [hQuotient + 2]
inc a
- ld [H_QUOTIENT + 2], a
+ ldh [hQuotient + 2], a
and a
- jr z, .asm_3e176
+ jr z, .cap
-.asm_3e142
- ld a, [H_QUOTIENT]
+.dont_cap_1
+ ldh a, [hQuotient]
ld b, a
- ld a, [H_QUOTIENT + 1]
+ ldh a, [hQuotient + 1]
or a
- jr nz, .asm_3e176
-
- ld a, [H_QUOTIENT + 2]
- cp 998 / $100
- jr c, .asm_3e15a
- cp 998 / $100 + 1
- jr nc, .asm_3e176
- ld a, [H_QUOTIENT + 3]
- cp 998 % $100
- jr nc, .asm_3e176
-
-.asm_3e15a
+ jr nz, .cap
+
+ ldh a, [hQuotient + 2]
+ cp HIGH(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1)
+ jr c, .dont_cap_2
+
+ cp HIGH(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1) + 1
+ jr nc, .cap
+
+ ldh a, [hQuotient + 3]
+ cp LOW(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1)
+ jr nc, .cap
+
+.dont_cap_2
inc hl
- ld a, [H_QUOTIENT + 3]
+
+ ldh a, [hQuotient + 3]
ld b, [hl]
add b
ld [hld], a
- ld a, [H_QUOTIENT + 2]
+ ldh a, [hQuotient + 2]
ld b, [hl]
adc b
ld [hl], a
- jr c, .asm_3e176
+ jr c, .cap
ld a, [hl]
- cp 998 / $100
- jr c, .asm_3e17c
- cp 998 / $100 + 1
- jr nc, .asm_3e176
+ cp HIGH(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1)
+ jr c, .dont_cap_3
+
+ cp HIGH(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1) + 1
+ jr nc, .cap
+
inc hl
ld a, [hld]
- cp 998 % $100
- jr c, .asm_3e17c
+ cp LOW(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE + 1)
+ jr c, .dont_cap_3
-.asm_3e176
-; cap at 997
- ld a, 997 / $100
+.cap
+ ld a, HIGH(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE)
ld [hli], a
- ld a, 997 % $100
+ ld a, LOW(MAX_NEUTRAL_DAMAGE - MIN_NEUTRAL_DAMAGE)
ld [hld], a
-.asm_3e17c
-; add 2
+.dont_cap_3
+; Add back MIN_NEUTRAL_DAMAGE (capping at 999).
inc hl
ld a, [hl]
- add 2
+ add MIN_NEUTRAL_DAMAGE
ld [hld], a
- jr nc, .done
+ jr nc, .dont_floor
inc [hl]
+.dont_floor
-.done
-; minimum damage is 1
+; Returns nz and nc.
ld a, 1
and a
ret
@@ -4827,13 +4728,7 @@ JumpToOHKOMoveEffect:
dec a
ret
-
-UnusedHighCriticalMoves:
- db KARATE_CHOP
- db RAZOR_LEAF
- db CRABHAMMER
- db SLASH
- db $FF
+INCLUDE "data/battle/unused_critical_hit_moves.asm"
; determines if attack is a critical hit
; azure heights claims "the fastest pokémon (who are, not coincidentally,
@@ -4841,7 +4736,7 @@ UnusedHighCriticalMoves:
CriticalHitTest:
xor a
ld [wCriticalHitOrOHKO], a
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ld a, [wEnemyMonSpecies]
jr nz, .handleEnemy
@@ -4852,7 +4747,7 @@ CriticalHitTest:
ld a, [wMonHBaseSpeed]
ld b, a
srl b ; (effective (base speed/2))
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ld hl, wPlayerMovePower
ld de, wPlayerBattleStatus2
@@ -4904,14 +4799,7 @@ CriticalHitTest:
ld [wCriticalHitOrOHKO], a ; set critical hit flag
ret
-; high critical hit moves
-HighCriticalMoves:
- db KARATE_CHOP
- db RAZOR_LEAF
- db CRABHAMMER
- db SLASH
- db $FF
-
+INCLUDE "data/battle/critical_hit_moves.asm"
; function to determine if Counter hits and if so, how much damage it does
HandleCounterMove:
@@ -4921,7 +4809,7 @@ HandleCounterMove:
; the outcome may be affected by the player's actions in the move selection menu prior to switching the Pokemon.
; This might also lead to desync glitches in link battles.
- ld a, [H_WHOSETURN] ; whose turn
+ ldh a, [hWhoseTurn] ; whose turn
and a
; player's turn
ld hl, wEnemySelectedMove
@@ -5091,7 +4979,7 @@ ApplyDamageToEnemyPokemon:
ld [wHPBarNewHP+1], a
ld a, [hl]
ld [wHPBarNewHP], a
- coord hl, 2, 2
+ hlcoord 2, 2
xor a
ld [wHPBarType], a
predef UpdateHPBar2 ; animate the HP bar shortening
@@ -5209,7 +5097,7 @@ ApplyDamageToPlayerPokemon:
ld [wHPBarMaxHP+1], a
ld a, [hl]
ld [wHPBarMaxHP], a
- coord hl, 10, 9
+ hlcoord 10, 9
ld a, $01
ld [wHPBarType], a
predef UpdateHPBar2 ; animate the HP bar shortening
@@ -5229,7 +5117,7 @@ AttackSubstitute:
; values for player turn
ld de, wEnemySubstituteHP
ld bc, wEnemyBattleStatus2
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .applyDamageToSubstitute
; values for enemy turn
@@ -5254,14 +5142,14 @@ AttackSubstitute:
ld hl, SubstituteBrokeText
call PrintText
; flip whose turn it is for the next function call
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
xor $01
- ld [H_WHOSETURN], a
- callab Func_79929 ; animate the substitute breaking
+ ldh [hWhoseTurn], a
+ callfar Func_79929 ; animate the substitute breaking
; flip the turn back to the way it was
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
xor $01
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
ld hl, wPlayerMoveEffect ; value for player's turn
and a
jr z, .nullifyEffect
@@ -5272,12 +5160,12 @@ AttackSubstitute:
jp DrawHUDsAndHPBars
SubstituteTookDamageText:
- TX_FAR _SubstituteTookDamageText
- db "@"
+ text_far _SubstituteTookDamageText
+ text_end
SubstituteBrokeText:
- TX_FAR _SubstituteBrokeText
- db "@"
+ text_far _SubstituteBrokeText
+ text_end
; this function raises the attack modifier of a pokemon using Rage when that pokemon is attacked
HandleBuildingRage:
@@ -5285,7 +5173,7 @@ HandleBuildingRage:
ld hl, wEnemyBattleStatus2
ld de, wEnemyMonStatMods
ld bc, wEnemyMoveNum
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .next
; values for the enemy turn
@@ -5298,9 +5186,9 @@ HandleBuildingRage:
ld a, [de]
cp $0d ; maximum stat modifier value
ret z ; return if attack modifier is already maxed
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
xor $01 ; flip turn for the stat modifier raising function
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
; temporarily change the target pokemon's move to $00 and the effect to the one
; that causes the attack modifier to go up one stage
ld h, b
@@ -5317,25 +5205,25 @@ HandleBuildingRage:
ldd [hl], a ; null move effect
ld a, RAGE
ld [hl], a ; restore the target pokemon's move number to Rage
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
xor $01 ; flip turn back to the way it was
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
ret
BuildingRageText:
- TX_FAR _BuildingRageText
- db "@"
+ text_far _BuildingRageText
+ text_end
; copy last move for Mirror Move
; sets zero flag on failure and unsets zero flag on success
MirrorMoveCopyMove:
-; Mirror Move makes use of ccf1 (wPlayerUsedMove) and ccf2 (wEnemyUsedMove) addresses,
+; Mirror Move makes use of wPlayerUsedMove and wEnemyUsedMove,
; which are mainly used to print the "[Pokemon] used [Move]" text.
; Both are set to 0 whenever a new Pokemon is sent out
-; ccf1 is also set to 0 whenever the player is fast asleep or frozen solid.
-; ccf2 is also set to 0 whenever the enemy is fast asleep or frozen solid.
+; wPlayerUsedMove is also set to 0 whenever the player is fast asleep or frozen solid.
+; wEnemyUsedMove is also set to 0 whenever the enemy is fast asleep or frozen solid.
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
; values for player turn
ld a, [wEnemyUsedMove]
@@ -5359,8 +5247,8 @@ MirrorMoveCopyMove:
ret
MirrorMoveFailedText:
- TX_FAR _MirrorMoveFailedText
- db "@"
+ text_far _MirrorMoveFailedText
+ text_end
; function used to reload move data for moves like Mirror Move and Metronome
ReloadMoveData:
@@ -5388,7 +5276,7 @@ MetronomePickMove:
; values for player turn
ld de, wPlayerMoveNum
ld hl, wPlayerSelectedMove
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .pickMoveLoop
; values for enemy turn
@@ -5410,7 +5298,7 @@ MetronomePickMove:
; it's used to prevent moves that run another move within the same turn
; (like Mirror Move and Metronome) from losing 2 PP
IncrementMovePP:
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
; values for player turn
ld hl, wBattleMonPP
@@ -5429,7 +5317,7 @@ IncrementMovePP:
ld h, d
ld l, e
add hl, bc
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ld a, [wPlayerMonNumber] ; value for player turn
jr z, .updatePP
@@ -5453,7 +5341,7 @@ AdjustDamageForMoveType:
ld e, [hl] ; e = type 2 of defender
ld a, [wPlayerMoveType]
ld [wMoveType], a
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .next
; values for enemy turn
@@ -5517,25 +5405,25 @@ AdjustDamageForMoveType:
and $80
ld b, a
ld a, [hl] ; a = damage multiplier
- ld [H_MULTIPLIER], a
+ ldh [hMultiplier], a
add b
ld [wDamageMultipliers], a
xor a
- ld [H_MULTIPLICAND], a
+ ldh [hMultiplicand], a
ld hl, wDamage
ld a, [hli]
- ld [H_MULTIPLICAND + 1], a
+ ldh [hMultiplicand + 1], a
ld a, [hld]
- ld [H_MULTIPLICAND + 2], a
+ ldh [hMultiplicand + 2], a
call Multiply
ld a, 10
- ld [H_DIVISOR], a
+ ldh [hDivisor], a
ld b, $04
call Divide
- ld a, [H_QUOTIENT + 2]
+ ldh a, [hQuotient + 2]
ld [hli], a
ld b, a
- ld a, [H_QUOTIENT + 3]
+ ldh a, [hQuotient + 3]
ld [hl], a
or b ; is damage 0?
jr nz, .skipTypeImmunity
@@ -5598,7 +5486,7 @@ AIGetTypeEffectiveness:
ld [wd11e], a ; store damage multiplier
ret
-INCLUDE "data/type_effects.asm"
+INCLUDE "data/types/type_matchups.asm"
; some tests that need to pass for a move to hit
MoveHitTest:
@@ -5606,7 +5494,7 @@ MoveHitTest:
ld hl, wEnemyBattleStatus1
ld de, wPlayerMoveEffect
ld bc, wEnemyMonStatus
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .dreamEaterCheck
; enemy's turn
@@ -5626,8 +5514,8 @@ MoveHitTest:
ret z ; Swift never misses (interestingly, Azure Heights lists this is a myth, but it appears to be true)
call CheckTargetSubstitute ; substitute check (note that this overwrites a)
jr z, .checkForDigOrFlyStatus
-; this code is buggy. it's supposed to prevent HP draining moves from working on substitutes.
-; since $7b79 overwrites a with either $00 or $01, it never works.
+; This code is buggy. It's supposed to prevent HP draining moves from working on substitutes.
+; Since CheckTargetSubstitute overwrites a with either $00 or $01, it never works.
cp DRAIN_HP_EFFECT
jp z, .moveMissed
cp DREAM_EATER_EFFECT
@@ -5635,7 +5523,7 @@ MoveHitTest:
.checkForDigOrFlyStatus
bit INVULNERABLE, [hl]
jp nz, .moveMissed
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr nz, .enemyTurn
.playerTurn
@@ -5689,7 +5577,7 @@ MoveHitTest:
call CalcHitChance ; scale the move accuracy according to attacker's accuracy and target's evasion
ld a, [wPlayerMoveAccuracy]
ld b, a
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .doAccuracyCheck
ld a, [wEnemyMoveAccuracy]
@@ -5708,7 +5596,7 @@ MoveHitTest:
ld [hl], a
inc a
ld [wMoveMissed], a
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playerTurn2
.enemyTurn2
@@ -5723,7 +5611,7 @@ MoveHitTest:
; values for player turn
CalcHitChance:
ld hl, wPlayerMoveAccuracy
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ld a, [wPlayerMonAccuracyMod]
ld b, a
@@ -5743,10 +5631,10 @@ CalcHitChance:
; decreases the hit chance instead of increasing the hit chance)
; zero the high bytes of the multiplicand
xor a
- ld [H_MULTIPLICAND], a
- ld [H_MULTIPLICAND + 1], a
+ ldh [hMultiplicand], a
+ ldh [hMultiplicand + 1], a
ld a, [hl]
- ld [H_MULTIPLICAND + 2], a ; set multiplicand to move accuracy
+ ldh [hMultiplicand + 2], a ; set multiplicand to move accuracy
push hl
ld d, $02 ; loop has two iterations
; loop to do the calculations, the first iteration multiplies by the accuracy ratio and
@@ -5761,29 +5649,29 @@ CalcHitChance:
add hl, bc ; hl = address of stat modifier ratio
pop bc
ld a, [hli]
- ld [H_MULTIPLIER], a ; set multiplier to the numerator of the ratio
+ ldh [hMultiplier], a ; set multiplier to the numerator of the ratio
call Multiply
ld a, [hl]
- ld [H_DIVISOR], a ; set divisor to the the denominator of the ratio
+ ldh [hDivisor], a ; set divisor to the the denominator of the ratio
; (the dividend is the product of the previous multiplication)
ld b, $04 ; number of bytes in the dividend
call Divide
- ld a, [H_QUOTIENT + 3]
+ ldh a, [hQuotient + 3]
ld b, a
- ld a, [H_QUOTIENT + 2]
+ ldh a, [hQuotient + 2]
or b
jp nz, .nextCalculation
; make sure the result is always at least one
- ld [H_QUOTIENT + 2], a
+ ldh [hQuotient + 2], a
ld a, $01
- ld [H_QUOTIENT + 3], a
+ ldh [hQuotient + 3], a
.nextCalculation
ld b, c
dec d
jr nz, .loop
- ld a, [H_QUOTIENT + 2]
+ ldh a, [hQuotient + 2]
and a ; is the calculated hit chance over 0xFF?
- ld a, [H_QUOTIENT + 3]
+ ldh a, [hQuotient + 3]
jr z, .storeAccuracy
; if calculated hit chance over 0xFF
ld a, $ff ; set the hit chance to 0xFF
@@ -5803,29 +5691,29 @@ RandomizeDamage:
ret c ; return if damage is equal to 0 or 1
.DamageGreaterThanOne
xor a
- ld [H_MULTIPLICAND], a
+ ldh [hMultiplicand], a
dec hl
ld a, [hli]
- ld [H_MULTIPLICAND + 1], a
+ ldh [hMultiplicand + 1], a
ld a, [hl]
- ld [H_MULTIPLICAND + 2], a
+ ldh [hMultiplicand + 2], a
; loop until a random number greater than or equal to 217 is generated
.loop
call BattleRandom
rrca
cp 217
jr c, .loop
- ld [H_MULTIPLIER], a
+ ldh [hMultiplier], a
call Multiply ; multiply damage by the random number, which is in the range [217, 255]
ld a, 255
- ld [H_DIVISOR], a
+ ldh [hDivisor], a
ld b, $4
call Divide ; divide the result by 255
; store the modified damage
- ld a, [H_QUOTIENT + 2]
+ ldh a, [hQuotient + 2]
ld hl, wDamage
ld [hli], a
- ld a, [H_QUOTIENT + 3]
+ ldh a, [hQuotient + 3]
ld [hl], a
ret
@@ -6001,7 +5889,7 @@ EnemyCheckIfMirrorMoveEffect:
.moveDidNotMiss
call ApplyAttackToPlayerPokemon
call PrintCriticalOHKOText
- callab DisplayEffectiveness
+ callfar DisplayEffectiveness
ld a, 1
ld [wMoveDidntMiss], a
.handleExplosionMiss
@@ -6040,8 +5928,8 @@ EnemyCheckIfMirrorMoveEffect:
jr ExecuteEnemyMoveDone
HitXTimesText:
- TX_FAR _HitXTimesText
- db "@"
+ text_far _HitXTimesText
+ text_end
ExecuteEnemyMoveDone:
ld b, $1
@@ -6181,11 +6069,11 @@ CheckEnemyStatusConditions:
ld [hl], a
xor a
ld [wAnimationType], a
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
ld a, POUND
call PlayMoveAnimation
ld a, $1
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
call ApplyDamageToEnemyPokemon
jr .monHurtItselfOrFullyParalysed
.checkIfTriedToUseDisabledMove
@@ -6332,7 +6220,7 @@ CheckEnemyStatusConditions:
ret
GetCurrentMove:
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jp z, .player
ld de, wEnemyMoveNum
@@ -6379,8 +6267,8 @@ LoadEnemyMonData:
ld a, [wIsInBattle]
cp $2 ; is it a trainer battle?
; fixed DVs for trainer mon
- ld a, $98
- ld b, $88
+ ld a, ATKDEFDV_TRAINER
+ ld b, SPDSPCDV_TRAINER
jr z, .storeDVs
; random DVs for wild mon
call BattleRandom
@@ -6529,25 +6417,25 @@ DoBattleTransitionAndInitBattleVariables:
; link battle
xor a
ld [wMenuJoypadPollCount], a
- callab DisplayLinkBattleVersusTextBox
+ callfar DisplayLinkBattleVersusTextBox
ld a, $1
ld [wUpdateSpritesEnabled], a
call ClearScreen
.next
call DelayFrame
predef BattleTransition
- callab LoadHudAndHpBarAndStatusTilePatterns
+ callfar LoadHudAndHpBarAndStatusTilePatterns
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ld a, $ff
ld [wUpdateSpritesEnabled], a
call ClearSprites
call ClearScreen
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld [hWY], a
- ld [rWY], a
- ld [hTilesetType], a
+ ldh [hAutoBGTransferEnabled], a
+ ldh [hWY], a
+ ldh [rWY], a
+ ldh [hTilesetType], a
ld hl, wPlayerStatsToDouble
ld [hli], a
ld [hli], a
@@ -6587,7 +6475,7 @@ LoadPlayerBackPic:
predef ScaleSpriteByTwo
ld hl, wOAMBuffer
xor a
- ld [hOAMTile], a ; initial tile number
+ ldh [hOAMTile], a ; initial tile number
ld b, $7 ; 7 columns
ld e, $a0 ; X for the left-most column
.loop ; each loop iteration writes 3 OAM entries in a vertical column
@@ -6601,18 +6489,18 @@ LoadPlayerBackPic:
add d ; increase Y by height of tile
ld d, a
inc hl
- ld a, [hOAMTile]
+ ldh a, [hOAMTile]
ld [hli], a ; OAM tile number
inc a ; increment tile number
- ld [hOAMTile], a
+ ldh [hOAMTile], a
ld a, $2
ld [hl], a
inc hl
dec c
jr nz, .innerLoop
- ld a, [hOAMTile]
+ ldh a, [hOAMTile]
add $4 ; increase tile number by 4
- ld [hOAMTile], a
+ ldh [hOAMTile], a
ld a, $8 ; width of tile
add e ; increase X by width of tile
ld e, a
@@ -6624,23 +6512,23 @@ LoadPlayerBackPic:
call SwitchSRAMBankAndLatchClockData
ld hl, vSprites
ld de, sSpriteBuffer1
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
ld b, a
ld c, 7 * 7
call CopyVideoData
call PrepareRTCDataAndDisableSRAM
ld a, $31
- ld [hStartTileID], a
- coord hl, 1, 5
+ ldh [hStartTileID], a
+ hlcoord 1, 5
predef_jump CopyUncompressedPicToTilemap
; does nothing since no stats are ever selected (barring glitches)
DoubleOrHalveSelectedStats:
- callab DoubleSelectedStats
- jpab HalveSelectedStats
+ callfar DoubleSelectedStats
+ jpfar HalveSelectedStats
ScrollTrainerPicAfterBattle:
- jpab _ScrollTrainerPicAfterBattle
+ jpfar _ScrollTrainerPicAfterBattle
ApplyBurnAndParalysisPenaltiesToPlayer:
ld a, $1
@@ -6650,12 +6538,12 @@ ApplyBurnAndParalysisPenaltiesToEnemy:
xor a
ApplyBurnAndParalysisPenalties:
- ld [H_WHOSETURN], a
+ ldh [hWhoseTurn], a
call QuarterSpeedDueToParalysis
jp HalveAttackDueToBurn
QuarterSpeedDueToParalysis:
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playerTurn
.enemyTurn ; quarter the player's speed
@@ -6698,7 +6586,7 @@ QuarterSpeedDueToParalysis:
ret
HalveAttackDueToBurn:
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
jr z, .playerTurn
.enemyTurn ; halve the player's attack
@@ -6788,35 +6676,35 @@ CalculateModifiedStat:
ld b, 0
add hl, bc
xor a
- ld [H_MULTIPLICAND], a
+ ldh [hMultiplicand], a
ld a, [de]
- ld [H_MULTIPLICAND + 1], a
+ ldh [hMultiplicand + 1], a
inc de
ld a, [de]
- ld [H_MULTIPLICAND + 2], a
+ ldh [hMultiplicand + 2], a
ld a, [hli]
- ld [H_MULTIPLIER], a
+ ldh [hMultiplier], a
call Multiply
ld a, [hl]
- ld [H_DIVISOR], a
+ ldh [hDivisor], a
ld b, $4
call Divide
pop hl
- ld a, [H_DIVIDEND + 3]
- sub 999 % $100
- ld a, [H_DIVIDEND + 2]
- sbc 999 / $100
+ ldh a, [hDividend + 3]
+ sub LOW(MAX_STAT_VALUE)
+ ldh a, [hDividend + 2]
+ sbc HIGH(MAX_STAT_VALUE)
jp c, .storeNewStatValue
-; cap the stat at 999
- ld a, 999 / $100
- ld [H_DIVIDEND + 2], a
- ld a, 999 % $100
- ld [H_DIVIDEND + 3], a
+; cap the stat at MAX_STAT_VALUE (999)
+ ld a, HIGH(MAX_STAT_VALUE)
+ ldh [hDividend + 2], a
+ ld a, LOW(MAX_STAT_VALUE)
+ ldh [hDividend + 3], a
.storeNewStatValue
- ld a, [H_DIVIDEND + 2]
+ ldh a, [hDividend + 2]
ld [hli], a
ld b, a
- ld a, [H_DIVIDEND + 3]
+ ldh a, [hDividend + 3]
ld [hl], a
or b
jr nz, .done
@@ -6850,7 +6738,7 @@ ApplyBadgeStatBoosts:
ret
; multiply stat at hl by 1.125
-; cap stat at 999
+; cap stat at MAX_STAT_VALUE
.applyBoostToStat
ld a, [hli]
ld d, a
@@ -6868,13 +6756,13 @@ ApplyBadgeStatBoosts:
adc d
ld [hli], a
ld a, [hld]
- sub 999 % $100
+ sub LOW(MAX_STAT_VALUE)
ld a, [hl]
- sbc 999 / $100
+ sbc HIGH(MAX_STAT_VALUE)
ret c
- ld a, 999 / $100
+ ld a, HIGH(MAX_STAT_VALUE)
ld [hli], a
- ld a, 999 % $100
+ ld a, LOW(MAX_STAT_VALUE)
ld [hld], a
ret
@@ -6882,33 +6770,34 @@ LoadHudAndHpBarAndStatusTilePatterns:
call LoadHpBarAndStatusTilePatterns
LoadHudTilePatterns:
- ld a, [rLCDC]
+ ldh a, [rLCDC]
add a ; is LCD disabled?
jr c, .lcdEnabled
.lcdDisabled
ld hl, BattleHudTiles1
- ld de, vChars2 + $6d0
+ ld de, vChars2 tile $6d
ld bc, BattleHudTiles1End - BattleHudTiles1
ld a, BANK(BattleHudTiles1)
call FarCopyDataDouble
ld hl, BattleHudTiles2
- ld de, vChars2 + $730
+ ld de, vChars2 tile $73
ld bc, BattleHudTiles3End - BattleHudTiles2
ld a, BANK(BattleHudTiles2)
jp FarCopyDataDouble
.lcdEnabled
ld de, BattleHudTiles1
- ld hl, vChars2 + $6d0
+ ld hl, vChars2 tile $6d
lb bc, BANK(BattleHudTiles1), (BattleHudTiles1End - BattleHudTiles1) / $8
call CopyVideoDataDouble
ld de, BattleHudTiles2
- ld hl, vChars2 + $730
+ ld hl, vChars2 tile $73
lb bc, BANK(BattleHudTiles2), (BattleHudTiles3End - BattleHudTiles2) / $8
jp CopyVideoDataDouble
PrintEmptyString:
ld hl, .emptyString
jp PrintText
+
.emptyString
db "@"
@@ -6966,7 +6855,7 @@ BattleRandom:
HandleExplodingAnimation:
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ld hl, wEnemyMonType1
ld de, wEnemyBattleStatus1
@@ -7000,1662 +6889,5 @@ PlayMoveAnimation:
ld [wAnimationID], a
call Delay3
predef MoveAnimation
- callab Func_78e98
- ret
-
-JumpMoveEffect:
- call _JumpMoveEffect
- ld b, $1
- ret
-
-_JumpMoveEffect:
- ld a, [H_WHOSETURN]
- and a
- ld a, [wPlayerMoveEffect]
- jr z, .next1
- ld a, [wEnemyMoveEffect]
-.next1
- dec a ; subtract 1, there is no special effect for 00
- add a ; x2, 16bit pointers
- ld hl, MoveEffectPointerTable
- ld b, 0
- ld c, a
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl ; jump to special effect handler
-
-MoveEffectPointerTable:
- dw SleepEffect ; unused effect
- dw PoisonEffect ; POISON_SIDE_EFFECT1
- dw DrainHPEffect ; DRAIN_HP_EFFECT
- dw FreezeBurnParalyzeEffect ; BURN_SIDE_EFFECT1
- dw FreezeBurnParalyzeEffect ; FREEZE_SIDE_EFFECT
- dw FreezeBurnParalyzeEffect ; PARALYZE_SIDE_EFFECT1
- dw ExplodeEffect ; EXPLODE_EFFECT
- dw DrainHPEffect ; DREAM_EATER_EFFECT
- dw $0000 ; MIRROR_MOVE_EFFECT
- dw StatModifierUpEffect ; ATTACK_UP1_EFFECT
- dw StatModifierUpEffect ; DEFENSE_UP1_EFFECT
- dw StatModifierUpEffect ; SPEED_UP1_EFFECT
- dw StatModifierUpEffect ; SPECIAL_UP1_EFFECT
- dw StatModifierUpEffect ; ACCURACY_UP1_EFFECT
- dw StatModifierUpEffect ; EVASION_UP1_EFFECT
- dw PayDayEffect ; PAY_DAY_EFFECT
- dw $0000 ; SWIFT_EFFECT
- dw StatModifierDownEffect ; ATTACK_DOWN1_EFFECT
- dw StatModifierDownEffect ; DEFENSE_DOWN1_EFFECT
- dw StatModifierDownEffect ; SPEED_DOWN1_EFFECT
- dw StatModifierDownEffect ; SPECIAL_DOWN1_EFFECT
- dw StatModifierDownEffect ; ACCURACY_DOWN1_EFFECT
- dw StatModifierDownEffect ; EVASION_DOWN1_EFFECT
- dw ConversionEffect ; CONVERSION_EFFECT
- dw HazeEffect ; HAZE_EFFECT
- dw BideEffect ; BIDE_EFFECT
- dw ThrashPetalDanceEffect ; THRASH_PETAL_DANCE_EFFECT
- dw SwitchAndTeleportEffect ; SWITCH_AND_TELEPORT_EFFECT
- dw TwoToFiveAttacksEffect ; TWO_TO_FIVE_ATTACKS_EFFECT
- dw TwoToFiveAttacksEffect ; unused effect
- dw FlinchSideEffect ; FLINCH_SIDE_EFFECT1
- dw SleepEffect ; SLEEP_EFFECT
- dw PoisonEffect ; POISON_SIDE_EFFECT2
- dw FreezeBurnParalyzeEffect ; BURN_SIDE_EFFECT2
- dw FreezeBurnParalyzeEffect ; unused effect
- dw FreezeBurnParalyzeEffect ; PARALYZE_SIDE_EFFECT2
- dw FlinchSideEffect ; FLINCH_SIDE_EFFECT2
- dw OneHitKOEffect ; OHKO_EFFECT
- dw ChargeEffect ; CHARGE_EFFECT
- dw $0000 ; SUPER_FANG_EFFECT
- dw $0000 ; SPECIAL_DAMAGE_EFFECT
- dw TrappingEffect ; TRAPPING_EFFECT
- dw ChargeEffect ; FLY_EFFECT
- dw TwoToFiveAttacksEffect ; ATTACK_TWICE_EFFECT
- dw $0000 ; JUMP_KICK_EFFECT
- dw MistEffect ; MIST_EFFECT
- dw FocusEnergyEffect ; FOCUS_ENERGY_EFFECT
- dw RecoilEffect ; RECOIL_EFFECT
- dw ConfusionEffect ; CONFUSION_EFFECT
- dw StatModifierUpEffect ; ATTACK_UP2_EFFECT
- dw StatModifierUpEffect ; DEFENSE_UP2_EFFECT
- dw StatModifierUpEffect ; SPEED_UP2_EFFECT
- dw StatModifierUpEffect ; SPECIAL_UP2_EFFECT
- dw StatModifierUpEffect ; ACCURACY_UP2_EFFECT
- dw StatModifierUpEffect ; EVASION_UP2_EFFECT
- dw HealEffect ; HEAL_EFFECT
- dw TransformEffect ; TRANSFORM_EFFECT
- dw StatModifierDownEffect ; ATTACK_DOWN2_EFFECT
- dw StatModifierDownEffect ; DEFENSE_DOWN2_EFFECT
- dw StatModifierDownEffect ; SPEED_DOWN2_EFFECT
- dw StatModifierDownEffect ; SPECIAL_DOWN2_EFFECT
- dw StatModifierDownEffect ; ACCURACY_DOWN2_EFFECT
- dw StatModifierDownEffect ; EVASION_DOWN2_EFFECT
- dw ReflectLightScreenEffect ; LIGHT_SCREEN_EFFECT
- dw ReflectLightScreenEffect ; REFLECT_EFFECT
- dw PoisonEffect ; POISON_EFFECT
- dw ParalyzeEffect ; PARALYZE_EFFECT
- dw StatModifierDownEffect ; ATTACK_DOWN_SIDE_EFFECT
- dw StatModifierDownEffect ; DEFENSE_DOWN_SIDE_EFFECT
- dw StatModifierDownEffect ; SPEED_DOWN_SIDE_EFFECT
- dw StatModifierDownEffect ; SPECIAL_DOWN_SIDE_EFFECT
- dw StatModifierDownEffect ; unused effect
- dw StatModifierDownEffect ; unused effect
- dw StatModifierDownEffect ; unused effect
- dw StatModifierDownEffect ; unused effect
- dw ConfusionSideEffect ; CONFUSION_SIDE_EFFECT
- dw TwoToFiveAttacksEffect ; TWINEEDLE_EFFECT
- dw $0000 ; unused effect
- dw SubstituteEffect ; SUBSTITUTE_EFFECT
- dw HyperBeamEffect ; HYPER_BEAM_EFFECT
- dw RageEffect ; RAGE_EFFECT
- dw MimicEffect ; MIMIC_EFFECT
- dw $0000 ; METRONOME_EFFECT
- dw LeechSeedEffect ; LEECH_SEED_EFFECT
- dw SplashEffect ; SPLASH_EFFECT
- dw DisableEffect ; DISABLE_EFFECT
-
-SleepEffect:
- ld de, wEnemyMonStatus
- ld bc, wEnemyBattleStatus2
- ld a, [H_WHOSETURN]
- and a
- jp z, .sleepEffect
- ld de, wBattleMonStatus
- ld bc, wPlayerBattleStatus2
-
-.sleepEffect
- ld a, [bc]
- bit NEEDS_TO_RECHARGE, a ; does the target need to recharge? (hyper beam)
- res NEEDS_TO_RECHARGE, a ; target no longer needs to recharge
- ld [bc], a
- jr nz, .setSleepCounter ; if the target had to recharge, all hit tests will be skipped
- ; including the event where the target already has another status
- ld a, [de]
- ld b, a
- and $7
- jr z, .notAlreadySleeping ; can't affect a mon that is already asleep
- ld hl, AlreadyAsleepText
- jp PrintText
-.notAlreadySleeping
- ld a, b
- and a
- jr nz, .didntAffect ; can't affect a mon that is already statused
- push de
- call MoveHitTest ; apply accuracy tests
- pop de
- ld a, [wMoveMissed]
- and a
- jr nz, .didntAffect
-.setSleepCounter
-; set target's sleep counter to a random number between 1 and 7
- call BattleRandom
- and $7
- jr z, .setSleepCounter
- ld b, a
- ld a, [wUnknownSerialFlag_d499]
- and a
- jr z, .asm_3f1ba ; XXX stadium stuff?
- ld a, b
- and $3
- jr z, .setSleepCounter
- ld b, a
-.asm_3f1ba
- ld a, b
- ld [de], a
- call PlayCurrentMoveAnimation2
- ld hl, FellAsleepText
- jp PrintText
-.didntAffect
- jp PrintDidntAffectText
-
-FellAsleepText:
- TX_FAR _FellAsleepText
- db "@"
-
-AlreadyAsleepText:
- TX_FAR _AlreadyAsleepText
- db "@"
-
-PoisonEffect:
- ld hl, wEnemyMonStatus
- ld de, wPlayerMoveEffect
- ld a, [H_WHOSETURN]
- and a
- jr z, .poisonEffect
- ld hl, wBattleMonStatus
- ld de, wEnemyMoveEffect
-.poisonEffect
- call CheckTargetSubstitute
- jr nz, .noEffect ; can't poison a substitute target
- ld a, [hli]
- ld b, a
- and a
- jr nz, .noEffect ; miss if target is already statused
- ld a, [hli]
- cp POISON ; can't poison a poison-type target
- jr z, .noEffect
- ld a, [hld]
- cp POISON ; can't poison a poison-type target
- jr z, .noEffect
- ld a, [de]
- cp POISON_SIDE_EFFECT1
- ld b, $34 ; ~20% chance of poisoning
- jr z, .sideEffectTest
- cp POISON_SIDE_EFFECT2
- ld b, $67 ; ~40% chance of poisoning
- jr z, .sideEffectTest
- push hl
- push de
- call MoveHitTest ; apply accuracy tests
- pop de
- pop hl
- ld a, [wMoveMissed]
- and a
- jr nz, .didntAffect
- jr .inflictPoison
-.sideEffectTest
- call BattleRandom
- cp b ; was side effect successful?
- ret nc
-.inflictPoison
- dec hl
- set 3, [hl] ; mon is now poisoned
- push de
- dec de
- ld a, [H_WHOSETURN]
- and a
- ld b, ANIM_C7
- ld hl, wPlayerBattleStatus3
- ld a, [de]
- ld de, wPlayerToxicCounter
- jr nz, .ok
- ld b, ANIM_A9
- ld hl, wEnemyBattleStatus3
- ld de, wEnemyToxicCounter
-.ok
- cp TOXIC
- jr nz, .normalPoison ; done if move is not Toxic
- set BADLY_POISONED, [hl] ; else set Toxic battstatus
- xor a
- ld [de], a
- ld hl, BadlyPoisonedText
- jr .continue
-.normalPoison
- ld hl, PoisonedText
-.continue
- pop de
- ld a, [de]
- cp POISON_EFFECT
- jr z, .regularPoisonEffect
- ld a, b
- call PlayBattleAnimation2
- jp PrintText
-.regularPoisonEffect
- call PlayCurrentMoveAnimation2
- jp PrintText
-.noEffect
- ld a, [de]
- cp POISON_EFFECT
- ret nz
-.didntAffect
- ld c, 50
- call DelayFrames
- jp PrintDidntAffectText
-
-PoisonedText:
- TX_FAR _PoisonedText
- db "@"
-
-BadlyPoisonedText:
- TX_FAR _BadlyPoisonedText
- db "@"
-
-DrainHPEffect:
- jpab DrainHPEffect_
-
-ExplodeEffect:
- ld hl, wBattleMonHP
- ld de, wPlayerBattleStatus2
- ld a, [H_WHOSETURN]
- and a
- jr z, .faintUser
- ld hl, wEnemyMonHP
- ld de, wEnemyBattleStatus2
-.faintUser
- xor a
- ld [hli], a ; set the mon's HP to 0
- ld [hli], a
- inc hl
- ld [hl], a ; set mon's status to 0
- ld a, [de]
- res SEEDED, a ; clear mon's leech seed status
- ld [de], a
- ret
-
-FreezeBurnParalyzeEffect:
- xor a
- ld [wAnimationType], a
- call CheckTargetSubstitute ; test bit 4 of d063/d068 flags [target has substitute flag]
- ret nz ; return if they have a substitute, can't effect them
- ld a, [H_WHOSETURN]
- and a
- jp nz, .opponentAttacker
- ld a, [wEnemyMonStatus]
- and a
- jp nz, CheckDefrost ; can't inflict status if opponent is already statused
- ld a, [wPlayerMoveType]
- ld b, a
- ld a, [wEnemyMonType1]
- cp b ; do target type 1 and move type match?
- ret z ; return if they match (an ice move can't freeze an ice-type, body slam can't paralyze a normal-type, etc.)
- ld a, [wEnemyMonType2]
- cp b ; do target type 2 and move type match?
- ret z ; return if they match
- ld a, [wPlayerMoveEffect]
- cp UNUSED_EFFECT_23 ; more stadium stuff
- jr nz, .asm_3f2c7
- ld a, [wUnknownSerialFlag_d499]
- and a
- ld a, FREEZE_SIDE_EFFECT
- ld b, $4d ; else use 0x4D/0x100 or 77/256 = 30.1%~ chance
- jr z, .next1
- ld b, $1a ; 0x1A/0x100 or 26/256 = 10.2%~ chance
- jr .next1
-.asm_3f2c7
- 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..
- ld b, $4d ; else use 0x4D/0x100 or 77/256 = 30.1%~ chance
- sub $1e ; subtract $1E to map to equivalent 10% chance effects
-.next1
- push af
- call BattleRandom ; get random 8bit value for probability test
- cp b
- pop bc
- ret nc ; do nothing if random value is >= 1A or 4D [no status applied]
- ld a, b ; what type of effect is this?
- cp BURN_SIDE_EFFECT1
- jr z, .burn1
- cp FREEZE_SIDE_EFFECT
- jr z, .freeze1
-; .paralyze
- ld a, 1 << PAR
- ld [wEnemyMonStatus], a
- call QuarterSpeedDueToParalysis ; quarter speed of affected mon
- ld a, ANIM_A9
- call PlayBattleAnimation
- jp PrintMayNotAttackText ; print paralysis text
-.burn1
- ld a, 1 << BRN
- ld [wEnemyMonStatus], a
- call HalveAttackDueToBurn ; halve attack of affected mon
- ld a, ANIM_A9
- call PlayBattleAnimation
- ld hl, BurnedText
- jp PrintText
-.freeze1
- call ClearHyperBeam ; resets hyper beam (recharge) condition from target
- ld a, 1 << FRZ
- ld [wEnemyMonStatus], a
- ld a, ANIM_A9
- call PlayBattleAnimation
- ld hl, FrozenText
- jp PrintText
-.opponentAttacker
- ld a, [wBattleMonStatus] ; mostly same as above with addresses swapped for opponent
- and a
- jp nz, CheckDefrost
- ld a, [wEnemyMoveType]
- ld b, a
- ld a, [wBattleMonType1]
- cp b
- ret z
- ld a, [wBattleMonType2]
- cp b
- ret z
- ld a, [wEnemyMoveEffect]
- cp UNUSED_EFFECT_23 ; more stadium stuff
- jr nz, .asm_3f341
- ld a, [wUnknownSerialFlag_d499]
- and a
- ld a, FREEZE_SIDE_EFFECT
- ld b, $4d ; else use 0x4D/0x100 or 77/256 = 30.1%~ chance
- jr z, .next2
- ld b, $1a ; 0x1A/0x100 or 26/256 = 10.2%~ chance
- jr .next2
-.asm_3f341
- cp a, PARALYZE_SIDE_EFFECT1 + 1
- ld b, $1a
- jr c, .next2
- ld b, $4d
- sub $1e
-.next2
- push af
- call BattleRandom
- cp b
- pop bc
- ret nc
- ld a, b
- cp BURN_SIDE_EFFECT1
- jr z, .burn2
- cp FREEZE_SIDE_EFFECT
- jr z, .freeze2
- ld a, 1 << PAR
- ld [wBattleMonStatus], a
- call QuarterSpeedDueToParalysis
- ld a, ANIM_C7
- call PlayBattleAnimation2
- jp PrintMayNotAttackText
-.burn2
- ld a, 1 << BRN
- ld [wBattleMonStatus], a
- call HalveAttackDueToBurn
- ld a, ANIM_C7
- call PlayBattleAnimation2
- ld hl, BurnedText
- jp PrintText
-.freeze2
-; hyper beam bits aren't reseted for opponent's side
- ld a, 1 << FRZ
- ld [wBattleMonStatus], a
- ld a, ANIM_C7
- call PlayBattleAnimation2
- ld hl, FrozenText
- jp PrintText
-
-BurnedText:
- TX_FAR _BurnedText
- db "@"
-
-FrozenText:
- TX_FAR _FrozenText
- db "@"
-
-CheckDefrost:
-; any fire-type move that has a chance inflict burn (all but Fire Spin) will defrost a frozen target
- and 1 << FRZ ; are they frozen?
- ret z ; return if so
- ld a, [H_WHOSETURN]
- and a
- jr nz, .opponent
- ;player [attacker]
- ld a, [wPlayerMoveType]
- sub FIRE
- ret nz ; return if type of move used isn't fire
- ld [wEnemyMonStatus], a ; set opponent status to 00 ["defrost" a frozen monster]
- ld hl, wEnemyMon1Status
- ld a, [wEnemyMonPartyPos]
- ld bc, wEnemyMon2 - wEnemyMon1
- call AddNTimes
- xor a
- ld [hl], a ; clear status in roster
- ld hl, FireDefrostedText
- jr .common
-.opponent
- ld a, [wEnemyMoveType] ; same as above with addresses swapped
- sub FIRE
- ret nz
- ld [wBattleMonStatus], a
- ld hl, wPartyMon1Status
- ld a, [wPlayerMonNumber]
- ld bc, wPartyMon2 - wPartyMon1
- call AddNTimes
- xor a
- ld [hl], a
- ld hl, FireDefrostedText
-.common
- jp PrintText
-
-FireDefrostedText:
- TX_FAR _FireDefrostedText
- db "@"
-
-StatModifierUpEffect:
- ld hl, wPlayerMonStatMods
- ld de, wPlayerMoveEffect
- ld a, [H_WHOSETURN]
- and a
- jr z, .statModifierUpEffect
- ld hl, wEnemyMonStatMods
- ld de, wEnemyMoveEffect
-.statModifierUpEffect
- ld a, [de]
- sub ATTACK_UP1_EFFECT
- cp EVASION_UP1_EFFECT + $3 - ATTACK_UP1_EFFECT ; covers all +1 effects
- jr c, .incrementStatMod
- sub ATTACK_UP2_EFFECT - ATTACK_UP1_EFFECT ; map +2 effects to equivalent +1 effect
-.incrementStatMod
- ld c, a
- ld b, $0
- add hl, bc
- ld b, [hl]
- inc b ; increment corresponding stat mod
- ld a, $d
- cp b ; can't raise stat past +6 ($d or 13)
- jp c, PrintNothingHappenedText
- ld a, [de]
- cp ATTACK_UP1_EFFECT + $8 ; is it a +2 effect?
- jr c, .ok
- inc b ; if so, increment stat mod again
- ld a, $d
- cp b ; unless it's already +6
- jr nc, .ok
- ld b, a
-.ok
- ld [hl], b
- ld a, c
- cp $4
- jr nc, UpdateStatDone ; jump if mod affected is evasion/accuracy
- push hl
- ld hl, wBattleMonAttack + 1
- ld de, wPlayerMonUnmodifiedAttack
- ld a, [H_WHOSETURN]
- and a
- jr z, .pointToStats
- ld hl, wEnemyMonAttack + 1
- ld de, wEnemyMonUnmodifiedAttack
-.pointToStats
- push bc
- sla c
- ld b, $0
- add hl, bc ; hl = modified stat
- ld a, c
- add e
- ld e, a
- jr nc, .checkIf999
- inc d ; de = unmodified (original) stat
-.checkIf999
- pop bc
- ld a, [hld]
- sub 999 % $100 ; check if stat is already 999
- jr nz, .recalculateStat
- ld a, [hl]
- sbc 999 / $100
- jp z, RestoreOriginalStatModifier
-.recalculateStat ; recalculate affected stat
- ; paralysis and burn penalties, as well as badge boosts are ignored
- push hl
- push bc
- ld hl, StatModifierRatios
- dec b
- sla b
- ld c, b
- ld b, $0
- add hl, bc
- pop bc
- xor a
- ld [H_MULTIPLICAND], a
- ld a, [de]
- ld [H_MULTIPLICAND + 1], a
- inc de
- ld a, [de]
- ld [H_MULTIPLICAND + 2], a
- ld a, [hli]
- ld [H_MULTIPLIER], a
- call Multiply
- ld a, [hl]
- ld [H_DIVISOR], a
- ld b, $4
- call Divide
- pop hl
-; cap at 999
- ld a, [H_PRODUCT + 3]
- sub 999 % $100
- ld a, [H_PRODUCT + 2]
- sbc 999 / $100
- jp c, UpdateStat
- ld a, 999 / $100
- ld [H_MULTIPLICAND + 1], a
- ld a, 999 % $100
- ld [H_MULTIPLICAND + 2], a
-
-UpdateStat:
- ld a, [H_PRODUCT + 2]
- ld [hli], a
- ld a, [H_PRODUCT + 3]
- ld [hl], a
- pop hl
-UpdateStatDone:
- ld b, c
- inc b
- call PrintStatText
- ld hl, wPlayerBattleStatus2
- ld de, wPlayerMoveNum
- ld bc, wPlayerMonMinimized
- ld a, [H_WHOSETURN]
- and a
- jr z, .playerTurn
- ld hl, wEnemyBattleStatus2
- ld de, wEnemyMoveNum
- ld bc, wEnemyMonMinimized
-.playerTurn
- ld a, [de]
- cp MINIMIZE
- jr nz, .notMinimize
- ; if a substitute is up, slide off the substitute and show the mon pic before
- ; playing the minimize animation
- bit HAS_SUBSTITUTE_UP, [hl]
- push af
- push bc
- push de
- ld hl, HideSubstituteShowMonAnim
- ld b, BANK(HideSubstituteShowMonAnim)
- call nz, Bankswitch
- pop de
-.notMinimize
- call PlayCurrentMoveAnimation
- ld a, [de]
- cp MINIMIZE
- jr nz, .applyBadgeBoostsAndStatusPenalties
- pop bc
- ld a, $1
- ld [bc], a
- ld hl, ReshowSubstituteAnim
- ld b, BANK(ReshowSubstituteAnim)
- pop af
- call nz, Bankswitch
-.applyBadgeBoostsAndStatusPenalties
- ld a, [H_WHOSETURN]
- and a
- call z, ApplyBadgeStatBoosts ; whenever the player uses a stat-up move, badge boosts get reapplied again to every stat,
- ; even to those not affected by the stat-up move (will be boosted further)
- ld hl, MonsStatsRoseText
- call PrintText
-
-; these shouldn't be here
- call QuarterSpeedDueToParalysis ; apply speed penalty to the player whose turn is not, if it's paralyzed
- jp HalveAttackDueToBurn ; apply attack penalty to the player whose turn is not, if it's burned
-
-RestoreOriginalStatModifier:
- pop hl
- dec [hl]
-
-PrintNothingHappenedText:
- ld hl, NothingHappenedText
- jp PrintText
-
-MonsStatsRoseText:
- TX_FAR _MonsStatsRoseText
- TX_ASM
- ld hl, GreatlyRoseText
- ld a, [H_WHOSETURN]
- and a
- ld a, [wPlayerMoveEffect]
- jr z, .playerTurn
- ld a, [wEnemyMoveEffect]
-.playerTurn
- cp ATTACK_DOWN1_EFFECT
- ret nc
- ld hl, RoseText
- ret
-
-GreatlyRoseText:
- TX_DELAY
- TX_FAR _GreatlyRoseText
-; fallthrough
-RoseText:
- TX_FAR _RoseText
- db "@"
-
-StatModifierDownEffect:
- ld hl, wEnemyMonStatMods
- ld de, wPlayerMoveEffect
- ld bc, wEnemyBattleStatus1
- ld a, [H_WHOSETURN]
- and a
- jr z, .statModifierDownEffect
- ld hl, wPlayerMonStatMods
- ld de, wEnemyMoveEffect
- ld bc, wPlayerBattleStatus1
- ld a, [wLinkState]
- cp LINK_STATE_BATTLING
- jr z, .statModifierDownEffect
- call BattleRandom
- cp $40 ; 1/4 chance to miss by in regular battle
- jp c, MoveMissed
-.statModifierDownEffect
- call CheckTargetSubstitute ; can't hit through substitute
- jp nz, MoveMissed
- ld a, [de]
- cp ATTACK_DOWN_SIDE_EFFECT
- jr c, .nonSideEffect
- call BattleRandom
- cp $55 ; 85/256 chance for side effects
- jp nc, CantLowerAnymore
- ld a, [de]
- sub ATTACK_DOWN_SIDE_EFFECT ; map each stat to 0-3
- jr .decrementStatMod
-.nonSideEffect ; non-side effects only
- push hl
- push de
- push bc
- call MoveHitTest ; apply accuracy tests
- pop bc
- pop de
- pop hl
- ld a, [wMoveMissed]
- and a
- jp nz, MoveMissed
- ld a, [bc]
- bit INVULNERABLE, a ; fly/dig
- jp nz, MoveMissed
- ld a, [de]
- sub ATTACK_DOWN1_EFFECT
- cp EVASION_DOWN1_EFFECT + $3 - ATTACK_DOWN1_EFFECT ; covers all -1 effects
- jr c, .decrementStatMod
- sub ATTACK_DOWN2_EFFECT - ATTACK_DOWN1_EFFECT ; map -2 effects to corresponding -1 effect
-.decrementStatMod
- ld c, a
- ld b, $0
- add hl, bc
- ld b, [hl]
- dec b ; dec corresponding stat mod
- jp z, CantLowerAnymore ; if stat mod is 1 (-6), can't lower anymore
- ld a, [de]
- cp ATTACK_DOWN2_EFFECT - $16 ; $24
- jr c, .ok
- cp EVASION_DOWN2_EFFECT + $5 ; $44
- jr nc, .ok
- dec b ; stat down 2 effects only (dec mod again)
- jr nz, .ok
- inc b ; increment mod to 1 (-6) if it would become 0 (-7)
-.ok
- ld [hl], b ; save modified mod
- ld a, c
- cp $4
- jr nc, UpdateLoweredStatDone ; jump for evasion/accuracy
- push hl
- push de
- ld hl, wEnemyMonAttack + 1
- ld de, wEnemyMonUnmodifiedAttack
- ld a, [H_WHOSETURN]
- and a
- jr z, .pointToStat
- ld hl, wBattleMonAttack + 1
- ld de, wPlayerMonUnmodifiedAttack
-.pointToStat
- push bc
- sla c
- ld b, $0
- add hl, bc ; hl = modified stat
- ld a, c
- add e
- ld e, a
- jr nc, .noCarry
- inc d ; de = unmodified stat
-.noCarry
- pop bc
- ld a, [hld]
- sub $1 ; can't lower stat below 1 (-6)
- jr nz, .recalculateStat
- ld a, [hl]
- and a
- jp z, CantLowerAnymore_Pop
-.recalculateStat
-; recalculate affected stat
-; paralysis and burn penalties, as well as badge boosts are ignored
- push hl
- push bc
- ld hl, StatModifierRatios
- dec b
- sla b
- ld c, b
- ld b, $0
- add hl, bc
- pop bc
- xor a
- ld [H_MULTIPLICAND], a
- ld a, [de]
- ld [H_MULTIPLICAND + 1], a
- inc de
- ld a, [de]
- ld [H_MULTIPLICAND + 2], a
- ld a, [hli]
- ld [H_MULTIPLIER], a
- call Multiply
- ld a, [hl]
- ld [H_DIVISOR], a
- ld b, $4
- call Divide
- pop hl
- ld a, [H_PRODUCT + 3]
- ld b, a
- ld a, [H_PRODUCT + 2]
- or b
- jp nz, UpdateLoweredStat
- ld [H_MULTIPLICAND + 1], a
- ld a, $1
- ld [H_MULTIPLICAND + 2], a
-
-UpdateLoweredStat:
- ld a, [H_PRODUCT + 2]
- ld [hli], a
- ld a, [H_PRODUCT + 3]
- ld [hl], a
- pop de
- pop hl
-UpdateLoweredStatDone:
- ld b, c
- inc b
- push de
- call PrintStatText
- pop de
- ld a, [de]
- cp $44
- jr nc, .ApplyBadgeBoostsAndStatusPenalties
- call PlayCurrentMoveAnimation2
-.ApplyBadgeBoostsAndStatusPenalties
- ld a, [H_WHOSETURN]
- and a
- call nz, ApplyBadgeStatBoosts ; whenever the player uses a stat-down move, badge boosts get reapplied again to every stat,
- ; even to those not affected by the stat-up move (will be boosted further)
- ld hl, MonsStatsFellText
- call PrintText
-
-; These where probably added given that a stat-down move affecting speed or attack will override
-; the stat penalties from paralysis and burn respectively.
-; But they are always called regardless of the stat affected by the stat-down move.
- call QuarterSpeedDueToParalysis
- jp HalveAttackDueToBurn
-
-CantLowerAnymore_Pop:
- pop de
- pop hl
- inc [hl]
-
-CantLowerAnymore:
- ld a, [de]
- cp ATTACK_DOWN_SIDE_EFFECT
- ret nc
- ld hl, NothingHappenedText
- jp PrintText
-
-MoveMissed:
- ld a, [de]
- cp $44
- ret nc
- jp ConditionalPrintButItFailed
-
-MonsStatsFellText:
- TX_FAR _MonsStatsFellText
- TX_ASM
- ld hl, FellText
- ld a, [H_WHOSETURN]
- and a
- ld a, [wPlayerMoveEffect]
- jr z, .playerTurn
- ld a, [wEnemyMoveEffect]
-.playerTurn
-; check if the move's effect decreases a stat by 2
- cp BIDE_EFFECT
- ret c
- cp ATTACK_DOWN_SIDE_EFFECT
- ret nc
- ld hl, GreatlyFellText
- ret
-
-GreatlyFellText:
- TX_DELAY
- TX_FAR _GreatlyFellText
-; fallthrough
-FellText:
- TX_FAR _FellText
- db "@"
-
-PrintStatText:
- ld hl, StatsTextStrings
- ld c, "@"
-.findStatName_outer
- dec b
- jr z, .foundStatName
-.findStatName_inner
- ld a, [hli]
- cp c
- jr z, .findStatName_outer
- jr .findStatName_inner
-.foundStatName
- ld de, wcf4b
- ld bc, $a
- jp CopyData
-
-StatsTextStrings:
- db "ATTACK@"
- db "DEFENSE@"
- db "SPEED@"
- db "SPECIAL@"
- db "ACCURACY@"
- db "EVADE@"
-
-StatModifierRatios:
-; first byte is numerator, second byte is denominator
- db 25, 100 ; 0.25
- db 28, 100 ; 0.28
- db 33, 100 ; 0.33
- db 40, 100 ; 0.40
- db 50, 100 ; 0.50
- db 66, 100 ; 0.66
- db 1, 1 ; 1.00
- db 15, 10 ; 1.50
- db 2, 1 ; 2.00
- db 25, 10 ; 2.50
- db 3, 1 ; 3.00
- db 35, 10 ; 3.50
- db 4, 1 ; 4.00
-
-BideEffect:
- ld hl, wPlayerBattleStatus1
- ld de, wPlayerBideAccumulatedDamage
- ld bc, wPlayerNumAttacksLeft
- ld a, [H_WHOSETURN]
- and a
- jr z, .bideEffect
- ld hl, wEnemyBattleStatus1
- ld de, wEnemyBideAccumulatedDamage
- ld bc, wEnemyNumAttacksLeft
-.bideEffect
- set STORING_ENERGY, [hl] ; mon is now using bide
- xor a
- ld [de], a
- inc de
- ld [de], a
- ld [wPlayerMoveEffect], a
- ld [wEnemyMoveEffect], a
- call BattleRandom
- and $1
- inc a
- inc a
- ld [bc], a ; set Bide counter to 2 or 3 at random
- ld a, [H_WHOSETURN]
- add XSTATITEM_ANIM
- jp PlayBattleAnimation2
-
-ThrashPetalDanceEffect:
- ld hl, wPlayerBattleStatus1
- ld de, wPlayerNumAttacksLeft
- ld a, [H_WHOSETURN]
- and a
- jr z, .thrashPetalDanceEffect
- ld hl, wEnemyBattleStatus1
- ld de, wEnemyNumAttacksLeft
-.thrashPetalDanceEffect
- set THRASHING_ABOUT, [hl] ; mon is now using thrash/petal dance
- call BattleRandom
- and $1
- inc a
- inc a
- ld [de], a ; set thrash/petal dance counter to 2 or 3 at random
- ld a, [H_WHOSETURN]
- add ANIM_B0
- jp PlayBattleAnimation2
-
-SwitchAndTeleportEffect:
- ld a, [H_WHOSETURN]
- and a
- jr nz, .handleEnemy
- ld a, [wIsInBattle]
- dec a
- jr nz, .notWildBattle1
- ld a, [wCurEnemyLVL]
- ld b, a
- ld a, [wBattleMonLevel]
- cp b ; is the player's level greater than the enemy's level?
- jr nc, .playerMoveWasSuccessful ; if so, teleport will always succeed
- add b
- ld c, a
- inc c ; c = sum of player level and enemy level
-.rejectionSampleLoop1
- call BattleRandom
- cp c ; get a random number between 0 and c
- jr nc, .rejectionSampleLoop1
- srl b
- srl b ; b = enemyLevel / 4
- cp b ; is rand[0, playerLevel + enemyLevel) >= (enemyLevel / 4)?
- jr nc, .playerMoveWasSuccessful ; if so, allow teleporting
- ld c, 50
- call DelayFrames
- ld a, [wPlayerMoveNum]
- cp TELEPORT
- jp nz, PrintDidntAffectText
- jp PrintButItFailedText_
-.playerMoveWasSuccessful
- call ReadPlayerMonCurHPAndStatus
- xor a
- ld [wAnimationType], a
- inc a
- ld [wEscapedFromBattle], a
- ld a, [wPlayerMoveNum]
- jr .playAnimAndPrintText
-.notWildBattle1
- ld c, 50
- call DelayFrames
- ld hl, IsUnaffectedText
- ld a, [wPlayerMoveNum]
- cp TELEPORT
- jp nz, PrintText
- jp PrintButItFailedText_
-.handleEnemy
- ld a, [wIsInBattle]
- dec a
- jr nz, .notWildBattle2
- ld a, [wBattleMonLevel]
- ld b, a
- ld a, [wCurEnemyLVL]
- cp b
- jr nc, .enemyMoveWasSuccessful
- add b
- ld c, a
- inc c
-.rejectionSampleLoop2
- call BattleRandom
- cp c
- jr nc, .rejectionSampleLoop2
- srl b
- srl b
- cp b
- jr nc, .enemyMoveWasSuccessful
- ld c, 50
- call DelayFrames
- ld a, [wEnemyMoveNum]
- cp TELEPORT
- jp nz, PrintDidntAffectText
- jp PrintButItFailedText_
-.enemyMoveWasSuccessful
- call ReadPlayerMonCurHPAndStatus
- xor a
- ld [wAnimationType], a
- inc a
- ld [wEscapedFromBattle], a
- ld a, [wEnemyMoveNum]
- jr .playAnimAndPrintText
-.notWildBattle2
- ld c, 50
- call DelayFrames
- ld hl, IsUnaffectedText
- ld a, [wEnemyMoveNum]
- cp TELEPORT
- jp nz, PrintText
- jp ConditionalPrintButItFailed
-.playAnimAndPrintText
- push af
- call PlayBattleAnimation
- ld c, 20
- call DelayFrames
- pop af
- ld hl, RanFromBattleText
- cp TELEPORT
- jr z, .printText
- ld hl, RanAwayScaredText
- cp ROAR
- jr z, .printText
- ld hl, WasBlownAwayText
-.printText
- jp PrintText
-
-RanFromBattleText:
- TX_FAR _RanFromBattleText
- db "@"
-
-RanAwayScaredText:
- TX_FAR _RanAwayScaredText
- db "@"
-
-WasBlownAwayText:
- TX_FAR _WasBlownAwayText
- db "@"
-
-TwoToFiveAttacksEffect:
- ld hl, wPlayerBattleStatus1
- ld de, wPlayerNumAttacksLeft
- ld bc, wPlayerNumHits
- ld a, [H_WHOSETURN]
- and a
- jr z, .twoToFiveAttacksEffect
- ld hl, wEnemyBattleStatus1
- ld de, wEnemyNumAttacksLeft
- ld bc, wEnemyNumHits
-.twoToFiveAttacksEffect
- bit ATTACKING_MULTIPLE_TIMES, [hl] ; is mon attacking multiple times?
- ret nz
- set ATTACKING_MULTIPLE_TIMES, [hl] ; mon is now attacking multiple times
- ld hl, wPlayerMoveEffect
- ld a, [H_WHOSETURN]
- and a
- jr z, .setNumberOfHits
- ld hl, wEnemyMoveEffect
-.setNumberOfHits
- ld a, [hl]
- cp TWINEEDLE_EFFECT
- jr z, .twineedle
- cp ATTACK_TWICE_EFFECT
- ld a, $2 ; number of hits it's always 2 for ATTACK_TWICE_EFFECT
- jr z, .saveNumberOfHits
-; for TWO_TO_FIVE_ATTACKS_EFFECT 3/8 chance for 2 and 3 hits, and 1/8 chance for 4 and 5 hits
- call BattleRandom
- and $3
- cp $2
- jr c, .gotNumHits
-; if the number of hits was greater than 2, re-roll again for a lower chance
- call BattleRandom
- and $3
-.gotNumHits
- inc a
- inc a
-.saveNumberOfHits
- ld [de], a
- ld [bc], a
- ret
-.twineedle
- ld a, POISON_SIDE_EFFECT1
- ld [hl], a ; set Twineedle's effect to poison effect
- jr .saveNumberOfHits
-
-FlinchSideEffect:
- call CheckTargetSubstitute
- ret nz
- ld hl, wEnemyBattleStatus1
- ld de, wPlayerMoveEffect
- ld a, [H_WHOSETURN]
- and a
- jr z, .flinchSideEffect
- ld hl, wPlayerBattleStatus1
- ld de, wEnemyMoveEffect
-.flinchSideEffect
- ld a, [wLinkState]
- cp LINK_STATE_BATTLING
- call z, ClearHyperBeam
- ld a, [de]
- cp FLINCH_SIDE_EFFECT1
- ld b, $1a ; ~10% chance of flinch
- jr z, .gotEffectChance
- ld b, $4d ; ~30% chance of flinch
-.gotEffectChance
- call BattleRandom
- cp b
- ret nc
- set FLINCHED, [hl] ; set mon's status to flinching
- call ClearHyperBeam
- ret
-
-OneHitKOEffect:
- jpab OneHitKOEffect_
-
-ChargeEffect:
- ld hl, wPlayerBattleStatus1
- ld de, wPlayerMoveEffect
- ld a, [H_WHOSETURN]
- and a
- ld b, XSTATITEM_ANIM
- jr z, .chargeEffect
- ld hl, wEnemyBattleStatus1
- ld de, wEnemyMoveEffect
- ld b, ANIM_AF
-.chargeEffect
- set CHARGING_UP, [hl]
- ld a, [de]
- dec de ; de contains enemy or player MOVENUM
- cp FLY_EFFECT
- jr nz, .notFly
- set INVULNERABLE, [hl] ; mon is now invulnerable to typical attacks (fly/dig)
- ld b, TELEPORT ; load Teleport's animation
-.notFly
- ld a, [de]
- cp DIG
- jr nz, .notDigOrFly
- set INVULNERABLE, [hl] ; mon is now invulnerable to typical attacks (fly/dig)
- ld b, ANIM_C0
-.notDigOrFly
- push de
- push bc
- inc hl ; battle status 2
- push hl
- ld a, [hl]
- bit HAS_SUBSTITUTE_UP, a
- ld hl, HideSubstituteShowMonAnim
- ld b, BANK(HideSubstituteShowMonAnim)
- call nz, Bankswitch
- pop hl
- pop bc
- xor a
- ld [wAnimationType], a
- ld a, b
- call PlayBattleAnimation
- ld a, [hl]
- bit HAS_SUBSTITUTE_UP, a
- ld hl, ReshowSubstituteAnim
- ld b, BANK(ReshowSubstituteAnim)
- call nz, Bankswitch
- pop de
- ld a, [de]
- ld [wChargeMoveNum], a
- ld hl, ChargeMoveEffectText
- jp PrintText
-
-ChargeMoveEffectText:
- TX_FAR _ChargeMoveEffectText
- TX_ASM
- ld a, [wChargeMoveNum]
- cp RAZOR_WIND
- ld hl, MadeWhirlwindText
- jr z, .gotText
- cp SOLARBEAM
- ld hl, TookInSunlightText
- jr z, .gotText
- cp SKULL_BASH
- ld hl, LoweredItsHeadText
- jr z, .gotText
- cp SKY_ATTACK
- ld hl, SkyAttackGlowingText
- jr z, .gotText
- cp FLY
- ld hl, FlewUpHighText
- jr z, .gotText
- cp DIG
- ld hl, DugAHoleText
-.gotText
- ret
-
-MadeWhirlwindText:
- TX_FAR _MadeWhirlwindText
- db "@"
-
-TookInSunlightText:
- TX_FAR _TookInSunlightText
- db "@"
-
-LoweredItsHeadText:
- TX_FAR _LoweredItsHeadText
- db "@"
-
-SkyAttackGlowingText:
- TX_FAR _SkyAttackGlowingText
- db "@"
-
-FlewUpHighText:
- TX_FAR _FlewUpHighText
- db "@"
-
-DugAHoleText:
- TX_FAR _DugAHoleText
- db "@"
-
-TrappingEffect:
- ld hl, wPlayerBattleStatus1
- ld de, wPlayerNumAttacksLeft
- ld a, [H_WHOSETURN]
- and a
- jr z, .trappingEffect
- ld hl, wEnemyBattleStatus1
- ld de, wEnemyNumAttacksLeft
-.trappingEffect
- bit USING_TRAPPING_MOVE, [hl]
- ret nz
- call ClearHyperBeam ; since this effect is called before testing whether the move will hit,
- ; the target won't need to recharge even if the trapping move missed
- set USING_TRAPPING_MOVE, [hl] ; mon is now using a trapping move
- call BattleRandom ; 3/8 chance for 2 and 3 attacks, and 1/8 chance for 4 and 5 attacks
- and $3
- cp $2
- jr c, .setTrappingCounter
- call BattleRandom
- and $3
-.setTrappingCounter
- inc a
- ld [de], a
- ret
-
-MistEffect:
- jpab MistEffect_
-
-FocusEnergyEffect:
- jpab FocusEnergyEffect_
-
-RecoilEffect:
- jpab RecoilEffect_
-
-ConfusionSideEffect:
- call BattleRandom
- cp $19 ; ~10% chance
- ret nc
- jr ConfusionSideEffectSuccess
-
-ConfusionEffect:
- call CheckTargetSubstitute
- jr nz, ConfusionEffectFailed
- call MoveHitTest
- ld a, [wMoveMissed]
- and a
- jr nz, ConfusionEffectFailed
-
-ConfusionSideEffectSuccess:
- ld a, [H_WHOSETURN]
- and a
- ld hl, wEnemyBattleStatus1
- ld bc, wEnemyConfusedCounter
- ld a, [wPlayerMoveEffect]
- jr z, .confuseTarget
- ld hl, wPlayerBattleStatus1
- ld bc, wPlayerConfusedCounter
- ld a, [wEnemyMoveEffect]
-.confuseTarget
- bit CONFUSED, [hl] ; is mon confused?
- jr nz, ConfusionEffectFailed
- set CONFUSED, [hl] ; mon is now confused
- push af
- call BattleRandom
- and $3
- inc a
- inc a
- ld [bc], a ; confusion status will last 2-5 turns
- pop af
- cp CONFUSION_SIDE_EFFECT
- call nz, PlayCurrentMoveAnimation2
- ld hl, BecameConfusedText
- jp PrintText
-
-BecameConfusedText:
- TX_FAR _BecameConfusedText
- db "@"
-
-ConfusionEffectFailed:
- cp CONFUSION_SIDE_EFFECT
- ret z
- ld c, 50
- call DelayFrames
- jp ConditionalPrintButItFailed
-
-ParalyzeEffect:
- jpab ParalyzeEffect_
-
-SubstituteEffect:
- jpab SubstituteEffect_
-
-HyperBeamEffect:
- ld hl, wPlayerBattleStatus2
- ld a, [H_WHOSETURN]
- and a
- jr z, .hyperBeamEffect
- ld hl, wEnemyBattleStatus2
-.hyperBeamEffect
- set NEEDS_TO_RECHARGE, [hl] ; mon now needs to recharge
- ret
-
-ClearHyperBeam:
- push hl
- ld hl, wEnemyBattleStatus2
- ld a, [H_WHOSETURN]
- and a
- jr z, .playerTurn
- ld hl, wPlayerBattleStatus2
-.playerTurn
- res NEEDS_TO_RECHARGE, [hl] ; mon no longer needs to recharge
- pop hl
- ret
-
-RageEffect:
- ld hl, wPlayerBattleStatus2
- ld a, [H_WHOSETURN]
- and a
- jr z, .player
- ld hl, wEnemyBattleStatus2
-.player
- set USING_RAGE, [hl] ; mon is now in "rage" mode
- ret
-
-MimicEffect:
- ld c, 50
- call DelayFrames
- call MoveHitTest
- ld a, [wMoveMissed]
- and a
- jr nz, .mimicMissed
- ld a, [H_WHOSETURN]
- and a
- ld hl, wBattleMonMoves
- ld a, [wPlayerBattleStatus1]
- jr nz, .enemyTurn
- ld a, [wLinkState]
- cp LINK_STATE_BATTLING
- jr nz, .letPlayerChooseMove
- ld hl, wEnemyMonMoves
- ld a, [wEnemyBattleStatus1]
-.enemyTurn
- bit INVULNERABLE, a
- jr nz, .mimicMissed
-.getRandomMove
- push hl
- call BattleRandom
- and $3
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [hl]
- pop hl
- and a
- jr z, .getRandomMove
- ld d, a
- ld a, [H_WHOSETURN]
- and a
- ld hl, wBattleMonMoves
- ld a, [wPlayerMoveListIndex]
- jr z, .playerTurn
- ld hl, wEnemyMonMoves
- ld a, [wEnemyMoveListIndex]
- jr .playerTurn
-.letPlayerChooseMove
- ld a, [wEnemyBattleStatus1]
- bit INVULNERABLE, a
- jr nz, .mimicMissed
- ld a, [wCurrentMenuItem]
- push af
- ld a, $1
- ld [wMoveMenuType], a
- call MoveSelectionMenu
- call LoadScreenTilesFromBuffer1
- ld hl, wEnemyMonMoves
- ld a, [wCurrentMenuItem]
- ld c, a
- ld b, $0
- add hl, bc
- ld d, [hl]
- pop af
- ld hl, wBattleMonMoves
-.playerTurn
- ld c, a
- ld b, $0
- add hl, bc
- ld a, d
- ld [hl], a
- ld [wd11e], a
- call GetMoveName
- call PlayCurrentMoveAnimation
- ld hl, MimicLearnedMoveText
- jp PrintText
-.mimicMissed
- jp PrintButItFailedText_
-
-MimicLearnedMoveText:
- TX_FAR _MimicLearnedMoveText
- db "@"
-
-LeechSeedEffect:
- jpab LeechSeedEffect_
-
-SplashEffect:
- call PlayCurrentMoveAnimation
- jp PrintNoEffectText
-
-DisableEffect:
- call MoveHitTest
- ld a, [wMoveMissed]
- and a
- jr nz, .moveMissed
- ld de, wEnemyDisabledMove
- ld hl, wEnemyMonMoves
- ld a, [H_WHOSETURN]
- and a
- jr z, .disableEffect
- ld de, wPlayerDisabledMove
- ld hl, wBattleMonMoves
-.disableEffect
-; no effect if target already has a move disabled
- ld a, [de]
- and a
- jr nz, .moveMissed
-.pickMoveToDisable
- push hl
- call BattleRandom
- and $3
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [hl]
- pop hl
- and a
- jr z, .pickMoveToDisable ; loop until a non-00 move slot is found
- ld [wd11e], a ; store move number
- push hl
- ld a, [H_WHOSETURN]
- and a
- ld hl, wBattleMonPP
- jr nz, .enemyTurn
- ld a, [wLinkState]
- cp LINK_STATE_BATTLING
- pop hl ; wEnemyMonMoves
- jr nz, .playerTurnNotLinkBattle
-; .playerTurnLinkBattle
- push hl
- ld hl, wEnemyMonPP
-.enemyTurn
- push hl
- ld a, [hli]
- or [hl]
- inc hl
- or [hl]
- inc hl
- or [hl]
- and $3f
- pop hl ; wBattleMonPP or wEnemyMonPP
- jr z, .moveMissedPopHL ; nothing to do if all moves have no PP left
- add hl, bc
- ld a, [hl]
- pop hl
- and a
- jr z, .pickMoveToDisable ; pick another move if this one had 0 PP
-.playerTurnNotLinkBattle
-; non-link battle enemies have unlimited PP so the previous checks aren't needed
- call BattleRandom
- and $7
- 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 wEnemyDisabledMove / wPlayerDisabledMove
- ld [de], a
- call PlayCurrentMoveAnimation2
- ld hl, wPlayerDisabledMoveNumber
- ld a, [H_WHOSETURN]
- and a
- jr nz, .printDisableText
- inc hl ; wEnemyDisabledMoveNumber
-.printDisableText
- ld a, [wd11e] ; move number
- ld [hl], a
- call GetMoveName
- ld hl, MoveWasDisabledText
- jp PrintText
-.moveMissedPopHL
- pop hl
-.moveMissed
- jp PrintButItFailedText_
-
-MoveWasDisabledText:
- TX_FAR _MoveWasDisabledText
- db "@"
-
-PayDayEffect:
- jpab PayDayEffect_
-
-ConversionEffect:
- jpab ConversionEffect_
-
-HazeEffect:
- jpab HazeEffect_
-
-HealEffect:
- jpab HealEffect_
-
-TransformEffect:
- jpab TransformEffect_
-
-ReflectLightScreenEffect:
- jpab ReflectLightScreenEffect_
-
-NothingHappenedText:
- TX_FAR _NothingHappenedText
- db "@"
-
-PrintNoEffectText:
- ld hl, NoEffectText
- jp PrintText
-
-NoEffectText:
- TX_FAR _NoEffectText
- db "@"
-
-ConditionalPrintButItFailed:
- ld a, [wMoveDidntMiss]
- and a
- ret nz ; return if the side effect failed, yet the attack was successful
-
-PrintButItFailedText_:
- ld hl, ButItFailedText
- jp PrintText
-
-ButItFailedText:
- TX_FAR _ButItFailedText
- db "@"
-
-PrintDidntAffectText:
- ld hl, DidntAffectText
- jp PrintText
-
-DidntAffectText:
- TX_FAR _DidntAffectText
- db "@"
-
-IsUnaffectedText:
- TX_FAR _IsUnaffectedText
- db "@"
-
-PrintMayNotAttackText:
- ld hl, ParalyzedMayNotAttackText
- jp PrintText
-
-ParalyzedMayNotAttackText:
- TX_FAR _ParalyzedMayNotAttackText
- db "@"
-
-CheckTargetSubstitute:
- push hl
- ld hl, wEnemyBattleStatus2
- ld a, [H_WHOSETURN]
- and a
- jr z, .next1
- ld hl, wPlayerBattleStatus2
-.next1
- bit HAS_SUBSTITUTE_UP, [hl]
- pop hl
- ret
-
-PlayCurrentMoveAnimation2:
-; animation at MOVENUM will be played unless MOVENUM is 0
-; plays wAnimationType 3 or 6
- ld a, [H_WHOSETURN]
- and a
- ld a, [wPlayerMoveNum]
- jr z, .notEnemyTurn
- ld a, [wEnemyMoveNum]
-.notEnemyTurn
- and a
- ret z
-
-PlayBattleAnimation2:
-; play animation ID at a and animation type 6 or 3
- ld [wAnimationID], a
- ld a, [H_WHOSETURN]
- and a
- ld a, $6
- jr z, .storeAnimationType
- ld a, $3
-.storeAnimationType
- ld [wAnimationType], a
- jp PlayBattleAnimationGotID
-
-PlayCurrentMoveAnimation:
-; animation at MOVENUM will be played unless MOVENUM is 0
-; resets wAnimationType
- xor a
- ld [wAnimationType], a
- ld a, [H_WHOSETURN]
- and a
- ld a, [wPlayerMoveNum]
- jr z, .notEnemyTurn
- ld a, [wEnemyMoveNum]
-.notEnemyTurn
- and a
- ret z
-
-PlayBattleAnimation:
-; play animation ID at a and predefined animation type
- ld [wAnimationID], a
-
-PlayBattleAnimationGotID:
-; play animation at wAnimationID
- push hl
- push de
- push bc
- predef MoveAnimation
- callab Func_78e98
- pop bc
- pop de
- pop hl
+ callfar Func_78e98
ret
diff --git a/engine/battle/decrement_pp.asm b/engine/battle/decrement_pp.asm
index b7c428f7..441bbb81 100644
--- a/engine/battle/decrement_pp.asm
+++ b/engine/battle/decrement_pp.asm
@@ -37,7 +37,7 @@ DecrementPP:
ld a, [wPlayerMoveListIndex] ; which move (0, 1, 2, 3) did we use?
ld c, a
ld b, 0
- add hl ,bc ; calculate the address in memory of the PP we need to decrement
+ add hl, bc ; calculate the address in memory of the PP we need to decrement
; based on the move chosen.
dec [hl] ; Decrement PP
ret
diff --git a/engine/battle/display_effectiveness.asm b/engine/battle/display_effectiveness.asm
index 1bf14460..b23695cf 100644
--- a/engine/battle/display_effectiveness.asm
+++ b/engine/battle/display_effectiveness.asm
@@ -10,9 +10,9 @@ DisplayEffectiveness:
jp PrintText
SuperEffectiveText:
- TX_FAR _SuperEffectiveText
- db "@"
+ text_far _SuperEffectiveText
+ text_end
NotVeryEffectiveText:
- TX_FAR _NotVeryEffectiveText
- db "@"
+ text_far _NotVeryEffectiveText
+ text_end
diff --git a/engine/battle/draw_hud_pokeball_gfx.asm b/engine/battle/draw_hud_pokeball_gfx.asm
index 96294774..6aed1d0a 100644
--- a/engine/battle/draw_hud_pokeball_gfx.asm
+++ b/engine/battle/draw_hud_pokeball_gfx.asm
@@ -12,7 +12,7 @@ DrawEnemyPokeballs:
LoadPartyPokeballGfx:
ld de, PokeballTileGraphics
- ld hl, vSprites + $310
+ ld hl, vSprites tile $31
lb bc, BANK(PokeballTileGraphics), (PokeballTileGraphicsEnd - PokeballTileGraphics) / $10
jp CopyVideoData
@@ -125,7 +125,7 @@ PlacePlayerHUDTiles:
ld de, wHUDGraphicsTiles
ld bc, $3
call CopyData
- coord hl, 18, 10
+ hlcoord 18, 10
ld de, -1
jr PlaceHUDTiles
@@ -140,7 +140,7 @@ PlaceEnemyHUDTiles:
ld de, wHUDGraphicsTiles
ld bc, $3
call CopyData
- coord hl, 1, 2
+ hlcoord 1, 2
ld de, $1
jr PlaceHUDTiles
@@ -196,5 +196,5 @@ SetupPlayerAndEnemyPokeballs:
; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (fainted) and pokeball slot (no mon)
PokeballTileGraphics::
- INCBIN "gfx/pokeball.2bpp"
+ INCBIN "gfx/battle/balls.2bpp"
PokeballTileGraphicsEnd:
diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm
new file mode 100644
index 00000000..c4e81816
--- /dev/null
+++ b/engine/battle/effects.asm
@@ -0,0 +1,1551 @@
+JumpMoveEffect:
+ call _JumpMoveEffect
+ ld b, $1
+ ret
+
+_JumpMoveEffect:
+ ldh a, [hWhoseTurn]
+ and a
+ ld a, [wPlayerMoveEffect]
+ jr z, .next1
+ ld a, [wEnemyMoveEffect]
+.next1
+ dec a ; subtract 1, there is no special effect for 00
+ add a ; x2, 16bit pointers
+ ld hl, MoveEffectPointerTable
+ ld b, 0
+ ld c, a
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl ; jump to special effect handler
+
+INCLUDE "data/moves/effects_pointers.asm"
+
+SleepEffect:
+ ld de, wEnemyMonStatus
+ ld bc, wEnemyBattleStatus2
+ ldh a, [hWhoseTurn]
+ and a
+ jp z, .sleepEffect
+ ld de, wBattleMonStatus
+ ld bc, wPlayerBattleStatus2
+
+.sleepEffect
+ ld a, [bc]
+ bit NEEDS_TO_RECHARGE, a ; does the target need to recharge? (hyper beam)
+ res NEEDS_TO_RECHARGE, a ; target no longer needs to recharge
+ ld [bc], a
+ jr nz, .setSleepCounter ; if the target had to recharge, all hit tests will be skipped
+ ; including the event where the target already has another status
+ ld a, [de]
+ ld b, a
+ and $7
+ jr z, .notAlreadySleeping ; can't affect a mon that is already asleep
+ ld hl, AlreadyAsleepText
+ jp PrintText
+.notAlreadySleeping
+ ld a, b
+ and a
+ jr nz, .didntAffect ; can't affect a mon that is already statused
+ push de
+ call MoveHitTest ; apply accuracy tests
+ pop de
+ ld a, [wMoveMissed]
+ and a
+ jr nz, .didntAffect
+.setSleepCounter
+; set target's sleep counter to a random number between 1 and 7
+ call BattleRandom
+ and $7
+ jr z, .setSleepCounter
+ ld b, a
+ ld a, [wUnknownSerialFlag_d499]
+ and a
+ jr z, .asm_3f1ba ; XXX stadium stuff?
+ ld a, b
+ and $3
+ jr z, .setSleepCounter
+ ld b, a
+.asm_3f1ba
+ ld a, b
+ ld [de], a
+ call PlayCurrentMoveAnimation2
+ ld hl, FellAsleepText
+ jp PrintText
+.didntAffect
+ jp PrintDidntAffectText
+
+FellAsleepText:
+ text_far _FellAsleepText
+ text_end
+
+AlreadyAsleepText:
+ text_far _AlreadyAsleepText
+ text_end
+
+PoisonEffect:
+ ld hl, wEnemyMonStatus
+ ld de, wPlayerMoveEffect
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .poisonEffect
+ ld hl, wBattleMonStatus
+ ld de, wEnemyMoveEffect
+.poisonEffect
+ call CheckTargetSubstitute
+ jr nz, .noEffect ; can't poison a substitute target
+ ld a, [hli]
+ ld b, a
+ and a
+ jr nz, .noEffect ; miss if target is already statused
+ ld a, [hli]
+ cp POISON ; can't poison a poison-type target
+ jr z, .noEffect
+ ld a, [hld]
+ cp POISON ; can't poison a poison-type target
+ jr z, .noEffect
+ ld a, [de]
+ cp POISON_SIDE_EFFECT1
+ ld b, $34 ; ~20% chance of poisoning
+ jr z, .sideEffectTest
+ cp POISON_SIDE_EFFECT2
+ ld b, $67 ; ~40% chance of poisoning
+ jr z, .sideEffectTest
+ push hl
+ push de
+ call MoveHitTest ; apply accuracy tests
+ pop de
+ pop hl
+ ld a, [wMoveMissed]
+ and a
+ jr nz, .didntAffect
+ jr .inflictPoison
+.sideEffectTest
+ call BattleRandom
+ cp b ; was side effect successful?
+ ret nc
+.inflictPoison
+ dec hl
+ set 3, [hl] ; mon is now poisoned
+ push de
+ dec de
+ ldh a, [hWhoseTurn]
+ and a
+ ld b, ANIM_C7
+ ld hl, wPlayerBattleStatus3
+ ld a, [de]
+ ld de, wPlayerToxicCounter
+ jr nz, .ok
+ ld b, ANIM_A9
+ ld hl, wEnemyBattleStatus3
+ ld de, wEnemyToxicCounter
+.ok
+ cp TOXIC
+ jr nz, .normalPoison ; done if move is not Toxic
+ set BADLY_POISONED, [hl] ; else set Toxic battstatus
+ xor a
+ ld [de], a
+ ld hl, BadlyPoisonedText
+ jr .continue
+.normalPoison
+ ld hl, PoisonedText
+.continue
+ pop de
+ ld a, [de]
+ cp POISON_EFFECT
+ jr z, .regularPoisonEffect
+ ld a, b
+ call PlayBattleAnimation2
+ jp PrintText
+.regularPoisonEffect
+ call PlayCurrentMoveAnimation2
+ jp PrintText
+.noEffect
+ ld a, [de]
+ cp POISON_EFFECT
+ ret nz
+.didntAffect
+ ld c, 50
+ call DelayFrames
+ jp PrintDidntAffectText
+
+PoisonedText:
+ text_far _PoisonedText
+ text_end
+
+BadlyPoisonedText:
+ text_far _BadlyPoisonedText
+ text_end
+
+DrainHPEffect:
+ jpfar DrainHPEffect_
+
+ExplodeEffect:
+ ld hl, wBattleMonHP
+ ld de, wPlayerBattleStatus2
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .faintUser
+ ld hl, wEnemyMonHP
+ ld de, wEnemyBattleStatus2
+.faintUser
+ xor a
+ ld [hli], a ; set the mon's HP to 0
+ ld [hli], a
+ inc hl
+ ld [hl], a ; set mon's status to 0
+ ld a, [de]
+ res SEEDED, a ; clear mon's leech seed status
+ ld [de], a
+ ret
+
+FreezeBurnParalyzeEffect:
+ xor a
+ ld [wAnimationType], a
+ call CheckTargetSubstitute ; test bit 4 of d063/d068 flags [target has substitute flag]
+ ret nz ; return if they have a substitute, can't effect them
+ ldh a, [hWhoseTurn]
+ and a
+ jp nz, .opponentAttacker
+ ld a, [wEnemyMonStatus]
+ and a
+ jp nz, CheckDefrost ; can't inflict status if opponent is already statused
+ ld a, [wPlayerMoveType]
+ ld b, a
+ ld a, [wEnemyMonType1]
+ cp b ; do target type 1 and move type match?
+ ret z ; return if they match (an ice move can't freeze an ice-type, body slam can't paralyze a normal-type, etc.)
+ ld a, [wEnemyMonType2]
+ cp b ; do target type 2 and move type match?
+ ret z ; return if they match
+ ld a, [wPlayerMoveEffect]
+ cp UNUSED_EFFECT_23 ; more stadium stuff
+ jr nz, .asm_3f2c7
+ ld a, [wUnknownSerialFlag_d499]
+ and a
+ ld a, FREEZE_SIDE_EFFECT
+ ld b, $4d ; else use 0x4D/0x100 or 77/256 = 30.1%~ chance
+ jr z, .next1
+ ld b, $1a ; 0x1A/0x100 or 26/256 = 10.2%~ chance
+ jr .next1
+.asm_3f2c7
+ 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..
+ ld b, $4d ; else use 0x4D/0x100 or 77/256 = 30.1%~ chance
+ sub $1e ; subtract $1E to map to equivalent 10% chance effects
+.next1
+ push af
+ call BattleRandom ; get random 8bit value for probability test
+ cp b
+ pop bc
+ ret nc ; do nothing if random value is >= 1A or 4D [no status applied]
+ ld a, b ; what type of effect is this?
+ cp BURN_SIDE_EFFECT1
+ jr z, .burn1
+ cp FREEZE_SIDE_EFFECT
+ jr z, .freeze1
+; .paralyze
+ ld a, 1 << PAR
+ ld [wEnemyMonStatus], a
+ call QuarterSpeedDueToParalysis ; quarter speed of affected mon
+ ld a, ANIM_A9
+ call PlayBattleAnimation
+ jp PrintMayNotAttackText ; print paralysis text
+.burn1
+ ld a, 1 << BRN
+ ld [wEnemyMonStatus], a
+ call HalveAttackDueToBurn ; halve attack of affected mon
+ ld a, ANIM_A9
+ call PlayBattleAnimation
+ ld hl, BurnedText
+ jp PrintText
+.freeze1
+ call ClearHyperBeam ; resets hyper beam (recharge) condition from target
+ ld a, 1 << FRZ
+ ld [wEnemyMonStatus], a
+ ld a, ANIM_A9
+ call PlayBattleAnimation
+ ld hl, FrozenText
+ jp PrintText
+.opponentAttacker
+ ld a, [wBattleMonStatus] ; mostly same as above with addresses swapped for opponent
+ and a
+ jp nz, CheckDefrost
+ ld a, [wEnemyMoveType]
+ ld b, a
+ ld a, [wBattleMonType1]
+ cp b
+ ret z
+ ld a, [wBattleMonType2]
+ cp b
+ ret z
+ ld a, [wEnemyMoveEffect]
+ cp UNUSED_EFFECT_23 ; more stadium stuff
+ jr nz, .asm_3f341
+ ld a, [wUnknownSerialFlag_d499]
+ and a
+ ld a, FREEZE_SIDE_EFFECT
+ ld b, $4d ; else use 0x4D/0x100 or 77/256 = 30.1%~ chance
+ jr z, .next2
+ ld b, $1a ; 0x1A/0x100 or 26/256 = 10.2%~ chance
+ jr .next2
+.asm_3f341
+ cp a, PARALYZE_SIDE_EFFECT1 + 1
+ ld b, $1a
+ jr c, .next2
+ ld b, $4d
+ sub $1e
+.next2
+ push af
+ call BattleRandom
+ cp b
+ pop bc
+ ret nc
+ ld a, b
+ cp BURN_SIDE_EFFECT1
+ jr z, .burn2
+ cp FREEZE_SIDE_EFFECT
+ jr z, .freeze2
+ ld a, 1 << PAR
+ ld [wBattleMonStatus], a
+ call QuarterSpeedDueToParalysis
+ ld a, ANIM_C7
+ call PlayBattleAnimation2
+ jp PrintMayNotAttackText
+.burn2
+ ld a, 1 << BRN
+ ld [wBattleMonStatus], a
+ call HalveAttackDueToBurn
+ ld a, ANIM_C7
+ call PlayBattleAnimation2
+ ld hl, BurnedText
+ jp PrintText
+.freeze2
+; hyper beam bits aren't reseted for opponent's side
+ ld a, 1 << FRZ
+ ld [wBattleMonStatus], a
+ ld a, ANIM_C7
+ call PlayBattleAnimation2
+ ld hl, FrozenText
+ jp PrintText
+
+BurnedText:
+ text_far _BurnedText
+ text_end
+
+FrozenText:
+ text_far _FrozenText
+ text_end
+
+CheckDefrost:
+; any fire-type move that has a chance inflict burn (all but Fire Spin) will defrost a frozen target
+ and 1 << FRZ ; are they frozen?
+ ret z ; return if so
+ ldh a, [hWhoseTurn]
+ and a
+ jr nz, .opponent
+ ;player [attacker]
+ ld a, [wPlayerMoveType]
+ sub FIRE
+ ret nz ; return if type of move used isn't fire
+ ld [wEnemyMonStatus], a ; set opponent status to 00 ["defrost" a frozen monster]
+ ld hl, wEnemyMon1Status
+ ld a, [wEnemyMonPartyPos]
+ ld bc, wEnemyMon2 - wEnemyMon1
+ call AddNTimes
+ xor a
+ ld [hl], a ; clear status in roster
+ ld hl, FireDefrostedText
+ jr .common
+.opponent
+ ld a, [wEnemyMoveType] ; same as above with addresses swapped
+ sub FIRE
+ ret nz
+ ld [wBattleMonStatus], a
+ ld hl, wPartyMon1Status
+ ld a, [wPlayerMonNumber]
+ ld bc, wPartyMon2 - wPartyMon1
+ call AddNTimes
+ xor a
+ ld [hl], a
+ ld hl, FireDefrostedText
+.common
+ jp PrintText
+
+FireDefrostedText:
+ text_far _FireDefrostedText
+ text_end
+
+StatModifierUpEffect:
+ ld hl, wPlayerMonStatMods
+ ld de, wPlayerMoveEffect
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .statModifierUpEffect
+ ld hl, wEnemyMonStatMods
+ ld de, wEnemyMoveEffect
+.statModifierUpEffect
+ ld a, [de]
+ sub ATTACK_UP1_EFFECT
+ cp EVASION_UP1_EFFECT + $3 - ATTACK_UP1_EFFECT ; covers all +1 effects
+ jr c, .incrementStatMod
+ sub ATTACK_UP2_EFFECT - ATTACK_UP1_EFFECT ; map +2 effects to equivalent +1 effect
+.incrementStatMod
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld b, [hl]
+ inc b ; increment corresponding stat mod
+ ld a, $d
+ cp b ; can't raise stat past +6 ($d or 13)
+ jp c, PrintNothingHappenedText
+ ld a, [de]
+ cp ATTACK_UP1_EFFECT + $8 ; is it a +2 effect?
+ jr c, .ok
+ inc b ; if so, increment stat mod again
+ ld a, $d
+ cp b ; unless it's already +6
+ jr nc, .ok
+ ld b, a
+.ok
+ ld [hl], b
+ ld a, c
+ cp $4
+ jr nc, UpdateStatDone ; jump if mod affected is evasion/accuracy
+ push hl
+ ld hl, wBattleMonAttack + 1
+ ld de, wPlayerMonUnmodifiedAttack
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .pointToStats
+ ld hl, wEnemyMonAttack + 1
+ ld de, wEnemyMonUnmodifiedAttack
+.pointToStats
+ push bc
+ sla c
+ ld b, $0
+ add hl, bc ; hl = modified stat
+ ld a, c
+ add e
+ ld e, a
+ jr nc, .checkIf999
+ inc d ; de = unmodified (original) stat
+.checkIf999
+ pop bc
+ ; check if stat is already 999
+ ld a, [hld]
+ sub LOW(MAX_STAT_VALUE)
+ jr nz, .recalculateStat
+ ld a, [hl]
+ sbc HIGH(MAX_STAT_VALUE)
+ jp z, RestoreOriginalStatModifier
+.recalculateStat ; recalculate affected stat
+ ; paralysis and burn penalties, as well as badge boosts are ignored
+ push hl
+ push bc
+ ld hl, StatModifierRatios
+ dec b
+ sla b
+ ld c, b
+ ld b, $0
+ add hl, bc
+ pop bc
+ xor a
+ ldh [hMultiplicand], a
+ ld a, [de]
+ ldh [hMultiplicand + 1], a
+ inc de
+ ld a, [de]
+ ldh [hMultiplicand + 2], a
+ ld a, [hli]
+ ldh [hMultiplier], a
+ call Multiply
+ ld a, [hl]
+ ldh [hDivisor], a
+ ld b, $4
+ call Divide
+ pop hl
+; cap at MAX_STAT_VALUE (999)
+ ldh a, [hProduct + 3]
+ sub LOW(MAX_STAT_VALUE)
+ ldh a, [hProduct + 2]
+ sbc HIGH(MAX_STAT_VALUE)
+ jp c, UpdateStat
+ ld a, HIGH(MAX_STAT_VALUE)
+ ldh [hMultiplicand + 1], a
+ ld a, LOW(MAX_STAT_VALUE)
+ ldh [hMultiplicand + 2], a
+
+UpdateStat:
+ ldh a, [hProduct + 2]
+ ld [hli], a
+ ldh a, [hProduct + 3]
+ ld [hl], a
+ pop hl
+UpdateStatDone:
+ ld b, c
+ inc b
+ call PrintStatText
+ ld hl, wPlayerBattleStatus2
+ ld de, wPlayerMoveNum
+ ld bc, wPlayerMonMinimized
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .playerTurn
+ ld hl, wEnemyBattleStatus2
+ ld de, wEnemyMoveNum
+ ld bc, wEnemyMonMinimized
+.playerTurn
+ ld a, [de]
+ cp MINIMIZE
+ jr nz, .notMinimize
+ ; if a substitute is up, slide off the substitute and show the mon pic before
+ ; playing the minimize animation
+ bit HAS_SUBSTITUTE_UP, [hl]
+ push af
+ push bc
+ push de
+ ld hl, HideSubstituteShowMonAnim
+ ld b, BANK(HideSubstituteShowMonAnim)
+ call nz, Bankswitch
+ pop de
+.notMinimize
+ call PlayCurrentMoveAnimation
+ ld a, [de]
+ cp MINIMIZE
+ jr nz, .applyBadgeBoostsAndStatusPenalties
+ pop bc
+ ld a, $1
+ ld [bc], a
+ ld hl, ReshowSubstituteAnim
+ ld b, BANK(ReshowSubstituteAnim)
+ pop af
+ call nz, Bankswitch
+.applyBadgeBoostsAndStatusPenalties
+ ldh a, [hWhoseTurn]
+ and a
+ call z, ApplyBadgeStatBoosts ; whenever the player uses a stat-up move, badge boosts get reapplied again to every stat,
+ ; even to those not affected by the stat-up move (will be boosted further)
+ ld hl, MonsStatsRoseText
+ call PrintText
+
+; these shouldn't be here
+ call QuarterSpeedDueToParalysis ; apply speed penalty to the player whose turn is not, if it's paralyzed
+ jp HalveAttackDueToBurn ; apply attack penalty to the player whose turn is not, if it's burned
+
+RestoreOriginalStatModifier:
+ pop hl
+ dec [hl]
+
+PrintNothingHappenedText:
+ ld hl, NothingHappenedText
+ jp PrintText
+
+MonsStatsRoseText:
+ text_far _MonsStatsRoseText
+ text_asm
+ ld hl, GreatlyRoseText
+ ldh a, [hWhoseTurn]
+ and a
+ ld a, [wPlayerMoveEffect]
+ jr z, .playerTurn
+ ld a, [wEnemyMoveEffect]
+.playerTurn
+ cp ATTACK_DOWN1_EFFECT
+ ret nc
+ ld hl, RoseText
+ ret
+
+GreatlyRoseText:
+ text_pause
+ text_far _GreatlyRoseText
+; fallthrough
+RoseText:
+ text_far _RoseText
+ text_end
+
+StatModifierDownEffect:
+ ld hl, wEnemyMonStatMods
+ ld de, wPlayerMoveEffect
+ ld bc, wEnemyBattleStatus1
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .statModifierDownEffect
+ ld hl, wPlayerMonStatMods
+ ld de, wEnemyMoveEffect
+ ld bc, wPlayerBattleStatus1
+ ld a, [wLinkState]
+ cp LINK_STATE_BATTLING
+ jr z, .statModifierDownEffect
+ call BattleRandom
+ cp $40 ; 1/4 chance to miss by in regular battle
+ jp c, MoveMissed
+.statModifierDownEffect
+ call CheckTargetSubstitute ; can't hit through substitute
+ jp nz, MoveMissed
+ ld a, [de]
+ cp ATTACK_DOWN_SIDE_EFFECT
+ jr c, .nonSideEffect
+ call BattleRandom
+ cp $55 ; 85/256 chance for side effects
+ jp nc, CantLowerAnymore
+ ld a, [de]
+ sub ATTACK_DOWN_SIDE_EFFECT ; map each stat to 0-3
+ jr .decrementStatMod
+.nonSideEffect ; non-side effects only
+ push hl
+ push de
+ push bc
+ call MoveHitTest ; apply accuracy tests
+ pop bc
+ pop de
+ pop hl
+ ld a, [wMoveMissed]
+ and a
+ jp nz, MoveMissed
+ ld a, [bc]
+ bit INVULNERABLE, a ; fly/dig
+ jp nz, MoveMissed
+ ld a, [de]
+ sub ATTACK_DOWN1_EFFECT
+ cp EVASION_DOWN1_EFFECT + $3 - ATTACK_DOWN1_EFFECT ; covers all -1 effects
+ jr c, .decrementStatMod
+ sub ATTACK_DOWN2_EFFECT - ATTACK_DOWN1_EFFECT ; map -2 effects to corresponding -1 effect
+.decrementStatMod
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld b, [hl]
+ dec b ; dec corresponding stat mod
+ jp z, CantLowerAnymore ; if stat mod is 1 (-6), can't lower anymore
+ ld a, [de]
+ cp ATTACK_DOWN2_EFFECT - $16 ; $24
+ jr c, .ok
+ cp EVASION_DOWN2_EFFECT + $5 ; $44
+ jr nc, .ok
+ dec b ; stat down 2 effects only (dec mod again)
+ jr nz, .ok
+ inc b ; increment mod to 1 (-6) if it would become 0 (-7)
+.ok
+ ld [hl], b ; save modified mod
+ ld a, c
+ cp $4
+ jr nc, UpdateLoweredStatDone ; jump for evasion/accuracy
+ push hl
+ push de
+ ld hl, wEnemyMonAttack + 1
+ ld de, wEnemyMonUnmodifiedAttack
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .pointToStat
+ ld hl, wBattleMonAttack + 1
+ ld de, wPlayerMonUnmodifiedAttack
+.pointToStat
+ push bc
+ sla c
+ ld b, $0
+ add hl, bc ; hl = modified stat
+ ld a, c
+ add e
+ ld e, a
+ jr nc, .noCarry
+ inc d ; de = unmodified stat
+.noCarry
+ pop bc
+ ld a, [hld]
+ sub $1 ; can't lower stat below 1 (-6)
+ jr nz, .recalculateStat
+ ld a, [hl]
+ and a
+ jp z, CantLowerAnymore_Pop
+.recalculateStat
+; recalculate affected stat
+; paralysis and burn penalties, as well as badge boosts are ignored
+ push hl
+ push bc
+ ld hl, StatModifierRatios
+ dec b
+ sla b
+ ld c, b
+ ld b, $0
+ add hl, bc
+ pop bc
+ xor a
+ ldh [hMultiplicand], a
+ ld a, [de]
+ ldh [hMultiplicand + 1], a
+ inc de
+ ld a, [de]
+ ldh [hMultiplicand + 2], a
+ ld a, [hli]
+ ldh [hMultiplier], a
+ call Multiply
+ ld a, [hl]
+ ldh [hDivisor], a
+ ld b, $4
+ call Divide
+ pop hl
+ ldh a, [hProduct + 3]
+ ld b, a
+ ldh a, [hProduct + 2]
+ or b
+ jp nz, UpdateLoweredStat
+ ldh [hMultiplicand + 1], a
+ ld a, $1
+ ldh [hMultiplicand + 2], a
+
+UpdateLoweredStat:
+ ldh a, [hProduct + 2]
+ ld [hli], a
+ ldh a, [hProduct + 3]
+ ld [hl], a
+ pop de
+ pop hl
+UpdateLoweredStatDone:
+ ld b, c
+ inc b
+ push de
+ call PrintStatText
+ pop de
+ ld a, [de]
+ cp $44
+ jr nc, .ApplyBadgeBoostsAndStatusPenalties
+ call PlayCurrentMoveAnimation2
+.ApplyBadgeBoostsAndStatusPenalties
+ ldh a, [hWhoseTurn]
+ and a
+ call nz, ApplyBadgeStatBoosts ; whenever the player uses a stat-down move, badge boosts get reapplied again to every stat,
+ ; even to those not affected by the stat-up move (will be boosted further)
+ ld hl, MonsStatsFellText
+ call PrintText
+
+; These where probably added given that a stat-down move affecting speed or attack will override
+; the stat penalties from paralysis and burn respectively.
+; But they are always called regardless of the stat affected by the stat-down move.
+ call QuarterSpeedDueToParalysis
+ jp HalveAttackDueToBurn
+
+CantLowerAnymore_Pop:
+ pop de
+ pop hl
+ inc [hl]
+
+CantLowerAnymore:
+ ld a, [de]
+ cp ATTACK_DOWN_SIDE_EFFECT
+ ret nc
+ ld hl, NothingHappenedText
+ jp PrintText
+
+MoveMissed:
+ ld a, [de]
+ cp $44
+ ret nc
+ jp ConditionalPrintButItFailed
+
+MonsStatsFellText:
+ text_far _MonsStatsFellText
+ text_asm
+ ld hl, FellText
+ ldh a, [hWhoseTurn]
+ and a
+ ld a, [wPlayerMoveEffect]
+ jr z, .playerTurn
+ ld a, [wEnemyMoveEffect]
+.playerTurn
+; check if the move's effect decreases a stat by 2
+ cp BIDE_EFFECT
+ ret c
+ cp ATTACK_DOWN_SIDE_EFFECT
+ ret nc
+ ld hl, GreatlyFellText
+ ret
+
+GreatlyFellText:
+ text_pause
+ text_far _GreatlyFellText
+; fallthrough
+FellText:
+ text_far _FellText
+ text_end
+
+PrintStatText:
+ ld hl, StatsTextStrings
+ ld c, "@"
+.findStatName_outer
+ dec b
+ jr z, .foundStatName
+.findStatName_inner
+ ld a, [hli]
+ cp c
+ jr z, .findStatName_outer
+ jr .findStatName_inner
+.foundStatName
+ ld de, wcf4b
+ ld bc, $a
+ jp CopyData
+
+INCLUDE "data/battle/stat_names.asm"
+
+INCLUDE "data/battle/stat_modifiers.asm"
+
+BideEffect:
+ ld hl, wPlayerBattleStatus1
+ ld de, wPlayerBideAccumulatedDamage
+ ld bc, wPlayerNumAttacksLeft
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .bideEffect
+ ld hl, wEnemyBattleStatus1
+ ld de, wEnemyBideAccumulatedDamage
+ ld bc, wEnemyNumAttacksLeft
+.bideEffect
+ set STORING_ENERGY, [hl] ; mon is now using bide
+ xor a
+ ld [de], a
+ inc de
+ ld [de], a
+ ld [wPlayerMoveEffect], a
+ ld [wEnemyMoveEffect], a
+ call BattleRandom
+ and $1
+ inc a
+ inc a
+ ld [bc], a ; set Bide counter to 2 or 3 at random
+ ldh a, [hWhoseTurn]
+ add XSTATITEM_ANIM
+ jp PlayBattleAnimation2
+
+ThrashPetalDanceEffect:
+ ld hl, wPlayerBattleStatus1
+ ld de, wPlayerNumAttacksLeft
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .thrashPetalDanceEffect
+ ld hl, wEnemyBattleStatus1
+ ld de, wEnemyNumAttacksLeft
+.thrashPetalDanceEffect
+ set THRASHING_ABOUT, [hl] ; mon is now using thrash/petal dance
+ call BattleRandom
+ and $1
+ inc a
+ inc a
+ ld [de], a ; set thrash/petal dance counter to 2 or 3 at random
+ ldh a, [hWhoseTurn]
+ add ANIM_B0
+ jp PlayBattleAnimation2
+
+SwitchAndTeleportEffect:
+ ldh a, [hWhoseTurn]
+ and a
+ jr nz, .handleEnemy
+ ld a, [wIsInBattle]
+ dec a
+ jr nz, .notWildBattle1
+ ld a, [wCurEnemyLVL]
+ ld b, a
+ ld a, [wBattleMonLevel]
+ cp b ; is the player's level greater than the enemy's level?
+ jr nc, .playerMoveWasSuccessful ; if so, teleport will always succeed
+ add b
+ ld c, a
+ inc c ; c = sum of player level and enemy level
+.rejectionSampleLoop1
+ call BattleRandom
+ cp c ; get a random number between 0 and c
+ jr nc, .rejectionSampleLoop1
+ srl b
+ srl b ; b = enemyLevel / 4
+ cp b ; is rand[0, playerLevel + enemyLevel) >= (enemyLevel / 4)?
+ jr nc, .playerMoveWasSuccessful ; if so, allow teleporting
+ ld c, 50
+ call DelayFrames
+ ld a, [wPlayerMoveNum]
+ cp TELEPORT
+ jp nz, PrintDidntAffectText
+ jp PrintButItFailedText_
+.playerMoveWasSuccessful
+ call ReadPlayerMonCurHPAndStatus
+ xor a
+ ld [wAnimationType], a
+ inc a
+ ld [wEscapedFromBattle], a
+ ld a, [wPlayerMoveNum]
+ jr .playAnimAndPrintText
+.notWildBattle1
+ ld c, 50
+ call DelayFrames
+ ld hl, IsUnaffectedText
+ ld a, [wPlayerMoveNum]
+ cp TELEPORT
+ jp nz, PrintText
+ jp PrintButItFailedText_
+.handleEnemy
+ ld a, [wIsInBattle]
+ dec a
+ jr nz, .notWildBattle2
+ ld a, [wBattleMonLevel]
+ ld b, a
+ ld a, [wCurEnemyLVL]
+ cp b
+ jr nc, .enemyMoveWasSuccessful
+ add b
+ ld c, a
+ inc c
+.rejectionSampleLoop2
+ call BattleRandom
+ cp c
+ jr nc, .rejectionSampleLoop2
+ srl b
+ srl b
+ cp b
+ jr nc, .enemyMoveWasSuccessful
+ ld c, 50
+ call DelayFrames
+ ld a, [wEnemyMoveNum]
+ cp TELEPORT
+ jp nz, PrintDidntAffectText
+ jp PrintButItFailedText_
+.enemyMoveWasSuccessful
+ call ReadPlayerMonCurHPAndStatus
+ xor a
+ ld [wAnimationType], a
+ inc a
+ ld [wEscapedFromBattle], a
+ ld a, [wEnemyMoveNum]
+ jr .playAnimAndPrintText
+.notWildBattle2
+ ld c, 50
+ call DelayFrames
+ ld hl, IsUnaffectedText
+ ld a, [wEnemyMoveNum]
+ cp TELEPORT
+ jp nz, PrintText
+ jp ConditionalPrintButItFailed
+.playAnimAndPrintText
+ push af
+ call PlayBattleAnimation
+ ld c, 20
+ call DelayFrames
+ pop af
+ ld hl, RanFromBattleText
+ cp TELEPORT
+ jr z, .printText
+ ld hl, RanAwayScaredText
+ cp ROAR
+ jr z, .printText
+ ld hl, WasBlownAwayText
+.printText
+ jp PrintText
+
+RanFromBattleText:
+ text_far _RanFromBattleText
+ text_end
+
+RanAwayScaredText:
+ text_far _RanAwayScaredText
+ text_end
+
+WasBlownAwayText:
+ text_far _WasBlownAwayText
+ text_end
+
+TwoToFiveAttacksEffect:
+ ld hl, wPlayerBattleStatus1
+ ld de, wPlayerNumAttacksLeft
+ ld bc, wPlayerNumHits
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .twoToFiveAttacksEffect
+ ld hl, wEnemyBattleStatus1
+ ld de, wEnemyNumAttacksLeft
+ ld bc, wEnemyNumHits
+.twoToFiveAttacksEffect
+ bit ATTACKING_MULTIPLE_TIMES, [hl] ; is mon attacking multiple times?
+ ret nz
+ set ATTACKING_MULTIPLE_TIMES, [hl] ; mon is now attacking multiple times
+ ld hl, wPlayerMoveEffect
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .setNumberOfHits
+ ld hl, wEnemyMoveEffect
+.setNumberOfHits
+ ld a, [hl]
+ cp TWINEEDLE_EFFECT
+ jr z, .twineedle
+ cp ATTACK_TWICE_EFFECT
+ ld a, $2 ; number of hits it's always 2 for ATTACK_TWICE_EFFECT
+ jr z, .saveNumberOfHits
+; for TWO_TO_FIVE_ATTACKS_EFFECT 3/8 chance for 2 and 3 hits, and 1/8 chance for 4 and 5 hits
+ call BattleRandom
+ and $3
+ cp $2
+ jr c, .gotNumHits
+; if the number of hits was greater than 2, re-roll again for a lower chance
+ call BattleRandom
+ and $3
+.gotNumHits
+ inc a
+ inc a
+.saveNumberOfHits
+ ld [de], a
+ ld [bc], a
+ ret
+.twineedle
+ ld a, POISON_SIDE_EFFECT1
+ ld [hl], a ; set Twineedle's effect to poison effect
+ jr .saveNumberOfHits
+
+FlinchSideEffect:
+ call CheckTargetSubstitute
+ ret nz
+ ld hl, wEnemyBattleStatus1
+ ld de, wPlayerMoveEffect
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .flinchSideEffect
+ ld hl, wPlayerBattleStatus1
+ ld de, wEnemyMoveEffect
+.flinchSideEffect
+ ld a, [wLinkState]
+ cp LINK_STATE_BATTLING
+ call z, ClearHyperBeam
+ ld a, [de]
+ cp FLINCH_SIDE_EFFECT1
+ ld b, $1a ; ~10% chance of flinch
+ jr z, .gotEffectChance
+ ld b, $4d ; ~30% chance of flinch
+.gotEffectChance
+ call BattleRandom
+ cp b
+ ret nc
+ set FLINCHED, [hl] ; set mon's status to flinching
+ call ClearHyperBeam
+ ret
+
+OneHitKOEffect:
+ jpfar OneHitKOEffect_
+
+ChargeEffect:
+ ld hl, wPlayerBattleStatus1
+ ld de, wPlayerMoveEffect
+ ldh a, [hWhoseTurn]
+ and a
+ ld b, XSTATITEM_ANIM
+ jr z, .chargeEffect
+ ld hl, wEnemyBattleStatus1
+ ld de, wEnemyMoveEffect
+ ld b, ANIM_AF
+.chargeEffect
+ set CHARGING_UP, [hl]
+ ld a, [de]
+ dec de ; de contains enemy or player MOVENUM
+ cp FLY_EFFECT
+ jr nz, .notFly
+ set INVULNERABLE, [hl] ; mon is now invulnerable to typical attacks (fly/dig)
+ ld b, TELEPORT ; load Teleport's animation
+.notFly
+ ld a, [de]
+ cp DIG
+ jr nz, .notDigOrFly
+ set INVULNERABLE, [hl] ; mon is now invulnerable to typical attacks (fly/dig)
+ ld b, ANIM_C0
+.notDigOrFly
+ push de
+ push bc
+ inc hl ; battle status 2
+ push hl
+ ld a, [hl]
+ bit HAS_SUBSTITUTE_UP, a
+ ld hl, HideSubstituteShowMonAnim
+ ld b, BANK(HideSubstituteShowMonAnim)
+ call nz, Bankswitch
+ pop hl
+ pop bc
+ xor a
+ ld [wAnimationType], a
+ ld a, b
+ call PlayBattleAnimation
+ ld a, [hl]
+ bit HAS_SUBSTITUTE_UP, a
+ ld hl, ReshowSubstituteAnim
+ ld b, BANK(ReshowSubstituteAnim)
+ call nz, Bankswitch
+ pop de
+ ld a, [de]
+ ld [wChargeMoveNum], a
+ ld hl, ChargeMoveEffectText
+ jp PrintText
+
+ChargeMoveEffectText:
+ text_far _ChargeMoveEffectText
+ text_asm
+ ld a, [wChargeMoveNum]
+ cp RAZOR_WIND
+ ld hl, MadeWhirlwindText
+ jr z, .gotText
+ cp SOLARBEAM
+ ld hl, TookInSunlightText
+ jr z, .gotText
+ cp SKULL_BASH
+ ld hl, LoweredItsHeadText
+ jr z, .gotText
+ cp SKY_ATTACK
+ ld hl, SkyAttackGlowingText
+ jr z, .gotText
+ cp FLY
+ ld hl, FlewUpHighText
+ jr z, .gotText
+ cp DIG
+ ld hl, DugAHoleText
+.gotText
+ ret
+
+MadeWhirlwindText:
+ text_far _MadeWhirlwindText
+ text_end
+
+TookInSunlightText:
+ text_far _TookInSunlightText
+ text_end
+
+LoweredItsHeadText:
+ text_far _LoweredItsHeadText
+ text_end
+
+SkyAttackGlowingText:
+ text_far _SkyAttackGlowingText
+ text_end
+
+FlewUpHighText:
+ text_far _FlewUpHighText
+ text_end
+
+DugAHoleText:
+ text_far _DugAHoleText
+ text_end
+
+TrappingEffect:
+ ld hl, wPlayerBattleStatus1
+ ld de, wPlayerNumAttacksLeft
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .trappingEffect
+ ld hl, wEnemyBattleStatus1
+ ld de, wEnemyNumAttacksLeft
+.trappingEffect
+ bit USING_TRAPPING_MOVE, [hl]
+ ret nz
+ call ClearHyperBeam ; since this effect is called before testing whether the move will hit,
+ ; the target won't need to recharge even if the trapping move missed
+ set USING_TRAPPING_MOVE, [hl] ; mon is now using a trapping move
+ call BattleRandom ; 3/8 chance for 2 and 3 attacks, and 1/8 chance for 4 and 5 attacks
+ and $3
+ cp $2
+ jr c, .setTrappingCounter
+ call BattleRandom
+ and $3
+.setTrappingCounter
+ inc a
+ ld [de], a
+ ret
+
+MistEffect:
+ jpfar MistEffect_
+
+FocusEnergyEffect:
+ jpfar FocusEnergyEffect_
+
+RecoilEffect:
+ jpfar RecoilEffect_
+
+ConfusionSideEffect:
+ call BattleRandom
+ cp $19 ; ~10% chance
+ ret nc
+ jr ConfusionSideEffectSuccess
+
+ConfusionEffect:
+ call CheckTargetSubstitute
+ jr nz, ConfusionEffectFailed
+ call MoveHitTest
+ ld a, [wMoveMissed]
+ and a
+ jr nz, ConfusionEffectFailed
+
+ConfusionSideEffectSuccess:
+ ldh a, [hWhoseTurn]
+ and a
+ ld hl, wEnemyBattleStatus1
+ ld bc, wEnemyConfusedCounter
+ ld a, [wPlayerMoveEffect]
+ jr z, .confuseTarget
+ ld hl, wPlayerBattleStatus1
+ ld bc, wPlayerConfusedCounter
+ ld a, [wEnemyMoveEffect]
+.confuseTarget
+ bit CONFUSED, [hl] ; is mon confused?
+ jr nz, ConfusionEffectFailed
+ set CONFUSED, [hl] ; mon is now confused
+ push af
+ call BattleRandom
+ and $3
+ inc a
+ inc a
+ ld [bc], a ; confusion status will last 2-5 turns
+ pop af
+ cp CONFUSION_SIDE_EFFECT
+ call nz, PlayCurrentMoveAnimation2
+ ld hl, BecameConfusedText
+ jp PrintText
+
+BecameConfusedText:
+ text_far _BecameConfusedText
+ text_end
+
+ConfusionEffectFailed:
+ cp CONFUSION_SIDE_EFFECT
+ ret z
+ ld c, 50
+ call DelayFrames
+ jp ConditionalPrintButItFailed
+
+ParalyzeEffect:
+ jpfar ParalyzeEffect_
+
+SubstituteEffect:
+ jpfar SubstituteEffect_
+
+HyperBeamEffect:
+ ld hl, wPlayerBattleStatus2
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .hyperBeamEffect
+ ld hl, wEnemyBattleStatus2
+.hyperBeamEffect
+ set NEEDS_TO_RECHARGE, [hl] ; mon now needs to recharge
+ ret
+
+ClearHyperBeam:
+ push hl
+ ld hl, wEnemyBattleStatus2
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .playerTurn
+ ld hl, wPlayerBattleStatus2
+.playerTurn
+ res NEEDS_TO_RECHARGE, [hl] ; mon no longer needs to recharge
+ pop hl
+ ret
+
+RageEffect:
+ ld hl, wPlayerBattleStatus2
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .player
+ ld hl, wEnemyBattleStatus2
+.player
+ set USING_RAGE, [hl] ; mon is now in "rage" mode
+ ret
+
+MimicEffect:
+ ld c, 50
+ call DelayFrames
+ call MoveHitTest
+ ld a, [wMoveMissed]
+ and a
+ jr nz, .mimicMissed
+ ldh a, [hWhoseTurn]
+ and a
+ ld hl, wBattleMonMoves
+ ld a, [wPlayerBattleStatus1]
+ jr nz, .enemyTurn
+ ld a, [wLinkState]
+ cp LINK_STATE_BATTLING
+ jr nz, .letPlayerChooseMove
+ ld hl, wEnemyMonMoves
+ ld a, [wEnemyBattleStatus1]
+.enemyTurn
+ bit INVULNERABLE, a
+ jr nz, .mimicMissed
+.getRandomMove
+ push hl
+ call BattleRandom
+ and $3
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hl]
+ pop hl
+ and a
+ jr z, .getRandomMove
+ ld d, a
+ ldh a, [hWhoseTurn]
+ and a
+ ld hl, wBattleMonMoves
+ ld a, [wPlayerMoveListIndex]
+ jr z, .playerTurn
+ ld hl, wEnemyMonMoves
+ ld a, [wEnemyMoveListIndex]
+ jr .playerTurn
+.letPlayerChooseMove
+ ld a, [wEnemyBattleStatus1]
+ bit INVULNERABLE, a
+ jr nz, .mimicMissed
+ ld a, [wCurrentMenuItem]
+ push af
+ ld a, $1
+ ld [wMoveMenuType], a
+ call MoveSelectionMenu
+ call LoadScreenTilesFromBuffer1
+ ld hl, wEnemyMonMoves
+ ld a, [wCurrentMenuItem]
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld d, [hl]
+ pop af
+ ld hl, wBattleMonMoves
+.playerTurn
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, d
+ ld [hl], a
+ ld [wd11e], a
+ call GetMoveName
+ call PlayCurrentMoveAnimation
+ ld hl, MimicLearnedMoveText
+ jp PrintText
+.mimicMissed
+ jp PrintButItFailedText_
+
+MimicLearnedMoveText:
+ text_far _MimicLearnedMoveText
+ text_end
+
+LeechSeedEffect:
+ jpfar LeechSeedEffect_
+
+SplashEffect:
+ call PlayCurrentMoveAnimation
+ jp PrintNoEffectText
+
+DisableEffect:
+ call MoveHitTest
+ ld a, [wMoveMissed]
+ and a
+ jr nz, .moveMissed
+ ld de, wEnemyDisabledMove
+ ld hl, wEnemyMonMoves
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .disableEffect
+ ld de, wPlayerDisabledMove
+ ld hl, wBattleMonMoves
+.disableEffect
+; no effect if target already has a move disabled
+ ld a, [de]
+ and a
+ jr nz, .moveMissed
+.pickMoveToDisable
+ push hl
+ call BattleRandom
+ and $3
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hl]
+ pop hl
+ and a
+ jr z, .pickMoveToDisable ; loop until a non-00 move slot is found
+ ld [wd11e], a ; store move number
+ push hl
+ ldh a, [hWhoseTurn]
+ and a
+ ld hl, wBattleMonPP
+ jr nz, .enemyTurn
+ ld a, [wLinkState]
+ cp LINK_STATE_BATTLING
+ pop hl ; wEnemyMonMoves
+ jr nz, .playerTurnNotLinkBattle
+; .playerTurnLinkBattle
+ push hl
+ ld hl, wEnemyMonPP
+.enemyTurn
+ push hl
+ ld a, [hli]
+ or [hl]
+ inc hl
+ or [hl]
+ inc hl
+ or [hl]
+ and $3f
+ pop hl ; wBattleMonPP or wEnemyMonPP
+ jr z, .moveMissedPopHL ; nothing to do if all moves have no PP left
+ add hl, bc
+ ld a, [hl]
+ pop hl
+ and a
+ jr z, .pickMoveToDisable ; pick another move if this one had 0 PP
+.playerTurnNotLinkBattle
+; non-link battle enemies have unlimited PP so the previous checks aren't needed
+ call BattleRandom
+ and $7
+ 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 wEnemyDisabledMove / wPlayerDisabledMove
+ ld [de], a
+ call PlayCurrentMoveAnimation2
+ ld hl, wPlayerDisabledMoveNumber
+ ldh a, [hWhoseTurn]
+ and a
+ jr nz, .printDisableText
+ inc hl ; wEnemyDisabledMoveNumber
+.printDisableText
+ ld a, [wd11e] ; move number
+ ld [hl], a
+ call GetMoveName
+ ld hl, MoveWasDisabledText
+ jp PrintText
+.moveMissedPopHL
+ pop hl
+.moveMissed
+ jp PrintButItFailedText_
+
+MoveWasDisabledText:
+ text_far _MoveWasDisabledText
+ text_end
+
+PayDayEffect:
+ jpfar PayDayEffect_
+
+ConversionEffect:
+ jpfar ConversionEffect_
+
+HazeEffect:
+ jpfar HazeEffect_
+
+HealEffect:
+ jpfar HealEffect_
+
+TransformEffect:
+ jpfar TransformEffect_
+
+ReflectLightScreenEffect:
+ jpfar ReflectLightScreenEffect_
+
+NothingHappenedText:
+ text_far _NothingHappenedText
+ text_end
+
+PrintNoEffectText:
+ ld hl, NoEffectText
+ jp PrintText
+
+NoEffectText:
+ text_far _NoEffectText
+ text_end
+
+ConditionalPrintButItFailed:
+ ld a, [wMoveDidntMiss]
+ and a
+ ret nz ; return if the side effect failed, yet the attack was successful
+
+PrintButItFailedText_:
+ ld hl, ButItFailedText
+ jp PrintText
+
+ButItFailedText:
+ text_far _ButItFailedText
+ text_end
+
+PrintDidntAffectText:
+ ld hl, DidntAffectText
+ jp PrintText
+
+DidntAffectText:
+ text_far _DidntAffectText
+ text_end
+
+IsUnaffectedText:
+ text_far _IsUnaffectedText
+ text_end
+
+PrintMayNotAttackText:
+ ld hl, ParalyzedMayNotAttackText
+ jp PrintText
+
+ParalyzedMayNotAttackText:
+ text_far _ParalyzedMayNotAttackText
+ text_end
+
+CheckTargetSubstitute:
+ push hl
+ ld hl, wEnemyBattleStatus2
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .next1
+ ld hl, wPlayerBattleStatus2
+.next1
+ bit HAS_SUBSTITUTE_UP, [hl]
+ pop hl
+ ret
+
+PlayCurrentMoveAnimation2:
+; animation at MOVENUM will be played unless MOVENUM is 0
+; plays wAnimationType 3 or 6
+ ldh a, [hWhoseTurn]
+ and a
+ ld a, [wPlayerMoveNum]
+ jr z, .notEnemyTurn
+ ld a, [wEnemyMoveNum]
+.notEnemyTurn
+ and a
+ ret z
+
+PlayBattleAnimation2:
+; play animation ID at a and animation type 6 or 3
+ ld [wAnimationID], a
+ ldh a, [hWhoseTurn]
+ and a
+ ld a, $6
+ jr z, .storeAnimationType
+ ld a, $3
+.storeAnimationType
+ ld [wAnimationType], a
+ jp PlayBattleAnimationGotID
+
+PlayCurrentMoveAnimation:
+; animation at MOVENUM will be played unless MOVENUM is 0
+; resets wAnimationType
+ xor a
+ ld [wAnimationType], a
+ ldh a, [hWhoseTurn]
+ and a
+ ld a, [wPlayerMoveNum]
+ jr z, .notEnemyTurn
+ ld a, [wEnemyMoveNum]
+.notEnemyTurn
+ and a
+ ret z
+
+PlayBattleAnimation:
+; play animation ID at a and predefined animation type
+ ld [wAnimationID], a
+
+PlayBattleAnimationGotID:
+; play animation at wAnimationID
+ push hl
+ push de
+ push bc
+ predef MoveAnimation
+ callfar Func_78e98
+ pop bc
+ pop de
+ pop hl
+ ret
diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm
index 5c0c3991..e64f54e7 100755
--- a/engine/battle/end_of_battle.asm
+++ b/engine/battle/end_of_battle.asm
@@ -12,7 +12,7 @@ EndOfBattle:
call ClearScreen
ld b, SET_PAL_OVERWORLD
call RunPaletteCommand
- callab DisplayLinkBattleVersusTextBox
+ callfar DisplayLinkBattleVersusTextBox
ld a, [wBattleResult]
cp $1
ld de, YouWinText
@@ -21,7 +21,7 @@ EndOfBattle:
jr z, .placeWinOrLoseString
ld de, DrawText
.placeWinOrLoseString
- coord hl, 6, 8
+ hlcoord 6, 8
call PlaceString
ld c, 200
call DelayFrames
@@ -46,7 +46,7 @@ EndOfBattle:
ld [wForceEvolution], a
predef EvolutionAfterBattle
ld d, $82
- callab UpdatePikachuMoodAfterBattle
+ callfar UpdatePikachuMoodAfterBattle
.resetVariables
xor a
ld [wLowHealthAlarm], a ;disable low health alarm
@@ -88,5 +88,5 @@ DrawText:
db " DRAW@"
PickUpPayDayMoneyText:
- TX_FAR _PickUpPayDayMoneyText
- db "@"
+ text_far _PickUpPayDayMoneyText
+ text_end
diff --git a/engine/battle/experience.asm b/engine/battle/experience.asm
index 722685c2..bab804bb 100644
--- a/engine/battle/experience.asm
+++ b/engine/battle/experience.asm
@@ -55,15 +55,15 @@ GainExperience:
jr .gainStatExpLoop
.statExpDone
xor a
- ld [H_MULTIPLICAND], a
- ld [H_MULTIPLICAND + 1], a
+ ldh [hMultiplicand], a
+ ldh [hMultiplicand + 1], a
ld a, [wEnemyMonBaseExp]
- ld [H_MULTIPLICAND + 2], a
+ ldh [hMultiplicand + 2], a
ld a, [wEnemyMonLevel]
- ld [H_MULTIPLIER], a
+ ldh [hMultiplier], a
call Multiply
ld a, 7
- ld [H_DIVISOR], a
+ ldh [hDivisor], a
ld b, 4
call Divide
ld hl, wPartyMon1OTID - (wPartyMon1DVs - 1)
@@ -91,12 +91,12 @@ GainExperience:
inc hl
; add the gained exp to the party mon's exp
ld b, [hl]
- ld a, [H_QUOTIENT + 3]
+ ldh a, [hQuotient + 3]
ld [wExpAmountGained + 1], a
add b
ld [hld], a
ld b, [hl]
- ld a, [H_QUOTIENT + 2]
+ ldh a, [hQuotient + 2]
ld [wExpAmountGained], a
adc b
ld [hl], a
@@ -117,13 +117,13 @@ GainExperience:
ld [wd0b5], a
call GetMonHeader
ld d, MAX_LEVEL
- callab CalcExperience ; get max exp
+ callfar CalcExperience ; get max exp
; compare max exp with current exp
- ld a, [hExperience]
+ ldh a, [hExperience]
ld b, a
- ld a, [hExperience + 1]
+ ldh a, [hExperience + 1]
ld c, a
- ld a, [hExperience + 2]
+ ldh a, [hExperience + 2]
ld d, a
pop hl
ld a, [hld]
@@ -155,7 +155,7 @@ GainExperience:
ld bc, wPartyMon1Level - wPartyMon1Exp
add hl, bc
push hl
- callba CalcLevelFromExperience
+ farcall CalcLevelFromExperience
pop hl
ld a, [hl] ; current level
cp d
@@ -252,7 +252,7 @@ GainExperience:
ld [wMonDataLocation], a
call LoadMonData
ld d, $1
- callab PrintStatsBox
+ callfar PrintStatsBox
call WaitForTextScrollButtonPress
call LoadScreenTilesFromBuffer1
xor a ; PLAYER_PARTY_DATA
@@ -317,14 +317,14 @@ DivideExpDataByNumMonsGainingExp:
ld c, wEnemyMonBaseExp + 1 - wEnemyMonBaseStats
.divideLoop
xor a
- ld [H_DIVIDEND], a
+ ldh [hDividend], a
ld a, [hl]
- ld [H_DIVIDEND + 1], a
+ ldh [hDividend + 1], a
ld a, [wd11e]
- ld [H_DIVISOR], a
+ ldh [hDivisor], a
ld b, $2
call Divide ; divide value by number of mons gaining exp
- ld a, [H_QUOTIENT + 3]
+ ldh a, [hQuotient + 3]
ld [hli], a
dec c
jr nz, .divideLoop
@@ -332,17 +332,17 @@ DivideExpDataByNumMonsGainingExp:
; multiplies exp by 1.5
BoostExp:
- ld a, [H_QUOTIENT + 2]
+ ldh a, [hQuotient + 2]
ld b, a
- ld a, [H_QUOTIENT + 3]
+ ldh a, [hQuotient + 3]
ld c, a
srl b
rr c
add c
- ld [H_QUOTIENT + 3], a
- ld a, [H_QUOTIENT + 2]
+ ldh [hQuotient + 3], a
+ ldh a, [hQuotient + 2]
adc b
- ld [H_QUOTIENT + 2], a
+ ldh [hQuotient + 2], a
ret
Bankswitch15ToF:
@@ -350,8 +350,8 @@ Bankswitch15ToF:
jp Bankswitch
GainedText:
- TX_FAR _GainedText
- TX_ASM
+ text_far _GainedText
+ text_asm
ld a, [wBoostExpByExpAll]
ld hl, WithExpAllText
and a
@@ -364,19 +364,19 @@ GainedText:
ret
WithExpAllText:
- TX_FAR _WithExpAllText
- TX_ASM
+ text_far _WithExpAllText
+ text_asm
ld hl, ExpPointsText
ret
BoostedText:
- TX_FAR _BoostedText
+ text_far _BoostedText
ExpPointsText:
- TX_FAR _ExpPointsText
- db "@"
+ text_far _ExpPointsText
+ text_end
GrewLevelText:
- TX_FAR _GrewLevelText
- TX_SFX_LEVEL_UP
- db "@"
+ text_far _GrewLevelText
+ sound_level_up
+ text_end
diff --git a/engine/battle/get_trainer_name.asm b/engine/battle/get_trainer_name.asm
index 36ca019e..b2daebfe 100644
--- a/engine/battle/get_trainer_name.asm
+++ b/engine/battle/get_trainer_name.asm
@@ -1,15 +1,15 @@
-GetTrainerName_:
+GetTrainerName_::
ld hl, wGrassRate
ld a, [wLinkState]
and a
jr nz, .foundName
ld hl, wRivalName
ld a, [wTrainerClass]
- cp SONY1
+ cp RIVAL1
jr z, .foundName
- cp SONY2
+ cp RIVAL2
jr z, .foundName
- cp SONY3
+ cp RIVAL3
jr z, .foundName
ld [wd0b5], a
ld a, TRAINER_NAME
diff --git a/engine/battle/ghost_marowak_anim.asm b/engine/battle/ghost_marowak_anim.asm
index 972d5bf5..03059022 100644
--- a/engine/battle/ghost_marowak_anim.asm
+++ b/engine/battle/ghost_marowak_anim.asm
@@ -1,22 +1,22 @@
MarowakAnim:
; animate the ghost being unveiled as a Marowak
ld a, $e4
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP1
call CopyMonPicFromBGToSpriteVRAM ; cover the BG ghost pic with a sprite ghost pic that looks the same
; now that the ghost pic is being displayed using sprites, clear the ghost pic from the BG tilemap
- coord hl, 12, 0
+ hlcoord 12, 0
lb bc, 7, 7
call ClearScreenArea
call Delay3
xor a
- ld [H_AUTOBGTRANSFERENABLED], a ; disable BG transfer so we don't see the Marowak too soon
+ ldh [hAutoBGTransferEnabled], a ; disable BG transfer so we don't see the Marowak too soon
; replace ghost pic with Marowak in BG
ld a, RESTLESS_SOUL
ld [wChangeMonPicEnemyTurnSpecies], a
ld a, $1
- ld [H_WHOSETURN], a
- callab ChangeMonPic
+ ldh [hWhoseTurn], a
+ callfar ChangeMonPic
; alternate between black and light grey 8 times.
; this makes the ghost's body appear to flash
ld d, $80
@@ -24,10 +24,10 @@ MarowakAnim:
.fadeOutGhostLoop
ld c, 10
call DelayFrames
- ld a, [rOBP1]
+ ldh a, [rOBP1]
sla a
sla a
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP1
jr nz, .fadeOutGhostLoop
call ClearSprites
@@ -36,18 +36,18 @@ MarowakAnim:
.fadeInMarowakLoop
ld c, 10
call DelayFrames
- ld a, [rOBP1]
+ ldh a, [rOBP1]
srl b
rra
srl b
rra
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP1
ld a, b
and a
jr nz, .fadeInMarowakLoop
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; enable BG transfer so the BG Marowak pic will be visible after the sprite one is cleared
+ ldh [hAutoBGTransferEnabled], a ; enable BG transfer so the BG Marowak pic will be visible after the sprite one is cleared
call Delay3
jp ClearSprites
diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm
index 7bc912d2..0d403b55 100644
--- a/engine/battle/init_battle_variables.asm
+++ b/engine/battle/init_battle_variables.asm
@@ -1,5 +1,5 @@
InitBattleVariables:
- ld a, [hTilesetType]
+ ldh a, [hTilesetType]
ld [wSavedTilesetType], a
xor a
ld [wActionResultOrTookBattleTurn], a
@@ -35,4 +35,4 @@ InitBattleVariables:
ld a, BATTLE_TYPE_SAFARI
ld [wBattleType], a
.notSafariBattle
- jpab PlayBattleMusic
+ jpfar PlayBattleMusic
diff --git a/engine/battle/link_battle_versus_text.asm b/engine/battle/link_battle_versus_text.asm
index 63142ba6..e55a0672 100644
--- a/engine/battle/link_battle_versus_text.asm
+++ b/engine/battle/link_battle_versus_text.asm
@@ -1,22 +1,22 @@
; display "[player] VS [enemy]" text box with pokeballs representing their parties next to the names
DisplayLinkBattleVersusTextBox:
call LoadTextBoxTilePatterns
- coord hl, 3, 4
+ hlcoord 3, 4
lb bc, 7, 12
call TextBoxBorder
- coord hl, 4, 5
+ hlcoord 4, 5
ld de, wPlayerName
call PlaceString
- coord hl, 4, 10
+ hlcoord 4, 10
ld de, wLinkEnemyTrainerName
call PlaceString
; place bold "VS" tiles between the names
- coord hl, 9, 8
+ hlcoord 9, 8
ld a, $69
ld [hli], a
ld [hl], $6a
xor a
ld [wUpdateSpritesEnabled], a
- callab SetupPlayerAndEnemyPokeballs
+ callfar SetupPlayerAndEnemyPokeballs
ld c, 150
jp DelayFrames
diff --git a/engine/battle/bank_e_misc.asm b/engine/battle/misc.asm
index df9145f2..df9145f2 100755
--- a/engine/battle/bank_e_misc.asm
+++ b/engine/battle/misc.asm
diff --git a/engine/battle/moveEffects/conversion_effect.asm b/engine/battle/moveEffects/conversion_effect.asm
deleted file mode 100644
index f23c3d70..00000000
--- a/engine/battle/moveEffects/conversion_effect.asm
+++ /dev/null
@@ -1,35 +0,0 @@
-ConversionEffect_:
- ld hl, wEnemyMonType1
- ld de, wBattleMonType1
- ld a, [H_WHOSETURN]
- and a
- ld a, [wEnemyBattleStatus1]
- jr z, .conversionEffect
- push hl
- ld h, d
- ld l, e
- pop de
- ld a, [wPlayerBattleStatus1]
-.conversionEffect
- bit INVULNERABLE, a ; is mon immune to typical attacks (dig/fly)
- jr nz, PrintButItFailedText
-; copy target's types to user
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hl]
- ld [de], a
- ld hl, PlayCurrentMoveAnimation
- call CallBankF
- ld hl, ConvertedTypeText
- jp PrintText
-
-ConvertedTypeText:
- TX_FAR _ConvertedTypeText
- db "@"
-
-PrintButItFailedText:
- ld hl, PrintButItFailedText_
-CallBankF:
- ld b, BANK(PrintButItFailedText_)
- jp Bankswitch
diff --git a/engine/battle/moveEffects/drain_hp_effect.asm b/engine/battle/moveEffects/drain_hp_effect.asm
deleted file mode 100644
index e5f4681a..00000000
--- a/engine/battle/moveEffects/drain_hp_effect.asm
+++ /dev/null
@@ -1,104 +0,0 @@
-DrainHPEffect_:
- ld hl, wDamage
- ld a, [hl]
- srl a ; divide damage by 2
- ld [hli], a
- ld a, [hl]
- rr a
- ld [hld], a
- or [hl] ; is damage 0?
- jr nz, .getAttackerHP
-; if damage is 0, increase to 1 so that the attacker gains at least 1 HP
- inc hl
- inc [hl]
-.getAttackerHP
- ld hl, wBattleMonHP
- ld de, wBattleMonMaxHP
- ld a, [H_WHOSETURN]
- and a
- jp z, .addDamageToAttackerHP
- ld hl, wEnemyMonHP
- ld de, wEnemyMonMaxHP
-.addDamageToAttackerHP
- ld bc, wHPBarOldHP+1
-; copy current HP to wHPBarOldHP
- ld a, [hli]
- ld [bc], a
- ld a, [hl]
- dec bc
- ld [bc], a
-; copy max HP to wHPBarMaxHP
- ld a, [de]
- dec bc
- ld [bc], a
- inc de
- ld a, [de]
- dec bc
- ld [bc], a
-; add damage to attacker's HP and copy new HP to wHPBarNewHP
- ld a, [wDamage + 1]
- ld b, [hl]
- add b
- ld [hld], a
- ld [wHPBarNewHP], a
- ld a, [wDamage]
- ld b, [hl]
- adc b
- ld [hli], a
- ld [wHPBarNewHP+1], a
- jr c, .capToMaxHP ; if HP > 65,535, cap to max HP
-; compare HP with max HP
- ld a, [hld]
- ld b, a
- ld a, [de]
- dec de
- sub b
- ld a, [hli]
- ld b, a
- ld a, [de]
- inc de
- sbc b
- jr nc, .next
-.capToMaxHP
- ld a, [de]
- ld [hld], a
- ld [wHPBarNewHP], a
- dec de
- ld a, [de]
- ld [hli], a
- ld [wHPBarNewHP+1], a
- inc de
-.next
- ld a, [H_WHOSETURN]
- and a
- coord hl, 10, 9
- ld a, $1
- jr z, .next2
- coord hl, 2, 2
- xor a
-.next2
- ld [wHPBarType], a
- predef UpdateHPBar2
- predef DrawPlayerHUDAndHPBar
- predef DrawEnemyHUDAndHPBar
- callab ReadPlayerMonCurHPAndStatus
- ld hl, SuckedHealthText
- ld a, [H_WHOSETURN]
- and a
- ld a, [wPlayerMoveEffect]
- jr z, .next3
- ld a, [wEnemyMoveEffect]
-.next3
- cp DREAM_EATER_EFFECT
- jr nz, .printText
- ld hl, DreamWasEatenText
-.printText
- jp PrintText
-
-SuckedHealthText:
- TX_FAR _SuckedHealthText
- db "@"
-
-DreamWasEatenText:
- TX_FAR _DreamWasEatenText
- db "@"
diff --git a/engine/battle/moveEffects/focus_energy_effect.asm b/engine/battle/moveEffects/focus_energy_effect.asm
deleted file mode 100644
index 16dad7bb..00000000
--- a/engine/battle/moveEffects/focus_energy_effect.asm
+++ /dev/null
@@ -1,22 +0,0 @@
-FocusEnergyEffect_:
- ld hl, wPlayerBattleStatus2
- ld a, [H_WHOSETURN]
- and a
- jr z, .notEnemy
- ld hl, wEnemyBattleStatus2
-.notEnemy
- bit GETTING_PUMPED, [hl] ; is mon already using focus energy?
- jr nz, .alreadyUsing
- set GETTING_PUMPED, [hl] ; mon is now using focus energy
- callab PlayCurrentMoveAnimation
- ld hl, GettingPumpedText
- jp PrintText
-.alreadyUsing
- ld c, 50
- call DelayFrames
- jpab PrintButItFailedText_
-
-GettingPumpedText:
- TX_DELAY
- TX_FAR _GettingPumpedText
- db "@"
diff --git a/engine/battle/moveEffects/haze_effect.asm b/engine/battle/moveEffects/haze_effect.asm
deleted file mode 100644
index 47723ba2..00000000
--- a/engine/battle/moveEffects/haze_effect.asm
+++ /dev/null
@@ -1,81 +0,0 @@
-HazeEffect_:
- ld a, $7
-; store 7 on every stat mod
- ld hl, wPlayerMonAttackMod
- call ResetStatMods
- ld hl, wEnemyMonAttackMod
- call ResetStatMods
-; copy unmodified stats to battle stats
- ld hl, wPlayerMonUnmodifiedAttack
- ld de, wBattleMonAttack
- call ResetStats
- ld hl, wEnemyMonUnmodifiedAttack
- ld de, wEnemyMonAttack
- call ResetStats
-; cure non-volatile status, but only for the target
- ld hl, wEnemyMonStatus
- ld de, wEnemySelectedMove
- ld a, [H_WHOSETURN]
- and a
- jr z, .cureStatuses
- ld hl, wBattleMonStatus
- dec de ; wPlayerSelectedMove
-
-.cureStatuses
- ld a, [hl]
- ld [hl], $0
- and SLP | (1 << FRZ)
- jr z, .cureVolatileStatuses
-; prevent the Pokemon from executing a move if it was asleep or frozen
- ld a, $ff
- ld [de], a
-
-.cureVolatileStatuses
- xor a
- ld [wPlayerDisabledMove], a
- ld [wEnemyDisabledMove], a
- ld hl, wPlayerDisabledMoveNumber
- ld [hli], a
- ld [hl], a
- ld hl, wPlayerBattleStatus1
- call CureVolatileStatuses
- ld hl, wEnemyBattleStatus1
- call CureVolatileStatuses
- ld hl, PlayCurrentMoveAnimation
- call CallBankF
- ld hl, StatusChangesEliminatedText
- jp PrintText
-
-CureVolatileStatuses:
- res CONFUSED, [hl]
- inc hl ; BATTSTATUS2
- ld a, [hl]
- ; clear USING_X_ACCURACY, PROTECTED_BY_MIST, GETTING_PUMPED, and SEEDED statuses
- and $ff ^((1 << USING_X_ACCURACY) | (1 << PROTECTED_BY_MIST) | (1 << GETTING_PUMPED) | (1 << SEEDED))
- ld [hli], a ; BATTSTATUS3
- ld a, [hl]
- and %11110000 | (1 << TRANSFORMED) ; clear Bad Poison, Reflect and Light Screen statuses
- ld [hl], a
- ret
-
-ResetStatMods:
- ld b, $8
-.loop
- ld [hli], a
- dec b
- jr nz, .loop
- ret
-
-ResetStats:
- ld b, $8
-.loop
- ld a, [hli]
- ld [de], a
- inc de
- dec b
- jr nz, .loop
- ret
-
-StatusChangesEliminatedText:
- TX_FAR _StatusChangesEliminatedText
- db "@"
diff --git a/engine/battle/moveEffects/heal_effect.asm b/engine/battle/moveEffects/heal_effect.asm
deleted file mode 100644
index 97afa394..00000000
--- a/engine/battle/moveEffects/heal_effect.asm
+++ /dev/null
@@ -1,120 +0,0 @@
-HealEffect_:
- ld a, [H_WHOSETURN]
- and a
- ld de, wBattleMonHP
- ld hl, wBattleMonMaxHP
- ld a, [wPlayerMoveNum]
- jr z, .healEffect
- ld de, wEnemyMonHP
- ld hl, wEnemyMonMaxHP
- ld a, [wEnemyMoveNum]
-.healEffect
- ld b, a
- ld a, [de]
- cp [hl] ; most significant bytes comparison is ignored
- ; causes the move to miss if max HP is 255 or 511 points higher than the current HP
- inc de
- inc hl
- ld a, [de]
- sbc [hl]
- jp z, .failed ; no effect if user's HP is already at its maximum
- ld a, b
- cp REST
- jr nz, .healHP
- push hl
- push de
- push af
- ld c, 50
- call DelayFrames
- ld hl, wBattleMonStatus
- ld a, [H_WHOSETURN]
- and a
- jr z, .restEffect
- ld hl, wEnemyMonStatus
-.restEffect
- ld a, [hl]
- and a
- ld [hl], 2 ; clear status and set number of turns asleep to 2
- ld hl, StartedSleepingEffect ; if mon didn't have an status
- jr z, .printRestText
- ld hl, FellAsleepBecameHealthyText ; if mon had an status
-.printRestText
- call PrintText
- pop af
- pop de
- pop hl
-.healHP
- ld a, [hld]
- ld [wHPBarMaxHP], a
- ld c, a
- ld a, [hl]
- ld [wHPBarMaxHP+1], a
- ld b, a
- jr z, .gotHPAmountToHeal
-; Recover and Softboiled only heal for half the mon's max HP
- srl b
- rr c
-.gotHPAmountToHeal
-; update HP
- ld a, [de]
- ld [wHPBarOldHP], a
- add c
- ld [de], a
- ld [wHPBarNewHP], a
- dec de
- ld a, [de]
- ld [wHPBarOldHP+1], a
- adc b
- ld [de], a
- ld [wHPBarNewHP+1], a
- inc hl
- inc de
- ld a, [de]
- dec de
- sub [hl]
- dec hl
- ld a, [de]
- sbc [hl]
- jr c, .playAnim
-; copy max HP to current HP if an overflow occurred
- ld a, [hli]
- ld [de], a
- ld [wHPBarNewHP+1], a
- inc de
- ld a, [hl]
- ld [de], a
- ld [wHPBarNewHP], a
-.playAnim
- ld hl, PlayCurrentMoveAnimation
- call Bankswitch3DtoF
- ld a, [H_WHOSETURN]
- and a
- coord hl, 10, 9
- ld a, $1
- jr z, .updateHPBar
- coord hl, 2, 2
- xor a
-.updateHPBar
- ld [wHPBarType], a
- predef UpdateHPBar2
- ld hl, DrawHUDsAndHPBars
- call Bankswitch3DtoF
- ld hl, RegainedHealthText
- jp PrintText
-.failed
- ld c, 50
- call DelayFrames
- ld hl, PrintButItFailedText_
- jp Bankswitch3DtoF
-
-StartedSleepingEffect:
- TX_FAR _StartedSleepingEffect
- db "@"
-
-FellAsleepBecameHealthyText:
- TX_FAR _FellAsleepBecameHealthyText
- db "@"
-
-RegainedHealthText:
- TX_FAR _RegainedHealthText
- db "@"
diff --git a/engine/battle/moveEffects/leech_seed_effect.asm b/engine/battle/moveEffects/leech_seed_effect.asm
deleted file mode 100644
index f4d3ee9c..00000000
--- a/engine/battle/moveEffects/leech_seed_effect.asm
+++ /dev/null
@@ -1,40 +0,0 @@
-LeechSeedEffect_:
- callab MoveHitTest
- ld a, [wMoveMissed]
- and a
- jr nz, .moveMissed
- ld hl, wEnemyBattleStatus2
- ld de, wEnemyMonType1
- ld a, [H_WHOSETURN]
- and a
- jr z, .leechSeedEffect
- ld hl, wPlayerBattleStatus2
- ld de, wBattleMonType1
-.leechSeedEffect
-; miss if the target is grass-type or already seeded
- ld a, [de]
- cp GRASS
- jr z, .moveMissed
- inc de
- ld a, [de]
- cp GRASS
- jr z, .moveMissed
- bit SEEDED, [hl]
- jr nz, .moveMissed
- set SEEDED, [hl]
- callab PlayCurrentMoveAnimation
- ld hl, WasSeededText
- jp PrintText
-.moveMissed
- ld c, 50
- call DelayFrames
- ld hl, EvadedAttackText
- jp PrintText
-
-WasSeededText:
- TX_FAR _WasSeededText
- db "@"
-
-EvadedAttackText:
- TX_FAR _EvadedAttackText
- db "@"
diff --git a/engine/battle/moveEffects/mist_effect.asm b/engine/battle/moveEffects/mist_effect.asm
deleted file mode 100644
index 65070a3e..00000000
--- a/engine/battle/moveEffects/mist_effect.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-MistEffect_:
- ld hl, wPlayerBattleStatus2
- ld a, [H_WHOSETURN]
- and a
- jr z, .mistEffect
- ld hl, wEnemyBattleStatus2
-.mistEffect
- bit PROTECTED_BY_MIST, [hl] ; is mon protected by mist?
- jr nz, .mistAlreadyInUse
- set PROTECTED_BY_MIST, [hl] ; mon is now protected by mist
- callab PlayCurrentMoveAnimation
- ld hl, ShroudedInMistText
- jp PrintText
-.mistAlreadyInUse
- jpab PrintButItFailedText_
-
-ShroudedInMistText:
- TX_FAR _ShroudedInMistText
- db "@"
diff --git a/engine/battle/moveEffects/one_hit_ko_effect.asm b/engine/battle/moveEffects/one_hit_ko_effect.asm
deleted file mode 100644
index 827e2197..00000000
--- a/engine/battle/moveEffects/one_hit_ko_effect.asm
+++ /dev/null
@@ -1,38 +0,0 @@
-OneHitKOEffect_:
- ld hl, wDamage
- xor a
- ld [hli], a
- ld [hl], a ; set the damage output to zero
- dec a
- ld [wCriticalHitOrOHKO], a
- ld hl, wBattleMonSpeed + 1
- ld de, wEnemyMonSpeed + 1
- ld a, [H_WHOSETURN]
- and a
- jr z, .compareSpeed
- ld hl, wEnemyMonSpeed + 1
- ld de, wBattleMonSpeed + 1
-.compareSpeed
-; set damage to 65535 and OHKO flag is the user's current speed is higher than the target's
- ld a, [de]
- dec de
- ld b, a
- ld a, [hld]
- sub b
- ld a, [de]
- ld b, a
- ld a, [hl]
- sbc b
- jr c, .userIsSlower
- ld hl, wDamage
- ld a, $ff
- ld [hli], a
- ld [hl], a
- ld a, $2
- ld [wCriticalHitOrOHKO], a
- ret
-.userIsSlower
-; keep damage at 0 and set move missed flag if target's current speed is higher instead
- ld a, $1
- ld [wMoveMissed], a
- ret
diff --git a/engine/battle/moveEffects/paralyze_effect.asm b/engine/battle/moveEffects/paralyze_effect.asm
deleted file mode 100644
index 95979ae6..00000000
--- a/engine/battle/moveEffects/paralyze_effect.asm
+++ /dev/null
@@ -1,47 +0,0 @@
-ParalyzeEffect_:
- ld hl, wEnemyMonStatus
- ld de, wPlayerMoveType
- ld a, [H_WHOSETURN]
- and a
- jp z, .next
- ld hl, wBattleMonStatus
- ld de, wEnemyMoveType
-.next
- ld a, [hl]
- and a ; does the target already have a status ailment?
- jr nz, .didntAffect
-; check if the target is immune due to types
- ld a, [de]
- cp ELECTRIC
- jr nz, .hitTest
- ld b, h
- ld c, l
- inc bc
- ld a, [bc]
- cp GROUND
- jr z, .doesntAffect
- inc bc
- ld a, [bc]
- cp GROUND
- jr z, .doesntAffect
-.hitTest
- push hl
- callab MoveHitTest
- pop hl
- ld a, [wMoveMissed]
- and a
- jr nz, .didntAffect
- set PAR, [hl]
- callab QuarterSpeedDueToParalysis
- ld c, 30
- call DelayFrames
- callab PlayCurrentMoveAnimation
- jpab PrintMayNotAttackText
-.didntAffect
- ld c, 50
- call DelayFrames
- jpab PrintDidntAffectText
-.doesntAffect
- ld c, 50
- call DelayFrames
- jpab PrintDoesntAffectText
diff --git a/engine/battle/moveEffects/pay_day_effect.asm b/engine/battle/moveEffects/pay_day_effect.asm
deleted file mode 100644
index e5daf014..00000000
--- a/engine/battle/moveEffects/pay_day_effect.asm
+++ /dev/null
@@ -1,45 +0,0 @@
-PayDayEffect_:
- xor a
- ld hl, wcd6d
- ld [hli], a
- ld a, [H_WHOSETURN]
- and a
- ld a, [wBattleMonLevel]
- jr z, .payDayEffect
- ld a, [wEnemyMonLevel]
-.payDayEffect
-; level * 2
- add a
- ld [H_DIVIDEND + 3], a
- xor a
- ld [H_DIVIDEND], a
- ld [H_DIVIDEND + 1], a
- ld [H_DIVIDEND + 2], a
-; convert to BCD
- ld a, 100
- ld [H_DIVISOR], a
- ld b, $4
- call Divide
- ld a, [H_QUOTIENT + 3]
- ld [hli], a
- ld a, [H_REMAINDER]
- ld [H_DIVIDEND + 3], a
- ld a, 10
- ld [H_DIVISOR], a
- ld b, $4
- call Divide
- ld a, [H_QUOTIENT + 3]
- swap a
- ld b, a
- ld a, [H_REMAINDER]
- add b
- ld [hl], a
- ld de, wTotalPayDayMoney + 2
- ld c, $3
- predef AddBCDPredef
- ld hl, CoinsScatteredText
- jp PrintText
-
-CoinsScatteredText:
- TX_FAR _CoinsScatteredText
- db "@"
diff --git a/engine/battle/moveEffects/recoil_effect.asm b/engine/battle/moveEffects/recoil_effect.asm
deleted file mode 100644
index 0f2f087b..00000000
--- a/engine/battle/moveEffects/recoil_effect.asm
+++ /dev/null
@@ -1,70 +0,0 @@
-RecoilEffect_:
- ld a, [H_WHOSETURN]
- and a
- ld a, [wPlayerMoveNum]
- ld hl, wBattleMonMaxHP
- jr z, .recoilEffect
- ld a, [wEnemyMoveNum]
- ld hl, wEnemyMonMaxHP
-.recoilEffect
- ld d, a
- ld a, [wDamage]
- ld b, a
- ld a, [wDamage + 1]
- ld c, a
- srl b
- rr c
- ld a, d
- cp STRUGGLE ; struggle deals 50% recoil damage
- jr z, .gotRecoilDamage
- srl b
- rr c
-.gotRecoilDamage
- ld a, b
- or c
- jr nz, .updateHP
- inc c ; minimum recoil damage is 1
-.updateHP
-; subtract HP from user due to the recoil damage
- ld a, [hli]
- ld [wHPBarMaxHP+1], a
- ld a, [hl]
- ld [wHPBarMaxHP], a
- push bc
- ld bc, wBattleMonHP - wBattleMonMaxHP
- add hl, bc
- pop bc
- ld a, [hl]
- ld [wHPBarOldHP], a
- sub c
- ld [hld], a
- ld [wHPBarNewHP], a
- ld a, [hl]
- ld [wHPBarOldHP+1], a
- sbc b
- ld [hl], a
- ld [wHPBarNewHP+1], a
- jr nc, .getHPBarCoords
-; if recoil damage is higher than the Pokemon's HP, set its HP to 0
- xor a
- ld [hli], a
- ld [hl], a
- ld hl, wHPBarNewHP
- ld [hli], a
- ld [hl], a
-.getHPBarCoords
- coord hl, 10, 9
- ld a, [H_WHOSETURN]
- and a
- ld a, $1
- jr z, .updateHPBar
- coord hl, 2, 2
- xor a
-.updateHPBar
- ld [wHPBarType], a
- predef UpdateHPBar2
- ld hl, HitWithRecoilText
- jp PrintText
-HitWithRecoilText:
- TX_FAR _HitWithRecoilText
- db "@"
diff --git a/engine/battle/moveEffects/reflect_light_screen_effect.asm b/engine/battle/moveEffects/reflect_light_screen_effect.asm
deleted file mode 100644
index e5748b19..00000000
--- a/engine/battle/moveEffects/reflect_light_screen_effect.asm
+++ /dev/null
@@ -1,45 +0,0 @@
-ReflectLightScreenEffect_:
- ld hl, wPlayerBattleStatus3
- ld de, wPlayerMoveEffect
- ld a, [H_WHOSETURN]
- and a
- jr z, .reflectLightScreenEffect
- ld hl, wEnemyBattleStatus3
- ld de, wEnemyMoveEffect
-.reflectLightScreenEffect
- ld a, [de]
- cp LIGHT_SCREEN_EFFECT
- jr nz, .reflect
- bit HAS_LIGHT_SCREEN_UP, [hl] ; is mon already protected by light screen?
- jr nz, .moveFailed
- set HAS_LIGHT_SCREEN_UP, [hl] ; mon is now protected by light screen
- ld hl, LightScreenProtectedText
- jr .playAnim
-.reflect
- bit HAS_REFLECT_UP, [hl] ; is mon already protected by reflect?
- jr nz, .moveFailed
- set HAS_REFLECT_UP, [hl] ; mon is now protected by reflect
- ld hl, ReflectGainedArmorText
-.playAnim
- push hl
- ld hl, PlayCurrentMoveAnimation
- call Bankswitch3DtoF
- pop hl
- jp PrintText
-.moveFailed
- ld c, 50
- call DelayFrames
- ld hl, PrintButItFailedText_
- jp Bankswitch3DtoF
-
-LightScreenProtectedText:
- TX_FAR _LightScreenProtectedText
- db "@"
-
-ReflectGainedArmorText:
- TX_FAR _ReflectGainedArmorText
- db "@"
-
-Bankswitch3DtoF:
- ld b, BANK(BattleCore)
- jp Bankswitch
diff --git a/engine/battle/moveEffects/substitute_effect.asm b/engine/battle/moveEffects/substitute_effect.asm
deleted file mode 100644
index b5d006fc..00000000
--- a/engine/battle/moveEffects/substitute_effect.asm
+++ /dev/null
@@ -1,77 +0,0 @@
-SubstituteEffect_:
- ld c, 50
- call DelayFrames
- ld hl, wBattleMonMaxHP
- ld de, wPlayerSubstituteHP
- ld bc, wPlayerBattleStatus2
- ld a, [H_WHOSETURN]
- and a
- jr z, .notEnemy
- ld hl, wEnemyMonMaxHP
- ld de, wEnemySubstituteHP
- ld bc, wEnemyBattleStatus2
-.notEnemy
- ld a, [bc]
- bit HAS_SUBSTITUTE_UP, a ; user already has substitute?
- jr nz, .alreadyHasSubstitute
-; quarter health to remove from user
-; assumes max HP is 1023 or lower
- push bc
- ld a, [hli]
- ld b, [hl]
- srl a
- rr b
- srl a
- rr b ; max hp / 4
- push de
- ld de, wBattleMonHP - wBattleMonMaxHP
- add hl, de ; point hl to current HP low byte
- pop de
- ld a, b
- ld [de], a ; save copy of HP to subtract in ccd7/ccd8 [how much HP substitute has]
- ld a, [hld]
-; subtract [max hp / 4] to current HP
- sub b
- ld d, a
- ld a, [hl]
- sbc 0
- pop bc
- jr c, .notEnoughHP ; underflow means user would be left with negative health
- ; bug: since it only branches on carry, it will possibly leave user with 0 HP
-.userHasZeroOrMoreHP
- ldi [hl], a ; save resulting HP after subtraction into current HP
- ld [hl], d
- ld h, b
- ld l, c
- set HAS_SUBSTITUTE_UP, [hl]
- ld a, [wOptions]
- bit 7, a ; battle animation is enabled?
- ld hl, PlayCurrentMoveAnimation
- ld b, BANK(PlayCurrentMoveAnimation)
- jr z, .animationEnabled
- ld hl, AnimationSubstitute
- ld b, BANK(AnimationSubstitute)
-.animationEnabled
- call Bankswitch ; jump to routine depending on animation setting
- ld hl, SubstituteText
- call PrintText
- jpab DrawHUDsAndHPBars
-.alreadyHasSubstitute
- ld hl, HasSubstituteText
- jr .printText
-.notEnoughHP
- ld hl, TooWeakSubstituteText
-.printText
- jp PrintText
-
-SubstituteText:
- TX_FAR _SubstituteText
- db "@"
-
-HasSubstituteText:
- TX_FAR _HasSubstituteText
- db "@"
-
-TooWeakSubstituteText:
- TX_FAR _TooWeakSubstituteText
- db "@"
diff --git a/engine/battle/moveEffects/transform_effect.asm b/engine/battle/moveEffects/transform_effect.asm
deleted file mode 100644
index ec07b303..00000000
--- a/engine/battle/moveEffects/transform_effect.asm
+++ /dev/null
@@ -1,141 +0,0 @@
-TransformEffect_:
- ld hl, wBattleMonSpecies
- ld de, wEnemyMonSpecies
- ld bc, wEnemyBattleStatus3
- ld a, [wEnemyBattleStatus1]
- ld a, [H_WHOSETURN]
- and a
- jr nz, .hitTest
- ld hl, wEnemyMonSpecies
- ld de, wBattleMonSpecies
- ld bc, wPlayerBattleStatus3
- ld [wPlayerMoveListIndex], a
- 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, wPlayerBattleStatus2
- ld a, [H_WHOSETURN]
- and a
- jr z, .transformEffect
- ld hl, wEnemyBattleStatus2
-.transformEffect
-; animation(s) played are different if target has Substitute up
- bit HAS_SUBSTITUTE_UP, [hl]
- push af
- ld hl, HideSubstituteShowMonAnim
- ld b, BANK(HideSubstituteShowMonAnim)
- call nz, Bankswitch
- ld a, [wOptions]
- add a
- ld hl, PlayCurrentMoveAnimation
- ld b, BANK(PlayCurrentMoveAnimation)
- jr nc, .gotAnimToPlay
- ld hl, AnimationTransformMon
- ld b, BANK(AnimationTransformMon)
-.gotAnimToPlay
- call Bankswitch
- ld hl, ReshowSubstituteAnim
- ld b, BANK(ReshowSubstituteAnim)
- pop af
- call nz, Bankswitch
- pop bc
- ld a, [bc]
- set TRANSFORMED, a ; mon is now transformed
- ld [bc], a
- pop de
- pop hl
- push hl
-; transform user into opposing Pokemon
-; species
- ld a, [hl]
- ld [de], a
-; type 1, type 2, catch rate, and moves
- ld bc, $5
- add hl, bc
- inc de
- inc de
- inc de
- inc de
- inc de
- inc bc
- inc bc
- call CopyData
- ld a, [H_WHOSETURN]
- and a
- jr z, .next
-; save enemy mon DVs at wTransformedEnemyMonOriginalDVs
- ld a, [de]
- ld [wTransformedEnemyMonOriginalDVs], a
- inc de
- ld a, [de]
- ld [wTransformedEnemyMonOriginalDVs + 1], a
- dec de
-.next
-; DVs
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
-; Attack, Defense, Speed, and Special stats
- inc hl
- inc hl
- inc hl
- inc de
- inc de
- inc de
- ld bc, $8
- call CopyData
- ld bc, wBattleMonMoves - wBattleMonPP
- add hl, bc ; ld hl, wBattleMonMoves
- ld b, NUM_MOVES
-.copyPPLoop
-; 5 PP for all moves
- ld a, [hli]
- and a
- jr z, .lessThanFourMoves
- ld a, $5
-.lessThanFourMoves
- ld [de], a
- inc de
- dec b
- jr nz, .copyPPLoop
-.copyStats
-; original (unmodified) stats and stat mods
- pop hl
- ld a, [hl]
- ld [wd11e], a
- call GetMonName
- ld hl, wEnemyMonUnmodifiedAttack
- ld de, wPlayerMonUnmodifiedAttack
- call .copyBasedOnTurn ; original (unmodified) stats
- ld hl, wEnemyMonStatMods
- ld de, wPlayerMonStatMods
- call .copyBasedOnTurn ; stat mods
- ld hl, TransformedText
- jp PrintText
-
-.copyBasedOnTurn
- ld a, [H_WHOSETURN]
- and a
- jr z, .gotStatsOrModsToCopy
- push hl
- ld h, d
- ld l, e
- pop de
-.gotStatsOrModsToCopy
- ld bc, $8
- jp CopyData
-
-.failed
- ld hl, PrintButItFailedText_
- jp Bankswitch3DtoF
-
-TransformedText:
- TX_FAR _TransformedText
- db "@"
diff --git a/engine/battle/move_effects/conversion.asm b/engine/battle/move_effects/conversion.asm
new file mode 100644
index 00000000..1f64ec5b
--- /dev/null
+++ b/engine/battle/move_effects/conversion.asm
@@ -0,0 +1,35 @@
+ConversionEffect_:
+ ld hl, wEnemyMonType1
+ ld de, wBattleMonType1
+ ldh a, [hWhoseTurn]
+ and a
+ ld a, [wEnemyBattleStatus1]
+ jr z, .conversionEffect
+ push hl
+ ld h, d
+ ld l, e
+ pop de
+ ld a, [wPlayerBattleStatus1]
+.conversionEffect
+ bit INVULNERABLE, a ; is mon immune to typical attacks (dig/fly)
+ jr nz, PrintButItFailedText
+; copy target's types to user
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hl]
+ ld [de], a
+ ld hl, PlayCurrentMoveAnimation
+ call CallBankF
+ ld hl, ConvertedTypeText
+ jp PrintText
+
+ConvertedTypeText:
+ text_far _ConvertedTypeText
+ text_end
+
+PrintButItFailedText:
+ ld hl, PrintButItFailedText_
+CallBankF:
+ ld b, BANK(PrintButItFailedText_)
+ jp Bankswitch
diff --git a/engine/battle/move_effects/drain_hp.asm b/engine/battle/move_effects/drain_hp.asm
new file mode 100644
index 00000000..04a585cc
--- /dev/null
+++ b/engine/battle/move_effects/drain_hp.asm
@@ -0,0 +1,104 @@
+DrainHPEffect_:
+ ld hl, wDamage
+ ld a, [hl]
+ srl a ; divide damage by 2
+ ld [hli], a
+ ld a, [hl]
+ rr a
+ ld [hld], a
+ or [hl] ; is damage 0?
+ jr nz, .getAttackerHP
+; if damage is 0, increase to 1 so that the attacker gains at least 1 HP
+ inc hl
+ inc [hl]
+.getAttackerHP
+ ld hl, wBattleMonHP
+ ld de, wBattleMonMaxHP
+ ldh a, [hWhoseTurn]
+ and a
+ jp z, .addDamageToAttackerHP
+ ld hl, wEnemyMonHP
+ ld de, wEnemyMonMaxHP
+.addDamageToAttackerHP
+ ld bc, wHPBarOldHP+1
+; copy current HP to wHPBarOldHP
+ ld a, [hli]
+ ld [bc], a
+ ld a, [hl]
+ dec bc
+ ld [bc], a
+; copy max HP to wHPBarMaxHP
+ ld a, [de]
+ dec bc
+ ld [bc], a
+ inc de
+ ld a, [de]
+ dec bc
+ ld [bc], a
+; add damage to attacker's HP and copy new HP to wHPBarNewHP
+ ld a, [wDamage + 1]
+ ld b, [hl]
+ add b
+ ld [hld], a
+ ld [wHPBarNewHP], a
+ ld a, [wDamage]
+ ld b, [hl]
+ adc b
+ ld [hli], a
+ ld [wHPBarNewHP+1], a
+ jr c, .capToMaxHP ; if HP > 65,535, cap to max HP
+; compare HP with max HP
+ ld a, [hld]
+ ld b, a
+ ld a, [de]
+ dec de
+ sub b
+ ld a, [hli]
+ ld b, a
+ ld a, [de]
+ inc de
+ sbc b
+ jr nc, .next
+.capToMaxHP
+ ld a, [de]
+ ld [hld], a
+ ld [wHPBarNewHP], a
+ dec de
+ ld a, [de]
+ ld [hli], a
+ ld [wHPBarNewHP+1], a
+ inc de
+.next
+ ldh a, [hWhoseTurn]
+ and a
+ hlcoord 10, 9
+ ld a, $1
+ jr z, .next2
+ hlcoord 2, 2
+ xor a
+.next2
+ ld [wHPBarType], a
+ predef UpdateHPBar2
+ predef DrawPlayerHUDAndHPBar
+ predef DrawEnemyHUDAndHPBar
+ callfar ReadPlayerMonCurHPAndStatus
+ ld hl, SuckedHealthText
+ ldh a, [hWhoseTurn]
+ and a
+ ld a, [wPlayerMoveEffect]
+ jr z, .next3
+ ld a, [wEnemyMoveEffect]
+.next3
+ cp DREAM_EATER_EFFECT
+ jr nz, .printText
+ ld hl, DreamWasEatenText
+.printText
+ jp PrintText
+
+SuckedHealthText:
+ text_far _SuckedHealthText
+ text_end
+
+DreamWasEatenText:
+ text_far _DreamWasEatenText
+ text_end
diff --git a/engine/battle/move_effects/focus_energy.asm b/engine/battle/move_effects/focus_energy.asm
new file mode 100644
index 00000000..1fafe920
--- /dev/null
+++ b/engine/battle/move_effects/focus_energy.asm
@@ -0,0 +1,22 @@
+FocusEnergyEffect_:
+ ld hl, wPlayerBattleStatus2
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .notEnemy
+ ld hl, wEnemyBattleStatus2
+.notEnemy
+ bit GETTING_PUMPED, [hl] ; is mon already using focus energy?
+ jr nz, .alreadyUsing
+ set GETTING_PUMPED, [hl] ; mon is now using focus energy
+ callfar PlayCurrentMoveAnimation
+ ld hl, GettingPumpedText
+ jp PrintText
+.alreadyUsing
+ ld c, 50
+ call DelayFrames
+ jpfar PrintButItFailedText_
+
+GettingPumpedText:
+ text_pause
+ text_far _GettingPumpedText
+ text_end
diff --git a/engine/battle/move_effects/haze.asm b/engine/battle/move_effects/haze.asm
new file mode 100644
index 00000000..915eeed8
--- /dev/null
+++ b/engine/battle/move_effects/haze.asm
@@ -0,0 +1,81 @@
+HazeEffect_:
+ ld a, $7
+; store 7 on every stat mod
+ ld hl, wPlayerMonAttackMod
+ call ResetStatMods
+ ld hl, wEnemyMonAttackMod
+ call ResetStatMods
+; copy unmodified stats to battle stats
+ ld hl, wPlayerMonUnmodifiedAttack
+ ld de, wBattleMonAttack
+ call ResetStats
+ ld hl, wEnemyMonUnmodifiedAttack
+ ld de, wEnemyMonAttack
+ call ResetStats
+; cure non-volatile status, but only for the target
+ ld hl, wEnemyMonStatus
+ ld de, wEnemySelectedMove
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .cureStatuses
+ ld hl, wBattleMonStatus
+ dec de ; wPlayerSelectedMove
+
+.cureStatuses
+ ld a, [hl]
+ ld [hl], $0
+ and SLP | (1 << FRZ)
+ jr z, .cureVolatileStatuses
+; prevent the Pokemon from executing a move if it was asleep or frozen
+ ld a, $ff
+ ld [de], a
+
+.cureVolatileStatuses
+ xor a
+ ld [wPlayerDisabledMove], a
+ ld [wEnemyDisabledMove], a
+ ld hl, wPlayerDisabledMoveNumber
+ ld [hli], a
+ ld [hl], a
+ ld hl, wPlayerBattleStatus1
+ call CureVolatileStatuses
+ ld hl, wEnemyBattleStatus1
+ call CureVolatileStatuses
+ ld hl, PlayCurrentMoveAnimation
+ call CallBankF
+ ld hl, StatusChangesEliminatedText
+ jp PrintText
+
+CureVolatileStatuses:
+ res CONFUSED, [hl]
+ inc hl ; BATTSTATUS2
+ ld a, [hl]
+ ; clear USING_X_ACCURACY, PROTECTED_BY_MIST, GETTING_PUMPED, and SEEDED statuses
+ and $ff ^((1 << USING_X_ACCURACY) | (1 << PROTECTED_BY_MIST) | (1 << GETTING_PUMPED) | (1 << SEEDED))
+ ld [hli], a ; BATTSTATUS3
+ ld a, [hl]
+ and %11110000 | (1 << TRANSFORMED) ; clear Bad Poison, Reflect and Light Screen statuses
+ ld [hl], a
+ ret
+
+ResetStatMods:
+ ld b, $8
+.loop
+ ld [hli], a
+ dec b
+ jr nz, .loop
+ ret
+
+ResetStats:
+ ld b, $8
+.loop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec b
+ jr nz, .loop
+ ret
+
+StatusChangesEliminatedText:
+ text_far _StatusChangesEliminatedText
+ text_end
diff --git a/engine/battle/move_effects/heal.asm b/engine/battle/move_effects/heal.asm
new file mode 100644
index 00000000..80923a29
--- /dev/null
+++ b/engine/battle/move_effects/heal.asm
@@ -0,0 +1,120 @@
+HealEffect_:
+ ldh a, [hWhoseTurn]
+ and a
+ ld de, wBattleMonHP
+ ld hl, wBattleMonMaxHP
+ ld a, [wPlayerMoveNum]
+ jr z, .healEffect
+ ld de, wEnemyMonHP
+ ld hl, wEnemyMonMaxHP
+ ld a, [wEnemyMoveNum]
+.healEffect
+ ld b, a
+ ld a, [de]
+ cp [hl] ; most significant bytes comparison is ignored
+ ; causes the move to miss if max HP is 255 or 511 points higher than the current HP
+ inc de
+ inc hl
+ ld a, [de]
+ sbc [hl]
+ jp z, .failed ; no effect if user's HP is already at its maximum
+ ld a, b
+ cp REST
+ jr nz, .healHP
+ push hl
+ push de
+ push af
+ ld c, 50
+ call DelayFrames
+ ld hl, wBattleMonStatus
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .restEffect
+ ld hl, wEnemyMonStatus
+.restEffect
+ ld a, [hl]
+ and a
+ ld [hl], 2 ; clear status and set number of turns asleep to 2
+ ld hl, StartedSleepingEffect ; if mon didn't have an status
+ jr z, .printRestText
+ ld hl, FellAsleepBecameHealthyText ; if mon had an status
+.printRestText
+ call PrintText
+ pop af
+ pop de
+ pop hl
+.healHP
+ ld a, [hld]
+ ld [wHPBarMaxHP], a
+ ld c, a
+ ld a, [hl]
+ ld [wHPBarMaxHP+1], a
+ ld b, a
+ jr z, .gotHPAmountToHeal
+; Recover and Softboiled only heal for half the mon's max HP
+ srl b
+ rr c
+.gotHPAmountToHeal
+; update HP
+ ld a, [de]
+ ld [wHPBarOldHP], a
+ add c
+ ld [de], a
+ ld [wHPBarNewHP], a
+ dec de
+ ld a, [de]
+ ld [wHPBarOldHP+1], a
+ adc b
+ ld [de], a
+ ld [wHPBarNewHP+1], a
+ inc hl
+ inc de
+ ld a, [de]
+ dec de
+ sub [hl]
+ dec hl
+ ld a, [de]
+ sbc [hl]
+ jr c, .playAnim
+; copy max HP to current HP if an overflow occurred
+ ld a, [hli]
+ ld [de], a
+ ld [wHPBarNewHP+1], a
+ inc de
+ ld a, [hl]
+ ld [de], a
+ ld [wHPBarNewHP], a
+.playAnim
+ ld hl, PlayCurrentMoveAnimation
+ call Bankswitch3DtoF
+ ldh a, [hWhoseTurn]
+ and a
+ hlcoord 10, 9
+ ld a, $1
+ jr z, .updateHPBar
+ hlcoord 2, 2
+ xor a
+.updateHPBar
+ ld [wHPBarType], a
+ predef UpdateHPBar2
+ ld hl, DrawHUDsAndHPBars
+ call Bankswitch3DtoF
+ ld hl, RegainedHealthText
+ jp PrintText
+.failed
+ ld c, 50
+ call DelayFrames
+ ld hl, PrintButItFailedText_
+ jp Bankswitch3DtoF
+
+StartedSleepingEffect:
+ text_far _StartedSleepingEffect
+ text_end
+
+FellAsleepBecameHealthyText:
+ text_far _FellAsleepBecameHealthyText
+ text_end
+
+RegainedHealthText:
+ text_far _RegainedHealthText
+ text_end
diff --git a/engine/battle/move_effects/leech_seed.asm b/engine/battle/move_effects/leech_seed.asm
new file mode 100644
index 00000000..61bd982a
--- /dev/null
+++ b/engine/battle/move_effects/leech_seed.asm
@@ -0,0 +1,40 @@
+LeechSeedEffect_:
+ callfar MoveHitTest
+ ld a, [wMoveMissed]
+ and a
+ jr nz, .moveMissed
+ ld hl, wEnemyBattleStatus2
+ ld de, wEnemyMonType1
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .leechSeedEffect
+ ld hl, wPlayerBattleStatus2
+ ld de, wBattleMonType1
+.leechSeedEffect
+; miss if the target is grass-type or already seeded
+ ld a, [de]
+ cp GRASS
+ jr z, .moveMissed
+ inc de
+ ld a, [de]
+ cp GRASS
+ jr z, .moveMissed
+ bit SEEDED, [hl]
+ jr nz, .moveMissed
+ set SEEDED, [hl]
+ callfar PlayCurrentMoveAnimation
+ ld hl, WasSeededText
+ jp PrintText
+.moveMissed
+ ld c, 50
+ call DelayFrames
+ ld hl, EvadedAttackText
+ jp PrintText
+
+WasSeededText:
+ text_far _WasSeededText
+ text_end
+
+EvadedAttackText:
+ text_far _EvadedAttackText
+ text_end
diff --git a/engine/battle/move_effects/mist.asm b/engine/battle/move_effects/mist.asm
new file mode 100644
index 00000000..163d386f
--- /dev/null
+++ b/engine/battle/move_effects/mist.asm
@@ -0,0 +1,19 @@
+MistEffect_:
+ ld hl, wPlayerBattleStatus2
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .mistEffect
+ ld hl, wEnemyBattleStatus2
+.mistEffect
+ bit PROTECTED_BY_MIST, [hl] ; is mon protected by mist?
+ jr nz, .mistAlreadyInUse
+ set PROTECTED_BY_MIST, [hl] ; mon is now protected by mist
+ callfar PlayCurrentMoveAnimation
+ ld hl, ShroudedInMistText
+ jp PrintText
+.mistAlreadyInUse
+ jpfar PrintButItFailedText_
+
+ShroudedInMistText:
+ text_far _ShroudedInMistText
+ text_end
diff --git a/engine/battle/move_effects/one_hit_ko.asm b/engine/battle/move_effects/one_hit_ko.asm
new file mode 100644
index 00000000..7e5db0f7
--- /dev/null
+++ b/engine/battle/move_effects/one_hit_ko.asm
@@ -0,0 +1,38 @@
+OneHitKOEffect_:
+ ld hl, wDamage
+ xor a
+ ld [hli], a
+ ld [hl], a ; set the damage output to zero
+ dec a
+ ld [wCriticalHitOrOHKO], a
+ ld hl, wBattleMonSpeed + 1
+ ld de, wEnemyMonSpeed + 1
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .compareSpeed
+ ld hl, wEnemyMonSpeed + 1
+ ld de, wBattleMonSpeed + 1
+.compareSpeed
+; set damage to 65535 and OHKO flag is the user's current speed is higher than the target's
+ ld a, [de]
+ dec de
+ ld b, a
+ ld a, [hld]
+ sub b
+ ld a, [de]
+ ld b, a
+ ld a, [hl]
+ sbc b
+ jr c, .userIsSlower
+ ld hl, wDamage
+ ld a, $ff
+ ld [hli], a
+ ld [hl], a
+ ld a, $2
+ ld [wCriticalHitOrOHKO], a
+ ret
+.userIsSlower
+; keep damage at 0 and set move missed flag if target's current speed is higher instead
+ ld a, $1
+ ld [wMoveMissed], a
+ ret
diff --git a/engine/battle/move_effects/paralyze.asm b/engine/battle/move_effects/paralyze.asm
new file mode 100644
index 00000000..dbaa0fb8
--- /dev/null
+++ b/engine/battle/move_effects/paralyze.asm
@@ -0,0 +1,47 @@
+ParalyzeEffect_:
+ ld hl, wEnemyMonStatus
+ ld de, wPlayerMoveType
+ ldh a, [hWhoseTurn]
+ and a
+ jp z, .next
+ ld hl, wBattleMonStatus
+ ld de, wEnemyMoveType
+.next
+ ld a, [hl]
+ and a ; does the target already have a status ailment?
+ jr nz, .didntAffect
+; check if the target is immune due to types
+ ld a, [de]
+ cp ELECTRIC
+ jr nz, .hitTest
+ ld b, h
+ ld c, l
+ inc bc
+ ld a, [bc]
+ cp GROUND
+ jr z, .doesntAffect
+ inc bc
+ ld a, [bc]
+ cp GROUND
+ jr z, .doesntAffect
+.hitTest
+ push hl
+ callfar MoveHitTest
+ pop hl
+ ld a, [wMoveMissed]
+ and a
+ jr nz, .didntAffect
+ set PAR, [hl]
+ callfar QuarterSpeedDueToParalysis
+ ld c, 30
+ call DelayFrames
+ callfar PlayCurrentMoveAnimation
+ jpfar PrintMayNotAttackText
+.didntAffect
+ ld c, 50
+ call DelayFrames
+ jpfar PrintDidntAffectText
+.doesntAffect
+ ld c, 50
+ call DelayFrames
+ jpfar PrintDoesntAffectText
diff --git a/engine/battle/move_effects/pay_day.asm b/engine/battle/move_effects/pay_day.asm
new file mode 100644
index 00000000..fa373038
--- /dev/null
+++ b/engine/battle/move_effects/pay_day.asm
@@ -0,0 +1,45 @@
+PayDayEffect_:
+ xor a
+ ld hl, wcd6d
+ ld [hli], a
+ ldh a, [hWhoseTurn]
+ and a
+ ld a, [wBattleMonLevel]
+ jr z, .payDayEffect
+ ld a, [wEnemyMonLevel]
+.payDayEffect
+; level * 2
+ add a
+ ldh [hDividend + 3], a
+ xor a
+ ldh [hDividend], a
+ ldh [hDividend + 1], a
+ ldh [hDividend + 2], a
+; convert to BCD
+ ld a, 100
+ ldh [hDivisor], a
+ ld b, $4
+ call Divide
+ ldh a, [hQuotient + 3]
+ ld [hli], a
+ ldh a, [hRemainder]
+ ldh [hDividend + 3], a
+ ld a, 10
+ ldh [hDivisor], a
+ ld b, $4
+ call Divide
+ ldh a, [hQuotient + 3]
+ swap a
+ ld b, a
+ ldh a, [hRemainder]
+ add b
+ ld [hl], a
+ ld de, wTotalPayDayMoney + 2
+ ld c, $3
+ predef AddBCDPredef
+ ld hl, CoinsScatteredText
+ jp PrintText
+
+CoinsScatteredText:
+ text_far _CoinsScatteredText
+ text_end
diff --git a/engine/battle/move_effects/recoil.asm b/engine/battle/move_effects/recoil.asm
new file mode 100644
index 00000000..85110d50
--- /dev/null
+++ b/engine/battle/move_effects/recoil.asm
@@ -0,0 +1,70 @@
+RecoilEffect_:
+ ldh a, [hWhoseTurn]
+ and a
+ ld a, [wPlayerMoveNum]
+ ld hl, wBattleMonMaxHP
+ jr z, .recoilEffect
+ ld a, [wEnemyMoveNum]
+ ld hl, wEnemyMonMaxHP
+.recoilEffect
+ ld d, a
+ ld a, [wDamage]
+ ld b, a
+ ld a, [wDamage + 1]
+ ld c, a
+ srl b
+ rr c
+ ld a, d
+ cp STRUGGLE ; struggle deals 50% recoil damage
+ jr z, .gotRecoilDamage
+ srl b
+ rr c
+.gotRecoilDamage
+ ld a, b
+ or c
+ jr nz, .updateHP
+ inc c ; minimum recoil damage is 1
+.updateHP
+; subtract HP from user due to the recoil damage
+ ld a, [hli]
+ ld [wHPBarMaxHP+1], a
+ ld a, [hl]
+ ld [wHPBarMaxHP], a
+ push bc
+ ld bc, wBattleMonHP - wBattleMonMaxHP
+ add hl, bc
+ pop bc
+ ld a, [hl]
+ ld [wHPBarOldHP], a
+ sub c
+ ld [hld], a
+ ld [wHPBarNewHP], a
+ ld a, [hl]
+ ld [wHPBarOldHP+1], a
+ sbc b
+ ld [hl], a
+ ld [wHPBarNewHP+1], a
+ jr nc, .getHPBarCoords
+; if recoil damage is higher than the Pokemon's HP, set its HP to 0
+ xor a
+ ld [hli], a
+ ld [hl], a
+ ld hl, wHPBarNewHP
+ ld [hli], a
+ ld [hl], a
+.getHPBarCoords
+ hlcoord 10, 9
+ ldh a, [hWhoseTurn]
+ and a
+ ld a, $1
+ jr z, .updateHPBar
+ hlcoord 2, 2
+ xor a
+.updateHPBar
+ ld [wHPBarType], a
+ predef UpdateHPBar2
+ ld hl, HitWithRecoilText
+ jp PrintText
+HitWithRecoilText:
+ text_far _HitWithRecoilText
+ text_end
diff --git a/engine/battle/move_effects/reflect_light_screen.asm b/engine/battle/move_effects/reflect_light_screen.asm
new file mode 100644
index 00000000..c05055fa
--- /dev/null
+++ b/engine/battle/move_effects/reflect_light_screen.asm
@@ -0,0 +1,45 @@
+ReflectLightScreenEffect_:
+ ld hl, wPlayerBattleStatus3
+ ld de, wPlayerMoveEffect
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .reflectLightScreenEffect
+ ld hl, wEnemyBattleStatus3
+ ld de, wEnemyMoveEffect
+.reflectLightScreenEffect
+ ld a, [de]
+ cp LIGHT_SCREEN_EFFECT
+ jr nz, .reflect
+ bit HAS_LIGHT_SCREEN_UP, [hl] ; is mon already protected by light screen?
+ jr nz, .moveFailed
+ set HAS_LIGHT_SCREEN_UP, [hl] ; mon is now protected by light screen
+ ld hl, LightScreenProtectedText
+ jr .playAnim
+.reflect
+ bit HAS_REFLECT_UP, [hl] ; is mon already protected by reflect?
+ jr nz, .moveFailed
+ set HAS_REFLECT_UP, [hl] ; mon is now protected by reflect
+ ld hl, ReflectGainedArmorText
+.playAnim
+ push hl
+ ld hl, PlayCurrentMoveAnimation
+ call Bankswitch3DtoF
+ pop hl
+ jp PrintText
+.moveFailed
+ ld c, 50
+ call DelayFrames
+ ld hl, PrintButItFailedText_
+ jp Bankswitch3DtoF
+
+LightScreenProtectedText:
+ text_far _LightScreenProtectedText
+ text_end
+
+ReflectGainedArmorText:
+ text_far _ReflectGainedArmorText
+ text_end
+
+Bankswitch3DtoF:
+ ld b, BANK(BattleCore)
+ jp Bankswitch
diff --git a/engine/battle/move_effects/substitute.asm b/engine/battle/move_effects/substitute.asm
new file mode 100644
index 00000000..860b76b6
--- /dev/null
+++ b/engine/battle/move_effects/substitute.asm
@@ -0,0 +1,77 @@
+SubstituteEffect_:
+ ld c, 50
+ call DelayFrames
+ ld hl, wBattleMonMaxHP
+ ld de, wPlayerSubstituteHP
+ ld bc, wPlayerBattleStatus2
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .notEnemy
+ ld hl, wEnemyMonMaxHP
+ ld de, wEnemySubstituteHP
+ ld bc, wEnemyBattleStatus2
+.notEnemy
+ ld a, [bc]
+ bit HAS_SUBSTITUTE_UP, a ; user already has substitute?
+ jr nz, .alreadyHasSubstitute
+; quarter health to remove from user
+; assumes max HP is 1023 or lower
+ push bc
+ ld a, [hli]
+ ld b, [hl]
+ srl a
+ rr b
+ srl a
+ rr b ; max hp / 4
+ push de
+ ld de, wBattleMonHP - wBattleMonMaxHP
+ add hl, de ; point hl to current HP low byte
+ pop de
+ ld a, b
+ ld [de], a ; save copy of HP to subtract in wPlayerSubstituteHP/wEnemySubstituteHP
+ ld a, [hld]
+; subtract [max hp / 4] to current HP
+ sub b
+ ld d, a
+ ld a, [hl]
+ sbc 0
+ pop bc
+ jr c, .notEnoughHP ; underflow means user would be left with negative health
+ ; bug: since it only branches on carry, it will possibly leave user with 0 HP
+.userHasZeroOrMoreHP
+ ldi [hl], a ; save resulting HP after subtraction into current HP
+ ld [hl], d
+ ld h, b
+ ld l, c
+ set HAS_SUBSTITUTE_UP, [hl]
+ ld a, [wOptions]
+ bit 7, a ; battle animation is enabled?
+ ld hl, PlayCurrentMoveAnimation
+ ld b, BANK(PlayCurrentMoveAnimation)
+ jr z, .animationEnabled
+ ld hl, AnimationSubstitute
+ ld b, BANK(AnimationSubstitute)
+.animationEnabled
+ call Bankswitch ; jump to routine depending on animation setting
+ ld hl, SubstituteText
+ call PrintText
+ jpfar DrawHUDsAndHPBars
+.alreadyHasSubstitute
+ ld hl, HasSubstituteText
+ jr .printText
+.notEnoughHP
+ ld hl, TooWeakSubstituteText
+.printText
+ jp PrintText
+
+SubstituteText:
+ text_far _SubstituteText
+ text_end
+
+HasSubstituteText:
+ text_far _HasSubstituteText
+ text_end
+
+TooWeakSubstituteText:
+ text_far _TooWeakSubstituteText
+ text_end
diff --git a/engine/battle/move_effects/transform.asm b/engine/battle/move_effects/transform.asm
new file mode 100644
index 00000000..d37bd94d
--- /dev/null
+++ b/engine/battle/move_effects/transform.asm
@@ -0,0 +1,141 @@
+TransformEffect_:
+ ld hl, wBattleMonSpecies
+ ld de, wEnemyMonSpecies
+ ld bc, wEnemyBattleStatus3
+ ld a, [wEnemyBattleStatus1]
+ ldh a, [hWhoseTurn]
+ and a
+ jr nz, .hitTest
+ ld hl, wEnemyMonSpecies
+ ld de, wBattleMonSpecies
+ ld bc, wPlayerBattleStatus3
+ ld [wPlayerMoveListIndex], a
+ 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, wPlayerBattleStatus2
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .transformEffect
+ ld hl, wEnemyBattleStatus2
+.transformEffect
+; animation(s) played are different if target has Substitute up
+ bit HAS_SUBSTITUTE_UP, [hl]
+ push af
+ ld hl, HideSubstituteShowMonAnim
+ ld b, BANK(HideSubstituteShowMonAnim)
+ call nz, Bankswitch
+ ld a, [wOptions]
+ add a
+ ld hl, PlayCurrentMoveAnimation
+ ld b, BANK(PlayCurrentMoveAnimation)
+ jr nc, .gotAnimToPlay
+ ld hl, AnimationTransformMon
+ ld b, BANK(AnimationTransformMon)
+.gotAnimToPlay
+ call Bankswitch
+ ld hl, ReshowSubstituteAnim
+ ld b, BANK(ReshowSubstituteAnim)
+ pop af
+ call nz, Bankswitch
+ pop bc
+ ld a, [bc]
+ set TRANSFORMED, a ; mon is now transformed
+ ld [bc], a
+ pop de
+ pop hl
+ push hl
+; transform user into opposing Pokemon
+; species
+ ld a, [hl]
+ ld [de], a
+; type 1, type 2, catch rate, and moves
+ ld bc, $5
+ add hl, bc
+ inc de
+ inc de
+ inc de
+ inc de
+ inc de
+ inc bc
+ inc bc
+ call CopyData
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .next
+; save enemy mon DVs at wTransformedEnemyMonOriginalDVs
+ ld a, [de]
+ ld [wTransformedEnemyMonOriginalDVs], a
+ inc de
+ ld a, [de]
+ ld [wTransformedEnemyMonOriginalDVs + 1], a
+ dec de
+.next
+; DVs
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+; Attack, Defense, Speed, and Special stats
+ inc hl
+ inc hl
+ inc hl
+ inc de
+ inc de
+ inc de
+ ld bc, $8
+ call CopyData
+ ld bc, wBattleMonMoves - wBattleMonPP
+ add hl, bc ; ld hl, wBattleMonMoves
+ ld b, NUM_MOVES
+.copyPPLoop
+; 5 PP for all moves
+ ld a, [hli]
+ and a
+ jr z, .lessThanFourMoves
+ ld a, $5
+.lessThanFourMoves
+ ld [de], a
+ inc de
+ dec b
+ jr nz, .copyPPLoop
+.copyStats
+; original (unmodified) stats and stat mods
+ pop hl
+ ld a, [hl]
+ ld [wd11e], a
+ call GetMonName
+ ld hl, wEnemyMonUnmodifiedAttack
+ ld de, wPlayerMonUnmodifiedAttack
+ call .copyBasedOnTurn ; original (unmodified) stats
+ ld hl, wEnemyMonStatMods
+ ld de, wPlayerMonStatMods
+ call .copyBasedOnTurn ; stat mods
+ ld hl, TransformedText
+ jp PrintText
+
+.copyBasedOnTurn
+ ldh a, [hWhoseTurn]
+ and a
+ jr z, .gotStatsOrModsToCopy
+ push hl
+ ld h, d
+ ld l, e
+ pop de
+.gotStatsOrModsToCopy
+ ld bc, $8
+ jp CopyData
+
+.failed
+ ld hl, PrintButItFailedText_
+ jp Bankswitch3DtoF
+
+TransformedText:
+ text_far _TransformedText
+ text_end
diff --git a/engine/battle/print_type.asm b/engine/battle/print_type.asm
index f717f871..7da0dc8c 100644
--- a/engine/battle/print_type.asm
+++ b/engine/battle/print_type.asm
@@ -49,4 +49,4 @@ PrintType_:
pop hl
jp PlaceString
-INCLUDE "text/type_names.asm"
+INCLUDE "data/types/names.asm"
diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm
index b4ee46a0..02fbfeda 100755
--- a/engine/battle/read_trainer_party.asm
+++ b/engine/battle/read_trainer_party.asm
@@ -110,7 +110,7 @@ ReadTrainer:
dec a
ld c, a
ld b, 0
- add hl,bc
+ add hl, bc
ld a, [de]
inc de
ld [hl], a
diff --git a/engine/battle/safari_zone.asm b/engine/battle/safari_zone.asm
index 88064f9a..9362cc3a 100755
--- a/engine/battle/safari_zone.asm
+++ b/engine/battle/safari_zone.asm
@@ -28,9 +28,9 @@ PrintSafariZoneBattleText:
jp PrintText
SafariZoneEatingText:
- TX_FAR _SafariZoneEatingText
- db "@"
+ text_far _SafariZoneEatingText
+ text_end
SafariZoneAngryText:
- TX_FAR _SafariZoneAngryText
- db "@"
+ text_far _SafariZoneAngryText
+ text_end
diff --git a/engine/battle/save_trainer_name.asm b/engine/battle/save_trainer_name.asm
index 49d0429f..4d40fd82 100644
--- a/engine/battle/save_trainer_name.asm
+++ b/engine/battle/save_trainer_name.asm
@@ -1,4 +1,4 @@
-SaveTrainerName:
+SaveTrainerName::
ld hl, TrainerNamePointers
ld a, [wTrainerClass]
dec a
@@ -18,95 +18,4 @@ SaveTrainerName:
jr nz, .CopyCharacter
ret
-TrainerNamePointers:
-; what is the point of these?
- dw YoungsterName
- dw BugCatcherName
- dw LassName
- dw wTrainerName
- dw JrTrainerMName
- dw JrTrainerFName
- dw PokemaniacName
- dw SuperNerdName
- dw wTrainerName
- dw wTrainerName
- dw BurglarName
- dw EngineerName
- dw JugglerXName
- dw wTrainerName
- dw SwimmerName
- dw wTrainerName
- dw wTrainerName
- dw BeautyName
- dw wTrainerName
- dw RockerName
- dw JugglerName
- dw wTrainerName
- dw wTrainerName
- dw BlackbeltName
- dw wTrainerName
- dw ProfOakName
- dw ChiefName
- dw ScientistName
- dw wTrainerName
- dw RocketName
- dw CooltrainerMName
- dw CooltrainerFName
- 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:
- db "YOUNGSTER@"
-BugCatcherName:
- db "BUG CATCHER@"
-LassName:
- db "LASS@"
-JrTrainerMName:
- db "JR.TRAINER♂@"
-JrTrainerFName:
- db "JR.TRAINER♀@"
-PokemaniacName:
- db "POKéMANIAC@"
-SuperNerdName:
- db "SUPER NERD@"
-BurglarName:
- db "BURGLAR@"
-EngineerName:
- db "ENGINEER@"
-JugglerXName:
- db "JUGGLER@"
-SwimmerName:
- db "SWIMMER@"
-BeautyName:
- db "BEAUTY@"
-RockerName:
- db "ROCKER@"
-JugglerName:
- db "JUGGLER@"
-BlackbeltName:
- db "BLACKBELT@"
-ProfOakName:
- db "PROF.OAK@"
-ChiefName:
- db "CHIEF@"
-ScientistName:
- db "SCIENTIST@"
-RocketName:
- db "ROCKET@"
-CooltrainerMName:
- db "COOLTRAINER♂@"
-CooltrainerFName:
- db "COOLTRAINER♀@"
+INCLUDE "data/trainers/name_pointers.asm"
diff --git a/engine/battle/scale_sprites.asm b/engine/battle/scale_sprites.asm
index c614d638..794a65ab 100644
--- a/engine/battle/scale_sprites.asm
+++ b/engine/battle/scale_sprites.asm
@@ -24,7 +24,7 @@ ScaleFirstThreeSpriteColumnsByTwo:
.columnInnerLoop
push bc
ld a, [de]
- ld bc, -(7*8)+1 ; $ffc9, scale lower nybble and seek to previous output column
+ ld bc, -(7*8)+1 ; -$37, scale lower nybble and seek to previous output column
call ScalePixelsByTwo
ld a, [de]
dec de
@@ -39,7 +39,7 @@ ScaleFirstThreeSpriteColumnsByTwo:
dec de
dec de
ld a, b
- ld bc, -7*8 ; $ffc8, skip one output column (which has already been written along with the current one)
+ ld bc, -7*8 ; -$38, skip one output column (which has already been written along with the current one)
add hl, bc
ld b, a
dec b
@@ -48,16 +48,16 @@ ScaleFirstThreeSpriteColumnsByTwo:
ScaleLastSpriteColumnByTwo:
ld a, 4*8 - 4 ; $1c, 4 tiles minus 4 unused rows
- ld [H_SPRITEINTERLACECOUNTER], a
+ ldh [hSpriteInterlaceCounter], a
ld bc, -1
.columnInnerLoop
ld a, [de]
dec de
swap a ; only high nybble contains information
call ScalePixelsByTwo
- ld a, [H_SPRITEINTERLACECOUNTER]
+ ldh a, [hSpriteInterlaceCounter]
dec a
- ld [H_SPRITEINTERLACECOUNTER], a
+ ldh [hSpriteInterlaceCounter], a
jr nz, .columnInnerLoop
dec de ; skip last 4 rows of new column
dec de
@@ -86,7 +86,19 @@ ScalePixelsByTwo:
; repeats each input bit twice
DuplicateBitsTable:
- db $00, $03, $0c, $0f
- db $30, $33, $3c, $3f
- db $c0, $c3, $cc, $cf
- db $f0, $f3, $fc, $ff
+ db %00000000
+ db %00000011
+ db %00001100
+ db %00001111
+ db %00110000
+ db %00110011
+ db %00111100
+ db %00111111
+ db %11000000
+ db %11000011
+ db %11001100
+ db %11001111
+ db %11110000
+ db %11110011
+ db %11111100
+ db %11111111
diff --git a/engine/battle/scroll_draw_trainer_pic.asm b/engine/battle/scroll_draw_trainer_pic.asm
index 98893dcf..e19d681a 100644
--- a/engine/battle/scroll_draw_trainer_pic.asm
+++ b/engine/battle/scroll_draw_trainer_pic.asm
@@ -5,8 +5,8 @@ _ScrollTrainerPicAfterBattle:
ld [wEnemyMonSpecies2], a
ld b, SET_PAL_BATTLE
call RunPaletteCommand
- callab _LoadTrainerPic
- coord hl, 19, 0
+ callfar _LoadTrainerPic
+ hlcoord 19, 0
ld c, $0
.scrollLoop
inc c
diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm
index c8fdfb29..17e68e75 100644
--- a/engine/battle/trainer_ai.asm
+++ b/engine/battle/trainer_ai.asm
@@ -134,7 +134,7 @@ AIMoveChoiceModification1:
push de
push bc
ld hl, StatusAilmentMoveEffects
- ld de, $0001
+ ld de, 1
call IsInArray
pop bc
pop de
@@ -146,11 +146,11 @@ AIMoveChoiceModification1:
jr .nextMove
StatusAilmentMoveEffects:
- db $01 ; unused sleep effect
+ db EFFECT_01 ; unused sleep effect
db SLEEP_EFFECT
db POISON_EFFECT
db PARALYZE_EFFECT
- db $FF
+ db -1 ; end
; slightly encourage moves with specific effects.
; in particular, stat-modifying moves and other move effects
@@ -204,7 +204,7 @@ AIMoveChoiceModification3:
push hl
push bc
push de
- callab AIGetTypeEffectiveness
+ callfar AIGetTypeEffectiveness
pop de
pop bc
pop hl
@@ -273,68 +273,19 @@ ReadMove:
pop hl
ret
-; move choice modification methods that are applied for each trainer class
-; 0 is sentinel value
-TrainerClassMoveChoiceModifications:
- db 0 ; YOUNGSTER
- 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,2,3,0; POKEMANIAC
- db 1,2,0 ; SUPER_NERD
- db 1,0 ; HIKER
- db 1,0 ; BIKER
- db 1,3,0 ; BURGLAR
- db 1,0 ; ENGINEER
- db 1,2,0 ; JUGGLER_X
- db 1,3,0 ; FISHER
- db 1,3,0 ; SWIMMER
- db 0 ; CUE_BALL
- db 1,0 ; GAMBLER
- db 1,3,0 ; BEAUTY
- db 1,2,0 ; PSYCHIC_TR
- db 1,0 ; ROCKER
- db 1,0 ; JUGGLER
- db 1,0 ; TAMER
- db 1,0 ; BIRD_KEEPER
- db 1,0 ; BLACKBELT
- db 1,0 ; SONY1
- db 1,3,0 ; PROF_OAK
- db 1,2,0 ; CHIEF
- db 1,2,0 ; SCIENTIST
- db 1,3,0 ; GIOVANNI
- db 1,0 ; ROCKET
- db 1,3,0 ; COOLTRAINER_M
- db 1,3,0 ; COOLTRAINER_F
- db 1,0 ; BRUNO
- db 1,0 ; BROCK
- db 1,3,0 ; MISTY
- db 1,0 ; LT_SURGE
- db 1,3,0 ; ERIKA
- db 1,3,0 ; KOGA
- db 1,0 ; BLAINE
- db 1,0 ; SABRINA
- db 1,2,0 ; GENTLEMAN
- db 1,3,0 ; SONY2
- db 1,3,0 ; SONY3
- db 1,2,3,0; LORELEI
- db 1,0 ; CHANNELER
- db 1,0 ; AGATHA
- db 1,3,0 ; LANCE
-
-INCLUDE "engine/battle/trainer_pic_money_pointers.asm"
-
-INCLUDE "text/trainer_names.asm"
-
-INCLUDE "engine/battle/bank_e_misc.asm"
+INCLUDE "data/trainers/move_choices.asm"
+
+INCLUDE "data/trainers/pic_pointers_money.asm"
+
+INCLUDE "data/trainers/names.asm"
+
+INCLUDE "engine/battle/misc.asm"
INCLUDE "engine/battle/read_trainer_party.asm"
-INCLUDE "data/trainer_moves.asm"
+INCLUDE "data/trainers/special_moves.asm"
-INCLUDE "data/trainer_parties.asm"
+INCLUDE "data/trainers/parties.asm"
TrainerAI:
ld a, [wIsInBattle]
@@ -350,7 +301,7 @@ TrainerAI:
and 1 << USING_RAGE ; %1000000
jr nz, .done ; don't follow trainer ai if opponent is locked in rage
; note that this doesn't check for hyper beam recharge which can cause problems
- ld a,[wTrainerClass] ; what trainer class is this?
+ ld a, [wTrainerClass] ; what trainer class is this?
dec a
ld c, a
ld b, 0
@@ -377,57 +328,7 @@ TrainerAI:
and a
ret
-TrainerAIPointers:
-; one entry per trainer class
-; first byte, number of times (per Pokémon) it can occur
-; next two bytes, pointer to AI subroutine for trainer class
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,JugglerAI ; juggler_x
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 3,JugglerAI ; juggler
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 2,BlackbeltAI ; blackbelt
- dbw 3,GenericAI
- dbw 3,GenericAI
- dbw 1,GenericAI ; chief
- dbw 3,GenericAI
- dbw 1,GiovanniAI ; giovanni
- dbw 3,GenericAI
- dbw 2,CooltrainerMAI ; cooltrainerm
- dbw 1,CooltrainerFAI ; cooltrainerf
- dbw 2,BrunoAI ; bruno
- dbw 5,BrockAI ; brock
- dbw 1,MistyAI ; misty
- dbw 1,LtSurgeAI ; surge
- dbw 1,ErikaAI ; erika
- dbw 2,KogaAI ; koga
- dbw 2,BlaineAI ; blaine
- dbw 1,SabrinaAI ; sabrina
- dbw 3,GenericAI
- dbw 1,Sony2AI ; sony2
- dbw 1,Sony3AI ; sony3
- dbw 2,LoreleiAI ; lorelei
- dbw 3,GenericAI
- dbw 2,AgathaAI ; agatha
- dbw 1,LanceAI ; lance
+INCLUDE "data/trainers/ai_pointers.asm"
JugglerAI:
cp 25 percent + 1
@@ -650,14 +551,14 @@ AIRecoverHP:
AIPrintItemUseAndUpdateHPBar:
call AIPrintItemUse_
- coord hl, 2, 2
+ hlcoord 2, 2
xor a
ld [wHPBarType], a
predef UpdateHPBar2
jp DecrementAICount
AISwitchIfEnoughMons:
-; enemy trainer switches if there are 3 or more unfainted mons in party
+; enemy trainer switches if there are 2 or more unfainted mons in party
ld a, [wEnemyPartyCount]
ld c, a
ld hl, wEnemyMon1HP
@@ -681,7 +582,7 @@ AISwitchIfEnoughMons:
jr nz, .loop
ld a, d ; how many available monsters are there?
- cp 2 ; don't bother if only 1 or 2
+ cp 2 ; don't bother if only 1
jp nc, SwitchEnemyMon
and a
ret
@@ -707,7 +608,7 @@ SwitchEnemyMon:
; switching in a new mon in response to this switch.
ld a, 1
ld [wFirstMonsNotOutYet], a
- callab EnemySendOut
+ callfar EnemySendOut
xor a
ld [wFirstMonsNotOutYet], a
@@ -718,8 +619,8 @@ SwitchEnemyMon:
ret
AIBattleWithdrawText:
- TX_FAR _AIBattleWithdrawText
- db "@"
+ text_far _AIBattleWithdrawText
+ text_end
AIUseFullHeal:
call AIPlayRestoringSFX
@@ -763,17 +664,17 @@ AIUseDireHit: ; unused
AICheckIfHPBelowFraction:
; return carry if enemy trainer's current HP is below 1 / a of the maximum
- ld [H_DIVISOR], a
+ ldh [hDivisor], a
ld hl, wEnemyMonMaxHP
ld a, [hli]
- ld [H_DIVIDEND], a
+ ldh [hDividend], a
ld a, [hl]
- ld [H_DIVIDEND + 1], a
+ ldh [hDividend + 1], a
ld b, 2
call Divide
- ld a, [H_QUOTIENT + 3]
+ ldh a, [hQuotient + 3]
ld c, a
- ld a, [H_QUOTIENT + 2]
+ ldh a, [hQuotient + 2]
ld b, a
ld hl, wEnemyMonHP + 1
ld a, [hld]
@@ -821,7 +722,7 @@ AIIncreaseStat:
ld a, ANIM_AF
ld [hli], a
ld [hl], b
- callab StatModifierUpEffect
+ callfar StatModifierUpEffect
pop hl
pop af
ld [hli], a
@@ -843,5 +744,5 @@ AIPrintItemUse_:
jp PrintText
AIBattleUseItemText:
- TX_FAR _AIBattleUseItemText
- db "@"
+ text_far _AIBattleUseItemText
+ text_end
diff --git a/engine/battle/trainer_pic_money_pointers.asm b/engine/battle/trainer_pic_money_pointers.asm
deleted file mode 100755
index 37678e74..00000000
--- a/engine/battle/trainer_pic_money_pointers.asm
+++ /dev/null
@@ -1,143 +0,0 @@
-TrainerPicAndMoneyPointers:
-; trainer pic pointers and base money.
-; money received after battle = base money × level of highest-level enemy mon
- dw YoungsterPic
- money 1500
-
- dw BugCatcherPic
- money 1000
-
- dw LassPic
- money 1500
-
- dw SailorPic
- money 3000
-
- dw JrTrainerMPic
- money 2000
-
- dw JrTrainerFPic
- money 2000
-
- dw PokemaniacPic
- money 5000
-
- dw SuperNerdPic
- money 2500
-
- dw HikerPic
- money 3500
-
- dw BikerPic
- money 2000
-
- dw BurglarPic
- money 9000
-
- dw EngineerPic
- money 5000
-
- dw JugglerPic
- money 3500
-
- dw FisherPic
- money 3500
-
- dw SwimmerPic
- money 500
-
- dw CueBallPic
- money 2500
-
- dw GamblerPic
- money 7000
-
- dw BeautyPic
- money 7000
-
- dw PsychicPic
- money 1000
-
- dw RockerPic
- money 2500
-
- dw JugglerPic
- money 3500
-
- dw TamerPic
- money 4000
-
- dw BirdKeeperPic
- money 2500
-
- dw BlackbeltPic
- money 2500
-
- dw Rival1Pic
- money 3500
-
- dw ProfOakPic
- money 9900
-
- dw ChiefPic
- money 3000
-
- dw ScientistPic
- money 5000
-
- dw GiovanniPic
- money 9900
-
- dw RocketPic
- money 3000
-
- dw CooltrainerMPic
- money 3500
-
- dw CooltrainerFPic
- money 3500
-
- dw BrunoPic
- money 9900
-
- dw BrockPic
- money 9900
-
- dw MistyPic
- money 9900
-
- dw LtSurgePic
- money 9900
-
- dw ErikaPic
- money 9900
-
- dw KogaPic
- money 9900
-
- dw BlainePic
- money 9900
-
- dw SabrinaPic
- money 9900
-
- dw GentlemanPic
- money 7000
-
- dw Rival2Pic
- money 6500
-
- dw Rival3Pic
- money 9900
-
- dw LoreleiPic
- money 9900
-
- dw ChannelerPic
- money 3000
-
- dw AgathaPic
- money 9900
-
- dw LancePic
- money 9900
diff --git a/engine/battle/unused_stats_functions.asm b/engine/battle/unused_stats_functions.asm
index 55f78fd3..5174adf5 100644
--- a/engine/battle/unused_stats_functions.asm
+++ b/engine/battle/unused_stats_functions.asm
@@ -1,6 +1,6 @@
; does nothing since no stats are ever selected (barring glitches)
DoubleSelectedStats:
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ld a, [wPlayerStatsToDouble]
ld hl, wBattleMonAttack + 1
@@ -30,7 +30,7 @@ DoubleSelectedStats:
; does nothing since no stats are ever selected (barring glitches)
HalveSelectedStats:
- ld a, [H_WHOSETURN]
+ ldh a, [hWhoseTurn]
and a
ld a, [wPlayerStatsToHalve]
ld hl, wBattleMonAttack
diff --git a/engine/battle/wild_encounters.asm b/engine/battle/wild_encounters.asm
index 0285346e..d16c6515 100644
--- a/engine/battle/wild_encounters.asm
+++ b/engine/battle/wild_encounters.asm
@@ -7,14 +7,14 @@ TryDoWildEncounter:
ld a, [wd736]
and a
ret nz
- callab IsPlayerStandingOnDoorTileOrWarpTile
+ callfar IsPlayerStandingOnDoorTileOrWarpTile
jr nc, .notStandingOnDoorOrWarpTile
.CantEncounter
ld a, $1
and a
ret
.notStandingOnDoorOrWarpTile
- callab IsPlayerJustOutsideMap
+ callfar IsPlayerJustOutsideMap
jr z, .CantEncounter
ld a, [wRepelRemainingSteps]
and a
@@ -26,7 +26,7 @@ TryDoWildEncounter:
; determine if wild pokemon can appear in the half-block we're standing in
; is the bottom left tile (8,9) of the half-block we're standing in a grass/water tile?
; note that by using the bottom left tile, this prevents the "left-shore" tiles from generating grass encounters
- coord hl, 8, 9
+ hlcoord 8, 9
ld c, [hl]
ld a, [wGrassTile]
cp c
@@ -40,7 +40,7 @@ TryDoWildEncounter:
; 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, [wCurMap]
- cp REDS_HOUSE_1F ; is this an indoor map?
+ cp FIRST_INDOOR_MAP ; is this an indoor map?
jr c, .CantEncounter2
ld a, [wCurMapTileset]
cp FOREST ; Viridian Forest/Safari Zone
@@ -49,10 +49,10 @@ TryDoWildEncounter:
.CanEncounter
; compare encounter chance with a random number to determine if there will be an encounter
ld b, a
- ld a, [hRandomAdd]
+ ldh a, [hRandomAdd]
cp b
jr nc, .CantEncounter2
- ld a, [hRandomSub]
+ ldh a, [hRandomSub]
ld b, a
ld hl, WildMonEncounterSlotChances
.determineEncounterSlot
@@ -65,7 +65,7 @@ TryDoWildEncounter:
; determine which wild pokemon (grass or water) can appear in the half-block we're standing in
ld c, [hl]
ld hl, wGrassMons
- aCoord 8, 9
+ lda_coord 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, wWaterMons
@@ -89,7 +89,7 @@ TryDoWildEncounter:
.lastRepelStep
ld [wRepelRemainingSteps], a
ld a, TEXT_REPEL_WORE_OFF
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call EnableAutoTextBoxDrawing
call DisplayTextID
.CantEncounter2
@@ -100,18 +100,4 @@ TryDoWildEncounter:
xor a
ret
-WildMonEncounterSlotChances:
-; There are 10 slots for wild pokemon, and this is the table that defines how common each of
-; those 10 slots is. A random number is generated and then the first byte of each pair in this
-; table is compared against that random number. If the random number is less than or equal
-; to the first byte, then that slot is chosen. The second byte is double the slot number.
- db $32, $00 ; 51/256 = 19.9% chance of slot 0
- db $65, $02 ; 51/256 = 19.9% chance of slot 1
- db $8C, $04 ; 39/256 = 15.2% chance of slot 2
- db $A5, $06 ; 25/256 = 9.8% chance of slot 3
- db $BE, $08 ; 25/256 = 9.8% chance of slot 4
- db $D7, $0A ; 25/256 = 9.8% chance of slot 5
- db $E4, $0C ; 13/256 = 5.1% chance of slot 6
- db $F1, $0E ; 13/256 = 5.1% chance of slot 7
- db $FC, $10 ; 11/256 = 4.3% chance of slot 8
- db $FF, $12 ; 3/256 = 1.2% chance of slot 9
+INCLUDE "data/wild/probabilities.asm"
diff --git a/engine/bcd.asm b/engine/bcd.asm
deleted file mode 100644
index d84e504b..00000000
--- a/engine/bcd.asm
+++ /dev/null
@@ -1,218 +0,0 @@
-; divide hMoney by hDivideBCDDivisor
-; return output in hDivideBCDQuotient (same as hDivideBCDDivisor)
-; used only to halve player money upon losing a fight
-DivideBCDPredef::
-DivideBCDPredef2::
-DivideBCDPredef3:: ; only used function
-DivideBCDPredef4::
- call GetPredefRegisters
-
-DivideBCD::
- xor a
- ld [hDivideBCDBuffer], a
- ld [hDivideBCDBuffer + 1], a
- ld [hDivideBCDBuffer + 2], a
- ld d, $1
-.mulBy10Loop
-; multiply the divisor by 10 until the leading digit is nonzero
-; to set up the standard long division algorithm
- ld a, [hDivideBCDDivisor]
- and $f0
- jr nz, .next
- inc d
- ld a, [hDivideBCDDivisor]
- swap a
- and $f0
- ld b, a
- ld a, [hDivideBCDDivisor + 1]
- swap a
- ld [hDivideBCDDivisor + 1], a
- and $f
- or b
- ld [hDivideBCDDivisor], a
- ld a, [hDivideBCDDivisor + 1]
- and $f0
- ld b, a
- ld a, [hDivideBCDDivisor + 2]
- swap a
- ld [hDivideBCDDivisor + 2], a
- and $f
- or b
- ld [hDivideBCDDivisor + 1], a
- ld a, [hDivideBCDDivisor + 2]
- and $f0
- ld [hDivideBCDDivisor + 2], a
- jr .mulBy10Loop
-
-.next
- push de
- push de
- call DivideBCD_getNextDigit
- pop de
- ld a, b
- swap a
- and $f0
- ld [hDivideBCDBuffer], a
- dec d
- jr z, .next2
- push de
- call DivideBCD_divDivisorBy10
- call DivideBCD_getNextDigit
- pop de
- ld a, [hDivideBCDBuffer]
- or b
- ld [hDivideBCDBuffer], a
- dec d
- jr z, .next2
- push de
- call DivideBCD_divDivisorBy10
- call DivideBCD_getNextDigit
- pop de
- ld a, b
- swap a
- and $f0
- ld [hDivideBCDBuffer + 1], a
- dec d
- jr z, .next2
- push de
- call DivideBCD_divDivisorBy10
- call DivideBCD_getNextDigit
- pop de
- ld a, [hDivideBCDBuffer + 1]
- or b
- ld [hDivideBCDBuffer + 1], a
- dec d
- jr z, .next2
- push de
- call DivideBCD_divDivisorBy10
- call DivideBCD_getNextDigit
- pop de
- ld a, b
- swap a
- and $f0
- ld [hDivideBCDBuffer + 2], a
- dec d
- jr z, .next2
- push de
- call DivideBCD_divDivisorBy10
- call DivideBCD_getNextDigit
- pop de
- ld a, [hDivideBCDBuffer + 2]
- or b
- ld [hDivideBCDBuffer + 2], a
-.next2
- ld a, [hDivideBCDBuffer]
- ld [hDivideBCDQuotient], a ; the same memory location as hDivideBCDDivisor
- ld a, [hDivideBCDBuffer + 1]
- ld [hDivideBCDQuotient + 1], a
- ld a, [hDivideBCDBuffer + 2]
- ld [hDivideBCDQuotient + 2], a
- pop de
- ld a, $6
- sub d
- and a
- ret z
-.divResultBy10loop
- push af
- call DivideBCD_divDivisorBy10
- pop af
- dec a
- jr nz, .divResultBy10loop
- ret
-
-DivideBCD_divDivisorBy10:
- ld a, [hDivideBCDDivisor + 2]
- swap a
- and $f
- ld b, a
- ld a, [hDivideBCDDivisor + 1]
- swap a
- ld [hDivideBCDDivisor + 1], a
- and $f0
- or b
- ld [hDivideBCDDivisor + 2], a
- ld a, [hDivideBCDDivisor + 1]
- and $f
- ld b, a
- ld a, [hDivideBCDDivisor]
- swap a
- ld [hDivideBCDDivisor], a
- and $f0
- or b
- ld [hDivideBCDDivisor + 1], a
- ld a, [hDivideBCDDivisor]
- and $f
- ld [hDivideBCDDivisor], a
- ret
-
-DivideBCD_getNextDigit:
- ld bc, $3
-.loop
- ld de, hMoney ; the dividend
- ld hl, hDivideBCDDivisor
- push bc
- call StringCmp
- pop bc
- ret c
- inc b
- ld de, hMoney + 2 ; since SubBCD works starting from the least significant digit
- ld hl, hDivideBCDDivisor + 2
- push bc
- call SubBCD
- pop bc
- jr .loop
-
-
-AddBCDPredef::
- call GetPredefRegisters
-
-AddBCD::
- and a
- ld b, c
-.add
- ld a, [de]
- adc [hl]
- daa
- ld [de], a
- dec de
- dec hl
- dec c
- jr nz, .add
- jr nc, .done
- ld a, $99
- inc de
-.fill
- ld [de], a
- inc de
- dec b
- jr nz, .fill
-.done
- ret
-
-
-SubBCDPredef::
- call GetPredefRegisters
-
-SubBCD::
- and a
- ld b, c
-.sub
- ld a, [de]
- sbc [hl]
- daa
- ld [de], a
- dec de
- dec hl
- dec c
- jr nz, .sub
- jr nc, .done
- ld a, $00
- inc de
-.fill
- ld [de], a
- inc de
- dec b
- jr nz, .fill
- scf
-.done
- ret
diff --git a/engine/bg_map_attributes.asm b/engine/bg_map_attributes.asm
index 90df9e27..4c50bcf8 100644
--- a/engine/bg_map_attributes.asm
+++ b/engine/bg_map_attributes.asm
@@ -19,37 +19,37 @@ LoadBGMapAttributes::
di
ld a, $1
- ld [rVBK], a
+ ldh [rVBK], a
push hl
ld a, [hl]
ld c, a ; save attribute count for later
ld de, $10
add hl, de
ld a, h
- ld [rHDMA1], a
+ ldh [rHDMA1], a
ld a, l
- ld [rHDMA2], a
+ ldh [rHDMA2], a
ld de, vBGMap0
ld a, d
- ld [rHDMA3], a
+ ldh [rHDMA3], a
ld a, e
- ld [rHDMA4], a
+ ldh [rHDMA4], a
- ld a, [rLCDC]
+ ldh a, [rLCDC]
and rLCDC_ENABLE_MASK ; is LCD off?
jr z, .lcdOff ; if off, transfer immediately
; wait for VBlank if LCD is on
.waitForVBlankLoop1
- ld a, [rLY]
+ ldh a, [rLY]
cp $90
jr nz, .waitForVBlankLoop1
.waitForAccessibleVRAMLoop1
- ld a, [rSTAT]
+ ldh a, [rSTAT]
and %10 ; are we in HBlank or VBlank?
jr nz, .waitForAccessibleVRAMLoop1 ; loop until we're in a safe period to transfer to VRAM
.lcdOff
ld a, c ; number of BG attributes to transfer, plus 1 times 16
- ld [rHDMA5], a ; initiate transfer
+ ldh [rHDMA5], a ; initiate transfer
call Func_3082 ; update audio so it doesn't "lag"
pop hl
ld a, [hli]
@@ -60,30 +60,30 @@ LoadBGMapAttributes::
ld d, a ; offset of the attributes
add hl, de ; hl = new pointer
ld a, h
- ld [rHDMA1], a
+ ldh [rHDMA1], a
ld a, l
- ld [rHDMA2], a
+ ldh [rHDMA2], a
ld de, vBGMap1 ; copy to vBGMap1
ld a, d
- ld [rHDMA3], a
+ ldh [rHDMA3], a
ld a, e
- ld [rHDMA4], a
+ ldh [rHDMA4], a
; LCD check again
- ld a, [rLCDC]
+ ldh a, [rLCDC]
and rLCDC_ENABLE_MASK ; is LCD off?
jr z, .lcdOff2 ; if off, transfer immediately
; wait for VBlank if LCD is on
.waitForVBlankLoop2
- ld a, [rLY]
+ ldh a, [rLY]
cp $90
jr nz, .waitForVBlankLoop2
.waitForAccessibleVRAMLoop2
- ld a, [rSTAT]
+ ldh a, [rSTAT]
and %10 ; are we in HBlank or VBlank?
jr nz, .waitForAccessibleVRAMLoop2 ; loop until we're in a safe period to transfer to VRAM
.lcdOff2
ld a, c
- ld [rHDMA5], a
+ ldh [rHDMA5], a
pop af
dec a
dec a
@@ -97,11 +97,11 @@ LoadBGMapAttributes::
call z, HandlePartyHPBarAttributes
.done
call Func_3082
- ld a, [rIF]
+ ldh a, [rIF]
res VBLANK, a
- ld [rIF], a
+ ldh [rIF], a
xor a
- ld [rVBK], a
+ ldh [rVBK], a
ei
ret
diff --git a/engine/black_out.asm b/engine/black_out.asm
deleted file mode 100644
index 0daa084b..00000000
--- a/engine/black_out.asm
+++ /dev/null
@@ -1,48 +0,0 @@
-ResetStatusAndHalveMoneyOnBlackout::
-; Reset player status on blackout.
- xor a
- ld [wd435], a
- xor a ; gamefreak copypasting functions (double xor a)
- ld [wBattleResult], a
- ld [wWalkBikeSurfState], a
- ld [wIsInBattle], a
- ld [wMapPalOffset], a
- ld [wNPCMovementScriptFunctionNum], a
- ld [hJoyHeld], a
- ld [wNPCMovementScriptPointerTableNum], a
- ld [wFlags_0xcd60], a
-
- ld [hMoney], a
- ld [hMoney + 1], a
- ld [hMoney + 2], a
- call HasEnoughMoney
- jr c, .lostmoney ; never happens
-
- ; Halve the player's money.
- ld a, [wPlayerMoney]
- ld [hMoney], a
- ld a, [wPlayerMoney + 1]
- ld [hMoney + 1], a
- ld a, [wPlayerMoney + 2]
- ld [hMoney + 2], a
- xor a
- ld [hDivideBCDDivisor], a
- ld [hDivideBCDDivisor + 1], a
- ld a, 2
- ld [hDivideBCDDivisor + 2], a
- predef DivideBCDPredef3
- ld a, [hDivideBCDQuotient]
- ld [wPlayerMoney], a
- ld a, [hDivideBCDQuotient + 1]
- ld [wPlayerMoney + 1], a
- ld a, [hDivideBCDQuotient + 2]
- ld [wPlayerMoney + 2], a
-
-.lostmoney
- ld hl, wd732
- set 2, [hl]
- res 3, [hl]
- set 6, [hl]
- ld a, %11111111
- ld [wJoyIgnore], a
- predef_jump HealParty
diff --git a/engine/cable_club.asm b/engine/cable_club.asm
deleted file mode 100755
index a8dc5d8d..00000000
--- a/engine/cable_club.asm
+++ /dev/null
@@ -1,984 +0,0 @@
-; performs the appropriate action when the player uses the gameboy on the table in the Colosseum or Trade Center
-; In the Colosseum, it starts a battle. In the Trade Center, it displays the trade selection screen.
-; Before doing either action, it swaps random numbers, trainer names and party data with the other gameboy.
-CableClub_DoBattleOrTrade:
- ld c, 80
- call DelayFrames
- call ClearScreen
- call UpdateSprites
- call LoadFontTilePatterns
- call LoadHpBarAndStatusTilePatterns
- call LoadTrainerInfoTextBoxTiles
- coord hl, 3, 8
- lb bc, 2, 12
- call CableClub_TextBoxBorder
- coord hl, 4, 10
- ld de, PleaseWaitString
- call PlaceString
- ld hl, wPlayerNumHits
- xor a
- ld [hli], a
- ld [hl], $50
- ; fall through
-
-; This is called after completing a trade.
-CableClub_DoBattleOrTradeAgain:
- ld hl, wSerialPlayerDataBlock
- ld a, SERIAL_PREAMBLE_BYTE
- ld b, 6
-.writePlayerDataBlockPreambleLoop
- ld [hli], a
- dec b
- jr nz, .writePlayerDataBlockPreambleLoop
- ld hl, wSerialRandomNumberListBlock
- ld a, SERIAL_PREAMBLE_BYTE
- ld b, 7
-.writeRandomNumberListPreambleLoop
- ld [hli], a
- dec b
- jr nz, .writeRandomNumberListPreambleLoop
- ld b, 10
-.generateRandomNumberListLoop
- call Random
- cp SERIAL_PREAMBLE_BYTE ; all the random numbers have to be less than the preamble byte
- jr nc, .generateRandomNumberListLoop
- ld [hli], a
- dec b
- jr nz, .generateRandomNumberListLoop
- ld hl, wSerialPartyMonsPatchList
- ld a, SERIAL_PREAMBLE_BYTE
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ld b, $c8
- xor a
-.zeroPlayerDataPatchListLoop
- ld [hli], a
- dec b
- jr nz, .zeroPlayerDataPatchListLoop
- ld hl, wGrassRate
- ld bc, wTrainerHeaderPtr - wGrassRate
-.zeroEnemyPartyLoop
- xor a
- ld [hli], a
- dec bc
- ld a, b
- or c
- jr nz, .zeroEnemyPartyLoop
- ld hl, wPartyMons - 1
- ld de, wSerialPartyMonsPatchList + 10
- ld bc, 0
-.patchPartyMonsLoop
- inc c
- ld a, c
- cp SERIAL_PREAMBLE_BYTE
- jr z, .startPatchListPart2
- ld a, b
- dec a ; are we in part 2 of the patch list?
- jr nz, .checkPlayerDataByte ; jump if in part 1
-; if we're in part 2
- ld a, c
- cp (wPartyMonOT - (wPartyMons - 1)) - (SERIAL_PREAMBLE_BYTE - 1)
- jr z, .finishedPatchingPlayerData
-.checkPlayerDataByte
- inc hl
- ld a, [hl]
- cp SERIAL_NO_DATA_BYTE
- jr nz, .patchPartyMonsLoop
-; if the player data byte matches SERIAL_NO_DATA_BYTE, patch it with $FF and record the offset in the patch list
- ld a, c
- ld [de], a
- inc de
- ld [hl], $ff
- jr .patchPartyMonsLoop
-.startPatchListPart2
- ld a, SERIAL_PATCH_LIST_PART_TERMINATOR
- ld [de], a ; end of part 1
- inc de
- lb bc, 1, 0
- jr .patchPartyMonsLoop
-.finishedPatchingPlayerData
- ld a, SERIAL_PATCH_LIST_PART_TERMINATOR
- ld [de], a ; end of part 2
- call Serial_SyncAndExchangeNybble
- ld a, [hSerialConnectionStatus]
- cp USING_INTERNAL_CLOCK
- jr nz, .skipSendingTwoZeroBytes
-; if using internal clock
-; send two zero bytes for syncing purposes?
- call Delay3
- xor a
- ld [hSerialSendData], a
- ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
- call DelayFrame
- xor a
- ld [hSerialSendData], a
- ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
-.skipSendingTwoZeroBytes
- call Delay3
- call StopAllMusic
- ld a, (1 << SERIAL)
- ld [rIE], a
- ld hl, wSerialRandomNumberListBlock
- ld de, wSerialOtherGameboyRandomNumberListBlock
- ld bc, $11
- call Serial_ExchangeBytes
- ld a, SERIAL_NO_DATA_BYTE
- ld [de], a
- ld hl, wSerialPlayerDataBlock
- ld de, wSerialEnemyDataBlock
- ld bc, $1a8
- call Serial_ExchangeBytes
- ld a, SERIAL_NO_DATA_BYTE
- ld [de], a
- ld hl, wSerialPartyMonsPatchList
- ld de, wSerialEnemyMonsPatchList
- ld bc, $c8
- call Serial_ExchangeBytes
- ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK)
- ld [rIE], a
- ld a, [hSerialConnectionStatus]
- cp USING_INTERNAL_CLOCK
- jr z, .skipCopyingRandomNumberList ; the list generated by the gameboy clocking the connection is used by both gameboys
- ld hl, wSerialOtherGameboyRandomNumberListBlock
-.findStartOfRandomNumberListLoop
- ld a, [hli]
- and a
- jr z, .findStartOfRandomNumberListLoop
- cp SERIAL_PREAMBLE_BYTE
- jr z, .findStartOfRandomNumberListLoop
- cp SERIAL_NO_DATA_BYTE
- jr z, .findStartOfRandomNumberListLoop
- dec hl
- ld de, wLinkBattleRandomNumberList
- ld c, 10
-.copyRandomNumberListLoop
- ld a, [hli]
- cp SERIAL_NO_DATA_BYTE
- jr z, .copyRandomNumberListLoop
- ld [de], a
- inc de
- dec c
- jr nz, .copyRandomNumberListLoop
-.skipCopyingRandomNumberList
- ld hl, wSerialEnemyDataBlock + 3
-.findStartOfEnemyNameLoop
- ld a, [hli]
- and a
- jr z, .findStartOfEnemyNameLoop
- cp SERIAL_PREAMBLE_BYTE
- jr z, .findStartOfEnemyNameLoop
- cp SERIAL_NO_DATA_BYTE
- jr z, .findStartOfEnemyNameLoop
- dec hl
- ld de, wLinkEnemyTrainerName
- ld c, NAME_LENGTH
-.copyEnemyNameLoop
- ld a, [hli]
- cp SERIAL_NO_DATA_BYTE
- jr z, .copyEnemyNameLoop
- ld [de], a
- inc de
- dec c
- jr nz, .copyEnemyNameLoop
- ld de, wEnemyPartyCount
- ld bc, wTrainerHeaderPtr - wEnemyPartyCount
-.copyEnemyPartyLoop
- ld a, [hli]
- cp SERIAL_NO_DATA_BYTE
- jr z, .copyEnemyPartyLoop
- ld [de], a
- inc de
- dec bc
- ld a, b
- or c
- jr nz, .copyEnemyPartyLoop
- ld de, wSerialPartyMonsPatchList
- ld hl, wPartyMons
- ld c, 2 ; patch list has 2 parts
-.unpatchPartyMonsLoop
- ld a, [de]
- inc de
- and a
- jr z, .unpatchPartyMonsLoop
- cp SERIAL_PREAMBLE_BYTE
- jr z, .unpatchPartyMonsLoop
- cp SERIAL_NO_DATA_BYTE
- jr z, .unpatchPartyMonsLoop
- cp SERIAL_PATCH_LIST_PART_TERMINATOR
- jr z, .finishedPartyMonsPatchListPart
- push hl
- push bc
- ld b, 0
- dec a
- ld c, a
- add hl, bc
- ld a, SERIAL_NO_DATA_BYTE
- ld [hl], a
- pop bc
- pop hl
- jr .unpatchPartyMonsLoop
-.finishedPartyMonsPatchListPart
- ld hl, wPartyMons + (SERIAL_PREAMBLE_BYTE - 1)
- dec c ; is there another part?
- jr nz, .unpatchPartyMonsLoop
- ld de, wSerialEnemyMonsPatchList
- ld hl, wEnemyMons
- ld c, 2 ; patch list has 2 parts
-.unpatchEnemyMonsLoop
- ld a, [de]
- inc de
- and a
- jr z, .unpatchEnemyMonsLoop
- cp SERIAL_PREAMBLE_BYTE
- jr z, .unpatchEnemyMonsLoop
- cp SERIAL_NO_DATA_BYTE
- jr z, .unpatchEnemyMonsLoop
- cp SERIAL_PATCH_LIST_PART_TERMINATOR
- jr z, .finishedEnemyMonsPatchListPart
- push hl
- push bc
- ld b, 0
- dec a
- ld c, a
- add hl, bc
- ld a, SERIAL_NO_DATA_BYTE
- ld [hl], a
- pop bc
- pop hl
- jr .unpatchEnemyMonsLoop
-.finishedEnemyMonsPatchListPart
- ld hl, wEnemyMons + (SERIAL_PREAMBLE_BYTE - 1)
- dec c
- jr nz, .unpatchEnemyMonsLoop
- ld a, wEnemyMonOT % $100
- ld [wUnusedCF8D], a
- ld a, wEnemyMonOT / $100
- ld [wUnusedCF8D + 1], a
- xor a
- ld [wTradeCenterPointerTableIndex], a
- call StopAllMusic
- ld a, [hSerialConnectionStatus]
- cp USING_INTERNAL_CLOCK
- ld c, 66
- call z, DelayFrames ; delay if using internal clock
- ld a, [wLinkState]
- cp LINK_STATE_START_BATTLE
- ld a, LINK_STATE_TRADING
- ld [wLinkState], a
- jr nz, .trading
- ld a, LINK_STATE_BATTLING
- ld [wLinkState], a
- ld a, OPP_SONY1
- ld [wCurOpponent], a
- call ClearScreen
- call Delay3
- ld b, $9
- call RunPaletteCommand
- ld hl, wOptions
- res 7, [hl]
- ld a, [wLetterPrintingDelayFlags]
- push af
- xor a
- ld [wLetterPrintingDelayFlags], a
- predef InitOpponent
- pop af
- ld [wLetterPrintingDelayFlags], a
- predef HealParty
- jp ReturnToCableClubRoom
-.trading
- ld c, BANK(Music_GameCorner)
- ld a, MUSIC_GAME_CORNER
- call PlayMusic
- jr CallCurrentTradeCenterFunction
-
-PleaseWaitString:
- db "PLEASE WAIT!@"
-
-CallCurrentTradeCenterFunction:
- ld hl, TradeCenterPointerTable
- ld b, 0
- ld a, [wTradeCenterPointerTableIndex]
- cp $ff
- jp z, DisplayTitleScreen
- add a
- ld c, a
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-TradeCenter_SelectMon:
- call ClearScreen
- call Delay3
- ld b, $9
- call RunPaletteCommand
- call LoadTrainerInfoTextBoxTiles
- call TradeCenter_DrawPartyLists
- call TradeCenter_DrawCancelBox
- xor a
- ld hl, wSerialSyncAndExchangeNybbleReceiveData
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ld [hl], a
- ld [wMenuWatchMovingOutOfBounds], a
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld [wMenuJoypadPollCount], a
- inc a
- ld [wSerialExchangeNybbleSendData], a
- jp .playerMonMenu
-.enemyMonMenu
- xor a
- ld [wMenuWatchMovingOutOfBounds], a
- inc a
- ld [wWhichTradeMonSelectionMenu], a
- ld a, D_DOWN | D_LEFT | A_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, [wEnemyPartyCount]
- ld [wMaxMenuItem], a
- ld a, 9
- ld [wTopMenuItemY], a
- ld a, 1
- ld [wTopMenuItemX], a
-.enemyMonMenu_HandleInput
- ld hl, hFlags_0xFFFA
- set 1, [hl]
- call HandleMenuInput
- ld hl, hFlags_0xFFFA
- res 1, [hl]
- and a
- jp z, .getNewInput
- bit 0, a ; A button pressed?
- jr z, .enemyMonMenu_ANotPressed
-; if A button pressed
- ld a, [wMaxMenuItem]
- ld c, a
- ld a, [wCurrentMenuItem]
- cp c
- jr c, .displayEnemyMonStats
- ld a, [wMaxMenuItem]
- dec a
- ld [wCurrentMenuItem], a
-.displayEnemyMonStats
- ld a, INIT_ENEMYOT_LIST
- ld [wInitListType], a
- callab InitList ; the list isn't used
- ld hl, wEnemyMons
- call TradeCenter_DisplayStats
- jp .getNewInput
-.enemyMonMenu_ANotPressed
- bit 5, a ; Left pressed?
- jr z, .enemyMonMenu_LeftNotPressed
-; if Left pressed, switch back to the player mon menu
- xor a ; player mon menu
- ld [wWhichTradeMonSelectionMenu], a
- ld a, [wMenuCursorLocation]
- ld l, a
- ld a, [wMenuCursorLocation + 1]
- ld h, a
- ld a, [wTileBehindCursor]
- ld [hl], a
- ld a, [wCurrentMenuItem]
- ld b, a
- ld a, [wPartyCount]
- dec a
- cp b
- jr nc, .playerMonMenu
- ld [wCurrentMenuItem], a
- jr .playerMonMenu
-.enemyMonMenu_LeftNotPressed
- bit 7, a ; Down pressed?
- jp z, .getNewInput
- jp .selectedCancelMenuItem ; jump if Down pressed
-.playerMonMenu
- xor a ; player mon menu
- ld [wWhichTradeMonSelectionMenu], a
- ld [wMenuWatchMovingOutOfBounds], a
- ld a, D_DOWN | D_RIGHT | A_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, [wPartyCount]
- ld [wMaxMenuItem], a
- ld a, 1
- ld [wTopMenuItemY], a
- ld a, 1
- ld [wTopMenuItemX], a
- coord hl, 1, 1
- lb bc, 6, 1
- call ClearScreenArea
-.playerMonMenu_HandleInput
- ld hl, hFlags_0xFFFA
- set 1, [hl]
- call HandleMenuInput
- ld hl, hFlags_0xFFFA
- res 1, [hl]
- and a ; was anything pressed?
- jr nz, .playerMonMenu_SomethingPressed
- jp .getNewInput
-.playerMonMenu_SomethingPressed
- bit 0, a ; A button pressed?
- jr z, .playerMonMenu_ANotPressed
- jp .chosePlayerMon ; jump if A button pressed
-; unreachable code
- ld a, INIT_PLAYEROT_LIST
- ld [wInitListType], a
- callab InitList ; the list isn't used
- call TradeCenter_DisplayStats
- jp .getNewInput
-.playerMonMenu_ANotPressed
- bit 4, a ; Right pressed?
- jr z, .playerMonMenu_RightNotPressed
-; if Right pressed, switch to the enemy mon menu
- ld a, $1 ; enemy mon menu
- ld [wWhichTradeMonSelectionMenu], a
- ld a, [wMenuCursorLocation]
- ld l, a
- ld a, [wMenuCursorLocation + 1]
- ld h, a
- ld a, [wTileBehindCursor]
- ld [hl], a
- ld a, [wCurrentMenuItem]
- ld b, a
- ld a, [wEnemyPartyCount]
- dec a
- cp b
- jr nc, .notPastLastEnemyMon
-; when switching to the enemy mon menu, if the menu selection would be past the last enemy mon, select the last enemy mon
- ld [wCurrentMenuItem], a
-.notPastLastEnemyMon
- jp .enemyMonMenu
-.playerMonMenu_RightNotPressed
- bit 7, a ; Down pressed?
- jr z, .getNewInput
- jp .selectedCancelMenuItem ; jump if Down pressed
-.getNewInput
- ld a, [wWhichTradeMonSelectionMenu]
- and a
- jp z, .playerMonMenu_HandleInput
- jp .enemyMonMenu_HandleInput
-.chosePlayerMon
- call SaveScreenTilesToBuffer1
- call PlaceUnfilledArrowMenuCursor
- ld a, [wMaxMenuItem]
- ld c, a
- ld a, [wCurrentMenuItem]
- cp c
- jr c, .displayStatsTradeMenu
- ld a, [wMaxMenuItem]
- dec a
-.displayStatsTradeMenu
- push af
- coord hl, 0, 14
- lb bc, 2, 18
- call CableClub_TextBoxBorder
- coord hl, 2, 16
- ld de, .statsTrade
- call PlaceString
- xor a
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld [wMenuJoypadPollCount], a
- ld [wMaxMenuItem], a
- ld a, 16
- ld [wTopMenuItemY], a
-.selectStatsMenuItem
- ld a, " "
- Coorda 11, 16
- ld a, D_RIGHT | B_BUTTON | A_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, 1
- ld [wTopMenuItemX], a
- call HandleMenuInput
- bit 4, a ; Right pressed?
- jr nz, .selectTradeMenuItem
- bit 1, a ; B button pressed?
- jr z, .displayPlayerMonStats
-.cancelPlayerMonChoice
- pop af
- ld [wCurrentMenuItem], a
- call LoadScreenTilesFromBuffer1
- jp .playerMonMenu
-.selectTradeMenuItem
- ld a, " "
- Coorda 1, 16
- ld a, D_LEFT | B_BUTTON | A_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, 11
- ld [wTopMenuItemX], a
- call HandleMenuInput
- bit 5, a ; Left pressed?
- jr nz, .selectStatsMenuItem
- bit 1, a ; B button pressed?
- jr nz, .cancelPlayerMonChoice
- jr .choseTrade
-.displayPlayerMonStats
- pop af
- ld [wCurrentMenuItem], a
- ld a, INIT_PLAYEROT_LIST
- ld [wInitListType], a
- callab InitList ; the list isn't used
- call TradeCenter_DisplayStats
- call LoadScreenTilesFromBuffer1
- jp .playerMonMenu
-.choseTrade
- call PlaceUnfilledArrowMenuCursor
- pop af
- ld [wCurrentMenuItem], a
- ld [wTradingWhichPlayerMon], a
- ld [wSerialExchangeNybbleSendData], a
- call Serial_PrintWaitingTextAndSyncAndExchangeNybble
- ld a, [wSerialSyncAndExchangeNybbleReceiveData]
- cp $f
- jp z, CallCurrentTradeCenterFunction ; go back to the beginning of the trade selection menu if the other person cancelled
- ld [wTradingWhichEnemyMon], a
- call TradeCenter_PlaceSelectedEnemyMonMenuCursor
- ld a, $1 ; TradeCenter_Trade
- ld [wTradeCenterPointerTableIndex], a
- jp CallCurrentTradeCenterFunction
-.statsTrade
- db "STATS TRADE@"
-.selectedCancelMenuItem
- ld a, [wCurrentMenuItem]
- ld b, a
- ld a, [wMaxMenuItem]
- cp b
- jp nz, .getNewInput
- ld a, [wMenuCursorLocation]
- ld l, a
- ld a, [wMenuCursorLocation + 1]
- ld h, a
- ld a, " "
- ld [hl], a
-.cancelMenuItem_Loop
- ld a, "▶" ; filled arrow cursor
- Coorda 1, 16
-.cancelMenuItem_JoypadLoop
- call JoypadLowSensitivity
- ld a, [hJoy5]
- and a ; pressed anything?
- jr z, .cancelMenuItem_JoypadLoop
- bit 0, a ; A button pressed?
- jr nz, .cancelMenuItem_APressed
- bit 6, a ; Up pressed?
- jr z, .cancelMenuItem_JoypadLoop
-; if Up pressed
- ld a, " "
- Coorda 1, 16
- ld a, [wPartyCount]
- dec a
- ld [wCurrentMenuItem], a
- jp .playerMonMenu
-.cancelMenuItem_APressed
- ld a, "▷" ; unfilled arrow cursor
- Coorda 1, 16
- ld a, $f
- ld [wSerialExchangeNybbleSendData], a
- call Serial_PrintWaitingTextAndSyncAndExchangeNybble
- ld a, [wSerialSyncAndExchangeNybbleReceiveData]
- cp $f ; did the other person choose Cancel too?
- jr nz, .cancelMenuItem_Loop
- ; fall through
-
-ReturnToCableClubRoom:
- call GBPalWhiteOutWithDelay3
- ld hl, wFontLoaded
- ld a, [hl]
- push af
- push hl
- res 0, [hl]
- xor a
- ld [wd72d], a
- dec a
- ld [wDestinationWarpID], a
- call LoadMapData
- callba ClearVariablesOnEnterMap
- pop hl
- pop af
- ld [hl], a
- call GBFadeInFromWhite
- ret
-
-TradeCenter_DrawCancelBox:
- coord hl, 11, 15
- ld a, $7e
- ld bc, 2 * SCREEN_WIDTH + 9
- call FillMemory
- coord hl, 0, 15
- lb bc, 1, 9
- call CableClub_TextBoxBorder
- coord hl, 2, 16
- ld de, CancelTextString
- jp PlaceString
-
-CancelTextString:
- db "CANCEL@"
-
-TradeCenter_PlaceSelectedEnemyMonMenuCursor:
- ld a, [wSerialSyncAndExchangeNybbleReceiveData]
- coord hl, 1, 9
- ld bc, SCREEN_WIDTH
- call AddNTimes
- ld [hl], "▷" ; cursor
- ret
-
-TradeCenter_DisplayStats:
- ld a, [wCurrentMenuItem]
- ld [wWhichPokemon], a
- predef StatusScreen
- predef StatusScreen2
- call Delay3
- ld b, $9
- call RunPaletteCommand
- call GBPalNormal
- call LoadTrainerInfoTextBoxTiles
- call TradeCenter_DrawPartyLists
- jp TradeCenter_DrawCancelBox
-
-TradeCenter_DrawPartyLists:
- coord hl, 0, 0
- lb bc, 6, 18
- call CableClub_TextBoxBorder
- coord hl, 0, 8
- lb bc, 6, 18
- call CableClub_TextBoxBorder
- coord hl, 5, 0
- ld de, wPlayerName
- call PlaceString
- coord hl, 5, 8
- ld de, wLinkEnemyTrainerName
- call PlaceString
- coord hl, 2, 1
- ld de, wPartySpecies
- call TradeCenter_PrintPartyListNames
- coord hl, 2, 9
- ld de, wEnemyPartyMons
- ; fall through
-
-TradeCenter_PrintPartyListNames:
- ld c, $0
-.loop
- ld a, [de]
- cp $ff
- ret z
- ld [wd11e], a
- push bc
- push hl
- push de
- push hl
- ld a, c
- ld [$ff95], a
- call GetMonName
- pop hl
- call PlaceString
- pop de
- inc de
- pop hl
- ld bc, 20
- add hl, bc
- pop bc
- inc c
- jr .loop
-
-TradeCenter_Trade:
- ld c, 100
- call DelayFrames
- xor a
- ld [wSerialExchangeNybbleSendData + 1], a ; unnecessary
- ld [wSerialExchangeNybbleReceiveData], a
- ld [wMenuWatchMovingOutOfBounds], a
- ld [wMenuJoypadPollCount], a
- coord hl, 0, 12
- lb bc, 4, 18
- call CableClub_TextBoxBorder
- ld a, [wTradingWhichPlayerMon]
- ld hl, wPartySpecies
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [hl]
- ld [wd11e], a
- call GetMonName
- ld hl, wcd6d
- ld de, wNameOfPlayerMonToBeTraded
- ld bc, NAME_LENGTH
- call CopyData
- ld a, [wTradingWhichEnemyMon]
- ld hl, wEnemyPartyMons
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [hl]
- ld [wd11e], a
- call GetMonName
- ld hl, WillBeTradedText
- coord bc, 1, 14
- call TextCommandProcessor
- call SaveScreenTilesToBuffer1
- coord hl, 10, 7
- lb bc, 8, 11
- ld a, TRADE_CANCEL_MENU
- ld [wTwoOptionMenuID], a
- ld a, TWO_OPTION_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID
- call LoadScreenTilesFromBuffer1
- ld a, [wCurrentMenuItem]
- and a
- jr z, .tradeConfirmed
-; if trade cancelled
- ld a, $1
- ld [wSerialExchangeNybbleSendData], a
- coord hl, 0, 12
- lb bc, 4, 18
- call CableClub_TextBoxBorder
- coord hl, 1, 14
- ld de, TradeCanceled
- call PlaceString
- call Serial_PrintWaitingTextAndSyncAndExchangeNybble
- jp .tradeCancelled
-.tradeConfirmed
- ld a, $2
- ld [wSerialExchangeNybbleSendData], a
- call Serial_PrintWaitingTextAndSyncAndExchangeNybble
- ld a, [wSerialSyncAndExchangeNybbleReceiveData]
- dec a ; did the other person cancel?
- jr nz, .doTrade
-; if the other person cancelled
- coord hl, 0, 12
- lb bc, 4, 18
- call CableClub_TextBoxBorder
- coord hl, 1, 14
- ld de, TradeCanceled
- call PlaceString
- jp .tradeCancelled
-.doTrade
- ld a, [wTradingWhichPlayerMon]
- ld hl, wPartyMonOT
- call SkipFixedLengthTextEntries
- ld de, wTradedPlayerMonOT
- ld bc, NAME_LENGTH
- call CopyData
- ld hl, wPartyMon1Species
- ld a, [wTradingWhichPlayerMon]
- ld bc, wPartyMon2 - wPartyMon1
- call AddNTimes
- ld bc, wPartyMon1OTID - wPartyMon1
- add hl, bc
- ld a, [hli]
- ld [wTradedPlayerMonOTID], a
- ld a, [hl]
- ld [wTradedPlayerMonOTID + 1], a
- ld a, [wTradingWhichEnemyMon]
- ld hl, wEnemyMonOT
- call SkipFixedLengthTextEntries
- ld de, wTradedEnemyMonOT
- ld bc, NAME_LENGTH
- call CopyData
- ld hl, wEnemyMons
- ld a, [wTradingWhichEnemyMon]
- ld bc, wEnemyMon2 - wEnemyMon1
- call AddNTimes
- ld bc, wEnemyMon1OTID - wEnemyMon1
- add hl, bc
- ld a, [hli]
- ld [wTradedEnemyMonOTID], a
- ld a, [hl]
- ld [wTradedEnemyMonOTID + 1], a
- ld a, [wTradingWhichPlayerMon]
- ld [wWhichPokemon], a
- ld hl, wPartySpecies
- ld b, 0
- ld c, a
- add hl, bc
- ld a, [hl]
- ld [wTradedPlayerMonSpecies], a
- callabd_ModifyPikachuHappiness PIKAHAPPY_TRADE
- xor a
- ld [wRemoveMonFromBox], a
- call RemovePokemon
- ld a, [wTradingWhichEnemyMon]
- ld c, a
- ld [wWhichPokemon], a
- ld hl, wEnemyPartyMons
- ld d, 0
- ld e, a
- add hl, de
- ld a, [hl]
- ld [wcf91], a
- ld hl, wEnemyMons
- ld a, c
- ld bc, wEnemyMon2 - wEnemyMon1
- call AddNTimes
- ld de, wLoadedMon
- ld bc, wEnemyMon2 - wEnemyMon1
- call CopyData
- call AddEnemyMonToPlayerParty
- ld a, [wPartyCount]
- dec a
- ld [wWhichPokemon], a
- ld a, $1
- ld [wForceEvolution], a
- ld a, [wTradingWhichEnemyMon]
- ld hl, wEnemyPartyMons
- ld b, 0
- ld c, a
- add hl, bc
- ld a, [hl]
- ld [wTradedEnemyMonSpecies], a
- ld a, 10
- ld [wAudioFadeOutControl], a
- ld a, BANK(Music_SafariZone)
- ld [wAudioSavedROMBank], a
- ld a, MUSIC_SAFARI_ZONE
- ld [wNewSoundID], a
- call PlaySound
- ld c, 100
- call DelayFrames
- call ClearScreen
- call LoadHpBarAndStatusTilePatterns
- xor a
- ld [wUnusedCC5B], a
- ld a, [hSerialConnectionStatus]
- cp USING_EXTERNAL_CLOCK
- jr z, .usingExternalClock
- predef InternalClockTradeAnim
- jr .tradeCompleted
-.usingExternalClock
- predef ExternalClockTradeAnim
-.tradeCompleted
- callab TryEvolvingMon
- call ClearScreen
- call LoadTrainerInfoTextBoxTiles
- call Serial_PrintWaitingTextAndSyncAndExchangeNybble
- ld c, 40
- call DelayFrames
- call Delay3
- ld b, $9
- call RunPaletteCommand
- coord hl, 0, 12
- lb bc, 4, 18
- call CableClub_TextBoxBorder
- coord hl, 1, 14
- ld de, TradeCompleted
- call PlaceString
- predef SaveSAVtoSRAM2
- ld c, 50
- call DelayFrames
- xor a
- ld [wTradeCenterPointerTableIndex], a
- jp CableClub_DoBattleOrTradeAgain
-.tradeCancelled
- ld c, 100
- call DelayFrames
- xor a ; TradeCenter_SelectMon
- ld [wTradeCenterPointerTableIndex], a
- jp CallCurrentTradeCenterFunction
-
-WillBeTradedText:
- TX_FAR _WillBeTradedText
- db "@"
-
-TradeCompleted:
- db "Trade completed!@"
-
-TradeCanceled:
- db "Too bad! The trade"
- next "was canceled!@"
-
-TradeCenterPointerTable:
- dw TradeCenter_SelectMon
- dw TradeCenter_Trade
-
-CableClub_Run:
- ld a, [wLinkState]
- cp LINK_STATE_START_TRADE
- jr z, .doBattleOrTrade
- cp LINK_STATE_START_BATTLE
- jr z, .doBattleOrTrade
- cp LINK_STATE_RESET ; this is never used
- ret nz
- predef EmptyFunc3
- jp Init
-.doBattleOrTrade
- call CableClub_DoBattleOrTrade
- ld hl, Club_GFX
- ld a, h
- ld [wTilesetGfxPtr + 1], a
- ld a, l
- ld [wTilesetGfxPtr], a
- ld a, Bank(Club_GFX)
- ld [wTilesetBank], a
- ld hl, Club_Coll
- ld a, h
- ld [wTilesetCollisionPtr + 1], a
- ld a, l
- ld [wTilesetCollisionPtr], a
- xor a
- ld [wGrassRate], a
- inc a ; LINK_STATE_IN_CABLE_CLUB
- ld [wLinkState], a
- ld [hJoy5], a
- ld a, 10
- ld [wAudioFadeOutControl], a
- ld a, BANK(Music_Celadon)
- ld [wAudioSavedROMBank], a
- ld a, MUSIC_CELADON
- ld [wNewSoundID], a
- jp PlaySound
-
-EmptyFunc3:
- ret
-
-Diploma_TextBoxBorder:
- call GetPredefRegisters
-
-; b = height
-; c = width
-CableClub_TextBoxBorder:
- push hl
- ld a, $78 ; border upper left corner tile
- ld [hli], a
- inc a ; border top horizontal line tile
- call CableClub_DrawHorizontalLine
- inc a ; border upper right corner tile
- ld [hl], a
- pop hl
- ld de, 20
- add hl, de
-.loop
- push hl
- ld a, $7b ; border left vertical line tile
- ld [hli], a
- ld a, " "
- call CableClub_DrawHorizontalLine
- ld [hl], $77 ; border right vertical line tile
- pop hl
- ld de, 20
- add hl, de
- dec b
- jr nz, .loop
- ld a, $7c ; border lower left corner tile
- ld [hli], a
- ld a, $76 ; border bottom horizontal line tile
- call CableClub_DrawHorizontalLine
- ld [hl], $7d ; border lower right corner tile
- ret
-
-; c = width
-CableClub_DrawHorizontalLine:
- ld d, c
-.loop
- ld [hli], a
- dec d
- jr nz, .loop
- ret
-
-LoadTrainerInfoTextBoxTiles:
- ld de, TrainerInfoTextBoxTileGraphics
- ld hl, vChars2 + $760
- lb bc, BANK(TrainerInfoTextBoxTileGraphics), (TrainerInfoTextBoxTileGraphicsEnd - TrainerInfoTextBoxTileGraphics) / $10
- jp CopyVideoData
diff --git a/engine/clear_save.asm b/engine/clear_save.asm
deleted file mode 100755
index f2acbf32..00000000
--- a/engine/clear_save.asm
+++ /dev/null
@@ -1,27 +0,0 @@
-DoClearSaveDialogue:
- call ClearScreen
- call RunDefaultPaletteCommand
- call LoadFontTilePatterns
- call LoadTextBoxTilePatterns
- ld hl, ClearSaveDataText
- call PrintText
- ld a, B_BUTTON
- ld [wJoyIgnore], a
- coord hl, 14, 7
- lb bc, 8, 15
- ld a, NO_YES_MENU
- ld [wTwoOptionMenuID], a
- ld a, TWO_OPTION_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID
- ld a, 0
- ld [wJoyIgnore], a
- ld a, [wCurrentMenuItem]
- and a
- jp z, Init
- callba ClearSAV
- jp Init
-
-ClearSaveDataText:
- TX_FAR _ClearSaveDataText
- db "@"
diff --git a/engine/debug/debug_menu.asm b/engine/debug/debug_menu.asm
new file mode 100644
index 00000000..a85c9c64
--- /dev/null
+++ b/engine/debug/debug_menu.asm
@@ -0,0 +1,46 @@
+DebugMenu:
+ ret
+
+TestBattle:
+.loop
+ call GBPalNormal
+
+ ; Don't mess around
+ ; with obedience.
+ ld a, 1 << BIT_EARTHBADGE
+ ld [wObtainedBadges], a
+
+ ld hl, wFlags_D733
+ set BIT_TEST_BATTLE, [hl]
+
+ ; Reset the party.
+ ld hl, wPartyCount
+ xor a
+ ld [hli], a
+ dec a
+ ld [hl], a
+
+ ; Give the player a
+ ; level 20 Rhydon.
+ ld a, RHYDON
+ ld [wcf91], a
+ ld a, 20
+ ld [wCurEnemyLVL], a
+ xor a
+ ld [wMonDataLocation], a
+ ld [wCurMap], a
+ call AddPartyMon
+
+ ; Fight against a
+ ; level 20 Rhydon.
+ ld a, RHYDON
+ ld [wCurOpponent], a
+
+ predef InitOpponent
+
+ ; When the battle ends,
+ ; do it all again.
+ ld a, 1
+ ld [wUpdateSpritesEnabled], a
+ ldh [hAutoBGTransferEnabled], a
+ jr .loop
diff --git a/engine/debug/debug_party.asm b/engine/debug/debug_party.asm
new file mode 100644
index 00000000..8545b848
--- /dev/null
+++ b/engine/debug/debug_party.asm
@@ -0,0 +1,24 @@
+; not IshiharaTeam
+SetDebugTeam:
+ ld de, DebugTeam
+.loop
+ ld a, [de]
+ cp -1
+ ret z
+ ld [wcf91], a
+ inc de
+ ld a, [de]
+ ld [wCurEnemyLVL], a
+ inc de
+ call AddPartyMon
+ jr .loop
+
+DebugTeam:
+ db SNORLAX, 80
+ db PERSIAN, 80
+ db JIGGLYPUFF, 15
+ db PIKACHU, 5
+ db -1 ; end
+
+DebugStart:
+ ret
diff --git a/engine/debug1.asm b/engine/debug1.asm
deleted file mode 100644
index a39e8cac..00000000
--- a/engine/debug1.asm
+++ /dev/null
@@ -1,24 +0,0 @@
-; not IshiharaTeam
-SetDebugTeam:
- ld de, DebugTeam
-.loop
- ld a, [de]
- cp $ff
- ret z
- ld [wcf91], a
- inc de
- ld a, [de]
- ld [wCurEnemyLVL], a
- inc de
- call AddPartyMon
- jr .loop
-
-DebugTeam:
- db SNORLAX,80
- db PERSIAN,80
- db JIGGLYPUFF,15
- db PIKACHU,5
- db $FF
-
-EmptyFunc:
- ret
diff --git a/engine/diploma_3a.asm b/engine/diploma_3a.asm
index f4504ad7..83a7345b 100755
--- a/engine/diploma_3a.asm
+++ b/engine/diploma_3a.asm
@@ -1,3 +1,5 @@
+CIRCLE_TILE_ID EQU $10
+
_DisplayDiploma:
call GBPalWhiteOutWithDelay3
call ClearScreen
@@ -6,51 +8,51 @@ _DisplayDiploma:
lb bc, BANK(SurfingPikachu3Graphics), (SurfingPikachu3GraphicsEnd - SurfingPikachu3Graphics) / $10
call CopyVideoData
- coord hl, 0, 0
+ hlcoord 0, 0
call Func_e9bdf
- coord hl, 0, 0
+ hlcoord 0, 0
call Func_e9beb
- coord hl, 19, 0
+ hlcoord 19, 0
call Func_e9beb
ld a, $00
- coord hl, 0, 0
+ hlcoord 0, 0
ld [hl], a
- coord hl, 19, 0
+ hlcoord 19, 0
ld [hl], a
ld de, String_e9a73
- coord hl, 5, 2
+ hlcoord 5, 2
call PlaceString
ld de, String_e9a7d
- coord hl, 3, 4
+ hlcoord 3, 4
call PlaceString
ld de, wPlayerName
- coord hl, 10, 4
+ hlcoord 10, 4
call PlaceString
ld de, String_e9a84
- coord hl, 2, 6
+ hlcoord 2, 6
call PlaceString
ld de, String_e9ac8
- coord hl, 9, 16
+ hlcoord 9, 16
call PlaceString
ld b, SET_PAL_GENERIC
call RunPaletteCommand
ld a, $01
- ld [$ffba], a
+ ldh [hAutoBGTransferEnabled], a
call Delay3
call GBPalNormal
ret
String_e9a73:
- db $10, "Diploma", $10, "@"
+ db CIRCLE_TILE_ID, "Diploma", CIRCLE_TILE_ID, "@"
String_e9a7d:
db "Player@"
@@ -67,29 +69,29 @@ String_e9ac8:
Func_e9ad3:
call ClearScreen
- coord hl, 0, 17
+ hlcoord 0, 17
call Func_e9bdf
- coord hl, 0, 0
+ hlcoord 0, 0
call Func_e9beb
- coord hl, 19, 0
+ hlcoord 19, 0
call Func_e9beb
ld a, $00
- coord hl, 0, 17
+ hlcoord 0, 17
ld [hl], a
- coord hl, 19, 17
+ hlcoord 19, 17
ld [hl], a
ld de, Tilemap_e9b3e
- coord hl, 6, 2
+ hlcoord 6, 2
lb bc, 10, 12
call Diploma_Surfing_CopyBox
ld de, Tilemap_e9bb6
- coord hl, 5, 13
+ hlcoord 5, 13
lb bc, 1, 11
call Diploma_Surfing_CopyBox
ld de, String_e9bd5
- coord hl, 2, 15
+ hlcoord 2, 15
call PlaceString
- coord hl, 12, 15
+ hlcoord 12, 15
ld de, wPlayTimeHours
lb bc, $40 | 1, 3
call PrintNumber
@@ -102,7 +104,7 @@ Func_e9ad3:
cp 151
ret nz
ld de, TileMap_e9bc1
- coord hl, 2, 0
+ hlcoord 2, 0
lb bc, 4, 5
call Diploma_Surfing_CopyBox
ret
diff --git a/engine/display_pokedex.asm b/engine/display_pokedex.asm
deleted file mode 100644
index 96a2dd6c..00000000
--- a/engine/display_pokedex.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-_DisplayPokedex:
- ld hl, wd730
- set 6, [hl]
- predef ShowPokedexData
- ld hl, wd730
- res 6, [hl]
- call ReloadMapData
- ld c, 10
- call DelayFrames
- predef IndexToPokedex
- ld a, [wd11e]
- dec a
- ld c, a
- ld b, FLAG_SET
- ld hl, wPokedexSeen
- predef FlagActionPredef
- ld a, $1
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ret
diff --git a/engine/display_text_id_init.asm b/engine/display_text_id_init.asm
deleted file mode 100644
index 0ef37370..00000000
--- a/engine/display_text_id_init.asm
+++ /dev/null
@@ -1,75 +0,0 @@
-; function that performs initialization for DisplayTextID
-DisplayTextIDInit:
- xor a
- ld [wListMenuID], a
- ld a, [wAutoTextBoxDrawingControl]
- bit 0, a
- jr nz, .skipDrawingTextBoxBorder
- ld a, [hSpriteIndexOrTextID] ; text ID (or sprite ID)
- and a
- jr nz, .notStartMenu
-; if text ID is 0 (i.e. the start menu)
-; Note that the start menu text border is also drawn in the function directly
-; below this, so this seems unnecessary.
- CheckEvent EVENT_GOT_POKEDEX
-; start menu with pokedex
- coord hl, 10, 0
- lb bc, 14, 8
- jr nz, .drawTextBoxBorder
-; start menu without pokedex
- coord hl, 10, 0
- lb bc, 12, 8
- jr .drawTextBoxBorder
-; if text ID is not 0 (i.e. not the start menu) then do a standard dialogue text box
-.notStartMenu
- coord hl, 0, 12
- lb bc, 4, 18
-.drawTextBoxBorder
- call TextBoxBorder
-.skipDrawingTextBoxBorder
- ld hl, wFontLoaded
- set 0, [hl]
- ld hl, wFlags_0xcd60
- bit 4, [hl]
- res 4, [hl]
- jr nz, .skipMovingSprites
- call UpdateSprites
-.skipMovingSprites
-; loop to copy C1X9 (direction the sprite is facing) to C2X9 for each sprite
-; this is done because when you talk to an NPC, they turn to look your way
-; the original direction they were facing must be restored after the dialogue is over
- ld hl, wSpriteStateData1 + $19
- ld c, $0f
- ld de, $0010
-.spriteFacingDirectionCopyLoop
- ld a, [hl]
- inc h
- ld [hl], a
- dec h
- add hl, de
- dec c
- jr nz, .spriteFacingDirectionCopyLoop
-; loop to force all the sprites in the middle of animation to stand still
-; (so that they don't like they're frozen mid-step during the dialogue)
- ld hl, wSpriteStateData1 + 2
- ld de, $0010
- ld c, e
-.spriteStandStillLoop
- ld a, [hl]
- cp $ff ; is the sprite visible?
- jr z, .nextSprite
-; if it is visible
- and $fc
- ld [hl], a
-.nextSprite
- add hl, de
- dec c
- jr nz, .spriteStandStillLoop
- ld b, $9c ; window background address
- call CopyScreenTileBufferToVRAM ; transfer background in WRAM to VRAM
- xor a
- ld [hWY], a ; put the window on the screen
- call LoadFontTilePatterns
- ld a, $01
- ld [H_AUTOBGTRANSFERENABLED], a ; enable continuous WRAM to VRAM transfer each V-blank
- ret
diff --git a/engine/events/black_out.asm b/engine/events/black_out.asm
new file mode 100644
index 00000000..6d3d91b8
--- /dev/null
+++ b/engine/events/black_out.asm
@@ -0,0 +1,48 @@
+ResetStatusAndHalveMoneyOnBlackout::
+; Reset player status on blackout.
+ xor a
+ ld [wd435], a
+ xor a ; gamefreak copypasting functions (double xor a)
+ ld [wBattleResult], a
+ ld [wWalkBikeSurfState], a
+ ld [wIsInBattle], a
+ ld [wMapPalOffset], a
+ ld [wNPCMovementScriptFunctionNum], a
+ ldh [hJoyHeld], a
+ ld [wNPCMovementScriptPointerTableNum], a
+ ld [wFlags_0xcd60], a
+
+ ldh [hMoney], a
+ ldh [hMoney + 1], a
+ ldh [hMoney + 2], a
+ call HasEnoughMoney
+ jr c, .lostmoney ; never happens
+
+ ; Halve the player's money.
+ ld a, [wPlayerMoney]
+ ldh [hMoney], a
+ ld a, [wPlayerMoney + 1]
+ ldh [hMoney + 1], a
+ ld a, [wPlayerMoney + 2]
+ ldh [hMoney + 2], a
+ xor a
+ ldh [hDivideBCDDivisor], a
+ ldh [hDivideBCDDivisor + 1], a
+ ld a, 2
+ ldh [hDivideBCDDivisor + 2], a
+ predef DivideBCDPredef3
+ ldh a, [hDivideBCDQuotient]
+ ld [wPlayerMoney], a
+ ldh a, [hDivideBCDQuotient + 1]
+ ld [wPlayerMoney + 1], a
+ ldh a, [hDivideBCDQuotient + 2]
+ ld [wPlayerMoney + 2], a
+
+.lostmoney
+ ld hl, wd732
+ set 2, [hl]
+ res 3, [hl]
+ set 6, [hl]
+ ld a, %11111111
+ ld [wJoyIgnore], a
+ predef_jump HealParty
diff --git a/engine/events/card_key.asm b/engine/events/card_key.asm
new file mode 100755
index 00000000..de5f402e
--- /dev/null
+++ b/engine/events/card_key.asm
@@ -0,0 +1,102 @@
+PrintCardKeyText:
+ ld hl, SilphCoMapList
+ ld a, [wCurMap]
+ ld b, a
+.silphCoMapListLoop
+ ld a, [hli]
+ cp -1
+ ret z
+ cp b
+ jr nz, .silphCoMapListLoop
+; does not check for tile in front of player. This might be buggy
+ ;predef GetTileAndCoordsInFrontOfPlayer
+ ld a, [wTileInFrontOfPlayer]
+ cp $18
+ jr z, .cardKeyDoorInFrontOfPlayer
+ cp $24
+ jr z, .cardKeyDoorInFrontOfPlayer
+ ld b, a
+ ld a, [wCurMap]
+ cp SILPH_CO_11F
+ ret nz
+ ld a, b
+ cp $5e
+ ret nz
+.cardKeyDoorInFrontOfPlayer
+ ld b, CARD_KEY
+ call IsItemInBag
+ jr z, .noCardKey
+ xor a
+ ld [wPlayerMovingDirection], a
+ tx_pre_id CardKeySuccessText
+ ldh [hSpriteIndexOrTextID], a
+ call PrintPredefTextID
+ call GetCoordsInFrontOfPlayer
+ srl d
+ ld a, d
+ ld b, a
+ ld [wCardKeyDoorY], a
+ srl e
+ ld a, e
+ ld c, a
+ ld [wCardKeyDoorX], a
+ ld a, [wCurMap]
+ cp SILPH_CO_11F
+ jr nz, .notSilphCo11F
+ ld a, $3
+ jr .replaceCardKeyDoorTileBlock
+.notSilphCo11F
+ ld a, $e
+.replaceCardKeyDoorTileBlock
+ ld [wNewTileBlockID], a
+ predef ReplaceTileBlock
+ ld hl, wCurrentMapScriptFlags
+ set 5, [hl]
+ ld a, SFX_GO_INSIDE
+ jp PlaySound
+.noCardKey
+ tx_pre_id CardKeyFailText
+ ldh [hSpriteIndexOrTextID], a
+ jp PrintPredefTextID
+
+INCLUDE "data/events/card_key_maps.asm"
+
+CardKeySuccessText::
+ text_far _CardKeySuccessText1
+ sound_get_item_1
+ text_far _CardKeySuccessText2
+ text_end
+
+CardKeyFailText::
+ text_far _CardKeyFailText
+ text_end
+
+; d = Y
+; e = X
+GetCoordsInFrontOfPlayer:
+ ld a, [wYCoord]
+ ld d, a
+ ld a, [wXCoord]
+ ld e, a
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ and a
+ jr nz, .notFacingDown
+; facing down
+ inc d
+ ret
+.notFacingDown
+ cp SPRITE_FACING_UP
+ jr nz, .notFacingUp
+; facing up
+ dec d
+ ret
+.notFacingUp
+ cp SPRITE_FACING_LEFT
+ jr nz, .notFacingLeft
+; facing left
+ dec e
+ ret
+.notFacingLeft
+; facing right
+ inc e
+ ret
diff --git a/engine/events/cinnabar_lab.asm b/engine/events/cinnabar_lab.asm
new file mode 100755
index 00000000..bccc95d1
--- /dev/null
+++ b/engine/events/cinnabar_lab.asm
@@ -0,0 +1,123 @@
+GiveFossilToCinnabarLab::
+ ld hl, wd730
+ set 6, [hl]
+ xor a
+ ld [wCurrentMenuItem], a
+ ld a, A_BUTTON | B_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, [wFilteredBagItemsCount]
+ dec a
+ ld [wMaxMenuItem], a
+ ld a, 2
+ ld [wTopMenuItemY], a
+ ld a, 1
+ ld [wTopMenuItemX], a
+ ld a, [wFilteredBagItemsCount]
+ dec a
+ ld bc, 2
+ ld hl, 3
+ call AddNTimes
+ dec l
+ ld b, l
+ ld c, $d
+ hlcoord 0, 0
+ call TextBoxBorder
+ call UpdateSprites
+ call PrintFossilsInBag
+ ld hl, wd730
+ res 6, [hl]
+ call HandleMenuInput
+ bit 1, a ; pressed B?
+ jr nz, .cancelledGivingFossil
+ ld hl, wFilteredBagItems
+ ld a, [wCurrentMenuItem]
+ ld d, 0
+ ld e, a
+ add hl, de
+ ld a, [hl]
+ ldh [hItemToRemoveID], a
+ cp DOME_FOSSIL
+ jr z, .choseDomeFossil
+ cp HELIX_FOSSIL
+ jr z, .choseHelixFossil
+ ld b, AERODACTYL
+ jr .fossilSelected
+.choseHelixFossil
+ ld b, OMANYTE
+ jr .fossilSelected
+.choseDomeFossil
+ ld b, KABUTO
+.fossilSelected
+ ld [wFossilItem], a
+ ld a, b
+ ld [wFossilMon], a
+ call LoadFossilItemAndMonName
+ ld hl, LabFossil_610ae
+ call PrintText
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ jr nz, .cancelledGivingFossil
+ ld hl, LabFossil_610b3
+ call PrintText
+ ld a, [wFossilItem]
+ ldh [hItemToRemoveID], a
+ farcall RemoveItemByID
+ ld hl, LabFossil_610b8
+ call PrintText
+ SetEvents EVENT_GAVE_FOSSIL_TO_LAB, EVENT_LAB_STILL_REVIVING_FOSSIL
+ ret
+.cancelledGivingFossil
+ ld hl, LabFossil_610bd
+ call PrintText
+ ret
+
+LabFossil_610ae:
+ text_far _Lab4Text_610ae
+ text_end
+
+LabFossil_610b3:
+ text_far _Lab4Text_610b3
+ text_end
+
+LabFossil_610b8:
+ text_far _Lab4Text_610b8
+ text_end
+
+LabFossil_610bd:
+ text_far _Lab4Text_610bd
+ text_end
+
+PrintFossilsInBag:
+; Prints each fossil in the player's bag on a separate line in the menu.
+ ld hl, wFilteredBagItems
+ xor a
+ ldh [hItemCounter], a
+.loop
+ ld a, [hli]
+ cp $ff
+ ret z
+ push hl
+ ld [wd11e], a
+ call GetItemName
+ hlcoord 2, 2
+ ldh a, [hItemCounter]
+ ld bc, SCREEN_WIDTH * 2
+ call AddNTimes
+ ld de, wcd6d
+ call PlaceString
+ ld hl, hItemCounter
+ inc [hl]
+ pop hl
+ jr .loop
+
+; loads the names of the fossil item and the resulting mon
+LoadFossilItemAndMonName::
+ ld a, [wFossilMon]
+ ld [wd11e], a
+ call GetMonName
+ call CopyStringToCF4B
+ ld a, [wFossilItem]
+ ld [wd11e], a
+ call GetItemName
+ ret
diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm
new file mode 100644
index 00000000..a5a007fa
--- /dev/null
+++ b/engine/events/diploma.asm
@@ -0,0 +1,17 @@
+DisplayDiploma::
+ call SaveScreenTilesToBuffer2
+ call GBPalWhiteOutWithDelay3
+ call ClearScreen
+ xor a
+ ld [wUpdateSpritesEnabled], a
+ ld hl, wd730
+ set 6, [hl]
+ callfar _DisplayDiploma
+ call WaitForTextScrollButtonPress
+ ld hl, wd730
+ res 6, [hl]
+ call GBPalWhiteOutWithDelay3
+ call ReloadTilesetTilePatterns
+ call RestoreScreenTilesAndReloadTilePatterns
+ call Delay3
+ jp GBPalNormal
diff --git a/engine/events/display_pokedex.asm b/engine/events/display_pokedex.asm
new file mode 100644
index 00000000..d657ea85
--- /dev/null
+++ b/engine/events/display_pokedex.asm
@@ -0,0 +1,19 @@
+_DisplayPokedex::
+ ld hl, wd730
+ set 6, [hl]
+ predef ShowPokedexData
+ ld hl, wd730
+ res 6, [hl]
+ call ReloadMapData
+ ld c, 10
+ call DelayFrames
+ predef IndexToPokedex
+ ld a, [wd11e]
+ dec a
+ ld c, a
+ ld b, FLAG_SET
+ ld hl, wPokedexSeen
+ predef FlagActionPredef
+ ld a, $1
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ ret
diff --git a/engine/events/elevator.asm b/engine/events/elevator.asm
new file mode 100755
index 00000000..004893a0
--- /dev/null
+++ b/engine/events/elevator.asm
@@ -0,0 +1,54 @@
+DisplayElevatorFloorMenu:
+ ld hl, wd730
+ ld a, [hl]
+ push af
+ set 6, [hl]
+ ld hl, WhichFloorText
+ call PrintText
+ pop af
+ ld [wd730], a
+ ld hl, wItemList
+ ld a, l
+ ld [wListPointer], a
+ ld a, h
+ ld [wListPointer + 1], a
+ ld a, [wListScrollOffset]
+ push af
+ xor a
+ ld [wCurrentMenuItem], a
+ ld [wListScrollOffset], a
+ ld [wPrintItemPrices], a
+ ld a, SPECIALLISTMENU
+ ld [wListMenuID], a
+ call DisplayListMenuID
+ pop bc
+ ld a, b
+ ld [wListScrollOffset], a
+ ret c
+ ld hl, wCurrentMapScriptFlags
+ set 7, [hl]
+ ld hl, wElevatorWarpMaps
+ ld a, [wWhichPokemon]
+ add a
+ ld d, 0
+ ld e, a
+ add hl, de
+ ld a, [hli]
+ ld b, a
+ ld a, [hl]
+ ld c, a
+ ld hl, wWarpEntries
+ call .UpdateWarp
+
+.UpdateWarp
+ inc hl
+ inc hl
+ ld a, b
+ ld [hli], a ; destination warp ID
+ ld a, c
+ ld [hli], a ; destination map ID
+ ret
+
+WhichFloorText:
+ text_far _WhichFloorText
+ text_end
diff --git a/engine/events/give_pokemon.asm b/engine/events/give_pokemon.asm
new file mode 100755
index 00000000..efc184f8
--- /dev/null
+++ b/engine/events/give_pokemon.asm
@@ -0,0 +1,87 @@
+_GivePokemon::
+; returns success in carry
+; and whether the mon was added to the party in [wAddedToParty]
+ call EnableAutoTextBoxDrawing
+ xor a
+ ld [wAddedToParty], a
+ ld a, [wPartyCount]
+ cp PARTY_LENGTH
+ jr c, .addToParty
+ ld a, [wNumInBox]
+ cp MONS_PER_BOX
+ jr nc, .boxFull
+; add to box
+ xor a
+ ld [wEnemyBattleStatus3], a
+ ld a, [wcf91]
+ ld [wEnemyMonSpecies2], a
+ callfar LoadEnemyMonData
+ call SetPokedexOwnedFlag
+ callfar SendNewMonToBox
+ ld hl, wcf4b
+ ld a, [wCurrentBoxNum]
+ and $7f
+ cp 9
+ jr c, .singleDigitBoxNum
+ sub 9
+ ld [hl], "1"
+ inc hl
+ add "0"
+ jr .next
+.singleDigitBoxNum
+ add "1"
+.next
+ ld [hli], a
+ ld [hl], "@"
+ ld hl, SentToBoxText
+ call PrintText
+ scf
+ ret
+.boxFull
+ ld hl, BoxIsFullText
+ call PrintText
+ and a
+ ret
+.addToParty
+ call SetPokedexOwnedFlag
+ ld hl, UnknownTerminator_f6794
+ call PrintText
+ call AddPartyMon
+ ld a, 1
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ ld [wAddedToParty], a
+ scf
+ ret
+
+SetPokedexOwnedFlag:
+ ld a, [wcf91]
+ push af
+ ld [wd11e], a
+ predef IndexToPokedex
+ ld a, [wd11e]
+ dec a
+ ld c, a
+ ld hl, wPokedexOwned
+ ld b, FLAG_SET
+ predef FlagActionPredef
+ pop af
+ ld [wd11e], a
+ call GetMonName
+ ld hl, GotMonText
+ jp PrintText
+
+UnknownTerminator_f6794:
+ text_end
+
+GotMonText:
+ text_far _GotMonText
+ sound_get_item_1
+ text_end
+
+SentToBoxText:
+ text_far _SentToBoxText
+ text_end
+
+BoxIsFullText:
+ text_far _BoxIsFullText
+ text_end
diff --git a/engine/heal_party.asm b/engine/events/heal_party.asm
index 7aaa1bd1..7aaa1bd1 100644
--- a/engine/heal_party.asm
+++ b/engine/events/heal_party.asm
diff --git a/engine/events/hidden_items.asm b/engine/events/hidden_items.asm
new file mode 100755
index 00000000..63b95bcf
--- /dev/null
+++ b/engine/events/hidden_items.asm
@@ -0,0 +1,172 @@
+HiddenItems:
+ ld hl, HiddenItemCoords
+ call FindHiddenItemOrCoinsIndex
+ ld [wHiddenItemOrCoinsIndex], a
+ ld hl, wObtainedHiddenItemsFlags
+ ld a, [wHiddenItemOrCoinsIndex]
+ ld c, a
+ ld b, FLAG_TEST
+ predef FlagActionPredef
+ ld a, c
+ and a
+ jr nz, .itemAlreadyFound
+ call EnableAutoTextBoxDrawing
+ ld a, 1
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ ld a, [wHiddenObjectFunctionArgument] ; item ID
+ ld [wd11e], a
+ call GetItemName
+ tx_pre_jump FoundHiddenItemText
+
+.itemAlreadyFound
+ ld a, $ff
+ ldh [hItemAlreadyFound], a
+ ret
+
+INCLUDE "data/events/hidden_item_coords.asm"
+
+FoundHiddenItemText::
+ text_far _FoundHiddenItemText
+ text_asm
+ ld a, [wHiddenObjectFunctionArgument] ; item ID
+ ld b, a
+ ld c, 1
+ call GiveItem
+ jr nc, .bagFull
+ ld hl, wObtainedHiddenItemsFlags
+ ld a, [wHiddenItemOrCoinsIndex]
+ ld c, a
+ ld b, FLAG_SET
+ predef FlagActionPredef
+ ld a, SFX_GET_ITEM_2
+ call PlaySoundWaitForCurrent
+ call WaitForSoundToFinish
+ jp TextScriptEnd
+.bagFull
+ call WaitForTextScrollButtonPress ; wait for button press
+ xor a
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ ld hl, HiddenItemBagFullText
+ call PrintText
+ jp TextScriptEnd
+
+HiddenItemBagFullText::
+ text_far _HiddenItemBagFullText
+ text_end
+
+HiddenCoins:
+ ld b, COIN_CASE
+ predef GetQuantityOfItemInBag
+ ld a, b
+ and a
+ jr z, .doNotPickUpCoins
+ ld hl, HiddenCoinCoords
+ call FindHiddenItemOrCoinsIndex
+ ld [wHiddenItemOrCoinsIndex], a
+ ld hl, wObtainedHiddenCoinsFlags
+ ld a, [wHiddenItemOrCoinsIndex]
+ ld c, a
+ ld b, FLAG_TEST
+ predef FlagActionPredef
+ ld a, c
+ and a
+ jr nz, .doNotPickUpCoins
+ xor a
+ ldh [hUnusedCoinsByte], a
+ ldh [hCoins], a
+ ldh [hCoins + 1], a
+ ld a, [wHiddenObjectFunctionArgument]
+ sub COIN
+ cp 10
+ jr z, .bcd10
+ cp 20
+ jr z, .bcd20
+ cp 40
+ jr z, .bcd20 ; should be bcd40
+ jr .bcd100
+
+.doNotPickUpCoins
+ ld a, $ff
+ ldh [hItemAlreadyFound], a
+ ret
+
+.bcd10
+ ld a, $10
+ ldh [hCoins + 1], a
+ jr .bcdDone
+.bcd20
+ ld a, $20
+ ldh [hCoins + 1], a
+ jr .bcdDone
+.bcd40 ; due to a typo, this is never used
+ ld a, $40
+ ldh [hCoins + 1], a
+ jr .bcdDone
+.bcd100
+ ld a, $1
+ ldh [hCoins], a
+.bcdDone
+ ld de, wPlayerCoins + 1
+ ld hl, hCoins + 1
+ ld c, $2
+ predef AddBCDPredef
+ ld hl, wObtainedHiddenCoinsFlags
+ ld a, [wHiddenItemOrCoinsIndex]
+ ld c, a
+ ld b, FLAG_SET
+ predef FlagActionPredef
+ call EnableAutoTextBoxDrawing
+ ld a, [wPlayerCoins]
+ cp $99
+ jr nz, .roomInCoinCase
+ ld a, [wPlayerCoins + 1]
+ cp $99
+ jr nz, .roomInCoinCase
+ tx_pre_id DroppedHiddenCoinsText
+ jr .done
+.roomInCoinCase
+ tx_pre_id FoundHiddenCoinsText
+.done
+ jp PrintPredefTextID
+
+INCLUDE "data/events/hidden_coins.asm"
+
+FoundHiddenCoinsText::
+ text_far _FoundHiddenCoinsText
+ sound_get_item_2
+ text_end
+
+DroppedHiddenCoinsText::
+ text_far _FoundHiddenCoins2Text
+ sound_get_item_2
+ text_far _DroppedHiddenCoinsText
+ text_end
+
+FindHiddenItemOrCoinsIndex:
+ ld a, [wHiddenObjectY]
+ ld d, a
+ ld a, [wHiddenObjectX]
+ ld e, a
+ ld a, [wCurMap]
+ ld b, a
+ ld c, -1
+.loop
+ inc c
+ ld a, [hli]
+ cp -1 ; end of the list?
+ ret z ; if so, we're done here
+ cp b
+ jr nz, .next1
+ ld a, [hli]
+ cp d
+ jr nz, .next2
+ ld a, [hli]
+ cp e
+ jr nz, .loop
+ ld a, c
+ ret
+.next1
+ inc hl
+.next2
+ inc hl
+ jr .loop
diff --git a/engine/events/hidden_objects/bench_guys.asm b/engine/events/hidden_objects/bench_guys.asm
new file mode 100644
index 00000000..b41434ad
--- /dev/null
+++ b/engine/events/hidden_objects/bench_guys.asm
@@ -0,0 +1,98 @@
+PrintBenchGuyText:
+ call EnableAutoTextBoxDrawing
+ ld hl, BenchGuyTextPointers
+ ld a, [wCurMap]
+ ld b, a
+.loop
+ ld a, [hli]
+ cp -1
+ ret z
+ cp b
+ jr z, .match
+ inc hl
+ inc hl
+ jr .loop
+.match
+ ld a, [hli]
+ ld b, a
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ cp b
+ jr nz, .loop ; player isn't facing the bench guy
+ ld a, [hl]
+ jp PrintPredefTextID
+
+INCLUDE "data/events/bench_guys.asm"
+
+ViridianCityPokecenterBenchGuyText::
+ text_far _ViridianCityPokecenterGuyText
+ text_end
+
+PewterCityPokecenterBenchGuyText::
+ text_far _PewterCityPokecenterGuyText
+ text_end
+
+CeruleanCityPokecenterBenchGuyText::
+ text_far _CeruleanPokecenterGuyText
+ text_end
+
+LavenderCityPokecenterBenchGuyText::
+ text_far _LavenderPokecenterGuyText
+ text_end
+
+MtMoonPokecenterBenchGuyText::
+ text_far _MtMoonPokecenterBenchGuyText
+ text_end
+
+RockTunnelPokecenterBenchGuyText::
+ text_far _RockTunnelPokecenterGuyText
+ text_end
+
+UnusedBenchGuyText1::
+ text_far _UnusedBenchGuyText1
+ text_end
+
+UnusedBenchGuyText2::
+ text_far _UnusedBenchGuyText2
+ text_end
+
+UnusedBenchGuyText3::
+ text_far _UnusedBenchGuyText3
+ text_end
+
+VermilionCityPokecenterBenchGuyText::
+ text_far _VermilionPokecenterGuyText
+ text_end
+
+CeladonCityPokecenterBenchGuyText::
+ text_far _CeladonCityPokecenterGuyText
+ text_end
+
+FuchsiaCityPokecenterBenchGuyText::
+ text_far _FuchsiaCityPokecenterGuyText
+ text_end
+
+CinnabarIslandPokecenterBenchGuyText::
+ text_far _CinnabarPokecenterGuyText
+ text_end
+
+SaffronCityPokecenterBenchGuyText::
+ text_asm
+ CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
+ ld hl, SaffronCityPokecenterBenchGuyText2
+ jr nz, .asm_624f2
+ ld hl, SaffronCityPokecenterBenchGuyText1
+.asm_624f2
+ call PrintText
+ jp TextScriptEnd
+
+SaffronCityPokecenterBenchGuyText1:
+ text_far _SaffronCityPokecenterGuyText1
+ text_end
+
+SaffronCityPokecenterBenchGuyText2:
+ text_far _SaffronCityPokecenterGuyText2
+ text_end
+
+CeladonCityHotelText::
+ text_far _CeladonCityHotelText
+ text_end
diff --git a/engine/events/hidden_objects/bills_house_pc.asm b/engine/events/hidden_objects/bills_house_pc.asm
new file mode 100644
index 00000000..bdbaff7e
--- /dev/null
+++ b/engine/events/hidden_objects/bills_house_pc.asm
@@ -0,0 +1,131 @@
+BillsHousePC:
+ call EnableAutoTextBoxDrawing
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ cp SPRITE_FACING_UP
+ ret nz
+ CheckEvent EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING
+ jr nz, .displayBillsHousePokemonList
+ CheckEventReuseA EVENT_USED_CELL_SEPARATOR_ON_BILL
+ jr nz, .displayBillsHouseMonitorText
+ CheckEventReuseA EVENT_BILL_SAID_USE_CELL_SEPARATOR
+ jr nz, .doCellSeparator
+.displayBillsHouseMonitorText
+ tx_pre_jump BillsHouseMonitorText
+.doCellSeparator
+ ld a, $1
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ tx_pre BillsHouseInitiatedText
+ ld c, 32
+ call DelayFrames
+ ld a, SFX_TINK
+ call PlaySound
+ call WaitForSoundToFinish
+ ld c, 80
+ call DelayFrames
+ ld a, SFX_SHRINK
+ call PlaySound
+ call WaitForSoundToFinish
+ ld c, 48
+ call DelayFrames
+ ld a, SFX_TINK
+ call PlaySound
+ call WaitForSoundToFinish
+ ld c, 32
+ call DelayFrames
+ ld a, SFX_GET_ITEM_1
+ call PlaySound
+ call WaitForSoundToFinish
+ call PlayDefaultMusic
+ SetEvent EVENT_USED_CELL_SEPARATOR_ON_BILL
+ ret
+.displayBillsHousePokemonList
+ ld a, $1
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ tx_pre BillsHousePokemonList
+ ret
+
+BillsHouseMonitorText::
+ text_far _BillsHouseMonitorText
+ text_end
+
+BillsHouseInitiatedText::
+ text_far _BillsHouseInitiatedText
+ text_promptbutton
+ text_asm
+ call StopAllMusic
+ ld c, 16
+ call DelayFrames
+ ld a, SFX_SWITCH
+ call PlaySound
+ call WaitForSoundToFinish
+ ld c, 60
+ call DelayFrames
+ jp TextScriptEnd
+
+BillsHousePokemonList::
+ text_asm
+ call SaveScreenTilesToBuffer1
+ ld hl, BillsHousePokemonListText1
+ call PrintText
+ xor a
+ ld [wMenuItemOffset], a ; not used
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ ld a, A_BUTTON | B_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, 4
+ ld [wMaxMenuItem], a
+ ld a, 2
+ ld [wTopMenuItemY], a
+ ld a, 1
+ ld [wTopMenuItemX], a
+.billsPokemonLoop
+ ld hl, wd730
+ set 6, [hl]
+ hlcoord 0, 0
+ lb bc, 10, 9
+ call TextBoxBorder
+ hlcoord 2, 2
+ ld de, BillsMonListText
+ call PlaceString
+ ld hl, BillsHousePokemonListText2
+ call PrintText
+ call SaveScreenTilesToBuffer2
+ call HandleMenuInput
+ bit 1, a ; pressed b
+ jr nz, .cancel
+ ld a, [wCurrentMenuItem]
+ add EEVEE
+ cp EEVEE
+ jr z, .displayPokedex
+ cp FLAREON
+ jr z, .displayPokedex
+ cp JOLTEON
+ jr z, .displayPokedex
+ cp VAPOREON
+ jr z, .displayPokedex
+ jr .cancel
+.displayPokedex
+ call DisplayPokedex
+ call LoadScreenTilesFromBuffer2
+ jr .billsPokemonLoop
+.cancel
+ ld hl, wd730
+ res 6, [hl]
+ call LoadScreenTilesFromBuffer2
+ jp TextScriptEnd
+
+BillsHousePokemonListText1:
+ text_far _BillsHousePokemonListText1
+ text_end
+
+BillsMonListText:
+ db "EEVEE"
+ next "FLAREON"
+ next "JOLTEON"
+ next "VAPOREON"
+ next "CANCEL@"
+
+BillsHousePokemonListText2:
+ text_far _BillsHousePokemonListText2
+ text_end
diff --git a/engine/events/hidden_objects/blues_room.asm b/engine/events/hidden_objects/blues_room.asm
new file mode 100644
index 00000000..bcbad556
--- /dev/null
+++ b/engine/events/hidden_objects/blues_room.asm
@@ -0,0 +1,13 @@
+
+ ret ; unused
+
+UnusedPredefText::
+ db "@"
+
+PrintBookcaseText:
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump BookcaseText
+
+BookcaseText::
+ text_far _BookcaseText
+ text_end
diff --git a/engine/events/hidden_objects/book_or_sculpture.asm b/engine/events/hidden_objects/book_or_sculpture.asm
new file mode 100644
index 00000000..e04f4047
--- /dev/null
+++ b/engine/events/hidden_objects/book_or_sculpture.asm
@@ -0,0 +1,21 @@
+BookOrSculptureText::
+ text_asm
+ ld hl, PokemonBooksText
+ ld a, [wCurMapTileset]
+ cp MANSION ; Celadon Mansion tileset
+ jr nz, .ok
+ lda_coord 8, 6
+ cp $38
+ jr nz, .ok
+ ld hl, DiglettSculptureText
+.ok
+ call PrintText
+ jp TextScriptEnd
+
+PokemonBooksText:
+ text_far _PokemonBooksText
+ text_end
+
+DiglettSculptureText:
+ text_far _DiglettSculptureText
+ text_end
diff --git a/engine/events/hidden_objects/bookshelves.asm b/engine/events/hidden_objects/bookshelves.asm
new file mode 100644
index 00000000..b58444af
--- /dev/null
+++ b/engine/events/hidden_objects/bookshelves.asm
@@ -0,0 +1,39 @@
+; prints text for bookshelves in buildings without sign events
+PrintBookshelfText::
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ cp SPRITE_FACING_UP
+ jr nz, .noMatch
+; facing up
+ ld a, [wCurMapTileset]
+ ld b, a
+ lda_coord 8, 7
+ ld c, a
+ ld hl, BookshelfTileIDs
+.loop
+ ld a, [hli]
+ cp $ff
+ jr z, .noMatch
+ cp b
+ jr nz, .nextBookshelfEntry1
+ ld a, [hli]
+ cp c
+ jr nz, .nextBookshelfEntry2
+ ld a, [hl]
+ push af
+ call EnableAutoTextBoxDrawing
+ pop af
+ call PrintPredefTextID
+ xor a
+ ldh [hFFDB], a
+ ret
+.nextBookshelfEntry1
+ inc hl
+.nextBookshelfEntry2
+ inc hl
+ jr .loop
+.noMatch
+ ld a, $ff
+ ldh [hFFDB], a
+ farjp PrintCardKeyText
+
+INCLUDE "data/tilesets/bookshelf_tile_ids.asm"
diff --git a/engine/events/hidden_objects/cinnabar_gym_quiz.asm b/engine/events/hidden_objects/cinnabar_gym_quiz.asm
new file mode 100644
index 00000000..da550c76
--- /dev/null
+++ b/engine/events/hidden_objects/cinnabar_gym_quiz.asm
@@ -0,0 +1,246 @@
+PrintCinnabarQuiz:
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ cp SPRITE_FACING_UP
+ ret nz
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump CinnabarGymQuiz
+
+CinnabarGymQuiz::
+ text_asm
+ xor a
+ ld [wOpponentAfterWrongAnswer], a
+ ld hl, wd475
+ res 7, [hl]
+ ld a, [wHiddenObjectFunctionArgument]
+ push af
+ and $f
+ ldh [hGymGateIndex], a
+ pop af
+ and $f0
+ swap a
+ ldh [hGymGateAnswer], a
+ ldh a, [hGymGateIndex]
+ ld hl, CinnabarGymQuizIntroText
+ cp 1
+ jr z, .onFirstQuestion
+ ld hl, CinnabarGymQuizShortIntroText
+.onFirstQuestion
+ call PrintText
+ ldh a, [hGymGateIndex]
+ dec a
+ add a
+ ld d, 0
+ ld e, a
+ ld hl, CinnabarQuizQuestions
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ call PrintText
+ ld a, 1
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ call CinnabarGymQuiz_1ea92
+ jp TextScriptEnd
+
+CinnabarGymQuizDummyIntroText:
+ text_far _CinnabarGymQuizDummyIntroText
+ text_end
+
+CinnabarGymQuizIntroText:
+ text_far _CinnabarGymQuizIntroText
+ text_end
+
+CinnabarGymQuizShortIntroText:
+ text_far _CinnabarGymQuizShortIntroText
+ text_end
+
+CinnabarQuizQuestions:
+ dw CinnabarQuizQuestionsText1
+ dw CinnabarQuizQuestionsText2
+ dw CinnabarQuizQuestionsText3
+ dw CinnabarQuizQuestionsText4
+ dw CinnabarQuizQuestionsText5
+ dw CinnabarQuizQuestionsText6
+
+CinnabarQuizQuestionsText1:
+ text_far _CinnabarQuizQuestionsText1
+ text_end
+
+CinnabarQuizQuestionsText2:
+ text_far _CinnabarQuizQuestionsText2
+ text_end
+
+CinnabarQuizQuestionsText3:
+ text_far _CinnabarQuizQuestionsText3
+ text_end
+
+CinnabarQuizQuestionsText4:
+ text_far _CinnabarQuizQuestionsText4
+ text_end
+
+CinnabarQuizQuestionsText5:
+ text_far _CinnabarQuizQuestionsText5
+ text_end
+
+CinnabarQuizQuestionsText6:
+ text_far _CinnabarQuizQuestionsText6
+ text_end
+
+CinnabarGymQuiz_1ea92:
+ call YesNoChoice
+ ldh a, [hGymGateAnswer]
+ ld c, a
+ ld a, [wCurrentMenuItem]
+ cp c
+ jr nz, .wrongAnswer
+ ld hl, wCurrentMapScriptFlags
+ set 5, [hl]
+ ldh a, [hGymGateIndex]
+ ldh [hBackupGymGateIndex], a
+ ld hl, CinnabarGymQuizCorrectText
+ call PrintText
+ ldh a, [hBackupGymGateIndex]
+ AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
+ ld c, a
+ ld b, FLAG_SET
+ call CinnabarGymGateFlagAction
+ jp UpdateCinnabarGymGateTileBlocks_
+.wrongAnswer
+ call WaitForSoundToFinish
+ ld a, SFX_DENIED
+ call PlaySound
+ call WaitForSoundToFinish
+ ld hl, CinnabarGymQuizIncorrectText
+ call PrintText
+ ldh a, [hGymGateIndex]
+ add $2
+ AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2
+ ld c, a
+ ld b, FLAG_TEST
+ EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0
+ predef FlagActionPredef
+ ld a, c
+ and a
+ ret nz
+ ldh a, [hGymGateIndex]
+ add $2
+ ld [wOpponentAfterWrongAnswer], a
+ ld hl, wd475
+ set 7, [hl]
+ ret
+
+CinnabarGymQuizCorrectText:
+ sound_get_item_1
+ text_far _CinnabarGymQuizCorrectText
+ text_promptbutton
+ text_asm
+
+ ldh a, [hBackupGymGateIndex]
+ AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
+ ld c, a
+ ld b, FLAG_TEST
+ call CinnabarGymGateFlagAction
+ ld a, c
+ and a
+ jp nz, TextScriptEnd
+ call WaitForSoundToFinish
+ ld a, SFX_GO_INSIDE
+ call PlaySound
+ call WaitForSoundToFinish
+ jp TextScriptEnd
+
+CinnabarGymQuizIncorrectText:
+ text_far _CinnabarGymQuizIncorrectText
+ text_end
+
+CinnabarGymGateFlagAction:
+ EventFlagAddress hl, EVENT_CINNABAR_GYM_GATE0_UNLOCKED
+ predef_jump FlagActionPredef
+
+UpdateCinnabarGymGateTileBlocks_::
+; Update the overworld map with open floor blocks or locked gate blocks
+; depending on event flags.
+ ld a, 6
+ ldh [hGymGateIndex], a
+.loop
+ ldh a, [hGymGateIndex]
+ dec a
+ add a
+ add a
+ ld d, 0
+ ld e, a
+ ld hl, CinnabarGymGateCoords
+ add hl, de
+ ld a, [hli]
+ ld b, [hl]
+ ld c, a
+ inc hl
+ ld a, [hl]
+ ld [wGymGateTileBlock], a
+ push bc
+ ldh a, [hGymGateIndex]
+ ldh [hBackupGymGateIndex], a
+ AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
+ ld c, a
+ ld b, FLAG_TEST
+ call CinnabarGymGateFlagAction
+ ld a, c
+ and a
+ jr nz, .unlocked
+ ld a, [wGymGateTileBlock]
+ jr .next
+.unlocked
+ ld a, $e
+.next
+ pop bc
+ ld [wNewTileBlockID], a
+ call CinnabarGym_ReplaceTileBlock
+ ld hl, hGymGateIndex
+ dec [hl]
+ jr nz, .loop
+ callfar RedrawMapView
+ ret
+
+gym_gate_coord: MACRO
+ db \1, \2, \3, 0
+ENDM
+
+HORIZONTAL_GATE_BLOCK EQU $54
+VERTICAL_GATE_BLOCK EQU $5f
+
+CinnabarGymGateCoords:
+ ; x coord, y coord, block id
+ gym_gate_coord 9, 3, HORIZONTAL_GATE_BLOCK
+ gym_gate_coord 6, 3, HORIZONTAL_GATE_BLOCK
+ gym_gate_coord 6, 6, HORIZONTAL_GATE_BLOCK
+ gym_gate_coord 3, 8, VERTICAL_GATE_BLOCK
+ gym_gate_coord 2, 6, HORIZONTAL_GATE_BLOCK
+ gym_gate_coord 2, 3, HORIZONTAL_GATE_BLOCK
+
+
+CinnabarGym_ReplaceTileBlock:
+; basically a copy of the first half of ReplaceTileBlock
+; before checking if it is necessary to redraw the map view
+ ld hl, wOverworldMap
+ ld a, [wCurMapWidth]
+ add $6
+ ld e, a
+ ld d, $0
+ add hl, de
+ add hl, de
+ add hl, de
+ ld e, $3
+ add hl, de
+ ld e, a
+ ld a, b
+ and a
+ jr z, .addX
+.addWidthYTimesLoop
+ add hl, de
+ dec b
+ jr nz, .addWidthYTimesLoop
+.addX
+ add hl, bc
+ ld a, [wNewTileBlockID]
+ ld [hl], a
+ ret
diff --git a/engine/events/hidden_objects/elevator.asm b/engine/events/hidden_objects/elevator.asm
new file mode 100644
index 00000000..ab0f731f
--- /dev/null
+++ b/engine/events/hidden_objects/elevator.asm
@@ -0,0 +1,3 @@
+ElevatorText::
+ text_far _ElevatorText
+ text_end
diff --git a/engine/events/hidden_objects/fanclub_pictures.asm b/engine/events/hidden_objects/fanclub_pictures.asm
new file mode 100644
index 00000000..30bc72c7
--- /dev/null
+++ b/engine/events/hidden_objects/fanclub_pictures.asm
@@ -0,0 +1,23 @@
+FanClubPicture1:
+ ld a, RAPIDASH
+ ld [wcf91], a
+ call DisplayMonFrontSpriteInBox
+ call EnableAutoTextBoxDrawing
+ tx_pre FanClubPicture1Text
+ ret
+
+FanClubPicture1Text::
+ text_far _FanClubPicture1Text
+ text_end
+
+FanClubPicture2:
+ ld a, FEAROW
+ ld [wcf91], a
+ call DisplayMonFrontSpriteInBox
+ call EnableAutoTextBoxDrawing
+ tx_pre FanClubPicture2Text
+ ret
+
+FanClubPicture2Text::
+ text_far _FanClubPicture2Text
+ text_end
diff --git a/engine/events/hidden_objects/fighting_dojo.asm b/engine/events/hidden_objects/fighting_dojo.asm
new file mode 100644
index 00000000..b4f89985
--- /dev/null
+++ b/engine/events/hidden_objects/fighting_dojo.asm
@@ -0,0 +1,23 @@
+PrintFightingDojoText2:
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump EnemiesOnEverySideText
+
+EnemiesOnEverySideText::
+ text_far _EnemiesOnEverySideText
+ text_end
+
+PrintFightingDojoText3:
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump WhatGoesAroundComesAroundText
+
+WhatGoesAroundComesAroundText::
+ text_far _WhatGoesAroundComesAroundText
+ text_end
+
+PrintFightingDojoText:
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump FightingDojoText
+
+FightingDojoText::
+ text_far _FightingDojoText
+ text_end
diff --git a/engine/events/hidden_objects/gym_statues.asm b/engine/events/hidden_objects/gym_statues.asm
new file mode 100644
index 00000000..1c7eb970
--- /dev/null
+++ b/engine/events/hidden_objects/gym_statues.asm
@@ -0,0 +1,39 @@
+GymStatues:
+; if in a gym and have the corresponding badge, a = GymStatueText2_id and jp PrintPredefTextID
+; if in a gym and don't have the corresponding badge, a = GymStatueText1_id and jp PrintPredefTextID
+; else ret
+ call EnableAutoTextBoxDrawing
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ cp SPRITE_FACING_UP
+ ret nz
+ ld hl, MapBadgeFlags
+ ld a, [wCurMap]
+ ld b, a
+.loop
+ ld a, [hli]
+ cp $ff
+ ret z
+ cp b
+ jr z, .match
+ inc hl
+ jr .loop
+.match
+ ld b, [hl]
+ ld a, [wBeatGymFlags]
+ and b
+ cp b
+ tx_pre_id GymStatueText2
+ jr z, .haveBadge
+ tx_pre_id GymStatueText1
+.haveBadge
+ jp PrintPredefTextID
+
+INCLUDE "data/maps/badge_maps.asm"
+
+GymStatueText1::
+ text_far _GymStatueText1
+ text_end
+
+GymStatueText2::
+ text_far _GymStatueText2
+ text_end
diff --git a/engine/events/hidden_objects/indigo_plateau_hq.asm b/engine/events/hidden_objects/indigo_plateau_hq.asm
new file mode 100644
index 00000000..e8fd0220
--- /dev/null
+++ b/engine/events/hidden_objects/indigo_plateau_hq.asm
@@ -0,0 +1,10 @@
+PrintIndigoPlateauHQText:
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ cp SPRITE_FACING_UP
+ ret nz
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump IndigoPlateauHQText
+
+IndigoPlateauHQText::
+ text_far _IndigoPlateauHQText
+ text_end
diff --git a/engine/events/hidden_objects/indigo_plateau_statues.asm b/engine/events/hidden_objects/indigo_plateau_statues.asm
new file mode 100644
index 00000000..23e94fcf
--- /dev/null
+++ b/engine/events/hidden_objects/indigo_plateau_statues.asm
@@ -0,0 +1,24 @@
+IndigoPlateauStatues::
+ text_asm
+ ld hl, IndigoPlateauStatuesText1
+ call PrintText
+ ld a, [wXCoord]
+ bit 0, a
+ ld hl, IndigoPlateauStatuesText2
+ jr nz, .ok
+ ld hl, IndigoPlateauStatuesText3
+.ok
+ call PrintText
+ jp TextScriptEnd
+
+IndigoPlateauStatuesText1:
+ text_far _IndigoPlateauStatuesText1
+ text_end
+
+IndigoPlateauStatuesText2:
+ text_far _IndigoPlateauStatuesText2
+ text_end
+
+IndigoPlateauStatuesText3:
+ text_far _IndigoPlateauStatuesText3
+ text_end
diff --git a/engine/events/hidden_objects/magazines.asm b/engine/events/hidden_objects/magazines.asm
new file mode 100644
index 00000000..b58636ff
--- /dev/null
+++ b/engine/events/hidden_objects/magazines.asm
@@ -0,0 +1,8 @@
+PrintMagazinesText:
+ call EnableAutoTextBoxDrawing
+ tx_pre MagazinesText
+ ret
+
+MagazinesText::
+ text_far _MagazinesText
+ text_end
diff --git a/engine/events/hidden_objects/museum_fossils.asm b/engine/events/hidden_objects/museum_fossils.asm
new file mode 100644
index 00000000..539f2c3f
--- /dev/null
+++ b/engine/events/hidden_objects/museum_fossils.asm
@@ -0,0 +1,23 @@
+AerodactylFossil:
+ ld a, FOSSIL_AERODACTYL
+ ld [wcf91], a
+ call DisplayMonFrontSpriteInBox
+ call EnableAutoTextBoxDrawing
+ tx_pre AerodactylFossilText
+ ret
+
+AerodactylFossilText::
+ text_far _AerodactylFossilText
+ text_end
+
+KabutopsFossil:
+ ld a, FOSSIL_KABUTOPS
+ ld [wcf91], a
+ call DisplayMonFrontSpriteInBox
+ call EnableAutoTextBoxDrawing
+ tx_pre KabutopsFossilText
+ ret
+
+KabutopsFossilText::
+ text_far _KabutopsFossilText
+ text_end
diff --git a/engine/events/hidden_objects/museum_fossils2.asm b/engine/events/hidden_objects/museum_fossils2.asm
new file mode 100644
index 00000000..fce0f03a
--- /dev/null
+++ b/engine/events/hidden_objects/museum_fossils2.asm
@@ -0,0 +1,28 @@
+DisplayMonFrontSpriteInBox:
+; Displays a pokemon's front sprite in a pop-up window.
+; [wcf91] = pokemon internal id number
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ call Delay3
+ xor a
+ ldh [hWY], a
+ call SaveScreenTilesToBuffer1
+ ld a, MON_SPRITE_POPUP
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ call UpdateSprites
+ ld a, [wcf91]
+ ld [wd0b5], a
+ call GetMonHeader
+ ld de, vChars1 + $310
+ call LoadMonFrontSprite
+ ld a, $80
+ ldh [hStartTileID], a
+ hlcoord 10, 11
+ predef AnimateSendingOutMon
+ call WaitForTextScrollButtonPress
+ call LoadScreenTilesFromBuffer1
+ call Delay3
+ ld a, $90
+ ldh [hWY], a
+ ret
diff --git a/engine/events/hidden_objects/new_bike.asm b/engine/events/hidden_objects/new_bike.asm
new file mode 100644
index 00000000..5bce5937
--- /dev/null
+++ b/engine/events/hidden_objects/new_bike.asm
@@ -0,0 +1,7 @@
+PrintNewBikeText:
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump NewBicycleText
+
+NewBicycleText::
+ text_far _NewBicycleText
+ text_end
diff --git a/engine/events/hidden_objects/oaks_lab_email.asm b/engine/events/hidden_objects/oaks_lab_email.asm
new file mode 100644
index 00000000..bd4c66d7
--- /dev/null
+++ b/engine/events/hidden_objects/oaks_lab_email.asm
@@ -0,0 +1,11 @@
+DisplayOakLabEmailText:
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ cp SPRITE_FACING_UP
+ ret nz
+ call EnableAutoTextBoxDrawing
+ tx_pre OakLabEmailText
+ ret
+
+OakLabEmailText::
+ text_far _OakLabEmailText
+ text_end
diff --git a/engine/events/hidden_objects/oaks_lab_posters.asm b/engine/events/hidden_objects/oaks_lab_posters.asm
new file mode 100644
index 00000000..502cf951
--- /dev/null
+++ b/engine/events/hidden_objects/oaks_lab_posters.asm
@@ -0,0 +1,29 @@
+DisplayOakLabLeftPoster:
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump PushStartText
+
+PushStartText::
+ text_far _PushStartText
+ text_end
+
+DisplayOakLabRightPoster:
+ call EnableAutoTextBoxDrawing
+ ld hl, wPokedexOwned
+ ld b, wPokedexOwnedEnd - wPokedexOwned
+ call CountSetBits
+ ld a, [wNumSetBits]
+ cp 2
+ tx_pre_id SaveOptionText
+ jr c, .ownLessThanTwo
+ ; own two or more mon
+ tx_pre_id StrengthsAndWeaknessesText
+.ownLessThanTwo
+ jp PrintPredefTextID
+
+SaveOptionText::
+ text_far _SaveOptionText
+ text_end
+
+StrengthsAndWeaknessesText::
+ text_far _StrengthsAndWeaknessesText
+ text_end
diff --git a/engine/events/hidden_objects/pokecenter_pc.asm b/engine/events/hidden_objects/pokecenter_pc.asm
new file mode 100644
index 00000000..f20f40ed
--- /dev/null
+++ b/engine/events/hidden_objects/pokecenter_pc.asm
@@ -0,0 +1,11 @@
+OpenPokemonCenterPC:
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ cp SPRITE_FACING_UP
+ ret nz
+ call EnableAutoTextBoxDrawing
+ ld a, TRUE
+ ld [wAutoTextBoxDrawingControl], a
+ tx_pre_jump PokemonCenterPCText
+
+PokemonCenterPCText::
+ script_pokecenter_pc
diff --git a/engine/events/hidden_objects/pokemon_stuff.asm b/engine/events/hidden_objects/pokemon_stuff.asm
new file mode 100644
index 00000000..267a191a
--- /dev/null
+++ b/engine/events/hidden_objects/pokemon_stuff.asm
@@ -0,0 +1,3 @@
+PokemonStuffText::
+ text_far _PokemonStuffText
+ text_end
diff --git a/engine/events/hidden_objects/reds_room.asm b/engine/events/hidden_objects/reds_room.asm
new file mode 100644
index 00000000..7b8d51a0
--- /dev/null
+++ b/engine/events/hidden_objects/reds_room.asm
@@ -0,0 +1,14 @@
+PrintRedSNESText:
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump RedBedroomSNESText
+
+RedBedroomSNESText::
+ text_far _RedBedroomSNESText
+ text_end
+
+OpenRedsPC:
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump RedBedroomPCText
+
+RedBedroomPCText::
+ script_players_pc
diff --git a/engine/events/hidden_objects/route_15_binoculars.asm b/engine/events/hidden_objects/route_15_binoculars.asm
new file mode 100644
index 00000000..9734e833
--- /dev/null
+++ b/engine/events/hidden_objects/route_15_binoculars.asm
@@ -0,0 +1,17 @@
+Route15GateLeftBinoculars:
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ cp SPRITE_FACING_UP
+ ret nz
+ call EnableAutoTextBoxDrawing
+ tx_pre Route15UpstairsBinocularsText
+ ld a, ARTICUNO
+ ld [wcf91], a
+ call PlayCry
+ call DisplayMonFrontSpriteInBox
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ ret
+
+Route15UpstairsBinocularsText::
+ text_far _Route15UpstairsBinocularsText
+ text_end
diff --git a/engine/events/hidden_objects/safari_game.asm b/engine/events/hidden_objects/safari_game.asm
new file mode 100644
index 00000000..5001a5d4
--- /dev/null
+++ b/engine/events/hidden_objects/safari_game.asm
@@ -0,0 +1,78 @@
+SafariZoneCheck::
+ 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, [wNumSafariBalls]
+ and a
+ jr z, SafariZoneGameOver
+ jr SafariZoneGameStillGoing
+
+SafariZoneCheckSteps::
+ ld a, [wSafariSteps]
+ ld b, a
+ ld a, [wSafariSteps + 1]
+ ld c, a
+ or b
+ jr z, SafariZoneGameOver
+ dec bc
+ ld a, b
+ ld [wSafariSteps], a
+ ld a, c
+ ld [wSafariSteps + 1], a
+SafariZoneGameStillGoing:
+ xor a
+ ld [wSafariZoneGameOver], a
+ ret
+
+SafariZoneGameOver:
+ call EnableAutoTextBoxDrawing
+ xor a
+ ld [wAudioFadeOutControl], a
+ call StopAllMusic
+ ld c, BANK(SFX_Safari_Zone_PA)
+ ld a, SFX_SAFARI_ZONE_PA
+ call PlayMusic
+.waitForMusicToPlay
+ ld a, [wChannelSoundIDs + Ch5]
+ cp SFX_SAFARI_ZONE_PA
+ jr nz, .waitForMusicToPlay
+ ld a, TEXT_SAFARI_GAME_OVER
+ ldh [hSpriteIndexOrTextID], a
+ call DisplayTextID
+ xor a
+ ld [wPlayerMovingDirection], a
+ ld a, SAFARI_ZONE_GATE
+ ldh [hWarpDestinationMap], a
+ ld a, $3
+ ld [wDestinationWarpID], a
+ ld a, $5
+ ld [wSafariZoneGateCurScript], a
+ SetEvent EVENT_SAFARI_GAME_OVER
+ ld a, 1
+ ld [wSafariZoneGameOver], a
+ ret
+
+PrintSafariGameOverText::
+ xor a
+ ld [wJoyIgnore], a
+ ld hl, SafariGameOverText
+ jp PrintText
+
+SafariGameOverText:
+ text_asm
+ ld a, [wNumSafariBalls]
+ and a
+ jr z, .noMoreSafariBalls
+ ld hl, TimesUpText
+ call PrintText
+.noMoreSafariBalls
+ ld hl, GameOverText
+ call PrintText
+ jp TextScriptEnd
+
+TimesUpText:
+ text_far _TimesUpText
+ text_end
+
+GameOverText:
+ text_far _GameOverText
+ text_end
diff --git a/engine/events/hidden_objects/school_blackboard.asm b/engine/events/hidden_objects/school_blackboard.asm
new file mode 100644
index 00000000..eb927292
--- /dev/null
+++ b/engine/events/hidden_objects/school_blackboard.asm
@@ -0,0 +1,223 @@
+PrintBlackboardLinkCableText:
+ call EnableAutoTextBoxDrawing
+ ld a, $1
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ ld a, [wHiddenObjectFunctionArgument]
+ call PrintPredefTextID
+ ret
+
+LinkCableHelp::
+ text_asm
+ call SaveScreenTilesToBuffer1
+ ld hl, LinkCableHelpText1
+ call PrintText
+ xor a
+ ld [wMenuItemOffset], a ; not used
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ ld a, A_BUTTON | B_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, 3
+ ld [wMaxMenuItem], a
+ ld a, 2
+ ld [wTopMenuItemY], a
+ ld a, 1
+ ld [wTopMenuItemX], a
+.linkHelpLoop
+ ld hl, wd730
+ set 6, [hl]
+ hlcoord 0, 0
+ lb bc, 8, 13
+ call TextBoxBorder
+ hlcoord 2, 2
+ ld de, HowToLinkText
+ call PlaceString
+ ld hl, LinkCableHelpText2
+ call PrintText
+ call HandleMenuInput
+ bit 1, a ; pressed b
+ jr nz, .exit
+ ld a, [wCurrentMenuItem]
+ 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 e, a
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ call PrintText
+ jp .linkHelpLoop
+.exit
+ ld hl, wd730
+ res 6, [hl]
+ call LoadScreenTilesFromBuffer1
+ jp TextScriptEnd
+
+LinkCableHelpText1:
+ text_far _LinkCableHelpText1
+ text_end
+
+LinkCableHelpText2:
+ text_far _LinkCableHelpText2
+ text_end
+
+HowToLinkText:
+ db "HOW TO LINK"
+ next "COLOSSEUM"
+ next "TRADE CENTER"
+ next "STOP READING@"
+
+LinkCableInfoTexts:
+ dw LinkCableInfoText1
+ dw LinkCableInfoText2
+ dw LinkCableInfoText3
+
+LinkCableInfoText1:
+ text_far _LinkCableInfoText1
+ text_end
+
+LinkCableInfoText2:
+ text_far _LinkCableInfoText2
+ text_end
+
+LinkCableInfoText3:
+ text_far _LinkCableInfoText3
+ text_end
+
+ViridianSchoolBlackboard::
+ text_asm
+ call SaveScreenTilesToBuffer1
+ ld hl, ViridianSchoolBlackboardText1
+ call PrintText
+ xor a
+ ld [wMenuItemOffset], a
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ ld a, D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, 2
+ ld [wMaxMenuItem], a
+ ld a, 2
+ ld [wTopMenuItemY], a
+ ld a, 1
+ ld [wTopMenuItemX], a
+.blackboardLoop
+ ld hl, wd730
+ set 6, [hl]
+ hlcoord 0, 0
+ lb bc, 6, 10
+ call TextBoxBorder
+ hlcoord 1, 2
+ ld de, StatusAilmentText1
+ call PlaceString
+ hlcoord 6, 2
+ ld de, StatusAilmentText2
+ call PlaceString
+ ld hl, ViridianSchoolBlackboardText2
+ call PrintText
+ call HandleMenuInput ; pressing up and down is handled in here
+ bit 1, a ; pressed b
+ jr nz, .exitBlackboard
+ bit 4, a ; pressed right
+ jr z, .didNotPressRight
+ ; move cursor to right column
+ ld a, 2
+ ld [wMaxMenuItem], a
+ ld a, 2
+ ld [wTopMenuItemY], a
+ ld a, 6
+ ld [wTopMenuItemX], a
+ 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 [wTopMenuItemY], a
+ ld a, 1
+ ld [wTopMenuItemX], a
+ xor a
+ ld [wMenuItemOffset], a
+ jr .blackboardLoop
+.didNotPressLeftOrRight
+ ld a, [wCurrentMenuItem]
+ ld b, a
+ ld a, [wMenuItemOffset]
+ add b
+ 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 e, a
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ call PrintText
+ jp .blackboardLoop
+.exitBlackboard
+ ld hl, wd730
+ res 6, [hl]
+ call LoadScreenTilesFromBuffer1
+ jp TextScriptEnd
+
+ViridianSchoolBlackboardText1:
+ text_far _ViridianSchoolBlackboardText1
+ text_end
+
+ViridianSchoolBlackboardText2:
+ text_far _ViridianSchoolBlackboardText2
+ text_end
+
+StatusAilmentText1:
+ db " SLP"
+ next " PSN"
+ next " PAR@"
+
+StatusAilmentText2:
+ db " BRN"
+ next " FRZ"
+ next " QUIT@"
+
+ db "@" ; unused
+
+ViridianBlackboardStatusPointers:
+ dw ViridianBlackboardSleepText
+ dw ViridianBlackboardPoisonText
+ dw ViridianBlackboardPrlzText
+ dw ViridianBlackboardBurnText
+ dw ViridianBlackboardFrozenText
+
+ViridianBlackboardSleepText:
+ text_far _ViridianBlackboardSleepText
+ text_end
+
+ViridianBlackboardPoisonText:
+ text_far _ViridianBlackboardPoisonText
+ text_end
+
+ViridianBlackboardPrlzText:
+ text_far _ViridianBlackboardPrlzText
+ text_end
+
+ViridianBlackboardBurnText:
+ text_far _ViridianBlackboardBurnText
+ text_end
+
+ViridianBlackboardFrozenText:
+ text_far _ViridianBlackboardFrozenText
+ text_end
diff --git a/engine/events/hidden_objects/school_notebooks.asm b/engine/events/hidden_objects/school_notebooks.asm
new file mode 100644
index 00000000..96a44ab5
--- /dev/null
+++ b/engine/events/hidden_objects/school_notebooks.asm
@@ -0,0 +1,65 @@
+PrintNotebookText:
+ call EnableAutoTextBoxDrawing
+ ld a, $1
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ ld a, [wHiddenObjectFunctionArgument]
+ jp PrintPredefTextID
+
+TMNotebook::
+ text_far TMNotebookText
+ text_waitbutton
+ text_end
+
+ViridianSchoolNotebook::
+ text_asm
+ ld hl, ViridianSchoolNotebookText1
+ call PrintText
+ call TurnPageSchoolNotebook
+ jr nz, .doneReading
+ ld hl, ViridianSchoolNotebookText2
+ call PrintText
+ call TurnPageSchoolNotebook
+ jr nz, .doneReading
+ ld hl, ViridianSchoolNotebookText3
+ call PrintText
+ call TurnPageSchoolNotebook
+ jr nz, .doneReading
+ ld hl, ViridianSchoolNotebookText4
+ call PrintText
+ ld hl, ViridianSchoolNotebookText5
+ call PrintText
+.doneReading
+ jp TextScriptEnd
+
+TurnPageSchoolNotebook:
+ ld hl, TurnPageText
+ call PrintText
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ ret
+
+TurnPageText:
+ text_far _TurnPageText
+ text_end
+
+ViridianSchoolNotebookText5:
+ text_far _ViridianSchoolNotebookText5
+ text_waitbutton
+ text_end
+
+ViridianSchoolNotebookText1:
+ text_far _ViridianSchoolNotebookText1
+ text_end
+
+ViridianSchoolNotebookText2:
+ text_far _ViridianSchoolNotebookText2
+ text_end
+
+ViridianSchoolNotebookText3:
+ text_far _ViridianSchoolNotebookText3
+ text_end
+
+ViridianSchoolNotebookText4:
+ text_far _ViridianSchoolNotebookText4
+ text_end
diff --git a/engine/events/hidden_objects/town_map.asm b/engine/events/hidden_objects/town_map.asm
new file mode 100644
index 00000000..4284214f
--- /dev/null
+++ b/engine/events/hidden_objects/town_map.asm
@@ -0,0 +1,22 @@
+TownMapText::
+ text_far _TownMapText
+ text_promptbutton
+ text_asm
+ ld a, $1
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ ld hl, wd730
+ set 6, [hl]
+ call GBPalWhiteOutWithDelay3
+ xor a
+ ldh [hWY], a
+ inc a
+ ldh [hAutoBGTransferEnabled], a
+ call LoadFontTilePatterns
+ farcall DisplayTownMap
+ ld hl, wd730
+ res 6, [hl]
+ ld de, TextScriptEnd
+ push de
+ ldh a, [hLoadedROMBank]
+ push af
+ jp CloseTextDisplay
diff --git a/engine/events/hidden_objects/vermilion_gym_trash.asm b/engine/events/hidden_objects/vermilion_gym_trash.asm
new file mode 100644
index 00000000..21dd3ee0
--- /dev/null
+++ b/engine/events/hidden_objects/vermilion_gym_trash.asm
@@ -0,0 +1,134 @@
+PrintTrashText:
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump VermilionGymTrashText
+
+VermilionGymTrashText::
+ text_far _VermilionGymTrashText
+ text_end
+
+GymTrashScript:
+ call EnableAutoTextBoxDrawing
+ ld a, [wHiddenObjectFunctionArgument]
+ ld [wGymTrashCanIndex], a
+
+; Don't do the trash can puzzle if it's already been done.
+ CheckEvent EVENT_2ND_LOCK_OPENED
+ jr z, .ok
+
+ tx_pre_jump VermilionGymTrashText
+
+.ok
+ CheckEventReuseA EVENT_1ST_LOCK_OPENED
+ jr nz, .trySecondLock
+
+ ld a, [wFirstLockTrashCanIndex]
+ ld b, a
+ ld a, [wGymTrashCanIndex]
+ cp b
+ jr z, .openFirstLock
+
+ tx_pre_id VermilionGymTrashText
+ jr .done
+
+.openFirstLock
+; Next can is trying for the second switch.
+ SetEvent EVENT_1ST_LOCK_OPENED
+ callfar Yellow_SampleSecondTrashCan
+ tx_pre_id VermilionGymTrashSuccessText1
+ jr .done
+
+.trySecondLock
+ ld a, [wGymTrashCanIndex]
+ ld b, a
+ ld a, [wSecondLockTrashCanIndex]
+ cp b
+ jr z, .openSecondLock
+ ld a, [wSecondLockTrashCanIndex + 1]
+ cp b
+ jr z, .openSecondLock
+
+; Reset the cans.
+ ResetEvent EVENT_1ST_LOCK_OPENED
+ call Random
+
+ and $e
+ ld [wFirstLockTrashCanIndex], a
+
+ tx_pre_id VermilionGymTrashFailText
+ jr .done
+
+.openSecondLock
+; Completed the trash can puzzle.
+ SetEvent EVENT_2ND_LOCK_OPENED
+ ld hl, wCurrentMapScriptFlags
+ set 6, [hl]
+
+ tx_pre_id VermilionGymTrashSuccessText3
+
+.done
+ jp PrintPredefTextID
+
+GymTrashCans:
+; byte 0: mask for random number
+; bytes 1-4: indices of the trash cans that can have the second lock
+; Note that the mask is simply the number of valid trash can indices that
+; follow. The remaining bytes are filled with -1 to pad the length of each entry
+; to 5 bytes.
+; This is functionally replaced with GymTrashCans3a but was never removed from source.
+
+ db 2, 1, 3, -1, -1 ; 0
+ db 3, 0, 2, 4, -1 ; 1
+ db 2, 1, 5, -1, -1 ; 2
+ db 3, 0, 4, 6, -1 ; 3
+ db 4, 1, 3, 5, 7 ; 4
+ db 3, 2, 4, 8, -1 ; 5
+ db 3, 3, 7, 9, -1 ; 6
+ db 4, 4, 6, 8, 10 ; 7
+ db 3, 5, 7, 11, -1 ; 8
+ db 3, 6, 10, 12, -1 ; 9
+ db 4, 7, 9, 11, 13 ; 10
+ db 3, 8, 10, 14, -1 ; 11
+ db 2, 9, 13, -1, -1 ; 12
+ db 3, 10, 12, 14, -1 ; 13
+ db 2, 11, 13, -1, -1 ; 14
+
+VermilionGymTrashSuccessText1::
+ text_far _VermilionGymTrashSuccessText1
+ text_asm
+ call WaitForSoundToFinish
+ ld a, SFX_SWITCH
+ call PlaySound
+ call WaitForSoundToFinish
+ jp TextScriptEnd
+
+; unused
+VermilionGymTrashSuccessText2::
+ text_far _VermilionGymTrashSuccessText2
+ text_end
+
+; unused
+VermilionGymTrashSuccesPlaySfx:
+ text_asm
+ call WaitForSoundToFinish
+ ld a, SFX_SWITCH
+ call PlaySound
+ call WaitForSoundToFinish
+ jp TextScriptEnd
+
+VermilionGymTrashSuccessText3::
+ text_far _VermilionGymTrashSuccessText3
+ text_asm
+ call WaitForSoundToFinish
+ ld a, SFX_GO_INSIDE
+ call PlaySound
+ call WaitForSoundToFinish
+ jp TextScriptEnd
+
+VermilionGymTrashFailText::
+ text_far _VermilionGymTrashFailText
+ text_asm
+ call WaitForSoundToFinish
+ ld a, SFX_DENIED
+ call PlaySound
+ call WaitForSoundToFinish
+ jp TextScriptEnd
diff --git a/engine/events/in_game_trades.asm b/engine/events/in_game_trades.asm
new file mode 100755
index 00000000..a0a23dfa
--- /dev/null
+++ b/engine/events/in_game_trades.asm
@@ -0,0 +1,350 @@
+DoInGameTradeDialogue:
+; trigger the trade offer/action specified by wWhichTrade
+ call SaveScreenTilesToBuffer2
+ ld hl, TradeMons
+ ld a, [wWhichTrade]
+ ld bc, $e
+ call AddNTimes
+ ld a, [hli]
+ ld [wInGameTradeGiveMonSpecies], a
+ ld a, [hli]
+ ld [wInGameTradeReceiveMonSpecies], a
+ ld a, [hli]
+ push af
+ ld de, wInGameTradeMonNick
+ ld bc, NAME_LENGTH
+ call CopyData
+ pop af
+ ld l, a
+ ld h, 0
+ ld de, InGameTradeTextPointers
+ add hl, hl
+ add hl, de
+ ld a, [hli]
+ ld [wInGameTradeTextPointerTablePointer], a
+ ld a, [hl]
+ ld [wInGameTradeTextPointerTablePointer + 1], a
+ ld a, [wInGameTradeGiveMonSpecies]
+ ld de, wInGameTradeGiveMonName
+ call InGameTrade_GetMonName
+ ld a, [wInGameTradeReceiveMonSpecies]
+ ld de, wInGameTradeReceiveMonName
+ call InGameTrade_GetMonName
+ ld a, $4
+ ld [wInGameTradeTextPointerTableIndex], a
+ ld b, FLAG_TEST
+ call InGameTrade_FlagActionPredef
+ ld a, c
+ and a
+ jr nz, .printText
+; if the trade hasn't been done yet
+ ld a, $0
+ ld [wInGameTradeTextPointerTableIndex], a
+ call .printText
+ ld a, $1
+ ld [wInGameTradeTextPointerTableIndex], a
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ jr nz, .printText
+ call InGameTrade_DoTrade
+ jr c, .printText
+ ld hl, TradedForText
+ call PrintText
+.printText
+ ld hl, wInGameTradeTextPointerTableIndex
+ ld a, [hld] ; wInGameTradeTextPointerTableIndex
+ ld e, a
+ ld d, 0
+ ld a, [hld] ; wInGameTradeTextPointerTablePointer + 1
+ ld l, [hl] ; wInGameTradeTextPointerTablePointer
+ ld h, a
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp PrintText
+
+; copies name of species a to hl
+InGameTrade_GetMonName:
+ push de
+ ld [wd11e], a
+ call GetMonName
+ ld hl, wcd6d
+ pop de
+ ld bc, NAME_LENGTH
+ jp CopyData
+
+INCLUDE "data/events/trades.asm"
+
+InGameTrade_DoTrade:
+ xor a ; NORMAL_PARTY_MENU
+ ld [wPartyMenuTypeOrMessageID], a
+ dec a
+ ld [wUpdateSpritesEnabled], a
+ call DisplayPartyMenu
+ push af
+ call InGameTrade_RestoreScreen
+ pop af
+ ld a, $1
+ jp c, .tradeFailed ; jump if the player didn't select a pokemon
+ ld a, [wInGameTradeGiveMonSpecies]
+ ld b, a
+ ld a, [wcf91]
+ cp b
+ ld a, $2
+ jr nz, .tradeFailed ; jump if the selected mon's species is not the required one
+ ld a, [wWhichPokemon]
+ ld hl, wPartyMon1Level
+ ld bc, wPartyMon2 - wPartyMon1
+ call AddNTimes
+ ld a, [hl]
+ ld [wCurEnemyLVL], a
+ ld b, FLAG_SET
+ call InGameTrade_FlagActionPredef
+ ld hl, ConnectCableText
+ call PrintText
+ ld a, [wWhichPokemon]
+ push af
+ ld a, [wCurEnemyLVL]
+ push af
+ call LoadHpBarAndStatusTilePatterns
+ call InGameTrade_PrepareTradeData
+ predef InternalClockTradeAnim
+ pop af
+ ld [wCurEnemyLVL], a
+ pop af
+ ld [wWhichPokemon], a
+ ld a, [wInGameTradeReceiveMonSpecies]
+ ld [wcf91], a
+ xor a
+ ld [wMonDataLocation], a ; not used
+ ld [wRemoveMonFromBox], a
+ call RemovePokemon
+ ld a, $80 ; prevent the player from naming the mon
+ ld [wMonDataLocation], a
+ call AddPartyMon
+ call InGameTrade_CopyDataToReceivedMon
+ call InGameTrade_CheckForTradeEvo
+ call ClearScreen
+ call InGameTrade_RestoreScreen
+ farcall RedrawMapView
+ and a
+ ld a, $3
+ jr .tradeSucceeded
+.tradeFailed
+ scf
+.tradeSucceeded
+ ld [wInGameTradeTextPointerTableIndex], a
+ ret
+
+InGameTrade_RestoreScreen:
+ call GBPalWhiteOutWithDelay3
+ call RestoreScreenTilesAndReloadTilePatterns
+ call ReloadTilesetTilePatterns
+ call LoadScreenTilesFromBuffer2
+ call Delay3
+ call LoadGBPal
+ ld c, 10
+ call DelayFrames
+ farjp LoadWildData
+
+InGameTrade_PrepareTradeData:
+ ld hl, wTradedPlayerMonSpecies
+ ld a, [wInGameTradeGiveMonSpecies]
+ ld [hli], a ; wTradedPlayerMonSpecies
+ ld a, [wInGameTradeReceiveMonSpecies]
+ ld [hl], a ; wTradedEnemyMonSpecies
+ ld hl, wPartyMonOT
+ ld bc, NAME_LENGTH
+ ld a, [wWhichPokemon]
+ call AddNTimes
+ ld de, wTradedPlayerMonOT
+ ld bc, NAME_LENGTH
+ call InGameTrade_CopyData
+ ld hl, InGameTrade_TrainerString
+ ld de, wTradedEnemyMonOT
+ call InGameTrade_CopyData
+ ld de, wLinkEnemyTrainerName
+ call InGameTrade_CopyData
+ ld hl, wPartyMon1OTID
+ ld bc, wPartyMon2 - wPartyMon1
+ ld a, [wWhichPokemon]
+ call AddNTimes
+ ld de, wTradedPlayerMonOTID
+ ld bc, $2
+ call InGameTrade_CopyData
+ call Random
+ ld hl, hRandomAdd
+ ld de, wTradedEnemyMonOTID
+ jp CopyData
+
+InGameTrade_CopyData:
+ push hl
+ push bc
+ call CopyData
+ pop bc
+ pop hl
+ ret
+
+InGameTrade_CopyDataToReceivedMon:
+ ld hl, wPartyMonNicks
+ ld bc, NAME_LENGTH
+ call InGameTrade_GetReceivedMonPointer
+ ld hl, wInGameTradeMonNick
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld hl, wPartyMonOT
+ ld bc, NAME_LENGTH
+ call InGameTrade_GetReceivedMonPointer
+ ld hl, InGameTrade_TrainerString
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld hl, wPartyMon1OTID
+ ld bc, wPartyMon2 - wPartyMon1
+ call InGameTrade_GetReceivedMonPointer
+ ld hl, wTradedEnemyMonOTID
+ ld bc, $2
+ jp CopyData
+
+; the received mon's index is (partyCount - 1),
+; so this adds bc to hl (partyCount - 1) times and moves the result to de
+InGameTrade_GetReceivedMonPointer:
+ ld a, [wPartyCount]
+ dec a
+ call AddNTimes
+ ld e, l
+ ld d, h
+ ret
+
+InGameTrade_FlagActionPredef:
+ ld hl, wCompletedInGameTradeFlags
+ ld a, [wWhichTrade]
+ ld c, a
+ predef_jump FlagActionPredef
+
+InGameTrade_CheckForTradeEvo:
+ ld a, [wInGameTradeReceiveMonSpecies]
+ cp KADABRA
+ jr z, .tradeEvo
+ cp GRAVELER
+ jr z, .tradeEvo
+ cp MACHOKE
+ jr z, .tradeEvo
+ cp HAUNTER
+ jr z, .tradeEvo
+ ret
+
+.tradeEvo
+ ld a, [wPartyCount]
+ dec a
+ ld [wWhichPokemon], a
+ ld a, $1
+ ld [wForceEvolution], a
+ ld a, LINK_STATE_TRADING
+ ld [wLinkState], a
+ callfar EvolveTradeMon
+ xor a ; LINK_STATE_NONE
+ ld [wLinkState], a
+ jp PlayDefaultMusic
+
+InGameTrade_TrainerString:
+ db "<TRAINER>@@@@@@@@@@"
+
+InGameTradeTextPointers:
+; entries correspond to TRADE_DIALOGSET_* constants
+ dw TradeTextPointers1
+ dw TradeTextPointers2
+ dw TradeTextPointers3
+
+TradeTextPointers1:
+ dw WannaTrade1Text
+ dw NoTrade1Text
+ dw WrongMon1Text
+ dw Thanks1Text
+ dw AfterTrade1Text
+
+TradeTextPointers2:
+ dw WannaTrade2Text
+ dw NoTrade2Text
+ dw WrongMon2Text
+ dw Thanks2Text
+ dw AfterTrade2Text
+
+TradeTextPointers3:
+ dw WannaTrade3Text
+ dw NoTrade3Text
+ dw WrongMon3Text
+ dw Thanks3Text
+ dw AfterTrade3Text
+
+ConnectCableText:
+ text_far _ConnectCableText
+ text_end
+
+TradedForText:
+ text_far _TradedForText
+ sound_get_key_item
+ text_pause
+ text_end
+
+WannaTrade1Text:
+ text_far _WannaTrade1Text
+ text_end
+
+NoTrade1Text:
+ text_far _NoTrade1Text
+ text_end
+
+WrongMon1Text:
+ text_far _WrongMon1Text
+ text_end
+
+Thanks1Text:
+ text_far _Thanks1Text
+ text_end
+
+AfterTrade1Text:
+ text_far _AfterTrade1Text
+ text_end
+
+WannaTrade2Text:
+ text_far _WannaTrade2Text
+ text_end
+
+NoTrade2Text:
+ text_far _NoTrade2Text
+ text_end
+
+WrongMon2Text:
+ text_far _WrongMon2Text
+ text_end
+
+Thanks2Text:
+ text_far _Thanks2Text
+ text_end
+
+AfterTrade2Text:
+ text_far _AfterTrade2Text
+ text_end
+
+WannaTrade3Text:
+ text_far _WannaTrade3Text
+ text_end
+
+NoTrade3Text:
+ text_far _NoTrade3Text
+ text_end
+
+WrongMon3Text:
+ text_far _WrongMon3Text
+ text_end
+
+Thanks3Text:
+ text_far _Thanks3Text
+ text_end
+
+AfterTrade3Text:
+ text_far _AfterTrade3Text
+ text_end
diff --git a/engine/events/oaks_aide.asm b/engine/events/oaks_aide.asm
new file mode 100755
index 00000000..f1801f5c
--- /dev/null
+++ b/engine/events/oaks_aide.asm
@@ -0,0 +1,71 @@
+OaksAideScript:
+ ld hl, OaksAideHiText
+ call PrintText
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ jr nz, .choseNo
+ ld hl, wPokedexOwned
+ ld b, wPokedexOwnedEnd - wPokedexOwned
+ call CountSetBits
+ ld a, [wNumSetBits]
+ ldh [hOaksAideNumMonsOwned], a
+ ld b, a
+ ldh a, [hOaksAideRequirement]
+ cp b
+ jr z, .giveItem
+ jr nc, .notEnoughOwnedMons
+.giveItem
+ ld hl, OaksAideHereYouGoText
+ call PrintText
+ ldh a, [hOaksAideRewardItem]
+ ld b, a
+ ld c, 1
+ call GiveItem
+ jr nc, .bagFull
+ ld hl, OaksAideGotItemText
+ call PrintText
+ ld a, OAKS_AIDE_GOT_ITEM
+ jr .done
+.bagFull
+ ld hl, OaksAideNoRoomText
+ call PrintText
+ xor a ; OAKS_AIDE_BAG_FULL
+ jr .done
+.notEnoughOwnedMons
+ ld hl, OaksAideUhOhText
+ call PrintText
+ ld a, OAKS_AIDE_NOT_ENOUGH_MONS
+ jr .done
+.choseNo
+ ld hl, OaksAideComeBackText
+ call PrintText
+ ld a, OAKS_AIDE_REFUSED
+.done
+ ldh [hOaksAideResult], a
+ ret
+
+OaksAideHiText:
+ text_far _OaksAideHiText
+ text_end
+
+OaksAideUhOhText:
+ text_far _OaksAideUhOhText
+ text_end
+
+OaksAideComeBackText:
+ text_far _OaksAideComeBackText
+ text_end
+
+OaksAideHereYouGoText:
+ text_far _OaksAideHereYouGoText
+ text_end
+
+OaksAideGotItemText:
+ text_far _OaksAideGotItemText
+ sound_get_item_1
+ text_end
+
+OaksAideNoRoomText:
+ text_far _OaksAideNoRoomText
+ text_end
diff --git a/engine/overworld/pewter_guys.asm b/engine/events/pewter_guys.asm
index 532fa4bf..532fa4bf 100755
--- a/engine/overworld/pewter_guys.asm
+++ b/engine/events/pewter_guys.asm
diff --git a/engine/events/pick_up_item.asm b/engine/events/pick_up_item.asm
new file mode 100644
index 00000000..548db5be
--- /dev/null
+++ b/engine/events/pick_up_item.asm
@@ -0,0 +1,54 @@
+PickUpItem:
+ call EnableAutoTextBoxDrawing
+
+ ldh a, [hSpriteIndexOrTextID]
+ ld b, a
+ ld hl, wMissableObjectList
+.missableObjectsListLoop
+ ld a, [hli]
+ cp $ff
+ ret z
+ cp b
+ jr z, .isMissable
+ inc hl
+ jr .missableObjectsListLoop
+
+.isMissable
+ ld a, [hl]
+ ldh [hMissableObjectIndex], a
+
+ ld hl, wMapSpriteExtraData
+ ldh a, [hSpriteIndexOrTextID]
+ dec a
+ add a
+ ld d, 0
+ ld e, a
+ add hl, de
+ ld a, [hl]
+ ld b, a ; item
+ ld c, 1 ; quantity
+ call GiveItem
+ jr nc, .BagFull
+
+ ldh a, [hMissableObjectIndex]
+ ld [wMissableObjectIndex], a
+ predef HideObject
+ ld a, 1
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ ld hl, FoundItemText
+ jr .print
+
+.BagFull
+ ld hl, NoMoreRoomForItemText
+.print
+ call PrintText
+ ret
+
+FoundItemText:
+ text_far _FoundItemText
+ sound_get_item_1
+ text_end
+
+NoMoreRoomForItemText:
+ text_far _NoMoreRoomForItemText
+ text_end
diff --git a/engine/events/poison.asm b/engine/events/poison.asm
new file mode 100644
index 00000000..9f3ad391
--- /dev/null
+++ b/engine/events/poison.asm
@@ -0,0 +1,151 @@
+ApplyOutOfBattlePoisonDamage:
+ ld a, [wd730]
+ add a
+ jp c, .noBlackOut ; no black out if joypad states are being simulated
+ ld a, [wd492]
+ bit 7, a
+ jp nz, .noBlackOut
+ ld a, [wd72e]
+ bit 6, a
+ jp nz, .noBlackOut
+ ld a, [wPartyCount]
+ and a
+ jp z, .noBlackOut
+ call IncrementDayCareMonExp
+ call Func_c4c7
+ ld a, [wStepCounter]
+ and $3 ; is the counter a multiple of 4?
+ jp nz, .skipPoisonEffectAndSound ; only apply poison damage every fourth step
+ ld [wWhichPokemon], a
+ ld hl, wPartyMon1Status
+ ld de, wPartySpecies
+.applyDamageLoop
+ ld a, [hl]
+ and (1 << PSN)
+ jr z, .nextMon2 ; not poisoned
+ dec hl
+ dec hl
+ ld a, [hld]
+ ld b, a
+ ld a, [hli]
+ or b
+ jr z, .nextMon ; already fainted
+; subtract 1 from HP
+ ld a, [hl]
+ dec a
+ ld [hld], a
+ inc a
+ jr nz, .noBorrow
+; borrow 1 from upper byte of HP
+ dec [hl]
+ inc hl
+ jr .nextMon
+.noBorrow
+ ld a, [hli]
+ or [hl]
+ jr nz, .nextMon ; didn't faint from damage
+; the mon fainted from the damage
+ push hl
+ inc hl
+ inc hl
+ ld [hl], a
+ ld a, [de]
+ ld [wd11e], a
+ push de
+ ld a, [wWhichPokemon]
+ ld hl, wPartyMonNicks
+ call GetPartyMonName
+ xor a
+ ld [wJoyIgnore], a
+ call EnableAutoTextBoxDrawing
+ ld a, TEXT_MON_FAINTED
+ ldh [hSpriteIndexOrTextID], a
+ call DisplayTextID
+ callfar IsThisPartymonStarterPikachu_Party
+ jr nc, .curMonNotPlayerPikachu
+ ld e, $3
+ callfar PlayPikachuSoundClip
+ calladb_ModifyPikachuHappiness PIKAHAPPY_PSNFNT
+.curMonNotPlayerPikachu
+ pop de
+ pop hl
+.nextMon
+ inc hl
+ inc hl
+.nextMon2
+ inc de
+ ld a, [de]
+ inc a
+ jr z, .applyDamageLoopDone
+ ld bc, wPartyMon2 - wPartyMon1
+ add hl, bc
+ push hl
+ ld hl, wWhichPokemon
+ inc [hl]
+ pop hl
+ jr .applyDamageLoop
+.applyDamageLoopDone
+ ld hl, wPartyMon1Status
+ ld a, [wPartyCount]
+ ld d, a
+ ld e, 0
+.countPoisonedLoop
+ ld a, [hl]
+ and (1 << PSN)
+ or e
+ ld e, a
+ ld bc, wPartyMon2 - wPartyMon1
+ add hl, bc
+ dec d
+ jr nz, .countPoisonedLoop
+ ld a, e
+ and a ; are any party members poisoned?
+ jr z, .skipPoisonEffectAndSound
+ ld b, $2
+ predef ChangeBGPalColor0_4Frames ; change BG white to dark grey for 4 frames
+ ld a, SFX_POISONED
+ call PlaySound
+.skipPoisonEffectAndSound
+ predef AnyPartyAlive
+ ld a, d
+ and a
+ jr nz, .noBlackOut
+ call EnableAutoTextBoxDrawing
+ ld a, TEXT_BLACKED_OUT
+ ldh [hSpriteIndexOrTextID], a
+ call DisplayTextID
+ ld hl, wd72e
+ set 5, [hl]
+ ld a, $ff
+ jr .done
+.noBlackOut
+ xor a
+.done
+ ld [wOutOfBattleBlackout], a
+ ret
+
+Func_c4c7:
+ ld a, [wStepCounter]
+ and a
+ jr nz, .asm_c4de
+ call Random
+ and $1
+ jr z, .asm_c4de
+ calladb_ModifyPikachuHappiness $6
+.asm_c4de
+ ld hl, wPikachuMood
+ ld a, [hl]
+ cp $80
+ jr z, .asm_c4ef
+ jr c, .asm_c4ea
+ dec a
+ dec a
+.asm_c4ea
+ inc a
+ ld [hl], a
+ cp $80
+ ret nz
+.asm_c4ef
+ xor a
+ ld [wd49c], a
+ ret
diff --git a/engine/events/pokecenter.asm b/engine/events/pokecenter.asm
new file mode 100755
index 00000000..e007030a
--- /dev/null
+++ b/engine/events/pokecenter.asm
@@ -0,0 +1,149 @@
+DisplayPokemonCenterDialogue_::
+ ld a, [wCurMap]
+ cp PEWTER_POKECENTER
+ jr nz, .regularCenter
+ call CheckPikachuFollowingPlayer
+ jr z, .regularCenter
+ ld hl, LooksContentText ; if pikachu is sleeping, don't heal
+ call PrintText
+ ret
+.regularCenter
+ call SaveScreenTilesToBuffer1 ; save screen
+ ld hl, PokemonCenterWelcomeText
+ call PrintText
+ ld hl, wd72e
+ bit 2, [hl]
+ set 1, [hl]
+ set 2, [hl]
+ jr nz, .skipShallWeHealYourPokemon
+ ld hl, ShallWeHealYourPokemonText
+ call PrintText
+.skipShallWeHealYourPokemon
+ call YesNoChoicePokeCenter ; yes/no menu
+ call UpdateSprites
+ ld a, [wCurrentMenuItem]
+ and a
+ jp nz, .declinedHealing ; if the player chose No
+ call SetLastBlackoutMap
+ callfar IsStarterPikachuInOurParty
+ jr nc, .notHealingPlayerPikachu
+ call CheckPikachuFollowingPlayer
+ jr nz, .notHealingPlayerPikachu
+ call LoadCurrentMapView
+ call Delay3
+ call UpdateSprites
+ callfar PikachuWalksToNurseJoy ; todo
+.notHealingPlayerPikachu
+ ld hl, NeedYourPokemonText
+ call PrintText
+ ld c, 64
+ call DelayFrames
+ call CheckPikachuFollowingPlayer
+ jr nz, .playerPikachuNotOnScreen
+ call DisablePikachuOverworldSpriteDrawing
+ callfar IsStarterPikachuInOurParty
+ call c, Func_6eaa
+.playerPikachuNotOnScreen
+ lb bc, 1, 8
+ call Func_6ebb
+ ld c, 30
+ call DelayFrames
+ farcall AnimateHealingMachine ; do the healing machine animation
+ predef HealParty
+ xor a
+ ld [wAudioFadeOutControl], a
+ ld a, [wAudioSavedROMBank]
+ ld [wAudioROMBank], a
+ ld a, [wMapMusicSoundID]
+ ld [wLastMusicSoundID], a
+ ld [wNewSoundID], a
+ call PlaySound
+ call CheckPikachuFollowingPlayer
+ jr nz, .doNotReturnPikachu
+ callfar IsStarterPikachuInOurParty
+ call c, Func_6eaa
+ ld a, $5
+ ld [wPikachuSpawnState], a
+ call EnablePikachuOverworldSpriteDrawing
+.doNotReturnPikachu
+ lb bc, 1, 0
+ call Func_6ebb
+ ld hl, PokemonFightingFitText
+ call PrintText
+ callfar IsStarterPikachuInOurParty
+ jr nc, .notInParty
+ lb bc, 15, 0
+ call Func_6ebb
+.notInParty
+ call LoadCurrentMapView
+ call Delay3
+ call UpdateSprites
+ callfar ReloadWalkingTilePatterns
+ ld a, $1
+ ldh [hSpriteIndex], a
+ ld a, $1
+ ldh [hSpriteImageIndex], a
+ call SpriteFunc_34a1
+ ld c, 40
+ call DelayFrames
+ call UpdateSprites
+ call LoadFontTilePatterns
+ jr .done
+.declinedHealing
+ call LoadScreenTilesFromBuffer1 ; restore screen
+.done
+ ld hl, PokemonCenterFarewellText
+ call PrintText
+ call UpdateSprites
+ ret
+
+Func_6eaa:
+ ld a, $1
+ ldh [hSpriteIndex], a
+ ld a, $4
+ ldh [hSpriteImageIndex], a
+ call SpriteFunc_34a1
+ ld c, 64
+ call DelayFrames
+ ret
+
+Func_6ebb:
+ ld a, b
+ ldh [hSpriteIndex], a
+ ld a, c
+ ldh [hSpriteImageIndex], a
+ push bc
+ call SetSpriteFacingDirectionAndDelay
+ pop bc
+ ld a, b
+ ldh [hSpriteIndex], a
+ ld a, c
+ ldh [hSpriteImageIndex], a
+ call SpriteFunc_34a1
+ ret
+
+PokemonCenterWelcomeText:
+ text_far _PokemonCenterWelcomeText
+ text_end
+
+ShallWeHealYourPokemonText:
+ text_pause
+ text_far _ShallWeHealYourPokemonText
+ text_end
+
+NeedYourPokemonText:
+ text_far _NeedYourPokemonText
+ text_end
+
+PokemonFightingFitText:
+ text_far _PokemonFightingFitText
+ text_end
+
+PokemonCenterFarewellText:
+ text_pause
+ text_far _PokemonCenterFarewellText
+ text_end
+
+LooksContentText:
+ text_far _LooksContentText
+ text_end
diff --git a/engine/events/pokedex_rating.asm b/engine/events/pokedex_rating.asm
new file mode 100755
index 00000000..1086257a
--- /dev/null
+++ b/engine/events/pokedex_rating.asm
@@ -0,0 +1,138 @@
+DisplayDexRating:
+ ld hl, wPokedexSeen
+ ld b, wPokedexSeenEnd - wPokedexSeen
+ call CountSetBits
+ ld a, [wNumSetBits]
+ ldh [hDexRatingNumMonsSeen], a
+ ld hl, wPokedexOwned
+ ld b, wPokedexOwnedEnd - wPokedexOwned
+ call CountSetBits
+ ld a, [wNumSetBits]
+ ldh [hDexRatingNumMonsOwned], a
+ ld hl, DexRatingsTable
+.findRating
+ ld a, [hli]
+ ld b, a
+ ldh a, [hDexRatingNumMonsOwned]
+ cp b
+ jr c, .foundRating
+ inc hl
+ inc hl
+ jr .findRating
+.foundRating
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a ; load text pointer into hl
+ CheckAndResetEventA EVENT_HALL_OF_FAME_DEX_RATING
+ jr nz, .hallOfFame
+ push hl
+ ld hl, DexCompletionText
+ call PrintText
+ pop hl
+ call PrintText
+ farcall PlayPokedexRatingSfx
+ jp WaitForTextScrollButtonPress
+.hallOfFame
+ ld de, wDexRatingNumMonsSeen
+ ldh a, [hDexRatingNumMonsSeen]
+ ld [de], a
+ inc de
+ ldh a, [hDexRatingNumMonsOwned]
+ ld [de], a
+ inc de
+.copyRatingTextLoop
+ ld a, [hli]
+ cp "@"
+ jr z, .doneCopying
+ ld [de], a
+ inc de
+ jr .copyRatingTextLoop
+.doneCopying
+ ld [de], a
+ ret
+
+DexCompletionText:
+ text_far _DexCompletionText
+ text_end
+
+DexRatingsTable:
+ dbw 10, DexRatingText_Own0To9
+ dbw 20, DexRatingText_Own10To19
+ dbw 30, DexRatingText_Own20To29
+ dbw 40, DexRatingText_Own30To39
+ dbw 50, DexRatingText_Own40To49
+ dbw 60, DexRatingText_Own50To59
+ dbw 70, DexRatingText_Own60To69
+ dbw 80, DexRatingText_Own70To79
+ dbw 90, DexRatingText_Own80To89
+ dbw 100, DexRatingText_Own90To99
+ dbw 110, DexRatingText_Own100To109
+ dbw 120, DexRatingText_Own110To119
+ dbw 130, DexRatingText_Own120To129
+ dbw 140, DexRatingText_Own130To139
+ dbw 150, DexRatingText_Own140To149
+ dbw NUM_POKEMON + 1, DexRatingText_Own150To151
+
+DexRatingText_Own0To9:
+ text_far _DexRatingText_Own0To9
+ text_end
+
+DexRatingText_Own10To19:
+ text_far _DexRatingText_Own10To19
+ text_end
+
+DexRatingText_Own20To29:
+ text_far _DexRatingText_Own20To29
+ text_end
+
+DexRatingText_Own30To39:
+ text_far _DexRatingText_Own30To39
+ text_end
+
+DexRatingText_Own40To49:
+ text_far _DexRatingText_Own40To49
+ text_end
+
+DexRatingText_Own50To59:
+ text_far _DexRatingText_Own50To59
+ text_end
+
+DexRatingText_Own60To69:
+ text_far _DexRatingText_Own60To69
+ text_end
+
+DexRatingText_Own70To79:
+ text_far _DexRatingText_Own70To79
+ text_end
+
+DexRatingText_Own80To89:
+ text_far _DexRatingText_Own80To89
+ text_end
+
+DexRatingText_Own90To99:
+ text_far _DexRatingText_Own90To99
+ text_end
+
+DexRatingText_Own100To109:
+ text_far _DexRatingText_Own100To109
+ text_end
+
+DexRatingText_Own110To119:
+ text_far _DexRatingText_Own110To119
+ text_end
+
+DexRatingText_Own120To129:
+ text_far _DexRatingText_Own120To129
+ text_end
+
+DexRatingText_Own130To139:
+ text_far _DexRatingText_Own130To139
+ text_end
+
+DexRatingText_Own140To149:
+ text_far _DexRatingText_Own140To149
+ text_end
+
+DexRatingText_Own150To151:
+ text_far _DexRatingText_Own150To151
+ text_end
diff --git a/engine/events/pokemart.asm b/engine/events/pokemart.asm
new file mode 100755
index 00000000..c7cb8115
--- /dev/null
+++ b/engine/events/pokemart.asm
@@ -0,0 +1,272 @@
+DisplayPokemartDialogue_::
+ ld a, [wListScrollOffset]
+ ld [wSavedListScrollOffset], a
+ call UpdateSprites
+ xor a
+ ld [wBoughtOrSoldItemInMart], a
+.loop
+ xor a
+ ld [wListScrollOffset], a
+ ld [wCurrentMenuItem], a
+ ld [wPlayerMonNumber], a
+ inc a
+ ld [wPrintItemPrices], a
+ ld a, MONEY_BOX
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ ld a, BUY_SELL_QUIT_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+
+; This code is useless. It copies the address of the pokemart's inventory to hl,
+; but the address is never used.
+ ld hl, wItemListPointer
+ ld a, [hli]
+ ld l, [hl]
+ ld h, a
+
+ ld a, [wMenuExitMethod]
+ cp CANCELLED_MENU
+ jp z, .done
+ ld a, [wChosenMenuItem]
+ and a ; buying?
+ jp z, .buyMenu
+ dec a ; selling?
+ jp z, .sellMenu
+ dec a ; quitting?
+ jp z, .done
+.sellMenu
+
+; the same variables are set again below, so this code has no effect
+ xor a
+ ld [wPrintItemPrices], a
+ ld a, INIT_BAG_ITEM_LIST
+ ld [wInitListType], a
+ callfar InitList
+
+ ld a, [wNumBagItems]
+ and a
+ jp z, .bagEmpty
+ ld hl, PokemonSellingGreetingText
+ call PrintText
+ call SaveScreenTilesToBuffer1 ; save screen
+.sellMenuLoop
+ call LoadScreenTilesFromBuffer1 ; restore saved screen
+ ld a, MONEY_BOX
+ ld [wTextBoxID], a
+ call DisplayTextBoxID ; draw money text box
+ ld hl, wNumBagItems
+ ld a, l
+ ld [wListPointer], a
+ ld a, h
+ ld [wListPointer + 1], a
+ xor a
+ ld [wPrintItemPrices], a
+ ld [wCurrentMenuItem], a
+ ld a, ITEMLISTMENU
+ ld [wListMenuID], a
+ call DisplayListMenuID
+ jp c, .returnToMainPokemartMenu ; if the player closed the menu
+.confirmItemSale ; if the player is trying to sell a specific item
+ call IsKeyItem
+ ld a, [wIsKeyItem]
+ and a
+ jr nz, .unsellableItem
+ ld a, [wcf91]
+ call IsItemHM
+ jr c, .unsellableItem
+ ld a, PRICEDITEMLISTMENU
+ ld [wListMenuID], a
+ ldh [hHalveItemPrices], a ; halve prices when selling
+ call DisplayChooseQuantityMenu
+ inc a
+ jr z, .sellMenuLoop ; if the player closed the choose quantity menu with the B button
+ ld hl, PokemartTellSellPriceText
+ lb bc, 14, 1 ; location that PrintText always prints to, this is useless
+ call PrintText
+ hlcoord 14, 7
+ lb bc, 8, 15
+ ld a, TWO_OPTION_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID ; yes/no menu
+ ld a, [wMenuExitMethod]
+ cp CHOSE_SECOND_ITEM
+ jr z, .sellMenuLoop ; if the player chose No or pressed the B button
+
+; The following code is supposed to check if the player chose No, but the above
+; check already catches it.
+ ld a, [wChosenMenuItem]
+ dec a
+ jr z, .sellMenuLoop
+
+.sellItem
+ ld a, [wBoughtOrSoldItemInMart]
+ and a
+ jr nz, .skipSettingFlag1
+ inc a
+ ld [wBoughtOrSoldItemInMart], a
+.skipSettingFlag1
+ call AddAmountSoldToMoney
+ ld hl, wNumBagItems
+ call RemoveItemFromInventory
+ jp .sellMenuLoop
+.unsellableItem
+ ld hl, PokemartUnsellableItemText
+ call PrintText
+ jp .returnToMainPokemartMenu
+.bagEmpty
+ ld hl, PokemartItemBagEmptyText
+ call PrintText
+ call SaveScreenTilesToBuffer1
+ jp .returnToMainPokemartMenu
+.buyMenu
+
+; the same variables are set again below, so this code has no effect
+ ld a, 1
+ ld [wPrintItemPrices], a
+ ld a, INIT_OTHER_ITEM_LIST
+ ld [wInitListType], a
+ callfar InitList
+
+ ld hl, PokemartBuyingGreetingText
+ call PrintText
+ call SaveScreenTilesToBuffer1
+.buyMenuLoop
+ call LoadScreenTilesFromBuffer1
+ ld a, MONEY_BOX
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ ld hl, wItemList
+ ld a, l
+ ld [wListPointer], a
+ ld a, h
+ ld [wListPointer + 1], a
+ xor a
+ ld [wCurrentMenuItem], a
+ inc a
+ ld [wPrintItemPrices], a
+ inc a ; a = 2 (PRICEDITEMLISTMENU)
+ ld [wListMenuID], a
+ call DisplayListMenuID
+ jr c, .returnToMainPokemartMenu ; if the player closed the menu
+ ld a, 99
+ ld [wMaxItemQuantity], a
+ xor a
+ ldh [hHalveItemPrices], a ; don't halve item prices when buying
+ call DisplayChooseQuantityMenu
+ inc a
+ jr z, .buyMenuLoop ; if the player closed the choose quantity menu with the B button
+ ld a, [wcf91] ; item ID
+ ld [wd11e], a ; store item ID for GetItemName
+ call GetItemName
+ call CopyStringToCF4B ; copy name to wcf4b
+ ld hl, PokemartTellBuyPriceText
+ call PrintText
+ hlcoord 14, 7
+ lb bc, 8, 15
+ ld a, TWO_OPTION_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID ; yes/no menu
+ ld a, [wMenuExitMethod]
+ cp CHOSE_SECOND_ITEM
+ jp z, .buyMenuLoop ; if the player chose No or pressed the B button
+
+; The following code is supposed to check if the player chose No, but the above
+; check already catches it.
+ ld a, [wChosenMenuItem]
+ dec a
+ jr z, .buyMenuLoop
+
+.buyItem
+ call .isThereEnoughMoney
+ jr c, .notEnoughMoney
+ ld hl, wNumBagItems
+ call AddItemToInventory
+ jr nc, .bagFull
+ call SubtractAmountPaidFromMoney
+ ld a, [wBoughtOrSoldItemInMart]
+ and a
+ jr nz, .skipSettingFlag2
+ ld a, 1
+ ld [wBoughtOrSoldItemInMart], a
+.skipSettingFlag2
+ ld a, SFX_PURCHASE
+ call PlaySoundWaitForCurrent
+ call WaitForSoundToFinish
+ ld hl, PokemartBoughtItemText
+ call PrintText
+ jp .buyMenuLoop
+.returnToMainPokemartMenu
+ call LoadScreenTilesFromBuffer1
+ ld a, MONEY_BOX
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ ld hl, PokemartAnythingElseText
+ call PrintText
+ jp .loop
+.isThereEnoughMoney
+ ld de, wPlayerMoney
+ ld hl, hMoney
+ ld c, 3 ; length of money in bytes
+ jp StringCmp
+.notEnoughMoney
+ ld hl, PokemartNotEnoughMoneyText
+ call PrintText
+ jr .returnToMainPokemartMenu
+.bagFull
+ ld hl, PokemartItemBagFullText
+ call PrintText
+ jr .returnToMainPokemartMenu
+.done
+ ld hl, PokemartThankYouText
+ call PrintText
+ ld a, 1
+ ld [wUpdateSpritesEnabled], a
+ call UpdateSprites
+ ld a, [wSavedListScrollOffset]
+ ld [wListScrollOffset], a
+ ret
+
+PokemartBuyingGreetingText:
+ text_far _PokemartBuyingGreetingText
+ text_end
+
+PokemartTellBuyPriceText:
+ text_far _PokemartTellBuyPriceText
+ text_end
+
+PokemartBoughtItemText:
+ text_far _PokemartBoughtItemText
+ text_end
+
+PokemartNotEnoughMoneyText:
+ text_far _PokemartNotEnoughMoneyText
+ text_end
+
+PokemartItemBagFullText:
+ text_far _PokemartItemBagFullText
+ text_end
+
+PokemonSellingGreetingText:
+ text_far _PokemonSellingGreetingText
+ text_end
+
+PokemartTellSellPriceText:
+ text_far _PokemartTellSellPriceText
+ text_end
+
+PokemartItemBagEmptyText:
+ text_far _PokemartItemBagEmptyText
+ text_end
+
+PokemartUnsellableItemText:
+ text_far _PokemartUnsellableItemText
+ text_end
+
+PokemartThankYouText:
+ text_far _PokemartThankYouText
+ text_end
+
+PokemartAnythingElseText:
+ text_far _PokemartAnythingElseText
+ text_end
diff --git a/engine/events/prize_menu.asm b/engine/events/prize_menu.asm
new file mode 100755
index 00000000..87244119
--- /dev/null
+++ b/engine/events/prize_menu.asm
@@ -0,0 +1,305 @@
+CeladonPrizeMenu::
+ ld b, COIN_CASE
+ call IsItemInBag
+ jr nz, .havingCoinCase
+ ld hl, RequireCoinCaseTextPtr
+ jp PrintText
+.havingCoinCase
+ ld hl, wd730
+ set 6, [hl] ; disable letter-printing delay
+ ld hl, ExchangeCoinsForPrizesTextPtr
+ call PrintText
+; the following are the menu settings
+ xor a
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ ld a, A_BUTTON | B_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, $03
+ ld [wMaxMenuItem], a
+ ld a, $04
+ ld [wTopMenuItemY], a
+ ld a, $01
+ ld [wTopMenuItemX], a
+ call PrintPrizePrice
+ hlcoord 0, 2
+ lb bc, 8, 16
+ call TextBoxBorder
+ call GetPrizeMenuId
+ call UpdateSprites
+ ld hl, WhichPrizeTextPtr
+ call PrintText
+ call HandleMenuInput ; menu choice handler
+ bit 1, a ; keypress = B (Cancel)
+ jr nz, .noChoice
+ ld a, [wCurrentMenuItem]
+ cp 3 ; "NO,THANKS" choice
+ jr z, .noChoice
+ call HandlePrizeChoice
+.noChoice
+ ld hl, wd730
+ res 6, [hl]
+ ret
+
+RequireCoinCaseTextPtr:
+ text_far _RequireCoinCaseText
+ text_waitbutton
+ text_end
+
+ExchangeCoinsForPrizesTextPtr:
+ text_far _ExchangeCoinsForPrizesText
+ text_end
+
+WhichPrizeTextPtr:
+ text_far _WhichPrizeText
+ text_end
+
+GetPrizeMenuId:
+; determine which one among the three
+; prize-texts has been selected
+; using the text ID (stored in [hSpriteIndexOrTextID])
+; load the three prizes at wd13d-wd13f
+; load the three prices at wd141-wd146
+; display the three prizes' names
+; (distinguishing between Pokemon names
+; and Items (specifically TMs) names)
+ ldh a, [hSpriteIndexOrTextID]
+ sub 3 ; prize-texts' id are 3, 4 and 5
+ ld [wWhichPrizeWindow], a ; prize-texts' id (relative, i.e. 0, 1 or 2)
+ add a
+ add a
+ ld d, 0
+ ld e, a
+ ld hl, PrizeDifferentMenuPtrs
+ add hl, de
+ ld a, [hli]
+ ld d, [hl]
+ ld e, a
+ inc hl
+ push hl
+ ld hl, wPrize1
+ call CopyString
+ pop hl
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, wPrize1Price
+ ld bc, 6
+ call CopyData
+ ld a, [wWhichPrizeWindow]
+ cp 2 ;is TM_menu?
+ jr nz, .putMonName
+ ld a, [wPrize1]
+ ld [wd11e], a
+ call GetItemName
+ hlcoord 2, 4
+ call PlaceString
+ ld a, [wPrize2]
+ ld [wd11e], a
+ call GetItemName
+ hlcoord 2, 6
+ call PlaceString
+ ld a, [wPrize3]
+ ld [wd11e], a
+ call GetItemName
+ hlcoord 2, 8
+ call PlaceString
+ jr .putNoThanksText
+.putMonName
+ ld a, [wPrize1]
+ ld [wd11e], a
+ call GetMonName
+ hlcoord 2, 4
+ call PlaceString
+ ld a, [wPrize2]
+ ld [wd11e], a
+ call GetMonName
+ hlcoord 2, 6
+ call PlaceString
+ ld a, [wPrize3]
+ ld [wd11e], a
+ call GetMonName
+ hlcoord 2, 8
+ call PlaceString
+.putNoThanksText
+ hlcoord 2, 10
+ ld de, NoThanksText
+ call PlaceString
+; put prices on the right side of the textbox
+ ld de, wPrize1Price
+ hlcoord 13, 5
+; reg. c:
+; [low nybble] number of bytes
+; [bits 765 = %100] space-padding (not zero-padding)
+ ld c, (1 << 7 | 2)
+ call PrintBCDNumber
+ ld de, wPrize2Price
+ hlcoord 13, 7
+ ld c, (1 << 7 | 2)
+ call PrintBCDNumber
+ ld de, wPrize3Price
+ hlcoord 13, 9
+ ld c, (1 << 7 | 2)
+ jp PrintBCDNumber
+
+NoThanksText:
+ db "NO THANKS@"
+
+INCLUDE "data/events/prizes.asm"
+
+PrintPrizePrice:
+ hlcoord 11, 0
+ lb bc, 1, 7
+ call TextBoxBorder
+ call UpdateSprites
+ hlcoord 12, 0
+ ld de, .CoinString
+ call PlaceString
+ hlcoord 13, 1
+ ld de, .SixSpacesString
+ call PlaceString
+ hlcoord 13, 1
+ ld de, wPlayerCoins
+ ld c, %10000010
+ call PrintBCDNumber
+ ret
+
+.CoinString:
+ db "COIN@"
+
+.SixSpacesString:
+ db " @"
+
+LoadCoinsToSubtract:
+ ld a, [wWhichPrize]
+ add a
+ ld d, 0
+ ld e, a
+ ld hl, wPrize1Price
+ add hl, de ; get selected prize's price
+ xor a
+ ldh [hUnusedCoinsByte], a
+ ld a, [hli]
+ ldh [hCoins], a
+ ld a, [hl]
+ ldh [hCoins + 1], a
+ ret
+
+HandlePrizeChoice:
+ ld a, [wCurrentMenuItem]
+ ld [wWhichPrize], a
+ ld d, 0
+ ld e, a
+ ld hl, wPrize1
+ add hl, de
+ ld a, [hl]
+ ld [wd11e], a
+ ld a, [wWhichPrizeWindow]
+ cp 2 ; is prize a TM?
+ jr nz, .getMonName
+ call GetItemName
+ jr .givePrize
+.getMonName
+ call GetMonName
+.givePrize
+ ld hl, SoYouWantPrizeTextPtr
+ call PrintText
+ call YesNoChoice
+ ld a, [wCurrentMenuItem] ; yes/no answer (Y=0, N=1)
+ and a
+ jr nz, .printOhFineThen
+ call LoadCoinsToSubtract
+ call HasEnoughCoins
+ jr c, .notEnoughCoins
+ ld a, [wWhichPrizeWindow]
+ cp $02
+ jr nz, .giveMon
+ ld a, [wd11e]
+ ld b, a
+ ld a, 1
+ ld c, a
+ call GiveItem
+ jr nc, .bagFull
+ jr .subtractCoins
+.giveMon
+ ld a, [wd11e]
+ ld [wcf91], a
+ push af
+ call GetPrizeMonLevel
+ ld c, a
+ pop af
+ ld b, a
+ call GivePokemon
+
+; If either the party or box was full, wait after displaying message.
+ push af
+ ld a, [wAddedToParty]
+ and a
+ call z, WaitForTextScrollButtonPress
+ pop af
+
+; If the mon couldn't be given to the player (because both the party and box
+; were full), return without subtracting coins.
+ ret nc
+
+.subtractCoins
+ call LoadCoinsToSubtract
+ ld hl, hCoins + 1
+ ld de, wPlayerCoins + 1
+ ld c, $02 ; how many bytes
+ predef SubBCDPredef
+ jp PrintPrizePrice
+.bagFull
+ ld hl, PrizeRoomBagIsFullTextPtr
+ jp PrintText
+.notEnoughCoins
+ ld hl, SorryNeedMoreCoinsText
+ jp PrintText
+.printOhFineThen
+ ld hl, OhFineThenTextPtr
+ jp PrintText
+
+UnknownPrizeData:
+; XXX what's this?
+ db $00,$01,$00,$01,$00,$01,$00,$00,$01
+
+HereYouGoTextPtr:
+ text_far _HereYouGoText
+ text_waitbutton
+ text_end
+
+SoYouWantPrizeTextPtr:
+ text_far _SoYouWantPrizeText
+ text_end
+
+SorryNeedMoreCoinsText:
+ text_far _SorryNeedMoreCoinsText
+ text_waitbutton
+ text_end
+
+PrizeRoomBagIsFullTextPtr:
+ text_far _OopsYouDontHaveEnoughRoomText
+ text_waitbutton
+ text_end
+
+OhFineThenTextPtr:
+ text_far _OhFineThenText
+ text_waitbutton
+ text_end
+
+GetPrizeMonLevel:
+ ld a, [wcf91]
+ ld b, a
+ ld hl, PrizeMonLevelDictionary
+.loop
+ ld a, [hli]
+ cp b
+ jr z, .matchFound
+ inc hl
+ jr .loop
+.matchFound
+ ld a, [hl]
+ ld [wCurEnemyLVL], a
+ ret
+
+INCLUDE "data/events/prize_mon_levels.asm"
diff --git a/engine/events/saffron_guards.asm b/engine/events/saffron_guards.asm
new file mode 100755
index 00000000..bf30b8c5
--- /dev/null
+++ b/engine/events/saffron_guards.asm
@@ -0,0 +1,15 @@
+RemoveGuardDrink::
+ ld hl, GuardDrinksList
+.drinkLoop
+ ld a, [hli]
+ ldh [hItemToRemoveID], a
+ and a
+ ret z
+ push hl
+ ld b, a
+ call IsItemInBag
+ pop hl
+ jr z, .drinkLoop
+ farjp RemoveItemByID
+
+INCLUDE "data/items/guard_drink_items.asm"
diff --git a/engine/events/set_blackout_map.asm b/engine/events/set_blackout_map.asm
new file mode 100644
index 00000000..e8460240
--- /dev/null
+++ b/engine/events/set_blackout_map.asm
@@ -0,0 +1,25 @@
+SetLastBlackoutMap:
+; Set the map to return to when
+; blacking out or using Teleport or Dig.
+; Safari rest houses don't count.
+
+ push hl
+ ld hl, SafariZoneRestHouses
+ ld a, [wCurMap]
+ ld b, a
+.loop
+ ld a, [hli]
+ cp -1
+ jr z, .notresthouse
+ cp b
+ jr nz, .loop
+ jr .done
+
+.notresthouse
+ ld a, [wLastMap]
+ ld [wLastBlackoutMap], a
+.done
+ pop hl
+ ret
+
+INCLUDE "data/maps/rest_house_maps.asm"
diff --git a/engine/events/starter_dex.asm b/engine/events/starter_dex.asm
new file mode 100755
index 00000000..7cfe9af2
--- /dev/null
+++ b/engine/events/starter_dex.asm
@@ -0,0 +1,9 @@
+; this function temporarily makes the starters (and Ivysaur) seen
+; so that the full Pokedex information gets displayed in Oak's lab
+StarterDex:
+ ld a, 1 << (DEX_BULBASAUR - 1) | 1 << (DEX_IVYSAUR - 1) | 1 << (DEX_CHARMANDER - 1) | 1 << (DEX_SQUIRTLE - 1)
+ ld [wPokedexOwned], a
+ predef ShowPokedexData
+ xor a
+ ld [wPokedexOwned], a
+ ret
diff --git a/engine/events/vending_machine.asm b/engine/events/vending_machine.asm
new file mode 100755
index 00000000..6ff6a5e4
--- /dev/null
+++ b/engine/events/vending_machine.asm
@@ -0,0 +1,132 @@
+VendingMachineMenu::
+ ld hl, VendingMachineText1
+ call PrintText
+ ld a, MONEY_BOX
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ xor a
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ ld a, A_BUTTON | B_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, 3
+ ld [wMaxMenuItem], a
+ ld a, 5
+ ld [wTopMenuItemY], a
+ ld a, 1
+ ld [wTopMenuItemX], a
+ ld hl, wd730
+ set 6, [hl]
+ hlcoord 0, 3
+ lb bc, 8, 12
+ call TextBoxBorder
+ call UpdateSprites
+ hlcoord 2, 5
+ ld de, DrinkText
+ call PlaceString
+ hlcoord 9, 6
+ ld de, DrinkPriceText
+ call PlaceString
+ ld hl, wd730
+ res 6, [hl]
+ call HandleMenuInput
+ bit 1, a ; pressed B?
+ jr nz, .notThirsty
+ ld a, [wCurrentMenuItem]
+ cp 3 ; chose Cancel?
+ jr z, .notThirsty
+ xor a
+ ldh [hMoney], a
+ ldh [hMoney + 2], a
+ ld a, $2
+ ldh [hMoney + 1], a
+ call HasEnoughMoney
+ jr nc, .enoughMoney
+ ld hl, VendingMachineText4
+ jp PrintText
+.enoughMoney
+ call LoadVendingMachineItem
+ ldh a, [hVendingMachineItem]
+ ld b, a
+ ld c, 1
+ call GiveItem
+ jr nc, .BagFull
+
+ ld b, 60 ; number of times to play the "brrrrr" sound
+.playDeliverySound
+ ld c, 2
+ call DelayFrames
+ push bc
+ ld a, SFX_PUSH_BOULDER
+ call PlaySound
+ pop bc
+ dec b
+ jr nz, .playDeliverySound
+
+ ld hl, VendingMachineText5
+ call PrintText
+ ld hl, hVendingMachinePrice + 2
+ ld de, wPlayerMoney + 2
+ ld c, $3
+ predef SubBCDPredef
+ ld a, MONEY_BOX
+ ld [wTextBoxID], a
+ jp DisplayTextBoxID
+.BagFull
+ ld hl, VendingMachineText6
+ jp PrintText
+.notThirsty
+ ld hl, VendingMachineText7
+ jp PrintText
+
+VendingMachineText1:
+ text_far _VendingMachineText1
+ text_end
+
+DrinkText:
+ db "FRESH WATER"
+ next "SODA POP"
+ next "LEMONADE"
+ next "CANCEL@"
+
+DrinkPriceText:
+ db "¥200"
+ next "¥300"
+ next "¥350"
+ next "@"
+
+VendingMachineText4:
+ text_far _VendingMachineText4
+ text_end
+
+VendingMachineText5:
+ text_far _VendingMachineText5
+ text_end
+
+VendingMachineText6:
+ text_far _VendingMachineText6
+ text_end
+
+VendingMachineText7:
+ text_far _VendingMachineText7
+ text_end
+
+LoadVendingMachineItem:
+ ld hl, VendingPrices
+ ld a, [wCurrentMenuItem]
+ add a
+ add a
+ ld d, 0
+ ld e, a
+ add hl, de
+ ld a, [hli]
+ ldh [hVendingMachineItem], a
+ ld a, [hli]
+ ldh [hVendingMachinePrice], a
+ ld a, [hli]
+ ldh [hVendingMachinePrice + 1], a
+ ld a, [hl]
+ ldh [hVendingMachinePrice + 2], a
+ ret
+
+INCLUDE "data/items/vending_prices.asm"
diff --git a/engine/evolution.asm b/engine/evolution.asm
deleted file mode 100755
index 7277e991..00000000
--- a/engine/evolution.asm
+++ /dev/null
@@ -1,156 +0,0 @@
-EvolveMon:
- push hl
- push de
- push bc
- ld a, [wcf91]
- push af
- ld a, [wd0b5]
- push af
- xor a
- ld [wLowHealthAlarm], a
- ld [wChannelSoundIDs + Ch5], a
- call StopAllMusic
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- ld a, SFX_TINK
- call PlaySound
- call Delay3
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld [hTilesetType], a
- ld a, [wEvoOldSpecies]
- ld [wWholeScreenPaletteMonSpecies], a
- ld c, 0
- call EvolutionSetWholeScreenPalette
- ld a, [wEvoNewSpecies]
- ld [wcf91], a
- ld [wd0b5], a
- call Evolution_LoadPic
- ld de, vFrontPic
- ld hl, vBackPic
- ld bc, 7 * 7
- call CopyVideoData
- ld a, [wEvoOldSpecies]
- ld [wcf91], a
- ld [wd0b5], a
- call Evolution_LoadPic
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- ld a, [wEvoOldSpecies]
- call PlayCry
- call WaitForSoundToFinish
- ld c, BANK(Music_SafariZone)
- ld a, MUSIC_SAFARI_ZONE
- call PlayMusic
- ld c, 80
- call DelayFrames
- ld c, 1 ; set PAL_BLACK instead of mon palette
- call EvolutionSetWholeScreenPalette
- lb bc, $1, $10
-.animLoop
- push bc
- call Evolution_CheckForCancel
- jr c, .evolutionCancelled
- call Evolution_BackAndForthAnim
- pop bc
- inc b
- dec c
- dec c
- jr nz, .animLoop
- xor a
- ld [wEvoCancelled], a
- ld a, $31
- ld [wEvoMonTileOffset], a
- call Evolution_ChangeMonPic ; show the new species pic
- ld a, [wEvoNewSpecies]
-.done
- ld [wWholeScreenPaletteMonSpecies], a
- call StopAllMusic
- ld a, [wWholeScreenPaletteMonSpecies]
- call PlayCry
- ld c, 0
- call EvolutionSetWholeScreenPalette
- pop af
- ld [wd0b5], a
- pop af
- ld [wcf91], a
- pop bc
- pop de
- pop hl
- ld a, [wEvoCancelled]
- and a
- ret z
- scf
- ret
-.evolutionCancelled
- pop bc
- ld a, 1
- ld [wEvoCancelled], a
- ld a, [wEvoOldSpecies]
- jr .done
-
-EvolutionSetWholeScreenPalette:
- ld b, SET_PAL_POKEMON_WHOLE_SCREEN
- jp RunPaletteCommand
-
-Evolution_LoadPic:
- call GetMonHeader
- coord hl, 7, 2
- jp LoadFlippedFrontSpriteByMonIndex
-
-Evolution_BackAndForthAnim:
-; show the mon change back and forth between the new and old species b times
- ld a, $31
- ld [wEvoMonTileOffset], a
- call Evolution_ChangeMonPic
- ld a, -$31
- ld [wEvoMonTileOffset], a
- call Evolution_ChangeMonPic
- dec b
- jr nz, Evolution_BackAndForthAnim
- ret
-
-Evolution_ChangeMonPic:
- push bc
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- coord hl, 7, 2
- lb bc, 7, 7
- ld de, SCREEN_WIDTH - 7
-.loop
- push bc
-.innerLoop
- ld a, [wEvoMonTileOffset]
- add [hl]
- ld [hli], a
- dec c
- jr nz, .innerLoop
- pop bc
- add hl, de
- dec b
- jr nz, .loop
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- call Delay3
- pop bc
- ret
-
-Evolution_CheckForCancel:
- call DelayFrame
- push bc
- call JoypadLowSensitivity
- ld a, [hJoy5]
- pop bc
- and B_BUTTON
- jr nz, .pressedB
-.notAllowedToCancel
- dec c
- jr nz, Evolution_CheckForCancel
- and a
- ret
-.pressedB
- ld a, [wForceEvolution]
- and a
- jr nz, .notAllowedToCancel
- scf
- ret
diff --git a/engine/evos_moves.asm b/engine/evos_moves.asm
deleted file mode 100755
index 8ec2c4c7..00000000
--- a/engine/evos_moves.asm
+++ /dev/null
@@ -1,668 +0,0 @@
-; try to evolve the mon in [wWhichPokemon]
-TryEvolvingMon:
-EvolveTradeMon:
- ld hl, wCanEvolveFlags
- xor a
- ld [hl], a
- ld a, [wWhichPokemon]
- ld c, a
- ld b, FLAG_SET
- call Evolution_FlagAction
-
-; this is only called after battle
-; it is supposed to do level up evolutions, though there is a bug that allows item evolutions to occur
-EvolutionAfterBattle:
- ld a, [hTilesetType]
- push af
- xor a
- ld [wEvolutionOccurred], a
- dec a
- ld [wWhichPokemon], a
- push hl
- push bc
- push de
- ld hl, wPartyCount
- push hl
-
-Evolution_PartyMonLoop: ; loop over party mons
- ld hl, wWhichPokemon
- inc [hl]
- pop hl
- inc hl
- ld a, [hl]
- cp $ff ; have we reached the end of the party?
- jp z, .done
- ld [wEvoOldSpecies], a
- push hl
- ld a, [wWhichPokemon]
- ld c, a
- ld hl, wCanEvolveFlags
- ld b, FLAG_TEST
- call Evolution_FlagAction
- ld a, c
- and a ; is the mon's bit set?
- jp z, Evolution_PartyMonLoop ; if not, go to the next mon
- ld a, [wEvoOldSpecies]
- dec a
- ld b, 0
- ld hl, EvosMovesPointerTable
- add a
- rl b
- ld c, a
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- push hl
- ld a, [wcf91]
- push af
- xor a ; PLAYER_PARTY_DATA
- ld [wMonDataLocation], a
- call LoadMonData
- pop af
- ld [wcf91], a
- pop hl
-
-.evoEntryLoop ; loop over evolution entries
- ld a, [hli]
- and a ; have we reached the end of the evolution data?
- jr z, Evolution_PartyMonLoop
- ld b, a ; evolution type
- cp EV_TRADE
- jr z, .checkTradeEvo
-; not trade evolution
- ld a, [wLinkState]
- cp LINK_STATE_TRADING
- jr z, Evolution_PartyMonLoop ; if trading, go the next mon
- ld a, b
- cp EV_ITEM
- jr z, .checkItemEvo
- ld a, [wForceEvolution]
- and a
- jr nz, Evolution_PartyMonLoop
- ld a, b
- cp EV_LEVEL
- jr z, .checkLevel
-.checkTradeEvo
- ld a, [wLinkState]
- cp LINK_STATE_TRADING
- jp nz, .nextEvoEntry1 ; if not trading, go to the next evolution entry
- ld a, [hli] ; level requirement
- ld b, a
- ld a, [wLoadedMonLevel]
- cp b ; is the mon's level greater than the evolution requirement?
- jp c, Evolution_PartyMonLoop ; if so, go the next mon
- jr .doEvolution
-.checkItemEvo
- ld a, [wIsInBattle] ; are we in battle?
- and a
- ld a, [hli]
- jp nz, .nextEvoEntry1 ; don't evolve if we're in a battle as wcf91 could be holding the last mon sent out
-
- ld b, a ; evolution item
- ld a, [wcf91] ; last item used
- cp b ; was the evolution item in this entry used?
- jp nz, .nextEvoEntry1 ; if not, go to the next evolution entry
-.checkLevel
- ld a, [hli] ; level requirement
- ld b, a
- ld a, [wLoadedMonLevel]
- cp b ; is the mon's level greater than the evolution requirement?
- jp c, .nextEvoEntry2 ; if so, go the next evolution entry
-.doEvolution
- ld [wCurEnemyLVL], a
- ld a, 1
- ld [wEvolutionOccurred], a
- push hl
- ld a, [hl]
- ld [wEvoNewSpecies], a
- ld a, [wWhichPokemon]
- ld hl, wPartyMonNicks
- call GetPartyMonName
- call CopyStringToCF4B
- ld hl, IsEvolvingText
- call PrintText
- ld c, 50
- call DelayFrames
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- coord hl, 0, 0
- lb bc, 12, 20
- call ClearScreenArea
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- ld a, $ff
- ld [wUpdateSpritesEnabled], a
- call ClearSprites
- callab EvolveMon
- jp c, CancelledEvolution
- ld hl, EvolvedText
- call PrintText
- pop hl
- ld a, [hl]
- ld [wd0b5], a
- ld [wLoadedMonSpecies], a
- ld [wEvoNewSpecies], a
- ld a, MONSTER_NAME
- ld [wNameListType], a
- ld a, BANK(MonsterNames) ; bank is not used for monster names
- ld [wPredefBank], a
- call GetName
- push hl
- ld hl, IntoText
- call PrintText_NoCreatingTextBox
- ld a, SFX_GET_ITEM_2
- call PlaySoundWaitForCurrent
- call WaitForSoundToFinish
- ld c, 40
- call DelayFrames
- call ClearScreen
- call RenameEvolvedMon
- ld a, [wd11e]
- push af
- ld a, [wd0b5]
- ld [wd11e], a
- predef IndexToPokedex
- ld a, [wd11e]
- dec a
- ld hl, BaseStats
- ld bc, MonBaseStatsEnd - MonBaseStats
- call AddNTimes
- ld de, wMonHeader
- call CopyData
- ld a, [wd0b5]
- ld [wMonHIndex], a
- pop af
- ld [wd11e], a
- ld hl, wLoadedMonHPExp - 1
- ld de, wLoadedMonStats
- ld b, $1
- call CalcStats
- ld a, [wWhichPokemon]
- ld hl, wPartyMon1
- ld bc, wPartyMon2 - wPartyMon1
- call AddNTimes
- ld e, l
- ld d, h
- push hl
- push bc
- ld bc, wPartyMon1MaxHP - wPartyMon1
- add hl, bc
- ld a, [hli]
- ld b, a
- ld c, [hl]
- ld hl, wLoadedMonMaxHP + 1
- ld a, [hld]
- sub c
- ld c, a
- ld a, [hl]
- sbc b
- ld b, a
- ld hl, wLoadedMonHP + 1
- ld a, [hl]
- add c
- ld [hld], a
- ld a, [hl]
- adc b
- ld [hl], a
- dec hl
- pop bc
- call CopyData
- ld a, [wd0b5]
- ld [wd11e], a
- xor a
- ld [wMonDataLocation], a
- call LearnMoveFromLevelUp
- pop hl
- predef SetPartyMonTypes
- ld a, [wIsInBattle]
- and a
- call z, Evolution_ReloadTilesetTilePatterns
- predef IndexToPokedex
- ld a, [wd11e]
- dec a
- ld c, a
- ld b, FLAG_SET
- ld hl, wPokedexOwned
- push bc
- call Evolution_FlagAction
- pop bc
- ld hl, wPokedexSeen
- call Evolution_FlagAction
- pop de
- pop hl
- ld a, [wLoadedMonSpecies]
- ld [hl], a
- push hl
- ld l, e
- ld h, d
- jr .nextEvoEntry2
-
-.nextEvoEntry1
- inc hl
-
-.nextEvoEntry2
- inc hl
- jp .evoEntryLoop
-
-.done
- pop de
- pop bc
- pop hl
- pop af
- ld [hTilesetType], a
- ld a, [wLinkState]
- cp LINK_STATE_TRADING
- ret z
- ld a, [wIsInBattle]
- and a
- ret nz
- ld a, [wEvolutionOccurred]
- and a
- call nz, PlayDefaultMusic
- ret
-
-RenameEvolvedMon:
-; 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, [wMonHIndex]
- ld [wd0b5], a
- call GetName
- pop af
- ld [wd0b5], a
- ld hl, wcd6d
- ld de, wcf4b
-.compareNamesLoop
- ld a, [de]
- inc de
- cp [hl]
- inc hl
- ret nz
- cp "@"
- jr nz, .compareNamesLoop
- ld a, [wWhichPokemon]
- ld bc, NAME_LENGTH
- ld hl, wPartyMonNicks
- call AddNTimes
- push hl
- call GetName
- ld hl, wcd6d
- pop de
- jp CopyData
-
-CancelledEvolution:
- ld hl, StoppedEvolvingText
- call PrintText
- call ClearScreen
- pop hl
- call Evolution_ReloadTilesetTilePatterns
- jp Evolution_PartyMonLoop
-
-EvolvedText:
- TX_FAR _EvolvedText
- db "@"
-
-IntoText:
- TX_FAR _IntoText
- db "@"
-
-StoppedEvolvingText:
- TX_FAR _StoppedEvolvingText
- db "@"
-
-IsEvolvingText:
- TX_FAR _IsEvolvingText
- db "@"
-
-Evolution_ReloadTilesetTilePatterns:
- ld a, [wLinkState]
- cp LINK_STATE_TRADING
- ret z
- jp ReloadTilesetTilePatterns
-
-LearnMoveFromLevelUp:
- ld a, [wd11e] ; species
- ld [wcf91], a
- call GetMonLearnset
-.learnSetLoop ; loop over the learn set until we reach a move that is learnt at the current level or the end of the list
- ld a, [hli]
- 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, [wCurEnemyLVL]
- cp b ; is the move learnt at the mon's current level?
- ld a, [hli] ; move ID
- jr nz, .learnSetLoop
- ld d, a ; ID of move to learn
- ld a, [wMonDataLocation]
- and a
- jr nz, .next
-; If [wMonDataLocation] is 0 (PLAYER_PARTY_DATA), get the address of the mon's
-; current moves in party data. Every call to this function sets
-; [wMonDataLocation] to 0 because other data locations are not supported.
-; If it is not 0, this function will not work properly.
- ld hl, wPartyMon1Moves
- ld a, [wWhichPokemon]
- ld bc, wPartyMon2 - wPartyMon1
- call AddNTimes
-.next
- ld b, NUM_MOVES
-.checkCurrentMovesLoop ; check if the move to learn is already known
- ld a, [hli]
- cp d
- jr z, .done ; if already known, jump
- dec b
- jr nz, .checkCurrentMovesLoop
- ld a, d
- ld [wMoveNum], a
- ld [wd11e], a
- call GetMoveName
- call CopyStringToCF4B
- predef LearnMove
- ld a, b
- and a
- jr z, .done
- callab IsThisPartymonStarterPikachu_Party
- jr nc, .done
- ld a, [wMoveNum]
- cp THUNDERBOLT
- jr z, .foundThunderOrThunderbolt
- cp THUNDER
- jr nz, .done
-.foundThunderOrThunderbolt
- ld a, $5
- ld [wd49c], a
- ld a, $85
- ld [wPikachuMood], a
-.done
- ld a, [wcf91]
- ld [wd11e], a
- ret
-
-Func_3b079:
- ld a, [wcf91]
- push af
- call Func_3b0a2
- jr c, .asm_3b09c
-
- call Func_3b10f
- jr nc, .asm_3b096
-
- call Func_3b0a2
- jr c, .asm_3b09c
-
- call Func_3b10f
- jr nc, .asm_3b096
-
- call Func_3b0a2
- jr c, .asm_3b09c
-.asm_3b096
- pop af
- ld [wcf91], a
- and a
- ret
-.asm_3b09c
- pop af
- ld [wcf91], a
- scf
- ret
-
-Func_3b0a2:
-; XXX what is wcf91 entering this function?
- ld a, [wd11e]
- ld [wMoveNum], a
- predef CanLearnTM
- ld a, c
- and a
- jr nz, .asm_3b0ec
- ld hl, Pointer_3b0ee
- ld a, [wcf91]
- ld de, $1
- call IsInArray
- jr c, .asm_3b0d2
- ld a, $ff
- ld [wMonHGrowthRate], a
- ld a, [wd11e]
- ld hl, wMonHMoves
- ld de, $1
- call IsInArray
- jr c, .asm_3b0ec
-.asm_3b0d2
- ld a, [wd11e]
- ld d, a
- call GetMonLearnset
-.loop
- ld a, [hli]
- and a
- jr z, .asm_3b0ea
- ld b, a
- ld a, [wCurEnemyLVL]
- cp b
- jr c, .asm_3b0ea
- ld a, [hli]
- cp d
- jr z, .asm_3b0ec
- jr .loop
-.asm_3b0ea
- and a
- ret
-.asm_3b0ec
- scf
- ret
-
-Pointer_3b0ee:
- db NIDOKING
- db IVYSAUR
- db EXEGGUTOR
- db GENGAR
- db NIDOQUEEN
- db ARCANINE
- db GYARADOS
- db BLASTOISE
- db GOLEM
- db DRAGONITE
- db NINETALES
- db DRAGONAIR
- db KABUTOPS
- db OMASTAR
- db JIGGLYPUFF
- db FLAREON
- db JOLTEON
- db VAPOREON
- db BEEDRILL
- db BUTTERFREE
- db MACHAMP
- db CLOYSTER
- db CLEFABLE
- db ALAKAZAM
- db STARMIE
- db VENUSAUR
- db TENTACRUEL
- db CHARMELEON
- db WARTORTLE
- db CHARIZARD
- db VILEPLUME
- db VICTREEBEL
- db $ff
-
-Func_3b10f:
- ld c, $0
-.asm_3b111
- ld hl, EvosMovesPointerTable
- ld b, $0
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
-.asm_3b11b
- ld a, [hli]
- and a
- jr z, .asm_3b130
- cp $2
- jr nz, .asm_3b124
- inc hl
-.asm_3b124
- inc hl
- ld a, [wcf91]
- cp [hl]
- jr z, .asm_3b138
- inc hl
- ld a, [hl]
- and a
- jr nz, .asm_3b11b
-.asm_3b130
- inc c
- ld a, c
- cp VICTREEBEL
- jr c, .asm_3b111
- and a
- ret
-.asm_3b138
- inc c
- ld a, c
- ld [wcf91], a
- scf
- ret
-
-; 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:
- call GetPredefRegisters
- push hl
- push de
- push bc
- call GetMonLearnset
- jr .firstMove
-.nextMove
- pop de
-.nextMove2
- inc hl
-.firstMove
- ld a, [hli] ; read level of next move in learnset
- and a
- jp z, .done ; end of list
- ld b, a
- ld a, [wCurEnemyLVL]
- cp b
- jp c, .done ; mon level < move level (assumption: learnset is sorted by level)
- ld a, [wLearningMovesFromDayCare]
- and a
- jr z, .skipMinLevelCheck
- ld a, [wDayCareStartLevel]
- cp b
- jr nc, .nextMove2 ; min level >= move level
-
-.skipMinLevelCheck
-
-; check if the move is already known
- push de
- ld c, NUM_MOVES
-.alreadyKnowsCheckLoop
- ld a, [de]
- inc de
- cp [hl]
- jr z, .nextMove
- dec c
- jr nz, .alreadyKnowsCheckLoop
-
-; try to find an empty move slot
- pop de
- push de
- ld c, NUM_MOVES
-.findEmptySlotLoop
- ld a, [de]
- and a
- jr z, .writeMoveToSlot2
- inc de
- dec c
- jr nz, .findEmptySlotLoop
-
-; no empty move slots found
- pop de
- push de
- push hl
- ld h, d
- ld l, e
- call WriteMonMoves_ShiftMoveData ; shift all moves one up (deleting move 1)
- ld a, [wLearningMovesFromDayCare]
- and a
- jr z, .writeMoveToSlot
-
-; shift PP as well if learning moves from day care
- push de
- ld bc, wPartyMon1PP - (wPartyMon1Moves + 3)
- add hl, bc
- ld d, h
- ld e, l
- call WriteMonMoves_ShiftMoveData ; shift all move PP data one up
- pop de
-
-.writeMoveToSlot
- pop hl
-.writeMoveToSlot2
- ld a, [hl]
- ld [de], a
- ld a, [wLearningMovesFromDayCare]
- and a
- jr z, .nextMove
-
-; write move PP value if learning moves from day care
- push hl
- ld a, [hl]
- ld hl, wPartyMon1PP - wPartyMon1Moves
- add hl, de
- push hl
- dec a
- ld hl, Moves
- ld bc, MoveEnd - Moves
- call AddNTimes
- ld de, wBuffer
- ld a, BANK(Moves)
- call FarCopyData
- ld a, [wBuffer + 5]
- pop hl
- ld [hl], a
- pop hl
- jr .nextMove
-
-.done
- pop bc
- pop de
- pop hl
- ret
-
-; shifts all move data one up (freeing 4th move slot)
-WriteMonMoves_ShiftMoveData:
- ld c, NUM_MOVES - 1
-.loop
- inc de
- ld a, [de]
- ld [hli], a
- dec c
- jr nz, .loop
- ret
-
-Evolution_FlagAction:
- predef_jump FlagActionPredef
-
-GetMonLearnset:
- ld hl, EvosMovesPointerTable
- ld b, 0
- ld a, [wcf91]
- dec a
- ld c, a
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
-.skipEvolutionDataLoop ; loop to skip past the evolution data, which comes before the move data
- ld a, [hli]
- and a ; have we reached the end of the evolution data?
- jr nz, .skipEvolutionDataLoop ; if not, jump back up
- ret
-
-INCLUDE "data/evos_moves.asm"
diff --git a/engine/experience.asm b/engine/experience.asm
deleted file mode 100755
index 2efc13de..00000000
--- a/engine/experience.asm
+++ /dev/null
@@ -1,160 +0,0 @@
-; calculates the level a mon should be based on its current exp
-CalcLevelFromExperience:
- ld a, [wLoadedMonSpecies]
- ld [wd0b5], a
- call GetMonHeader
- ld d, $1 ; init level to 1
-.loop
- inc d ; increment level
- call CalcExperience
- push hl
- ld hl, wLoadedMonExp + 2 ; current exp
-; compare exp needed for level d with current exp
- ld a, [hExperience + 2]
- ld c, a
- ld a, [hld]
- sub c
- ld a, [hExperience + 1]
- ld c, a
- ld a, [hld]
- sbc c
- ld a, [hExperience]
- ld c, a
- ld a, [hl]
- sbc c
- pop hl
- jr nc, .loop ; if exp needed for level d is not greater than exp, try the next level
- dec d ; since the exp was too high on the last loop iteration, go back to the previous value and return
- ret
-
-; calculates the amount of experience needed for level d
-CalcExperience:
- ld a, [wMonHGrowthRate]
- add a
- add a
- ld c, a
- ld b, 0
- ld hl, GrowthRateTable
- add hl, bc
- call CalcDSquared
- ld a, d
- ld [H_MULTIPLIER], a
- call Multiply
- ld a, [hl]
- and $f0
- swap a
- ld [H_MULTIPLIER], a
- call Multiply
- ld a, [hli]
- and $f
- ld [H_DIVISOR], a
- ld b, $4
- call Divide
- ld a, [H_QUOTIENT + 1]
- push af
- ld a, [H_QUOTIENT + 2]
- push af
- ld a, [H_QUOTIENT + 3]
- push af
- call CalcDSquared
- ld a, [hl]
- and $7f
- ld [H_MULTIPLIER], a
- call Multiply
- ld a, [H_PRODUCT + 1]
- push af
- ld a, [H_PRODUCT + 2]
- push af
- ld a, [H_PRODUCT + 3]
- push af
- ld a, [hli]
- push af
- xor a
- ld [H_MULTIPLICAND], a
- ld [H_MULTIPLICAND + 1], a
- ld a, d
- ld [H_MULTIPLICAND + 2], a
- ld a, [hli]
- ld [H_MULTIPLIER], a
- call Multiply
- ld b, [hl]
- ld a, [H_PRODUCT + 3]
- sub b
- ld [H_PRODUCT + 3], a
- ld b, $0
- ld a, [H_PRODUCT + 2]
- sbc b
- ld [H_PRODUCT + 2], a
- ld a, [H_PRODUCT + 1]
- sbc b
- ld [H_PRODUCT + 1], a
-; The difference of the linear term and the constant term consists of 3 bytes
-; starting at H_PRODUCT + 1. Below, hExperience (an alias of that address) will
-; be used instead for the further work of adding or subtracting the squared
-; term and adding the cubed term.
- pop af
- and $80
- jr nz, .subtractSquaredTerm ; check sign
- pop bc
- ld a, [hExperience + 2]
- add b
- ld [hExperience + 2], a
- pop bc
- ld a, [hExperience + 1]
- adc b
- ld [hExperience + 1], a
- pop bc
- ld a, [hExperience]
- adc b
- ld [hExperience], a
- jr .addCubedTerm
-.subtractSquaredTerm
- pop bc
- ld a, [hExperience + 2]
- sub b
- ld [hExperience + 2], a
- pop bc
- ld a, [hExperience + 1]
- sbc b
- ld [hExperience + 1], a
- pop bc
- ld a, [hExperience]
- sbc b
- ld [hExperience], a
-.addCubedTerm
- pop bc
- ld a, [hExperience + 2]
- add b
- ld [hExperience + 2], a
- pop bc
- ld a, [hExperience + 1]
- adc b
- ld [hExperience + 1], a
- pop bc
- ld a, [hExperience]
- adc b
- ld [hExperience], a
- ret
-
-; calculates d*d
-CalcDSquared:
- xor a
- ld [H_MULTIPLICAND], a
- ld [H_MULTIPLICAND + 1], a
- ld a, d
- ld [H_MULTIPLICAND + 2], a
- ld [H_MULTIPLIER], a
- jp Multiply
-
-; each entry has the following scheme:
-; %AAAABBBB %SCCCCCCC %DDDDDDDD %EEEEEEEE
-; resulting in
-; (a*n^3)/b + sign*c*n^2 + d*n - e
-; where sign = -1 <=> S=1
-GrowthRateTable:
- db $11,$00,$00,$00 ; medium fast n^3
- db $34,$0A,$00,$1E ; (unused?) 3/4 n^3 + 10 n^2 - 30
- db $34,$14,$00,$46 ; (unused?) 3/4 n^3 + 20 n^2 - 70
- db $65,$8F,$64,$8C ; medium slow: 6/5 n^3 - 15 n^2 + 100 n - 140
- db $45,$00,$00,$00 ; fast: 4/5 n^3
- db $54,$00,$00,$00 ; slow: 5/4 n^3
diff --git a/engine/game_corner_slots.asm b/engine/game_corner_slots.asm
deleted file mode 100755
index 3c5b3a10..00000000
--- a/engine/game_corner_slots.asm
+++ /dev/null
@@ -1,54 +0,0 @@
-StartSlotMachine:
- ld a, [wHiddenObjectFunctionArgument]
- cp $fd
- jr z, .printOutOfOrder
- cp $fe
- jr z, .printOutToLunch
- cp $ff
- jr z, .printSomeonesKeys
- callba AbleToPlaySlotsCheck
- ld a, [wCanPlaySlots]
- and a
- ret z
- ld a, [wLuckySlotHiddenObjectIndex]
- ld b, a
- ld a, [wHiddenObjectIndex]
- inc a
- cp b
- jr z, .match
- ld a, 253
- jr .next
-.match
- ld a, 250
-.next
- ld [wSlotMachineSevenAndBarModeChance], a
- ld a, [H_LOADEDROMBANK]
- ld [wSlotMachineSavedROMBank], a
- call PromptUserToPlaySlots
- ret
-.printOutOfOrder
- tx_pre_id GameCornerOutOfOrderText
- jr .printText
-.printOutToLunch
- tx_pre_id GameCornerOutToLunchText
- jr .printText
-.printSomeonesKeys
- tx_pre_id GameCornerSomeonesKeysText
-.printText
- push af
- call EnableAutoTextBoxDrawing
- pop af
- call PrintPredefTextID
- ret
-
-GameCornerOutOfOrderText:
- TX_FAR _GameCornerOutOfOrderText
- db "@"
-
-GameCornerOutToLunchText:
- TX_FAR _GameCornerOutToLunchText
- db "@"
-
-GameCornerSomeonesKeysText:
- TX_FAR _GameCornerSomeonesKeysText
- db "@"
diff --git a/engine/game_corner_slots2.asm b/engine/game_corner_slots2.asm
deleted file mode 100755
index 6bbaf72d..00000000
--- a/engine/game_corner_slots2.asm
+++ /dev/null
@@ -1,31 +0,0 @@
-AbleToPlaySlotsCheck:
- ld a, [wSpriteStateData1 + 2]
- and $8
- jr z, .done ; not able
- ld b, COIN_CASE
- predef GetQuantityOfItemInBag
- ld a, b
- and a
- ld b, (GameCornerCoinCaseText_id - TextPredefs) / 2 + 1
- jr z, .printCoinCaseRequired
- ld hl, wPlayerCoins
- ld a, [hli]
- or [hl]
- jr nz, .done ; able to play
- ld b, (GameCornerNoCoinsText_id - TextPredefs) / 2 + 1
-.printCoinCaseRequired
- call EnableAutoTextBoxDrawing
- ld a, b
- call PrintPredefTextID
- xor a
-.done
- ld [wCanPlaySlots], a
- ret
-
-GameCornerCoinCaseText:
- TX_FAR _GameCornerCoinCaseText
- db "@"
-
-GameCornerNoCoinsText:
- TX_FAR _GameCornerNoCoinsText
- db "@"
diff --git a/engine/gamefreak.asm b/engine/gamefreak.asm
deleted file mode 100755
index 5472a56e..00000000
--- a/engine/gamefreak.asm
+++ /dev/null
@@ -1,263 +0,0 @@
-LoadShootingStarGraphics:
- ld a, $f9
- ld [rOBP0], a
- ld a, $a4
- ld [rOBP1], a
- call UpdateGBCPal_OBP0
- call UpdateGBCPal_OBP1
- ld de, AnimationTileset2 + $30 ; star tile (top left quadrant)
- ld hl, vChars1 + $200
- lb bc, BANK(AnimationTileset2), $01
- call CopyVideoData
- ld de, AnimationTileset2 + $130 ; star tile (bottom left quadrant)
- ld hl, vChars1 + $210
- lb bc, BANK(AnimationTileset2), $01
- call CopyVideoData
- ld de, FallingStar
- ld hl, vChars1 + $220
- lb bc, BANK(FallingStar), (FallingStarEnd - FallingStar) / $10
- call CopyVideoData
- ld hl, GameFreakLogoOAMData
- ld de, wOAMBuffer + $60
- ld bc, GameFreakLogoOAMDataEnd - GameFreakLogoOAMData
- call CopyData
- ld hl, GameFreakShootingStarOAMData
- ld de, wOAMBuffer
- ld bc, GameFreakShootingStarOAMDataEnd - GameFreakShootingStarOAMData
- jp CopyData
-
-AnimateShootingStar:
- call LoadShootingStarGraphics
- ld a, SFX_SHOOTING_STAR
- call PlaySound
-
-; Move the big star down and left across the screen.
- ld hl, wOAMBuffer
- lb bc, $a0, $4
-.bigStarLoop
- push hl
- push bc
-.bigStarInnerLoop
- ld a, [hl] ; Y
- add 4
- ld [hli], a
- ld a, [hl] ; X
- add -4
- ld [hli], a
- inc hl
- inc hl
- dec c
- jr nz, .bigStarInnerLoop
- ld c, 1
- call CheckForUserInterruption
- pop bc
- pop hl
- ret c
- ld a, [hl]
- cp 80
- jr nz, .next
- jr .bigStarLoop
-.next
- cp b
- jr nz, .bigStarLoop
-
-; Clear big star OAM.
- ld hl, wOAMBuffer
- ld c, 4
- ld de, 4
-.clearOAMLoop
- ld [hl], 160
- add hl, de
- dec c
- jr nz, .clearOAMLoop
-
-; Make Gamefreak logo flash.
- ld b, 3
-.flashLogoLoop
- ld hl, rOBP0
- rrc [hl]
- rrc [hl]
- call UpdateGBCPal_OBP0
- ld c, 10
- call CheckForUserInterruption
- ret c
- dec b
- jr nz, .flashLogoLoop
-
-; Copy 24 instances of the small stars OAM data.
-; Note that their coordinates put them off-screen.
- ld de, wOAMBuffer
- ld a, 24
-.initSmallStarsOAMLoop
- push af
- ld hl, SmallStarsOAM
- ld bc, SmallStarsOAMEnd - SmallStarsOAM
- call CopyData
- pop af
- dec a
- jr nz, .initSmallStarsOAMLoop
-
-; Animate the small stars falling from the Gamefreak logo.
- xor a
- ld [wMoveDownSmallStarsOAMCount], a
- ld hl, SmallStarsWaveCoordsPointerTable
- ld c, 6
-.smallStarsLoop
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- push bc
- push hl
- ld hl, wOAMBuffer + $50
- ld c, 4
-.smallStarsInnerLoop ; introduce new wave of 4 small stars OAM entries
- ld a, [de]
- cp $ff
- jr z, .next2
- ld [hli], a ; Y
- inc de
- ld a, [de]
- ld [hli], a ; X
- inc de
- inc hl
- push bc
- ld a, [de]
- ld b,a
- ld a, [hl]
- and $f0
- or b
- ld [hl], a
- inc de
- pop bc
- inc hl
- dec c
- jr nz, .smallStarsInnerLoop
- ld a, [wMoveDownSmallStarsOAMCount]
- cp 24
- jr z, .next2
- add 6 ; should be 4, but the extra 2 aren't visible on screen
- ld [wMoveDownSmallStarsOAMCount], a
-.next2
- call MoveDownSmallStars
- push af
-
-; shift the existing OAM entries down to make room for the next wave
- ld hl, wOAMBuffer + $10
- ld de, wOAMBuffer
- ld bc, $50
- call CopyData
-
- pop af
- pop hl
- pop bc
- ret c
- dec c
- jr nz, .smallStarsLoop
- and a
- ret
-
-SmallStarsOAM:
- db $00,$00,$A2,$90
-SmallStarsOAMEnd:
-
-SmallStarsWaveCoordsPointerTable:
- dw SmallStarsWave1Coords
- dw SmallStarsWave2Coords
- dw SmallStarsWave3Coords
- dw SmallStarsWave4Coords
- dw SmallStarsEmptyWave
- dw SmallStarsEmptyWave
-
-; The stars that fall from the Gamefreak logo come in 4 waves of 4 OAM entries.
-; These arrays contain the Y and X coordinates of each OAM entry.
-
-SmallStarsWave1Coords:
- db $68,$30
- db $05,$68
- db $40,$05
- db $68,$58
- db $04,$68
- db $78,$07
-
-SmallStarsWave2Coords:
- db $68,$38
- db $05,$68
- db $48,$06
- db $68,$60
- db $04,$68
- db $70,$07
-
-SmallStarsWave3Coords:
- db $68,$34
- db $05,$68
- db $4c,$06
- db $68,$54
- db $06,$68
- db $64,$07
-
-SmallStarsWave4Coords:
- db $68,$3c
- db $05,$68
- db $5c,$04
- db $68,$6c
- db $07,$68
- db $74,$07
-
-SmallStarsEmptyWave:
- db $FF
-
-MoveDownSmallStars:
- ld b, 8
-.loop
- ld hl, wOAMBuffer + $5c
- ld a, [wMoveDownSmallStarsOAMCount]
- ld de, -4
- ld c, a
-.innerLoop
- inc [hl] ; Y
- add hl, de
- dec c
- jr nz, .innerLoop
-; Toggle the palette so that the lower star in the small stars tile blinks in
-; and out.
- ld a, [rOBP1]
- xor %10100000
- ld [rOBP1], a
- call UpdateGBCPal_OBP1
- ld c, 3
- call CheckForUserInterruption
- ret c
- dec b
- jr nz, .loop
- ret
-
-GameFreakLogoOAMData:
- db $48,$50,$8D,$00
- db $48,$58,$8E,$00
- db $50,$50,$8F,$00
- db $50,$58,$90,$00
- db $58,$50,$91,$00
- db $58,$58,$92,$00
- db $60,$30,$80,$00
- db $60,$38,$81,$00
- db $60,$40,$82,$00
- db $60,$48,$83,$00
- db $60,$50,$93,$00
- db $60,$58,$84,$00
- db $60,$60,$85,$00
- db $60,$68,$83,$00
- db $60,$70,$81,$00
- db $60,$78,$86,$00
-GameFreakLogoOAMDataEnd:
-
-GameFreakShootingStarOAMData:
- db $00,$A0,$A0,$14
- db $00,$A8,$A0,$34
- db $08,$A0,$A1,$14
- db $08,$A8,$A1,$34
-GameFreakShootingStarOAMDataEnd:
-
-FallingStar:
- INCBIN "gfx/falling_star.2bpp"
-FallingStarEnd:
diff --git a/engine/gfx/hp_bar.asm b/engine/gfx/hp_bar.asm
new file mode 100755
index 00000000..b47b1fbd
--- /dev/null
+++ b/engine/gfx/hp_bar.asm
@@ -0,0 +1,268 @@
+HPBarLength:
+ call GetPredefRegisters
+
+; calculates bc * 48 / de, the number of pixels the HP bar has
+; the result is always at least 1
+GetHPBarLength:
+ push hl
+ xor a
+ ld hl, hMultiplicand
+ ld [hli], a
+ ld a, b
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ ld [hl], $30
+ call Multiply ; 48 * bc (hp bar is 48 pixels long)
+ ld a, d
+ and a
+ jr z, .maxHPSmaller256
+ srl d ; make HP in de fit into 1 byte by dividing by 4
+ rr e
+ srl d
+ rr e
+ ldh a, [hMultiplicand+1]
+ ld b, a
+ ldh a, [hMultiplicand+2]
+ srl b ; divide multiplication result as well
+ rr a
+ srl b
+ rr a
+ ldh [hMultiplicand+2], a
+ ld a, b
+ ldh [hMultiplicand+1], a
+.maxHPSmaller256
+ ld a, e
+ ldh [hDivisor], a
+ ld b, $4
+ call Divide
+ ldh a, [hMultiplicand+2]
+ ld e, a ; e = bc * 48 / de (num of pixels of HP bar)
+ pop hl
+ and a
+ ret nz
+ ld e, $1 ; make result at least 1
+ ret
+
+; predef $48
+UpdateHPBar:
+UpdateHPBar2:
+ push hl
+ ld hl, wHPBarOldHP
+ ld a, [hli]
+ ld c, a ; old HP into bc
+ ld a, [hli]
+ ld b, a
+ ld a, [hli]
+ ld e, a ; new HP into de
+ ld d, [hl]
+ pop hl
+ push de
+ push bc
+ call UpdateHPBar_CalcHPDifference
+ ld a, e
+ ld [wHPBarHPDifference+1], a
+ ld a, d
+ ld [wHPBarHPDifference], a
+ pop bc
+ pop de
+ call UpdateHPBar_CompareNewHPToOldHP
+ ret z
+ ld a, $ff
+ jr c, .HPdecrease
+ ld a, $1
+.HPdecrease
+ ld [wHPBarDelta], a
+ call GetPredefRegisters
+ ld a, [wHPBarNewHP]
+ ld e, a
+ ld a, [wHPBarNewHP+1]
+ ld d, a
+.animateHPBarLoop
+ push de
+ ld a, [wHPBarOldHP]
+ ld c, a
+ ld a, [wHPBarOldHP+1]
+ ld b, a
+ call UpdateHPBar_CompareNewHPToOldHP
+ jr z, .animateHPBarDone
+ jr nc, .HPIncrease
+; HP decrease
+ dec bc ; subtract 1 HP
+ ld a, c
+ ld [wHPBarNewHP], a
+ ld a, b
+ ld [wHPBarNewHP+1], a
+ call UpdateHPBar_CalcOldNewHPBarPixels
+ ld a, e
+ sub d ; calc pixel difference
+ jr .ok
+.HPIncrease
+ inc bc ; add 1 HP
+ ld a, c
+ ld [wHPBarNewHP], a
+ ld a, b
+ ld [wHPBarNewHP+1], a
+ call UpdateHPBar_CalcOldNewHPBarPixels
+ ld a, d
+ sub e ; calc pixel difference
+.ok
+ call UpdateHPBar_PrintHPNumber
+ and a
+ jr z, .noPixelDifference
+ call UpdateHPBar_AnimateHPBar
+.noPixelDifference
+ ld a, [wHPBarNewHP]
+ ld [wHPBarOldHP], a
+ ld a, [wHPBarNewHP+1]
+ ld [wHPBarOldHP+1], a
+ pop de
+ jr .animateHPBarLoop
+.animateHPBarDone
+ pop de
+ ld a, e
+ ld [wHPBarOldHP], a
+ ld a, d
+ ld [wHPBarOldHP+1], a
+ or e
+ jr z, .monFainted
+ call UpdateHPBar_CalcOldNewHPBarPixels
+ ld d, e
+.monFainted
+ call UpdateHPBar_PrintHPNumber
+ ld a, $1
+ call UpdateHPBar_AnimateHPBar
+ jp Delay3
+
+; animates the HP bar going up or down for (a) ticks (two waiting frames each)
+; stops prematurely if bar is filled up
+; e: current health (in pixels) to start with
+UpdateHPBar_AnimateHPBar:
+ push hl
+.barAnimationLoop
+ push af
+ push de
+ ld d, $6
+ call DrawHPBar
+ ld c, 2
+ call DelayFrames
+ pop de
+ ld a, [wHPBarDelta] ; +1 or -1
+ add e
+ cp $31
+ jr nc, .barFilledUp
+ ld e, a
+ pop af
+ dec a
+ jr nz, .barAnimationLoop
+ pop hl
+ ret
+.barFilledUp
+ pop af
+ pop hl
+ ret
+
+; compares old HP and new HP and sets c and z flags accordingly
+UpdateHPBar_CompareNewHPToOldHP:
+ ld a, d
+ sub b
+ ret nz
+ ld a, e
+ sub c
+ ret
+
+; calcs HP difference between bc and de (into de)
+UpdateHPBar_CalcHPDifference:
+ ld a, d
+ sub b
+ jr c, .oldHPGreater
+ jr z, .testLowerByte
+.newHPGreater
+ ld a, e
+ sub c
+ ld e, a
+ ld a, d
+ sbc b
+ ld d, a
+ ret
+.oldHPGreater
+ ld a, c
+ sub e
+ ld e, a
+ ld a, b
+ sbc d
+ ld d, a
+ ret
+.testLowerByte
+ ld a, e
+ sub c
+ jr c, .oldHPGreater
+ jr nz, .newHPGreater
+ ld de, $0
+ ret
+
+UpdateHPBar_PrintHPNumber:
+ push af
+ push de
+ ld a, [wHPBarType]
+ and a
+ jr z, .done ; don't print number in enemy HUD
+; convert from little-endian to big-endian for PrintNumber
+ ld a, [wHPBarOldHP]
+ ld [wHPBarTempHP + 1], a
+ ld a, [wHPBarOldHP + 1]
+ ld [wHPBarTempHP], a
+ push hl
+ ld de, $15
+ ldh a, [hFlagsFFFA]
+ bit 0, a
+ jr z, .next
+ ld de, $9
+.next
+ add hl, de
+ push hl
+ ld a, " "
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ pop hl
+ ld de, wHPBarTempHP
+ lb bc, 2, 3
+ call PrintNumber
+ call DelayFrame
+ pop hl
+.done
+ pop de
+ pop af
+ ret
+
+; calcs number of HP bar pixels for old and new HP value
+; d: new pixels
+; e: old pixels
+UpdateHPBar_CalcOldNewHPBarPixels:
+ push hl
+ ld hl, wHPBarMaxHP
+ ld a, [hli] ; max HP into de
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli] ; old HP into bc
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ld a, [hli] ; new HP into hl
+ ld h, [hl]
+ ld l, a
+ push hl
+ push de
+ call GetHPBarLength ; calc num pixels for old HP
+ ld a, e
+ pop de
+ pop bc
+ push af
+ call GetHPBarLength ; calc num pixels for new HP
+ pop af
+ ld d, e
+ ld e, a
+ pop hl
+ ret
diff --git a/engine/gfx/load_pokedex_tiles.asm b/engine/gfx/load_pokedex_tiles.asm
new file mode 100755
index 00000000..a3f69171
--- /dev/null
+++ b/engine/gfx/load_pokedex_tiles.asm
@@ -0,0 +1,11 @@
+; Loads tile patterns for tiles used in the pokedex.
+LoadPokedexTilePatterns:
+ call LoadHpBarAndStatusTilePatterns
+ ld de, PokedexTileGraphics
+ ld hl, vChars2 tile $60
+ lb bc, BANK(PokedexTileGraphics), (PokedexTileGraphicsEnd - PokedexTileGraphics) / $10
+ call CopyVideoData
+ ld de, PokeballTileGraphics
+ ld hl, vChars2 tile $72
+ lb bc, BANK(PokeballTileGraphics), 1
+ jp CopyVideoData ; load pokeball tile for marking caught mons
diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm
new file mode 100755
index 00000000..6e2cf0ba
--- /dev/null
+++ b/engine/gfx/mon_icons.asm
@@ -0,0 +1,307 @@
+AnimatePartyMon_ForceSpeed1:
+ xor a
+ ld [wCurrentMenuItem], a
+ ld b, a
+ inc a
+ jr GetAnimationSpeed
+
+; wPartyMenuHPBarColors contains the party mon's health bar colors
+; 0: green
+; 1: yellow
+; 2: red
+AnimatePartyMon::
+ ld hl, wPartyMenuHPBarColors
+ ld a, [wCurrentMenuItem]
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hl]
+
+GetAnimationSpeed:
+ ld c, a
+ ld hl, PartyMonSpeeds
+ add hl, bc
+ ld a, [wOnSGB]
+ xor $1
+ add [hl]
+ ld c, a
+ add a
+ ld b, a
+ ld a, [wAnimCounter]
+ and a
+ jr z, .resetSprites
+ cp c
+ jr z, .animateSprite
+.incTimer
+ inc a
+ cp b
+ jr nz, .skipResetTimer
+ xor a ; reset timer
+.skipResetTimer
+ ld [wAnimCounter], a
+ jp DelayFrame
+.resetSprites
+ push bc
+ ld hl, wMonPartySpritesSavedOAM
+ ld de, wOAMBuffer
+ ld bc, $60
+ call CopyData
+ pop bc
+ xor a
+ jr .incTimer
+.animateSprite
+ push bc
+ ld hl, wOAMBuffer + $02 ; OAM tile id
+ ld bc, $10
+ ld a, [wCurrentMenuItem]
+ call AddNTimes
+ ld c, ICONOFFSET
+ ld a, [hl]
+ cp ICON_BALL << 2
+ jr z, .editCoords
+ cp ICON_HELIX << 2
+ jr nz, .editTileIDS
+; ICON_BALL and ICON_HELIX only shake up and down
+.editCoords
+ dec hl
+ dec hl ; dec hl to the OAM y coord
+ ld c, $1 ; amount to increase the y coord by
+; otherwise, load a second sprite frame
+.editTileIDS
+ ld b, $4
+ ld de, $4
+.loop
+ ld a, [hl]
+ add c
+ ld [hl], a
+ add hl, de
+ dec b
+ jr nz, .loop
+ pop bc
+ ld a, c
+ jr .incTimer
+
+; Party mon animations cycle between 2 frames.
+; The members of the PartyMonSpeeds array specify the number of V-blanks
+; 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:
+ db 5, 16, 32
+
+LoadMonPartySpriteGfx:
+; Load mon party sprite tile patterns into VRAM during V-blank.
+ ld hl, MonPartySpritePointers
+ ld a, $1e
+
+LoadAnimSpriteGfx:
+; Load animated sprite tile patterns into VRAM during V-blank. hl is the address
+; of an array of structures that contain arguments for CopyVideoData and a is
+; the number of structures in the array.
+ ld bc, $0
+.loop
+ push af
+ push bc
+ push hl
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ call CopyVideoData
+ pop hl
+ pop bc
+ ld a, $6
+ add c
+ ld c, a
+ pop af
+ dec a
+ jr nz, .loop
+ ret
+
+LoadMonPartySpriteGfxWithLCDDisabled:
+; Load mon party sprite tile patterns into VRAM immediately by disabling the
+; LCD.
+ call DisableLCD
+ ld hl, MonPartySpritePointers
+ ld a, $1e
+ ld bc, $0
+.loop
+ push af
+ push bc
+ push hl
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ push de
+ ld a, [hli]
+ ld c, a
+ swap c
+ ld b, $0
+ ld a, [hli]
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ pop hl
+ call FarCopyData
+ pop hl
+ pop bc
+ ld a, $6
+ add c
+ ld c, a
+ pop af
+ dec a
+ jr nz, .loop
+ jp EnableLCD
+
+INCLUDE "data/icon_pointers.asm"
+
+WriteMonPartySpriteOAMByPartyIndex:
+; Write OAM blocks for the party mon in [hPartyMonIndex].
+ push hl
+ push de
+ push bc
+ ldh a, [hPartyMonIndex]
+ cp $ff
+ jr z, .asm_7191f
+ ld hl, wPartySpecies
+ ld e, a
+ ld d, 0
+ add hl, de
+ ld a, [hl]
+ call GetPartyMonSpriteID
+ ld [wOAMBaseTile], a
+ call WriteMonPartySpriteOAM
+ pop bc
+ pop de
+ pop hl
+ ret
+
+.asm_7191f
+ ld hl, wOAMBuffer
+ ld de, wMonPartySpritesSavedOAM
+ ld bc, $60
+ call CopyData
+ pop bc
+ pop de
+ pop hl
+ ret
+
+WriteMonPartySpriteOAMBySpecies:
+; Write OAM blocks for the party sprite of the species in
+; [wMonPartySpriteSpecies].
+ xor a
+ ldh [hPartyMonIndex], a
+ ld a, [wMonPartySpriteSpecies]
+ call GetPartyMonSpriteID
+ ld [wOAMBaseTile], a
+ jr WriteMonPartySpriteOAM
+
+UnusedPartyMonSpriteFunction:
+; This function is unused and doesn't appear to do anything useful. It looks
+; like it may have been intended to load the tile patterns and OAM data for
+; the mon party sprite associated with the species in [wcf91].
+; However, its calculations are off and it loads garbage data.
+ ld a, [wcf91]
+ call GetPartyMonSpriteID
+ push af
+ ld hl, vSprites tile $00
+ call .LoadTilePatterns
+ pop af
+ add $5A
+ ld hl, vSprites tile $04
+ call .LoadTilePatterns
+ xor a
+ ld [wMonPartySpriteSpecies], a
+ jr WriteMonPartySpriteOAMBySpecies
+
+.LoadTilePatterns
+ push hl
+ add a
+ ld c, a
+ ld b, 0
+ ld hl, MonPartySpritePointers
+ add hl, bc
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ pop hl
+ jp CopyVideoData
+
+WriteMonPartySpriteOAM:
+; Write the OAM blocks for the first animation frame into the OAM buffer and
+; make a copy at wMonPartySpritesSavedOAM.
+ push af
+ ld c, $10
+ ld h, HIGH(wOAMBuffer)
+ ldh a, [hPartyMonIndex]
+ swap a
+ ld l, a
+ add $10
+ ld b, a
+ pop af
+ cp ICON_HELIX << 2
+ jr z, .helix
+ call WriteSymmetricMonPartySpriteOAM
+ jr .makeCopy
+.helix
+ call WriteAsymmetricMonPartySpriteOAM
+; Make a copy of the OAM buffer with the first animation frame written so that
+; we can flip back to it from the second frame by copying it back.
+.makeCopy
+ ld hl, wOAMBuffer
+ ld de, wMonPartySpritesSavedOAM
+ ld bc, $60
+ jp CopyData
+
+GetPartyMonSpriteID:
+ ld [wd11e], a
+ predef IndexToPokedex
+ ld a, [wd11e]
+ ld c, a
+ dec a
+ srl a
+ ld hl, MonPartyData
+ ld e, a
+ ld d, 0
+ add hl, de
+ ld a, [hl]
+ bit 0, c
+ jr nz, .skipSwap
+ swap a ; use lower nybble if pokedex num is even
+.skipSwap
+ and $f0
+ srl a ; value == ICON constant << 2
+ srl a
+ ret
+
+INCLUDE "data/pokemon/menu_icons.asm"
+
+INC_FRAME_1 EQUS "0, $20"
+INC_FRAME_2 EQUS "$20, $20"
+
+BugIconFrame1: INCBIN "gfx/icons/bug.2bpp", INC_FRAME_1
+PlantIconFrame1: INCBIN "gfx/icons/plant.2bpp", INC_FRAME_1
+BugIconFrame2: INCBIN "gfx/icons/bug.2bpp", INC_FRAME_2
+PlantIconFrame2: INCBIN "gfx/icons/plant.2bpp", INC_FRAME_2
+SnakeIconFrame1: INCBIN "gfx/icons/snake.2bpp", INC_FRAME_1
+QuadrupedIconFrame1: INCBIN "gfx/icons/quadruped.2bpp", INC_FRAME_1
+SnakeIconFrame2: INCBIN "gfx/icons/snake.2bpp", INC_FRAME_2
+QuadrupedIconFrame2: INCBIN "gfx/icons/quadruped.2bpp", INC_FRAME_2
+
+TradeBubbleIconGFX: INCBIN "gfx/trade/bubble.2bpp"
diff --git a/engine/gfx/oam_dma.asm b/engine/gfx/oam_dma.asm
new file mode 100644
index 00000000..fe93e90d
--- /dev/null
+++ b/engine/gfx/oam_dma.asm
@@ -0,0 +1,28 @@
+WriteDMACodeToHRAM::
+; Since no other memory is available during OAM DMA,
+; DMARoutine is copied to HRAM and executed there.
+ ld c, LOW(hDMARoutine)
+ ld b, DMARoutineEnd - DMARoutine
+ ld hl, DMARoutine
+.copy
+ ld a, [hli]
+ ldh [c], a
+ inc c
+ dec b
+ jr nz, .copy
+ ret
+
+DMARoutine:
+LOAD "OAM DMA", HRAM
+hDMARoutine::
+ ; initiate DMA
+ ld a, HIGH(wOAMBuffer)
+ ldh [rDMA], a
+ ; wait for DMA to finish
+ ld a, $28
+.wait
+ dec a
+ jr nz, .wait
+ ret
+ENDL
+DMARoutineEnd:
diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm
new file mode 100755
index 00000000..dd723afa
--- /dev/null
+++ b/engine/gfx/palettes.asm
@@ -0,0 +1,1117 @@
+_RunPaletteCommand:
+ call GetPredefRegisters
+ ld a, b
+ cp SET_PAL_DEFAULT
+ jr nz, .not_default
+ ld a, [wDefaultPaletteCommand]
+.not_default
+ cp SET_PAL_PARTY_MENU_HP_BARS
+ jp z, UpdatePartyMenuBlkPacket
+ ld l, a
+ ld h, 0
+ add hl, hl
+ ld de, SetPalFunctions
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, SendSGBPackets
+ push de
+ jp hl
+
+SetPal_Black:
+ ld hl, PalPacket_Black
+ ld de, BlkPacket_Battle
+ ret
+
+; uses PalPacket_Empty to build a packet based on mon IDs and health color
+SetPal_Battle:
+ ld hl, PalPacket_Empty
+ ld de, wPalPacket
+ ld bc, $10
+ call CopyData
+ ;ld a, [wPlayerBattleStatus3]
+ ld hl, wBattleMonSpecies
+ ld a, [hl]
+ and a
+ jr z, .asm_71ef9
+ ld hl, wPartyMon1
+ ld a, [wPlayerMonNumber]
+ ld bc, wPartyMon2 - wPartyMon1
+ call AddNTimes
+.asm_71ef9
+ call DeterminePaletteID
+ ld b, a
+ ;ld a, [wEnemyBattleStatus3]
+ ld hl, wEnemyMonSpecies2
+ call DeterminePaletteID
+ ld c, a
+ ld hl, wPalPacket + 1
+ ld a, [wPlayerHPBarColor]
+ add PAL_GREENBAR
+ ld [hli], a
+ inc hl
+ ld a, [wEnemyHPBarColor]
+ add PAL_GREENBAR
+ ld [hli], a
+ inc hl
+ ld a, b
+ ld [hli], a
+ inc hl
+ ld a, c
+ ld [hl], a
+ ld hl, wPalPacket
+ ld de, BlkPacket_Battle
+ ld a, SET_PAL_BATTLE
+ ld [wDefaultPaletteCommand], a
+ ret
+
+SetPal_TownMap:
+ ld hl, PalPacket_TownMap
+ ld de, BlkPacket_WholeScreen
+ ret
+
+; uses PalPacket_Empty to build a packet based the mon ID
+SetPal_StatusScreen:
+ ld hl, PalPacket_Empty
+ ld de, wPalPacket
+ ld bc, $10
+ call CopyData
+ ld a, [wcf91]
+ cp NUM_POKEMON_INDEXES + 1
+ jr c, .pokemon
+ ld a, $1 ; not pokemon
+.pokemon
+ call DeterminePaletteIDOutOfBattle
+ push af
+ ld hl, wPalPacket + 1
+ ld a, [wStatusScreenHPBarColor]
+ add PAL_GREENBAR
+ ld [hli], a
+ inc hl
+ pop af
+ ld [hl], a
+ ld hl, wPalPacket
+ ld de, BlkPacket_StatusScreen
+ ret
+
+SetPal_PartyMenu:
+ ld hl, PalPacket_PartyMenu
+ ld de, wPartyMenuBlkPacket
+ ret
+
+SetPal_Pokedex:
+ ld hl, PalPacket_Pokedex
+ ld de, wPalPacket
+ ld bc, $10
+ call CopyData
+ ld a, [wcf91]
+ call DeterminePaletteIDOutOfBattle
+ ld hl, wPalPacket + 3
+ ld [hl], a
+ ld hl, wPalPacket
+ ld de, BlkPacket_Pokedex
+ ret
+
+SetPal_Slots:
+ ld hl, PalPacket_Slots
+ ld de, BlkPacket_Slots
+ ret
+
+SetPal_Titlescreen:
+ ld hl, PalPacket_Titlescreen
+ ld de, BlkPacket_Titlescreen
+ ret
+
+; used mostly for menus and the Oak intro
+SetPal_Generic:
+ ld hl, PalPacket_Generic
+ ld de, BlkPacket_WholeScreen
+ ret
+
+SetPal_NidorinoIntro:
+ ld hl, PalPacket_NidorinoIntro
+ ld de, BlkPacket_NidorinoIntro
+ ret
+
+SetPal_GameFreakIntro:
+ ld hl, PalPacket_GameFreakIntro
+ ld de, BlkPacket_GameFreakIntro
+ ld a, SET_PAL_GENERIC
+ ld [wDefaultPaletteCommand], a
+ ret
+
+; uses PalPacket_Empty to build a packet based on the current map
+SetPal_Overworld:
+ ld hl, PalPacket_Empty
+ ld de, wPalPacket
+ ld bc, $10
+ call CopyData
+ ld a, [wCurMapTileset]
+ cp CEMETERY
+ jr z, .PokemonTowerOrAgatha
+ cp CAVERN
+ jr z, .caveOrBruno
+ ld a, [wCurMap]
+ cp FIRST_INDOOR_MAP
+ jr c, .townOrRoute
+ cp CERULEAN_CAVE_2F
+ jr c, .normalDungeonOrBuilding
+ cp CERULEAN_CAVE_1F + 1
+ jr c, .caveOrBruno
+ cp LORELEIS_ROOM
+ jr z, .Lorelei
+ cp BRUNOS_ROOM
+ jr z, .caveOrBruno
+ cp TRADE_CENTER
+ jr z, .trade_center_colosseum
+ cp COLOSSEUM
+ jr z, .trade_center_colosseum
+.normalDungeonOrBuilding
+ ld a, [wLastMap] ; town or route that current dungeon or building is located
+.townOrRoute
+ cp NUM_CITY_MAPS
+ jr c, .town
+ ld a, PAL_ROUTE - 1
+.town
+ 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, SET_PAL_OVERWORLD
+ ld [wDefaultPaletteCommand], a
+ ret
+.PokemonTowerOrAgatha
+ ld a, PAL_GREYMON - 1
+ jr .town
+.caveOrBruno
+ ld a, PAL_CAVE - 1
+ jr .town
+.Lorelei
+ xor a
+ jr .town
+.trade_center_colosseum
+ ld a, PAL_GREYMON - 1
+ jr .town
+
+; used when a Pokemon is the only thing on the screen
+; such as evolution, trading and the Hall of Fame
+SetPal_PokemonWholeScreen:
+ push bc
+ ld hl, PalPacket_Empty
+ ld de, wPalPacket
+ ld bc, $10
+ call CopyData
+ pop bc
+ ld a, c
+ and a
+ ld a, PAL_BLACK
+ jr nz, .next
+ ld a, [wWholeScreenPaletteMonSpecies]
+ call DeterminePaletteIDOutOfBattle
+.next
+ ld [wPalPacket + 1], a
+ ld hl, wPalPacket
+ ld de, BlkPacket_WholeScreen
+ ret
+
+SetPal_TrainerCard:
+ ld hl, BlkPacket_TrainerCard
+ ld de, wTrainerCardBlkPacket
+ ld bc, $40
+ call CopyData
+ ld de, BadgeBlkDataLengths
+ ld hl, wTrainerCardBlkPacket + 2
+ ld a, [wObtainedBadges]
+ ld c, NUM_BADGES
+.badgeLoop
+ srl a
+ push af
+ 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
+.zeroBadgeDataLoop
+ ld [hli], a
+ dec c
+ jr nz, .zeroBadgeDataLoop
+ pop bc
+ jr .nextBadge
+.haveBadge
+; The player does have the badge, so skip past the badge's blk data.
+ ld a, [de]
+.skipBadgeDataLoop
+ inc hl
+ dec a
+ jr nz, .skipBadgeDataLoop
+.nextBadge
+ pop af
+ inc de
+ dec c
+ jr nz, .badgeLoop
+ ld hl, PalPacket_TrainerCard
+ ld de, wTrainerCardBlkPacket
+ ret
+
+SendUnknownPalPacket_7205d::
+ ld hl, UnknownPalPacket_72811
+ ld de, BlkPacket_WholeScreen
+ ret
+
+SendUnknownPalPacket_72064::
+ ld hl, UnknownPalPacket_72821
+ ld de, UnknownPacket_72751
+ ret
+
+SetPalFunctions:
+; entries correspond to SET_PAL_* constants
+ dw SetPal_Black
+ 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
+ dw SendUnknownPalPacket_7205d
+ dw SendUnknownPalPacket_72064
+
+; 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:
+ 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:
+ ld a, [hl]
+DeterminePaletteIDOutOfBattle:
+ ld [wd11e], a
+ and a ; is the mon index 0?
+ jr z, .skipDexNumConversion
+ push bc
+ predef IndexToPokedex
+ pop bc
+ ld a, [wd11e]
+.skipDexNumConversion
+ ld e, a
+ ld d, 0
+ ld hl, MonsterPalettes ; not just for Pokemon, Trainers use it too
+ add hl, de
+ ld a, [hl]
+ ret
+
+YellowIntroPaletteAction::
+ ld a, e
+ and a
+ jr nz, .asm_720bd
+ ld hl, PalPacket_Generic
+ ldh a, [hGBC]
+ and a
+ jp z, SendSGBPacket
+ jp InitGBCPalettes
+
+.asm_720bd
+ ld hl, UnknownPalPacket_72811
+ ldh a, [hGBC]
+ and a
+ jp z, SendSGBPacket
+ call InitGBCPalettes
+ ld hl, PalPacket_Generic
+ inc hl
+ ld a, [hli]
+ call GetGBCBasePalAddress
+ ld a, e
+ ld [wGBCBasePalPointers + 2], a
+ ld a, d
+ ld [wGBCBasePalPointers + 2 + 1], a
+ xor a ; CONVERT_BGP
+ call DMGPalToGBCPal
+ ld a, 1
+ call TransferCurBGPData
+ ret
+
+LoadOverworldPikachuFrontpicPalettes::
+ ld hl, PalPacket_Empty
+ ld de, wPalPacket
+ ld bc, $10
+ call CopyData
+ call GetPal_Pikachu
+ ld hl, wPartyMenuBlkPacket
+ ld [hl], a
+ ld hl, wPartyMenuBlkPacket + 2
+ ld a, $26
+ ld [hl], a
+ ld hl, wPalPacket
+ ldh a, [hGBC]
+ and a
+ jr nz, .cgb_1
+ call SendSGBPacket
+ jr .okay_1
+
+.cgb_1
+ call InitGBCPalettes
+.okay_1
+ ld hl, BlkPacket_WholeScreen
+ ld de, wPalPacket
+ ld bc, $10
+ call CopyData
+ ld hl, wPartyMenuBlkPacket + 2
+ ld a, $5
+ ld [hli], a
+ ld a, $7
+ ld [hli], a
+ ld a, $6
+ ld [hli], a
+ ld a, $b
+ ld [hli], a
+ ld a, $a
+ ld [hl], a
+ ld hl, wPalPacket
+ ldh a, [hGBC]
+ and a
+ jr nz, .cgb_2
+ call SendSGBPacket
+ jr .okay_2
+
+.cgb_2
+ call InitGBCPalettes
+.okay_2
+ ret
+
+GetPal_Pikachu::
+; similar to SetPal_Overworld
+ ld a, [wCurMapTileset]
+ cp CEMETERY
+ jr z, .PokemonTowerOrAgatha
+ cp CAVERN
+ jr z, .caveOrBruno
+ ld a, [wCurMap]
+ cp REDS_HOUSE_1F
+ jr c, .townOrRoute
+ cp CERULEAN_CAVE_2F
+ jr c, .normalDungeonOrBuilding
+ cp NAME_RATERS_HOUSE
+ jr c, .caveOrBruno
+ cp LORELEIS_ROOM
+ jr z, .Lorelei
+ cp BRUNOS_ROOM
+ jr z, .caveOrBruno
+ cp TRADE_CENTER
+ jr z, .battleOrTradeCenter
+ cp COLOSSEUM
+ jr z, .battleOrTradeCenter
+.normalDungeonOrBuilding
+ ld a, [wLastMap] ; town or route that current dungeon or building is located
+.townOrRoute
+ cp SAFFRON_CITY + 1
+ jr c, .town
+ ld a, PAL_ROUTE - 1
+.town
+ inc a ; a town's pallete ID is its map ID + 1
+ ret
+
+.PokemonTowerOrAgatha
+ ld a, PAL_GREYMON - 1
+ jr .town
+
+.caveOrBruno
+ ld a, PAL_CAVE - 1
+ jr .town
+
+.Lorelei
+ xor a ; PAL_PALLET - 1
+ jr .town
+
+.battleOrTradeCenter
+ ld a, PAL_GREYMON - 1
+ jr .town
+
+InitPartyMenuBlkPacket:
+ ld hl, BlkPacket_PartyMenu
+ ld de, wPartyMenuBlkPacket
+ ld bc, $30
+ jp CopyData
+
+UpdatePartyMenuBlkPacket:
+; 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
+ add hl, de
+ ld e, l
+ ld d, h
+ ld a, [de]
+ and a
+ ld e, (1 << 2) | 1 ; green
+ jr z, .next
+ dec a
+ ld e, (2 << 2) | 2 ; yellow
+ jr z, .next
+ ld e, (3 << 2) | 3 ; red
+.next
+ push de
+ ld hl, wPartyMenuBlkPacket + 8 + 1
+ ld bc, 6
+ ld a, [wWhichPartyMenuHPBar]
+ call AddNTimes
+ pop de
+ ld [hl], e
+ ret
+
+SendSGBPacket:
+ ld a, 1
+ ldh [hDisableJoypadPolling], a ; don't poll joypad while sending packet
+ call _SendSGBPacket
+ xor a
+ ldh [hDisableJoypadPolling], a
+ ret
+
+_SendSGBPacket:
+;check number of packets
+ ld a, [hl]
+ and $07
+ ret z
+; store number of packets in B
+ ld b, a
+.loop2
+; save B for later use
+ push bc
+; send RESET signal (P14=LOW, P15=LOW)
+ xor a
+ ldh [rJOYP], a
+; set P14=HIGH, P15=HIGH
+ ld a, $30
+ ldh [rJOYP], a
+;load length of packets (16 bytes)
+ ld b, $10
+.nextByte
+;set bit counter (8 bits per byte)
+ ld e, $08
+; get next byte in the packet
+ ld a, [hli]
+ ld d, a
+.nextBit0
+ bit 0, d
+; if 0th bit is not zero set P14=HIGH, P15=LOW (send bit 1)
+ ld a, $10
+ jr nz, .next0
+; else (if 0th bit is zero) set P14=LOW, P15=HIGH (send bit 0)
+ ld a, $20
+.next0
+ ldh [rJOYP], a
+; must set P14=HIGH,P15=HIGH between each "pulse"
+ ld a, $30
+ ldh [rJOYP], a
+; rotation will put next bit in 0th position (so we can always use command
+; "bit 0, d" to fetch the bit that has to be sent)
+ rr d
+; decrease bit counter so we know when we have sent all 8 bits of current byte
+ dec e
+ jr nz, .nextBit0
+ dec b
+ jr nz, .nextByte
+; send bit 1 as a "stop bit" (end of parameter data)
+ ld a, $20
+ ldh [rJOYP], a
+; set P14=HIGH,P15=HIGH
+ ld a, $30
+ ldh [rJOYP], a
+; wait for about 70000 cycles
+ call Wait7000
+; restore (previously pushed) number of packets
+ pop bc
+ dec b
+; return if there are no more packets
+ ret z
+; else send 16 more bytes
+ jr .loop2
+
+LoadSGB:
+ xor a
+ ld [wOnSGB], a
+ call CheckSGB
+ jr c, .onSGB
+ ldh a, [hGBC]
+ and a
+ jr z, .onDMG
+ ld a, $1
+ ld [wOnSGB], a
+.onDMG
+ ret
+.onSGB
+ ld a, $1
+ ld [wOnSGB], a
+ di
+ call PrepareSuperNintendoVRAMTransfer
+ ei
+ ld a, 1
+ ld [wCopyingSGBTileData], a
+ ld de, ChrTrnPacket
+ ld hl, SGBBorderGraphics
+ call CopyGfxToSuperNintendoVRAM
+ xor a
+ ld [wCopyingSGBTileData], a
+ ld de, PctTrnPacket
+ ld hl, BorderPalettes
+ call CopyGfxToSuperNintendoVRAM
+ xor a
+ ld [wCopyingSGBTileData], a
+ ld de, PalTrnPacket
+ ld hl, SuperPalettes
+ call CopyGfxToSuperNintendoVRAM
+ call ClearVram
+ ld hl, MaskEnCancelPacket
+ jp SendSGBPacket
+
+PrepareSuperNintendoVRAMTransfer:
+ ld hl, .packetPointers
+ ld c, 9
+.loop
+ push bc
+ ld a, [hli]
+ push hl
+ ld h, [hl]
+ ld l, a
+ call SendSGBPacket
+ pop hl
+ inc hl
+ pop bc
+ dec c
+ jr nz, .loop
+ ret
+
+.packetPointers
+; Only the first packet is needed.
+ dw MaskEnFreezePacket
+ dw DataSnd_728a1
+ dw DataSnd_728b1
+ dw DataSnd_728c1
+ dw DataSnd_728d1
+ dw DataSnd_728e1
+ dw DataSnd_728f1
+ dw DataSnd_72901
+ dw DataSnd_72911
+
+CheckSGB:
+; Returns whether the game is running on an SGB in carry.
+ ld hl, MltReq2Packet
+ call SendSGBPacket
+ call Wait7000
+ ldh a, [rJOYP]
+ and $3
+ cp $3
+ jr nz, .isSGB
+ ld a, $20
+ ldh [rJOYP], a
+ ldh a, [rJOYP]
+ ldh a, [rJOYP]
+ call Wait7000
+ call Wait7000
+ ld a, $30
+ ldh [rJOYP], a
+ call Wait7000
+ call Wait7000
+ ld a, $10
+ ldh [rJOYP], a
+ ldh a, [rJOYP]
+ ldh a, [rJOYP]
+ ldh a, [rJOYP]
+ ldh a, [rJOYP]
+ ldh a, [rJOYP]
+ ldh a, [rJOYP]
+ call Wait7000
+ call Wait7000
+ ld a, $30
+ ldh [rJOYP], a
+ ldh a, [rJOYP]
+ ldh a, [rJOYP]
+ ldh a, [rJOYP]
+ call Wait7000
+ call Wait7000
+ ldh a, [rJOYP]
+ and $3
+ cp $3
+ jr nz, .isSGB
+ call SendMltReq1Packet
+ and a
+ ret
+.isSGB
+ call SendMltReq1Packet
+ scf
+ ret
+
+SendMltReq1Packet:
+ ld hl, MltReq1Packet
+ call SendSGBPacket
+ jp Wait7000
+
+CopyGfxToSuperNintendoVRAM:
+ di
+ push de
+ call DisableLCD
+ ld a, $e4
+ ldh [rBGP], a
+ call _UpdateGBCPal_BGP_CheckDMG
+ ld de, vChars1
+ ld a, [wCopyingSGBTileData]
+ and a
+ jr z, .notCopyingTileData
+ call CopySGBBorderTiles
+ jr .next
+.notCopyingTileData
+ ld bc, $1000
+ call CopyData
+.next
+ ld hl, vBGMap0
+ ld de, $c
+ ld a, $80
+ ld c, $d
+.loop
+ ld b, $14
+.innerLoop
+ ld [hli], a
+ inc a
+ dec b
+ jr nz, .innerLoop
+ add hl, de
+ dec c
+ jr nz, .loop
+ ld a, $e3
+ ldh [rLCDC], a
+ pop hl
+ call SendSGBPacket
+ xor a
+ ldh [rBGP], a
+ call _UpdateGBCPal_BGP_CheckDMG
+ ei
+ ret
+
+Wait7000:
+; Each loop takes 9 cycles so this routine actually waits 63000 cycles.
+ ld de, 7000
+.loop
+ nop
+ nop
+ nop
+ dec de
+ ld a, d
+ or e
+ jr nz, .loop
+ ret
+
+SendSGBPackets:
+ ldh a, [hGBC]
+ and a
+ jr z, .notGBC
+ push de
+ call InitGBCPalettes
+ pop hl
+ call InitGBCPalettes
+ ldh a, [rLCDC]
+ and rLCDC_ENABLE_MASK
+ ret z
+ call Delay3
+ ret
+.notGBC
+ push de
+ call SendSGBPacket
+ pop hl
+ jp SendSGBPacket
+
+InitGBCPalettes:
+ ld a, [hl]
+ and $f8
+ cp $20
+ jp z, TranslatePalPacketToBGMapAttributes
+
+ inc hl
+
+index = 0
+
+ REPT NUM_ACTIVE_PALS
+ IF index > 0
+ pop hl
+ ENDC
+
+ ld a, [hli]
+ inc hl
+
+ IF index < (NUM_ACTIVE_PALS + -1)
+ push hl
+ ENDC
+
+ call GetGBCBasePalAddress
+ ld a, e
+ ld [wGBCBasePalPointers + index * 2], a
+ ld a, d
+ ld [wGBCBasePalPointers + index * 2 + 1], a
+
+ xor a ; CONVERT_BGP
+ call DMGPalToGBCPal
+ ld a, index
+ call TransferCurBGPData
+
+ ld a, CONVERT_OBP0
+ call DMGPalToGBCPal
+ ld a, index
+ call TransferCurOBPData
+
+ ld a, CONVERT_OBP1
+ call DMGPalToGBCPal
+ ld a, index + 4
+ call TransferCurOBPData
+
+index = index + 1
+ ENDR
+
+ ret
+
+GetGBCBasePalAddress::
+; Input: a = palette ID
+; Output: de = palette address
+ push hl
+ ld l, a
+ xor a
+ ld h, a
+ add hl, hl
+ add hl, hl
+ add hl, hl
+ ld de, GBCBasePalettes
+ add hl, de
+ ld a, l
+ ld e, a
+ ld a, h
+ ld d, a
+ pop hl
+ ret
+
+DMGPalToGBCPal::
+; Populate wGBCPal with colors from a base palette, selected using one of the
+; DMG palette registers.
+; Input:
+; a = which DMG palette register
+; de = address of GBC base palette
+ and a
+ jr nz, .notBGP
+ ldh a, [rBGP]
+ ld [wLastBGP], a
+ jr .convert
+.notBGP
+ dec a
+ jr nz, .notOBP0
+ ldh a, [rOBP0]
+ ld [wLastOBP0], a
+ jr .convert
+.notOBP0
+ ldh a, [rOBP1]
+ ld [wLastOBP1], a
+.convert
+color_index = 0
+ REPT NUM_COLORS
+ ld b, a
+ and %11
+ call .GetColorAddress
+ ld a, [hli]
+ ld [wGBCPal + color_index * 2], a
+ ld a, [hl]
+ ld [wGBCPal + color_index * 2 + 1], a
+
+ IF color_index < (NUM_COLORS + -1)
+ ld a, b
+ rrca
+ rrca
+ ENDC
+
+color_index = color_index + 1
+ ENDR
+ ret
+
+.GetColorAddress:
+ add a
+ ld l, a
+ xor a
+ ld h, a
+ add hl, de
+ ret
+
+TransferCurBGPData::
+ push de
+ add a
+ add a
+ add a
+ or $80 ; auto-increment
+ ldh [rBGPI], a
+ ld de, rBGPD
+ ld hl, wGBCPal
+ ld b, %10 ; mask for non-V-blank/non-H-blank STAT mode
+ ldh a, [rLCDC]
+ and rLCDC_ENABLE_MASK
+ jr nz, .lcdEnabled
+ rept NUM_COLORS
+ call TransferPalColorLCDDisabled
+ endr
+ jr .done
+.lcdEnabled
+ rept NUM_COLORS
+ call TransferPalColorLCDEnabled
+ endr
+.done
+ pop de
+ ret
+
+BufferBGPPal::
+; Copy wGBCPal to palette a in wBGPPalsBuffer.
+ push de
+ add a
+ add a
+ add a
+ ld l, a
+ xor a
+ ld h, a
+ ld de, wBGPPalsBuffer
+ add hl, de
+ ld de, wGBCPal
+ ld c, PAL_SIZE
+.loop
+ ld a, [de]
+ ld [hli], a
+ inc de
+ dec c
+ jr nz, .loop
+ pop de
+ ret
+
+TransferBGPPals::
+; Transfer the buffered BG palettes.
+ ldh a, [rLCDC]
+ and rLCDC_ENABLE_MASK
+ jr z, .lcdDisabled
+ di
+.waitLoop
+ ldh a, [rLY]
+ cp 144
+ jr c, .waitLoop
+.lcdDisabled
+ call .DoTransfer
+ ei
+ ret
+
+.DoTransfer:
+ xor a
+ or $80 ; auto-increment
+ ldh [rBGPI], a
+ ld de, rBGPD
+ ld hl, wBGPPalsBuffer
+ ld c, 4 * PAL_SIZE
+.loop
+ ld a, [hli]
+ ld [de], a
+ dec c
+ jr nz, .loop
+ ret
+
+TransferCurOBPData:
+ push de
+ add a
+ add a
+ add a
+ or $80 ; auto-increment
+ ldh [rOBPI], a
+ ld de, rOBPD
+ ld hl, wGBCPal
+ ld b, %10 ; mask for non-V-blank/non-H-blank STAT mode
+ ldh a, [rLCDC]
+ and rLCDC_ENABLE_MASK
+ jr nz, .lcdEnabled
+ rept NUM_COLORS
+ call TransferPalColorLCDDisabled
+ endr
+ jr .done
+.lcdEnabled
+ rept NUM_COLORS
+ call TransferPalColorLCDEnabled
+ endr
+.done
+ pop de
+ ret
+
+TransferPalColorLCDEnabled:
+; Transfer a palette color while the LCD is enabled.
+
+; In case we're already in H-blank or V-blank, wait for it to end. This is a
+; precaution so that the transfer doesn't extend past the blanking period.
+ ldh a, [rSTAT]
+ and b
+ jr z, TransferPalColorLCDEnabled
+
+; Wait for H-blank or V-blank to begin.
+.notInBlankingPeriod
+ ldh a, [rSTAT]
+ and b
+ jr nz, .notInBlankingPeriod
+; fall through
+
+TransferPalColorLCDDisabled:
+; Transfer a palette color while the LCD is disabled.
+ ld a, [hli]
+ ld [de], a
+ ld a, [hli]
+ ld [de], a
+ ret
+
+_UpdateGBCPal_BGP_CheckDMG::
+ ldh a, [hGBC]
+ and a
+ ret z
+; fall through
+
+_UpdateGBCPal_BGP::
+index = 0
+
+ REPT NUM_ACTIVE_PALS
+ ld a, [wGBCBasePalPointers + index * 2]
+ ld e, a
+ ld a, [wGBCBasePalPointers + index * 2 + 1]
+ ld d, a
+ xor a ; CONVERT_BGP
+ call DMGPalToGBCPal
+ ld a, index
+ call BufferBGPPal
+
+index = index + 1
+ ENDR
+
+ call TransferBGPPals
+ ret
+
+_UpdateGBCPal_OBP::
+index = 0
+
+ REPT NUM_ACTIVE_PALS
+ ld a, [wGBCBasePalPointers + index * 2]
+ ld e, a
+ ld a, [wGBCBasePalPointers + index * 2 + 1]
+ ld d, a
+ ld a, c
+ call DMGPalToGBCPal
+ ld a, c
+ dec a
+ rlca
+ rlca
+
+ IF index > 0
+ IF index == 1
+ inc a
+ ELSE
+ add index
+ ENDC
+ ENDC
+
+ call TransferCurOBPData
+
+index = index + 1
+ ENDR
+
+ ret
+
+TranslatePalPacketToBGMapAttributes::
+; translate the SGB pal packets into something usable for the GBC
+ push hl
+ pop de
+ ld hl, PalPacketPointers
+ ld a, [hli]
+ ld c, a
+.loop
+ ld a, e
+.innerLoop
+ cp [hl]
+ jr z, .checkHighByte
+ inc hl
+ inc hl
+ dec c
+ jr nz, .innerLoop
+ ret
+.checkHighByte
+; the low byte of pointer matched, so check the high byte
+ inc hl
+ ld a, d
+ cp [hl]
+ jr z, .foundMatchingPointer
+ inc hl
+ dec c
+ jr nz, .loop
+ ret
+.foundMatchingPointer
+ farcall LoadBGMapAttributes
+ ret
+
+PalPacketPointers::
+ db (palPacketPointersEnd - palPacketPointers) / 2
+palPacketPointers:
+ dw BlkPacket_WholeScreen
+ dw BlkPacket_Battle
+ dw BlkPacket_StatusScreen
+ dw BlkPacket_Pokedex
+ dw BlkPacket_Slots
+ dw BlkPacket_Titlescreen
+ dw BlkPacket_NidorinoIntro
+ dw wPartyMenuBlkPacket
+ dw wTrainerCardBlkPacket
+ dw BlkPacket_GameFreakIntro
+ dw wPalPacket
+ dw UnknownPacket_72751
+palPacketPointersEnd:
+
+CopySGBBorderTiles:
+; 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, .copyLoop
+
+; Zero bit planes 3 and 4.
+ ld c, 16
+ xor a
+.zeroLoop
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .zeroLoop
+
+ dec b
+ jr nz, .tileLoop
+ ret
+
+INCLUDE "data/sgb/sgb_packets.asm"
+
+INCLUDE "data/pokemon/palettes.asm"
+
+INCLUDE "data/sgb/sgb_palettes.asm"
+
+INCLUDE "data/sgb/sgb_border.asm"
diff --git a/engine/gfx/screen_effects.asm b/engine/gfx/screen_effects.asm
new file mode 100644
index 00000000..973a951a
--- /dev/null
+++ b/engine/gfx/screen_effects.asm
@@ -0,0 +1,73 @@
+; inverts the BGP for 4 (6 on CGB due to lag) frames
+ChangeBGPalColor0_4Frames:
+ call GetPredefRegisters ; leftover of red/blue, has no use here
+ ldh a, [rBGP]
+ xor $ff
+ ldh [rBGP], a
+ call UpdateGBCPal_BGP
+ ld c, 4
+ call DelayFrames
+ ldh a, [rBGP]
+ xor $ff
+ ldh [rBGP], a
+ call UpdateGBCPal_BGP
+ ret
+
+PredefShakeScreenVertically:
+; Moves the window down and then back in a sequence of progressively smaller
+; numbers of pixels, starting at b.
+ call GetPredefRegisters
+ ld a, 1
+ ld [wDisableVBlankWYUpdate], a
+ xor a
+.loop
+ ldh [hMutateWY], a
+ call .MutateWY
+ call .MutateWY
+ dec b
+ ld a, b
+ jr nz, .loop
+ xor a
+ ld [wDisableVBlankWYUpdate], a
+ ret
+
+.MutateWY
+ ldh a, [hMutateWY]
+ xor b
+ ldh [hMutateWY], a
+ ldh [rWY], a
+ ld c, 3
+ jp DelayFrames
+
+PredefShakeScreenHorizontally:
+; Moves the window right and then back in a sequence of progressively smaller
+; numbers of pixels, starting at b.
+ call GetPredefRegisters
+ xor a
+.loop
+ ldh [hMutateWX], a
+ call .MutateWX
+ ld c, 1
+ call DelayFrames
+ call .MutateWX
+ dec b
+ ld a, b
+ jr nz, .loop
+
+; restore normal WX
+ ld a, 7
+ ldh [rWX], a
+ ret
+
+.MutateWX
+ ldh a, [hMutateWX]
+ xor b
+ ldh [hMutateWX], a
+ bit 7, a
+ jr z, .skipZeroing
+ xor a ; zero a if it's negative
+.skipZeroing
+ add 7
+ ldh [rWX], a
+ ld c, 4
+ jp DelayFrames
diff --git a/engine/gfx/sprite_oam.asm b/engine/gfx/sprite_oam.asm
new file mode 100644
index 00000000..01b2c412
--- /dev/null
+++ b/engine/gfx/sprite_oam.asm
@@ -0,0 +1,232 @@
+PrepareOAMData::
+; Determine OAM data for currently visible
+; sprites and write it to wOAMBuffer.
+; Yellow code has been changed to use registers more efficiently
+; as well as tweaking the code to show gbc palettes
+
+ ld a, [wUpdateSpritesEnabled]
+ dec a
+ jr z, .updateEnabled
+
+ cp -1
+ ret nz
+ ld [wUpdateSpritesEnabled], a
+ jp HideSprites
+
+.updateEnabled
+ xor a
+ ldh [hOAMBufferOffset], a
+
+.spriteLoop
+ ldh [hSpriteOffset2], a
+
+ ld e, a
+ ld d, HIGH(wSpriteStateData1)
+
+ ld a, [de] ; [x#SPRITESTATEDATA1_PICTUREID]
+ and a
+ jp z, .nextSprite
+
+ inc e
+ inc e
+ ld a, [de] ; [x#SPRITESTATEDATA1_IMAGEINDEX]
+ ld [wd5cd], a
+ cp $ff ; off-screen (don't draw)
+ jr nz, .visible
+
+ call GetSpriteScreenXY
+ jr .nextSprite
+
+.visible
+ cp $a0 ; is the sprite unchanging like an item ball or boulder?
+ jr c, .usefacing
+
+; unchanging
+ ld a, $0
+ jr .next
+
+.usefacing
+ and $f
+
+.next
+; read the entry from the table
+ ld c, a
+ ld b, 0
+ ld hl, SpriteFacingAndAnimationTable
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+; get sprite priority
+ push de
+ inc d
+ ld a, e
+ add $5
+ ld e, a
+ ld a, [de] ; [x#SPRITESTATEDATA2_GRASSPRIORITY]
+ and $80
+ ldh [hSpritePriority], a ; temp store sprite priority
+ pop de
+
+
+ call GetSpriteScreenXY
+
+ ldh a, [hOAMBufferOffset]
+ add [hl]
+ cp $a0
+ jr z, .hidden
+ jr nc, .asm_4a41
+.hidden
+ call Func_4a7b
+ ld [wd5cd], a
+ ldh a, [hOAMBufferOffset]
+
+ ld e, a
+ ld d, HIGH(wOAMBuffer)
+
+.tileLoop
+ ld a, [hli]
+ ld c, a
+.loop
+ ldh a, [hSpriteScreenY] ; temp for sprite Y position
+ add $10 ; Y=16 is top of screen (Y=0 is invisible)
+ add [hl] ; add Y offset from table
+ ld [de], a ; write new sprite OAM Y position
+ inc hl
+ inc e
+ ldh a, [hSpriteScreenX] ; temp for sprite X position
+ add $8 ; X=8 is left of screen (X=0 is invisible)
+ add [hl] ; add X offset from table
+ ld [de], a
+ inc hl
+ inc e
+ ld a, [wd5cd]
+ add [hl]
+ cp $80
+ jr c, .asm_4a1c
+ ld b, a
+ ldh a, [hFFFC]
+ add b
+.asm_4a1c
+ ld [de], a ; tile id
+ inc hl
+ inc e
+ ld a, [hl]
+ bit 1, a ; is the tile allowed to set the sprite priority bit?
+ jr z, .skipPriority
+ ldh a, [hSpritePriority]
+ or [hl]
+.skipPriority
+ and $f0
+ bit 4, a ; OBP0 or OBP1
+ jr z, .spriteusesOBP0
+ or %100 ; palettes 4-7 are OBP1
+.spriteusesOBP0
+ ld [de], a
+ inc hl
+ inc e
+ dec c
+ jr nz, .loop
+
+ ld a, e
+ ldh [hOAMBufferOffset], a
+.nextSprite
+ ldh a, [hSpriteOffset2]
+ add $10
+ cp LOW($100)
+ jp nz, .spriteLoop
+
+ ; Clear unused OAM.
+.asm_4a41
+ ld a, [wd736]
+ bit 6, a ; jumping down ledge or fishing animation?
+ ld c, $a0
+ jr z, .clear
+
+; Don't clear the last 4 entries because they are used for the shadow in the
+; jumping down ledge animation and the rod in the fishing animation.
+ ld c, $90
+
+.clear
+ ldh a, [hOAMBufferOffset]
+ cp c
+ ret nc
+ ld l, a
+ ld h, wOAMBuffer / $100
+ ld a, c
+ ld de, $4 ; entry size
+ ld b, $a0
+.clearLoop
+ ld [hl], b
+ add hl, de
+ cp l
+ jr nz, .clearLoop
+ ret
+
+GetSpriteScreenXY:
+ inc e
+ inc e
+ ld a, [de] ; [x#SPRITESTATEDATA1_YPIXELS]
+ ldh [hSpriteScreenY], a
+ inc e
+ inc e
+ ld a, [de] ; [x#SPRITESTATEDATA1_XPIXELS]
+ ldh [hSpriteScreenX], a
+ ld a, 4
+ add e
+ ld e, a
+ ldh a, [hSpriteScreenY]
+ add 4
+ and $f0
+ ld [de], a ; [x#SPRITESTATEDATA1_YADJUSTED]
+ inc e
+ ldh a, [hSpriteScreenX]
+ and $f0
+ ld [de], a ; [x#SPRITESTATEDATA1_XADJUSTED]
+ ret
+
+Func_4a7b:
+ push bc
+ ld a, [wd5cd] ; temp copy of [x#SPRITESTATEDATA1_IMAGEINDEX]
+ swap a ; high nybble determines sprite used (0 is always player sprite, next are some npcs)
+ and $f
+
+ ; Sprites $a and $b have one face (and therefore 4 tiles instead of 12).
+ ; As a result, sprite $b's tile offset is less than normal.
+ cp $b
+ jr nz, .notFourTileSprite
+ ld a, $a * 12 + 4 ; $7c
+ jr .done
+
+.notFourTileSprite
+ ; a *= 12
+ add a
+ add a
+ ld c, a
+ add a
+ add c
+.done
+ pop bc
+ ret
+
+INCLUDE "engine/gfx/oam_dma.asm"
+
+_IsTilePassable::
+ ld hl, wTilesetCollisionPtr ; pointer to list of passable tiles
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a ; hl now points to passable tiles
+.loop
+ ld a, [hli]
+ cp a, $ff
+ jr z, .tileNotPassable
+ cp c
+ jr nz, .loop
+ xor a
+ ret
+.tileNotPassable
+ scf
+ ret
+
+INCLUDE "data/tilesets/collision_tile_ids.asm"
diff --git a/engine/give_pokemon.asm b/engine/give_pokemon.asm
deleted file mode 100755
index 6fdca2ef..00000000
--- a/engine/give_pokemon.asm
+++ /dev/null
@@ -1,87 +0,0 @@
-_GivePokemon:
-; returns success in carry
-; and whether the mon was added to the party in [wAddedToParty]
- call EnableAutoTextBoxDrawing
- xor a
- ld [wAddedToParty], a
- ld a, [wPartyCount]
- cp PARTY_LENGTH
- jr c, .addToParty
- ld a, [wNumInBox]
- cp MONS_PER_BOX
- jr nc, .boxFull
-; add to box
- xor a
- ld [wEnemyBattleStatus3], a
- ld a, [wcf91]
- ld [wEnemyMonSpecies2], a
- callab LoadEnemyMonData
- call SetPokedexOwnedFlag
- callab SendNewMonToBox
- ld hl, wcf4b
- ld a, [wCurrentBoxNum]
- and $7f
- cp 9
- jr c, .singleDigitBoxNum
- sub 9
- ld [hl], "1"
- inc hl
- add "0"
- jr .next
-.singleDigitBoxNum
- add "1"
-.next
- ld [hli], a
- ld [hl], "@"
- ld hl, SetToBoxText
- call PrintText
- scf
- ret
-.boxFull
- ld hl, BoxIsFullText
- call PrintText
- and a
- ret
-.addToParty
- call SetPokedexOwnedFlag
- ld hl, UnknownTerminator_f6794
- call PrintText
- call AddPartyMon
- ld a, 1
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld [wAddedToParty], a
- scf
- ret
-
-SetPokedexOwnedFlag:
- ld a, [wcf91]
- push af
- ld [wd11e], a
- predef IndexToPokedex
- ld a, [wd11e]
- dec a
- ld c, a
- ld hl, wPokedexOwned
- ld b, FLAG_SET
- predef FlagActionPredef
- pop af
- ld [wd11e], a
- call GetMonName
- ld hl, GotMonText
- jp PrintText
-
-UnknownTerminator_f6794:
- db "@"
-
-GotMonText:
- TX_FAR _GotMonText
- TX_SFX_ITEM_1
- db "@"
-
-SetToBoxText:
- TX_FAR _SetToBoxText
- db "@"
-
-BoxIsFullText:
- TX_FAR _BoxIsFullText
- db "@"
diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm
deleted file mode 100755
index 39a7a2e3..00000000
--- a/engine/hall_of_fame.asm
+++ /dev/null
@@ -1,303 +0,0 @@
-AnimateHallOfFame:
- call HoFFadeOutScreenAndMusic
- call ClearScreen
- ld c, 100
- call DelayFrames
- call LoadFontTilePatterns
- call LoadTextBoxTilePatterns
- call DisableLCD
- ld hl, vBGMap0
- ld bc, $800
- ld a, " "
- call FillMemory
- call EnableLCD
- ld hl, rLCDC
- set 3, [hl]
- xor a
- ld hl, wHallOfFame
- ld bc, HOF_TEAM
- call FillMemory
- xor a
- ld [wUpdateSpritesEnabled], a
- ld [hTilesetType], a
- ld [wSpriteFlipped], a
- ld [wLetterPrintingDelayFlags], a ; no delay
- ld [wHoFMonOrPlayer], a ; mon
- inc a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld hl, wNumHoFTeams
- ld a, [hl]
- inc a
- jr z, .skipInc ; don't wrap around to 0
- inc [hl]
-.skipInc
- ld a, $90
- ld [hWY], a
- ld c, BANK(Music_HallOfFame)
- ld a, MUSIC_HALL_OF_FAME
- call PlayMusic
- ld hl, wPartySpecies
- ld c, $ff
-.partyMonLoop
- ld a, [hli]
- cp $ff
- jr z, .doneShowingParty
- inc c
- push hl
- push bc
- ld [wHoFMonSpecies], a
- ld a, c
- ld [wHoFPartyMonIndex], a
- ld hl, wPartyMon1Level
- ld bc, wPartyMon2 - wPartyMon1
- call AddNTimes
- ld a, [hl]
- ld [wHoFMonLevel], a
- call HoFShowMonOrPlayer
- call HoFDisplayAndRecordMonInfo
- ld c, 80
- call DelayFrames
- coord hl, 2, 13
- lb bc, 3, 14
- call TextBoxBorder
- coord hl, 4, 15
- ld de, HallOfFameText
- call PlaceString
- ld c, 180
- call DelayFrames
- call GBFadeOutToWhite
- pop bc
- pop hl
- jr .partyMonLoop
-.doneShowingParty
- ld a, c
- inc a
- ld hl, wHallOfFame
- ld bc, HOF_MON
- call AddNTimes
- ld [hl], $ff
- callab SaveHallOfFameTeams ; useless since in same bank
- xor a
- ld [wHoFMonSpecies], a
- inc a
- ld [wHoFMonOrPlayer], a ; player
- call HoFShowMonOrPlayer
- call HoFDisplayPlayerStats
- call HoFFadeOutScreenAndMusic
- xor a
- ld [hWY], a
- ld hl, rLCDC
- res 3, [hl]
- ret
-
-HallOfFameText:
- db "HALL OF FAME@"
-
-HoFShowMonOrPlayer:
- call ClearScreen
- ld a, $d0
- ld [hSCY], a
- ld a, $c0
- ld [hSCX], a
- ld a, [wHoFMonSpecies]
- ld [wcf91], a
- ld [wd0b5], a
- ld [wBattleMonSpecies2], a
- ld [wWholeScreenPaletteMonSpecies], a
- ld a, [wHoFMonOrPlayer]
- and a
- jr z, .showMon
-; show player
- call HoFLoadPlayerPics
- jr .next1
-.showMon
- coord hl, 12, 5
- call GetMonHeader
- call LoadFrontSpriteByMonIndex
- predef LoadMonBackPic
-.next1
- ld b, SET_PAL_POKEMON_WHOLE_SCREEN
- ld c, 0
- call RunPaletteCommand
- ld a, %11100100
- ld [rBGP], a
- call UpdateGBCPal_BGP
- ld c, $31 ; back pic
- call HoFLoadMonPlayerPicTileIDs
- ld d, $a0
- ld e, 4
- ld a, [wOnSGB]
- and a
- jr z, .next2
- sla e ; scroll more slowly on SGB
-.next2
- call .ScrollPic ; scroll back pic left
- xor a
- ld [hSCY], a
- ld c, a ; front pic
- call HoFLoadMonPlayerPicTileIDs
- ld d, 0
- ld e, -4
-; scroll front pic right
-
-.ScrollPic
- call DelayFrame
- ld a, [hSCX]
- add e
- ld [hSCX], a
- cp d
- jr nz, .ScrollPic
- ret
-
-HoFDisplayAndRecordMonInfo:
- ld a, [wHoFPartyMonIndex]
- ld hl, wPartyMonNicks
- call GetPartyMonName
- call HoFDisplayMonInfo
- ld a, [wHoFPartyMonIndex]
- ld [wWhichPokemon], a
- callab IsThisPartymonStarterPikachu_Party
- jr nc, .asm_70336
- ld e, $22
- callab PlayPikachuSoundClip
- jr .asm_7033c
-.asm_70336
- ld a,[wHoFMonSpecies]
- call PlayCry
-.asm_7033c
- jp HoFRecordMonInfo
-
-Func_7033f:
- call HoFDisplayMonInfo
- ld a,[wHoFMonSpecies]
- jp PlayCry
-
-HoFDisplayMonInfo:
- coord hl, 0, 2
- lb bc, 9, 10
- call TextBoxBorder
- coord hl, 2, 6
- ld de, HoFMonInfoText
- call PlaceString
- coord hl, 1, 4
- ld de, wcd6d
- call PlaceString
- ld a, [wHoFMonLevel]
- coord hl, 8, 7
- call PrintLevelCommon
- ld a, [wHoFMonSpecies]
- ld [wd0b5], a
- coord hl, 3, 9
- predef PrintMonType
- ret
-
-HoFMonInfoText:
- db "LEVEL/"
- next "TYPE1/"
- next "TYPE2/@"
-
-HoFLoadPlayerPics:
- ld de, RedPicFront
- ld a, BANK(RedPicFront)
- call UncompressSpriteFromDE
- ld a,$0
- call SwitchSRAMBankAndLatchClockData
- ld hl, sSpriteBuffer1
- ld de, sSpriteBuffer0
- ld bc, $310
- call CopyData
- call PrepareRTCDataAndDisableSRAM
- ld de, vFrontPic
- call InterlaceMergeSpriteBuffers
- ld de, RedPicBack
- ld a, BANK(RedPicBack)
- call UncompressSpriteFromDE
- predef ScaleSpriteByTwo
- ld de, vBackPic
- call InterlaceMergeSpriteBuffers
- ld c, $1
-
-HoFLoadMonPlayerPicTileIDs:
-; c = base tile ID
- ld b, 0
- coord hl, 12, 5
- predef_jump CopyTileIDsFromList
-
-HoFDisplayPlayerStats:
- SetEvent EVENT_HALL_OF_FAME_DEX_RATING
- predef DisplayDexRating
- coord hl, 0, 4
- lb bc, 6, 10
- call TextBoxBorder
- coord hl, 5, 0
- lb bc, 2, 9
- call TextBoxBorder
- coord hl, 7, 2
- ld de, wPlayerName
- call PlaceString
- coord hl, 1, 6
- ld de, HoFPlayTimeText
- call PlaceString
- coord hl, 5, 7
- ld de, wPlayTimeHours
- lb bc, 1, 3
- call PrintNumber
- ld [hl], $6d
- inc hl
- ld de, wPlayTimeMinutes
- lb bc, LEADING_ZEROES | 1, 2
- call PrintNumber
- coord hl, 1, 9
- ld de, HoFMoneyText
- call PlaceString
- coord hl, 4, 10
- ld de, wPlayerMoney
- ld c, $a3
- call PrintBCDNumber
- ld hl, DexSeenOwnedText
- call HoFPrintTextAndDelay
- ld hl, DexRatingText
- call HoFPrintTextAndDelay
- ld hl, wDexRatingText
-
-HoFPrintTextAndDelay:
- call PrintText
- ld c, 120
- jp DelayFrames
-
-HoFPlayTimeText:
- db "PLAY TIME@"
-
-HoFMoneyText:
- db "MONEY@"
-
-DexSeenOwnedText:
- TX_FAR _DexSeenOwnedText
- db "@"
-
-DexRatingText:
- TX_FAR _DexRatingText
- db "@"
-
-HoFRecordMonInfo:
- ld hl, wHallOfFame
- ld bc, HOF_MON
- ld a, [wHoFPartyMonIndex]
- call AddNTimes
- ld a, [wHoFMonSpecies]
- ld [hli], a
- ld a, [wHoFMonLevel]
- ld [hli], a
- ld e, l
- ld d, h
- ld hl, wcd6d
- ld bc, NAME_LENGTH
- jp CopyData
-
-HoFFadeOutScreenAndMusic:
- ld a, 10
- ld [wAudioFadeOutCounterReloadValue], a
- ld [wAudioFadeOutCounter], a
- ld a, $ff
- ld [wAudioFadeOutControl], a
- jp GBFadeOutToWhite
diff --git a/engine/hidden_object_functions14.asm b/engine/hidden_object_functions14.asm
deleted file mode 100755
index 04f9cb35..00000000
--- a/engine/hidden_object_functions14.asm
+++ /dev/null
@@ -1,100 +0,0 @@
-PrintNotebookText:
- call EnableAutoTextBoxDrawing
- ld a, $1
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, [wHiddenObjectFunctionArgument]
- jp PrintPredefTextID
-
-TMNotebook:
- TX_FAR TMNotebookText
- TX_WAIT
- db "@"
-
-ViridianSchoolNotebook:
- TX_ASM
- ld hl, ViridianSchoolNotebookText1
- call PrintText
- call TurnPageSchoolNotebook
- jr nz, .doneReading
- ld hl, ViridianSchoolNotebookText2
- call PrintText
- call TurnPageSchoolNotebook
- jr nz, .doneReading
- ld hl, ViridianSchoolNotebookText3
- call PrintText
- call TurnPageSchoolNotebook
- jr nz, .doneReading
- ld hl, ViridianSchoolNotebookText4
- call PrintText
- ld hl, ViridianSchoolNotebookText5
- call PrintText
-.doneReading
- jp TextScriptEnd
-
-TurnPageSchoolNotebook:
- ld hl, TurnPageText
- call PrintText
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- and a
- ret
-
-TurnPageText:
- TX_FAR _TurnPageText
- db "@"
-
-ViridianSchoolNotebookText5:
- TX_FAR _ViridianSchoolNotebookText5
- TX_WAIT
- db "@"
-
-ViridianSchoolNotebookText1:
- TX_FAR _ViridianSchoolNotebookText1
- db "@"
-
-ViridianSchoolNotebookText2:
- TX_FAR _ViridianSchoolNotebookText2
- db "@"
-
-ViridianSchoolNotebookText3:
- TX_FAR _ViridianSchoolNotebookText3
- db "@"
-
-ViridianSchoolNotebookText4:
- TX_FAR _ViridianSchoolNotebookText4
- db "@"
-
-PrintFightingDojoText2:
- call EnableAutoTextBoxDrawing
- tx_pre_jump EnemiesOnEverySideText
-
-EnemiesOnEverySideText:
- TX_FAR _EnemiesOnEverySideText
- db "@"
-
-PrintFightingDojoText3:
- call EnableAutoTextBoxDrawing
- tx_pre_jump WhatGoesAroundComesAroundText
-
-WhatGoesAroundComesAroundText:
- TX_FAR _WhatGoesAroundComesAroundText
- db "@"
-
-PrintFightingDojoText:
- call EnableAutoTextBoxDrawing
- tx_pre_jump FightingDojoText
-
-FightingDojoText:
- TX_FAR _FightingDojoText
- db "@"
-
-PrintIndigoPlateauHQText:
- ld a, [wSpritePlayerStateData1FacingDirection]
- cp SPRITE_FACING_UP
- ret nz
- call EnableAutoTextBoxDrawing
- tx_pre_jump IndigoPlateauHQText
-
-IndigoPlateauHQText:
- TX_FAR _IndigoPlateauHQText
- db "@"
diff --git a/engine/hidden_object_functions17.asm b/engine/hidden_object_functions17.asm
deleted file mode 100755
index 8775fd39..00000000
--- a/engine/hidden_object_functions17.asm
+++ /dev/null
@@ -1,466 +0,0 @@
-PrintRedSNESText:
- call EnableAutoTextBoxDrawing
- tx_pre_jump RedBedroomSNESText
-
-RedBedroomSNESText:
- TX_FAR _RedBedroomSNESText
- db "@"
-
-OpenRedsPC:
- call EnableAutoTextBoxDrawing
- tx_pre_jump RedBedroomPCText
-
-RedBedroomPCText:
- TX_PLAYERS_PC
-
-Route15GateLeftBinoculars:
- ld a, [wSpritePlayerStateData1FacingDirection]
- cp SPRITE_FACING_UP
- ret nz
- call EnableAutoTextBoxDrawing
- tx_pre Route15UpstairsBinocularsText
- ld a, ARTICUNO
- ld [wcf91], a
- call PlayCry
- call DisplayMonFrontSpriteInBox
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ret
-
-Route15UpstairsBinocularsText:
- TX_FAR _Route15UpstairsBinocularsText
- db "@"
-
-AerodactylFossil:
- ld a, FOSSIL_AERODACTYL
- ld [wcf91], a
- call DisplayMonFrontSpriteInBox
- call EnableAutoTextBoxDrawing
- tx_pre AerodactylFossilText
- ret
-
-AerodactylFossilText:
- TX_FAR _AerodactylFossilText
- db "@"
-
-KabutopsFossil:
- ld a, FOSSIL_KABUTOPS
- ld [wcf91], a
- call DisplayMonFrontSpriteInBox
- call EnableAutoTextBoxDrawing
- tx_pre KabutopsFossilText
- ret
-
-KabutopsFossilText:
- TX_FAR _KabutopsFossilText
- db "@"
-
-FanClubPicture1:
- ld a, RAPIDASH
- ld [wcf91], a
- call DisplayMonFrontSpriteInBox
- call EnableAutoTextBoxDrawing
- tx_pre FanClubPicture1Text
- ret
-
-FanClubPicture1Text:
- TX_FAR _FanClubPicture1Text
- db "@"
-
-FanClubPicture2:
- ld a, FEAROW
- ld [wcf91], a
- call DisplayMonFrontSpriteInBox
- call EnableAutoTextBoxDrawing
- tx_pre FanClubPicture2Text
- ret
-
-FanClubPicture2Text:
- TX_FAR _FanClubPicture2Text
- db "@"
-
-DisplayMonFrontSpriteInBox:
-; Displays a pokemon's front sprite in a pop-up window.
-; [wcf91] = pokemon internal id number
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- call Delay3
- xor a
- ld [hWY], a
- call SaveScreenTilesToBuffer1
- ld a, MON_SPRITE_POPUP
- ld [wTextBoxID], a
- call DisplayTextBoxID
- call UpdateSprites
- ld a, [wcf91]
- ld [wd0b5], a
- call GetMonHeader
- ld de, vChars1 + $310
- call LoadMonFrontSprite
- ld a, $80
- ld [hStartTileID], a
- coord hl, 10, 11
- predef AnimateSendingOutMon
- call WaitForTextScrollButtonPress
- call LoadScreenTilesFromBuffer1
- call Delay3
- ld a, $90
- ld [hWY], a
- ret
-
-PrintBlackboardLinkCableText:
- call EnableAutoTextBoxDrawing
- ld a, $1
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, [wHiddenObjectFunctionArgument]
- call PrintPredefTextID
- ret
-
-LinkCableHelp:
- TX_ASM
- call SaveScreenTilesToBuffer1
- ld hl, LinkCableHelpText1
- call PrintText
- xor a
- ld [wMenuItemOffset], a ; not used
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld a, A_BUTTON | B_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, 3
- ld [wMaxMenuItem], a
- ld a, 2
- ld [wTopMenuItemY], a
- ld a, 1
- ld [wTopMenuItemX], a
-.linkHelpLoop
- ld hl, wd730
- set 6, [hl]
- coord hl, 0, 0
- lb bc, 8, 13
- call TextBoxBorder
- coord hl, 2, 2
- ld de, HowToLinkText
- call PlaceString
- ld hl, LinkCableHelpText2
- call PrintText
- call HandleMenuInput
- bit 1, a ; pressed b
- jr nz, .exit
- ld a, [wCurrentMenuItem]
- 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 e, a
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call PrintText
- jp .linkHelpLoop
-.exit
- ld hl, wd730
- res 6, [hl]
- call LoadScreenTilesFromBuffer1
- jp TextScriptEnd
-
-LinkCableHelpText1:
- TX_FAR _LinkCableHelpText1
- db "@"
-
-LinkCableHelpText2:
- TX_FAR _LinkCableHelpText2
- db "@"
-
-HowToLinkText:
- db "HOW TO LINK"
- next "COLOSSEUM"
- next "TRADE CENTER"
- next "STOP READING@"
-
-LinkCableInfoTexts:
- dw LinkCableInfoText1
- dw LinkCableInfoText2
- dw LinkCableInfoText3
-
-LinkCableInfoText1:
- TX_FAR _LinkCableInfoText1
- db "@"
-
-LinkCableInfoText2:
- TX_FAR _LinkCableInfoText2
- db "@"
-
-LinkCableInfoText3:
- TX_FAR _LinkCableInfoText3
- db "@"
-
-ViridianSchoolBlackboard:
- TX_ASM
- call SaveScreenTilesToBuffer1
- ld hl, ViridianSchoolBlackboardText1
- call PrintText
- xor a
- ld [wMenuItemOffset], a
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld a, D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, 2
- ld [wMaxMenuItem], a
- ld a, 2
- ld [wTopMenuItemY], a
- ld a, 1
- ld [wTopMenuItemX], a
-.blackboardLoop
- ld hl, wd730
- set 6, [hl]
- coord hl, 0, 0
- lb bc, 6, 10
- call TextBoxBorder
- coord hl, 1, 2
- ld de, StatusAilmentText1
- call PlaceString
- coord hl, 6, 2
- ld de, StatusAilmentText2
- call PlaceString
- ld hl, ViridianSchoolBlackboardText2
- call PrintText
- call HandleMenuInput ; pressing up and down is handled in here
- bit 1, a ; pressed b
- jr nz, .exitBlackboard
- bit 4, a ; pressed right
- jr z, .didNotPressRight
- ; move cursor to right column
- ld a, 2
- ld [wMaxMenuItem], a
- ld a, 2
- ld [wTopMenuItemY], a
- ld a, 6
- ld [wTopMenuItemX], a
- 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 [wTopMenuItemY], a
- ld a, 1
- ld [wTopMenuItemX], a
- xor a
- ld [wMenuItemOffset], a
- jr .blackboardLoop
-.didNotPressLeftOrRight
- ld a, [wCurrentMenuItem]
- ld b, a
- ld a, [wMenuItemOffset]
- add b
- 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 e, a
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call PrintText
- jp .blackboardLoop
-.exitBlackboard
- ld hl, wd730
- res 6, [hl]
- call LoadScreenTilesFromBuffer1
- jp TextScriptEnd
-
-ViridianSchoolBlackboardText1:
- TX_FAR _ViridianSchoolBlackboardText1
- db "@"
-
-ViridianSchoolBlackboardText2:
- TX_FAR _ViridianSchoolBlackboardText2
- db "@"
-
-StatusAilmentText1:
- db " SLP"
- next " PSN"
- next " PAR@"
-
-StatusAilmentText2:
- db " BRN"
- next " FRZ"
- next " QUIT@@"
-
-ViridianBlackboardStatusPointers:
- dw ViridianBlackboardSleepText
- dw ViridianBlackboardPoisonText
- dw ViridianBlackboardPrlzText
- dw ViridianBlackboardBurnText
- dw ViridianBlackboardFrozenText
-
-ViridianBlackboardSleepText:
- TX_FAR _ViridianBlackboardSleepText
- db "@"
-
-ViridianBlackboardPoisonText:
- TX_FAR _ViridianBlackboardPoisonText
- db "@"
-
-ViridianBlackboardPrlzText:
- TX_FAR _ViridianBlackboardPrlzText
- db "@"
-
-ViridianBlackboardBurnText:
- TX_FAR _ViridianBlackboardBurnText
- db "@"
-
-ViridianBlackboardFrozenText:
- TX_FAR _ViridianBlackboardFrozenText
- db "@"
-
-PrintTrashText:
- call EnableAutoTextBoxDrawing
- tx_pre_jump VermilionGymTrashText
-
-VermilionGymTrashText:
- TX_FAR _VermilionGymTrashText
- db "@"
-
-GymTrashScript:
- call EnableAutoTextBoxDrawing
- ld a, [wHiddenObjectFunctionArgument]
- ld [wGymTrashCanIndex], a
-
-; Don't do the trash can puzzle if it's already been done.
- CheckEvent EVENT_2ND_LOCK_OPENED
- jr z, .ok
-
- tx_pre_jump VermilionGymTrashText
-
-.ok
- CheckEventReuseA EVENT_1ST_LOCK_OPENED
- jr nz, .trySecondLock
-
- ld a, [wFirstLockTrashCanIndex]
- ld b, a
- ld a, [wGymTrashCanIndex]
- cp b
- jr z, .openFirstLock
-
- tx_pre_id VermilionGymTrashText
- jr .done
-
-.openFirstLock
-; Next can is trying for the second switch.
- SetEvent EVENT_1ST_LOCK_OPENED
- callab Yellow_SampleSecondTrashCan
- tx_pre_id VermilionGymTrashSuccessText1
- jr .done
-
-.trySecondLock
- ld a, [wGymTrashCanIndex]
- ld b, a
- ld a, [wSecondLockTrashCanIndex]
- cp b
- jr z, .openSecondLock
- ld a, [wSecondLockTrashCanIndex + 1]
- cp b
- jr z, .openSecondLock
-
-; Reset the cans.
- ResetEvent EVENT_1ST_LOCK_OPENED
- call Random
-
- and $e
- ld [wFirstLockTrashCanIndex], a
-
- tx_pre_id VermilionGymTrashFailText
- jr .done
-
-.openSecondLock
-; Completed the trash can puzzle.
- SetEvent EVENT_2ND_LOCK_OPENED
- ld hl, wCurrentMapScriptFlags
- set 6, [hl]
-
- tx_pre_id VermilionGymTrashSuccessText3
-
-.done
- jp PrintPredefTextID
-
-GymTrashCans:
-; byte 0: mask for random number
-; bytes 1-4: indices of the trash cans that can have the second lock
-; Note that the mask is simply the number of valid trash can indices that
-; follow. The remaining bytes are filled with -1 to pad the length of each entry
-; to 5 bytes.
-; This is functionally replaced with GymTrashCans3a but was never removed from source.
-
- db 2, 1, 3, -1, -1 ; 0
- db 3, 0, 2, 4, -1 ; 1
- db 2, 1, 5, -1, -1 ; 2
- db 3, 0, 4, 6, -1 ; 3
- db 4, 1, 3, 5, 7 ; 4
- db 3, 2, 4, 8, -1 ; 5
- db 3, 3, 7, 9, -1 ; 6
- db 4, 4, 6, 8, 10 ; 7
- db 3, 5, 7, 11, -1 ; 8
- db 3, 6, 10, 12, -1 ; 9
- db 4, 7, 9, 11, 13 ; 10
- db 3, 8, 10, 14, -1 ; 11
- db 2, 9, 13, -1, -1 ; 12
- db 3, 10, 12, 14, -1 ; 13
- db 2, 11, 13, -1, -1 ; 14
-
-VermilionGymTrashSuccessText1:
- TX_FAR _VermilionGymTrashSuccessText1
- TX_ASM
- call WaitForSoundToFinish
- ld a, SFX_SWITCH
- call PlaySound
- call WaitForSoundToFinish
- jp TextScriptEnd
-
-; unused
-VermilionGymTrashSuccessText2:
- TX_FAR _VermilionGymTrashSuccessText2
- db "@"
-
-; unused
-VermilionGymTrashSuccesPlaySfx:
- TX_ASM
- call WaitForSoundToFinish
- ld a, SFX_SWITCH
- call PlaySound
- call WaitForSoundToFinish
- jp TextScriptEnd
-
-VermilionGymTrashSuccessText3:
- TX_FAR _VermilionGymTrashSuccessText3
- TX_ASM
- call WaitForSoundToFinish
- ld a, SFX_GO_INSIDE
- call PlaySound
- call WaitForSoundToFinish
- jp TextScriptEnd
-
-VermilionGymTrashFailText:
- TX_FAR _VermilionGymTrashFailText
- TX_ASM
- call WaitForSoundToFinish
- ld a, SFX_DENIED
- call PlaySound
- call WaitForSoundToFinish
- jp TextScriptEnd
diff --git a/engine/hidden_object_functions18.asm b/engine/hidden_object_functions18.asm
deleted file mode 100755
index 3fd5dd47..00000000
--- a/engine/hidden_object_functions18.asm
+++ /dev/null
@@ -1,204 +0,0 @@
-GymStatues:
-; if in a gym and have the corresponding badge, a = GymStatueText2_id and jp PrintPredefTextID
-; if in a gym and don’t have the corresponding badge, a = GymStatueText1_id and jp PrintPredefTextID
-; else ret
- call EnableAutoTextBoxDrawing
- ld a, [wSpritePlayerStateData1FacingDirection]
- cp SPRITE_FACING_UP
- ret nz
- ld hl, .BadgeFlags
- ld a, [wCurMap]
- ld b, a
-.loop
- ld a, [hli]
- cp $ff
- ret z
- cp b
- jr z, .match
- inc hl
- jr .loop
-.match
- ld b, [hl]
- ld a, [wBeatGymFlags]
- and b
- cp b
- tx_pre_id GymStatueText2
- jr z, .haveBadge
- tx_pre_id GymStatueText1
-.haveBadge
- jp PrintPredefTextID
-
-.BadgeFlags:
- db PEWTER_GYM, %00000001
- db CERULEAN_GYM, %00000010
- db VERMILION_GYM, %00000100
- db CELADON_GYM, %00001000
- db FUCHSIA_GYM, %00010000
- db SAFFRON_GYM, %00100000
- db CINNABAR_GYM, %01000000
- db VIRIDIAN_GYM, %10000000
- db $ff
-
-GymStatueText1:
- TX_FAR _GymStatueText1
- db "@"
-
-GymStatueText2:
- TX_FAR _GymStatueText2
- db "@"
-
-PrintBenchGuyText:
- call EnableAutoTextBoxDrawing
- ld hl, BenchGuyTextPointers
- ld a, [wCurMap]
- ld b, a
-.loop
- ld a, [hli]
- cp $ff
- ret z
- cp b
- jr z, .match
- inc hl
- inc hl
- jr .loop
-.match
- ld a, [hli]
- ld b, a
- ld a, [wSpritePlayerStateData1FacingDirection]
- cp b
- jr nz, .loop ; player isn't facing left at the bench guy
- ld a, [hl]
- jp PrintPredefTextID
-
-; format: db map id, player sprite facing direction, text id of PredefTextIDPointerTable
-BenchGuyTextPointers:
- db VIRIDIAN_POKECENTER, SPRITE_FACING_LEFT
- db_tx_pre ViridianCityPokecenterBenchGuyText
- db PEWTER_POKECENTER, SPRITE_FACING_LEFT
- db_tx_pre PewterCityPokecenterBenchGuyText
- db CERULEAN_POKECENTER, SPRITE_FACING_LEFT
- db_tx_pre CeruleanCityPokecenterBenchGuyText
- db LAVENDER_POKECENTER, SPRITE_FACING_LEFT
- db_tx_pre LavenderCityPokecenterBenchGuyText
- db VERMILION_POKECENTER, SPRITE_FACING_LEFT
- db_tx_pre VermilionCityPokecenterBenchGuyText
- db CELADON_POKECENTER, SPRITE_FACING_LEFT
- db_tx_pre CeladonCityPokecenterBenchGuyText
- db CELADON_HOTEL, SPRITE_FACING_LEFT
- db_tx_pre CeladonCityHotelText
- db FUCHSIA_POKECENTER, SPRITE_FACING_LEFT
- db_tx_pre FuchsiaCityPokecenterBenchGuyText
- db CINNABAR_POKECENTER, SPRITE_FACING_LEFT
- db_tx_pre CinnabarIslandPokecenterBenchGuyText
- db SAFFRON_POKECENTER, SPRITE_FACING_LEFT
- db_tx_pre SaffronCityPokecenterBenchGuyText
- db MT_MOON_POKECENTER, SPRITE_FACING_LEFT
- db_tx_pre MtMoonPokecenterBenchGuyText
- db ROCK_TUNNEL_POKECENTER, SPRITE_FACING_LEFT
- db_tx_pre RockTunnelPokecenterBenchGuyText
- db SAFARI_ZONE_WEST_REST_HOUSE,SPRITE_FACING_LEFT
- db_tx_pre UnusedBenchGuyText1
- db SAFARI_ZONE_EAST_REST_HOUSE,SPRITE_FACING_LEFT
- db_tx_pre UnusedBenchGuyText2
- db SAFARI_ZONE_NORTH_REST_HOUSE,SPRITE_FACING_LEFT
- db_tx_pre UnusedBenchGuyText3
- db $FF
-
-ViridianCityPokecenterBenchGuyText:
- TX_FAR _ViridianCityPokecenterGuyText
- db "@"
-
-PewterCityPokecenterBenchGuyText:
- TX_FAR _PewterCityPokecenterGuyText
- db "@"
-
-CeruleanCityPokecenterBenchGuyText:
- TX_FAR _CeruleanPokecenterGuyText
- db "@"
-
-LavenderCityPokecenterBenchGuyText:
- TX_FAR _LavenderPokecenterGuyText
- db "@"
-
-MtMoonPokecenterBenchGuyText:
- TX_FAR _MtMoonPokecenterBenchGuyText
- db "@"
-
-RockTunnelPokecenterBenchGuyText:
- TX_FAR _RockTunnelPokecenterGuyText
- db "@"
-
-UnusedBenchGuyText1:
- TX_FAR _UnusedBenchGuyText1
- db "@"
-
-UnusedBenchGuyText2:
- TX_FAR _UnusedBenchGuyText2
- db "@"
-
-UnusedBenchGuyText3:
- TX_FAR _UnusedBenchGuyText3
- db "@"
-
-VermilionCityPokecenterBenchGuyText:
- TX_FAR _VermilionPokecenterGuyText
- db "@"
-
-CeladonCityPokecenterBenchGuyText:
- TX_FAR _CeladonCityPokecenterGuyText
- db "@"
-
-FuchsiaCityPokecenterBenchGuyText:
- TX_FAR _FuchsiaCityPokecenterGuyText
- db "@"
-
-CinnabarIslandPokecenterBenchGuyText:
- TX_FAR _CinnabarPokecenterGuyText
- db "@"
-
-SaffronCityPokecenterBenchGuyText:
- TX_ASM
- CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
- ld hl, SaffronCityPokecenterBenchGuyText2
- jr nz, .asm_624f2
- ld hl, SaffronCityPokecenterBenchGuyText1
-.asm_624f2
- call PrintText
- jp TextScriptEnd
-
-SaffronCityPokecenterBenchGuyText1:
- TX_FAR _SaffronCityPokecenterGuyText1
- db "@"
-
-SaffronCityPokecenterBenchGuyText2:
- TX_FAR _SaffronCityPokecenterGuyText2
- db "@"
-
-CeladonCityHotelText:
- TX_FAR _CeladonCityHotelText
- db "@"
-
- ret
-
-UnusedPredefText:
- db "@"
-
-PrintBookcaseText:
- call EnableAutoTextBoxDrawing
- tx_pre_jump BookcaseText
-
-BookcaseText:
- TX_FAR _BookcaseText
- db "@"
-
-OpenPokemonCenterPC:
- ld a, [wSpritePlayerStateData1FacingDirection]
- cp SPRITE_FACING_UP ; check to see if player is facing up
- ret nz
- call EnableAutoTextBoxDrawing
- ld a, $1
- ld [wAutoTextBoxDrawingControl], a
- tx_pre_jump PokemonCenterPCText
-
-PokemonCenterPCText:
- TX_POKECENTER_PC
diff --git a/engine/hidden_object_functions3.asm b/engine/hidden_object_functions3.asm
deleted file mode 100755
index 11aecd5b..00000000
--- a/engine/hidden_object_functions3.asm
+++ /dev/null
@@ -1,153 +0,0 @@
-; prints text for bookshelves in buildings without sign events
-PrintBookshelfText:
- ld a, [wSpritePlayerStateData1FacingDirection] ; player's sprite facing direction
- cp SPRITE_FACING_UP
- jr nz, .noMatch
-; facing up
- ld a, [wCurMapTileset]
- ld b, a
- aCoord 8, 7
- ld c, a
- ld hl, BookshelfTileIDs
-.loop
- ld a, [hli]
- cp $ff
- jr z, .noMatch
- cp b
- jr nz, .nextBookshelfEntry1
- ld a, [hli]
- cp c
- jr nz, .nextBookshelfEntry2
- ld a, [hl]
- push af
- call EnableAutoTextBoxDrawing
- pop af
- call PrintPredefTextID
- xor a
- ld [$ffdb], a
- ret
-.nextBookshelfEntry1
- inc hl
-.nextBookshelfEntry2
- inc hl
- jr .loop
-.noMatch
- ld a, $ff
- ld [$ffdb], a
- jpba PrintCardKeyText
-
-; format: db tileset id, bookshelf tile id, text id
-BookshelfTileIDs:
- db PLATEAU, $30
- db_tx_pre IndigoPlateauStatues
- db HOUSE, $3D
- db_tx_pre TownMapText
- db HOUSE, $1E
- db_tx_pre BookOrSculptureText
- db MANSION, $32
- db_tx_pre BookOrSculptureText
- db REDS_HOUSE_1, $32
- db_tx_pre BookOrSculptureText
- db LAB, $28
- db_tx_pre BookOrSculptureText
- db LOBBY, $16
- db_tx_pre ElevatorText
- db GYM, $1D
- db_tx_pre BookOrSculptureText
- db DOJO, $1D
- db_tx_pre BookOrSculptureText
- db GATE, $22
- db_tx_pre BookOrSculptureText
- db MART, $54
- db_tx_pre PokemonStuffText
- db MART, $55
- db_tx_pre PokemonStuffText
- db POKECENTER, $54
- db_tx_pre PokemonStuffText
- db POKECENTER, $55
- db_tx_pre PokemonStuffText
- db LOBBY, $50
- db_tx_pre PokemonStuffText
- db LOBBY, $52
- db_tx_pre PokemonStuffText
- db SHIP, $36
- db_tx_pre BookOrSculptureText
- db $FF
-
-IndigoPlateauStatues:
- TX_ASM
- ld hl, IndigoPlateauStatuesText1
- call PrintText
- ld a, [wXCoord]
- bit 0, a
- ld hl, IndigoPlateauStatuesText2
- jr nz, .ok
- ld hl, IndigoPlateauStatuesText3
-.ok
- call PrintText
- jp TextScriptEnd
-
-IndigoPlateauStatuesText1:
- TX_FAR _IndigoPlateauStatuesText1
- db "@"
-
-IndigoPlateauStatuesText2:
- TX_FAR _IndigoPlateauStatuesText2
- db "@"
-
-IndigoPlateauStatuesText3:
- TX_FAR _IndigoPlateauStatuesText3
- db "@"
-
-BookOrSculptureText:
- TX_ASM
- ld hl, PokemonBooksText
- ld a, [wCurMapTileset]
- cp MANSION ; Celadon Mansion tileset
- jr nz, .ok
- aCoord 8, 6
- cp $38
- jr nz, .ok
- ld hl, DiglettSculptureText
-.ok
- call PrintText
- jp TextScriptEnd
-
-PokemonBooksText:
- TX_FAR _PokemonBooksText
- db "@"
-
-DiglettSculptureText:
- TX_FAR _DiglettSculptureText
- db "@"
-
-ElevatorText:
- TX_FAR _ElevatorText
- db "@"
-
-TownMapText:
- TX_FAR _TownMapText
- TX_BLINK
- TX_ASM
- ld a, $1
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, wd730
- set 6, [hl]
- call GBPalWhiteOutWithDelay3
- xor a
- ld [hWY], a
- inc a
- ld [H_AUTOBGTRANSFERENABLED], a
- call LoadFontTilePatterns
- callba DisplayTownMap
- ld hl, wd730
- res 6, [hl]
- ld de, TextScriptEnd
- push de
- ld a, [H_LOADEDROMBANK]
- push af
- jp CloseTextDisplay
-
-PokemonStuffText:
- TX_FAR _PokemonStuffText
- db "@"
diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm
deleted file mode 100755
index 2498c167..00000000
--- a/engine/hidden_object_functions7.asm
+++ /dev/null
@@ -1,510 +0,0 @@
-PrintNewBikeText:
- call EnableAutoTextBoxDrawing
- tx_pre_jump NewBicycleText
-
-NewBicycleText:
- TX_FAR _NewBicycleText
- db "@"
-
-DisplayOakLabLeftPoster:
- call EnableAutoTextBoxDrawing
- tx_pre_jump PushStartText
-
-PushStartText:
- TX_FAR _PushStartText
- db "@"
-
-DisplayOakLabRightPoster:
- call EnableAutoTextBoxDrawing
- ld hl, wPokedexOwned
- ld b, wPokedexOwnedEnd - wPokedexOwned
- call CountSetBits
- ld a, [wNumSetBits]
- cp 2
- tx_pre_id SaveOptionText
- jr c, .ownLessThanTwo
- ; own two or more mon
- tx_pre_id StrengthsAndWeaknessesText
-.ownLessThanTwo
- jp PrintPredefTextID
-
-SaveOptionText:
- TX_FAR _SaveOptionText
- db "@"
-
-StrengthsAndWeaknessesText:
- TX_FAR _StrengthsAndWeaknessesText
- db "@"
-
-SafariZoneCheck:
- 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, [wNumSafariBalls]
- and a
- jr z, SafariZoneGameOver
- jr SafariZoneGameStillGoing
-
-SafariZoneCheckSteps:
- ld a, [wSafariSteps]
- ld b, a
- ld a, [wSafariSteps + 1]
- ld c, a
- or b
- jr z, SafariZoneGameOver
- dec bc
- ld a, b
- ld [wSafariSteps], a
- ld a, c
- ld [wSafariSteps + 1], a
-SafariZoneGameStillGoing:
- xor a
- ld [wSafariZoneGameOver], a
- ret
-
-SafariZoneGameOver:
- call EnableAutoTextBoxDrawing
- xor a
- ld [wAudioFadeOutControl], a
- call StopAllMusic
- ld c, BANK(SFX_Safari_Zone_PA)
- ld a, SFX_SAFARI_ZONE_PA
- call PlayMusic
-.waitForMusicToPlay
- ld a, [wChannelSoundIDs + Ch5]
- cp SFX_SAFARI_ZONE_PA
- jr nz, .waitForMusicToPlay
- ld a, TEXT_SAFARI_GAME_OVER
- ld [hSpriteIndexOrTextID], a
- call DisplayTextID
- xor a
- ld [wPlayerMovingDirection], a
- ld a, SAFARI_ZONE_GATE
- ld [hWarpDestinationMap], a
- ld a, $3
- ld [wDestinationWarpID], a
- ld a, $5
- ld [wSafariZoneGateCurScript], a
- SetEvent EVENT_SAFARI_GAME_OVER
- ld a, 1
- ld [wSafariZoneGameOver], a
- ret
-
-PrintSafariGameOverText:
- xor a
- ld [wJoyIgnore], a
- ld hl, SafariGameOverText
- jp PrintText
-
-SafariGameOverText:
- TX_ASM
- ld a, [wNumSafariBalls]
- and a
- jr z, .noMoreSafariBalls
- ld hl, TimesUpText
- call PrintText
-.noMoreSafariBalls
- ld hl, GameOverText
- call PrintText
- jp TextScriptEnd
-
-TimesUpText:
- TX_FAR _TimesUpText
- db "@"
-
-GameOverText:
- TX_FAR _GameOverText
- db "@"
-
-PrintCinnabarQuiz:
- ld a, [wSpritePlayerStateData1FacingDirection]
- cp SPRITE_FACING_UP
- ret nz
- call EnableAutoTextBoxDrawing
- tx_pre_jump CinnabarGymQuiz
-
-CinnabarGymQuiz:
- TX_ASM
- xor a
- ld [wOpponentAfterWrongAnswer], a
- ld hl, wd475
- res 7, [hl]
- ld a, [wHiddenObjectFunctionArgument]
- push af
- and $f
- ld [hGymGateIndex], a
- pop af
- and $f0
- swap a
- ld [$ffdc], a
- ld a, [hGymGateIndex]
- ld hl, CinnabarGymQuizIntroText
- cp 1
- jr z, .onFirstQuestion
- ld hl, CinnabarGymQuizShortIntroText
-.onFirstQuestion
- call PrintText
- ld a, [hGymGateIndex]
- dec a
- add a
- ld d, 0
- ld e, a
- ld hl, CinnabarQuizQuestions
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call PrintText
- ld a, 1
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- call CinnabarGymQuiz_1ea92
- jp TextScriptEnd
-
-CinnabarGymQuizDummyIntroText:
- TX_FAR _CinnabarGymQuizDummyIntroText
- db "@"
-
-CinnabarGymQuizIntroText:
- TX_FAR _CinnabarGymQuizIntroText
- db "@"
-
-CinnabarGymQuizShortIntroText:
- TX_FAR _CinnabarGymQuizShortIntroText
- db "@"
-
-CinnabarQuizQuestions:
- dw CinnabarQuizQuestionsText1
- dw CinnabarQuizQuestionsText2
- dw CinnabarQuizQuestionsText3
- dw CinnabarQuizQuestionsText4
- dw CinnabarQuizQuestionsText5
- dw CinnabarQuizQuestionsText6
-
-CinnabarQuizQuestionsText1:
- TX_FAR _CinnabarQuizQuestionsText1
- db "@"
-
-CinnabarQuizQuestionsText2:
- TX_FAR _CinnabarQuizQuestionsText2
- db "@"
-
-CinnabarQuizQuestionsText3:
- TX_FAR _CinnabarQuizQuestionsText3
- db "@"
-
-CinnabarQuizQuestionsText4:
- TX_FAR _CinnabarQuizQuestionsText4
- db "@"
-
-CinnabarQuizQuestionsText5:
- TX_FAR _CinnabarQuizQuestionsText5
- db "@"
-
-CinnabarQuizQuestionsText6:
- TX_FAR _CinnabarQuizQuestionsText6
- db "@"
-
-CinnabarGymQuiz_1ea92:
- call YesNoChoice
- ld a, [$ffdc]
- ld c, a
- ld a, [wCurrentMenuItem]
- cp c
- jr nz, .wrongAnswer
- ld hl, wCurrentMapScriptFlags
- set 5, [hl]
- ld a, [hGymGateIndex]
- ld [$ffe0], a
- ld hl, CinnabarGymQuizCorrectText
- call PrintText
- ld a, [$ffe0]
- AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
- ld c, a
- ld b, FLAG_SET
- call CinnabarGymGateFlagAction
- jp UpdateCinnabarGymGateTileBlocks_
-.wrongAnswer
- call WaitForSoundToFinish
- ld a, SFX_DENIED
- call PlaySound
- call WaitForSoundToFinish
- ld hl, CinnabarGymQuizIncorrectText
- call PrintText
- ld a, [hGymGateIndex]
- add $2
- AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2
- ld c, a
- ld b, FLAG_TEST
- EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0
- predef FlagActionPredef
- ld a, c
- and a
- ret nz
- ld a, [hGymGateIndex]
- add $2
- ld [wOpponentAfterWrongAnswer], a
- ld hl, wd475
- set 7, [hl]
- ret
-
-CinnabarGymQuizCorrectText:
- TX_SFX_ITEM_1
- TX_FAR _CinnabarGymQuizCorrectText
- TX_BLINK
- TX_ASM
-
- ld a, [$ffe0]
- AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
- ld c, a
- ld b, FLAG_TEST
- call CinnabarGymGateFlagAction
- ld a, c
- and a
- jp nz, TextScriptEnd
- call WaitForSoundToFinish
- ld a, SFX_GO_INSIDE
- call PlaySound
- call WaitForSoundToFinish
- jp TextScriptEnd
-
-CinnabarGymQuizIncorrectText:
- TX_FAR _CinnabarGymQuizIncorrectText
- db "@"
-
-CinnabarGymGateFlagAction:
- EventFlagAddress hl, EVENT_CINNABAR_GYM_GATE0_UNLOCKED
- predef_jump FlagActionPredef
-
-UpdateCinnabarGymGateTileBlocks_:
-; Update the overworld map with open floor blocks or locked gate blocks
-; depending on event flags.
- ld a, 6
- ld [hGymGateIndex], a
-.loop
- ld a, [hGymGateIndex]
- dec a
- add a
- add a
- ld d, 0
- ld e, a
- ld hl, CinnabarGymGateCoords
- add hl, de
- ld a, [hli]
- ld b, [hl]
- ld c, a
- inc hl
- ld a, [hl]
- ld [wGymGateTileBlock], a
- push bc
- ld a, [hGymGateIndex]
- ld [$ffe0], a
- AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
- ld c, a
- ld b, FLAG_TEST
- call CinnabarGymGateFlagAction
- ld a, c
- and a
- jr nz, .unlocked
- ld a, [wGymGateTileBlock]
- jr .next
-.unlocked
- ld a, $e
-.next
- pop bc
- ld [wNewTileBlockID], a
- call CinnabarGym_ReplaceTileBlock
- ld hl, hGymGateIndex
- dec [hl]
- jr nz, .loop
- callab RedrawMapView
- ret
-
-CinnabarGymGateCoords:
- ; format: x-coord, y-coord, direction, padding
- ; direction: $54 = horizontal gate, $5f = vertical gate
- db $09,$03,$54,$00
- db $06,$03,$54,$00
- db $06,$06,$54,$00
- db $03,$08,$5f,$00
- db $02,$06,$54,$00
- db $02,$03,$54,$00
-
-
-CinnabarGym_ReplaceTileBlock:
-; basically a copy of the first half of ReplaceTileBlock
-; before checking if it is necessary to redraw the map view
- ld hl, wOverworldMap
- ld a, [wCurMapWidth]
- add $6
- ld e, a
- ld d, $0
- add hl, de
- add hl, de
- add hl, de
- ld e, $3
- add hl, de
- ld e, a
- ld a, b
- and a
- jr z, .addX
-.addWidthYTimesLoop
- add hl, de
- dec b
- jr nz, .addWidthYTimesLoop
-.addX
- add hl, bc
- ld a, [wNewTileBlockID]
- ld [hl], a
- ret
-
-PrintMagazinesText:
- call EnableAutoTextBoxDrawing
- tx_pre MagazinesText
- ret
-
-MagazinesText:
- TX_FAR _MagazinesText
- db "@"
-
-BillsHousePC:
- call EnableAutoTextBoxDrawing
- ld a, [wSpritePlayerStateData1FacingDirection]
- cp SPRITE_FACING_UP
- ret nz
- CheckEvent EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING
- jr nz, .displayBillsHousePokemonList
- CheckEventReuseA EVENT_USED_CELL_SEPARATOR_ON_BILL
- jr nz, .displayBillsHouseMonitorText
- CheckEventReuseA EVENT_BILL_SAID_USE_CELL_SEPARATOR
- jr nz, .doCellSeparator
-.displayBillsHouseMonitorText
- tx_pre_jump BillsHouseMonitorText
-.doCellSeparator
- ld a, $1
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- tx_pre BillsHouseInitiatedText
- ld c, 32
- call DelayFrames
- ld a, SFX_TINK
- call PlaySound
- call WaitForSoundToFinish
- ld c, 80
- call DelayFrames
- ld a, SFX_SHRINK
- call PlaySound
- call WaitForSoundToFinish
- ld c, 48
- call DelayFrames
- ld a, SFX_TINK
- call PlaySound
- call WaitForSoundToFinish
- ld c, 32
- call DelayFrames
- ld a, SFX_GET_ITEM_1
- call PlaySound
- call WaitForSoundToFinish
- call PlayDefaultMusic
- SetEvent EVENT_USED_CELL_SEPARATOR_ON_BILL
- ret
-.displayBillsHousePokemonList
- ld a, $1
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- tx_pre BillsHousePokemonList
- ret
-
-BillsHouseMonitorText:
- TX_FAR _BillsHouseMonitorText
- db "@"
-
-BillsHouseInitiatedText:
- TX_FAR _BillsHouseInitiatedText
- TX_BLINK
- TX_ASM
- call StopAllMusic
- ld c, 16
- call DelayFrames
- ld a, SFX_SWITCH
- call PlaySound
- call WaitForSoundToFinish
- ld c, 60
- call DelayFrames
- jp TextScriptEnd
-
-BillsHousePokemonList:
- TX_ASM
- call SaveScreenTilesToBuffer1
- ld hl, BillsHousePokemonListText1
- call PrintText
- xor a
- ld [wMenuItemOffset], a ; not used
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld a, A_BUTTON | B_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, 4
- ld [wMaxMenuItem], a
- ld a, 2
- ld [wTopMenuItemY], a
- ld a, 1
- ld [wTopMenuItemX], a
-.billsPokemonLoop
- ld hl, wd730
- set 6, [hl]
- coord hl, 0, 0
- lb bc, 10, 9
- call TextBoxBorder
- coord hl, 2, 2
- ld de, BillsMonListText
- call PlaceString
- ld hl, BillsHousePokemonListText2
- call PrintText
- call SaveScreenTilesToBuffer2
- call HandleMenuInput
- bit 1, a ; pressed b
- jr nz, .cancel
- ld a, [wCurrentMenuItem]
- add EEVEE
- cp EEVEE
- jr z, .displayPokedex
- cp FLAREON
- jr z, .displayPokedex
- cp JOLTEON
- jr z, .displayPokedex
- cp VAPOREON
- jr z, .displayPokedex
- jr .cancel
-.displayPokedex
- call DisplayPokedex
- call LoadScreenTilesFromBuffer2
- jr .billsPokemonLoop
-.cancel
- ld hl, wd730
- res 6, [hl]
- call LoadScreenTilesFromBuffer2
- jp TextScriptEnd
-
-BillsHousePokemonListText1:
- TX_FAR _BillsHousePokemonListText1
- db "@"
-
-BillsMonListText:
- db "EEVEE"
- next "FLAREON"
- next "JOLTEON"
- next "VAPOREON"
- next "CANCEL@"
-
-BillsHousePokemonListText2:
- TX_FAR _BillsHousePokemonListText2
- db "@"
-
-DisplayOakLabEmailText:
- ld a, [wSpritePlayerStateData1FacingDirection]
- cp SPRITE_FACING_UP
- ret nz
- call EnableAutoTextBoxDrawing
- tx_pre OakLabEmailText
- ret
-
-OakLabEmailText:
- TX_FAR _OakLabEmailText
- db "@"
diff --git a/engine/hp_bar.asm b/engine/hp_bar.asm
deleted file mode 100755
index 566a7b61..00000000
--- a/engine/hp_bar.asm
+++ /dev/null
@@ -1,268 +0,0 @@
-HPBarLength:
- call GetPredefRegisters
-
-; calculates bc * 48 / de, the number of pixels the HP bar has
-; the result is always at least 1
-GetHPBarLength:
- push hl
- xor a
- ld hl, H_MULTIPLICAND
- ld [hli], a
- ld a, b
- ld [hli], a
- ld a, c
- ld [hli], a
- ld [hl], $30
- call Multiply ; 48 * bc (hp bar is 48 pixels long)
- ld a, d
- and a
- jr z, .maxHPSmaller256
- srl d ; make HP in de fit into 1 byte by dividing by 4
- rr e
- srl d
- rr e
- ld a, [H_MULTIPLICAND+1]
- ld b, a
- ld a, [H_MULTIPLICAND+2]
- srl b ; divide multiplication result as well
- rr a
- srl b
- rr a
- ld [H_MULTIPLICAND+2], a
- ld a, b
- ld [H_MULTIPLICAND+1], a
-.maxHPSmaller256
- ld a, e
- ld [H_DIVISOR], a
- ld b, $4
- call Divide
- ld a, [H_MULTIPLICAND+2]
- ld e, a ; e = bc * 48 / de (num of pixels of HP bar)
- pop hl
- and a
- ret nz
- ld e, $1 ; make result at least 1
- ret
-
-; predef $48
-UpdateHPBar:
-UpdateHPBar2:
- push hl
- ld hl, wHPBarOldHP
- ld a, [hli]
- ld c, a ; old HP into bc
- ld a, [hli]
- ld b, a
- ld a, [hli]
- ld e, a ; new HP into de
- ld d, [hl]
- pop hl
- push de
- push bc
- call UpdateHPBar_CalcHPDifference
- ld a, e
- ld [wHPBarHPDifference+1], a
- ld a, d
- ld [wHPBarHPDifference], a
- pop bc
- pop de
- call UpdateHPBar_CompareNewHPToOldHP
- ret z
- ld a, $ff
- jr c, .HPdecrease
- ld a, $1
-.HPdecrease
- ld [wHPBarDelta], a
- call GetPredefRegisters
- ld a, [wHPBarNewHP]
- ld e, a
- ld a, [wHPBarNewHP+1]
- ld d, a
-.animateHPBarLoop
- push de
- ld a, [wHPBarOldHP]
- ld c, a
- ld a, [wHPBarOldHP+1]
- ld b, a
- call UpdateHPBar_CompareNewHPToOldHP
- jr z, .animateHPBarDone
- jr nc, .HPIncrease
-; HP decrease
- dec bc ; subtract 1 HP
- ld a, c
- ld [wHPBarNewHP], a
- ld a, b
- ld [wHPBarNewHP+1], a
- call UpdateHPBar_CalcOldNewHPBarPixels
- ld a, e
- sub d ; calc pixel difference
- jr .ok
-.HPIncrease
- inc bc ; add 1 HP
- ld a, c
- ld [wHPBarNewHP], a
- ld a, b
- ld [wHPBarNewHP+1], a
- call UpdateHPBar_CalcOldNewHPBarPixels
- ld a, d
- sub e ; calc pixel difference
-.ok
- call UpdateHPBar_PrintHPNumber
- and a
- jr z, .noPixelDifference
- call UpdateHPBar_AnimateHPBar
-.noPixelDifference
- ld a, [wHPBarNewHP]
- ld [wHPBarOldHP], a
- ld a, [wHPBarNewHP+1]
- ld [wHPBarOldHP+1], a
- pop de
- jr .animateHPBarLoop
-.animateHPBarDone
- pop de
- ld a, e
- ld [wHPBarOldHP], a
- ld a, d
- ld [wHPBarOldHP+1], a
- or e
- jr z, .monFainted
- call UpdateHPBar_CalcOldNewHPBarPixels
- ld d, e
-.monFainted
- call UpdateHPBar_PrintHPNumber
- ld a, $1
- call UpdateHPBar_AnimateHPBar
- jp Delay3
-
-; animates the HP bar going up or down for (a) ticks (two waiting frames each)
-; stops prematurely if bar is filled up
-; e: current health (in pixels) to start with
-UpdateHPBar_AnimateHPBar:
- push hl
-.barAnimationLoop
- push af
- push de
- ld d, $6
- call DrawHPBar
- ld c, 2
- call DelayFrames
- pop de
- ld a, [wHPBarDelta] ; +1 or -1
- add e
- cp $31
- jr nc, .barFilledUp
- ld e, a
- pop af
- dec a
- jr nz, .barAnimationLoop
- pop hl
- ret
-.barFilledUp
- pop af
- pop hl
- ret
-
-; compares old HP and new HP and sets c and z flags accordingly
-UpdateHPBar_CompareNewHPToOldHP:
- ld a, d
- sub b
- ret nz
- ld a, e
- sub c
- ret
-
-; calcs HP difference between bc and de (into de)
-UpdateHPBar_CalcHPDifference:
- ld a, d
- sub b
- jr c, .oldHPGreater
- jr z, .testLowerByte
-.newHPGreater
- ld a, e
- sub c
- ld e, a
- ld a, d
- sbc b
- ld d, a
- ret
-.oldHPGreater
- ld a, c
- sub e
- ld e, a
- ld a, b
- sbc d
- ld d, a
- ret
-.testLowerByte
- ld a, e
- sub c
- jr c, .oldHPGreater
- jr nz, .newHPGreater
- ld de, $0
- ret
-
-UpdateHPBar_PrintHPNumber:
- push af
- push de
- ld a, [wHPBarType]
- and a
- jr z, .done ; don't print number in enemy HUD
-; convert from little-endian to big-endian for PrintNumber
- ld a, [wHPBarOldHP]
- ld [wHPBarTempHP + 1], a
- ld a, [wHPBarOldHP + 1]
- ld [wHPBarTempHP], a
- push hl
- ld de, $15
- ld a, [hFlags_0xFFFA]
- bit 0, a
- jr z, .next
- ld de, $9
-.next
- add hl, de
- push hl
- ld a, " "
- ld [hli], a
- ld [hli], a
- ld [hli], a
- pop hl
- ld de, wHPBarTempHP
- lb bc, 2, 3
- call PrintNumber
- call DelayFrame
- pop hl
-.done
- pop de
- pop af
- ret
-
-; calcs number of HP bar pixels for old and new HP value
-; d: new pixels
-; e: old pixels
-UpdateHPBar_CalcOldNewHPBarPixels:
- push hl
- ld hl, wHPBarMaxHP
- ld a, [hli] ; max HP into de
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli] ; old HP into bc
- ld c, a
- ld a, [hli]
- ld b, a
- ld a, [hli] ; new HP into hl
- ld h, [hl]
- ld l, a
- push hl
- push de
- call GetHPBarLength ; calc num pixels for old HP
- ld a, e
- pop de
- pop bc
- push af
- call GetHPBarLength ; calc num pixels for new HP
- pop af
- ld d, e
- ld e, a
- pop hl
- ret
diff --git a/engine/in_game_trades.asm b/engine/in_game_trades.asm
deleted file mode 100755
index 720920df..00000000
--- a/engine/in_game_trades.asm
+++ /dev/null
@@ -1,350 +0,0 @@
-DoInGameTradeDialogue:
-; trigger the trade offer/action specified by wWhichTrade
- call SaveScreenTilesToBuffer2
- ld hl, TradeMons
- ld a, [wWhichTrade]
- ld bc, $e
- call AddNTimes
- ld a, [hli]
- ld [wInGameTradeGiveMonSpecies], a
- ld a, [hli]
- ld [wInGameTradeReceiveMonSpecies], a
- ld a, [hli]
- push af
- ld de, wInGameTradeMonNick
- ld bc, NAME_LENGTH
- call CopyData
- pop af
- ld l, a
- ld h, 0
- ld de, InGameTradeTextPointers
- add hl, hl
- add hl, de
- ld a, [hli]
- ld [wInGameTradeTextPointerTablePointer], a
- ld a, [hl]
- ld [wInGameTradeTextPointerTablePointer + 1], a
- ld a, [wInGameTradeGiveMonSpecies]
- ld de, wInGameTradeGiveMonName
- call InGameTrade_GetMonName
- ld a, [wInGameTradeReceiveMonSpecies]
- ld de, wInGameTradeReceiveMonName
- call InGameTrade_GetMonName
- ld a, $4
- ld [wInGameTradeTextPointerTableIndex], a
- ld b, FLAG_TEST
- call InGameTrade_FlagActionPredef
- ld a, c
- and a
- jr nz, .printText
-; if the trade hasn't been done yet
- ld a, $0
- ld [wInGameTradeTextPointerTableIndex], a
- call .printText
- ld a, $1
- ld [wInGameTradeTextPointerTableIndex], a
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- and a
- jr nz, .printText
- call InGameTrade_DoTrade
- jr c, .printText
- ld hl, TradedForText
- call PrintText
-.printText
- ld hl, wInGameTradeTextPointerTableIndex
- ld a, [hld] ; wInGameTradeTextPointerTableIndex
- ld e, a
- ld d, 0
- ld a, [hld] ; wInGameTradeTextPointerTablePointer + 1
- ld l, [hl] ; wInGameTradeTextPointerTablePointer
- ld h, a
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp PrintText
-
-; copies name of species a to hl
-InGameTrade_GetMonName:
- push de
- ld [wd11e], a
- call GetMonName
- ld hl, wcd6d
- pop de
- ld bc, NAME_LENGTH
- jp CopyData
-
-INCLUDE "data/trades.asm"
-
-InGameTrade_DoTrade:
- xor a ; NORMAL_PARTY_MENU
- ld [wPartyMenuTypeOrMessageID], a
- dec a
- ld [wUpdateSpritesEnabled], a
- call DisplayPartyMenu
- push af
- call InGameTrade_RestoreScreen
- pop af
- ld a, $1
- jp c, .tradeFailed ; jump if the player didn't select a pokemon
- ld a, [wInGameTradeGiveMonSpecies]
- ld b, a
- ld a, [wcf91]
- cp b
- ld a, $2
- jr nz, .tradeFailed ; jump if the selected mon's species is not the required one
- ld a, [wWhichPokemon]
- ld hl, wPartyMon1Level
- ld bc, wPartyMon2 - wPartyMon1
- call AddNTimes
- ld a, [hl]
- ld [wCurEnemyLVL], a
- ld b, FLAG_SET
- call InGameTrade_FlagActionPredef
- ld hl, ConnectCableText
- call PrintText
- ld a, [wWhichPokemon]
- push af
- ld a, [wCurEnemyLVL]
- push af
- call LoadHpBarAndStatusTilePatterns
- call InGameTrade_PrepareTradeData
- predef InternalClockTradeAnim
- pop af
- ld [wCurEnemyLVL], a
- pop af
- ld [wWhichPokemon], a
- ld a, [wInGameTradeReceiveMonSpecies]
- ld [wcf91], a
- xor a
- ld [wMonDataLocation], a ; not used
- ld [wRemoveMonFromBox], a
- call RemovePokemon
- ld a, $80 ; prevent the player from naming the mon
- ld [wMonDataLocation], a
- call AddPartyMon
- call InGameTrade_CopyDataToReceivedMon
- call InGameTrade_CheckForTradeEvo
- call ClearScreen
- call InGameTrade_RestoreScreen
- callba RedrawMapView
- and a
- ld a, $3
- jr .tradeSucceeded
-.tradeFailed
- scf
-.tradeSucceeded
- ld [wInGameTradeTextPointerTableIndex], a
- ret
-
-InGameTrade_RestoreScreen:
- call GBPalWhiteOutWithDelay3
- call RestoreScreenTilesAndReloadTilePatterns
- call ReloadTilesetTilePatterns
- call LoadScreenTilesFromBuffer2
- call Delay3
- call LoadGBPal
- ld c, 10
- call DelayFrames
- jpba LoadWildData
-
-InGameTrade_PrepareTradeData:
- ld hl, wTradedPlayerMonSpecies
- ld a, [wInGameTradeGiveMonSpecies]
- ld [hli], a ; wTradedPlayerMonSpecies
- ld a, [wInGameTradeReceiveMonSpecies]
- ld [hl], a ; wTradedEnemyMonSpecies
- ld hl, wPartyMonOT
- ld bc, NAME_LENGTH
- ld a, [wWhichPokemon]
- call AddNTimes
- ld de, wTradedPlayerMonOT
- ld bc, NAME_LENGTH
- call InGameTrade_CopyData
- ld hl, InGameTrade_TrainerString
- ld de, wTradedEnemyMonOT
- call InGameTrade_CopyData
- ld de, wLinkEnemyTrainerName
- call InGameTrade_CopyData
- ld hl, wPartyMon1OTID
- ld bc, wPartyMon2 - wPartyMon1
- ld a, [wWhichPokemon]
- call AddNTimes
- ld de, wTradedPlayerMonOTID
- ld bc, $2
- call InGameTrade_CopyData
- call Random
- ld hl, hRandomAdd
- ld de, wTradedEnemyMonOTID
- jp CopyData
-
-InGameTrade_CopyData:
- push hl
- push bc
- call CopyData
- pop bc
- pop hl
- ret
-
-InGameTrade_CopyDataToReceivedMon:
- ld hl, wPartyMonNicks
- ld bc, NAME_LENGTH
- call InGameTrade_GetReceivedMonPointer
- ld hl, wInGameTradeMonNick
- ld bc, NAME_LENGTH
- call CopyData
- ld hl, wPartyMonOT
- ld bc, NAME_LENGTH
- call InGameTrade_GetReceivedMonPointer
- ld hl, InGameTrade_TrainerString
- ld bc, NAME_LENGTH
- call CopyData
- ld hl, wPartyMon1OTID
- ld bc, wPartyMon2 - wPartyMon1
- call InGameTrade_GetReceivedMonPointer
- ld hl, wTradedEnemyMonOTID
- ld bc, $2
- jp CopyData
-
-; the received mon's index is (partyCount - 1),
-; so this adds bc to hl (partyCount - 1) times and moves the result to de
-InGameTrade_GetReceivedMonPointer:
- ld a, [wPartyCount]
- dec a
- call AddNTimes
- ld e, l
- ld d, h
- ret
-
-InGameTrade_FlagActionPredef:
- ld hl,wCompletedInGameTradeFlags
- ld a,[wWhichTrade]
- ld c,a
- predef_jump FlagActionPredef
-
-InGameTrade_CheckForTradeEvo:
- ld a,[wInGameTradeReceiveMonSpecies]
- cp KADABRA
- jr z,.tradeEvo
- cp GRAVELER
- jr z,.tradeEvo
- cp MACHOKE
- jr z,.tradeEvo
- cp HAUNTER
- jr z,.tradeEvo
- ret
-
-.tradeEvo
- ld a,[wPartyCount]
- dec a
- ld [wWhichPokemon],a
- ld a,$1
- ld [wForceEvolution],a
- ld a,LINK_STATE_TRADING
- ld [wLinkState],a
- callab EvolveTradeMon
- xor a ; LINK_STATE_NONE
- ld [wLinkState],a
- jp PlayDefaultMusic
-
-InGameTrade_TrainerString:
- ; "TRAINER@@@@@@@@@@"
- db $5d, "@@@@@@@@@@"
-
-InGameTradeTextPointers:
- dw TradeTextPointers1
- dw TradeTextPointers2
- dw TradeTextPointers3
-
-TradeTextPointers1:
- dw WannaTrade1Text
- dw NoTrade1Text
- dw WrongMon1Text
- dw Thanks1Text
- dw AfterTrade1Text
-
-TradeTextPointers2:
- dw WannaTrade2Text
- dw NoTrade2Text
- dw WrongMon2Text
- dw Thanks2Text
- dw AfterTrade2Text
-
-TradeTextPointers3:
- dw WannaTrade3Text
- dw NoTrade3Text
- dw WrongMon3Text
- dw Thanks3Text
- dw AfterTrade3Text
-
-ConnectCableText:
- TX_FAR _ConnectCableText
- db "@"
-
-TradedForText:
- TX_FAR _TradedForText
- TX_SFX_KEY_ITEM
- TX_DELAY
- db "@"
-
-WannaTrade1Text:
- TX_FAR _WannaTrade1Text
- db "@"
-
-NoTrade1Text:
- TX_FAR _NoTrade1Text
- db "@"
-
-WrongMon1Text:
- TX_FAR _WrongMon1Text
- db "@"
-
-Thanks1Text:
- TX_FAR _Thanks1Text
- db "@"
-
-AfterTrade1Text:
- TX_FAR _AfterTrade1Text
- db "@"
-
-WannaTrade2Text:
- TX_FAR _WannaTrade2Text
- db "@"
-
-NoTrade2Text:
- TX_FAR _NoTrade2Text
- db "@"
-
-WrongMon2Text:
- TX_FAR _WrongMon2Text
- db "@"
-
-Thanks2Text:
- TX_FAR _Thanks2Text
- db "@"
-
-AfterTrade2Text:
- TX_FAR _AfterTrade2Text
- db "@"
-
-WannaTrade3Text:
- TX_FAR _WannaTrade3Text
- db "@"
-
-NoTrade3Text:
- TX_FAR _NoTrade3Text
- db "@"
-
-WrongMon3Text:
- TX_FAR _WrongMon3Text
- db "@"
-
-Thanks3Text:
- TX_FAR _Thanks3Text
- db "@"
-
-AfterTrade3Text:
- TX_FAR _AfterTrade3Text
- db "@"
diff --git a/engine/init_player_data.asm b/engine/init_player_data.asm
deleted file mode 100644
index 5883547c..00000000
--- a/engine/init_player_data.asm
+++ /dev/null
@@ -1,60 +0,0 @@
-InitPlayerData:
-InitPlayerData2:
-
- call Random
- ld a, [hRandomSub]
- ld [wPlayerID], a
-
- call Random
- ld a, [hRandomAdd]
- ld [wPlayerID + 1], a
-
- ld a, $ff
- ld [wUnusedD71B], a
-
- ld a, 90 ; initialize happiness to 90
- ld [wPikachuHappiness], a
- ld a, $80
- ld [wPikachuMood], a ; initialize mood
-
- ld hl, wPartyCount
- call InitializeEmptyList
- ld hl, wNumInBox
- call InitializeEmptyList
- ld hl, wNumBagItems
- call InitializeEmptyList
- ld hl, wNumBoxItems
- call InitializeEmptyList
-
-START_MONEY EQU $3000
- ld hl, wPlayerMoney + 1
- ld a, START_MONEY / $100
- ld [hld], a
- xor a
- ld [hli], a
- inc hl
- ld [hl], a
-
- ld [wMonDataLocation], a
-
- ld hl, wObtainedBadges
- ld [hli], a
-
- ld [hl], a
-
- ld hl, wPlayerCoins
- ld [hli], a
- ld [hl], a
-
- ld hl, wGameProgressFlags
- ld bc, wGameProgressFlagsEnd - wGameProgressFlags
- call FillMemory ; clear all game progress flags
-
- jp InitializeMissableObjectsFlags
-
-InitializeEmptyList:
- xor a ; count
- ld [hli], a
- dec a ; terminator
- ld [hl], a
- ret
diff --git a/engine/intro.asm b/engine/intro.asm
deleted file mode 100755
index 00e892da..00000000
--- a/engine/intro.asm
+++ /dev/null
@@ -1,164 +0,0 @@
-const_value = -1
- const MOVE_NIDORINO_RIGHT
- const MOVE_GENGAR_RIGHT
- const MOVE_GENGAR_LEFT
-
-ANIMATION_END EQU 80
-
-const_value = 3
- const GENGAR_INTRO_TILES1
- const GENGAR_INTRO_TILES2
- const GENGAR_INTRO_TILES3
-
-PlayIntro:
- xor a
- ld [hJoyHeld], a
- inc a
- ld [H_AUTOBGTRANSFERENABLED], a
- call PlayShootingStar
- callab PlayIntroScene
- xor a
- ld [hSCX], a
- ld [H_AUTOBGTRANSFERENABLED], a
- call ClearSprites
- call DelayFrame
- ret
-
-InitIntroNidorinoOAM:
- ld hl, wOAMBuffer
- ld d, 0
-.loop
- push bc
- ld a, [wBaseCoordY]
- ld e, a
-.innerLoop
- ld a, e
- add 8
- ld e, a
- ld [hli], a ; Y
- ld a, [wBaseCoordX]
- ld [hli], a ; X
- ld a, d
- ld [hli], a ; tile
- ld a, OAM_BEHIND_BG
- ld [hli], a ; attributes
- inc d
- dec c
- jr nz, .innerLoop
- ld a, [wBaseCoordX]
- add 8
- ld [wBaseCoordX], a
- pop bc
- dec b
- jr nz, .loop
- ret
-
-IntroClearScreen:
- ld hl, vBGMap1
- ld bc, BG_MAP_WIDTH * SCREEN_HEIGHT
- jr IntroClearCommon
-
-IntroClearMiddleOfScreen:
-; clear the area of the tile map between the black bars on the top and bottom
- coord hl, 0, 4
- ld bc, SCREEN_WIDTH * 10
-
-IntroClearCommon:
- ld [hl], 0
- inc hl
- dec bc
- ld a, b
- or c
- jr nz, IntroClearCommon
- ret
-
-IntroPlaceBlackTiles:
- ld a, 1
-.loop
- ld [hli], a
- dec c
- jr nz, .loop
- ret
-
-CopyTileIDsFromList_ZeroBaseTileID:
- ld c, 0
- predef_jump CopyTileIDsFromList
-
-PlayShootingStar:
- ld b, SET_PAL_GAME_FREAK_INTRO
- call RunPaletteCommand
- callba LoadCopyrightAndTextBoxTiles
- ldPal a, BLACK, DARK_GRAY, LIGHT_GRAY, WHITE
- ld [rBGP], a
- call UpdateGBCPal_BGP
- ld c, 180
- call DelayFrames
- call ClearScreen
- call DisableLCD
- xor a
- ld [wCurOpponent], a
- call IntroDrawBlackBars
-; write the black and white tiles
- ld hl, vChars2
- ld bc, $10
- xor a
- call FillMemory
- ld hl, vChars2 + $10
- ld bc, $10
- ld a, $ff
- call FillMemory
-; copy gamefreak logo and others
- ld hl, GameFreakIntro
- ld de, vChars2 + $600
- ld bc, GameFreakIntroEnd - GameFreakIntro
- ld a, BANK(GameFreakIntro)
- call FarCopyData
- ld hl, GameFreakIntro
- ld de, vChars1
- ld bc, GameFreakIntroEnd - GameFreakIntro
- ld a, BANK(GameFreakIntro)
- call FarCopyData
-
- call EnableLCD
- ld hl, rLCDC
- res 5, [hl]
- set 3, [hl]
- ld c, 64
- call DelayFrames
- callba AnimateShootingStar
- push af
- pop af
- jr c, .next ; skip the delay if the user interrupted the animation
- ld c, 40
- call DelayFrames
-.next
- call IntroClearMiddleOfScreen
- call ClearSprites
- jp Delay3
-
-IntroDrawBlackBars:
-; clear the screen and draw black bars on the top and bottom
- call IntroClearScreen
- coord hl, 0, 0
- ld c, SCREEN_WIDTH * 4
- call IntroPlaceBlackTiles
- coord hl, 0, 14
- ld c, SCREEN_WIDTH * 4
- call IntroPlaceBlackTiles
- ld hl, vBGMap1
- ld c, BG_MAP_WIDTH * 4
- call IntroPlaceBlackTiles
- ld hl, vBGMap1 + BG_MAP_WIDTH * 14
- ld c, BG_MAP_WIDTH * 4
- jp IntroPlaceBlackTiles
-
-EmptyFunc4:
- ret
-
-GameFreakIntro:
- INCBIN "gfx/gamefreak_intro.2bpp"
- INCBIN "gfx/gamefreak_logo.2bpp"
- rept 16
- db $00 ; blank tile
- endr
-GameFreakIntroEnd:
diff --git a/engine/get_bag_item_quantity.asm b/engine/items/get_bag_item_quantity.asm
index f10df1a0..f10df1a0 100644
--- a/engine/get_bag_item_quantity.asm
+++ b/engine/items/get_bag_item_quantity.asm
diff --git a/engine/items/inventory.asm b/engine/items/inventory.asm
index 58bcf7e9..c2e0b2b4 100644
--- a/engine/items/inventory.asm
+++ b/engine/items/inventory.asm
@@ -4,7 +4,7 @@
; [wcf91] = item ID
; [wItemQuantity] = item quantity
; sets carry flag if successful, unsets carry flag if unsuccessful
-AddItemToInventory_:
+AddItemToInventory_::
ld a, [wItemQuantity] ; a = item quantity
push af
push bc
@@ -12,10 +12,10 @@ AddItemToInventory_:
push hl
push hl
ld d, PC_ITEM_CAPACITY ; how many items the PC can hold
- ld a, wNumBagItems & $FF
+ ld a, LOW(wNumBagItems)
cp l
jr nz, .checkIfInventoryFull
- ld a, wNumBagItems >> 8
+ ld a, HIGH(wNumBagItems)
cp h
jr nz, .checkIfInventoryFull
; if the destination is the bag
@@ -98,7 +98,7 @@ AddItemToInventory_:
; hl = address of inventory (either wNumBagItems or wNumBoxItems)
; [wWhichPokemon] = index (within the inventory) of the item to remove
; [wItemQuantity] = quantity to remove
-RemoveItemFromInventory_:
+RemoveItemFromInventory_::
push hl
inc hl
ld a, [wWhichPokemon] ; index (within the inventory) of the item being removed
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm
new file mode 100755
index 00000000..b1b458ab
--- /dev/null
+++ b/engine/items/item_effects.asm
@@ -0,0 +1,3186 @@
+UseItem_::
+ ld a, 1
+ ld [wActionResultOrTookBattleTurn], a ; initialise to success value
+ ld a, [wcf91] ;contains item_ID
+ cp HM01
+ jp nc, ItemUseTMHM
+ ld hl, ItemUsePtrTable
+ dec a
+ add a
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+ItemUsePtrTable:
+; entries correspond to item ids
+ dw ItemUseBall ; MASTER_BALL
+ dw ItemUseBall ; ULTRA_BALL
+ dw ItemUseBall ; GREAT_BALL
+ dw ItemUseBall ; POKE_BALL
+ dw ItemUseTownMap ; TOWN_MAP
+ dw ItemUseBicycle ; BICYCLE
+ dw ItemUseSurfboard ; out-of-battle Surf effect
+ dw ItemUseBall ; SAFARI_BALL
+ dw ItemUsePokedex ; POKEDEX
+ dw ItemUseEvoStone ; MOON_STONE
+ dw ItemUseMedicine ; ANTIDOTE
+ dw ItemUseMedicine ; BURN_HEAL
+ dw ItemUseMedicine ; ICE_HEAL
+ dw ItemUseMedicine ; AWAKENING
+ dw ItemUseMedicine ; PARLYZ_HEAL
+ dw ItemUseMedicine ; FULL_RESTORE
+ dw ItemUseMedicine ; MAX_POTION
+ dw ItemUseMedicine ; HYPER_POTION
+ dw ItemUseMedicine ; SUPER_POTION
+ dw ItemUseMedicine ; POTION
+ dw ItemUseBait ; BOULDERBADGE
+ dw ItemUseRock ; CASCADEBADGE
+ dw UnusableItem ; THUNDERBADGE
+ dw UnusableItem ; RAINBOWBADGE
+ dw UnusableItem ; SOULBADGE
+ dw UnusableItem ; MARSHBADGE
+ dw UnusableItem ; VOLCANOBADGE
+ dw UnusableItem ; EARTHBADGE
+ dw ItemUseEscapeRope ; ESCAPE_ROPE
+ dw ItemUseRepel ; REPEL
+ dw UnusableItem ; OLD_AMBER
+ dw ItemUseEvoStone ; FIRE_STONE
+ dw ItemUseEvoStone ; THUNDER_STONE
+ dw ItemUseEvoStone ; WATER_STONE
+ dw ItemUseVitamin ; HP_UP
+ dw ItemUseVitamin ; PROTEIN
+ dw ItemUseVitamin ; IRON
+ dw ItemUseVitamin ; CARBOS
+ dw ItemUseVitamin ; CALCIUM
+ dw ItemUseVitamin ; RARE_CANDY
+ dw UnusableItem ; DOME_FOSSIL
+ dw UnusableItem ; HELIX_FOSSIL
+ dw UnusableItem ; SECRET_KEY
+ dw UnusableItem
+ dw UnusableItem ; BIKE_VOUCHER
+ dw ItemUseXAccuracy ; X_ACCURACY
+ dw ItemUseEvoStone ; LEAF_STONE
+ dw ItemUseCardKey ; CARD_KEY
+ dw UnusableItem ; NUGGET
+ dw UnusableItem ; ??? PP_UP
+ dw ItemUsePokedoll ; POKE_DOLL
+ dw ItemUseMedicine ; FULL_HEAL
+ dw ItemUseMedicine ; REVIVE
+ dw ItemUseMedicine ; MAX_REVIVE
+ dw ItemUseGuardSpec ; GUARD_SPEC
+ dw ItemUseSuperRepel ; SUPER_REPL
+ dw ItemUseMaxRepel ; MAX_REPEL
+ dw ItemUseDireHit ; DIRE_HIT
+ dw UnusableItem ; COIN
+ dw ItemUseMedicine ; FRESH_WATER
+ dw ItemUseMedicine ; SODA_POP
+ dw ItemUseMedicine ; LEMONADE
+ dw UnusableItem ; S_S_TICKET
+ dw UnusableItem ; GOLD_TEETH
+ dw ItemUseXStat ; X_ATTACK
+ dw ItemUseXStat ; X_DEFEND
+ dw ItemUseXStat ; X_SPEED
+ dw ItemUseXStat ; X_SPECIAL
+ dw ItemUseCoinCase ; COIN_CASE
+ dw ItemUseOaksParcel ; OAKS_PARCEL
+ dw ItemUseItemfinder ; ITEMFINDER
+ dw UnusableItem ; SILPH_SCOPE
+ dw ItemUsePokeflute ; POKE_FLUTE
+ dw UnusableItem ; LIFT_KEY
+ dw UnusableItem ; EXP_ALL
+ dw ItemUseOldRod ; OLD_ROD
+ dw ItemUseGoodRod ; GOOD_ROD
+ dw ItemUseSuperRod ; SUPER_ROD
+ dw ItemUsePPUp ; PP_UP (real one)
+ dw ItemUsePPRestore ; ETHER
+ dw ItemUsePPRestore ; MAX_ETHER
+ dw ItemUsePPRestore ; ELIXER
+ dw ItemUsePPRestore ; MAX_ELIXER
+
+ItemUseBall:
+
+; Balls can't be used out of battle.
+ ld a, [wIsInBattle]
+ and a
+ jp z, ItemUseNotTime
+
+; Balls can't catch trainers' Pokémon.
+ dec a
+ jp nz, ThrowBallAtTrainerMon
+
+; If this is for the old man battle, skip checking if the party & box are full.
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_OLD_MAN
+ jr z, .canUseBall
+ cp BATTLE_TYPE_PIKACHU
+ jr z, .canUseBall
+
+ ld a, [wPartyCount] ; is party full?
+ cp PARTY_LENGTH
+ jr nz, .canUseBall
+ ld a, [wNumInBox] ; is box full?
+ cp MONS_PER_BOX
+ jp z, BoxFullCannotThrowBall
+
+.canUseBall
+ xor a
+ ld [wCapturedMonSpecies], a
+
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_SAFARI
+ jr nz, .skipSafariZoneCode
+
+.safariZone
+ ld hl, wNumSafariBalls
+ dec [hl] ; remove a Safari Ball
+
+.skipSafariZoneCode
+ 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.
+ callfar IsGhostBattle
+ ld b, $10 ; can't be caught value
+ jp z, .setAnimData
+
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_OLD_MAN
+ jr z, .oldManBattle
+ cp BATTLE_TYPE_PIKACHU
+ jr z, .oldManBattle ; pikachu battle technically old man battle
+ jr .notOldManBattle
+
+.oldManBattle
+ ld hl, wGrassRate
+ ld de, wPlayerName
+ ld bc, NAME_LENGTH
+ call CopyData ; save the player's name in the Wild Monster data (part of the Cinnabar Island Missingno. glitch)
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_OLD_MAN
+ jp nz, .captured
+ ld a, $1
+ ld [wCapturedMonSpecies], a
+ CheckEvent EVENT_02F
+ ld b, $63
+ jp nz, .setAnimData
+ jp .captured
+.notOldManBattle
+; 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 POKEMON_TOWER_6F
+ jr nz, .loop
+ ld a, [wEnemyMonSpecies2]
+ cp RESTLESS_SOUL
+ 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 MASTER_BALL
+ jp z, .captured
+
+; Anything will do for the basic Poké Ball.
+ cp 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
+
+; Less than or equal to 200 is good enough for a Great Ball.
+ ld a, [hl]
+ cp GREAT_BALL
+ jr z, .checkForAilments
+
+; If it's an Ultra/Safari Ball and Rand1 is greater than 150, try again.
+ ld a, 150
+ cp b
+ jr c, .loop
+
+.checkForAilments
+; 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, .skipAilmentValueSubtraction ; no ailments
+ and 1 << FRZ | SLP
+ ld c, 12
+ jr z, .notFrozenOrAsleep
+ ld c, 25
+.notFrozenOrAsleep
+ ld a, b
+ sub c
+ jp c, .captured
+ ld b, a
+
+.skipAilmentValueSubtraction
+ push bc ; save (Rand1 - Status)
+
+; Calculate MaxHP * 255.
+ xor a
+ ldh [hMultiplicand], a
+ ld hl, wEnemyMonMaxHP
+ ld a, [hli]
+ ldh [hMultiplicand + 1], a
+ ld a, [hl]
+ ldh [hMultiplicand + 2], a
+ ld a, 255
+ ldh [hMultiplier], a
+ call Multiply
+
+; Determine BallFactor. It's 8 for Great Balls and 12 for the others.
+ ld a, [wcf91]
+ cp GREAT_BALL
+ ld a, 12
+ jr nz, .skip1
+ ld a, 8
+
+.skip1
+; Note that the results of all division operations are floored.
+
+; Calculate (MaxHP * 255) / BallFactor.
+ ldh [hDivisor], a
+ 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]
+ srl b
+ rr a
+ srl b
+ rr a
+ and a
+ jr nz, .skip2
+ inc a
+
+.skip2
+
+; Let W = ((MaxHP * 255) / BallFactor) / max(HP / 4, 1). Calculate W.
+ ldh [hDivisor], a
+ ld b, 4
+ call Divide
+
+; If W > 255, store 255 in [hQuotient + 3].
+; Let X = min(W, 255) = [hQuotient + 3].
+ ldh a, [hQuotient + 2]
+ and a
+ jr z, .skip3
+ ld a, 255
+ ldh [hQuotient + 3], a
+
+.skip3
+ pop bc ; b = Rand1 - Status
+
+; If Rand1 - Status > CatchRate, the ball fails to capture the Pokémon.
+ ld a, [wEnemyMonActualCatchRate]
+ cp b
+ jr c, .failedToCapture
+
+; If W > 255, the ball captures the Pokémon.
+ ldh a, [hQuotient + 2]
+ and a
+ 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
+ ldh a, [hQuotient + 3]
+ cp b
+ jr c, .failedToCapture
+
+.captured
+ jr .skipShakeCalculations
+
+.failedToCapture
+ ldh a, [hQuotient + 3]
+ ld [wPokeBallCaptureCalcTemp], a ; Save X.
+
+; Calculate CatchRate * 100.
+ xor a
+ ldh [hMultiplicand], a
+ ldh [hMultiplicand + 1], a
+ ld a, [wEnemyMonActualCatchRate]
+ ldh [hMultiplicand + 2], a
+ ld a, 100
+ ldh [hMultiplier], a
+ call Multiply
+
+; Determine BallFactor2.
+; Poké Ball: BallFactor2 = 255
+; Great Ball: BallFactor2 = 200
+; Ultra/Safari Ball: BallFactor2 = 150
+ ld a, [wcf91]
+ ld b, 255
+ cp POKE_BALL
+ jr z, .skip4
+ ld b, 200
+ cp GREAT_BALL
+ jr z, .skip4
+ ld b, 150
+ cp ULTRA_BALL
+ jr z, .skip4
+
+.skip4
+
+; Let Y = (CatchRate * 100) / BallFactor2. Calculate Y.
+ ld a, b
+ ldh [hDivisor], 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.
+ ldh a, [hQuotient + 2]
+ and a
+ ld b, $63 ; 3 shakes
+ jr nz, .setAnimData
+
+; Calculate X * Y.
+ ld a, [wPokeBallCaptureCalcTemp]
+ ldh [hMultiplier], a
+ call Multiply
+
+; Calculate (X * Y) / 255.
+ ld a, 255
+ ldh [hDivisor], a
+ ld b, 4
+ call Divide
+
+; Determine Status2.
+; no status ailment: Status2 = 0
+; Burn/Paralysis/Poison: Status2 = 5
+; Freeze/Sleep: Status2 = 10
+ ld a, [wEnemyMonStatus]
+ and a
+ jr z, .skip5
+ and 1 << FRZ | SLP
+ ld b, 5
+ jr z, .addAilmentValue
+ ld b, 10
+
+.addAilmentValue
+; If the Pokémon has a status ailment, add Status2.
+ ldh a, [hQuotient + 3]
+ add b
+ ldh [hQuotient + 3], a
+
+.skip5
+; Finally determine the number of shakes.
+; Let Z = ((X * Y) / 255) + Status2 = [hQuotient + 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
+ ldh a, [hQuotient + 3]
+ cp 10
+ ld b, $20
+ jr c, .setAnimData
+ cp 30
+ ld b, $61
+ jr c, .setAnimData
+ cp 70
+ ld b, $62
+ jr c, .setAnimData
+ ld b, $63
+
+.setAnimData
+ ld a, b
+ ld [wPokeBallAnimData], a
+
+.skipShakeCalculations
+ ld c, 20
+ call DelayFrames
+
+; Do the animation.
+ ld a, TOSS_ANIM
+ ld [wAnimationID], a
+ xor a
+ ldh [hWhoseTurn], a
+ ld [wAnimationType], a
+ ld [wDamageMultipliers], a
+ ld a, [wWhichPokemon]
+ push af
+ ld a, [wcf91]
+ push af
+ predef MoveAnimation
+ pop af
+ ld [wcf91], a
+ pop af
+ ld [wWhichPokemon], a
+
+; Determine the message to display from the animation.
+ ld a, [wPokeBallAnimData]
+ cp $10
+ ld hl, ItemUseBallText00
+ jp z, .printMessage
+ cp $20
+ ld hl, ItemUseBallText01
+ jp z, .printMessage
+ cp $61
+ ld hl, ItemUseBallText02
+ jp z, .printMessage
+ cp $62
+ ld hl, ItemUseBallText03
+ jp z, .printMessage
+ cp $63
+ ld hl, ItemUseBallText04
+ jp z, .printMessage
+
+; Save current HP.
+ ld hl, wEnemyMonHP
+ ld a, [hli]
+ push af
+ ld a, [hli]
+ push af
+
+; Save status ailment.
+ inc hl
+ ld a, [hl]
+ push af
+
+ push hl
+
+; 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, .notTransformed
+ ld a, DITTO
+ ld [wEnemyMonSpecies2], a
+ 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, wTransformedEnemyMonOriginalDVs
+ ld a, [wEnemyMonDVs]
+ ld [hli], a
+ ld a, [wEnemyMonDVs + 1]
+ ld [hl], a
+
+.skip6
+ ld a, [wcf91]
+ push af
+ ld a, [wEnemyMonSpecies2]
+ ld [wcf91], a
+ ld a, [wEnemyMonLevel]
+ ld [wCurEnemyLVL], a
+ callfar LoadEnemyMonData
+ pop af
+ ld [wcf91], a
+ pop hl
+ pop af
+ ld [hld], a
+ dec hl
+ pop af
+ ld [hld], a
+ pop af
+ ld [hl], a
+ ld a, [wEnemyMonSpecies]
+ ld [wCapturedMonSpecies], a
+ ld [wcf91], a
+ ld [wd11e], a
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_OLD_MAN ; is this the old man battle?
+ jp z, .oldManCaughtMon ; if so, don't give the player the caught Pokémon
+ cp BATTLE_TYPE_PIKACHU
+ jr z, .oldManCaughtMon ; same with Pikachu battle
+ ld hl, ItemUseBallText05
+ call PrintText
+
+; Add the caught Pokémon to the Pokédex.
+ predef IndexToPokedex
+ ld a, [wd11e]
+ dec a
+ ld c, a
+ ld b, FLAG_TEST
+ ld hl, wPokedexOwned
+ predef FlagActionPredef
+ ld a, c
+ push af
+ ld a, [wd11e]
+ dec a
+ ld c, a
+ ld b, FLAG_SET
+ predef FlagActionPredef
+ pop af
+
+ 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]
+ ld [wd11e], a
+ predef ShowPokedexData
+
+.skipShowingPokedexData
+ ld a, $1
+ ld [wd49c], a
+ ld a, $85
+ ld [wPikachuMood], a
+ ld a, [wPartyCount]
+ cp PARTY_LENGTH ; is party full?
+ jr z, .sendToBox
+ xor a ; PLAYER_PARTY_DATA
+ ld [wMonDataLocation], a
+ call ClearSprites
+ ld hl, .emptyString
+ call PrintText
+ call AddPartyMon
+ jr .done
+
+.sendToBox
+ call ClearSprites
+ call SendNewMonToBox
+ ld hl, ItemUseBallText07
+ CheckEvent EVENT_MET_BILL
+ jr nz, .printTransferredToPCText
+ ld hl, ItemUseBallText08
+.printTransferredToPCText
+ call PrintText
+ jr .done
+
+.oldManCaughtMon
+ ld hl, ItemUseBallText05
+
+.printMessage
+ call PrintText
+ call ClearSprites
+
+.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
+
+.emptyString
+ db "@"
+
+ItemUseBallText00:
+;"It dodged the thrown ball!"
+;"This pokemon can't be caught"
+ text_far _ItemUseBallText00
+ text_end
+ItemUseBallText01:
+;"You missed the pokemon!"
+ text_far _ItemUseBallText01
+ text_end
+ItemUseBallText02:
+;"Darn! The pokemon broke free!"
+ text_far _ItemUseBallText02
+ text_end
+ItemUseBallText03:
+;"Aww! It appeared to be caught!"
+ text_far _ItemUseBallText03
+ text_end
+ItemUseBallText04:
+;"Shoot! It was so close too!"
+ text_far _ItemUseBallText04
+ text_end
+ItemUseBallText05:
+;"All right! {MonName} was caught!"
+;play sound
+ text_far _ItemUseBallText05
+ sound_caught_mon
+ text_promptbutton
+ text_end
+ItemUseBallText07:
+;"X was transferred to Bill's PC"
+ text_far _ItemUseBallText07
+ text_end
+ItemUseBallText08:
+;"X was transferred to someone's PC"
+ text_far _ItemUseBallText08
+ text_end
+
+ItemUseBallText06:
+;"New DEX data will be added..."
+;play sound
+ text_far _ItemUseBallText06
+ sound_dex_page_added
+ text_promptbutton
+ text_end
+
+ItemUseTownMap:
+ ld a, [wIsInBattle]
+ and a
+ jp nz, ItemUseNotTime
+ farjp DisplayTownMap
+
+ItemUseBicycle:
+ ld a, [wIsInBattle]
+ and a
+ jp nz, ItemUseNotTime
+ ld a, [wWalkBikeSurfState]
+ ld [wWalkBikeSurfStateCopy], a
+ cp 2 ; is the player surfing?
+ jp z, ItemUseNotTime
+ dec a ; is player already bicycling?
+ jr nz, .tryToGetOnBike
+.getOffBike
+ call ItemUseReloadOverworldData
+ xor a
+ ld [wWalkBikeSurfState], a ; change player state to walking
+ ld a, $00
+ ld [wPikachuSpawnState], a
+ call PlayDefaultMusic ; play walking music
+ ld hl, GotOffBicycleText
+ jp PrintText
+
+.tryToGetOnBike
+ call IsBikeRidingAllowed
+ jp nc, NoCyclingAllowedHere
+ call ItemUseReloadOverworldData
+ xor a ; no keys pressed
+ ldh [hJoyHeld], a ; current joypad state
+ ld a, $1
+ ld [wWalkBikeSurfState], a ; change player state to bicycling
+ call PlayDefaultMusic ; play bike riding music
+ xor a
+ ld [wWalkBikeSurfState], a
+ ld hl, GotOnBicycleText
+ call PrintText
+ ld a, $1
+ ld [wWalkBikeSurfState], a
+ ret
+
+; used for Surf out-of-battle effect
+ItemUseSurfboard:
+ ld a, [wWalkBikeSurfState]
+ ld [wWalkBikeSurfStateCopy], a
+ cp 2 ; is the player already surfing?
+ jr z, .tryToStopSurfing
+.tryToSurf
+ call IsNextTileShoreOrWater
+ jp nc, SurfingAttemptFailed
+ ld hl, TilePairCollisionsWater
+ call CheckForTilePairCollisions
+ jp c, SurfingAttemptFailed
+.surf
+ call .makePlayerMoveForward
+ ld hl, wd730
+ set 7, [hl]
+ ld a, 2
+ ld [wWalkBikeSurfState], a ; change player state to surfing
+ call PlayDefaultMusic ; play surfing music
+ ld hl, SurfingGotOnText
+ jp PrintText
+
+.tryToStopSurfing
+ xor a
+ ldh [hSpriteIndexOrTextID], a
+ ld d, 16 ; talking range in pixels (normal range)
+ call IsSpriteInFrontOfPlayer2
+ res 7, [hl]
+ ldh a, [hSpriteIndexOrTextID]
+ and a ; is there a sprite in the way?
+ jr nz, .cannotStopSurfing
+ ld hl, TilePairCollisionsWater
+ call CheckForTilePairCollisions
+ jr c, .cannotStopSurfing
+ ld a, [wTileInFrontOfPlayer]
+ ld c, a
+ call IsTilePassable
+ jr nc, .stopSurfing
+.cannotStopSurfing
+ ld hl, SurfingNoPlaceToGetOffText
+ jp PrintText
+
+.stopSurfing
+ call .makePlayerMoveForward
+ ld a, $3
+ ld [wPikachuSpawnState], a
+ ld hl, wPikachuOverworldStateFlags
+ set 5, [hl]
+ ld hl, wd730
+ set 7, [hl]
+ xor a
+ ld [wWalkBikeSurfState], a ; change player state to walking
+ dec a
+ ld [wJoyIgnore], a
+ call PlayDefaultMusic ; play walking music
+ call GBPalWhiteOutWithDelay3
+ jp LoadWalkingPlayerSpriteGraphics
+
+; uses a simulated button press to make the player move forward
+.makePlayerMoveForward
+ ld a, [wPlayerDirection] ; direction the player is going
+ bit PLAYER_DIR_BIT_UP, a
+ ld b, D_UP
+ jr nz, .storeSimulatedButtonPress
+ bit PLAYER_DIR_BIT_DOWN, a
+ ld b, D_DOWN
+ jr nz, .storeSimulatedButtonPress
+ bit PLAYER_DIR_BIT_LEFT, a
+ ld b, D_LEFT
+ jr nz, .storeSimulatedButtonPress
+ ld b, D_RIGHT
+.storeSimulatedButtonPress
+ ld a, b
+ ld [wSimulatedJoypadStatesEnd], a
+ xor a
+ ld [wWastedByteCD39], a
+ inc a
+ ld [wSimulatedJoypadStatesIndex], a
+ ret
+
+SurfingGotOnText:
+ text_far _SurfingGotOnText
+ text_end
+
+SurfingNoPlaceToGetOffText:
+ text_far _SurfingNoPlaceToGetOffText
+ text_end
+
+ItemUsePokedex:
+ predef_jump ShowPokedexMenu
+
+ItemUseEvoStone:
+ ld a, [wIsInBattle]
+ and a
+ jp nz, ItemUseNotTime
+ ld a, [wWhichPokemon]
+ push af
+ ld a, [wcf91]
+ ld [wEvoStoneItemID], a
+ push af
+ ld a, EVO_STONE_PARTY_MENU
+ ld [wPartyMenuTypeOrMessageID], a
+ ld a, $ff
+ ld [wUpdateSpritesEnabled], a
+ call DisplayPartyMenu
+ ld a, [wcf91]
+ ld [wLoadedMon], a
+ pop bc
+ jr c, .canceledItemUse
+ ld a, b
+ ld [wcf91], a
+ call Func_d85d
+ jr nc, .noEffect
+ callfar IsThisPartymonStarterPikachu_Party
+ jr nc, .notPlayerPikachu
+ ld e, $1b
+ callfar PlayPikachuSoundClip
+ ld a, [wWhichPokemon]
+ ld hl, wPartyMonNicks
+ call GetPartyMonName
+ ld hl, RefusingText
+ call PrintText
+ ld a, $4
+ ld [wd49c], a
+ ld a, $82
+ ld [wPikachuMood], a
+ jr .canceledItemUse
+
+.notPlayerPikachu
+ ld a, SFX_HEAL_AILMENT
+ call PlaySoundWaitForCurrent
+ call WaitForSoundToFinish
+ ld a, $01
+ ld [wForceEvolution], a
+ callfar TryEvolvingMon ; try to evolve pokemon
+ pop af
+ ld [wWhichPokemon], a
+ ld hl, wNumBagItems
+ ld a, 1 ; remove 1 stone
+ ld [wItemQuantity], a
+ jp RemoveItemFromInventory
+
+.noEffect
+ call ItemUseNoEffect
+.canceledItemUse
+ xor a
+ ld [wActionResultOrTookBattleTurn], a ; item not used
+ pop af
+ ret
+
+Func_d85d:
+ ld hl, EvosMovesPointerTable
+ ld a, [wLoadedMon]
+ dec a
+ ld c, a
+ ld b, $0
+ add hl, bc
+ add hl, bc
+ ld de, wcd6d
+ ld a, BANK(TryEvolvingMon)
+ ld bc, $2
+ call FarCopyData
+ ld hl, wcd6d
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, wcd6d
+ ld a, BANK(TryEvolvingMon)
+ ld bc, 13
+ call FarCopyData
+ ld hl, wcd6d
+.loop
+ ld a, [hli]
+ and a
+ jr z, .cannotEvolveWithUsedStone
+ inc hl
+ inc hl
+ cp EV_ITEM
+ jr nz, .loop
+ dec hl
+ dec hl
+ ld b, [hl]
+ ld a, [wcf91]
+ inc hl
+ inc hl
+ inc hl
+ cp b
+ jr nz, .loop
+ scf
+ ret
+
+.cannotEvolveWithUsedStone
+ and a
+ ret
+
+RefusingText:
+ text_far _RefusingText
+ text_end
+
+ItemUseVitamin:
+ ld a, [wIsInBattle]
+ and a
+ jp nz, ItemUseNotTime
+
+ItemUseMedicine:
+ ld a, [wPartyCount]
+ and a
+ jp z, Func_e4bf
+ ld a, [wWhichPokemon]
+ push af
+ ld a, [wcf91]
+ push af
+ ld a, USE_ITEM_PARTY_MENU
+ ld [wPartyMenuTypeOrMessageID], a
+ ld a, $ff
+ ld [wUpdateSpritesEnabled], a
+ ld a, [wPseudoItemID]
+ and a ; using Softboiled?
+ jr z, .notUsingSoftboiled
+; if using softboiled
+ call GoBackToPartyMenu
+ jr .getPartyMonDataAddress
+.notUsingSoftboiled
+ call DisplayPartyMenu
+.getPartyMonDataAddress
+ jp c, .canceledItemUse
+ ld hl, wPartyMons
+ ld bc, wPartyMon2 - wPartyMon1
+ ld a, [wWhichPokemon]
+ call AddNTimes
+ ld a, [wWhichPokemon]
+ ld [wUsedItemOnWhichPokemon], a
+ ld d, a
+ ld a, [wcf91]
+ ld e, a
+ ld [wd0b5], a
+ pop af
+ push af
+ cp $28
+ jr nc, .asm_d906
+ push hl
+ push de
+ callabd_ModifyPikachuHappiness PIKAHAPPY_USEDITEM
+ pop de
+ pop hl
+.asm_d906
+ pop af
+ ld [wcf91], a
+ pop af
+ ld [wWhichPokemon], a
+ ld a, [wPseudoItemID]
+ and a ; using Softboiled?
+ jr z, .checkItemType
+; if using softboiled
+ ld a, [wWhichPokemon]
+ cp d ; is the pokemon trying to use softboiled on itself?
+ jr z, ItemUseMedicine ; if so, force another choice
+.checkItemType
+ ld a, [wcf91]
+ cp REVIVE
+ jr nc, .healHP ; if it's a Revive or Max Revive
+ cp FULL_HEAL
+ jr z, .cureStatusAilment ; if it's a Full Heal
+ cp HP_UP
+ jp nc, .useVitamin ; if it's a vitamin or Rare Candy
+ cp FULL_RESTORE
+ jr nc, .healHP ; if it's a Full Restore or one of the potions
+; fall through if it's one of the status-specific healing items
+.cureStatusAilment
+ ld bc, wPartyMon1Status - wPartyMon1
+ add hl, bc ; hl now points to status
+ ld a, [wcf91]
+ lb bc, ANTIDOTE_MSG, 1 << PSN
+ cp ANTIDOTE
+ jr z, .checkMonStatus
+ lb bc, BURN_HEAL_MSG, 1 << BRN
+ cp BURN_HEAL
+ jr z, .checkMonStatus
+ lb bc, ICE_HEAL_MSG, 1 << FRZ
+ cp ICE_HEAL
+ jr z, .checkMonStatus
+ lb bc, AWAKENING_MSG, SLP
+ cp AWAKENING
+ jr z, .checkMonStatus
+ lb bc, PARALYZ_HEAL_MSG, 1 << PAR
+ cp PARLYZ_HEAL
+ jr z, .checkMonStatus
+ lb bc, FULL_HEAL_MSG, $ff ; Full Heal
+.checkMonStatus
+ ld a, [hl] ; pokemon's status
+ and c ; does the pokemon have a status ailment the item can cure?
+ jp z, .healingItemNoEffect
+; if the pokemon has a status the item can heal
+ xor a
+ ld [hl], a ; remove the status ailment in the party data
+ ld a, b
+ ld [wPartyMenuTypeOrMessageID], a ; the message to display for the item used
+ ld a, [wPlayerMonNumber]
+ cp d ; is pokemon the item was used on active in battle?
+ jp nz, .doneHealing
+; if it is active in battle
+ xor a
+ ld [wBattleMonStatus], a ; remove the status ailment in the in-battle pokemon data
+ push hl
+ ld hl, wPlayerBattleStatus3
+ res BADLY_POISONED, [hl] ; heal Toxic status
+ pop hl
+ ld bc, wPartyMon1Stats - wPartyMon1Status
+ add hl, bc ; hl now points to party stats
+ ld de, wBattleMonStats
+ ld bc, NUM_STATS * 2
+ call CopyData ; copy party stats to in-battle stat data
+ predef DoubleOrHalveSelectedStats
+ jp .doneHealing
+
+.healHP
+ inc hl ; hl = address of current HP
+ ld a, [hli]
+ ld b, a
+ ld [wHPBarOldHP+1], a
+ ld a, [hl]
+ ld c, a
+ ld [wHPBarOldHP], a ; current HP stored at wHPBarOldHP (2 bytes, big-endian)
+ or b
+ jr nz, .notFainted
+.fainted
+ ld a, [wcf91]
+ cp REVIVE
+ jr z, .updateInBattleFaintedData
+ cp MAX_REVIVE
+ jr z, .updateInBattleFaintedData
+ jp .healingItemNoEffect
+
+.updateInBattleFaintedData
+ ld a, [wWhichPokemon]
+ push af
+ ld a, [wUsedItemOnWhichPokemon]
+ ld [wWhichPokemon], a
+ push hl
+ push de
+ push bc
+ callfar Func_2fd6a
+ pop bc
+ pop de
+ pop hl
+ pop af
+ ld [wWhichPokemon], a
+
+ ld a, [wIsInBattle]
+ and a
+ jr z, .compareCurrentHPToMaxHP
+ push hl
+ push de
+ push bc
+ ld a, [wUsedItemOnWhichPokemon]
+ ld c, a
+ ld hl, wPartyFoughtCurrentEnemyFlags
+ ld b, FLAG_TEST
+ predef FlagActionPredef
+ ld a, c
+ and a
+ jr z, .next
+ ld a, [wUsedItemOnWhichPokemon]
+ ld c, a
+ ld hl, wPartyGainExpFlags
+ ld b, FLAG_SET
+ predef FlagActionPredef
+.next
+ pop bc
+ pop de
+ pop hl
+ jr .compareCurrentHPToMaxHP
+
+.notFainted
+ ld a, [wcf91]
+ cp REVIVE
+ jp z, .healingItemNoEffect
+ cp MAX_REVIVE
+ jp z, .healingItemNoEffect
+.compareCurrentHPToMaxHP
+ push hl
+ push bc
+ ld bc, wPartyMon1MaxHP - (wPartyMon1HP + 1)
+ add hl, bc ; hl now points to max HP
+ pop bc
+ ld a, [hli]
+ cp b
+ jr nz, .skipComparingLSB ; no need to compare the LSB's if the MSB's don't match
+ ld a, [hl]
+ cp c
+.skipComparingLSB
+ pop hl
+ jr nz, .notFullHP
+.fullHP ; if the pokemon's current HP equals its max HP
+ ld a, [wcf91]
+ cp FULL_RESTORE
+ jp nz, .healingItemNoEffect
+ inc hl
+ inc hl
+ ld a, [hld] ; status ailment
+ and a ; does the pokemon have a status ailment?
+ jp z, .healingItemNoEffect
+ ld a, FULL_HEAL
+ ld [wcf91], a
+ dec hl
+ dec hl
+ dec hl
+ jp .cureStatusAilment
+
+.notFullHP ; if the pokemon's current HP doesn't equal its max HP
+ xor a
+ ld [wLowHealthAlarm], a ;disable low health alarm
+ ld [wChannelSoundIDs + Ch5], a
+ push hl
+ push de
+ ld bc, wPartyMon1MaxHP - (wPartyMon1HP + 1)
+ add hl, bc ; hl now points to max HP
+ ld a, [hli]
+ ld [wHPBarMaxHP+1], a
+ ld a, [hl]
+ ld [wHPBarMaxHP], a ; max HP stored at wHPBarMaxHP (2 bytes, big-endian)
+ ld a, [wPseudoItemID]
+ and a ; using Softboiled?
+ jp z, .notUsingSoftboiled2
+; if using softboiled
+ ld hl, wHPBarMaxHP
+ ld a, [hli]
+ push af
+ ld a, [hli]
+ push af
+ ld a, [hli]
+ push af
+ ld a, [hl]
+ push af
+ ld hl, wPartyMon1MaxHP
+ ld a, [wWhichPokemon]
+ ld bc, wPartyMon2 - wPartyMon1
+ call AddNTimes
+ ld a, [hli]
+ ld [wHPBarMaxHP + 1], a
+ ldh [hDividend], a
+ ld a, [hl]
+ ld [wHPBarMaxHP], a
+ ldh [hDividend + 1], a
+ ld a, 5
+ ldh [hDivisor], a
+ ld b, 2 ; number of bytes
+ call Divide ; get 1/5 of max HP of pokemon that used Softboiled
+ 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
+ ldh a, [hQuotient + 3]
+ push af
+ ld b, a
+ ld a, [hl]
+ ld [wHPBarOldHP], a
+ sub b
+ ld [hld], a
+ ld [wHPBarNewHP], a
+ ldh a, [hQuotient + 2]
+ ld b, a
+ ld a, [hl]
+ ld [wHPBarOldHP+1], a
+ sbc b
+ ld [hl], a
+ ld [wHPBarNewHP+1], a
+ hlcoord 4, 1
+ ld a, [wWhichPokemon]
+ ld bc, 2 * SCREEN_WIDTH
+ call AddNTimes ; calculate coordinates of HP bar of pokemon that used Softboiled
+ ld a, SFX_HEAL_HP
+ call PlaySoundWaitForCurrent
+ ldh a, [hFlagsFFFA]
+ set 0, a
+ ldh [hFlagsFFFA], a
+ ld a, $02
+ ld [wHPBarType], a
+ predef UpdateHPBar2 ; animate HP bar decrease of pokemon that used Softboiled
+ ldh a, [hFlagsFFFA]
+ res 0, a
+ ldh [hFlagsFFFA], a
+ pop af
+ ld b, a ; store heal amount (1/5 of max HP)
+ ld hl, wHPBarOldHP + 1
+ pop af
+ ld [hld], a
+ pop af
+ ld [hld], a
+ pop af
+ ld [hld], a
+ pop af
+ ld [hl], a
+ jr .addHealAmount
+
+.notUsingSoftboiled2
+ ld a, [wcf91]
+ cp SODA_POP
+ ld b, 60 ; Soda Pop heal amount
+ jr z, .addHealAmount
+ ld b, 80 ; Lemonade heal amount
+ jr nc, .addHealAmount
+ cp FRESH_WATER
+ ld b, 50 ; Fresh Water heal amount
+ jr z, .addHealAmount
+ cp SUPER_POTION
+ ld b, 200 ; Hyper Potion heal amount
+ jr c, .addHealAmount
+ ld b, 50 ; Super Potion heal amount
+ jr z, .addHealAmount
+ ld b, 20 ; Potion heal amount
+.addHealAmount
+ pop de
+ pop hl
+ ld a, [hl]
+ add b
+ ld [hld], a
+ ld [wHPBarNewHP], a
+ ld a, [hl]
+ ld [wHPBarNewHP+1], a
+ jr nc, .noCarry
+ inc [hl]
+ ld a, [hl]
+ ld [wHPBarNewHP + 1], a
+.noCarry
+ push de
+ inc hl
+ ld d, h
+ ld e, l ; de now points to current HP
+ ld hl, (wPartyMon1MaxHP + 1) - (wPartyMon1HP + 1)
+ add hl, de ; hl now points to max HP
+ ld a, [wcf91]
+ cp REVIVE
+ jr z, .setCurrentHPToHalfMaxHP
+ ld a, [hld]
+ ld b, a
+ ld a, [de]
+ sub b
+ dec de
+ ld b, [hl]
+ ld a, [de]
+ sbc b
+ jr nc, .setCurrentHPToMaxHp ; if current HP exceeds max HP after healing
+ ld a, [wcf91]
+ cp HYPER_POTION
+ jr c, .setCurrentHPToMaxHp ; if using a Full Restore or Max Potion
+ cp MAX_REVIVE
+ jr z, .setCurrentHPToMaxHp ; if using a Max Revive
+ jr .updateInBattleData
+
+.setCurrentHPToHalfMaxHP
+ dec hl
+ dec de
+ ld a, [hli]
+ srl a
+ ld [de], a
+ ld [wHPBarNewHP+1], a
+ ld a, [hl]
+ rr a
+ inc de
+ ld [de], a
+ ld [wHPBarNewHP], a
+ dec de
+ jr .doneHealingPartyHP
+
+.setCurrentHPToMaxHp
+ ld a, [hli]
+ ld [de], a
+ ld [wHPBarNewHP+1], a
+ inc de
+ ld a, [hl]
+ ld [de], a
+ ld [wHPBarNewHP], a
+ dec de
+.doneHealingPartyHP ; done updating the pokemon's current HP in the party data structure
+ ld a, [wcf91]
+ cp FULL_RESTORE
+ jr nz, .updateInBattleData
+ ld bc, wPartyMon1Status - (wPartyMon1MaxHP + 1)
+ add hl, bc
+ xor a
+ ld [hl], a ; remove the status ailment in the party data
+.updateInBattleData
+ ld h, d
+ ld l, e
+ pop de
+ ld a, [wPlayerMonNumber]
+ cp d ; is pokemon the item was used on active in battle?
+ jr nz, .calculateHPBarCoords
+; copy party HP to in-battle HP
+ ld a, [hli]
+ ld [wBattleMonHP], a
+ ld a, [hld]
+ ld [wBattleMonHP + 1], a
+ ld a, [wcf91]
+ cp FULL_RESTORE
+ jr nz, .calculateHPBarCoords
+ xor a
+ ld [wBattleMonStatus], a ; remove the status ailment in the in-battle pokemon data
+.calculateHPBarCoords
+ ld hl, wOAMBuffer + $90
+ ld bc, 2 * SCREEN_WIDTH
+ inc d
+.calculateHPBarCoordsLoop
+ add hl, bc
+ dec d
+ jr nz, .calculateHPBarCoordsLoop
+ jr .doneHealing
+
+.healingItemNoEffect
+ call ItemUseNoEffect
+ jp .done
+
+.doneHealing
+ ld a, [wPseudoItemID]
+ and a ; using Softboiled?
+ jr nz, .skipRemovingItem ; no item to remove if using Softboiled
+ push hl
+ call RemoveUsedItem
+ pop hl
+.skipRemovingItem
+ ld a, [wcf91]
+ cp FULL_RESTORE
+ jr c, .playStatusAilmentCuringSound
+ cp FULL_HEAL
+ jr z, .playStatusAilmentCuringSound
+ ld a, SFX_HEAL_HP
+ call PlaySoundWaitForCurrent
+ ldh a, [hFlagsFFFA]
+ set 0, a
+ ldh [hFlagsFFFA], a
+ ld a, $02
+ ld [wHPBarType], a
+ predef UpdateHPBar2 ; animate the HP bar lengthening
+ ldh a, [hFlagsFFFA]
+ res 0, a
+ ldh [hFlagsFFFA], a
+ ld a, REVIVE_MSG
+ ld [wPartyMenuTypeOrMessageID], a
+ ld a, [wcf91]
+ cp REVIVE
+ jr z, .showHealingItemMessage
+ cp MAX_REVIVE
+ jr z, .showHealingItemMessage
+ ld a, POTION_MSG
+ ld [wPartyMenuTypeOrMessageID], a
+ jr .showHealingItemMessage
+
+.playStatusAilmentCuringSound
+ ld a, SFX_HEAL_AILMENT
+ call PlaySoundWaitForCurrent
+.showHealingItemMessage
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ call ClearScreen
+ dec a
+ ld [wUpdateSpritesEnabled], a
+ call RedrawPartyMenu ; redraws the party menu and displays the message
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ ld c, 50
+ call DelayFrames
+ call WaitForTextScrollButtonPress
+ jr .done
+
+.canceledItemUse
+ xor a
+ ld [wActionResultOrTookBattleTurn], a ; item use failed
+ pop af
+ pop af
+.done
+ ld a, [wPseudoItemID]
+ and a ; using Softboiled?
+ ret nz ; if so, return
+ call GBPalWhiteOut
+ call z, RunDefaultPaletteCommand
+ ld a, [wIsInBattle]
+ and a
+ ret nz
+ jp ReloadMapData
+
+.useVitamin
+ push hl
+ ld a, [hl]
+ ld [wd0b5], a
+ ld [wd11e], a
+ ld bc, wPartyMon1Level - wPartyMon1
+ add hl, bc ; hl now points to level
+ ld a, [hl] ; a = level
+ ld [wCurEnemyLVL], a ; store level
+ call GetMonHeader
+ push de
+ ld a, d
+ ld hl, wPartyMonNicks
+ call GetPartyMonName
+ pop de
+ pop hl
+ ld a, [wcf91]
+ cp RARE_CANDY
+ jp z, .useRareCandy
+ push hl
+ sub HP_UP
+ add a
+ ld bc, wPartyMon1HPExp - wPartyMon1
+ add hl, bc
+ add l
+ ld l, a
+ jr nc, .noCarry2
+ inc h
+.noCarry2
+ ld a, 10
+ ld b, a
+ ld a, [hl] ; a = MSB of stat experience of the appropriate stat
+ cp 100 ; is there already at least 25600 (256 * 100) stat experience?
+ jr nc, .vitaminNoEffect ; if so, vitamins can't add any more
+ add b ; add 2560 (256 * 10) stat experience
+ jr nc, .noCarry3 ; a carry should be impossible here, so this will always jump
+ ld a, 255
+.noCarry3
+ ld [hl], a
+ pop hl
+ call .recalculateStats
+ ld hl, VitaminText
+ ld a, [wcf91]
+ sub HP_UP - 1
+ ld c, a
+.statNameLoop ; loop to get the address of the name of the stat the vitamin increases
+ dec c
+ jr z, .gotStatName
+.statNameInnerLoop
+ ld a, [hli]
+ ld b, a
+ ld a, $50
+ cp b
+ jr nz, .statNameInnerLoop
+ jr .statNameLoop
+
+.gotStatName
+ ld de, wcf4b
+ ld bc, 10
+ call CopyData ; copy the stat's name to wcf4b
+ ld a, SFX_HEAL_AILMENT
+ call PlaySound
+ ld hl, VitaminStatRoseText
+ call PrintText
+ jp RemoveUsedItem
+
+.vitaminNoEffect
+ pop hl
+ ld hl, VitaminNoEffectText
+ call PrintText
+ jp GBPalWhiteOut
+
+.recalculateStats
+ ld bc, wPartyMon1Stats - wPartyMon1
+ add hl, bc
+ ld d, h
+ ld e, l ; de now points to stats
+ 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, wPartyMon1Level - wPartyMon1
+ add hl, bc ; hl now points to level
+ ld a, [hl] ; a = level
+ cp MAX_LEVEL
+ jr z, .vitaminNoEffect ; can't raise level above 100
+ inc a
+ ld [hl], a ; store incremented level
+ ld [wCurEnemyLVL], a
+ push hl
+ push de
+ ld d, a
+ callfar CalcExperience ; calculate experience for next level and store it at hExperience
+ pop de
+ pop hl
+ ld bc, wPartyMon1Exp - wPartyMon1Level
+ add hl, bc ; hl now points to MSB of experience
+; update experience to minimum for new level
+ ldh a, [hExperience]
+ ld [hli], a
+ ldh a, [hExperience + 1]
+ ld [hli], a
+ ldh a, [hExperience + 2]
+ ld [hl], a
+ pop hl
+ ld a, [wWhichPokemon]
+ push af
+ ld a, [wcf91]
+ push af
+ push de
+ push hl
+ ld bc, wPartyMon1MaxHP - wPartyMon1
+ add hl, bc ; hl now points to MSB of max HP
+ ld a, [hli]
+ ld b, a
+ ld c, [hl]
+ pop hl
+ push bc
+ push hl
+ call .recalculateStats
+ pop hl
+ ld bc, (wPartyMon1MaxHP + 1) - wPartyMon1
+ add hl, bc ; hl now points to LSB of max HP
+ pop bc
+ ld a, [hld]
+ sub c
+ ld c, a
+ ld a, [hl]
+ 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, (wPartyMon1HP + 1) - wPartyMon1MaxHP
+ add hl, de ; hl now points to LSB of current HP
+ ld a, [hl]
+ add c
+ ld [hld], a
+ ld a, [hl]
+ adc b
+ ld [hl], a
+ ld a, RARE_CANDY_MSG
+ ld [wPartyMenuTypeOrMessageID], a
+ call RedrawPartyMenu
+ pop de
+ ld a, d
+ ld [wWhichPokemon], a
+ ld a, e
+ ld [wd11e], a
+ xor a ; PLAYER_PARTY_DATA
+ ld [wMonDataLocation], a
+ call LoadMonData
+ ld d, $01
+ callfar PrintStatsBox ; display new stats text box
+ call WaitForTextScrollButtonPress ; wait for button press
+ xor a ; PLAYER_PARTY_DATA
+ ld [wMonDataLocation], a
+ predef LearnMoveFromLevelUp ; learn level up move, if any
+
+ xor a
+ ld [wForceEvolution], a
+ callabd_ModifyPikachuHappiness PIKAHAPPY_LEVELUP
+ ld a, [wWhichPokemon]
+ push af
+ ld a, [wUsedItemOnWhichPokemon]
+ ld [wWhichPokemon], a
+ callfar Func_2fd6a ; evolve pokemon, if appropriate
+ pop af
+ ld [wWhichPokemon], a
+
+ callfar TryEvolvingMon
+ ld a, $01
+ ld [wUpdateSpritesEnabled], a
+ pop af
+ ld [wcf91], a
+ pop af
+ ld [wWhichPokemon], a
+ jp RemoveUsedItem
+
+VitaminStatRoseText:
+ text_far _VitaminStatRoseText
+ text_end
+
+VitaminNoEffectText:
+ text_far _VitaminNoEffectText
+ text_end
+
+VitaminText:
+ db "HEALTH@"
+ db "ATTACK@"
+ db "DEFENSE@"
+ db "SPEED@"
+ db "SPECIAL@"
+
+ItemUseBait:
+ ld hl, ThrewBaitText
+ call PrintText
+ ld hl, wEnemyMonActualCatchRate ; catch rate
+ srl [hl] ; halve catch rate
+ ld a, BAIT_ANIM
+ ld hl, wSafariBaitFactor ; bait factor
+ ld de, wSafariEscapeFactor ; escape factor
+ jr BaitRockCommon
+
+ItemUseRock:
+ ld hl, ThrewRockText
+ call PrintText
+ ld hl, wEnemyMonActualCatchRate ; catch rate
+ ld a, [hl]
+ add a ; double catch rate
+ jr nc, .noCarry
+ ld a, $ff
+.noCarry
+ ld [hl], a
+ ld a, ROCK_ANIM
+ ld hl, wSafariEscapeFactor ; escape factor
+ ld de, wSafariBaitFactor ; bait factor
+
+BaitRockCommon:
+ ld [wAnimationID], a
+ xor a
+ ld [wAnimationType], a
+ ldh [hWhoseTurn], 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
+ call Random
+ and 7
+ cp 5
+ jr nc, .randomLoop
+ inc a ; increment the random number, giving a range from 1 to 5 inclusive
+ ld b, a
+ ld a, [hl]
+ add b ; increase bait factor (for bait), increase escape factor (for rock)
+ jr nc, .noCarry
+ ld a, $ff
+.noCarry
+ ld [hl], a
+ predef MoveAnimation ; do animation
+ ld c, 70
+ jp DelayFrames
+
+ThrewBaitText:
+ text_far _ThrewBaitText
+ text_end
+
+ThrewRockText:
+ text_far _ThrewRockText
+ text_end
+
+; also used for Dig out-of-battle effect
+ItemUseEscapeRope:
+ ld a, [wIsInBattle]
+ and a
+ jr nz, .notUsable
+ ld a, [wCurMap]
+ cp AGATHAS_ROOM
+ jr z, .notUsable
+ cp BILLS_HOUSE
+ jr z, .notUsable
+ cp POKEMON_FAN_CLUB
+ jr z, .notUsable
+ ld a, [wCurMapTileset]
+ ld b, a
+ ld hl, EscapeRopeTilesets
+.loop
+ ld a, [hli]
+ cp $ff
+ jr z, .notUsable
+ cp b
+ jr nz, .loop
+ ld hl, wd732
+ set 3, [hl]
+ set 6, [hl]
+ call Func_1510
+ ld hl, wd72e
+ res 4, [hl]
+ ResetEvent EVENT_IN_SAFARI_ZONE
+ xor a
+ ld [wNumSafariBalls], a
+ ld [wSafariZoneGateCurScript], a
+ inc a
+ ld [wEscapedFromBattle], a
+ ld [wActionResultOrTookBattleTurn], a ; item used
+ ld a, [wPseudoItemID]
+ and a ; using Dig?
+ ret nz ; if so, return
+ call ItemUseReloadOverworldData
+ ld c, 30
+ call DelayFrames
+ jp RemoveUsedItem
+
+.notUsable
+ jp ItemUseNotTime
+
+INCLUDE "data/tilesets/escape_rope_tilesets.asm"
+
+ItemUseRepel:
+ ld b, 100
+
+ItemUseRepelCommon:
+ ld a, [wIsInBattle]
+ and a
+ jp nz, ItemUseNotTime
+ ld a, b
+ ld [wRepelRemainingSteps], a
+ jp PrintItemUseTextAndRemoveItem
+
+; handles X Accuracy item
+ItemUseXAccuracy:
+ ld a, [wIsInBattle]
+ and a
+ jp z, ItemUseNotTime
+ ld hl, wPlayerBattleStatus2
+ set USING_X_ACCURACY, [hl] ; X Accuracy bit
+ callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM
+ jp PrintItemUseTextAndRemoveItem
+
+; This function is bugged and never works. It always jumps to ItemUseNotTime.
+; The Card Key is handled in a different way.
+ItemUseCardKey:
+ xor a
+ ld [wUnusedD71F], a
+ call GetTileAndCoordsInFrontOfPlayer
+ ld a, [GetTileAndCoordsInFrontOfPlayer]
+ cp $18
+ jr nz, .next0
+ ld hl, CardKeyTable1
+ jr .next1
+
+.next0
+ cp $24
+ jr nz, .next2
+ ld hl, CardKeyTable2
+ jr .next1
+
+.next2
+ cp $5e
+ jp nz, ItemUseNotTime
+ ld hl, CardKeyTable3
+.next1
+ ld a, [wCurMap]
+ ld b, a
+.loop
+ ld a, [hli]
+ cp -1
+ jp z, ItemUseNotTime
+ cp b
+ jr nz, .nextEntry1
+ ld a, [hli]
+ cp d
+ jr nz, .nextEntry2
+ ld a, [hli]
+ cp e
+ jr nz, .nextEntry3
+ ld a, [hl]
+ ld [wUnusedD71F], a
+ jr .done
+
+.nextEntry1
+ inc hl
+.nextEntry2
+ inc hl
+.nextEntry3
+ inc hl
+ jr .loop
+
+.done
+ ld hl, ItemUseText00
+ call PrintText
+ ld hl, wd728
+ set 7, [hl]
+ ret
+
+INCLUDE "data/events/card_key_coords.asm"
+
+ItemUsePokedoll:
+ ld a, [wIsInBattle]
+ dec a
+ jp nz, ItemUseNotTime
+ ld a, $01
+ ld [wEscapedFromBattle], a
+ jp PrintItemUseTextAndRemoveItem
+
+ItemUseGuardSpec:
+ ld a, [wIsInBattle]
+ and a
+ jp z, ItemUseNotTime
+
+ ld a, [wWhichPokemon]
+ push af
+ ld a, [wPlayerMonNumber]
+ ld [wWhichPokemon], a
+ callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM
+ pop af
+ ld [wWhichPokemon], a
+
+ ld hl, wPlayerBattleStatus2
+ set PROTECTED_BY_MIST, [hl] ; Mist bit
+ jp PrintItemUseTextAndRemoveItem
+
+ItemUseSuperRepel:
+ ld b, 200
+ jp ItemUseRepelCommon
+
+ItemUseMaxRepel:
+ ld b, 250
+ jp ItemUseRepelCommon
+
+ItemUseDireHit:
+ ld a, [wIsInBattle]
+ and a
+ jp z, ItemUseNotTime
+
+ ld a, [wWhichPokemon]
+ push af
+ ld a, [wPlayerMonNumber]
+ ld [wWhichPokemon], a
+ callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM
+ pop af
+ ld [wWhichPokemon], a
+
+ ld hl, wPlayerBattleStatus2
+ set GETTING_PUMPED, [hl] ; Focus Energy bit
+ jp PrintItemUseTextAndRemoveItem
+
+ItemUseXStat:
+ ld a, [wIsInBattle]
+ and a
+ jr nz, .inBattle
+ call ItemUseNotTime
+ ld a, 2
+ ld [wActionResultOrTookBattleTurn], a ; item not used
+ ret
+
+.inBattle
+ ld hl, wPlayerMoveNum
+ ld a, [hli]
+ push af ; save [wPlayerMoveNum]
+ ld a, [hl]
+ push af ; save [wPlayerMoveEffect]
+ push hl
+ ld a, [wcf91]
+ sub X_ATTACK - ATTACK_UP1_EFFECT
+ ld [hl], a ; store player move effect
+ call PrintItemUseTextAndRemoveItem
+ ld a, XSTATITEM_ANIM ; X stat item animation ID
+ ld [wPlayerMoveNum], a
+ call LoadScreenTilesFromBuffer1 ; restore saved screen
+ call Delay3
+ xor a
+ ldh [hWhoseTurn], a ; set turn to player's turn
+ farcall StatModifierUpEffect ; do stat increase move
+
+ ld a, [wWhichPokemon]
+ push af
+ ld a, [wPlayerMonNumber]
+ ld [wWhichPokemon], a
+ callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM
+ pop af
+ ld [wWhichPokemon], a
+
+ pop hl
+ pop af
+ ld [hld], a ; restore [wPlayerMoveEffect]
+ pop af
+ ld [hl], a ; restore [wPlayerMoveNum]
+ ret
+
+ItemUsePokeflute:
+ ld a, [wIsInBattle]
+ and a
+ jr nz, .inBattle
+; if not in battle
+ call ItemUseReloadOverworldData
+ ld a, [wCurMap]
+ cp ROUTE_12
+ jr nz, .notRoute12
+ CheckEvent EVENT_BEAT_ROUTE12_SNORLAX
+ jr nz, .noSnorlaxOrPikachuToWakeUp
+; if the player hasn't beaten Route 12 Snorlax
+ ld hl, Route12SnorlaxFluteCoords
+ call ArePlayerCoordsInArray
+ jr nc, .noSnorlaxOrPikachuToWakeUp
+ ld hl, PlayedFluteHadEffectText
+ call PrintText
+ SetEvent EVENT_FIGHT_ROUTE12_SNORLAX
+ ret
+
+.notRoute12
+ cp ROUTE_16
+ jr nz, .notRoute16
+ CheckEvent EVENT_BEAT_ROUTE16_SNORLAX
+ jr nz, .noSnorlaxOrPikachuToWakeUp
+; if the player hasn't beaten Route 16 Snorlax
+ ld hl, Route16SnorlaxFluteCoords
+ call ArePlayerCoordsInArray
+ jr nc, .noSnorlaxOrPikachuToWakeUp
+ ld hl, PlayedFluteHadEffectText
+ call PrintText
+ SetEvent EVENT_FIGHT_ROUTE16_SNORLAX
+ ret
+
+.notRoute16
+ cp PEWTER_POKECENTER
+ jr nz, .noSnorlaxOrPikachuToWakeUp
+ call CheckPikachuFollowingPlayer
+ jr z, .noSnorlaxOrPikachuToWakeUp
+ callfar IsPikachuRightNextToPlayer
+ jr nc, .noSnorlaxOrPikachuToWakeUp
+ ld hl, PlayedFluteHadEffectText
+ call PrintText
+ call ItemUseReloadOverworldData
+ ldpikaemotion e, PikachuEmotion26
+ callfar PlaySpecificPikachuEmotion
+ ret
+
+.noSnorlaxOrPikachuToWakeUp
+ ld hl, PlayedFluteNoEffectText
+ jp PrintText
+
+.inBattle
+ xor a
+ ld [wWereAnyMonsAsleep], a
+ ld b, ~SLP & $ff
+ ld hl, wPartyMon1Status
+ call WakeUpEntireParty
+ ld a, [wIsInBattle]
+ dec a ; is it a trainer battle?
+ jr z, .skipWakingUpEnemyParty
+; if it's a trainer battle
+ ld hl, wEnemyMon1Status
+ call WakeUpEntireParty
+.skipWakingUpEnemyParty
+ ld hl, wBattleMonStatus
+ ld a, [hl]
+ and b ; remove Sleep status
+ ld [hl], a
+ ld hl, wEnemyMonStatus
+ ld a, [hl]
+ ld c, a
+ and b ; remove Sleep status
+ ld [hl], a
+ ld a, c
+ and SLP
+ jr z, .asm_e063
+ ld a, $1
+ ld [wWereAnyMonsAsleep], a
+.asm_e063
+ call LoadScreenTilesFromBuffer2 ; restore saved screen
+ ld a, [wWereAnyMonsAsleep]
+ and a ; were any pokemon asleep before playing the flute?
+ ld hl, PlayedFluteNoEffectText
+ jp z, PrintText ; if no pokemon were asleep
+; if some pokemon were asleep
+ ld hl, PlayedFluteHadEffectText
+ call PrintText
+ ld a, [wLowHealthAlarm]
+ and $80
+ jr nz, .skipMusic
+ call WaitForSoundToFinish ; wait for sound to end
+ farcall Music_PokeFluteInBattle ; play in-battle pokeflute music
+.musicWaitLoop ; wait for music to finish playing
+ ld a, [wChannelSoundIDs + Ch7]
+ and a ; music off?
+ jr nz, .musicWaitLoop
+.skipMusic
+ ld hl, FluteWokeUpText
+ jp PrintText
+
+; wakes up all party pokemon
+; INPUT:
+; hl must point to status of first pokemon in party (player's or enemy's)
+; b must equal ~SLP
+; [wWereAnyMonsAsleep] should be initialized to 0
+; OUTPUT:
+; [wWereAnyMonsAsleep]: set to 1 if any pokemon were asleep
+WakeUpEntireParty:
+ ld de, 44
+ ld c, 6
+.loop
+ ld a, [hl]
+ push af
+ and SLP ; is pokemon asleep?
+ jr z, .notAsleep
+ ld a, 1
+ ld [wWereAnyMonsAsleep], a ; indicate that a pokemon had to be woken up
+.notAsleep
+ pop af
+ and b ; remove Sleep status
+ ld [hl], a
+ add hl, de
+ dec c
+ jr nz, .loop
+ ret
+
+Route12SnorlaxFluteCoords:
+ dbmapcoord 9, 62 ; one space West of Snorlax
+ dbmapcoord 10, 61 ; one space North of Snorlax
+ dbmapcoord 10, 63 ; one space South of Snorlax
+ dbmapcoord 11, 62 ; one space East of Snorlax
+ db -1 ; end
+
+Route16SnorlaxFluteCoords:
+ dbmapcoord 27, 10 ; one space East of Snorlax
+ dbmapcoord 25, 10 ; one space West of Snorlax
+ db -1 ; end
+
+PlayedFluteNoEffectText:
+ text_far _PlayedFluteNoEffectText
+ text_end
+
+FluteWokeUpText:
+ text_far _FluteWokeUpText
+ text_end
+
+PlayedFluteHadEffectText:
+ text_far _PlayedFluteHadEffectText
+ text_promptbutton
+ text_asm
+ ld a, [wIsInBattle]
+ and a
+ jr nz, .done
+; play out-of-battle pokeflute music
+ call StopAllMusic
+ ld a, SFX_POKEFLUTE
+ ld c, BANK(SFX_Pokeflute)
+ call PlayMusic
+.musicWaitLoop ; wait for music to finish playing
+ ld a, [wChannelSoundIDs + Ch3]
+ cp SFX_POKEFLUTE
+ jr z, .musicWaitLoop
+ call PlayDefaultMusic ; start playing normal music again
+.done
+ jp TextScriptEnd ; end text
+
+ItemUseCoinCase:
+ ld a, [wIsInBattle]
+ and a
+ jp nz, ItemUseNotTime
+ ld hl, CoinCaseNumCoinsText
+ jp PrintText
+
+CoinCaseNumCoinsText:
+ text_far _CoinCaseNumCoinsText
+ text_end
+
+ItemUseOldRod:
+ call FishingInit
+ jp c, ItemUseNotTime
+ lb bc, 5, MAGIKARP
+ ld a, $1 ; set bite
+ jr RodResponse
+
+ItemUseGoodRod:
+ call FishingInit
+ jp c, ItemUseNotTime
+.RandomLoop
+ call Random
+ srl a
+ jr c, .SetBite
+ and %11
+ cp 2
+ jr nc, .RandomLoop
+ ; choose which monster appears
+ ld hl, GoodRodMons
+ add a
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld b, [hl]
+ inc hl
+ ld c, [hl]
+ and a
+.SetBite
+ ld a, 0
+ rla
+ xor 1
+ jr RodResponse
+
+INCLUDE "data/wild/good_rod.asm"
+
+ItemUseSuperRod:
+ call FishingInit
+ jp c, ItemUseNotTime
+ callfar ReadSuperRodData
+ ld c, e
+ ld b, d
+ ld a, $2
+ ld [wRodResponse], a
+ ld a, c
+ and a ; are there fish in the map?
+ jr z, DoNotGenerateFishingEncounter ; if not, do not generate an encounter
+ ld a, $1
+ ld [wRodResponse], a
+ call Random
+ and $1
+ jr nz, RodResponse
+ xor a
+ ld [wRodResponse], a
+ jr DoNotGenerateFishingEncounter
+
+RodResponse:
+ ld [wRodResponse], a
+
+ dec a ; is there a bite?
+ jr nz, DoNotGenerateFishingEncounter
+ ; if yes, store level and species data
+ ld a, 1
+ ld [wMoveMissed], a
+ ld a, b ; level
+ ld [wCurEnemyLVL], a
+ ld a, c ; species
+ ld [wCurOpponent], a
+
+DoNotGenerateFishingEncounter:
+ ld hl, wWalkBikeSurfState
+ ld a, [hl] ; store the value in a
+ push af
+ push hl
+ ld [hl], 0
+ farcall FishingAnim
+ pop hl
+ pop af
+ ld [hl], a
+ ret
+
+; 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:
+ ld a, [wIsInBattle]
+ and a
+ jr z, .notInBattle
+ scf ; can't fish during battle
+ ret
+
+.notInBattle
+ call IsNextTileShoreOrWater
+ jr nc, .cannotFish
+ ld a, [wWalkBikeSurfState]
+ cp 2 ; Surfing?
+ jr z, .cannotFish
+ call ItemUseReloadOverworldData
+ ld hl, ItemUseText00
+ call PrintText
+ ld a, SFX_HEAL_AILMENT
+ call PlaySound
+ ld a, $2
+ ld [wd49c], a
+ ld a, $81
+ ld [wPikachuMood], a
+ ld c, 80
+ call DelayFrames
+ and a
+ ret
+
+.cannotFish
+ scf ; can't fish when surfing
+ ret
+
+ItemUseOaksParcel:
+ jp ItemUseNotYoursToUse
+
+ItemUseItemfinder:
+ ld a, [wIsInBattle]
+ and a
+ jp nz, ItemUseNotTime
+ call ItemUseReloadOverworldData
+ farcall HiddenItemNear ; check for hidden items
+ ld hl, ItemfinderFoundNothingText
+ jr nc, .printText ; if no hidden items
+ ld c, 4
+.loop
+ ld a, SFX_HEALING_MACHINE
+ call PlaySoundWaitForCurrent
+ ld a, SFX_PURCHASE
+ call PlaySoundWaitForCurrent
+ dec c
+ jr nz, .loop
+ ld hl, ItemfinderFoundItemText
+.printText
+ jp PrintText
+
+ItemfinderFoundItemText:
+ text_far _ItemfinderFoundItemText
+ text_end
+
+ItemfinderFoundNothingText:
+ text_far _ItemfinderFoundNothingText
+ text_end
+
+ItemUsePPUp:
+ ld a, [wIsInBattle]
+ and a
+ jp nz, ItemUseNotTime
+
+ItemUsePPRestore:
+ ld a, [wWhichPokemon]
+ push af
+ ld a, [wcf91]
+ ld [wPPRestoreItem], a
+.chooseMon
+ xor a
+ ld [wUpdateSpritesEnabled], a
+ ld a, USE_ITEM_PARTY_MENU
+ ld [wPartyMenuTypeOrMessageID], a
+ call DisplayPartyMenu
+ jr nc, .chooseMove
+ jp .itemNotUsed
+
+.chooseMove
+ ld a, [wIsInBattle]
+ and a
+ jr z, .usePPItem
+ ld a, [wWhichPokemon]
+ ld b, a
+ ld a, [wPlayerMonNumber]
+ cp b
+ jr nz, .usePPItem
+ ld a, [wPlayerBattleStatus3]
+ bit TRANSFORMED, a
+ jr z, .usePPItem
+ call ItemUseNotTime
+ jp .itemNotUsed
+
+.usePPItem
+ ld a, [wPPRestoreItem]
+ cp ELIXER
+ jp nc, .useElixir ; if Elixir or Max Elixir
+ ld a, $02
+ ld [wMoveMenuType], a
+ ld hl, RaisePPWhichTechniqueText
+ ld a, [wPPRestoreItem]
+ cp ETHER ; is it a PP Up?
+ jr c, .printWhichTechniqueMessage ; if so, print the raise PP message
+ ld hl, RestorePPWhichTechniqueText ; otherwise, print the restore PP message
+.printWhichTechniqueMessage
+ call PrintText
+ xor a
+ ld [wPlayerMoveListIndex], a
+ callfar MoveSelectionMenu ; move selection menu
+ ld a, 0
+ ld [wPlayerMoveListIndex], a
+ jr nz, .chooseMon
+ ld hl, wPartyMon1Moves
+ ld bc, wPartyMon2 - wPartyMon1
+ call GetSelectedMoveOffset
+ push hl
+ ld a, [hl]
+ ld [wd11e], a
+ call GetMoveName
+ call CopyStringToCF4B ; copy name to wcf4b
+ pop hl
+ ld a, [wPPRestoreItem]
+ cp ETHER
+ jr nc, .useEther ; if Ether or Max Ether
+.usePPUp
+ ld bc, wPartyMon1PP - wPartyMon1Moves
+ add hl, bc
+ ld a, [hl] ; move PP
+ cp 3 << 6 ; have 3 PP Ups already been used?
+ jr c, .PPNotMaxedOut
+ ld hl, PPMaxedOutText
+ call PrintText
+ jr .chooseMove
+
+.PPNotMaxedOut
+ ld a, [hl]
+ add 1 << 6 ; increase PP Up count by 1
+ ld [hl], a
+ ld a, 1 ; 1 PP Up used
+ ld [wd11e], a
+ call RestoreBonusPP ; add the bonus PP to current PP
+ ld a, SFX_HEAL_AILMENT
+ call PlaySound
+ ld hl, PPIncreasedText
+ call PrintText
+.done
+ pop af
+ ld [wWhichPokemon], a
+ call GBPalWhiteOut
+ call RunDefaultPaletteCommand
+ jp RemoveUsedItem
+
+.afterRestoringPP ; after using a (Max) Ether/Elixir
+ ld a, [wWhichPokemon]
+ ld b, a
+ ld a, [wPlayerMonNumber]
+ cp b ; is the pokemon whose PP was restored active in battle?
+ jr nz, .skipUpdatingInBattleData
+ ld hl, wPartyMon1PP
+ ld bc, wPartyMon2 - wPartyMon1
+ call AddNTimes
+ ld de, wBattleMonPP
+ ld bc, 4
+ call CopyData ; copy party data to in-battle data
+.skipUpdatingInBattleData
+ ld a, SFX_HEAL_AILMENT
+ call PlaySound
+ ld hl, PPRestoredText
+ call PrintText
+ jr .done
+
+.useEther
+ call .restorePP
+ jr nz, .afterRestoringPP
+ jp .noEffect
+
+; unsets zero flag if PP was restored, sets zero flag if not
+; however, this is bugged for Max Ethers and Max Elixirs (see below)
+.restorePP
+ xor a ; PLAYER_PARTY_DATA
+ ld [wMonDataLocation], a
+ call GetMaxPP
+ ld hl, wPartyMon1Moves
+ ld bc, wPartyMon2 - wPartyMon1
+ call GetSelectedMoveOffset
+ ld bc, wPartyMon1PP - wPartyMon1Moves
+ add hl, bc ; hl now points to move's PP
+ ld a, [wMaxPP]
+ ld b, a
+ ld a, [wPPRestoreItem]
+ cp MAX_ETHER
+ jr z, .fullyRestorePP
+ ld a, [hl] ; move PP
+ and %00111111 ; lower 6 bit bits store current PP
+ cp b ; does current PP equal max PP?
+ ret z ; if so, return
+ add 10 ; increase current PP by 10
+; b holds the max PP amount and b will hold the new PP amount.
+; So, if the new amount meets or exceeds the max amount,
+; cap the amount to the max amount by leaving b unchanged.
+; Otherwise, store the new amount in b.
+ cp b ; does the new amount meet or exceed the maximum?
+ jr nc, .storeNewAmount
+ ld b, a
+.storeNewAmount
+ ld a, [hl] ; move PP
+ and %11000000 ; PP Up counter bits
+ add b
+ ld [hl], a
+ ret
+
+.fullyRestorePP
+ ld a, [hl] ; move PP
+; Note that this code has a bug. It doesn't mask out the upper two bits, which
+; are used to count how many PP Ups have been used on the move. So, Max Ethers
+; and Max Elixirs will not be detected as having no effect on a move with full
+; PP if the move has had any PP Ups used on it.
+ cp b ; does current PP equal max PP?
+ ret z
+ jr .storeNewAmount
+
+.useElixir
+; decrement the item ID so that ELIXER becomes ETHER and MAX_ELIXER becomes MAX_ETHER
+ ld hl, wPPRestoreItem
+ dec [hl]
+ dec [hl]
+ xor a
+ ld hl, wCurrentMenuItem
+ ld [hli], a
+ ld [hl], a ; zero the counter for number of moves that had their PP restored
+ ld b, 4
+; loop through each move and restore PP
+.elixirLoop
+ push bc
+ ld hl, wPartyMon1Moves
+ ld bc, wPartyMon2 - wPartyMon1
+ call GetSelectedMoveOffset
+ ld a, [hl]
+ and a ; does the current slot have a move?
+ jr z, .nextMove
+ call .restorePP
+ jr z, .nextMove
+; if some PP was restored
+ ld hl, wTileBehindCursor ; counter for number of moves that had their PP restored
+ inc [hl]
+.nextMove
+ ld hl, wCurrentMenuItem
+ inc [hl]
+ pop bc
+ dec b
+ jr nz, .elixirLoop
+ ld a, [wTileBehindCursor]
+ and a ; did any moves have their PP restored?
+ jp nz, .afterRestoringPP
+.noEffect
+ call ItemUseNoEffect
+.itemNotUsed
+ call GBPalWhiteOut
+ call RunDefaultPaletteCommand
+ pop af
+ xor a
+ ld [wActionResultOrTookBattleTurn], a ; item use failed
+ ret
+
+RaisePPWhichTechniqueText:
+ text_far _RaisePPWhichTechniqueText
+ text_end
+
+RestorePPWhichTechniqueText:
+ text_far _RestorePPWhichTechniqueText
+ text_end
+
+PPMaxedOutText:
+ text_far _PPMaxedOutText
+ text_end
+
+PPIncreasedText:
+ text_far _PPIncreasedText
+ text_end
+
+PPRestoredText:
+ text_far _PPRestoredText
+ text_end
+
+; for items that can't be used from the Item menu
+UnusableItem:
+ jp ItemUseNotTime
+
+ItemUseTMHM:
+ ld a, [wIsInBattle]
+ and a
+ jp nz, ItemUseNotTime
+ ld a, [wcf91]
+ sub TM01 ; underflows below 0 for HM items (before TM items)
+ push af
+ jr nc, .skipAdding
+ add NUM_TMS + NUM_HMS ; adjust HM IDs to come after TM IDs
+.skipAdding
+ inc a
+ ld [wd11e], a
+ predef TMToMove ; get move ID from TM/HM ID
+ ld a, [wd11e]
+ ld [wMoveNum], a
+ call GetMoveName
+ call CopyStringToCF4B ; copy name to wcf4b
+ pop af
+ ld hl, BootedUpTMText
+ jr nc, .printBootedUpMachineText
+ ld hl, BootedUpHMText
+.printBootedUpMachineText
+ call PrintText
+ ld hl, TeachMachineMoveText
+ call PrintText
+ hlcoord 14, 7
+ lb bc, 8, 15
+ ld a, TWO_OPTION_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID ; yes/no menu
+ ld a, [wCurrentMenuItem]
+ and a
+ jr z, .useMachine
+ ld a, 2
+ ld [wActionResultOrTookBattleTurn], a ; item not used
+ ret
+
+.useMachine
+ ld a, [wWhichPokemon]
+ push af
+ ld a, [wcf91]
+ push af
+.chooseMon
+ ld hl, wcf4b
+ ld de, wTempMoveNameBuffer
+ ld bc, 14
+ 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, wTempMoveNameBuffer
+ ld de, wcf4b
+ ld bc, 14
+ call CopyData
+ pop af
+ jr nc, .checkIfAbleToLearnMove
+; if the player canceled teaching the move
+ pop af
+ pop af
+ call GBPalWhiteOutWithDelay3
+ call ClearSprites
+ call RunDefaultPaletteCommand
+ jp LoadScreenTilesFromBuffer1 ; restore saved screen
+.checkIfAbleToLearnMove
+ predef CanLearnTM ; check if the pokemon can learn the move
+ push bc
+ ld a, [wWhichPokemon]
+ ld hl, wPartyMonNicks
+ call GetPartyMonName
+ pop bc
+ ld a, c
+ and a ; can the pokemon learn the move?
+ jr nz, .checkIfAlreadyLearnedMove
+; if the pokemon can't learn the move
+ ld a, SFX_DENIED
+ call PlaySoundWaitForCurrent
+ ld hl, MonCannotLearnMachineMoveText
+ call PrintText
+ jr .chooseMon
+
+.checkIfAlreadyLearnedMove
+ callfar CheckIfMoveIsKnown ; check if the pokemon already knows the move
+ jr c, .chooseMon
+ predef LearnMove ; teach move
+ ld a, [wWhichPokemon]
+ ld d, a
+ pop af
+ ld [wcf91], a
+ pop af
+ ld [wWhichPokemon], a
+ ld a, b
+ and a
+ ret z
+
+ ld a, [wWhichPokemon]
+ push af
+ ld a, d
+ ld [wWhichPokemon], a
+ callabd_ModifyPikachuHappiness PIKAHAPPY_USEDTMHM
+ callfar IsThisPartymonStarterPikachu_Party
+ jr nc, .notTeachingThunderboltOrThunderToPikachu
+ ld a, [wcf91]
+ cp TM_THUNDERBOLT ; are we teaching thunderbolt to the player pikachu?
+ jr z, .teachingThunderboltOrThunderToPlayerPikachu
+ cp TM_THUNDER ; are we teaching thunder then?
+ jr nz, .notTeachingThunderboltOrThunderToPikachu
+.teachingThunderboltOrThunderToPlayerPikachu
+ ld a, $5
+ ld [wd49c], a
+ ld a, $85
+ ld [wPikachuMood], a
+.notTeachingThunderboltOrThunderToPikachu
+ pop af
+ ld [wWhichPokemon], a
+
+ ld a, [wcf91]
+ call IsItemHM
+ ret c
+ jp RemoveUsedItem
+
+BootedUpTMText:
+ text_far _BootedUpTMText
+ text_end
+
+BootedUpHMText:
+ text_far _BootedUpHMText
+ text_end
+
+TeachMachineMoveText:
+ text_far _TeachMachineMoveText
+ text_end
+
+MonCannotLearnMachineMoveText:
+ text_far _MonCannotLearnMachineMoveText
+ text_end
+
+PrintItemUseTextAndRemoveItem:
+ ld hl, ItemUseText00
+ call PrintText
+ ld a, SFX_HEAL_AILMENT
+ call PlaySound
+ call WaitForTextScrollButtonPress ; wait for button press
+
+RemoveUsedItem:
+ ld hl, wNumBagItems
+ ld a, 1 ; one item
+ ld [wItemQuantity], a
+ jp RemoveItemFromInventory
+
+ItemUseNoEffect:
+ ld hl, ItemUseNoEffectText
+ jr ItemUseFailed
+
+ItemUseNotTime:
+ ld hl, ItemUseNotTimeText
+ jr ItemUseFailed
+
+ItemUseNotYoursToUse:
+ ld hl, ItemUseNotYoursToUseText
+ jr ItemUseFailed
+
+Func_e4bf:
+ ld a, $2
+ ld [wActionResultOrTookBattleTurn], a
+ ld hl, DontHavePokemonText
+ jp PrintText
+
+ThrowBallAtTrainerMon:
+ call RunDefaultPaletteCommand
+ call LoadScreenTilesFromBuffer1 ; restore saved screen
+ call Delay3
+ ld a, TOSS_ANIM
+ ld [wAnimationID], a
+ predef MoveAnimation ; do animation
+ ld hl, ThrowBallAtTrainerMonText1
+ call PrintText
+ ld hl, ThrowBallAtTrainerMonText2
+ call PrintText
+ jr RemoveUsedItem
+
+NoCyclingAllowedHere:
+ ld hl, NoCyclingAllowedHereText
+ jr ItemUseFailed
+
+BoxFullCannotThrowBall:
+ ld hl, BoxFullCannotThrowBallText
+ jr ItemUseFailed
+
+SurfingAttemptFailed:
+ ld hl, NoSurfingHereText
+
+ItemUseFailed:
+ xor a
+ ld [wActionResultOrTookBattleTurn], a ; item use failed
+ jp PrintText
+
+ItemUseNotTimeText:
+ text_far _ItemUseNotTimeText
+ text_end
+
+ItemUseNotYoursToUseText:
+ text_far _ItemUseNotYoursToUseText
+ text_end
+
+ItemUseNoEffectText:
+ text_far _ItemUseNoEffectText
+ text_end
+
+ThrowBallAtTrainerMonText1:
+ text_far _ThrowBallAtTrainerMonText1
+ text_end
+
+ThrowBallAtTrainerMonText2:
+ text_far _ThrowBallAtTrainerMonText2
+ text_end
+
+NoCyclingAllowedHereText:
+ text_far _NoCyclingAllowedHereText
+ text_end
+
+NoSurfingHereText:
+ text_far _NoSurfingHereText
+ text_end
+
+BoxFullCannotThrowBallText:
+ text_far _BoxFullCannotThrowBallText
+ text_end
+
+DontHavePokemonText:
+ text_far _DontHavePokemonText
+ text_end
+
+ItemUseText00:
+ text_far _ItemUseText001
+ text_low
+ text_far _ItemUseText002
+ text_end
+
+GotOnBicycleText:
+ text_far _GotOnBicycleText1
+ text_low
+ text_far _GotOnBicycleText2
+ text_end
+
+GotOffBicycleText:
+ text_far _GotOffBicycleText1
+ text_low
+ text_far _GotOffBicycleText2
+ text_end
+
+; restores bonus PP (from PP Ups) when healing at a pokemon center
+; also, when a PP Up is used, it increases the current PP by one PP Up bonus
+; INPUT:
+; [wWhichPokemon] = index of pokemon in party
+; [wCurrentMenuItem] = index of move (when using a PP Up)
+RestoreBonusPP:
+ ld hl, wPartyMon1Moves
+ 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, wPartyMon1PP - wPartyMon1Moves
+ ld b, 0
+ add hl, bc ; hl now points to move 1 PP
+ ld de, wNormalMaxPPList
+ ld b, 0 ; initialize move counter to zero
+; loop through the pokemon's moves
+.loop
+ inc b
+ ld a, b
+ cp 5 ; reached the end of the pokemon's moves?
+ ret z ; if so, return
+ 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
+ ld a, [wCurrentMenuItem]
+ inc a
+ cp b
+ jr nz, .nextMove
+.skipMenuItemIDCheck
+ ld a, [hl]
+ and %11000000 ; have any PP Ups been used?
+ call nz, AddBonusPP ; if so, add bonus PP
+.nextMove
+ inc hl
+ inc de
+ jr .loop
+
+; adds bonus PP from PP Ups to current PP
+; 1/5 of normal max PP (capped at 7) is added for each PP Up
+; INPUT:
+; [de] = normal max PP
+; [hl] = move PP
+AddBonusPP:
+ push bc
+ ld a, [de] ; normal max PP of move
+ ldh [hDividend + 3], a
+ xor a
+ ldh [hDividend], a
+ ldh [hDividend + 1], a
+ ldh [hDividend + 2], a
+ ld a, 5
+ ldh [hDivisor], a
+ ld b, 4
+ call Divide
+ ld a, [hl] ; move PP
+ ld b, a
+ swap a
+ and %00001111
+ srl a
+ srl a
+ ld c, a ; c = number of PP Ups used
+.loop
+ ldh a, [hQuotient + 3]
+ cp 8 ; is the amount greater than or equal to 8?
+ jr c, .addAmount
+ ld a, 7 ; cap the amount at 7
+.addAmount
+ add b
+ ld b, a
+ 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
+ ld [hl], b
+ pop bc
+ ret
+
+; gets max PP of a pokemon's move (including PP from PP Ups)
+; INPUT:
+; [wWhichPokemon] = index of pokemon within party/box
+; [wMonDataLocation] = pokemon source
+; 00: player's party
+; 01: enemy's party
+; 02: current box
+; 03: daycare
+; 04: player's in-battle pokemon
+; [wCurrentMenuItem] = move index
+; OUTPUT:
+; [wMaxPP] = max PP
+GetMaxPP:
+ ld a, [wMonDataLocation]
+ and a
+ ld hl, wPartyMon1Moves
+ ld bc, wPartyMon2 - wPartyMon1
+ jr z, .sourceWithMultipleMon
+ ld hl, wEnemyMon1Moves
+ dec a
+ jr z, .sourceWithMultipleMon
+ ld hl, wBoxMon1Moves
+ ld bc, wBoxMon2 - wBoxMon1
+ dec a
+ jr z, .sourceWithMultipleMon
+ ld hl, wDayCareMonMoves
+ dec a
+ jr z, .sourceWithOneMon
+ ld hl, wBattleMonMoves ; player's in-battle pokemon
+.sourceWithOneMon
+ call GetSelectedMoveOffset2
+ jr .next
+
+.sourceWithMultipleMon
+ call GetSelectedMoveOffset
+.next
+ ld a, [hl]
+ dec a
+ push hl
+ ld hl, Moves
+ ld bc, MoveEnd - Moves
+ call AddNTimes
+ ld de, wcd6d
+ ld a, BANK(Moves)
+ call FarCopyData
+ ld de, wcd6d + 5 ; PP is byte 5 of move data
+ ld a, [de]
+ ld b, a ; b = normal max PP
+ pop hl
+ push bc
+ ld bc, wPartyMon1PP - wPartyMon1Moves ; PP offset if not player's in-battle pokemon data
+ ld a, [wMonDataLocation]
+ cp 4 ; player's in-battle pokemon?
+ jr nz, .addPPOffset
+ ld bc, wBattleMonPP - wBattleMonMoves ; PP offset if player's in-battle pokemon data
+.addPPOffset
+ add hl, bc
+ ld a, [hl] ; a = current PP
+ and %11000000 ; get PP Up count
+ pop bc
+ or b ; place normal max PP in 6 lower bits of a
+ ld h, d
+ ld l, e
+ inc hl ; hl = wcd73
+ ld [hl], a
+ 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 %00111111 ; mask out the PP Up count
+ ld [wMaxPP], a ; store max PP
+ ret
+
+GetSelectedMoveOffset:
+ ld a, [wWhichPokemon]
+ call AddNTimes
+
+GetSelectedMoveOffset2:
+ ld a, [wCurrentMenuItem]
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ret
+
+; confirms the item toss and then tosses the item
+; INPUT:
+; hl = address of inventory (either wNumBagItems or wNumBoxItems)
+; [wcf91] = item ID
+; [wWhichPokemon] = index of item within inventory
+; [wItemQuantity] = quantity to toss
+; OUTPUT:
+; clears carry flag if the item is tossed, sets carry flag if not
+TossItem_::
+ push hl
+ ld a, [wcf91]
+ call IsItemHM
+ pop hl
+ jr c, .tooImportantToToss
+ push hl
+ call IsKeyItem_
+ ld a, [wIsKeyItem]
+ pop hl
+ and a
+ jr nz, .tooImportantToToss
+ push hl
+ ld a, [wcf91]
+ ld [wd11e], a
+ call GetItemName
+ call CopyStringToCF4B ; copy name to wcf4b
+ ld hl, IsItOKToTossItemText
+ call PrintText
+ hlcoord 14, 7
+ lb bc, 8, 15
+ ld a, TWO_OPTION_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID ; yes/no menu
+ ld a, [wMenuExitMethod]
+ cp CHOSE_SECOND_ITEM
+ pop hl
+ scf
+ ret z ; return if the player chose No
+; if the player chose Yes
+ push hl
+ ld a, [wWhichPokemon]
+ call RemoveItemFromInventory
+ ld a, [wcf91]
+ ld [wd11e], a
+ call GetItemName
+ call CopyStringToCF4B ; copy name to wcf4b
+ ld hl, ThrewAwayItemText
+ call PrintText
+ pop hl
+ and a
+ ret
+
+.tooImportantToToss
+ push hl
+ ld hl, TooImportantToTossText
+ call PrintText
+ pop hl
+ scf
+ ret
+
+ThrewAwayItemText:
+ text_far _ThrewAwayItemText
+ text_end
+
+IsItOKToTossItemText:
+ text_far _IsItOKToTossItemText
+ text_end
+
+TooImportantToTossText:
+ text_far _TooImportantToTossText
+ text_end
+
+; checks if an item is a key item
+; INPUT:
+; [wcf91] = item ID
+; OUTPUT:
+; [wIsKeyItem] = result
+; 00: item is not key item
+; 01: item is key item
+IsKeyItem_::
+ ld a, $01
+ ld [wIsKeyItem], a
+ ld a, [wcf91]
+ cp HM01 ; is the item an HM or TM?
+ jr nc, .checkIfItemIsHM
+; if the item is not an HM or TM
+ push af
+ ld hl, KeyItemBitfield
+ ld de, wBuffer
+ ld bc, 15 ; only 11 bytes are actually used
+ call CopyData
+ pop af
+ dec a
+ ld c, a
+ ld hl, wBuffer
+ ld b, FLAG_TEST
+ predef FlagActionPredef
+ ld a, c
+ and a
+ ret nz
+.checkIfItemIsHM
+ ld a, [wcf91]
+ call IsItemHM
+ ret c
+ xor a
+ ld [wIsKeyItem], a
+ ret
+
+INCLUDE "data/items/key_items.asm"
+
+SendNewMonToBox:
+ ld de, wNumInBox
+ ld a, [de]
+ inc a
+ ld [de], a
+ ld a, [wcf91]
+ ld [wd0b5], a
+ ld c, a
+.asm_e6f5
+ inc de
+ ld a, [de]
+ ld b, a
+ ld a, c
+ ld c, b
+ ld [de], a
+ cp $ff
+ jr nz, .asm_e6f5
+ call GetMonHeader
+ ld hl, wBoxMonOT
+ ld bc, NAME_LENGTH
+ ld a, [wNumInBox]
+ dec a
+ jr z, .asm_e732
+ dec a
+ call AddNTimes
+ push hl
+ ld bc, NAME_LENGTH
+ add hl, bc
+ ld d, h
+ ld e, l
+ pop hl
+ ld a, [wNumInBox]
+ dec a
+ ld b, a
+.asm_e71f
+ push bc
+ push hl
+ ld bc, NAME_LENGTH
+ call CopyData
+ pop hl
+ ld d, h
+ ld e, l
+ ld bc, -NAME_LENGTH
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .asm_e71f
+.asm_e732
+ ld hl, wPlayerName
+ ld de, wBoxMonOT
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld a, [wNumInBox]
+ dec a
+ jr z, .asm_e76e
+ ld hl, wBoxMonNicks
+ ld bc, NAME_LENGTH
+ dec a
+ call AddNTimes
+ push hl
+ ld bc, NAME_LENGTH
+ add hl, bc
+ ld d, h
+ ld e, l
+ pop hl
+ ld a, [wNumInBox]
+ dec a
+ ld b, a
+.asm_e75b
+ push bc
+ push hl
+ ld bc, NAME_LENGTH
+ call CopyData
+ pop hl
+ ld d, h
+ ld e, l
+ ld bc, -NAME_LENGTH
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .asm_e75b
+.asm_e76e
+ ld hl, wBoxMonNicks
+ ld a, NAME_MON_SCREEN
+ ld [wNamingScreenType], a
+ predef AskName
+ ld a, [wNumInBox]
+ dec a
+ jr z, .asm_e7ab
+ ld hl, wBoxMons
+ ld bc, wBoxMon2 - wBoxMon1
+ dec a
+ call AddNTimes
+ push hl
+ ld bc, wBoxMon2 - wBoxMon1
+ add hl, bc
+ ld d, h
+ ld e, l
+ pop hl
+ ld a, [wNumInBox]
+ dec a
+ ld b, a
+.asm_e798
+ push bc
+ push hl
+ ld bc, wBoxMon2 - wBoxMon1
+ call CopyData
+ pop hl
+ ld d, h
+ ld e, l
+ ld bc, wBoxMon1 - wBoxMon2
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .asm_e798
+.asm_e7ab
+ ld a, [wEnemyMonLevel]
+ ld [wEnemyMonBoxLevel], a
+ ld hl, wEnemyMon
+ ld de, wBoxMon1
+ ld bc, wEnemyMonDVs - wEnemyMon
+ call CopyData
+ ld hl, wPlayerID
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hl]
+ ld [de], a
+ inc de
+ push de
+ ld a, [wCurEnemyLVL]
+ ld d, a
+ callfar CalcExperience
+ pop de
+ ldh a, [hExperience]
+ ld [de], a
+ inc de
+ ldh a, [hExperience + 1]
+ ld [de], a
+ inc de
+ ldh a, [hExperience + 2]
+ ld [de], a
+ inc de
+ xor a
+ ld b, NUM_STATS * 2
+.asm_e7e3
+ ld [de], a
+ inc de
+ dec b
+ jr nz, .asm_e7e3
+ ld hl, wEnemyMonDVs
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ ld hl, wEnemyMonPP
+ ld b, NUM_MOVES
+.asm_e7f5
+ ld a, [hli]
+ inc de
+ ld [de], a
+ dec b
+ jr nz, .asm_e7f5
+ ld a, [wcf91]
+ cp KADABRA
+ jr nz, .notKadabra
+ ld a, $60 ; twistedspoon in gsc
+ ld [wBoxMon1CatchRate], a
+.notKadabra
+ ret
+
+; checks if the tile in front of the player is a shore or water tile
+; used for surfing and fishing
+; unsets carry if it is, sets carry if not
+IsNextTileShoreOrWater::
+ ld a, [wCurMapTileset]
+ ld hl, WaterTilesets
+ ld de, 1
+ call IsInArray ; does the current map allow surfing?
+ ret nc ; if not, return
+ ld hl, WaterTile
+ ld a, [wCurMapTileset]
+ cp SHIP_PORT ; Vermilion Dock tileset
+ jr z, .skipShoreTiles ; if it's the Vermilion Dock tileset
+ cp GYM ; eastern shore tile in Safari Zone
+ jr z, .skipShoreTiles
+ cp DOJO ; usual eastern shore tile
+ jr z, .skipShoreTiles
+ ld hl, ShoreTiles
+.skipShoreTiles
+ ld a, [wTileInFrontOfPlayer]
+ ld de, $1
+ call IsInArray
+ ret
+
+INCLUDE "data/tilesets/water_tilesets.asm"
+
+; shore tiles
+ShoreTiles:
+ db $48, $32
+WaterTile:
+ db $14
+ db $ff ; terminator
+
+; reloads map view and processes sprite data
+; for items that cause the overworld to be displayed
+ItemUseReloadOverworldData:
+ call LoadCurrentMapView
+ jp UpdateSprites
+
+; creates a list at wBuffer of maps where the mon in [wd11e] can be found.
+; this is used by the pokedex to display locations the mon can be found on the map.
+FindWildLocationsOfMon:
+ ld hl, WildDataPointers
+ ld de, wBuffer
+ ld c, $0
+.loop
+ inc hl
+ ld a, [hld]
+ inc a
+ jr z, .done
+ push hl
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [hli]
+ and a
+ call nz, CheckMapForMon ; land
+ ld a, [hli]
+ and a
+ call nz, CheckMapForMon ; water
+ pop hl
+ inc hl
+ inc hl
+ inc c
+ jr .loop
+.done
+ ld a, $ff ; list terminator
+ ld [de], a
+ ret
+
+CheckMapForMon:
+ inc hl
+ ld b, $a
+.loop
+ ld a, [wd11e]
+ cp [hl]
+ jr nz, .nextEntry
+ ld a, c
+ ld [de], a
+ inc de
+.nextEntry
+ inc hl
+ inc hl
+ dec b
+ jr nz, .loop
+ dec hl
+ ret
diff --git a/engine/items/items.asm b/engine/items/items.asm
deleted file mode 100755
index e935f292..00000000
--- a/engine/items/items.asm
+++ /dev/null
@@ -1,3235 +0,0 @@
-UseItem_:
- ld a, 1
- ld [wActionResultOrTookBattleTurn], a ; initialise to success value
- ld a, [wcf91] ;contains item_ID
- cp HM_01
- jp nc, ItemUseTMHM
- ld hl, ItemUsePtrTable
- dec a
- add a
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-ItemUsePtrTable:
- dw ItemUseBall ; MASTER_BALL
- dw ItemUseBall ; ULTRA_BALL
- dw ItemUseBall ; GREAT_BALL
- dw ItemUseBall ; POKE_BALL
- dw ItemUseTownMap ; TOWN_MAP
- dw ItemUseBicycle ; BICYCLE
- dw ItemUseSurfboard ; out-of-battle Surf effect
- dw ItemUseBall ; SAFARI_BALL
- dw ItemUsePokedex ; POKEDEX
- dw ItemUseEvoStone ; MOON_STONE
- dw ItemUseMedicine ; ANTIDOTE
- dw ItemUseMedicine ; BURN_HEAL
- dw ItemUseMedicine ; ICE_HEAL
- dw ItemUseMedicine ; AWAKENING
- dw ItemUseMedicine ; PARLYZ_HEAL
- dw ItemUseMedicine ; FULL_RESTORE
- dw ItemUseMedicine ; MAX_POTION
- dw ItemUseMedicine ; HYPER_POTION
- dw ItemUseMedicine ; SUPER_POTION
- dw ItemUseMedicine ; POTION
- dw ItemUseBait ; BOULDERBADGE
- dw ItemUseRock ; CASCADEBADGE
- dw UnusableItem ; THUNDERBADGE
- dw UnusableItem ; RAINBOWBADGE
- dw UnusableItem ; SOULBADGE
- dw UnusableItem ; MARSHBADGE
- dw UnusableItem ; VOLCANOBADGE
- dw UnusableItem ; EARTHBADGE
- dw ItemUseEscapeRope ; ESCAPE_ROPE
- dw ItemUseRepel ; REPEL
- dw UnusableItem ; OLD_AMBER
- dw ItemUseEvoStone ; FIRE_STONE
- dw ItemUseEvoStone ; THUNDER_STONE
- dw ItemUseEvoStone ; WATER_STONE
- dw ItemUseVitamin ; HP_UP
- dw ItemUseVitamin ; PROTEIN
- dw ItemUseVitamin ; IRON
- dw ItemUseVitamin ; CARBOS
- dw ItemUseVitamin ; CALCIUM
- dw ItemUseVitamin ; RARE_CANDY
- dw UnusableItem ; DOME_FOSSIL
- dw UnusableItem ; HELIX_FOSSIL
- dw UnusableItem ; SECRET_KEY
- dw UnusableItem
- dw UnusableItem ; BIKE_VOUCHER
- dw ItemUseXAccuracy ; X_ACCURACY
- dw ItemUseEvoStone ; LEAF_STONE
- dw ItemUseCardKey ; CARD_KEY
- dw UnusableItem ; NUGGET
- dw UnusableItem ; ??? PP_UP
- dw ItemUsePokedoll ; POKE_DOLL
- dw ItemUseMedicine ; FULL_HEAL
- dw ItemUseMedicine ; REVIVE
- dw ItemUseMedicine ; MAX_REVIVE
- dw ItemUseGuardSpec ; GUARD_SPEC
- dw ItemUseSuperRepel ; SUPER_REPL
- dw ItemUseMaxRepel ; MAX_REPEL
- dw ItemUseDireHit ; DIRE_HIT
- dw UnusableItem ; COIN
- dw ItemUseMedicine ; FRESH_WATER
- dw ItemUseMedicine ; SODA_POP
- dw ItemUseMedicine ; LEMONADE
- dw UnusableItem ; S_S_TICKET
- dw UnusableItem ; GOLD_TEETH
- dw ItemUseXStat ; X_ATTACK
- dw ItemUseXStat ; X_DEFEND
- dw ItemUseXStat ; X_SPEED
- dw ItemUseXStat ; X_SPECIAL
- dw ItemUseCoinCase ; COIN_CASE
- dw ItemUseOaksParcel ; OAKS_PARCEL
- dw ItemUseItemfinder ; ITEMFINDER
- dw UnusableItem ; SILPH_SCOPE
- dw ItemUsePokeflute ; POKE_FLUTE
- dw UnusableItem ; LIFT_KEY
- dw UnusableItem ; EXP_ALL
- dw ItemUseOldRod ; OLD_ROD
- dw ItemUseGoodRod ; GOOD_ROD
- dw ItemUseSuperRod ; SUPER_ROD
- dw ItemUsePPUp ; PP_UP (real one)
- dw ItemUsePPRestore ; ETHER
- dw ItemUsePPRestore ; MAX_ETHER
- dw ItemUsePPRestore ; ELIXER
- dw ItemUsePPRestore ; MAX_ELIXER
-
-ItemUseBall:
-
-; Balls can't be used out of battle.
- ld a, [wIsInBattle]
- and a
- jp z, ItemUseNotTime
-
-; Balls can't catch trainers' Pokémon.
- dec a
- jp nz, ThrowBallAtTrainerMon
-
-; If this is for the old man battle, skip checking if the party & box are full.
- ld a, [wBattleType]
- cp BATTLE_TYPE_OLD_MAN
- jr z, .canUseBall
- cp BATTLE_TYPE_PIKACHU
- jr z, .canUseBall
-
- ld a, [wPartyCount] ; is party full?
- cp PARTY_LENGTH
- jr nz, .canUseBall
- ld a, [wNumInBox] ; is box full?
- cp MONS_PER_BOX
- jp z, BoxFullCannotThrowBall
-
-.canUseBall
- xor a
- ld [wCapturedMonSpecies], a
-
- ld a, [wBattleType]
- cp BATTLE_TYPE_SAFARI
- jr nz, .skipSafariZoneCode
-
-.safariZone
- ld hl, wNumSafariBalls
- dec [hl] ; remove a Safari Ball
-
-.skipSafariZoneCode
- 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 ; can't be caught value
- jp z, .setAnimData
-
- ld a, [wBattleType]
- cp BATTLE_TYPE_OLD_MAN
- jr z, .oldManBattle
- cp BATTLE_TYPE_PIKACHU
- jr z, .oldManBattle ; pikachu battle technically old man battle
- jr .notOldManBattle
-
-.oldManBattle
- ld hl, wGrassRate
- ld de, wPlayerName
- ld bc, NAME_LENGTH
- call CopyData ; save the player's name in the Wild Monster data (part of the Cinnabar Island Missingno. glitch)
- ld a, [wBattleType]
- cp BATTLE_TYPE_OLD_MAN
- jp nz,.captured
- ld a,$1
- ld [wCapturedMonSpecies], a
- CheckEvent EVENT_02F
- ld b, $63
- jp nz,.setAnimData
- jp .captured
-.notOldManBattle
-; 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 POKEMON_TOWER_6F
- jr nz, .loop
- ld a, [wEnemyMonSpecies2]
- cp RESTLESS_SOUL
- 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 MASTER_BALL
- jp z, .captured
-
-; Anything will do for the basic Poké Ball.
- cp 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
-
-; Less than or equal to 200 is good enough for a Great Ball.
- ld a, [hl]
- cp GREAT_BALL
- jr z, .checkForAilments
-
-; If it's an Ultra/Safari Ball and Rand1 is greater than 150, try again.
- ld a, 150
- cp b
- jr c, .loop
-
-.checkForAilments
-; 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, .skipAilmentValueSubtraction ; no ailments
- and 1 << FRZ | SLP
- ld c, 12
- jr z, .notFrozenOrAsleep
- ld c, 25
-.notFrozenOrAsleep
- ld a, b
- sub c
- jp c, .captured
- ld b, a
-
-.skipAilmentValueSubtraction
- push bc ; save (Rand1 - Status)
-
-; Calculate MaxHP * 255.
- xor a
- ld [H_MULTIPLICAND], a
- ld hl, wEnemyMonMaxHP
- ld a, [hli]
- ld [H_MULTIPLICAND + 1], a
- ld a, [hl]
- ld [H_MULTIPLICAND + 2], a
- ld a, 255
- ld [H_MULTIPLIER], a
- call Multiply
-
-; Determine BallFactor. It's 8 for Great Balls and 12 for the others.
- ld a, [wcf91]
- cp GREAT_BALL
- ld a, 12
- jr nz, .skip1
- ld a, 8
-
-.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
- 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]
- srl b
- rr a
- srl b
- rr a
- and a
- jr nz, .skip2
- inc a
-
-.skip2
-
-; Let W = ((MaxHP * 255) / BallFactor) / max(HP / 4, 1). Calculate W.
- ld [H_DIVISOR], a
- ld b, 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, .skip3
- ld a, 255
- ld [H_QUOTIENT + 3], a
-
-.skip3
- pop bc ; b = Rand1 - Status
-
-; If Rand1 - Status > CatchRate, the ball fails to capture the Pokémon.
- ld a, [wEnemyMonActualCatchRate]
- cp b
- jr c, .failedToCapture
-
-; If W > 255, the ball captures the Pokémon.
- ld a, [H_QUOTIENT + 2]
- and a
- 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, .failedToCapture
-
-.captured
- jr .skipShakeCalculations
-
-.failedToCapture
- ld a, [H_QUOTIENT + 3]
- ld [wPokeBallCaptureCalcTemp], a ; Save X.
-
-; Calculate CatchRate * 100.
- xor a
- ld [H_MULTIPLICAND], a
- ld [H_MULTIPLICAND + 1], a
- ld a, [wEnemyMonActualCatchRate]
- ld [H_MULTIPLICAND + 2], a
- ld a, 100
- ld [H_MULTIPLIER], a
- call Multiply
-
-; Determine BallFactor2.
-; Poké Ball: BallFactor2 = 255
-; Great Ball: BallFactor2 = 200
-; Ultra/Safari Ball: BallFactor2 = 150
- ld a, [wcf91]
- ld b, 255
- cp POKE_BALL
- jr z, .skip4
- ld b, 200
- cp GREAT_BALL
- jr z, .skip4
- ld b, 150
- cp ULTRA_BALL
- 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 ; 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
-
-; Determine Status2.
-; no status ailment: Status2 = 0
-; Burn/Paralysis/Poison: Status2 = 5
-; Freeze/Sleep: Status2 = 10
- ld a, [wEnemyMonStatus]
- and a
- jr z, .skip5
- and 1 << FRZ | SLP
- ld b, 5
- jr z, .addAilmentValue
- ld b, 10
-
-.addAilmentValue
-; If the Pokémon has a status ailment, add Status2.
- ld a, [H_QUOTIENT + 3]
- add b
- ld [H_QUOTIENT + 3], a
-
-.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 10
- ld b, $20
- jr c, .setAnimData
- cp 30
- ld b, $61
- jr c, .setAnimData
- cp 70
- ld b, $62
- jr c, .setAnimData
- ld b, $63
-
-.setAnimData
- ld a, b
- ld [wPokeBallAnimData], a
-
-.skipShakeCalculations
- ld c, 20
- call DelayFrames
-
-; Do the animation.
- ld a, TOSS_ANIM
- ld [wAnimationID], a
- xor a
- ld [H_WHOSETURN], a
- ld [wAnimationType], a
- ld [wDamageMultipliers], a
- ld a, [wWhichPokemon]
- push af
- ld a, [wcf91]
- push af
- predef MoveAnimation
- pop af
- ld [wcf91], a
- pop af
- ld [wWhichPokemon], a
-
-; Determine the message to display from the animation.
- ld a, [wPokeBallAnimData]
- cp $10
- ld hl, ItemUseBallText00
- jp z, .printMessage
- cp $20
- ld hl, ItemUseBallText01
- jp z, .printMessage
- cp $61
- ld hl, ItemUseBallText02
- jp z, .printMessage
- cp $62
- ld hl, ItemUseBallText03
- jp z, .printMessage
- cp $63
- ld hl, ItemUseBallText04
- jp z, .printMessage
-
-; Save current HP.
- ld hl, wEnemyMonHP
- ld a, [hli]
- push af
- ld a, [hli]
- push af
-
-; Save status ailment.
- inc hl
- ld a, [hl]
- push af
-
- push hl
-
-; 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, .notTransformed
- ld a, DITTO
- ld [wEnemyMonSpecies2], a
- 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, wTransformedEnemyMonOriginalDVs
- ld a, [wEnemyMonDVs]
- ld [hli], a
- ld a, [wEnemyMonDVs + 1]
- ld [hl], a
-
-.skip6
- ld a, [wcf91]
- push af
- ld a, [wEnemyMonSpecies2]
- ld [wcf91], a
- ld a, [wEnemyMonLevel]
- ld [wCurEnemyLVL], a
- callab LoadEnemyMonData
- pop af
- ld [wcf91], a
- pop hl
- pop af
- ld [hld], a
- dec hl
- pop af
- ld [hld], a
- pop af
- ld [hl], a
- ld a, [wEnemyMonSpecies]
- ld [wCapturedMonSpecies], a
- ld [wcf91], a
- ld [wd11e], a
- ld a, [wBattleType]
- cp BATTLE_TYPE_OLD_MAN ; is this the old man battle?
- jp z, .oldManCaughtMon ; if so, don't give the player the caught Pokémon
- cp BATTLE_TYPE_PIKACHU
- jr z, .oldManCaughtMon ; same with Pikachu battle
- ld hl, ItemUseBallText05
- call PrintText
-
-; Add the caught Pokémon to the Pokédex.
- predef IndexToPokedex
- ld a, [wd11e]
- dec a
- ld c, a
- ld b, FLAG_TEST
- ld hl, wPokedexOwned
- predef FlagActionPredef
- ld a, c
- push af
- ld a, [wd11e]
- dec a
- ld c, a
- ld b, FLAG_SET
- predef FlagActionPredef
- pop af
-
- 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]
- ld [wd11e], a
- predef ShowPokedexData
-
-.skipShowingPokedexData
- ld a, $1
- ld [wd49c], a
- ld a, $85
- ld [wPikachuMood], a
- ld a, [wPartyCount]
- cp PARTY_LENGTH ; is party full?
- jr z, .sendToBox
- xor a ; PLAYER_PARTY_DATA
- ld [wMonDataLocation], a
- call ClearSprites
- ld hl, .emptyString
- call PrintText
- call AddPartyMon
- jr .done
-
-.sendToBox
- call ClearSprites
- call SendNewMonToBox
- ld hl, ItemUseBallText07
- CheckEvent EVENT_MET_BILL
- jr nz, .printTransferredToPCText
- ld hl, ItemUseBallText08
-.printTransferredToPCText
- call PrintText
- jr .done
-
-.oldManCaughtMon
- ld hl, ItemUseBallText05
-
-.printMessage
- call PrintText
- call ClearSprites
-
-.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
-
-.emptyString
- db "@"
-
-ItemUseBallText00:
-;"It dodged the thrown ball!"
-;"This pokemon can't be caught"
- TX_FAR _ItemUseBallText00
- db "@"
-ItemUseBallText01:
-;"You missed the pokemon!"
- TX_FAR _ItemUseBallText01
- db "@"
-ItemUseBallText02:
-;"Darn! The pokemon broke free!"
- TX_FAR _ItemUseBallText02
- db "@"
-ItemUseBallText03:
-;"Aww! It appeared to be caught!"
- TX_FAR _ItemUseBallText03
- db "@"
-ItemUseBallText04:
-;"Shoot! It was so close too!"
- TX_FAR _ItemUseBallText04
- db "@"
-ItemUseBallText05:
-;"All right! {MonName} was caught!"
-;play sound
- TX_FAR _ItemUseBallText05
- TX_SFX_CAUGHT_MON
- TX_BLINK
- db "@"
-ItemUseBallText07:
-;"X was transferred to Bill's PC"
- TX_FAR _ItemUseBallText07
- db "@"
-ItemUseBallText08:
-;"X was transferred to someone's PC"
- TX_FAR _ItemUseBallText08
- db "@"
-
-ItemUseBallText06:
-;"New DEX data will be added..."
-;play sound
- TX_FAR _ItemUseBallText06
- TX_SFX_DEX_PAGE_ADDED
- TX_BLINK
- db "@"
-
-ItemUseTownMap:
- ld a, [wIsInBattle]
- and a
- jp nz, ItemUseNotTime
- jpba DisplayTownMap
-
-ItemUseBicycle:
- ld a, [wIsInBattle]
- and a
- jp nz, ItemUseNotTime
- ld a, [wWalkBikeSurfState]
- ld [wWalkBikeSurfStateCopy], a
- cp 2 ; is the player surfing?
- jp z, ItemUseNotTime
- dec a ; is player already bicycling?
- jr nz, .tryToGetOnBike
-.getOffBike
- call ItemUseReloadOverworldData
- xor a
- ld [wWalkBikeSurfState], a ; change player state to walking
- ld a, $00
- ld [wPikachuSpawnState], a
- call PlayDefaultMusic ; play walking music
- ld hl, GotOffBicycleText
- jp PrintText
-
-.tryToGetOnBike
- call IsBikeRidingAllowed
- jp nc, NoCyclingAllowedHere
- call ItemUseReloadOverworldData
- xor a ; no keys pressed
- ld [hJoyHeld], a ; current joypad state
- ld a, $1
- ld [wWalkBikeSurfState], a ; change player state to bicycling
- call PlayDefaultMusic ; play bike riding music
- xor a
- ld [wWalkBikeSurfState], a
- ld hl, GotOnBicycleText
- call PrintText
- ld a, $1
- ld [wWalkBikeSurfState], a
- ret
-
-; used for Surf out-of-battle effect
-ItemUseSurfboard:
- ld a, [wWalkBikeSurfState]
- ld [wWalkBikeSurfStateCopy], a
- cp 2 ; is the player already surfing?
- jr z, .tryToStopSurfing
-.tryToSurf
- call IsNextTileShoreOrWater
- jp nc, SurfingAttemptFailed
- ld hl, TilePairCollisionsWater
- call CheckForTilePairCollisions
- jp c, SurfingAttemptFailed
-.surf
- call .makePlayerMoveForward
- ld hl, wd730
- set 7, [hl]
- ld a, 2
- ld [wWalkBikeSurfState], a ; change player state to surfing
- call PlayDefaultMusic ; play surfing music
- ld hl, SurfingGotOnText
- jp PrintText
-
-.tryToStopSurfing
- xor a
- ld [hSpriteIndexOrTextID], a
- ld d, 16 ; talking range in pixels (normal range)
- call IsSpriteInFrontOfPlayer2
- res 7, [hl]
- ld a, [hSpriteIndexOrTextID]
- and a ; is there a sprite in the way?
- jr nz, .cannotStopSurfing
- ld hl, TilePairCollisionsWater
- call CheckForTilePairCollisions
- jr c, .cannotStopSurfing
- ld a, [wTileInFrontOfPlayer]
- ld c, a
- call IsTilePassable
- jr nc, .stopSurfing
-.cannotStopSurfing
- ld hl, SurfingNoPlaceToGetOffText
- jp PrintText
-
-.stopSurfing
- call .makePlayerMoveForward
- ld a, $3
- ld [wPikachuSpawnState], a
- ld hl, wPikachuOverworldStateFlags
- set 5, [hl]
- ld hl, wd730
- set 7, [hl]
- xor a
- ld [wWalkBikeSurfState], a ; change player state to walking
- dec a
- ld [wJoyIgnore], a
- call PlayDefaultMusic ; play walking music
- call GBPalWhiteOutWithDelay3
- jp LoadWalkingPlayerSpriteGraphics
-
-; uses a simulated button press to make the player move forward
-.makePlayerMoveForward
- ld a, [wPlayerDirection] ; direction the player is going
- bit PLAYER_DIR_BIT_UP, a
- ld b, D_UP
- jr nz, .storeSimulatedButtonPress
- bit PLAYER_DIR_BIT_DOWN, a
- ld b, D_DOWN
- jr nz, .storeSimulatedButtonPress
- bit PLAYER_DIR_BIT_LEFT, a
- ld b, D_LEFT
- jr nz, .storeSimulatedButtonPress
- ld b, D_RIGHT
-.storeSimulatedButtonPress
- ld a, b
- ld [wSimulatedJoypadStatesEnd], a
- xor a
- ld [wWastedByteCD39], a
- inc a
- ld [wSimulatedJoypadStatesIndex], a
- ret
-
-SurfingGotOnText:
- TX_FAR _SurfingGotOnText
- db "@"
-
-SurfingNoPlaceToGetOffText:
- TX_FAR _SurfingNoPlaceToGetOffText
- db "@"
-
-ItemUsePokedex:
- predef_jump ShowPokedexMenu
-
-ItemUseEvoStone:
- ld a, [wIsInBattle]
- and a
- jp nz, ItemUseNotTime
- ld a, [wWhichPokemon]
- push af
- ld a, [wcf91]
- ld [wEvoStoneItemID], a
- push af
- ld a, EVO_STONE_PARTY_MENU
- ld [wPartyMenuTypeOrMessageID], a
- ld a, $ff
- ld [wUpdateSpritesEnabled], a
- call DisplayPartyMenu
- ld a, [wcf91]
- ld [wLoadedMon], a
- pop bc
- jr c, .canceledItemUse
- ld a, b
- ld [wcf91], a
- call Func_d85d
- jr nc, .noEffect
- callab IsThisPartymonStarterPikachu_Party
- jr nc, .notPlayerPikachu
- ld e, $1b
- callab PlayPikachuSoundClip
- ld a, [wWhichPokemon]
- ld hl, wPartyMonNicks
- call GetPartyMonName
- ld hl, RefusingText
- call PrintText
- ld a, $4
- ld [wd49c], a
- ld a, $82
- ld [wPikachuMood], a
- jr .canceledItemUse
-
-.notPlayerPikachu
- ld a, SFX_HEAL_AILMENT
- call PlaySoundWaitForCurrent
- call WaitForSoundToFinish
- ld a, $01
- ld [wForceEvolution], a
- callab TryEvolvingMon ; try to evolve pokemon
- pop af
- ld [wWhichPokemon], a
- ld hl, wNumBagItems
- ld a, 1 ; remove 1 stone
- ld [wItemQuantity], a
- jp RemoveItemFromInventory
-
-.noEffect
- call ItemUseNoEffect
-.canceledItemUse
- xor a
- ld [wActionResultOrTookBattleTurn], a ; item not used
- pop af
- ret
-
-Func_d85d:
- ld hl, EvosMovesPointerTable
- ld a, [wLoadedMon]
- dec a
- ld c, a
- ld b, $0
- add hl, bc
- add hl, bc
- ld de, wcd6d
- ld a, BANK(TryEvolvingMon)
- ld bc, $2
- call FarCopyData
- ld hl, wcd6d
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, wcd6d
- ld a, BANK(TryEvolvingMon)
- ld bc, 13
- call FarCopyData
- ld hl, wcd6d
-.loop
- ld a, [hli]
- and a
- jr z, .cannotEvolveWithUsedStone
- inc hl
- inc hl
- cp EV_ITEM
- jr nz, .loop
- dec hl
- dec hl
- ld b, [hl]
- ld a, [wcf91]
- inc hl
- inc hl
- inc hl
- cp b
- jr nz, .loop
- scf
- ret
-
-.cannotEvolveWithUsedStone
- and a
- ret
-
-RefusingText:
- TX_FAR _RefusingText
- db "@"
-
-ItemUseVitamin:
- ld a, [wIsInBattle]
- and a
- jp nz, ItemUseNotTime
-
-ItemUseMedicine:
- ld a, [wPartyCount]
- and a
- jp z, Func_e4bf
- ld a, [wWhichPokemon]
- push af
- ld a, [wcf91]
- push af
- ld a, USE_ITEM_PARTY_MENU
- ld [wPartyMenuTypeOrMessageID], a
- ld a, $ff
- ld [wUpdateSpritesEnabled], a
- ld a, [wPseudoItemID]
- and a ; using Softboiled?
- jr z, .notUsingSoftboiled
-; if using softboiled
- call GoBackToPartyMenu
- jr .getPartyMonDataAddress
-.notUsingSoftboiled
- call DisplayPartyMenu
-.getPartyMonDataAddress
- jp c, .canceledItemUse
- ld hl, wPartyMons
- ld bc, wPartyMon2 - wPartyMon1
- ld a, [wWhichPokemon]
- call AddNTimes
- ld a, [wWhichPokemon]
- ld [wUsedItemOnWhichPokemon], a
- ld d, a
- ld a, [wcf91]
- ld e, a
- ld [wd0b5], a
- pop af
- push af
- cp $28
- jr nc, .asm_d906
- push hl
- push de
- callabd_ModifyPikachuHappiness PIKAHAPPY_USEDITEM
- pop de
- pop hl
-.asm_d906
- pop af
- ld [wcf91], a
- pop af
- ld [wWhichPokemon], a
- ld a, [wPseudoItemID]
- and a ; using Softboiled?
- jr z, .checkItemType
-; if using softboiled
- ld a, [wWhichPokemon]
- cp d ; is the pokemon trying to use softboiled on itself?
- jr z, ItemUseMedicine ; if so, force another choice
-.checkItemType
- ld a, [wcf91]
- cp REVIVE
- jr nc, .healHP ; if it's a Revive or Max Revive
- cp FULL_HEAL
- jr z, .cureStatusAilment ; if it's a Full Heal
- cp HP_UP
- jp nc, .useVitamin ; if it's a vitamin or Rare Candy
- cp FULL_RESTORE
- jr nc, .healHP ; if it's a Full Restore or one of the potions
-; fall through if it's one of the status-specific healing items
-.cureStatusAilment
- ld bc, wPartyMon1Status - wPartyMon1
- add hl, bc ; hl now points to status
- ld a, [wcf91]
- lb bc, ANTIDOTE_MSG, 1 << PSN
- cp ANTIDOTE
- jr z, .checkMonStatus
- lb bc, BURN_HEAL_MSG, 1 << BRN
- cp BURN_HEAL
- jr z, .checkMonStatus
- lb bc, ICE_HEAL_MSG, 1 << FRZ
- cp ICE_HEAL
- jr z, .checkMonStatus
- lb bc, AWAKENING_MSG, SLP
- cp AWAKENING
- jr z, .checkMonStatus
- lb bc, PARALYZ_HEAL_MSG, 1 << PAR
- cp PARLYZ_HEAL
- jr z, .checkMonStatus
- lb bc, FULL_HEAL_MSG, $ff ; Full Heal
-.checkMonStatus
- ld a, [hl] ; pokemon's status
- and c ; does the pokemon have a status ailment the item can cure?
- jp z, .healingItemNoEffect
-; if the pokemon has a status the item can heal
- xor a
- ld [hl], a ; remove the status ailment in the party data
- ld a, b
- ld [wPartyMenuTypeOrMessageID], a ; the message to display for the item used
- ld a, [wPlayerMonNumber]
- cp d ; is pokemon the item was used on active in battle?
- jp nz, .doneHealing
-; if it is active in battle
- xor a
- ld [wBattleMonStatus], a ; remove the status ailment in the in-battle pokemon data
- push hl
- ld hl, wPlayerBattleStatus3
- res BADLY_POISONED, [hl] ; heal Toxic status
- pop hl
- ld bc, wPartyMon1Stats - wPartyMon1Status
- add hl, bc ; hl now points to party stats
- ld de, wBattleMonStats
- ld bc, NUM_STATS * 2
- call CopyData ; copy party stats to in-battle stat data
- predef DoubleOrHalveSelectedStats
- jp .doneHealing
-
-.healHP
- inc hl ; hl = address of current HP
- ld a, [hli]
- ld b, a
- ld [wHPBarOldHP+1], a
- ld a, [hl]
- ld c, a
- ld [wHPBarOldHP], a ; current HP stored at wHPBarOldHP (2 bytes, big-endian)
- or b
- jr nz, .notFainted
-.fainted
- ld a, [wcf91]
- cp REVIVE
- jr z, .updateInBattleFaintedData
- cp MAX_REVIVE
- jr z, .updateInBattleFaintedData
- jp .healingItemNoEffect
-
-.updateInBattleFaintedData
- ld a, [wWhichPokemon]
- push af
- ld a, [wUsedItemOnWhichPokemon]
- ld [wWhichPokemon], a
- push hl
- push de
- push bc
- callab Func_2fd6a
- pop bc
- pop de
- pop hl
- pop af
- ld [wWhichPokemon], a
-
- ld a, [wIsInBattle]
- and a
- jr z, .compareCurrentHPToMaxHP
- push hl
- push de
- push bc
- ld a, [wUsedItemOnWhichPokemon]
- ld c, a
- ld hl, wPartyFoughtCurrentEnemyFlags
- ld b, FLAG_TEST
- predef FlagActionPredef
- ld a, c
- and a
- jr z, .next
- ld a, [wUsedItemOnWhichPokemon]
- ld c, a
- ld hl, wPartyGainExpFlags
- ld b, FLAG_SET
- predef FlagActionPredef
-.next
- pop bc
- pop de
- pop hl
- jr .compareCurrentHPToMaxHP
-
-.notFainted
- ld a, [wcf91]
- cp REVIVE
- jp z, .healingItemNoEffect
- cp MAX_REVIVE
- jp z, .healingItemNoEffect
-.compareCurrentHPToMaxHP
- push hl
- push bc
- ld bc, wPartyMon1MaxHP - (wPartyMon1HP + 1)
- add hl, bc ; hl now points to max HP
- pop bc
- ld a, [hli]
- cp b
- jr nz, .skipComparingLSB ; no need to compare the LSB's if the MSB's don't match
- ld a, [hl]
- cp c
-.skipComparingLSB
- pop hl
- jr nz, .notFullHP
-.fullHP ; if the pokemon's current HP equals its max HP
- ld a, [wcf91]
- cp FULL_RESTORE
- jp nz, .healingItemNoEffect
- inc hl
- inc hl
- ld a, [hld] ; status ailment
- and a ; does the pokemon have a status ailment?
- jp z, .healingItemNoEffect
- ld a, FULL_HEAL
- ld [wcf91], a
- dec hl
- dec hl
- dec hl
- jp .cureStatusAilment
-
-.notFullHP ; if the pokemon's current HP doesn't equal its max HP
- xor a
- ld [wLowHealthAlarm], a ;disable low health alarm
- ld [wChannelSoundIDs + Ch5], a
- push hl
- push de
- ld bc, wPartyMon1MaxHP - (wPartyMon1HP + 1)
- add hl, bc ; hl now points to max HP
- ld a, [hli]
- ld [wHPBarMaxHP+1], a
- ld a, [hl]
- ld [wHPBarMaxHP], a ; max HP stored at wHPBarMaxHP (2 bytes, big-endian)
- ld a, [wPseudoItemID]
- and a ; using Softboiled?
- jp z, .notUsingSoftboiled2
-; if using softboiled
- ld hl, wHPBarMaxHP
- ld a, [hli]
- push af
- ld a, [hli]
- push af
- ld a, [hli]
- push af
- ld a, [hl]
- push af
- ld hl, wPartyMon1MaxHP
- ld a, [wWhichPokemon]
- ld bc, wPartyMon2 - wPartyMon1
- call AddNTimes
- ld a, [hli]
- ld [wHPBarMaxHP + 1], a
- ld [H_DIVIDEND], a
- ld a, [hl]
- ld [wHPBarMaxHP], a
- ld [H_DIVIDEND + 1], a
- ld a, 5
- 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 + 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]
- push af
- ld b, a
- ld a, [hl]
- ld [wHPBarOldHP], a
- sub b
- ld [hld], a
- ld [wHPBarNewHP], a
- ld a, [H_QUOTIENT + 2]
- ld b, a
- ld a, [hl]
- ld [wHPBarOldHP+1], a
- sbc b
- ld [hl], a
- ld [wHPBarNewHP+1], a
- coord hl, 4, 1
- ld a, [wWhichPokemon]
- ld bc, 2 * SCREEN_WIDTH
- call AddNTimes ; calculate coordinates of HP bar of pokemon that used Softboiled
- ld a, SFX_HEAL_HP
- call PlaySoundWaitForCurrent
- ld a, [hFlags_0xFFFA]
- set 0, a
- ld [hFlags_0xFFFA], a
- ld a, $02
- ld [wHPBarType], a
- predef UpdateHPBar2 ; animate HP bar decrease of pokemon that used Softboiled
- ld a, [hFlags_0xFFFA]
- res 0, a
- ld [hFlags_0xFFFA], a
- pop af
- ld b, a ; store heal amount (1/5 of max HP)
- ld hl, wHPBarOldHP + 1
- pop af
- ld [hld], a
- pop af
- ld [hld], a
- pop af
- ld [hld], a
- pop af
- ld [hl], a
- jr .addHealAmount
-
-.notUsingSoftboiled2
- ld a, [wcf91]
- cp SODA_POP
- ld b, 60 ; Soda Pop heal amount
- jr z, .addHealAmount
- ld b, 80 ; Lemonade heal amount
- jr nc, .addHealAmount
- cp FRESH_WATER
- ld b, 50 ; Fresh Water heal amount
- jr z, .addHealAmount
- cp SUPER_POTION
- ld b, 200 ; Hyper Potion heal amount
- jr c, .addHealAmount
- ld b, 50 ; Super Potion heal amount
- jr z, .addHealAmount
- ld b, 20 ; Potion heal amount
-.addHealAmount
- pop de
- pop hl
- ld a, [hl]
- add b
- ld [hld], a
- ld [wHPBarNewHP], a
- ld a, [hl]
- ld [wHPBarNewHP+1], a
- jr nc, .noCarry
- inc [hl]
- ld a, [hl]
- ld [wHPBarNewHP + 1], a
-.noCarry
- push de
- inc hl
- ld d, h
- ld e, l ; de now points to current HP
- ld hl, (wPartyMon1MaxHP + 1) - (wPartyMon1HP + 1)
- add hl, de ; hl now points to max HP
- ld a, [wcf91]
- cp REVIVE
- jr z, .setCurrentHPToHalfMaxHP
- ld a, [hld]
- ld b, a
- ld a, [de]
- sub b
- dec de
- ld b, [hl]
- ld a, [de]
- sbc b
- jr nc, .setCurrentHPToMaxHp ; if current HP exceeds max HP after healing
- ld a, [wcf91]
- cp HYPER_POTION
- jr c, .setCurrentHPToMaxHp ; if using a Full Restore or Max Potion
- cp MAX_REVIVE
- jr z, .setCurrentHPToMaxHp ; if using a Max Revive
- jr .updateInBattleData
-
-.setCurrentHPToHalfMaxHP
- dec hl
- dec de
- ld a, [hli]
- srl a
- ld [de], a
- ld [wHPBarNewHP+1], a
- ld a, [hl]
- rr a
- inc de
- ld [de], a
- ld [wHPBarNewHP], a
- dec de
- jr .doneHealingPartyHP
-
-.setCurrentHPToMaxHp
- ld a, [hli]
- ld [de], a
- ld [wHPBarNewHP+1], a
- inc de
- ld a, [hl]
- ld [de], a
- ld [wHPBarNewHP], a
- dec de
-.doneHealingPartyHP ; done updating the pokemon's current HP in the party data structure
- ld a, [wcf91]
- cp FULL_RESTORE
- jr nz, .updateInBattleData
- ld bc, wPartyMon1Status - (wPartyMon1MaxHP + 1)
- add hl, bc
- xor a
- ld [hl], a ; remove the status ailment in the party data
-.updateInBattleData
- ld h, d
- ld l, e
- pop de
- ld a, [wPlayerMonNumber]
- cp d ; is pokemon the item was used on active in battle?
- jr nz, .calculateHPBarCoords
-; copy party HP to in-battle HP
- ld a, [hli]
- ld [wBattleMonHP], a
- ld a, [hld]
- ld [wBattleMonHP + 1], a
- ld a, [wcf91]
- cp FULL_RESTORE
- jr nz, .calculateHPBarCoords
- xor a
- ld [wBattleMonStatus], a ; remove the status ailment in the in-battle pokemon data
-.calculateHPBarCoords
- ld hl, wOAMBuffer + $90
- ld bc, 2 * SCREEN_WIDTH
- inc d
-.calculateHPBarCoordsLoop
- add hl, bc
- dec d
- jr nz, .calculateHPBarCoordsLoop
- jr .doneHealing
-
-.healingItemNoEffect
- call ItemUseNoEffect
- jp .done
-
-.doneHealing
- ld a, [wPseudoItemID]
- and a ; using Softboiled?
- jr nz, .skipRemovingItem ; no item to remove if using Softboiled
- push hl
- call RemoveUsedItem
- pop hl
-.skipRemovingItem
- ld a, [wcf91]
- cp FULL_RESTORE
- jr c, .playStatusAilmentCuringSound
- cp FULL_HEAL
- jr z, .playStatusAilmentCuringSound
- ld a, SFX_HEAL_HP
- call PlaySoundWaitForCurrent
- ld a, [hFlags_0xFFFA]
- set 0, a
- ld [hFlags_0xFFFA], a
- ld a, $02
- ld [wHPBarType], a
- predef UpdateHPBar2 ; animate the HP bar lengthening
- ld a, [hFlags_0xFFFA]
- res 0, a
- ld [hFlags_0xFFFA], a
- ld a, REVIVE_MSG
- ld [wPartyMenuTypeOrMessageID], a
- ld a, [wcf91]
- cp REVIVE
- jr z, .showHealingItemMessage
- cp MAX_REVIVE
- jr z, .showHealingItemMessage
- ld a, POTION_MSG
- ld [wPartyMenuTypeOrMessageID], a
- jr .showHealingItemMessage
-
-.playStatusAilmentCuringSound
- ld a, SFX_HEAL_AILMENT
- call PlaySoundWaitForCurrent
-.showHealingItemMessage
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- call ClearScreen
- dec a
- ld [wUpdateSpritesEnabled], a
- call RedrawPartyMenu ; redraws the party menu and displays the message
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- ld c, 50
- call DelayFrames
- call WaitForTextScrollButtonPress
- jr .done
-
-.canceledItemUse
- xor a
- ld [wActionResultOrTookBattleTurn], a ; item use failed
- pop af
- pop af
-.done
- ld a, [wPseudoItemID]
- and a ; using Softboiled?
- ret nz ; if so, return
- call GBPalWhiteOut
- call z, RunDefaultPaletteCommand
- ld a, [wIsInBattle]
- and a
- ret nz
- jp ReloadMapData
-
-.useVitamin
- push hl
- ld a, [hl]
- ld [wd0b5], a
- ld [wd11e], a
- ld bc, wPartyMon1Level - wPartyMon1
- add hl, bc ; hl now points to level
- ld a, [hl] ; a = level
- ld [wCurEnemyLVL], a ; store level
- call GetMonHeader
- push de
- ld a, d
- ld hl, wPartyMonNicks
- call GetPartyMonName
- pop de
- pop hl
- ld a, [wcf91]
- cp RARE_CANDY
- jp z, .useRareCandy
- push hl
- sub HP_UP
- add a
- ld bc, wPartyMon1HPExp - wPartyMon1
- add hl, bc
- add l
- ld l, a
- jr nc, .noCarry2
- inc h
-.noCarry2
- ld a, 10
- ld b, a
- ld a, [hl] ; a = MSB of stat experience of the appropriate stat
- cp 100 ; is there already at least 25600 (256 * 100) stat experience?
- jr nc, .vitaminNoEffect ; if so, vitamins can't add any more
- add b ; add 2560 (256 * 10) stat experience
- jr nc, .noCarry3 ; a carry should be impossible here, so this will always jump
- ld a, 255
-.noCarry3
- ld [hl], a
- pop hl
- call .recalculateStats
- ld hl, VitaminText
- ld a, [wcf91]
- sub HP_UP - 1
- ld c, a
-.statNameLoop ; loop to get the address of the name of the stat the vitamin increases
- dec c
- jr z, .gotStatName
-.statNameInnerLoop
- ld a, [hli]
- ld b, a
- ld a, $50
- cp b
- jr nz, .statNameInnerLoop
- jr .statNameLoop
-
-.gotStatName
- ld de, wcf4b
- ld bc, 10
- call CopyData ; copy the stat's name to wcf4b
- ld a, SFX_HEAL_AILMENT
- call PlaySound
- ld hl, VitaminStatRoseText
- call PrintText
- jp RemoveUsedItem
-
-.vitaminNoEffect
- pop hl
- ld hl, VitaminNoEffectText
- call PrintText
- jp GBPalWhiteOut
-
-.recalculateStats
- ld bc, wPartyMon1Stats - wPartyMon1
- add hl, bc
- ld d, h
- ld e, l ; de now points to stats
- 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, wPartyMon1Level - wPartyMon1
- add hl, bc ; hl now points to level
- ld a, [hl] ; a = level
- cp MAX_LEVEL
- jr z, .vitaminNoEffect ; can't raise level above 100
- inc a
- ld [hl], a ; store incremented level
- 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, 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
- ld a, [hExperience + 1]
- ld [hli], a
- ld a, [hExperience + 2]
- ld [hl], a
- pop hl
- ld a, [wWhichPokemon]
- push af
- ld a, [wcf91]
- push af
- push de
- push hl
- ld bc, wPartyMon1MaxHP - wPartyMon1
- add hl, bc ; hl now points to MSB of max HP
- ld a, [hli]
- ld b, a
- ld c, [hl]
- pop hl
- push bc
- push hl
- call .recalculateStats
- pop hl
- ld bc, (wPartyMon1MaxHP + 1) - wPartyMon1
- add hl, bc ; hl now points to LSB of max HP
- pop bc
- ld a, [hld]
- sub c
- ld c, a
- ld a, [hl]
- 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, (wPartyMon1HP + 1) - wPartyMon1MaxHP
- add hl, de ; hl now points to LSB of current HP
- ld a, [hl]
- add c
- ld [hld], a
- ld a, [hl]
- adc b
- ld [hl], a
- ld a, RARE_CANDY_MSG
- ld [wPartyMenuTypeOrMessageID], a
- call RedrawPartyMenu
- pop de
- ld a, d
- ld [wWhichPokemon], a
- ld a, e
- ld [wd11e], a
- xor a ; PLAYER_PARTY_DATA
- ld [wMonDataLocation], a
- call LoadMonData
- ld d, $01
- callab PrintStatsBox ; display new stats text box
- call WaitForTextScrollButtonPress ; wait for button press
- xor a ; PLAYER_PARTY_DATA
- ld [wMonDataLocation], a
- predef LearnMoveFromLevelUp ; learn level up move, if any
-
- xor a
- ld [wForceEvolution], a
- callabd_ModifyPikachuHappiness PIKAHAPPY_LEVELUP
- ld a, [wWhichPokemon]
- push af
- ld a, [wUsedItemOnWhichPokemon]
- ld [wWhichPokemon], a
- callab Func_2fd6a ; evolve pokemon, if appropriate
- pop af
- ld [wWhichPokemon], a
-
- callab TryEvolvingMon
- ld a, $01
- ld [wUpdateSpritesEnabled], a
- pop af
- ld [wcf91], a
- pop af
- ld [wWhichPokemon], a
- jp RemoveUsedItem
-
-VitaminStatRoseText:
- TX_FAR _VitaminStatRoseText
- db "@"
-
-VitaminNoEffectText:
- TX_FAR _VitaminNoEffectText
- db "@"
-
-VitaminText:
- db "HEALTH@"
- db "ATTACK@"
- db "DEFENSE@"
- db "SPEED@"
- db "SPECIAL@"
-
-ItemUseBait:
- ld hl, ThrewBaitText
- call PrintText
- ld hl, wEnemyMonActualCatchRate ; catch rate
- srl [hl] ; halve catch rate
- ld a, BAIT_ANIM
- ld hl, wSafariBaitFactor ; bait factor
- ld de, wSafariEscapeFactor ; escape factor
- jr BaitRockCommon
-
-ItemUseRock:
- ld hl, ThrewRockText
- call PrintText
- ld hl, wEnemyMonActualCatchRate ; catch rate
- ld a, [hl]
- add a ; double catch rate
- jr nc, .noCarry
- ld a, $ff
-.noCarry
- ld [hl], a
- ld a, ROCK_ANIM
- ld hl, wSafariEscapeFactor ; escape factor
- ld de, wSafariBaitFactor ; bait factor
-
-BaitRockCommon:
- ld [wAnimationID], a
- xor 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
- call Random
- and 7
- cp 5
- jr nc, .randomLoop
- inc a ; increment the random number, giving a range from 1 to 5 inclusive
- ld b, a
- ld a, [hl]
- add b ; increase bait factor (for bait), increase escape factor (for rock)
- jr nc, .noCarry
- ld a, $ff
-.noCarry
- ld [hl], a
- predef MoveAnimation ; do animation
- ld c, 70
- jp DelayFrames
-
-ThrewBaitText:
- TX_FAR _ThrewBaitText
- db "@"
-
-ThrewRockText:
- TX_FAR _ThrewRockText
- db "@"
-
-; also used for Dig out-of-battle effect
-ItemUseEscapeRope:
- ld a, [wIsInBattle]
- and a
- jr nz, .notUsable
- ld a, [wCurMap]
- cp AGATHAS_ROOM
- jr z, .notUsable
- cp BILLS_HOUSE
- jr z, .notUsable
- cp POKEMON_FAN_CLUB
- jr z, .notUsable
- ld a, [wCurMapTileset]
- ld b, a
- ld hl, EscapeRopeTilesets
-.loop
- ld a, [hli]
- cp $ff
- jr z, .notUsable
- cp b
- jr nz, .loop
- ld hl, wd732
- set 3, [hl]
- set 6, [hl]
- call Func_1510
- ld hl, wd72e
- res 4, [hl]
- ResetEvent EVENT_IN_SAFARI_ZONE
- xor a
- ld [wNumSafariBalls], a
- ld [wSafariZoneGateCurScript], a
- inc a
- ld [wEscapedFromBattle], a
- ld [wActionResultOrTookBattleTurn], a ; item used
- ld a, [wPseudoItemID]
- and a ; using Dig?
- ret nz ; if so, return
- call ItemUseReloadOverworldData
- ld c, 30
- call DelayFrames
- jp RemoveUsedItem
-
-.notUsable
- jp ItemUseNotTime
-
-EscapeRopeTilesets:
- db FOREST, CEMETERY, CAVERN, FACILITY, INTERIOR
- db $ff ; terminator
-
-ItemUseRepel:
- ld b, 100
-
-ItemUseRepelCommon:
- ld a, [wIsInBattle]
- and a
- jp nz, ItemUseNotTime
- ld a, b
- ld [wRepelRemainingSteps], a
- jp PrintItemUseTextAndRemoveItem
-
-; handles X Accuracy item
-ItemUseXAccuracy:
- ld a, [wIsInBattle]
- and a
- jp z, ItemUseNotTime
- ld hl, wPlayerBattleStatus2
- set USING_X_ACCURACY, [hl] ; X Accuracy bit
- callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM
- jp PrintItemUseTextAndRemoveItem
-
-; This function is bugged and never works. It always jumps to ItemUseNotTime.
-; The Card Key is handled in a different way.
-ItemUseCardKey:
- xor a
- ld [wUnusedD71F], a
- call GetTileAndCoordsInFrontOfPlayer
- ld a, [GetTileAndCoordsInFrontOfPlayer]
- cp $18
- jr nz, .next0
- ld hl, CardKeyTable1
- jr .next1
-
-.next0
- cp $24
- jr nz, .next2
- ld hl, CardKeyTable2
- jr .next1
-
-.next2
- cp $5e
- jp nz, ItemUseNotTime
- ld hl, CardKeyTable3
-.next1
- ld a, [wCurMap]
- ld b, a
-.loop
- ld a, [hli]
- cp $ff
- jp z, ItemUseNotTime
- cp b
- jr nz, .nextEntry1
- ld a, [hli]
- cp d
- jr nz, .nextEntry2
- ld a, [hli]
- cp e
- jr nz, .nextEntry3
- ld a, [hl]
- ld [wUnusedD71F], a
- jr .done
-
-.nextEntry1
- inc hl
-.nextEntry2
- inc hl
-.nextEntry3
- inc hl
- jr .loop
-
-.done
- ld hl, ItemUseText00
- call PrintText
- ld hl, wd728
- set 7, [hl]
- ret
-
-; These tables are probably supposed to be door locations in Silph Co.,
-; but they are unused.
-; The reason there are 3 tables is unknown.
-
-; Format:
-; 00: Map ID
-; 01: Y
-; 02: X
-; 03: ID?
-
-CardKeyTable1:
- db SILPH_CO_2F, $04, $04, $00
- db SILPH_CO_2F, $04, $05, $01
- db SILPH_CO_4F, $0C, $04, $02
- db SILPH_CO_4F, $0C, $05, $03
- db SILPH_CO_7F, $06, $0A, $04
- db SILPH_CO_7F, $06, $0B, $05
- db SILPH_CO_9F, $04, $12, $06
- db SILPH_CO_9F, $04, $13, $07
- db SILPH_CO_10F, $08, $0A, $08
- db SILPH_CO_10F, $08, $0B, $09
- db $ff
-
-CardKeyTable2:
- db SILPH_CO_3F, $08, $09, $0A
- db SILPH_CO_3F, $09, $09, $0B
- db SILPH_CO_5F, $04, $07, $0C
- db SILPH_CO_5F, $05, $07, $0D
- db SILPH_CO_6F, $0C, $05, $0E
- db SILPH_CO_6F, $0D, $05, $0F
- db SILPH_CO_8F, $08, $07, $10
- db SILPH_CO_8F, $09, $07, $11
- db SILPH_CO_9F, $08, $03, $12
- db SILPH_CO_9F, $09, $03, $13
- db $ff
-
-CardKeyTable3:
- db SILPH_CO_11F, $08, $09, $14
- db SILPH_CO_11F, $09, $09, $15
- db $ff
-
-ItemUsePokedoll:
- ld a, [wIsInBattle]
- dec a
- jp nz, ItemUseNotTime
- ld a, $01
- ld [wEscapedFromBattle], a
- jp PrintItemUseTextAndRemoveItem
-
-ItemUseGuardSpec:
- ld a, [wIsInBattle]
- and a
- jp z, ItemUseNotTime
-
- ld a, [wWhichPokemon]
- push af
- ld a, [wPlayerMonNumber]
- ld [wWhichPokemon], a
- callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM
- pop af
- ld [wWhichPokemon], a
-
- ld hl, wPlayerBattleStatus2
- set PROTECTED_BY_MIST, [hl] ; Mist bit
- jp PrintItemUseTextAndRemoveItem
-
-ItemUseSuperRepel:
- ld b, 200
- jp ItemUseRepelCommon
-
-ItemUseMaxRepel:
- ld b, 250
- jp ItemUseRepelCommon
-
-ItemUseDireHit:
- ld a, [wIsInBattle]
- and a
- jp z, ItemUseNotTime
-
- ld a, [wWhichPokemon]
- push af
- ld a, [wPlayerMonNumber]
- ld [wWhichPokemon], a
- callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM
- pop af
- ld [wWhichPokemon], a
-
- ld hl, wPlayerBattleStatus2
- set GETTING_PUMPED, [hl] ; Focus Energy bit
- jp PrintItemUseTextAndRemoveItem
-
-ItemUseXStat:
- ld a, [wIsInBattle]
- and a
- jr nz, .inBattle
- call ItemUseNotTime
- ld a, 2
- ld [wActionResultOrTookBattleTurn], a ; item not used
- ret
-
-.inBattle
- ld hl, wPlayerMoveNum
- ld a, [hli]
- push af ; save [wPlayerMoveNum]
- ld a, [hl]
- push af ; save [wPlayerMoveEffect]
- push hl
- ld a, [wcf91]
- sub X_ATTACK - ATTACK_UP1_EFFECT
- ld [hl], a ; store player move effect
- call PrintItemUseTextAndRemoveItem
- ld a, XSTATITEM_ANIM ; X stat item animation ID
- ld [wPlayerMoveNum], a
- call LoadScreenTilesFromBuffer1 ; restore saved screen
- call Delay3
- xor a
- ld [H_WHOSETURN], a ; set turn to player's turn
- callba StatModifierUpEffect ; do stat increase move
-
- ld a, [wWhichPokemon]
- push af
- ld a, [wPlayerMonNumber]
- ld [wWhichPokemon], a
- callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM
- pop af
- ld [wWhichPokemon], a
-
- pop hl
- pop af
- ld [hld], a ; restore [wPlayerMoveEffect]
- pop af
- ld [hl], a ; restore [wPlayerMoveNum]
- ret
-
-ItemUsePokeflute:
- ld a, [wIsInBattle]
- and a
- jr nz, .inBattle
-; if not in battle
- call ItemUseReloadOverworldData
- ld a, [wCurMap]
- cp ROUTE_12
- jr nz, .notRoute12
- CheckEvent EVENT_BEAT_ROUTE12_SNORLAX
- jr nz, .noSnorlaxOrPikachuToWakeUp
-; if the player hasn't beaten Route 12 Snorlax
- ld hl, Route12SnorlaxFluteCoords
- call ArePlayerCoordsInArray
- jr nc, .noSnorlaxOrPikachuToWakeUp
- ld hl, PlayedFluteHadEffectText
- call PrintText
- SetEvent EVENT_FIGHT_ROUTE12_SNORLAX
- ret
-
-.notRoute12
- cp ROUTE_16
- jr nz, .notRoute16
- CheckEvent EVENT_BEAT_ROUTE16_SNORLAX
- jr nz, .noSnorlaxOrPikachuToWakeUp
-; if the player hasn't beaten Route 16 Snorlax
- ld hl, Route16SnorlaxFluteCoords
- call ArePlayerCoordsInArray
- jr nc, .noSnorlaxOrPikachuToWakeUp
- ld hl, PlayedFluteHadEffectText
- call PrintText
- SetEvent EVENT_FIGHT_ROUTE16_SNORLAX
- ret
-
-.notRoute16
- cp PEWTER_POKECENTER
- jr nz, .noSnorlaxOrPikachuToWakeUp
- call CheckPikachuFollowingPlayer
- jr z, .noSnorlaxOrPikachuToWakeUp
- callab IsPikachuRightNextToPlayer
- jr nc, .noSnorlaxOrPikachuToWakeUp
- ld hl, PlayedFluteHadEffectText
- call PrintText
- call ItemUseReloadOverworldData
- ldpikaemotion e, PikachuEmotion26
- callab PlaySpecificPikachuEmotion
- ret
-
-.noSnorlaxOrPikachuToWakeUp
- ld hl, PlayedFluteNoEffectText
- jp PrintText
-
-.inBattle
- xor a
- ld [wWereAnyMonsAsleep], a
- ld b, ~SLP & $ff
- ld hl, wPartyMon1Status
- call WakeUpEntireParty
- ld a, [wIsInBattle]
- dec a ; is it a trainer battle?
- jr z, .skipWakingUpEnemyParty
-; if it's a trainer battle
- ld hl, wEnemyMon1Status
- call WakeUpEntireParty
-.skipWakingUpEnemyParty
- ld hl, wBattleMonStatus
- ld a, [hl]
- and b ; remove Sleep status
- ld [hl], a
- ld hl, wEnemyMonStatus
- ld a, [hl]
- ld c, a
- and b ; remove Sleep status
- ld [hl], a
- ld a, c
- and SLP
- jr z, .asm_e063
- ld a, $1
- ld [wWereAnyMonsAsleep], a
-.asm_e063
- call LoadScreenTilesFromBuffer2 ; restore saved screen
- ld a, [wWereAnyMonsAsleep]
- and a ; were any pokemon asleep before playing the flute?
- ld hl, PlayedFluteNoEffectText
- jp z, PrintText ; if no pokemon were asleep
-; if some pokemon were asleep
- ld hl, PlayedFluteHadEffectText
- call PrintText
- ld a, [wLowHealthAlarm]
- and $80
- jr nz, .skipMusic
- call WaitForSoundToFinish ; wait for sound to end
- callba Music_PokeFluteInBattle ; play in-battle pokeflute music
-.musicWaitLoop ; wait for music to finish playing
- ld a, [wChannelSoundIDs + Ch7]
- and a ; music off?
- jr nz, .musicWaitLoop
-.skipMusic
- ld hl, FluteWokeUpText
- jp PrintText
-
-; wakes up all party pokemon
-; INPUT:
-; hl must point to status of first pokemon in party (player's or enemy's)
-; b must equal ~SLP
-; [wWereAnyMonsAsleep] should be initialized to 0
-; OUTPUT:
-; [wWereAnyMonsAsleep]: set to 1 if any pokemon were asleep
-WakeUpEntireParty:
- ld de, 44
- ld c, 6
-.loop
- ld a, [hl]
- push af
- and SLP ; is pokemon asleep?
- jr z, .notAsleep
- ld a, 1
- ld [wWereAnyMonsAsleep], a ; indicate that a pokemon had to be woken up
-.notAsleep
- pop af
- and b ; remove Sleep status
- ld [hl], a
- add hl, de
- dec c
- jr nz, .loop
- ret
-
-; Format:
-; 00: Y
-; 01: X
-Route12SnorlaxFluteCoords:
- db 62, 9 ; one space West of Snorlax
- db 61, 10 ; one space North of Snorlax
- db 63, 10 ; one space South of Snorlax
- db 62, 11 ; one space East of Snorlax
- db $ff ; terminator
-
-; Format:
-; 00: Y
-; 01: X
-Route16SnorlaxFluteCoords:
- db 10, 27 ; one space East of Snorlax
- db 10, 25 ; one space West of Snorlax
- db $ff ; terminator
-
-PlayedFluteNoEffectText:
- TX_FAR _PlayedFluteNoEffectText
- db "@"
-
-FluteWokeUpText:
- TX_FAR _FluteWokeUpText
- db "@"
-
-PlayedFluteHadEffectText:
- TX_FAR _PlayedFluteHadEffectText
- TX_BLINK
- TX_ASM
- ld a, [wIsInBattle]
- and a
- jr nz, .done
-; play out-of-battle pokeflute music
- call StopAllMusic ; turn off music
- ld a, SFX_POKEFLUTE
- ld c, BANK(SFX_Pokeflute)
- call PlayMusic
-.musicWaitLoop ; wait for music to finish playing
- ld a, [wChannelSoundIDs + Ch3]
- cp SFX_POKEFLUTE
- jr z, .musicWaitLoop
- call PlayDefaultMusic ; start playing normal music again
-.done
- jp TextScriptEnd ; end text
-
-ItemUseCoinCase:
- ld a, [wIsInBattle]
- and a
- jp nz, ItemUseNotTime
- ld hl, CoinCaseNumCoinsText
- jp PrintText
-
-CoinCaseNumCoinsText:
- TX_FAR _CoinCaseNumCoinsText
- db "@"
-
-ItemUseOldRod:
- call FishingInit
- jp c, ItemUseNotTime
- lb bc, 5, MAGIKARP
- ld a, $1 ; set bite
- jr RodResponse
-
-ItemUseGoodRod:
- call FishingInit
- jp c, ItemUseNotTime
-.RandomLoop
- call Random
- srl a
- jr c, .SetBite
- and %11
- cp 2
- jr nc, .RandomLoop
- ; choose which monster appears
- ld hl, GoodRodMons
- add a
- ld c, a
- ld b, 0
- add hl, bc
- ld b, [hl]
- inc hl
- ld c, [hl]
- and a
-.SetBite
- ld a, 0
- rla
- xor 1
- jr RodResponse
-
-INCLUDE "data/good_rod.asm"
-
-ItemUseSuperRod:
- call FishingInit
- jp c, ItemUseNotTime
- callab ReadSuperRodData
- ld c, e
- ld b, d
- ld a, $2
- ld [wRodResponse], a
- ld a, c
- and a ; are there fish in the map?
- jr z, DoNotGenerateFishingEncounter ; if not, do not generate an encounter
- ld a, $1
- ld [wRodResponse], a
- call Random
- and $1
- jr nz, RodResponse
- xor a
- ld [wRodResponse], a
- jr DoNotGenerateFishingEncounter
-
-RodResponse:
- ld [wRodResponse], a
-
- dec a ; is there a bite?
- jr nz, DoNotGenerateFishingEncounter
- ; if yes, store level and species data
- ld a, 1
- ld [wMoveMissed], a
- ld a, b ; level
- ld [wCurEnemyLVL], a
- ld a, c ; species
- ld [wCurOpponent], a
-
-DoNotGenerateFishingEncounter:
- ld hl, wWalkBikeSurfState
- ld a, [hl] ; store the value in a
- push af
- push hl
- ld [hl], 0
- callba FishingAnim
- pop hl
- pop af
- ld [hl], a
- ret
-
-; 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:
- ld a, [wIsInBattle]
- and a
- jr z, .notInBattle
- scf ; can't fish during battle
- ret
-
-.notInBattle
- call IsNextTileShoreOrWater
- jr nc, .cannotFish
- ld a, [wWalkBikeSurfState]
- cp 2 ; Surfing?
- jr z, .cannotFish
- call ItemUseReloadOverworldData
- ld hl, ItemUseText00
- call PrintText
- ld a, SFX_HEAL_AILMENT
- call PlaySound
- ld a, $2
- ld [wd49c], a
- ld a, $81
- ld [wPikachuMood], a
- ld c, 80
- call DelayFrames
- and a
- ret
-
-.cannotFish
- scf ; can't fish when surfing
- ret
-
-ItemUseOaksParcel:
- jp ItemUseNotYoursToUse
-
-ItemUseItemfinder:
- ld a, [wIsInBattle]
- and a
- jp nz, ItemUseNotTime
- call ItemUseReloadOverworldData
- callba HiddenItemNear ; check for hidden items
- ld hl, ItemfinderFoundNothingText
- jr nc, .printText ; if no hidden items
- ld c, 4
-.loop
- ld a, SFX_HEALING_MACHINE
- call PlaySoundWaitForCurrent
- ld a, SFX_PURCHASE
- call PlaySoundWaitForCurrent
- dec c
- jr nz, .loop
- ld hl, ItemfinderFoundItemText
-.printText
- jp PrintText
-
-ItemfinderFoundItemText:
- TX_FAR _ItemfinderFoundItemText
- db "@"
-
-ItemfinderFoundNothingText:
- TX_FAR _ItemfinderFoundNothingText
- db "@"
-
-ItemUsePPUp:
- ld a, [wIsInBattle]
- and a
- jp nz, ItemUseNotTime
-
-ItemUsePPRestore:
- ld a, [wWhichPokemon]
- push af
- ld a, [wcf91]
- ld [wPPRestoreItem], a
-.chooseMon
- xor a
- ld [wUpdateSpritesEnabled], a
- ld a, USE_ITEM_PARTY_MENU
- ld [wPartyMenuTypeOrMessageID], a
- call DisplayPartyMenu
- jr nc, .chooseMove
- jp .itemNotUsed
-
-.chooseMove
- ld a, [wIsInBattle]
- and a
- jr z, .usePPItem
- ld a, [wWhichPokemon]
- ld b, a
- ld a, [wPlayerMonNumber]
- cp b
- jr nz, .usePPItem
- ld a, [wPlayerBattleStatus3]
- bit TRANSFORMED, a
- jr z, .usePPItem
- call ItemUseNotTime
- jp .itemNotUsed
-
-.usePPItem
- ld a, [wPPRestoreItem]
- cp ELIXER
- jp nc, .useElixir ; if Elixir or Max Elixir
- ld a, $02
- ld [wMoveMenuType], a
- ld hl, RaisePPWhichTechniqueText
- ld a, [wPPRestoreItem]
- cp ETHER ; is it a PP Up?
- jr c, .printWhichTechniqueMessage ; if so, print the raise PP message
- ld hl, RestorePPWhichTechniqueText ; otherwise, print the restore PP message
-.printWhichTechniqueMessage
- call PrintText
- xor a
- ld [wPlayerMoveListIndex], a
- callab MoveSelectionMenu ; move selection menu
- ld a, 0
- ld [wPlayerMoveListIndex], a
- jr nz, .chooseMon
- ld hl, wPartyMon1Moves
- ld bc, wPartyMon2 - wPartyMon1
- call GetSelectedMoveOffset
- push hl
- ld a, [hl]
- ld [wd11e], a
- call GetMoveName
- call CopyStringToCF4B ; copy name to wcf4b
- pop hl
- ld a, [wPPRestoreItem]
- cp ETHER
- jr nc, .useEther ; if Ether or Max Ether
-.usePPUp
- ld bc, wPartyMon1PP - wPartyMon1Moves
- add hl, bc
- ld a, [hl] ; move PP
- cp 3 << 6 ; have 3 PP Ups already been used?
- jr c, .PPNotMaxedOut
- ld hl, PPMaxedOutText
- call PrintText
- jr .chooseMove
-
-.PPNotMaxedOut
- ld a, [hl]
- add 1 << 6 ; increase PP Up count by 1
- ld [hl], a
- ld a, 1 ; 1 PP Up used
- ld [wd11e], a
- call RestoreBonusPP ; add the bonus PP to current PP
- ld a, SFX_HEAL_AILMENT
- call PlaySound
- ld hl, PPIncreasedText
- call PrintText
-.done
- pop af
- ld [wWhichPokemon], a
- call GBPalWhiteOut
- call RunDefaultPaletteCommand
- jp RemoveUsedItem
-
-.afterRestoringPP ; after using a (Max) Ether/Elixir
- ld a, [wWhichPokemon]
- ld b, a
- ld a, [wPlayerMonNumber]
- cp b ; is the pokemon whose PP was restored active in battle?
- jr nz, .skipUpdatingInBattleData
- ld hl, wPartyMon1PP
- ld bc, wPartyMon2 - wPartyMon1
- call AddNTimes
- ld de, wBattleMonPP
- ld bc, 4
- call CopyData ; copy party data to in-battle data
-.skipUpdatingInBattleData
- ld a, SFX_HEAL_AILMENT
- call PlaySound
- ld hl, PPRestoredText
- call PrintText
- jr .done
-
-.useEther
- call .restorePP
- jr nz, .afterRestoringPP
- jp .noEffect
-
-; unsets zero flag if PP was restored, sets zero flag if not
-; however, this is bugged for Max Ethers and Max Elixirs (see below)
-.restorePP
- xor a ; PLAYER_PARTY_DATA
- ld [wMonDataLocation], a
- call GetMaxPP
- ld hl, wPartyMon1Moves
- ld bc, wPartyMon2 - wPartyMon1
- call GetSelectedMoveOffset
- ld bc, wPartyMon1PP - wPartyMon1Moves
- add hl, bc ; hl now points to move's PP
- ld a, [wMaxPP]
- ld b, a
- ld a, [wPPRestoreItem]
- cp MAX_ETHER
- jr z, .fullyRestorePP
- ld a, [hl] ; move PP
- and %00111111 ; lower 6 bit bits store current PP
- cp b ; does current PP equal max PP?
- ret z ; if so, return
- add 10 ; increase current PP by 10
-; b holds the max PP amount and b will hold the new PP amount.
-; So, if the new amount meets or exceeds the max amount,
-; cap the amount to the max amount by leaving b unchanged.
-; Otherwise, store the new amount in b.
- cp b ; does the new amount meet or exceed the maximum?
- jr nc, .storeNewAmount
- ld b, a
-.storeNewAmount
- ld a, [hl] ; move PP
- and %11000000 ; PP Up counter bits
- add b
- ld [hl], a
- ret
-
-.fullyRestorePP
- ld a, [hl] ; move PP
-; Note that this code has a bug. It doesn't mask out the upper two bits, which
-; are used to count how many PP Ups have been used on the move. So, Max Ethers
-; and Max Elixirs will not be detected as having no effect on a move with full
-; PP if the move has had any PP Ups used on it.
- cp b ; does current PP equal max PP?
- ret z
- jr .storeNewAmount
-
-.useElixir
-; decrement the item ID so that ELIXER becomes ETHER and MAX_ELIXER becomes MAX_ETHER
- ld hl, wPPRestoreItem
- dec [hl]
- dec [hl]
- xor a
- ld hl, wCurrentMenuItem
- ld [hli], a
- ld [hl], a ; zero the counter for number of moves that had their PP restored
- ld b, 4
-; loop through each move and restore PP
-.elixirLoop
- push bc
- ld hl, wPartyMon1Moves
- ld bc, wPartyMon2 - wPartyMon1
- call GetSelectedMoveOffset
- ld a, [hl]
- and a ; does the current slot have a move?
- jr z, .nextMove
- call .restorePP
- jr z, .nextMove
-; if some PP was restored
- ld hl, wTileBehindCursor ; counter for number of moves that had their PP restored
- inc [hl]
-.nextMove
- ld hl, wCurrentMenuItem
- inc [hl]
- pop bc
- dec b
- jr nz, .elixirLoop
- ld a, [wTileBehindCursor]
- and a ; did any moves have their PP restored?
- jp nz, .afterRestoringPP
-.noEffect
- call ItemUseNoEffect
-.itemNotUsed
- call GBPalWhiteOut
- call RunDefaultPaletteCommand
- pop af
- xor a
- ld [wActionResultOrTookBattleTurn], a ; item use failed
- ret
-
-RaisePPWhichTechniqueText:
- TX_FAR _RaisePPWhichTechniqueText
- db "@"
-
-RestorePPWhichTechniqueText:
- TX_FAR _RestorePPWhichTechniqueText
- db "@"
-
-PPMaxedOutText:
- TX_FAR _PPMaxedOutText
- db "@"
-
-PPIncreasedText:
- TX_FAR _PPIncreasedText
- db "@"
-
-PPRestoredText:
- TX_FAR _PPRestoredText
- db "@"
-
-; for items that can't be used from the Item menu
-UnusableItem:
- jp ItemUseNotTime
-
-ItemUseTMHM:
- ld a, [wIsInBattle]
- and a
- jp nz, ItemUseNotTime
- ld a, [wcf91]
- sub TM_01
- push af
- jr nc, .skipAdding
- add 55 ; if item is an HM, add 55
-.skipAdding
- inc a
- ld [wd11e], a
- predef TMToMove ; get move ID from TM/HM ID
- ld a, [wd11e]
- ld [wMoveNum], a
- call GetMoveName
- call CopyStringToCF4B ; copy name to wcf4b
- pop af
- ld hl, BootedUpTMText
- jr nc, .printBootedUpMachineText
- ld hl, BootedUpHMText
-.printBootedUpMachineText
- call PrintText
- ld hl, TeachMachineMoveText
- call PrintText
- coord hl, 14, 7
- lb bc, 8, 15
- ld a, TWO_OPTION_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID ; yes/no menu
- ld a, [wCurrentMenuItem]
- and a
- jr z, .useMachine
- ld a, 2
- ld [wActionResultOrTookBattleTurn], a ; item not used
- ret
-
-.useMachine
- ld a, [wWhichPokemon]
- push af
- ld a, [wcf91]
- push af
-.chooseMon
- ld hl, wcf4b
- ld de, wTempMoveNameBuffer
- ld bc, 14
- 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, wTempMoveNameBuffer
- ld de, wcf4b
- ld bc, 14
- call CopyData
- pop af
- jr nc, .checkIfAbleToLearnMove
-; if the player canceled teaching the move
- pop af
- pop af
- call GBPalWhiteOutWithDelay3
- call ClearSprites
- call RunDefaultPaletteCommand
- jp LoadScreenTilesFromBuffer1 ; restore saved screen
-.checkIfAbleToLearnMove
- predef CanLearnTM ; check if the pokemon can learn the move
- push bc
- ld a, [wWhichPokemon]
- ld hl, wPartyMonNicks
- call GetPartyMonName
- pop bc
- ld a, c
- and a ; can the pokemon learn the move?
- jr nz, .checkIfAlreadyLearnedMove
-; if the pokemon can't learn the move
- ld a, SFX_DENIED
- call PlaySoundWaitForCurrent
- ld hl, MonCannotLearnMachineMoveText
- call PrintText
- jr .chooseMon
-
-.checkIfAlreadyLearnedMove
- callab CheckIfMoveIsKnown ; check if the pokemon already knows the move
- jr c, .chooseMon
- predef LearnMove ; teach move
- ld a, [wWhichPokemon]
- ld d, a
- pop af
- ld [wcf91], a
- pop af
- ld [wWhichPokemon], a
- ld a, b
- and a
- ret z
-
- ld a, [wWhichPokemon]
- push af
- ld a, d
- ld [wWhichPokemon], a
- callabd_ModifyPikachuHappiness PIKAHAPPY_USEDTMHM
- callab IsThisPartymonStarterPikachu_Party
- jr nc, .notTeachingThunderboltOrThunderToPikachu
- ld a, [wcf91]
- cp TM_24 ; are we teaching thunderbolt to the player pikachu?
- jr z, .teachingThunderboltOrThunderToPlayerPikachu
- cp TM_25 ; are we teaching thunder then?
- jr nz, .notTeachingThunderboltOrThunderToPikachu
-.teachingThunderboltOrThunderToPlayerPikachu
- ld a, $5
- ld [wd49c], a
- ld a, $85
- ld [wPikachuMood], a
-.notTeachingThunderboltOrThunderToPikachu
- pop af
- ld [wWhichPokemon], a
-
- ld a, [wcf91]
- call IsItemHM
- ret c
- jp RemoveUsedItem
-
-BootedUpTMText:
- TX_FAR _BootedUpTMText
- db "@"
-
-BootedUpHMText:
- TX_FAR _BootedUpHMText
- db "@"
-
-TeachMachineMoveText:
- TX_FAR _TeachMachineMoveText
- db "@"
-
-MonCannotLearnMachineMoveText:
- TX_FAR _MonCannotLearnMachineMoveText
- db "@"
-
-PrintItemUseTextAndRemoveItem:
- ld hl, ItemUseText00
- call PrintText
- ld a, SFX_HEAL_AILMENT
- call PlaySound
- call WaitForTextScrollButtonPress ; wait for button press
-
-RemoveUsedItem:
- ld hl, wNumBagItems
- ld a, 1 ; one item
- ld [wItemQuantity], a
- jp RemoveItemFromInventory
-
-ItemUseNoEffect:
- ld hl, ItemUseNoEffectText
- jr ItemUseFailed
-
-ItemUseNotTime:
- ld hl, ItemUseNotTimeText
- jr ItemUseFailed
-
-ItemUseNotYoursToUse:
- ld hl, ItemUseNotYoursToUseText
- jr ItemUseFailed
-
-Func_e4bf:
- ld a, $2
- ld [wActionResultOrTookBattleTurn], a
- ld hl, DontHavePokemonText
- jp PrintText
-
-ThrowBallAtTrainerMon:
- call RunDefaultPaletteCommand
- call LoadScreenTilesFromBuffer1 ; restore saved screen
- call Delay3
- ld a, TOSS_ANIM
- ld [wAnimationID], a
- predef MoveAnimation ; do animation
- ld hl, ThrowBallAtTrainerMonText1
- call PrintText
- ld hl, ThrowBallAtTrainerMonText2
- call PrintText
- jr RemoveUsedItem
-
-NoCyclingAllowedHere:
- ld hl, NoCyclingAllowedHereText
- jr ItemUseFailed
-
-BoxFullCannotThrowBall:
- ld hl, BoxFullCannotThrowBallText
- jr ItemUseFailed
-
-SurfingAttemptFailed:
- ld hl, NoSurfingHereText
-
-ItemUseFailed:
- xor a
- ld [wActionResultOrTookBattleTurn], a ; item use failed
- jp PrintText
-
-ItemUseNotTimeText:
- TX_FAR _ItemUseNotTimeText
- db "@"
-
-ItemUseNotYoursToUseText:
- TX_FAR _ItemUseNotYoursToUseText
- db "@"
-
-ItemUseNoEffectText:
- TX_FAR _ItemUseNoEffectText
- db "@"
-
-ThrowBallAtTrainerMonText1:
- TX_FAR _ThrowBallAtTrainerMonText1
- db "@"
-
-ThrowBallAtTrainerMonText2:
- TX_FAR _ThrowBallAtTrainerMonText2
- db "@"
-
-NoCyclingAllowedHereText:
- TX_FAR _NoCyclingAllowedHereText
- db "@"
-
-NoSurfingHereText:
- TX_FAR _NoSurfingHereText
- db "@"
-
-BoxFullCannotThrowBallText:
- TX_FAR _BoxFullCannotThrowBallText
- db "@"
-
-DontHavePokemonText:
- TX_FAR _DontHavePokemonText
- db "@"
-
-ItemUseText00:
- TX_FAR _ItemUseText001
- TX_LINE
- TX_FAR _ItemUseText002
- db "@"
-
-GotOnBicycleText:
- TX_FAR _GotOnBicycleText1
- TX_LINE
- TX_FAR _GotOnBicycleText2
- db "@"
-
-GotOffBicycleText:
- TX_FAR _GotOffBicycleText1
- TX_LINE
- TX_FAR _GotOffBicycleText2
- db "@"
-
-; restores bonus PP (from PP Ups) when healing at a pokemon center
-; also, when a PP Up is used, it increases the current PP by one PP Up bonus
-; INPUT:
-; [wWhichPokemon] = index of pokemon in party
-; [wCurrentMenuItem] = index of move (when using a PP Up)
-RestoreBonusPP:
- ld hl, wPartyMon1Moves
- 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, wPartyMon1PP - wPartyMon1Moves
- ld b, 0
- add hl, bc ; hl now points to move 1 PP
- ld de, wNormalMaxPPList
- ld b, 0 ; initialize move counter to zero
-; loop through the pokemon's moves
-.loop
- inc b
- ld a, b
- cp 5 ; reached the end of the pokemon's moves?
- ret z ; if so, return
- 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
- ld a, [wCurrentMenuItem]
- inc a
- cp b
- jr nz, .nextMove
-.skipMenuItemIDCheck
- ld a, [hl]
- and %11000000 ; have any PP Ups been used?
- call nz, AddBonusPP ; if so, add bonus PP
-.nextMove
- inc hl
- inc de
- jr .loop
-
-; adds bonus PP from PP Ups to current PP
-; 1/5 of normal max PP (capped at 7) is added for each PP Up
-; INPUT:
-; [de] = normal max PP
-; [hl] = move PP
-AddBonusPP:
- push bc
- ld a, [de] ; normal max PP of move
- ld [H_DIVIDEND + 3], a
- xor a
- ld [H_DIVIDEND], a
- ld [H_DIVIDEND + 1], a
- ld [H_DIVIDEND + 2], a
- ld a, 5
- ld [H_DIVISOR], a
- ld b, 4
- call Divide
- ld a, [hl] ; move PP
- ld b, a
- swap a
- and %00001111
- srl a
- srl a
- ld c, a ; c = number of PP Ups used
-.loop
- ld a, [H_QUOTIENT + 3]
- cp 8 ; is the amount greater than or equal to 8?
- jr c, .addAmount
- ld a, 7 ; cap the amount at 7
-.addAmount
- add b
- ld b, a
- 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
- ld [hl], b
- pop bc
- ret
-
-; gets max PP of a pokemon's move (including PP from PP Ups)
-; INPUT:
-; [wWhichPokemon] = index of pokemon within party/box
-; [wMonDataLocation] = pokemon source
-; 00: player's party
-; 01: enemy's party
-; 02: current box
-; 03: daycare
-; 04: player's in-battle pokemon
-; [wCurrentMenuItem] = move index
-; OUTPUT:
-; [wMaxPP] = max PP
-GetMaxPP:
- ld a, [wMonDataLocation]
- and a
- ld hl, wPartyMon1Moves
- ld bc, wPartyMon2 - wPartyMon1
- jr z, .sourceWithMultipleMon
- ld hl, wEnemyMon1Moves
- dec a
- jr z, .sourceWithMultipleMon
- ld hl, wBoxMon1Moves
- ld bc, wBoxMon2 - wBoxMon1
- dec a
- jr z, .sourceWithMultipleMon
- ld hl, wDayCareMonMoves
- dec a
- jr z, .sourceWithOneMon
- ld hl, wBattleMonMoves ; player's in-battle pokemon
-.sourceWithOneMon
- call GetSelectedMoveOffset2
- jr .next
-
-.sourceWithMultipleMon
- call GetSelectedMoveOffset
-.next
- ld a, [hl]
- dec a
- push hl
- ld hl, Moves
- ld bc, MoveEnd - Moves
- call AddNTimes
- ld de, wcd6d
- ld a, BANK(Moves)
- call FarCopyData
- ld de, wcd6d + 5 ; PP is byte 5 of move data
- ld a, [de]
- ld b, a ; b = normal max PP
- pop hl
- push bc
- ld bc, wPartyMon1PP - wPartyMon1Moves ; PP offset if not player's in-battle pokemon data
- ld a, [wMonDataLocation]
- cp 4 ; player's in-battle pokemon?
- jr nz, .addPPOffset
- ld bc, wBattleMonPP - wBattleMonMoves ; PP offset if player's in-battle pokemon data
-.addPPOffset
- add hl, bc
- ld a, [hl] ; a = current PP
- and %11000000 ; get PP Up count
- pop bc
- or b ; place normal max PP in 6 lower bits of a
- ld h, d
- ld l, e
- inc hl ; hl = wcd73
- ld [hl], a
- 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 %00111111 ; mask out the PP Up count
- ld [wMaxPP], a ; store max PP
- ret
-
-GetSelectedMoveOffset:
- ld a, [wWhichPokemon]
- call AddNTimes
-
-GetSelectedMoveOffset2:
- ld a, [wCurrentMenuItem]
- ld c, a
- ld b, 0
- add hl, bc
- ret
-
-; confirms the item toss and then tosses the item
-; INPUT:
-; hl = address of inventory (either wNumBagItems or wNumBoxItems)
-; [wcf91] = item ID
-; [wWhichPokemon] = index of item within inventory
-; [wItemQuantity] = quantity to toss
-; OUTPUT:
-; clears carry flag if the item is tossed, sets carry flag if not
-TossItem_:
- push hl
- ld a, [wcf91]
- call IsItemHM
- pop hl
- jr c, .tooImportantToToss
- push hl
- call IsKeyItem_
- ld a, [wIsKeyItem]
- pop hl
- and a
- jr nz, .tooImportantToToss
- push hl
- ld a, [wcf91]
- ld [wd11e], a
- call GetItemName
- call CopyStringToCF4B ; copy name to wcf4b
- ld hl, IsItOKToTossItemText
- call PrintText
- coord hl, 14, 7
- lb bc, 8, 15
- ld a, TWO_OPTION_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID ; yes/no menu
- ld a, [wMenuExitMethod]
- cp CHOSE_SECOND_ITEM
- pop hl
- scf
- ret z ; return if the player chose No
-; if the player chose Yes
- push hl
- ld a, [wWhichPokemon]
- call RemoveItemFromInventory
- ld a, [wcf91]
- ld [wd11e], a
- call GetItemName
- call CopyStringToCF4B ; copy name to wcf4b
- ld hl, ThrewAwayItemText
- call PrintText
- pop hl
- and a
- ret
-
-.tooImportantToToss
- push hl
- ld hl, TooImportantToTossText
- call PrintText
- pop hl
- scf
- ret
-
-ThrewAwayItemText:
- TX_FAR _ThrewAwayItemText
- db "@"
-
-IsItOKToTossItemText:
- TX_FAR _IsItOKToTossItemText
- db "@"
-
-TooImportantToTossText:
- TX_FAR _TooImportantToTossText
- db "@"
-
-; checks if an item is a key item
-; INPUT:
-; [wcf91] = item ID
-; OUTPUT:
-; [wIsKeyItem] = result
-; 00: item is not key item
-; 01: item is key item
-IsKeyItem_:
- ld a, $01
- ld [wIsKeyItem], a
- ld a, [wcf91]
- cp HM_01 ; is the item an HM or TM?
- jr nc, .checkIfItemIsHM
-; if the item is not an HM or TM
- push af
- ld hl, KeyItemBitfield
- ld de, wBuffer
- ld bc, 15 ; only 11 bytes are actually used
- call CopyData
- pop af
- dec a
- ld c, a
- ld hl, wBuffer
- ld b, FLAG_TEST
- predef FlagActionPredef
- ld a, c
- and a
- ret nz
-.checkIfItemIsHM
- ld a, [wcf91]
- call IsItemHM
- ret c
- xor a
- ld [wIsKeyItem], a
- ret
-
-INCLUDE "data/key_items.asm"
-
-SendNewMonToBox:
- ld de, wNumInBox
- ld a, [de]
- inc a
- ld [de], a
- ld a, [wcf91]
- ld [wd0b5], a
- ld c, a
-.asm_e6f5
- inc de
- ld a, [de]
- ld b, a
- ld a, c
- ld c, b
- ld [de], a
- cp $ff
- jr nz, .asm_e6f5
- call GetMonHeader
- ld hl, wBoxMonOT
- ld bc, NAME_LENGTH
- ld a, [wNumInBox]
- dec a
- jr z, .asm_e732
- dec a
- call AddNTimes
- push hl
- ld bc, NAME_LENGTH
- add hl, bc
- ld d, h
- ld e, l
- pop hl
- ld a, [wNumInBox]
- dec a
- ld b, a
-.asm_e71f
- push bc
- push hl
- ld bc, NAME_LENGTH
- call CopyData
- pop hl
- ld d, h
- ld e, l
- ld bc, -NAME_LENGTH
- add hl, bc
- pop bc
- dec b
- jr nz, .asm_e71f
-.asm_e732
- ld hl, wPlayerName
- ld de, wBoxMonOT
- ld bc, NAME_LENGTH
- call CopyData
- ld a, [wNumInBox]
- dec a
- jr z, .asm_e76e
- ld hl, wBoxMonNicks
- ld bc, NAME_LENGTH
- dec a
- call AddNTimes
- push hl
- ld bc, NAME_LENGTH
- add hl, bc
- ld d, h
- ld e, l
- pop hl
- ld a, [wNumInBox]
- dec a
- ld b, a
-.asm_e75b
- push bc
- push hl
- ld bc, NAME_LENGTH
- call CopyData
- pop hl
- ld d, h
- ld e, l
- ld bc, -NAME_LENGTH
- add hl, bc
- pop bc
- dec b
- jr nz, .asm_e75b
-.asm_e76e
- ld hl, wBoxMonNicks
- ld a, NAME_MON_SCREEN
- ld [wNamingScreenType], a
- predef AskName
- ld a, [wNumInBox]
- dec a
- jr z, .asm_e7ab
- ld hl, wBoxMons
- ld bc, wBoxMon2 - wBoxMon1
- dec a
- call AddNTimes
- push hl
- ld bc, wBoxMon2 - wBoxMon1
- add hl, bc
- ld d, h
- ld e, l
- pop hl
- ld a, [wNumInBox]
- dec a
- ld b, a
-.asm_e798
- push bc
- push hl
- ld bc, wBoxMon2 - wBoxMon1
- call CopyData
- pop hl
- ld d, h
- ld e, l
- ld bc, wBoxMon1 - wBoxMon2
- add hl, bc
- pop bc
- dec b
- jr nz, .asm_e798
-.asm_e7ab
- ld a, [wEnemyMonLevel]
- ld [wEnemyMonBoxLevel], a
- ld hl, wEnemyMon
- ld de, wBoxMon1
- ld bc, wEnemyMonDVs - wEnemyMon
- call CopyData
- ld hl, wPlayerID
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hl]
- ld [de], a
- inc de
- push de
- ld a, [wCurEnemyLVL]
- ld d, a
- callab CalcExperience
- pop de
- ld a, [hExperience]
- ld [de], a
- inc de
- ld a, [hExperience + 1]
- ld [de], a
- inc de
- ld a, [hExperience + 2]
- ld [de], a
- inc de
- xor a
- ld b, NUM_STATS * 2
-.asm_e7e3
- ld [de], a
- inc de
- dec b
- jr nz, .asm_e7e3
- ld hl, wEnemyMonDVs
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- ld hl, wEnemyMonPP
- ld b, NUM_MOVES
-.asm_e7f5
- ld a, [hli]
- inc de
- ld [de], a
- dec b
- jr nz, .asm_e7f5
- ld a, [wcf91]
- cp KADABRA
- jr nz, .notKadabra
- ld a, $60 ; twistedspoon in gsc
- ld [wBoxMon1CatchRate], a
-.notKadabra
- ret
-
-; checks if the tile in front of the player is a shore or water tile
-; used for surfing and fishing
-; unsets carry if it is, sets carry if not
-IsNextTileShoreOrWater:
- ld a, [wCurMapTileset]
- ld hl, WaterTilesets
- ld de, 1
- call IsInArray ; does the current map allow surfing?
- ret nc ; if not, return
- ld hl, WaterTile
- ld a, [wCurMapTileset]
- cp SHIP_PORT ; Vermilion Dock tileset
- jr z, .skipShoreTiles ; if it's the Vermilion Dock tileset
- cp GYM ; eastern shore tile in Safari Zone
- jr z, .skipShoreTiles
- cp DOJO ; usual eastern shore tile
- jr z, .skipShoreTiles
- ld hl, ShoreTiles
-.skipShoreTiles
- ld a, [wTileInFrontOfPlayer]
- ld de, $1
- call IsInArray
- ret
-
-; tilesets with water
-WaterTilesets:
- db OVERWORLD, FOREST, DOJO, GYM, SHIP, SHIP_PORT, CAVERN, FACILITY, PLATEAU
- db $ff ; terminator
-
-; shore tiles
-ShoreTiles:
- db $48, $32
-WaterTile:
- db $14
- db $ff ; terminator
-
-; reloads map view and processes sprite data
-; for items that cause the overworld to be displayed
-ItemUseReloadOverworldData:
- call LoadCurrentMapView
- jp UpdateSprites
-
-; creates a list at wBuffer of maps where the mon in [wd11e] can be found.
-; this is used by the pokedex to display locations the mon can be found on the map.
-FindWildLocationsOfMon:
- ld hl, WildDataPointers
- ld de, wBuffer
- ld c, $0
-.loop
- inc hl
- ld a, [hld]
- inc a
- jr z, .done
- push hl
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [hli]
- and a
- call nz, CheckMapForMon ; land
- ld a, [hli]
- and a
- call nz, CheckMapForMon ; water
- pop hl
- inc hl
- inc hl
- inc c
- jr .loop
-.done
- ld a, $ff ; list terminator
- ld [de], a
- ret
-
-CheckMapForMon:
- inc hl
- ld b, $a
-.loop
- ld a, [wd11e]
- cp [hl]
- jr nz, .nextEntry
- ld a, c
- ld [de], a
- inc de
-.nextEntry
- inc hl
- inc hl
- dec b
- jr nz, .loop
- dec hl
- ret
diff --git a/engine/items/subtract_paid_money.asm b/engine/items/subtract_paid_money.asm
new file mode 100644
index 00000000..fdefe3d6
--- /dev/null
+++ b/engine/items/subtract_paid_money.asm
@@ -0,0 +1,17 @@
+; subtracts the amount the player paid from their money
+; OUTPUT: carry = 0(success) or 1(fail because there is not enough money)
+SubtractAmountPaidFromMoney_::
+ ld de, wPlayerMoney
+ ld hl, hMoney ; total price of items
+ ld c, 3 ; length of money in bytes
+ call StringCmp
+ ret c
+ ld de, wPlayerMoney + 2
+ ld hl, hMoney + 2 ; total price of items
+ ld c, 3 ; length of money in bytes
+ predef SubBCDPredef ; subtract total price from money
+ ld a, MONEY_BOX
+ ld [wTextBoxID], a
+ call DisplayTextBoxID ; redraw money text box
+ and a
+ ret
diff --git a/engine/items/tm_prices.asm b/engine/items/tm_prices.asm
index 80e6bf3c..df9761bd 100755
--- a/engine/items/tm_prices.asm
+++ b/engine/items/tm_prices.asm
@@ -1,9 +1,9 @@
-GetMachinePrice:
+GetMachinePrice::
; Input: [wcf91] = Item Id of a TM
; Output: Stores the TM price at hItemPrice
ld a, [wcf91] ; a contains TM item id
- sub TM_01
- ret c
+ sub TM01 ; underflows below 0 for HM items (before TM items)
+ ret c ; HMs are priceless
ld d, a
ld hl, TechnicalMachinePrices
srl a
@@ -16,10 +16,10 @@ GetMachinePrice:
swap a
.highNybbleIsPrice
and $f0
- ld [hItemPrice + 1], a
+ ldh [hItemPrice + 1], a
xor a
- ld [hItemPrice], a
- ld [hItemPrice + 2], a
+ ldh [hItemPrice], a
+ ldh [hItemPrice + 2], a
ret
-INCLUDE "data/tm_prices.asm"
+INCLUDE "data/items/tm_prices.asm"
diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm
index 7ccaa232..a11cd736 100755
--- a/engine/items/tmhm.asm
+++ b/engine/items/tmhm.asm
@@ -22,5 +22,5 @@ CheckIfMoveIsKnown:
ret
AlreadyKnowsText:
- TX_FAR _AlreadyKnowsText
- db "@"
+ text_far _AlreadyKnowsText
+ text_end
diff --git a/engine/items/tms.asm b/engine/items/tms.asm
index 84770747..dcf2665d 100755
--- a/engine/items/tms.asm
+++ b/engine/items/tms.asm
@@ -39,4 +39,4 @@ TMToMove:
ld [wd11e], a
ret
-INCLUDE "data/tms.asm"
+INCLUDE "data/moves/tmhm_moves.asm"
diff --git a/engine/items/town_map.asm b/engine/items/town_map.asm
new file mode 100755
index 00000000..c401d1c1
--- /dev/null
+++ b/engine/items/town_map.asm
@@ -0,0 +1,629 @@
+NOT_VISITED EQU $fe
+
+DisplayTownMap:
+ call LoadTownMap
+ ld hl, wUpdateSpritesEnabled
+ ld a, [hl]
+ push af
+ ld [hl], $ff
+ push hl
+ ld a, $1
+ ldh [hJoy7], a
+ ld a, [wCurMap]
+ push af
+ ld b, $0
+ call DrawPlayerOrBirdSprite ; player sprite
+ hlcoord 1, 0
+ ld de, wcd6d
+ call PlaceString
+ ld hl, wOAMBuffer
+ ld de, wTileMapBackup
+ ld bc, $10
+ call CopyData
+ ld hl, vSprites tile $04
+ ld de, TownMapCursor
+ lb bc, BANK(TownMapCursor), (TownMapCursorEnd - TownMapCursor) / $8
+ call CopyVideoDataDouble
+ xor a
+ ld [wWhichTownMapLocation], a
+ pop af
+ jr .enterLoop
+
+.townMapLoop
+ hlcoord 0, 0
+ lb bc, 1, 20
+ call ClearScreenArea
+ ld hl, TownMapOrder
+ ld a, [wWhichTownMapLocation]
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hl]
+.enterLoop
+ ld de, wTownMapCoords
+ call LoadTownMapEntry
+ ld a, [de]
+ push hl
+ call TownMapCoordsToOAMCoords
+ ld a, $4
+ ld [wOAMBaseTile], a
+ ld hl, wOAMBuffer + $10
+ call WriteTownMapSpriteOAM ; town map cursor sprite
+ pop hl
+ ld de, wcd6d
+.copyMapName
+ ld a, [hli]
+ ld [de], a
+ inc de
+ cp $50
+ jr nz, .copyMapName
+ hlcoord 1, 0
+ ld de, wcd6d
+ call PlaceString
+ ld hl, wOAMBuffer + $10
+ ld de, wTileMapBackup + 16
+ ld bc, $10
+ call CopyData
+.inputLoop
+ call TownMapSpriteBlinkingAnimation
+ call JoypadLowSensitivity
+ ldh a, [hJoy5]
+ ld b, a
+ and A_BUTTON | B_BUTTON | D_UP | D_DOWN
+ jr z, .inputLoop
+ ld a, SFX_TINK
+ call PlaySound
+ bit 6, b
+ jr nz, .pressedUp
+ bit 7, b
+ jr nz, .pressedDown
+ xor a
+ ld [wTownMapSpriteBlinkingEnabled], a
+ ldh [hJoy7], a
+ ld [wAnimCounter], a
+ call ExitTownMap
+ pop hl
+ pop af
+ ld [hl], a
+ ret
+.pressedUp
+ ld a, [wWhichTownMapLocation]
+ inc a
+ cp TownMapOrderEnd - TownMapOrder ; number of list items + 1
+ jr nz, .noOverflow
+ xor a
+.noOverflow
+ ld [wWhichTownMapLocation], a
+ jp .townMapLoop
+.pressedDown
+ ld a, [wWhichTownMapLocation]
+ dec a
+ cp -1
+ jr nz, .noUnderflow
+ ld a, TownMapOrderEnd - TownMapOrder - 1 ; number of list items
+.noUnderflow
+ ld [wWhichTownMapLocation], a
+ jp .townMapLoop
+
+.asm_70f87
+ ldh a, [hJoy5]
+ and D_DOWN | D_UP
+ ret z
+ callfar PlayPikachuSoundClip
+ ret
+
+INCLUDE "data/maps/town_map_order.asm"
+
+TownMapCursor:
+ INCBIN "gfx/town_map/town_map_cursor.1bpp"
+TownMapCursorEnd:
+
+LoadTownMap_Nest:
+ call LoadTownMap
+ ld hl, wUpdateSpritesEnabled
+ ld a, [hl]
+ push af
+ ld [hl], $ff
+ push hl
+ call DisplayWildLocations
+ call GetMonName
+ hlcoord 1, 0
+ call PlaceString
+ ld h, b
+ ld l, c
+ ld de, MonsNestText
+ call PlaceString
+ call WaitForTextScrollButtonPress
+ call ExitTownMap
+ pop hl
+ pop af
+ ld [hl], a
+ ret
+
+MonsNestText:
+ db "'s NEST@"
+
+LoadTownMap_Fly::
+ call ClearSprites
+ call LoadTownMap
+ ld a, $1
+ ldh [hJoy7], a
+ call LoadPlayerSpriteGraphics
+ call LoadFontTilePatterns
+ ld de, BirdSprite
+ ld b, BANK(BirdSprite)
+ ld c, $c
+ ld hl, vSprites tile $04
+ call CopyVideoData
+ ld de, TownMapUpArrow
+ ld hl, vChars1 tile $6d
+ lb bc, BANK(TownMapUpArrow), (TownMapUpArrowEnd - TownMapUpArrow) / $8
+ call CopyVideoDataDouble
+ call BuildFlyLocationsList
+ ld hl, wUpdateSpritesEnabled
+ ld a, [hl]
+ push af
+ ld [hl], $ff
+ push hl
+ hlcoord 0, 0
+ ld de, ToText
+ call PlaceString
+ ld a, [wCurMap]
+ ld b, $0
+ call DrawPlayerOrBirdSprite
+ ld hl, wFlyLocationsList
+ decoord 18, 0
+.townMapFlyLoop
+ ld a, " "
+ ld [de], a
+ push hl
+ push hl
+ hlcoord 3, 0
+ lb bc, 1, 15
+ call ClearScreenArea
+ pop hl
+ ld a, [hl]
+ ld b, $4
+ call DrawPlayerOrBirdSprite ; draw bird sprite
+ hlcoord 3, 0
+ ld de, wcd6d
+ call PlaceString
+ ld c, 15
+ call DelayFrames
+ hlcoord 18, 0
+ ld [hl], "▶"
+ hlcoord 19, 0
+ ld [hl], "▼"
+ pop hl
+.inputLoop
+ push hl
+ call DelayFrame
+ call JoypadLowSensitivity
+ ldh a, [hJoy5]
+ ld b, a
+ pop hl
+ and A_BUTTON | B_BUTTON | D_UP | D_DOWN
+ jr z, .inputLoop
+ bit 0, b
+ jr nz, .pressedA
+ ld a, SFX_TINK
+ call PlaySound
+ bit 6, b
+ jr nz, .pressedUp
+ bit 7, b
+ jr nz, .pressedDown
+ jr .pressedB
+.pressedA
+ ld a, SFX_HEAL_AILMENT
+ call PlaySound
+ ld a, [hl]
+ ld [wDestinationMap], a
+ ld hl, wd732
+ set 3, [hl]
+ inc hl
+ set 7, [hl]
+.pressedB
+ xor a
+ ld [wTownMapSpriteBlinkingEnabled], a
+ ldh [hJoy7], a
+ call GBPalWhiteOutWithDelay3
+ pop hl
+ pop af
+ ld [hl], a
+ ret
+.pressedUp
+ decoord 18, 0
+ inc hl
+ ld a, [hl]
+ cp $ff
+ jr z, .wrapToStartOfList
+ cp NOT_VISITED
+ jr z, .pressedUp ; skip past unvisited towns
+ jp .townMapFlyLoop
+.wrapToStartOfList
+ ld hl, wFlyLocationsList
+ jp .townMapFlyLoop
+.pressedDown
+ decoord 19, 0
+ dec hl
+ ld a, [hl]
+ cp $ff
+ jr z, .wrapToEndOfList
+ cp NOT_VISITED
+ jr z, .pressedDown ; skip past unvisited towns
+ jp .townMapFlyLoop
+.wrapToEndOfList
+ ld hl, wFlyLocationsList + NUM_CITY_MAPS
+ jr .pressedDown
+
+ToText:
+ db "To@"
+
+BuildFlyLocationsList:
+ ld hl, wFlyLocationsList - 1
+ ld [hl], $ff
+ inc hl
+ ld a, [wTownVisitedFlag]
+ ld e, a
+ ld a, [wTownVisitedFlag + 1]
+ ld d, a
+ lb bc, 0, NUM_CITY_MAPS
+.loop
+ srl d
+ rr e
+ ld a, NOT_VISITED
+ jr nc, .notVisited
+ ld a, b ; store the map number of the town if it has been visited
+.notVisited
+ ld [hl], a
+ inc hl
+ inc b
+ dec c
+ jr nz, .loop
+ ld [hl], $ff
+ ret
+
+TownMapUpArrow:
+ INCBIN "gfx/town_map/up_arrow.1bpp"
+TownMapUpArrowEnd:
+
+LoadTownMap:
+ call GBPalWhiteOutWithDelay3
+ call ClearScreen
+ call UpdateSprites
+ hlcoord 0, 0
+ lb bc, $12, $12
+ call TextBoxBorder
+ call DisableLCD
+ ld hl, WorldMapTileGraphics
+ ld de, vChars2 tile $60
+ ld bc, WorldMapTileGraphicsEnd - WorldMapTileGraphics
+ ld a, BANK(WorldMapTileGraphics)
+ call FarCopyData
+ ld hl, MonNestIcon
+ ld de, vSprites tile $04
+ ld bc, MonNestIconEnd - MonNestIcon
+ ld a, BANK(MonNestIcon)
+ call FarCopyDataDouble
+ hlcoord 0, 0
+ ld de, CompressedMap
+.nextTile
+ ld a, [de]
+ and a
+ jr z, .done
+ ld b, a
+ and $f
+ ld c, a
+ ld a, b
+ swap a
+ and $f
+ add $60
+.writeRunLoop
+ ld [hli], a
+ dec c
+ jr nz, .writeRunLoop
+ inc de
+ jr .nextTile
+.done
+ call EnableLCD
+ ld b, SET_PAL_TOWN_MAP
+ call RunPaletteCommand
+ call Delay3
+ call GBPalNormal
+ xor a
+ ld [wAnimCounter], a
+ inc a
+ ld [wTownMapSpriteBlinkingEnabled], a
+ ret
+
+CompressedMap:
+ INCBIN "gfx/town_map/town_map.rle"
+
+ExitTownMap:
+; clear town map graphics data and load usual graphics data
+ xor a
+ ld [wTownMapSpriteBlinkingEnabled], a
+ call GBPalWhiteOut
+ call ClearScreen
+ call ClearSprites
+ call LoadPlayerSpriteGraphics
+ call LoadFontTilePatterns
+ call UpdateSprites
+ jp RunDefaultPaletteCommand
+
+DrawPlayerOrBirdSprite:
+; a = map number
+; b = OAM base tile
+ push af
+ ld a, b
+ ld [wOAMBaseTile], a
+ pop af
+ ld de, wTownMapCoords
+ call LoadTownMapEntry
+ ld a, [de]
+ push hl
+ call TownMapCoordsToOAMCoords
+ call WritePlayerOrBirdSpriteOAM
+ pop hl
+ ld de, wcd6d
+.loop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ cp "@"
+ jr nz, .loop
+ ld hl, wOAMBuffer
+ ld de, wTileMapBackup
+ ld bc, $a0
+ jp CopyData
+
+DisplayWildLocations:
+ farcall FindWildLocationsOfMon
+ call ZeroOutDuplicatesInList
+ ld hl, wOAMBuffer
+ ld de, wTownMapCoords
+.loop
+ ld a, [de]
+ cp $ff
+ jr z, .exitLoop
+ and a
+ jr z, .nextEntry
+ push hl
+ call LoadTownMapEntry
+ pop hl
+ ld a, [de]
+ cp $19 ; Cerulean Cave's coordinates
+ jr z, .nextEntry ; skip Cerulean Cave
+ call TownMapCoordsToOAMCoords
+ ld a, $4 ; nest icon tile no.
+ ld [hli], a
+ xor a
+ ld [hli], a
+.nextEntry
+ inc de
+ jr .loop
+.exitLoop
+ ld a, l
+ and a ; were any OAM entries written?
+ jr nz, .drawPlayerSprite
+; if no OAM entries were written, print area unknown text
+ hlcoord 1, 7
+ lb bc, 2, 15
+ call TextBoxBorder
+ hlcoord 2, 9
+ ld de, AreaUnknownText
+ call PlaceString
+ jr .done
+.drawPlayerSprite
+ ld a, [wCurMap]
+ ld b, $0
+ call DrawPlayerOrBirdSprite
+.done
+ ld hl, wOAMBuffer
+ ld de, wTileMapBackup
+ ld bc, $a0
+ jp CopyData
+
+AreaUnknownText:
+ db " AREA UNKNOWN@"
+
+TownMapCoordsToOAMCoords:
+; in: lower nybble of a = x, upper nybble of a = y
+; out: b and [hl] = (y * 8) + 24, c and [hl+1] = (x * 8) + 24
+ push af
+ and $f0
+ srl a
+ add 24
+ ld b, a
+ ld [hli], a
+ pop af
+ and $f
+ swap a
+ srl a
+ add 24
+ ld c, a
+ ld [hli], a
+ ret
+
+WritePlayerOrBirdSpriteOAM:
+ ld a, [wOAMBaseTile]
+ and a
+ ld hl, wOAMBuffer + $90 ; for player sprite
+ jr z, WriteTownMapSpriteOAM
+ ld hl, wOAMBuffer + $80 ; for bird sprite
+
+WriteTownMapSpriteOAM:
+ 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
+
+ ld b, h
+ ld c, l
+ pop hl
+
+WriteAsymmetricMonPartySpriteOAM:
+; Writes 4 OAM blocks for a helix mon party sprite, since it does not have
+; a vertical line of symmetry.
+ lb de, 2, 2
+.loop
+ push de
+ push bc
+.innerLoop
+ ld a, b
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ ld a, [wOAMBaseTile]
+ ld [hli], a
+ inc a
+ ld [wOAMBaseTile], a
+ xor a
+ ld [hli], a
+ inc d
+ ld a, 8
+ add c
+ ld c, a
+ dec e
+ jr nz, .innerLoop
+ pop bc
+ pop de
+ ld a, 8
+ add b
+ ld b, a
+ dec d
+ jr nz, .loop
+ ret
+
+WriteSymmetricMonPartySpriteOAM:
+; Writes 4 OAM blocks for a mon party sprite other than a helix. All the
+; sprites other than the helix one have a vertical line of symmetry which allows
+; the X-flip OAM bit to be used so that only 2 rather than 4 tile patterns are
+; needed.
+ xor a
+ ld [wSymmetricSpriteOAMAttributes], a
+ lb de, 2, 2
+.loop
+ push de
+ push bc
+.innerLoop
+ ld a, b
+ ld [hli], a ; Y
+ ld a, c
+ ld [hli], a ; X
+ ld a, [wOAMBaseTile]
+ ld [hli], a ; tile
+ ld a, [wSymmetricSpriteOAMAttributes]
+ ld [hli], a ; attributes
+ xor (1 << OAM_X_FLIP)
+ ld [wSymmetricSpriteOAMAttributes], a
+ inc d
+ ld a, 8
+ add c
+ ld c, a
+ dec e
+ jr nz, .innerLoop
+ pop bc
+ pop de
+ push hl
+ ld hl, wOAMBaseTile
+ inc [hl]
+ inc [hl]
+ pop hl
+ ld a, 8
+ add b
+ ld b, a
+ dec d
+ jr nz, .loop
+ ret
+
+ZeroOutDuplicatesInList:
+; replace duplicate bytes in the list of wild pokemon locations with 0
+ ld de, wBuffer
+.loop
+ ld a, [de]
+ inc de
+ cp $ff
+ ret z
+ ld c, a
+ ld l, e
+ ld h, d
+.zeroDuplicatesLoop
+ ld a, [hl]
+ cp $ff
+ jr z, .loop
+ cp c
+ jr nz, .skipZeroing
+ xor a
+ ld [hl], a
+.skipZeroing
+ inc hl
+ jr .zeroDuplicatesLoop
+
+LoadTownMapEntry:
+; in: a = map number
+; out: lower nybble of [de] = x, upper nybble of [de] = y, hl = address of name
+ cp FIRST_INDOOR_MAP
+ jr c, .external
+ ld bc, 4
+ ld hl, InternalMapEntries
+.loop
+ cp [hl]
+ jr c, .foundEntry
+ add hl, bc
+ jr .loop
+.foundEntry
+ inc hl
+ jr .readEntry
+.external
+ ld hl, ExternalMapEntries
+ ld c, a
+ ld b, 0
+ add hl, bc
+ add hl, bc
+ add hl, bc
+.readEntry
+ ld a, [hli]
+ ld [de], a
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ret
+
+INCLUDE "data/maps/town_map_entries.asm"
+
+INCLUDE "data/maps/names.asm"
+
+MonNestIcon:
+ INCBIN "gfx/town_map/mon_nest_icon.1bpp"
+MonNestIconEnd:
+
+TownMapSpriteBlinkingAnimation::
+ ld a, [wAnimCounter]
+ inc a
+ cp 25
+ jr z, .hideSprites
+ cp 50
+ jr nz, .done
+; show sprites when the counter reaches 50
+ ld hl, wTileMapBackup
+ ld de, wOAMBuffer
+ ld bc, $90
+ call CopyData
+ xor a
+ jr .done
+.hideSprites
+ ld hl, wOAMBuffer
+ ld b, $24
+ ld de, $4
+.hideSpritesLoop
+ ld [hl], $a0
+ add hl, de
+ dec b
+ jr nz, .hideSpritesLoop
+ ld a, 25
+.done
+ ld [wAnimCounter], a
+ jp DelayFrame
diff --git a/engine/joypad.asm b/engine/joypad.asm
index 4126568c..06a15e4e 100644
--- a/engine/joypad.asm
+++ b/engine/joypad.asm
@@ -2,34 +2,34 @@ ReadJoypad_::
; Poll joypad input.
; Unlike the hardware register, button
; presses are indicated by a set bit.
- ld a, [hDisableJoypadPolling]
+ ldh a, [hDisableJoypadPolling]
and a
ret nz
ld a, 1 << 5 ; select direction keys
;ld c, 0
- ld [rJOYP], a
- ld a, [rJOYP]
- ld a, [rJOYP]
+ ldh [rJOYP], a
+ ldh a, [rJOYP]
+ ldh a, [rJOYP]
cpl
and %1111
swap a
ld b, a
ld a, 1 << 4 ; select button keys
- ld [rJOYP], a
- rept 6
- ld a, [rJOYP]
- endr
+ ldh [rJOYP], a
+ REPT 6
+ ldh a, [rJOYP]
+ ENDR
cpl
and %1111
or b
- ld [hJoyInput], a
+ ldh [hJoyInput], a
ld a, 1 << 4 + 1 << 5 ; deselect keys
- ld [rJOYP], a
+ ldh [rJOYP], a
ret
@@ -37,30 +37,30 @@ _Joypad::
; hJoyReleased: (hJoyLast ^ hJoyInput) & hJoyLast
; hJoyPressed: (hJoyLast ^ hJoyInput) & hJoyInput
- ld a, [hJoyInput]
- ld b,a
+ ldh a, [hJoyInput]
+ ld b, a
and $4F
cp A_BUTTON + B_BUTTON + SELECT + START ; soft reset
jp z, TrySoftReset
- ld a, [hJoyLast]
+ ldh a, [hJoyLast]
ld e, a
xor b
ld d, a
and e
- ld [hJoyReleased], a
+ ldh [hJoyReleased], a
ld a, d
and b
- ld [hJoyPressed], a
+ ldh [hJoyPressed], a
ld a, b
- ld [hJoyLast], a
+ ldh [hJoyLast], a
ld a, [wd730]
bit 5, a
jr nz, DiscardButtonPresses
- ld a, [hJoyLast]
- ld [hJoyHeld], a
+ ldh a, [hJoyLast]
+ ldh [hJoyHeld], a
ld a, [wJoyIgnore]
and a
@@ -68,19 +68,19 @@ _Joypad::
cpl
ld b, a
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
and b
- ld [hJoyHeld], a
- ld a, [hJoyPressed]
+ ldh [hJoyHeld], a
+ ldh a, [hJoyPressed]
and b
- ld [hJoyPressed], a
+ ldh [hJoyPressed], a
ret
DiscardButtonPresses:
xor a
- ld [hJoyHeld], a
- ld [hJoyPressed], a
- ld [hJoyReleased], a
+ ldh [hJoyHeld], a
+ ldh [hJoyPressed], a
+ ldh [hJoyReleased], a
ret
TrySoftReset:
@@ -88,7 +88,7 @@ TrySoftReset:
; deselect (redundant)
ld a, $30
- ld [rJOYP], a
+ ldh [rJOYP], a
ld hl, hSoftReset
dec [hl]
diff --git a/engine/learn_move.asm b/engine/learn_move.asm
deleted file mode 100755
index 021d0eeb..00000000
--- a/engine/learn_move.asm
+++ /dev/null
@@ -1,250 +0,0 @@
-LearnMove:
- call SaveScreenTilesToBuffer1
- ld a, [wWhichPokemon]
- ld hl, wPartyMonNicks
- call GetPartyMonName
- ld hl, wcd6d
- ld de, wLearnMoveMonName
- ld bc, NAME_LENGTH
- call CopyData
-
-DontAbandonLearning:
- ld hl, wPartyMon1Moves
- ld bc, wPartyMon2Moves - wPartyMon1Moves
- ld a, [wWhichPokemon]
- call AddNTimes
- ld d, h
- ld e, l
- ld b, NUM_MOVES
-.findEmptyMoveSlotLoop
- ld a, [hl]
- and a
- jr z, .next
- inc hl
- dec b
- jr nz, .findEmptyMoveSlotLoop
- push de
- call TryingToLearn
- pop de
- jp c, AbandonLearning
- push hl
- push de
- ld [wd11e], a
- call GetMoveName
- ld hl, OneTwoAndText
- call PrintText
- pop de
- pop hl
-.next
- ld a, [wMoveNum]
- ld [hl], a
- ld bc, wPartyMon1PP - wPartyMon1Moves
- add hl, bc
- push hl
- push de
- dec a
- ld hl, Moves
- ld bc, MoveEnd - Moves
- call AddNTimes
- ld de, wBuffer
- ld a, BANK(Moves)
- call FarCopyData
- ld a, [wBuffer + 5] ; a = move's max PP
- pop de
- pop hl
- ld [hl], a
- ld a, [wIsInBattle]
- and a
- jp z, PrintLearnedMove
- ld a, [wWhichPokemon]
- ld b, a
- ld a, [wPlayerMonNumber]
- cp b
- jp nz, PrintLearnedMove
- ld h, d
- ld l, e
- ld de, wBattleMonMoves
- ld bc, NUM_MOVES
- call CopyData
- ld bc, wPartyMon1PP - wPartyMon1OTID
- add hl, bc
- ld de, wBattleMonPP
- ld bc, NUM_MOVES
- call CopyData
- jp PrintLearnedMove
-
-AbandonLearning:
- ld hl, AbandonLearningText
- call PrintText
- coord hl, 14, 7
- lb bc, 8, 15
- ld a, TWO_OPTION_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID ; yes/no menu
- ld a, [wCurrentMenuItem]
- and a
- jp nz, DontAbandonLearning
- ld hl, DidNotLearnText
- call PrintText
- ld b, 0
- ret
-
-PrintLearnedMove:
- ld hl, LearnedMove1Text
- call PrintText
- ld b, 1
- ret
-
-TryingToLearn:
- push hl
- ld hl, TryingToLearnText
- call PrintText
- coord hl, 14, 7
- lb bc, 8, 15
- ld a, TWO_OPTION_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID ; yes/no menu
- pop hl
- ld a, [wCurrentMenuItem]
- rra
- ret c
- ld bc, -NUM_MOVES
- add hl, bc
- push hl
- ld de, wMoves
- ld bc, NUM_MOVES
- call CopyData
- callab FormatMovesString
- pop hl
-.loop
- push hl
- ld hl, WhichMoveToForgetText
- call PrintText
- coord hl, 4, 7
- lb bc, 4, 14
- call TextBoxBorder
- coord hl, 6, 8
- ld de, wMovesString
- ld a, [hFlags_0xFFFA]
- set 2, a
- ld [hFlags_0xFFFA], a
- call PlaceString
- ld a, [hFlags_0xFFFA]
- res 2, a
- ld [hFlags_0xFFFA], a
- ld hl, wTopMenuItemY
- ld a, 8
- ld [hli], a ; wTopMenuItemY
- ld a, 5
- ld [hli], a ; wTopMenuItemX
- xor a
- ld [hli], a ; wCurrentMenuItem
- inc hl
- ld a, [wNumMovesMinusOne]
- ld [hli], a ; wMaxMenuItem
- ld a, A_BUTTON | B_BUTTON
- ld [hli], a ; wMenuWatchedKeys
- ld [hl], 0 ; wLastMenuItem
- ld hl, hFlags_0xFFFA
- set 1, [hl]
- call HandleMenuInput
- ld hl, hFlags_0xFFFA
- res 1, [hl]
- push af
- call LoadScreenTilesFromBuffer1
- pop af
- pop hl
- bit 1, a ; pressed b
- jr nz, .cancel
- push hl
- ld a, [wCurrentMenuItem]
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [hl]
- push af
- push bc
- call IsMoveHM
- pop bc
- pop de
- ld a, d
- jr c, .hm
- pop hl
- add hl, bc
- and a
- ret
-.hm
- ld hl, HMCantDeleteText
- call PrintText
- pop hl
- jr .loop
-.cancel
- scf
- ret
-
-LearnedMove1Text:
- TX_FAR _LearnedMove1Text
- TX_SFX_ITEM_1 ; plays SFX_GET_ITEM_1 in the party menu (rare candy) and plays SFX_LEVEL_UP in battle
- TX_BLINK
- db "@"
-
-WhichMoveToForgetText:
- TX_FAR _WhichMoveToForgetText
- db "@"
-
-AbandonLearningText:
- TX_FAR _AbandonLearningText
- db "@"
-
-DidNotLearnText:
- TX_FAR _DidNotLearnText
- db "@"
-
-TryingToLearnText:
- TX_FAR _TryingToLearnText
- db "@"
-
-OneTwoAndText:
-; bugfix: In Red/Blue, the SFX_SWAP sound was played in the wrong bank, which played an incorrect sound
-; Yellow has fixed this by swapping to the correct bank
- TX_FAR _OneTwoAndText
- TX_DELAY
- TX_ASM
- push af
- push bc
- push de
- push hl
- ld a, $1
- ld [wMuteAudioAndPauseMusic], a
- call DelayFrame
- ld a, [wAudioROMBank]
- push af
- ld a, BANK(SFX_Swap_1)
- ld [wAudioROMBank], a
- ld [wAudioSavedROMBank], a
- call WaitForSoundToFinish
- ld a, SFX_SWAP
- call PlaySound
- call WaitForSoundToFinish
- pop af
- ld [wAudioROMBank], a
- ld [wAudioSavedROMBank], a
- xor a
- ld [wMuteAudioAndPauseMusic], a
- pop hl
- pop de
- pop bc
- pop af
- ld hl, PoofText
- ret
-
-PoofText:
- TX_FAR _PoofText
- TX_DELAY
-ForgotAndText:
- TX_FAR _ForgotAndText
- db "@"
-
-HMCantDeleteText:
- TX_FAR _HMCantDeleteText
- db "@"
diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm
new file mode 100755
index 00000000..c75ab200
--- /dev/null
+++ b/engine/link/cable_club.asm
@@ -0,0 +1,984 @@
+; performs the appropriate action when the player uses the gameboy on the table in the Colosseum or Trade Center
+; In the Colosseum, it starts a battle. In the Trade Center, it displays the trade selection screen.
+; Before doing either action, it swaps random numbers, trainer names and party data with the other gameboy.
+CableClub_DoBattleOrTrade:
+ ld c, 80
+ call DelayFrames
+ call ClearScreen
+ call UpdateSprites
+ call LoadFontTilePatterns
+ call LoadHpBarAndStatusTilePatterns
+ call LoadTrainerInfoTextBoxTiles
+ hlcoord 3, 8
+ lb bc, 2, 12
+ call CableClub_TextBoxBorder
+ hlcoord 4, 10
+ ld de, PleaseWaitString
+ call PlaceString
+ ld hl, wPlayerNumHits
+ xor a
+ ld [hli], a
+ ld [hl], $50
+ ; fall through
+
+; This is called after completing a trade.
+CableClub_DoBattleOrTradeAgain:
+ ld hl, wSerialPlayerDataBlock
+ ld a, SERIAL_PREAMBLE_BYTE
+ ld b, 6
+.writePlayerDataBlockPreambleLoop
+ ld [hli], a
+ dec b
+ jr nz, .writePlayerDataBlockPreambleLoop
+ ld hl, wSerialRandomNumberListBlock
+ ld a, SERIAL_PREAMBLE_BYTE
+ ld b, 7
+.writeRandomNumberListPreambleLoop
+ ld [hli], a
+ dec b
+ jr nz, .writeRandomNumberListPreambleLoop
+ ld b, 10
+.generateRandomNumberListLoop
+ call Random
+ cp SERIAL_PREAMBLE_BYTE ; all the random numbers have to be less than the preamble byte
+ jr nc, .generateRandomNumberListLoop
+ ld [hli], a
+ dec b
+ jr nz, .generateRandomNumberListLoop
+ ld hl, wSerialPartyMonsPatchList
+ ld a, SERIAL_PREAMBLE_BYTE
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ ld b, $c8
+ xor a
+.zeroPlayerDataPatchListLoop
+ ld [hli], a
+ dec b
+ jr nz, .zeroPlayerDataPatchListLoop
+ ld hl, wGrassRate
+ ld bc, wTrainerHeaderPtr - wGrassRate
+.zeroEnemyPartyLoop
+ xor a
+ ld [hli], a
+ dec bc
+ ld a, b
+ or c
+ jr nz, .zeroEnemyPartyLoop
+ ld hl, wPartyMons - 1
+ ld de, wSerialPartyMonsPatchList + 10
+ ld bc, 0
+.patchPartyMonsLoop
+ inc c
+ ld a, c
+ cp SERIAL_PREAMBLE_BYTE
+ jr z, .startPatchListPart2
+ ld a, b
+ dec a ; are we in part 2 of the patch list?
+ jr nz, .checkPlayerDataByte ; jump if in part 1
+; if we're in part 2
+ ld a, c
+ cp (wPartyMonOT - (wPartyMons - 1)) - (SERIAL_PREAMBLE_BYTE - 1)
+ jr z, .finishedPatchingPlayerData
+.checkPlayerDataByte
+ inc hl
+ ld a, [hl]
+ cp SERIAL_NO_DATA_BYTE
+ jr nz, .patchPartyMonsLoop
+; if the player data byte matches SERIAL_NO_DATA_BYTE, patch it with $FF and record the offset in the patch list
+ ld a, c
+ ld [de], a
+ inc de
+ ld [hl], $ff
+ jr .patchPartyMonsLoop
+.startPatchListPart2
+ ld a, SERIAL_PATCH_LIST_PART_TERMINATOR
+ ld [de], a ; end of part 1
+ inc de
+ lb bc, 1, 0
+ jr .patchPartyMonsLoop
+.finishedPatchingPlayerData
+ ld a, SERIAL_PATCH_LIST_PART_TERMINATOR
+ ld [de], a ; end of part 2
+ call Serial_SyncAndExchangeNybble
+ ldh a, [hSerialConnectionStatus]
+ cp USING_INTERNAL_CLOCK
+ jr nz, .skipSendingTwoZeroBytes
+; if using internal clock
+; send two zero bytes for syncing purposes?
+ call Delay3
+ xor a
+ ldh [hSerialSendData], a
+ ld a, START_TRANSFER_INTERNAL_CLOCK
+ ldh [rSC], a
+ call DelayFrame
+ xor a
+ ldh [hSerialSendData], a
+ ld a, START_TRANSFER_INTERNAL_CLOCK
+ ldh [rSC], a
+.skipSendingTwoZeroBytes
+ call Delay3
+ call StopAllMusic
+ ld a, (1 << SERIAL)
+ ldh [rIE], a
+ ld hl, wSerialRandomNumberListBlock
+ ld de, wSerialOtherGameboyRandomNumberListBlock
+ ld bc, $11
+ call Serial_ExchangeBytes
+ ld a, SERIAL_NO_DATA_BYTE
+ ld [de], a
+ ld hl, wSerialPlayerDataBlock
+ ld de, wSerialEnemyDataBlock
+ ld bc, $1a8
+ call Serial_ExchangeBytes
+ ld a, SERIAL_NO_DATA_BYTE
+ ld [de], a
+ ld hl, wSerialPartyMonsPatchList
+ ld de, wSerialEnemyMonsPatchList
+ ld bc, $c8
+ call Serial_ExchangeBytes
+ ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK)
+ ldh [rIE], a
+ ldh a, [hSerialConnectionStatus]
+ cp USING_INTERNAL_CLOCK
+ jr z, .skipCopyingRandomNumberList ; the list generated by the gameboy clocking the connection is used by both gameboys
+ ld hl, wSerialOtherGameboyRandomNumberListBlock
+.findStartOfRandomNumberListLoop
+ ld a, [hli]
+ and a
+ jr z, .findStartOfRandomNumberListLoop
+ cp SERIAL_PREAMBLE_BYTE
+ jr z, .findStartOfRandomNumberListLoop
+ cp SERIAL_NO_DATA_BYTE
+ jr z, .findStartOfRandomNumberListLoop
+ dec hl
+ ld de, wLinkBattleRandomNumberList
+ ld c, 10
+.copyRandomNumberListLoop
+ ld a, [hli]
+ cp SERIAL_NO_DATA_BYTE
+ jr z, .copyRandomNumberListLoop
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .copyRandomNumberListLoop
+.skipCopyingRandomNumberList
+ ld hl, wSerialEnemyDataBlock + 3
+.findStartOfEnemyNameLoop
+ ld a, [hli]
+ and a
+ jr z, .findStartOfEnemyNameLoop
+ cp SERIAL_PREAMBLE_BYTE
+ jr z, .findStartOfEnemyNameLoop
+ cp SERIAL_NO_DATA_BYTE
+ jr z, .findStartOfEnemyNameLoop
+ dec hl
+ ld de, wLinkEnemyTrainerName
+ ld c, NAME_LENGTH
+.copyEnemyNameLoop
+ ld a, [hli]
+ cp SERIAL_NO_DATA_BYTE
+ jr z, .copyEnemyNameLoop
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .copyEnemyNameLoop
+ ld de, wEnemyPartyCount
+ ld bc, wTrainerHeaderPtr - wEnemyPartyCount
+.copyEnemyPartyLoop
+ ld a, [hli]
+ cp SERIAL_NO_DATA_BYTE
+ jr z, .copyEnemyPartyLoop
+ ld [de], a
+ inc de
+ dec bc
+ ld a, b
+ or c
+ jr nz, .copyEnemyPartyLoop
+ ld de, wSerialPartyMonsPatchList
+ ld hl, wPartyMons
+ ld c, 2 ; patch list has 2 parts
+.unpatchPartyMonsLoop
+ ld a, [de]
+ inc de
+ and a
+ jr z, .unpatchPartyMonsLoop
+ cp SERIAL_PREAMBLE_BYTE
+ jr z, .unpatchPartyMonsLoop
+ cp SERIAL_NO_DATA_BYTE
+ jr z, .unpatchPartyMonsLoop
+ cp SERIAL_PATCH_LIST_PART_TERMINATOR
+ jr z, .finishedPartyMonsPatchListPart
+ push hl
+ push bc
+ ld b, 0
+ dec a
+ ld c, a
+ add hl, bc
+ ld a, SERIAL_NO_DATA_BYTE
+ ld [hl], a
+ pop bc
+ pop hl
+ jr .unpatchPartyMonsLoop
+.finishedPartyMonsPatchListPart
+ ld hl, wPartyMons + (SERIAL_PREAMBLE_BYTE - 1)
+ dec c ; is there another part?
+ jr nz, .unpatchPartyMonsLoop
+ ld de, wSerialEnemyMonsPatchList
+ ld hl, wEnemyMons
+ ld c, 2 ; patch list has 2 parts
+.unpatchEnemyMonsLoop
+ ld a, [de]
+ inc de
+ and a
+ jr z, .unpatchEnemyMonsLoop
+ cp SERIAL_PREAMBLE_BYTE
+ jr z, .unpatchEnemyMonsLoop
+ cp SERIAL_NO_DATA_BYTE
+ jr z, .unpatchEnemyMonsLoop
+ cp SERIAL_PATCH_LIST_PART_TERMINATOR
+ jr z, .finishedEnemyMonsPatchListPart
+ push hl
+ push bc
+ ld b, 0
+ dec a
+ ld c, a
+ add hl, bc
+ ld a, SERIAL_NO_DATA_BYTE
+ ld [hl], a
+ pop bc
+ pop hl
+ jr .unpatchEnemyMonsLoop
+.finishedEnemyMonsPatchListPart
+ ld hl, wEnemyMons + (SERIAL_PREAMBLE_BYTE - 1)
+ dec c
+ jr nz, .unpatchEnemyMonsLoop
+ ld a, LOW(wEnemyMonOT)
+ ld [wUnusedCF8D], a
+ ld a, HIGH(wEnemyMonOT)
+ ld [wUnusedCF8D + 1], a
+ xor a
+ ld [wTradeCenterPointerTableIndex], a
+ call StopAllMusic
+ ldh a, [hSerialConnectionStatus]
+ cp USING_INTERNAL_CLOCK
+ ld c, 66
+ call z, DelayFrames ; delay if using internal clock
+ ld a, [wLinkState]
+ cp LINK_STATE_START_BATTLE
+ ld a, LINK_STATE_TRADING
+ ld [wLinkState], a
+ jr nz, .trading
+ ld a, LINK_STATE_BATTLING
+ ld [wLinkState], a
+ ld a, OPP_RIVAL1
+ ld [wCurOpponent], a
+ call ClearScreen
+ call Delay3
+ ld b, $9
+ call RunPaletteCommand
+ ld hl, wOptions
+ res 7, [hl]
+ ld a, [wLetterPrintingDelayFlags]
+ push af
+ xor a
+ ld [wLetterPrintingDelayFlags], a
+ predef InitOpponent
+ pop af
+ ld [wLetterPrintingDelayFlags], a
+ predef HealParty
+ jp ReturnToCableClubRoom
+.trading
+ ld c, BANK(Music_GameCorner)
+ ld a, MUSIC_GAME_CORNER
+ call PlayMusic
+ jr CallCurrentTradeCenterFunction
+
+PleaseWaitString:
+ db "PLEASE WAIT!@"
+
+CallCurrentTradeCenterFunction:
+ ld hl, TradeCenterPointerTable
+ ld b, 0
+ ld a, [wTradeCenterPointerTableIndex]
+ cp $ff
+ jp z, DisplayTitleScreen
+ add a
+ ld c, a
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+TradeCenter_SelectMon:
+ call ClearScreen
+ call Delay3
+ ld b, $9
+ call RunPaletteCommand
+ call LoadTrainerInfoTextBoxTiles
+ call TradeCenter_DrawPartyLists
+ call TradeCenter_DrawCancelBox
+ xor a
+ ld hl, wSerialSyncAndExchangeNybbleReceiveData
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+ ld [wMenuWatchMovingOutOfBounds], a
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ ld [wMenuJoypadPollCount], a
+ inc a
+ ld [wSerialExchangeNybbleSendData], a
+ jp .playerMonMenu
+.enemyMonMenu
+ xor a
+ ld [wMenuWatchMovingOutOfBounds], a
+ inc a
+ ld [wWhichTradeMonSelectionMenu], a
+ ld a, D_DOWN | D_LEFT | A_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, [wEnemyPartyCount]
+ ld [wMaxMenuItem], a
+ ld a, 9
+ ld [wTopMenuItemY], a
+ ld a, 1
+ ld [wTopMenuItemX], a
+.enemyMonMenu_HandleInput
+ ld hl, hFlagsFFFA
+ set 1, [hl]
+ call HandleMenuInput
+ ld hl, hFlagsFFFA
+ res 1, [hl]
+ and a
+ jp z, .getNewInput
+ bit 0, a ; A button pressed?
+ jr z, .enemyMonMenu_ANotPressed
+; if A button pressed
+ ld a, [wMaxMenuItem]
+ ld c, a
+ ld a, [wCurrentMenuItem]
+ cp c
+ jr c, .displayEnemyMonStats
+ ld a, [wMaxMenuItem]
+ dec a
+ ld [wCurrentMenuItem], a
+.displayEnemyMonStats
+ ld a, INIT_ENEMYOT_LIST
+ ld [wInitListType], a
+ callfar InitList ; the list isn't used
+ ld hl, wEnemyMons
+ call TradeCenter_DisplayStats
+ jp .getNewInput
+.enemyMonMenu_ANotPressed
+ bit 5, a ; Left pressed?
+ jr z, .enemyMonMenu_LeftNotPressed
+; if Left pressed, switch back to the player mon menu
+ xor a ; player mon menu
+ ld [wWhichTradeMonSelectionMenu], a
+ ld a, [wMenuCursorLocation]
+ ld l, a
+ ld a, [wMenuCursorLocation + 1]
+ ld h, a
+ ld a, [wTileBehindCursor]
+ ld [hl], a
+ ld a, [wCurrentMenuItem]
+ ld b, a
+ ld a, [wPartyCount]
+ dec a
+ cp b
+ jr nc, .playerMonMenu
+ ld [wCurrentMenuItem], a
+ jr .playerMonMenu
+.enemyMonMenu_LeftNotPressed
+ bit 7, a ; Down pressed?
+ jp z, .getNewInput
+ jp .selectedCancelMenuItem ; jump if Down pressed
+.playerMonMenu
+ xor a ; player mon menu
+ ld [wWhichTradeMonSelectionMenu], a
+ ld [wMenuWatchMovingOutOfBounds], a
+ ld a, D_DOWN | D_RIGHT | A_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, [wPartyCount]
+ ld [wMaxMenuItem], a
+ ld a, 1
+ ld [wTopMenuItemY], a
+ ld a, 1
+ ld [wTopMenuItemX], a
+ hlcoord 1, 1
+ lb bc, 6, 1
+ call ClearScreenArea
+.playerMonMenu_HandleInput
+ ld hl, hFlagsFFFA
+ set 1, [hl]
+ call HandleMenuInput
+ ld hl, hFlagsFFFA
+ res 1, [hl]
+ and a ; was anything pressed?
+ jr nz, .playerMonMenu_SomethingPressed
+ jp .getNewInput
+.playerMonMenu_SomethingPressed
+ bit 0, a ; A button pressed?
+ jr z, .playerMonMenu_ANotPressed
+ jp .chosePlayerMon ; jump if A button pressed
+; unreachable code
+ ld a, INIT_PLAYEROT_LIST
+ ld [wInitListType], a
+ callfar InitList ; the list isn't used
+ call TradeCenter_DisplayStats
+ jp .getNewInput
+.playerMonMenu_ANotPressed
+ bit 4, a ; Right pressed?
+ jr z, .playerMonMenu_RightNotPressed
+; if Right pressed, switch to the enemy mon menu
+ ld a, $1 ; enemy mon menu
+ ld [wWhichTradeMonSelectionMenu], a
+ ld a, [wMenuCursorLocation]
+ ld l, a
+ ld a, [wMenuCursorLocation + 1]
+ ld h, a
+ ld a, [wTileBehindCursor]
+ ld [hl], a
+ ld a, [wCurrentMenuItem]
+ ld b, a
+ ld a, [wEnemyPartyCount]
+ dec a
+ cp b
+ jr nc, .notPastLastEnemyMon
+; when switching to the enemy mon menu, if the menu selection would be past the last enemy mon, select the last enemy mon
+ ld [wCurrentMenuItem], a
+.notPastLastEnemyMon
+ jp .enemyMonMenu
+.playerMonMenu_RightNotPressed
+ bit 7, a ; Down pressed?
+ jr z, .getNewInput
+ jp .selectedCancelMenuItem ; jump if Down pressed
+.getNewInput
+ ld a, [wWhichTradeMonSelectionMenu]
+ and a
+ jp z, .playerMonMenu_HandleInput
+ jp .enemyMonMenu_HandleInput
+.chosePlayerMon
+ call SaveScreenTilesToBuffer1
+ call PlaceUnfilledArrowMenuCursor
+ ld a, [wMaxMenuItem]
+ ld c, a
+ ld a, [wCurrentMenuItem]
+ cp c
+ jr c, .displayStatsTradeMenu
+ ld a, [wMaxMenuItem]
+ dec a
+.displayStatsTradeMenu
+ push af
+ hlcoord 0, 14
+ lb bc, 2, 18
+ call CableClub_TextBoxBorder
+ hlcoord 2, 16
+ ld de, .statsTrade
+ call PlaceString
+ xor a
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ ld [wMenuJoypadPollCount], a
+ ld [wMaxMenuItem], a
+ ld a, 16
+ ld [wTopMenuItemY], a
+.selectStatsMenuItem
+ ld a, " "
+ ldcoord_a 11, 16
+ ld a, D_RIGHT | B_BUTTON | A_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, 1
+ ld [wTopMenuItemX], a
+ call HandleMenuInput
+ bit 4, a ; Right pressed?
+ jr nz, .selectTradeMenuItem
+ bit 1, a ; B button pressed?
+ jr z, .displayPlayerMonStats
+.cancelPlayerMonChoice
+ pop af
+ ld [wCurrentMenuItem], a
+ call LoadScreenTilesFromBuffer1
+ jp .playerMonMenu
+.selectTradeMenuItem
+ ld a, " "
+ ldcoord_a 1, 16
+ ld a, D_LEFT | B_BUTTON | A_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, 11
+ ld [wTopMenuItemX], a
+ call HandleMenuInput
+ bit 5, a ; Left pressed?
+ jr nz, .selectStatsMenuItem
+ bit 1, a ; B button pressed?
+ jr nz, .cancelPlayerMonChoice
+ jr .choseTrade
+.displayPlayerMonStats
+ pop af
+ ld [wCurrentMenuItem], a
+ ld a, INIT_PLAYEROT_LIST
+ ld [wInitListType], a
+ callfar InitList ; the list isn't used
+ call TradeCenter_DisplayStats
+ call LoadScreenTilesFromBuffer1
+ jp .playerMonMenu
+.choseTrade
+ call PlaceUnfilledArrowMenuCursor
+ pop af
+ ld [wCurrentMenuItem], a
+ ld [wTradingWhichPlayerMon], a
+ ld [wSerialExchangeNybbleSendData], a
+ call Serial_PrintWaitingTextAndSyncAndExchangeNybble
+ ld a, [wSerialSyncAndExchangeNybbleReceiveData]
+ cp $f
+ jp z, CallCurrentTradeCenterFunction ; go back to the beginning of the trade selection menu if the other person cancelled
+ ld [wTradingWhichEnemyMon], a
+ call TradeCenter_PlaceSelectedEnemyMonMenuCursor
+ ld a, $1 ; TradeCenter_Trade
+ ld [wTradeCenterPointerTableIndex], a
+ jp CallCurrentTradeCenterFunction
+.statsTrade
+ db "STATS TRADE@"
+.selectedCancelMenuItem
+ ld a, [wCurrentMenuItem]
+ ld b, a
+ ld a, [wMaxMenuItem]
+ cp b
+ jp nz, .getNewInput
+ ld a, [wMenuCursorLocation]
+ ld l, a
+ ld a, [wMenuCursorLocation + 1]
+ ld h, a
+ ld a, " "
+ ld [hl], a
+.cancelMenuItem_Loop
+ ld a, "▶" ; filled arrow cursor
+ ldcoord_a 1, 16
+.cancelMenuItem_JoypadLoop
+ call JoypadLowSensitivity
+ ldh a, [hJoy5]
+ and a ; pressed anything?
+ jr z, .cancelMenuItem_JoypadLoop
+ bit 0, a ; A button pressed?
+ jr nz, .cancelMenuItem_APressed
+ bit 6, a ; Up pressed?
+ jr z, .cancelMenuItem_JoypadLoop
+; if Up pressed
+ ld a, " "
+ ldcoord_a 1, 16
+ ld a, [wPartyCount]
+ dec a
+ ld [wCurrentMenuItem], a
+ jp .playerMonMenu
+.cancelMenuItem_APressed
+ ld a, "▷" ; unfilled arrow cursor
+ ldcoord_a 1, 16
+ ld a, $f
+ ld [wSerialExchangeNybbleSendData], a
+ call Serial_PrintWaitingTextAndSyncAndExchangeNybble
+ ld a, [wSerialSyncAndExchangeNybbleReceiveData]
+ cp $f ; did the other person choose Cancel too?
+ jr nz, .cancelMenuItem_Loop
+ ; fall through
+
+ReturnToCableClubRoom:
+ call GBPalWhiteOutWithDelay3
+ ld hl, wFontLoaded
+ ld a, [hl]
+ push af
+ push hl
+ res 0, [hl]
+ xor a
+ ld [wd72d], a
+ dec a
+ ld [wDestinationWarpID], a
+ call LoadMapData
+ farcall ClearVariablesOnEnterMap
+ pop hl
+ pop af
+ ld [hl], a
+ call GBFadeInFromWhite
+ ret
+
+TradeCenter_DrawCancelBox:
+ hlcoord 11, 15
+ ld a, $7e
+ ld bc, 2 * SCREEN_WIDTH + 9
+ call FillMemory
+ hlcoord 0, 15
+ lb bc, 1, 9
+ call CableClub_TextBoxBorder
+ hlcoord 2, 16
+ ld de, CancelTextString
+ jp PlaceString
+
+CancelTextString:
+ db "CANCEL@"
+
+TradeCenter_PlaceSelectedEnemyMonMenuCursor:
+ ld a, [wSerialSyncAndExchangeNybbleReceiveData]
+ hlcoord 1, 9
+ ld bc, SCREEN_WIDTH
+ call AddNTimes
+ ld [hl], "▷" ; cursor
+ ret
+
+TradeCenter_DisplayStats:
+ ld a, [wCurrentMenuItem]
+ ld [wWhichPokemon], a
+ predef StatusScreen
+ predef StatusScreen2
+ call Delay3
+ ld b, $9
+ call RunPaletteCommand
+ call GBPalNormal
+ call LoadTrainerInfoTextBoxTiles
+ call TradeCenter_DrawPartyLists
+ jp TradeCenter_DrawCancelBox
+
+TradeCenter_DrawPartyLists:
+ hlcoord 0, 0
+ lb bc, 6, 18
+ call CableClub_TextBoxBorder
+ hlcoord 0, 8
+ lb bc, 6, 18
+ call CableClub_TextBoxBorder
+ hlcoord 5, 0
+ ld de, wPlayerName
+ call PlaceString
+ hlcoord 5, 8
+ ld de, wLinkEnemyTrainerName
+ call PlaceString
+ hlcoord 2, 1
+ ld de, wPartySpecies
+ call TradeCenter_PrintPartyListNames
+ hlcoord 2, 9
+ ld de, wEnemyPartyMons
+ ; fall through
+
+TradeCenter_PrintPartyListNames:
+ ld c, $0
+.loop
+ ld a, [de]
+ cp $ff
+ ret z
+ ld [wd11e], a
+ push bc
+ push hl
+ push de
+ push hl
+ ld a, c
+ ldh [hPastLeadingZeros], a
+ call GetMonName
+ pop hl
+ call PlaceString
+ pop de
+ inc de
+ pop hl
+ ld bc, 20
+ add hl, bc
+ pop bc
+ inc c
+ jr .loop
+
+TradeCenter_Trade:
+ ld c, 100
+ call DelayFrames
+ xor a
+ ld [wSerialExchangeNybbleSendData + 1], a ; unnecessary
+ ld [wSerialExchangeNybbleReceiveData], a
+ ld [wMenuWatchMovingOutOfBounds], a
+ ld [wMenuJoypadPollCount], a
+ hlcoord 0, 12
+ lb bc, 4, 18
+ call CableClub_TextBoxBorder
+ ld a, [wTradingWhichPlayerMon]
+ ld hl, wPartySpecies
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hl]
+ ld [wd11e], a
+ call GetMonName
+ ld hl, wcd6d
+ ld de, wNameOfPlayerMonToBeTraded
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld a, [wTradingWhichEnemyMon]
+ ld hl, wEnemyPartyMons
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hl]
+ ld [wd11e], a
+ call GetMonName
+ ld hl, WillBeTradedText
+ bccoord 1, 14
+ call TextCommandProcessor
+ call SaveScreenTilesToBuffer1
+ hlcoord 10, 7
+ lb bc, 8, 11
+ ld a, TRADE_CANCEL_MENU
+ ld [wTwoOptionMenuID], a
+ ld a, TWO_OPTION_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ call LoadScreenTilesFromBuffer1
+ ld a, [wCurrentMenuItem]
+ and a
+ jr z, .tradeConfirmed
+; if trade cancelled
+ ld a, $1
+ ld [wSerialExchangeNybbleSendData], a
+ hlcoord 0, 12
+ lb bc, 4, 18
+ call CableClub_TextBoxBorder
+ hlcoord 1, 14
+ ld de, TradeCanceled
+ call PlaceString
+ call Serial_PrintWaitingTextAndSyncAndExchangeNybble
+ jp .tradeCancelled
+.tradeConfirmed
+ ld a, $2
+ ld [wSerialExchangeNybbleSendData], a
+ call Serial_PrintWaitingTextAndSyncAndExchangeNybble
+ ld a, [wSerialSyncAndExchangeNybbleReceiveData]
+ dec a ; did the other person cancel?
+ jr nz, .doTrade
+; if the other person cancelled
+ hlcoord 0, 12
+ lb bc, 4, 18
+ call CableClub_TextBoxBorder
+ hlcoord 1, 14
+ ld de, TradeCanceled
+ call PlaceString
+ jp .tradeCancelled
+.doTrade
+ ld a, [wTradingWhichPlayerMon]
+ ld hl, wPartyMonOT
+ call SkipFixedLengthTextEntries
+ ld de, wTradedPlayerMonOT
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld hl, wPartyMon1Species
+ ld a, [wTradingWhichPlayerMon]
+ ld bc, wPartyMon2 - wPartyMon1
+ call AddNTimes
+ ld bc, wPartyMon1OTID - wPartyMon1
+ add hl, bc
+ ld a, [hli]
+ ld [wTradedPlayerMonOTID], a
+ ld a, [hl]
+ ld [wTradedPlayerMonOTID + 1], a
+ ld a, [wTradingWhichEnemyMon]
+ ld hl, wEnemyMonOT
+ call SkipFixedLengthTextEntries
+ ld de, wTradedEnemyMonOT
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld hl, wEnemyMons
+ ld a, [wTradingWhichEnemyMon]
+ ld bc, wEnemyMon2 - wEnemyMon1
+ call AddNTimes
+ ld bc, wEnemyMon1OTID - wEnemyMon1
+ add hl, bc
+ ld a, [hli]
+ ld [wTradedEnemyMonOTID], a
+ ld a, [hl]
+ ld [wTradedEnemyMonOTID + 1], a
+ ld a, [wTradingWhichPlayerMon]
+ ld [wWhichPokemon], a
+ ld hl, wPartySpecies
+ ld b, 0
+ ld c, a
+ add hl, bc
+ ld a, [hl]
+ ld [wTradedPlayerMonSpecies], a
+ callabd_ModifyPikachuHappiness PIKAHAPPY_TRADE
+ xor a
+ ld [wRemoveMonFromBox], a
+ call RemovePokemon
+ ld a, [wTradingWhichEnemyMon]
+ ld c, a
+ ld [wWhichPokemon], a
+ ld hl, wEnemyPartyMons
+ ld d, 0
+ ld e, a
+ add hl, de
+ ld a, [hl]
+ ld [wcf91], a
+ ld hl, wEnemyMons
+ ld a, c
+ ld bc, wEnemyMon2 - wEnemyMon1
+ call AddNTimes
+ ld de, wLoadedMon
+ ld bc, wEnemyMon2 - wEnemyMon1
+ call CopyData
+ call AddEnemyMonToPlayerParty
+ ld a, [wPartyCount]
+ dec a
+ ld [wWhichPokemon], a
+ ld a, $1
+ ld [wForceEvolution], a
+ ld a, [wTradingWhichEnemyMon]
+ ld hl, wEnemyPartyMons
+ ld b, 0
+ ld c, a
+ add hl, bc
+ ld a, [hl]
+ ld [wTradedEnemyMonSpecies], a
+ ld a, 10
+ ld [wAudioFadeOutControl], a
+ ld a, BANK(Music_SafariZone)
+ ld [wAudioSavedROMBank], a
+ ld a, MUSIC_SAFARI_ZONE
+ ld [wNewSoundID], a
+ call PlaySound
+ ld c, 100
+ call DelayFrames
+ call ClearScreen
+ call LoadHpBarAndStatusTilePatterns
+ xor a
+ ld [wUnusedCC5B], a
+ ldh a, [hSerialConnectionStatus]
+ cp USING_EXTERNAL_CLOCK
+ jr z, .usingExternalClock
+ predef InternalClockTradeAnim
+ jr .tradeCompleted
+.usingExternalClock
+ predef ExternalClockTradeAnim
+.tradeCompleted
+ callfar TryEvolvingMon
+ call ClearScreen
+ call LoadTrainerInfoTextBoxTiles
+ call Serial_PrintWaitingTextAndSyncAndExchangeNybble
+ ld c, 40
+ call DelayFrames
+ call Delay3
+ ld b, $9
+ call RunPaletteCommand
+ hlcoord 0, 12
+ lb bc, 4, 18
+ call CableClub_TextBoxBorder
+ hlcoord 1, 14
+ ld de, TradeCompleted
+ call PlaceString
+ predef SaveSAVtoSRAM2
+ ld c, 50
+ call DelayFrames
+ xor a
+ ld [wTradeCenterPointerTableIndex], a
+ jp CableClub_DoBattleOrTradeAgain
+.tradeCancelled
+ ld c, 100
+ call DelayFrames
+ xor a ; TradeCenter_SelectMon
+ ld [wTradeCenterPointerTableIndex], a
+ jp CallCurrentTradeCenterFunction
+
+WillBeTradedText:
+ text_far _WillBeTradedText
+ text_end
+
+TradeCompleted:
+ db "Trade completed!@"
+
+TradeCanceled:
+ db "Too bad! The trade"
+ next "was canceled!@"
+
+TradeCenterPointerTable:
+ dw TradeCenter_SelectMon
+ dw TradeCenter_Trade
+
+CableClub_Run:
+ ld a, [wLinkState]
+ cp LINK_STATE_START_TRADE
+ jr z, .doBattleOrTrade
+ cp LINK_STATE_START_BATTLE
+ jr z, .doBattleOrTrade
+ cp LINK_STATE_RESET ; this is never used
+ ret nz
+ predef EmptyFunc
+ jp Init
+.doBattleOrTrade
+ call CableClub_DoBattleOrTrade
+ ld hl, Club_GFX
+ ld a, h
+ ld [wTilesetGfxPtr + 1], a
+ ld a, l
+ ld [wTilesetGfxPtr], a
+ ld a, BANK(Club_GFX)
+ ld [wTilesetBank], a
+ ld hl, Club_Coll
+ ld a, h
+ ld [wTilesetCollisionPtr + 1], a
+ ld a, l
+ ld [wTilesetCollisionPtr], a
+ xor a
+ ld [wGrassRate], a
+ inc a ; LINK_STATE_IN_CABLE_CLUB
+ ld [wLinkState], a
+ ldh [hJoy5], a
+ ld a, 10
+ ld [wAudioFadeOutControl], a
+ ld a, BANK(Music_Celadon)
+ ld [wAudioSavedROMBank], a
+ ld a, MUSIC_CELADON
+ ld [wNewSoundID], a
+ jp PlaySound
+
+EmptyFunc:
+ ret
+
+Diploma_TextBoxBorder:
+ call GetPredefRegisters
+
+; b = height
+; c = width
+CableClub_TextBoxBorder:
+ push hl
+ ld a, $78 ; border upper left corner tile
+ ld [hli], a
+ inc a ; border top horizontal line tile
+ call CableClub_DrawHorizontalLine
+ inc a ; border upper right corner tile
+ ld [hl], a
+ pop hl
+ ld de, 20
+ add hl, de
+.loop
+ push hl
+ ld a, $7b ; border left vertical line tile
+ ld [hli], a
+ ld a, " "
+ call CableClub_DrawHorizontalLine
+ ld [hl], $77 ; border right vertical line tile
+ pop hl
+ ld de, 20
+ add hl, de
+ dec b
+ jr nz, .loop
+ ld a, $7c ; border lower left corner tile
+ ld [hli], a
+ ld a, $76 ; border bottom horizontal line tile
+ call CableClub_DrawHorizontalLine
+ ld [hl], $7d ; border lower right corner tile
+ ret
+
+; c = width
+CableClub_DrawHorizontalLine:
+ ld d, c
+.loop
+ ld [hli], a
+ dec d
+ jr nz, .loop
+ ret
+
+LoadTrainerInfoTextBoxTiles:
+ ld de, TrainerInfoTextBoxTileGraphics
+ ld hl, vChars2 tile $76
+ lb bc, BANK(TrainerInfoTextBoxTileGraphics), (TrainerInfoTextBoxTileGraphicsEnd - TrainerInfoTextBoxTileGraphics) / $10
+ jp CopyVideoData
diff --git a/engine/link/cable_club_npc.asm b/engine/link/cable_club_npc.asm
new file mode 100755
index 00000000..4d0a0a8a
--- /dev/null
+++ b/engine/link/cable_club_npc.asm
@@ -0,0 +1,208 @@
+CableClubNPC::
+ ld hl, CableClubNPCWelcomeText
+ call PrintText
+ call CheckPikachuFollowingPlayer
+ jr nz, .asm_7048
+ CheckEvent EVENT_GOT_POKEDEX
+ jp nz, .receivedPokedex
+; if the player hasn't received the pokedex
+.asm_7048
+ ld c, 60
+ call DelayFrames
+ ld hl, CableClubNPCMakingPreparationsText
+ call PrintText
+ jp .didNotConnect
+.receivedPokedex
+ ld a, $1
+ ld [wMenuJoypadPollCount], a
+ ld a, 90
+ ld [wLinkTimeoutCounter], a
+.establishConnectionLoop
+ ldh a, [hSerialConnectionStatus]
+ cp USING_INTERNAL_CLOCK
+ jr z, .establishedConnection
+ cp USING_EXTERNAL_CLOCK
+ jr z, .establishedConnection
+ ld a, CONNECTION_NOT_ESTABLISHED
+ ldh [hSerialConnectionStatus], a
+ ld a, ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK
+ ldh [rSB], a
+ xor a
+ ldh [hSerialReceiveData], a
+ ld a, START_TRANSFER_EXTERNAL_CLOCK
+ ldh [rSC], a
+ ld a, [wLinkTimeoutCounter]
+ dec a
+ ld [wLinkTimeoutCounter], a
+ jr z, .failedToEstablishConnection
+ ld a, ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK
+ ldh [rSB], a
+ ld a, START_TRANSFER_INTERNAL_CLOCK
+ ldh [rSC], a
+ call DelayFrame
+ jr .establishConnectionLoop
+.establishedConnection
+ call Serial_SendZeroByte
+ call DelayFrame
+ call Serial_SendZeroByte
+ ld c, 50
+ call DelayFrames
+ ld hl, CableClubNPCPleaseApplyHereHaveToSaveText
+ call PrintText
+ xor a
+ ld [wMenuJoypadPollCount], a
+ call YesNoChoice
+ ld a, $1
+ ld [wMenuJoypadPollCount], a
+ ld a, [wCurrentMenuItem]
+ and a
+ jr nz, .choseNo
+ callfar SaveSAVtoSRAM
+ call WaitForSoundToFinish
+ ld a, SFX_SAVE
+ call PlaySoundWaitForCurrent
+ ld hl, CableClubNPCPleaseWaitText
+ call PrintText
+ ld hl, wUnknownSerialCounter
+ ld a, $3
+ ld [hli], a
+ xor a
+ ld [hl], a
+ ldh [hSerialReceivedNewData], a
+ ld [wSerialExchangeNybbleSendData], a
+ call Serial_SyncAndExchangeNybble
+ ld hl, wUnknownSerialCounter
+ ld a, [hli]
+ inc a
+ jr nz, .connected
+ ld a, [hl]
+ inc a
+ jr nz, .connected
+ ld b, 10
+.syncLoop
+ call DelayFrame
+ call Serial_SendZeroByte
+ dec b
+ jr nz, .syncLoop
+ call CloseLinkConnection
+ ld hl, CableClubNPCLinkClosedBecauseOfInactivityText
+ call PrintText
+ jr .didNotConnect
+.failedToEstablishConnection
+ ld hl, CableClubNPCAreaReservedFor2FriendsLinkedByCableText
+ call PrintText
+ jr .didNotConnect
+.choseNo
+ call CloseLinkConnection
+ ld hl, CableClubNPCPleaseComeAgainText
+ call PrintText
+.didNotConnect
+ xor a
+ ld hl, wUnknownSerialCounter
+ ld [hli], a
+ ld [hl], a
+ ld hl, wd72e
+ res 6, [hl]
+ xor a
+ ld [wMenuJoypadPollCount], a
+ ret
+.connected
+ xor a
+ ld [hld], a
+ ld [hl], a
+ ld a, [wLetterPrintingDelayFlags]
+ push af
+ callfar LinkMenu
+ pop af
+ ld [wLetterPrintingDelayFlags], a
+ ret
+
+; seems to be similar of Serial_SyncAndExchangeNybble
+Serial_SyncAndExchangeNybbleDouble:
+ ld a, $ff
+ ld [wSerialExchangeNybbleReceiveData], a
+.loop
+ call Serial_ExchangeNybble
+ call DelayFrame
+ push hl
+ ld hl, wUnknownSerialCounter + 1
+ dec [hl]
+ jr nz, .next
+ dec hl
+ dec [hl]
+ jr nz, .next
+ pop hl
+ jr .setUnknownSerialCounterToFFFF
+.next
+ pop hl
+ ld a, [wSerialExchangeNybbleReceiveData]
+ inc a
+ jr z, .loop
+ call DelayFrame
+ ld a, $ff
+ ld [wSerialExchangeNybbleReceiveData], a
+ call Serial_ExchangeNybble
+ ld a, [wSerialExchangeNybbleReceiveData]
+ inc a
+ jr z, .loop
+ ld b, 10
+.syncLoop1
+ call DelayFrame
+ call Serial_ExchangeNybble
+ dec b
+ jr nz, .syncLoop1
+ ld b, 10
+.syncLoop2
+ call DelayFrame
+ call Serial_SendZeroByte
+ dec b
+ jr nz, .syncLoop2
+ ld a, [wSerialExchangeNybbleReceiveData]
+ ld [wSerialSyncAndExchangeNybbleReceiveData], a
+ ret
+.setUnknownSerialCounterToFFFF
+ ld a, $ff
+ ld [wUnknownSerialCounter], a
+ ld [wUnknownSerialCounter + 1], a
+ ret
+
+CableClubNPCAreaReservedFor2FriendsLinkedByCableText:
+ text_far _CableClubNPCAreaReservedFor2FriendsLinkedByCableText
+ text_end
+
+CableClubNPCWelcomeText:
+ text_far _CableClubNPCWelcomeText
+ text_end
+
+CableClubNPCPleaseApplyHereHaveToSaveText:
+ text_far _CableClubNPCPleaseApplyHereHaveToSaveText
+ text_end
+
+CableClubNPCPleaseWaitText:
+ text_far _CableClubNPCPleaseWaitText
+ text_pause
+ text_end
+
+CableClubNPCLinkClosedBecauseOfInactivityText:
+ text_far _CableClubNPCLinkClosedBecauseOfInactivityText
+ text_end
+
+CableClubNPCPleaseComeAgainText:
+ text_far _CableClubNPCPleaseComeAgainText
+ text_end
+
+CableClubNPCMakingPreparationsText:
+ text_far _CableClubNPCMakingPreparationsText
+ text_end
+
+CloseLinkConnection:
+ call Delay3
+ ld a, CONNECTION_NOT_ESTABLISHED
+ ldh [hSerialConnectionStatus], a
+ ld a, ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK
+ ldh [rSB], a
+ xor a
+ ldh [hSerialReceiveData], a
+ ld a, START_TRANSFER_EXTERNAL_CLOCK
+ ldh [rSC], a
+ ret
diff --git a/engine/link/print_waiting_text.asm b/engine/link/print_waiting_text.asm
new file mode 100644
index 00000000..98a44970
--- /dev/null
+++ b/engine/link/print_waiting_text.asm
@@ -0,0 +1,19 @@
+PrintWaitingText::
+ hlcoord 3, 10
+ lb bc, 1, 11
+ ld a, [wIsInBattle]
+ and a
+ jr z, .asm_4b9a
+ call TextBoxBorder
+ jr .asm_4b9d
+.asm_4b9a
+ call CableClub_TextBoxBorder
+.asm_4b9d
+ hlcoord 4, 11
+ ld de, WaitingText
+ call PlaceString
+ ld c, 50
+ jp DelayFrames
+
+WaitingText:
+ db "Waiting...!@"
diff --git a/engine/load_mon_data.asm b/engine/load_mon_data.asm
deleted file mode 100644
index e708113f..00000000
--- a/engine/load_mon_data.asm
+++ /dev/null
@@ -1,68 +0,0 @@
-LoadMonData_:
-; Load monster [wWhichPokemon] from list [wMonDataLocation]:
-; 0: partymon
-; 1: enemymon
-; 2: boxmon
-; 3: daycaremon
-; Return monster id at wcf91 and its data at wLoadedMon.
-; Also load base stats at wMonHeader for convenience.
-
- ld a, [wDayCareMonSpecies]
- ld [wcf91], a
- ld a, [wMonDataLocation]
- cp DAYCARE_DATA
- jr z, .GetMonHeader
-
- ld a, [wWhichPokemon]
- ld e, a
- call GetMonSpecies
-
-.GetMonHeader
- ld a, [wcf91]
- ld [wd0b5], a ; input for GetMonHeader
- call GetMonHeader
-
- ld hl, wPartyMons
- ld bc, wPartyMon2 - wPartyMon1
- ld a, [wMonDataLocation]
- cp ENEMY_PARTY_DATA
- jr c, .getMonEntry
-
- ld hl, wEnemyMons
- jr z, .getMonEntry
-
- cp 2
- ld hl, wBoxMons
- ld bc, wBoxMon2 - wBoxMon1
- jr z, .getMonEntry
-
- ld hl, wDayCareMon
- jr .copyMonData
-
-.getMonEntry
- ld a, [wWhichPokemon]
- call AddNTimes
-
-.copyMonData
- ld de, wLoadedMon
- ld bc, wPartyMon2 - wPartyMon1
- jp CopyData
-
-; get species of mon e in list [wMonDataLocation] for LoadMonData
-GetMonSpecies:
- ld hl, wPartySpecies
- ld a, [wMonDataLocation]
- and a
- jr z, .getSpecies
- dec a
- jr z, .enemyParty
- ld hl, wBoxSpecies
- jr .getSpecies
-.enemyParty
- ld hl, wEnemyPartyMons
-.getSpecies
- ld d, 0
- add hl, de
- ld a, [hl]
- ld [wcf91], a
- ret
diff --git a/engine/load_pokedex_tiles.asm b/engine/load_pokedex_tiles.asm
deleted file mode 100755
index 70bcf04d..00000000
--- a/engine/load_pokedex_tiles.asm
+++ /dev/null
@@ -1,11 +0,0 @@
-; Loads tile patterns for tiles used in the pokedex.
-LoadPokedexTilePatterns:
- call LoadHpBarAndStatusTilePatterns
- ld de, PokedexTileGraphics
- ld hl, vChars2 + $600
- lb bc, BANK(PokedexTileGraphics), (PokedexTileGraphicsEnd - PokedexTileGraphics) / $10
- call CopyVideoData
- ld de, PokeballTileGraphics
- ld hl, vChars2 + $720
- lb bc, BANK(PokeballTileGraphics), $01
- jp CopyVideoData ; load pokeball tile for marking caught mons
diff --git a/engine/math/bcd.asm b/engine/math/bcd.asm
new file mode 100644
index 00000000..92bf6f17
--- /dev/null
+++ b/engine/math/bcd.asm
@@ -0,0 +1,218 @@
+; divide hMoney by hDivideBCDDivisor
+; return output in hDivideBCDQuotient (same as hDivideBCDDivisor)
+; used only to halve player money upon losing a fight
+DivideBCDPredef::
+DivideBCDPredef2::
+DivideBCDPredef3:: ; only used function
+DivideBCDPredef4::
+ call GetPredefRegisters
+
+DivideBCD::
+ xor a
+ ldh [hDivideBCDBuffer], a
+ ldh [hDivideBCDBuffer+1], a
+ ldh [hDivideBCDBuffer+2], a
+ ld d, $1
+.mulBy10Loop
+; multiply the divisor by 10 until the leading digit is nonzero
+; to set up the standard long division algorithm
+ ldh a, [hDivideBCDDivisor]
+ and $f0
+ jr nz, .next
+ inc d
+ ldh a, [hDivideBCDDivisor]
+ swap a
+ and $f0
+ ld b, a
+ ldh a, [hDivideBCDDivisor+1]
+ swap a
+ ldh [hDivideBCDDivisor+1], a
+ and $f
+ or b
+ ldh [hDivideBCDDivisor], a
+ ldh a, [hDivideBCDDivisor+1]
+ and $f0
+ ld b, a
+ ldh a, [hDivideBCDDivisor+2]
+ swap a
+ ldh [hDivideBCDDivisor+2], a
+ and $f
+ or b
+ ldh [hDivideBCDDivisor+1], a
+ ldh a, [hDivideBCDDivisor+2]
+ and $f0
+ ldh [hDivideBCDDivisor+2], a
+ jr .mulBy10Loop
+
+.next
+ push de
+ push de
+ call DivideBCD_getNextDigit
+ pop de
+ ld a, b
+ swap a
+ and $f0
+ ldh [hDivideBCDBuffer], a
+ dec d
+ jr z, .next2
+ push de
+ call DivideBCD_divDivisorBy10
+ call DivideBCD_getNextDigit
+ pop de
+ ldh a, [hDivideBCDBuffer]
+ or b
+ ldh [hDivideBCDBuffer], a
+ dec d
+ jr z, .next2
+ push de
+ call DivideBCD_divDivisorBy10
+ call DivideBCD_getNextDigit
+ pop de
+ ld a, b
+ swap a
+ and $f0
+ ldh [hDivideBCDBuffer+1], a
+ dec d
+ jr z, .next2
+ push de
+ call DivideBCD_divDivisorBy10
+ call DivideBCD_getNextDigit
+ pop de
+ ldh a, [hDivideBCDBuffer+1]
+ or b
+ ldh [hDivideBCDBuffer+1], a
+ dec d
+ jr z, .next2
+ push de
+ call DivideBCD_divDivisorBy10
+ call DivideBCD_getNextDigit
+ pop de
+ ld a, b
+ swap a
+ and $f0
+ ldh [hDivideBCDBuffer+2], a
+ dec d
+ jr z, .next2
+ push de
+ call DivideBCD_divDivisorBy10
+ call DivideBCD_getNextDigit
+ pop de
+ ldh a, [hDivideBCDBuffer+2]
+ or b
+ ldh [hDivideBCDBuffer+2], a
+.next2
+ ldh a, [hDivideBCDBuffer]
+ ldh [hDivideBCDQuotient], a ; the same memory location as hDivideBCDDivisor
+ ldh a, [hDivideBCDBuffer+1]
+ ldh [hDivideBCDQuotient+1], a
+ ldh a, [hDivideBCDBuffer+2]
+ ldh [hDivideBCDQuotient+2], a
+ pop de
+ ld a, $6
+ sub d
+ and a
+ ret z
+.divResultBy10loop
+ push af
+ call DivideBCD_divDivisorBy10
+ pop af
+ dec a
+ jr nz, .divResultBy10loop
+ ret
+
+DivideBCD_divDivisorBy10:
+ ldh a, [hDivideBCDDivisor+2]
+ swap a
+ and $f
+ ld b, a
+ ldh a, [hDivideBCDDivisor+1]
+ swap a
+ ldh [hDivideBCDDivisor+1], a
+ and $f0
+ or b
+ ldh [hDivideBCDDivisor+2], a
+ ldh a, [hDivideBCDDivisor+1]
+ and $f
+ ld b, a
+ ldh a, [hDivideBCDDivisor]
+ swap a
+ ldh [hDivideBCDDivisor], a
+ and $f0
+ or b
+ ldh [hDivideBCDDivisor+1], a
+ ldh a, [hDivideBCDDivisor]
+ and $f
+ ldh [hDivideBCDDivisor], a
+ ret
+
+DivideBCD_getNextDigit:
+ ld bc, $3
+.loop
+ ld de, hMoney ; the dividend
+ ld hl, hDivideBCDDivisor
+ push bc
+ call StringCmp
+ pop bc
+ ret c
+ inc b
+ ld de, hMoney + 2 ; since SubBCD works starting from the least significant digit
+ ld hl, hDivideBCDDivisor + 2
+ push bc
+ call SubBCD
+ pop bc
+ jr .loop
+
+
+AddBCDPredef::
+ call GetPredefRegisters
+
+AddBCD::
+ and a
+ ld b, c
+.add
+ ld a, [de]
+ adc [hl]
+ daa
+ ld [de], a
+ dec de
+ dec hl
+ dec c
+ jr nz, .add
+ jr nc, .done
+ ld a, $99
+ inc de
+.fill
+ ld [de], a
+ inc de
+ dec b
+ jr nz, .fill
+.done
+ ret
+
+
+SubBCDPredef::
+ call GetPredefRegisters
+
+SubBCD::
+ and a
+ ld b, c
+.sub
+ ld a, [de]
+ sbc [hl]
+ daa
+ ld [de], a
+ dec de
+ dec hl
+ dec c
+ jr nz, .sub
+ jr nc, .done
+ ld a, $00
+ inc de
+.fill
+ ld [de], a
+ inc de
+ dec b
+ jr nz, .fill
+ scf
+.done
+ ret
diff --git a/engine/math/multiply_divide.asm b/engine/math/multiply_divide.asm
new file mode 100755
index 00000000..2fcda158
--- /dev/null
+++ b/engine/math/multiply_divide.asm
@@ -0,0 +1,143 @@
+_Multiply::
+ ld a, $8
+ ld b, a
+ xor a
+ ldh [hProduct], a
+ ldh [hMultiplyBuffer], a
+ ldh [hMultiplyBuffer+1], a
+ ldh [hMultiplyBuffer+2], a
+ ldh [hMultiplyBuffer+3], a
+.loop
+ ldh a, [hMultiplier]
+ srl a
+ ldh [hMultiplier], a ; (aliases: hDivisor, hMultiplier, hPowerOf10)
+ jr nc, .smallMultiplier
+ ldh a, [hMultiplyBuffer+3]
+ ld c, a
+ ldh a, [hMultiplicand+2]
+ add c
+ ldh [hMultiplyBuffer+3], a
+ ldh a, [hMultiplyBuffer+2]
+ ld c, a
+ ldh a, [hMultiplicand+1]
+ adc c
+ ldh [hMultiplyBuffer+2], a
+ ldh a, [hMultiplyBuffer+1]
+ ld c, a
+ ldh a, [hMultiplicand] ; (aliases: hMultiplicand)
+ adc c
+ ldh [hMultiplyBuffer+1], a
+ ldh a, [hMultiplyBuffer]
+ ld c, a
+ ldh a, [hProduct] ; (aliases: hProduct, hPastLeadingZeros, hQuotient)
+ adc c
+ ldh [hMultiplyBuffer], a
+.smallMultiplier
+ dec b
+ jr z, .done
+ ldh a, [hMultiplicand+2]
+ sla a
+ ldh [hMultiplicand+2], a
+ ldh a, [hMultiplicand+1]
+ rl a
+ ldh [hMultiplicand+1], a
+ ldh a, [hMultiplicand]
+ rl a
+ ldh [hMultiplicand], a
+ ldh a, [hProduct]
+ rl a
+ ldh [hProduct], a
+ jr .loop
+.done
+ ldh a, [hMultiplyBuffer+3]
+ ldh [hProduct+3], a
+ ldh a, [hMultiplyBuffer+2]
+ ldh [hProduct+2], a
+ ldh a, [hMultiplyBuffer+1]
+ ldh [hProduct+1], a
+ ldh a, [hMultiplyBuffer]
+ ldh [hProduct], a
+ ret
+
+_Divide::
+ xor a
+ ldh [hDivideBuffer], a
+ ldh [hDivideBuffer+1], a
+ ldh [hDivideBuffer+2], a
+ ldh [hDivideBuffer+3], a
+ ldh [hDivideBuffer+4], a
+ ld a, $9
+ ld e, a
+.asm_37db3
+ ldh a, [hDivideBuffer]
+ ld c, a
+ ldh a, [hDividend+1] ; (aliases: hMultiplicand)
+ sub c
+ ld d, a
+ ldh a, [hDivisor] ; (aliases: hDivisor, hMultiplier, hPowerOf10)
+ ld c, a
+ ldh a, [hDividend] ; (aliases: hProduct, hPastLeadingZeros, hQuotient)
+ sbc c
+ jr c, .asm_37dce
+ ldh [hDividend], a ; (aliases: hProduct, hPastLeadingZeros, hQuotient)
+ ld a, d
+ ldh [hDividend+1], a ; (aliases: hMultiplicand)
+ ldh a, [hDivideBuffer+4]
+ inc a
+ ldh [hDivideBuffer+4], a
+ jr .asm_37db3
+.asm_37dce
+ ld a, b
+ cp $1
+ jr z, .asm_37e18
+ ldh a, [hDivideBuffer+4]
+ sla a
+ ldh [hDivideBuffer+4], a
+ ldh a, [hDivideBuffer+3]
+ rl a
+ ldh [hDivideBuffer+3], a
+ ldh a, [hDivideBuffer+2]
+ rl a
+ ldh [hDivideBuffer+2], a
+ ldh a, [hDivideBuffer+1]
+ rl a
+ ldh [hDivideBuffer+1], a
+ dec e
+ jr nz, .asm_37e04
+ ld a, $8
+ ld e, a
+ ldh a, [hDivideBuffer]
+ ldh [hDivisor], a ; (aliases: hDivisor, hMultiplier, hPowerOf10)
+ xor a
+ ldh [hDivideBuffer], a
+ ldh a, [hDividend+1] ; (aliases: hMultiplicand)
+ ldh [hDividend], a ; (aliases: hProduct, hPastLeadingZeros, hQuotient)
+ ldh a, [hDividend+2]
+ ldh [hDividend+1], a ; (aliases: hMultiplicand)
+ ldh a, [hDividend+3]
+ ldh [hDividend+2], a
+.asm_37e04
+ ld a, e
+ cp $1
+ jr nz, .asm_37e0a
+ dec b
+.asm_37e0a
+ ldh a, [hDivisor] ; (aliases: hDivisor, hMultiplier, hPowerOf10)
+ srl a
+ ldh [hDivisor], a ; (aliases: hDivisor, hMultiplier, hPowerOf10)
+ ldh a, [hDivideBuffer]
+ rr a
+ ldh [hDivideBuffer], a
+ jr .asm_37db3
+.asm_37e18
+ ldh a, [hDividend+1] ; (aliases: hMultiplicand)
+ ldh [hRemainder], a ; (aliases: hDivisor, hMultiplier, hPowerOf10)
+ ldh a, [hDivideBuffer+4]
+ ldh [hQuotient+3], a
+ ldh a, [hDivideBuffer+3]
+ ldh [hQuotient+2], a
+ ldh a, [hDivideBuffer+2]
+ ldh [hQuotient+1], a ; (aliases: hMultiplicand)
+ ldh a, [hDivideBuffer+1]
+ ldh [hDividend], a ; (aliases: hProduct, hPastLeadingZeros, hQuotient)
+ ret
diff --git a/engine/math/random.asm b/engine/math/random.asm
new file mode 100755
index 00000000..c8760157
--- /dev/null
+++ b/engine/math/random.asm
@@ -0,0 +1,13 @@
+Random_::
+; Generate a random 16-bit value.
+ ldh a, [rDIV]
+ ld b, a
+ ldh a, [hRandomAdd]
+ adc b
+ ldh [hRandomAdd], a
+ ldh a, [rDIV]
+ ld b, a
+ ldh a, [hRandomSub]
+ sbc b
+ ldh [hRandomSub], a
+ ret
diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm
deleted file mode 100644
index 41626310..00000000
--- a/engine/menu/bills_pc.asm
+++ /dev/null
@@ -1,598 +0,0 @@
-DisplayPCMainMenu::
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- call SaveScreenTilesToBuffer2
- ld a, [wNumHoFTeams]
- and a
- jr nz, .leaguePCAvailable
- CheckEvent EVENT_GOT_POKEDEX
- jr z, .noOaksPC
- ld a, [wNumHoFTeams]
- and a
- jr nz, .leaguePCAvailable
- coord hl, 0, 0
- lb bc, 8, 14
- jr .next
-.noOaksPC
- coord hl, 0, 0
- lb bc, 6, 14
- jr .next
-.leaguePCAvailable
- coord hl, 0, 0
- lb bc, 10, 14
-.next
- call TextBoxBorder
- call UpdateSprites
- ld a, 3
- ld [wMaxMenuItem], a
- CheckEvent EVENT_MET_BILL
- jr nz, .metBill
- coord hl, 2, 2
- ld de, SomeonesPCText
- jr .next2
-.metBill
- coord hl, 2, 2
- ld de, BillsPCText
-.next2
- call PlaceString
- coord hl, 2, 4
- ld de, wPlayerName
- call PlaceString
- ld l, c
- ld h, b
- ld de, PlayersPCText
- call PlaceString
- CheckEvent EVENT_GOT_POKEDEX
- jr z, .noOaksPC2
- coord hl, 2, 6
- ld de, OaksPCText
- call PlaceString
- ld a, [wNumHoFTeams]
- and a
- jr z, .noLeaguePC
- ld a, 4
- ld [wMaxMenuItem], a
- coord hl, 2, 8
- ld de, PKMNLeaguePCText
- call PlaceString
- coord hl, 2, 10
- ld de, LogOffPCText
- jr .next3
-.noLeaguePC
- coord hl, 2, 8
- ld de, LogOffPCText
- jr .next3
-.noOaksPC2
- ld a, $2
- ld [wMaxMenuItem], a
- coord hl, 2, 6
- ld de, LogOffPCText
-.next3
- call PlaceString
- ld a, A_BUTTON | B_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, 2
- ld [wTopMenuItemY], a
- ld a, 1
- ld [wTopMenuItemX], a
- xor a
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- ret
-
-SomeonesPCText: db "SOMEONE's PC@"
-BillsPCText: db "BILL's PC@"
-PlayersPCText: db "'s PC@"
-OaksPCText: db "PROF.OAK's PC@"
-PKMNLeaguePCText: db $4a, "LEAGUE@"
-LogOffPCText: db "LOG OFF@"
-
-BillsPC_::
- ld hl, wd730
- set 6, [hl]
- xor a
- ld [wParentMenuItem], a
- inc a ; MONSTER_NAME
- ld [wNameListType], a
- call LoadHpBarAndStatusTilePatterns
- ld a, [wListScrollOffset]
- push af
- ld a, [wFlags_0xcd60]
- bit 3, a ; accessing Bill's PC through another PC?
- jr nz, BillsPCMenu
-; accessing it directly
- ld a, SFX_TURN_ON_PC
- call PlaySound
- ld hl, SwitchOnText
- call PrintText
-
-BillsPCMenu:
- ld a, [wParentMenuItem]
- ld [wCurrentMenuItem], a
- ld hl, vChars2 + $780
- ld de, PokeballTileGraphics
- lb bc, BANK(PokeballTileGraphics), $01
- call CopyVideoData
- call LoadScreenTilesFromBuffer2DisableBGTransfer
- coord hl, 0, 12
- lb bc, 4, 18
- call TextBoxBorder
- coord hl, 0, 0
- lb bc, 12, 12
- call TextBoxBorder
- call UpdateSprites
- coord hl, 2, 2
- ld de, BillsPCMenuText
- call PlaceString
- ld hl, wTopMenuItemY
- ld a, 2
- ld [hli], a ; wTopMenuItemY
- dec a
- ld [hli], a ; wTopMenuItemX
- inc hl
- inc hl
- ld a, 5
- ld [hli], a ; wMaxMenuItem
- ld a, A_BUTTON | B_BUTTON
- ld [hli], a ; wMenuWatchedKeys
- xor a
- ld [hli], a ; wLastMenuItem
- ld [hli], a ; wPartyAndBillsPCSavedMenuItem
- ld hl, wListScrollOffset
- ld [hli], a ; wListScrollOffset
- ld [hl], a ; wMenuWatchMovingOutOfBounds
- ld [wPlayerMonNumber], a
- coord hl, 9, 14
- lb bc, 2, 9
- call TextBoxBorder
- ld a, [wCurrentBoxNum]
- and $7f
- cp 9
- jr c, .singleDigitBoxNum
-; two digit box num
- sub 9
- coord hl, 17, 16
- ld [hl], "1"
- add "0"
- jr .next
-.singleDigitBoxNum
- add "1"
-.next
- Coorda 18, 16
- coord hl, 10, 16
- ld de, BoxNoPCText
- call PlaceString
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- call Delay3
- call HandleMenuInput
- bit 1, a
- jp nz, ExitBillsPC ; b button
- call PlaceUnfilledArrowMenuCursor
- ld a, [wCurrentMenuItem]
- ld [wParentMenuItem], a
- and a
- jp z, BillsPCWithdraw ; withdraw
- cp $1
- jp z, BillsPCDeposit ; deposit
- cp $2
- jp z, BillsPCRelease ; release
- cp $3
- jp z, BillsPCChangeBox ; change box
- cp $4
- jp z, BillsPCPrintBox
-
-ExitBillsPC:
- ld a, [wFlags_0xcd60]
- bit 3, a ; accessing Bill's PC through another PC?
- jr nz, .next
-; accessing it directly
- call LoadTextBoxTilePatterns
- ld a, SFX_TURN_OFF_PC
- call PlaySound
- call WaitForSoundToFinish
-.next
- ld hl, wFlags_0xcd60
- res 5, [hl]
- call LoadScreenTilesFromBuffer2
- pop af
- ld [wListScrollOffset], a
- ld hl, wd730
- res 6, [hl]
- ret
-
-BillsPCPrintBox:
- callab PrintPCBox
- jp BillsPCMenu
-
-BillsPCDeposit:
- ld a, [wPartyCount]
- dec a
- jr nz, .partyLargeEnough
- ld hl, CantDepositLastMonText
- call PrintText
- jp BillsPCMenu
-.partyLargeEnough
- ld a, [wNumInBox]
- cp MONS_PER_BOX
- jr nz, .boxNotFull
- ld hl, BoxFullText
- call PrintText
- jp BillsPCMenu
-.boxNotFull
- ld hl, wPartyCount
- call DisplayMonListMenu
- jp c, BillsPCMenu
- callab IsThisPartymonStarterPikachu_Party
- jr nc, .asm_215ad
- call CheckPikachuFollowingPlayer
- jr z, .asm_215ad
- ld hl, SleepingPikachuText2
- call PrintText
- jp BillsPCMenu
-.asm_215ad
- call DisplayDepositWithdrawMenu
- jp nc, BillsPCMenu
- callab IsThisPartymonStarterPikachu_Party
- jr nc, .asm_215c9
- ld e, $1b
- callab PlayPikachuSoundClip
- jr .asm_215cf
-.asm_215c9
- ld a, [wcf91]
- call PlayCry
-.asm_215cf
- callabd_ModifyPikachuHappiness PIKAHAPPY_DEPOSITED
- ld a, PARTY_TO_BOX
- ld [wMoveMonType], a
- call MoveMon
- xor a
- ld [wRemoveMonFromBox], a
- call RemovePokemon
- call WaitForSoundToFinish
- ld hl, wBoxNumString
- ld a, [wCurrentBoxNum]
- and $7f
- cp 9
- jr c, .singleDigitBoxNum
- sub 9
- ld [hl], "1"
- inc hl
- add "0"
- jr .next
-.singleDigitBoxNum
- add "1"
-.next
- ld [hli], a
- ld [hl], "@"
- ld hl, MonWasStoredText
- call PrintText
- jp BillsPCMenu
-
-SleepingPikachuText2:
- TX_FAR _SleepingPikachuText2
- db "@"
-
-BillsPCWithdraw:
- ld a, [wNumInBox]
- and a
- jr nz, .boxNotEmpty
- ld hl, NoMonText
- call PrintText
- jp BillsPCMenu
-.boxNotEmpty
- ld a, [wPartyCount]
- cp PARTY_LENGTH
- jr nz, .partyNotFull
- ld hl, CantTakeMonText
- call PrintText
- jp BillsPCMenu
-.partyNotFull
- ld hl, wNumInBox
- call DisplayMonListMenu
- jp c, BillsPCMenu
- call DisplayDepositWithdrawMenu
- jp nc, BillsPCMenu
- ld a, [wWhichPokemon]
- ld hl, wBoxMonNicks
- call GetPartyMonName
- callab IsThisPartymonStarterPikachu_Box
- jr nc, .asm_21660
- ld e, $22
- callab PlayPikachuSoundClip
- jr .asm_21666
-.asm_21660
- ld a, [wcf91]
- call PlayCry
-.asm_21666
- xor a ; BOX_TO_PARTY
- ld [wMoveMonType], a
- call MoveMon
- ld a, 1
- ld [wRemoveMonFromBox], a
- call RemovePokemon
- call WaitForSoundToFinish
- ld hl, MonIsTakenOutText
- call PrintText
- jp BillsPCMenu
-
-BillsPCRelease:
- ld a, [wNumInBox]
- and a
- jr nz, .loop
- ld hl, NoMonText
- call PrintText
- jp BillsPCMenu
-.loop
- ld hl, wNumInBox
- call DisplayMonListMenu
- jp c, BillsPCMenu
- callab IsThisPartymonStarterPikachu_Box
- jr c, .asm_216cb
- ld hl, OnceReleasedText
- call PrintText
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- and a
- jr nz, .loop
- inc a
- ld [wRemoveMonFromBox], a
- call RemovePokemon
- call WaitForSoundToFinish
- ld a, [wcf91]
- call PlayCry
- ld hl, MonWasReleasedText
- call PrintText
- jp BillsPCMenu
-
-.asm_216cb
- ld a, [wWhichPokemon]
- ld hl, wBoxMonNicks
- call GetPartyMonName
- ld e, $27
- callab PlayPikachuSoundClip
- ld hl, PikachuUnhappyText
- call PrintText
- jp BillsPCMenu
-
-BillsPCChangeBox:
- callba ChangeBox
- jp BillsPCMenu
-
-DisplayMonListMenu:
- ld a, l
- ld [wListPointer], a
- ld a, h
- ld [wListPointer + 1], a
- xor a
- ld [wPrintItemPrices], a
- ld [wListMenuID], a
- inc a ; MONSTER_NAME
- ld [wNameListType], a
- ld a, [wPartyAndBillsPCSavedMenuItem]
- ld [wCurrentMenuItem], a
- call DisplayListMenuID
- ld a, [wCurrentMenuItem]
- ld [wPartyAndBillsPCSavedMenuItem], a
- ret
-
-BillsPCMenuText:
- db "WITHDRAW ", $4a
- next "DEPOSIT ", $4a
- next "RELEASE ", $4a
- next "CHANGE BOX"
- next "PRINT BOX"
- next "SEE YA!"
- db "@"
-
-BoxNoPCText:
- db "BOX No.@"
-
-KnowsHMMove::
-; returns whether mon with party index [wWhichPokemon] knows an HM move
- ld hl, wPartyMon1Moves
- ld bc, wPartyMon2 - wPartyMon1
- jr .next
-; unreachable
- ld hl, wBoxMon1Moves
- ld bc, wBoxMon2 - wBoxMon1
-.next
- ld a, [wWhichPokemon]
- call AddNTimes
- ld b, NUM_MOVES
-.loop
- ld a, [hli]
- push hl
- push bc
- ld hl, HMMoveArray
- ld de, 1
- call IsInArray
- pop bc
- pop hl
- ret c
- dec b
- jr nz, .loop
- and a
- ret
-
-HMMoveArray:
- db CUT
- db FLY
- db SURF
- db STRENGTH
- db FLASH
- db -1
-
-DisplayDepositWithdrawMenu:
- coord hl, 9, 10
- lb bc, 6, 9
- call TextBoxBorder
- ld a, [wParentMenuItem]
- and a ; was the Deposit or Withdraw item selected in the parent menu?
- ld de, DepositPCText
- jr nz, .next
- ld de, WithdrawPCText
-.next
- coord hl, 11, 12
- call PlaceString
- coord hl, 11, 14
- ld de, StatsCancelPCText
- call PlaceString
- ld hl, wTopMenuItemY
- ld a, 12
- ld [hli], a ; wTopMenuItemY
- ld a, 10
- ld [hli], a ; wTopMenuItemX
- xor a
- ld [hli], a ; wCurrentMenuItem
- inc hl
- ld a, 2
- ld [hli], a ; wMaxMenuItem
- ld a, A_BUTTON | B_BUTTON
- ld [hli], a ; wMenuWatchedKeys
- xor a
- ld [hl], a ; wLastMenuItem
- ld hl, wListScrollOffset
- ld [hli], a ; wListScrollOffset
- ld [hl], a ; wMenuWatchMovingOutOfBounds
- ld [wPlayerMonNumber], a
- ld [wPartyAndBillsPCSavedMenuItem], a
-.loop
- call HandleMenuInput
- bit 1, a ; pressed B?
- jr nz, .exit
- ld a, [wCurrentMenuItem]
- and a
- jr z, .choseDepositWithdraw
- dec a
- jr z, .viewStats
-.exit
- and a
- ret
-.choseDepositWithdraw
- scf
- ret
-.viewStats
- call SaveScreenTilesToBuffer1
- ld a, [wParentMenuItem]
- and a
- ld a, PLAYER_PARTY_DATA
- jr nz, .next2
- ld a, BOX_DATA
-.next2
- ld [wMonDataLocation], a
- predef StatusScreen
- predef StatusScreen2
- call LoadScreenTilesFromBuffer1
- call ReloadTilesetTilePatterns
- call RunDefaultPaletteCommand
- call LoadGBPal
- jr .loop
-
-DepositPCText: db "DEPOSIT@"
-WithdrawPCText: db "WITHDRAW@"
-StatsCancelPCText:
- db "STATS"
- next "CANCEL@"
-
-SwitchOnText:
- TX_FAR _SwitchOnText
- db "@"
-
-WhatText:
- TX_FAR _WhatText
- db "@"
-
-DepositWhichMonText:
- TX_FAR _DepositWhichMonText
- db "@"
-
-MonWasStoredText:
- TX_FAR _MonWasStoredText
- db "@"
-
-CantDepositLastMonText:
- TX_FAR _CantDepositLastMonText
- db "@"
-
-BoxFullText:
- TX_FAR _BoxFullText
- db "@"
-
-MonIsTakenOutText:
- TX_FAR _MonIsTakenOutText
- db "@"
-
-NoMonText:
- TX_FAR _NoMonText
- db "@"
-
-CantTakeMonText:
- TX_FAR _CantTakeMonText
- db "@"
-
-PikachuUnhappyText:
- TX_FAR _PikachuUnhappyText
- db "@"
-
-ReleaseWhichMonText:
- TX_FAR _ReleaseWhichMonText
- db "@"
-
-OnceReleasedText:
- TX_FAR _OnceReleasedText
- db "@"
-
-MonWasReleasedText:
- TX_FAR _MonWasReleasedText
- db "@"
-
-CableClubLeftGameboy::
- ld a, [hSerialConnectionStatus]
- cp USING_EXTERNAL_CLOCK
- ret z
- ld a, [wSpritePlayerStateData1FacingDirection] ; player's sprite facing direction
- cp SPRITE_FACING_RIGHT
- ret nz
- ld a, [wCurMap]
- cp TRADE_CENTER
- ld a, LINK_STATE_START_TRADE
- jr z, .next
- inc a ; LINK_STATE_START_BATTLE
-.next
- ld [wLinkState], a
- call EnableAutoTextBoxDrawing
- tx_pre_jump JustAMomentText
-
-CableClubRightGameboy::
- ld a, [hSerialConnectionStatus]
- cp USING_INTERNAL_CLOCK
- ret z
- ld a, [wSpritePlayerStateData1FacingDirection] ; player's sprite facing direction
- cp SPRITE_FACING_LEFT
- ret nz
- ld a, [wCurMap]
- cp TRADE_CENTER
- ld a, LINK_STATE_START_TRADE
- jr z, .next
- inc a ; LINK_STATE_START_BATTLE
-.next
- ld [wLinkState], a
- call EnableAutoTextBoxDrawing
- tx_pre_jump JustAMomentText
-
-JustAMomentText::
- TX_FAR _JustAMomentText
- db "@"
-
- ld a, [wSpritePlayerStateData1FacingDirection] ; player's sprite facing direction
- cp SPRITE_FACING_UP
- ret nz
- call EnableAutoTextBoxDrawing
- tx_pre_jump OpenBillsPCText
-
-OpenBillsPCText::
- TX_BILLS_PC
-
diff --git a/engine/menu/diploma.asm b/engine/menu/diploma.asm
deleted file mode 100644
index 3f309bd2..00000000
--- a/engine/menu/diploma.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-DisplayDiploma:
- call SaveScreenTilesToBuffer2
- call GBPalWhiteOutWithDelay3
- call ClearScreen
- xor a
- ld [wUpdateSpritesEnabled], a
- ld hl, wd730
- set 6, [hl]
- callab _DisplayDiploma
- call WaitForTextScrollButtonPress
- ld hl, wd730
- res 6, [hl]
- call GBPalWhiteOutWithDelay3
- call ReloadTilesetTilePatterns
- call RestoreScreenTilesAndReloadTilePatterns
- call Delay3
- jp GBPalNormal
diff --git a/engine/menu/draw_badges.asm b/engine/menu/draw_badges.asm
deleted file mode 100644
index 9e6262a0..00000000
--- a/engine/menu/draw_badges.asm
+++ /dev/null
@@ -1,120 +0,0 @@
-DrawBadges:
-; Draw 4x2 gym leader faces, with the faces replaced by
-; badges if they are owned. Used in the player status screen.
-
-; In Japanese versions, names are displayed above faces.
-; Instead of removing relevant code, the name graphics were erased.
-
-; Tile ids for face/badge graphics.
- ld de, wBadgeOrFaceTiles
- ld hl, .FaceBadgeTiles
- ld bc, 8
- call CopyData
-
-; Booleans for each badge.
- ld hl, wTempObtainedBadgesBooleans
- ld bc, 8
- xor a
- call FillMemory
-
-; Alter these based on owned badges.
- ld de, wTempObtainedBadgesBooleans
- ld hl, wBadgeOrFaceTiles
- ld a, [wObtainedBadges]
- ld b, a
- ld c, 8
-.CheckBadge
- srl b
- jr nc, .NextBadge
- ld a, [hl]
- add 4 ; Badge graphics are after each face
- ld [hl], a
- ld a, 1
- ld [de], a
-.NextBadge
- inc hl
- inc de
- dec c
- jr nz, .CheckBadge
-
-; Draw two rows of badges.
- ld hl, wBadgeNumberTile
- ld a, $d8 ; [1]
- ld [hli], a
- ld [hl], $60 ; First name
-
- coord hl, 2, 11
- ld de, wTempObtainedBadgesBooleans
- call .DrawBadgeRow
-
- coord hl, 2, 14
- ld de, wTempObtainedBadgesBooleans + 4
-; call .DrawBadgeRow
-; ret
-
-.DrawBadgeRow
-; Draw 4 badges.
-
- ld c, 4
-.DrawBadge
- push de
- push hl
-
-; Badge no.
- ld a, [wBadgeNumberTile]
- ld [hli], a
- inc a
- ld [wBadgeNumberTile], a
-
-; Names aren't printed if the badge is owned.
- ld a, [de]
- and a
- ld a, [wBadgeNameTile]
- jr nz, .SkipName
- call .PlaceTiles
- jr .PlaceBadge
-
-.SkipName
- inc a
- inc a
- inc hl
-
-.PlaceBadge
- ld [wBadgeNameTile], a
- ld de, SCREEN_WIDTH - 1
- add hl, de
- ld a, [wBadgeOrFaceTiles]
- call .PlaceTiles
- add hl, de
- call .PlaceTiles
-
-; Shift badge array back one byte.
- push bc
- ld hl, wBadgeOrFaceTiles + 1
- ld de, wBadgeOrFaceTiles
- ld bc, 8
- call CopyData
- pop bc
-
- pop hl
- ld de, 4
- add hl, de
-
- pop de
- inc de
- dec c
- jr nz, .DrawBadge
- ret
-
-.PlaceTiles
- ld [hli], a
- inc a
- ld [hl], a
- inc a
- ret
-
-.FaceBadgeTiles
- db $20, $28, $30, $38, $40, $48, $50, $58
-
-GymLeaderFaceAndBadgeTileGraphics:
- INCBIN "gfx/badges.2bpp"
diff --git a/engine/menu/draw_start_menu.asm b/engine/menu/draw_start_menu.asm
deleted file mode 100644
index 632b8c3a..00000000
--- a/engine/menu/draw_start_menu.asm
+++ /dev/null
@@ -1,87 +0,0 @@
-; function that displays the start menu
-DrawStartMenu:
- CheckEvent EVENT_GOT_POKEDEX
-; menu with pokedex
- coord hl, 10, 0
- lb bc, 14, 8
- jr nz,.drawTextBoxBorder
-; shorter menu if the player doesn't have the pokedex
- coord hl, 10, 0
- lb bc, 12, 8
-.drawTextBoxBorder
- call TextBoxBorder
- 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
- ld a, $0b
- ld [wTopMenuItemX], a ; X position of first menu choice
- ld a, [wBattleAndStartSavedMenuItem] ; remembered menu selection from last time
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- xor a
- ld [wMenuWatchMovingOutOfBounds], a
- ld hl, wd730
- set 6, [hl] ; no pauses between printing each letter
- coord hl, 12, 2
- CheckEvent EVENT_GOT_POKEDEX
-; case for not having pokedex
- ld a, $06
- jr z, .storeMenuItemCount
-; case for having pokedex
- ld de, StartMenuPokedexText
- call PrintStartMenuItem
- ld a, $07
-.storeMenuItemCount
- ld [wMaxMenuItem], a ; number of menu items
- ld de, StartMenuPokemonText
- call PrintStartMenuItem
- ld de, StartMenuItemText
- call PrintStartMenuItem
- ld de, wPlayerName ; player's name
- call PrintStartMenuItem
- ld a, [wd72e]
- bit 6, a ; is the player using the link feature?
-; case for not using link feature
- ld de, StartMenuSaveText
- jr z, .printSaveOrResetText
-; case for using link feature
- ld de, StartMenuResetText
-.printSaveOrResetText
- call PrintStartMenuItem
- ld de, StartMenuOptionText
- call PrintStartMenuItem
- ld de, StartMenuExitText
- call PlaceString
- ld hl, wd730
- res 6, [hl] ; turn pauses between printing letters back on
- ret
-
-StartMenuPokedexText:
- db "POKéDEX@"
-
-StartMenuPokemonText:
- db "#MON@"
-
-StartMenuItemText:
- db "ITEM@"
-
-StartMenuSaveText:
- db "SAVE@"
-
-StartMenuResetText:
- db "RESET@"
-
-StartMenuExitText:
- db "EXIT@"
-
-StartMenuOptionText:
- db "OPTION@"
-
-PrintStartMenuItem:
- push hl
- call PlaceString
- pop hl
- ld de, SCREEN_WIDTH * 2
- add hl, de
- ret
diff --git a/engine/menu/league_pc.asm b/engine/menu/league_pc.asm
deleted file mode 100755
index 9946b90d..00000000
--- a/engine/menu/league_pc.asm
+++ /dev/null
@@ -1,119 +0,0 @@
-PKMNLeaguePC:
- ld hl, AccessedHoFPCText
- call PrintText
- ld hl, wd730
- set 6, [hl]
- push hl
- ld a, [wUpdateSpritesEnabled]
- push af
- ld a, [hTilesetType]
- push af
- xor a
- ld [hTilesetType], a
- ld [wSpriteFlipped], a
- ld [wUpdateSpritesEnabled], a
- ld [wHoFTeamIndex2], a
- ld [wHoFTeamNo], a
- ld a, [wNumHoFTeams]
- ld b, a
- cp HOF_TEAM_CAPACITY + 1
- jr c, .loop
-; If the total number of hall of fame teams is greater than the storage
-; capacity, then calculate the number of the first team that is still recorded.
- ld b, HOF_TEAM_CAPACITY
- sub b
- ld [wHoFTeamNo], a
-.loop
- ld hl, wHoFTeamNo
- inc [hl]
- push bc
- ld a, [wHoFTeamIndex2]
- ld [wHoFTeamIndex], a
- callba LoadHallOfFameTeams
- call LeaguePCShowTeam
- pop bc
- jr c, .doneShowingTeams
- ld hl, wHoFTeamIndex2
- inc [hl]
- ld a, [hl]
- cp b
- jr nz, .loop
-.doneShowingTeams
- pop af
- ld [hTilesetType], a
- pop af
- ld [wUpdateSpritesEnabled], a
- pop hl
- res 6, [hl]
- call GBPalWhiteOutWithDelay3
- call ClearScreen
- call RunDefaultPaletteCommand
- jp GBPalNormal
-
-LeaguePCShowTeam:
- ld c, PARTY_LENGTH
-.loop
- push bc
- call LeaguePCShowMon
- call WaitForTextScrollButtonPress
- ld a, [hJoyHeld]
- bit 1, a
- jr nz, .exit
- ld hl, wHallOfFame + HOF_MON
- ld de, wHallOfFame
- ld bc, HOF_TEAM - HOF_MON
- call CopyData
- pop bc
- ld a, [wHallOfFame + 0]
- cp $ff
- jr z, .done
- dec c
- jr nz, .loop
-.done
- and a
- ret
-.exit
- pop bc
- scf
- ret
-
-LeaguePCShowMon:
- call GBPalWhiteOutWithDelay3
- call ClearScreen
- ld hl, wHallOfFame
- ld a, [hli]
- ld [wHoFMonSpecies], a
- ld [wcf91], a
- ld [wd0b5], a
- ld [wBattleMonSpecies2], a
- ld [wWholeScreenPaletteMonSpecies], a
- ld a, [hli]
- ld [wHoFMonLevel], a
- ld de, wcd6d
- ld bc, NAME_LENGTH
- call CopyData
- ld b, SET_PAL_POKEMON_WHOLE_SCREEN
- ld c, 0
- call RunPaletteCommand
- coord hl, 12, 5
- call GetMonHeader
- call LoadFrontSpriteByMonIndex
- call GBPalNormal
- coord hl, 0, 13
- lb bc, 2, 18
- call TextBoxBorder
- coord hl, 1, 15
- ld de, HallOfFameNoText
- call PlaceString
- coord hl, 16, 15
- ld de, wHoFTeamNo
- lb bc, 1, 3
- call PrintNumber
- jpba Func_7033f
-
-HallOfFameNoText:
- db "HALL OF FAME No @"
-
-AccessedHoFPCText:
- TX_FAR _AccessedHoFPCText
- db "@"
diff --git a/engine/menu/link_menu.asm b/engine/menu/link_menu.asm
deleted file mode 100644
index 9bc28b31..00000000
--- a/engine/menu/link_menu.asm
+++ /dev/null
@@ -1,910 +0,0 @@
-Func_f531b::
- ld c,$14
- call DelayFrames
- ld a,$1
- ld [wBuffer],a
- xor a
- ld [wUnknownSerialFlag_d499],a
- coord hl, 0,0
- lb bc, 4, 5
- call TextBoxBorder
- ld de,Text_f5791
- coord hl, 1,2
- call PlaceString
- coord hl, 8,0
- lb bc, 8, 10
- call TextBoxBorder
- coord hl, 10,2
- ld de,Text_f579c
- call PlaceString
- coord hl, 0,10
- lb bc, 6, 18
- call TextBoxBorder
- call UpdateSprites
- xor a
- ld [wUnusedCD37],a
- ld [wd72d],a
- ld [wd11e],a
- ld hl,wTopMenuItemY
- ld a,$2
- ld [hli],a
- ld a,$9
- ld [hli],a
- xor a
- ld [hli],a
- inc hl
- ld a,$3
- ld [hli],a
- ld a,$3
- ld [hli],a
- xor a
- ld [hl],a
-.asm_f5377
- call Func_f56bd
- call HandleMenuInput
- and $3
- add a
- add a
- ld b,a
- ld a,[wCurrentMenuItem]
- cp $3
- jr nz,.asm_f5390
- bit 2,b
- jr z,.asm_f5390
- dec a
- ld b,$8
-.asm_f5390
- add b
- add $c0
- ld [wLinkMenuSelectionSendBuffer],a
- ld [wLinkMenuSelectionSendBuffer+1],a
-.asm_f5399
- ld hl,wLinkMenuSelectionSendBuffer
- ld a,[hl]
- ld [hSerialSendData],a
- call Serial_ExchangeByte
- push af
- ld hl,wLinkMenuSelectionSendBuffer
- ld a,[hl]
- ld [hSerialSendData],a
- call Serial_ExchangeByte
- pop bc
- cp b
- jr nz,.asm_f5399
- and $f0
- cp $c0
- jr nz,.asm_f5399
- ld a,b
- and $c
- jr nz,.asm_f53c4
- ld a,[wLinkMenuSelectionSendBuffer]
- and $c
- jr z,.asm_f5377
- jr .asm_f53df
-.asm_f53c4
- ld a,[wLinkMenuSelectionSendBuffer]
- and $c
- jr z,.asm_f53d1
- ld a,[hSerialConnectionStatus]
- cp $2
- jr z,.asm_f53df
-.asm_f53d1
- ld a,$1
- ld [wd11e],a
- ld a,b
- ld [wLinkMenuSelectionSendBuffer],a
- and $3
- ld [wCurrentMenuItem],a
-.asm_f53df
- call DelayFrame
- call DelayFrame
- ld hl,wLinkMenuSelectionSendBuffer
- ld a,[hl]
- ld [hSerialSendData],a
- call Serial_ExchangeByte
- call Serial_ExchangeByte
- ld b,$14
-.loop
- call DelayFrame
- call Serial_SendZeroByte
- dec b
- jr nz,.loop
- ld b,$7f
- ld c,$7f
- ld d,$7f
- ld e,$ec
- ld a,[wLinkMenuSelectionSendBuffer]
- bit 3,a
- jr nz,.asm_f541a
- ld b,e
- ld e,c
- ld a,[wCurrentMenuItem]
- and a
- jr z,.asm_f541a
- ld c,b
- ld b,d
- dec a
- jr z,.asm_f541a
- ld d,c
- ld c,b
-.asm_f541a
- ld a,b
- Coorda 9,2
- ld a,c
- Coorda 9,4
- ld a,d
- Coorda 9,6
- ld a,e
- Coorda 9,8
- ld c,40
- call DelayFrames
- ld a,[wLinkMenuSelectionSendBuffer]
- bit 3,a
- jr nz,asm_f547f
- ld a,[wCurrentMenuItem]
- cp $3
- jr z,asm_f547f
- inc a
- ld [wUnknownSerialFlag_d499],a
- ld a,[wCurrentMenuItem]
- ld hl,PointerTable_f5488
- ld c,a
- ld b,$0
- add hl,bc
- add hl,bc
- ld a,[hli]
- ld h,[hl]
- ld l,a
- ld de,.returnaddress
- push de
- jp hl
-.returnaddress
- ld [wLinkMenuSelectionSendBuffer],a
- xor a
- ld [wUnknownSerialCounter],a
- ld [wUnknownSerialCounter+1],a
- call Serial_SyncAndExchangeNybble
- ld a,[wLinkMenuSelectionSendBuffer]
- and a
- jr nz,asm_f547c
- ld a, [wLinkMenuSelectionReceiveBuffer]
- and a
- jr nz, Func_f5476
- xor a
- ld [wUnknownSerialCounter],a
- ld [wUnknownSerialCounter+1],a
- and a
- ret
-
-Func_f5476::
- ld hl,ColosseumIneligibleText
- call PrintText
-asm_f547c::
- jp Func_f531b
-
-asm_f547f::
- xor a
- ld [wUnknownSerialCounter],a
- ld [wUnknownSerialCounter+1],a
- scf
- ret
-
-PointerTable_f5488::
- dw PokeCup
- dw PikaCup
- dw PetitCup
-
-PokeCup::
- ld hl,wPartyCount
- ld a,[hli]
- cp $3
- jp nz,NotThreeMonsInParty
- ld b,$3
-.loop
- ld a,[hli]
- cp MEW
- jp z,MewInParty
- dec b
- jr nz,.loop
- dec hl
- dec hl
- cp [hl] ; is third mon second mon?
- jp z,DuplicateSpecies
- dec hl ; wPartySpecies
- cp [hl] ; is third mon first mon?
- jp z,DuplicateSpecies
- ld a,[hli]
- cp [hl] ; is first mon second mon?
- jp z,DuplicateSpecies
- ld a,[wPartyMon1Level]
- cp 56
- jp nc,LevelAbove55
- cp 50
- jp c,LevelUnder50
- ld b,a
- ld a,[wPartyMon2Level]
- cp 56
- jp nc,LevelAbove55
- cp 50
- jp c,LevelUnder50
- ld c,a
- ld a,[wPartyMon3Level]
- cp 56
- jp nc,LevelAbove55
- cp 50
- jp c,LevelUnder50
- add b
- add c
- cp 156
- jp nc,CombinedLevelsGreaterThan155
- xor a
- ret
-
-PikaCup::
- ld hl,wPartyCount
- ld a,[hli]
- cp $3
- jp nz,NotThreeMonsInParty
- ld b,$3
-.loop
- ld a,[hli] ; wPartySpecies
- cp MEW
- jp z,MewInParty
- dec b
- jr nz,.loop
- dec hl
- dec hl
- cp [hl] ; is third mon second mon?
- jp z,DuplicateSpecies
- dec hl ; wPartySpecies
- cp [hl] ; is third mon first mon?
- jp z,DuplicateSpecies
- ld a,[hli]
- cp [hl] ; is first mon second mon?
- jp z,DuplicateSpecies
- ld a,[wPartyMon1Level]
- cp 21
- jp nc,LevelAbove20
- cp 15
- jp c,LevelUnder15
- ld b,a
- ld a,[wPartyMon2Level]
- cp 21
- jp nc,LevelAbove20
- cp 15
- jp c,LevelUnder15
- ld c,a
- ld a,[wPartyMon3Level]
- cp 21
- jp nc,LevelAbove20
- cp 15
- jp c,LevelUnder15
- add b
- add c
- cp 51
- jp nc,CombinedLevelsAbove50
- xor a
- ret
-
-PetitCup::
- ld hl,wPartyCount
- ld a,[hli]
- cp $3
- jp nz,NotThreeMonsInParty
- ld b,$3
-.loop
- ld a,[hli]
- cp MEW
- jp z,MewInParty
- dec b
- jr nz,.loop
- dec hl
- dec hl
- cp [hl] ; is third mon second mon?
- jp z,DuplicateSpecies
- dec hl ; wPartySpecies
- cp [hl] ; is third mon first mon?
- jp z,DuplicateSpecies
- ld a,[hli]
- cp [hl] ; is first mon second mon?
- jp z,DuplicateSpecies
- dec hl
- ld a,[hl]
- ld [wcf91],a
- push hl
- callab Func_3b10f
- pop hl
- jp c,asm_f56ad
- inc hl
- ld a,[hl]
- ld [wcf91],a
- push hl
- callab Func_3b10f
- pop hl
- jp c,asm_f56ad
- inc hl
- ld a,[hl]
- ld [wcf91],a
- push hl
- callab Func_3b10f
- pop hl
- jp c,asm_f56ad
- dec hl
- dec hl
- ld b,$3
-.bigloop
- ld a,[hli]
- push hl
- push bc
- push af
- dec a
- ld c,a
- ld b,$0
- ld hl,PokedexEntryPointers
- add hl,bc
- add hl,bc
- ld de,wcd6d
- ld bc,$2
- ld a,BANK(PokedexEntryPointers)
- call FarCopyData
- ld hl,wcd6d
- ld a,[hli]
- ld h,[hl]
- ld l,a
- ld de,wcd6d
- ld bc,$14
- ld a,BANK(PokedexEntryPointers)
- call FarCopyData
- ld hl,wcd6d
-.loop2
- ld a,[hli]
- cp "@"
- jr nz,.loop2
- ld a,[hli]
- cp $7
- jp nc,asm_f5689
- add a
- add a
- ld b,a
- add a
- add b
- ld b,a
- ld a,[hli]
- add b
- cp $51
- jp nc,asm_f5689
- ld a,[hli]
- sub $b9
- ld a,[hl]
- sbc $1
- jp nc,asm_f569b
- pop af
- pop bc
- pop hl
- dec b
- jr nz,.bigloop
- ld a,[wPartyMon1Level]
- cp 31
- jp nc,LevelAbove30
- cp 25
- jp c,LevelUnder25
- ld b,a
- ld a,[wPartyMon2Level]
- cp 31
- jp nc,LevelAbove30
- cp 25
- jp c,LevelUnder25
- ld c,a
- ld a,[wPartyMon3Level]
- cp 31
- jp nc,LevelAbove30
- cp 25
- jp c,LevelUnder25
- add b
- add c
- cp 81
- jp nc,CombinedLevelsAbove80
- xor a
- ret
-
-NotThreeMonsInParty::
- ld hl,Colosseum3MonsText
- call PrintText
- ld a,$1
- ret
-
-MewInParty::
- ld hl,ColosseumMewText
- call PrintText
- ld a,$2
- ret
-
-DuplicateSpecies::
- ld hl,ColosseumDifferentMonsText
- call PrintText
- ld a,$3
- ret
-
-LevelAbove55::
- ld hl,ColosseumMaxL55Text
- call PrintText
- ld a,$4
- ret
-
-LevelUnder50::
- ld hl,ColosseumMinL50Text
- call PrintText
- ld a,$5
- ret
-
-CombinedLevelsGreaterThan155::
- ld hl,ColosseumTotalL155Text
- call PrintText
- ld a,$6
- ret
-
-LevelAbove30::
- ld hl,ColosseumMaxL30Text
- call PrintText
- ld a,$7
- ret
-
-LevelUnder25::
- ld hl,ColosseumMinL25Text
- call PrintText
- ld a,$8
- ret
-
-CombinedLevelsAbove80::
- ld hl,ColosseumTotalL80Text
- call PrintText
- ld a,$9
- ret
-
-LevelAbove20::
- ld hl,ColosseumMaxL20Text
- call PrintText
- ld a,$a
- ret
-
-LevelUnder15::
- ld hl,ColosseumMinL15Text
- call PrintText
- ld a,$b
- ret
-
-CombinedLevelsAbove50::
- ld hl,ColosseumTotalL50Text
- call PrintText
- ld a,$c
- ret
-
-asm_f5689::
- pop af
- pop bc
- pop hl
- ld [wd11e],a
- call GetMonName
- ld hl,ColosseumHeightText
- call PrintText
- ld a,$d
- ret
-
-asm_f569b::
- pop af
- pop bc
- pop hl
- ld [wd11e],a
- call GetMonName
- ld hl,ColosseumWeightText
- call PrintText
- ld a,$e
- ret
-
-asm_f56ad::
- ld a,[hl]
- ld [wd11e],a
- call GetMonName
- ld hl,ColosseumEvolvedText
- call PrintText
- ld a,$f
- ret
-
-Func_f56bd::
- xor a
- ld [H_AUTOBGTRANSFERENABLED],a
- coord hl, 1,11
- lb bc, 6, 18
- call ClearScreenArea
- ld a,[wCurrentMenuItem]
- cp $3
- jr nc,.asm_f56e6
- ld hl,PointerTable_f56ee
- ld a,[wCurrentMenuItem]
- ld c,a
- ld b,$0
- add hl,bc
- add hl,bc
- ld a,[hli]
- ld h,[hl]
- ld l,a
- ld d,h
- ld e,l
- coord hl, 1,12
- call PlaceString
-.asm_f56e6
- call Delay3
- ld a,$1
- ld [H_AUTOBGTRANSFERENABLED],a
- ret
-
-PointerTable_f56ee::
- dw Text_f56f4
- dw Text_f5728
- dw Text_f575b
-
-Text_f56f4::
- db "LVs of 3<pkmn>:50-55"
- next "Sum of LVs:155 MAX"
- next "MEW can't attend.@"
-
-Text_f5728::
- db "LVs of 3<pkmn>:15-20"
- next "Sum of LVs:50 MAX"
- next "MEW can't attend.@"
-
-Text_f575b::
- db "3 Basic <pkmn>.LV25-30"
- next "Sum of LVs:80 MAX"
- next "6′8″ and 44lb MAX@"
-
-Text_f5791::
- db "View"
- next "Rules@"
-
-Text_f579c::
- db "# Cup"
- next "Pika Cup"
- next "Petit Cup"
- next "CANCEL@"
-
-Colosseum3MonsText::
- TX_FAR _Colosseum3MonsText
- db "@"
-
-ColosseumMewText::
- TX_FAR _ColosseumMewText
- db "@"
-
-ColosseumDifferentMonsText::
- TX_FAR _ColosseumDifferentMonsText
- db "@"
-
-ColosseumMaxL55Text::
- TX_FAR _ColosseumMaxL55Text
- db "@"
-
-ColosseumMinL50Text::
- TX_FAR _ColosseumMinL50Text
- db "@"
-
-ColosseumTotalL155Text::
- TX_FAR _ColosseumTotalL155Text
- db "@"
-
-ColosseumMaxL30Text::
- TX_FAR _ColosseumMaxL30Text
- db "@"
-
-ColosseumMinL25Text::
- TX_FAR _ColosseumMinL25Text
- db "@"
-
-ColosseumTotalL80Text::
- TX_FAR _ColosseumTotalL80Text
- db "@"
-
-ColosseumMaxL20Text::
- TX_FAR _ColosseumMaxL20Text
- db "@"
-
-ColosseumMinL15Text::
- TX_FAR _ColosseumMinL15Text
- db "@"
-
-ColosseumTotalL50Text::
- TX_FAR _ColosseumTotalL50Text
- db "@"
-
-ColosseumHeightText::
- TX_FAR _ColosseumHeightText
- db "@"
-
-ColosseumWeightText::
- TX_FAR _ColosseumWeightText
- db "@"
-
-ColosseumEvolvedText::
- TX_FAR _ColosseumEvolvedText
- db "@"
-
-ColosseumIneligibleText::
- TX_FAR _ColosseumIneligibleText
- db "@"
-
-LinkMenu:
- xor a
- ld [wLetterPrintingDelayFlags], a
- ld hl, wd72e
- set 6, [hl]
- ld hl, TextTerminator_f5a16
- call PrintText
- call SaveScreenTilesToBuffer1
- ld hl, ColosseumWhereToText
- call PrintText
- coord hl, 5, 3
- lb bc, 8, 13
- call TextBoxBorder
- call UpdateSprites
- coord hl, 7, 5
- ld de, TradeCenterText
- call PlaceString
- xor a
- ld [wUnusedCD37], a
- ld [wd72d], a
- ld [wd11e], a
- ld hl, wTopMenuItemY
- ld a, $5
- ld [hli], a
- ld a, $6
- ld [hli], a
- xor a
- ld [hli], a
- inc hl
- ld a, $3
- ld [hli], a
- ld [hli], a
- xor a
- ld [hl], a
-.waitForInputLoop
- call HandleMenuInput
- and A_BUTTON | B_BUTTON
- add a
- add a
- ld b, a
- ld a, [wCurrentMenuItem]
- cp $3
- jr nz,.asm_f586b
- bit 2,b
- jr z,.asm_f586b
- dec a
- ld b,$8
-.asm_f586b
- add b
- add $d0
- ld [wLinkMenuSelectionSendBuffer], a
- ld [wLinkMenuSelectionSendBuffer + 1], a
-.exchangeMenuSelectionLoop
- call Serial_ExchangeLinkMenuSelection
- ld a, [wLinkMenuSelectionReceiveBuffer]
- ld b, a
- and $f0
- cp $d0
- jr z, .asm_f5c7d
- ld a, [wLinkMenuSelectionReceiveBuffer + 1]
- ld b, a
- and $f0
- cp $d0
- jr nz, .exchangeMenuSelectionLoop
-.asm_f5c7d
- ld a, b
- and $c ; did the enemy press A or B?
- jr nz, .enemyPressedAOrB
-; the enemy didn't press A or B
- ld a, [wLinkMenuSelectionSendBuffer]
- and $c ; did the player press A or B?
- jr z, .waitForInputLoop ; if neither the player nor the enemy pressed A or B, try again
- jr .doneChoosingMenuSelection ; if the player pressed A or B but the enemy didn't, use the player's selection
-.enemyPressedAOrB
- ld a, [wLinkMenuSelectionSendBuffer]
- and $c ; did the player press A or B?
- jr z, .useEnemyMenuSelection ; if the enemy pressed A or B but the player didn't, use the enemy's selection
-; the enemy and the player both pressed A or B
-; The gameboy that is clocking the connection wins.
- ld a, [hSerialConnectionStatus]
- cp USING_INTERNAL_CLOCK
- jr z, .doneChoosingMenuSelection
-.useEnemyMenuSelection
- ld a, $1
- ld [wd11e], a
- ld a, b
- ld [wLinkMenuSelectionSendBuffer], a
- and $3
- ld [wCurrentMenuItem], a ; wCurrentMenuItem
-.doneChoosingMenuSelection
- ld a, [hSerialConnectionStatus]
- cp USING_INTERNAL_CLOCK
- jr nz, .skipStartingTransfer
- call DelayFrame
- call DelayFrame
- ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
-.skipStartingTransfer
- ld b, " "
- ld c, " "
- ld d, " "
- ld e, "▷"
- ld a, [wLinkMenuSelectionSendBuffer]
- and (B_BUTTON << 2) ; was B button pressed?
- jr nz, .updateCursorPosition
-; A button was pressed
- ld a, [wCurrentMenuItem]
- cp $2
- jp z, .asm_f5963
- ld b, e
- ld e, c
- ld a, [wCurrentMenuItem]
- and a
- jr z, .updateCursorPosition
- ld c, b
- ld b, d
- dec a
- jr z, .updateCursorPosition
- ld d, c
- ld c, b
-.updateCursorPosition
- call Func_f59ec
- call LoadScreenTilesFromBuffer1
- ld a, [wLinkMenuSelectionSendBuffer]
- and (B_BUTTON << 2) ; was B button pressed?
- jr nz, .choseCancel ; cancel if B pressed
- ld a, [wCurrentMenuItem]
- cp $2
- jr z, .choseCancel
- xor a
- ld [wWalkBikeSurfState], a ; start walking
- ld a, [wCurrentMenuItem]
- and a
- ld a, COLOSSEUM
- jr nz, .next
- ld a, TRADE_CENTER
-.next
- ld [wd72d], a
- ld hl, ColosseumPleaseWaitText
- call PrintText
- ld c, 50
- call DelayFrames
- ld hl, wd732
- res 1, [hl]
- ld a, [wDefaultMap]
- ld [wDestinationMap], a
- callab SpecialWarpIn
- ld c, 20
- call DelayFrames
- xor a
- ld [wMenuJoypadPollCount], a
- ld [wSerialExchangeNybbleSendData], a
- inc a ; LINK_STATE_IN_CABLE_CLUB
- ld [wLinkState], a
- ld [wEnteringCableClub], a
- jpab SpecialEnterMap
-.choseCancel
- xor a
- ld [wMenuJoypadPollCount], a
- call Delay3
- callab CloseLinkConnection
- ld hl, ColosseumCanceledText
- call PrintText
- ld hl, wd72e
- res 6, [hl]
- ret
-
-.asm_f5963
- ld a,[wd11e]
- and a
- jr nz,.asm_f5974
- ld b," "
- ld c," "
- ld d,"▷"
- ld e," "
- call Func_f59ec
-.asm_f5974
- xor a
- ld [wBuffer], a
- ld a,$ff
- ld [wSerialExchangeNybbleReceiveData],a
- ld a, $b
- ld [wLinkMenuSelectionSendBuffer], a
- ld b,$78
-.loop
- ld a,[hSerialConnectionStatus]
- cp $2
- call z,DelayFrame
- dec b
- jr z,.asm_f59b2
- call Serial_ExchangeNybble
- call DelayFrame
- ld a,[wSerialExchangeNybbleReceiveData]
- inc a
- jr z,.loop
- ld b,$f
-.loop2
- call DelayFrame
- call Serial_ExchangeNybble
- dec b
- jr nz,.loop2
- ld b,$f
-.loop3
- call DelayFrame
- call Serial_SendZeroByte
- dec b
- jr nz,.loop3
- jr .asm_f59d6
-
-.asm_f59b2
- xor a
- ld [wUnknownSerialCounter],a
- ld [wUnknownSerialCounter+1],a
- ld a,[wd11e]
- and a
- jr z,.asm_f59cd
- ld b," "
- ld c," "
- ld d," "
- ld e,"▷"
- call Func_f59ec
- jp .choseCancel
-
-.asm_f59cd
- ld hl,ColosseumVersionText
- call PrintText
- jp .choseCancel
-
-.asm_f59d6
- ld b," "
- ld c," "
- ld d,"▷"
- ld e," "
- call Func_f59ec
- call Func_f531b
- jp c,.choseCancel
- ld a,$f0
- jp .next
-
-Func_f59ec::
- ld a, b
- Coorda 6, 5
- ld a, c
- Coorda 6, 7
- ld a, d
- Coorda 6, 9
- ld a, e
- Coorda 6, 11
- ld c, 40
- call DelayFrames
- ret
-
-ColosseumWhereToText:
- TX_FAR _ColosseumWhereToText
- db "@"
-
-ColosseumPleaseWaitText:
- TX_FAR _ColosseumPleaseWaitText
- db "@"
-
-ColosseumCanceledText:
- TX_FAR _ColosseumCanceledText
- db "@"
-
-ColosseumVersionText:
- TX_FAR _ColosseumVersionText
- db "@"
-
-TextTerminator_f5a16:
- db "@"
-
-TradeCenterText:
- db "TRADE CENTER"
- next "COLOSSEUM"
- next "COLOSSEUM2"
- next "CANCEL@"
diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm
deleted file mode 100755
index ce27ebba..00000000
--- a/engine/menu/main_menu.asm
+++ /dev/null
@@ -1,297 +0,0 @@
-MainMenu:
-; Check save file
- call InitOptions
- xor a
- ld [wOptionsInitialized], a
- inc a
- ld [wSaveFileStatus], a
- call CheckForPlayerNameInSRAM
- jr nc, .mainMenuLoop
-
- predef LoadSAV
-
-.mainMenuLoop
- ld c, 20
- call DelayFrames
- xor a ; LINK_STATE_NONE
- ld [wLinkState], a
- ld hl, wPartyAndBillsPCSavedMenuItem
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ld [hl], a
- ld [wDefaultMap], a
- ld hl, wd72e
- res 6, [hl]
- call ClearScreen
- call RunDefaultPaletteCommand
- call LoadTextBoxTilePatterns
- call LoadFontTilePatterns
- ld hl, wd730
- set 6, [hl]
- ld a, [wSaveFileStatus]
- cp 1
- jr z, .noSaveFile
-; there's a save file
- coord hl, 0, 0
- lb bc, 6, 13
- call TextBoxBorder
- coord hl, 2, 2
- ld de, ContinueText
- call PlaceString
- jr .next2
-.noSaveFile
- coord hl, 0, 0
- lb bc, 4, 13
- call TextBoxBorder
- coord hl, 2, 2
- ld de, NewGameText
- call PlaceString
-.next2
- ld hl, wd730
- res 6, [hl]
- call UpdateSprites
- xor a
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld [wMenuJoypadPollCount], a
- inc a
- ld [wTopMenuItemX], a
- inc a
- ld [wTopMenuItemY], a
- ld a, A_BUTTON | B_BUTTON | START
- ld [wMenuWatchedKeys], a
- ld a, [wSaveFileStatus]
- ld [wMaxMenuItem], a
- call HandleMenuInput
- bit 1, a ; pressed B?
- jp nz, DisplayTitleScreen ; if so, go back to the title screen
- ld c, 20
- call DelayFrames
- ld a, [wCurrentMenuItem]
- ld b, a
- ld a, [wSaveFileStatus]
- cp 2
- jp z, .skipInc
-; If there's no save file, increment the current menu item so that the numbers
-; are the same whether or not there's a save file.
- inc b
-.skipInc
- ld a, b
- and a
- jr z, .choseContinue
- cp 1
- jp z, StartNewGame
- call DisplayOptionMenu
- ld a, 1
- ld [wOptionsInitialized], a
- jp .mainMenuLoop
-.choseContinue
- call DisplayContinueGameInfo
- ld hl, wCurrentMapScriptFlags
- set 5, [hl]
-.inputLoop
- xor a
- ld [hJoyPressed], a
- ld [hJoyReleased], a
- ld [hJoyHeld], a
- call Joypad
- ld a, [hJoyHeld]
- bit 0, a
- jr nz, .pressedA
- bit 1, a
- jp nz, .mainMenuLoop ; pressed B
- jr .inputLoop
-.pressedA
- call GBPalWhiteOutWithDelay3
- call ClearScreen
- ld a, PLAYER_DIR_DOWN
- ld [wPlayerDirection], a
- ld c, 10
- call DelayFrames
- ld a, [wNumHoFTeams]
- and a
- jp z, SpecialEnterMap
- ld a, [wCurMap] ; map ID
- cp HALL_OF_FAME
- jp nz, SpecialEnterMap
- xor a
- ld [wDestinationMap], a
- ld hl, wd732
- set 2, [hl] ; fly warp or dungeon warp
- call SpecialWarpIn
- jp SpecialEnterMap
-
-InitOptions:
- ld a, 1 ; no delay
- ld [wLetterPrintingDelayFlags], a
- ld a, 3 ; medium speed
- ld [wOptions], a
- ld a, 64 ; audio?
- ld [wPrinterSettings], a
- ret
-
-Func_5cc1:
-; unused?
- ld a, $6d
- cp $80
- ret c ; will always be executed
- ld hl, NotEnoughMemoryText
- call PrintText
- ret
-
-NotEnoughMemoryText:
- TX_FAR _NotEnoughMemoryText
- db "@"
-
-StartNewGame:
- ld hl, wd732
- res 1, [hl]
- call OakSpeech
- ld a, $8
- ld [wPlayerMovingDirection], a
- ld c, 20
- call DelayFrames
-
-; enter map after using a special warp or loading the game from the main menu
-SpecialEnterMap:
- xor a
- ld [hJoyPressed], a
- ld [hJoyHeld], a
- ld [hJoy5], a
- ld [wd72d], a
- ld hl, wd732
- set 0, [hl] ; count play time
- call ResetPlayerSpriteData
- ld c, 20
- call DelayFrames
- call Func_5cc1
- ld a, [wEnteringCableClub]
- and a
- ret nz
- jp EnterMap
-
-ContinueText:
- db "CONTINUE", $4e
-
-NewGameText:
- db "NEW GAME"
- next "OPTION@"
-
-DisplayContinueGameInfo:
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- coord hl, 4, 7
- lb bc, 8, 14
- call TextBoxBorder
- coord hl, 5, 9
- ld de, SaveScreenInfoText
- call PlaceString
- coord hl, 12, 9
- ld de, wPlayerName
- call PlaceString
- coord hl, 17, 11
- call PrintNumBadges
- coord hl, 16, 13
- call PrintNumOwnedMons
- coord hl, 13, 15
- call PrintPlayTime
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- ld c, 30
- jp DelayFrames
-
-PrintSaveScreenText:
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- coord hl, 4, 0
- lb bc, 8, 14
- call TextBoxBorder
- call LoadTextBoxTilePatterns
- call UpdateSprites
- coord hl, 5, 2
- ld de, SaveScreenInfoText
- call PlaceString
- coord hl, 12, 2
- ld de, wPlayerName
- call PlaceString
- coord hl, 17, 4
- call PrintNumBadges
- coord hl, 16, 6
- call PrintNumOwnedMons
- coord hl, 13, 8
- call PrintPlayTime
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- ld c, 30
- jp DelayFrames
-
-PrintNumBadges:
- push hl
- ld hl, wObtainedBadges
- ld b, $1
- call CountSetBits
- pop hl
- ld de, wNumSetBits
- lb bc, 1, 2
- jp PrintNumber
-
-PrintNumOwnedMons:
- push hl
- ld hl, wPokedexOwned
- ld b, wPokedexOwnedEnd - wPokedexOwned
- call CountSetBits
- pop hl
- ld de, wNumSetBits
- lb bc, 1, 3
- jp PrintNumber
-
-PrintPlayTime:
- ld de, wPlayTimeHours
- lb bc, 1, 3
- call PrintNumber
- ld [hl], $6d
- inc hl
- ld de, wPlayTimeMinutes
- lb bc, LEADING_ZEROES | 1, 2
- jp PrintNumber
-
-SaveScreenInfoText:
- db "PLAYER"
- next "BADGES "
- next "#DEX "
- next "TIME@"
-
-DisplayOptionMenu:
- callab DisplayOptionMenu_
- ret
-
-CheckForPlayerNameInSRAM:
-; Check if the player name data in SRAM has a string terminator character
-; (indicating that a name may have been saved there) and return whether it does
-; in carry.
- ld a, SRAM_ENABLE
- ld [MBC1SRamEnable], a
- ld a, $1
- ld [MBC1SRamBankingMode], a
- ld [MBC1SRamBank], a
- ld b, NAME_LENGTH
- ld hl, sPlayerName
-.loop
- ld a, [hli]
- cp "@"
- jr z, .found
- dec b
- jr nz, .loop
-; not found
- xor a
- ld [MBC1SRamEnable], a
- ld [MBC1SRamBankingMode], a
- and a
- ret
-.found
- xor a
- ld [MBC1SRamEnable], a
- ld [MBC1SRamBankingMode], a
- scf
- ret
diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm
deleted file mode 100755
index 2560677a..00000000
--- a/engine/menu/naming_screen.asm
+++ /dev/null
@@ -1,526 +0,0 @@
-AskName:
- call SaveScreenTilesToBuffer1
- call GetPredefRegisters
- push hl
- ld a, [wIsInBattle]
- dec a
- coord hl, 0, 0
- lb bc, 4, 11
- call z, ClearScreenArea ; only if in wild battle
- ld a, [wcf91]
- ld [wd11e], a
- call GetMonName
- ld hl, DoYouWantToNicknameText
- call PrintText
- coord hl, 14, 7
- lb bc, 8, 15
- ld a, TWO_OPTION_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID
- pop hl
- ld a, [wCurrentMenuItem]
- and a
- jr nz, .declinedNickname
- ld a, [wUpdateSpritesEnabled]
- push af
- xor a
- ld [wUpdateSpritesEnabled], a
- push hl
- ld a, NAME_MON_SCREEN
- ld [wNamingScreenType], a
- call DisplayNamingScreen
- ld a, [wIsInBattle]
- and a
- jr nz, .inBattle
- call ReloadMapSpriteTilePatterns
-.inBattle
- call LoadScreenTilesFromBuffer1
- pop hl
- pop af
- ld [wUpdateSpritesEnabled], a
- ld a, [wcf4b]
- cp "@"
- ret nz
-.declinedNickname
- ld d, h
- ld e, l
- ld hl, wcd6d
- ld bc, NAME_LENGTH
- jp CopyData
-
-DoYouWantToNicknameText:
- TX_FAR _DoYouWantToNicknameText
- db "@"
-
-DisplayNameRaterScreen:
- ld hl, wBuffer
- xor a
- ld [wUpdateSpritesEnabled], a
- ld a, NAME_MON_SCREEN
- ld [wNamingScreenType], a
- call DisplayNamingScreen
- call GBPalWhiteOutWithDelay3
- call RestoreScreenTilesAndReloadTilePatterns
- call LoadGBPal
- ld a, [wcf4b]
- cp "@"
- jr z, .playerCancelled
- ld hl, wPartyMonNicks
- ld bc, NAME_LENGTH
- ld a, [wWhichPokemon]
- call AddNTimes
- ld e, l
- ld d, h
- ld hl, wBuffer
- ld bc, NAME_LENGTH
- call CopyData
- and a
- ret
-.playerCancelled
- scf
- ret
-
-DisplayNamingScreen:
- push hl
- ld hl, wd730
- set 6, [hl]
- call GBPalWhiteOutWithDelay3
- call ClearScreen
- call UpdateSprites
- ld b, SET_PAL_GENERIC
- call RunPaletteCommand
- call LoadHpBarAndStatusTilePatterns
- call LoadEDTile
- callba LoadMonPartySpriteGfx
- coord hl, 0, 4
- lb bc, 9, 18
- call TextBoxBorder
- call PrintNamingText
- ld a, 3
- ld [wTopMenuItemY], a
- ld a, 1
- ld [wTopMenuItemX], a
- ld [wLastMenuItem], a
- ld [wCurrentMenuItem], a
- ld a, $ff
- ld [wMenuWatchedKeys], a
- ld a, 7
- ld [wMaxMenuItem], a
- ld a, "@"
- ld [wcf4b], a
- xor a
- ld hl, wNamingScreenSubmitName
- ld [hli], a
- ld [hli], a
- ld [wAnimCounter], a
-.selectReturnPoint
- call PrintAlphabet
- call GBPalNormal
-.ABStartReturnPoint
- ld a, [wNamingScreenSubmitName]
- and a
- jr nz, .submitNickname
- call PrintNicknameAndUnderscores
-.dPadReturnPoint
- call PlaceMenuCursor
-.inputLoop
- ld a, [wCurrentMenuItem]
- push af
- callba AnimatePartyMon_ForceSpeed1
- pop af
- ld [wCurrentMenuItem], a
- call JoypadLowSensitivity
- ld a, [hJoyPressed]
- and a
- jr z, .inputLoop
- ld hl, .namingScreenButtonFunctions
-.checkForPressedButton
- sla a
- jr c, .foundPressedButton
- inc hl
- inc hl
- inc hl
- inc hl
- jr .checkForPressedButton
-.foundPressedButton
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld h, [hl]
- ld l, a
- push de
- jp hl
-
-.submitNickname
- pop de
- ld hl, wcf4b
- ld bc, NAME_LENGTH
- call CopyData
- call GBPalWhiteOutWithDelay3
- call ClearScreen
- call ClearSprites
- call RunDefaultPaletteCommand
- call GBPalNormal
- xor a
- ld [wAnimCounter], a
- ld hl, wd730
- res 6, [hl]
- ld a, [wIsInBattle]
- and a
- jp z, LoadTextBoxTilePatterns
- jpab LoadHudTilePatterns
-
-.namingScreenButtonFunctions
- dw .dPadReturnPoint
- dw .pressedDown
- dw .dPadReturnPoint
- dw .pressedUp
- dw .dPadReturnPoint
- dw .pressedLeft
- dw .dPadReturnPoint
- dw .pressedRight
- dw .ABStartReturnPoint
- dw .pressedStart
- dw .selectReturnPoint
- dw .pressedSelect
- dw .ABStartReturnPoint
- dw .pressedB
- dw .ABStartReturnPoint
- dw .pressedA
-
-.pressedA_changedCase
- pop de
- ld de, .selectReturnPoint
- push de
-.pressedSelect
- ld a, [wAlphabetCase]
- xor $1
- ld [wAlphabetCase], a
- ret
-
-.pressedStart
- ld a, 1
- ld [wNamingScreenSubmitName], a
- ret
-
-.pressedA
- ld a, [wCurrentMenuItem]
- cp $5 ; "ED" row
- jr nz, .didNotPressED
- ld a, [wTopMenuItemX]
- cp $11 ; "ED" column
- jr z, .pressedStart
-.didNotPressED
- ld a, [wCurrentMenuItem]
- cp $6 ; case switch row
- jr nz, .didNotPressCaseSwtich
- ld a, [wTopMenuItemX]
- cp $1 ; case switch column
- jr z, .pressedA_changedCase
-.didNotPressCaseSwtich
- ld hl, wMenuCursorLocation
- ld a, [hli]
- ld h, [hl]
- ld l, a
- inc hl
- ld a, [hl]
- ld [wNamingScreenLetter], a
- call CalcStringLength
- ld a, [wNamingScreenLetter]
- cp $e5
- ld de, Dakutens
- jr z, .dakutensAndHandakutens
- cp $e4
- ld de, Handakutens
- jr z, .dakutensAndHandakutens
- ld a, [wNamingScreenType]
- cp NAME_MON_SCREEN
- jr nc, .checkMonNameLength
- ld a, [wNamingScreenNameLength]
- cp $7 ; max length of player/rival names
- jr .checkNameLength
-.checkMonNameLength
- ld a, [wNamingScreenNameLength]
- cp $a ; max length of pokemon nicknames
-.checkNameLength
- jr c, .addLetter
- ret
-
-.dakutensAndHandakutens
- push hl
- call DakutensAndHandakutens
- pop hl
- ret nc
- dec hl
-.addLetter
- ld a, [wNamingScreenLetter]
- ld [hli], a
- ld [hl], "@"
- ld a, SFX_PRESS_AB
- call PlaySound
- ret
-.pressedB
- ld a, [wNamingScreenNameLength]
- and a
- ret z
- call CalcStringLength
- dec hl
- ld [hl], "@"
- ret
-.pressedRight
- ld a, [wCurrentMenuItem]
- cp $6
- ret z ; can't scroll right on bottom row
- ld a, [wTopMenuItemX]
- cp $11 ; max
- jp z, .wrapToFirstColumn
- inc a
- inc a
- jr .done
-.wrapToFirstColumn
- ld a, $1
- jr .done
-.pressedLeft
- ld a, [wCurrentMenuItem]
- cp $6
- ret z ; can't scroll right on bottom row
- ld a, [wTopMenuItemX]
- dec a
- jp z, .wrapToLastColumn
- dec a
- jr .done
-.wrapToLastColumn
- ld a, $11 ; max
- jr .done
-.pressedUp
- ld a, [wCurrentMenuItem]
- dec a
- ld [wCurrentMenuItem], a
- and a
- ret nz
- ld a, $6 ; wrap to bottom row
- ld [wCurrentMenuItem], a
- ld a, $1 ; force left column
- jr .done
-.pressedDown
- ld a, [wCurrentMenuItem]
- inc a
- ld [wCurrentMenuItem], a
- cp $7
- jr nz, .wrapToTopRow
- ld a, $1
- ld [wCurrentMenuItem], a
- jr .done
-.wrapToTopRow
- cp $6
- ret nz
- ld a, $1
-.done
- ld [wTopMenuItemX], a
- jp EraseMenuCursor
-
-LoadEDTile:
-; In Red/Blue, the bank for the ED_tile was defined incorrectly as bank0
-; Luckily, the MBC3 treats loading $0 into $2000-$2fff range as loading bank1 into $4000-$7fff range
-; Because Yellow uses the MBC5, loading $0 into $2000 - $2fff range will load bank0 instead of bank1 and thus incorrectly load the tile
-; Instead of defining the correct bank, GameFreak decided to simply copy the ED_Tile in the function during HBlank
- ld de, ED_Tile
- ld hl, vFont + $700
- ld c, $4 ; number of copies needed
-.waitForHBlankLoop
- ld a, [rSTAT]
- and %10 ; in HBlank?
- jr nz, .waitForHBlankLoop
- ld a, [de]
- ld [hli], a
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- ld [hli], a
- inc de
- dec c
- jr nz, .waitForHBlankLoop
- ret
-
-ED_Tile:
- INCBIN "gfx/ED_tile.1bpp"
-ED_TileEnd:
-
-PrintAlphabet:
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld a, [wAlphabetCase]
- and a
- ld de, LowerCaseAlphabet
- jr nz, .lowercase
- ld de, UpperCaseAlphabet
-.lowercase
- coord hl, 2, 5
- lb bc, 5, 9 ; 5 rows, 9 columns
-.outerLoop
- push bc
-.innerLoop
- ld a, [de]
- ld [hli], a
- inc hl
- inc de
- dec c
- jr nz, .innerLoop
- ld bc, SCREEN_WIDTH + 2
- add hl, bc
- pop bc
- dec b
- jr nz, .outerLoop
- call PlaceString
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- jp Delay3
-
-LowerCaseAlphabet:
- db "abcdefghijklmnopqrstuvwxyz ×():;[]",$e1,$e2,"-?!♂♀/⠄,¥UPPER CASE@"
-
-UpperCaseAlphabet:
- db "ABCDEFGHIJKLMNOPQRSTUVWXYZ ×():;[]",$e1,$e2,"-?!♂♀/⠄,¥lower case@"
-
-PrintNicknameAndUnderscores:
- call CalcStringLength
- ld a, c
- ld [wNamingScreenNameLength], a
- coord hl, 10, 2
- lb bc, 1, 10
- call ClearScreenArea
- coord hl, 10, 2
- ld de, wcf4b
- call PlaceString
- coord hl, 10, 3
- ld a, [wNamingScreenType]
- cp NAME_MON_SCREEN
- jr nc, .pokemon1
- ld b, 7 ; player or rival max name length
- jr .playerOrRival1
-.pokemon1
- ld b, 10 ; pokemon max name length
-.playerOrRival1
- ld a, $76 ; underscore tile id
-.placeUnderscoreLoop
- ld [hli], a
- dec b
- jr nz, .placeUnderscoreLoop
- ld a, [wNamingScreenType]
- cp NAME_MON_SCREEN
- ld a, [wNamingScreenNameLength]
- jr nc, .pokemon2
- cp 7 ; player or rival max name length
- jr .playerOrRival2
-.pokemon2
- cp 10 ; pokemon max name length
-.playerOrRival2
- jr nz, .emptySpacesRemaining
- ; when all spaces are filled, force the cursor onto the ED tile
- call EraseMenuCursor
- ld a, $11 ; "ED" x coord
- ld [wTopMenuItemX], a
- ld a, $5 ; "ED" y coord
- ld [wCurrentMenuItem], a
- ld a, [wNamingScreenType]
- cp NAME_MON_SCREEN
- ld a, 9 ; keep the last underscore raised
- jr nc, .pokemon3
- ld a, 6 ; keep the last underscore raised
-.pokemon3
-.emptySpacesRemaining
- ld c, a
- ld b, $0
- coord hl, 10, 3
- add hl, bc
- ld [hl], $77 ; raised underscore tile id
- ret
-
-DakutensAndHandakutens:
- push de
- call CalcStringLength
- dec hl
- ld a, [hl]
- pop hl
- ld de, $2
- call IsInArray
- ret nc
- inc hl
- ld a, [hl]
- ld [wNamingScreenLetter], a
- ret
-
-Dakutens:
- db "かが", "きぎ", "くぐ", "けげ", "こご"
- db "さざ", "しじ", "すず", "せぜ", "そぞ"
- db "ただ", "ちぢ", "つづ", "てで", "とど"
- db "はば", "ひび", "ふぶ", "へべ", "ほぼ"
- db "カガ", "キギ", "クグ", "ケゲ", "コゴ"
- db "サザ", "シジ", "スズ", "セゼ", "ソゾ"
- db "タダ", "チヂ", "ツヅ", "テデ", "トド"
- db "ハバ", "ヒビ", "フブ", "へべ", "ホボ"
- db $ff
-
-Handakutens:
- db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ"
- db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ"
- db $ff
-
-; calculates the length of the string at wcf4b and stores it in c
-CalcStringLength:
- ld hl, wcf4b
- ld c, $0
-.loop
- ld a, [hl]
- cp "@"
- ret z
- inc hl
- inc c
- jr .loop
-
-PrintNamingText:
- coord hl, 0, 1
- ld a, [wNamingScreenType]
- ld de, YourTextString
- and a
- jr z, .notNickname
- ld de, RivalsTextString
- dec a
- jr z, .notNickname
- ld a, [wcf91]
- ld [wMonPartySpriteSpecies], a
- push af
- callba WriteMonPartySpriteOAMBySpecies
- pop af
- ld [wd11e], a
- call GetMonName
- coord hl, 4, 1
- call PlaceString
- ld hl, $1
- add hl, bc
- ld [hl], $c9
- coord hl, 1, 3
- ld de, NicknameTextString
- jr .placeString
-.notNickname
- call PlaceString
- ld l, c
- ld h, b
- ld de, NameTextString
-.placeString
- jp PlaceString
-
-YourTextString:
- db "YOUR @"
-
-RivalsTextString:
- db "RIVAL's @"
-
-NameTextString:
- db "NAME?@"
-
-NicknameTextString:
- db "NICKNAME?@"
diff --git a/engine/menu/oaks_pc.asm b/engine/menu/oaks_pc.asm
deleted file mode 100755
index 03c9b8f1..00000000
--- a/engine/menu/oaks_pc.asm
+++ /dev/null
@@ -1,28 +0,0 @@
-OpenOaksPC:
- call SaveScreenTilesToBuffer2
- ld hl, AccessedOaksPCText
- call PrintText
- ld hl, GetDexRatedText
- call PrintText
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- and a
- jr nz, .closePC
- predef DisplayDexRating
-.closePC
- ld hl, ClosedOaksPCText
- call PrintText
- jp LoadScreenTilesFromBuffer2
-
-GetDexRatedText:
- TX_FAR _GetDexRatedText
- db "@"
-
-ClosedOaksPCText:
- TX_FAR _ClosedOaksPCText
- TX_WAIT
- db "@"
-
-AccessedOaksPCText:
- TX_FAR _AccessedOaksPCText
- db "@"
diff --git a/engine/menu/options.asm b/engine/menu/options.asm
deleted file mode 100644
index da89ad82..00000000
--- a/engine/menu/options.asm
+++ /dev/null
@@ -1,443 +0,0 @@
-DisplayOptionMenu_:
- call InitOptionsMenu
-.optionMenuLoop
- call JoypadLowSensitivity
- ld a, [hJoy5]
- and START | B_BUTTON
- jr nz, .exitOptionMenu
- call OptionsControl
- jr c, .dpadDelay
- call GetOptionPointer
- jr c, .exitOptionMenu
-.dpadDelay
- call OptionsMenu_UpdateCursorPosition
- call DelayFrame
- call DelayFrame
- call DelayFrame
- jr .optionMenuLoop
-.exitOptionMenu
- ret
-
-GetOptionPointer:
- ld a, [wOptionsCursorLocation]
- ld e, a
- ld d, $0
- ld hl, OptionMenuJumpTable
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl ; jump to the function for the current highlighted option
-
-OptionMenuJumpTable:
- dw OptionsMenu_TextSpeed
- dw OptionsMenu_BattleAnimations
- dw OptionsMenu_BattleStyle
- dw OptionsMenu_SpeakerSettings
- dw OptionsMenu_GBPrinterBrightness
- dw OptionsMenu_Dummy
- dw OptionsMenu_Dummy
- dw OptionsMenu_Cancel
-
-OptionsMenu_TextSpeed:
- call GetTextSpeed
- ld a, [hJoy5]
- bit 4, a ; right
- jr nz, .pressedRight
- bit 5, a
- jr nz, .pressedLeft
- jr .asm_41ce0
-.pressedRight
- ld a, c
- cp $2
- jr c, .asm_41cca
- ld c, $ff
-.asm_41cca
- inc c
- ld a, e
- jr .asm_41cd6
-.pressedLeft
- ld a, c
- and a
- jr nz, .asm_41cd4
- ld c, $3
-.asm_41cd4
- dec c
- ld a, d
-.asm_41cd6
- ld b, a
- ld a, [wOptions]
- and $f0
- or b
- ld [wOptions], a
-.asm_41ce0
- ld b, $0
- ld hl, TextSpeedStringsPointerTable
- add hl, bc
- add hl, bc
- ld e, [hl]
- inc hl
- ld d, [hl]
- coord hl, 14, 2
- call PlaceString
- and a
- ret
-
-TextSpeedStringsPointerTable:
- dw FastText
- dw MidText
- dw SlowText
-
-FastText:
- db "FAST@"
-MidText:
- db "MID @"
-SlowText:
- db "SLOW@"
-
-GetTextSpeed:
- ld a, [wOptions]
- and $f
- cp $5
- jr z, .slowTextOption
- cp $1
- jr z, .fastTextOption
-; mid text option
- ld c, $1
- lb de, 1, 5
- ret
-.slowTextOption
- ld c, $2
- lb de, 3, 1
- ret
-.fastTextOption
- ld c, $0
- lb de, 5, 3
- ret
-
-OptionsMenu_BattleAnimations:
- ld a, [hJoy5]
- and D_RIGHT | D_LEFT
- jr nz, .asm_41d33
- ld a, [wOptions]
- and $80 ; mask other bits
- jr .asm_41d3b
-.asm_41d33
- ld a, [wOptions]
- xor $80
- ld [wOptions], a
-.asm_41d3b
- ld bc, $0
- sla a
- rl c
- ld hl, AnimationOptionStringsPointerTable
- add hl, bc
- add hl, bc
- ld e, [hl]
- inc hl
- ld d, [hl]
- coord hl, 14, 4
- call PlaceString
- and a
- ret
-
-AnimationOptionStringsPointerTable:
- dw AnimationOnText
- dw AnimationOffText
-
-AnimationOnText:
- db "ON @"
-AnimationOffText:
- db "OFF@"
-
-OptionsMenu_BattleStyle:
- ld a, [hJoy5]
- and D_LEFT | D_RIGHT
- jr nz, .asm_41d6b
- ld a, [wOptions]
- and $40 ; mask other bits
- jr .asm_41d73
-.asm_41d6b
- ld a, [wOptions]
- xor $40
- ld [wOptions], a
-.asm_41d73
- ld bc, $0
- sla a
- sla a
- rl c
- ld hl, BattleStyleOptionStringsPointerTable
- add hl, bc
- add hl, bc
- ld e, [hl]
- inc hl
- ld d, [hl]
- coord hl, 14, 6
- call PlaceString
- and a
- ret
-
-BattleStyleOptionStringsPointerTable:
- dw BattleStyleShiftText
- dw BattleStyleSetText
-
-BattleStyleShiftText:
- db "SHIFT@"
-BattleStyleSetText:
- db "SET @"
-
-OptionsMenu_SpeakerSettings:
- ld a, [wOptions]
- and $30
- swap a
- ld c, a
- ld a, [hJoy5]
- bit 4, a
- jr nz, .pressedRight
- bit 5, a
- jr nz, .pressedLeft
- jr .asm_41dca
-.pressedRight
- ld a, c
- inc a
- and $3
- jr .asm_41dba
-.pressedLeft
- ld a, c
- dec a
- and $3
-.asm_41dba
- ld c, a
- swap a
- ld b, a
- xor a
- ld [rNR51], a
- ld a, [wOptions]
- and $cf
- or b
- ld [wOptions], a
-.asm_41dca
- ld b, $0
- ld hl, SpeakerOptionStringsPointerTable
- add hl, bc
- add hl, bc
- ld e, [hl]
- inc hl
- ld d, [hl]
- coord hl, 8, 8
- call PlaceString
- and a
- ret
-
-SpeakerOptionStringsPointerTable:
- dw MonoSoundText
- dw Earphone1SoundText
- dw Earphone2SoundText
- dw Earphone3SoundText
-
-MonoSoundText:
- db "MONO @"
-Earphone1SoundText:
- db "EARPHONE1@"
-Earphone2SoundText:
- db "EARPHONE2@"
-Earphone3SoundText:
- db "EARPHONE3@"
-
-OptionsMenu_GBPrinterBrightness:
- call Func_41e7b
- ld a, [hJoy5]
- bit 4, a
- jr nz, .pressedRight
- bit 5, a
- jr nz, .pressedLeft
- jr .asm_41e32
-.pressedRight
- ld a, c
- cp $4
- jr c, .asm_41e22
- ld c, $ff
-.asm_41e22
- inc c
- ld a, e
- jr .asm_41e2e
-.pressedLeft
- ld a, c
- and a
- jr nz, .asm_41e2c
- ld c, $5
-.asm_41e2c
- dec c
- ld a, d
-.asm_41e2e
- ld b, a
- ld [wPrinterSettings], a
-.asm_41e32
- ld b, $0
- ld hl, GBPrinterOptionStringsPointerTable
- add hl, bc
- add hl, bc
- ld e, [hl]
- inc hl
- ld d, [hl]
- coord hl, 8, 10
- call PlaceString
- and a
- ret
-
-GBPrinterOptionStringsPointerTable:
- dw LightestPrintText
- dw LighterPrintText
- dw NormalPrintText
- dw DarkerPrintText
- dw DarkestPrintText
-
-LightestPrintText:
- db "LIGHTEST@"
-LighterPrintText:
- db "LIGHTER @"
-NormalPrintText:
- db "NORMAL @"
-DarkerPrintText:
- db "DARKER @"
-DarkestPrintText:
- db "DARKEST @"
-
-Func_41e7b:
- ld a, [wPrinterSettings]
- and a
- jr z, .asm_41e93
- cp $20
- jr z, .asm_41e99
- cp $60
- jr z, .asm_41e9f
- cp $7f
- jr z, .asm_41ea5
- ld c, $2
- lb de, $20, $60
- ret
-.asm_41e93
- ld c, $0
- lb de, $7f, $20
- ret
-.asm_41e99
- ld c, $1
- lb de, $0, $40
- ret
-.asm_41e9f
- ld c, $3
- lb de, $40, $7f
- ret
-.asm_41ea5
- ld c, $4
- lb de, $60, $0
- ret
-
-OptionsMenu_Dummy:
- and a
- ret
-
-OptionsMenu_Cancel:
- ld a, [hJoy5]
- and A_BUTTON
- jr nz, .pressedCancel
- and a
- ret
-.pressedCancel
- scf
- ret
-
-OptionsControl:
- ld hl, wOptionsCursorLocation
- ld a, [hJoy5]
- cp D_DOWN
- jr z, .pressedDown
- cp D_UP
- jr z, .pressedUp
- and a
- ret
-.pressedDown
- ld a, [hl]
- cp $7
- jr nz, .doNotWrapAround
- ld [hl], $0
- scf
- ret
-.doNotWrapAround
- cp $4
- jr c, .regularIncrement
- ld [hl], $6
-.regularIncrement
- inc [hl]
- scf
- ret
-.pressedUp
- ld a, [hl]
- cp $7
- jr nz, .doNotMoveCursorToPrintOption
- ld [hl], $4
- scf
- ret
-.doNotMoveCursorToPrintOption
- and a
- jr nz, .regularDecrement
- ld [hl], $8
-.regularDecrement
- dec [hl]
- scf
- ret
-
-OptionsMenu_UpdateCursorPosition:
- coord hl, 1, 1
- ld de, SCREEN_WIDTH
- ld c, 16
-.loop
- ld [hl], " "
- add hl, de
- dec c
- jr nz, .loop
- coord hl, 1, 2
- ld bc, SCREEN_WIDTH * 2
- ld a, [wOptionsCursorLocation]
- call AddNTimes
- ld [hl], "▶"
- ret
-
-InitOptionsMenu:
- coord hl, 0, 0
- lb bc, SCREEN_HEIGHT - 2, SCREEN_WIDTH - 2
- call TextBoxBorder
- coord hl, 2, 2
- ld de, AllOptionsText
- call PlaceString
- coord hl, 2, 16
- ld de, OptionMenuCancelText
- call PlaceString
- xor a
- ld [wOptionsCursorLocation], a
- ld c, 5 ; the number of options to loop through
-.loop
- push bc
- call GetOptionPointer ; updates the next option
- pop bc
- ld hl, wOptionsCursorLocation
- inc [hl] ; moves the cursor for the highlighted option
- dec c
- jr nz, .loop
- xor a
- ld [wOptionsCursorLocation], a
- inc a
- ld [H_AUTOBGTRANSFERENABLED], a
- call Delay3
- ret
-
-AllOptionsText:
- db "TEXT SPEED :"
- next "ANIMATION :"
- next "BATTLESTYLE:"
- next "SOUND:"
- next "PRINT:@"
-
-OptionMenuCancelText:
- db "CANCEL@"
diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm
deleted file mode 100755
index 00c757be..00000000
--- a/engine/menu/party_menu.asm
+++ /dev/null
@@ -1,333 +0,0 @@
-; [wPartyMenuTypeOrMessageID] = menu type / message ID
-; if less than $F0, it is a menu type
-; menu types:
-; 00: normal pokemon menu (e.g. Start menu)
-; 01: use healing item on pokemon menu
-; 02: in-battle switch pokemon menu
-; 03: learn TM/HM menu
-; 04: swap pokemon positions menu
-; 05: use evolution stone on pokemon menu
-; otherwise, it is a message ID
-; f0: poison healed
-; f1: burn healed
-; f2: freeze healed
-; f3: sleep healed
-; f4: paralysis healed
-; f5: HP healed
-; f6: health returned
-; f7: revitalized
-; f8: leveled up
-DrawPartyMenu_:
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- call ClearScreen
- call UpdateSprites
- callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
-
-RedrawPartyMenu_:
- ld a, [wPartyMenuTypeOrMessageID]
- cp SWAP_MONS_PARTY_MENU
- jp z, .printMessage
- call ErasePartyMenuCursors
- callba InitPartyMenuBlkPacket
- coord hl, 3, 0
- ld de, wPartySpecies
- xor a
- ld c, a
- ld [hPartyMonIndex], a
- ld [wWhichPartyMenuHPBar], a
-.loop
- ld a, [de]
- cp $FF ; reached the terminator?
- jp z, .afterDrawingMonEntries
- push bc
- push de
- push hl
- ld a, c
- push hl
- ld hl, wPartyMonNicks
- call GetPartyMonName
- pop hl
- call PlaceString ; print the pokemon's name
- ld a, [hPartyMonIndex]
- ld [wWhichPokemon], a
- callab IsThisPartymonStarterPikachu_Party
- jr nc, .regularMon
- call CheckPikachuFollowingPlayer
- jr z, .regularMon
- ld a, $ff
- ld [hPartyMonIndex], a
-.regularMon
- callba WriteMonPartySpriteOAMByPartyIndex ; place the appropriate pokemon icon
- ld a, [wWhichPokemon]
- inc a
- ld [hPartyMonIndex], a
- call LoadMonData
- pop hl
- push hl
- ld a, [wMenuItemToSwap]
- and a ; is the player swapping pokemon positions?
- jr z, .skipUnfilledRightArrow
-; if the player is swapping pokemon positions
- dec a
- ld b, a
- ld a, [wWhichPokemon]
- cp b ; is the player swapping the current pokemon in the list?
- jr nz, .skipUnfilledRightArrow
-; the player is swapping the current pokemon in the list
- dec hl
- dec hl
- dec hl
- ld a, "▷" ; unfilled right arrow menu cursor
- ld [hli], a ; place the cursor
- inc hl
- inc hl
-.skipUnfilledRightArrow
- ld a, [wPartyMenuTypeOrMessageID] ; menu type
- cp TMHM_PARTY_MENU
- jr z, .teachMoveMenu
- cp EVO_STONE_PARTY_MENU
- jr z, .evolutionStoneMenu
- push hl
- ld bc, 14 ; 14 columns to the right
- add hl, bc
- ld de, wLoadedMonStatus
- call PrintStatusCondition
- pop hl
- push hl
- ld bc, SCREEN_WIDTH + 1 ; down 1 row and right 1 column
- ld a, [hFlags_0xFFFA]
- set 0, a
- ld [hFlags_0xFFFA], a
- add hl, bc
- predef DrawHP2 ; draw HP bar and prints current / max HP
- ld a, [hFlags_0xFFFA]
- res 0, a
- ld [hFlags_0xFFFA], a
- call SetPartyMenuHPBarColor ; color the HP bar (on SGB)
- pop hl
- jr .printLevel
-.teachMoveMenu
- push hl
- predef CanLearnTM ; check if the pokemon can learn the move
- pop hl
- ld de, .ableToLearnMoveText
- ld a, c
- and a
- jr nz, .placeMoveLearnabilityString
- ld de, .notAbleToLearnMoveText
-.placeMoveLearnabilityString
- push hl
- ld bc, 20 + 9 ; down 1 row and right 9 columns
- add hl, bc
- call PlaceString
- pop hl
-.printLevel
- ld bc, 10 ; move 10 columns to the right
- add hl, bc
- call PrintLevel
- pop hl
- pop de
- inc de
- ld bc, 2 * 20
- add hl, bc
- pop bc
- inc c
- jp .loop
-.ableToLearnMoveText
- db "ABLE@"
-.notAbleToLearnMoveText
- db "NOT ABLE@"
-.evolutionStoneMenu
- push hl
- ld hl, EvosMovesPointerTable
- ld b, 0
- ld a, [wLoadedMonSpecies]
- dec a
- add a
- rl b
- ld c, a
- add hl, bc
- ld de, wEvosMoves
- ld a, BANK(EvosMovesPointerTable)
- ld bc, 2
- call FarCopyData
- ld hl, wEvosMoves
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, wEvosMoves
- ld a, BANK(EvosMovesPointerTable)
- ld bc, wEvosMoves.end - wEvosMoves
- call FarCopyData
- ld hl, wEvosMoves
- ld de, .notAbleToEvolveText
-; loop through the pokemon's evolution entries
-.checkEvolutionsLoop
- ld a, [hli]
- and a ; reached terminator?
- jr z, .placeEvolutionStoneString ; if so, place the "NOT ABLE" string
- inc hl
- inc hl
- cp EV_ITEM
- jr nz, .checkEvolutionsLoop
-; if it's a stone evolution entry
- dec hl
- dec hl
- ld b, [hl]
- ld a, [wEvoStoneItemID] ; the stone the player used
- inc hl
- inc hl
- inc hl
- cp b ; does the player's stone match this evolution entry's stone?
- jr nz, .checkEvolutionsLoop
-; if it does match
- ld de, .ableToEvolveText
-.placeEvolutionStoneString
- pop hl
- push hl
- ld bc, 20 + 9 ; down 1 row and right 9 columns
- add hl, bc
- call PlaceString
- pop hl
- jr .printLevel
-.ableToEvolveText
- db "ABLE@"
-.notAbleToEvolveText
- db "NOT ABLE@"
-.afterDrawingMonEntries
- ld b, SET_PAL_PARTY_MENU
- call RunPaletteCommand
-.printMessage
- ld hl, wd730
- ld a, [hl]
- push af
- push hl
- set 6, [hl] ; turn off letter printing delay
- ld a, [wPartyMenuTypeOrMessageID] ; message ID
- cp $F0
- jr nc, .printItemUseMessage
- add a
- ld hl, PartyMenuMessagePointers
- ld b, 0
- ld c, a
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call PrintText
-.done
- pop hl
- pop af
- ld [hl], a
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- call Delay3
- jp GBPalNormal
-.printItemUseMessage
- and $0F
- ld hl, PartyMenuItemUseMessagePointers
- add a
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- push hl
- ld a, [wUsedItemOnWhichPokemon]
- ld hl, wPartyMonNicks
- call GetPartyMonName
- pop hl
- call PrintText
- jr .done
-
-PartyMenuItemUseMessagePointers:
- dw AntidoteText
- dw BurnHealText
- dw IceHealText
- dw AwakeningText
- dw ParlyzHealText
- dw PotionText
- dw FullHealText
- dw ReviveText
- dw RareCandyText
-
-PartyMenuMessagePointers:
- dw PartyMenuNormalText
- dw PartyMenuItemUseText
- dw PartyMenuBattleText
- dw PartyMenuUseTMText
- dw PartyMenuSwapMonText
- dw PartyMenuItemUseText
-
-PartyMenuNormalText:
- TX_FAR _PartyMenuNormalText
- db "@"
-
-PartyMenuItemUseText:
- TX_FAR _PartyMenuItemUseText
- db "@"
-
-PartyMenuBattleText:
- TX_FAR _PartyMenuBattleText
- db "@"
-
-PartyMenuUseTMText:
- TX_FAR _PartyMenuUseTMText
- db "@"
-
-PartyMenuSwapMonText:
- TX_FAR _PartyMenuSwapMonText
- db "@"
-
-PotionText:
- TX_FAR _PotionText
- db "@"
-
-AntidoteText:
- TX_FAR _AntidoteText
- db "@"
-
-ParlyzHealText:
- TX_FAR _ParlyzHealText
- db "@"
-
-BurnHealText:
- TX_FAR _BurnHealText
- db "@"
-
-IceHealText:
- TX_FAR _IceHealText
- db "@"
-
-AwakeningText:
- TX_FAR _AwakeningText
- db "@"
-
-FullHealText:
- TX_FAR _FullHealText
- db "@"
-
-ReviveText:
- TX_FAR _ReviveText
- db "@"
-
-RareCandyText:
- TX_FAR _RareCandyText
- TX_SFX_ITEM_1 ; probably supposed to play SFX_LEVEL_UP but the wrong music bank is loaded
- TX_BLINK
- db "@"
-
-SetPartyMenuHPBarColor:
- ld hl, wPartyMenuHPBarColors
- ld a, [wWhichPartyMenuHPBar]
- ld c, a
- ld b, 0
- add hl, bc
- call GetHealthBarColor
- ld b, UPDATE_PARTY_MENU_BLK_PACKET
- call RunPaletteCommand
- ld hl, wWhichPartyMenuHPBar
- inc [hl]
- ret
diff --git a/engine/menu/pc.asm b/engine/menu/pc.asm
deleted file mode 100755
index 5639bd99..00000000
--- a/engine/menu/pc.asm
+++ /dev/null
@@ -1,141 +0,0 @@
-ActivatePC:
- call SaveScreenTilesToBuffer2
- ld a, SFX_TURN_ON_PC
- call PlaySound
- ld hl, TurnedOnPC1Text
- call PrintText
- call WaitForSoundToFinish
- ld hl, wFlags_0xcd60
- set 3, [hl]
- call LoadScreenTilesFromBuffer2
- call Delay3
-PCMainMenu:
- callba DisplayPCMainMenu
- ld hl, wFlags_0xcd60
- set 5, [hl]
- call HandleMenuInput
- bit 1, a ;if player pressed B
- jp nz, LogOff
- ld a, [wMaxMenuItem]
- cp 2
- jr nz, .next ;if not 2 menu items (not counting log off) (2 occurs before you get the pokedex)
- ld a, [wCurrentMenuItem]
- and a
- jp z, BillsPC ;if current menu item id is 0, it's bills pc
- cp 1
- jr z, .playersPC ;if current menu item id is 1, it's players pc
- jp LogOff ;otherwise, it's 2, and you're logging off
-.next
- cp 3
- jr nz, .next2 ;if not 3 menu items (not counting log off) (3 occurs after you get the pokedex, before you beat the pokemon league)
- ld a, [wCurrentMenuItem]
- and a
- jp z, BillsPC ;if current menu item id is 0, it's bills pc
- cp 1
- jr z, .playersPC ;if current menu item id is 1, it's players pc
- cp 2
- jp z, OaksPC ;if current menu item id is 2, it's oaks pc
- jp LogOff ;otherwise, it's 3, and you're logging off
-.next2
- ld a, [wCurrentMenuItem]
- and a
- jp z, BillsPC ;if current menu item id is 0, it's bills pc
- cp 1
- jr z, .playersPC ;if current menu item id is 1, it's players pc
- cp 2
- jp z, OaksPC ;if current menu item id is 2, it's oaks pc
- cp 3
- jp z, PKMNLeague ;if current menu item id is 3, it's pkmnleague
- jp LogOff ;otherwise, it's 4, and you're logging off
-.playersPC
- ld hl, wFlags_0xcd60
- res 5, [hl]
- set 3, [hl]
- ld a, SFX_ENTER_PC
- call PlaySound
- call WaitForSoundToFinish
- ld hl, AccessedMyPCText
- call PrintText
- callba PlayerPC
- jr ReloadMainMenu
-OaksPC:
- ld a, SFX_ENTER_PC
- call PlaySound
- call WaitForSoundToFinish
- callba OpenOaksPC
- jr ReloadMainMenu
-PKMNLeague:
- ld a, SFX_ENTER_PC
- call PlaySound
- call WaitForSoundToFinish
- callba PKMNLeaguePC
- jr ReloadMainMenu
-BillsPC:
- ld a, SFX_ENTER_PC
- call PlaySound
- call WaitForSoundToFinish
- CheckEvent EVENT_MET_BILL
- jr nz, .billsPC ;if you've met bill, use that bill's instead of someone's
- ld hl, AccessedSomeonesPCText
- jr .printText
-.billsPC
- ld hl, AccessedBillsPCText
-.printText
- call PrintText
- callba BillsPC_
-ReloadMainMenu:
- xor a
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- call ReloadMapData
- call UpdateSprites
- jp PCMainMenu
-LogOff:
- ld a, SFX_TURN_OFF_PC
- call PlaySound
- call WaitForSoundToFinish
- ld hl, wFlags_0xcd60
- res 3, [hl]
- res 5, [hl]
- ret
-
-TurnedOnPC1Text:
- TX_FAR _TurnedOnPC1Text
- db "@"
-
-AccessedBillsPCText:
- TX_FAR _AccessedBillsPCText
- db "@"
-
-AccessedSomeonesPCText:
- TX_FAR _AccessedSomeonesPCText
- db "@"
-
-AccessedMyPCText:
- TX_FAR _AccessedMyPCText
- db "@"
-
-; removes one of the specified item ID [hItemToRemoveID] from bag (if existent)
-RemoveItemByID:
- ld hl, wBagItems
- ld a, [hItemToRemoveID]
- ld b, a
- xor a
- ld [hItemToRemoveIndex], a
-.loop
- ld a, [hli]
- cp -1 ; reached terminator?
- ret z
- cp b
- jr z, .foundItem
- inc hl
- ld a, [hItemToRemoveIndex]
- inc a
- ld [hItemToRemoveIndex], a
- jr .loop
-.foundItem
- ld a, $1
- ld [wItemQuantity], a
- ld a, [hItemToRemoveIndex]
- ld [wWhichPokemon], a
- ld hl, wNumBagItems
- jp RemoveItemFromInventory
diff --git a/engine/menu/players_pc.asm b/engine/menu/players_pc.asm
deleted file mode 100755
index 1cc02cbf..00000000
--- a/engine/menu/players_pc.asm
+++ /dev/null
@@ -1,302 +0,0 @@
-PlayerPC:
- ld a, ITEM_NAME
- ld [wNameListType], a
- call SaveScreenTilesToBuffer1
- xor a
- ld [wBagSavedMenuItem], a
- ld [wParentMenuItem], a
- ld a, [wFlags_0xcd60]
- bit 3, a ; accessing player's PC through another PC?
- jr nz, PlayerPCMenu
-; accessing it directly
- ld a, SFX_TURN_ON_PC
- call PlaySound
- ld hl, TurnedOnPC2Text
- call PrintText
-
-PlayerPCMenu:
- ld hl, wd730
- set 6, [hl]
- ld a, [wParentMenuItem]
- ld [wCurrentMenuItem], a
- ld hl, wFlags_0xcd60
- set 5, [hl]
- call LoadScreenTilesFromBuffer2
- coord hl, 0, 0
- lb bc, 8, 14
- call TextBoxBorder
- call UpdateSprites
- coord hl, 2, 2
- ld de, PlayersPCMenuEntries
- call PlaceString
- ld hl, wTopMenuItemY
- ld a, 2
- ld [hli], a ; wTopMenuItemY
- dec a
- ld [hli], a ; wTopMenuItemX
- inc hl
- inc hl
- ld a, 3
- ld [hli], a ; wMaxMenuItem
- ld a, A_BUTTON | B_BUTTON
- ld [hli], a ; wMenuWatchedKeys
- xor a
- ld [hl], a
- ld hl, wListScrollOffset
- ld [hli], a ; wListScrollOffset
- ld [hl], a ; wMenuWatchMovingOutOfBounds
- ld [wPlayerMonNumber], a
- ld hl, WhatDoYouWantText
- call PrintText
- call HandleMenuInput
- bit 1, a
- jp nz, ExitPlayerPC
- call PlaceUnfilledArrowMenuCursor
- ld a, [wCurrentMenuItem]
- ld [wParentMenuItem], a
- and a
- jp z, PlayerPCWithdraw
- dec a
- jp z, PlayerPCDeposit
- dec a
- jp z, PlayerPCToss
-
-ExitPlayerPC:
- ld a, [wFlags_0xcd60]
- bit 3, a ; accessing player's PC through another PC?
- jr nz, .next
-; accessing it directly
- ld a, SFX_TURN_OFF_PC
- call PlaySound
- call WaitForSoundToFinish
-.next
- ld hl, wFlags_0xcd60
- res 5, [hl]
- call LoadScreenTilesFromBuffer2
- xor a
- ld [wListScrollOffset], a
- ld [wBagSavedMenuItem], a
- ld hl, wd730
- res 6, [hl]
- xor a
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ret
-
-PlayerPCDeposit:
- xor a
- ld [wCurrentMenuItem], a
- ld [wListScrollOffset], a
- ld a, [wNumBagItems]
- and a
- jr nz, .loop
- ld hl, NothingToDepositText
- call PrintText
- jp PlayerPCMenu
-.loop
- ld hl, WhatToDepositText
- call PrintText
- ld hl, wNumBagItems
- ld a, l
- ld [wListPointer], a
- ld a, h
- ld [wListPointer + 1], a
- xor a
- ld [wPrintItemPrices], a
- ld a, ITEMLISTMENU
- ld [wListMenuID], a
- call DisplayListMenuID
- jp c, PlayerPCMenu
- call IsKeyItem
- ld a, 1
- ld [wItemQuantity], a
- ld a, [wIsKeyItem]
- and a
- jr nz, .next
-; if it's not a key item, there can be more than one of the item
- ld hl, DepositHowManyText
- call PrintText
- call DisplayChooseQuantityMenu
- cp $ff
- jp z, .loop
-.next
- ld hl, wNumBoxItems
- call AddItemToInventory
- jr c, .roomAvailable
- ld hl, NoRoomToStoreText
- call PrintText
- jp .loop
-.roomAvailable
- ld hl, wNumBagItems
- call RemoveItemFromInventory
- call WaitForSoundToFinish
- ld a, SFX_WITHDRAW_DEPOSIT
- call PlaySound
- call WaitForSoundToFinish
- ld hl, ItemWasStoredText
- call PrintText
- jp .loop
-
-PlayerPCWithdraw:
- xor a
- ld [wCurrentMenuItem], a
- ld [wListScrollOffset], a
- ld a, [wNumBoxItems]
- and a
- jr nz, .loop
- ld hl, NothingStoredText
- call PrintText
- jp PlayerPCMenu
-.loop
- ld hl, WhatToWithdrawText
- call PrintText
- ld hl, wNumBoxItems
- ld a, l
- ld [wListPointer], a
- ld a, h
- ld [wListPointer + 1], a
- xor a
- ld [wPrintItemPrices], a
- ld a, ITEMLISTMENU
- ld [wListMenuID], a
- call DisplayListMenuID
- jp c, PlayerPCMenu
- call IsKeyItem
- ld a, 1
- ld [wItemQuantity], a
- ld a, [wIsKeyItem]
- and a
- jr nz, .next
-; if it's not a key item, there can be more than one of the item
- ld hl, WithdrawHowManyText
- call PrintText
- call DisplayChooseQuantityMenu
- cp $ff
- jp z, .loop
-.next
- ld hl, wNumBagItems
- call AddItemToInventory
- jr c, .roomAvailable
- ld hl, CantCarryMoreText
- call PrintText
- jp .loop
-.roomAvailable
- ld hl, wNumBoxItems
- call RemoveItemFromInventory
- call WaitForSoundToFinish
- ld a, SFX_WITHDRAW_DEPOSIT
- call PlaySound
- call WaitForSoundToFinish
- ld hl, WithdrewItemText
- call PrintText
- jp .loop
-
-PlayerPCToss:
- xor a
- ld [wCurrentMenuItem], a
- ld [wListScrollOffset], a
- ld a, [wNumBoxItems]
- and a
- jr nz, .loop
- ld hl, NothingStoredText
- call PrintText
- jp PlayerPCMenu
-.loop
- ld hl, WhatToTossText
- call PrintText
- ld hl, wNumBoxItems
- ld a, l
- ld [wListPointer], a
- ld a, h
- ld [wListPointer + 1], a
- xor a
- ld [wPrintItemPrices], a
- ld a, ITEMLISTMENU
- ld [wListMenuID], a
- push hl
- call DisplayListMenuID
- pop hl
- jp c, PlayerPCMenu
- push hl
- call IsKeyItem
- pop hl
- ld a, 1
- ld [wItemQuantity], a
- ld a, [wIsKeyItem]
- and a
- jr nz, .next
- ld a, [wcf91]
- call IsItemHM
- jr c, .next
-; if it's not a key item, there can be more than one of the item
- push hl
- ld hl, TossHowManyText
- call PrintText
- call DisplayChooseQuantityMenu
- pop hl
- cp $ff
- jp z, .loop
-.next
- call TossItem ; disallows tossing key items
- jp .loop
-
-PlayersPCMenuEntries:
- db "WITHDRAW ITEM"
- next "DEPOSIT ITEM"
- next "TOSS ITEM"
- next "LOG OFF@"
-
-TurnedOnPC2Text:
- TX_FAR _TurnedOnPC2Text
- db "@"
-
-WhatDoYouWantText:
- TX_FAR _WhatDoYouWantText
- db "@"
-
-WhatToDepositText:
- TX_FAR _WhatToDepositText
- db "@"
-
-DepositHowManyText:
- TX_FAR _DepositHowManyText
- db "@"
-
-ItemWasStoredText:
- TX_FAR _ItemWasStoredText
- db "@"
-
-NothingToDepositText:
- TX_FAR _NothingToDepositText
- db "@"
-
-NoRoomToStoreText:
- TX_FAR _NoRoomToStoreText
- db "@"
-
-WhatToWithdrawText:
- TX_FAR _WhatToWithdrawText
- db "@"
-
-WithdrawHowManyText:
- TX_FAR _WithdrawHowManyText
- db "@"
-
-WithdrewItemText:
- TX_FAR _WithdrewItemText
- db "@"
-
-NothingStoredText:
- TX_FAR _NothingStoredText
- db "@"
-
-CantCarryMoreText:
- TX_FAR _CantCarryMoreText
- db "@"
-
-WhatToTossText:
- TX_FAR _WhatToTossText
- db "@"
-
-TossHowManyText:
- TX_FAR _TossHowManyText
- db "@"
diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm
deleted file mode 100755
index bc2a7e9b..00000000
--- a/engine/menu/pokedex.asm
+++ /dev/null
@@ -1,747 +0,0 @@
-ShowPokedexMenu:
- call GBPalWhiteOut
- call ClearScreen
- call UpdateSprites
- ld a, [wListScrollOffset]
- push af
- xor a
- ld [wCurrentMenuItem], a
- ld [wListScrollOffset], a
- ld [wLastMenuItem], a
- inc a
- ld [wd11e], a
- ld [hJoy7], a
-.setUpGraphics
- callab LoadPokedexTilePatterns
-.loop
- ld b, SET_PAL_GENERIC
- call RunPaletteCommand
-.doPokemonListMenu
- ld hl, wTopMenuItemY
- ld a, 3
- ld [hli], a ; top menu item Y
- xor a
- ld [hli], a ; top menu item X
- inc a
- ld [wMenuWatchMovingOutOfBounds], a
- inc hl
- inc hl
- ld a, 6
- ld [hli], a ; max menu item ID
- 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
- xor a
- ld [wMenuWatchMovingOutOfBounds], a
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld [hJoy7], a
- ld [wWastedByteCD3A], a
- ld [wOverrideSimulatedJoypadStatesMask], a
- pop af
- ld [wListScrollOffset], a
- call GBPalWhiteOutWithDelay3
- call RunDefaultPaletteCommand
- jp ReloadMapData
-
-.goToSideMenu
- call HandlePokedexSideMenu
- dec b
- jr z, .exitPokedex ; if the player chose Quit
- dec b
- jr z, .doPokemonListMenu ; if pokemon not seen or player pressed B button
- dec b
- jr z, .loop
- jp .setUpGraphics ; if pokemon data or area was shown
-
-; handles the menu on the lower right in the pokedex screen
-; OUTPUT:
-; b = reason for exiting menu
-; 00: showed pokemon data or area
-; 01: the player chose Quit
-; 02: the pokemon has not been seen yet or the player pressed the B button
-HandlePokedexSideMenu:
- call PlaceUnfilledArrowMenuCursor
- ld a, [wCurrentMenuItem]
- push af
- ld b, a
- ld a, [wLastMenuItem]
- push af
- ld a, [wListScrollOffset]
- push af
- add b
- inc a
- ld [wd11e], a
- ld a, [wd11e]
- push af
- ld a, [wDexMaxSeenMon]
- push af ; this doesn't need to be preserved
- ld hl, wPokedexSeen
- call IsPokemonBitSet
- ld b, 2
- jr z, .exitSideMenu
- call PokedexToIndex
- ld hl, wTopMenuItemY
- ld a, 8
- ld [hli], a ; top menu item Y
- ld a, 15
- ld [hli], a ; top menu item X
- xor a
- ld [hli], a ; current menu item ID
- inc hl
- ld a, 4
- 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
- ld [wMenuWatchMovingOutOfBounds], a
- ld [hJoy7], a
-.handleMenuInput
- call HandleMenuInput
- bit 1, a ; was the B button pressed?
- ld b, 2
- jr nz, .buttonBPressed
- ld a, [wCurrentMenuItem]
- and a
- jr z, .choseData
- dec a
- jr z, .choseCry
- dec a
- jr z, .choseArea
- dec a
- jr z, .chosePrint
-.choseQuit
- ld b, 1
-.exitSideMenu
- pop af
- ld [wDexMaxSeenMon], a
- pop af
- ld [wd11e], a
- pop af
- ld [wListScrollOffset], a
- pop af
- ld [wLastMenuItem], a
- pop af
- ld [wCurrentMenuItem], a
- ld a, $1
- ld [hJoy7], a
- push bc
- coord hl, 0, 3
- ld de, 20
- lb bc, " ", 13
- call DrawTileLine ; cover up the menu cursor in the pokemon list
- pop bc
- ret
-
-.buttonBPressed
- push bc
- coord hl, 15, 8
- ld de, 20
- lb bc, " ", 9
- call DrawTileLine ; cover up the menu cursor in the side menu
- pop bc
- jr .exitSideMenu
-
-.choseData
- call ShowPokedexDataInternal
- ld b, 0
- jr .exitSideMenu
-
-; play pokemon cry
-.choseCry
- ld a, [wd11e]
- call GetCryData
- call PlaySound
- jr .handleMenuInput
-
-.choseArea
- predef LoadTownMap_Nest ; display pokemon areas
- ld b, 0
- jr .exitSideMenu
-
-.chosePrint
- ld a, [hTilesetType]
- push af
- xor a
- ld [hTilesetType], a
- ld a, [wd11e]
- ld [wcf91], a
- callab PrintPokedexEntry
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- call ClearScreen
- pop af
- ld [hTilesetType], a
- ld b, $3
- jr .exitSideMenu
-
-; handles the list of pokemon on the left of the pokedex screen
-; sets carry flag if player presses A, unsets carry flag if player presses B
-HandlePokedexListMenu:
- call Pokedex_DrawInterface
-.loop
- call Pokedex_PlacePokemonList
- call GBPalNormal
- call HandleMenuInput
- bit BIT_B_BUTTON, a ; was the B button pressed?
- jp nz, .buttonBPressed
- bit BIT_A_BUTTON, a ; was the A button pressed?
- jp nz, .buttonAPressed
-.checkIfUpPressed
- bit BIT_D_UP, a ; was Up pressed?
- jr z, .checkIfDownPressed
-.upPressed ; scroll up one row
- ld a, [wListScrollOffset]
- and a
- jp z, .loop
- dec a
- ld [wListScrollOffset], a
- jp .loop
-
-.checkIfDownPressed
- bit BIT_D_DOWN, a ; was Down pressed?
- jr z, .checkIfRightPressed
-.downPressed ; scroll down one row
- ld a, [wDexMaxSeenMon]
- cp a, 7
- jp c, .loop ; can't if the list is shorter than 7
- sub a, 7
- ld b, a
- ld a, [wListScrollOffset]
- cp b
- jp z, .loop
- inc a
- ld [wListScrollOffset], a
- jp .loop
-
-.checkIfRightPressed
- bit BIT_D_RIGHT, a ; was Right pressed?
- jr z, .checkIfLeftPressed
-.rightPressed ; scroll down 7 rows
- ld a, [wDexMaxSeenMon]
- cp a, 7
- jp c, .loop ; can't if the list is shorter than 7
- sub a, 6
- ld b, a
- ld a, [wListScrollOffset]
- add a, 7
- ld [wListScrollOffset], a
- cp b
- jp c, .loop
- dec b
- ld a, b
- ld [wListScrollOffset], a
- jp .loop
-
-.checkIfLeftPressed ; scroll up 7 rows
- bit BIT_D_LEFT, a ; was Left pressed?
- jr z, .buttonAPressed
-.leftPressed
- ld a, [wListScrollOffset]
- sub a, 7
- ld [wListScrollOffset], a
- jp nc, .loop
- xor a
- ld [wListScrollOffset], a
- jp .loop
-
-.buttonAPressed
- scf
- ret
-
-.buttonBPressed
- and a
- ret
-
-Pokedex_DrawInterface:
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
-; draw the horizontal line separating the seen and owned amounts from the menu
- coord hl, 15, 6
- ld a, "─"
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ld [hli], a
- coord hl, 14, 0
- ld [hl], $71 ; vertical line tile
- coord hl, 14, 1
- call DrawPokedexVerticalLine
- coord hl, 14, 9
- call DrawPokedexVerticalLine
- ld hl, wPokedexSeen
- ld b, wPokedexSeenEnd - wPokedexSeen
- call CountSetBits
- ld de, wNumSetBits
- coord hl, 16, 2
- lb bc, 1, 3
- call PrintNumber ; print number of seen pokemon
- ld hl, wPokedexOwned
- ld b, wPokedexOwnedEnd - wPokedexOwned
- call CountSetBits
- ld de, wNumSetBits
- coord hl, 16, 5
- lb bc, 1, 3
- call PrintNumber ; print number of owned pokemon
- coord hl, 16, 1
- ld de, PokedexSeenText
- call PlaceString
- coord hl, 16, 4
- ld de, PokedexOwnText
- call PlaceString
- coord hl, 1, 1
- ld de, PokedexContentsText
- call PlaceString
- coord hl, 16, 8
- ld de, PokedexMenuItemsText
- call PlaceString
-; find the highest pokedex number among the pokemon the player has seen
- ld hl, wPokedexSeenEnd - 1
- ld b, (wPokedexSeenEnd - wPokedexSeen) * 8 + 1
-.maxSeenPokemonLoop
- ld a, [hld]
- ld c, 8
-.maxSeenPokemonInnerLoop
- dec b
- sla a
- jr c, .storeMaxSeenPokemon
- dec c
- jr nz, .maxSeenPokemonInnerLoop
- jr .maxSeenPokemonLoop
-
-.storeMaxSeenPokemon
- ld a, b
- ld [wDexMaxSeenMon], a
- ret
-
-DrawPokedexVerticalLine:
- ld c, 9 ; height of line
- ld de, SCREEN_WIDTH ; width of screen
- ld a, $71 ; vertical line tile
-.loop
- ld [hl], a
- add hl, de
- xor a, 1 ; toggle between vertical line tile and box tile
- dec c
- jr nz, .loop
- ret
-
-PokedexSeenText:
- db "SEEN@"
-
-PokedexOwnText:
- db "OWN@"
-
-PokedexContentsText:
- db "CONTENTS@"
-
-PokedexMenuItemsText:
- db "DATA"
- next "CRY"
- next "AREA"
- next "PRNT"
- next "QUIT@"
-
-Pokedex_PlacePokemonList:
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- coord hl, 4, 2
- lb bc, 14, 10
- call ClearScreenArea
- coord hl, 1, 3
- ld a, [wListScrollOffset]
- ld [wd11e], a
- ld d, 7
- ld a, [wDexMaxSeenMon]
- cp 7
- jr nc, .printPokemonLoop
- ld d, a
- dec a
- ld [wMaxMenuItem], a
-; loop to print pokemon pokedex numbers and names
-; if the player has owned the pokemon, it puts a pokeball beside the name
-.printPokemonLoop
- ld a, [wd11e]
- inc a
- ld [wd11e], a
- push af
- push de
- push hl
- ld de, -SCREEN_WIDTH
- add hl, de
- ld de, wd11e
- lb bc, LEADING_ZEROES | 1, 3
- call PrintNumber ; print the pokedex number
- ld de, SCREEN_WIDTH
- add hl, de
- dec hl
- push hl
- ld hl, wPokedexOwned
- call IsPokemonBitSet
- pop hl
- ld a, " "
- jr z, .writeTile
- ld a, $72 ; pokeball tile
-.writeTile
- ld [hl], a ; put a pokeball next to pokemon that the player has owned
- push hl
- ld hl, wPokedexSeen
- call IsPokemonBitSet
- jr nz, .getPokemonName ; if the player has seen the pokemon
- ld de, .dashedLine ; print a dashed line in place of the name if the player hasn't seen the pokemon
- jr .skipGettingName
-.dashedLine ; for unseen pokemon in the list
- db "----------@"
-.getPokemonName
- call PokedexToIndex
- call GetMonName
-.skipGettingName
- pop hl
- inc hl
- call PlaceString
- pop hl
- ld bc, 2 * SCREEN_WIDTH
- add hl, bc
- pop de
- pop af
- ld [wd11e], a
- dec d
- jr nz, .printPokemonLoop
- ld a, 01
- ld [H_AUTOBGTRANSFERENABLED], a
- call Delay3
- ret
-
-; tests if a pokemon's bit is set in the seen or owned pokemon bit fields
-; INPUT:
-; [wd11e] = pokedex number
-; hl = address of bit field
-IsPokemonBitSet:
- ld a, [wd11e]
- dec a
- ld c, a
- ld b, FLAG_TEST
- predef FlagActionPredef
- ld a, c
- and a
- ret
-
-; function to display pokedex data from outside the pokedex
-ShowPokedexData:
- call GBPalWhiteOutWithDelay3
- call ClearScreen
- call UpdateSprites
- callab LoadPokedexTilePatterns ; load pokedex tiles
-
-; function to display pokedex data from inside the pokedex
-ShowPokedexDataInternal:
- ld hl, wd72c
- set 1, [hl]
- ld a, $33 ; 3/7 volume
- ld [rNR50], a
- ld a, [hTilesetType]
- push af
- xor a
- ld [hTilesetType], a
- call GBPalWhiteOut ; zero all palettes
- ld a, [wd11e] ; pokemon ID
- ld [wcf91], a
- push af
- ld b, SET_PAL_POKEDEX
- call RunPaletteCommand
- pop af
- ld [wd11e], a
- call DrawDexEntryOnScreen
- call c, Pokedex_PrintFlavorTextAtRow11
-.waitForButtonPress
- call JoypadLowSensitivity
- ld a, [hJoy5]
- and a, A_BUTTON | B_BUTTON
- jr z, .waitForButtonPress
- pop af
- ld [hTilesetType], a
- call GBPalWhiteOut
- call ClearScreen
- call RunDefaultPaletteCommand
- call LoadTextBoxTilePatterns
- call GBPalNormal
- ld hl, wd72c
- res 1, [hl]
- ld a, $77 ; max volume
- ld [rNR50], a
- ret
-
-HeightWeightText:
- db "HT ?", $60, "??", $61
- next "WT ???lb@"
-
-; XXX does anything point to this?
-PokeText:
- db "#@"
-
-; horizontal line that divides the pokedex text description from the rest of the data
-PokedexDataDividerLine:
- db $68, $69, $6B, $69, $6B
- db $69, $6B, $69, $6B, $6B
- db $6B, $6B, $69, $6B, $69
- db $6B, $69, $6B, $69, $6A
- db "@"
-
-DrawDexEntryOnScreen:
- call ClearScreen
-
- coord hl, 0, 0
- ld de, 1
- lb bc, $64, SCREEN_WIDTH
- call DrawTileLine ; draw top border
-
- coord hl, 0, 17
- ld b, $6f
- call DrawTileLine ; draw bottom border
-
- coord hl, 0, 1
- ld de, 20
- lb bc, $66, $10
- call DrawTileLine ; draw left border
-
- coord hl, 19, 1
- ld b, $67
- call DrawTileLine ; draw right border
-
- ld a, $63 ; upper left corner tile
- Coorda 0, 0
- ld a, $65 ; upper right corner tile
- Coorda 19, 0
- ld a, $6c ; lower left corner tile
- Coorda 0, 17
- ld a, $6e ; lower right corner tile
- Coorda 19, 17
-
- coord hl, 0, 9
- ld de, PokedexDataDividerLine
- call PlaceString ; draw horizontal divider line
-
- coord hl, 9, 6
- ld de, HeightWeightText
- call PlaceString
-
- call GetMonName
- coord hl, 9, 2
- call PlaceString
-
- ld hl, PokedexEntryPointers
- ld a, [wd11e]
- dec a
- ld e, a
- ld d, 0
- add hl, de
- add hl, de
- ld a, [hli]
- ld e, a
- ld d, [hl] ; de = address of pokedex entry
-
- coord hl, 9, 4
- call PlaceString ; print species name
-
- ld h, b
- ld l, c
- push de
- ld a, [wd11e]
- push af
- call IndexToPokedex
-
- coord hl, 2, 8
- ld a, "№"
- ld [hli], a
- ld a, "⠄"
- ld [hli], a
- ld de, wd11e
- lb bc, LEADING_ZEROES | 1, 3
- call PrintNumber ; print pokedex number
-
- ld hl, wPokedexOwned
- call IsPokemonBitSet
- pop af
- ld [wd11e], a
- ld a, [wcf91]
- ld [wd0b5], a
- pop de
-
- push af
- push bc
- push de
- push hl
-
- call Delay3
- call GBPalNormal
- call GetMonHeader ; load pokemon picture location
- coord hl, 1, 1
- call LoadFlippedFrontSpriteByMonIndex ; draw pokemon picture
- ld a, [wcf91]
- call PlayCry ; play pokemon cry
-
- pop hl
- pop de
- pop bc
- pop af
-
- ld a, c
- and a
- ret z ; if the pokemon has not been owned, don't print the height, weight, or description
-
- inc de ; de = address of feet (height)
- ld a, [de] ; reads feet, but a is overwritten without being used
- coord hl, 12, 6
- lb bc, 1, 2
- call PrintNumber ; print feet (height)
- ld a, $60 ; feet symbol tile (one tick)
- ld [hl], a
- inc de
- inc de ; de = address of inches (height)
- coord hl, 15, 6
- lb bc, LEADING_ZEROES | 1, 2
- call PrintNumber ; print inches (height)
- ld a, $61 ; inches symbol tile (two ticks)
- ld [hl], a
-; now print the weight (note that weight is stored in tenths of pounds internally)
- inc de
- inc de
- inc de ; de = address of upper byte of weight
- push de
-; put weight in big-endian order at hDexWeight
- ld hl, hDexWeight
- ld a, [hl] ; save existing value of [hDexWeight]
- push af
- ld a, [de] ; a = upper byte of weight
- ld [hli], a ; store upper byte of weight in [hDexWeight]
- ld a, [hl] ; save existing value of [hDexWeight + 1]
- push af
- dec de
- ld a, [de] ; a = lower byte of weight
- ld [hl], a ; store lower byte of weight in [hDexWeight + 1]
- ld de, hDexWeight
- coord hl, 11, 8
- lb bc, 2, 5 ; 2 bytes, 5 digits
- call PrintNumber ; print weight
- coord hl, 14, 8
- ld a, [hDexWeight + 1]
- sub 10
- ld a, [hDexWeight]
- sbc 0
- jr nc, .next
- ld [hl], "0" ; if the weight is less than 10, put a 0 before the decimal point
-.next
- inc hl
- ld a, [hli]
- ld [hld], a ; make space for the decimal point by moving the last digit forward one tile
- ld [hl], "⠄" ; decimal point tile
- pop af
- ld [hDexWeight + 1], a ; restore original value of [hDexWeight + 1]
- pop af
- ld [hDexWeight], a ; restore original value of [hDexWeight]
- pop hl
- inc hl ; hl = address of pokedex description text
- scf
- ret
-
-Pokedex_PrintFlavorTextAtRow11:
- coord bc, 1, 11
-Pokedex_PrintFlavorTextAtBC:
- ld a, 2
- ld [$fff9], a
- call TextCommandProcessor ; print pokedex description text
- xor a
- ld [$fff9], a
- ret
-
-Pokedex_PrepareDexEntryForPrinting:
- coord hl, 0, 0
- ld de, SCREEN_WIDTH
- lb bc, $66, $d
- call DrawTileLine
- coord hl, 19, 0
- ld b, $67
- call DrawTileLine
- coord hl, 0, 13
- ld de, $1
- lb bc, $6f, SCREEN_WIDTH
- call DrawTileLine
- ld a, $6c
- Coorda 0, 13
- ld a, $6e
- Coorda 19, 13
- ld a, [wPrinterPokedexEntryTextPointer]
- ld l, a
- ld a, [wPrinterPokedexEntryTextPointer + 1]
- ld h, a
- coord bc, 1, 1
- ld a, [hFlags_0xFFFA]
- set 3, a
- ld [hFlags_0xFFFA], a
- call Pokedex_PrintFlavorTextAtBC
- ld a, [hFlags_0xFFFA]
- res 3, a
- ld [hFlags_0xFFFA], a
- ret
-
-; draws a line of tiles
-; INPUT:
-; b = tile ID
-; c = number of tile ID's to write
-; de = amount to destination address after each tile (1 for horizontal, 20 for vertical)
-; hl = destination address
-DrawTileLine:
- push bc
- push de
-.loop
- ld [hl], b
- add hl, de
- dec c
- jr nz, .loop
- pop de
- pop bc
- ret
-
-INCLUDE "data/pokedex_entries.asm"
-
-PokedexToIndex:
- ; converts the Pokédex number at wd11e to an index
- push bc
- push hl
- ld a, [wd11e]
- ld b, a
- ld c, 0
- ld hl, PokedexOrder
-
-.loop ; go through the list until we find an entry with a matching dex number
- inc c
- ld a, [hli]
- cp b
- jr nz, .loop
-
- ld a, c
- ld [wd11e], a
- pop hl
- pop bc
- ret
-
-IndexToPokedex:
- ; converts the index number at wd11e to a Pokédex number
- push bc
- push hl
- ld a, [wd11e]
- dec a
- ld hl, PokedexOrder
- ld b, 0
- ld c, a
- add hl, bc
- ld a, [hl]
- ld [wd11e], a
- pop hl
- pop bc
- ret
-
-INCLUDE "data/pokedex_order.asm"
diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm
deleted file mode 100755
index 405441c8..00000000
--- a/engine/menu/prize_menu.asm
+++ /dev/null
@@ -1,307 +0,0 @@
-CeladonPrizeMenu:
- ld b, COIN_CASE
- call IsItemInBag
- jr nz, .havingCoinCase
- ld hl, RequireCoinCaseTextPtr
- jp PrintText
-.havingCoinCase
- ld hl, wd730
- set 6, [hl] ; disable letter-printing delay
- ld hl, ExchangeCoinsForPrizesTextPtr
- call PrintText
-; the following are the menu settings
- xor a
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld a, A_BUTTON | B_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, $03
- ld [wMaxMenuItem], a
- ld a, $04
- ld [wTopMenuItemY], a
- ld a, $01
- ld [wTopMenuItemX], a
- call PrintPrizePrice
- coord hl, 0, 2
- lb bc, 8, 16
- call TextBoxBorder
- call GetPrizeMenuId
- call UpdateSprites
- ld hl, WhichPrizeTextPtr
- call PrintText
- call HandleMenuInput ; menu choice handler
- bit 1, a ; keypress = B (Cancel)
- jr nz, .noChoice
- ld a, [wCurrentMenuItem]
- cp 3 ; "NO,THANKS" choice
- jr z, .noChoice
- call HandlePrizeChoice
-.noChoice
- ld hl, wd730
- res 6, [hl]
- ret
-
-RequireCoinCaseTextPtr:
- TX_FAR _RequireCoinCaseText
- TX_WAIT
- db "@"
-
-ExchangeCoinsForPrizesTextPtr:
- TX_FAR _ExchangeCoinsForPrizesText
- db "@"
-
-WhichPrizeTextPtr:
- TX_FAR _WhichPrizeText
- db "@"
-
-GetPrizeMenuId:
-; determine which one among the three
-; prize-texts has been selected
-; using the text ID (stored in [hSpriteIndexOrTextID])
-; load the three prizes at wd13d-wd13f
-; load the three prices at wd141-wd146
-; display the three prizes' names
-; (distinguishing between Pokemon names
-; and Items (specifically TMs) names)
- ld a, [hSpriteIndexOrTextID]
- sub 3 ; prize-texts' id are 3, 4 and 5
- ld [wWhichPrizeWindow], a ; prize-texts' id (relative, i.e. 0, 1 or 2)
- add a
- add a
- ld d, 0
- ld e, a
- ld hl, PrizeDifferentMenuPtrs
- add hl, de
- ld a, [hli]
- ld d, [hl]
- ld e, a
- inc hl
- push hl
- ld hl, wPrize1
- call CopyString
- pop hl
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, wPrize1Price
- ld bc, 6
- call CopyData
- ld a, [wWhichPrizeWindow]
- cp 2 ;is TM_menu?
- jr nz, .putMonName
- ld a, [wPrize1]
- ld [wd11e], a
- call GetItemName
- coord hl, 2, 4
- call PlaceString
- ld a, [wPrize2]
- ld [wd11e], a
- call GetItemName
- coord hl, 2, 6
- call PlaceString
- ld a, [wPrize3]
- ld [wd11e], a
- call GetItemName
- coord hl, 2, 8
- call PlaceString
- jr .putNoThanksText
-.putMonName
- ld a, [wPrize1]
- ld [wd11e], a
- call GetMonName
- coord hl, 2, 4
- call PlaceString
- ld a, [wPrize2]
- ld [wd11e], a
- call GetMonName
- coord hl, 2, 6
- call PlaceString
- ld a, [wPrize3]
- ld [wd11e], a
- call GetMonName
- coord hl, 2, 8
- call PlaceString
-.putNoThanksText
- coord hl, 2, 10
- ld de, NoThanksText
- call PlaceString
-; put prices on the right side of the textbox
- ld de, wPrize1Price
- coord hl, 13, 5
-; reg. c:
-; [low nybble] number of bytes
-; [bit 765 = %100] space-padding (not zero-padding)
- ld c, (1 << 7 | 2)
-; Function $15CD displays BCD value (same routine
-; used by text-command $02)
- call PrintBCDNumber
- ld de, wPrize2Price
- coord hl, 13, 7
- ld c, (1 << 7 | 2)
- call PrintBCDNumber
- ld de, wPrize3Price
- coord hl, 13, 9
- ld c, (1 << 7 | 2)
- jp PrintBCDNumber
-
-NoThanksText:
- db "NO THANKS@"
-
-INCLUDE "data/prizes.asm"
-
-PrintPrizePrice:
- coord hl, 11, 0
- lb bc, 1, 7
- call TextBoxBorder
- call UpdateSprites
- coord hl, 12, 0
- ld de, .CoinString
- call PlaceString
- coord hl, 13, 1
- ld de, .SixSpacesString
- call PlaceString
- coord hl, 13, 1
- ld de, wPlayerCoins
- ld c, %10000010
- call PrintBCDNumber
- ret
-
-.CoinString:
- db "COIN@"
-
-.SixSpacesString:
- db " @"
-
-LoadCoinsToSubtract:
- ld a, [wWhichPrize]
- add a
- ld d, 0
- ld e, a
- ld hl, wPrize1Price
- add hl, de ; get selected prize's price
- xor a
- ld [hUnusedCoinsByte], a
- ld a, [hli]
- ld [hCoins], a
- ld a, [hl]
- ld [hCoins + 1], a
- ret
-
-HandlePrizeChoice:
- ld a, [wCurrentMenuItem]
- ld [wWhichPrize], a
- ld d, 0
- ld e, a
- ld hl, wPrize1
- add hl, de
- ld a, [hl]
- ld [wd11e], a
- ld a, [wWhichPrizeWindow]
- cp 2 ; is prize a TM?
- jr nz, .getMonName
- call GetItemName
- jr .givePrize
-.getMonName
- call GetMonName
-.givePrize
- ld hl, SoYouWantPrizeTextPtr
- call PrintText
- call YesNoChoice
- ld a, [wCurrentMenuItem] ; yes/no answer (Y=0, N=1)
- and a
- jr nz, .printOhFineThen
- call LoadCoinsToSubtract
- call HasEnoughCoins
- jr c, .notEnoughCoins
- ld a, [wWhichPrizeWindow]
- cp $02
- jr nz, .giveMon
- ld a, [wd11e]
- ld b, a
- ld a, 1
- ld c, a
- call GiveItem
- jr nc, .bagFull
- jr .subtractCoins
-.giveMon
- ld a, [wd11e]
- ld [wcf91], a
- push af
- call GetPrizeMonLevel
- ld c, a
- pop af
- ld b, a
- call GivePokemon
-
-; If either the party or box was full, wait after displaying message.
- push af
- ld a, [wAddedToParty]
- and a
- call z, WaitForTextScrollButtonPress
- pop af
-
-; If the mon couldn't be given to the player (because both the party and box
-; were full), return without subtracting coins.
- ret nc
-
-.subtractCoins
- call LoadCoinsToSubtract
- ld hl, hCoins + 1
- ld de, wPlayerCoins + 1
- ld c, $02 ; how many bytes
- predef SubBCDPredef
- jp PrintPrizePrice
-.bagFull
- ld hl, PrizeRoomBagIsFullTextPtr
- jp PrintText
-.notEnoughCoins
- ld hl, SorryNeedMoreCoinsText
- jp PrintText
-.printOhFineThen
- ld hl, OhFineThenTextPtr
- jp PrintText
-
-UnknownPrizeData:
-; XXX what's this?
- db $00,$01,$00,$01,$00,$01,$00,$00,$01
-
-HereYouGoTextPtr:
- TX_FAR _HereYouGoText
- TX_WAIT
- db "@"
-
-SoYouWantPrizeTextPtr:
- TX_FAR _SoYouWantPrizeText
- db "@"
-
-SorryNeedMoreCoinsText:
- TX_FAR _SorryNeedMoreCoinsText
- TX_WAIT
- db "@"
-
-PrizeRoomBagIsFullTextPtr:
- TX_FAR _OopsYouDontHaveEnoughRoomText
- TX_WAIT
- db "@"
-
-OhFineThenTextPtr:
- TX_FAR _OhFineThenText
- TX_WAIT
- db "@"
-
-GetPrizeMonLevel:
- ld a, [wcf91]
- ld b, a
- ld hl, PrizeMonLevelDictionary
-.loop
- ld a, [hli]
- cp b
- jr z, .matchFound
- inc hl
- jr .loop
-.matchFound
- ld a, [hl]
- ld [wCurEnemyLVL], a
- ret
-
-INCLUDE "data/prize_mon_levels.asm"
diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm
deleted file mode 100755
index 498d1467..00000000
--- a/engine/menu/start_menu.asm
+++ /dev/null
@@ -1,84 +0,0 @@
-DisplayStartMenu::
- switchbank StartMenu_Pokedex ; also bank for other functions
- ld a, [wWalkBikeSurfState] ; walking/biking/surfing
- ld [wWalkBikeSurfStateCopy], a
- ld a, SFX_START_MENU
- call PlaySound
-
-RedisplayStartMenu::
- callba DrawStartMenu
-RedisplayStartMenu_DoNotDrawStartMenu:
- callba PrintSafariZoneSteps ; print Safari Zone info, if in Safari Zone
- call UpdateSprites
-.loop
- call HandleMenuInput
- ld b, a
-.checkIfUpPressed
- bit 6, a ; was Up pressed?
- jr z, .checkIfDownPressed
- ld a, [wCurrentMenuItem] ; menu selection
- and a
- jr nz, .loop
- ld a, [wLastMenuItem]
- and a
- jr nz, .loop
-; if the player pressed tried to go past the top item, wrap around to the bottom
- CheckEvent EVENT_GOT_POKEDEX
- ld a, 6 ; there are 7 menu items with the pokedex, so the max index is 6
- jr nz, .wrapMenuItemId
- dec a ; there are only 6 menu items without the pokedex
-.wrapMenuItemId
- ld [wCurrentMenuItem], a
- call EraseMenuCursor
- jr .loop
-.checkIfDownPressed
- bit 7, a
- jr z, .buttonPressed
-; if the player pressed tried to go past the bottom item, wrap around to the top
- CheckEvent EVENT_GOT_POKEDEX
- ld a, [wCurrentMenuItem]
- ld c, 7 ; there are 7 menu items with the pokedex
- jr nz, .checkIfPastBottom
- dec c ; there are only 6 menu items without the pokedex
-.checkIfPastBottom
- cp c
- jr nz, .loop
-; the player went past the bottom, so wrap to the top
- xor a
- ld [wCurrentMenuItem], a
- call EraseMenuCursor
- jr .loop
-.buttonPressed ; A, B, or Start button pressed
- call PlaceUnfilledArrowMenuCursor
- ld a, [wCurrentMenuItem]
- ld [wBattleAndStartSavedMenuItem], a ; save current menu selection
- ld a, b
- and %00001010 ; was the Start button or B button pressed?
- jp nz, CloseStartMenu
- call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2
- CheckEvent EVENT_GOT_POKEDEX
- ld a, [wCurrentMenuItem]
- jr nz, .displayMenuItem
- inc a ; adjust position to account for missing pokedex menu item
-.displayMenuItem
- cp 0
- jp z, StartMenu_Pokedex
- cp 1
- jp z, StartMenu_Pokemon
- cp 2
- jp z, StartMenu_Item
- cp 3
- jp z, StartMenu_TrainerInfo
- cp 4
- jp z, StartMenu_SaveReset
- cp 5
- jp z, StartMenu_Option
-
-; EXIT falls through to here
-CloseStartMenu::
- call Joypad
- ld a, [hJoyPressed]
- bit 0, a ; was A button newly pressed?
- jr nz, CloseStartMenu
- call LoadTextBoxTilePatterns
- jp CloseTextDisplay
diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm
deleted file mode 100755
index abc8f000..00000000
--- a/engine/menu/start_sub_menus.asm
+++ /dev/null
@@ -1,871 +0,0 @@
-StartMenu_Pokedex:
- predef ShowPokedexMenu
- call LoadScreenTilesFromBuffer2 ; restore saved screen
- call Delay3
- call LoadGBPal
- call UpdateSprites
- jp RedisplayStartMenu
-
-StartMenu_Pokemon:
- ld a, [wPartyCount]
- and a
- jp z, RedisplayStartMenu
- xor a
- ld [wMenuItemToSwap], a
- ld [wPartyMenuTypeOrMessageID], a
- ld [wUpdateSpritesEnabled], a
- call DisplayPartyMenu
- jr .checkIfPokemonChosen
-.loop
- xor a
- ld [wMenuItemToSwap], a
- ld [wPartyMenuTypeOrMessageID], a
- call GoBackToPartyMenu
-.checkIfPokemonChosen
- jr nc, .chosePokemon
-.exitMenu
- call GBPalWhiteOutWithDelay3
- call RestoreScreenTilesAndReloadTilePatterns
- call LoadGBPal
- jp RedisplayStartMenu
-.chosePokemon
- call SaveScreenTilesToBuffer1
- ld a, FIELD_MOVE_MON_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID ; display pokemon menu options
- ld hl, wFieldMoves
- lb bc, 2, 12 ; max menu item ID, top menu item Y
- ld e, 5
-.adjustMenuVariablesLoop
- dec e
- jr z, .storeMenuVariables
- ld a, [hli]
- and a ; end of field moves?
- jr z, .storeMenuVariables
- inc b
- dec c
- dec c
- jr .adjustMenuVariablesLoop
-.storeMenuVariables
- ld hl, wTopMenuItemY
- ld a, c
- ld [hli], a ; top menu item Y
- ld a, [hFieldMoveMonMenuTopMenuItemX]
- ld [hli], a ; top menu item X
- xor a
- ld [hli], a ; current menu item ID
- inc hl
- ld a, b
- ld [hli], a ; max menu item ID
- ld a, A_BUTTON | B_BUTTON
- ld [hli], a ; menu watched keys
- xor a
- ld [hl], a
- call HandleMenuInput
- push af
- call LoadScreenTilesFromBuffer1 ; restore saved screen
- pop af
- bit 1, a ; was the B button pressed?
- jp nz, .loop
-; if the B button wasn't pressed
- ld a, [wMaxMenuItem]
- ld b, a
- ld a, [wCurrentMenuItem] ; menu selection
- cp b
- jp z, .exitMenu ; if the player chose Cancel
- dec b
- cp b
- jr z, .choseSwitch
- dec b
- cp b
- jp z, .choseStats
- ld c, a
- ld b, 0
- ld hl, wFieldMoves
- add hl, bc
- jp .choseOutOfBattleMove
-.choseSwitch
- ld a, [wPartyCount]
- cp 2 ; is there more than one pokemon in the party?
- jp c, StartMenu_Pokemon ; if not, no switching
- call SwitchPartyMon_InitVarOrSwapData ; init [wMenuItemToSwap]
- ld a, SWAP_MONS_PARTY_MENU
- ld [wPartyMenuTypeOrMessageID], a
- call GoBackToPartyMenu
- jp .checkIfPokemonChosen
-.choseStats
- call ClearSprites
- xor a ; PLAYER_PARTY_DATA
- ld [wMonDataLocation], a
- predef StatusScreen
- predef StatusScreen2
- call ReloadMapData
- jp StartMenu_Pokemon
-.choseOutOfBattleMove
- push hl
- ld a, [wWhichPokemon]
- ld hl, wPartyMonNicks
- call GetPartyMonName
- pop hl
- ld a, [hl]
- dec a
- add a
- ld b, 0
- ld c, a
- ld hl, .outOfBattleMovePointers
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [wObtainedBadges] ; badges obtained
- jp hl
-.outOfBattleMovePointers
- dw .cut
- dw .fly
- dw .surf
- dw .surf
- dw .strength
- dw .flash
- dw .dig
- dw .teleport
- dw .softboiled
-.fly
- bit 2, a ; does the player have the Thunder Badge?
- jp z, .newBadgeRequired
- call CheckIfInOutsideMap
- jr z, .canFly
- ld a, [wWhichPokemon]
- ld hl, wPartyMonNicks
- call GetPartyMonName
- ld hl, .cannotFlyHereText
- call PrintText
- jp .loop
-.canFly
- call ChooseFlyDestination
- ld a, [wd732]
- bit 3, a ; did the player decide to fly?
- jr nz, .asm_5d4c
- call LoadFontTilePatterns
- ld hl, wd72e
- set 1, [hl]
- jp StartMenu_Pokemon
-.asm_5d4c
- call Func_1510
- jp .goBackToMap
-.cut
- bit 1, a ; does the player have the Cascade Badge?
- jp z, .newBadgeRequired
- predef UsedCut
- ld a, [wActionResultOrTookBattleTurn]
- and a
- jp z, .loop
- jp CloseTextDisplay
-.surf
- bit 4, a ; does the player have the Soul Badge?
- jp z, .newBadgeRequired
- callba IsSurfingAllowed
- ld hl, wd728
- bit 1, [hl]
- res 1, [hl]
- jp z, .loop
- ld a, [wcf91]
- cp PIKACHU ; is this surfing pikachu?
- jr z, .surfingPikachu
- ld a, $1
- jr .continue
-.surfingPikachu
- ld a, $2
-.continue
- ld [wd473], a
- ld a,SURFBOARD
- ld [wcf91], a
- ld [wPseudoItemID], a
- call UseItem
- ld a, [wActionResultOrTookBattleTurn]
- and a
- jr z, .reloadNormalSprite
- call GBPalWhiteOutWithDelay3
- jp .goBackToMap
-.reloadNormalSprite
- xor a
- ld [wd473], a
- jp .loop
-.strength
- bit 3, a ; does the player have the Rainbow Badge?
- jp z, .newBadgeRequired
- predef PrintStrengthTxt
- call GBPalWhiteOutWithDelay3
- jp .goBackToMap
-.flash
- bit 0, a ; does the player have the Boulder Badge?
- jp z, .newBadgeRequired
- xor a
- ld [wMapPalOffset], a
- ld hl, .flashLightsAreaText
- call PrintText
- call GBPalWhiteOutWithDelay3
- jp .goBackToMap
-.flashLightsAreaText
- TX_FAR _FlashLightsAreaText
- db "@"
-.dig
- ld a, ESCAPE_ROPE
- ld [wcf91], a
- ld [wPseudoItemID], a
- call UseItem
- ld a, [wActionResultOrTookBattleTurn]
- and a
- jp z, .loop
- call GBPalWhiteOutWithDelay3
- jp .goBackToMap
-.teleport
- call CheckIfInOutsideMap
- jr z, .canTeleport
- ld a, [wWhichPokemon]
- ld hl, wPartyMonNicks
- call GetPartyMonName
- ld hl, .cannotUseTeleportNowText
- call PrintText
- jp .loop
-.canTeleport
- ld hl, .warpToLastPokemonCenterText
- call PrintText
- ld hl, wd732
- set 3, [hl]
- set 6, [hl]
- call Func_1510
- ld hl, wd72e
- set 1, [hl]
- res 4, [hl]
- ld c, 60
- call DelayFrames
- call GBPalWhiteOutWithDelay3
- jp .goBackToMap
-.warpToLastPokemonCenterText
- TX_FAR _WarpToLastPokemonCenterText
- db "@"
-.cannotUseTeleportNowText
- TX_FAR _CannotUseTeleportNowText
- db "@"
-.cannotFlyHereText
- TX_FAR _CannotFlyHereText
- db "@"
-.softboiled
- ld hl, wPartyMon1MaxHP
- ld a, [wWhichPokemon]
- ld bc, wPartyMon2 - wPartyMon1
- call AddNTimes
- ld a, [hli]
- ld [H_DIVIDEND], a
- ld a, [hl]
- ld [H_DIVIDEND + 1], a
- ld a, 5
- ld [H_DIVISOR], a
- ld b, 2 ; number of bytes
- call Divide
- ld bc, wPartyMon1HP - wPartyMon1MaxHP
- add hl, bc
- ld a, [hld]
- ld b, a
- ld a, [H_QUOTIENT + 3]
- sub b
- ld b, [hl]
- ld a, [H_QUOTIENT + 2]
- sbc b
- jp nc, .notHealthyEnough
- ld a, [wPartyAndBillsPCSavedMenuItem]
- push af
- ld a, POTION
- ld [wcf91], a
- ld [wPseudoItemID], a
- call UseItem
- pop af
- ld [wPartyAndBillsPCSavedMenuItem], a
- jp .loop
-.notHealthyEnough ; if current HP is less than 1/5 of max HP
- ld hl, .notHealthyEnoughText
- call PrintText
- jp .loop
-.notHealthyEnoughText
- TX_FAR _NotHealthyEnoughText
- db "@"
-.goBackToMap
- call RestoreScreenTilesAndReloadTilePatterns
- jp CloseTextDisplay
-.newBadgeRequired
- ld hl, .newBadgeRequiredText
- call PrintText
- jp .loop
-.newBadgeRequiredText
- TX_FAR _NewBadgeRequiredText
- db "@"
-
-; writes a blank tile to all possible menu cursor positions on the party menu
-ErasePartyMenuCursors:
- coord hl, 0, 1
- ld bc, 2 * 20 ; menu cursor positions are 2 rows apart
- ld a, 6 ; 6 menu cursor positions
-.loop
- ld [hl], " "
- add hl, bc
- dec a
- jr nz, .loop
- ret
-
-ItemMenuLoop:
- call LoadScreenTilesFromBuffer2DisableBGTransfer ; restore saved screen
- call RunDefaultPaletteCommand
-
-StartMenu_Item:
- ld a, [wLinkState]
- dec a ; is the player in the Colosseum or Trade Centre?
- jr nz, .notInCableClubRoom
- ld hl, CannotUseItemsHereText
- call PrintText
- jr .exitMenu
-.notInCableClubRoom
- ld hl, wListPointer
- ld [hl], wNumBagItems & $ff
- inc hl
- ld [hl], wNumBagItems / $100 ; store item bag pointer in wListPointer (for DisplayListMenuID)
- xor a
- ld [wPrintItemPrices], a
- ld a, ITEMLISTMENU
- ld [wListMenuID], a
- ld a, [wBagSavedMenuItem]
- ld [wCurrentMenuItem], a
- call DisplayListMenuID
- ld a, [wCurrentMenuItem]
- ld [wBagSavedMenuItem], a
- jr nc, .choseItem
-.exitMenu
- call LoadScreenTilesFromBuffer2 ; restore saved screen
- call LoadTextBoxTilePatterns
- call UpdateSprites
- jp RedisplayStartMenu
-.choseItem
-; erase menu cursor (blank each tile in front of an item name)
- ld a, " "
- Coorda 5, 4
- Coorda 5, 6
- Coorda 5, 8
- Coorda 5, 10
- call PlaceUnfilledArrowMenuCursor
- xor a
- ld [wMenuItemToSwap], a
- ld a, [wcf91]
- cp BICYCLE
- jp z, .useOrTossItem
-.notBicycle1
- ld a, USE_TOSS_MENU_TEMPLATE
- ld [wTextBoxID], a
- call DisplayTextBoxID
- ld hl, wTopMenuItemY
- ld a, 11
- ld [hli], a ; top menu item Y
- ld a, 14
- ld [hli], a ; top menu item X
- xor a
- ld [hli], a ; current menu item ID
- inc hl
- inc a ; a = 1
- ld [hli], a ; max menu item ID
- ld a, A_BUTTON | B_BUTTON
- ld [hli], a ; menu watched keys
- xor a
- ld [hl], a ; old menu item id
- call HandleMenuInput
- call PlaceUnfilledArrowMenuCursor
- bit 1, a ; was the B button pressed?
- jr z, .useOrTossItem
- jp ItemMenuLoop
-.useOrTossItem ; if the player made the choice to use or toss the item
- ld a, [wcf91]
- ld [wd11e], a
- call GetItemName
- call CopyStringToCF4B ; copy name to wcf4b
- ld a, [wcf91]
- cp BICYCLE
- jr nz, .notBicycle2
- ld a, [wd732]
- bit 5, a
- jr z, .useItem_closeMenu
- ld hl, CannotGetOffHereText
- call PrintText
- jp ItemMenuLoop
-.notBicycle2
- ld a, [wCurrentMenuItem]
- and a
- jr nz, .tossItem
-; use item
- ld [wPseudoItemID], a ; a must be 0 due to above conditional jump
- ld a, [wcf91]
- cp HM_01
- jr nc, .useItem_partyMenu
- ld hl, UsableItems_CloseMenu
- ld de, 1
- call IsInArray
- jr c, .useItem_closeMenu
- ld a, [wcf91]
- ld hl, UsableItems_PartyMenu
- ld de, 1
- call IsInArray
- jr c, .useItem_partyMenu
- call UseItem
- jp ItemMenuLoop
-.useItem_closeMenu
- xor a
- ld [wPseudoItemID], a
- call UseItem
- ld a, [wActionResultOrTookBattleTurn]
- and a
- jp z, ItemMenuLoop
- jp CloseStartMenu
-.useItem_partyMenu
- ld a, [wUpdateSpritesEnabled]
- push af
- call UseItem
- ld a, [wActionResultOrTookBattleTurn]
- cp $02
- jp z, .partyMenuNotDisplayed
- call GBPalWhiteOutWithDelay3
- call RestoreScreenTilesAndReloadTilePatterns
- pop af
- ld [wUpdateSpritesEnabled], a
- jp StartMenu_Item
-.partyMenuNotDisplayed
- pop af
- ld [wUpdateSpritesEnabled], a
- jp ItemMenuLoop
-.tossItem
- call IsKeyItem
- ld a, [wIsKeyItem]
- and a
- jr nz, .skipAskingQuantity
- ld a, [wcf91]
- call IsItemHM
- jr c, .skipAskingQuantity
- call DisplayChooseQuantityMenu
- inc a
- jr z, .tossZeroItems
-.skipAskingQuantity
- ld hl, wNumBagItems
- call TossItem
-.tossZeroItems
- jp ItemMenuLoop
-
-CannotUseItemsHereText:
- TX_FAR _CannotUseItemsHereText
- db "@"
-
-CannotGetOffHereText:
- TX_FAR _CannotGetOffHereText
- db "@"
-
-; items which bring up the party menu when used
-UsableItems_PartyMenu:
- db MOON_STONE
- db ANTIDOTE
- db BURN_HEAL
- db ICE_HEAL
- db AWAKENING
- db PARLYZ_HEAL
- db FULL_RESTORE
- db MAX_POTION
- db HYPER_POTION
- db SUPER_POTION
- db POTION
- db FIRE_STONE
- db THUNDER_STONE
- db WATER_STONE
- db HP_UP
- db PROTEIN
- db IRON
- db CARBOS
- db CALCIUM
- db RARE_CANDY
- db LEAF_STONE
- db FULL_HEAL
- db REVIVE
- db MAX_REVIVE
- db FRESH_WATER
- db SODA_POP
- db LEMONADE
- db X_ATTACK
- db X_DEFEND
- db X_SPEED
- db X_SPECIAL
- db PP_UP
- db ETHER
- db MAX_ETHER
- db ELIXER
- db MAX_ELIXER
- db $ff
-
-; items which close the item menu when used
-UsableItems_CloseMenu:
- db ESCAPE_ROPE
- db ITEMFINDER
- db POKE_FLUTE
- db OLD_ROD
- db GOOD_ROD
- db SUPER_ROD
- db $ff
-
-StartMenu_TrainerInfo:
- call GBPalWhiteOut
- call ClearScreen
- call UpdateSprites
- ld a, [hTilesetType]
- push af
- xor a
- ld [hTilesetType], a
- call DrawTrainerInfo
- predef DrawBadges ; draw badges
- 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 RunDefaultPaletteCommand
- call ReloadMapData
- callba DrawStartMenu ; XXX what difference does this make?
- call LoadGBPal
- pop af
- ld [hTilesetType], a
- jp RedisplayStartMenu_DoNotDrawStartMenu
-
-; loads tile patterns and draws everything except for gym leader faces / badges
-DrawTrainerInfo:
- ld de, RedPicFront
- lb bc, BANK(RedPicFront), $01
- predef DisplayPicCenteredOrUpperRight
- call DisableLCD
- coord hl, 0, 2
- ld a, " "
- call TrainerInfo_DrawVerticalLine
- coord hl, 1, 2
- call TrainerInfo_DrawVerticalLine
- ld hl, vChars2 + $70
- ld de, vChars2
- ld bc, $70 * 4
- call CopyData
- ld hl, TrainerInfoTextBoxTileGraphics ; trainer info text box tile patterns
- ld de, vChars2 + $770
- ld bc, $0080
- push bc
- call TrainerInfo_FarCopyData
- ld hl, BlankLeaderNames
- ld de, vChars2 + $600
- ld bc, $0170
- call TrainerInfo_FarCopyData
- pop bc
- ld hl, BadgeNumbersTileGraphics ; badge number tile patterns
- ld de, vChars1 + $580
- call TrainerInfo_FarCopyData
- ld hl, GymLeaderFaceAndBadgeTileGraphics ; gym leader face and badge tile patterns
- ld de, vChars2 + $200
- ld bc, $0400
- ld a, $03
- call FarCopyData
- ld hl, TextBoxGraphics
- ld de, $00d0
- add hl, de ; hl = colon tile pattern
- ld de, vChars1 + $560
- ld bc, $0010
- ld a, $04
- push bc
- call FarCopyData
- pop bc
- ld hl, TrainerInfoTextBoxTileGraphics + $80 ; background tile pattern
- ld de, vChars1 + $570
- call TrainerInfo_FarCopyData
- call EnableLCD
- ld hl, wTrainerInfoTextBoxWidthPlus1
- ld a, 18 + 1
- ld [hli], a
- dec a
- ld [hli], a
- ld [hl], 1
- coord hl, 0, 0
- call TrainerInfo_DrawTextBox
- ld hl, wTrainerInfoTextBoxWidthPlus1
- ld a, 16 + 1
- ld [hli], a
- dec a
- ld [hli], a
- ld [hl], 3
- coord hl, 1, 10
- call TrainerInfo_DrawTextBox
- coord hl, 0, 10
- ld a, $d7
- call TrainerInfo_DrawVerticalLine
- coord hl, 19, 10
- call TrainerInfo_DrawVerticalLine
- coord hl, 6, 9
- ld de, TrainerInfo_BadgesText
- call PlaceString
- coord hl, 2, 2
- ld de, TrainerInfo_NameMoneyTimeText
- call PlaceString
- coord hl, 7, 2
- ld de, wPlayerName
- call PlaceString
- coord hl, 8, 4
- ld de, wPlayerMoney
- ld c, $e3
- call PrintBCDNumber
- coord hl, 9, 6
- ld de, wPlayTimeHours ; hours
- lb bc, LEFT_ALIGN | 1, 3
- call PrintNumber
- ld [hl], $d6 ; colon tile ID
- inc hl
- ld de, wPlayTimeMinutes ; minutes
- lb bc, LEADING_ZEROES | 1, 2
- jp PrintNumber
-
-TrainerInfo_FarCopyData:
- ld a, BANK(TrainerInfoTextBoxTileGraphics)
- jp FarCopyData
-
-TrainerInfo_NameMoneyTimeText:
- db "NAME/"
- next "MONEY/"
- next "TIME/@"
-
-; $76 is a circle tile
-TrainerInfo_BadgesText:
- db $76,"BADGES",$76,"@"
-
-; draws a text box on the trainer info screen
-; height is always 6
-; INPUT:
-; hl = destination address
-; [wTrainerInfoTextBoxWidthPlus1] = width
-; [wTrainerInfoTextBoxWidth] = width - 1
-; [wTrainerInfoTextBoxNextRowOffset] = distance from the end of a text box row to the start of the next
-TrainerInfo_DrawTextBox:
- ld a, $79 ; upper left corner tile ID
- lb de, $7a, $7b ; top edge and upper right corner tile ID's
- call TrainerInfo_DrawHorizontalEdge ; draw top edge
- call TrainerInfo_NextTextBoxRow
- ld a, [wTrainerInfoTextBoxWidthPlus1]
- ld e, a
- ld d, 0
- ld c, 6 ; height of the text box
-.loop
- ld [hl], $7c ; left edge tile ID
- add hl, de
- ld [hl], $78 ; right edge tile ID
- call TrainerInfo_NextTextBoxRow
- dec c
- jr nz, .loop
- ld a, $7d ; lower left corner tile ID
- lb de, $77, $7e ; bottom edge and lower right corner tile ID's
-
-TrainerInfo_DrawHorizontalEdge:
- ld [hli], a ; place left corner tile
- ld a, [wTrainerInfoTextBoxWidth]
- ld c, a
- ld a, d
-.loop
- ld [hli], a ; place edge tile
- dec c
- jr nz, .loop
- ld a, e
- ld [hl], a ; place right corner tile
- ret
-
-TrainerInfo_NextTextBoxRow:
- ld a, [wTrainerInfoTextBoxNextRowOffset] ; distance to the start of the next row
-.loop
- inc hl
- dec a
- jr nz, .loop
- ret
-
-; draws a vertical line
-; INPUT:
-; hl = address of top tile in the line
-; a = tile ID
-TrainerInfo_DrawVerticalLine:
- ld de, SCREEN_WIDTH
- ld c, 8
-.loop
- ld [hl], a
- add hl, de
- dec c
- jr nz, .loop
- ret
-
-StartMenu_SaveReset:
- ld a, [wd72e]
- bit 6, a ; is the player using the link feature?
- jp nz, Init
- predef SaveSAV ; save the game
- call LoadScreenTilesFromBuffer2 ; restore saved screen
- jp HoldTextDisplayOpen
-
-StartMenu_Option:
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- call ClearScreen
- call UpdateSprites
- callab DisplayOptionMenu
- call LoadScreenTilesFromBuffer2 ; restore saved screen
- call LoadTextBoxTilePatterns
- call UpdateSprites
- jp RedisplayStartMenu
-
-SwitchPartyMon:
- call SwitchPartyMon_InitVarOrSwapData ; swap data
- ld a, [wSwappedMenuItem]
- call SwitchPartyMon_ClearGfx
- ld a, [wCurrentMenuItem]
- call SwitchPartyMon_ClearGfx
- jp RedrawPartyMenu_
-
-SwitchPartyMon_ClearGfx:
- push af
- coord hl, 0, 0
- ld bc, SCREEN_WIDTH * 2
- call AddNTimes
- ld c, SCREEN_WIDTH * 2
- ld a, " "
-.clearMonBGLoop ; clear the mon's row in the party menu
- ld [hli], a
- dec c
- jr nz, .clearMonBGLoop
- pop af
- ld hl, wOAMBuffer
- ld bc, $10
- call AddNTimes
- ld de, $4
- ld c, e
-.clearMonOAMLoop
- ld [hl], $a0
- add hl, de
- dec c
- jr nz, .clearMonOAMLoop
- call WaitForSoundToFinish
- ld a, SFX_SWAP
- jp PlaySound
-
-SwitchPartyMon_InitVarOrSwapData:
-; This is used to initialise [wMenuItemToSwap] and to actually swap the data.
- ld a, [wMenuItemToSwap]
- and a ; has [wMenuItemToSwap] been initialised yet?
- jr nz, .pickedMonsToSwap
-; If not, initialise [wMenuItemToSwap] so that it matches the current mon.
- ld a, [wWhichPokemon]
- inc a ; [wMenuItemToSwap] counts from 1
- ld [wMenuItemToSwap], a
- ret
-.pickedMonsToSwap
- xor a
- ld [wPartyMenuTypeOrMessageID], a
- ld a, [wMenuItemToSwap]
- dec a
- ld b, a
- ld a, [wCurrentMenuItem]
- ld [wSwappedMenuItem], a
- cp b ; swapping a mon with itself?
- jr nz, .swappingDifferentMons
-; can't swap a mon with itself
- xor a
- ld [wMenuItemToSwap], a
- ld [wPartyMenuTypeOrMessageID], a
- ret
-.swappingDifferentMons
- ld a, b
- ld [wMenuItemToSwap], a
- push hl
- push de
- ld hl, wPartySpecies
- ld d, h
- ld e, l
- ld a, [wCurrentMenuItem]
- add l
- ld l, a
- jr nc, .noCarry
- inc h
-.noCarry
- ld a, [wMenuItemToSwap]
- add e
- ld e, a
- jr nc, .noCarry2
- inc d
-.noCarry2
- ld a, [hl]
- ld [hSwapTemp], a
- ld a, [de]
- ld [hl], a
- ld a, [hSwapTemp]
- ld [de], a
- ld hl, wPartyMons
- ld bc, wPartyMon2 - wPartyMon1
- ld a, [wCurrentMenuItem]
- call AddNTimes
- push hl
- ld de, wSwitchPartyMonTempBuffer
- ld bc, wPartyMon2 - wPartyMon1
- call CopyData
- ld hl, wPartyMons
- ld bc, wPartyMon2 - wPartyMon1
- ld a, [wMenuItemToSwap]
- call AddNTimes
- pop de
- push hl
- ld bc, wPartyMon2 - wPartyMon1
- call CopyData
- pop de
- ld hl, wSwitchPartyMonTempBuffer
- ld bc, wPartyMon2 - wPartyMon1
- call CopyData
- ld hl, wPartyMonOT
- ld a, [wCurrentMenuItem]
- call SkipFixedLengthTextEntries
- push hl
- ld de, wSwitchPartyMonTempBuffer
- ld bc, NAME_LENGTH
- call CopyData
- ld hl, wPartyMonOT
- ld a, [wMenuItemToSwap]
- call SkipFixedLengthTextEntries
- pop de
- push hl
- ld bc, NAME_LENGTH
- call CopyData
- pop de
- ld hl, wSwitchPartyMonTempBuffer
- ld bc, NAME_LENGTH
- call CopyData
- ld hl, wPartyMonNicks
- ld a, [wCurrentMenuItem]
- call SkipFixedLengthTextEntries
- push hl
- ld de, wSwitchPartyMonTempBuffer
- ld bc, NAME_LENGTH
- call CopyData
- ld hl, wPartyMonNicks
- ld a, [wMenuItemToSwap]
- call SkipFixedLengthTextEntries
- pop de
- push hl
- ld bc, NAME_LENGTH
- call CopyData
- pop de
- ld hl, wSwitchPartyMonTempBuffer
- ld bc, NAME_LENGTH
- call CopyData
- ld a, [wMenuItemToSwap]
- ld [wSwappedMenuItem], a
- xor a
- ld [wMenuItemToSwap], a
- ld [wPartyMenuTypeOrMessageID], a
- pop de
- pop hl
- ret
diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm
deleted file mode 100755
index 1e2ba889..00000000
--- a/engine/menu/status_screen.asm
+++ /dev/null
@@ -1,495 +0,0 @@
-DrawHP:
-; Draws the HP bar in the stats screen
- call GetPredefRegisters
- ld a, $1
- jr DrawHP_
-
-DrawHP2:
-; Draws the HP bar in the party screen
- call GetPredefRegisters
- ld a, $2
-
-DrawHP_:
- ld [wHPBarType], a
- push hl
- ld a, [wLoadedMonHP]
- ld b, a
- ld a, [wLoadedMonHP + 1]
- ld c, a
- or b
- jr nz, .nonzeroHP
- xor a
- ld c, a
- ld e, a
- ld a, $6
- ld d, a
- jp .drawHPBarAndPrintFraction
-.nonzeroHP
- ld a, [wLoadedMonMaxHP]
- ld d, a
- ld a, [wLoadedMonMaxHP + 1]
- ld e, a
- predef HPBarLength
- ld a, $6
- ld d, a
- ld c, a
-.drawHPBarAndPrintFraction
- pop hl
- push de
- push hl
- push hl
- call DrawHPBar
- pop hl
- ld a, [hFlags_0xFFFA]
- bit 0, a
- jr z, .printFractionBelowBar
- ld bc, $9 ; right of bar
- jr .printFraction
-.printFractionBelowBar
- ld bc, SCREEN_WIDTH + 1 ; below bar
-.printFraction
- add hl, bc
- ld de, wLoadedMonHP
- lb bc, 2, 3
- call PrintNumber
- ld a, "/"
- ld [hli], a
- ld de, wLoadedMonMaxHP
- lb bc, 2, 3
- call PrintNumber
- pop hl
- pop de
- ret
-
-
-; Predef 0x37
-StatusScreen:
- call LoadMonData
- ld a, [wMonDataLocation]
- cp BOX_DATA
- jr c, .DontRecalculate
-; mon is in a box or daycare
- ld a, [wLoadedMonBoxLevel]
- ld [wLoadedMonLevel], a
- ld [wCurEnemyLVL], a
- ld hl, wLoadedMonHPExp - 1
- ld de, wLoadedMonStats
- ld b, $1
- call CalcStats ; Recalculate stats
-.DontRecalculate
- ld hl, wd72c
- set 1, [hl]
- ld a, $33
- ld [rNR50], a ; Reduce the volume
- call GBPalWhiteOutWithDelay3
- call ClearScreen
- call UpdateSprites
- call LoadHpBarAndStatusTilePatterns
- ld de, BattleHudTiles1 ; source
- ld hl, vChars2 + $6d0 ; dest
- lb bc, BANK(BattleHudTiles1), $03
- call CopyVideoDataDouble ; ·│ :L and halfarrow line end
- ld de, BattleHudTiles2
- ld hl, vChars2 + $780
- lb bc, BANK(BattleHudTiles2), $01
- call CopyVideoDataDouble ; │
- ld de, BattleHudTiles3
- ld hl, vChars2 + $760
- lb bc, BANK(BattleHudTiles3), $02
- call CopyVideoDataDouble ; ─┘
- ld de, PTile
- ld hl, vChars2 + $720
- lb bc, BANK(PTile), (PTileEnd - PTile) / $8
- call CopyVideoDataDouble ; P (for PP), inline
- ld a, [hTilesetType]
- push af
- xor a
- ld [hTilesetType], a
- coord hl, 19, 1
- lb bc, 6, 10
- call DrawLineBox ; Draws the box around name, HP and status
- ld de, -6
- add hl, de
- ld [hl], "⠄" ; . after No ("." is a different one)
- dec hl
- ld [hl], "№"
- coord hl, 19, 9
- lb bc, 8, 6
- call DrawLineBox ; Draws the box around types, ID No. and OT
- coord hl, 10, 9
- ld de, Type1Text
- call PlaceString ; "TYPE1/"
- coord hl, 11, 3
- predef DrawHP
- ld hl, wStatusScreenHPBarColor
- call GetHealthBarColor
- ld b, SET_PAL_STATUS_SCREEN
- call RunPaletteCommand
- coord hl, 16, 6
- ld de, wLoadedMonStatus
- call PrintStatusCondition
- jr nz, .StatusWritten
- coord hl, 16, 6
- ld de, OKText
- call PlaceString ; "OK"
-.StatusWritten
- coord hl, 9, 6
- ld de, StatusText
- call PlaceString ; "STATUS/"
- coord hl, 14, 2
- call PrintLevel ; Pokémon level
- ld a, [wMonHIndex]
- ld [wd11e], a
- ld [wd0b5], a
- predef IndexToPokedex
- coord hl, 3, 7
- ld de, wd11e
- lb bc, LEADING_ZEROES | 1, 3
- call PrintNumber ; Pokémon no.
- coord hl, 11, 10
- predef PrintMonType
- ld hl, NamePointers2
- call .GetStringPointer
- ld d, h
- ld e, l
- coord hl, 9, 1
- call PlaceString ; Pokémon name
- ld hl, OTPointers
- call .GetStringPointer
- ld d, h
- ld e, l
- coord hl, 12, 16
- call PlaceString ; OT
- coord hl, 12, 14
- ld de, wLoadedMonOTID
- lb bc, LEADING_ZEROES | 2, 5
- call PrintNumber ; ID Number
- ld d, $0
- call PrintStatsBox
- call Delay3
- call GBPalNormal
- coord hl, 1, 0
- call LoadFlippedFrontSpriteByMonIndex ; draw Pokémon picture
- ld a, [wMonDataLocation]
- cp ENEMY_PARTY_DATA
- jr z, .playRegularCry
- cp BOX_DATA
- jr z, .checkBoxData
- callab IsThisPartymonStarterPikachu_Party
- jr nc, .playRegularCry
- jr .playPikachuSoundClip
-.checkBoxData
- callab IsThisPartymonStarterPikachu_Box
- jr nc, .playRegularCry
-.playPikachuSoundClip
- ld e, 16
- callab PlayPikachuSoundClip
- jr .continue
-.playRegularCry
- ld a, [wcf91]
- call PlayCry ; play Pokémon cry
-.continue
- call WaitForTextScrollButtonPress ; wait for button
- pop af
- ld [hTilesetType], a
- ret
-
-.GetStringPointer
- ld a, [wMonDataLocation]
- add a
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [wMonDataLocation]
- cp DAYCARE_DATA
- ret z
- ld a, [wWhichPokemon]
- jp SkipFixedLengthTextEntries
-
-OTPointers:
- dw wPartyMonOT
- dw wEnemyMonOT
- dw wBoxMonOT
- dw wDayCareMonOT
-
-NamePointers2:
- dw wPartyMonNicks
- dw wEnemyMonNicks
- dw wBoxMonNicks
- dw wDayCareMonName
-
-Type1Text:
- db "TYPE1/", $4e
-
-Type2Text:
- db "TYPE2/", $4e
-
-IDNoText:
- db $73, "№/", $4e
-
-OTText:
- db "OT/"
- next "@"
-
-StatusText:
- db "STATUS/@"
-
-OKText:
- db "OK@"
-
-; Draws a line starting from hl high b and wide c
-DrawLineBox:
- ld de, SCREEN_WIDTH ; New line
-.PrintVerticalLine
- ld [hl], $78 ; │
- add hl, de
- dec b
- jr nz, .PrintVerticalLine
- ld [hl], $77 ; ┘
- dec hl
-.PrintHorizLine
- ld [hl], $76 ; ─
- dec hl
- dec c
- jr nz, .PrintHorizLine
- ld [hl], $6f ; ← (halfarrow ending)
- ret
-
-PTile: ; This is a single 1bpp "P" tile
- INCBIN "gfx/p_tile.1bpp"
-PTileEnd:
-
-PrintStatsBox:
- ld a, d
- and a ; a is 0 from the status screen
- jr nz, .DifferentBox
- coord hl, 0, 8
- lb bc, 8, 8
- call TextBoxBorder ; Draws the box
- coord hl, 1, 9 ; Start printing stats from here
- ld bc, $0019 ; Number offset
- jr .PrintStats
-.DifferentBox
- coord hl, 9, 2
- lb bc, 8, 9
- call TextBoxBorder
- coord hl, 11, 3
- ld bc, $0018
-.PrintStats
- push bc
- push hl
- ld de, StatsText
- call PlaceString
- pop hl
- pop bc
- add hl, bc
- ld de, wLoadedMonAttack
- lb bc, 2, 3
- call PrintStat
- ld de, wLoadedMonDefense
- call PrintStat
- ld de, wLoadedMonSpeed
- call PrintStat
- ld de, wLoadedMonSpecial
- jp PrintNumber
-PrintStat:
- push hl
- call PrintNumber
- pop hl
- ld de, SCREEN_WIDTH * 2
- add hl, de
- ret
-
-StatsText:
- db "ATTACK"
- next "DEFENSE"
- next "SPEED"
- next "SPECIAL@"
-
-StatusScreen2:
- ld a, [hTilesetType]
- push af
- xor a
- ld [hTilesetType], a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld bc, NUM_MOVES + 1
- ld hl, wMoves
- call FillMemory
- ld hl, wLoadedMonMoves
- ld de, wMoves
- ld bc, NUM_MOVES
- call CopyData
- callab FormatMovesString
- coord hl, 9, 2
- lb bc, 5, 10
- call ClearScreenArea ; Clear under name
- coord hl, 19, 3
- ld [hl], $78
- coord hl, 0, 8
- lb bc, 8, 18
- call TextBoxBorder ; Draw move container
- coord hl, 2, 9
- ld de, wMovesString
- call PlaceString ; Print moves
- ld a, [wNumMovesMinusOne]
- inc a
- ld c, a
- ld a, $4
- sub c
- ld b, a ; Number of moves ?
- coord hl, 11, 10
- ld de, SCREEN_WIDTH * 2
- ld a, $72 ; special P tile id
- call StatusScreen_PrintPP ; Print "PP"
- ld a, b
- and a
- jr z, .InitPP
- ld c, a
- ld a, "-"
- call StatusScreen_PrintPP ; Fill the rest with --
-.InitPP
- ld hl, wLoadedMonMoves
- coord de, 14, 10
- ld b, 0
-.PrintPP
- ld a, [hli]
- and a
- jr z, .PPDone
- push bc
- push hl
- push de
- ld hl, wCurrentMenuItem
- ld a, [hl]
- push af
- ld a, b
- ld [hl], a
- push hl
- callab GetMaxPP
- pop hl
- pop af
- ld [hl], a
- pop de
- pop hl
- push hl
- ld bc, wPartyMon1PP - wPartyMon1Moves - 1
- add hl, bc
- ld a, [hl]
- and $3f
- ld [wStatusScreenCurrentPP], a
- ld h, d
- ld l, e
- push hl
- ld de, wStatusScreenCurrentPP
- lb bc, 1, 2
- call PrintNumber
- ld a, "/"
- ld [hli], a
- ld de, wMaxPP
- lb bc, 1, 2
- call PrintNumber
- pop hl
- ld de, SCREEN_WIDTH * 2
- add hl, de
- ld d, h
- ld e, l
- pop hl
- pop bc
- inc b
- ld a, b
- cp $4
- jr nz, .PrintPP
-.PPDone
- coord hl, 9, 3
- ld de, StatusScreenExpText
- call PlaceString
- ld a, [wLoadedMonLevel]
- push af
- cp MAX_LEVEL
- jr z, .Level100
- inc a
- ld [wLoadedMonLevel], a ; Increase temporarily if not 100
-.Level100
- coord hl, 14, 6
- ld [hl], $70 ; 1-tile "to"
- inc hl
- inc hl
- call PrintLevel
- pop af
- ld [wLoadedMonLevel], a
- ld de, wLoadedMonExp
- coord hl, 12, 4
- lb bc, 3, 7
- call PrintNumber ; exp
- call CalcExpToLevelUp
- ld de, wLoadedMonExp
- coord hl, 7, 6
- lb bc, 3, 7
- call PrintNumber ; exp needed to level up
- coord hl, 9, 0
- call StatusScreen_ClearName
- coord hl, 9, 1
- call StatusScreen_ClearName
- ld a, [wMonHIndex]
- ld [wd11e], a
- call GetMonName
- coord hl, 9, 1
- call PlaceString
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- call Delay3
- call WaitForTextScrollButtonPress ; wait for button
- pop af
- ld [hTilesetType], a
- ld hl, wd72c
- res 1, [hl]
- ld a, $77
- ld [rNR50], a
- call GBPalWhiteOut
- jp ClearScreen
-
-CalcExpToLevelUp:
- ld a, [wLoadedMonLevel]
- cp MAX_LEVEL
- jr z, .atMaxLevel
- inc a
- ld d, a
- callab CalcExperience
- ld hl, wLoadedMonExp + 2
- ld a, [hExperience + 2]
- sub [hl]
- ld [hld], a
- ld a, [hExperience + 1]
- sbc [hl]
- ld [hld], a
- ld a, [hExperience]
- sbc [hl]
- ld [hld], a
- ret
-.atMaxLevel
- ld hl, wLoadedMonExp
- xor a
- ld [hli], a
- ld [hli], a
- ld [hl], a
- ret
-
-StatusScreenExpText:
- db "EXP POINTS"
- next "LEVEL UP@"
-
-StatusScreen_ClearName:
- ld bc, 10
- ld a, " "
- jp FillMemory
-
-StatusScreen_PrintPP:
-; print PP or -- c times, going down two rows each time
- ld [hli], a
- ld [hld], a
- add hl, de
- dec c
- jr nz, StatusScreen_PrintPP
- ret
diff --git a/engine/menu/swap_items.asm b/engine/menu/swap_items.asm
deleted file mode 100644
index 563fc7d5..00000000
--- a/engine/menu/swap_items.asm
+++ /dev/null
@@ -1,149 +0,0 @@
-HandleItemListSwapping:
- ld a, [wListMenuID]
- cp ITEMLISTMENU
- jp nz, DisplayListMenuIDLoop ; only rearrange item list menus
- push hl
- ld hl, wListPointer
- ld a, [hli]
- ld h, [hl]
- ld l, a
- inc hl ; hl = beginning of list entries
- ld a, [wCurrentMenuItem]
- ld b, a
- ld a, [wListScrollOffset]
- add b
- add a
- ld c, a
- ld b, 0
- add hl, bc ; hl = address of currently selected item entry
- ld a, [hl]
- pop hl
- inc a
- jp z, DisplayListMenuIDLoop ; ignore attempts to swap the Cancel menu item
- ld a, [wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1)
- and a ; has the first item to swap already been chosen?
- jr nz, .swapItems
-; if not, set the currently selected item as the first item
- ld a, [wCurrentMenuItem]
- inc a
- ld b, a
- ld a, [wListScrollOffset] ; index of top (visible) menu item within the list
- add b
- ld [wMenuItemToSwap], a ; ID of item chosen for swapping (counts from 1)
- ld c, 20
- call DelayFrames
- jp DisplayListMenuIDLoop
-.swapItems
- ld a, [wCurrentMenuItem]
- inc a
- ld b, a
- ld a, [wListScrollOffset]
- add b
- ld b, a
- ld a, [wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1)
- cp b ; is the currently selected item the same as the first item to swap?
- jp z, DisplayListMenuIDLoop ; ignore attempts to swap an item with itself
- dec a
- ld [wMenuItemToSwap], a ; ID of item chosen for swapping (counts from 1)
- ld c, 20
- call DelayFrames
- push hl
- push de
- ld hl, wListPointer
- ld a, [hli]
- ld h, [hl]
- ld l, a
- inc hl ; hl = beginning of list entries
- ld d, h
- ld e, l ; de = beginning of list entries
- ld a, [wCurrentMenuItem]
- ld b, a
- ld a, [wListScrollOffset]
- add b
- add a
- ld c, a
- ld b, 0
- add hl, bc ; hl = address of currently selected item entry
- ld a, [wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1)
- add a
- add e
- ld e, a
- jr nc, .noCarry
- inc d
-.noCarry ; de = address of first item to swap
- ld a, [de]
- ld b, a
- ld a, [hli]
- cp b
- jr z, .swapSameItemType
-.swapDifferentItems
- ld [$ff95], a ; [$ff95] = second item ID
- ld a, [hld]
- ld [$ff96], a ; [$ff96] = second item quantity
- ld a, [de]
- ld [hli], a ; put first item ID in second item slot
- inc de
- ld a, [de]
- ld [hl], a ; put first item quantity in second item slot
- ld a, [$ff96]
- ld [de], a ; put second item quantity in first item slot
- dec de
- ld a, [$ff95]
- ld [de], a ; put second item ID in first item slot
- xor a
- ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped
- pop de
- pop hl
- jp DisplayListMenuIDLoop
-.swapSameItemType
- inc de
- ld a, [hl]
- ld b, a
- ld a, [de]
- add b ; a = sum of both item quantities
- cp 100 ; is the sum too big for one item slot?
- jr c, .combineItemSlots
-; swap enough items from the first slot to max out the second slot if they can't be combined
- sub 99
- ld [de], a
- ld a, 99
- ld [hl], a
- jr .done
-.combineItemSlots
- ld [hl], a ; put the sum in the second item slot
- ld hl, wListPointer
- ld a, [hli]
- ld h, [hl]
- ld l, a
- dec [hl] ; decrease the number of items
- ld a, [hl]
- ld [wListCount], a ; update number of items variable
- cp 1
- jr nz, .skipSettingMaxMenuItemID
- ld [wMaxMenuItem], a ; if the number of items is only one now, update the max menu item ID
-.skipSettingMaxMenuItemID
- dec de
- ld h, d
- ld l, e
- inc hl
- inc hl ; hl = address of item after first item to swap
-.moveItemsUpLoop ; erase the first item slot and move up all the following item slots to fill the gap
- ld a, [hli]
- ld [de], a
- inc de
- inc a ; reached the $ff terminator?
- jr z, .afterMovingItemsUp
- ld a, [hli]
- ld [de], a
- inc de
- jr .moveItemsUpLoop
-.afterMovingItemsUp
- xor a
- ld [wListScrollOffset], a
- ld [wCurrentMenuItem], a
-.done
- xor a
- ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped
- pop de
- pop hl
- jp DisplayListMenuIDLoop
diff --git a/engine/menu/text_box.asm b/engine/menu/text_box.asm
deleted file mode 100644
index a109bff2..00000000
--- a/engine/menu/text_box.asm
+++ /dev/null
@@ -1,739 +0,0 @@
-; function to draw various text boxes
-DisplayTextBoxID_:
- ld a, [wTextBoxID]
- cp TWO_OPTION_MENU
- jp z, DisplayTwoOptionMenu
- ld c, a
- ld hl, TextBoxFunctionTable
- ld de, 3
- call SearchTextBoxTable
- jr c, .functionTableMatch
- ld hl, TextBoxCoordTable
- ld de, 5
- call SearchTextBoxTable
- jr c, .coordTableMatch
- ld hl, TextBoxTextAndCoordTable
- ld de, 9
- call SearchTextBoxTable
- jr c, .textAndCoordTableMatch
-.done
- ret
-.functionTableMatch
- ld a, [hli]
- ld h, [hl]
- ld l, a ; hl = address of function
- ld de, .done
- push de
- jp hl ; jump to the function
-.coordTableMatch
- call GetTextBoxIDCoords
- call GetAddressOfScreenCoords
- call TextBoxBorder
- ret
-.textAndCoordTableMatch
- call GetTextBoxIDCoords
- push hl
- call GetAddressOfScreenCoords
- call TextBoxBorder
- pop hl
- call GetTextBoxIDText
- ld a, [wd730]
- push af
- ld a, [wd730]
- set 6, a ; no pauses between printing each letter
- ld [wd730], a
- call PlaceString
- pop af
- ld [wd730], a
- call UpdateSprites
- ret
-
-; function to search a table terminated with $ff for a byte matching c in increments of de
-; sets carry flag if a match is found and clears carry flag if not
-SearchTextBoxTable:
- dec de
-.loop
- ld a, [hli]
- cp $ff
- jr z, .notFound
- cp c
- jr z, .found
- add hl, de
- jr .loop
-.found
- scf
-.notFound
- ret
-
-; function to load coordinates from the TextBoxCoordTable or the TextBoxTextAndCoordTable
-; INPUT:
-; hl = address of coordinates
-; OUTPUT:
-; b = height
-; c = width
-; d = row of upper left corner
-; e = column of upper left corner
-GetTextBoxIDCoords:
- ld a, [hli] ; column of upper left corner
- ld e, a
- ld a, [hli] ; row of upper left corner
- ld d, a
- ld a, [hli] ; column of lower right corner
- sub e
- dec a
- ld c, a ; c = width
- ld a, [hli] ; row of lower right corner
- sub d
- dec a
- ld b, a ; b = height
- ret
-
-; function to load a text address and text coordinates from the TextBoxTextAndCoordTable
-GetTextBoxIDText:
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a ; de = address of text
- push de ; save text address
- ld a, [hli]
- ld e, a ; column of upper left corner of text
- ld a, [hl]
- ld d, a ; row of upper left corner of text
- call GetAddressOfScreenCoords
- pop de ; restore text address
- ret
-
-; function to point hl to the screen coordinates
-; INPUT:
-; d = row
-; e = column
-; OUTPUT:
-; hl = address of upper left corner of text box
-GetAddressOfScreenCoords:
- push bc
- coord hl, 0, 0
- ld bc, 20
-.loop ; loop to add d rows to the base address
- ld a, d
- and a
- jr z, .addedRows
- add hl, bc
- dec d
- jr .loop
-.addedRows
- pop bc
- add hl, de
- ret
-
-; Format:
-; 00: text box ID
-; 01-02: function address
-TextBoxFunctionTable:
- dbw MONEY_BOX, DisplayMoneyBox
- dbw BUY_SELL_QUIT_MENU, DoBuySellQuitMenu
- dbw FIELD_MOVE_MON_MENU, DisplayFieldMoveMonMenu
- db $ff ; terminator
-
-; Format:
-; 00: text box ID
-; 01: column of upper left corner
-; 02: row of upper left corner
-; 03: column of lower right corner
-; 04: row of lower right corner
-TextBoxCoordTable:
- db MESSAGE_BOX, 0, 12, 19, 17
- db $03, 0, 0, 19, 14
- db $07, 0, 0, 11, 6
- db LIST_MENU_BOX, 4, 2, 19, 12
- db $10, 7, 0, 19, 17
- db MON_SPRITE_POPUP, 6, 4, 14, 13
- db $ff ; terminator
-
-; Format:
-; 00: text box ID
-; 01: column of upper left corner
-; 02: row of upper left corner
-; 03: column of lower right corner
-; 04: row of lower right corner
-; 05-06: address of text
-; 07: column of beginning of text
-; 08: row of beginning of text
-; table of window positions and corresponding text [key, start column, start row, end column, end row, text pointer [2 bytes], text column, text row]
-TextBoxTextAndCoordTable:
- db JP_MOCHIMONO_MENU_TEMPLATE
- db 0,0,14,17 ; text box coordinates
- dw JapaneseMochimonoText
- db 3,0 ; text coordinates
-
- db USE_TOSS_MENU_TEMPLATE
- db 13,10,19,14 ; text box coordinates
- dw UseTossText
- db 15,11 ; text coordinates
-
- db JP_SAVE_MESSAGE_MENU_TEMPLATE
- db 0,0,7,5 ; text box coordinates
- dw JapaneseSaveMessageText
- db 2,2 ; text coordinates
-
- db JP_SPEED_OPTIONS_MENU_TEMPLATE
- db 0,6,5,10 ; text box coordinates
- dw JapaneseSpeedOptionsText
- db 2,7 ; text coordinates
-
- db BATTLE_MENU_TEMPLATE
- db 8,12,19,17 ; text box coordinates
- dw BattleMenuText
- db 10,14 ; text coordinates
-
- db SAFARI_BATTLE_MENU_TEMPLATE
- db 0,12,19,17 ; text box coordinates
- dw SafariZoneBattleMenuText
- db 2,14 ; text coordinates
-
- db SWITCH_STATS_CANCEL_MENU_TEMPLATE
- db 11,11,19,17 ; text box coordinates
- dw SwitchStatsCancelText
- db 13,12 ; text coordinates
-
- db BUY_SELL_QUIT_MENU_TEMPLATE
- db 0,0,10,6 ; text box coordinates
- dw BuySellQuitText
- db 2,1 ; text coordinates
-
- db MONEY_BOX_TEMPLATE
- db 11,0,19,2 ; text box coordinates
- dw MoneyText
- db 13,0 ; text coordinates
-
- db JP_AH_MENU_TEMPLATE
- db 7,6,11,10 ; text box coordinates
- dw JapaneseAhText
- db 8,8 ; text coordinates
-
- db JP_POKEDEX_MENU_TEMPLATE
- db 11,8,19,17 ; text box coordinates
- dw JapanesePokedexMenu
- db 12,10 ; text coordinates
-
-; note that there is no terminator
-
-BuySellQuitText:
- db "BUY"
- next "SELL"
- next "QUIT@@"
-
-UseTossText:
- db "USE"
- next "TOSS@"
-
-JapaneseSaveMessageText:
- db "きろく"
- next "メッセージ@"
-
-JapaneseSpeedOptionsText:
- db "はやい"
- next "おそい@"
-
-MoneyText:
- db "MONEY@"
-
-JapaneseMochimonoText:
- db "もちもの@"
-
-JapaneseMainMenuText:
- db "つづきから"
- next "さいしょから@"
-
-BattleMenuText:
- db "FIGHT ",$E1,$E2
- next "ITEM RUN@"
-
-SafariZoneBattleMenuText:
- db "BALL× BAIT"
- next "THROW ROCK RUN@"
-
-SwitchStatsCancelText:
- db "SWITCH"
- next "STATS"
- next "CANCEL@"
-
-JapaneseAhText:
- db "アッ!@"
-
-JapanesePokedexMenu:
- db "データをみる"
- next "なきごえ"
- next "ぶんぷをみる"
- next "キャンセル@"
-
-DisplayMoneyBox:
- ld hl, wd730
- set 6, [hl]
- ld a, MONEY_BOX_TEMPLATE
- ld [wTextBoxID], a
- call DisplayTextBoxID
- coord hl, 13, 1
- lb bc, 1, 6
- call ClearScreenArea
- coord hl, 12, 1
- ld de, wPlayerMoney
- ld c, $a3
- call PrintBCDNumber
- ld hl, wd730
- res 6, [hl]
- ret
-
-CurrencyString:
- db " ¥@"
-
-DoBuySellQuitMenu:
- ld a, [wd730]
- set 6, a ; no printing delay
- ld [wd730], a
- xor a
- ld [wChosenMenuItem], a
- ld a, BUY_SELL_QUIT_MENU_TEMPLATE
- ld [wTextBoxID], a
- call DisplayTextBoxID
- ld a, A_BUTTON | B_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, $2
- ld [wMaxMenuItem], a
- ld a, $1
- ld [wTopMenuItemY], a
- ld a, $1
- ld [wTopMenuItemX], a
- xor a
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld [wMenuWatchMovingOutOfBounds], a
- ld a, [wd730]
- res 6, a ; turn on the printing delay
- ld [wd730], a
- call HandleMenuInput
- call PlaceUnfilledArrowMenuCursor
- bit 0, a ; was A pressed?
- jr nz, .pressedA
- bit 1, a ; was B pressed? (always true since only A/B are watched)
- jr z, .pressedA
- ld a, CANCELLED_MENU
- ld [wMenuExitMethod], a
- jr .quit
-.pressedA
- ld a, CHOSE_MENU_ITEM
- ld [wMenuExitMethod], a
- ld a, [wCurrentMenuItem]
- ld [wChosenMenuItem], a
- ld b, a
- ld a, [wMaxMenuItem]
- cp b
- jr z, .quit
- ret
-.quit
- ld a, CANCELLED_MENU
- ld [wMenuExitMethod], a
- ld a, [wCurrentMenuItem]
- ld [wChosenMenuItem], a
- scf
- ret
-
-; displays a menu with two options to choose from
-; b = Y of upper left corner of text region
-; c = X of upper left corner of text region
-; hl = address where the text box border should be drawn
-DisplayTwoOptionMenu:
- push hl
- ld a, [wd730]
- set 6, a ; no printing delay
- ld [wd730], a
-
-; pointless because both values are overwritten before they are read
- xor a
- ld [wChosenMenuItem], a
- ld [wMenuExitMethod], a
-
- ld a, A_BUTTON | B_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, $1
- ld [wMaxMenuItem], a
- ld a, b
- ld [wTopMenuItemY], a
- ld a, c
- ld [wTopMenuItemX], a
- xor a
- ld [wLastMenuItem], a
- ld [wMenuWatchMovingOutOfBounds], a
- push hl
- ld hl, wTwoOptionMenuID
- bit 7, [hl] ; select second menu item by default?
- res 7, [hl]
- jr z, .storeCurrentMenuItem
- inc a
-.storeCurrentMenuItem
- ld [wCurrentMenuItem], a
- pop hl
- push hl
- push hl
- call TwoOptionMenu_SaveScreenTiles
- ld a, [wTwoOptionMenuID]
- ld hl, TwoOptionMenuStrings
- ld e, a
- ld d, $0
- ld a, $5
-.menuStringLoop
- add hl, de
- dec a
- jr nz, .menuStringLoop
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- ld e, l
- ld d, h
- pop hl
- push de
- ld a, [wTwoOptionMenuID]
- cp TRADE_CANCEL_MENU
- jr nz, .notTradeCancelMenu
- call CableClub_TextBoxBorder
- jr .afterTextBoxBorder
-.notTradeCancelMenu
- call TextBoxBorder
-.afterTextBoxBorder
- call UpdateSprites
- pop hl
- ld a, [hli]
- and a ; put blank line before first menu item?
- ld bc, 20 + 2
- jr z, .noBlankLine
- ld bc, 2 * 20 + 2
-.noBlankLine
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- pop hl
- add hl, bc
- call PlaceString
- xor a
- ld [wTwoOptionMenuID], a
- ld hl, wd730
- res 6, [hl] ; turn on the printing delay
- call HandleMenuInput
- pop hl
- bit 1, a ; A button pressed?
- jr nz, .choseSecondMenuItem ; automatically choose the second option if B is pressed
-.pressedAButton
- ld a, [wCurrentMenuItem]
- ld [wChosenMenuItem], a
- and a
- jr nz, .choseSecondMenuItem
-; chose first menu item
- ld a, CHOSE_FIRST_ITEM
- ld [wMenuExitMethod], a
- ld c, 15
- call DelayFrames
- call TwoOptionMenu_RestoreScreenTiles
- and a
- ret
-.choseSecondMenuItem
- ld a, 1
- ld [wCurrentMenuItem], a
- ld [wChosenMenuItem], a
- ld a, CHOSE_SECOND_ITEM
- ld [wMenuExitMethod], a
- ld c, 15
- call DelayFrames
- call TwoOptionMenu_RestoreScreenTiles
- scf
- ret
-
-; Some of the wider/taller two option menus will not have the screen areas
-; they cover be fully saved/restored by the two functions below.
-; The bottom and right edges of the menu may remain after the function returns.
-
-TwoOptionMenu_SaveScreenTiles:
- ld de, wBuffer
- lb bc, 5, 6
-.loop
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .loop
- push bc
- ld bc, SCREEN_WIDTH - 6
- add hl, bc
- pop bc
- ld c, $6
- dec b
- jr nz, .loop
- ret
-
-TwoOptionMenu_RestoreScreenTiles:
- ld de, wBuffer
- lb bc, 5, 6
-.loop
- ld a, [de]
- inc de
- ld [hli], a
- dec c
- jr nz, .loop
- push bc
- ld bc, SCREEN_WIDTH - 6
- add hl, bc
- pop bc
- ld c, 6
- dec b
- jr nz, .loop
- call UpdateSprites
- ret
-
-; Format:
-; 00: byte width
-; 01: byte height
-; 02: byte put blank line before first menu item
-; 03: word text pointer
-TwoOptionMenuStrings:
- db 4,3,0
- dw .YesNoMenu
- db 6,3,0
- dw .NorthWestMenu
- db 6,3,0
- dw .SouthEastMenu
- db 6,3,0
- dw .YesNoMenu
- db 6,3,0
- dw .NorthEastMenu
- db 7,3,0
- dw .TradeCancelMenu
- db 7,4,1
- dw .HealCancelMenu
- db 4,3,0
- dw .NoYesMenu
-
-.NoYesMenu
- db "NO"
- next "YES@"
-.YesNoMenu
- db "YES"
- next "NO@"
-.NorthWestMenu
- db "NORTH"
- next "WEST@"
-.SouthEastMenu
- db "SOUTH"
- next "EAST@"
-.NorthEastMenu
- db "NORTH"
- next "EAST@"
-.TradeCancelMenu
- db "TRADE"
- next "CANCEL@"
-.HealCancelMenu
- db "HEAL"
- next "CANCEL@"
-
-DisplayFieldMoveMonMenu:
- xor a
- ld hl, wFieldMoves
- ld [hli], a ; wFieldMoves
- ld [hli], a ; wFieldMoves + 1
- ld [hli], a ; wFieldMoves + 2
- ld [hli], a ; wFieldMoves + 3
- ld [hli], a ; wNumFieldMoves
- ld [hl], 12 ; wFieldMovesLeftmostXCoord
- call GetMonFieldMoves
- ld a, [wNumFieldMoves]
- and a
- jr nz, .fieldMovesExist
-
-; no field moves
- coord hl, 11, 11
- lb bc, 5, 7
- call TextBoxBorder
- call UpdateSprites
- ld a, 12
- ld [hFieldMoveMonMenuTopMenuItemX], a
- coord hl, 13, 12
- ld de, PokemonMenuEntries
- jp PlaceString
-
-.fieldMovesExist
- push af
-
-; Calculate the text box position and dimensions based on the leftmost X coord
-; of the field move names before adjusting for the number of field moves.
- coord hl, 0, 11
- ld a, [wFieldMovesLeftmostXCoord]
- dec a
- ld e, a
- ld d, 0
- add hl, de
- ld b, 5
- ld a, 18
- sub e
- ld c, a
- pop af
-
-; For each field move, move the top of the text box up 2 rows while the leaving
-; the bottom of the text box at the bottom of the screen.
- ld de, -SCREEN_WIDTH * 2
-.textBoxHeightLoop
- add hl, de
- inc b
- inc b
- dec a
- jr nz, .textBoxHeightLoop
-
-; Make space for an extra blank row above the top field move.
- ld de, -SCREEN_WIDTH
- add hl, de
- inc b
-
- call TextBoxBorder
- call UpdateSprites
-
-; Calculate the position of the first field move name to print.
- coord hl, 0, 12
- ld a, [wFieldMovesLeftmostXCoord]
- inc a
- ld e, a
- ld d, 0
- add hl, de
- ld de, -SCREEN_WIDTH * 2
- ld a, [wNumFieldMoves]
-.calcFirstFieldMoveYLoop
- add hl, de
- dec a
- jr nz, .calcFirstFieldMoveYLoop
-
- xor a
- ld [wNumFieldMoves], a
- ld de, wFieldMoves
-.printNamesLoop
- push hl
- ld hl, FieldMoveNames
- ld a, [de]
- and a
- jr z, .donePrintingNames
- inc de
- ld b, a ; index of name
-.skipNamesLoop ; skip past names before the name we want
- dec b
- jr z, .reachedName
-.skipNameLoop ; skip past current name
- ld a, [hli]
- cp "@"
- jr nz, .skipNameLoop
- jr .skipNamesLoop
-.reachedName
- ld b, h
- ld c, l
- pop hl
- push de
- ld d, b
- ld e, c
- call PlaceString
- ld bc, SCREEN_WIDTH * 2
- add hl, bc
- pop de
- jr .printNamesLoop
-
-.donePrintingNames
- pop hl
- ld a, [wFieldMovesLeftmostXCoord]
- ld [hFieldMoveMonMenuTopMenuItemX], a
- coord hl, 0, 12
- ld a, [wFieldMovesLeftmostXCoord]
- inc a
- ld e, a
- ld d, 0
- add hl, de
- ld de, PokemonMenuEntries
- jp PlaceString
-
-FieldMoveNames:
- db "CUT@"
- db "FLY@"
- db "@"
- db "SURF@"
- db "STRENGTH@"
- db "FLASH@"
- db "DIG@"
- db "TELEPORT@"
- db "SOFTBOILED@"
-
-PokemonMenuEntries:
- db "STATS"
- next "SWITCH"
- next "CANCEL@"
-
-GetMonFieldMoves:
- ld a, [wWhichPokemon]
- ld hl, wPartyMon1Moves
- ld bc, wPartyMon2 - wPartyMon1
- call AddNTimes
- ld d, h
- ld e, l
- ld c, NUM_MOVES + 1
- ld hl, wFieldMoves
-.loop
- push hl
-.nextMove
- dec c
- jr z, .done
- ld a, [de] ; move ID
- and a
- jr z, .done
- ld b, a
- inc de
- ld hl, FieldMoveDisplayData
-.fieldMoveLoop
- ld a, [hli]
- cp $ff
- jr z, .nextMove ; if the move is not a field move
- cp b
- jr z, .foundFieldMove
- inc hl
- inc hl
- jr .fieldMoveLoop
-.foundFieldMove
- ld a, b
- ld [wLastFieldMoveID], a
- ld a, [hli] ; field move name index
- ld b, [hl] ; field move leftmost X coordinate
- pop hl
- ld [hli], a ; store name index in wFieldMoves
- ld a, [wNumFieldMoves]
- inc a
- ld [wNumFieldMoves], a
- ld a, [wFieldMovesLeftmostXCoord]
- cp b
- jr c, .skipUpdatingLeftmostXCoord
- ld a, b
- ld [wFieldMovesLeftmostXCoord], a
-.skipUpdatingLeftmostXCoord
- ld a, [wLastFieldMoveID]
- ld b, a
- jr .loop
-.done
- pop hl
- ret
-
-; Format: [Move id], [name index], [leftmost tile]
-; Move id = id of move
-; Name index = index of name in FieldMoveNames
-; Leftmost tile = -1 + tile column in which the first letter of the move's name should be displayed
-; "SOFTBOILED" is $08 because it has 4 more letters than "SURF", for example, whose value is $0C
-FieldMoveDisplayData:
- db CUT, $01, $0C
- db FLY, $02, $0C
- db $B4, $03, $0C ; unused field move
- db SURF, $04, $0C
- db STRENGTH, $05, $0A
- db FLASH, $06, $0C
- db DIG, $07, $0C
- db TELEPORT, $08, $0A
- db SOFTBOILED, $09, $08
- db $ff ; list terminator
diff --git a/engine/menu/vending_machine.asm b/engine/menu/vending_machine.asm
deleted file mode 100755
index 37d9b9e7..00000000
--- a/engine/menu/vending_machine.asm
+++ /dev/null
@@ -1,138 +0,0 @@
-VendingMachineMenu:
- ld hl, VendingMachineText1
- call PrintText
- ld a, MONEY_BOX
- ld [wTextBoxID], a
- call DisplayTextBoxID
- xor a
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld a, A_BUTTON | B_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, 3
- ld [wMaxMenuItem], a
- ld a, 5
- ld [wTopMenuItemY], a
- ld a, 1
- ld [wTopMenuItemX], a
- ld hl, wd730
- set 6, [hl]
- coord hl, 0, 3
- lb bc, 8, 12
- call TextBoxBorder
- call UpdateSprites
- coord hl, 2, 5
- ld de, DrinkText
- call PlaceString
- coord hl, 9, 6
- ld de, DrinkPriceText
- call PlaceString
- ld hl, wd730
- res 6, [hl]
- call HandleMenuInput
- bit 1, a ; pressed B?
- jr nz, .notThirsty
- ld a, [wCurrentMenuItem]
- cp 3 ; chose Cancel?
- jr z, .notThirsty
- xor a
- ld [hMoney], a
- ld [hMoney + 2], a
- ld a, $2
- ld [hMoney + 1], a
- call HasEnoughMoney
- jr nc, .enoughMoney
- ld hl, VendingMachineText4
- jp PrintText
-.enoughMoney
- call LoadVendingMachineItem
- ld a, [hVendingMachineItem]
- ld b, a
- ld c, 1
- call GiveItem
- jr nc, .BagFull
-
- ld b, 60 ; number of times to play the "brrrrr" sound
-.playDeliverySound
- ld c, 2
- call DelayFrames
- push bc
- ld a, SFX_PUSH_BOULDER
- call PlaySound
- pop bc
- dec b
- jr nz, .playDeliverySound
-
- ld hl, VendingMachineText5
- call PrintText
- ld hl, hVendingMachinePrice + 2
- ld de, wPlayerMoney + 2
- ld c, $3
- predef SubBCDPredef
- ld a, MONEY_BOX
- ld [wTextBoxID], a
- jp DisplayTextBoxID
-.BagFull
- ld hl, VendingMachineText6
- jp PrintText
-.notThirsty
- ld hl, VendingMachineText7
- jp PrintText
-
-VendingMachineText1:
- TX_FAR _VendingMachineText1
- db "@"
-
-DrinkText:
- db "FRESH WATER"
- next "SODA POP"
- next "LEMONADE"
- next "CANCEL@"
-
-DrinkPriceText:
- db "¥200"
- next "¥300"
- next "¥350"
- next "@"
-
-VendingMachineText4:
- TX_FAR _VendingMachineText4
- db "@"
-
-VendingMachineText5:
- TX_FAR _VendingMachineText5
- db "@"
-
-VendingMachineText6:
- TX_FAR _VendingMachineText6
- db "@"
-
-VendingMachineText7:
- TX_FAR _VendingMachineText7
- db "@"
-
-LoadVendingMachineItem:
- ld hl, VendingPrices
- ld a, [wCurrentMenuItem]
- add a
- add a
- ld d, 0
- ld e, a
- add hl, de
- ld a, [hli]
- ld [hVendingMachineItem], a
- ld a, [hli]
- ld [hVendingMachinePrice], a
- ld a, [hli]
- ld [hVendingMachinePrice + 1], a
- ld a, [hl]
- ld [hVendingMachinePrice + 2], a
- ret
-
-VendingPrices:
- db FRESH_WATER
- money 200
- db SODA_POP
- money 300
- db LEMONADE
- money 350
diff --git a/engine/menus/display_text_id_init.asm b/engine/menus/display_text_id_init.asm
new file mode 100644
index 00000000..17f290b4
--- /dev/null
+++ b/engine/menus/display_text_id_init.asm
@@ -0,0 +1,76 @@
+; function that performs initialization for DisplayTextID
+DisplayTextIDInit::
+ xor a
+ ld [wListMenuID], a
+ ld a, [wAutoTextBoxDrawingControl]
+ bit 0, a
+ jr nz, .skipDrawingTextBoxBorder
+ ldh a, [hSpriteIndexOrTextID] ; text ID (or sprite ID)
+ and a
+ jr nz, .notStartMenu
+; if text ID is 0 (i.e. the start menu)
+; Note that the start menu text border is also drawn in the function directly
+; below this, so this seems unnecessary.
+ CheckEvent EVENT_GOT_POKEDEX
+; start menu with pokedex
+ hlcoord 10, 0
+ lb bc, 14, 8
+ jr nz, .drawTextBoxBorder
+; start menu without pokedex
+ hlcoord 10, 0
+ lb bc, 12, 8
+ jr .drawTextBoxBorder
+; if text ID is not 0 (i.e. not the start menu) then do a standard dialogue text box
+.notStartMenu
+ hlcoord 0, 12
+ lb bc, 4, 18
+.drawTextBoxBorder
+ call TextBoxBorder
+.skipDrawingTextBoxBorder
+ ld hl, wFontLoaded
+ set 0, [hl]
+ ld hl, wFlags_0xcd60
+ bit 4, [hl]
+ res 4, [hl]
+ jr nz, .skipMovingSprites
+ call UpdateSprites
+.skipMovingSprites
+; loop to copy [x#SPRITESTATEDATA1_FACINGDIRECTION] to
+; [x#SPRITESTATEDATA2_ORIGFACINGDIRECTION] for each non-player sprite
+; this is done because when you talk to an NPC, they turn to look your way
+; the original direction they were facing must be restored after the dialogue is over
+ ld hl, wSprite01StateData1FacingDirection
+ ld c, $0f
+ ld de, $10
+.spriteFacingDirectionCopyLoop
+ ld a, [hl] ; x#SPRITESTATEDATA1_FACINGDIRECTION
+ inc h
+ ld [hl], a ; [x#SPRITESTATEDATA2_ORIGFACINGDIRECTION]
+ dec h
+ add hl, de
+ dec c
+ jr nz, .spriteFacingDirectionCopyLoop
+; loop to force all the sprites in the middle of animation to stand still
+; (so that they don't like they're frozen mid-step during the dialogue)
+ ld hl, wSpritePlayerStateData1ImageIndex
+ ld de, $10
+ ld c, e
+.spriteStandStillLoop
+ ld a, [hl]
+ cp $ff ; is the sprite visible?
+ jr z, .nextSprite
+; if it is visible
+ and $fc
+ ld [hl], a
+.nextSprite
+ add hl, de
+ dec c
+ jr nz, .spriteStandStillLoop
+ ld b, $9c ; window background address
+ call CopyScreenTileBufferToVRAM ; transfer background in WRAM to VRAM
+ xor a
+ ldh [hWY], a ; put the window on the screen
+ call LoadFontTilePatterns
+ ld a, $01
+ ldh [hAutoBGTransferEnabled], a ; enable continuous WRAM to VRAM transfer each V-blank
+ ret
diff --git a/engine/menus/draw_badges.asm b/engine/menus/draw_badges.asm
new file mode 100644
index 00000000..0bb433cc
--- /dev/null
+++ b/engine/menus/draw_badges.asm
@@ -0,0 +1,120 @@
+DrawBadges:
+; Draw 4x2 gym leader faces, with the faces replaced by
+; badges if they are owned. Used in the player status screen.
+
+; In Japanese versions, names are displayed above faces.
+; Instead of removing relevant code, the name graphics were erased.
+
+; Tile ids for face/badge graphics.
+ ld de, wBadgeOrFaceTiles
+ ld hl, .FaceBadgeTiles
+ ld bc, NUM_BADGES
+ call CopyData
+
+; Booleans for each badge.
+ ld hl, wTempObtainedBadgesBooleans
+ ld bc, NUM_BADGES
+ xor a
+ call FillMemory
+
+; Alter these based on owned badges.
+ ld de, wTempObtainedBadgesBooleans
+ ld hl, wBadgeOrFaceTiles
+ ld a, [wObtainedBadges]
+ ld b, a
+ ld c, NUM_BADGES
+.CheckBadge
+ srl b
+ jr nc, .NextBadge
+ ld a, [hl]
+ add 4 ; Badge graphics are after each face
+ ld [hl], a
+ ld a, 1
+ ld [de], a
+.NextBadge
+ inc hl
+ inc de
+ dec c
+ jr nz, .CheckBadge
+
+; Draw two rows of badges.
+ ld hl, wBadgeNumberTile
+ ld a, $d8 ; [1]
+ ld [hli], a
+ ld [hl], $60 ; First name
+
+ hlcoord 2, 11
+ ld de, wTempObtainedBadgesBooleans
+ call .DrawBadgeRow
+
+ hlcoord 2, 14
+ ld de, wTempObtainedBadgesBooleans + 4
+; call .DrawBadgeRow
+; ret
+
+.DrawBadgeRow
+; Draw 4 badges.
+
+ ld c, 4
+.DrawBadge
+ push de
+ push hl
+
+; Badge no.
+ ld a, [wBadgeNumberTile]
+ ld [hli], a
+ inc a
+ ld [wBadgeNumberTile], a
+
+; Names aren't printed if the badge is owned.
+ ld a, [de]
+ and a
+ ld a, [wBadgeNameTile]
+ jr nz, .SkipName
+ call .PlaceTiles
+ jr .PlaceBadge
+
+.SkipName
+ inc a
+ inc a
+ inc hl
+
+.PlaceBadge
+ ld [wBadgeNameTile], a
+ ld de, SCREEN_WIDTH - 1
+ add hl, de
+ ld a, [wBadgeOrFaceTiles]
+ call .PlaceTiles
+ add hl, de
+ call .PlaceTiles
+
+; Shift badge array back one byte.
+ push bc
+ ld hl, wBadgeOrFaceTiles + 1
+ ld de, wBadgeOrFaceTiles
+ ld bc, NUM_BADGES
+ call CopyData
+ pop bc
+
+ pop hl
+ ld de, 4
+ add hl, de
+
+ pop de
+ inc de
+ dec c
+ jr nz, .DrawBadge
+ ret
+
+.PlaceTiles
+ ld [hli], a
+ inc a
+ ld [hl], a
+ inc a
+ ret
+
+.FaceBadgeTiles
+ db $20, $28, $30, $38, $40, $48, $50, $58
+
+GymLeaderFaceAndBadgeTileGraphics:
+ INCBIN "gfx/trainer_card/badges.2bpp"
diff --git a/engine/menus/draw_start_menu.asm b/engine/menus/draw_start_menu.asm
new file mode 100644
index 00000000..7ca75ecb
--- /dev/null
+++ b/engine/menus/draw_start_menu.asm
@@ -0,0 +1,87 @@
+; function that displays the start menu
+DrawStartMenu::
+ CheckEvent EVENT_GOT_POKEDEX
+; menu with pokedex
+ hlcoord 10, 0
+ lb bc, 14, 8
+ jr nz, .drawTextBoxBorder
+; shorter menu if the player doesn't have the pokedex
+ hlcoord 10, 0
+ lb bc, 12, 8
+.drawTextBoxBorder
+ call TextBoxBorder
+ 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
+ ld a, $0b
+ ld [wTopMenuItemX], a ; X position of first menu choice
+ ld a, [wBattleAndStartSavedMenuItem] ; remembered menu selection from last time
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ xor a
+ ld [wMenuWatchMovingOutOfBounds], a
+ ld hl, wd730
+ set 6, [hl] ; no pauses between printing each letter
+ hlcoord 12, 2
+ CheckEvent EVENT_GOT_POKEDEX
+; case for not having pokedex
+ ld a, $06
+ jr z, .storeMenuItemCount
+; case for having pokedex
+ ld de, StartMenuPokedexText
+ call PrintStartMenuItem
+ ld a, $07
+.storeMenuItemCount
+ ld [wMaxMenuItem], a ; number of menu items
+ ld de, StartMenuPokemonText
+ call PrintStartMenuItem
+ ld de, StartMenuItemText
+ call PrintStartMenuItem
+ ld de, wPlayerName ; player's name
+ call PrintStartMenuItem
+ ld a, [wd72e]
+ bit 6, a ; is the player using the link feature?
+; case for not using link feature
+ ld de, StartMenuSaveText
+ jr z, .printSaveOrResetText
+; case for using link feature
+ ld de, StartMenuResetText
+.printSaveOrResetText
+ call PrintStartMenuItem
+ ld de, StartMenuOptionText
+ call PrintStartMenuItem
+ ld de, StartMenuExitText
+ call PlaceString
+ ld hl, wd730
+ res 6, [hl] ; turn pauses between printing letters back on
+ ret
+
+StartMenuPokedexText:
+ db "POKéDEX@"
+
+StartMenuPokemonText:
+ db "#MON@"
+
+StartMenuItemText:
+ db "ITEM@"
+
+StartMenuSaveText:
+ db "SAVE@"
+
+StartMenuResetText:
+ db "RESET@"
+
+StartMenuExitText:
+ db "EXIT@"
+
+StartMenuOptionText:
+ db "OPTION@"
+
+PrintStartMenuItem:
+ push hl
+ call PlaceString
+ pop hl
+ ld de, SCREEN_WIDTH * 2
+ add hl, de
+ ret
diff --git a/engine/menus/league_pc.asm b/engine/menus/league_pc.asm
new file mode 100755
index 00000000..5551fd0b
--- /dev/null
+++ b/engine/menus/league_pc.asm
@@ -0,0 +1,119 @@
+PKMNLeaguePC:
+ ld hl, AccessedHoFPCText
+ call PrintText
+ ld hl, wd730
+ set 6, [hl]
+ push hl
+ ld a, [wUpdateSpritesEnabled]
+ push af
+ ldh a, [hTilesetType]
+ push af
+ xor a
+ ldh [hTilesetType], a
+ ld [wSpriteFlipped], a
+ ld [wUpdateSpritesEnabled], a
+ ld [wHoFTeamIndex2], a
+ ld [wHoFTeamNo], a
+ ld a, [wNumHoFTeams]
+ ld b, a
+ cp HOF_TEAM_CAPACITY + 1
+ jr c, .loop
+; If the total number of hall of fame teams is greater than the storage
+; capacity, then calculate the number of the first team that is still recorded.
+ ld b, HOF_TEAM_CAPACITY
+ sub b
+ ld [wHoFTeamNo], a
+.loop
+ ld hl, wHoFTeamNo
+ inc [hl]
+ push bc
+ ld a, [wHoFTeamIndex2]
+ ld [wHoFTeamIndex], a
+ farcall LoadHallOfFameTeams
+ call LeaguePCShowTeam
+ pop bc
+ jr c, .doneShowingTeams
+ ld hl, wHoFTeamIndex2
+ inc [hl]
+ ld a, [hl]
+ cp b
+ jr nz, .loop
+.doneShowingTeams
+ pop af
+ ldh [hTilesetType], a
+ pop af
+ ld [wUpdateSpritesEnabled], a
+ pop hl
+ res 6, [hl]
+ call GBPalWhiteOutWithDelay3
+ call ClearScreen
+ call RunDefaultPaletteCommand
+ jp GBPalNormal
+
+LeaguePCShowTeam:
+ ld c, PARTY_LENGTH
+.loop
+ push bc
+ call LeaguePCShowMon
+ call WaitForTextScrollButtonPress
+ ldh a, [hJoyHeld]
+ bit 1, a
+ jr nz, .exit
+ ld hl, wHallOfFame + HOF_MON
+ ld de, wHallOfFame
+ ld bc, HOF_TEAM - HOF_MON
+ call CopyData
+ pop bc
+ ld a, [wHallOfFame + 0]
+ cp $ff
+ jr z, .done
+ dec c
+ jr nz, .loop
+.done
+ and a
+ ret
+.exit
+ pop bc
+ scf
+ ret
+
+LeaguePCShowMon:
+ call GBPalWhiteOutWithDelay3
+ call ClearScreen
+ ld hl, wHallOfFame
+ ld a, [hli]
+ ld [wHoFMonSpecies], a
+ ld [wcf91], a
+ ld [wd0b5], a
+ ld [wBattleMonSpecies2], a
+ ld [wWholeScreenPaletteMonSpecies], a
+ ld a, [hli]
+ ld [wHoFMonLevel], a
+ ld de, wcd6d
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld b, SET_PAL_POKEMON_WHOLE_SCREEN
+ ld c, 0
+ call RunPaletteCommand
+ hlcoord 12, 5
+ call GetMonHeader
+ call LoadFrontSpriteByMonIndex
+ call GBPalNormal
+ hlcoord 0, 13
+ lb bc, 2, 18
+ call TextBoxBorder
+ hlcoord 1, 15
+ ld de, HallOfFameNoText
+ call PlaceString
+ hlcoord 16, 15
+ ld de, wHoFTeamNo
+ lb bc, 1, 3
+ call PrintNumber
+ farjp Func_7033f
+
+HallOfFameNoText:
+ db "HALL OF FAME No @"
+
+AccessedHoFPCText:
+ text_far _AccessedHoFPCText
+ text_end
diff --git a/engine/menus/link_menu.asm b/engine/menus/link_menu.asm
new file mode 100644
index 00000000..2f2db573
--- /dev/null
+++ b/engine/menus/link_menu.asm
@@ -0,0 +1,910 @@
+Func_f531b::
+ ld c, $14
+ call DelayFrames
+ ld a, $1
+ ld [wBuffer], a
+ xor a
+ ld [wUnknownSerialFlag_d499], a
+ coord hl, 0, 0
+ lb bc, 4, 5
+ call TextBoxBorder
+ ld de, Text_f5791
+ coord hl, 1, 2
+ call PlaceString
+ coord hl, 8, 0
+ lb bc, 8, 10
+ call TextBoxBorder
+ coord hl, 10, 2
+ ld de, Text_f579c
+ call PlaceString
+ coord hl, 0, 10
+ lb bc, 6, 18
+ call TextBoxBorder
+ call UpdateSprites
+ xor a
+ ld [wUnusedCD37], a
+ ld [wd72d], a
+ ld [wd11e], a
+ ld hl, wTopMenuItemY
+ ld a, $2
+ ld [hli], a
+ ld a, $9
+ ld [hli], a
+ xor a
+ ld [hli], a
+ inc hl
+ ld a, $3
+ ld [hli], a
+ ld a, $3
+ ld [hli], a
+ xor a
+ ld [hl], a
+.asm_f5377
+ call Func_f56bd
+ call HandleMenuInput
+ and $3
+ add a
+ add a
+ ld b, a
+ ld a, [wCurrentMenuItem]
+ cp $3
+ jr nz, .asm_f5390
+ bit 2, b
+ jr z, .asm_f5390
+ dec a
+ ld b, $8
+.asm_f5390
+ add b
+ add $c0
+ ld [wLinkMenuSelectionSendBuffer], a
+ ld [wLinkMenuSelectionSendBuffer+1], a
+.asm_f5399
+ ld hl, wLinkMenuSelectionSendBuffer
+ ld a, [hl]
+ ldh [hSerialSendData], a
+ call Serial_ExchangeByte
+ push af
+ ld hl, wLinkMenuSelectionSendBuffer
+ ld a, [hl]
+ ldh [hSerialSendData], a
+ call Serial_ExchangeByte
+ pop bc
+ cp b
+ jr nz, .asm_f5399
+ and $f0
+ cp $c0
+ jr nz, .asm_f5399
+ ld a, b
+ and $c
+ jr nz, .asm_f53c4
+ ld a, [wLinkMenuSelectionSendBuffer]
+ and $c
+ jr z, .asm_f5377
+ jr .asm_f53df
+.asm_f53c4
+ ld a, [wLinkMenuSelectionSendBuffer]
+ and $c
+ jr z, .asm_f53d1
+ ldh a, [hSerialConnectionStatus]
+ cp $2
+ jr z, .asm_f53df
+.asm_f53d1
+ ld a, $1
+ ld [wd11e], a
+ ld a, b
+ ld [wLinkMenuSelectionSendBuffer], a
+ and $3
+ ld [wCurrentMenuItem], a
+.asm_f53df
+ call DelayFrame
+ call DelayFrame
+ ld hl, wLinkMenuSelectionSendBuffer
+ ld a, [hl]
+ ldh [hSerialSendData], a
+ call Serial_ExchangeByte
+ call Serial_ExchangeByte
+ ld b, $14
+.loop
+ call DelayFrame
+ call Serial_SendZeroByte
+ dec b
+ jr nz, .loop
+ ld b, " "
+ ld c, " "
+ ld d, " "
+ ld e, "▷"
+ ld a, [wLinkMenuSelectionSendBuffer]
+ bit 3, a
+ jr nz, .asm_f541a
+ ld b, e
+ ld e, c
+ ld a, [wCurrentMenuItem]
+ and a
+ jr z, .asm_f541a
+ ld c, b
+ ld b, d
+ dec a
+ jr z, .asm_f541a
+ ld d, c
+ ld c, b
+.asm_f541a
+ ld a, b
+ ldcoord_a 9, 2
+ ld a, c
+ ldcoord_a 9, 4
+ ld a, d
+ ldcoord_a 9, 6
+ ld a, e
+ ldcoord_a 9, 8
+ ld c, 40
+ call DelayFrames
+ ld a, [wLinkMenuSelectionSendBuffer]
+ bit 3, a
+ jr nz, asm_f547f
+ ld a, [wCurrentMenuItem]
+ cp $3
+ jr z, asm_f547f
+ inc a
+ ld [wUnknownSerialFlag_d499], a
+ ld a, [wCurrentMenuItem]
+ ld hl, PointerTable_f5488
+ ld c, a
+ ld b, $0
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, .returnaddress
+ push de
+ jp hl
+.returnaddress
+ ld [wLinkMenuSelectionSendBuffer], a
+ xor a
+ ld [wUnknownSerialCounter], a
+ ld [wUnknownSerialCounter+1], a
+ call Serial_SyncAndExchangeNybble
+ ld a, [wLinkMenuSelectionSendBuffer]
+ and a
+ jr nz, asm_f547c
+ ld a, [wLinkMenuSelectionReceiveBuffer]
+ and a
+ jr nz, Func_f5476
+ xor a
+ ld [wUnknownSerialCounter], a
+ ld [wUnknownSerialCounter+1], a
+ and a
+ ret
+
+Func_f5476::
+ ld hl, ColosseumIneligibleText
+ call PrintText
+asm_f547c::
+ jp Func_f531b
+
+asm_f547f::
+ xor a
+ ld [wUnknownSerialCounter], a
+ ld [wUnknownSerialCounter+1], a
+ scf
+ ret
+
+PointerTable_f5488::
+ dw PokeCup
+ dw PikaCup
+ dw PetitCup
+
+PokeCup::
+ ld hl, wPartyCount
+ ld a, [hli]
+ cp $3
+ jp nz, NotThreeMonsInParty
+ ld b, $3
+.loop
+ ld a, [hli]
+ cp MEW
+ jp z, MewInParty
+ dec b
+ jr nz, .loop
+ dec hl
+ dec hl
+ cp [hl] ; is third mon second mon?
+ jp z, DuplicateSpecies
+ dec hl ; wPartySpecies
+ cp [hl] ; is third mon first mon?
+ jp z, DuplicateSpecies
+ ld a, [hli]
+ cp [hl] ; is first mon second mon?
+ jp z, DuplicateSpecies
+ ld a, [wPartyMon1Level]
+ cp 56
+ jp nc, LevelAbove55
+ cp 50
+ jp c, LevelUnder50
+ ld b, a
+ ld a, [wPartyMon2Level]
+ cp 56
+ jp nc, LevelAbove55
+ cp 50
+ jp c, LevelUnder50
+ ld c, a
+ ld a, [wPartyMon3Level]
+ cp 56
+ jp nc, LevelAbove55
+ cp 50
+ jp c, LevelUnder50
+ add b
+ add c
+ cp 156
+ jp nc, CombinedLevelsGreaterThan155
+ xor a
+ ret
+
+PikaCup::
+ ld hl, wPartyCount
+ ld a, [hli]
+ cp $3
+ jp nz, NotThreeMonsInParty
+ ld b, $3
+.loop
+ ld a, [hli] ; wPartySpecies
+ cp MEW
+ jp z, MewInParty
+ dec b
+ jr nz, .loop
+ dec hl
+ dec hl
+ cp [hl] ; is third mon second mon?
+ jp z, DuplicateSpecies
+ dec hl ; wPartySpecies
+ cp [hl] ; is third mon first mon?
+ jp z, DuplicateSpecies
+ ld a, [hli]
+ cp [hl] ; is first mon second mon?
+ jp z, DuplicateSpecies
+ ld a, [wPartyMon1Level]
+ cp 21
+ jp nc, LevelAbove20
+ cp 15
+ jp c, LevelUnder15
+ ld b, a
+ ld a, [wPartyMon2Level]
+ cp 21
+ jp nc, LevelAbove20
+ cp 15
+ jp c, LevelUnder15
+ ld c, a
+ ld a, [wPartyMon3Level]
+ cp 21
+ jp nc, LevelAbove20
+ cp 15
+ jp c, LevelUnder15
+ add b
+ add c
+ cp 51
+ jp nc, CombinedLevelsAbove50
+ xor a
+ ret
+
+PetitCup::
+ ld hl, wPartyCount
+ ld a, [hli]
+ cp $3
+ jp nz, NotThreeMonsInParty
+ ld b, $3
+.loop
+ ld a, [hli]
+ cp MEW
+ jp z, MewInParty
+ dec b
+ jr nz, .loop
+ dec hl
+ dec hl
+ cp [hl] ; is third mon second mon?
+ jp z, DuplicateSpecies
+ dec hl ; wPartySpecies
+ cp [hl] ; is third mon first mon?
+ jp z, DuplicateSpecies
+ ld a, [hli]
+ cp [hl] ; is first mon second mon?
+ jp z, DuplicateSpecies
+ dec hl
+ ld a, [hl]
+ ld [wcf91], a
+ push hl
+ callfar Func_3b10f
+ pop hl
+ jp c, asm_f56ad
+ inc hl
+ ld a, [hl]
+ ld [wcf91], a
+ push hl
+ callfar Func_3b10f
+ pop hl
+ jp c, asm_f56ad
+ inc hl
+ ld a, [hl]
+ ld [wcf91], a
+ push hl
+ callfar Func_3b10f
+ pop hl
+ jp c, asm_f56ad
+ dec hl
+ dec hl
+ ld b, $3
+.bigloop
+ ld a, [hli]
+ push hl
+ push bc
+ push af
+ dec a
+ ld c, a
+ ld b, $0
+ ld hl, PokedexEntryPointers
+ add hl, bc
+ add hl, bc
+ ld de, wcd6d
+ ld bc, $2
+ ld a, BANK(PokedexEntryPointers)
+ call FarCopyData
+ ld hl, wcd6d
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, wcd6d
+ ld bc, $14
+ ld a, BANK(PokedexEntryPointers)
+ call FarCopyData
+ ld hl, wcd6d
+.loop2
+ ld a, [hli]
+ cp "@"
+ jr nz, .loop2
+ ld a, [hli]
+ cp $7
+ jp nc, asm_f5689
+ add a
+ add a
+ ld b, a
+ add a
+ add b
+ ld b, a
+ ld a, [hli]
+ add b
+ cp $51
+ jp nc, asm_f5689
+ ld a, [hli]
+ sub $b9
+ ld a, [hl]
+ sbc $1
+ jp nc, asm_f569b
+ pop af
+ pop bc
+ pop hl
+ dec b
+ jr nz, .bigloop
+ ld a, [wPartyMon1Level]
+ cp 31
+ jp nc, LevelAbove30
+ cp 25
+ jp c, LevelUnder25
+ ld b, a
+ ld a, [wPartyMon2Level]
+ cp 31
+ jp nc, LevelAbove30
+ cp 25
+ jp c, LevelUnder25
+ ld c, a
+ ld a, [wPartyMon3Level]
+ cp 31
+ jp nc, LevelAbove30
+ cp 25
+ jp c, LevelUnder25
+ add b
+ add c
+ cp 81
+ jp nc, CombinedLevelsAbove80
+ xor a
+ ret
+
+NotThreeMonsInParty::
+ ld hl, Colosseum3MonsText
+ call PrintText
+ ld a, $1
+ ret
+
+MewInParty::
+ ld hl, ColosseumMewText
+ call PrintText
+ ld a, $2
+ ret
+
+DuplicateSpecies::
+ ld hl, ColosseumDifferentMonsText
+ call PrintText
+ ld a, $3
+ ret
+
+LevelAbove55::
+ ld hl, ColosseumMaxL55Text
+ call PrintText
+ ld a, $4
+ ret
+
+LevelUnder50::
+ ld hl, ColosseumMinL50Text
+ call PrintText
+ ld a, $5
+ ret
+
+CombinedLevelsGreaterThan155::
+ ld hl, ColosseumTotalL155Text
+ call PrintText
+ ld a, $6
+ ret
+
+LevelAbove30::
+ ld hl, ColosseumMaxL30Text
+ call PrintText
+ ld a, $7
+ ret
+
+LevelUnder25::
+ ld hl, ColosseumMinL25Text
+ call PrintText
+ ld a, $8
+ ret
+
+CombinedLevelsAbove80::
+ ld hl, ColosseumTotalL80Text
+ call PrintText
+ ld a, $9
+ ret
+
+LevelAbove20::
+ ld hl, ColosseumMaxL20Text
+ call PrintText
+ ld a, $a
+ ret
+
+LevelUnder15::
+ ld hl, ColosseumMinL15Text
+ call PrintText
+ ld a, $b
+ ret
+
+CombinedLevelsAbove50::
+ ld hl, ColosseumTotalL50Text
+ call PrintText
+ ld a, $c
+ ret
+
+asm_f5689::
+ pop af
+ pop bc
+ pop hl
+ ld [wd11e], a
+ call GetMonName
+ ld hl, ColosseumHeightText
+ call PrintText
+ ld a, $d
+ ret
+
+asm_f569b::
+ pop af
+ pop bc
+ pop hl
+ ld [wd11e], a
+ call GetMonName
+ ld hl, ColosseumWeightText
+ call PrintText
+ ld a, $e
+ ret
+
+asm_f56ad::
+ ld a, [hl]
+ ld [wd11e], a
+ call GetMonName
+ ld hl, ColosseumEvolvedText
+ call PrintText
+ ld a, $f
+ ret
+
+Func_f56bd::
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ coord hl, 1, 11
+ lb bc, 6, 18
+ call ClearScreenArea
+ ld a, [wCurrentMenuItem]
+ cp $3
+ jr nc, .asm_f56e6
+ ld hl, PointerTable_f56ee
+ ld a, [wCurrentMenuItem]
+ ld c, a
+ ld b, $0
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld d, h
+ ld e, l
+ coord hl, 1, 12
+ call PlaceString
+.asm_f56e6
+ call Delay3
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ ret
+
+PointerTable_f56ee::
+ dw Text_f56f4
+ dw Text_f5728
+ dw Text_f575b
+
+Text_f56f4::
+ db "LVs of 3<PKMN>:50-55"
+ next "Sum of LVs:155 MAX"
+ next "MEW can't attend.@"
+
+Text_f5728::
+ db "LVs of 3<PKMN>:15-20"
+ next "Sum of LVs:50 MAX"
+ next "MEW can't attend.@"
+
+Text_f575b::
+ db "3 Basic <PKMN>.LV25-30"
+ next "Sum of LVs:80 MAX"
+ next "6’8” and 44lb MAX@"
+
+Text_f5791::
+ db "View"
+ next "Rules@"
+
+Text_f579c::
+ db "# Cup"
+ next "Pika Cup"
+ next "Petit Cup"
+ next "CANCEL@"
+
+Colosseum3MonsText::
+ text_far _Colosseum3MonsText
+ text_end
+
+ColosseumMewText::
+ text_far _ColosseumMewText
+ text_end
+
+ColosseumDifferentMonsText::
+ text_far _ColosseumDifferentMonsText
+ text_end
+
+ColosseumMaxL55Text::
+ text_far _ColosseumMaxL55Text
+ text_end
+
+ColosseumMinL50Text::
+ text_far _ColosseumMinL50Text
+ text_end
+
+ColosseumTotalL155Text::
+ text_far _ColosseumTotalL155Text
+ text_end
+
+ColosseumMaxL30Text::
+ text_far _ColosseumMaxL30Text
+ text_end
+
+ColosseumMinL25Text::
+ text_far _ColosseumMinL25Text
+ text_end
+
+ColosseumTotalL80Text::
+ text_far _ColosseumTotalL80Text
+ text_end
+
+ColosseumMaxL20Text::
+ text_far _ColosseumMaxL20Text
+ text_end
+
+ColosseumMinL15Text::
+ text_far _ColosseumMinL15Text
+ text_end
+
+ColosseumTotalL50Text::
+ text_far _ColosseumTotalL50Text
+ text_end
+
+ColosseumHeightText::
+ text_far _ColosseumHeightText
+ text_end
+
+ColosseumWeightText::
+ text_far _ColosseumWeightText
+ text_end
+
+ColosseumEvolvedText::
+ text_far _ColosseumEvolvedText
+ text_end
+
+ColosseumIneligibleText::
+ text_far _ColosseumIneligibleText
+ text_end
+
+LinkMenu:
+ xor a
+ ld [wLetterPrintingDelayFlags], a
+ ld hl, wd72e
+ set 6, [hl]
+ ld hl, TextTerminator_f5a16
+ call PrintText
+ call SaveScreenTilesToBuffer1
+ ld hl, ColosseumWhereToText
+ call PrintText
+ hlcoord 5, 3
+ lb bc, 8, 13
+ call TextBoxBorder
+ call UpdateSprites
+ hlcoord 7, 5
+ ld de, TradeCenterText
+ call PlaceString
+ xor a
+ ld [wUnusedCD37], a
+ ld [wd72d], a
+ ld [wd11e], a
+ ld hl, wTopMenuItemY
+ ld a, $5
+ ld [hli], a
+ ld a, $6
+ ld [hli], a
+ xor a
+ ld [hli], a
+ inc hl
+ ld a, $3
+ ld [hli], a
+ ld [hli], a
+ xor a
+ ld [hl], a
+.waitForInputLoop
+ call HandleMenuInput
+ and A_BUTTON | B_BUTTON
+ add a
+ add a
+ ld b, a
+ ld a, [wCurrentMenuItem]
+ cp $3
+ jr nz, .asm_f586b
+ bit 2, b
+ jr z, .asm_f586b
+ dec a
+ ld b, $8
+.asm_f586b
+ add b
+ add $d0
+ ld [wLinkMenuSelectionSendBuffer], a
+ ld [wLinkMenuSelectionSendBuffer + 1], a
+.exchangeMenuSelectionLoop
+ call Serial_ExchangeLinkMenuSelection
+ ld a, [wLinkMenuSelectionReceiveBuffer]
+ ld b, a
+ and $f0
+ cp $d0
+ jr z, .asm_f5c7d
+ ld a, [wLinkMenuSelectionReceiveBuffer + 1]
+ ld b, a
+ and $f0
+ cp $d0
+ jr nz, .exchangeMenuSelectionLoop
+.asm_f5c7d
+ ld a, b
+ and $c ; did the enemy press A or B?
+ jr nz, .enemyPressedAOrB
+; the enemy didn't press A or B
+ ld a, [wLinkMenuSelectionSendBuffer]
+ and $c ; did the player press A or B?
+ jr z, .waitForInputLoop ; if neither the player nor the enemy pressed A or B, try again
+ jr .doneChoosingMenuSelection ; if the player pressed A or B but the enemy didn't, use the player's selection
+.enemyPressedAOrB
+ ld a, [wLinkMenuSelectionSendBuffer]
+ and $c ; did the player press A or B?
+ jr z, .useEnemyMenuSelection ; if the enemy pressed A or B but the player didn't, use the enemy's selection
+; the enemy and the player both pressed A or B
+; The gameboy that is clocking the connection wins.
+ ldh a, [hSerialConnectionStatus]
+ cp USING_INTERNAL_CLOCK
+ jr z, .doneChoosingMenuSelection
+.useEnemyMenuSelection
+ ld a, $1
+ ld [wd11e], a
+ ld a, b
+ ld [wLinkMenuSelectionSendBuffer], a
+ and $3
+ ld [wCurrentMenuItem], a ; wCurrentMenuItem
+.doneChoosingMenuSelection
+ ldh a, [hSerialConnectionStatus]
+ cp USING_INTERNAL_CLOCK
+ jr nz, .skipStartingTransfer
+ call DelayFrame
+ call DelayFrame
+ ld a, START_TRANSFER_INTERNAL_CLOCK
+ ldh [rSC], a
+.skipStartingTransfer
+ ld b, " "
+ ld c, " "
+ ld d, " "
+ ld e, "▷"
+ ld a, [wLinkMenuSelectionSendBuffer]
+ and (B_BUTTON << 2) ; was B button pressed?
+ jr nz, .updateCursorPosition
+; A button was pressed
+ ld a, [wCurrentMenuItem]
+ cp $2
+ jp z, .asm_f5963
+ ld b, e
+ ld e, c
+ ld a, [wCurrentMenuItem]
+ and a
+ jr z, .updateCursorPosition
+ ld c, b
+ ld b, d
+ dec a
+ jr z, .updateCursorPosition
+ ld d, c
+ ld c, b
+.updateCursorPosition
+ call Func_f59ec
+ call LoadScreenTilesFromBuffer1
+ ld a, [wLinkMenuSelectionSendBuffer]
+ and (B_BUTTON << 2) ; was B button pressed?
+ jr nz, .choseCancel ; cancel if B pressed
+ ld a, [wCurrentMenuItem]
+ cp $2
+ jr z, .choseCancel
+ xor a
+ ld [wWalkBikeSurfState], a ; start walking
+ ld a, [wCurrentMenuItem]
+ and a
+ ld a, COLOSSEUM
+ jr nz, .next
+ ld a, TRADE_CENTER
+.next
+ ld [wd72d], a
+ ld hl, ColosseumPleaseWaitText
+ call PrintText
+ ld c, 50
+ call DelayFrames
+ ld hl, wd732
+ res 1, [hl]
+ ld a, [wDefaultMap]
+ ld [wDestinationMap], a
+ callfar SpecialWarpIn
+ ld c, 20
+ call DelayFrames
+ xor a
+ ld [wMenuJoypadPollCount], a
+ ld [wSerialExchangeNybbleSendData], a
+ inc a ; LINK_STATE_IN_CABLE_CLUB
+ ld [wLinkState], a
+ ld [wEnteringCableClub], a
+ jpfar SpecialEnterMap
+.choseCancel
+ xor a
+ ld [wMenuJoypadPollCount], a
+ call Delay3
+ callfar CloseLinkConnection
+ ld hl, ColosseumCanceledText
+ call PrintText
+ ld hl, wd72e
+ res 6, [hl]
+ ret
+
+.asm_f5963
+ ld a, [wd11e]
+ and a
+ jr nz, .asm_f5974
+ ld b, " "
+ ld c, " "
+ ld d, "▷"
+ ld e, " "
+ call Func_f59ec
+.asm_f5974
+ xor a
+ ld [wBuffer], a
+ ld a, $ff
+ ld [wSerialExchangeNybbleReceiveData], a
+ ld a, $b
+ ld [wLinkMenuSelectionSendBuffer], a
+ ld b, $78
+.loop
+ ldh a, [hSerialConnectionStatus]
+ cp $2
+ call z, DelayFrame
+ dec b
+ jr z, .asm_f59b2
+ call Serial_ExchangeNybble
+ call DelayFrame
+ ld a, [wSerialExchangeNybbleReceiveData]
+ inc a
+ jr z, .loop
+ ld b, $f
+.loop2
+ call DelayFrame
+ call Serial_ExchangeNybble
+ dec b
+ jr nz, .loop2
+ ld b, $f
+.loop3
+ call DelayFrame
+ call Serial_SendZeroByte
+ dec b
+ jr nz, .loop3
+ jr .asm_f59d6
+
+.asm_f59b2
+ xor a
+ ld [wUnknownSerialCounter], a
+ ld [wUnknownSerialCounter+1], a
+ ld a, [wd11e]
+ and a
+ jr z, .asm_f59cd
+ ld b, " "
+ ld c, " "
+ ld d, " "
+ ld e, "▷"
+ call Func_f59ec
+ jp .choseCancel
+
+.asm_f59cd
+ ld hl, ColosseumVersionText
+ call PrintText
+ jp .choseCancel
+
+.asm_f59d6
+ ld b, " "
+ ld c, " "
+ ld d, "▷"
+ ld e, " "
+ call Func_f59ec
+ call Func_f531b
+ jp c, .choseCancel
+ ld a, $f0
+ jp .next
+
+Func_f59ec::
+ ld a, b
+ ldcoord_a 6, 5
+ ld a, c
+ ldcoord_a 6, 7
+ ld a, d
+ ldcoord_a 6, 9
+ ld a, e
+ ldcoord_a 6, 11
+ ld c, 40
+ call DelayFrames
+ ret
+
+ColosseumWhereToText:
+ text_far _ColosseumWhereToText
+ text_end
+
+ColosseumPleaseWaitText:
+ text_far _ColosseumPleaseWaitText
+ text_end
+
+ColosseumCanceledText:
+ text_far _ColosseumCanceledText
+ text_end
+
+ColosseumVersionText:
+ text_far _ColosseumVersionText
+ text_end
+
+TextTerminator_f5a16:
+ text_end
+
+TradeCenterText:
+ db "TRADE CENTER"
+ next "COLOSSEUM"
+ next "COLOSSEUM2"
+ next "CANCEL@"
diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm
new file mode 100755
index 00000000..7d81d2f6
--- /dev/null
+++ b/engine/menus/main_menu.asm
@@ -0,0 +1,300 @@
+MainMenu:
+; Check save file
+ call InitOptions
+ xor a
+ ld [wOptionsInitialized], a
+ inc a
+ ld [wSaveFileStatus], a
+ call CheckForPlayerNameInSRAM
+ jr nc, .mainMenuLoop
+
+ predef LoadSAV
+
+.mainMenuLoop
+ ld c, 20
+ call DelayFrames
+ xor a ; LINK_STATE_NONE
+ ld [wLinkState], a
+ ld hl, wPartyAndBillsPCSavedMenuItem
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+ ld [wDefaultMap], a
+ ld hl, wd72e
+ res 6, [hl]
+ call ClearScreen
+ call RunDefaultPaletteCommand
+ call LoadTextBoxTilePatterns
+ call LoadFontTilePatterns
+ ld hl, wd730
+ set 6, [hl]
+ ld a, [wSaveFileStatus]
+ cp 1
+ jr z, .noSaveFile
+; there's a save file
+ hlcoord 0, 0
+ lb bc, 6, 13
+ call TextBoxBorder
+ hlcoord 2, 2
+ ld de, ContinueText
+ call PlaceString
+ jr .next2
+.noSaveFile
+ hlcoord 0, 0
+ lb bc, 4, 13
+ call TextBoxBorder
+ hlcoord 2, 2
+ ld de, NewGameText
+ call PlaceString
+.next2
+ ld hl, wd730
+ res 6, [hl]
+ call UpdateSprites
+ xor a
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ ld [wMenuJoypadPollCount], a
+ inc a
+ ld [wTopMenuItemX], a
+ inc a
+ ld [wTopMenuItemY], a
+ ld a, A_BUTTON | B_BUTTON | START
+ ld [wMenuWatchedKeys], a
+ ld a, [wSaveFileStatus]
+ ld [wMaxMenuItem], a
+ call HandleMenuInput
+ bit 1, a ; pressed B?
+ jp nz, DisplayTitleScreen ; if so, go back to the title screen
+ ld c, 20
+ call DelayFrames
+ ld a, [wCurrentMenuItem]
+ ld b, a
+ ld a, [wSaveFileStatus]
+ cp 2
+ jp z, .skipInc
+; If there's no save file, increment the current menu item so that the numbers
+; are the same whether or not there's a save file.
+ inc b
+.skipInc
+ ld a, b
+ and a
+ jr z, .choseContinue
+ cp 1
+ jp z, StartNewGame
+ call DisplayOptionMenu
+ ld a, 1
+ ld [wOptionsInitialized], a
+ jp .mainMenuLoop
+.choseContinue
+ call DisplayContinueGameInfo
+ ld hl, wCurrentMapScriptFlags
+ set 5, [hl]
+.inputLoop
+ xor a
+ ldh [hJoyPressed], a
+ ldh [hJoyReleased], a
+ ldh [hJoyHeld], a
+ call Joypad
+ ldh a, [hJoyHeld]
+ bit 0, a
+ jr nz, .pressedA
+ bit 1, a
+ jp nz, .mainMenuLoop ; pressed B
+ jr .inputLoop
+.pressedA
+ call GBPalWhiteOutWithDelay3
+ call ClearScreen
+ ld a, PLAYER_DIR_DOWN
+ ld [wPlayerDirection], a
+ ld c, 10
+ call DelayFrames
+ ld a, [wNumHoFTeams]
+ and a
+ jp z, SpecialEnterMap
+ ld a, [wCurMap] ; map ID
+ cp HALL_OF_FAME
+ jp nz, SpecialEnterMap
+ xor a
+ ld [wDestinationMap], a
+ ld hl, wd732
+ set 2, [hl] ; fly warp or dungeon warp
+ call SpecialWarpIn
+ jp SpecialEnterMap
+
+InitOptions:
+ ld a, 1 ; no delay
+ ld [wLetterPrintingDelayFlags], a
+ ld a, 3 ; medium speed
+ ld [wOptions], a
+ ld a, 64 ; audio?
+ ld [wPrinterSettings], a
+ ret
+
+Func_5cc1:
+; unused?
+ ld a, $6d
+ cp $80
+ ret c ; will always be executed
+ ld hl, NotEnoughMemoryText
+ call PrintText
+ ret
+
+NotEnoughMemoryText:
+ text_far _NotEnoughMemoryText
+ text_end
+
+StartNewGame:
+ ld hl, wd732
+ res 1, [hl]
+StartNewGameDebug:
+ call OakSpeech
+ ld a, $8
+ ld [wPlayerMovingDirection], a
+ ld c, 20
+ call DelayFrames
+
+; enter map after using a special warp or loading the game from the main menu
+SpecialEnterMap::
+ xor a
+ ldh [hJoyPressed], a
+ ldh [hJoyHeld], a
+ ldh [hJoy5], a
+ ld [wd72d], a
+ ld hl, wd732
+ set 0, [hl] ; count play time
+ call ResetPlayerSpriteData
+ ld c, 20
+ call DelayFrames
+ call Func_5cc1
+ ld a, [wEnteringCableClub]
+ and a
+ ret nz
+ jp EnterMap
+
+ContinueText:
+ db "CONTINUE"
+ next ""
+ ; fallthrough
+
+NewGameText:
+ db "NEW GAME"
+ next "OPTION@"
+
+DisplayContinueGameInfo:
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ hlcoord 4, 7
+ lb bc, 8, 14
+ call TextBoxBorder
+ hlcoord 5, 9
+ ld de, SaveScreenInfoText
+ call PlaceString
+ hlcoord 12, 9
+ ld de, wPlayerName
+ call PlaceString
+ hlcoord 17, 11
+ call PrintNumBadges
+ hlcoord 16, 13
+ call PrintNumOwnedMons
+ hlcoord 13, 15
+ call PrintPlayTime
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ ld c, 30
+ jp DelayFrames
+
+PrintSaveScreenText:
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ hlcoord 4, 0
+ lb bc, 8, 14
+ call TextBoxBorder
+ call LoadTextBoxTilePatterns
+ call UpdateSprites
+ hlcoord 5, 2
+ ld de, SaveScreenInfoText
+ call PlaceString
+ hlcoord 12, 2
+ ld de, wPlayerName
+ call PlaceString
+ hlcoord 17, 4
+ call PrintNumBadges
+ hlcoord 16, 6
+ call PrintNumOwnedMons
+ hlcoord 13, 8
+ call PrintPlayTime
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ ld c, 30
+ jp DelayFrames
+
+PrintNumBadges:
+ push hl
+ ld hl, wObtainedBadges
+ ld b, $1
+ call CountSetBits
+ pop hl
+ ld de, wNumSetBits
+ lb bc, 1, 2
+ jp PrintNumber
+
+PrintNumOwnedMons:
+ push hl
+ ld hl, wPokedexOwned
+ ld b, wPokedexOwnedEnd - wPokedexOwned
+ call CountSetBits
+ pop hl
+ ld de, wNumSetBits
+ lb bc, 1, 3
+ jp PrintNumber
+
+PrintPlayTime:
+ ld de, wPlayTimeHours
+ lb bc, 1, 3
+ call PrintNumber
+ ld [hl], $6d
+ inc hl
+ ld de, wPlayTimeMinutes
+ lb bc, LEADING_ZEROES | 1, 2
+ jp PrintNumber
+
+SaveScreenInfoText:
+ db "PLAYER"
+ next "BADGES "
+ next "#DEX "
+ next "TIME@"
+
+DisplayOptionMenu:
+ callfar DisplayOptionMenu_
+ ret
+
+CheckForPlayerNameInSRAM:
+; Check if the player name data in SRAM has a string terminator character
+; (indicating that a name may have been saved there) and return whether it does
+; in carry.
+ ld a, SRAM_ENABLE
+ ld [MBC1SRamEnable], a
+ ld a, $1
+ ld [MBC1SRamBankingMode], a
+ ld [MBC1SRamBank], a
+ ld b, NAME_LENGTH
+ ld hl, sPlayerName
+.loop
+ ld a, [hli]
+ cp "@"
+ jr z, .found
+ dec b
+ jr nz, .loop
+; not found
+ xor a
+ ld [MBC1SRamEnable], a
+ ld [MBC1SRamBankingMode], a
+ and a
+ ret
+.found
+ xor a
+ ld [MBC1SRamEnable], a
+ ld [MBC1SRamBankingMode], a
+ scf
+ ret
diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm
new file mode 100755
index 00000000..553c47d0
--- /dev/null
+++ b/engine/menus/naming_screen.asm
@@ -0,0 +1,508 @@
+AskName:
+ call SaveScreenTilesToBuffer1
+ call GetPredefRegisters
+ push hl
+ ld a, [wIsInBattle]
+ dec a
+ hlcoord 0, 0
+ lb bc, 4, 11
+ call z, ClearScreenArea ; only if in wild battle
+ ld a, [wcf91]
+ ld [wd11e], a
+ call GetMonName
+ ld hl, DoYouWantToNicknameText
+ call PrintText
+ hlcoord 14, 7
+ lb bc, 8, 15
+ ld a, TWO_OPTION_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ pop hl
+ ld a, [wCurrentMenuItem]
+ and a
+ jr nz, .declinedNickname
+ ld a, [wUpdateSpritesEnabled]
+ push af
+ xor a
+ ld [wUpdateSpritesEnabled], a
+ push hl
+ ld a, NAME_MON_SCREEN
+ ld [wNamingScreenType], a
+ call DisplayNamingScreen
+ ld a, [wIsInBattle]
+ and a
+ jr nz, .inBattle
+ call ReloadMapSpriteTilePatterns
+.inBattle
+ call LoadScreenTilesFromBuffer1
+ pop hl
+ pop af
+ ld [wUpdateSpritesEnabled], a
+ ld a, [wcf4b]
+ cp "@"
+ ret nz
+.declinedNickname
+ ld d, h
+ ld e, l
+ ld hl, wcd6d
+ ld bc, NAME_LENGTH
+ jp CopyData
+
+DoYouWantToNicknameText:
+ text_far _DoYouWantToNicknameText
+ text_end
+
+DisplayNameRaterScreen::
+ ld hl, wBuffer
+ xor a
+ ld [wUpdateSpritesEnabled], a
+ ld a, NAME_MON_SCREEN
+ ld [wNamingScreenType], a
+ call DisplayNamingScreen
+ call GBPalWhiteOutWithDelay3
+ call RestoreScreenTilesAndReloadTilePatterns
+ call LoadGBPal
+ ld a, [wcf4b]
+ cp "@"
+ jr z, .playerCancelled
+ ld hl, wPartyMonNicks
+ ld bc, NAME_LENGTH
+ ld a, [wWhichPokemon]
+ call AddNTimes
+ ld e, l
+ ld d, h
+ ld hl, wBuffer
+ ld bc, NAME_LENGTH
+ call CopyData
+ and a
+ ret
+.playerCancelled
+ scf
+ ret
+
+DisplayNamingScreen:
+ push hl
+ ld hl, wd730
+ set 6, [hl]
+ call GBPalWhiteOutWithDelay3
+ call ClearScreen
+ call UpdateSprites
+ ld b, SET_PAL_GENERIC
+ call RunPaletteCommand
+ call LoadHpBarAndStatusTilePatterns
+ call LoadEDTile
+ farcall LoadMonPartySpriteGfx
+ hlcoord 0, 4
+ lb bc, 9, 18
+ call TextBoxBorder
+ call PrintNamingText
+ ld a, 3
+ ld [wTopMenuItemY], a
+ ld a, 1
+ ld [wTopMenuItemX], a
+ ld [wLastMenuItem], a
+ ld [wCurrentMenuItem], a
+ ld a, $ff
+ ld [wMenuWatchedKeys], a
+ ld a, 7
+ ld [wMaxMenuItem], a
+ ld a, "@"
+ ld [wcf4b], a
+ xor a
+ ld hl, wNamingScreenSubmitName
+ ld [hli], a
+ ld [hli], a
+ ld [wAnimCounter], a
+.selectReturnPoint
+ call PrintAlphabet
+ call GBPalNormal
+.ABStartReturnPoint
+ ld a, [wNamingScreenSubmitName]
+ and a
+ jr nz, .submitNickname
+ call PrintNicknameAndUnderscores
+.dPadReturnPoint
+ call PlaceMenuCursor
+.inputLoop
+ ld a, [wCurrentMenuItem]
+ push af
+ farcall AnimatePartyMon_ForceSpeed1
+ pop af
+ ld [wCurrentMenuItem], a
+ call JoypadLowSensitivity
+ ldh a, [hJoyPressed]
+ and a
+ jr z, .inputLoop
+ ld hl, .namingScreenButtonFunctions
+.checkForPressedButton
+ sla a
+ jr c, .foundPressedButton
+ inc hl
+ inc hl
+ inc hl
+ inc hl
+ jr .checkForPressedButton
+.foundPressedButton
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ push de
+ jp hl
+
+.submitNickname
+ pop de
+ ld hl, wcf4b
+ ld bc, NAME_LENGTH
+ call CopyData
+ call GBPalWhiteOutWithDelay3
+ call ClearScreen
+ call ClearSprites
+ call RunDefaultPaletteCommand
+ call GBPalNormal
+ xor a
+ ld [wAnimCounter], a
+ ld hl, wd730
+ res 6, [hl]
+ ld a, [wIsInBattle]
+ and a
+ jp z, LoadTextBoxTilePatterns
+ jpfar LoadHudTilePatterns
+
+.namingScreenButtonFunctions
+ dw .dPadReturnPoint
+ dw .pressedDown
+ dw .dPadReturnPoint
+ dw .pressedUp
+ dw .dPadReturnPoint
+ dw .pressedLeft
+ dw .dPadReturnPoint
+ dw .pressedRight
+ dw .ABStartReturnPoint
+ dw .pressedStart
+ dw .selectReturnPoint
+ dw .pressedSelect
+ dw .ABStartReturnPoint
+ dw .pressedB
+ dw .ABStartReturnPoint
+ dw .pressedA
+
+.pressedA_changedCase
+ pop de
+ ld de, .selectReturnPoint
+ push de
+.pressedSelect
+ ld a, [wAlphabetCase]
+ xor $1
+ ld [wAlphabetCase], a
+ ret
+
+.pressedStart
+ ld a, 1
+ ld [wNamingScreenSubmitName], a
+ ret
+
+.pressedA
+ ld a, [wCurrentMenuItem]
+ cp $5 ; "ED" row
+ jr nz, .didNotPressED
+ ld a, [wTopMenuItemX]
+ cp $11 ; "ED" column
+ jr z, .pressedStart
+.didNotPressED
+ ld a, [wCurrentMenuItem]
+ cp $6 ; case switch row
+ jr nz, .didNotPressCaseSwtich
+ ld a, [wTopMenuItemX]
+ cp $1 ; case switch column
+ jr z, .pressedA_changedCase
+.didNotPressCaseSwtich
+ ld hl, wMenuCursorLocation
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ inc hl
+ ld a, [hl]
+ ld [wNamingScreenLetter], a
+ call CalcStringLength
+ ld a, [wNamingScreenLetter]
+ cp "゙"
+ ld de, Dakutens
+ jr z, .dakutensAndHandakutens
+ cp "゚"
+ ld de, Handakutens
+ jr z, .dakutensAndHandakutens
+ ld a, [wNamingScreenType]
+ cp NAME_MON_SCREEN
+ jr nc, .checkMonNameLength
+ ld a, [wNamingScreenNameLength]
+ cp $7 ; max length of player/rival names
+ jr .checkNameLength
+.checkMonNameLength
+ ld a, [wNamingScreenNameLength]
+ cp $a ; max length of pokemon nicknames
+.checkNameLength
+ jr c, .addLetter
+ ret
+
+.dakutensAndHandakutens
+ push hl
+ call DakutensAndHandakutens
+ pop hl
+ ret nc
+ dec hl
+.addLetter
+ ld a, [wNamingScreenLetter]
+ ld [hli], a
+ ld [hl], "@"
+ ld a, SFX_PRESS_AB
+ call PlaySound
+ ret
+.pressedB
+ ld a, [wNamingScreenNameLength]
+ and a
+ ret z
+ call CalcStringLength
+ dec hl
+ ld [hl], "@"
+ ret
+.pressedRight
+ ld a, [wCurrentMenuItem]
+ cp $6
+ ret z ; can't scroll right on bottom row
+ ld a, [wTopMenuItemX]
+ cp $11 ; max
+ jp z, .wrapToFirstColumn
+ inc a
+ inc a
+ jr .done
+.wrapToFirstColumn
+ ld a, $1
+ jr .done
+.pressedLeft
+ ld a, [wCurrentMenuItem]
+ cp $6
+ ret z ; can't scroll right on bottom row
+ ld a, [wTopMenuItemX]
+ dec a
+ jp z, .wrapToLastColumn
+ dec a
+ jr .done
+.wrapToLastColumn
+ ld a, $11 ; max
+ jr .done
+.pressedUp
+ ld a, [wCurrentMenuItem]
+ dec a
+ ld [wCurrentMenuItem], a
+ and a
+ ret nz
+ ld a, $6 ; wrap to bottom row
+ ld [wCurrentMenuItem], a
+ ld a, $1 ; force left column
+ jr .done
+.pressedDown
+ ld a, [wCurrentMenuItem]
+ inc a
+ ld [wCurrentMenuItem], a
+ cp $7
+ jr nz, .wrapToTopRow
+ ld a, $1
+ ld [wCurrentMenuItem], a
+ jr .done
+.wrapToTopRow
+ cp $6
+ ret nz
+ ld a, $1
+.done
+ ld [wTopMenuItemX], a
+ jp EraseMenuCursor
+
+LoadEDTile:
+; In Red/Blue, the bank for the ED_tile was defined incorrectly as bank0
+; Luckily, the MBC3 treats loading $0 into $2000-$2fff range as loading bank1 into $4000-$7fff range
+; Because Yellow uses the MBC5, loading $0 into $2000 - $2fff range will load bank0 instead of bank1 and thus incorrectly load the tile
+; Instead of defining the correct bank, GameFreak decided to simply copy the ED_Tile in the function during HBlank
+ ld de, ED_Tile
+ ld hl, vFont tile $70
+ ld c, $4 ; number of copies needed
+.waitForHBlankLoop
+ ldh a, [rSTAT]
+ and %10 ; in HBlank?
+ jr nz, .waitForHBlankLoop
+ ld a, [de]
+ ld [hli], a
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ ld [hli], a
+ inc de
+ dec c
+ jr nz, .waitForHBlankLoop
+ ret
+
+ED_Tile:
+ INCBIN "gfx/font/ED.1bpp"
+ED_TileEnd:
+
+PrintAlphabet:
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ ld a, [wAlphabetCase]
+ and a
+ ld de, LowerCaseAlphabet
+ jr nz, .lowercase
+ ld de, UpperCaseAlphabet
+.lowercase
+ hlcoord 2, 5
+ lb bc, 5, 9 ; 5 rows, 9 columns
+.outerLoop
+ push bc
+.innerLoop
+ ld a, [de]
+ ld [hli], a
+ inc hl
+ inc de
+ dec c
+ jr nz, .innerLoop
+ ld bc, SCREEN_WIDTH + 2
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .outerLoop
+ call PlaceString
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ jp Delay3
+
+INCLUDE "data/text/alphabets.asm"
+
+PrintNicknameAndUnderscores:
+ call CalcStringLength
+ ld a, c
+ ld [wNamingScreenNameLength], a
+ hlcoord 10, 2
+ lb bc, 1, 10
+ call ClearScreenArea
+ hlcoord 10, 2
+ ld de, wcf4b
+ call PlaceString
+ hlcoord 10, 3
+ ld a, [wNamingScreenType]
+ cp NAME_MON_SCREEN
+ jr nc, .pokemon1
+ ld b, 7 ; player or rival max name length
+ jr .playerOrRival1
+.pokemon1
+ ld b, 10 ; pokemon max name length
+.playerOrRival1
+ ld a, $76 ; underscore tile id
+.placeUnderscoreLoop
+ ld [hli], a
+ dec b
+ jr nz, .placeUnderscoreLoop
+ ld a, [wNamingScreenType]
+ cp NAME_MON_SCREEN
+ ld a, [wNamingScreenNameLength]
+ jr nc, .pokemon2
+ cp 7 ; player or rival max name length
+ jr .playerOrRival2
+.pokemon2
+ cp 10 ; pokemon max name length
+.playerOrRival2
+ jr nz, .emptySpacesRemaining
+ ; when all spaces are filled, force the cursor onto the ED tile
+ call EraseMenuCursor
+ ld a, $11 ; "ED" x coord
+ ld [wTopMenuItemX], a
+ ld a, $5 ; "ED" y coord
+ ld [wCurrentMenuItem], a
+ ld a, [wNamingScreenType]
+ cp NAME_MON_SCREEN
+ ld a, 9 ; keep the last underscore raised
+ jr nc, .pokemon3
+ ld a, 6 ; keep the last underscore raised
+.pokemon3
+.emptySpacesRemaining
+ ld c, a
+ ld b, $0
+ hlcoord 10, 3
+ add hl, bc
+ ld [hl], $77 ; raised underscore tile id
+ ret
+
+DakutensAndHandakutens:
+ push de
+ call CalcStringLength
+ dec hl
+ ld a, [hl]
+ pop hl
+ ld de, $2
+ call IsInArray
+ ret nc
+ inc hl
+ ld a, [hl]
+ ld [wNamingScreenLetter], a
+ ret
+
+INCLUDE "data/text/dakutens.asm"
+
+; calculates the length of the string at wcf4b and stores it in c
+CalcStringLength:
+ ld hl, wcf4b
+ ld c, $0
+.loop
+ ld a, [hl]
+ cp "@"
+ ret z
+ inc hl
+ inc c
+ jr .loop
+
+PrintNamingText:
+ hlcoord 0, 1
+ ld a, [wNamingScreenType]
+ ld de, YourTextString
+ and a
+ jr z, .notNickname
+ ld de, RivalsTextString
+ dec a
+ jr z, .notNickname
+ ld a, [wcf91]
+ ld [wMonPartySpriteSpecies], a
+ push af
+ farcall WriteMonPartySpriteOAMBySpecies
+ pop af
+ ld [wd11e], a
+ call GetMonName
+ hlcoord 4, 1
+ call PlaceString
+ ld hl, $1
+ add hl, bc
+ ld [hl], "の" ; leftover from Japanese version; blank tile $c9 in English
+ hlcoord 1, 3
+ ld de, NicknameTextString
+ jr .placeString
+.notNickname
+ call PlaceString
+ ld l, c
+ ld h, b
+ ld de, NameTextString
+.placeString
+ jp PlaceString
+
+YourTextString:
+ db "YOUR @"
+
+RivalsTextString:
+ db "RIVAL's @"
+
+NameTextString:
+ db "NAME?@"
+
+NicknameTextString:
+ db "NICKNAME?@"
diff --git a/engine/menus/oaks_pc.asm b/engine/menus/oaks_pc.asm
new file mode 100755
index 00000000..7743e5df
--- /dev/null
+++ b/engine/menus/oaks_pc.asm
@@ -0,0 +1,28 @@
+OpenOaksPC:
+ call SaveScreenTilesToBuffer2
+ ld hl, AccessedOaksPCText
+ call PrintText
+ ld hl, GetDexRatedText
+ call PrintText
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ jr nz, .closePC
+ predef DisplayDexRating
+.closePC
+ ld hl, ClosedOaksPCText
+ call PrintText
+ jp LoadScreenTilesFromBuffer2
+
+GetDexRatedText:
+ text_far _GetDexRatedText
+ text_end
+
+ClosedOaksPCText:
+ text_far _ClosedOaksPCText
+ text_waitbutton
+ text_end
+
+AccessedOaksPCText:
+ text_far _AccessedOaksPCText
+ text_end
diff --git a/engine/menus/options.asm b/engine/menus/options.asm
new file mode 100644
index 00000000..110bef2a
--- /dev/null
+++ b/engine/menus/options.asm
@@ -0,0 +1,443 @@
+DisplayOptionMenu_:
+ call InitOptionsMenu
+.optionMenuLoop
+ call JoypadLowSensitivity
+ ldh a, [hJoy5]
+ and START | B_BUTTON
+ jr nz, .exitOptionMenu
+ call OptionsControl
+ jr c, .dpadDelay
+ call GetOptionPointer
+ jr c, .exitOptionMenu
+.dpadDelay
+ call OptionsMenu_UpdateCursorPosition
+ call DelayFrame
+ call DelayFrame
+ call DelayFrame
+ jr .optionMenuLoop
+.exitOptionMenu
+ ret
+
+GetOptionPointer:
+ ld a, [wOptionsCursorLocation]
+ ld e, a
+ ld d, $0
+ ld hl, OptionMenuJumpTable
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl ; jump to the function for the current highlighted option
+
+OptionMenuJumpTable:
+ dw OptionsMenu_TextSpeed
+ dw OptionsMenu_BattleAnimations
+ dw OptionsMenu_BattleStyle
+ dw OptionsMenu_SpeakerSettings
+ dw OptionsMenu_GBPrinterBrightness
+ dw OptionsMenu_Dummy
+ dw OptionsMenu_Dummy
+ dw OptionsMenu_Cancel
+
+OptionsMenu_TextSpeed:
+ call GetTextSpeed
+ ldh a, [hJoy5]
+ bit 4, a ; right
+ jr nz, .pressedRight
+ bit 5, a
+ jr nz, .pressedLeft
+ jr .asm_41ce0
+.pressedRight
+ ld a, c
+ cp $2
+ jr c, .asm_41cca
+ ld c, $ff
+.asm_41cca
+ inc c
+ ld a, e
+ jr .asm_41cd6
+.pressedLeft
+ ld a, c
+ and a
+ jr nz, .asm_41cd4
+ ld c, $3
+.asm_41cd4
+ dec c
+ ld a, d
+.asm_41cd6
+ ld b, a
+ ld a, [wOptions]
+ and $f0
+ or b
+ ld [wOptions], a
+.asm_41ce0
+ ld b, $0
+ ld hl, TextSpeedStringsPointerTable
+ add hl, bc
+ add hl, bc
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ hlcoord 14, 2
+ call PlaceString
+ and a
+ ret
+
+TextSpeedStringsPointerTable:
+ dw FastText
+ dw MidText
+ dw SlowText
+
+FastText:
+ db "FAST@"
+MidText:
+ db "MID @"
+SlowText:
+ db "SLOW@"
+
+GetTextSpeed:
+ ld a, [wOptions]
+ and $f
+ cp $5
+ jr z, .slowTextOption
+ cp $1
+ jr z, .fastTextOption
+; mid text option
+ ld c, $1
+ lb de, 1, 5
+ ret
+.slowTextOption
+ ld c, $2
+ lb de, 3, 1
+ ret
+.fastTextOption
+ ld c, $0
+ lb de, 5, 3
+ ret
+
+OptionsMenu_BattleAnimations:
+ ldh a, [hJoy5]
+ and D_RIGHT | D_LEFT
+ jr nz, .asm_41d33
+ ld a, [wOptions]
+ and $80 ; mask other bits
+ jr .asm_41d3b
+.asm_41d33
+ ld a, [wOptions]
+ xor $80
+ ld [wOptions], a
+.asm_41d3b
+ ld bc, $0
+ sla a
+ rl c
+ ld hl, AnimationOptionStringsPointerTable
+ add hl, bc
+ add hl, bc
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ hlcoord 14, 4
+ call PlaceString
+ and a
+ ret
+
+AnimationOptionStringsPointerTable:
+ dw AnimationOnText
+ dw AnimationOffText
+
+AnimationOnText:
+ db "ON @"
+AnimationOffText:
+ db "OFF@"
+
+OptionsMenu_BattleStyle:
+ ldh a, [hJoy5]
+ and D_LEFT | D_RIGHT
+ jr nz, .asm_41d6b
+ ld a, [wOptions]
+ and $40 ; mask other bits
+ jr .asm_41d73
+.asm_41d6b
+ ld a, [wOptions]
+ xor $40
+ ld [wOptions], a
+.asm_41d73
+ ld bc, $0
+ sla a
+ sla a
+ rl c
+ ld hl, BattleStyleOptionStringsPointerTable
+ add hl, bc
+ add hl, bc
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ hlcoord 14, 6
+ call PlaceString
+ and a
+ ret
+
+BattleStyleOptionStringsPointerTable:
+ dw BattleStyleShiftText
+ dw BattleStyleSetText
+
+BattleStyleShiftText:
+ db "SHIFT@"
+BattleStyleSetText:
+ db "SET @"
+
+OptionsMenu_SpeakerSettings:
+ ld a, [wOptions]
+ and $30
+ swap a
+ ld c, a
+ ldh a, [hJoy5]
+ bit 4, a
+ jr nz, .pressedRight
+ bit 5, a
+ jr nz, .pressedLeft
+ jr .asm_41dca
+.pressedRight
+ ld a, c
+ inc a
+ and $3
+ jr .asm_41dba
+.pressedLeft
+ ld a, c
+ dec a
+ and $3
+.asm_41dba
+ ld c, a
+ swap a
+ ld b, a
+ xor a
+ ldh [rNR51], a
+ ld a, [wOptions]
+ and $cf
+ or b
+ ld [wOptions], a
+.asm_41dca
+ ld b, $0
+ ld hl, SpeakerOptionStringsPointerTable
+ add hl, bc
+ add hl, bc
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ hlcoord 8, 8
+ call PlaceString
+ and a
+ ret
+
+SpeakerOptionStringsPointerTable:
+ dw MonoSoundText
+ dw Earphone1SoundText
+ dw Earphone2SoundText
+ dw Earphone3SoundText
+
+MonoSoundText:
+ db "MONO @"
+Earphone1SoundText:
+ db "EARPHONE1@"
+Earphone2SoundText:
+ db "EARPHONE2@"
+Earphone3SoundText:
+ db "EARPHONE3@"
+
+OptionsMenu_GBPrinterBrightness:
+ call Func_41e7b
+ ldh a, [hJoy5]
+ bit 4, a
+ jr nz, .pressedRight
+ bit 5, a
+ jr nz, .pressedLeft
+ jr .asm_41e32
+.pressedRight
+ ld a, c
+ cp $4
+ jr c, .asm_41e22
+ ld c, $ff
+.asm_41e22
+ inc c
+ ld a, e
+ jr .asm_41e2e
+.pressedLeft
+ ld a, c
+ and a
+ jr nz, .asm_41e2c
+ ld c, $5
+.asm_41e2c
+ dec c
+ ld a, d
+.asm_41e2e
+ ld b, a
+ ld [wPrinterSettings], a
+.asm_41e32
+ ld b, $0
+ ld hl, GBPrinterOptionStringsPointerTable
+ add hl, bc
+ add hl, bc
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ hlcoord 8, 10
+ call PlaceString
+ and a
+ ret
+
+GBPrinterOptionStringsPointerTable:
+ dw LightestPrintText
+ dw LighterPrintText
+ dw NormalPrintText
+ dw DarkerPrintText
+ dw DarkestPrintText
+
+LightestPrintText:
+ db "LIGHTEST@"
+LighterPrintText:
+ db "LIGHTER @"
+NormalPrintText:
+ db "NORMAL @"
+DarkerPrintText:
+ db "DARKER @"
+DarkestPrintText:
+ db "DARKEST @"
+
+Func_41e7b:
+ ld a, [wPrinterSettings]
+ and a
+ jr z, .asm_41e93
+ cp $20
+ jr z, .asm_41e99
+ cp $60
+ jr z, .asm_41e9f
+ cp $7f
+ jr z, .asm_41ea5
+ ld c, $2
+ lb de, $20, $60
+ ret
+.asm_41e93
+ ld c, $0
+ lb de, $7f, $20
+ ret
+.asm_41e99
+ ld c, $1
+ lb de, $0, $40
+ ret
+.asm_41e9f
+ ld c, $3
+ lb de, $40, $7f
+ ret
+.asm_41ea5
+ ld c, $4
+ lb de, $60, $0
+ ret
+
+OptionsMenu_Dummy:
+ and a
+ ret
+
+OptionsMenu_Cancel:
+ ldh a, [hJoy5]
+ and A_BUTTON
+ jr nz, .pressedCancel
+ and a
+ ret
+.pressedCancel
+ scf
+ ret
+
+OptionsControl:
+ ld hl, wOptionsCursorLocation
+ ldh a, [hJoy5]
+ cp D_DOWN
+ jr z, .pressedDown
+ cp D_UP
+ jr z, .pressedUp
+ and a
+ ret
+.pressedDown
+ ld a, [hl]
+ cp $7
+ jr nz, .doNotWrapAround
+ ld [hl], $0
+ scf
+ ret
+.doNotWrapAround
+ cp $4
+ jr c, .regularIncrement
+ ld [hl], $6
+.regularIncrement
+ inc [hl]
+ scf
+ ret
+.pressedUp
+ ld a, [hl]
+ cp $7
+ jr nz, .doNotMoveCursorToPrintOption
+ ld [hl], $4
+ scf
+ ret
+.doNotMoveCursorToPrintOption
+ and a
+ jr nz, .regularDecrement
+ ld [hl], $8
+.regularDecrement
+ dec [hl]
+ scf
+ ret
+
+OptionsMenu_UpdateCursorPosition:
+ hlcoord 1, 1
+ ld de, SCREEN_WIDTH
+ ld c, 16
+.loop
+ ld [hl], " "
+ add hl, de
+ dec c
+ jr nz, .loop
+ hlcoord 1, 2
+ ld bc, SCREEN_WIDTH * 2
+ ld a, [wOptionsCursorLocation]
+ call AddNTimes
+ ld [hl], "▶"
+ ret
+
+InitOptionsMenu:
+ hlcoord 0, 0
+ lb bc, SCREEN_HEIGHT - 2, SCREEN_WIDTH - 2
+ call TextBoxBorder
+ hlcoord 2, 2
+ ld de, AllOptionsText
+ call PlaceString
+ hlcoord 2, 16
+ ld de, OptionMenuCancelText
+ call PlaceString
+ xor a
+ ld [wOptionsCursorLocation], a
+ ld c, 5 ; the number of options to loop through
+.loop
+ push bc
+ call GetOptionPointer ; updates the next option
+ pop bc
+ ld hl, wOptionsCursorLocation
+ inc [hl] ; moves the cursor for the highlighted option
+ dec c
+ jr nz, .loop
+ xor a
+ ld [wOptionsCursorLocation], a
+ inc a
+ ldh [hAutoBGTransferEnabled], a
+ call Delay3
+ ret
+
+AllOptionsText:
+ db "TEXT SPEED :"
+ next "ANIMATION :"
+ next "BATTLESTYLE:"
+ next "SOUND:"
+ next "PRINT:@"
+
+OptionMenuCancelText:
+ db "CANCEL@"
diff --git a/engine/menus/party_menu.asm b/engine/menus/party_menu.asm
new file mode 100755
index 00000000..32f47f6a
--- /dev/null
+++ b/engine/menus/party_menu.asm
@@ -0,0 +1,314 @@
+DrawPartyMenu_::
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ call ClearScreen
+ call UpdateSprites
+ farcall LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
+
+RedrawPartyMenu_::
+ ld a, [wPartyMenuTypeOrMessageID]
+ cp SWAP_MONS_PARTY_MENU
+ jp z, .printMessage
+ call ErasePartyMenuCursors
+ farcall InitPartyMenuBlkPacket
+ hlcoord 3, 0
+ ld de, wPartySpecies
+ xor a
+ ld c, a
+ ldh [hPartyMonIndex], a
+ ld [wWhichPartyMenuHPBar], a
+.loop
+ ld a, [de]
+ cp $FF ; reached the terminator?
+ jp z, .afterDrawingMonEntries
+ push bc
+ push de
+ push hl
+ ld a, c
+ push hl
+ ld hl, wPartyMonNicks
+ call GetPartyMonName
+ pop hl
+ call PlaceString ; print the pokemon's name
+ ldh a, [hPartyMonIndex]
+ ld [wWhichPokemon], a
+ callfar IsThisPartymonStarterPikachu_Party
+ jr nc, .regularMon
+ call CheckPikachuFollowingPlayer
+ jr z, .regularMon
+ ld a, $ff
+ ldh [hPartyMonIndex], a
+.regularMon
+ farcall WriteMonPartySpriteOAMByPartyIndex ; place the appropriate pokemon icon
+ ld a, [wWhichPokemon]
+ inc a
+ ldh [hPartyMonIndex], a
+ call LoadMonData
+ pop hl
+ push hl
+ ld a, [wMenuItemToSwap]
+ and a ; is the player swapping pokemon positions?
+ jr z, .skipUnfilledRightArrow
+; if the player is swapping pokemon positions
+ dec a
+ ld b, a
+ ld a, [wWhichPokemon]
+ cp b ; is the player swapping the current pokemon in the list?
+ jr nz, .skipUnfilledRightArrow
+; the player is swapping the current pokemon in the list
+ dec hl
+ dec hl
+ dec hl
+ ld a, "▷" ; unfilled right arrow menu cursor
+ ld [hli], a ; place the cursor
+ inc hl
+ inc hl
+.skipUnfilledRightArrow
+ ld a, [wPartyMenuTypeOrMessageID] ; menu type
+ cp TMHM_PARTY_MENU
+ jr z, .teachMoveMenu
+ cp EVO_STONE_PARTY_MENU
+ jr z, .evolutionStoneMenu
+ push hl
+ ld bc, 14 ; 14 columns to the right
+ add hl, bc
+ ld de, wLoadedMonStatus
+ call PrintStatusCondition
+ pop hl
+ push hl
+ ld bc, SCREEN_WIDTH + 1 ; down 1 row and right 1 column
+ ldh a, [hFlagsFFFA]
+ set 0, a
+ ldh [hFlagsFFFA], a
+ add hl, bc
+ predef DrawHP2 ; draw HP bar and prints current / max HP
+ ldh a, [hFlagsFFFA]
+ res 0, a
+ ldh [hFlagsFFFA], a
+ call SetPartyMenuHPBarColor ; color the HP bar (on SGB)
+ pop hl
+ jr .printLevel
+.teachMoveMenu
+ push hl
+ predef CanLearnTM ; check if the pokemon can learn the move
+ pop hl
+ ld de, .ableToLearnMoveText
+ ld a, c
+ and a
+ jr nz, .placeMoveLearnabilityString
+ ld de, .notAbleToLearnMoveText
+.placeMoveLearnabilityString
+ push hl
+ ld bc, 20 + 9 ; down 1 row and right 9 columns
+ add hl, bc
+ call PlaceString
+ pop hl
+.printLevel
+ ld bc, 10 ; move 10 columns to the right
+ add hl, bc
+ call PrintLevel
+ pop hl
+ pop de
+ inc de
+ ld bc, 2 * 20
+ add hl, bc
+ pop bc
+ inc c
+ jp .loop
+.ableToLearnMoveText
+ db "ABLE@"
+.notAbleToLearnMoveText
+ db "NOT ABLE@"
+.evolutionStoneMenu
+ push hl
+ ld hl, EvosMovesPointerTable
+ ld b, 0
+ ld a, [wLoadedMonSpecies]
+ dec a
+ add a
+ rl b
+ ld c, a
+ add hl, bc
+ ld de, wEvosMoves
+ ld a, BANK(EvosMovesPointerTable)
+ ld bc, 2
+ call FarCopyData
+ ld hl, wEvosMoves
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, wEvosMoves
+ ld a, BANK(EvosMovesPointerTable)
+ ld bc, wEvosMoves.end - wEvosMoves
+ call FarCopyData
+ ld hl, wEvosMoves
+ ld de, .notAbleToEvolveText
+; loop through the pokemon's evolution entries
+.checkEvolutionsLoop
+ ld a, [hli]
+ and a ; reached terminator?
+ jr z, .placeEvolutionStoneString ; if so, place the "NOT ABLE" string
+ inc hl
+ inc hl
+ cp EV_ITEM
+ jr nz, .checkEvolutionsLoop
+; if it's a stone evolution entry
+ dec hl
+ dec hl
+ ld b, [hl]
+ ld a, [wEvoStoneItemID] ; the stone the player used
+ inc hl
+ inc hl
+ inc hl
+ cp b ; does the player's stone match this evolution entry's stone?
+ jr nz, .checkEvolutionsLoop
+; if it does match
+ ld de, .ableToEvolveText
+.placeEvolutionStoneString
+ pop hl
+ push hl
+ ld bc, 20 + 9 ; down 1 row and right 9 columns
+ add hl, bc
+ call PlaceString
+ pop hl
+ jr .printLevel
+.ableToEvolveText
+ db "ABLE@"
+.notAbleToEvolveText
+ db "NOT ABLE@"
+.afterDrawingMonEntries
+ ld b, SET_PAL_PARTY_MENU
+ call RunPaletteCommand
+.printMessage
+ ld hl, wd730
+ ld a, [hl]
+ push af
+ push hl
+ set 6, [hl] ; turn off letter printing delay
+ ld a, [wPartyMenuTypeOrMessageID] ; message ID
+ cp FIRST_PARTY_MENU_TEXT_ID
+ jr nc, .printItemUseMessage
+ add a
+ ld hl, PartyMenuMessagePointers
+ ld b, 0
+ ld c, a
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ call PrintText
+.done
+ pop hl
+ pop af
+ ld [hl], a
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ call Delay3
+ jp GBPalNormal
+.printItemUseMessage
+ and $0F
+ ld hl, PartyMenuItemUseMessagePointers
+ add a
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ push hl
+ ld a, [wUsedItemOnWhichPokemon]
+ ld hl, wPartyMonNicks
+ call GetPartyMonName
+ pop hl
+ call PrintText
+ jr .done
+
+PartyMenuItemUseMessagePointers:
+ dw AntidoteText
+ dw BurnHealText
+ dw IceHealText
+ dw AwakeningText
+ dw ParlyzHealText
+ dw PotionText
+ dw FullHealText
+ dw ReviveText
+ dw RareCandyText
+
+PartyMenuMessagePointers:
+ dw PartyMenuNormalText
+ dw PartyMenuItemUseText
+ dw PartyMenuBattleText
+ dw PartyMenuUseTMText
+ dw PartyMenuSwapMonText
+ dw PartyMenuItemUseText
+
+PartyMenuNormalText:
+ text_far _PartyMenuNormalText
+ text_end
+
+PartyMenuItemUseText:
+ text_far _PartyMenuItemUseText
+ text_end
+
+PartyMenuBattleText:
+ text_far _PartyMenuBattleText
+ text_end
+
+PartyMenuUseTMText:
+ text_far _PartyMenuUseTMText
+ text_end
+
+PartyMenuSwapMonText:
+ text_far _PartyMenuSwapMonText
+ text_end
+
+PotionText:
+ text_far _PotionText
+ text_end
+
+AntidoteText:
+ text_far _AntidoteText
+ text_end
+
+ParlyzHealText:
+ text_far _ParlyzHealText
+ text_end
+
+BurnHealText:
+ text_far _BurnHealText
+ text_end
+
+IceHealText:
+ text_far _IceHealText
+ text_end
+
+AwakeningText:
+ text_far _AwakeningText
+ text_end
+
+FullHealText:
+ text_far _FullHealText
+ text_end
+
+ReviveText:
+ text_far _ReviveText
+ text_end
+
+RareCandyText:
+ text_far _RareCandyText
+ sound_get_item_1 ; probably supposed to play SFX_LEVEL_UP but the wrong music bank is loaded
+ text_promptbutton
+ text_end
+
+SetPartyMenuHPBarColor:
+ ld hl, wPartyMenuHPBarColors
+ ld a, [wWhichPartyMenuHPBar]
+ ld c, a
+ ld b, 0
+ add hl, bc
+ call GetHealthBarColor
+ ld b, SET_PAL_PARTY_MENU_HP_BARS
+ call RunPaletteCommand
+ ld hl, wWhichPartyMenuHPBar
+ inc [hl]
+ ret
diff --git a/engine/menus/pc.asm b/engine/menus/pc.asm
new file mode 100755
index 00000000..4c340e7b
--- /dev/null
+++ b/engine/menus/pc.asm
@@ -0,0 +1,141 @@
+ActivatePC::
+ call SaveScreenTilesToBuffer2
+ ld a, SFX_TURN_ON_PC
+ call PlaySound
+ ld hl, TurnedOnPC1Text
+ call PrintText
+ call WaitForSoundToFinish
+ ld hl, wFlags_0xcd60
+ set 3, [hl]
+ call LoadScreenTilesFromBuffer2
+ call Delay3
+PCMainMenu:
+ farcall DisplayPCMainMenu
+ ld hl, wFlags_0xcd60
+ set 5, [hl]
+ call HandleMenuInput
+ bit 1, a ;if player pressed B
+ jp nz, LogOff
+ ld a, [wMaxMenuItem]
+ cp 2
+ jr nz, .next ;if not 2 menu items (not counting log off) (2 occurs before you get the pokedex)
+ ld a, [wCurrentMenuItem]
+ and a
+ jp z, BillsPC ;if current menu item id is 0, it's bills pc
+ cp 1
+ jr z, .playersPC ;if current menu item id is 1, it's players pc
+ jp LogOff ;otherwise, it's 2, and you're logging off
+.next
+ cp 3
+ jr nz, .next2 ;if not 3 menu items (not counting log off) (3 occurs after you get the pokedex, before you beat the pokemon league)
+ ld a, [wCurrentMenuItem]
+ and a
+ jp z, BillsPC ;if current menu item id is 0, it's bills pc
+ cp 1
+ jr z, .playersPC ;if current menu item id is 1, it's players pc
+ cp 2
+ jp z, OaksPC ;if current menu item id is 2, it's oaks pc
+ jp LogOff ;otherwise, it's 3, and you're logging off
+.next2
+ ld a, [wCurrentMenuItem]
+ and a
+ jp z, BillsPC ;if current menu item id is 0, it's bills pc
+ cp 1
+ jr z, .playersPC ;if current menu item id is 1, it's players pc
+ cp 2
+ jp z, OaksPC ;if current menu item id is 2, it's oaks pc
+ cp 3
+ jp z, PKMNLeague ;if current menu item id is 3, it's pkmnleague
+ jp LogOff ;otherwise, it's 4, and you're logging off
+.playersPC
+ ld hl, wFlags_0xcd60
+ res 5, [hl]
+ set 3, [hl]
+ ld a, SFX_ENTER_PC
+ call PlaySound
+ call WaitForSoundToFinish
+ ld hl, AccessedMyPCText
+ call PrintText
+ farcall PlayerPC
+ jr ReloadMainMenu
+OaksPC:
+ ld a, SFX_ENTER_PC
+ call PlaySound
+ call WaitForSoundToFinish
+ farcall OpenOaksPC
+ jr ReloadMainMenu
+PKMNLeague:
+ ld a, SFX_ENTER_PC
+ call PlaySound
+ call WaitForSoundToFinish
+ farcall PKMNLeaguePC
+ jr ReloadMainMenu
+BillsPC:
+ ld a, SFX_ENTER_PC
+ call PlaySound
+ call WaitForSoundToFinish
+ CheckEvent EVENT_MET_BILL
+ jr nz, .billsPC ;if you've met bill, use that bill's instead of someone's
+ ld hl, AccessedSomeonesPCText
+ jr .printText
+.billsPC
+ ld hl, AccessedBillsPCText
+.printText
+ call PrintText
+ farcall BillsPC_
+ReloadMainMenu:
+ xor a
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ call ReloadMapData
+ call UpdateSprites
+ jp PCMainMenu
+LogOff:
+ ld a, SFX_TURN_OFF_PC
+ call PlaySound
+ call WaitForSoundToFinish
+ ld hl, wFlags_0xcd60
+ res 3, [hl]
+ res 5, [hl]
+ ret
+
+TurnedOnPC1Text:
+ text_far _TurnedOnPC1Text
+ text_end
+
+AccessedBillsPCText:
+ text_far _AccessedBillsPCText
+ text_end
+
+AccessedSomeonesPCText:
+ text_far _AccessedSomeonesPCText
+ text_end
+
+AccessedMyPCText:
+ text_far _AccessedMyPCText
+ text_end
+
+; removes one of the specified item ID [hItemToRemoveID] from bag (if existent)
+RemoveItemByID::
+ ld hl, wBagItems
+ ldh a, [hItemToRemoveID]
+ ld b, a
+ xor a
+ ldh [hItemToRemoveIndex], a
+.loop
+ ld a, [hli]
+ cp -1 ; reached terminator?
+ ret z
+ cp b
+ jr z, .foundItem
+ inc hl
+ ldh a, [hItemToRemoveIndex]
+ inc a
+ ldh [hItemToRemoveIndex], a
+ jr .loop
+.foundItem
+ ld a, $1
+ ld [wItemQuantity], a
+ ldh a, [hItemToRemoveIndex]
+ ld [wWhichPokemon], a
+ ld hl, wNumBagItems
+ jp RemoveItemFromInventory
diff --git a/engine/menus/players_pc.asm b/engine/menus/players_pc.asm
new file mode 100755
index 00000000..1fac030b
--- /dev/null
+++ b/engine/menus/players_pc.asm
@@ -0,0 +1,302 @@
+PlayerPC::
+ ld a, ITEM_NAME
+ ld [wNameListType], a
+ call SaveScreenTilesToBuffer1
+ xor a
+ ld [wBagSavedMenuItem], a
+ ld [wParentMenuItem], a
+ ld a, [wFlags_0xcd60]
+ bit 3, a ; accessing player's PC through another PC?
+ jr nz, PlayerPCMenu
+; accessing it directly
+ ld a, SFX_TURN_ON_PC
+ call PlaySound
+ ld hl, TurnedOnPC2Text
+ call PrintText
+
+PlayerPCMenu:
+ ld hl, wd730
+ set 6, [hl]
+ ld a, [wParentMenuItem]
+ ld [wCurrentMenuItem], a
+ ld hl, wFlags_0xcd60
+ set 5, [hl]
+ call LoadScreenTilesFromBuffer2
+ hlcoord 0, 0
+ lb bc, 8, 14
+ call TextBoxBorder
+ call UpdateSprites
+ hlcoord 2, 2
+ ld de, PlayersPCMenuEntries
+ call PlaceString
+ ld hl, wTopMenuItemY
+ ld a, 2
+ ld [hli], a ; wTopMenuItemY
+ dec a
+ ld [hli], a ; wTopMenuItemX
+ inc hl
+ inc hl
+ ld a, 3
+ ld [hli], a ; wMaxMenuItem
+ ld a, A_BUTTON | B_BUTTON
+ ld [hli], a ; wMenuWatchedKeys
+ xor a
+ ld [hl], a
+ ld hl, wListScrollOffset
+ ld [hli], a ; wListScrollOffset
+ ld [hl], a ; wMenuWatchMovingOutOfBounds
+ ld [wPlayerMonNumber], a
+ ld hl, WhatDoYouWantText
+ call PrintText
+ call HandleMenuInput
+ bit 1, a
+ jp nz, ExitPlayerPC
+ call PlaceUnfilledArrowMenuCursor
+ ld a, [wCurrentMenuItem]
+ ld [wParentMenuItem], a
+ and a
+ jp z, PlayerPCWithdraw
+ dec a
+ jp z, PlayerPCDeposit
+ dec a
+ jp z, PlayerPCToss
+
+ExitPlayerPC:
+ ld a, [wFlags_0xcd60]
+ bit 3, a ; accessing player's PC through another PC?
+ jr nz, .next
+; accessing it directly
+ ld a, SFX_TURN_OFF_PC
+ call PlaySound
+ call WaitForSoundToFinish
+.next
+ ld hl, wFlags_0xcd60
+ res 5, [hl]
+ call LoadScreenTilesFromBuffer2
+ xor a
+ ld [wListScrollOffset], a
+ ld [wBagSavedMenuItem], a
+ ld hl, wd730
+ res 6, [hl]
+ xor a
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ ret
+
+PlayerPCDeposit:
+ xor a
+ ld [wCurrentMenuItem], a
+ ld [wListScrollOffset], a
+ ld a, [wNumBagItems]
+ and a
+ jr nz, .loop
+ ld hl, NothingToDepositText
+ call PrintText
+ jp PlayerPCMenu
+.loop
+ ld hl, WhatToDepositText
+ call PrintText
+ ld hl, wNumBagItems
+ ld a, l
+ ld [wListPointer], a
+ ld a, h
+ ld [wListPointer + 1], a
+ xor a
+ ld [wPrintItemPrices], a
+ ld a, ITEMLISTMENU
+ ld [wListMenuID], a
+ call DisplayListMenuID
+ jp c, PlayerPCMenu
+ call IsKeyItem
+ ld a, 1
+ ld [wItemQuantity], a
+ ld a, [wIsKeyItem]
+ and a
+ jr nz, .next
+; if it's not a key item, there can be more than one of the item
+ ld hl, DepositHowManyText
+ call PrintText
+ call DisplayChooseQuantityMenu
+ cp $ff
+ jp z, .loop
+.next
+ ld hl, wNumBoxItems
+ call AddItemToInventory
+ jr c, .roomAvailable
+ ld hl, NoRoomToStoreText
+ call PrintText
+ jp .loop
+.roomAvailable
+ ld hl, wNumBagItems
+ call RemoveItemFromInventory
+ call WaitForSoundToFinish
+ ld a, SFX_WITHDRAW_DEPOSIT
+ call PlaySound
+ call WaitForSoundToFinish
+ ld hl, ItemWasStoredText
+ call PrintText
+ jp .loop
+
+PlayerPCWithdraw:
+ xor a
+ ld [wCurrentMenuItem], a
+ ld [wListScrollOffset], a
+ ld a, [wNumBoxItems]
+ and a
+ jr nz, .loop
+ ld hl, NothingStoredText
+ call PrintText
+ jp PlayerPCMenu
+.loop
+ ld hl, WhatToWithdrawText
+ call PrintText
+ ld hl, wNumBoxItems
+ ld a, l
+ ld [wListPointer], a
+ ld a, h
+ ld [wListPointer + 1], a
+ xor a
+ ld [wPrintItemPrices], a
+ ld a, ITEMLISTMENU
+ ld [wListMenuID], a
+ call DisplayListMenuID
+ jp c, PlayerPCMenu
+ call IsKeyItem
+ ld a, 1
+ ld [wItemQuantity], a
+ ld a, [wIsKeyItem]
+ and a
+ jr nz, .next
+; if it's not a key item, there can be more than one of the item
+ ld hl, WithdrawHowManyText
+ call PrintText
+ call DisplayChooseQuantityMenu
+ cp $ff
+ jp z, .loop
+.next
+ ld hl, wNumBagItems
+ call AddItemToInventory
+ jr c, .roomAvailable
+ ld hl, CantCarryMoreText
+ call PrintText
+ jp .loop
+.roomAvailable
+ ld hl, wNumBoxItems
+ call RemoveItemFromInventory
+ call WaitForSoundToFinish
+ ld a, SFX_WITHDRAW_DEPOSIT
+ call PlaySound
+ call WaitForSoundToFinish
+ ld hl, WithdrewItemText
+ call PrintText
+ jp .loop
+
+PlayerPCToss:
+ xor a
+ ld [wCurrentMenuItem], a
+ ld [wListScrollOffset], a
+ ld a, [wNumBoxItems]
+ and a
+ jr nz, .loop
+ ld hl, NothingStoredText
+ call PrintText
+ jp PlayerPCMenu
+.loop
+ ld hl, WhatToTossText
+ call PrintText
+ ld hl, wNumBoxItems
+ ld a, l
+ ld [wListPointer], a
+ ld a, h
+ ld [wListPointer + 1], a
+ xor a
+ ld [wPrintItemPrices], a
+ ld a, ITEMLISTMENU
+ ld [wListMenuID], a
+ push hl
+ call DisplayListMenuID
+ pop hl
+ jp c, PlayerPCMenu
+ push hl
+ call IsKeyItem
+ pop hl
+ ld a, 1
+ ld [wItemQuantity], a
+ ld a, [wIsKeyItem]
+ and a
+ jr nz, .next
+ ld a, [wcf91]
+ call IsItemHM
+ jr c, .next
+; if it's not a key item, there can be more than one of the item
+ push hl
+ ld hl, TossHowManyText
+ call PrintText
+ call DisplayChooseQuantityMenu
+ pop hl
+ cp $ff
+ jp z, .loop
+.next
+ call TossItem ; disallows tossing key items
+ jp .loop
+
+PlayersPCMenuEntries:
+ db "WITHDRAW ITEM"
+ next "DEPOSIT ITEM"
+ next "TOSS ITEM"
+ next "LOG OFF@"
+
+TurnedOnPC2Text:
+ text_far _TurnedOnPC2Text
+ text_end
+
+WhatDoYouWantText:
+ text_far _WhatDoYouWantText
+ text_end
+
+WhatToDepositText:
+ text_far _WhatToDepositText
+ text_end
+
+DepositHowManyText:
+ text_far _DepositHowManyText
+ text_end
+
+ItemWasStoredText:
+ text_far _ItemWasStoredText
+ text_end
+
+NothingToDepositText:
+ text_far _NothingToDepositText
+ text_end
+
+NoRoomToStoreText:
+ text_far _NoRoomToStoreText
+ text_end
+
+WhatToWithdrawText:
+ text_far _WhatToWithdrawText
+ text_end
+
+WithdrawHowManyText:
+ text_far _WithdrawHowManyText
+ text_end
+
+WithdrewItemText:
+ text_far _WithdrewItemText
+ text_end
+
+NothingStoredText:
+ text_far _NothingStoredText
+ text_end
+
+CantCarryMoreText:
+ text_far _CantCarryMoreText
+ text_end
+
+WhatToTossText:
+ text_far _WhatToTossText
+ text_end
+
+TossHowManyText:
+ text_far _TossHowManyText
+ text_end
diff --git a/engine/menus/pokedex.asm b/engine/menus/pokedex.asm
new file mode 100755
index 00000000..874fe50f
--- /dev/null
+++ b/engine/menus/pokedex.asm
@@ -0,0 +1,745 @@
+ShowPokedexMenu:
+ call GBPalWhiteOut
+ call ClearScreen
+ call UpdateSprites
+ ld a, [wListScrollOffset]
+ push af
+ xor a
+ ld [wCurrentMenuItem], a
+ ld [wListScrollOffset], a
+ ld [wLastMenuItem], a
+ inc a
+ ld [wd11e], a
+ ldh [hJoy7], a
+.setUpGraphics
+ callfar LoadPokedexTilePatterns
+.loop
+ ld b, SET_PAL_GENERIC
+ call RunPaletteCommand
+.doPokemonListMenu
+ ld hl, wTopMenuItemY
+ ld a, 3
+ ld [hli], a ; top menu item Y
+ xor a
+ ld [hli], a ; top menu item X
+ inc a
+ ld [wMenuWatchMovingOutOfBounds], a
+ inc hl
+ inc hl
+ ld a, 6
+ ld [hli], a ; max menu item ID
+ 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
+ xor a
+ ld [wMenuWatchMovingOutOfBounds], a
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ ldh [hJoy7], a
+ ld [wWastedByteCD3A], a
+ ld [wOverrideSimulatedJoypadStatesMask], a
+ pop af
+ ld [wListScrollOffset], a
+ call GBPalWhiteOutWithDelay3
+ call RunDefaultPaletteCommand
+ jp ReloadMapData
+
+.goToSideMenu
+ call HandlePokedexSideMenu
+ dec b
+ jr z, .exitPokedex ; if the player chose Quit
+ dec b
+ jr z, .doPokemonListMenu ; if pokemon not seen or player pressed B button
+ dec b
+ jr z, .loop
+ jp .setUpGraphics ; if pokemon data or area was shown
+
+; handles the menu on the lower right in the pokedex screen
+; OUTPUT:
+; b = reason for exiting menu
+; 00: showed pokemon data or area
+; 01: the player chose Quit
+; 02: the pokemon has not been seen yet or the player pressed the B button
+HandlePokedexSideMenu:
+ call PlaceUnfilledArrowMenuCursor
+ ld a, [wCurrentMenuItem]
+ push af
+ ld b, a
+ ld a, [wLastMenuItem]
+ push af
+ ld a, [wListScrollOffset]
+ push af
+ add b
+ inc a
+ ld [wd11e], a
+ ld a, [wd11e]
+ push af
+ ld a, [wDexMaxSeenMon]
+ push af ; this doesn't need to be preserved
+ ld hl, wPokedexSeen
+ call IsPokemonBitSet
+ ld b, 2
+ jr z, .exitSideMenu
+ call PokedexToIndex
+ ld hl, wTopMenuItemY
+ ld a, 8
+ ld [hli], a ; top menu item Y
+ ld a, 15
+ ld [hli], a ; top menu item X
+ xor a
+ ld [hli], a ; current menu item ID
+ inc hl
+ ld a, 4
+ 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
+ ld [wMenuWatchMovingOutOfBounds], a
+ ldh [hJoy7], a
+.handleMenuInput
+ call HandleMenuInput
+ bit 1, a ; was the B button pressed?
+ ld b, 2
+ jr nz, .buttonBPressed
+ ld a, [wCurrentMenuItem]
+ and a
+ jr z, .choseData
+ dec a
+ jr z, .choseCry
+ dec a
+ jr z, .choseArea
+ dec a
+ jr z, .chosePrint
+.choseQuit
+ ld b, 1
+.exitSideMenu
+ pop af
+ ld [wDexMaxSeenMon], a
+ pop af
+ ld [wd11e], a
+ pop af
+ ld [wListScrollOffset], a
+ pop af
+ ld [wLastMenuItem], a
+ pop af
+ ld [wCurrentMenuItem], a
+ ld a, $1
+ ldh [hJoy7], a
+ push bc
+ hlcoord 0, 3
+ ld de, 20
+ lb bc, " ", 13
+ call DrawTileLine ; cover up the menu cursor in the pokemon list
+ pop bc
+ ret
+
+.buttonBPressed
+ push bc
+ hlcoord 15, 8
+ ld de, 20
+ lb bc, " ", 9
+ call DrawTileLine ; cover up the menu cursor in the side menu
+ pop bc
+ jr .exitSideMenu
+
+.choseData
+ call ShowPokedexDataInternal
+ ld b, 0
+ jr .exitSideMenu
+
+; play pokemon cry
+.choseCry
+ ld a, [wd11e]
+ call GetCryData
+ call PlaySound
+ jr .handleMenuInput
+
+.choseArea
+ predef LoadTownMap_Nest ; display pokemon areas
+ ld b, 0
+ jr .exitSideMenu
+
+.chosePrint
+ ldh a, [hTilesetType]
+ push af
+ xor a
+ ldh [hTilesetType], a
+ ld a, [wd11e]
+ ld [wcf91], a
+ callfar PrintPokedexEntry
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ call ClearScreen
+ pop af
+ ldh [hTilesetType], a
+ ld b, $3
+ jr .exitSideMenu
+
+; handles the list of pokemon on the left of the pokedex screen
+; sets carry flag if player presses A, unsets carry flag if player presses B
+HandlePokedexListMenu:
+ call Pokedex_DrawInterface
+.loop
+ call Pokedex_PlacePokemonList
+ call GBPalNormal
+ call HandleMenuInput
+ bit BIT_B_BUTTON, a ; was the B button pressed?
+ jp nz, .buttonBPressed
+ bit BIT_A_BUTTON, a ; was the A button pressed?
+ jp nz, .buttonAPressed
+.checkIfUpPressed
+ bit BIT_D_UP, a ; was Up pressed?
+ jr z, .checkIfDownPressed
+.upPressed ; scroll up one row
+ ld a, [wListScrollOffset]
+ and a
+ jp z, .loop
+ dec a
+ ld [wListScrollOffset], a
+ jp .loop
+
+.checkIfDownPressed
+ bit BIT_D_DOWN, a ; was Down pressed?
+ jr z, .checkIfRightPressed
+.downPressed ; scroll down one row
+ ld a, [wDexMaxSeenMon]
+ cp a, 7
+ jp c, .loop ; can't if the list is shorter than 7
+ sub a, 7
+ ld b, a
+ ld a, [wListScrollOffset]
+ cp b
+ jp z, .loop
+ inc a
+ ld [wListScrollOffset], a
+ jp .loop
+
+.checkIfRightPressed
+ bit BIT_D_RIGHT, a ; was Right pressed?
+ jr z, .checkIfLeftPressed
+.rightPressed ; scroll down 7 rows
+ ld a, [wDexMaxSeenMon]
+ cp a, 7
+ jp c, .loop ; can't if the list is shorter than 7
+ sub a, 6
+ ld b, a
+ ld a, [wListScrollOffset]
+ add a, 7
+ ld [wListScrollOffset], a
+ cp b
+ jp c, .loop
+ dec b
+ ld a, b
+ ld [wListScrollOffset], a
+ jp .loop
+
+.checkIfLeftPressed ; scroll up 7 rows
+ bit BIT_D_LEFT, a ; was Left pressed?
+ jr z, .buttonAPressed
+.leftPressed
+ ld a, [wListScrollOffset]
+ sub a, 7
+ ld [wListScrollOffset], a
+ jp nc, .loop
+ xor a
+ ld [wListScrollOffset], a
+ jp .loop
+
+.buttonAPressed
+ scf
+ ret
+
+.buttonBPressed
+ and a
+ ret
+
+Pokedex_DrawInterface:
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+; draw the horizontal line separating the seen and owned amounts from the menu
+ hlcoord 15, 6
+ ld a, "─"
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ hlcoord 14, 0
+ ld [hl], $71 ; vertical line tile
+ hlcoord 14, 1
+ call DrawPokedexVerticalLine
+ hlcoord 14, 9
+ call DrawPokedexVerticalLine
+ ld hl, wPokedexSeen
+ ld b, wPokedexSeenEnd - wPokedexSeen
+ call CountSetBits
+ ld de, wNumSetBits
+ hlcoord 16, 2
+ lb bc, 1, 3
+ call PrintNumber ; print number of seen pokemon
+ ld hl, wPokedexOwned
+ ld b, wPokedexOwnedEnd - wPokedexOwned
+ call CountSetBits
+ ld de, wNumSetBits
+ hlcoord 16, 5
+ lb bc, 1, 3
+ call PrintNumber ; print number of owned pokemon
+ hlcoord 16, 1
+ ld de, PokedexSeenText
+ call PlaceString
+ hlcoord 16, 4
+ ld de, PokedexOwnText
+ call PlaceString
+ hlcoord 1, 1
+ ld de, PokedexContentsText
+ call PlaceString
+ hlcoord 16, 8
+ ld de, PokedexMenuItemsText
+ call PlaceString
+; find the highest pokedex number among the pokemon the player has seen
+ ld hl, wPokedexSeenEnd - 1
+ ld b, (wPokedexSeenEnd - wPokedexSeen) * 8 + 1
+.maxSeenPokemonLoop
+ ld a, [hld]
+ ld c, 8
+.maxSeenPokemonInnerLoop
+ dec b
+ sla a
+ jr c, .storeMaxSeenPokemon
+ dec c
+ jr nz, .maxSeenPokemonInnerLoop
+ jr .maxSeenPokemonLoop
+
+.storeMaxSeenPokemon
+ ld a, b
+ ld [wDexMaxSeenMon], a
+ ret
+
+DrawPokedexVerticalLine:
+ ld c, 9 ; height of line
+ ld de, SCREEN_WIDTH ; width of screen
+ ld a, $71 ; vertical line tile
+.loop
+ ld [hl], a
+ add hl, de
+ xor a, 1 ; toggle between vertical line tile and box tile
+ dec c
+ jr nz, .loop
+ ret
+
+PokedexSeenText:
+ db "SEEN@"
+
+PokedexOwnText:
+ db "OWN@"
+
+PokedexContentsText:
+ db "CONTENTS@"
+
+PokedexMenuItemsText:
+ db "DATA"
+ next "CRY"
+ next "AREA"
+ next "PRNT"
+ next "QUIT@"
+
+Pokedex_PlacePokemonList:
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ hlcoord 4, 2
+ lb bc, 14, 10
+ call ClearScreenArea
+ hlcoord 1, 3
+ ld a, [wListScrollOffset]
+ ld [wd11e], a
+ ld d, 7
+ ld a, [wDexMaxSeenMon]
+ cp 7
+ jr nc, .printPokemonLoop
+ ld d, a
+ dec a
+ ld [wMaxMenuItem], a
+; loop to print pokemon pokedex numbers and names
+; if the player has owned the pokemon, it puts a pokeball beside the name
+.printPokemonLoop
+ ld a, [wd11e]
+ inc a
+ ld [wd11e], a
+ push af
+ push de
+ push hl
+ ld de, -SCREEN_WIDTH
+ add hl, de
+ ld de, wd11e
+ lb bc, LEADING_ZEROES | 1, 3
+ call PrintNumber ; print the pokedex number
+ ld de, SCREEN_WIDTH
+ add hl, de
+ dec hl
+ push hl
+ ld hl, wPokedexOwned
+ call IsPokemonBitSet
+ pop hl
+ ld a, " "
+ jr z, .writeTile
+ ld a, $72 ; pokeball tile
+.writeTile
+ ld [hl], a ; put a pokeball next to pokemon that the player has owned
+ push hl
+ ld hl, wPokedexSeen
+ call IsPokemonBitSet
+ jr nz, .getPokemonName ; if the player has seen the pokemon
+ ld de, .dashedLine ; print a dashed line in place of the name if the player hasn't seen the pokemon
+ jr .skipGettingName
+.dashedLine ; for unseen pokemon in the list
+ db "----------@"
+.getPokemonName
+ call PokedexToIndex
+ call GetMonName
+.skipGettingName
+ pop hl
+ inc hl
+ call PlaceString
+ pop hl
+ ld bc, 2 * SCREEN_WIDTH
+ add hl, bc
+ pop de
+ pop af
+ ld [wd11e], a
+ dec d
+ jr nz, .printPokemonLoop
+ ld a, 01
+ ldh [hAutoBGTransferEnabled], a
+ call Delay3
+ ret
+
+; tests if a pokemon's bit is set in the seen or owned pokemon bit fields
+; INPUT:
+; [wd11e] = pokedex number
+; hl = address of bit field
+IsPokemonBitSet:
+ ld a, [wd11e]
+ dec a
+ ld c, a
+ ld b, FLAG_TEST
+ predef FlagActionPredef
+ ld a, c
+ and a
+ ret
+
+; function to display pokedex data from outside the pokedex
+ShowPokedexData:
+ call GBPalWhiteOutWithDelay3
+ call ClearScreen
+ call UpdateSprites
+ callfar LoadPokedexTilePatterns ; load pokedex tiles
+
+; function to display pokedex data from inside the pokedex
+ShowPokedexDataInternal:
+ ld hl, wd72c
+ set 1, [hl]
+ ld a, $33 ; 3/7 volume
+ ldh [rNR50], a
+ ldh a, [hTilesetType]
+ push af
+ xor a
+ ldh [hTilesetType], a
+ call GBPalWhiteOut ; zero all palettes
+ ld a, [wd11e] ; pokemon ID
+ ld [wcf91], a
+ push af
+ ld b, SET_PAL_POKEDEX
+ call RunPaletteCommand
+ pop af
+ ld [wd11e], a
+ call DrawDexEntryOnScreen
+ call c, Pokedex_PrintFlavorTextAtRow11
+.waitForButtonPress
+ call JoypadLowSensitivity
+ ldh a, [hJoy5]
+ and a, A_BUTTON | B_BUTTON
+ jr z, .waitForButtonPress
+ pop af
+ ldh [hTilesetType], a
+ call GBPalWhiteOut
+ call ClearScreen
+ call RunDefaultPaletteCommand
+ call LoadTextBoxTilePatterns
+ call GBPalNormal
+ ld hl, wd72c
+ res 1, [hl]
+ ld a, $77 ; max volume
+ ldh [rNR50], a
+ ret
+
+HeightWeightText:
+ db "HT ?′??″"
+ next "WT ???lb@"
+
+; XXX does anything point to this?
+PokeText:
+ db "#@"
+
+; horizontal line that divides the pokedex text description from the rest of the data
+PokedexDataDividerLine:
+ db $68, $69, $6B, $69, $6B, $69, $6B, $69, $6B, $6B
+ db $6B, $6B, $69, $6B, $69, $6B, $69, $6B, $69, $6A
+ db "@"
+
+DrawDexEntryOnScreen:
+ call ClearScreen
+
+ hlcoord 0, 0
+ ld de, 1
+ lb bc, $64, SCREEN_WIDTH
+ call DrawTileLine ; draw top border
+
+ hlcoord 0, 17
+ ld b, $6f
+ call DrawTileLine ; draw bottom border
+
+ hlcoord 0, 1
+ ld de, 20
+ lb bc, $66, $10
+ call DrawTileLine ; draw left border
+
+ hlcoord 19, 1
+ ld b, $67
+ call DrawTileLine ; draw right border
+
+ ld a, $63 ; upper left corner tile
+ ldcoord_a 0, 0
+ ld a, $65 ; upper right corner tile
+ ldcoord_a 19, 0
+ ld a, $6c ; lower left corner tile
+ ldcoord_a 0, 17
+ ld a, $6e ; lower right corner tile
+ ldcoord_a 19, 17
+
+ hlcoord 0, 9
+ ld de, PokedexDataDividerLine
+ call PlaceString ; draw horizontal divider line
+
+ hlcoord 9, 6
+ ld de, HeightWeightText
+ call PlaceString
+
+ call GetMonName
+ hlcoord 9, 2
+ call PlaceString
+
+ ld hl, PokedexEntryPointers
+ ld a, [wd11e]
+ dec a
+ ld e, a
+ ld d, 0
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld e, a
+ ld d, [hl] ; de = address of pokedex entry
+
+ hlcoord 9, 4
+ call PlaceString ; print species name
+
+ ld h, b
+ ld l, c
+ push de
+ ld a, [wd11e]
+ push af
+ call IndexToPokedex
+
+ hlcoord 2, 8
+ ld a, "№"
+ ld [hli], a
+ ld a, "<DOT>"
+ ld [hli], a
+ ld de, wd11e
+ lb bc, LEADING_ZEROES | 1, 3
+ call PrintNumber ; print pokedex number
+
+ ld hl, wPokedexOwned
+ call IsPokemonBitSet
+ pop af
+ ld [wd11e], a
+ ld a, [wcf91]
+ ld [wd0b5], a
+ pop de
+
+ push af
+ push bc
+ push de
+ push hl
+
+ call Delay3
+ call GBPalNormal
+ call GetMonHeader ; load pokemon picture location
+ hlcoord 1, 1
+ call LoadFlippedFrontSpriteByMonIndex ; draw pokemon picture
+ ld a, [wcf91]
+ call PlayCry ; play pokemon cry
+
+ pop hl
+ pop de
+ pop bc
+ pop af
+
+ ld a, c
+ and a
+ ret z ; if the pokemon has not been owned, don't print the height, weight, or description
+
+ inc de ; de = address of feet (height)
+ ld a, [de] ; reads feet, but a is overwritten without being used
+ hlcoord 12, 6
+ lb bc, 1, 2
+ call PrintNumber ; print feet (height)
+ ld a, "′"
+ ld [hl], a
+ inc de
+ inc de ; de = address of inches (height)
+ hlcoord 15, 6
+ lb bc, LEADING_ZEROES | 1, 2
+ call PrintNumber ; print inches (height)
+ ld a, "″"
+ ld [hl], a
+; now print the weight (note that weight is stored in tenths of pounds internally)
+ inc de
+ inc de
+ inc de ; de = address of upper byte of weight
+ push de
+; put weight in big-endian order at hDexWeight
+ ld hl, hDexWeight
+ ld a, [hl] ; save existing value of [hDexWeight]
+ push af
+ ld a, [de] ; a = upper byte of weight
+ ld [hli], a ; store upper byte of weight in [hDexWeight]
+ ld a, [hl] ; save existing value of [hDexWeight + 1]
+ push af
+ dec de
+ ld a, [de] ; a = lower byte of weight
+ ld [hl], a ; store lower byte of weight in [hDexWeight + 1]
+ ld de, hDexWeight
+ hlcoord 11, 8
+ lb bc, 2, 5 ; 2 bytes, 5 digits
+ call PrintNumber ; print weight
+ hlcoord 14, 8
+ ldh a, [hDexWeight + 1]
+ sub 10
+ ldh a, [hDexWeight]
+ sbc 0
+ jr nc, .next
+ ld [hl], "0" ; if the weight is less than 10, put a 0 before the decimal point
+.next
+ inc hl
+ ld a, [hli]
+ ld [hld], a ; make space for the decimal point by moving the last digit forward one tile
+ ld [hl], "<DOT>" ; decimal point tile
+ pop af
+ ldh [hDexWeight + 1], a ; restore original value of [hDexWeight + 1]
+ pop af
+ ldh [hDexWeight], a ; restore original value of [hDexWeight]
+ pop hl
+ inc hl ; hl = address of pokedex description text
+ scf
+ ret
+
+Pokedex_PrintFlavorTextAtRow11:
+ bccoord 1, 11
+Pokedex_PrintFlavorTextAtBC:
+ ld a, %10
+ ldh [hClearLetterPrintingDelayFlags], a
+ call TextCommandProcessor ; print pokedex description text
+ xor a
+ ldh [hClearLetterPrintingDelayFlags], a
+ ret
+
+Pokedex_PrepareDexEntryForPrinting:
+ hlcoord 0, 0
+ ld de, SCREEN_WIDTH
+ lb bc, $66, $d
+ call DrawTileLine
+ hlcoord 19, 0
+ ld b, $67
+ call DrawTileLine
+ hlcoord 0, 13
+ ld de, $1
+ lb bc, $6f, SCREEN_WIDTH
+ call DrawTileLine
+ ld a, $6c
+ ldcoord_a 0, 13
+ ld a, $6e
+ ldcoord_a 19, 13
+ ld a, [wPrinterPokedexEntryTextPointer]
+ ld l, a
+ ld a, [wPrinterPokedexEntryTextPointer + 1]
+ ld h, a
+ bccoord 1, 1
+ ldh a, [hFlagsFFFA]
+ set 3, a
+ ldh [hFlagsFFFA], a
+ call Pokedex_PrintFlavorTextAtBC
+ ldh a, [hFlagsFFFA]
+ res 3, a
+ ldh [hFlagsFFFA], a
+ ret
+
+; draws a line of tiles
+; INPUT:
+; b = tile ID
+; c = number of tile ID's to write
+; de = amount to destination address after each tile (1 for horizontal, 20 for vertical)
+; hl = destination address
+DrawTileLine:
+ push bc
+ push de
+.loop
+ ld [hl], b
+ add hl, de
+ dec c
+ jr nz, .loop
+ pop de
+ pop bc
+ ret
+
+INCLUDE "data/pokemon/dex_entries.asm"
+
+PokedexToIndex:
+ ; converts the Pokédex number at wd11e to an index
+ push bc
+ push hl
+ ld a, [wd11e]
+ ld b, a
+ ld c, 0
+ ld hl, PokedexOrder
+
+.loop ; go through the list until we find an entry with a matching dex number
+ inc c
+ ld a, [hli]
+ cp b
+ jr nz, .loop
+
+ ld a, c
+ ld [wd11e], a
+ pop hl
+ pop bc
+ ret
+
+IndexToPokedex:
+ ; converts the index number at wd11e to a Pokédex number
+ push bc
+ push hl
+ ld a, [wd11e]
+ dec a
+ ld hl, PokedexOrder
+ ld b, 0
+ ld c, a
+ add hl, bc
+ ld a, [hl]
+ ld [wd11e], a
+ pop hl
+ pop bc
+ ret
+
+INCLUDE "data/pokemon/dex_order.asm"
diff --git a/engine/menus/save.asm b/engine/menus/save.asm
new file mode 100755
index 00000000..bcb27ddf
--- /dev/null
+++ b/engine/menus/save.asm
@@ -0,0 +1,682 @@
+LoadSAV:
+;(if carry -> write
+;"the file data is destroyed")
+ call ClearScreen
+ call LoadFontTilePatterns
+ call LoadTextBoxTilePatterns
+ call LoadSAV0
+ jr c, .badsum
+ call LoadSAV1
+ jr c, .badsum
+ call LoadSAV2
+ jr c, .badsum
+ ld a, $2 ; good checksum
+ jr .goodsum
+.badsum
+ ld hl, wd730
+ push hl
+ set 6, [hl]
+ ld hl, FileDataDestroyedText
+ call PrintText
+ ld c, 100
+ call DelayFrames
+ pop hl
+ res 6, [hl]
+ ld a, $1 ; bad checksum
+.goodsum
+ ld [wSaveFileStatus], a
+ ret
+
+FileDataDestroyedText:
+ text_far _FileDataDestroyedText
+ text_end
+
+LoadSAV0:
+ call EnableSRAMAndLatchClockData
+ ld a, $1
+ ld [MBC1SRamBank], a
+ ld hl, sPlayerName ; hero name located in SRAM
+ ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV
+ call SAVCheckSum
+ ld c, a
+ ld a, [sMainDataCheckSum] ; SAV's checksum
+ cp c
+ jp z, .checkSumsMatched
+
+; If the computed checksum didn't match the saved on, try again.
+ ld hl, sPlayerName
+ ld bc, sMainDataCheckSum - sPlayerName
+ call SAVCheckSum
+ ld c, a
+ ld a, [sMainDataCheckSum] ; SAV's checksum
+ cp c
+ jp nz, SAVBadCheckSum
+
+.checkSumsMatched
+ ld hl, sPlayerName
+ ld de, wPlayerName
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld hl, sMainData
+ ld de, wMainDataStart
+ ld bc, wMainDataEnd - wMainDataStart
+ call CopyData
+ ld hl, wCurMapTileset
+ set 7, [hl]
+ ld hl, sSpriteData
+ ld de, wSpriteDataStart
+ ld bc, wSpriteDataEnd - wSpriteDataStart
+ call CopyData
+ ld a, [sTilesetType]
+ ldh [hTilesetType], a
+ ld hl, sCurBoxData
+ ld de, wBoxDataStart
+ ld bc, wBoxDataEnd - wBoxDataStart
+ call CopyData
+ and a
+ jp SAVGoodChecksum
+
+LoadSAV1:
+ call EnableSRAMAndLatchClockData
+ ld a, $1
+ ld [MBC1SRamBank], a
+ ld hl, sPlayerName ; hero name located in SRAM
+ ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV
+ call SAVCheckSum
+ ld c, a
+ ld a, [sMainDataCheckSum] ; SAV's checksum
+ cp c
+ jr nz, SAVBadCheckSum
+ ld hl, sCurBoxData
+ ld de, wBoxDataStart
+ ld bc, wBoxDataEnd - wBoxDataStart
+ call CopyData
+ and a
+ jp SAVGoodChecksum
+
+LoadSAV2:
+ call EnableSRAMAndLatchClockData
+ ld a, $1
+ ld [MBC1SRamBank], a
+ ld hl, sPlayerName ; hero name located in SRAM
+ ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV
+ call SAVCheckSum
+ ld c, a
+ ld a, [sMainDataCheckSum] ; SAV's checksum
+ cp c
+ jp nz, SAVBadCheckSum
+ ld hl, sPartyData
+ ld de, wPartyDataStart
+ ld bc, wPartyDataEnd - wPartyDataStart
+ call CopyData
+ ld hl, sMainData
+ ld de, wPokedexOwned
+ ld bc, wPokedexSeenEnd - wPokedexOwned
+ call CopyData
+ and a
+ jp SAVGoodChecksum
+
+SAVBadCheckSum:
+ scf
+
+SAVGoodChecksum:
+ call DisableSRAMAndPrepareClockData
+ ret
+
+LoadSAVIgnoreBadCheckSum:
+; unused function that loads save data and ignores bad checksums
+ call LoadSAV0
+ call LoadSAV1
+ jp LoadSAV2
+
+SaveSAV:
+ farcall PrintSaveScreenText
+ ld c, 10
+ call DelayFrames
+ ld hl, WouldYouLikeToSaveText
+ call SaveSAVConfirm
+ and a ;|0 = Yes|1 = No|
+ ret nz
+ ld c, 10
+ call DelayFrames
+ ld a, [wSaveFileStatus]
+ cp $1
+ jr z, .save
+ call SAVCheckRandomID
+ jr z, .save
+ ld hl, OlderFileWillBeErasedText
+ call SaveSAVConfirm
+ and a
+ ret nz
+.save
+ call SaveSAVtoSRAM
+ ld hl, SavingText
+ call PrintText
+ ld c, 128
+ call DelayFrames
+ ld hl, GameSavedText
+ call PrintText
+ ld c, 10
+ call DelayFrames
+ ld a, SFX_SAVE
+ call PlaySoundWaitForCurrent
+ call WaitForSoundToFinish
+ ld c, 30
+ call DelayFrames
+ ret
+
+SaveSAVConfirm:
+ call PrintText
+ hlcoord 0, 7
+ lb bc, 8, 1
+ ld a, TWO_OPTION_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID ; yes/no menu
+ ld a, [wCurrentMenuItem]
+ ret
+
+WouldYouLikeToSaveText:
+ text_far _WouldYouLikeToSaveText
+ text_end
+
+SavingText:
+ text_far _SavingText
+ text_end
+
+GameSavedText:
+ text_far _GameSavedText
+ text_end
+
+OlderFileWillBeErasedText:
+ text_far _OlderFileWillBeErasedText
+ text_end
+
+SaveSAVtoSRAM0:
+ call EnableSRAMAndLatchClockData
+ ld a, $1
+ ld [MBC1SRamBank], a
+ ld hl, wPlayerName
+ ld de, sPlayerName
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld hl, wMainDataStart
+ ld de, sMainData
+ ld bc, wMainDataEnd - wMainDataStart
+ call CopyData
+ ld hl, wSpriteDataStart
+ ld de, sSpriteData
+ ld bc, wSpriteDataEnd - wSpriteDataStart
+ call CopyData
+ ld hl, wBoxDataStart
+ ld de, sCurBoxData
+ ld bc, wBoxDataEnd - wBoxDataStart
+ call CopyData
+ ldh a, [hTilesetType]
+ ld [sTilesetType], a
+ ld hl, sPlayerName
+ ld bc, sMainDataCheckSum - sPlayerName
+ call SAVCheckSum
+ ld [sMainDataCheckSum], a
+ call DisableSRAMAndPrepareClockData
+ ret
+
+SaveSAVtoSRAM1:
+; stored pokémon
+ call EnableSRAMAndLatchClockData
+ ld a, $1
+ ld [MBC1SRamBank], a
+ ld hl, wBoxDataStart
+ ld de, sCurBoxData
+ ld bc, wBoxDataEnd - wBoxDataStart
+ call CopyData
+ ld hl, sPlayerName
+ ld bc, sMainDataCheckSum - sPlayerName
+ call SAVCheckSum
+ ld [sMainDataCheckSum], a
+ call DisableSRAMAndPrepareClockData
+ ret
+
+SaveSAVtoSRAM2:
+ call EnableSRAMAndLatchClockData
+ ld a, $1
+ ld [MBC1SRamBank], a
+ ld hl, wPartyDataStart
+ ld de, sPartyData
+ ld bc, wPartyDataEnd - wPartyDataStart
+ call CopyData
+ ld hl, wPokedexOwned ; pokédex only
+ ld de, sMainData
+ ld bc, wPokedexSeenEnd - wPokedexOwned
+ call CopyData
+ ld hl, wPikachuHappiness
+ ld de, sMainData + $179
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hl]
+ ld [de], a
+ ld hl, sPlayerName
+ ld bc, sMainDataCheckSum - sPlayerName
+ call SAVCheckSum
+ ld [sMainDataCheckSum], a
+ call DisableSRAMAndPrepareClockData
+ ret
+
+SaveSAVtoSRAM::
+ ld a, $2
+ ld [wSaveFileStatus], a
+ call SaveSAVtoSRAM0
+ call SaveSAVtoSRAM1
+ jp SaveSAVtoSRAM2
+
+SAVCheckSum:
+;Check Sum (result[1 byte] is complemented)
+ ld d, 0
+.loop
+ ld a, [hli]
+ add d
+ ld d, a
+ dec bc
+ ld a, b
+ or c
+ jr nz, .loop
+ ld a, d
+ cpl
+ ret
+
+CalcIndividualBoxCheckSums:
+ ld hl, sBox1 ; sBox7
+ ld de, sBank2IndividualBoxChecksums ; sBank3IndividualBoxChecksums
+ ld b, NUM_BOXES / 2
+.loop
+ push bc
+ push de
+ ld bc, wBoxDataEnd - wBoxDataStart
+ call SAVCheckSum
+ pop de
+ ld [de], a
+ inc de
+ pop bc
+ dec b
+ jr nz, .loop
+ ret
+
+GetBoxSRAMLocation:
+; in: a = box num
+; out: b = box SRAM bank, hl = pointer to start of box
+ ld hl, BoxSRAMPointerTable
+ ld a, [wCurrentBoxNum]
+ and $7f
+ cp NUM_BOXES / 2
+ ld b, 2
+ jr c, .next
+ inc b
+ sub NUM_BOXES / 2
+.next
+ ld e, a
+ ld d, 0
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ret
+
+BoxSRAMPointerTable:
+ dw sBox1 ; sBox7
+ dw sBox2 ; sBox8
+ dw sBox3 ; sBox9
+ dw sBox4 ; sBox10
+ dw sBox5 ; sBox11
+ dw sBox6 ; sBox12
+
+ChangeBox::
+ ld hl, WhenYouChangeBoxText
+ call PrintText
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ ret nz ; return if No was chosen
+ ld hl, wCurrentBoxNum
+ bit 7, [hl] ; is it the first time player is changing the box?
+ call z, EmptyAllSRAMBoxes ; if so, empty all boxes in SRAM
+ call DisplayChangeBoxMenu
+ call UpdateSprites
+ ld hl, hFlagsFFFA
+ set 1, [hl]
+ call HandleMenuInput
+ ld hl, hFlagsFFFA
+ res 1, [hl]
+ bit 1, a ; pressed b
+ ret nz
+ ld a, $b6
+ call PlaySoundWaitForCurrent
+ call WaitForSoundToFinish
+ call GetBoxSRAMLocation
+ ld e, l
+ ld d, h
+ 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, wBoxDataStart
+ call CopyBoxToOrFromSRAM ; copy new box from SRAM to WRAM
+ ld hl, wMapTextPtr
+ ld de, wChangeBoxSavedMapTextPointer
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hl]
+ ld [de], a
+ call RestoreMapTextPointer
+ call SaveSAVtoSRAM
+ ld hl, wChangeBoxSavedMapTextPointer
+ call SetMapTextPointer
+ ret
+
+WhenYouChangeBoxText:
+ text_far _WhenYouChangeBoxText
+ text_end
+
+CopyBoxToOrFromSRAM:
+; copy an entire box from hl to de with b as the SRAM bank
+ push hl
+ call EnableSRAMAndLatchClockData
+ ld a, b
+ ld [MBC1SRamBank], a
+ ld bc, wBoxDataEnd - wBoxDataStart
+ call CopyData
+ pop hl
+
+; mark the memory that the box was copied from as am empty box
+ xor a
+ ld [hli], a
+ dec a
+ ld [hl], a
+
+ ld hl, sBox1 ; sBox7
+ ld bc, sBank2AllBoxesChecksum - sBox1
+ call SAVCheckSum
+ ld [sBank2AllBoxesChecksum], a ; sBank3AllBoxesChecksum
+ call CalcIndividualBoxCheckSums
+ call DisableSRAMAndPrepareClockData
+ ret
+
+DisplayChangeBoxMenu:
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ ld a, A_BUTTON | B_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, 11
+ ld [wMaxMenuItem], a
+ ld a, 1
+ ld [wTopMenuItemY], a
+ ld a, 12
+ ld [wTopMenuItemX], a
+ xor a
+ ld [wMenuWatchMovingOutOfBounds], a
+ ld a, [wCurrentBoxNum]
+ and $7f
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ hlcoord 0, 0
+ lb bc, 2, 9
+ call TextBoxBorder
+ ld hl, ChooseABoxText
+ call PrintText
+ hlcoord 11, 0
+ lb bc, 12, 7
+ call TextBoxBorder
+ ld hl, hFlagsFFFA
+ set 2, [hl]
+ ld de, BoxNames
+ hlcoord 13, 1
+ call PlaceString
+ ld hl, hFlagsFFFA
+ res 2, [hl]
+ ld a, [wCurrentBoxNum]
+ and $7f
+ cp 9
+ jr c, .singleDigitBoxNum
+ sub 9
+ hlcoord 8, 2
+ ld [hl], "1"
+ add "0"
+ jr .next
+.singleDigitBoxNum
+ add "1"
+.next
+ ldcoord_a 9, 2
+ hlcoord 1, 2
+ ld de, BoxNoText
+ call PlaceString
+ call GetMonCountsForAllBoxes
+ hlcoord 18, 1
+ ld de, wBoxMonCounts
+ ld bc, SCREEN_WIDTH
+ ld a, $c
+.loop
+ push af
+ ld a, [de]
+ and a ; is the box empty?
+ jr z, .skipPlacingPokeball
+ ld [hl], $78 ; place pokeball tile next to box name if box not empty
+.skipPlacingPokeball
+ add hl, bc
+ inc de
+ pop af
+ dec a
+ jr nz, .loop
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ ret
+
+ChooseABoxText:
+ text_far _ChooseABoxText
+ text_end
+
+BoxNames:
+ db "BOX 1"
+ next "BOX 2"
+ next "BOX 3"
+ next "BOX 4"
+ next "BOX 5"
+ next "BOX 6"
+ next "BOX 7"
+ next "BOX 8"
+ next "BOX 9"
+ next "BOX10"
+ next "BOX11"
+ next "BOX12@"
+
+BoxNoText:
+ db "BOX No.@"
+
+EmptyAllSRAMBoxes:
+; marks all boxes in SRAM as empty (initialisation for the first time the
+; player changes the box)
+ call EnableSRAMAndLatchClockData
+ ld a, 2
+ ld [MBC1SRamBank], a
+ call EmptySRAMBoxesInBank
+ ld a, 3
+ ld [MBC1SRamBank], a
+ call EmptySRAMBoxesInBank
+ call DisableSRAMAndPrepareClockData
+ ret
+
+EmptySRAMBoxesInBank:
+; marks every box in the current SRAM bank as empty
+ ld hl, sBox1 ; sBox7
+ call EmptySRAMBox
+ ld hl, sBox2 ; sBox8
+ call EmptySRAMBox
+ ld hl, sBox3 ; sBox9
+ call EmptySRAMBox
+ ld hl, sBox4 ; sBox10
+ call EmptySRAMBox
+ ld hl, sBox5 ; sBox11
+ call EmptySRAMBox
+ ld hl, sBox6 ; sBox12
+ call EmptySRAMBox
+ ld hl, sBox1 ; sBox7
+ ld bc, sBank2AllBoxesChecksum - sBox1
+ call SAVCheckSum
+ ld [sBank2AllBoxesChecksum], a ; sBank3AllBoxesChecksum
+ call CalcIndividualBoxCheckSums
+ ret
+
+EmptySRAMBox:
+ xor a
+ ld [hli], a
+ dec a
+ ld [hl], a
+ ret
+
+GetMonCountsForAllBoxes:
+ ld hl, wBoxMonCounts
+ push hl
+ call EnableSRAMAndLatchClockData
+ ld a, $2
+ ld [MBC1SRamBank], a
+ call GetMonCountsForBoxesInBank
+ ld a, $3
+ ld [MBC1SRamBank], a
+ call GetMonCountsForBoxesInBank
+ call DisableSRAMAndPrepareClockData
+ pop hl
+
+; copy the count for the current box from WRAM
+ ld a, [wCurrentBoxNum]
+ and $7f
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [wNumInBox]
+ ld [hl], a
+
+ ret
+
+GetMonCountsForBoxesInBank:
+ ld a, [sBox1] ; sBox7
+ ld [hli], a
+ ld a, [sBox2] ; sBox8
+ ld [hli], a
+ ld a, [sBox3] ; sBox9
+ ld [hli], a
+ ld a, [sBox4] ; sBox10
+ ld [hli], a
+ ld a, [sBox5] ; sBox11
+ ld [hli], a
+ ld a, [sBox6] ; sBox12
+ ld [hli], a
+ ret
+
+SAVCheckRandomID:
+; checks if Sav file is the same by checking player's name 1st letter
+; and the two random numbers generated at game beginning
+; (which are stored at wPlayerID)s
+ call EnableSRAMAndLatchClockData
+ ld a, $01
+ ld [MBC1SRamBank], a
+ ld a, [sPlayerName]
+ and a
+ jr z, .next
+ ld hl, sPlayerName
+ ld bc, sMainDataCheckSum - sPlayerName
+ call SAVCheckSum
+ ld c, a
+ ld a, [sMainDataCheckSum]
+ cp c
+ jr nz, .next
+ ld hl, sMainData + (wPlayerID - wMainDataStart) ; player ID
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [wPlayerID]
+ cp l
+ jr nz, .next
+ ld a, [wPlayerID + 1]
+ cp h
+.next
+ ld a, $00
+ ld [MBC1SRamBankingMode], a
+ ld [MBC1SRamEnable], a
+ ret
+
+SaveHallOfFameTeams:
+ ld a, [wNumHoFTeams]
+ dec a
+ cp HOF_TEAM_CAPACITY
+ jr nc, .shiftHOFTeams
+ ld hl, sHallOfFame
+ ld bc, HOF_TEAM
+ call AddNTimes
+ ld e, l
+ ld d, h
+ ld hl, wHallOfFame
+ ld bc, HOF_TEAM
+ jr HallOfFame_Copy
+
+.shiftHOFTeams
+; if the space designated for HOF teams is full, then shift all HOF teams to the next slot, making space for the new HOF team
+; this deletes the last HOF team though
+ ld hl, sHallOfFame + HOF_TEAM
+ ld de, sHallOfFame
+ ld bc, HOF_TEAM * (HOF_TEAM_CAPACITY - 1)
+ call HallOfFame_Copy
+ ld hl, wHallOfFame
+ ld de, sHallOfFame + HOF_TEAM * (HOF_TEAM_CAPACITY - 1)
+ ld bc, HOF_TEAM
+ jr HallOfFame_Copy
+
+LoadHallOfFameTeams:
+ ld hl, sHallOfFame
+ ld bc, HOF_TEAM
+ ld a, [wHoFTeamIndex]
+ call AddNTimes
+ ld de, wHallOfFame
+ ld bc, HOF_TEAM
+ ; fallthrough
+
+HallOfFame_Copy:
+ call EnableSRAMAndLatchClockData
+ xor a
+ ld [MBC1SRamBank], a
+ call CopyData
+ call DisableSRAMAndPrepareClockData
+ ret
+
+ClearSAV:
+ call EnableSRAMAndLatchClockData
+ ld a, $4
+.loop
+ dec a
+ push af
+ call PadSRAM_FF
+ pop af
+ jr nz, .loop
+ call DisableSRAMAndPrepareClockData
+ ret
+
+PadSRAM_FF:
+ ld [MBC1SRamBank], a
+ ld hl, SRAM_Begin
+ ld bc, SRAM_End - SRAM_Begin
+ ld a, $ff
+ jp FillMemory
+
+EnableSRAMAndLatchClockData:
+ ld a, $1
+ ld [MBC1SRamBankingMode], a
+ ld a, SRAM_ENABLE
+ ld [MBC1SRamEnable], a
+ ret
+
+DisableSRAMAndPrepareClockData:
+ ld a, SRAM_DISABLE
+ ld [MBC1SRamBankingMode], a
+ ld [MBC1SRamEnable], a
+ ret
diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm
new file mode 100755
index 00000000..84583a69
--- /dev/null
+++ b/engine/menus/start_sub_menus.asm
@@ -0,0 +1,825 @@
+StartMenu_Pokedex::
+ predef ShowPokedexMenu
+ call LoadScreenTilesFromBuffer2 ; restore saved screen
+ call Delay3
+ call LoadGBPal
+ call UpdateSprites
+ jp RedisplayStartMenu
+
+StartMenu_Pokemon::
+ ld a, [wPartyCount]
+ and a
+ jp z, RedisplayStartMenu
+ xor a
+ ld [wMenuItemToSwap], a
+ ld [wPartyMenuTypeOrMessageID], a
+ ld [wUpdateSpritesEnabled], a
+ call DisplayPartyMenu
+ jr .checkIfPokemonChosen
+.loop
+ xor a
+ ld [wMenuItemToSwap], a
+ ld [wPartyMenuTypeOrMessageID], a
+ call GoBackToPartyMenu
+.checkIfPokemonChosen
+ jr nc, .chosePokemon
+.exitMenu
+ call GBPalWhiteOutWithDelay3
+ call RestoreScreenTilesAndReloadTilePatterns
+ call LoadGBPal
+ jp RedisplayStartMenu
+.chosePokemon
+ call SaveScreenTilesToBuffer1
+ ld a, FIELD_MOVE_MON_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID ; display pokemon menu options
+ ld hl, wFieldMoves
+ lb bc, 2, 12 ; max menu item ID, top menu item Y
+ ld e, 5
+.adjustMenuVariablesLoop
+ dec e
+ jr z, .storeMenuVariables
+ ld a, [hli]
+ and a ; end of field moves?
+ jr z, .storeMenuVariables
+ inc b
+ dec c
+ dec c
+ jr .adjustMenuVariablesLoop
+.storeMenuVariables
+ ld hl, wTopMenuItemY
+ ld a, c
+ ld [hli], a ; top menu item Y
+ ldh a, [hFieldMoveMonMenuTopMenuItemX]
+ ld [hli], a ; top menu item X
+ xor a
+ ld [hli], a ; current menu item ID
+ inc hl
+ ld a, b
+ ld [hli], a ; max menu item ID
+ ld a, A_BUTTON | B_BUTTON
+ ld [hli], a ; menu watched keys
+ xor a
+ ld [hl], a
+ call HandleMenuInput
+ push af
+ call LoadScreenTilesFromBuffer1 ; restore saved screen
+ pop af
+ bit 1, a ; was the B button pressed?
+ jp nz, .loop
+; if the B button wasn't pressed
+ ld a, [wMaxMenuItem]
+ ld b, a
+ ld a, [wCurrentMenuItem] ; menu selection
+ cp b
+ jp z, .exitMenu ; if the player chose Cancel
+ dec b
+ cp b
+ jr z, .choseSwitch
+ dec b
+ cp b
+ jp z, .choseStats
+ ld c, a
+ ld b, 0
+ ld hl, wFieldMoves
+ add hl, bc
+ jp .choseOutOfBattleMove
+.choseSwitch
+ ld a, [wPartyCount]
+ cp 2 ; is there more than one pokemon in the party?
+ jp c, StartMenu_Pokemon ; if not, no switching
+ call SwitchPartyMon_InitVarOrSwapData ; init [wMenuItemToSwap]
+ ld a, SWAP_MONS_PARTY_MENU
+ ld [wPartyMenuTypeOrMessageID], a
+ call GoBackToPartyMenu
+ jp .checkIfPokemonChosen
+.choseStats
+ call ClearSprites
+ xor a ; PLAYER_PARTY_DATA
+ ld [wMonDataLocation], a
+ predef StatusScreen
+ predef StatusScreen2
+ call ReloadMapData
+ jp StartMenu_Pokemon
+.choseOutOfBattleMove
+ push hl
+ ld a, [wWhichPokemon]
+ ld hl, wPartyMonNicks
+ call GetPartyMonName
+ pop hl
+ ld a, [hl]
+ dec a
+ add a
+ ld b, 0
+ ld c, a
+ ld hl, .outOfBattleMovePointers
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [wObtainedBadges] ; badges obtained
+ jp hl
+.outOfBattleMovePointers
+ dw .cut
+ dw .fly
+ dw .surf
+ dw .surf
+ dw .strength
+ dw .flash
+ dw .dig
+ dw .teleport
+ dw .softboiled
+.fly
+ bit BIT_THUNDERBADGE, a
+ jp z, .newBadgeRequired
+ call CheckIfInOutsideMap
+ jr z, .canFly
+ ld a, [wWhichPokemon]
+ ld hl, wPartyMonNicks
+ call GetPartyMonName
+ ld hl, .cannotFlyHereText
+ call PrintText
+ jp .loop
+.canFly
+ call ChooseFlyDestination
+ ld a, [wd732]
+ bit 3, a ; did the player decide to fly?
+ jr nz, .asm_5d4c
+ call LoadFontTilePatterns
+ ld hl, wd72e
+ set 1, [hl]
+ jp StartMenu_Pokemon
+.asm_5d4c
+ call Func_1510
+ jp .goBackToMap
+.cut
+ bit BIT_CASCADEBADGE, a
+ jp z, .newBadgeRequired
+ predef UsedCut
+ ld a, [wActionResultOrTookBattleTurn]
+ and a
+ jp z, .loop
+ jp CloseTextDisplay
+.surf
+ bit BIT_SOULBADGE, a
+ jp z, .newBadgeRequired
+ farcall IsSurfingAllowed
+ ld hl, wd728
+ bit 1, [hl]
+ res 1, [hl]
+ jp z, .loop
+ ld a, [wcf91]
+ cp PIKACHU ; is this surfing pikachu?
+ jr z, .surfingPikachu
+ ld a, $1
+ jr .continue
+.surfingPikachu
+ ld a, $2
+.continue
+ ld [wd473], a
+ ld a, SURFBOARD
+ ld [wcf91], a
+ ld [wPseudoItemID], a
+ call UseItem
+ ld a, [wActionResultOrTookBattleTurn]
+ and a
+ jr z, .reloadNormalSprite
+ call GBPalWhiteOutWithDelay3
+ jp .goBackToMap
+.reloadNormalSprite
+ xor a
+ ld [wd473], a
+ jp .loop
+.strength
+ bit BIT_RAINBOWBADGE, a
+ jp z, .newBadgeRequired
+ predef PrintStrengthTxt
+ call GBPalWhiteOutWithDelay3
+ jp .goBackToMap
+.flash
+ bit BIT_BOULDERBADGE, a
+ jp z, .newBadgeRequired
+ xor a
+ ld [wMapPalOffset], a
+ ld hl, .flashLightsAreaText
+ call PrintText
+ call GBPalWhiteOutWithDelay3
+ jp .goBackToMap
+.flashLightsAreaText
+ text_far _FlashLightsAreaText
+ text_end
+.dig
+ ld a, ESCAPE_ROPE
+ ld [wcf91], a
+ ld [wPseudoItemID], a
+ call UseItem
+ ld a, [wActionResultOrTookBattleTurn]
+ and a
+ jp z, .loop
+ call GBPalWhiteOutWithDelay3
+ jp .goBackToMap
+.teleport
+ call CheckIfInOutsideMap
+ jr z, .canTeleport
+ ld a, [wWhichPokemon]
+ ld hl, wPartyMonNicks
+ call GetPartyMonName
+ ld hl, .cannotUseTeleportNowText
+ call PrintText
+ jp .loop
+.canTeleport
+ ld hl, .warpToLastPokemonCenterText
+ call PrintText
+ ld hl, wd732
+ set 3, [hl]
+ set 6, [hl]
+ call Func_1510
+ ld hl, wd72e
+ set 1, [hl]
+ res 4, [hl]
+ ld c, 60
+ call DelayFrames
+ call GBPalWhiteOutWithDelay3
+ jp .goBackToMap
+.warpToLastPokemonCenterText
+ text_far _WarpToLastPokemonCenterText
+ text_end
+.cannotUseTeleportNowText
+ text_far _CannotUseTeleportNowText
+ text_end
+.cannotFlyHereText
+ text_far _CannotFlyHereText
+ text_end
+.softboiled
+ ld hl, wPartyMon1MaxHP
+ ld a, [wWhichPokemon]
+ ld bc, wPartyMon2 - wPartyMon1
+ call AddNTimes
+ ld a, [hli]
+ ldh [hDividend], a
+ ld a, [hl]
+ ldh [hDividend + 1], a
+ ld a, 5
+ ldh [hDivisor], a
+ ld b, 2 ; number of bytes
+ call Divide
+ ld bc, wPartyMon1HP - wPartyMon1MaxHP
+ add hl, bc
+ ld a, [hld]
+ ld b, a
+ ldh a, [hQuotient + 3]
+ sub b
+ ld b, [hl]
+ ldh a, [hQuotient + 2]
+ sbc b
+ jp nc, .notHealthyEnough
+ ld a, [wPartyAndBillsPCSavedMenuItem]
+ push af
+ ld a, POTION
+ ld [wcf91], a
+ ld [wPseudoItemID], a
+ call UseItem
+ pop af
+ ld [wPartyAndBillsPCSavedMenuItem], a
+ jp .loop
+.notHealthyEnough ; if current HP is less than 1/5 of max HP
+ ld hl, .notHealthyEnoughText
+ call PrintText
+ jp .loop
+.notHealthyEnoughText
+ text_far _NotHealthyEnoughText
+ text_end
+.goBackToMap
+ call RestoreScreenTilesAndReloadTilePatterns
+ jp CloseTextDisplay
+.newBadgeRequired
+ ld hl, .newBadgeRequiredText
+ call PrintText
+ jp .loop
+.newBadgeRequiredText
+ text_far _NewBadgeRequiredText
+ text_end
+
+; writes a blank tile to all possible menu cursor positions on the party menu
+ErasePartyMenuCursors::
+ hlcoord 0, 1
+ ld bc, 2 * 20 ; menu cursor positions are 2 rows apart
+ ld a, 6 ; 6 menu cursor positions
+.loop
+ ld [hl], " "
+ add hl, bc
+ dec a
+ jr nz, .loop
+ ret
+
+ItemMenuLoop:
+ call LoadScreenTilesFromBuffer2DisableBGTransfer ; restore saved screen
+ call RunDefaultPaletteCommand
+
+StartMenu_Item::
+ ld a, [wLinkState]
+ dec a ; is the player in the Colosseum or Trade Centre?
+ jr nz, .notInCableClubRoom
+ ld hl, CannotUseItemsHereText
+ call PrintText
+ jr .exitMenu
+.notInCableClubRoom
+ ld hl, wListPointer
+ ld [hl], wNumBagItems & $ff
+ inc hl
+ ld [hl], wNumBagItems / $100 ; store item bag pointer in wListPointer (for DisplayListMenuID)
+ xor a
+ ld [wPrintItemPrices], a
+ ld a, ITEMLISTMENU
+ ld [wListMenuID], a
+ ld a, [wBagSavedMenuItem]
+ ld [wCurrentMenuItem], a
+ call DisplayListMenuID
+ ld a, [wCurrentMenuItem]
+ ld [wBagSavedMenuItem], a
+ jr nc, .choseItem
+.exitMenu
+ call LoadScreenTilesFromBuffer2 ; restore saved screen
+ call LoadTextBoxTilePatterns
+ call UpdateSprites
+ jp RedisplayStartMenu
+.choseItem
+; erase menu cursor (blank each tile in front of an item name)
+ ld a, " "
+ ldcoord_a 5, 4
+ ldcoord_a 5, 6
+ ldcoord_a 5, 8
+ ldcoord_a 5, 10
+ call PlaceUnfilledArrowMenuCursor
+ xor a
+ ld [wMenuItemToSwap], a
+ ld a, [wcf91]
+ cp BICYCLE
+ jp z, .useOrTossItem
+.notBicycle1
+ ld a, USE_TOSS_MENU_TEMPLATE
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ ld hl, wTopMenuItemY
+ ld a, 11
+ ld [hli], a ; top menu item Y
+ ld a, 14
+ ld [hli], a ; top menu item X
+ xor a
+ ld [hli], a ; current menu item ID
+ inc hl
+ inc a ; a = 1
+ ld [hli], a ; max menu item ID
+ ld a, A_BUTTON | B_BUTTON
+ ld [hli], a ; menu watched keys
+ xor a
+ ld [hl], a ; old menu item id
+ call HandleMenuInput
+ call PlaceUnfilledArrowMenuCursor
+ bit 1, a ; was the B button pressed?
+ jr z, .useOrTossItem
+ jp ItemMenuLoop
+.useOrTossItem ; if the player made the choice to use or toss the item
+ ld a, [wcf91]
+ ld [wd11e], a
+ call GetItemName
+ call CopyStringToCF4B ; copy name to wcf4b
+ ld a, [wcf91]
+ cp BICYCLE
+ jr nz, .notBicycle2
+ ld a, [wd732]
+ bit 5, a
+ jr z, .useItem_closeMenu
+ ld hl, CannotGetOffHereText
+ call PrintText
+ jp ItemMenuLoop
+.notBicycle2
+ ld a, [wCurrentMenuItem]
+ and a
+ jr nz, .tossItem
+; use item
+ ld [wPseudoItemID], a ; a must be 0 due to above conditional jump
+ ld a, [wcf91]
+ cp HM01
+ jr nc, .useItem_partyMenu
+ ld hl, UsableItems_CloseMenu
+ ld de, 1
+ call IsInArray
+ jr c, .useItem_closeMenu
+ ld a, [wcf91]
+ ld hl, UsableItems_PartyMenu
+ ld de, 1
+ call IsInArray
+ jr c, .useItem_partyMenu
+ call UseItem
+ jp ItemMenuLoop
+.useItem_closeMenu
+ xor a
+ ld [wPseudoItemID], a
+ call UseItem
+ ld a, [wActionResultOrTookBattleTurn]
+ and a
+ jp z, ItemMenuLoop
+ jp CloseStartMenu
+.useItem_partyMenu
+ ld a, [wUpdateSpritesEnabled]
+ push af
+ call UseItem
+ ld a, [wActionResultOrTookBattleTurn]
+ cp $02
+ jp z, .partyMenuNotDisplayed
+ call GBPalWhiteOutWithDelay3
+ call RestoreScreenTilesAndReloadTilePatterns
+ pop af
+ ld [wUpdateSpritesEnabled], a
+ jp StartMenu_Item
+.partyMenuNotDisplayed
+ pop af
+ ld [wUpdateSpritesEnabled], a
+ jp ItemMenuLoop
+.tossItem
+ call IsKeyItem
+ ld a, [wIsKeyItem]
+ and a
+ jr nz, .skipAskingQuantity
+ ld a, [wcf91]
+ call IsItemHM
+ jr c, .skipAskingQuantity
+ call DisplayChooseQuantityMenu
+ inc a
+ jr z, .tossZeroItems
+.skipAskingQuantity
+ ld hl, wNumBagItems
+ call TossItem
+.tossZeroItems
+ jp ItemMenuLoop
+
+CannotUseItemsHereText:
+ text_far _CannotUseItemsHereText
+ text_end
+
+CannotGetOffHereText:
+ text_far _CannotGetOffHereText
+ text_end
+
+INCLUDE "data/items/use_party.asm"
+
+INCLUDE "data/items/use_overworld.asm"
+
+StartMenu_TrainerInfo::
+ call GBPalWhiteOut
+ call ClearScreen
+ call UpdateSprites
+ ldh a, [hTilesetType]
+ push af
+ xor a
+ ldh [hTilesetType], a
+ call DrawTrainerInfo
+ predef DrawBadges ; draw badges
+ 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 RunDefaultPaletteCommand
+ call ReloadMapData
+ farcall DrawStartMenu ; XXX what difference does this make?
+ call LoadGBPal
+ pop af
+ ldh [hTilesetType], a
+ jp RedisplayStartMenu_DoNotDrawStartMenu
+
+; loads tile patterns and draws everything except for gym leader faces / badges
+DrawTrainerInfo:
+ ld de, RedPicFront
+ lb bc, BANK(RedPicFront), $01
+ predef DisplayPicCenteredOrUpperRight
+ call DisableLCD
+ hlcoord 0, 2
+ ld a, " "
+ call TrainerInfo_DrawVerticalLine
+ hlcoord 1, 2
+ call TrainerInfo_DrawVerticalLine
+ ld hl, vChars2 tile $07
+ ld de, vChars2 tile $00
+ ld bc, $1c tiles
+ call CopyData
+ ld hl, TrainerInfoTextBoxTileGraphics ; trainer info text box tile patterns
+ ld de, vChars2 tile $77
+ ld bc, 8 tiles
+ push bc
+ call TrainerInfo_FarCopyData
+ ld hl, BlankLeaderNames
+ ld de, vChars2 tile $60
+ ld bc, $17 tiles
+ call TrainerInfo_FarCopyData
+ pop bc
+ ld hl, BadgeNumbersTileGraphics ; badge number tile patterns
+ ld de, vChars1 tile $58
+ call TrainerInfo_FarCopyData
+ ld hl, GymLeaderFaceAndBadgeTileGraphics ; gym leader face and badge tile patterns
+ ld de, vChars2 tile $20
+ ld bc, 8 * 8 tiles
+ ld a, BANK(GymLeaderFaceAndBadgeTileGraphics)
+ call FarCopyData
+ ld hl, TextBoxGraphics
+ ld de, 13 tiles
+ add hl, de ; hl = colon tile pattern
+ ld de, vChars1 tile $56
+ ld bc, 1 tiles
+ ld a, BANK(TextBoxGraphics)
+ push bc
+ call FarCopyData
+ pop bc
+ ld hl, TrainerInfoTextBoxTileGraphics tile 8 ; background tile pattern
+ ld de, vChars1 tile $57
+ call TrainerInfo_FarCopyData
+ call EnableLCD
+ ld hl, wTrainerInfoTextBoxWidthPlus1
+ ld a, 18 + 1
+ ld [hli], a
+ dec a
+ ld [hli], a
+ ld [hl], 1
+ hlcoord 0, 0
+ call TrainerInfo_DrawTextBox
+ ld hl, wTrainerInfoTextBoxWidthPlus1
+ ld a, 16 + 1
+ ld [hli], a
+ dec a
+ ld [hli], a
+ ld [hl], 3
+ hlcoord 1, 10
+ call TrainerInfo_DrawTextBox
+ hlcoord 0, 10
+ ld a, $d7
+ call TrainerInfo_DrawVerticalLine
+ hlcoord 19, 10
+ call TrainerInfo_DrawVerticalLine
+ hlcoord 6, 9
+ ld de, TrainerInfo_BadgesText
+ call PlaceString
+ hlcoord 2, 2
+ ld de, TrainerInfo_NameMoneyTimeText
+ call PlaceString
+ hlcoord 7, 2
+ ld de, wPlayerName
+ call PlaceString
+ hlcoord 8, 4
+ ld de, wPlayerMoney
+ ld c, $e3
+ call PrintBCDNumber
+ hlcoord 9, 6
+ ld de, wPlayTimeHours ; hours
+ lb bc, LEFT_ALIGN | 1, 3
+ call PrintNumber
+ ld [hl], $d6 ; colon tile ID
+ inc hl
+ ld de, wPlayTimeMinutes ; minutes
+ lb bc, LEADING_ZEROES | 1, 2
+ jp PrintNumber
+
+TrainerInfo_FarCopyData:
+ ld a, BANK(TrainerInfoTextBoxTileGraphics)
+ jp FarCopyData
+
+TrainerInfo_NameMoneyTimeText:
+ db "NAME/"
+ next "MONEY/"
+ next "TIME/@"
+
+; $76 is a circle tile
+TrainerInfo_BadgesText:
+ db $76,"BADGES",$76,"@"
+
+; draws a text box on the trainer info screen
+; height is always 6
+; INPUT:
+; hl = destination address
+; [wTrainerInfoTextBoxWidthPlus1] = width
+; [wTrainerInfoTextBoxWidth] = width - 1
+; [wTrainerInfoTextBoxNextRowOffset] = distance from the end of a text box row to the start of the next
+TrainerInfo_DrawTextBox:
+ ld a, $79 ; upper left corner tile ID
+ lb de, $7a, $7b ; top edge and upper right corner tile ID's
+ call TrainerInfo_DrawHorizontalEdge ; draw top edge
+ call TrainerInfo_NextTextBoxRow
+ ld a, [wTrainerInfoTextBoxWidthPlus1]
+ ld e, a
+ ld d, 0
+ ld c, 6 ; height of the text box
+.loop
+ ld [hl], $7c ; left edge tile ID
+ add hl, de
+ ld [hl], $78 ; right edge tile ID
+ call TrainerInfo_NextTextBoxRow
+ dec c
+ jr nz, .loop
+ ld a, $7d ; lower left corner tile ID
+ lb de, $77, $7e ; bottom edge and lower right corner tile ID's
+
+TrainerInfo_DrawHorizontalEdge:
+ ld [hli], a ; place left corner tile
+ ld a, [wTrainerInfoTextBoxWidth]
+ ld c, a
+ ld a, d
+.loop
+ ld [hli], a ; place edge tile
+ dec c
+ jr nz, .loop
+ ld a, e
+ ld [hl], a ; place right corner tile
+ ret
+
+TrainerInfo_NextTextBoxRow:
+ ld a, [wTrainerInfoTextBoxNextRowOffset] ; distance to the start of the next row
+.loop
+ inc hl
+ dec a
+ jr nz, .loop
+ ret
+
+; draws a vertical line
+; INPUT:
+; hl = address of top tile in the line
+; a = tile ID
+TrainerInfo_DrawVerticalLine:
+ ld de, SCREEN_WIDTH
+ ld c, 8
+.loop
+ ld [hl], a
+ add hl, de
+ dec c
+ jr nz, .loop
+ ret
+
+StartMenu_SaveReset::
+ ld a, [wd72e]
+ bit 6, a ; is the player using the link feature?
+ jp nz, Init
+ predef SaveSAV ; save the game
+ call LoadScreenTilesFromBuffer2 ; restore saved screen
+ jp HoldTextDisplayOpen
+
+StartMenu_Option::
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ call ClearScreen
+ call UpdateSprites
+ callfar DisplayOptionMenu
+ call LoadScreenTilesFromBuffer2 ; restore saved screen
+ call LoadTextBoxTilePatterns
+ call UpdateSprites
+ jp RedisplayStartMenu
+
+SwitchPartyMon::
+ call SwitchPartyMon_InitVarOrSwapData ; swap data
+ ld a, [wSwappedMenuItem]
+ call SwitchPartyMon_ClearGfx
+ ld a, [wCurrentMenuItem]
+ call SwitchPartyMon_ClearGfx
+ jp RedrawPartyMenu_
+
+SwitchPartyMon_ClearGfx:
+ push af
+ hlcoord 0, 0
+ ld bc, SCREEN_WIDTH * 2
+ call AddNTimes
+ ld c, SCREEN_WIDTH * 2
+ ld a, " "
+.clearMonBGLoop ; clear the mon's row in the party menu
+ ld [hli], a
+ dec c
+ jr nz, .clearMonBGLoop
+ pop af
+ ld hl, wOAMBuffer
+ ld bc, $10
+ call AddNTimes
+ ld de, $4
+ ld c, e
+.clearMonOAMLoop
+ ld [hl], $a0
+ add hl, de
+ dec c
+ jr nz, .clearMonOAMLoop
+ call WaitForSoundToFinish
+ ld a, SFX_SWAP
+ jp PlaySound
+
+SwitchPartyMon_InitVarOrSwapData:
+; This is used to initialise [wMenuItemToSwap] and to actually swap the data.
+ ld a, [wMenuItemToSwap]
+ and a ; has [wMenuItemToSwap] been initialised yet?
+ jr nz, .pickedMonsToSwap
+; If not, initialise [wMenuItemToSwap] so that it matches the current mon.
+ ld a, [wWhichPokemon]
+ inc a ; [wMenuItemToSwap] counts from 1
+ ld [wMenuItemToSwap], a
+ ret
+.pickedMonsToSwap
+ xor a
+ ld [wPartyMenuTypeOrMessageID], a
+ ld a, [wMenuItemToSwap]
+ dec a
+ ld b, a
+ ld a, [wCurrentMenuItem]
+ ld [wSwappedMenuItem], a
+ cp b ; swapping a mon with itself?
+ jr nz, .swappingDifferentMons
+; can't swap a mon with itself
+ xor a
+ ld [wMenuItemToSwap], a
+ ld [wPartyMenuTypeOrMessageID], a
+ ret
+.swappingDifferentMons
+ ld a, b
+ ld [wMenuItemToSwap], a
+ push hl
+ push de
+ ld hl, wPartySpecies
+ ld d, h
+ ld e, l
+ ld a, [wCurrentMenuItem]
+ add l
+ ld l, a
+ jr nc, .noCarry
+ inc h
+.noCarry
+ ld a, [wMenuItemToSwap]
+ add e
+ ld e, a
+ jr nc, .noCarry2
+ inc d
+.noCarry2
+ ld a, [hl]
+ ldh [hSwapTemp], a
+ ld a, [de]
+ ld [hl], a
+ ldh a, [hSwapTemp]
+ ld [de], a
+ ld hl, wPartyMons
+ ld bc, wPartyMon2 - wPartyMon1
+ ld a, [wCurrentMenuItem]
+ call AddNTimes
+ push hl
+ ld de, wSwitchPartyMonTempBuffer
+ ld bc, wPartyMon2 - wPartyMon1
+ call CopyData
+ ld hl, wPartyMons
+ ld bc, wPartyMon2 - wPartyMon1
+ ld a, [wMenuItemToSwap]
+ call AddNTimes
+ pop de
+ push hl
+ ld bc, wPartyMon2 - wPartyMon1
+ call CopyData
+ pop de
+ ld hl, wSwitchPartyMonTempBuffer
+ ld bc, wPartyMon2 - wPartyMon1
+ call CopyData
+ ld hl, wPartyMonOT
+ ld a, [wCurrentMenuItem]
+ call SkipFixedLengthTextEntries
+ push hl
+ ld de, wSwitchPartyMonTempBuffer
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld hl, wPartyMonOT
+ ld a, [wMenuItemToSwap]
+ call SkipFixedLengthTextEntries
+ pop de
+ push hl
+ ld bc, NAME_LENGTH
+ call CopyData
+ pop de
+ ld hl, wSwitchPartyMonTempBuffer
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld hl, wPartyMonNicks
+ ld a, [wCurrentMenuItem]
+ call SkipFixedLengthTextEntries
+ push hl
+ ld de, wSwitchPartyMonTempBuffer
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld hl, wPartyMonNicks
+ ld a, [wMenuItemToSwap]
+ call SkipFixedLengthTextEntries
+ pop de
+ push hl
+ ld bc, NAME_LENGTH
+ call CopyData
+ pop de
+ ld hl, wSwitchPartyMonTempBuffer
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld a, [wMenuItemToSwap]
+ ld [wSwappedMenuItem], a
+ xor a
+ ld [wMenuItemToSwap], a
+ ld [wPartyMenuTypeOrMessageID], a
+ pop de
+ pop hl
+ ret
diff --git a/engine/menus/swap_items.asm b/engine/menus/swap_items.asm
new file mode 100644
index 00000000..2d506ce2
--- /dev/null
+++ b/engine/menus/swap_items.asm
@@ -0,0 +1,149 @@
+HandleItemListSwapping::
+ ld a, [wListMenuID]
+ cp ITEMLISTMENU
+ jp nz, DisplayListMenuIDLoop ; only rearrange item list menus
+ push hl
+ ld hl, wListPointer
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ inc hl ; hl = beginning of list entries
+ ld a, [wCurrentMenuItem]
+ ld b, a
+ ld a, [wListScrollOffset]
+ add b
+ add a
+ ld c, a
+ ld b, 0
+ add hl, bc ; hl = address of currently selected item entry
+ ld a, [hl]
+ pop hl
+ inc a
+ jp z, DisplayListMenuIDLoop ; ignore attempts to swap the Cancel menu item
+ ld a, [wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1)
+ and a ; has the first item to swap already been chosen?
+ jr nz, .swapItems
+; if not, set the currently selected item as the first item
+ ld a, [wCurrentMenuItem]
+ inc a
+ ld b, a
+ ld a, [wListScrollOffset] ; index of top (visible) menu item within the list
+ add b
+ ld [wMenuItemToSwap], a ; ID of item chosen for swapping (counts from 1)
+ ld c, 20
+ call DelayFrames
+ jp DisplayListMenuIDLoop
+.swapItems
+ ld a, [wCurrentMenuItem]
+ inc a
+ ld b, a
+ ld a, [wListScrollOffset]
+ add b
+ ld b, a
+ ld a, [wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1)
+ cp b ; is the currently selected item the same as the first item to swap?
+ jp z, DisplayListMenuIDLoop ; ignore attempts to swap an item with itself
+ dec a
+ ld [wMenuItemToSwap], a ; ID of item chosen for swapping (counts from 1)
+ ld c, 20
+ call DelayFrames
+ push hl
+ push de
+ ld hl, wListPointer
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ inc hl ; hl = beginning of list entries
+ ld d, h
+ ld e, l ; de = beginning of list entries
+ ld a, [wCurrentMenuItem]
+ ld b, a
+ ld a, [wListScrollOffset]
+ add b
+ add a
+ ld c, a
+ ld b, 0
+ add hl, bc ; hl = address of currently selected item entry
+ ld a, [wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1)
+ add a
+ add e
+ ld e, a
+ jr nc, .noCarry
+ inc d
+.noCarry ; de = address of first item to swap
+ ld a, [de]
+ ld b, a
+ ld a, [hli]
+ cp b
+ jr z, .swapSameItemType
+.swapDifferentItems
+ ldh [hSwapItemID], a ; save second item ID
+ ld a, [hld]
+ ldh [hSwapItemQuantity], a ; save second item quantity
+ ld a, [de]
+ ld [hli], a ; put first item ID in second item slot
+ inc de
+ ld a, [de]
+ ld [hl], a ; put first item quantity in second item slot
+ ldh a, [hSwapItemQuantity]
+ ld [de], a ; put second item quantity in first item slot
+ dec de
+ ldh a, [hSwapItemID]
+ ld [de], a ; put second item ID in first item slot
+ xor a
+ ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped
+ pop de
+ pop hl
+ jp DisplayListMenuIDLoop
+.swapSameItemType
+ inc de
+ ld a, [hl]
+ ld b, a
+ ld a, [de]
+ add b ; a = sum of both item quantities
+ cp 100 ; is the sum too big for one item slot?
+ jr c, .combineItemSlots
+; swap enough items from the first slot to max out the second slot if they can't be combined
+ sub 99
+ ld [de], a
+ ld a, 99
+ ld [hl], a
+ jr .done
+.combineItemSlots
+ ld [hl], a ; put the sum in the second item slot
+ ld hl, wListPointer
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ dec [hl] ; decrease the number of items
+ ld a, [hl]
+ ld [wListCount], a ; update number of items variable
+ cp 1
+ jr nz, .skipSettingMaxMenuItemID
+ ld [wMaxMenuItem], a ; if the number of items is only one now, update the max menu item ID
+.skipSettingMaxMenuItemID
+ dec de
+ ld h, d
+ ld l, e
+ inc hl
+ inc hl ; hl = address of item after first item to swap
+.moveItemsUpLoop ; erase the first item slot and move up all the following item slots to fill the gap
+ ld a, [hli]
+ ld [de], a
+ inc de
+ inc a ; reached the $ff terminator?
+ jr z, .afterMovingItemsUp
+ ld a, [hli]
+ ld [de], a
+ inc de
+ jr .moveItemsUpLoop
+.afterMovingItemsUp
+ xor a
+ ld [wListScrollOffset], a
+ ld [wCurrentMenuItem], a
+.done
+ xor a
+ ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped
+ pop de
+ pop hl
+ jp DisplayListMenuIDLoop
diff --git a/engine/menus/text_box.asm b/engine/menus/text_box.asm
new file mode 100644
index 00000000..7a315af2
--- /dev/null
+++ b/engine/menus/text_box.asm
@@ -0,0 +1,533 @@
+; function to draw various text boxes
+DisplayTextBoxID_::
+ ld a, [wTextBoxID]
+ cp TWO_OPTION_MENU
+ jp z, DisplayTwoOptionMenu
+ ld c, a
+ ld hl, TextBoxFunctionTable
+ ld de, 3
+ call SearchTextBoxTable
+ jr c, .functionTableMatch
+ ld hl, TextBoxCoordTable
+ ld de, 5
+ call SearchTextBoxTable
+ jr c, .coordTableMatch
+ ld hl, TextBoxTextAndCoordTable
+ ld de, 9
+ call SearchTextBoxTable
+ jr c, .textAndCoordTableMatch
+.done
+ ret
+.functionTableMatch
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a ; hl = address of function
+ ld de, .done
+ push de
+ jp hl ; jump to the function
+.coordTableMatch
+ call GetTextBoxIDCoords
+ call GetAddressOfScreenCoords
+ call TextBoxBorder
+ ret
+.textAndCoordTableMatch
+ call GetTextBoxIDCoords
+ push hl
+ call GetAddressOfScreenCoords
+ call TextBoxBorder
+ pop hl
+ call GetTextBoxIDText
+ ld a, [wd730]
+ push af
+ ld a, [wd730]
+ set 6, a ; no pauses between printing each letter
+ ld [wd730], a
+ call PlaceString
+ pop af
+ ld [wd730], a
+ call UpdateSprites
+ ret
+
+; function to search a table terminated with $ff for a byte matching c in increments of de
+; sets carry flag if a match is found and clears carry flag if not
+SearchTextBoxTable:
+ dec de
+.loop
+ ld a, [hli]
+ cp $ff
+ jr z, .notFound
+ cp c
+ jr z, .found
+ add hl, de
+ jr .loop
+.found
+ scf
+.notFound
+ ret
+
+; function to load coordinates from the TextBoxCoordTable or the TextBoxTextAndCoordTable
+; INPUT:
+; hl = address of coordinates
+; OUTPUT:
+; b = height
+; c = width
+; d = row of upper left corner
+; e = column of upper left corner
+GetTextBoxIDCoords:
+ ld a, [hli] ; column of upper left corner
+ ld e, a
+ ld a, [hli] ; row of upper left corner
+ ld d, a
+ ld a, [hli] ; column of lower right corner
+ sub e
+ dec a
+ ld c, a ; c = width
+ ld a, [hli] ; row of lower right corner
+ sub d
+ dec a
+ ld b, a ; b = height
+ ret
+
+; function to load a text address and text coordinates from the TextBoxTextAndCoordTable
+GetTextBoxIDText:
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a ; de = address of text
+ push de ; save text address
+ ld a, [hli]
+ ld e, a ; column of upper left corner of text
+ ld a, [hl]
+ ld d, a ; row of upper left corner of text
+ call GetAddressOfScreenCoords
+ pop de ; restore text address
+ ret
+
+; function to point hl to the screen coordinates
+; INPUT:
+; d = row
+; e = column
+; OUTPUT:
+; hl = address of upper left corner of text box
+GetAddressOfScreenCoords:
+ push bc
+ hlcoord 0, 0
+ ld bc, 20
+.loop ; loop to add d rows to the base address
+ ld a, d
+ and a
+ jr z, .addedRows
+ add hl, bc
+ dec d
+ jr .loop
+.addedRows
+ pop bc
+ add hl, de
+ ret
+
+INCLUDE "data/text_boxes.asm"
+
+DisplayMoneyBox:
+ ld hl, wd730
+ set 6, [hl]
+ ld a, MONEY_BOX_TEMPLATE
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ hlcoord 13, 1
+ lb bc, 1, 6
+ call ClearScreenArea
+ hlcoord 12, 1
+ ld de, wPlayerMoney
+ ld c, $a3
+ call PrintBCDNumber
+ ld hl, wd730
+ res 6, [hl]
+ ret
+
+CurrencyString:
+ db " ¥@"
+
+DoBuySellQuitMenu:
+ ld a, [wd730]
+ set 6, a ; no printing delay
+ ld [wd730], a
+ xor a
+ ld [wChosenMenuItem], a
+ ld a, BUY_SELL_QUIT_MENU_TEMPLATE
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ ld a, A_BUTTON | B_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, $2
+ ld [wMaxMenuItem], a
+ ld a, $1
+ ld [wTopMenuItemY], a
+ ld a, $1
+ ld [wTopMenuItemX], a
+ xor a
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ ld [wMenuWatchMovingOutOfBounds], a
+ ld a, [wd730]
+ res 6, a ; turn on the printing delay
+ ld [wd730], a
+ call HandleMenuInput
+ call PlaceUnfilledArrowMenuCursor
+ bit 0, a ; was A pressed?
+ jr nz, .pressedA
+ bit 1, a ; was B pressed? (always true since only A/B are watched)
+ jr z, .pressedA
+ ld a, CANCELLED_MENU
+ ld [wMenuExitMethod], a
+ jr .quit
+.pressedA
+ ld a, CHOSE_MENU_ITEM
+ ld [wMenuExitMethod], a
+ ld a, [wCurrentMenuItem]
+ ld [wChosenMenuItem], a
+ ld b, a
+ ld a, [wMaxMenuItem]
+ cp b
+ jr z, .quit
+ ret
+.quit
+ ld a, CANCELLED_MENU
+ ld [wMenuExitMethod], a
+ ld a, [wCurrentMenuItem]
+ ld [wChosenMenuItem], a
+ scf
+ ret
+
+; displays a menu with two options to choose from
+; b = Y of upper left corner of text region
+; c = X of upper left corner of text region
+; hl = address where the text box border should be drawn
+DisplayTwoOptionMenu:
+ push hl
+ ld a, [wd730]
+ set 6, a ; no printing delay
+ ld [wd730], a
+
+; pointless because both values are overwritten before they are read
+ xor a
+ ld [wChosenMenuItem], a
+ ld [wMenuExitMethod], a
+
+ ld a, A_BUTTON | B_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, $1
+ ld [wMaxMenuItem], a
+ ld a, b
+ ld [wTopMenuItemY], a
+ ld a, c
+ ld [wTopMenuItemX], a
+ xor a
+ ld [wLastMenuItem], a
+ ld [wMenuWatchMovingOutOfBounds], a
+ push hl
+ ld hl, wTwoOptionMenuID
+ bit 7, [hl] ; select second menu item by default?
+ res 7, [hl]
+ jr z, .storeCurrentMenuItem
+ inc a
+.storeCurrentMenuItem
+ ld [wCurrentMenuItem], a
+ pop hl
+ push hl
+ push hl
+ call TwoOptionMenu_SaveScreenTiles
+ ld a, [wTwoOptionMenuID]
+ ld hl, TwoOptionMenuStrings
+ ld e, a
+ ld d, $0
+ ld a, $5
+.menuStringLoop
+ add hl, de
+ dec a
+ jr nz, .menuStringLoop
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ld e, l
+ ld d, h
+ pop hl
+ push de
+ ld a, [wTwoOptionMenuID]
+ cp TRADE_CANCEL_MENU
+ jr nz, .notTradeCancelMenu
+ call CableClub_TextBoxBorder
+ jr .afterTextBoxBorder
+.notTradeCancelMenu
+ call TextBoxBorder
+.afterTextBoxBorder
+ call UpdateSprites
+ pop hl
+ ld a, [hli]
+ and a ; put blank line before first menu item?
+ ld bc, 20 + 2
+ jr z, .noBlankLine
+ ld bc, 2 * 20 + 2
+.noBlankLine
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ pop hl
+ add hl, bc
+ call PlaceString
+ xor a
+ ld [wTwoOptionMenuID], a
+ ld hl, wd730
+ res 6, [hl] ; turn on the printing delay
+ call HandleMenuInput
+ pop hl
+ bit 1, a ; A button pressed?
+ jr nz, .choseSecondMenuItem ; automatically choose the second option if B is pressed
+.pressedAButton
+ ld a, [wCurrentMenuItem]
+ ld [wChosenMenuItem], a
+ and a
+ jr nz, .choseSecondMenuItem
+; chose first menu item
+ ld a, CHOSE_FIRST_ITEM
+ ld [wMenuExitMethod], a
+ ld c, 15
+ call DelayFrames
+ call TwoOptionMenu_RestoreScreenTiles
+ and a
+ ret
+.choseSecondMenuItem
+ ld a, 1
+ ld [wCurrentMenuItem], a
+ ld [wChosenMenuItem], a
+ ld a, CHOSE_SECOND_ITEM
+ ld [wMenuExitMethod], a
+ ld c, 15
+ call DelayFrames
+ call TwoOptionMenu_RestoreScreenTiles
+ scf
+ ret
+
+; Some of the wider/taller two option menus will not have the screen areas
+; they cover be fully saved/restored by the two functions below.
+; The bottom and right edges of the menu may remain after the function returns.
+
+TwoOptionMenu_SaveScreenTiles:
+ ld de, wBuffer
+ lb bc, 5, 6
+.loop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .loop
+ push bc
+ ld bc, SCREEN_WIDTH - 6
+ add hl, bc
+ pop bc
+ ld c, $6
+ dec b
+ jr nz, .loop
+ ret
+
+TwoOptionMenu_RestoreScreenTiles:
+ ld de, wBuffer
+ lb bc, 5, 6
+.loop
+ ld a, [de]
+ inc de
+ ld [hli], a
+ dec c
+ jr nz, .loop
+ push bc
+ ld bc, SCREEN_WIDTH - 6
+ add hl, bc
+ pop bc
+ ld c, 6
+ dec b
+ jr nz, .loop
+ call UpdateSprites
+ ret
+
+INCLUDE "data/yes_no_menu_strings.asm"
+
+DisplayFieldMoveMonMenu:
+ xor a
+ ld hl, wFieldMoves
+ ld [hli], a ; wFieldMoves
+ ld [hli], a ; wFieldMoves + 1
+ ld [hli], a ; wFieldMoves + 2
+ ld [hli], a ; wFieldMoves + 3
+ ld [hli], a ; wNumFieldMoves
+ ld [hl], 12 ; wFieldMovesLeftmostXCoord
+ call GetMonFieldMoves
+ ld a, [wNumFieldMoves]
+ and a
+ jr nz, .fieldMovesExist
+
+; no field moves
+ hlcoord 11, 11
+ lb bc, 5, 7
+ call TextBoxBorder
+ call UpdateSprites
+ ld a, 12
+ ldh [hFieldMoveMonMenuTopMenuItemX], a
+ hlcoord 13, 12
+ ld de, PokemonMenuEntries
+ jp PlaceString
+
+.fieldMovesExist
+ push af
+
+; Calculate the text box position and dimensions based on the leftmost X coord
+; of the field move names before adjusting for the number of field moves.
+ hlcoord 0, 11
+ ld a, [wFieldMovesLeftmostXCoord]
+ dec a
+ ld e, a
+ ld d, 0
+ add hl, de
+ ld b, 5
+ ld a, 18
+ sub e
+ ld c, a
+ pop af
+
+; For each field move, move the top of the text box up 2 rows while the leaving
+; the bottom of the text box at the bottom of the screen.
+ ld de, -SCREEN_WIDTH * 2
+.textBoxHeightLoop
+ add hl, de
+ inc b
+ inc b
+ dec a
+ jr nz, .textBoxHeightLoop
+
+; Make space for an extra blank row above the top field move.
+ ld de, -SCREEN_WIDTH
+ add hl, de
+ inc b
+
+ call TextBoxBorder
+ call UpdateSprites
+
+; Calculate the position of the first field move name to print.
+ hlcoord 0, 12
+ ld a, [wFieldMovesLeftmostXCoord]
+ inc a
+ ld e, a
+ ld d, 0
+ add hl, de
+ ld de, -SCREEN_WIDTH * 2
+ ld a, [wNumFieldMoves]
+.calcFirstFieldMoveYLoop
+ add hl, de
+ dec a
+ jr nz, .calcFirstFieldMoveYLoop
+
+ xor a
+ ld [wNumFieldMoves], a
+ ld de, wFieldMoves
+.printNamesLoop
+ push hl
+ ld hl, FieldMoveNames
+ ld a, [de]
+ and a
+ jr z, .donePrintingNames
+ inc de
+ ld b, a ; index of name
+.skipNamesLoop ; skip past names before the name we want
+ dec b
+ jr z, .reachedName
+.skipNameLoop ; skip past current name
+ ld a, [hli]
+ cp "@"
+ jr nz, .skipNameLoop
+ jr .skipNamesLoop
+.reachedName
+ ld b, h
+ ld c, l
+ pop hl
+ push de
+ ld d, b
+ ld e, c
+ call PlaceString
+ ld bc, SCREEN_WIDTH * 2
+ add hl, bc
+ pop de
+ jr .printNamesLoop
+
+.donePrintingNames
+ pop hl
+ ld a, [wFieldMovesLeftmostXCoord]
+ ldh [hFieldMoveMonMenuTopMenuItemX], a
+ hlcoord 0, 12
+ ld a, [wFieldMovesLeftmostXCoord]
+ inc a
+ ld e, a
+ ld d, 0
+ add hl, de
+ ld de, PokemonMenuEntries
+ jp PlaceString
+
+INCLUDE "data/moves/field_move_names.asm"
+
+PokemonMenuEntries:
+ db "STATS"
+ next "SWITCH"
+ next "CANCEL@"
+
+GetMonFieldMoves:
+ ld a, [wWhichPokemon]
+ ld hl, wPartyMon1Moves
+ ld bc, wPartyMon2 - wPartyMon1
+ call AddNTimes
+ ld d, h
+ ld e, l
+ ld c, NUM_MOVES + 1
+ ld hl, wFieldMoves
+.loop
+ push hl
+.nextMove
+ dec c
+ jr z, .done
+ ld a, [de] ; move ID
+ and a
+ jr z, .done
+ ld b, a
+ inc de
+ ld hl, FieldMoveDisplayData
+.fieldMoveLoop
+ ld a, [hli]
+ cp $ff
+ jr z, .nextMove ; if the move is not a field move
+ cp b
+ jr z, .foundFieldMove
+ inc hl
+ inc hl
+ jr .fieldMoveLoop
+.foundFieldMove
+ ld a, b
+ ld [wLastFieldMoveID], a
+ ld a, [hli] ; field move name index
+ ld b, [hl] ; field move leftmost X coordinate
+ pop hl
+ ld [hli], a ; store name index in wFieldMoves
+ ld a, [wNumFieldMoves]
+ inc a
+ ld [wNumFieldMoves], a
+ ld a, [wFieldMovesLeftmostXCoord]
+ cp b
+ jr c, .skipUpdatingLeftmostXCoord
+ ld a, b
+ ld [wFieldMovesLeftmostXCoord], a
+.skipUpdatingLeftmostXCoord
+ ld a, [wLastFieldMoveID]
+ ld b, a
+ jr .loop
+.done
+ pop hl
+ ret
+
+INCLUDE "data/moves/field_moves.asm"
diff --git a/engine/mon_party_sprites.asm b/engine/mon_party_sprites.asm
deleted file mode 100755
index 6f17f876..00000000
--- a/engine/mon_party_sprites.asm
+++ /dev/null
@@ -1,445 +0,0 @@
-AnimatePartyMon_ForceSpeed1:
- xor a
- ld [wCurrentMenuItem], a
- ld b, a
- inc a
- jr GetAnimationSpeed
-
-; wPartyMenuHPBarColors contains the party mon's health bar colors
-; 0: green
-; 1: yellow
-; 2: red
-AnimatePartyMon:
- ld hl, wPartyMenuHPBarColors
- ld a, [wCurrentMenuItem]
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [hl]
-
-GetAnimationSpeed:
- ld c, a
- ld hl, PartyMonSpeeds
- add hl, bc
- ld a, [wOnSGB]
- xor $1
- add [hl]
- ld c, a
- add a
- ld b, a
- ld a, [wAnimCounter]
- and a
- jr z, .resetSprites
- cp c
- jr z, .animateSprite
-.incTimer
- inc a
- cp b
- jr nz, .skipResetTimer
- xor a ; reset timer
-.skipResetTimer
- ld [wAnimCounter], a
- jp DelayFrame
-.resetSprites
- push bc
- ld hl, wMonPartySpritesSavedOAM
- ld de, wOAMBuffer
- ld bc, $60
- call CopyData
- pop bc
- xor a
- jr .incTimer
-.animateSprite
- push bc
- ld hl, wOAMBuffer + $02 ; OAM tile id
- ld bc, $10
- ld a, [wCurrentMenuItem]
- call AddNTimes
- ld c, $40 ; amount to increase the tile id by
- ld a, [hl]
- cp $4 ; tile ID for SPRITE_BALL_M
- jr z, .editCoords
- cp $8 ; tile ID for SPRITE_HELIX
- jr nz, .editTileIDS
-; SPRITE_BALL_M and SPRITE_HELIX only shake up and down
-.editCoords
- dec hl
- dec hl ; dec hl to the OAM y coord
- ld c, $1 ; amount to increase the y coord by
-; otherwise, load a second sprite frame
-.editTileIDS
- ld b, $4
- ld de, $4
-.loop
- ld a, [hl]
- add c
- ld [hl], a
- add hl, de
- dec b
- jr nz, .loop
- pop bc
- ld a, c
- jr .incTimer
-
-; Party mon animations cycle between 2 frames.
-; The members of the PartyMonSpeeds array specify the number of V-blanks
-; 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:
- db 5, 16, 32
-
-LoadMonPartySpriteGfx:
-; Load mon party sprite tile patterns into VRAM during V-blank.
- ld hl, MonPartySpritePointers
- ld a, $1e
-
-LoadAnimSpriteGfx:
-; Load animated sprite tile patterns into VRAM during V-blank. hl is the address
-; of an array of structures that contain arguments for CopyVideoData and a is
-; the number of structures in the array.
- ld bc, $0
-.loop
- push af
- push bc
- push hl
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call CopyVideoData
- pop hl
- pop bc
- ld a, $6
- add c
- ld c, a
- pop af
- dec a
- jr nz, .loop
- ret
-
-LoadMonPartySpriteGfxWithLCDDisabled:
-; Load mon party sprite tile patterns into VRAM immediately by disabling the
-; LCD.
- call DisableLCD
- ld hl, MonPartySpritePointers
- ld a, $1e
- ld bc, $0
-.loop
- push af
- push bc
- push hl
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- push de
- ld a, [hli]
- ld c, a
- swap c
- ld b, $0
- ld a, [hli]
- ld e, [hl]
- inc hl
- ld d, [hl]
- pop hl
- call FarCopyData
- pop hl
- pop bc
- ld a, $6
- add c
- ld c, a
- pop af
- dec a
- jr nz, .loop
- jp EnableLCD
-
-MonPartySpritePointers:
- dw SlowbroSprite + $c0
- db $40 / $10 ; 40 bytes
- db BANK(SlowbroSprite)
- dw vSprites
-
- dw BallSprite
- db $80 / $10 ; $80 bytes
- db BANK(BallSprite)
- dw vSprites + $40
-
- dw ClefairySprite + $c0
- db $40 / $10 ; $40 bytes
- db BANK(ClefairySprite)
- dw vSprites + $c0
-
- dw BirdSprite + $c0
- db $40 / $10 ; $40 bytes
- db BANK(BirdSprite)
- dw vSprites + $100
-
- dw SeelSprite
- db $40 / $10 ; $40 bytes
- db BANK(SeelSprite)
- dw vSprites + $140
-
- dw MonPartySprites + $40
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $180
-
- dw MonPartySprites + $50
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $1a0
-
- dw MonPartySprites + $60
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $1c0
-
- dw MonPartySprites + $70
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $1e0
-
- dw MonPartySprites + $80
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $200
-
- dw MonPartySprites + $90
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $220
-
- dw MonPartySprites + $A0
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $240
-
- dw MonPartySprites + $B0
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $260
-
- dw PikachuSprite
- db $40 / $10 ; $40 bytes
- db BANK(PikachuSprite)
- dw vSprites + $280
-
- dw MonPartySprites + $100
- db $40 / $10 ; $40 bytes
- db BANK(MonPartySprites)
- dw vSprites + $380
-
- dw SlowbroSprite
- db $40 / $10 ; $40 bytes
- db BANK(SlowbroSprite)
- dw vSprites + $400
-
- dw BallSprite
- db $80 / $10 ; $80 bytes
- db BANK(BallSprite)
- dw vSprites + $440
-
- dw ClefairySprite
- db $40 / $10 ; $40 bytes
- db BANK(ClefairySprite)
- dw vSprites + $4c0
-
- dw BirdSprite
- db $40 / $10 ; $40 bytes
- db BANK(BirdSprite)
- dw vSprites + $500
-
- dw SeelSprite + $C0
- db $40 / $10 ; $40 bytes
- db BANK(SeelSprite)
- dw vSprites + $540
-
- dw MonPartySprites
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $580
-
- dw MonPartySprites + $10
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $5a0
-
- dw MonPartySprites + $20
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $5c0
-
- dw MonPartySprites + $30
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $5E0
-
- dw MonPartySprites + $C0
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $600
-
- dw MonPartySprites + $D0
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $620
-
- dw MonPartySprites + $E0
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $640
-
- dw MonPartySprites + $F0
- db $10 / $10 ; $10 bytes
- db BANK(MonPartySprites)
- dw vSprites + $660
-
- dw PikachuSprite + $C0
- db $40 / $10 ; $40 bytes
- db BANK(PikachuSprite)
- dw vSprites + $680
-
- dw MonPartySprites + $140
- db $40 / $10 ; $40 bytes
- db BANK(MonPartySprites)
- dw vSprites + $780
-
-WriteMonPartySpriteOAMByPartyIndex:
-; Write OAM blocks for the party mon in [hPartyMonIndex].
- push hl
- push de
- push bc
- ld a, [hPartyMonIndex]
- cp $ff
- jr z, .asm_7191f
- ld hl, wPartySpecies
- ld e, a
- ld d, 0
- add hl, de
- ld a, [hl]
- call GetPartyMonSpriteID
- ld [wOAMBaseTile], a
- call WriteMonPartySpriteOAM
- pop bc
- pop de
- pop hl
- ret
-
-.asm_7191f
- ld hl, wOAMBuffer
- ld de, wMonPartySpritesSavedOAM
- ld bc, $60
- call CopyData
- pop bc
- pop de
- pop hl
- ret
-
-WriteMonPartySpriteOAMBySpecies:
-; Write OAM blocks for the party sprite of the species in
-; [wMonPartySpriteSpecies].
- xor a
- ld [hPartyMonIndex], a
- ld a, [wMonPartySpriteSpecies]
- call GetPartyMonSpriteID
- ld [wOAMBaseTile], a
- jr WriteMonPartySpriteOAM
-
-UnusedPartyMonSpriteFunction:
-; This function is unused and doesn't appear to do anything useful. It looks
-; like it may have been intended to load the tile patterns and OAM data for
-; the mon party sprite associated with the species in [wcf91].
-; However, its calculations are off and it loads garbage data.
- ld a, [wcf91]
- call GetPartyMonSpriteID
- push af
- ld hl, vSprites
- call .LoadTilePatterns
- pop af
- add $5A
- ld hl, vSprites + $40
- call .LoadTilePatterns
- xor a
- ld [wMonPartySpriteSpecies], a
- jr WriteMonPartySpriteOAMBySpecies
-
-.LoadTilePatterns
- push hl
- add a
- ld c, a
- ld b, 0
- ld hl, MonPartySpritePointers
- add hl, bc
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- pop hl
- jp CopyVideoData
-
-WriteMonPartySpriteOAM:
-; Write the OAM blocks for the first animation frame into the OAM buffer and
-; make a copy at wMonPartySpritesSavedOAM.
- push af
- ld c, $10
- ld h, wOAMBuffer / $100
- ld a, [hPartyMonIndex]
- swap a
- ld l, a
- add $10
- ld b, a
- pop af
- cp SPRITE_HELIX << 2
- jr z, .helix
- call WriteSymmetricMonPartySpriteOAM
- jr .makeCopy
-.helix
- call WriteAsymmetricMonPartySpriteOAM
-; Make a copy of the OAM buffer with the first animation frame written so that
-; we can flip back to it from the second frame by copying it back.
-.makeCopy
- ld hl, wOAMBuffer
- ld de, wMonPartySpritesSavedOAM
- ld bc, $60
- jp CopyData
-
-GetPartyMonSpriteID:
- ld [wd11e], a
- predef IndexToPokedex
- ld a, [wd11e]
- ld c, a
- dec a
- srl a
- ld hl, MonPartyData
- ld e, a
- ld d, 0
- add hl, de
- ld a, [hl]
- bit 0, c
- jr nz, .skipSwap
- swap a ; use lower nybble if pokedex num is even
-.skipSwap
- and $f0
- srl a
- srl a
- ret
-
-INCLUDE "data/mon_party_sprites.asm"
-
-MonPartySprites:
- INCBIN "gfx/mon_ow_sprites.2bpp"
diff --git a/engine/movie/credits.asm b/engine/movie/credits.asm
new file mode 100755
index 00000000..938579f3
--- /dev/null
+++ b/engine/movie/credits.asm
@@ -0,0 +1,322 @@
+HallOfFamePC:
+ callfar AnimateHallOfFame
+ call ClearScreen
+ ld c, 100
+ call DelayFrames
+
+ call DisableLCD
+ ld a, $a7
+ ldh [rWX], a
+ xor a
+ ldh [rSCX], a
+ ldh [rSCY], a
+ ldh [hSCX], a
+ ldh [hSCY], a
+ ldh [hWY], a
+ ldh [rWY], a
+ call CreditsLoadFont
+ hlcoord 0, 0
+ call FillFourRowsWithBlack
+ hlcoord 0, 14
+ call FillFourRowsWithBlack
+ ld a, %11000000
+ ldh [rBGP], a
+ call UpdateGBCPal_BGP
+ call EnableLCD
+ call StopAllMusic
+ ld hl, vBGMap1
+ call CreditsCopyTileMapToVRAM
+ ld hl, vBGMap0
+ call CreditsCopyTileMapToVRAM
+ ld c, BANK(Music_Credits)
+ ld a, MUSIC_CREDITS
+ call PlayMusic
+ ld c, 128
+ call DelayFrames
+ xor a
+ ld [wHoFMonSpecies], a
+ ld [wNumCreditsMonsDisplayed], a
+ jp Credits
+
+FadeInCreditsText:
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ ld hl, HoFGBPalettes
+ ld b, 4
+.loop
+ ld a, [hli]
+ ldh [rBGP], a
+ call UpdateGBCPal_BGP
+ ld c, 5
+ call DelayFrames
+ dec b
+ jr nz, .loop
+ ret
+
+HoFGBPalettes:
+ db %11000000
+ db %11010000
+ db %11100000
+ db %11110000
+
+DisplayCreditsMon:
+ ld hl, vBGMap1
+ call CreditsCopyTileMapToVRAM
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ ld hl, rLCDC
+ set 3, [hl]
+ call SaveScreenTilesToBuffer2
+ call FillMiddleOfScreenWithWhite
+ call GetNextCreditsMon
+ ld hl, vBGMap0 + 12
+ call CreditsCopyTileMapToVRAM
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ call LoadScreenTilesFromBuffer2DisableBGTransfer
+ ld hl, vBGMap0
+ call CreditsCopyTileMapToVRAM
+ ld a, %11111100 ; make the mon a black silhouette
+ ldh [rBGP], a
+ call UpdateGBCPal_BGP
+ ld hl, rLCDC
+ res 3, [hl]
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ ld b, 0
+ ld c, 10
+ call ScrollCreditsMonLeft
+ call FillLeftHalfOfScreenWithWhite
+ ld c, 10
+ call ScrollCreditsMonLeft
+ call FillRightHalfOfScreenWithWhite
+ ld c, 8
+ call ScrollCreditsMonLeft
+ ld a, %11000000
+ ldh [rBGP], a
+ call UpdateGBCPal_BGP
+ xor a
+ ldh [hSCX], a
+ ret
+
+ScrollCreditsMonLeft:
+ ld a, b
+ ldh [hSCX], a
+ add 8
+ ld b, a
+ call DelayFrame
+ dec c
+ jr nz, ScrollCreditsMonLeft
+ ret
+
+GetNextCreditsMon:
+ ld hl, wNumCreditsMonsDisplayed
+ ld c, [hl]
+ inc [hl]
+ ld b, 0
+ ld hl, CreditsMons
+ add hl, bc
+ ld a, [hl]
+ ld [wcf91], a
+ ld [wd0b5], a
+ hlcoord 8, 6
+ call GetMonHeader
+ call LoadFrontSpriteByMonIndex
+ ret
+
+INCLUDE "data/credits/credits_mons.asm"
+
+CreditsCopyTileMapToVRAM:
+ ld a, l
+ ldh [hAutoBGTransferDest], a
+ ld a, h
+ ldh [hAutoBGTransferDest + 1], a
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ jp Delay3
+
+CreditsLoadFont:
+ call LoadFontTilePatterns
+ ld hl, vChars1
+ ld bc, ($80 tiles) / 2
+ call ZeroMemory
+
+ call LoadTextBoxTilePatterns
+ ld hl, vChars2 tile $60
+ ld bc, ($20 tiles) / 2
+ call ZeroMemory
+
+ ld hl, vChars2 tile $7e
+ ld bc, 1 tiles
+ ld a, $ff ; solid black
+ call FillMemory
+ ret
+
+ZeroMemory:
+; zero bc bytes at hl
+ ld [hl], 0
+ inc hl
+ inc hl
+ dec bc
+ ld a, b
+ or c
+ jr nz, ZeroMemory
+ ret
+
+FillFourRowsWithBlack:
+ ld bc, SCREEN_WIDTH * 4
+ ld a, $7e
+ jp FillMemory
+
+FillMiddleOfScreenWithWhite:
+ hlcoord 0, 4
+ ld bc, SCREEN_WIDTH * 10
+ ld a, " "
+ jp FillMemory
+
+FillLeftHalfOfScreenWithWhite:
+ hlcoord 0, 4
+ push bc
+ call FillHalfOfScreenWithWhite
+ pop bc
+ ret
+
+FillRightHalfOfScreenWithWhite:
+ hlcoord 10, 4
+ push bc
+ call FillHalfOfScreenWithWhite
+ pop bc
+ ret
+
+FillHalfOfScreenWithWhite:
+ ld b, 10
+ ld c, 10
+ ld a, " "
+.loop
+ push bc
+ push hl
+.innerLoop
+ ld [hli], a
+ dec c
+ jr nz, .innerLoop
+ pop hl
+ ld bc, SCREEN_WIDTH
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .loop
+ ret
+
+Credits: ; Roll credits
+ ld de, CreditsOrder
+ push de
+.nextCreditsScreen
+ pop de
+ hlcoord 9, 6
+ push hl
+ call FillMiddleOfScreenWithWhite
+ pop hl
+.nextCreditsCommand
+ ld a, [de]
+ inc de
+ push de
+ cp CRED_TEXT_FADE_MON
+ jr z, .fadeInTextAndShowMon
+ cp CRED_TEXT_MON
+ jr z, .showTextAndShowMon
+ cp CRED_TEXT_FADE
+ jr z, .fadeInText
+ cp CRED_TEXT
+ jr z, .showText
+ cp CRED_COPYRIGHT
+ jr z, .showCopyrightText
+ cp CRED_THE_END
+ jr z, .showTheEnd
+ call PlaceCreditsText
+ pop de
+ jr .nextCreditsCommand
+
+.showCopyrightText
+ farcall LoadCopyrightTiles
+ pop de
+ jr .nextCreditsCommand
+
+
+.fadeInTextAndShowMon
+ call FadeInCreditsText
+ ld c, 102
+ jr .next1
+
+.showTextAndShowMon
+ ld c, 122
+.next1
+ call DelayFrames
+ call DisplayCreditsMon
+ jr .nextCreditsScreen
+
+.fadeInText
+ call FadeInCreditsText
+ ld c, 132
+ jr .next2
+
+.showText
+ ld c, 152
+.next2
+ call DelayFrames
+ jr .nextCreditsScreen
+.showTheEnd
+ call ShowTheEndGFX
+ pop de
+ ret
+
+ShowTheEndGFX:
+ ld c, 24
+ call DelayFrames
+ call FillMiddleOfScreenWithWhite
+ ld de, TheEndGfx
+ ld hl, vChars2 tile $60
+ lb bc, BANK(TheEndGfx), (TheEndGfxEnd - TheEndGfx) / $10
+ call CopyVideoData
+ hlcoord 4, 8
+ ld de, TheEndTextString
+ call PlaceString
+ hlcoord 4, 9
+ inc de
+ call PlaceString
+ jp FadeInCreditsText
+
+TheEndTextString:
+; "T H E E N D"
+ db $60, " ", $62, " ", $64, " ", $64, " ", $66, " ", $68, "@"
+ db $61, " ", $63, " ", $65, " ", $65, " ", $67, " ", $69, "@"
+
+PlaceCreditsText:
+ push hl
+ push hl
+ ld hl, CreditsTextPointers
+ ld c, a
+ ld b, 0
+ add hl, bc
+ add hl, bc
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ pop hl
+ ld a, [de]
+ inc de
+ ld c, a
+ ld b, -1
+ add hl, bc
+ call PlaceString
+ pop hl
+ ld bc, SCREEN_WIDTH * 2
+ add hl, bc
+ ret
+
+INCLUDE "data/credits/credits_order.asm"
+
+INCLUDE "data/credits/credits_text.asm"
+
+TheEndGfx:
+ INCBIN "gfx/credits/the_end.2bpp"
+TheEndGfxEnd:
diff --git a/engine/movie/evolution.asm b/engine/movie/evolution.asm
new file mode 100755
index 00000000..624a7f5f
--- /dev/null
+++ b/engine/movie/evolution.asm
@@ -0,0 +1,156 @@
+EvolveMon:
+ push hl
+ push de
+ push bc
+ ld a, [wcf91]
+ push af
+ ld a, [wd0b5]
+ push af
+ xor a
+ ld [wLowHealthAlarm], a
+ ld [wChannelSoundIDs + Ch5], a
+ call StopAllMusic
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ ld a, SFX_TINK
+ call PlaySound
+ call Delay3
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ ldh [hTilesetType], a
+ ld a, [wEvoOldSpecies]
+ ld [wWholeScreenPaletteMonSpecies], a
+ ld c, 0
+ call EvolutionSetWholeScreenPalette
+ ld a, [wEvoNewSpecies]
+ ld [wcf91], a
+ ld [wd0b5], a
+ call Evolution_LoadPic
+ ld de, vFrontPic
+ ld hl, vBackPic
+ ld bc, 7 * 7
+ call CopyVideoData
+ ld a, [wEvoOldSpecies]
+ ld [wcf91], a
+ ld [wd0b5], a
+ call Evolution_LoadPic
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ ld a, [wEvoOldSpecies]
+ call PlayCry
+ call WaitForSoundToFinish
+ ld c, BANK(Music_SafariZone)
+ ld a, MUSIC_SAFARI_ZONE
+ call PlayMusic
+ ld c, 80
+ call DelayFrames
+ ld c, 1 ; set PAL_BLACK instead of mon palette
+ call EvolutionSetWholeScreenPalette
+ lb bc, $1, $10
+.animLoop
+ push bc
+ call Evolution_CheckForCancel
+ jr c, .evolutionCancelled
+ call Evolution_BackAndForthAnim
+ pop bc
+ inc b
+ dec c
+ dec c
+ jr nz, .animLoop
+ xor a
+ ld [wEvoCancelled], a
+ ld a, $31
+ ld [wEvoMonTileOffset], a
+ call Evolution_ChangeMonPic ; show the new species pic
+ ld a, [wEvoNewSpecies]
+.done
+ ld [wWholeScreenPaletteMonSpecies], a
+ call StopAllMusic
+ ld a, [wWholeScreenPaletteMonSpecies]
+ call PlayCry
+ ld c, 0
+ call EvolutionSetWholeScreenPalette
+ pop af
+ ld [wd0b5], a
+ pop af
+ ld [wcf91], a
+ pop bc
+ pop de
+ pop hl
+ ld a, [wEvoCancelled]
+ and a
+ ret z
+ scf
+ ret
+.evolutionCancelled
+ pop bc
+ ld a, 1
+ ld [wEvoCancelled], a
+ ld a, [wEvoOldSpecies]
+ jr .done
+
+EvolutionSetWholeScreenPalette:
+ ld b, SET_PAL_POKEMON_WHOLE_SCREEN
+ jp RunPaletteCommand
+
+Evolution_LoadPic:
+ call GetMonHeader
+ hlcoord 7, 2
+ jp LoadFlippedFrontSpriteByMonIndex
+
+Evolution_BackAndForthAnim:
+; show the mon change back and forth between the new and old species b times
+ ld a, $31
+ ld [wEvoMonTileOffset], a
+ call Evolution_ChangeMonPic
+ ld a, -$31
+ ld [wEvoMonTileOffset], a
+ call Evolution_ChangeMonPic
+ dec b
+ jr nz, Evolution_BackAndForthAnim
+ ret
+
+Evolution_ChangeMonPic:
+ push bc
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ hlcoord 7, 2
+ lb bc, 7, 7
+ ld de, SCREEN_WIDTH - 7
+.loop
+ push bc
+.innerLoop
+ ld a, [wEvoMonTileOffset]
+ add [hl]
+ ld [hli], a
+ dec c
+ jr nz, .innerLoop
+ pop bc
+ add hl, de
+ dec b
+ jr nz, .loop
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ call Delay3
+ pop bc
+ ret
+
+Evolution_CheckForCancel:
+ call DelayFrame
+ push bc
+ call JoypadLowSensitivity
+ ldh a, [hJoy5]
+ pop bc
+ and B_BUTTON
+ jr nz, .pressedB
+.notAllowedToCancel
+ dec c
+ jr nz, Evolution_CheckForCancel
+ and a
+ ret
+.pressedB
+ ld a, [wForceEvolution]
+ and a
+ jr nz, .notAllowedToCancel
+ scf
+ ret
diff --git a/engine/movie/hall_of_fame.asm b/engine/movie/hall_of_fame.asm
new file mode 100755
index 00000000..616a72e3
--- /dev/null
+++ b/engine/movie/hall_of_fame.asm
@@ -0,0 +1,303 @@
+AnimateHallOfFame:
+ call HoFFadeOutScreenAndMusic
+ call ClearScreen
+ ld c, 100
+ call DelayFrames
+ call LoadFontTilePatterns
+ call LoadTextBoxTilePatterns
+ call DisableLCD
+ ld hl, vBGMap0
+ ld bc, $800
+ ld a, " "
+ call FillMemory
+ call EnableLCD
+ ld hl, rLCDC
+ set 3, [hl]
+ xor a
+ ld hl, wHallOfFame
+ ld bc, HOF_TEAM
+ call FillMemory
+ xor a
+ ld [wUpdateSpritesEnabled], a
+ ldh [hTilesetType], a
+ ld [wSpriteFlipped], a
+ ld [wLetterPrintingDelayFlags], a ; no delay
+ ld [wHoFMonOrPlayer], a ; mon
+ inc a
+ ldh [hAutoBGTransferEnabled], a
+ ld hl, wNumHoFTeams
+ ld a, [hl]
+ inc a
+ jr z, .skipInc ; don't wrap around to 0
+ inc [hl]
+.skipInc
+ ld a, $90
+ ldh [hWY], a
+ ld c, BANK(Music_HallOfFame)
+ ld a, MUSIC_HALL_OF_FAME
+ call PlayMusic
+ ld hl, wPartySpecies
+ ld c, $ff
+.partyMonLoop
+ ld a, [hli]
+ cp $ff
+ jr z, .doneShowingParty
+ inc c
+ push hl
+ push bc
+ ld [wHoFMonSpecies], a
+ ld a, c
+ ld [wHoFPartyMonIndex], a
+ ld hl, wPartyMon1Level
+ ld bc, wPartyMon2 - wPartyMon1
+ call AddNTimes
+ ld a, [hl]
+ ld [wHoFMonLevel], a
+ call HoFShowMonOrPlayer
+ call HoFDisplayAndRecordMonInfo
+ ld c, 80
+ call DelayFrames
+ hlcoord 2, 13
+ lb bc, 3, 14
+ call TextBoxBorder
+ hlcoord 4, 15
+ ld de, HallOfFameText
+ call PlaceString
+ ld c, 180
+ call DelayFrames
+ call GBFadeOutToWhite
+ pop bc
+ pop hl
+ jr .partyMonLoop
+.doneShowingParty
+ ld a, c
+ inc a
+ ld hl, wHallOfFame
+ ld bc, HOF_MON
+ call AddNTimes
+ ld [hl], $ff
+ callfar SaveHallOfFameTeams ; useless since in same bank
+ xor a
+ ld [wHoFMonSpecies], a
+ inc a
+ ld [wHoFMonOrPlayer], a ; player
+ call HoFShowMonOrPlayer
+ call HoFDisplayPlayerStats
+ call HoFFadeOutScreenAndMusic
+ xor a
+ ldh [hWY], a
+ ld hl, rLCDC
+ res 3, [hl]
+ ret
+
+HallOfFameText:
+ db "HALL OF FAME@"
+
+HoFShowMonOrPlayer:
+ call ClearScreen
+ ld a, $d0
+ ldh [hSCY], a
+ ld a, $c0
+ ldh [hSCX], a
+ ld a, [wHoFMonSpecies]
+ ld [wcf91], a
+ ld [wd0b5], a
+ ld [wBattleMonSpecies2], a
+ ld [wWholeScreenPaletteMonSpecies], a
+ ld a, [wHoFMonOrPlayer]
+ and a
+ jr z, .showMon
+; show player
+ call HoFLoadPlayerPics
+ jr .next1
+.showMon
+ hlcoord 12, 5
+ call GetMonHeader
+ call LoadFrontSpriteByMonIndex
+ predef LoadMonBackPic
+.next1
+ ld b, SET_PAL_POKEMON_WHOLE_SCREEN
+ ld c, 0
+ call RunPaletteCommand
+ ld a, %11100100
+ ldh [rBGP], a
+ call UpdateGBCPal_BGP
+ ld c, $31 ; back pic
+ call HoFLoadMonPlayerPicTileIDs
+ ld d, $a0
+ ld e, 4
+ ld a, [wOnSGB]
+ and a
+ jr z, .next2
+ sla e ; scroll more slowly on SGB
+.next2
+ call .ScrollPic ; scroll back pic left
+ xor a
+ ldh [hSCY], a
+ ld c, a ; front pic
+ call HoFLoadMonPlayerPicTileIDs
+ ld d, 0
+ ld e, -4
+; scroll front pic right
+
+.ScrollPic
+ call DelayFrame
+ ldh a, [hSCX]
+ add e
+ ldh [hSCX], a
+ cp d
+ jr nz, .ScrollPic
+ ret
+
+HoFDisplayAndRecordMonInfo:
+ ld a, [wHoFPartyMonIndex]
+ ld hl, wPartyMonNicks
+ call GetPartyMonName
+ call HoFDisplayMonInfo
+ ld a, [wHoFPartyMonIndex]
+ ld [wWhichPokemon], a
+ callfar IsThisPartymonStarterPikachu_Party
+ jr nc, .asm_70336
+ ld e, $22
+ callfar PlayPikachuSoundClip
+ jr .asm_7033c
+.asm_70336
+ ld a, [wHoFMonSpecies]
+ call PlayCry
+.asm_7033c
+ jp HoFRecordMonInfo
+
+Func_7033f:
+ call HoFDisplayMonInfo
+ ld a, [wHoFMonSpecies]
+ jp PlayCry
+
+HoFDisplayMonInfo:
+ hlcoord 0, 2
+ lb bc, 9, 10
+ call TextBoxBorder
+ hlcoord 2, 6
+ ld de, HoFMonInfoText
+ call PlaceString
+ hlcoord 1, 4
+ ld de, wcd6d
+ call PlaceString
+ ld a, [wHoFMonLevel]
+ hlcoord 8, 7
+ call PrintLevelCommon
+ ld a, [wHoFMonSpecies]
+ ld [wd0b5], a
+ hlcoord 3, 9
+ predef PrintMonType
+ ret
+
+HoFMonInfoText:
+ db "LEVEL/"
+ next "TYPE1/"
+ next "TYPE2/@"
+
+HoFLoadPlayerPics:
+ ld de, RedPicFront
+ ld a, BANK(RedPicFront)
+ call UncompressSpriteFromDE
+ ld a, $0
+ call SwitchSRAMBankAndLatchClockData
+ ld hl, sSpriteBuffer1
+ ld de, sSpriteBuffer0
+ ld bc, $310
+ call CopyData
+ call PrepareRTCDataAndDisableSRAM
+ ld de, vFrontPic
+ call InterlaceMergeSpriteBuffers
+ ld de, RedPicBack
+ ld a, BANK(RedPicBack)
+ call UncompressSpriteFromDE
+ predef ScaleSpriteByTwo
+ ld de, vBackPic
+ call InterlaceMergeSpriteBuffers
+ ld c, $1
+
+HoFLoadMonPlayerPicTileIDs:
+; c = base tile ID
+ ld b, TILEMAP_MON_PIC
+ hlcoord 12, 5
+ predef_jump CopyTileIDsFromList
+
+HoFDisplayPlayerStats:
+ SetEvent EVENT_HALL_OF_FAME_DEX_RATING
+ predef DisplayDexRating
+ hlcoord 0, 4
+ lb bc, 6, 10
+ call TextBoxBorder
+ hlcoord 5, 0
+ lb bc, 2, 9
+ call TextBoxBorder
+ hlcoord 7, 2
+ ld de, wPlayerName
+ call PlaceString
+ hlcoord 1, 6
+ ld de, HoFPlayTimeText
+ call PlaceString
+ hlcoord 5, 7
+ ld de, wPlayTimeHours
+ lb bc, 1, 3
+ call PrintNumber
+ ld [hl], $6d
+ inc hl
+ ld de, wPlayTimeMinutes
+ lb bc, LEADING_ZEROES | 1, 2
+ call PrintNumber
+ hlcoord 1, 9
+ ld de, HoFMoneyText
+ call PlaceString
+ hlcoord 4, 10
+ ld de, wPlayerMoney
+ ld c, $a3
+ call PrintBCDNumber
+ ld hl, DexSeenOwnedText
+ call HoFPrintTextAndDelay
+ ld hl, DexRatingText
+ call HoFPrintTextAndDelay
+ ld hl, wDexRatingText
+
+HoFPrintTextAndDelay:
+ call PrintText
+ ld c, 120
+ jp DelayFrames
+
+HoFPlayTimeText:
+ db "PLAY TIME@"
+
+HoFMoneyText:
+ db "MONEY@"
+
+DexSeenOwnedText:
+ text_far _DexSeenOwnedText
+ text_end
+
+DexRatingText:
+ text_far _DexRatingText
+ text_end
+
+HoFRecordMonInfo:
+ ld hl, wHallOfFame
+ ld bc, HOF_MON
+ ld a, [wHoFPartyMonIndex]
+ call AddNTimes
+ ld a, [wHoFMonSpecies]
+ ld [hli], a
+ ld a, [wHoFMonLevel]
+ ld [hli], a
+ ld e, l
+ ld d, h
+ ld hl, wcd6d
+ ld bc, NAME_LENGTH
+ jp CopyData
+
+HoFFadeOutScreenAndMusic:
+ ld a, 10
+ ld [wAudioFadeOutCounterReloadValue], a
+ ld [wAudioFadeOutCounter], a
+ ld a, $ff
+ ld [wAudioFadeOutControl], a
+ jp GBFadeOutToWhite
diff --git a/engine/movie/intro.asm b/engine/movie/intro.asm
new file mode 100755
index 00000000..9165113f
--- /dev/null
+++ b/engine/movie/intro.asm
@@ -0,0 +1,157 @@
+ const_def -1
+ const MOVE_NIDORINO_RIGHT
+ const MOVE_GENGAR_RIGHT
+ const MOVE_GENGAR_LEFT
+
+ANIMATION_END EQU 80
+
+PlayIntro:
+ xor a
+ ldh [hJoyHeld], a
+ inc a
+ ldh [hAutoBGTransferEnabled], a
+ call PlayShootingStar
+ callfar PlayIntroScene
+ xor a
+ ldh [hSCX], a
+ ldh [hAutoBGTransferEnabled], a
+ call ClearSprites
+ call DelayFrame
+ ret
+
+InitIntroNidorinoOAM:
+ ld hl, wOAMBuffer
+ ld d, 0
+.loop
+ push bc
+ ld a, [wBaseCoordY]
+ ld e, a
+.innerLoop
+ ld a, e
+ add 8
+ ld e, a
+ ld [hli], a ; Y
+ ld a, [wBaseCoordX]
+ ld [hli], a ; X
+ ld a, d
+ ld [hli], a ; tile
+ ld a, OAM_BEHIND_BG
+ ld [hli], a ; attributes
+ inc d
+ dec c
+ jr nz, .innerLoop
+ ld a, [wBaseCoordX]
+ add 8
+ ld [wBaseCoordX], a
+ pop bc
+ dec b
+ jr nz, .loop
+ ret
+
+IntroClearScreen:
+ ld hl, vBGMap1
+ ld bc, BG_MAP_WIDTH * SCREEN_HEIGHT
+ jr IntroClearCommon
+
+IntroClearMiddleOfScreen:
+; clear the area of the tile map between the black bars on the top and bottom
+ hlcoord 0, 4
+ ld bc, SCREEN_WIDTH * 10
+
+IntroClearCommon:
+ ld [hl], 0
+ inc hl
+ dec bc
+ ld a, b
+ or c
+ jr nz, IntroClearCommon
+ ret
+
+IntroPlaceBlackTiles:
+ ld a, 1
+.loop
+ ld [hli], a
+ dec c
+ jr nz, .loop
+ ret
+
+CopyTileIDsFromList_ZeroBaseTileID:
+ ld c, 0
+ predef_jump CopyTileIDsFromList
+
+PlayShootingStar:
+ ld b, SET_PAL_GAME_FREAK_INTRO
+ call RunPaletteCommand
+ farcall LoadCopyrightAndTextBoxTiles
+ ldPal a, BLACK, DARK_GRAY, LIGHT_GRAY, WHITE
+ ldh [rBGP], a
+ call UpdateGBCPal_BGP
+ ld c, 180
+ call DelayFrames
+ call ClearScreen
+ call DisableLCD
+ xor a
+ ld [wCurOpponent], a
+ call IntroDrawBlackBars
+; write the black and white tiles
+ ld hl, vChars2
+ ld bc, $10
+ xor a
+ call FillMemory
+ ld hl, vChars2 + $10
+ ld bc, $10
+ ld a, $ff
+ call FillMemory
+; copy gamefreak logo and others
+ ld hl, GameFreakIntro
+ ld de, vChars2 + $600
+ ld bc, GameFreakIntroEnd - GameFreakIntro
+ ld a, BANK(GameFreakIntro)
+ call FarCopyData
+ ld hl, GameFreakIntro
+ ld de, vChars1
+ ld bc, GameFreakIntroEnd - GameFreakIntro
+ ld a, BANK(GameFreakIntro)
+ call FarCopyData
+
+ call EnableLCD
+ ld hl, rLCDC
+ res 5, [hl]
+ set 3, [hl]
+ ld c, 64
+ call DelayFrames
+ farcall AnimateShootingStar
+ push af
+ pop af
+ jr c, .next ; skip the delay if the user interrupted the animation
+ ld c, 40
+ call DelayFrames
+.next
+ call IntroClearMiddleOfScreen
+ call ClearSprites
+ jp Delay3
+
+IntroDrawBlackBars:
+; clear the screen and draw black bars on the top and bottom
+ call IntroClearScreen
+ hlcoord 0, 0
+ ld c, SCREEN_WIDTH * 4
+ call IntroPlaceBlackTiles
+ hlcoord 0, 14
+ ld c, SCREEN_WIDTH * 4
+ call IntroPlaceBlackTiles
+ ld hl, vBGMap1
+ ld c, BG_MAP_WIDTH * 4
+ call IntroPlaceBlackTiles
+ hlbgcoord 0, 14, vBGMap1
+ ld c, BG_MAP_WIDTH * 4
+ jp IntroPlaceBlackTiles
+
+EmptyFunc2:
+ ret
+
+GameFreakIntro:
+ INCBIN "gfx/splash/gamefreak_presents.2bpp"
+ INCBIN "gfx/splash/gamefreak_logo.2bpp"
+ ds 16, $00 ; blank tile
+GameFreakIntroEnd:
diff --git a/engine/movie/oak_speech/clear_save.asm b/engine/movie/oak_speech/clear_save.asm
new file mode 100755
index 00000000..2dd5f4a7
--- /dev/null
+++ b/engine/movie/oak_speech/clear_save.asm
@@ -0,0 +1,27 @@
+DoClearSaveDialogue:
+ call ClearScreen
+ call RunDefaultPaletteCommand
+ call LoadFontTilePatterns
+ call LoadTextBoxTilePatterns
+ ld hl, ClearSaveDataText
+ call PrintText
+ ld a, B_BUTTON
+ ld [wJoyIgnore], a
+ hlcoord 14, 7
+ lb bc, 8, 15
+ ld a, NO_YES_MENU
+ ld [wTwoOptionMenuID], a
+ ld a, TWO_OPTION_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ ld a, 0
+ ld [wJoyIgnore], a
+ ld a, [wCurrentMenuItem]
+ and a
+ jp z, Init
+ farcall ClearSAV
+ jp Init
+
+ClearSaveDataText:
+ text_far _ClearSaveDataText
+ text_end
diff --git a/engine/movie/oak_speech/init_player_data.asm b/engine/movie/oak_speech/init_player_data.asm
new file mode 100644
index 00000000..d6745daf
--- /dev/null
+++ b/engine/movie/oak_speech/init_player_data.asm
@@ -0,0 +1,60 @@
+InitPlayerData:
+InitPlayerData2:
+
+ call Random
+ ldh a, [hRandomSub]
+ ld [wPlayerID], a
+
+ call Random
+ ldh a, [hRandomAdd]
+ ld [wPlayerID + 1], a
+
+ ld a, $ff
+ ld [wUnusedD71B], a
+
+ ld a, 90 ; initialize happiness to 90
+ ld [wPikachuHappiness], a
+ ld a, $80
+ ld [wPikachuMood], a ; initialize mood
+
+ ld hl, wPartyCount
+ call InitializeEmptyList
+ ld hl, wNumInBox
+ call InitializeEmptyList
+ ld hl, wNumBagItems
+ call InitializeEmptyList
+ ld hl, wNumBoxItems
+ call InitializeEmptyList
+
+START_MONEY EQU $3000
+ ld hl, wPlayerMoney + 1
+ ld a, HIGH(START_MONEY)
+ ld [hld], a
+ xor a ; LOW(START_MONEY)
+ ld [hli], a
+ inc hl
+ ld [hl], a
+
+ ld [wMonDataLocation], a
+
+ ld hl, wObtainedBadges
+ ld [hli], a
+
+ ld [hl], a
+
+ ld hl, wPlayerCoins
+ ld [hli], a
+ ld [hl], a
+
+ ld hl, wGameProgressFlags
+ ld bc, wGameProgressFlagsEnd - wGameProgressFlags
+ call FillMemory ; clear all game progress flags
+
+ jp InitializeMissableObjectsFlags
+
+InitializeEmptyList:
+ xor a ; count
+ ld [hli], a
+ dec a ; terminator
+ ld [hl], a
+ ret
diff --git a/engine/movie/oak_speech/oak_speech.asm b/engine/movie/oak_speech/oak_speech.asm
new file mode 100755
index 00000000..1a327def
--- /dev/null
+++ b/engine/movie/oak_speech/oak_speech.asm
@@ -0,0 +1,244 @@
+SetDefaultNames:
+ ld a, [wLetterPrintingDelayFlags]
+ push af
+ ld a, [wOptions]
+ push af
+ ld a, [wd732]
+ push af
+ ld a, [wPrinterSettings]
+ push af
+ ld hl, wPlayerName
+ ld bc, wBoxDataEnd - wPlayerName
+ xor a
+ call FillMemory
+ ld hl, wSpriteDataStart
+ ld bc, wSpriteDataEnd - wSpriteDataStart
+ xor a
+ call FillMemory
+ xor a
+ ld [wSurfingMinigameHiScore], a
+ ld [wSurfingMinigameHiScore + 1], a
+ ld [wSurfingMinigameHiScore + 2], a
+ pop af
+ ld [wPrinterSettings], a
+ pop af
+ ld [wd732], a
+ pop af
+ ld [wOptions], a
+ pop af
+ ld [wLetterPrintingDelayFlags], a
+ ld a, [wOptionsInitialized]
+ and a
+ call z, InitOptions
+ ld hl, NintenText
+ ld de, wPlayerName
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld hl, SonyText
+ ld de, wRivalName
+ ld bc, NAME_LENGTH
+ call CopyData ; rip optimizations
+ ret
+
+OakSpeech:
+ call StopAllMusic ; stop music
+ ld a, BANK(Music_Routes2)
+ ld c, a
+ ld a, MUSIC_ROUTES2
+ call PlayMusic
+ call ClearScreen
+ call LoadTextBoxTilePatterns
+ call SetDefaultNames
+ predef InitPlayerData2
+ ld hl, wNumBoxItems
+ ld a, POTION
+ ld [wcf91], a
+ ld a, 1
+ ld [wItemQuantity], a
+ call AddItemToInventory ; give one potion
+ ld a, [wDefaultMap]
+ ld [wDestinationMap], a
+ call SpecialWarpIn
+ xor a
+ ldh [hTilesetType], a
+ ld a, [wd732]
+ bit 1, a ; possibly a debug mode bit
+ jp nz, .skipChoosingNames
+ ld de, ProfOakPic
+ lb bc, BANK(ProfOakPic), $00
+ call IntroDisplayPicCenteredOrUpperRight
+ call FadeInIntroPic
+ ld hl, OakSpeechText1
+ call PrintText
+ call GBFadeOutToWhite
+ call ClearScreen
+ ld a, PIKACHU
+ ld [wd0b5], a
+ ld [wcf91], a
+ call GetMonHeader
+ hlcoord 6, 4
+ call LoadFlippedFrontSpriteByMonIndex
+ call MovePicLeft
+ ld hl, OakSpeechText2
+ call PrintText
+ call GBFadeOutToWhite
+ call ClearScreen
+ ld de, RedPicFront
+ lb bc, BANK(RedPicFront), $00
+ call IntroDisplayPicCenteredOrUpperRight
+ call MovePicLeft
+ ld hl, IntroducePlayerText
+ call PrintText
+ call ChoosePlayerName
+ call GBFadeOutToWhite
+ call ClearScreen
+ ld de, Rival1Pic
+ lb bc, BANK(Rival1Pic), $00
+ call IntroDisplayPicCenteredOrUpperRight
+ call FadeInIntroPic
+ ld hl, IntroduceRivalText
+ call PrintText
+ call ChooseRivalName
+.skipChoosingNames
+ call GBFadeOutToWhite
+ call ClearScreen
+ ld de, RedPicFront
+ lb bc, BANK(RedPicFront), $00
+ call IntroDisplayPicCenteredOrUpperRight
+ call GBFadeInFromWhite
+ ld a, [wd72d]
+ and a
+ jr nz, .next
+ ld hl, OakSpeechText3
+ call PrintText
+.next
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, SFX_SHRINK
+ call PlaySound
+ pop af
+ call BankswitchCommon
+ ld c, 4
+ call DelayFrames
+ ld hl, vSprites
+ ld de, RedSprite
+ ld b, BANK(RedSprite)
+ ld c, $0C
+ call CopyVideoData
+ ld de, ShrinkPic1
+ lb bc, BANK(ShrinkPic1), $00
+ call IntroDisplayPicCenteredOrUpperRight
+ ld c, 4
+ call DelayFrames
+ ld de, ShrinkPic2
+ lb bc, BANK(ShrinkPic2), $00
+ call IntroDisplayPicCenteredOrUpperRight
+ call ResetPlayerSpriteData
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, BANK(Music_PalletTown)
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
+ ld a, 10
+ ld [wAudioFadeOutControl], a
+ call StopAllMusic
+ pop af
+ call BankswitchCommon
+ ld c, 20
+ call DelayFrames
+ hlcoord 6, 5
+ lb bc, 7, 7
+ call ClearScreenArea
+ call LoadTextBoxTilePatterns
+ ld a, 1
+ ld [wUpdateSpritesEnabled], a
+ ld c, 50
+ call DelayFrames
+ call GBFadeOutToWhite
+ call ClearScreen ; rip more tail-end optimizations
+ ret
+
+OakSpeechText1:
+ text_far _OakSpeechText1
+ text_end
+OakSpeechText2:
+ text_far _OakSpeechText2A
+ sound_cry_pikachu
+ text_far _OakSpeechText2B
+ text_end
+IntroducePlayerText:
+ text_far _IntroducePlayerText
+ text_end
+IntroduceRivalText:
+ text_far _IntroduceRivalText
+ text_end
+OakSpeechText3:
+ text_far _OakSpeechText3
+ text_end
+
+FadeInIntroPic:
+ ld hl, IntroFadePalettes
+ ld b, 6
+.next
+ ld a, [hli]
+ ldh [rBGP], a
+ call UpdateGBCPal_BGP
+ ld c, 10
+ call DelayFrames
+ dec b
+ jr nz, .next
+ ret
+
+IntroFadePalettes:
+ db %01010100
+ db %10101000
+ db %11111100
+ db %11111000
+ db %11110100
+ db %11100100
+
+MovePicLeft:
+ ld a, 119
+ ldh [rWX], a
+ call DelayFrame
+
+ ld a, %11100100
+ ldh [rBGP], a
+ call UpdateGBCPal_BGP
+.next
+ call DelayFrame
+ ldh a, [rWX]
+ sub 8
+ cp $FF
+ ret z
+ ldh [rWX], a
+ jr .next
+
+DisplayPicCenteredOrUpperRight:
+ call GetPredefRegisters
+IntroDisplayPicCenteredOrUpperRight:
+; b = bank
+; de = address of compressed pic
+; c: 0 = centred, non-zero = upper-right
+ push bc
+ ld a, b
+ call UncompressSpriteFromDE
+ ld a, $0
+ call SwitchSRAMBankAndLatchClockData
+ ld hl, sSpriteBuffer1
+ ld de, sSpriteBuffer0
+ ld bc, $310
+ call CopyData
+ call PrepareRTCDataAndDisableSRAM
+ ld de, vFrontPic
+ call InterlaceMergeSpriteBuffers
+ pop bc
+ ld a, c
+ and a
+ hlcoord 15, 1
+ jr nz, .next
+ hlcoord 6, 4
+.next
+ xor a
+ ldh [hStartTileID], a
+ predef_jump CopyUncompressedPicToTilemap
diff --git a/engine/movie/oak_speech/oak_speech2.asm b/engine/movie/oak_speech/oak_speech2.asm
new file mode 100755
index 00000000..af31665b
--- /dev/null
+++ b/engine/movie/oak_speech/oak_speech2.asm
@@ -0,0 +1,219 @@
+ChoosePlayerName:
+ call OakSpeechSlidePicRight
+ ld de, DefaultNamesPlayer
+ call DisplayIntroNameTextBox
+ ld a, [wCurrentMenuItem]
+ and a
+ jr z, .customName
+ ld hl, DefaultNamesPlayerList
+ call GetDefaultName
+ ld de, wPlayerName
+ call OakSpeechSlidePicLeft
+ jr .done
+.customName
+ ld hl, wPlayerName
+ xor a ; NAME_PLAYER_SCREEN
+ ld [wNamingScreenType], a
+ call DisplayNamingScreen
+ ld a, [wcf4b]
+ cp "@"
+ jr z, .customName
+ call ClearScreen
+ call Delay3
+ ld de, RedPicFront
+ ld b, BANK(RedPicFront)
+ call IntroDisplayPicCenteredOrUpperRight
+.done
+ ld hl, YourNameIsText
+ jp PrintText
+
+YourNameIsText:
+ text_far _YourNameIsText
+ text_end
+
+ChooseRivalName:
+ call OakSpeechSlidePicRight
+ ld de, DefaultNamesRival
+ call DisplayIntroNameTextBox
+ ld a, [wCurrentMenuItem]
+ and a
+ jr z, .customName
+ ld hl, DefaultNamesRivalList
+ call GetDefaultName
+ ld de, wRivalName
+ call OakSpeechSlidePicLeft
+ jr .done
+.customName
+ ld hl, wRivalName
+ ld a, NAME_RIVAL_SCREEN
+ ld [wNamingScreenType], a
+ call DisplayNamingScreen
+ ld a, [wcf4b]
+ cp "@"
+ jr z, .customName
+ call ClearScreen
+ call Delay3
+ ld de, Rival1Pic
+ ld b, $13
+ call IntroDisplayPicCenteredOrUpperRight
+.done
+ ld hl, HisNameIsText
+ jp PrintText
+
+HisNameIsText:
+ text_far _HisNameIsText
+ text_end
+
+OakSpeechSlidePicLeft:
+ push de
+ hlcoord 0, 0
+ lb bc, 12, 11
+ call ClearScreenArea ; clear the name list text box
+ ld c, 10
+ call DelayFrames
+ pop de
+ ld hl, wcd6d
+ ld bc, NAME_LENGTH
+ call CopyData
+ call Delay3
+ hlcoord 12, 4
+ lb de, 6, 6 * SCREEN_WIDTH + 5
+ ld a, $ff
+ jr OakSpeechSlidePicCommon
+
+OakSpeechSlidePicRight:
+ hlcoord 5, 4
+ lb de, 6, 6 * SCREEN_WIDTH + 5
+ xor a
+
+OakSpeechSlidePicCommon:
+ push hl
+ push de
+ push bc
+ ldh [hSlideDirection], a
+ ld a, d
+ ldh [hSlideAmount], a
+ ld a, e
+ ldh [hSlidingRegionSize], a
+ ld c, a
+ ldh a, [hSlideDirection]
+ and a
+ jr nz, .next
+; If sliding right, point hl to the end of the pic's tiles.
+ ld d, 0
+ add hl, de
+.next
+ ld d, h
+ ld e, l
+.loop
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ ldh [hAutoBGTransferPortion], a
+ ldh a, [hSlideDirection]
+ and a
+ jr nz, .slideLeft
+; sliding right
+ ld a, [hli]
+ ld [hld], a
+ dec hl
+ jr .next2
+.slideLeft
+ ld a, [hld]
+ ld [hli], a
+ inc hl
+.next2
+ dec c
+ jr nz, .loop
+ ldh a, [hSlideDirection]
+ and a
+ jr z, .next3
+; If sliding left, we need to zero the last tile in the pic (there is no need
+; to take a corresponding action when sliding right because hl initially points
+; to a 0 tile in that case).
+ dec hl
+ xor a
+ ld [hl], a
+.next3
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ call Delay3
+ ldh a, [hSlidingRegionSize]
+ ld c, a
+ ld h, d
+ ld l, e
+ ldh a, [hSlideDirection]
+ and a
+ jr nz, .slideLeft2
+ inc hl
+ jr .next4
+.slideLeft2
+ dec hl
+.next4
+ ld d, h
+ ld e, l
+ ldh a, [hSlideAmount]
+ dec a
+ ldh [hSlideAmount], a
+ jr nz, .loop
+ pop bc
+ pop de
+ pop hl
+ ret
+
+DisplayIntroNameTextBox:
+ push de
+ hlcoord 0, 0
+ lb bc, 10, 9
+ call TextBoxBorder
+ hlcoord 3, 0
+ ld de, .namestring
+ call PlaceString
+ pop de
+ hlcoord 2, 2
+ call PlaceString
+ call UpdateSprites
+ xor a
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ inc a
+ ld [wTopMenuItemX], a
+ ld [wMenuWatchedKeys], a ; A_BUTTON
+ inc a
+ ld [wTopMenuItemY], a
+ inc a
+ ld [wMaxMenuItem], a
+ jp HandleMenuInput
+
+.namestring
+ db "NAME@"
+
+INCLUDE "data/player_names.asm"
+
+GetDefaultName:
+; a = name index
+; hl = name list
+ ld b, a
+ ld c, 0
+.loop
+ ld d, h
+ ld e, l
+.innerLoop
+ ld a, [hli]
+ cp "@"
+ jr nz, .innerLoop
+ ld a, b
+ cp c
+ jr z, .foundName
+ inc c
+ jr .loop
+.foundName
+ ld h, d
+ ld l, e
+ ld de, wcd6d
+ ld bc, $14
+ jp CopyData
+
+INCLUDE "data/player_names_list.asm"
+
+LinkMenuEmptyText:
+ text_end
diff --git a/engine/movie/splash.asm b/engine/movie/splash.asm
new file mode 100755
index 00000000..4cb0a59a
--- /dev/null
+++ b/engine/movie/splash.asm
@@ -0,0 +1,259 @@
+LoadShootingStarGraphics:
+ ld a, $f9
+ ldh [rOBP0], a
+ ld a, $a4
+ ldh [rOBP1], a
+ call UpdateGBCPal_OBP0
+ call UpdateGBCPal_OBP1
+ ld de, AnimationTileset2 tile 3 ; star tile (top left quadrant)
+ ld hl, vChars1 tile $20
+ lb bc, BANK(AnimationTileset2), $01
+ call CopyVideoData
+ ld de, AnimationTileset2 tile 19 ; star tile (bottom left quadrant)
+ ld hl, vChars1 tile $21
+ lb bc, BANK(AnimationTileset2), 1
+ call CopyVideoData
+ ld de, FallingStar
+ ld hl, vChars1 tile $22
+ lb bc, BANK(FallingStar), (FallingStarEnd - FallingStar) / $10
+ call CopyVideoData
+ ld hl, GameFreakLogoOAMData
+ ld de, wOAMBuffer + $60
+ ld bc, GameFreakLogoOAMDataEnd - GameFreakLogoOAMData
+ call CopyData
+ ld hl, GameFreakShootingStarOAMData
+ ld de, wOAMBuffer
+ ld bc, GameFreakShootingStarOAMDataEnd - GameFreakShootingStarOAMData
+ jp CopyData
+
+AnimateShootingStar:
+ call LoadShootingStarGraphics
+ ld a, SFX_SHOOTING_STAR
+ call PlaySound
+
+; Move the big star down and left across the screen.
+ ld hl, wOAMBuffer
+ lb bc, $a0, $4
+.bigStarLoop
+ push hl
+ push bc
+.bigStarInnerLoop
+ ld a, [hl] ; Y
+ add 4
+ ld [hli], a
+ ld a, [hl] ; X
+ add -4
+ ld [hli], a
+ inc hl
+ inc hl
+ dec c
+ jr nz, .bigStarInnerLoop
+ ld c, 1
+ call CheckForUserInterruption
+ pop bc
+ pop hl
+ ret c
+ ld a, [hl]
+ cp 80
+ jr nz, .next
+ jr .bigStarLoop
+.next
+ cp b
+ jr nz, .bigStarLoop
+
+; Clear big star OAM.
+ ld hl, wOAMBuffer
+ ld c, 4
+ ld de, 4
+.clearOAMLoop
+ ld [hl], 160
+ add hl, de
+ dec c
+ jr nz, .clearOAMLoop
+
+; Make Gamefreak logo flash.
+ ld b, 3
+.flashLogoLoop
+ ld hl, rOBP0
+ rrc [hl]
+ rrc [hl]
+ call UpdateGBCPal_OBP0
+ ld c, 10
+ call CheckForUserInterruption
+ ret c
+ dec b
+ jr nz, .flashLogoLoop
+
+; Copy 24 instances of the small stars OAM data.
+; Note that their coordinates put them off-screen.
+ ld de, wOAMBuffer
+ ld a, 24
+.initSmallStarsOAMLoop
+ push af
+ ld hl, SmallStarsOAM
+ ld bc, SmallStarsOAMEnd - SmallStarsOAM
+ call CopyData
+ pop af
+ dec a
+ jr nz, .initSmallStarsOAMLoop
+
+; Animate the small stars falling from the Gamefreak logo.
+ xor a
+ ld [wMoveDownSmallStarsOAMCount], a
+ ld hl, SmallStarsWaveCoordsPointerTable
+ ld c, 6
+.smallStarsLoop
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ push bc
+ push hl
+ ld hl, wOAMBuffer + $50
+ ld c, 4
+.smallStarsInnerLoop ; introduce new wave of 4 small stars OAM entries
+ ld a, [de]
+ cp -1
+ jr z, .next2
+ ld [hli], a ; Y
+ inc de
+ ld a, [de]
+ ld [hli], a ; X
+ inc de
+ inc hl
+ push bc
+ ld a, [de]
+ ld b, a
+ ld a, [hl]
+ and $f0
+ or b
+ ld [hl], a
+ inc de
+ pop bc
+ inc hl
+ dec c
+ jr nz, .smallStarsInnerLoop
+ ld a, [wMoveDownSmallStarsOAMCount]
+ cp 24
+ jr z, .next2
+ add 6 ; should be 4, but the extra 2 aren't visible on screen
+ ld [wMoveDownSmallStarsOAMCount], a
+.next2
+ call MoveDownSmallStars
+ push af
+
+; shift the existing OAM entries down to make room for the next wave
+ ld hl, wOAMBuffer + $10
+ ld de, wOAMBuffer
+ ld bc, $50
+ call CopyData
+
+ pop af
+ pop hl
+ pop bc
+ ret c
+ dec c
+ jr nz, .smallStarsLoop
+ and a
+ ret
+
+SmallStarsOAM:
+ dbsprite 0, 0, 0, 0, $A2, OAM_BEHIND_BG | OAM_OBP1
+SmallStarsOAMEnd:
+
+SmallStarsWaveCoordsPointerTable:
+ dw SmallStarsWave1Coords
+ dw SmallStarsWave2Coords
+ dw SmallStarsWave3Coords
+ dw SmallStarsWave4Coords
+ dw SmallStarsEmptyWave
+ dw SmallStarsEmptyWave
+
+; The stars that fall from the Gamefreak logo come in 4 waves of 4 OAM entries.
+; These arrays contain the Y and X coordinates of each OAM entry.
+
+SmallStarsWave1Coords:
+ db $68, $30
+ db $05, $68
+ db $40, $05
+ db $68, $58
+ db $04, $68
+ db $78, $07
+SmallStarsWave2Coords:
+ db $68, $38
+ db $05, $68
+ db $48, $06
+ db $68, $60
+ db $04, $68
+ db $70, $07
+SmallStarsWave3Coords:
+ db $68, $34
+ db $05, $68
+ db $4c, $06
+ db $68, $54
+ db $06, $68
+ db $64, $07
+SmallStarsWave4Coords:
+ db $68, $3c
+ db $05, $68
+ db $5c, $04
+ db $68, $6c
+ db $07, $68
+ db $74, $07
+SmallStarsEmptyWave:
+ db -1 ; end
+
+MoveDownSmallStars:
+ ld b, 8
+.loop
+ ld hl, wOAMBuffer + $5c
+ ld a, [wMoveDownSmallStarsOAMCount]
+ ld de, -4
+ ld c, a
+.innerLoop
+ inc [hl] ; Y
+ add hl, de
+ dec c
+ jr nz, .innerLoop
+; Toggle the palette so that the lower star in the small stars tile blinks in
+; and out.
+ ldh a, [rOBP1]
+ xor %10100000
+ ldh [rOBP1], a
+ call UpdateGBCPal_OBP1
+ ld c, 3
+ call CheckForUserInterruption
+ ret c
+ dec b
+ jr nz, .loop
+ ret
+
+GameFreakLogoOAMData:
+ dbsprite 10, 9, 0, 0, $8d, 0
+ dbsprite 11, 9, 0, 0, $8e, 0
+ dbsprite 10, 10, 0, 0, $8f, 0
+ dbsprite 11, 10, 0, 0, $90, 0
+ dbsprite 10, 11, 0, 0, $91, 0
+ dbsprite 11, 11, 0, 0, $92, 0
+ dbsprite 6, 12, 0, 0, $80, 0
+ dbsprite 7, 12, 0, 0, $81, 0
+ dbsprite 8, 12, 0, 0, $82, 0
+ dbsprite 9, 12, 0, 0, $83, 0
+ dbsprite 10, 12, 0, 0, $93, 0
+ dbsprite 11, 12, 0, 0, $84, 0
+ dbsprite 12, 12, 0, 0, $85, 0
+ dbsprite 13, 12, 0, 0, $83, 0
+ dbsprite 14, 12, 0, 0, $81, 0
+ dbsprite 15, 12, 0, 0, $86, 0
+GameFreakLogoOAMDataEnd:
+
+GameFreakShootingStarOAMData:
+ dbsprite 20, 0, 0, 0, $a0, OAM_OBP1 | %100
+ dbsprite 21, 0, 0, 0, $a0, OAM_OBP1 | OAM_HFLIP | %100
+ dbsprite 20, 1, 0, 0, $a1, OAM_OBP1 | %100
+ dbsprite 21, 1, 0, 0, $a1, OAM_OBP1 | OAM_HFLIP | %100
+GameFreakShootingStarOAMDataEnd:
+
+FallingStar:
+ INCBIN "gfx/splash/falling_star.2bpp"
+FallingStarEnd:
diff --git a/engine/movie/title.asm b/engine/movie/title.asm
new file mode 100755
index 00000000..1f2723a3
--- /dev/null
+++ b/engine/movie/title.asm
@@ -0,0 +1,370 @@
+SetDefaultNamesBeforeTitlescreen::
+ ld hl, NintenText
+ ld de, wPlayerName
+ call CopyFixedLengthText
+ ld hl, SonyText
+ ld de, wRivalName
+ call CopyFixedLengthText
+ xor a
+ ldh [hWY], a
+ ld [wLetterPrintingDelayFlags], a
+ ld hl, wd732
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+ ld a, BANK(Music_TitleScreen)
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
+
+DisplayTitleScreen:
+ call GBPalWhiteOut
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ xor a
+ ldh [hTilesetType], a
+ ldh [hSCX], a
+ ld a, $40
+ ldh [hSCY], a
+ ld a, $90
+ ldh [hWY], a
+ call ClearScreen
+ call DisableLCD
+ call LoadFontTilePatterns
+; todo: fix hl pointers
+ ld hl, NintendoCopyrightLogoGraphics
+ ld de, vTitleLogo tile $60
+ ld bc, 5 tiles
+ ld a, BANK(NintendoCopyrightLogoGraphics)
+ call FarCopyData
+ ld hl, NineTile
+ ld de, vTitleLogo tile $6e
+ ld bc, $10
+ ld a, BANK(NineTile)
+ call FarCopyData
+ ld hl, GamefreakLogoGraphics
+ ld de, vTitleLogo tile $65
+ ld bc, 9 tiles
+ ld a, BANK(GamefreakLogoGraphics)
+ call FarCopyData
+ callfar LoadYellowTitleScreenGFX
+ ld hl, vBGMap0
+ ld bc, (vBGMap1 tile $40) - vBGMap0
+ ld a, " "
+ call FillMemory
+ callfar TitleScreen_PlacePokemonLogo
+ call FillSpriteBuffer0WithAA
+ call .WriteCopyrightTiles
+ call SaveScreenTilesToBuffer2
+ call LoadScreenTilesFromBuffer2
+ call EnableLCD
+ callfar TitleScreen_PlacePikachu
+ ld a, HIGH(vBGMap0 + $300)
+ call TitleScreenCopyTileMapToVRAM
+ call SaveScreenTilesToBuffer1
+ ld a, $40
+ ldh [hWY], a
+ call LoadScreenTilesFromBuffer2
+ ld a, HIGH(vBGMap0)
+ call TitleScreenCopyTileMapToVRAM
+ ld b, SET_PAL_TITLE_SCREEN
+ call RunPaletteCommand
+ call GBPalNormal
+ ld a, %11100000
+ ldh [rOBP0], a
+ call UpdateGBCPal_OBP0
+
+; make pokemon logo bounce up and down
+ ld bc, hSCY ; background scroll Y
+ ld hl, .TitleScreenPokemonLogoYScrolls
+.bouncePokemonLogoLoop
+ ld a, [hli]
+ and a
+ jr z, .finishedBouncingPokemonLogo
+ ld d, a
+ cp -3
+ jr nz, .skipPlayingSound
+ ld a, SFX_INTRO_CRASH
+ call PlaySound
+.skipPlayingSound
+ ld a, [hli]
+ ld e, a
+ call .ScrollTitleScreenPokemonLogo
+ jr .bouncePokemonLogoLoop
+
+.TitleScreenPokemonLogoYScrolls:
+; Controls the bouncing effect of the Pokemon logo on the title screen
+ db -4,16 ; y scroll amount, number of times to scroll
+ db 3,4
+ db -3,4
+ db 2,2
+ db -2,2
+ db 1,2
+ db -1,2
+ db 0 ; terminate list with 0
+
+.ScrollTitleScreenPokemonLogo:
+; Scrolls the Pokemon logo on the title screen to create the bouncing effect
+; Scrolls d pixels e times
+ call DelayFrame
+ ld a, [bc] ; background scroll Y
+ add d
+ ld [bc], a
+ dec e
+ jr nz, .ScrollTitleScreenPokemonLogo
+ ret
+
+; place tiles for title screen copyright
+.WriteCopyrightTiles
+ hlcoord 2, 17
+ ld de, .tileScreenCopyrightTiles
+.titleScreenCopyrightTilesLoop
+ ld a, [de]
+ inc de
+ cp $ff
+ ret z
+ ld [hli], a
+ jr .titleScreenCopyrightTilesLoop
+
+.tileScreenCopyrightTiles
+ db $e0,$e1,$e2,$e3,$e1,$e2,$ee,$e5,$e6,$e7,$e8,$e9,$ea,$eb,$ec,$ed,$ff ; ©1995-1999 GAME FREAK inc.
+
+.finishedBouncingPokemonLogo
+ call LoadScreenTilesFromBuffer1
+ ld c, 36
+ call DelayFrames
+ ld a, SFX_INTRO_WHOOSH
+ call PlaySound
+
+; scroll game version in from the right
+ callfar TitleScreen_PlacePikaSpeechBubble
+ ld a, SCREEN_HEIGHT_PX
+ ldh [hWY], a
+ call Delay3
+ ld e, 0
+ call TitleScreen_PlayPikachuPCM
+ call WaitForSoundToFinish
+ call StopAllMusic
+ ld a, MUSIC_TITLE_SCREEN
+ ld [wNewSoundID], a
+ call PlaySound
+.loop
+ xor a
+ ld [wUnusedCC5B], a
+ ld [wTitleScreenScene], a
+ ld [wTitleScreenScene + 1], a
+ ld [wTitleScreenScene + 2], a
+ ld [wTitleScreenScene + 3], a
+ ld a, $f
+ ld [wTitleScreenScene + 4], a
+.titleScreenLoop
+ call IncrementResetCounter
+ jp c, .doTitlescreenReset
+ call DelayFrame
+ call JoypadLowSensitivity
+ ldh a, [hJoyHeld]
+ cp D_UP | SELECT | B_BUTTON
+ jr z, .go_to_main_menu
+ and A_BUTTON | START
+ jr nz, .go_to_main_menu
+ call DoTitleScreenFunction
+ jr .titleScreenLoop
+
+.go_to_main_menu
+ ld e, $a
+ call TitleScreen_PlayPikachuPCM
+ call GBPalWhiteOutWithDelay3
+ call ClearSprites
+ xor a
+ ldh [hWY], a
+ inc a
+ ldh [hAutoBGTransferEnabled], a
+ call ClearScreen
+ ld a, HIGH(vBGMap0)
+ call TitleScreenCopyTileMapToVRAM
+ ld a, HIGH(vBGMap1)
+ call TitleScreenCopyTileMapToVRAM
+ call Delay3
+ call LoadGBPal
+ ldh a, [hJoyHeld]
+ ld b, a
+ and D_UP | SELECT | B_BUTTON
+ cp D_UP | SELECT | B_BUTTON
+ jp z, .doClearSaveDialogue
+ jp MainMenu
+
+.asm_42f0
+; unreferenced
+ callfar PrinterDebug
+ jp .loop
+
+.asm_42fb
+; unreferenced
+ ld a, [wTitleScreenScene + 4]
+ inc a
+ cp $2a
+ jr c, .asm_4305
+ ld a, $f
+.asm_4305
+ ld [wTitleScreenScene + 4], a
+ ld e, a
+ callfar PlayPikachuSoundClip
+ xor a
+ ld [wTitleScreenScene + 2], a
+ ld [wTitleScreenScene + 3], a
+ jp .titleScreenLoop
+
+.doTitlescreenReset
+ ld [wAudioFadeOutControl], a
+ call StopAllMusic
+.audioFadeLoop
+ ld a, [wAudioFadeOutControl]
+ and a
+ jr nz, .audioFadeLoop
+ jp Init
+
+.doClearSaveDialogue
+ farjp DoClearSaveDialogue
+
+
+TitleScreenCopyTileMapToVRAM:
+ ldh [hAutoBGTransferDest + 1], a
+ jp Delay3
+
+LoadCopyrightAndTextBoxTiles:
+ xor a
+ ldh [hWY], a
+ call ClearScreen
+ call LoadTextBoxTilePatterns
+
+LoadCopyrightTiles:
+ ld de, NintendoCopyrightLogoGraphics
+ ld hl, vChars2 tile $60
+ lb bc, BANK(NintendoCopyrightLogoGraphics), (TextBoxGraphics + $10 - NintendoCopyrightLogoGraphics) / $10 ; bug: overflows into text box graphics and copies the "A" tile
+ call CopyVideoData
+ hlcoord 2, 7
+ ld de, CopyrightTextString
+ jp PlaceString
+
+CopyrightTextString:
+ db $60,$61,$62,$63,$61,$62,$7c,$7f,$65,$66,$67,$68,$69,$6a ; ©1995-1999 Nintendo
+ next $60,$61,$62,$63,$61,$62,$7c,$7f,$6b,$6c,$6d,$6e,$6f,$70,$71,$72 ; ©1995-1999 Creatures inc.
+ next $60,$61,$62,$63,$61,$62,$7c,$7f,$73,$74,$75,$76,$77,$78,$79,$7a,$7b ; ©1995-1999 GAME FREAK inc.
+ db "@"
+
+TitleScreen_PlayPikachuPCM:
+ callfar PlayPikachuSoundClip
+ ret
+
+DoTitleScreenFunction:
+ call .CheckTimer
+ ld a, [wTitleScreenScene]
+ ld e, a
+ ld d, 0
+ ld hl, .Jumptable
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+
+.Jumptable:
+ dw .Nop
+ dw .BlinkHalf
+ dw .BlinkWait
+ dw .BlinkWait
+ dw .BlinkClosed
+ dw .BlinkWait
+ dw .BlinkWait
+ dw .BlinkHalf
+ dw .BlinkWait
+ dw .BlinkWait
+ dw .BlinkOpen
+ dw .GoBackToStart
+
+.GoBackToStart:
+ xor a
+ ld [wTitleScreenScene], a
+.Nop
+ ret
+
+.BlinkOpen:
+ ld e, 0
+ jr .LoadBlinkFrame
+
+.BlinkHalf:
+ ld e, 4
+ jr .LoadBlinkFrame
+
+.BlinkClosed:
+ ld e, 8
+.LoadBlinkFrame:
+ ld hl, wOAMBuffer + 2
+ ld c, 8
+.loop
+ ld a, [hl]
+ and $f3
+ or e
+ ld [hli], a
+ inc hl
+ inc hl
+ inc hl
+ dec c
+ jr nz, .loop
+.BlinkWait:
+ ld hl, wTitleScreenScene
+ inc [hl]
+ ret
+
+.CheckTimer:
+ ld hl, wTitleScreenTimer
+ ld a, [hl]
+ inc [hl]
+ and a
+ jr z, .restart
+ cp $80
+ jr z, .restart
+ cp $90
+ ret nz
+.restart
+ ld a, $1
+ ld [wTitleScreenScene], a
+ ret
+
+; copy text of fixed length NAME_LENGTH (like player name, rival name, mon names, ...)
+CopyFixedLengthText:
+ ld bc, NAME_LENGTH
+ jp CopyData
+
+NintenText: db "NINTEN@"
+SonyText: db "SONY@"
+
+IncrementResetCounter:
+ ld hl, wTitleScreenScene + 2
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ inc de
+ ld a, d
+ cp $c
+ jr z, .doReset
+ ld [hl], d
+ dec hl
+ ld [hl], e
+ and a
+ ret
+
+.doReset
+ scf
+ ret
+
+FillSpriteBuffer0WithAA:
+ xor a
+ call SwitchSRAMBankAndLatchClockData
+ ld hl, sSpriteBuffer0
+ ld bc, $20
+ ld a, $aa
+ call FillMemory
+ call PrepareRTCDataAndDisableSRAM
+ ret
diff --git a/engine/movie/title2.asm b/engine/movie/title2.asm
new file mode 100755
index 00000000..df630b53
--- /dev/null
+++ b/engine/movie/title2.asm
@@ -0,0 +1,122 @@
+; Leftover of Red/Blue. Seemingly unused
+
+TitleScroll_WaitBall:
+; Wait around for the TitleBall animation to play out.
+; hi: speed
+; lo: duration
+ db $05, $05, 0
+
+TitleScroll_In:
+; Scroll a TitleMon in from the right.
+; hi: speed
+; lo: duration
+ db $a2, $94, $84, $63, $52, $31, $11, 0
+
+TitleScroll_Out:
+; Scroll a TitleMon out to the left.
+; hi: speed
+; lo: duration
+ db $12, $22, $32, $42, $52, $62, $83, $93, 0
+
+TitleScroll:
+ ld a, d
+
+ ld bc, TitleScroll_In
+ ld d, $88
+ ld e, 0 ; don't animate titleball
+
+ and a
+ jr nz, .ok
+
+ ld bc, TitleScroll_Out
+ ld d, $00
+ ld e, 0 ; don't animate titleball
+.ok
+
+_TitleScroll:
+ ld a, [bc]
+ and a
+ ret z
+
+ inc bc
+ push bc
+
+ ld b, a
+ and $f
+ ld c, a
+ ld a, b
+ and $f0
+ swap a
+ ld b, a
+
+.loop
+ ld h, d
+ ld l, $48
+ call .ScrollBetween
+
+ ld h, $00
+ ld l, $88
+ call .ScrollBetween
+
+ ld a, d
+ add b
+ ld d, a
+
+ call GetTitleBallY
+ dec c
+ jr nz, .loop
+
+ pop bc
+ jr _TitleScroll
+
+.ScrollBetween:
+.wait
+ ldh a, [rLY] ; rLY
+ cp l
+ jr nz, .wait
+
+ ld a, h
+ ldh [rSCX], a
+
+.wait2
+ ldh a, [rLY] ; rLY
+ cp h
+ jr z, .wait2
+ ret
+
+TitleBallYTable:
+; OBJ y-positions for the Poke Ball held by Red in the title screen.
+; This is really two 0-terminated lists. Initiated with an index of 1.
+ db 0, $71, $6f, $6e, $6d, $6c, $6d, $6e, $6f, $71, $74, 0
+
+TitleScreenAnimateBallIfStarterOut:
+; Animate the TitleBall if a starter just got scrolled out.
+ ld a, [wTitleScreenScene]
+ cp STARTER1
+ jr z, .ok
+ cp STARTER2
+ jr z, .ok
+ cp STARTER3
+ ret nz
+.ok
+ ld e, 1 ; animate titleball
+ ld bc, TitleScroll_WaitBall
+ ld d, 0
+ jp _TitleScroll
+
+GetTitleBallY:
+; Get position e from TitleBallYTable
+ push de
+ push hl
+ xor a
+ ld d, a
+ ld hl, TitleBallYTable
+ add hl, de
+ ld a, [hl]
+ pop hl
+ pop de
+ and a
+ ret z
+ ld [wOAMBuffer + $28], a
+ inc e
+ ret
diff --git a/engine/movie/trade.asm b/engine/movie/trade.asm
new file mode 100755
index 00000000..7be100e0
--- /dev/null
+++ b/engine/movie/trade.asm
@@ -0,0 +1,859 @@
+InternalClockTradeAnim:
+; Do the trading animation with the player's gameboy on the left.
+; In-game trades and internally clocked link cable trades use this.
+ ld a, [wTradedPlayerMonSpecies]
+ ld [wLeftGBMonSpecies], a
+ ld a, [wTradedEnemyMonSpecies]
+ ld [wRightGBMonSpecies], a
+ ld de, InternalClockTradeFuncSequence
+ jr TradeAnimCommon
+
+ExternalClockTradeAnim:
+; Do the trading animation with the player's gameboy on the right.
+; Externally clocked link cable trades use this.
+ ld a, [wTradedEnemyMonSpecies]
+ ld [wLeftGBMonSpecies], a
+ ld a, [wTradedPlayerMonSpecies]
+ ld [wRightGBMonSpecies], a
+ ld de, ExternalClockTradeFuncSequence
+
+TradeAnimCommon:
+ ld a, [wOptions]
+ push af
+ and %110000 ; preserve speaker options
+ ld [wOptions], a
+ ldh a, [hSCY]
+ push af
+ ldh a, [hSCX]
+ push af
+ xor a
+ ldh [hSCY], a
+ ldh [hSCX], a
+ push de
+.loop
+ pop de
+ ld a, [de]
+ cp $ff
+ jr z, .done
+ inc de
+ push de
+ ld hl, TradeFuncPointerTable
+ add a
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, .loop
+ push de
+ jp hl ; call trade func, which will return to the top of the loop
+.done
+ pop af
+ ldh [hSCX], a
+ pop af
+ ldh [hSCY], a
+ pop af
+ ld [wOptions], a
+ ret
+
+addtradefunc: MACRO
+\1TradeFunc::
+ dw \1
+ENDM
+
+tradefunc: MACRO
+ db (\1TradeFunc - TradeFuncPointerTable) / 2
+ENDM
+
+; The functions in the sequences below are executed in order by TradeFuncCommon.
+; They are from opposite perspectives. The external clock one makes use of
+; Trade_SwapNames to swap the player and enemy names for some functions.
+
+InternalClockTradeFuncSequence:
+ tradefunc LoadTradingGFXAndMonNames
+ tradefunc Trade_ShowPlayerMon
+ tradefunc Trade_DrawOpenEndOfLinkCable
+ tradefunc Trade_AnimateBallEnteringLinkCable
+ tradefunc Trade_AnimLeftToRight
+ tradefunc Trade_Delay100
+ tradefunc Trade_ShowClearedWindow
+ tradefunc PrintTradeWentToText
+ tradefunc PrintTradeForSendsText
+ tradefunc PrintTradeFarewellText
+ tradefunc Trade_AnimRightToLeft
+ tradefunc Trade_ShowClearedWindow
+ tradefunc Trade_DrawOpenEndOfLinkCable
+ tradefunc Trade_ShowEnemyMon
+ tradefunc Trade_Delay100
+ tradefunc Trade_Cleanup
+ db -1 ; end
+
+ExternalClockTradeFuncSequence:
+ tradefunc LoadTradingGFXAndMonNames
+ tradefunc Trade_ShowClearedWindow
+ tradefunc PrintTradeWillTradeText
+ tradefunc PrintTradeFarewellText
+ tradefunc Trade_SwapNames
+ tradefunc Trade_AnimLeftToRight
+ tradefunc Trade_SwapNames
+ tradefunc Trade_ShowClearedWindow
+ tradefunc Trade_DrawOpenEndOfLinkCable
+ tradefunc Trade_ShowEnemyMon
+ tradefunc Trade_SlideTextBoxOffScreen
+ tradefunc Trade_ShowPlayerMon
+ tradefunc Trade_DrawOpenEndOfLinkCable
+ tradefunc Trade_AnimateBallEnteringLinkCable
+ tradefunc Trade_SwapNames
+ tradefunc Trade_AnimRightToLeft
+ tradefunc Trade_SwapNames
+ tradefunc Trade_Delay100
+ tradefunc Trade_ShowClearedWindow
+ tradefunc PrintTradeWentToText
+ tradefunc Trade_Cleanup
+ db -1 ; end
+
+TradeFuncPointerTable:
+ addtradefunc LoadTradingGFXAndMonNames
+ addtradefunc Trade_ShowPlayerMon
+ addtradefunc Trade_DrawOpenEndOfLinkCable
+ addtradefunc Trade_AnimateBallEnteringLinkCable
+ addtradefunc Trade_ShowEnemyMon
+ addtradefunc Trade_AnimLeftToRight
+ addtradefunc Trade_AnimRightToLeft
+ addtradefunc Trade_Delay100
+ addtradefunc Trade_ShowClearedWindow
+ addtradefunc PrintTradeWentToText
+ addtradefunc PrintTradeForSendsText
+ addtradefunc PrintTradeFarewellText
+ addtradefunc PrintTradeTakeCareText
+ addtradefunc PrintTradeWillTradeText
+ addtradefunc Trade_Cleanup
+ addtradefunc Trade_SlideTextBoxOffScreen
+ addtradefunc Trade_SwapNames
+
+Trade_Delay100:
+ ld c, 100
+ jp DelayFrames
+
+Trade_CopyTileMapToVRAM:
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ call Delay3
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ ret
+
+Trade_Delay80:
+ ld c, 80
+ jp DelayFrames
+
+Trade_ClearTileMap:
+ hlcoord 0, 0
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ ld a, " "
+ jp FillMemory
+
+LoadTradingGFXAndMonNames:
+ call Trade_ClearTileMap
+ call DisableLCD
+ ld hl, TradingAnimationGraphics
+ ld de, vChars2 tile $31
+ ld bc, TradingAnimationGraphicsEnd - TradingAnimationGraphics
+ ld a, BANK(TradingAnimationGraphics)
+ call FarCopyData
+ ld hl, TradingAnimationGraphics2
+ ld de, vSprites tile $7c
+ ld bc, TradingAnimationGraphics2End - TradingAnimationGraphics2
+ ld a, BANK(TradingAnimationGraphics2)
+ call FarCopyData
+ ld hl, vBGMap0
+ ld bc, $800
+ ld a, " "
+ call FillMemory
+ call ClearSprites
+ ld a, $ff
+ ld [wUpdateSpritesEnabled], a
+ ld hl, wd730
+ set 6, [hl] ; turn on instant text printing
+ ld a, [wOnSGB]
+ and a
+ ld a, $e4 ; non-SGB OBP0
+ jr z, .next
+ ld a, $f0 ; SGB OBP0
+.next
+ ldh [rOBP0], a
+ call UpdateGBCPal_OBP0
+ call EnableLCD
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ ld a, [wTradedPlayerMonSpecies]
+ ld [wd11e], a
+ call GetMonName
+ ld hl, wcd6d
+ ld de, wcf4b
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld a, [wTradedEnemyMonSpecies]
+ ld [wd11e], a
+ jp GetMonName
+
+Trade_LoadMonPartySpriteGfx:
+ ld a, %11010000
+ ldh [rOBP1], a
+ call UpdateGBCPal_OBP1
+ farjp LoadMonPartySpriteGfx
+
+Trade_SwapNames:
+ ld hl, wPlayerName
+ ld de, wBuffer
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld hl, wLinkEnemyTrainerName
+ ld de, wPlayerName
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld hl, wBuffer
+ ld de, wLinkEnemyTrainerName
+ ld bc, NAME_LENGTH
+ jp CopyData
+
+Trade_Cleanup:
+ xor a
+ call LoadGBPal
+ ld hl, wd730
+ res 6, [hl] ; turn off instant text printing
+ ret
+
+Trade_ShowPlayerMon:
+ ld a, %10101011
+ ldh [rLCDC], a
+ ld a, $50
+ ldh [hWY], a
+ ld a, $86
+ ldh [rWX], a
+ ldh [hSCX], a
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ hlcoord 4, 0
+ lb bc, 6, 10
+ call TextBoxBorder
+ call Trade_PrintPlayerMonInfoText
+ ld b, HIGH(vBGMap0)
+ call CopyScreenTileBufferToVRAM
+ call ClearScreen
+ ld a, [wTradedPlayerMonSpecies]
+ call Trade_LoadMonSprite
+ ld a, $7e
+.slideScreenLoop
+ push af
+ call DelayFrame
+ pop af
+ ldh [rWX], a
+ ldh [hSCX], a
+ dec a
+ dec a
+ and a
+ jr nz, .slideScreenLoop
+ call Trade_Delay80
+ ld a, TRADE_BALL_POOF_ANIM
+ call Trade_ShowAnimation
+ ld a, TRADE_BALL_DROP_ANIM
+ call Trade_ShowAnimation ; clears mon pic
+ ld a, [wTradedPlayerMonSpecies]
+ call PlayCry
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ ret
+
+Trade_DrawOpenEndOfLinkCable:
+ call Trade_ClearTileMap
+ ld b, HIGH(vBGMap0)
+ call CopyScreenTileBufferToVRAM
+ 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.
+ ld hl, vBGMap1 + $8c
+ call Trade_CopyCableTilesOffScreen
+
+ ld a, $a0
+ ldh [hSCX], a
+ call DelayFrame
+ ld a, %10001011
+ ldh [rLCDC], a
+ hlcoord 6, 2
+ ld b, TILEMAP_LINK_CABLE
+ call CopyTileIDsFromList_ZeroBaseTileID
+ call Trade_CopyTileMapToVRAM
+ ld a, SFX_HEAL_HP
+ call PlaySound
+ ld c, 20
+.loop
+ ldh a, [hSCX]
+ add 4
+ ldh [hSCX], a
+ dec c
+ jr nz, .loop
+ ret
+
+Trade_AnimateBallEnteringLinkCable:
+ ld a, TRADE_BALL_SHAKE_ANIM
+ call Trade_ShowAnimation
+ ld c, 10
+ call DelayFrames
+ ld a, %11100100
+ ldh [rOBP0], a
+ call UpdateGBCPal_OBP0
+ xor a
+ ld [wLinkCableAnimBulgeToggle], a
+ lb bc, $20, $60
+.moveBallInsideLinkCableLoop
+ push bc
+ xor a
+ ld de, Trade_BallInsideLinkCableOAM
+ call WriteOAMBlock
+ ld a, [wLinkCableAnimBulgeToggle]
+ xor $1
+ ld [wLinkCableAnimBulgeToggle], a
+ add $7e
+ ld hl, wOAMBuffer + $02
+ ld de, 4
+ ld c, e
+.cycleLinkCableBulgeTile
+ ld [hl], a
+ add hl, de
+ dec c
+ jr nz, .cycleLinkCableBulgeTile
+ call Delay3
+ pop bc
+ ld a, c
+ add $4
+ ld c, a
+ cp $a0
+ jr nc, .ballSpriteReachedEdgeOfScreen
+ ld a, SFX_TINK
+ call PlaySound
+ jr .moveBallInsideLinkCableLoop
+.ballSpriteReachedEdgeOfScreen
+ call ClearSprites
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ call ClearScreen
+ ld b, $98
+ call CopyScreenTileBufferToVRAM
+ call Delay3
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ ret
+
+Trade_BallInsideLinkCableOAM:
+ dbsprite 0, 15, 0, 6, $7e, OAM_HFLIP
+ dbsprite 8, 15, 0, 6, $7e, OAM_HFLIP | OAM_VFLIP
+
+Trade_ShowEnemyMon:
+ ld a, TRADE_BALL_TILT_ANIM
+ call Trade_ShowAnimation
+ call Trade_ShowClearedWindow
+ hlcoord 4, 10
+ lb bc, 6, 10
+ call TextBoxBorder
+ call Trade_PrintEnemyMonInfoText
+ call Trade_CopyTileMapToVRAM
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ ld a, [wTradedEnemyMonSpecies]
+ call Trade_LoadMonSprite
+ ld a, TRADE_BALL_POOF_ANIM
+ call Trade_ShowAnimation
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ ld a, [wTradedEnemyMonSpecies]
+ call PlayCry
+ call Trade_Delay100
+ hlcoord 4, 10
+ lb bc, 8, 12
+ call ClearScreenArea
+ jp PrintTradeTakeCareText
+
+Trade_AnimLeftToRight:
+; Animates the mon moving from the left GB to the right one.
+ call Trade_InitGameboyTransferGfx
+ ld a, $1
+ ld [wTradedMonMovingRight], a
+ ld a, %11100100
+ ldh [rOBP0], a
+ call UpdateGBCPal_OBP0
+ ld a, $54
+ ld [wBaseCoordX], a
+ ld a, $1c
+ ld [wBaseCoordY], a
+ ld a, [wLeftGBMonSpecies]
+ ld [wMonPartySpriteSpecies], a
+ call Trade_WriteCircledMonOAM
+ call Trade_DrawLeftGameboy
+ call Trade_CopyTileMapToVRAM
+ call Trade_DrawCableAcrossScreen
+ ld hl, vBGMap1 + $8c
+ call Trade_CopyCableTilesOffScreen
+ ld b, $6
+ call Trade_AnimMonMoveHorizontal
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ call Trade_DrawCableAcrossScreen
+ ld b, $4
+ call Trade_AnimMonMoveHorizontal
+ call Trade_DrawRightGameboy
+ ld b, $6
+ call Trade_AnimMonMoveHorizontal
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ call Trade_AnimMonMoveVertical
+ jp ClearSprites
+
+Trade_AnimRightToLeft:
+; Animates the mon moving from the right GB to the left one.
+ call Trade_InitGameboyTransferGfx
+ xor a
+ ld [wTradedMonMovingRight], a
+ ld a, $64
+ ld [wBaseCoordX], a
+ ld a, $44
+ ld [wBaseCoordY], a
+ ld a, [wRightGBMonSpecies]
+ ld [wMonPartySpriteSpecies], a
+ call Trade_WriteCircledMonOAM
+ call Trade_DrawRightGameboy
+ call Trade_CopyTileMapToVRAM
+ call Trade_DrawCableAcrossScreen
+ ld hl, vBGMap1 + $94
+ call Trade_CopyCableTilesOffScreen
+ call Trade_AnimMonMoveVertical
+ ld b, $6
+ call Trade_AnimMonMoveHorizontal
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ call Trade_DrawCableAcrossScreen
+ ld b, $4
+ call Trade_AnimMonMoveHorizontal
+ call Trade_DrawLeftGameboy
+ ld b, $6
+ call Trade_AnimMonMoveHorizontal
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ jp ClearSprites
+
+Trade_InitGameboyTransferGfx:
+; Initialises the graphics for showing a mon moving between gameboys.
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ call ClearScreen
+ ld b, SET_PAL_GENERIC
+ call RunPaletteCommand
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ call Trade_LoadMonPartySpriteGfx
+ call DelayFrame
+ ld a, %10101011
+ ldh [rLCDC], a
+ xor a
+ ldh [hSCX], a
+ ld a, $90
+ ldh [hWY], a
+ ret
+
+Trade_DrawLeftGameboy:
+ call Trade_ClearTileMap
+
+; draw link cable
+ hlcoord 11, 4
+ ld a, $5d
+ ld [hli], a
+ ld a, $5e
+ ld c, 8
+.loop
+ ld [hli], a
+ dec c
+ jr nz, .loop
+
+; draw gameboy pic
+ hlcoord 5, 3
+ ld b, TILEMAP_GAME_BOY
+ call CopyTileIDsFromList_ZeroBaseTileID
+
+; draw text box with player name below gameboy pic
+ hlcoord 4, 12
+ lb bc, 2, 7
+ call TextBoxBorder
+ hlcoord 5, 14
+ ld de, wPlayerName
+ call PlaceString
+
+ jp DelayFrame
+
+Trade_DrawRightGameboy:
+ call Trade_ClearTileMap
+
+; draw horizontal segment of link cable
+ hlcoord 0, 4
+ ld a, $5e
+ ld c, $e
+.loop
+ ld [hli], a
+ dec c
+ jr nz, .loop
+
+; draw vertical segment of link cable
+ ld a, $5f
+ ld [hl], a
+ ld de, SCREEN_WIDTH
+ add hl, de
+ ld a, $61
+ ld [hl], a
+ add hl, de
+ ld [hl], a
+ add hl, de
+ ld [hl], a
+ add hl, de
+ ld [hl], a
+ add hl, de
+ ld a, $60
+ ld [hld], a
+ ld a, $5d
+ ld [hl], a
+
+; draw gameboy pic
+ hlcoord 7, 8
+ ld b, TILEMAP_GAME_BOY
+ call CopyTileIDsFromList_ZeroBaseTileID
+
+; draw text box with enemy name above link cable
+ hlcoord 6, 0
+ lb bc, 2, 7
+ call TextBoxBorder
+ hlcoord 7, 2
+ ld de, wLinkEnemyTrainerName
+ call PlaceString
+
+ jp DelayFrame
+
+Trade_DrawCableAcrossScreen:
+; Draws the link cable across the screen.
+ call Trade_ClearTileMap
+ hlcoord 0, 4
+ ld a, $5e
+ ld c, SCREEN_WIDTH
+.loop
+ ld [hli], a
+ dec c
+ jr nz, .loop
+ ret
+
+Trade_CopyCableTilesOffScreen:
+; This is used to copy the link cable tiles off screen so that the cable
+; continues when the screen is scrolled.
+ push hl
+ hlcoord 0, 4
+ call CopyToRedrawRowOrColumnSrcTiles
+ pop hl
+ ld a, h
+ ldh [hRedrawRowOrColumnDest + 1], a
+ ld a, l
+ ldh [hRedrawRowOrColumnDest], a
+ ld a, REDRAW_ROW
+ ldh [hRedrawRowOrColumnMode], a
+ ld c, 10
+ jp DelayFrames
+
+Trade_AnimMonMoveHorizontal:
+; Animates the mon going through the link cable horizontally over a distance of
+; b 16-pixel units.
+ ld a, [wTradedMonMovingRight]
+ ld e, a
+ ld d, $8
+.scrollLoop
+ ld a, e
+ dec a
+ jr z, .movingRight
+; moving left
+ ldh a, [hSCX]
+ sub $2
+ jr .next
+.movingRight
+ ldh a, [hSCX]
+ add $2
+.next
+ ldh [hSCX], a
+ call DelayFrame
+ dec d
+ jr nz, .scrollLoop
+ call Trade_AnimCircledMon
+ dec b
+ jr nz, Trade_AnimMonMoveHorizontal
+ ret
+
+Trade_AnimCircledMon:
+; Cycles between the two animation frames of the mon party sprite, cycles
+; between a circle and an oval around the mon sprite, and makes the cable flash.
+ push de
+ push bc
+ push hl
+ ldh a, [rBGP]
+ xor $3c ; make link cable flash
+ ldh [rBGP], a
+ call UpdateGBCPal_BGP
+ ld hl, wOAMBuffer + $02
+ ld de, $4
+ ld c, $14
+.loop
+ ld a, [hl]
+ xor ICONOFFSET
+ ld [hl], a
+ add hl, de
+ dec c
+ jr nz, .loop
+ pop hl
+ pop bc
+ pop de
+ ret
+
+Trade_WriteCircledMonOAM:
+ farcall WriteMonPartySpriteOAMBySpecies
+ call Trade_WriteCircleOAM
+
+Trade_AddOffsetsToOAMCoords:
+ ld hl, wOAMBuffer
+ ld c, $14 ; SCREEN_WIDTH?
+.loop
+ ld a, [wBaseCoordY]
+ add [hl]
+ ld [hli], a
+ ld a, [wBaseCoordX]
+ add [hl]
+ ld [hli], a
+ inc hl
+ inc hl
+ dec c
+ jr nz, .loop
+ ret
+
+Trade_AnimMonMoveVertical:
+; Animates the mon going through the link cable vertically as well as
+; horizontally for a bit. The last bit of horizontal movement (when moving
+; right) or the first bit of horizontal movement (when moving left) are done
+; here instead of Trade_AnimMonMoveHorizontal because this function moves the
+; sprite itself rather than scrolling the screen around the sprite. Moving the
+; sprite itself is necessary because the vertical segment of the link cable is
+; to the right of the screen position that the mon sprite has when
+; Trade_AnimMonMoveHorizontal is executing.
+ ld a, [wTradedMonMovingRight]
+ and a
+ jr z, .movingLeft
+; moving right
+ lb bc, 4, 0 ; move right
+ call .doAnim
+ lb bc, 0, 10 ; move down
+ jr .doAnim
+.movingLeft
+ lb bc, 0, -10 ; move up
+ call .doAnim
+ lb bc, -4, 0 ; move left
+.doAnim
+ ld a, b
+ ld [wBaseCoordX], a
+ ld a, c
+ ld [wBaseCoordY], a
+ ld d, $4
+.loop
+ call Trade_AddOffsetsToOAMCoords
+ call Trade_AnimCircledMon
+ ld c, 8
+ call DelayFrames
+ dec d
+ jr nz, .loop
+ ret
+
+Trade_WriteCircleOAM:
+; Writes the OAM blocks for the circle around the traded mon as it passes
+; the link cable.
+ ld hl, Trade_CircleOAMPointers
+ ld c, $4
+ xor a
+.loop
+ push bc
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ inc hl
+ ld c, [hl]
+ inc hl
+ ld b, [hl]
+ inc hl
+ push hl
+ inc a
+ push af
+ call WriteOAMBlock
+ pop af
+ pop hl
+ pop bc
+ dec c
+ jr nz, .loop
+ ret
+
+trade_circle_oam: MACRO
+ dw \1
+ db \2, \3
+ENDM
+
+Trade_CircleOAMPointers:
+ ; oam pointer, upper-left x coord, upper-left y coord
+ trade_circle_oam Trade_CircleOAM0, $08, $08
+ trade_circle_oam Trade_CircleOAM1, $18, $08
+ trade_circle_oam Trade_CircleOAM2, $08, $18
+ trade_circle_oam Trade_CircleOAM3, $18, $18
+
+Trade_CircleOAM0:
+ dbsprite 2, 7, 0, 0, ICON_TRADEBUBBLE << 2 + 1, OAM_OBP1
+ dbsprite 2, 7, 0, 2, ICON_TRADEBUBBLE << 2 + 3, OAM_OBP1
+
+Trade_CircleOAM1:
+ dbsprite 6, 7, 0, 1, ICON_TRADEBUBBLE << 2 + 0, OAM_OBP1 | OAM_HFLIP
+ dbsprite 6, 7, 0, 3, ICON_TRADEBUBBLE << 2 + 2, OAM_OBP1 | OAM_HFLIP
+
+Trade_CircleOAM2:
+ dbsprite 10, 7, 0, 2, ICON_TRADEBUBBLE << 2 + 3, OAM_OBP1 | OAM_VFLIP
+ dbsprite 10, 7, 0, 0, ICON_TRADEBUBBLE << 2 + 1, OAM_OBP1 | OAM_VFLIP
+
+Trade_CircleOAM3:
+ dbsprite 14, 7, 0, 3, ICON_TRADEBUBBLE << 2 + 2, OAM_OBP1 | OAM_HFLIP | OAM_VFLIP
+ dbsprite 14, 7, 0, 1, ICON_TRADEBUBBLE << 2 + 0, OAM_OBP1 | OAM_HFLIP | OAM_VFLIP
+
+; a = species
+Trade_LoadMonSprite:
+ ld [wcf91], a
+ ld [wd0b5], a
+ ld [wWholeScreenPaletteMonSpecies], a
+ ld b, SET_PAL_POKEMON_WHOLE_SCREEN
+ ld c, 0
+ call RunPaletteCommand
+ ldh a, [hAutoBGTransferEnabled]
+ xor $1
+ ldh [hAutoBGTransferEnabled], a
+ call GetMonHeader
+ hlcoord 7, 2
+ call LoadFlippedFrontSpriteByMonIndex
+ ld c, 10
+ jp DelayFrames
+
+Trade_ShowClearedWindow:
+; clears the window and covers the BG entirely with the window
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ call ClearScreen
+ ld a, %11100011
+ ldh [rLCDC], a
+ ld a, $7
+ ldh [rWX], a
+ xor a
+ ldh [hWY], a
+ ld a, $90
+ ldh [hSCX], a
+ ret
+
+Trade_SlideTextBoxOffScreen:
+; Slides the window right until it's off screen. The window usually just has
+; a text box at the bottom when this is called. However, when this is called
+; after Trade_ShowEnemyMon in the external clock sequence, there is a mon pic
+; above the text box and it is also scrolled off the screen.
+ ld c, 50
+ call DelayFrames
+.loop
+ call DelayFrame
+ ldh a, [rWX]
+ inc a
+ inc a
+ ldh [rWX], a
+ cp $a1
+ jr nz, .loop
+ call Trade_ClearTileMap
+ ld c, 10
+ call DelayFrames
+ ld a, $7
+ ldh [rWX], a
+ ret
+
+PrintTradeWentToText:
+ ld hl, TradeWentToText
+ call PrintText
+ ld c, 200
+ call DelayFrames
+ jp Trade_SlideTextBoxOffScreen
+
+TradeWentToText:
+ text_far _TradeWentToText
+ text_end
+
+PrintTradeForSendsText:
+ ld hl, TradeForText
+ call PrintText
+ call Trade_Delay80
+ ld hl, TradeSendsText
+ call PrintText
+ jp Trade_Delay80
+
+TradeForText:
+ text_far _TradeForText
+ text_end
+
+TradeSendsText:
+ text_far _TradeSendsText
+ text_end
+
+PrintTradeFarewellText:
+ ld hl, TradeWavesFarewellText
+ call PrintText
+ call Trade_Delay80
+ ld hl, TradeTransferredText
+ call PrintText
+ call Trade_Delay80
+ jp Trade_SlideTextBoxOffScreen
+
+TradeWavesFarewellText:
+ text_far _TradeWavesFarewellText
+ text_end
+
+TradeTransferredText:
+ text_far _TradeTransferredText
+ text_end
+
+PrintTradeTakeCareText:
+ ld hl, TradeTakeCareText
+ call PrintText
+ jp Trade_Delay80
+
+TradeTakeCareText:
+ text_far _TradeTakeCareText
+ text_end
+
+PrintTradeWillTradeText:
+ ld hl, TradeWillTradeText
+ call PrintText
+ call Trade_Delay80
+ ld hl, TradeforText
+ call PrintText
+ jp Trade_Delay80
+
+TradeWillTradeText:
+ text_far _TradeWillTradeText
+ text_end
+
+TradeforText:
+ text_far _TradeforText
+ text_end
+
+Trade_ShowAnimation:
+ ld [wAnimationID], a
+ xor a
+ ld [wAnimationType], a
+ predef_jump MoveAnimation
diff --git a/engine/movie/trade2.asm b/engine/movie/trade2.asm
new file mode 100755
index 00000000..f0d91846
--- /dev/null
+++ b/engine/movie/trade2.asm
@@ -0,0 +1,49 @@
+Trade_PrintPlayerMonInfoText:
+ hlcoord 5, 0
+ ld de, Trade_MonInfoText
+ call PlaceString
+ ld a, [wTradedPlayerMonSpecies]
+ ld [wd11e], a
+ predef IndexToPokedex
+ hlcoord 9, 0
+ ld de, wd11e
+ lb bc, LEADING_ZEROES | 1, 3
+ call PrintNumber
+ hlcoord 5, 2
+ ld de, wcf4b
+ call PlaceString
+ hlcoord 8, 4
+ ld de, wTradedPlayerMonOT
+ call PlaceString
+ hlcoord 8, 6
+ ld de, wTradedPlayerMonOTID
+ lb bc, LEADING_ZEROES | 2, 5
+ jp PrintNumber
+
+Trade_PrintEnemyMonInfoText:
+ hlcoord 5, 10
+ ld de, Trade_MonInfoText
+ call PlaceString
+ ld a, [wTradedEnemyMonSpecies]
+ ld [wd11e], a
+ predef IndexToPokedex
+ hlcoord 9, 10
+ ld de, wd11e
+ lb bc, LEADING_ZEROES | 1, 3
+ call PrintNumber
+ hlcoord 5, 12
+ ld de, wcd6d
+ call PlaceString
+ hlcoord 8, 14
+ ld de, wTradedEnemyMonOT
+ call PlaceString
+ hlcoord 8, 16
+ ld de, wTradedEnemyMonOTID
+ lb bc, LEADING_ZEROES | 2, 5
+ jp PrintNumber
+
+Trade_MonInfoText:
+ db "──№<DOT>"
+ next ""
+ next "OT/"
+ next "<ID>№<DOT>@"
diff --git a/engine/multiply_divide.asm b/engine/multiply_divide.asm
deleted file mode 100755
index d664c9d4..00000000
--- a/engine/multiply_divide.asm
+++ /dev/null
@@ -1,144 +0,0 @@
-_Multiply:
- ld a, $8
- ld b, a
- xor a
- ld [H_PRODUCT], a
- ld [H_MULTIPLYBUFFER], a
- ld [H_MULTIPLYBUFFER+1], a
- ld [H_MULTIPLYBUFFER+2], a
- ld [H_MULTIPLYBUFFER+3], a
-.multiplyLoop
- ld a, [H_MULTIPLIER]
- srl a
- ld [H_MULTIPLIER], a
- jr nc, .smallMultiplier ; less than $80
-; code to possibly multiply the multiplicand by 2 and divide the multiplier by 2?
- ld a, [H_MULTIPLYBUFFER+3]
- ld c, a
- ld a, [H_MULTIPLICAND+2]
- add c
- ld [H_MULTIPLYBUFFER+3], a
- ld a, [H_MULTIPLYBUFFER+2]
- ld c, a
- ld a, [H_MULTIPLICAND+1]
- adc c
- ld [H_MULTIPLYBUFFER+2], a
- ld a, [H_MULTIPLYBUFFER+1]
- ld c, a
- ld a, [H_MULTIPLICAND]
- adc c
- ld [H_MULTIPLYBUFFER+1], a
- ld a, [H_MULTIPLYBUFFER]
- ld c, a
- ld a, [H_PRODUCT]
- adc c
- ld [H_MULTIPLYBUFFER], a
-.smallMultiplier
- dec b
- jr z, .done
- ld a, [H_MULTIPLICAND+2]
- sla a
- ld [H_MULTIPLICAND+2], a
- ld a, [H_MULTIPLICAND+1]
- rl a
- ld [H_MULTIPLICAND+1], a
- ld a, [H_MULTIPLICAND]
- rl a
- ld [H_MULTIPLICAND], a
- ld a, [H_PRODUCT]
- rl a
- ld [H_PRODUCT], a
- jr .multiplyLoop
-.done
- ld a, [H_MULTIPLYBUFFER+3]
- ld [H_PRODUCT+3], a
- ld a, [H_MULTIPLYBUFFER+2]
- ld [H_PRODUCT+2], a
- ld a, [H_MULTIPLYBUFFER+1]
- ld [H_PRODUCT+1], a
- ld a, [H_MULTIPLYBUFFER]
- ld [H_PRODUCT], a
- ret
-
-_Divide:
- xor a
- ld [H_DIVIDEBUFFER], a
- ld [H_DIVIDEBUFFER+1], a
- ld [H_DIVIDEBUFFER+2], a
- ld [H_DIVIDEBUFFER+3], a
- ld [H_DIVIDEBUFFER+4], a
- ld a, $9
- ld e, a
-.asm_f6680
- ld a, [H_DIVIDEBUFFER]
- ld c, a
- ld a, [H_DIVIDEND+1]
- sub c
- ld d, a
- ld a, [H_DIVISOR]
- ld c, a
- ld a, [H_DIVIDEND]
- sbc c
- jr c, .asm_f669b
- ld [H_DIVIDEND], a
- ld a, d
- ld [H_DIVIDEND+1], a
- ld a, [H_DIVIDEBUFFER+4]
- inc a
- ld [H_DIVIDEBUFFER+4], a
- jr .asm_f6680
-.asm_f669b
- ld a, b
- cp $1
- jr z, .done
- ld a, [H_DIVIDEBUFFER+4]
- sla a
- ld [H_DIVIDEBUFFER+4], a
- ld a, [H_DIVIDEBUFFER+3]
- rl a
- ld [H_DIVIDEBUFFER+3], a
- ld a, [H_DIVIDEBUFFER+2]
- rl a
- ld [H_DIVIDEBUFFER+2], a
- ld a, [H_DIVIDEBUFFER+1]
- rl a
- ld [H_DIVIDEBUFFER+1], a
- dec e
- jr nz, .asm_f66d1
- ld a, $8
- ld e, a
- ld a, [H_DIVIDEBUFFER]
- ld [H_DIVISOR], a
- xor a
- ld [H_DIVIDEBUFFER], a
- ld a, [H_DIVIDEND+1]
- ld [H_DIVIDEND], a
- ld a, [H_DIVIDEND+2]
- ld [H_DIVIDEND+1], a
- ld a, [H_DIVIDEND+3]
- ld [H_DIVIDEND+2], a
-.asm_f66d1
- ld a, e
- cp $1
- jr nz, .asm_f66d7
- dec b
-.asm_f66d7
- ld a, [H_DIVISOR]
- srl a
- ld [H_DIVISOR], a
- ld a, [H_DIVIDEBUFFER]
- rr a
- ld [H_DIVIDEBUFFER], a
- jr .asm_f6680
-.done
- ld a, [H_DIVIDEND+1]
- ld [H_REMAINDER], a
- ld a, [H_DIVIDEBUFFER+4]
- ld [H_QUOTIENT+3], a
- ld a, [H_DIVIDEBUFFER+3]
- ld [H_QUOTIENT+2], a
- ld a, [H_DIVIDEBUFFER+2]
- ld [H_QUOTIENT+1], a
- ld a, [H_DIVIDEBUFFER+1]
- ld [H_QUOTIENT], a
- ret
diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm
deleted file mode 100755
index 8a537579..00000000
--- a/engine/oak_speech.asm
+++ /dev/null
@@ -1,244 +0,0 @@
-SetDefaultNames:
- ld a, [wLetterPrintingDelayFlags]
- push af
- ld a, [wOptions]
- push af
- ld a, [wd732]
- push af
- ld a, [wPrinterSettings]
- push af
- ld hl, wPlayerName
- ld bc, wBoxDataEnd - wPlayerName
- xor a
- call FillMemory
- ld hl, wSpriteStateData1
- ld bc, $200
- xor a
- call FillMemory
- xor a
- ld [wSurfingMinigameHiScore], a
- ld [wSurfingMinigameHiScore + 1], a
- ld [wSurfingMinigameHiScore + 2], a
- pop af
- ld [wPrinterSettings], a
- pop af
- ld [wd732], a
- pop af
- ld [wOptions], a
- pop af
- ld [wLetterPrintingDelayFlags], a
- ld a, [wOptionsInitialized]
- and a
- call z, InitOptions
- ld hl, NintenText
- ld de, wPlayerName
- ld bc, NAME_LENGTH
- call CopyData
- ld hl, SonyText
- ld de, wRivalName
- ld bc, NAME_LENGTH
- call CopyData ; rip optimizations
- ret
-
-OakSpeech:
- call StopAllMusic ; stop music
- ld a, BANK(Music_Routes2)
- ld c, a
- ld a, MUSIC_ROUTES2
- call PlayMusic
- call ClearScreen
- call LoadTextBoxTilePatterns
- call SetDefaultNames
- predef InitPlayerData2
- ld hl, wNumBoxItems
- ld a, POTION
- ld [wcf91], a
- ld a, 1
- ld [wItemQuantity], a
- call AddItemToInventory ; give one potion
- ld a, [wDefaultMap]
- ld [wDestinationMap], a
- call SpecialWarpIn
- xor a
- ld [hTilesetType], a
- ld a, [wd732]
- bit 1, a ; possibly a debug mode bit
- jp nz, .skipChoosingNames
- ld de, ProfOakPic
- lb bc, Bank(ProfOakPic), $00
- call IntroDisplayPicCenteredOrUpperRight
- call FadeInIntroPic
- ld hl, OakSpeechText1
- call PrintText
- call GBFadeOutToWhite
- call ClearScreen
- ld a, PIKACHU
- ld [wd0b5], a
- ld [wcf91], a
- call GetMonHeader
- coord hl, 6, 4
- call LoadFlippedFrontSpriteByMonIndex
- call MovePicLeft
- ld hl, OakSpeechText2
- call PrintText
- call GBFadeOutToWhite
- call ClearScreen
- ld de, RedPicFront
- lb bc, Bank(RedPicFront), $00
- call IntroDisplayPicCenteredOrUpperRight
- call MovePicLeft
- ld hl, IntroducePlayerText
- call PrintText
- call ChoosePlayerName
- call GBFadeOutToWhite
- call ClearScreen
- ld de, Rival1Pic
- lb bc, Bank(Rival1Pic), $00
- call IntroDisplayPicCenteredOrUpperRight
- call FadeInIntroPic
- ld hl, IntroduceRivalText
- call PrintText
- call ChooseRivalName
-.skipChoosingNames
- call GBFadeOutToWhite
- call ClearScreen
- ld de, RedPicFront
- lb bc, Bank(RedPicFront), $00
- call IntroDisplayPicCenteredOrUpperRight
- call GBFadeInFromWhite
- ld a, [wd72d]
- and a
- jr nz, .next
- ld hl, OakSpeechText3
- call PrintText
-.next
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, SFX_SHRINK
- call PlaySound
- pop af
- call BankswitchCommon
- ld c, 4
- call DelayFrames
- ld hl, vSprites
- ld de, RedSprite
- ld b, BANK(RedSprite)
- ld c, $0C
- call CopyVideoData
- ld de, ShrinkPic1
- lb bc, BANK(ShrinkPic1), $00
- call IntroDisplayPicCenteredOrUpperRight
- ld c, 4
- call DelayFrames
- ld de, ShrinkPic2
- lb bc, BANK(ShrinkPic2), $00
- call IntroDisplayPicCenteredOrUpperRight
- call ResetPlayerSpriteData
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, BANK(Music_PalletTown)
- ld [wAudioROMBank], a
- ld [wAudioSavedROMBank], a
- ld a, 10
- ld [wAudioFadeOutControl], a
- call StopAllMusic ; stop music
- pop af
- call BankswitchCommon
- ld c, 20
- call DelayFrames
- coord hl, 6, 5
- lb bc, 7, 7
- call ClearScreenArea
- call LoadTextBoxTilePatterns
- ld a, 1
- ld [wUpdateSpritesEnabled], a
- ld c, 50
- call DelayFrames
- call GBFadeOutToWhite
- call ClearScreen ; rip more tail-end optimizations
- ret
-
-OakSpeechText1:
- TX_FAR _OakSpeechText1
- db "@"
-OakSpeechText2:
- TX_FAR _OakSpeechText2A
- TX_CRY_NIDORINA
- TX_FAR _OakSpeechText2B
- db "@"
-IntroducePlayerText:
- TX_FAR _IntroducePlayerText
- db "@"
-IntroduceRivalText:
- TX_FAR _IntroduceRivalText
- db "@"
-OakSpeechText3:
- TX_FAR _OakSpeechText3
- db "@"
-
-FadeInIntroPic:
- ld hl, IntroFadePalettes
- ld b, 6
-.next
- ld a, [hli]
- ld [rBGP], a
- call UpdateGBCPal_BGP
- ld c, 10
- call DelayFrames
- dec b
- jr nz, .next
- ret
-
-IntroFadePalettes:
- db %01010100
- db %10101000
- db %11111100
- db %11111000
- db %11110100
- db %11100100
-
-MovePicLeft:
- ld a, 119
- ld [rWX], a
- call DelayFrame
-
- ld a, %11100100
- ld [rBGP], a
- call UpdateGBCPal_BGP
-.next
- call DelayFrame
- ld a, [rWX]
- sub 8
- cp $FF
- ret z
- ld [rWX], a
- jr .next
-
-DisplayPicCenteredOrUpperRight:
- call GetPredefRegisters
-IntroDisplayPicCenteredOrUpperRight:
-; b = bank
-; de = address of compressed pic
-; c: 0 = centred, non-zero = upper-right
- push bc
- ld a, b
- call UncompressSpriteFromDE
- ld a, $0
- call SwitchSRAMBankAndLatchClockData
- ld hl, sSpriteBuffer1
- ld de, sSpriteBuffer0
- ld bc, $310
- call CopyData
- call PrepareRTCDataAndDisableSRAM
- ld de, vFrontPic
- call InterlaceMergeSpriteBuffers
- pop bc
- ld a, c
- and a
- coord hl, 15, 1
- jr nz, .next
- coord hl, 6, 4
-.next
- xor a
- ld [hStartTileID], a
- predef_jump CopyUncompressedPicToTilemap
diff --git a/engine/oak_speech2.asm b/engine/oak_speech2.asm
deleted file mode 100755
index 80f1bafc..00000000
--- a/engine/oak_speech2.asm
+++ /dev/null
@@ -1,241 +0,0 @@
-ChoosePlayerName:
- call OakSpeechSlidePicRight
- ld de, DefaultNamesPlayer
- call DisplayIntroNameTextBox
- ld a, [wCurrentMenuItem]
- and a
- jr z, .customName
- ld hl, DefaultNamesPlayerList
- call GetDefaultName
- ld de, wPlayerName
- call OakSpeechSlidePicLeft
- jr .done
-.customName
- ld hl, wPlayerName
- xor a ; NAME_PLAYER_SCREEN
- ld [wNamingScreenType], a
- call DisplayNamingScreen
- ld a, [wcf4b]
- cp "@"
- jr z, .customName
- call ClearScreen
- call Delay3
- ld de, RedPicFront
- ld b, BANK(RedPicFront)
- call IntroDisplayPicCenteredOrUpperRight
-.done
- ld hl, YourNameIsText
- jp PrintText
-
-YourNameIsText:
- TX_FAR _YourNameIsText
- db "@"
-
-ChooseRivalName:
- call OakSpeechSlidePicRight
- ld de, DefaultNamesRival
- call DisplayIntroNameTextBox
- ld a, [wCurrentMenuItem]
- and a
- jr z, .customName
- ld hl, DefaultNamesRivalList
- call GetDefaultName
- ld de, wRivalName
- call OakSpeechSlidePicLeft
- jr .done
-.customName
- ld hl, wRivalName
- ld a, NAME_RIVAL_SCREEN
- ld [wNamingScreenType], a
- call DisplayNamingScreen
- ld a, [wcf4b]
- cp "@"
- jr z, .customName
- call ClearScreen
- call Delay3
- ld de, Rival1Pic
- ld b, $13
- call IntroDisplayPicCenteredOrUpperRight
-.done
- ld hl, HisNameIsText
- jp PrintText
-
-HisNameIsText:
- TX_FAR _HisNameIsText
- db "@"
-
-OakSpeechSlidePicLeft:
- push de
- coord hl, 0, 0
- lb bc, 12, 11
- call ClearScreenArea ; clear the name list text box
- ld c, 10
- call DelayFrames
- pop de
- ld hl, wcd6d
- ld bc, NAME_LENGTH
- call CopyData
- call Delay3
- coord hl, 12, 4
- lb de, 6, 6 * SCREEN_WIDTH + 5
- ld a, $ff
- jr OakSpeechSlidePicCommon
-
-OakSpeechSlidePicRight:
- coord hl, 5, 4
- lb de, 6, 6 * SCREEN_WIDTH + 5
- xor a
-
-OakSpeechSlidePicCommon:
- push hl
- push de
- push bc
- ld [hSlideDirection], a
- ld a, d
- ld [hSlideAmount], a
- ld a, e
- ld [hSlidingRegionSize], a
- ld c, a
- ld a, [hSlideDirection]
- and a
- jr nz, .next
-; If sliding right, point hl to the end of the pic's tiles.
- ld d, 0
- add hl, de
-.next
- ld d, h
- ld e, l
-.loop
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld [H_AUTOBGTRANSFERPORTION], a
- ld a, [hSlideDirection]
- and a
- jr nz, .slideLeft
-; sliding right
- ld a, [hli]
- ld [hld], a
- dec hl
- jr .next2
-.slideLeft
- ld a, [hld]
- ld [hli], a
- inc hl
-.next2
- dec c
- jr nz, .loop
- ld a, [hSlideDirection]
- and a
- jr z, .next3
-; If sliding left, we need to zero the last tile in the pic (there is no need
-; to take a corresponding action when sliding right because hl initially points
-; to a 0 tile in that case).
- dec hl
- xor a
- ld [hl], a
-.next3
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- call Delay3
- ld a, [hSlidingRegionSize]
- ld c, a
- ld h, d
- ld l, e
- ld a, [hSlideDirection]
- and a
- jr nz, .slideLeft2
- inc hl
- jr .next4
-.slideLeft2
- dec hl
-.next4
- ld d, h
- ld e, l
- ld a, [hSlideAmount]
- dec a
- ld [hSlideAmount], a
- jr nz, .loop
- pop bc
- pop de
- pop hl
- ret
-
-DisplayIntroNameTextBox:
- push de
- coord hl, 0, 0
- lb bc, 10, 9
- call TextBoxBorder
- coord hl, 3, 0
- ld de, .namestring
- call PlaceString
- pop de
- coord hl, 2, 2
- call PlaceString
- call UpdateSprites
- xor a
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- inc a
- ld [wTopMenuItemX], a
- ld [wMenuWatchedKeys], a ; A_BUTTON
- inc a
- ld [wTopMenuItemY], a
- inc a
- ld [wMaxMenuItem], a
- jp HandleMenuInput
-
-.namestring
- db "NAME@"
-
-DefaultNamesPlayer:
- db "NEW NAME"
- next "YELLOW"
- next "ASH"
- next "JACK"
- db "@"
-
-DefaultNamesRival:
- db "NEW NAME"
- next "BLUE"
- next "GARY"
- next "JOHN"
- db "@"
-
-GetDefaultName:
-; a = name index
-; hl = name list
- ld b, a
- ld c, 0
-.loop
- ld d, h
- ld e, l
-.innerLoop
- ld a, [hli]
- cp "@"
- jr nz, .innerLoop
- ld a, b
- cp c
- jr z, .foundName
- inc c
- jr .loop
-.foundName
- ld h, d
- ld l, e
- ld de, wcd6d
- ld bc, $14
- jp CopyData
-
-DefaultNamesPlayerList:
- db "NEW NAME@"
- db "YELLOW@"
- db "ASH@"
- db "JACK@"
-
-DefaultNamesRivalList:
- db "NEW NAME@"
- db "BLUE@"
- db "GARY@"
- db "JOHN@"
-
-TextTerminator_6b20:
- db "@"
diff --git a/engine/oam_dma.asm b/engine/oam_dma.asm
deleted file mode 100644
index 7326445e..00000000
--- a/engine/oam_dma.asm
+++ /dev/null
@@ -1,26 +0,0 @@
-WriteDMACodeToHRAM:
-; Since no other memory is available during OAM DMA,
-; DMARoutine is copied to HRAM and executed there.
- ld c, $ff80 % $100
- ld b, DMARoutineEnd - DMARoutine
- ld hl, DMARoutine
-.copy
- ld a, [hli]
- ld [$ff00+c], a
- inc c
- dec b
- jr nz, .copy
- ret
-
-DMARoutine:
- ; initiate DMA
- ld a, wOAMBuffer / $100
- ld [rDMA], a
-
- ; wait for DMA to finish
- ld a, $28
-.wait
- dec a
- jr nz, .wait
- ret
-DMARoutineEnd:
diff --git a/engine/overworld/advance_player_sprite.asm b/engine/overworld/advance_player_sprite.asm
index 6b4a0cbb..4ebdac84 100644
--- a/engine/overworld/advance_player_sprite.asm
+++ b/engine/overworld/advance_player_sprite.asm
@@ -1,241 +1,244 @@
_AdvancePlayerSprite::
- ld a,[wSpriteStateData1 + 3] ; delta Y
- ld b,a
- ld a,[wSpriteStateData1 + 5] ; delta X
- ld c,a
- ld hl,wWalkCounter ; walking animation counter
+ ld a, [wSpritePlayerStateData1YStepVector]
+ ld b, a
+ ld a, [wSpritePlayerStateData1XStepVector]
+ ld c, a
+ ld hl, wWalkCounter ; walking animation counter
dec [hl]
- jr nz,.afterUpdateMapCoords
+ jr nz, .afterUpdateMapCoords
; if it's the end of the animation, update the player's map coordinates
ld hl, wPikachuOverworldStateFlags
res 5, [hl]
- ld a,[wYCoord]
+ ld a, [wYCoord]
add b
- ld [wYCoord],a
- ld a,[wXCoord]
+ ld [wYCoord], a
+ ld a, [wXCoord]
add c
- ld [wXCoord],a
+ ld [wXCoord], a
.afterUpdateMapCoords
- ld a,[wWalkCounter] ; walking animation counter
- cp a,$07
- jp nz,.scrollBackgroundAndSprites
+ ld a, [wWalkCounter] ; walking animation counter
+ cp $07
+ jp nz, .scrollBackgroundAndSprites
; if this is the first iteration of the animation
- ld a,c
- cp a,$01
- jr nz,.checkIfMovingWest
+ ld a, c
+ cp $01
+ jr nz, .checkIfMovingWest
; moving east
- ld a,[wMapViewVRAMPointer]
- ld e,a
+ ld a, [wMapViewVRAMPointer]
+ ld e, a
and $e0
- ld d,a
- ld a,e
+ ld d, a
+ ld a, e
add $02
and $1f
or d
- ld [wMapViewVRAMPointer],a
+ ld [wMapViewVRAMPointer], a
jr .adjustXCoordWithinBlock
.checkIfMovingWest
- cp a,$ff
- jr nz,.checkIfMovingSouth
+ cp $ff
+ jr nz, .checkIfMovingSouth
; moving west
- ld a,[wMapViewVRAMPointer]
- ld e,a
- and a,$e0
- ld d,a
- ld a,e
+ ld a, [wMapViewVRAMPointer]
+ ld e, a
+ and $e0
+ ld d, a
+ ld a, e
sub $02
and $1f
or d
- ld [wMapViewVRAMPointer],a
+ ld [wMapViewVRAMPointer], a
jr .adjustXCoordWithinBlock
.checkIfMovingSouth
- ld a,b
- cp a,$01
- jr nz,.checkIfMovingNorth
+ ld a, b
+ cp $01
+ jr nz, .checkIfMovingNorth
; moving south
- ld a,[wMapViewVRAMPointer]
+ ld a, [wMapViewVRAMPointer]
add $40
- ld [wMapViewVRAMPointer],a
- jr nc,.adjustXCoordWithinBlock
- ld a,[wMapViewVRAMPointer + 1]
+ ld [wMapViewVRAMPointer], a
+ jr nc, .adjustXCoordWithinBlock
+ ld a, [wMapViewVRAMPointer + 1]
inc a
and $03
or $98
- ld [wMapViewVRAMPointer + 1],a
+ ld [wMapViewVRAMPointer + 1], a
jr .adjustXCoordWithinBlock
.checkIfMovingNorth
- cp a,$ff
- jr nz,.adjustXCoordWithinBlock
+ cp $ff
+ jr nz, .adjustXCoordWithinBlock
; moving north
- ld a,[wMapViewVRAMPointer]
+ ld a, [wMapViewVRAMPointer]
sub $40
- ld [wMapViewVRAMPointer],a
- jr nc,.adjustXCoordWithinBlock
- ld a,[wMapViewVRAMPointer + 1]
+ ld [wMapViewVRAMPointer], a
+ jr nc, .adjustXCoordWithinBlock
+ ld a, [wMapViewVRAMPointer + 1]
dec a
and $03
or $98
- ld [wMapViewVRAMPointer + 1],a
+ ld [wMapViewVRAMPointer + 1], a
.adjustXCoordWithinBlock
- ld a,c
+ ld a, c
and a
- jr z,.pointlessJump ; mistake?
+ jr z, .pointlessJump ; mistake?
.pointlessJump
- ld hl,wXBlockCoord
- ld a,[hl]
+ ld hl, wXBlockCoord
+ ld a, [hl]
add c
- ld [hl],a
+ ld [hl], a
cp $02
- jr nz,.checkForMoveToWestBlock
+ jr nz, .checkForMoveToWestBlock
; moved into the tile block to the east
xor a
- ld [hl],a
- ld hl,wXOffsetSinceLastSpecialWarp
+ ld [hl], a
+ ld hl, wXOffsetSinceLastSpecialWarp
inc [hl]
- ld de,wCurrentTileBlockMapViewPointer
+ ld de, wCurrentTileBlockMapViewPointer
call MoveTileBlockMapPointerEast
jr .updateMapView
.checkForMoveToWestBlock
- cp a,$ff
- jr nz,.adjustYCoordWithinBlock
+ cp $ff
+ jr nz, .adjustYCoordWithinBlock
; moved into the tile block to the west
- ld a,$1
- ld [hl],a
- ld hl,wXOffsetSinceLastSpecialWarp
+ ld a, $01
+ ld [hl], a
+ ld hl, wXOffsetSinceLastSpecialWarp
dec [hl]
- ld de,wCurrentTileBlockMapViewPointer
+ ld de, wCurrentTileBlockMapViewPointer
call MoveTileBlockMapPointerWest
jr .updateMapView
.adjustYCoordWithinBlock
- ld hl,wYBlockCoord
- ld a,[hl]
+ ld hl, wYBlockCoord
+ ld a, [hl]
add b
- ld [hl],a
- cp $2
- jr nz,.checkForMoveToNorthBlock
+ ld [hl], a
+ cp $02
+ jr nz, .checkForMoveToNorthBlock
; moved into the tile block to the south
xor a
- ld [hl],a
- ld hl,wYOffsetSinceLastSpecialWarp
+ ld [hl], a
+ ld hl, wYOffsetSinceLastSpecialWarp
inc [hl]
- ld de,wCurrentTileBlockMapViewPointer
- ld a,[wCurMapWidth]
+ ld de, wCurrentTileBlockMapViewPointer
+ ld a, [wCurMapWidth]
call MoveTileBlockMapPointerSouth
jr .updateMapView
.checkForMoveToNorthBlock
- cp a,$ff
- jr nz,.updateMapView
+ cp $ff
+ jr nz, .updateMapView
; moved into the tile block to the north
- ld a,$1
- ld [hl],a
- ld hl,wYOffsetSinceLastSpecialWarp
+ ld a, $01
+ ld [hl], a
+ ld hl, wYOffsetSinceLastSpecialWarp
dec [hl]
- ld de,wCurrentTileBlockMapViewPointer
- ld a,[wCurMapWidth]
+ ld de, wCurrentTileBlockMapViewPointer
+ ld a, [wCurMapWidth]
call MoveTileBlockMapPointerNorth
.updateMapView
call LoadCurrentMapView
- ld a,[wSpriteStateData1 + 3] ; delta Y
- cp $1
- jr nz,.checkIfMovingNorth2
+ ld a, [wSpritePlayerStateData1YStepVector]
+ cp $01
+ jr nz, .checkIfMovingNorth2
; if moving south
call ScheduleSouthRowRedraw
jr .scrollBackgroundAndSprites
.checkIfMovingNorth2
cp $ff
- jr nz,.checkIfMovingEast2
+ jr nz, .checkIfMovingEast2
; if moving north
call ScheduleNorthRowRedraw
jr .scrollBackgroundAndSprites
.checkIfMovingEast2
- ld a,[wSpriteStateData1 + 5] ; delta X
- cp $1
- jr nz,.checkIfMovingWest2
+ ld a, [wSpritePlayerStateData1XStepVector]
+ cp $01
+ jr nz, .checkIfMovingWest2
; if moving east
call ScheduleEastColumnRedraw
jr .scrollBackgroundAndSprites
.checkIfMovingWest2
cp $ff
- jr nz,.scrollBackgroundAndSprites
+ jr nz, .scrollBackgroundAndSprites
; if moving west
call ScheduleWestColumnRedraw
.scrollBackgroundAndSprites
- ld a,[wSpriteStateData1 + 3] ; delta Y
+ ld a, [wSpritePlayerStateData1YStepVector]
add a
- ld b,a
- ld a,[wSpriteStateData1 + 5] ; delta X
+ ld b, a
+ ld a, [wSpritePlayerStateData1XStepVector]
add a
- ld c,a
+ ld c, a
; 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 e,15
+ ld hl, wSprite01StateData1YPixels
+ ld e, 15
.spriteShiftLoop
- ld a,[hl]
+ ld a, [hl]
sub b
- ld [hli],a
+ ld [hli], a
inc l
- ld a,[hl]
+ ld a, [hl]
sub c
- ld [hl],a
- ld a,$0e
+ ld [hl], a
+ ld a, $0e
add l
- ld l,a
+ ld l, a
dec e
- jr nz,.spriteShiftLoop
+ jr nz, .spriteShiftLoop
.done
- ld a,[hSCY]
+ ldh a, [hSCY]
add b
- ld [hSCY],a ; update background scroll Y
- ld a,[hSCX]
+ ldh [hSCY], a ; update background scroll Y
+ ldh a, [hSCX]
add c
- ld [hSCX],a ; update background scroll X
+ ldh [hSCX], a ; update background scroll X
ret
+; the following four functions are used to move the pointer to the upper left
+; corner of the tile block map in the direction of motion
+
MoveTileBlockMapPointerEast::
- ld a,[de]
- add $1
- ld [de],a
+ ld a, [de]
+ add $01
+ ld [de], a
ret nc
inc de
- ld a,[de]
+ ld a, [de]
inc a
- ld [de],a
+ ld [de], a
ret
MoveTileBlockMapPointerWest::
- ld a,[de]
- sub $1
- ld [de],a
+ ld a, [de]
+ sub $01
+ ld [de], a
ret nc
inc de
- ld a,[de]
+ ld a, [de]
dec a
- ld [de],a
+ ld [de], a
ret
MoveTileBlockMapPointerSouth::
- add $6
- ld b,a
- ld a,[de]
+ add MAP_BORDER * 2
+ ld b, a
+ ld a, [de]
add b
- ld [de],a
+ ld [de], a
ret nc
inc de
- ld a,[de]
+ ld a, [de]
inc a
- ld [de],a
+ ld [de], a
ret
MoveTileBlockMapPointerNorth::
- add $6
- ld b,a
- ld a,[de]
+ add MAP_BORDER * 2
+ ld b, a
+ ld a, [de]
sub b
- ld [de],a
+ ld [de], a
ret nc
inc de
- ld a,[de]
+ ld a, [de]
dec a
- ld [de],a
+ ld [de], a
ret
diff --git a/engine/overworld/auto_movement.asm b/engine/overworld/auto_movement.asm
new file mode 100755
index 00000000..a68da55f
--- /dev/null
+++ b/engine/overworld/auto_movement.asm
@@ -0,0 +1,270 @@
+PlayerStepOutFromDoor::
+ ld hl, wd730
+ res 1, [hl]
+ call IsPlayerStandingOnDoorTile
+ jr nc, .notStandingOnDoor
+ ld a, $fc
+ ld [wJoyIgnore], a
+ ld hl, wd736
+ set 1, [hl]
+ ld a, $1
+ ld [wSimulatedJoypadStatesIndex], a
+ ld a, D_DOWN
+ ld [wSimulatedJoypadStatesEnd], a
+ xor a
+ ld [wSpritePlayerStateData1ImageIndex], a
+ call StartSimulatingJoypadStates
+ ret
+.notStandingOnDoor
+ xor a
+ ld [wWastedByteCD3A], a
+ ld [wSimulatedJoypadStatesIndex], a
+ ld [wSimulatedJoypadStatesEnd], a
+ ld hl, wd736
+ res 0, [hl]
+ res 1, [hl]
+ ld hl, wd730
+ res 7, [hl]
+ ret
+
+_EndNPCMovementScript::
+ ld hl, wd730
+ res 7, [hl]
+ ld hl, wd72e
+ res 7, [hl]
+ ld hl, wd736
+ res 0, [hl]
+ res 1, [hl]
+ xor a
+ ld [wNPCMovementScriptSpriteOffset], a
+ ld [wNPCMovementScriptFunctionNum], a
+ ld [wNPCMovementScriptPointerTableNum], a
+ ld [wWastedByteCD3A], a
+ ld [wSimulatedJoypadStatesIndex], a
+ ld [wSimulatedJoypadStatesEnd], a
+ ret
+
+PalletMovementScriptPointerTable::
+ dw PalletMovementScript_OakMoveLeft
+ dw PalletMovementScript_PlayerMoveLeft
+ dw PalletMovementScript_WaitAndWalkToLab
+ dw PalletMovementScript_WalkToLab
+ dw PalletMovementScript_Done
+
+PalletMovementScript_OakMoveLeft:
+ ld a, [wXCoord]
+ sub $a
+ ld [wNumStepsToTake], a
+ jr z, .playerOnLeftTile
+; The player is on the right tile of the northern path out of Pallet Town and
+; Prof. Oak is below.
+; Make Prof. Oak step to the left.
+ ld b, 0
+ ld c, a
+ ld hl, wNPCMovementDirections2
+ ld a, NPC_MOVEMENT_LEFT
+ call FillMemory
+ ld [hl], $ff
+ ld a, [wSpriteIndex]
+ ldh [hSpriteIndex], a
+ ld de, wNPCMovementDirections2
+ call MoveSprite
+ ld a, $1
+ ld [wNPCMovementScriptFunctionNum], a
+ jr .done
+; The player is on the left tile of the northern path out of Pallet Town and
+; Prof. Oak is below.
+; Prof. Oak is already where he needs to be.
+.playerOnLeftTile
+ ld a, $3
+ ld [wNPCMovementScriptFunctionNum], a
+.done
+ ld a, BANK(Music_MuseumGuy)
+ ld c, a
+ ld a, MUSIC_MUSEUM_GUY
+ call PlayMusic
+ ld hl, wFlags_D733
+ set 1, [hl]
+ ld a, $fc
+ ld [wJoyIgnore], a
+ ret
+
+PalletMovementScript_PlayerMoveLeft:
+ ld a, [wd730]
+ bit 0, a ; is an NPC being moved by a script?
+ ret nz ; return if Oak is still moving
+ ld a, [wNumStepsToTake]
+ ld [wSimulatedJoypadStatesIndex], a
+ ldh [hNPCMovementDirections2Index], a
+ predef ConvertNPCMovementDirectionsToJoypadMasks
+ call StartSimulatingJoypadStates
+ ld a, $2
+ ld [wNPCMovementScriptFunctionNum], a
+ ret
+
+PalletMovementScript_WaitAndWalkToLab:
+ ld a, [wSimulatedJoypadStatesIndex]
+ and a ; is the player done moving left yet?
+ ret nz
+
+PalletMovementScript_WalkToLab:
+ xor a
+ ld [wOverrideSimulatedJoypadStatesMask], a
+ ld a, [wSpriteIndex]
+ swap a
+ ld [wNPCMovementScriptSpriteOffset], a
+ xor a
+ ld [wSpritePlayerStateData2MovementByte1], a
+ ld hl, wSimulatedJoypadStatesEnd
+ ld de, RLEList_PlayerWalkToLab
+ call DecodeRLEList
+ dec a
+ ld [wSimulatedJoypadStatesIndex], a
+ ld hl, wNPCMovementDirections2
+ ld de, RLEList_ProfOakWalkToLab
+ call DecodeRLEList
+ ld hl, wd72e
+ res 7, [hl]
+ ld hl, wd730
+ set 7, [hl]
+ ld a, $4
+ ld [wNPCMovementScriptFunctionNum], a
+ ret
+
+
+RLEList_ProfOakWalkToLab:
+ db NPC_MOVEMENT_DOWN, 6 ; differs from red
+ db NPC_MOVEMENT_LEFT, 1
+ db NPC_MOVEMENT_DOWN, 5
+ db NPC_MOVEMENT_RIGHT, 3
+ db NPC_MOVEMENT_UP, 1
+ db NPC_CHANGE_FACING, 1
+ db -1 ; end
+
+RLEList_PlayerWalkToLab:
+ db D_UP, 2
+ db D_RIGHT, 3
+ db D_DOWN, 5
+ db D_LEFT, 1
+ db D_DOWN, 7 ; differs from red
+ db -1 ; end
+
+PalletMovementScript_Done:
+ ld a, [wSimulatedJoypadStatesIndex]
+ and a
+ ret nz
+ ld a, HS_PALLET_TOWN_OAK
+ ld [wMissableObjectIndex], a
+ predef HideObject
+ ld hl, wd730
+ res 7, [hl]
+ ld hl, wd72e
+ res 7, [hl]
+ jp EndNPCMovementScript
+
+PewterMuseumGuyMovementScriptPointerTable::
+ dw PewterMovementScript_WalkToMuseum
+ dw PewterMovementScript_Done
+
+PewterMovementScript_WalkToMuseum:
+ ld a, BANK(Music_MuseumGuy)
+ ld c, a
+ ld a, MUSIC_MUSEUM_GUY
+ call PlayMusic
+ ld a, [wSpriteIndex]
+ swap a
+ ld [wNPCMovementScriptSpriteOffset], a
+ call StartSimulatingJoypadStates
+ ld hl, wSimulatedJoypadStatesEnd
+ ld de, RLEList_PewterMuseumPlayer
+ call DecodeRLEList
+ dec a
+ ld [wSimulatedJoypadStatesIndex], a
+ xor a
+ ld [wWhichPewterGuy], a
+ call PewterGuys
+ ld hl, wNPCMovementDirections2
+ ld de, RLEList_PewterMuseumGuy
+ call DecodeRLEList
+ ld hl, wd72e
+ res 7, [hl]
+ ld a, $1
+ ld [wNPCMovementScriptFunctionNum], a
+ ret
+
+RLEList_PewterMuseumPlayer:
+ db NO_INPUT, 1
+ db D_UP, 3
+ db D_LEFT, 13
+ db D_UP, 6
+ db -1 ; end
+
+RLEList_PewterMuseumGuy:
+ db NPC_MOVEMENT_UP, 6
+ db NPC_MOVEMENT_LEFT, 13
+ db NPC_MOVEMENT_UP, 3
+ db NPC_MOVEMENT_LEFT, 1
+ db -1 ; end
+
+PewterMovementScript_Done:
+ ld a, [wSimulatedJoypadStatesIndex]
+ and a
+ ret nz
+ ld hl, wd730
+ res 7, [hl]
+ ld hl, wd72e
+ res 7, [hl]
+ jp EndNPCMovementScript
+
+PewterGymGuyMovementScriptPointerTable::
+ dw PewterMovementScript_WalkToGym
+ dw PewterMovementScript_Done
+
+PewterMovementScript_WalkToGym:
+ ld a, BANK(Music_MuseumGuy)
+ ld c, a
+ ld a, MUSIC_MUSEUM_GUY
+ call PlayMusic
+ ld a, [wSpriteIndex]
+ swap a
+ ld [wNPCMovementScriptSpriteOffset], a
+ xor a
+ ld [wSpritePlayerStateData2MovementByte1], a
+ ld hl, wSimulatedJoypadStatesEnd
+ ld de, RLEList_PewterGymPlayer
+ call DecodeRLEList
+ dec a
+ ld [wSimulatedJoypadStatesIndex], a
+ ld a, 1
+ ld [wWhichPewterGuy], a
+ call PewterGuys
+ ld hl, wNPCMovementDirections2
+ ld de, RLEList_PewterGymGuy
+ call DecodeRLEList
+ ld hl, wd72e
+ res 7, [hl]
+ ld hl, wd730
+ set 7, [hl]
+ ld a, $1
+ ld [wNPCMovementScriptFunctionNum], a
+ ret
+
+RLEList_PewterGymPlayer:
+ db NO_INPUT, 1
+ db D_RIGHT, 2
+ db D_DOWN, 5
+ db D_LEFT, 11
+ db D_UP, 5
+ db D_LEFT, 15
+ db -1 ; end
+
+RLEList_PewterGymGuy:
+ db NPC_MOVEMENT_DOWN, 2
+ db NPC_MOVEMENT_LEFT, 15
+ db NPC_MOVEMENT_UP, 5
+ db NPC_MOVEMENT_LEFT, 11
+ db NPC_MOVEMENT_DOWN, 5
+ db NPC_MOVEMENT_RIGHT, 3
+ db -1 ; end
+
+INCLUDE "engine/events/pewter_guys.asm"
diff --git a/engine/overworld/cable_club_npc.asm b/engine/overworld/cable_club_npc.asm
deleted file mode 100755
index 12ce64a4..00000000
--- a/engine/overworld/cable_club_npc.asm
+++ /dev/null
@@ -1,208 +0,0 @@
-CableClubNPC:
- ld hl, CableClubNPCWelcomeText
- call PrintText
- call CheckPikachuFollowingPlayer
- jr nz, .asm_7048
- CheckEvent EVENT_GOT_POKEDEX
- jp nz, .receivedPokedex
-; if the player hasn't received the pokedex
-.asm_7048
- ld c, 60
- call DelayFrames
- ld hl, CableClubNPCMakingPreparationsText
- call PrintText
- jp .didNotConnect
-.receivedPokedex
- ld a, $1
- ld [wMenuJoypadPollCount], a
- ld a, 90
- ld [wLinkTimeoutCounter], a
-.establishConnectionLoop
- ld a, [hSerialConnectionStatus]
- cp USING_INTERNAL_CLOCK
- jr z, .establishedConnection
- cp USING_EXTERNAL_CLOCK
- jr z, .establishedConnection
- ld a, CONNECTION_NOT_ESTABLISHED
- ld [hSerialConnectionStatus], a
- ld a, ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK
- ld [rSB], a
- xor a
- ld [hSerialReceiveData], a
- ld a, START_TRANSFER_EXTERNAL_CLOCK
- ld [rSC], a
- ld a, [wLinkTimeoutCounter]
- dec a
- ld [wLinkTimeoutCounter], a
- jr z, .failedToEstablishConnection
- ld a, ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK
- ld [rSB], a
- ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
- call DelayFrame
- jr .establishConnectionLoop
-.establishedConnection
- call Serial_SendZeroByte
- call DelayFrame
- call Serial_SendZeroByte
- ld c, 50
- call DelayFrames
- ld hl, CableClubNPCPleaseApplyHereHaveToSaveText
- call PrintText
- xor a
- ld [wMenuJoypadPollCount], a
- call YesNoChoice
- ld a, $1
- ld [wMenuJoypadPollCount], a
- ld a, [wCurrentMenuItem]
- and a
- jr nz, .choseNo
- callab SaveSAVtoSRAM
- call WaitForSoundToFinish
- ld a, SFX_SAVE
- call PlaySoundWaitForCurrent
- ld hl, CableClubNPCPleaseWaitText
- call PrintText
- ld hl, wUnknownSerialCounter
- ld a, $3
- ld [hli], a
- xor a
- ld [hl], a
- ld [hSerialReceivedNewData], a
- ld [wSerialExchangeNybbleSendData], a
- call Serial_SyncAndExchangeNybble
- ld hl, wUnknownSerialCounter
- ld a, [hli]
- inc a
- jr nz, .connected
- ld a, [hl]
- inc a
- jr nz, .connected
- ld b, 10
-.syncLoop
- call DelayFrame
- call Serial_SendZeroByte
- dec b
- jr nz, .syncLoop
- call CloseLinkConnection
- ld hl, CableClubNPCLinkClosedBecauseOfInactivityText
- call PrintText
- jr .didNotConnect
-.failedToEstablishConnection
- ld hl, CableClubNPCAreaReservedFor2FriendsLinkedByCableText
- call PrintText
- jr .didNotConnect
-.choseNo
- call CloseLinkConnection
- ld hl, CableClubNPCPleaseComeAgainText
- call PrintText
-.didNotConnect
- xor a
- ld hl, wUnknownSerialCounter
- ld [hli], a
- ld [hl], a
- ld hl, wd72e
- res 6, [hl]
- xor a
- ld [wMenuJoypadPollCount], a
- ret
-.connected
- xor a
- ld [hld], a
- ld [hl], a
- ld a, [wLetterPrintingDelayFlags]
- push af
- callab LinkMenu
- pop af
- ld [wLetterPrintingDelayFlags], a
- ret
-
-; seems to be similar of Serial_SyncAndExchangeNybble
-Serial_SyncAndExchangeNybbleDouble:
- ld a, $ff
- ld [wSerialExchangeNybbleReceiveData], a
-.loop
- call Serial_ExchangeNybble
- call DelayFrame
- push hl
- ld hl, wUnknownSerialCounter + 1
- dec [hl]
- jr nz, .next
- dec hl
- dec [hl]
- jr nz, .next
- pop hl
- jr .setUnknownSerialCounterToFFFF
-.next
- pop hl
- ld a, [wSerialExchangeNybbleReceiveData]
- inc a
- jr z, .loop
- call DelayFrame
- ld a, $ff
- ld [wSerialExchangeNybbleReceiveData], a
- call Serial_ExchangeNybble
- ld a, [wSerialExchangeNybbleReceiveData]
- inc a
- jr z, .loop
- ld b, 10
-.syncLoop1
- call DelayFrame
- call Serial_ExchangeNybble
- dec b
- jr nz, .syncLoop1
- ld b, 10
-.syncLoop2
- call DelayFrame
- call Serial_SendZeroByte
- dec b
- jr nz, .syncLoop2
- ld a, [wSerialExchangeNybbleReceiveData]
- ld [wSerialSyncAndExchangeNybbleReceiveData], a
- ret
-.setUnknownSerialCounterToFFFF
- ld a, $ff
- ld [wUnknownSerialCounter], a
- ld [wUnknownSerialCounter + 1], a
- ret
-
-CableClubNPCAreaReservedFor2FriendsLinkedByCableText:
- TX_FAR _CableClubNPCAreaReservedFor2FriendsLinkedByCableText
- db "@"
-
-CableClubNPCWelcomeText:
- TX_FAR _CableClubNPCWelcomeText
- db "@"
-
-CableClubNPCPleaseApplyHereHaveToSaveText:
- TX_FAR _CableClubNPCPleaseApplyHereHaveToSaveText
- db "@"
-
-CableClubNPCPleaseWaitText:
- TX_FAR _CableClubNPCPleaseWaitText
- TX_DELAY
- db "@"
-
-CableClubNPCLinkClosedBecauseOfInactivityText:
- TX_FAR _CableClubNPCLinkClosedBecauseOfInactivityText
- db "@"
-
-CableClubNPCPleaseComeAgainText:
- TX_FAR _CableClubNPCPleaseComeAgainText
- db "@"
-
-CableClubNPCMakingPreparationsText:
- TX_FAR _CableClubNPCMakingPreparationsText
- db "@"
-
-CloseLinkConnection:
- call Delay3
- ld a, CONNECTION_NOT_ESTABLISHED
- ld [hSerialConnectionStatus], a
- ld a, ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK
- ld [rSB], a
- xor a
- ld [hSerialReceiveData], a
- ld a, START_TRANSFER_EXTERNAL_CLOCK
- ld [rSC], a
- ret
diff --git a/engine/overworld/card_key.asm b/engine/overworld/card_key.asm
deleted file mode 100755
index a4452b4a..00000000
--- a/engine/overworld/card_key.asm
+++ /dev/null
@@ -1,113 +0,0 @@
-PrintCardKeyText:
- ld hl, SilphCoMapList
- ld a, [wCurMap]
- ld b, a
-.silphCoMapListLoop
- ld a, [hli]
- cp $ff
- ret z
- cp b
- jr nz, .silphCoMapListLoop
-; does not check for tile in front of player. This might be buggy
- ;predef GetTileAndCoordsInFrontOfPlayer
- ld a, [wTileInFrontOfPlayer]
- cp $18
- jr z, .cardKeyDoorInFrontOfPlayer
- cp $24
- jr z, .cardKeyDoorInFrontOfPlayer
- ld b, a
- ld a, [wCurMap]
- cp SILPH_CO_11F
- ret nz
- ld a, b
- cp $5e
- ret nz
-.cardKeyDoorInFrontOfPlayer
- ld b, CARD_KEY
- call IsItemInBag
- jr z, .noCardKey
- xor a
- ld [wPlayerMovingDirection], a
- tx_pre_id CardKeySuccessText
- ld [hSpriteIndexOrTextID], a
- call PrintPredefTextID
- call GetCoordsInFrontOfPlayer
- srl d
- ld a, d
- ld b, a
- ld [wCardKeyDoorY], a
- srl e
- ld a, e
- ld c, a
- ld [wCardKeyDoorX], a
- ld a, [wCurMap]
- cp SILPH_CO_11F
- jr nz, .notSilphCo11F
- ld a, $3
- jr .replaceCardKeyDoorTileBlock
-.notSilphCo11F
- ld a, $e
-.replaceCardKeyDoorTileBlock
- ld [wNewTileBlockID], a
- predef ReplaceTileBlock
- ld hl, wCurrentMapScriptFlags
- set 5, [hl]
- ld a, SFX_GO_INSIDE
- jp PlaySound
-.noCardKey
- tx_pre_id CardKeyFailText
- ld [hSpriteIndexOrTextID], a
- jp PrintPredefTextID
-
-SilphCoMapList:
- db SILPH_CO_2F
- db SILPH_CO_3F
- db SILPH_CO_4F
- db SILPH_CO_5F
- db SILPH_CO_6F
- db SILPH_CO_7F
- db SILPH_CO_8F
- db SILPH_CO_9F
- db SILPH_CO_10F
- db SILPH_CO_11F
- db $FF
-
-CardKeySuccessText:
- TX_FAR _CardKeySuccessText1
- TX_SFX_ITEM_1
- TX_FAR _CardKeySuccessText2
- db "@"
-
-CardKeyFailText:
- TX_FAR _CardKeyFailText
- db "@"
-
-; d = Y
-; e = X
-GetCoordsInFrontOfPlayer:
- ld a, [wYCoord]
- ld d, a
- ld a, [wXCoord]
- ld e, a
- ld a, [wSpritePlayerStateData1FacingDirection] ; player's sprite facing direction
- and a
- jr nz, .notFacingDown
-; facing down
- inc d
- ret
-.notFacingDown
- cp SPRITE_FACING_UP
- jr nz, .notFacingUp
-; facing up
- dec d
- ret
-.notFacingUp
- cp SPRITE_FACING_LEFT
- jr nz, .notFacingLeft
-; facing left
- dec e
- ret
-.notFacingLeft
-; facing right
- inc e
- ret
diff --git a/engine/overworld/cinnabar_lab.asm b/engine/overworld/cinnabar_lab.asm
deleted file mode 100755
index 13313746..00000000
--- a/engine/overworld/cinnabar_lab.asm
+++ /dev/null
@@ -1,123 +0,0 @@
-GiveFossilToCinnabarLab:
- ld hl, wd730
- set 6, [hl]
- xor a
- ld [wCurrentMenuItem], a
- ld a, A_BUTTON | B_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, [wFilteredBagItemsCount]
- dec a
- ld [wMaxMenuItem], a
- ld a, 2
- ld [wTopMenuItemY], a
- ld a, 1
- ld [wTopMenuItemX], a
- ld a, [wFilteredBagItemsCount]
- dec a
- ld bc, 2
- ld hl, 3
- call AddNTimes
- dec l
- ld b, l
- ld c, $d
- coord hl, 0, 0
- call TextBoxBorder
- call UpdateSprites
- call PrintFossilsInBag
- ld hl, wd730
- res 6, [hl]
- call HandleMenuInput
- bit 1, a ; pressed B?
- jr nz, .cancelledGivingFossil
- ld hl, wFilteredBagItems
- ld a, [wCurrentMenuItem]
- ld d, 0
- ld e, a
- add hl, de
- ld a, [hl]
- ld [$ffdb], a
- cp DOME_FOSSIL
- jr z, .choseDomeFossil
- cp HELIX_FOSSIL
- jr z, .choseHelixFossil
- ld b, AERODACTYL
- jr .fossilSelected
-.choseHelixFossil
- ld b, OMANYTE
- jr .fossilSelected
-.choseDomeFossil
- ld b, KABUTO
-.fossilSelected
- ld [wFossilItem], a
- ld a, b
- ld [wFossilMon], a
- call LoadFossilItemAndMonName
- ld hl, LabFossil_610ae
- call PrintText
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- and a
- jr nz, .cancelledGivingFossil
- ld hl, LabFossil_610b3
- call PrintText
- ld a, [wFossilItem]
- ld [hItemToRemoveID], a
- callba RemoveItemByID
- ld hl, LabFossil_610b8
- call PrintText
- SetEvents EVENT_GAVE_FOSSIL_TO_LAB, EVENT_LAB_STILL_REVIVING_FOSSIL
- ret
-.cancelledGivingFossil
- ld hl, LabFossil_610bd
- call PrintText
- ret
-
-LabFossil_610ae:
- TX_FAR _Lab4Text_610ae
- db "@"
-
-LabFossil_610b3:
- TX_FAR _Lab4Text_610b3
- db "@"
-
-LabFossil_610b8:
- TX_FAR _Lab4Text_610b8
- db "@"
-
-LabFossil_610bd:
- TX_FAR _Lab4Text_610bd
- db "@"
-
-PrintFossilsInBag:
-; Prints each fossil in the player's bag on a separate line in the menu.
- ld hl, wFilteredBagItems
- xor a
- ld [hItemCounter], a
-.loop
- ld a, [hli]
- cp $ff
- ret z
- push hl
- ld [wd11e], a
- call GetItemName
- coord hl, 2, 2
- ld a, [hItemCounter]
- ld bc, SCREEN_WIDTH * 2
- call AddNTimes
- ld de, wcd6d
- call PlaceString
- ld hl, hItemCounter
- inc [hl]
- pop hl
- jr .loop
-
-; loads the names of the fossil item and the resulting mon
-LoadFossilItemAndMonName:
- ld a, [wFossilMon]
- ld [wd11e], a
- call GetMonName
- call CopyStringToCF4B
- ld a, [wFossilItem]
- ld [wd11e], a
- call GetItemName
- ret
diff --git a/engine/overworld/clear_variables.asm b/engine/overworld/clear_variables.asm
index 9a59cc7c..bbb7c986 100644
--- a/engine/overworld/clear_variables.asm
+++ b/engine/overworld/clear_variables.asm
@@ -1,14 +1,14 @@
-ClearVariablesOnEnterMap:
- ld a, SCREEN_HEIGHT_PIXELS
- ld [hWY], a
- ld [rWY], a
+ClearVariablesOnEnterMap::
+ ld a, SCREEN_HEIGHT_PX
+ ldh [hWY], a
+ ldh [rWY], a
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ld [wStepCounter], a
ld [wLoneAttackNo], a
- ld [hJoyPressed], a
- ld [hJoyReleased], a
- ld [hJoyHeld], a
+ ldh [hJoyPressed], a
+ ldh [hJoyReleased], a
+ ldh [hJoyHeld], a
ld [wActionResultOrTookBattleTurn], a
ld [wUnusedD5A3], a
ld hl, wCardKeyDoorY
diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm
index bc7d092d..e36b8d88 100755
--- a/engine/overworld/cut.asm
+++ b/engine/overworld/cut.asm
@@ -22,8 +22,8 @@ UsedCut:
jp PrintText
.NothingToCutText
- TX_FAR _NothingToCutText
- db "@"
+ text_far _NothingToCutText
+ text_end
.canCut
ld [wCutTile], a
@@ -37,15 +37,15 @@ UsedCut:
call GBPalWhiteOutWithDelay3
call ClearSprites
call RestoreScreenTilesAndReloadTilePatterns
- ld a, SCREEN_HEIGHT_PIXELS
- ld [hWY], a
+ ld a, SCREEN_HEIGHT_PX
+ ldh [hWY], a
call Delay3
call LoadGBPal
call LoadCurrentMapView
call SaveScreenTilesToBuffer2
call Delay3
xor a
- ld [hWY], a
+ ldh [hWY], a
ld hl, UsedCutText
call PrintText
call LoadScreenTilesFromBuffer2
@@ -57,47 +57,47 @@ UsedCut:
ld de, CutTreeBlockSwaps
call ReplaceTreeTileBlock
call RedrawMapView
- callba AnimCut
+ farcall AnimCut
ld a, $1
ld [wUpdateSpritesEnabled], a
ld a, SFX_CUT
call PlaySound
ld a, $90
- ld [hWY], a
+ ldh [hWY], a
call UpdateSprites
jp RedrawMapView
UsedCutText:
- TX_FAR _UsedCutText
- db "@"
+ text_far _UsedCutText
+ text_end
InitCutAnimOAM:
xor a
ld [wWhichAnimationOffsets], a
ld a, %11100100
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP1
ld a, [wCutTile]
cp $52
jr z, .grass
; tree
- ld de, Overworld_GFX + $2d0 ; cuttable tree sprite top row
- ld hl, vChars1 + $7c0
- lb bc, BANK(Overworld_GFX), $02
+ ld de, Overworld_GFX tile $2d ; cuttable tree sprite top row
+ ld hl, vChars1 tile $7c
+ lb bc, BANK(Overworld_GFX), 2
call CopyVideoData
- ld de, Overworld_GFX + $3d0 ; cuttable tree sprite bottom row
- ld hl, vChars1 + $7e0
- lb bc, BANK(Overworld_GFX), $02
+ ld de, Overworld_GFX tile $3d ; cuttable tree sprite bottom row
+ ld hl, vChars1 tile $7e
+ lb bc, BANK(Overworld_GFX), 2
call CopyVideoData
jr WriteCutOrBoulderDustAnimationOAMBlock
.grass
- ld hl, vChars1 + $7c0
+ ld hl, vChars1 tile $7c
call LoadCutGrassAnimationTilePattern
- ld hl, vChars1 + $7d0
+ ld hl, vChars1 tile $7d
call LoadCutGrassAnimationTilePattern
- ld hl, vChars1 + $7e0
+ ld hl, vChars1 tile $7e
call LoadCutGrassAnimationTilePattern
- ld hl, vChars1 + $7f0
+ ld hl, vChars1 tile $7f
call LoadCutGrassAnimationTilePattern
call WriteCutOrBoulderDustAnimationOAMBlock
ld hl, wOAMBuffer + $93
@@ -113,8 +113,8 @@ InitCutAnimOAM:
ret
LoadCutGrassAnimationTilePattern:
- ld de, AnimationTileset2 + $60 ; tile depicting a leaf
- lb bc, BANK(AnimationTileset2), $01
+ ld de, AnimationTileset2 tile 6 ; tile depicting a leaf
+ lb bc, BANK(AnimationTileset2), 1
jp CopyVideoData
WriteCutOrBoulderDustAnimationOAMBlock:
@@ -124,11 +124,11 @@ WriteCutOrBoulderDustAnimationOAMBlock:
jp WriteOAMBlock
CutOrBoulderDustAnimationTilesAndAttributes:
- db $FC,$14,$FD,$14
- db $FE,$14,$FF,$14
+ dbsprite 2, -1, 4, 4, $fd, OAM_OBP1 | %100
+ dbsprite 2, -1, 4, 6, $ff, OAM_OBP1 | %100
GetCutOrBoulderDustAnimationOffsets:
- ld hl, wSpriteStateData1 + 4
+ ld hl, wSpritePlayerStateData1YPixels
ld a, [hli] ; player's sprite screen Y position
ld b, a
inc hl
@@ -188,7 +188,7 @@ ReplaceTreeTileBlock:
ld h, [hl]
ld l, a
add hl, bc
- ld a, [wSpritePlayerStateData1FacingDirection] ; player sprite's facing direction
+ ld a, [wSpritePlayerStateData1FacingDirection]
and a
jr z, .down
cp SPRITE_FACING_UP
@@ -249,16 +249,4 @@ ReplaceTreeTileBlock:
ld [hl], a
ret
-CutTreeBlockSwaps:
-; first byte = tileset block containing the cut tree
-; second byte = corresponding tileset block after the cut animation happens
- db $32, $6D
- db $33, $6C
- db $34, $6F
- db $35, $4C
- db $60, $6E
- db $0B, $0A
- db $3C, $35
- db $3F, $35
- db $3D, $36
- db $FF ; list terminator
+INCLUDE "data/tilesets/cut_tree_blocks.asm"
diff --git a/engine/overworld/cut2.asm b/engine/overworld/cut2.asm
index 37490f95..1f691eef 100755
--- a/engine/overworld/cut2.asm
+++ b/engine/overworld/cut2.asm
@@ -15,9 +15,9 @@ AnimCut:
ld [wCoordAdjustmentAmount], a
ld c, 2
call AdjustOAMBlockXPos2
- ld a, [rOBP1]
+ ldh a, [rOBP1]
xor $64
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP1
call DelayFrame
pop bc
@@ -66,9 +66,9 @@ AnimCutGrass_UpdateOAMEntries:
ld [wCoordAdjustmentAmount], a
ld c, 1
call AdjustOAMBlockXPos2
- ld a, [rOBP1]
+ ldh a, [rOBP1]
xor $64
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP1
call DelayFrame
pop bc
diff --git a/engine/overworld/doors.asm b/engine/overworld/doors.asm
index 8bde8600..d38818fa 100755
--- a/engine/overworld/doors.asm
+++ b/engine/overworld/doors.asm
@@ -11,7 +11,7 @@ IsPlayerStandingOnDoorTile:
ld a, [hli]
ld h, [hl]
ld l, a
- aCoord 8, 9 ; a = lower left background tile under player's sprite
+ lda_coord 8, 9 ; a = lower left background tile under player's sprite
ld b, a
.loop
ld a, [hli]
@@ -25,55 +25,4 @@ IsPlayerStandingOnDoorTile:
and a
ret
-DoorTileIDPointers:
- dbw OVERWORLD, OverworldDoorTileIDs
- dbw FOREST, ForestDoorTileIDs
- dbw MART, MartDoorTileIDs
- dbw HOUSE, HouseDoorTileIDs
- dbw FOREST_GATE, TilesetMuseumDoorTileIDs
- dbw MUSEUM, TilesetMuseumDoorTileIDs
- dbw GATE, TilesetMuseumDoorTileIDs
- dbw SHIP, ShipDoorTileIDs
- dbw LOBBY, LobbyDoorTileIDs
- dbw MANSION, MansionDoorTileIDs
- dbw LAB, LabDoorTileIDs
- dbw FACILITY, FacilityDoorTileIDs
- dbw PLATEAU, PlateauDoorTileIDs
- dbw INTERIOR, InteriorDoorTileIDs
- db $ff
-
-OverworldDoorTileIDs:
- db $1B,$58,$00
-
-ForestDoorTileIDs:
- db $3a,$00
-
-MartDoorTileIDs:
- db $5e,$00
-
-HouseDoorTileIDs:
- db $54,$00
-
-TilesetMuseumDoorTileIDs:
- db $3b,$00
-
-ShipDoorTileIDs:
- db $1e,$00
-
-LobbyDoorTileIDs:
- db $1c,$38,$1a,$00
-
-MansionDoorTileIDs:
- db $1a,$1c,$53,$00
-
-LabDoorTileIDs:
- db $34,$00
-
-FacilityDoorTileIDs:
- db $43,$58,$1b,$00
-
-PlateauDoorTileIDs:
- db $3b,$1b,$00
-
-InteriorDoorTileIDs:
- db $04,$15,$00
+INCLUDE "data/tilesets/door_tile_ids.asm"
diff --git a/engine/overworld/dungeon_warps.asm b/engine/overworld/dungeon_warps.asm
index f47dfb01..7641c688 100644
--- a/engine/overworld/dungeon_warps.asm
+++ b/engine/overworld/dungeon_warps.asm
@@ -1,4 +1,4 @@
-IsPlayerOnDungeonWarp:
+IsPlayerOnDungeonWarp::
xor a
ld [wWhichDungeonWarp], a
ld a, [wd72d]
diff --git a/engine/overworld/dust_smoke.asm b/engine/overworld/dust_smoke.asm
new file mode 100755
index 00000000..773def96
--- /dev/null
+++ b/engine/overworld/dust_smoke.asm
@@ -0,0 +1,95 @@
+AnimateBoulderDust:
+ ld a, $1
+ ld [wWhichAnimationOffsets], a ; select the boulder dust offsets
+ ld a, [wUpdateSpritesEnabled]
+ push af
+ ld a, $ff
+ ld [wUpdateSpritesEnabled], a
+ ld a, %11100100
+ ldh [rOBP1], a
+ call UpdateGBCPal_OBP1
+ call LoadSmokeTileFourTimes
+ farcall WriteCutOrBoulderDustAnimationOAMBlock
+ ld c, 8 ; number of steps in animation
+.loop
+ push bc
+ call GetMoveBoulderDustFunctionPointer
+ ld bc, .returnAddress
+ push bc
+ ld c, 4
+ jp hl
+.returnAddress
+ ldh a, [rOBP1]
+ xor %01100100
+ ldh [rOBP1], a
+ call UpdateGBCPal_OBP1
+ call Delay3
+ pop bc
+ dec c
+ jr nz, .loop
+ pop af
+ ld [wUpdateSpritesEnabled], a
+ jp LoadPlayerSpriteGraphics
+
+GetMoveBoulderDustFunctionPointer:
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ ld hl, MoveBoulderDustFunctionPointerTable
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hli]
+ ld [wCoordAdjustmentAmount], a
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ push hl
+ ld hl, wOAMBuffer + $90
+ ld d, $0
+ add hl, de
+ ld e, l
+ ld d, h
+ pop hl
+ ret
+
+MoveBoulderDustFunctionPointerTable:
+; facing down
+ db $FF,$00
+ dw AdjustOAMBlockYPos
+
+; facing up
+ db $01,$00
+ dw AdjustOAMBlockYPos
+
+; facing left
+ db $01,$01
+ dw AdjustOAMBlockXPos
+
+; facing right
+ db $FF,$01
+ dw AdjustOAMBlockXPos
+
+LoadSmokeTileFourTimes::
+ ld hl, vChars1 tile $7c
+ ld c, 4
+.loop
+ push bc
+ push hl
+ call LoadSmokeTile
+ pop hl
+ ld bc, 1 tiles
+ add hl, bc
+ pop bc
+ dec c
+ jr nz, .loop
+ ret
+
+LoadSmokeTile:
+ ld de, SSAnneSmokePuffTile
+ lb bc, BANK(SSAnneSmokePuffTile), (SSAnneSmokePuffTileEnd - SSAnneSmokePuffTile) / $10
+ jp CopyVideoData
+
+SSAnneSmokePuffTile:
+ INCBIN "gfx/overworld/smoke.2bpp"
+SSAnneSmokePuffTileEnd:
diff --git a/engine/overworld/elevator.asm b/engine/overworld/elevator.asm
index 47ec78f9..b873ffad 100755
--- a/engine/overworld/elevator.asm
+++ b/engine/overworld/elevator.asm
@@ -1,11 +1,11 @@
-ShakeElevator:
+ShakeElevator::
ld de, -$20
call ShakeElevatorRedrawRow
ld de, SCREEN_HEIGHT * $20
call ShakeElevatorRedrawRow
call Delay3
call StopAllMusic
- ld a, [hSCY]
+ ldh a, [hSCY]
ld d, a
ld e, $1
ld b, 100
@@ -14,7 +14,7 @@ ShakeElevator:
xor $fe
ld e, a
add d
- ld [hSCY], a
+ ldh [hSCY], a
push bc
ld c, BANK(SFX_Collision_1)
ld a, SFX_COLLISION
@@ -25,7 +25,7 @@ ShakeElevator:
dec b
jr nz, .shakeLoop
ld a, d
- ld [hSCY], a
+ ldh [hSCY], a
call StopAllMusic
ld c, BANK(SFX_Safari_Zone_PA)
ld a, SFX_SAFARI_ZONE_PA
@@ -54,7 +54,7 @@ ShakeElevatorRedrawRow:
add hl, de
ld a, h
and $3
- or vBGMap0 / $100
+ or HIGH(vBGMap0)
ld d, a
ld a, l
pop hl
diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm
index 3b02fd55..3ad714e9 100755
--- a/engine/overworld/emotion_bubbles.asm
+++ b/engine/overworld/emotion_bubbles.asm
@@ -11,8 +11,8 @@ EmotionBubble:
add hl, bc
ld e, l
ld d, h
- ld hl, vChars1 + $780
- lb bc, BANK(EmotionBubbles), $04
+ ld hl, vChars1 tile $78
+ lb bc, BANK(EmotionBubbles), 4
call CopyVideoData
ld a, [wUpdateSpritesEnabled]
push af
@@ -41,7 +41,7 @@ EmotionBubble:
jr nz, .loop
; get the screen coordinates of the sprite the bubble is to be displayed above
- ld hl, wSpriteStateData1 + 4
+ ld hl, wSpritePlayerStateData1YPixels
ld a, [wEmotionBubbleSpriteIndex]
swap a
ld c, a
@@ -67,8 +67,15 @@ EmotionBubble:
EmotionBubblesOAM:
- db $F8,$00,$F9,$00
- db $FA,$00,$FB,$00
+ dbsprite 0, -1, 0, 0, $f9, 0
+ dbsprite 0, -1, 0, 2, $fb, 0
EmotionBubbles:
- INCBIN "gfx/emotion_bubbles.2bpp"
+ShockEmote: INCBIN "gfx/emotes/shock.2bpp"
+QuestionEmote: INCBIN "gfx/emotes/question.2bpp"
+HappyEmote: INCBIN "gfx/emotes/happy.2bpp"
+SkullEmote: INCBIN "gfx/emotes/skull.2bpp"
+HeartEmote: INCBIN "gfx/emotes/heart.2bpp"
+BoltEmote: INCBIN "gfx/emotes/bolt.2bpp"
+ZzzEmote: INCBIN "gfx/emotes/zzz.2bpp"
+FishEmote: INCBIN "gfx/emotes/fish.2bpp"
diff --git a/engine/overworld/field_move_messages.asm b/engine/overworld/field_move_messages.asm
index 1d111917..520ef8ad 100644
--- a/engine/overworld/field_move_messages.asm
+++ b/engine/overworld/field_move_messages.asm
@@ -7,16 +7,16 @@ PrintStrengthTxt:
jp PrintText
UsedStrengthText:
- TX_FAR _UsedStrengthText
- TX_ASM
+ text_far _UsedStrengthText
+ text_asm
ld a, [wcf91]
call PlayCry
call Delay3
jp TextScriptEnd
CanMoveBouldersText:
- TX_FAR _CanMoveBouldersText
- db "@"
+ text_far _CanMoveBouldersText
+ text_end
IsSurfingAllowed:
; Returns whether surfing is allowed in bit 1 of wd728.
@@ -32,7 +32,7 @@ IsSurfingAllowed:
ret nz
CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE
ret z
- ld hl, CoordsData_f5b64
+ ld hl, CoordsData_cdf7
call ArePlayerCoordsInArray
ret nc
ld hl, wd728
@@ -45,13 +45,14 @@ IsSurfingAllowed:
ld hl, CyclingIsFunText
jp PrintText
-CoordsData_f5b64:
- db $0B,$07,$FF
+CoordsData_cdf7:
+ dbmapcoord 7, 11
+ db -1 ; end
CurrentTooFastText:
- TX_FAR _CurrentTooFastText
- db "@"
+ text_far _CurrentTooFastText
+ text_end
CyclingIsFunText:
- TX_FAR _CyclingIsFunText
- db "@"
+ text_far _CyclingIsFunText
+ text_end
diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm
index e5ba004e..e5fba7e1 100755
--- a/engine/overworld/healing_machine.asm
+++ b/engine/overworld/healing_machine.asm
@@ -1,17 +1,17 @@
AnimateHealingMachine:
ld de, PokeCenterFlashingMonitorAndHealBall
- ld hl, vChars0 + $7c0
- lb bc, BANK(PokeCenterFlashingMonitorAndHealBall), $03 ; loads one too many tiles
+ ld hl, vChars0 tile $7c
+ lb bc, BANK(PokeCenterFlashingMonitorAndHealBall), 3 ; should be 2
call CopyVideoData
ld hl, wUpdateSpritesEnabled
ld a, [hl]
push af
ld [hl], $ff
push hl
- ld a, [rOBP1]
+ ldh a, [rOBP1]
push af
ld a, $e0
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP1
ld hl, wOAMBuffer + $84
ld de, PokeCenterOAMData
@@ -53,7 +53,7 @@ AnimateHealingMachine:
ld c, 32
call DelayFrames
pop af
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP1
pop hl
pop af
@@ -61,24 +61,26 @@ AnimateHealingMachine:
jp UpdateSprites
PokeCenterFlashingMonitorAndHealBall:
- INCBIN "gfx/pokecenter_ball.2bpp"
+ INCBIN "gfx/overworld/heal_machine.2bpp"
PokeCenterOAMData:
- db $24,$34,$7C,$14 ; heal machine monitor
- db $2B,$30,$7D,$14 ; pokeballs 1-6
- db $2B,$38,$7D,$34
- db $30,$30,$7D,$14
- db $30,$38,$7D,$34
- db $35,$30,$7D,$14
- db $35,$38,$7D,$34
+ ; heal machine monitor
+ dbsprite 6, 4, 4, 4, $7c, OAM_OBP1 | %100
+ ; poke balls 1-6
+ dbsprite 6, 5, 0, 3, $7d, OAM_OBP1 | %100
+ dbsprite 7, 5, 0, 3, $7d, OAM_OBP1 | OAM_HFLIP | %100
+ dbsprite 6, 6, 0, 0, $7d, OAM_OBP1 | %100
+ dbsprite 7, 6, 0, 0, $7d, OAM_OBP1 | OAM_HFLIP | %100
+ dbsprite 6, 6, 0, 5, $7d, OAM_OBP1 | %100
+ dbsprite 7, 6, 0, 5, $7d, OAM_OBP1 | OAM_HFLIP | %100
; d = value to xor with palette
FlashSprite8Times:
ld b, 8
.loop
- ld a, [rOBP1]
+ ldh a, [rOBP1]
xor d
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP1
ld c, 10
call DelayFrames
@@ -88,16 +90,9 @@ FlashSprite8Times:
CopyHealingMachineOAM:
; copy one OAM entry and advance the pointers
+ REPT 4
ld a, [de]
inc de
ld [hli], a
- ld a, [de]
- inc de
- ld [hli], a
- ld a, [de]
- inc de
- ld [hli], a
- ld a, [de]
- inc de
- ld [hli], a
+ ENDR
ret
diff --git a/engine/overworld/hidden_items.asm b/engine/overworld/hidden_items.asm
deleted file mode 100755
index b64411c7..00000000
--- a/engine/overworld/hidden_items.asm
+++ /dev/null
@@ -1,172 +0,0 @@
-HiddenItems:
- ld hl, HiddenItemCoords
- call FindHiddenItemOrCoinsIndex
- ld [wHiddenItemOrCoinsIndex], a
- ld hl, wObtainedHiddenItemsFlags
- ld a, [wHiddenItemOrCoinsIndex]
- ld c, a
- ld b, FLAG_TEST
- predef FlagActionPredef
- ld a, c
- and a
- jr nz, .itemAlreadyFound
- call EnableAutoTextBoxDrawing
- ld a, 1
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, [wHiddenObjectFunctionArgument] ; item ID
- ld [wd11e], a
- call GetItemName
- tx_pre_jump FoundHiddenItemText
-
-.itemAlreadyFound
- ld a, $ff
- ld [hItemAlreadyFound], a
- ret
-
-INCLUDE "data/hidden_item_coords.asm"
-
-FoundHiddenItemText:
- TX_FAR _FoundHiddenItemText
- TX_ASM
- ld a, [wHiddenObjectFunctionArgument] ; item ID
- ld b, a
- ld c, 1
- call GiveItem
- jr nc, .bagFull
- ld hl, wObtainedHiddenItemsFlags
- ld a, [wHiddenItemOrCoinsIndex]
- ld c, a
- ld b, FLAG_SET
- predef FlagActionPredef
- ld a, SFX_GET_ITEM_2
- call PlaySoundWaitForCurrent
- call WaitForSoundToFinish
- jp TextScriptEnd
-.bagFull
- call WaitForTextScrollButtonPress ; wait for button press
- xor a
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, HiddenItemBagFullText
- call PrintText
- jp TextScriptEnd
-
-HiddenItemBagFullText:
- TX_FAR _HiddenItemBagFullText
- db "@"
-
-HiddenCoins:
- ld b, COIN_CASE
- predef GetQuantityOfItemInBag
- ld a, b
- and a
- jr z, .doNotPickUpCoins
- ld hl, HiddenCoinCoords
- call FindHiddenItemOrCoinsIndex
- ld [wHiddenItemOrCoinsIndex], a
- ld hl, wObtainedHiddenCoinsFlags
- ld a, [wHiddenItemOrCoinsIndex]
- ld c, a
- ld b, FLAG_TEST
- predef FlagActionPredef
- ld a, c
- and a
- jr nz, .doNotPickUpCoins
- xor a
- ld [hUnusedCoinsByte], a
- ld [hCoins], a
- ld [hCoins + 1], a
- ld a, [wHiddenObjectFunctionArgument]
- sub COIN
- cp 10
- jr z, .bcd10
- cp 20
- jr z, .bcd20
- cp 40
- jr z, .bcd20 ; should be bcd40
- jr .bcd100
-
-.doNotPickUpCoins
- ld a, $ff
- ld [hItemAlreadyFound], a
- ret
-
-.bcd10
- ld a, $10
- ld [hCoins + 1], a
- jr .bcdDone
-.bcd20
- ld a, $20
- ld [hCoins + 1], a
- jr .bcdDone
-.bcd40 ; due to a typo, this is never used
- ld a, $40
- ld [hCoins + 1], a
- jr .bcdDone
-.bcd100
- ld a, $1
- ld [hCoins], a
-.bcdDone
- ld de, wPlayerCoins + 1
- ld hl, hCoins + 1
- ld c, $2
- predef AddBCDPredef
- ld hl, wObtainedHiddenCoinsFlags
- ld a, [wHiddenItemOrCoinsIndex]
- ld c, a
- ld b, FLAG_SET
- predef FlagActionPredef
- call EnableAutoTextBoxDrawing
- ld a, [wPlayerCoins]
- cp $99
- jr nz, .roomInCoinCase
- ld a, [wPlayerCoins + 1]
- cp $99
- jr nz, .roomInCoinCase
- tx_pre_id DroppedHiddenCoinsText
- jr .done
-.roomInCoinCase
- tx_pre_id FoundHiddenCoinsText
-.done
- jp PrintPredefTextID
-
-INCLUDE "data/hidden_coins.asm"
-
-FoundHiddenCoinsText:
- TX_FAR _FoundHiddenCoinsText
- TX_SFX_ITEM_2
- db "@"
-
-DroppedHiddenCoinsText:
- TX_FAR _FoundHiddenCoins2Text
- TX_SFX_ITEM_2
- TX_FAR _DroppedHiddenCoinsText
- db "@"
-
-FindHiddenItemOrCoinsIndex:
- ld a, [wHiddenObjectY]
- ld d, a
- ld a, [wHiddenObjectX]
- ld e, a
- ld a, [wCurMap]
- ld b, a
- ld c, -1
-.loop
- inc c
- ld a, [hli]
- cp $ff ; end of the list?
- ret z ; if so, we're done here
- cp b
- jr nz, .next1
- ld a, [hli]
- cp d
- jr nz, .next2
- ld a, [hli]
- cp e
- jr nz, .loop
- ld a, c
- ret
-.next1
- inc hl
-.next2
- inc hl
- jr .loop
diff --git a/engine/overworld/hidden_objects.asm b/engine/overworld/hidden_objects.asm
index 66815b60..84108986 100755
--- a/engine/overworld/hidden_objects.asm
+++ b/engine/overworld/hidden_objects.asm
@@ -1,11 +1,11 @@
; if a hidden object was found, stores $00 in [hDidntFindAnyHiddenObject], else stores $ff
-CheckForHiddenObject:
+CheckForHiddenObject::
ld hl, hItemAlreadyFound
xor a
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ld [hl], a
+ ld [hli], a ; [hItemAlreadyFound]
+ ld [hli], a ; [hSavedMapTextPtr]
+ ld [hli], a ; [hSavedMapTextPtr + 1]
+ ld [hl], a ; [hDidntFindAnyHiddenObject]
ld hl, HiddenObjectMaps
ld de, 3
ld a, [wCurMap]
@@ -32,7 +32,7 @@ CheckForHiddenObject:
ld [wHiddenObjectX], a
ld c, a
call CheckIfCoordsInFrontOfPlayerMatch
- ld a, [hCoordsInFrontOfPlayerMatch]
+ ldh a, [hCoordsInFrontOfPlayerMatch]
and a
jr z, .foundMatchingObject
inc hl
@@ -55,13 +55,13 @@ CheckForHiddenObject:
ret
.noMatch
ld a, $ff
- ld [hDidntFindAnyHiddenObject], a
+ ldh [hDidntFindAnyHiddenObject], a
ret
; checks if the coordinates in front of the player's sprite match Y in b and X in c
; [hCoordsInFrontOfPlayerMatch] = $00 if they match, $ff if they don't match
CheckIfCoordsInFrontOfPlayerMatch:
- ld a, [wSpritePlayerStateData1FacingDirection] ; player's sprite facing direction
+ ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
jr z, .facingUp
cp SPRITE_FACING_LEFT
@@ -101,7 +101,7 @@ CheckIfCoordsInFrontOfPlayerMatch:
.didNotMatch
ld a, $ff
.done
- ld [hCoordsInFrontOfPlayerMatch], a
+ ldh [hCoordsInFrontOfPlayerMatch], a
ret
-INCLUDE "data/hidden_objects.asm"
+INCLUDE "data/events/hidden_objects.asm"
diff --git a/engine/overworld/item.asm b/engine/overworld/item.asm
deleted file mode 100644
index 9f19100a..00000000
--- a/engine/overworld/item.asm
+++ /dev/null
@@ -1,54 +0,0 @@
-PickUpItem:
- call EnableAutoTextBoxDrawing
-
- ld a, [hSpriteIndexOrTextID]
- ld b, a
- ld hl, wMissableObjectList
-.missableObjectsListLoop
- ld a, [hli]
- cp $ff
- ret z
- cp b
- jr z, .isMissable
- inc hl
- jr .missableObjectsListLoop
-
-.isMissable
- ld a, [hl]
- ld [$ffdb], a
-
- ld hl, wMapSpriteExtraData
- ld a, [hSpriteIndexOrTextID]
- dec a
- add a
- ld d, 0
- ld e, a
- add hl, de
- ld a, [hl]
- ld b, a ; item
- ld c, 1 ; quantity
- call GiveItem
- jr nc, .BagFull
-
- ld a, [$ffdb]
- ld [wMissableObjectIndex], a
- predef HideObject
- ld a, 1
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, FoundItemText
- jr .print
-
-.BagFull
- ld hl, NoMoreRoomForItemText
-.print
- call PrintText
- ret
-
-FoundItemText:
- TX_FAR _FoundItemText
- TX_SFX_ITEM_1
- db "@"
-
-NoMoreRoomForItemText:
- TX_FAR _NoMoreRoomForItemText
- db "@"
diff --git a/engine/overworld/ledges.asm b/engine/overworld/ledges.asm
index a44ddf8b..9925c528 100755
--- a/engine/overworld/ledges.asm
+++ b/engine/overworld/ledges.asm
@@ -1,4 +1,4 @@
-HandleLedges:
+HandleLedges::
ld a, [wd736]
bit 6, a ; already jumping down ledge
ret nz
@@ -8,7 +8,7 @@ HandleLedges:
predef GetTileAndCoordsInFrontOfPlayer
ld a, [wSpritePlayerStateData1FacingDirection]
ld b, a
- aCoord 8, 9
+ lda_coord 8, 9
ld c, a
ld a, [wTileInFrontOfPlayer]
ld d, a
@@ -36,7 +36,7 @@ HandleLedges:
inc hl
jr .loop
.foundMatch
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
and e
ret z
ld a, $ff
@@ -54,20 +54,10 @@ HandleLedges:
call PlaySound
ret
- ; (player direction) (tile player standing on) (ledge tile) (input required)
-LedgeTiles:
- db SPRITE_FACING_DOWN, $2C,$37,D_DOWN
- db SPRITE_FACING_DOWN, $39,$36,D_DOWN
- db SPRITE_FACING_DOWN, $39,$37,D_DOWN
- db SPRITE_FACING_LEFT, $2C,$27,D_LEFT
- db SPRITE_FACING_LEFT, $39,$27,D_LEFT
- db SPRITE_FACING_RIGHT,$2C,$0D,D_RIGHT
- db SPRITE_FACING_RIGHT,$2C,$1D,D_RIGHT
- db SPRITE_FACING_RIGHT,$39,$0D,D_RIGHT
- db $FF
+INCLUDE "data/tilesets/ledge_tiles.asm"
LoadHoppingShadowOAM:
- ld hl, vChars1 + $7f0
+ ld hl, vChars1 tile $7f
ld de, LedgeHoppingShadow
lb bc, BANK(LedgeHoppingShadow), (LedgeHoppingShadowEnd - LedgeHoppingShadow) / $8
call CopyVideoDataDouble
@@ -81,10 +71,10 @@ LoadHoppingShadowOAM:
ret
LedgeHoppingShadow:
- INCBIN "gfx/ledge_hopping_shadow.1bpp"
+ INCBIN "gfx/overworld/shadow.1bpp"
LedgeHoppingShadowEnd:
LedgeHoppingShadowOAM:
- db $58,$48,$FF,$00
- db $58,$50,$FF,$20
+ dbsprite 9, 11, 0, 0, $ff, 0
+ dbsprite 10, 11, 0, 0, $ff, OAM_HFLIP
LedgeHoppingShadowOAMEnd:
diff --git a/engine/overworld/map_sprite_functions1.asm b/engine/overworld/map_sprite_functions1.asm
deleted file mode 100644
index 2ad923fb..00000000
--- a/engine/overworld/map_sprite_functions1.asm
+++ /dev/null
@@ -1,390 +0,0 @@
-_UpdateSprites:
- ld h, wSpriteStateData1 / $100
- inc h
- ld a, $e ; (wSpriteStateData2 + $0e) & $ff
-.spriteLoop
- ld l, a
- sub $e
- ld c, a
- ld [H_CURRENTSPRITEOFFSET], a
- ld a, [hl]
- and a
- jr z, .skipSprite ; tests $c2Xe
- push hl
- push de
- push bc
- call .updateCurrentSprite
- pop bc
- pop de
- pop hl
-.skipSprite
- ld a, l
- add $10 ; move to next sprite
- cp $e ; test for overflow (back at $0e)
- jr nz, .spriteLoop
- ret
-.updateCurrentSprite
- ld a, [H_CURRENTSPRITEOFFSET]
- and a
- jp z, UpdatePlayerSprite
- cp $f0 ; pikachu
- jp z, SpawnPikachu
- ld a, [hl]
-
-UpdateNonPlayerSprite:
- dec a
- swap a
- ld [$ff93], a ; $10 * sprite#
- ld a, [wNPCMovementScriptSpriteOffset] ; some sprite offset?
- ld b, a
- ld a, [H_CURRENTSPRITEOFFSET]
- cp b
- jr nz, .unequal
- jp DoScriptedNPCMovement
-.unequal
- jp UpdateNPCSprite
-
-; This detects if the current sprite (whose offset is at H_CURRENTSPRITEOFFSET)
-; is going to collide with another sprite by looping over the other sprites.
-; The current sprite's offset will be labelled with i (e.g. $c1i0).
-; The loop sprite's offset will labelled with j (e.g. $c1j0).
-;
-; Note that the Y coordinate of the sprite (in [$c1k4]) is one of the following
-; 9 values when the sprite is aligned with the grid: $fc, $0c, $1c, $2c, ..., $7c.
-; The reason that 4 is added below to the coordinate is to make it align with a
-; multiple of $10 to make comparisons easier.
-DetectCollisionBetweenSprites:
- ; nop
-
- ld h, wSpriteStateData1 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
- ld l, a
-
- ld a, [hl] ; a = [$c1i0] (picture) (0 if slot is unused)
- and a ; is this sprite slot slot used?
- ret z ; return if not used
-
- ld a, l
- add 3
- ld l, a
-
- ld a, [hli] ; a = [$c1i3] (delta Y) (-1, 0, or 1)
- call SetSpriteCollisionValues
-
- ld a, [hli] ; a = [$C1i4] (Y screen coordinate)
- add 4 ; align with multiple of $10
-
-; The effect of the following 3 lines is to
-; add 7 to a if moving south or
-; subtract 7 from a if moving north.
- add b
- and $f0
- or c
-
- ld [$ff90], a ; store Y coordinate adjusted for direction of movement
-
- ld a, [hli] ; a = [$c1i5] (delta X) (-1, 0, or 1)
- call SetSpriteCollisionValues
- ld a, [hl] ; a = [$C1i6] (X screen coordinate)
-
-; The effect of the following 3 lines is to
-; add 7 to a if moving east or
-; subtract 7 from a if moving west.
- add b
- and $f0
- or c
-
- ld [$ff91], a ; store X coordinate adjusted for direction of movement
-
- ld a, l
- add 7
- ld l, a
-
- xor a
- ld [hld], a ; zero [$c1id] XXX what's [$c1id] for?
- ld [hld], a ; zero [$c1ic] (directions in which collisions occurred)
-
- ld a, [$ff91]
- ld [hld], a ; [$c1ib] = adjusted X coordinate
- ld a, [$ff90]
- ld [hl], a ; [$c1ia] = adjusted Y coordinate
-
- xor a ; zero the loop counter
-
-.loop
- ld [$ff8f], a ; store loop counter
- swap a
- ld e, a
- ld a, [H_CURRENTSPRITEOFFSET]
- cp e ; does the loop sprite match the current sprite?
- jp z, .next ; go to the next sprite if they match
-
- ld d, h
- ld a, [de] ; a = [$c1j0] (picture) (0 if slot is unused)
- and a ; is this sprite slot slot used?
- jp z, .next ; go the next sprite if not used
-
- inc e
- inc e
- ld a, [de] ; a = [$c1j2] ($ff means the sprite is offscreen)
- inc a
- jp z, .next ; go the next sprite if offscreen
-
- ld a, [H_CURRENTSPRITEOFFSET]
- add 10
- ld l, a
-
- inc e
- ld a, [de] ; a = [$c1j3] (delta Y)
- call SetSpriteCollisionValues
-
- inc e
- ld a, [de] ; a = [$C1j4] (Y screen coordinate)
- add 4 ; align with multiple of $10
-
-; The effect of the following 3 lines is to
-; add 7 to a if moving south or
-; subtract 7 from a if moving north.
- add b
- and $f0
- or c
-
- sub [hl] ; subtract the adjusted Y coordinate of sprite i ([$c1ia]) from that of sprite j
-
-; calculate the absolute value of the difference to get the distance
- jr nc, .noCarry1
- cpl
- inc a
-.noCarry1
- ld [$ff90], a ; store the distance between the two sprites' adjusted Y values
-
-; Use the carry flag set by the above subtraction to determine which sprite's
-; Y coordinate is larger. This information is used later to set [$c1ic],
-; which stores which direction the collision occurred in.
-; The following 5 lines set the lowest 2 bits of c, which are later shifted left by 2.
-; If sprite i's Y is larger, set lowest 2 bits of c to 10.
-; If sprite j's Y is larger or both are equal, set lowest 2 bits of c to 01.
- push af
- rl c
- pop af
- ccf
- rl c
-
-; If sprite i's delta Y is 0, then b = 7, else b = 9.
- ld b, 7
- ld a, [hl] ; a = [$c1ia] (adjusted Y coordinate)
- and $f
- jr z, .next1
- ld b, 9
-
-.next1
- ld a, [$ff90] ; a = distance between adjusted Y coordinates
- sub b
- ld [$ff92], a ; store distance adjusted using sprite i's direction
- ld a, b
- ld [$ff90], a ; store 7 or 9 depending on sprite i's delta Y
- jr c, .checkXDistance
-
-; If sprite j's delta Y is 0, then b = 7, else b = 9.
- ld b, 7
- dec e
- ld a, [de] ; a = [$c1j3] (delta Y)
- inc e
- and a
- jr z, .next2
- ld b, 9
-
-.next2
- ld a, [$ff92] ; a = distance adjusted using sprite i's direction
- sub b ; adjust distance using sprite j's direction
- jr z, .checkXDistance
- jr nc, .next ; go to next sprite if distance is still positive after both adjustments
-
-.checkXDistance
- inc e
- inc l
- ld a, [de] ; a = [$c1j5] (delta X)
-
- push bc
-
- call SetSpriteCollisionValues
- inc e
- ld a, [de] ; a = [$c1j6] (X screen coordinate)
-
-; The effect of the following 3 lines is to
-; add 7 to a if moving east or
-; subtract 7 from a if moving west.
- add b
- and $f0
- or c
-
- pop bc
-
- sub [hl] ; subtract the adjusted X coordinate of sprite i ([$c1ib]) from that of sprite j
-
-; calculate the absolute value of the difference to get the distance
- jr nc, .noCarry2
- cpl
- inc a
-.noCarry2
- ld [$ff91], a ; store the distance between the two sprites' adjusted X values
-
-; Use the carry flag set by the above subtraction to determine which sprite's
-; X coordinate is larger. This information is used later to set [$c1ic],
-; which stores which direction the collision occurred in.
-; The following 5 lines set the lowest 2 bits of c.
-; If sprite i's X is larger, set lowest 2 bits of c to 10.
-; If sprite j's X is larger or both are equal, set lowest 2 bits of c to 01.
- push af
- rl c
- pop af
- ccf
- rl c
-
-; If sprite i's delta X is 0, then b = 7, else b = 9.
- ld b, 7
- ld a, [hl] ; a = [$c1ib] (adjusted X coordinate)
- and $f
- jr z, .next3
- ld b, 9
-
-.next3
- ld a, [$ff91] ; a = distance between adjusted X coordinates
- sub b
- ld [$ff92], a ; store distance adjusted using sprite i's direction
- ld a, b
- ld [$ff91], a ; store 7 or 9 depending on sprite i's delta X
- jr c, .collision
-
-; If sprite j's delta X is 0, then b = 7, else b = 9.
- ld b, 7
- dec e
- ld a, [de] ; a = [$c1j5] (delta X)
- inc e
- and a
- jr z, .next4
- ld b, 9
-
-.next4
- ld a, [$ff92] ; a = distance adjusted using sprite i's direction
- sub b ; adjust distance using sprite j's direction
- jr z, .collision
- jr nc, .next ; go to next sprite if distance is still positive after both adjustments
-
-.collision
- ld a, l
- and $f0 ; collision with pikachu?
- jr nz, .asm_4cd9
- xor a
- ld [wd434], a
- ld a, [$ff8f]
- cp $f
- jr nz, .asm_4cd9
- call Func_4d0a
- jr .asm_4cef
-.asm_4cd9
- ld a, [$ff91] ; a = 7 or 9 depending on sprite i's delta X
- ld b, a
- ld a, [$ff90] ; a = 7 or 9 depending on sprite i's delta Y
- inc l
-
-; If delta X isn't 0 and delta Y is 0, then b = %0011, else b = %1100.
-; (note that normally if delta X isn't 0, then delta Y must be 0 and vice versa)
- cp b
- jr c, .next5
- ld b, %1100
- jr .next6
-.next5
- ld b, %0011
-
-.next6
- ld a, c ; c has 2 bits set (one of bits 0-1 is set for the X axis and one of bits 2-3 for the Y axis)
- and b ; we select either the bit in bits 0-1 or bits 2-3 based on the calculation immediately above
- or [hl] ; or with existing collision direction bits in [$c1ic]
- ld [hl], a ; store new value
- ld a, c ; useless code because a is overwritten before being used again
-
-; set bit in [$c1ie] or [$c1if] to indicate which sprite the collision occurred with
- inc l
- inc l
-.asm_4cef
- ld a, [$ff8f] ; a = loop counter
- ld de, SpriteCollisionBitTable
- add a
- add e
- ld e, a
- jr nc, .noCarry3
- inc d
-.noCarry3
- ld a, [de]
- or [hl]
- ld [hli], a
- inc de
- ld a, [de]
- or [hl]
- ld [hl], a
-
-.next
- ld a, [$ff8f] ; a = loop counter
- inc a
- cp $10
- jp nz, .loop
- ret
-
-; takes delta X or delta Y in a
-; b = delta X/Y
-; c = 0 if delta X/Y is 0
-; c = 7 if delta X/Y is 1
-; c = 9 if delta X/Y is -1
-Func_4d0a:
- ld a, [$ff91]
- ld b, a
- ld a, [$ff90]
- inc l
- cp b
- jr c, .asm_4d17
- ld b, %1100
- jr .asm_4d19
-.asm_4d17
- ld b, %11
-.asm_4d19
- ld a, c
- and b
- ld [wd434], a
- ld a, c
- inc l
- inc l
- ret
-
-SetSpriteCollisionValues:
- and a
- ld b, 0
- ld c, 0
- jr z, .done
- ld c, 9
- cp -1
- jr z, .ok
- ld c, 7
- ld a, 0
-.ok
- ld b, a
-.done
- ret
-
-SpriteCollisionBitTable:
- db %00000000,%00000001
- db %00000000,%00000010
- db %00000000,%00000100
- db %00000000,%00001000
- db %00000000,%00010000
- db %00000000,%00100000
- db %00000000,%01000000
- db %00000000,%10000000
- db %00000001,%00000000
- db %00000010,%00000000
- db %00000100,%00000000
- db %00001000,%00000000
- db %00010000,%00000000
- db %00100000,%00000000
- db %01000000,%00000000
- db %10000000,%00000000
diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm
index 3e2c3912..e31c0bd2 100755
--- a/engine/overworld/map_sprites.asm
+++ b/engine/overworld/map_sprites.asm
@@ -8,7 +8,7 @@
; fields, respectively, within loops. The X is the loop index.
; If there is an inner loop, Y is the inner loop index, i.e. $C1Y* and $C2Y*
; denote fields of the sprite slots iterated over in the inner loop.
-_InitMapSprites:
+_InitMapSprites::
call InitOutsideMapSprites
ret c ; return if the map is an outside map (already handled by above call)
; if the map is an inside map (i.e. mapID >= $25)
@@ -21,7 +21,7 @@ _InitMapSprites:
; sets carry if the map is a city or route, unsets carry if not
InitOutsideMapSprites:
ld a, [wCurMap]
- cp a, REDS_HOUSE_1F ; is the map a city or a route (map ID less than $25)?
+ cp FIRST_INDOOR_MAP ; is the map a city or a route?
ret nc ; if not, return
call GetSplitMapSpriteSetID
; if so, choose the appropriate one
@@ -68,7 +68,7 @@ LoadSpriteSetFromMapHeader:
ld a, 14
.storeVRAMSlotsLoop
push af
- ld a, [hl] ; $C1X0 (picture ID) (zero if sprite slot is not used)
+ ld a, [hl] ; [x#SPRITESTATEDATA1_PICTUREID] (zero if sprite slot is not used)
and a ; is the sprite slot used?
jr z, .continue ; if the sprite slot is not used
ld c, a
@@ -125,7 +125,7 @@ CheckForFourTileSprite:
cp SPRITE_PIKACHU ; is this the Pikachu Sprite?
ret z ; return if yes
- cp SPRITE_BALL ; is this a four tile sprite?
+ cp FIRST_STILL_SPRITE ; is this a four tile sprite?
jr nc, .notYellowSprite ; set carry if yes
; regular sprite
and a
@@ -138,7 +138,7 @@ CheckForFourTileSprite:
LoadMapSpriteTilePatterns:
ld a, 0
.loop
- ld [hVRAMSlot], a
+ ldh [hVRAMSlot], a
cp 9
jr nc, .fourTileSprite
call LoadStillTilePattern
@@ -148,7 +148,7 @@ LoadMapSpriteTilePatterns:
.fourTileSprite
call LoadStillTilePattern
.continue
- ld a, [hVRAMSlot]
+ ldh a, [hVRAMSlot]
inc a
cp 11
jr nz, .loop
@@ -157,12 +157,12 @@ LoadMapSpriteTilePatterns:
ReloadWalkingTilePatterns:
xor a
.loop
- ld [hVRAMSlot], a
+ ldh [hVRAMSlot], a
cp 9
jr nc, .fourTileSprite
call LoadWalkingTilePattern
.fourTileSprite
- ld a, [hVRAMSlot]
+ ldh a, [hVRAMSlot]
inc a
cp 11
jr nz, .loop
@@ -192,7 +192,7 @@ LoadWalkingTilePattern:
GetSpriteVRAMAddress:
push bc
- ld a, [hVRAMSlot]
+ ldh a, [hVRAMSlot]
ld c, a
ld b, 0
ld hl, SpriteVRAMAddresses
@@ -220,7 +220,7 @@ SpriteVRAMAddresses:
dw vChars0 + $7c0 ; 4-tile sprites
ReadSpriteSheetData:
- ld a, [hVRAMSlot]
+ ldh a, [hVRAMSlot]
ld e, a
ld d, 0
ld hl, wSpriteSet
@@ -257,20 +257,20 @@ Func_14150:
ld a, $e
ld hl, wSprite01StateData1
.loop
- ld [hVRAMSlot], a ; store current sprite set slot as a counter
- ld a, [hl] ; $c1x0 (picture ID)
+ ldh [hVRAMSlot], a ; store current sprite set slot as a counter
+ ld a, [hl] ; [x#SPRITESTATEDATA1_PICTUREID]
and a ; is the sprite unused?
jr z, .spriteUnused
call Func_14179
push hl
ld de, (wSpritePlayerStateData2ImageBaseOffset) - (wSpriteStateData1) ; $10e
- add hl, de ; get $c2xe (sprite image base offset)
+ add hl, de ; [x#SPRITESTATEDATA2_IMAGEBASEOFFSET]
ld [hl], a ; write offset
pop hl
.spriteUnused
ld de, wSprite02StateData1 - wSprite01StateData1
add hl, de
- ld a, [hVRAMSlot]
+ ldh a, [hVRAMSlot]
dec a
jr nz, .loop
ret
@@ -364,4 +364,6 @@ GetSplitMapSpriteSetID:
ld a, $01
ret
-INCLUDE "data/sprite_sets.asm"
+INCLUDE "data/maps/sprite_sets.asm"
+
+INCLUDE "data/sprites/sprites.asm"
diff --git a/engine/overworld/missable_objects.asm b/engine/overworld/missable_objects.asm
index dd601451..358a9b9f 100644
--- a/engine/overworld/missable_objects.asm
+++ b/engine/overworld/missable_objects.asm
@@ -1,6 +1,6 @@
-MarkTownVisitedAndLoadMissableObjects:
+MarkTownVisitedAndLoadMissableObjects::
ld a, [wCurMap]
- cp ROUTE_1
+ cp FIRST_ROUTE_MAP
jr nc, .notInTown
ld c, a
ld b, FLAG_SET
@@ -22,31 +22,31 @@ MarkTownVisitedAndLoadMissableObjects:
ld l, a
push hl
ld a, l
- sub MapHS00 & $ff ; calculate difference between out pointer and the base pointer
+ sub MissableObjects & $ff ; calculate difference between out pointer and the base pointer
ld l, a
ld a, h
- sbc MapHS00 / $100
+ sbc MissableObjects / $100
ld h, a
ld a, h
- ld [H_DIVIDEND], a
+ ldh [hDividend], a
ld a, l
- ld [H_DIVIDEND + 1], a
+ ldh [hDividend+1], a
xor a
- ld [H_DIVIDEND + 2], a
- ld [H_DIVIDEND + 3], a
+ ldh [hDividend+2], a
+ ldh [hDividend+3], a
ld a, $3
- ld [H_DIVISOR], a
+ ldh [hDivisor], a
ld b, $2
call Divide ; divide difference by 3, resulting in the global offset (number of missable items before ours)
ld a, [wCurMap]
ld b, a
- ld a, [H_DIVIDEND + 3]
+ ldh a, [hDividend+3]
ld c, a ; store global offset in c
ld de, wMissableObjectList
pop hl
.writeMissableObjectsListLoop
ld a, [hli]
- cp $ff
+ cp -1
jr z, .done ; end of list
cp b
jr nz, .done ; not for current map anymore
@@ -60,7 +60,7 @@ MarkTownVisitedAndLoadMissableObjects:
inc de
jr .writeMissableObjectsListLoop
.done
- ld a, $ff
+ ld a, -1
ld [de], a ; write sentinel
ret
@@ -69,17 +69,17 @@ InitializeMissableObjectsFlags:
ld bc, wMissableObjectFlagsEnd - wMissableObjectFlags
xor a
call FillMemory ; clear missable objects flags
- ld hl, MapHS00
+ ld hl, MissableObjects
xor a
ld [wMissableObjectCounter], a
.missableObjectsLoop
ld a, [hli]
- cp $ff ; end of list
+ cp -1 ; end of list
ret z
push hl
inc hl
ld a, [hl]
- cp Hide
+ cp HIDE
jr nz, .skip
ld hl, wMissableObjectFlags
ld a, [wMissableObjectCounter]
@@ -96,13 +96,13 @@ InitializeMissableObjectsFlags:
; tests if current sprite is a missable object that is hidden/has been removed
IsObjectHidden:
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
swap a
ld b, a
ld hl, wMissableObjectList
.loop
ld a, [hli]
- cp $ff
+ cp -1
jr z, .notHidden ; not missable -> not hidden
cp b
ld a, [hli]
@@ -117,7 +117,7 @@ IsObjectHidden:
.notHidden
xor a
.hidden
- ld [$ffe5], a
+ ldh [hIsHiddenMissableObject], a
ret
; adds missable object (items, leg. pokemon, etc.) to the map
diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm
index f2334479..dadf2194 100644
--- a/engine/overworld/movement.asm
+++ b/engine/overworld/movement.asm
@@ -1,25 +1,25 @@
MAP_TILESET_SIZE EQU $60
UpdatePlayerSprite:
- ld a, [wSpriteStateData2]
+ ld a, [wSpritePlayerStateData2WalkAnimationCounter]
and a
jr z, .checkIfTextBoxInFrontOfSprite
cp $ff
jr z, .disableSprite
dec a
- ld [wSpriteStateData2], a
+ ld [wSpritePlayerStateData2WalkAnimationCounter], a
jr .disableSprite
; check if a text box is in front of the sprite by checking if the lower left
; background tile the sprite is standing on is greater than $5F, which is
; the maximum number for map tiles
.checkIfTextBoxInFrontOfSprite
- aCoord 8, 9
- ld [hTilePlayerStandingOn], a
+ lda_coord 8, 9
+ ldh [hTilePlayerStandingOn], a
cp MAP_TILESET_SIZE
jr c, .lowerLeftTileIsMapTile
.disableSprite
ld a, $ff
- ld [wSpriteStateData1 + 2], a
+ ld [wSpritePlayerStateData1ImageIndex], a
ret
.lowerLeftTileIsMapTile
ld a, [wUpdateSpritesEnabled]
@@ -29,7 +29,7 @@ UpdatePlayerSprite:
call DetectCollisionBetweenSprites
pop af
ld [wUpdateSpritesEnabled], a
- ld h, wSpriteStateData1 / $100
+ ld h, HIGH(wSpriteStateData1)
ld a, [wWalkCounter]
and a
jr nz, .moving
@@ -62,8 +62,8 @@ UpdatePlayerSprite:
.notMoving
; zero the animation counters
xor a
- ld [wSpriteStateData1 + 7], a
- ld [wSpriteStateData1 + 8], a
+ ld [wSpritePlayerStateData1IntraAnimFrameCounter], a
+ ld [wSpritePlayerStateData1AnimFrameCounter], a
call Func_4e32
jr .skipSpriteAnim
.moving
@@ -77,27 +77,27 @@ UpdatePlayerSprite:
; lower priority than the background so that it's partially obscured by the
; grass. Only the lower half of the sprite is permitted to have the priority
; bit set by later logic.
- ld a, [hTilePlayerStandingOn]
+ ldh a, [hTilePlayerStandingOn]
ld c, a
ld a, [wGrassTile]
cp c
- ld a, $0
+ ld a, 0
jr nz, .next2
- ld a, $80
+ ld a, OAM_BEHIND_BG
.next2
- ld [wSpriteStateData2 + $07], a
+ ld [wSpritePlayerStateData2GrassPriority], a
ret
Func_4e32:
- ld a, [wSpriteStateData1 + 8]
+ ld a, [wSpritePlayerStateData1AnimFrameCounter]
ld b, a
ld a, [wSpritePlayerStateData1FacingDirection]
add b
- ld [wSpriteStateData1 + 2], a
+ ld [wSpritePlayerStateData1ImageIndex], a
ret
UpdateNPCSprite:
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
swap a
dec a
add a
@@ -106,20 +106,20 @@ UpdateNPCSprite:
ld l, a
ld a, [hl] ; read movement byte 2
ld [wCurSpriteMovement2], a
- ld h, wSpriteStateData1 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld h, HIGH(wSpriteStateData1)
+ ldh a, [hCurrentSpriteOffset]
ld l, a
inc l
- ld a, [hl] ; c1x1
+ ld a, [hl] ; x#SPRITESTATEDATA1_MOVEMENTSTATUS
and a
jp z, InitializeSpriteStatus
call CheckSpriteAvailability
ret c ; if sprite is invisible, on tile >=MAP_TILESET_SIZE, in grass or player is currently walking
- ld h, wSpriteStateData1 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld h, HIGH(wSpriteStateData1)
+ ldh a, [hCurrentSpriteOffset]
ld l, a
inc l
- ld a, [hl] ; c1x1
+ ld a, [hl] ; x#SPRITESTATEDATA1_MOVEMENTSTATUS
bit 7, a ; is the face player flag set?
jp nz, MakeNPCFacePlayer
ld b, a
@@ -128,24 +128,24 @@ UpdateNPCSprite:
jp nz, notYetMoving
ld a, b
cp $2
- jp z, UpdateSpriteMovementDelay ; c1x1 == 2
+ jp z, UpdateSpriteMovementDelay ; [x#SPRITESTATEDATA1_MOVEMENTSTATUS] == 2
cp $3
- jp z, UpdateSpriteInWalkingAnimation ; c1x1 == 3
+ jp z, UpdateSpriteInWalkingAnimation ; [x#SPRITESTATEDATA1_MOVEMENTSTATUS] == 3
cp $4
jp z, Func_5357
ld a, [wWalkCounter]
and a
ret nz ; don't do anything yet if player is currently moving (redundant, already tested in CheckSpriteAvailability)
call InitializeSpriteScreenPosition
- ld h, wSpriteStateData2 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld h, HIGH(wSpriteStateData2)
+ ldh a, [hCurrentSpriteOffset]
add $6
ld l, a
- ld a, [hl] ; c2x6: movement byte 1
+ ld a, [hl] ; x#SPRITESTATEDATA2_MOVEMENTBYTE1
inc a
- jp z, .randomMovement ; value $FF
+ jp z, .randomMovement ; value STAY
inc a
- jp z, .randomMovement ; value $FE
+ jp z, .randomMovement ; value WALK
; scripted movement
dec a
ld [hl], a ; increment movement byte 1 (movement data index)
@@ -156,7 +156,7 @@ UpdateNPCSprite:
pop hl
ld de, wNPCMovementDirections
call LoadDEPlusA ; a = [wNPCMovementDirections + movement byte 1]
- cp $e0
+ cp NPC_CHANGE_FACING
jp z, ChangeFacingDirection
cp STAY
jr nz, .next
@@ -171,7 +171,7 @@ UpdateNPCSprite:
.next
cp WALK
jr nz, .asm_4ecb
-; current NPC movement data is $fe. this seems buggy
+; current NPC movement data is WALK ($fe). this seems buggy
ld [hl], $1 ; set movement byte 1 to $1
ld de, wNPCMovementDirections
call LoadDEPlusA ; a = [wNPCMovementDirections + $fe] (?)
@@ -188,20 +188,20 @@ UpdateNPCSprite:
.determineDirection
ld b, a
ld a, [wCurSpriteMovement2]
- cp $d0
- jr z, .moveDown ; movement byte 2 = $d0 forces down
- cp $d1
- jr z, .moveUp ; movement byte 2 = $d1 forces up
- cp $d2
- jr z, .moveLeft ; movement byte 2 = $d2 forces left
- cp $d3
- jr z, .moveRight ; movement byte 2 = $d3 forces right
+ cp DOWN
+ jr z, .moveDown
+ cp UP
+ jr z, .moveUp
+ cp LEFT
+ jr z, .moveLeft
+ cp RIGHT
+ jr z, .moveRight
ld a, b
- cp $40 ; a < $40: down (or left)
+ cp NPC_MOVEMENT_UP ; NPC_MOVEMENT_DOWN <= a < NPC_MOVEMENT_UP: down (or left)
jr nc, .notDown
ld a, [wCurSpriteMovement2]
- cp $2
- jr z, .moveLeft ; movement byte 2 = $2 only allows left or right
+ cp LEFT_RIGHT
+ jr z, .moveLeft
.moveDown
ld de, 2*SCREEN_WIDTH
add hl, de ; move tile pointer two rows down
@@ -209,11 +209,11 @@ UpdateNPCSprite:
lb bc, 4, SPRITE_FACING_DOWN
jr TryWalking
.notDown
- cp $80 ; $40 <= a < $80: up (or right)
+ cp NPC_MOVEMENT_LEFT ; NPC_MOVEMENT_UP <= a < NPC_MOVEMENT_LEFT: up (or right)
jr nc, .notUp
ld a, [wCurSpriteMovement2]
- cp $2
- jr z, .moveRight ; movement byte 2 = $2 only allows left or right
+ cp LEFT_RIGHT
+ jr z, .moveRight
.moveUp
ld de, -2*SCREEN_WIDTH
add hl, de ; move tile pointer two rows up
@@ -221,21 +221,21 @@ UpdateNPCSprite:
lb bc, 8, SPRITE_FACING_UP
jr TryWalking
.notUp
- cp $c0 ; $80 <= a < $c0: left (or up)
+ cp NPC_MOVEMENT_RIGHT ; NPC_MOVEMENT_LEFT <= a < NPC_MOVEMENT_RIGHT: left (or up)
jr nc, .notLeft
ld a, [wCurSpriteMovement2]
- cp $1
- jr z, .moveUp ; movement byte 2 = $1 only allows up or down
+ cp UP_DOWN
+ jr z, .moveUp
.moveLeft
dec hl
dec hl ; move tile pointer two columns left
lb de, 0, -1
lb bc, 2, SPRITE_FACING_LEFT
jr TryWalking
-.notLeft ; $c0 <= a: right (or down)
+.notLeft ; NPC_MOVEMENT_RIGHT <= a: right (or down)
ld a, [wCurSpriteMovement2]
- cp $1
- jr z, .moveDown ; movement byte 2 = $1 only allows up or down
+ cp UP_DOWN
+ jr z, .moveDown
.moveRight
inc hl
inc hl ; move tile pointer two columns right
@@ -262,103 +262,104 @@ TryWalking:
ld c, [hl]
call CanWalkOntoTile
pop de
- ret c
+ ret c ; cannot walk there (reinitialization of delay values already done)
call Func_5349
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
ld l, a
- ld [hl], $10 ; c1x9 (update facing direction)
+ ld [hl], $10 ; [x#SPRITESTATEDATA2_WALKANIMATIONCOUNTER] = 16
dec h
inc l
- ld [hl], $3
+ ld [hl], $3 ; x#SPRITESTATEDATA1_MOVEMENTSTATUS
jp UpdateSpriteImage
; update the walking animation parameters for a sprite that is currently walking
UpdateSpriteInWalkingAnimation:
call Func_5274
-.noNextAnimationFrame
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add $3
ld l, a
- ld a, [hli] ; c1x3 (movement Y delta)
+ ld a, [hli] ; x#SPRITESTATEDATA1_YSTEPVECTOR
ld b, a
- ld a, [hl] ; c1x4 (screen Y position)
+ ld a, [hl] ; x#SPRITESTATEDATA1_YPIXELS
add b
- ld [hli], a ; update screen Y position
- ld a, [hli] ; c1x5 (movement X delta)
+ ld [hli], a ; update [x#SPRITESTATEDATA1_YPIXELS]
+ ld a, [hli] ; x#SPRITESTATEDATA1_XSTEPVECTOR
ld b, a
- ld a, [hl] ; c1x6 (screen X position)
+ ld a, [hl] ; x#SPRITESTATEDATA1_XPIXELS
add b
- ld [hl], a ; update screen X position
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld [hl], a ; update [x#SPRITESTATEDATA1_XPIXELS]
+ ldh a, [hCurrentSpriteOffset]
ld l, a
inc h
- ld a, [hl] ; c2x0 (walk animation counter)
+ ld a, [hl] ; x#SPRITESTATEDATA2_WALKANIMATIONCOUNTER
dec a
ld [hl], a ; update walk animation counter
ret nz
ld a, $6 ; walking finished, update state
add l
ld l, a
- ld a, [hl] ; c2x6 (movement byte 1)
- cp $fe
- jr nc, .initNextMovementCounter ; values $fe and $ff
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld a, [hl] ; x#SPRITESTATEDATA2_MOVEMENTBYTE1
+ cp WALK
+ jr nc, .initNextMovementCounter ; values WALK or STAY
+ ldh a, [hCurrentSpriteOffset]
inc a
ld l, a
dec h
- ld [hl], $1 ; c1x1 = 1 (movement status ready)
+ ld [hl], $1 ; [x#SPRITESTATEDATA1_MOVEMENTSTATUS] = 1 (movement status ready)
ret
.initNextMovementCounter
call Random
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add $8
ld l, a
- ld a, [hRandomAdd]
+ ldh a, [hRandomAdd]
and $7f
- ld [hl], a ; c2x8: set next movement delay to a random value in [0,$7f]
- dec h ; note that value 0 actually makes the delay $100 (bug?)
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld [hl], a ; x#SPRITESTATEDATA2_MOVEMENTDELAY:
+ ; set next movement delay to a random value in [0,$7f]
+ ; note that value 0 actually makes the delay $100 (bug?)
+ dec h ; HIGH(wSpriteStateData1)
+ ldh a, [hCurrentSpriteOffset]
inc a
ld l, a
- ld [hl], $2 ; c1x1 = 2 (movement status)
+ ld [hl], $2 ; [x#SPRITESTATEDATA1_MOVEMENTSTATUS] = 2 (movement status)
inc l
inc l
xor a
- ld b, [hl] ; c1x3 (movement Y delta)
- ld [hli], a ; reset movement Y delta
+ ld b, [hl] ; x#SPRITESTATEDATA1_YSTEPVECTOR
+ ld [hli], a ; [x#SPRITESTATEDATA1_YSTEPVECTOR] = 0
inc l
- ld c, [hl] ; c1x5 (movement X delta)
- ld [hl], a ; reset movement X delta
+ ld c, [hl] ; x#SPRITESTATEDATA1_XSTEPVECTOR
+ ld [hl], a ; [x#SPRITESTATEDATA1_XSTEPVECTOR] = 0
ret
-; update delay value (c2x8) for sprites in the delayed state (c1x1)
+; update [x#SPRITESTATEDATA2_MOVEMENTDELAY] for sprites in the delayed state (x#SPRITESTATEDATA1_MOVEMENTSTATUS)
UpdateSpriteMovementDelay:
- ld h, $c2
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld h, HIGH(wSpriteStateData2)
+ ldh a, [hCurrentSpriteOffset]
add $6
ld l, a
- ld a, [hl] ; c2x6: movement byte 1
+ ld a, [hl] ; x#SPRITESTATEDATA2_MOVEMENTBYTE1
inc l
inc l
- cp $fe
- jr nc, .tickMoveCounter ; values $fe or $ff
+ cp WALK
+ jr nc, .tickMoveCounter ; values WALK or STAY
ld [hl], $0
jr .moving
.tickMoveCounter
- dec [hl] ; c2x8: frame counter until next movement
+ dec [hl] ; x#SPRITESTATEDATA2_MOVEMENTDELAY
jr nz, notYetMoving
.moving
dec h
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
inc a
ld l, a
- ld [hl], $1 ; c1x1 = 1 (mark as ready to move)
+ ld [hl], $1 ; [x#SPRITESTATEDATA1_MOVEMENTSTATUS] = 1 (mark as ready to move)
notYetMoving:
- ld h, wSpriteStateData1 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
- add $8
+ ld h, HIGH(wSpriteStateData1)
+ ldh a, [hCurrentSpriteOffset]
+ add SPRITESTATEDATA1_ANIMFRAMECOUNTER
ld l, a
- ld [hl], $0 ; c1x8 = 0 (walk animation frame)
+ ld [hl], $0 ; [x#SPRITESTATEDATA1_ANIMFRAMECOUNTER] = 0 (walk animation frame)
jp UpdateSpriteImage
MakeNPCFacePlayer:
@@ -388,48 +389,48 @@ MakeNPCFacePlayer:
.notFacingRight
ld c, SPRITE_FACING_LEFT
.facingDirectionDetermined
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add $9
ld l, a
- ld [hl], c ; c1x9: set facing direction
+ ld [hl], c ; [x#SPRITESTATEDATA1_FACINGDIRECTION]: set facing direction
jr notYetMoving
InitializeSpriteStatus:
- ld [hl], $1 ; $c1x1: set movement status to ready
+ ld [hl], $1 ; [x#SPRITESTATEDATA1_MOVEMENTSTATUS] = ready
inc l
- ld [hl], $ff ; $c1x2: set sprite image to $ff (invisible/off screen)
- inc h
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld [hl], $ff ; [x#SPRITESTATEDATA1_IMAGEINDEX] = invisible/off screen
+ inc h ; HIGH(wSpriteStateData2)
+ ldh a, [hCurrentSpriteOffset]
add $2
ld l, a
ld a, $8
- ld [hli], a ; $c2x2: set Y displacement to 8
- ld [hl], a ; $c2x3: set X displacement to 8
+ ld [hli], a ; [x#SPRITESTATEDATA2_YDISPLACEMENT] = 8
+ ld [hl], a ; [x#SPRITESTATEDATA2_XDISPLACEMENT] = 8
call InitializeSpriteScreenPosition ; could have done fallthrough here
ret
-; calculates the sprite's screen position form its map position and the player position
+; calculates the sprite's screen position from its map position and the player position
InitializeSpriteScreenPosition:
- ld h, wSpriteStateData2 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
- add $4
+ ld h, HIGH(wSpriteStateData2)
+ ldh a, [hCurrentSpriteOffset]
+ add SPRITESTATEDATA2_MAPY
ld l, a
ld a, [wYCoord]
ld b, a
- ld a, [hl] ; c2x4 (Y position + 4)
+ ld a, [hl] ; x#SPRITESTATEDATA2_MAPY
sub b ; relative to player position
call Func_5033
sub $4 ; - 4
dec h
- ld [hli], a ; c1x4 (screen Y position)
+ ld [hli], a ; [x#SPRITESTATEDATA1_YPIXELS]
inc h
ld a, [wXCoord]
ld b, a
- ld a, [hli] ; c2x6 (X position + 4)
+ ld a, [hli] ; x#SPRITESTATEDATA2_MAPX
sub b ; relative to player position
call Func_5033
dec h
- ld [hl], a ; c1x6 (screen X position)
+ ld [hl], a ; [x#SPRITESTATEDATA1_XPIXELS]
ret
Func_5033:
@@ -447,35 +448,35 @@ Func_5033:
; tests if sprite is off screen or otherwise unable to do anything
CheckSpriteAvailability:
predef IsObjectHidden
- ld a, [$ffe5]
+ ldh a, [hIsHiddenMissableObject]
and a
jp nz, .spriteInvisible
- ld h, wSpriteStateData2 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
- add $6
+ ld h, HIGH(wSpriteStateData2)
+ ldh a, [hCurrentSpriteOffset]
+ add SPRITESTATEDATA2_MOVEMENTBYTE1
ld l, a
- ld a, [hl] ; c2x6: movement byte 1
- cp $fe
- jr c, .skipXVisibilityTest ; movement byte 1 < $fe (i.e. the sprite's movement is scripted)
- ld a, [H_CURRENTSPRITEOFFSET]
- add $4
+ ld a, [hl] ; x#SPRITESTATEDATA2_MOVEMENTBYTE1
+ cp WALK
+ jr c, .skipXVisibilityTest ; movement byte 1 < WALK (i.e. the sprite's movement is scripted)
+ ldh a, [hCurrentSpriteOffset]
+ add SPRITESTATEDATA2_MAPY
ld l, a
- ld b, [hl] ; c2x4: Y pos (+4)
+ ld b, [hl] ; x#SPRITESTATEDATA2_MAPY
ld a, [wYCoord]
cp b
jr z, .skipYVisibilityTest
jr nc, .spriteInvisible ; above screen region
- add $8 ; screen is 9 tiles high
+ add SCREEN_HEIGHT / 2 - 1
cp b
jr c, .spriteInvisible ; below screen region
.skipYVisibilityTest
inc l
- ld b, [hl] ; c2x5: X pos (+4)
+ ld b, [hl] ; x#SPRITESTATEDATA2_MAPX
ld a, [wXCoord]
cp b
jr z, .skipXVisibilityTest
jr nc, .spriteInvisible ; left of screen region
- add $9 ; screen is 10 tiles wide
+ add SCREEN_WIDTH / 2 - 1
cp b
jr c, .spriteInvisible ; right of screen region
.skipXVisibilityTest
@@ -489,7 +490,7 @@ CheckSpriteAvailability:
ld a, [hld]
cp d
jr nc, .spriteInvisible ; standing on tile with ID >=MAP_TILESET_SIZE (bottom right tile)
- ld bc, -20
+ ld bc, -SCREEN_WIDTH
add hl, bc ; go back one row of tiles
ld a, [hli]
cp d
@@ -498,11 +499,11 @@ CheckSpriteAvailability:
cp d
jr c, .spriteVisible ; standing on tile with ID >=MAP_TILESET_SIZE (top right tile)
.spriteInvisible
- ld h, wSpriteStateData1 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
- add $2
+ ld h, HIGH(wSpriteStateData1)
+ ldh a, [hCurrentSpriteOffset]
+ add SPRITESTATEDATA1_IMAGEINDEX
ld l, a
- ld [hl], $ff ; c1x2
+ ld [hl], $ff ; x#SPRITESTATEDATA1_IMAGEINDEX
scf
jr .done
.spriteVisible
@@ -512,37 +513,37 @@ CheckSpriteAvailability:
jr nz, .done ; if player is currently walking, we're done
call UpdateSpriteImage
inc h
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add $7
ld l, a
ld a, [wGrassTile]
cp c
- ld a, $0
+ ld a, 0
jr nz, .notInGrass
- ld a, $80
+ ld a, OAM_BEHIND_BG
.notInGrass
- ld [hl], a ; c2x7
+ ld [hl], a ; x#SPRITESTATEDATA2_GRASSPRIORITY
and a
.done
ret
UpdateSpriteImage:
- ld h, $c1
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld h, HIGH(wSpriteStateData1)
+ ldh a, [hCurrentSpriteOffset]
add $8
ld l, a
- ld a, [hli] ; c1x8: walk animation frame
+ ld a, [hli] ; x#SPRITESTATEDATA1_ANIMFRAMECOUNTER
ld b, a
- ld a, [hl] ; c1x9: facing direction
+ ld a, [hl] ; x#SPRITESTATEDATA1_FACINGDIRECTION
add b
ld b, a
- ld a, [$ff93] ; current sprite offset
+ ldh a, [hTilePlayerStandingOn]
add b
ld b, a
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add $2
ld l, a
- ld [hl], b ; c1x2: sprite to display
+ ld [hl], b ; x#SPRITESTATEDATA1_IMAGEINDEX
ret
; tests if sprite can walk the specified direction
@@ -552,37 +553,37 @@ UpdateSpriteImage:
; e: X movement delta (-1, 0 or 1)
; set carry on failure, clears carry on success
CanWalkOntoTile:
- ld h, wSpriteStateData2 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
- add $6
+ ld h, HIGH(wSpriteStateData2)
+ ldh a, [hCurrentSpriteOffset]
+ add SPRITESTATEDATA2_MOVEMENTBYTE1
ld l, a
- ld a, [hl] ; c2x6 (movement byte 1)
- cp $fe
- jr nc, .notScripted ; values $fe and $ff
+ ld a, [hl] ; x#SPRITESTATEDATA2_MOVEMENTBYTE1
+ cp WALK
+ jr nc, .notScripted ; values WALK or STAY
; always allow walking if the movement is scripted
and a
ret
.notScripted
call _IsTilePassable
jr c, .impassable
- ld h, wSpriteStateData2 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld h, HIGH(wSpriteStateData2)
+ ldh a, [hCurrentSpriteOffset]
add $6
ld l, a
- ld a, [hl] ; $c2x6 (movement byte 1)
+ ld a, [hl] ; x#SPRITESTATEDATA2_MOVEMENTBYTE1
inc a
jr z, .impassable ; if $ff, no movement allowed (however, changing direction is)
- ld h, wSpriteStateData1 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
- add $4
+ ld h, HIGH(wSpriteStateData1)
+ ldh a, [hCurrentSpriteOffset]
+ add SPRITESTATEDATA1_YPIXELS
ld l, a
- ld a, [hli] ; c1x4 (screen Y pos)
+ ld a, [hli] ; x#SPRITESTATEDATA1_YPIXELS
add $4 ; align to blocks (Y pos is always 4 pixels off)
add d ; add Y delta
cp $80 ; if value is >$80, the destination is off screen (either $81 or $FF underflow)
jr nc, .impassable ; don't walk off screen
inc l
- ld a, [hl] ; c1x6 (screen X pos)
+ ld a, [hl] ; x#SPRITESTATEDATA1_XPIXELS
add e ; add X delta
cp $90 ; if value is >$90, the destination is off screen (either $91 or $FF underflow)
jr nc, .impassable ; don't walk off screen
@@ -597,30 +598,36 @@ CanWalkOntoTile:
ld [wUpdateSpritesEnabled], a
pop bc
pop de
- ld h, wSpriteStateData1 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld h, HIGH(wSpriteStateData1)
+ ldh a, [hCurrentSpriteOffset]
add $c
ld l, a
- ld a, [hl] ; c1xc (directions in which sprite collision would occur)
+ ld a, [hl] ; x#SPRITESTATEDATA1_COLLISIONDATA (directions in which sprite collision would occur)
and b ; check against chosen direction (1,2,4 or 8)
jr nz, .impassable ; collision between sprites, don't go there
- ld h, wSpriteStateData2 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
- add $2
+ ld h, HIGH(wSpriteStateData2)
+ ldh a, [hCurrentSpriteOffset]
+ add SPRITESTATEDATA2_YDISPLACEMENT
ld l, a
- ld a, [hli] ; c2x2 (sprite Y displacement, initialized at $8, keep track of where a sprite did go)
+ ld a, [hli] ; x#SPRITESTATEDATA2_YDISPLACEMENT (initialized at $8, keep track of where a sprite did go)
bit 7, d ; check if going upwards (d=$ff)
jr nz, .upwards
add d
+ ; bug: these tests against $5 probably were supposed to prevent
+ ; sprites from walking out too far, but this line makes sprites get
+ ; stuck whenever they walked upwards 5 steps
+ ; on the other hand, the amount a sprite can walk out to the
+ ; right of bottom is not limited (until the counter overflows)
+ ; this was fixed in Yellow
cp $5
- ;jr c, .impassable (bugfix) ; if c2x2+d < 5, don't go ;bug: this tests probably were supposed to prevent sprites
- jr .checkHorizontal ; from walking out too far, but this line makes sprites get stuck
-.upwards ; whenever they walked upwards 5 steps
- sub $1 ; on the other hand, the amount a sprite can walk out to the
- jr c, .impassable ; if d2x2 == 0, don't go ; right of bottom is not limited (until the counter overflows)
+ ;jr c, .impassable ; if [x#SPRITESTATEDATA2_YDISPLACEMENT]+d < 5, don't go
+ jr .checkHorizontal
+.upwards
+ sub $1
+ jr c, .impassable ; if [x#SPRITESTATEDATA2_YDISPLACEMENT] == 0, don't go
.checkHorizontal
ld d, a
- ld a, [hl] ; c2x3 (sprite X displacement, initialized at $8, keep track of where a sprite did go)
+ ld a, [hl] ; x#SPRITESTATEDATA2_XDISPLACEMENT (initialized at $8, keep track of where a sprite did go)
bit 7, e ; check if going left (e=$ff)
jr nz, .left
add e
@@ -628,32 +635,32 @@ CanWalkOntoTile:
jr .passable
.left
sub $1
- jr c, .impassable ; if d2x3 == 0, don't go
+ jr c, .impassable ; if [x#SPRITESTATEDATA2_XDISPLACEMENT] == 0, don't go
.passable
- ld [hld], a ; update c2x3
- ld [hl], d ; update c2x2
+ ld [hld], a ; update x#SPRITESTATEDATA2_XDISPLACEMENT
+ ld [hl], d ; update x#SPRITESTATEDATA2_YDISPLACEMENT
and a ; clear carry (marking success)
ret
.impassable
- ld h, wSpriteStateData1 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld h, HIGH(wSpriteStateData1)
+ ldh a, [hCurrentSpriteOffset]
inc a
ld l, a
- ld [hl], $2 ; c1x1 = 2 (set movement status to delayed)
+ ld [hl], $2 ; [x#SPRITESTATEDATA1_MOVEMENTSTATUS] = 2 (delayed)
inc l
inc l
xor a
- ld [hli], a ; c1x3 = 0 (clear Y movement delta)
+ ld [hli], a ; [x#SPRITESTATEDATA1_YSTEPVECTOR] = 0
inc l
- ld [hl], a ; c1x5 = 0 (clear X movement delta)
+ ld [hl], a ; [x#SPRITESTATEDATA1_XSTEPVECTOR] = 0
inc h
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add $8
ld l, a
call Random
- ld a, [hRandomAdd]
+ ldh a, [hRandomAdd]
and $7f
- ld [hl], a ; c2x8: set next movement delay to a random value in [0,$7f] (again with delay $100 if value is 0)
+ ld [hl], a ; x#SPRITESTATEDATA2_MOVEMENTDELAY: set to a random value in [0,$7f] (again with delay $100 if value is 0)
scf ; set carry (marking failure to walk)
ret
@@ -661,25 +668,25 @@ CanWalkOntoTile:
; this is always the lower left tile of the 2x2 tile blocks all sprites are snapped to
; hl: output pointer
GetTileSpriteStandsOn:
- ld h, wSpriteStateData1 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
- add $4
+ ld h, HIGH(wSpriteStateData1)
+ ldh a, [hCurrentSpriteOffset]
+ add SPRITESTATEDATA1_YPIXELS
ld l, a
- ld a, [hli] ; c1x4: screen Y position
+ ld a, [hli] ; x#SPRITESTATEDATA1_YPIXELS
add $4 ; align to 2*2 tile blocks (Y position is always off 4 pixels to the top)
and $f8 ; in case object is currently moving (XXX why changed to $f8?)
srl a ; screen Y tile * 4
ld c, a
ld b, $0
inc l
- ld a, [hl] ; c1x6: screen X position
+ ld a, [hl] ; x#SPRITESTATEDATA1_XPIXELS
srl a
srl a
srl a ; screen X tile
add SCREEN_WIDTH ; screen X tile + 20
ld d, $0
ld e, a
- coord hl, 0, 0
+ hlcoord 0, 0
add hl, bc
add hl, bc
add hl, bc
@@ -754,7 +761,7 @@ DoScriptedNPCMovement:
ld a, [hl]
add b
ld [hl], a
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add $9
ld l, a
ld a, c
@@ -777,17 +784,17 @@ InitScriptedNPCMovement:
jp AnimScriptedNPCMovement
GetSpriteScreenYPointer:
- ld a, $4
+ ld a, SPRITESTATEDATA1_YPIXELS
ld b, a
jr GetSpriteScreenXYPointerCommon
GetSpriteScreenXPointer:
- ld a, $6
+ ld a, SPRITESTATEDATA1_XPIXELS
ld b, a
GetSpriteScreenXYPointerCommon:
ld hl, wSpriteStateData1
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add l
add b
ld l, a
@@ -795,16 +802,16 @@ GetSpriteScreenXYPointerCommon:
AnimScriptedNPCMovement:
ld hl, wSpriteStateData2
- ld a, [H_CURRENTSPRITEOFFSET]
- add $e
+ ldh a, [hCurrentSpriteOffset]
+ add SPRITESTATEDATA2_IMAGEBASEOFFSET
ld l, a
ld a, [hl] ; VRAM slot
dec a
swap a
ld b, a
ld hl, wSpriteStateData1
- ld a, [H_CURRENTSPRITEOFFSET]
- add $9
+ ldh a, [hCurrentSpriteOffset]
+ add SPRITESTATEDATA1_FACINGDIRECTION
ld l, a
ld a, [hl] ; facing direction
cp SPRITE_FACING_DOWN
@@ -819,42 +826,42 @@ AnimScriptedNPCMovement:
.anim
add b
ld b, a
- ld [hSpriteVRAMSlotAndFacing], a
+ ldh [hSpriteVRAMSlotAndFacing], a
call AdvanceScriptedNPCAnimFrameCounter
ld hl, wSpriteStateData1
- ld a, [H_CURRENTSPRITEOFFSET]
- add $2
+ ldh a, [hCurrentSpriteOffset]
+ add SPRITESTATEDATA1_IMAGEINDEX
ld l, a
- ld a, [hSpriteVRAMSlotAndFacing]
+ ldh a, [hSpriteVRAMSlotAndFacing]
ld b, a
- ld a, [hSpriteAnimFrameCounter]
+ ldh a, [hSpriteAnimFrameCounter]
add b
ld [hl], a
ret
AdvanceScriptedNPCAnimFrameCounter:
call Func_5274
- ld h, wSpriteStateData1 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld h, HIGH(wSpriteStateData1)
+ ldh a, [hCurrentSpriteOffset]
add $8
ld l, a
ld a, [hl] ; intra-animation frame counter
and $3
- ld [hSpriteAnimFrameCounter], a
+ ldh [hSpriteAnimFrameCounter], a
ret
Func_5274:
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add $7
ld l, a
- ld h, wSpriteStateData1 / $100
- ld a, [hl] ; c1x7 (counter until next walk animation frame)
+ ld h, HIGH(wSpriteStateData1)
+ ld a, [hl] ; x#SPRITESTATEDATA1_INTRAANIMFRAMECOUNTER
inc a
and $3
- ld [hl], a ; c1x7 += 1
- ret nz ; c1x7 = 0
+ ld [hl], a ; [x#SPRITESTATEDATA1_INTRAANIMFRAMECOUNTER]++
+ ret nz
inc l
- ld a, [hl] ; c1x8 (walk animation frame)
+ ld a, [hl] ; x#SPRITESTATEDATA1_ANIMFRAMECOUNTER
inc a
and $3
ld [hl], a ; advance to next animation frame every 4 ticks (16 ticks total for one step)
@@ -924,7 +931,7 @@ Func_5288:
.asm_52e6
call Func_5337
call Func_5349
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
ld l, a
ld [hl], $8
dec h
@@ -936,7 +943,7 @@ Func_5288:
.asm_52fa
call Func_5337
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
ld l, a
ld [hl], $8
dec h
@@ -949,7 +956,7 @@ Func_5288:
.asm_530b
call Func_5337
call Func_5349
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
ld l, a
ld [hl], $8
dec h
@@ -980,39 +987,39 @@ Func_5331:
ret
Func_5337:
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add $9
ld l, a
- ld h, wSpriteStateData1 / $100
- ld [hl], c ; c1x9 (update facing direction)
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld h, HIGH(wSpriteStateData1)
+ ld [hl], c ; x#SPRITESTATEDATA1_FACINGDIRECTION
+ ldh a, [hCurrentSpriteOffset]
add $3
ld l, a
- ld [hl], d ; c1x3 (update Y movement delta)
+ ld [hl], d ; x#SPRITESTATEDATA1_YSTEPVECTOR
inc l
inc l
- ld [hl], e ; c1x5 (update X movement delta)
+ ld [hl], e ; x#SPRITESTATEDATA1_XSTEPVECTOR
ret
Func_5349:
- ld h, wSpriteStateData2 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld h, HIGH(wSpriteStateData2)
+ ldh a, [hCurrentSpriteOffset]
add $4
ld l, a
- ld a, [hl] ; c2x4: Y position
+ ld a, [hl] ; x#SPRITESTATEDATA2_MAPY
add d
ld [hli], a ; update Y position
- ld a, [hl] ; c2x5: X position
+ ld a, [hl] ; x#SPRITESTATEDATA2_MAPX
add e
ld [hl], a ; update X position
ret
Func_5357:
call Func_5274
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add $3
ld l, a
- ld h, wSpriteStateData1 / $100
+ ld h, HIGH(wSpriteStateData1)
ld a, [hli]
add a
ld b, a
@@ -1025,9 +1032,9 @@ Func_5357:
ld a, [hl]
add b
ld [hl], a
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
ld l, a
- ld h, wSpriteStateData2 / $100
+ ld h, HIGH(wSpriteStateData2)
dec [hl]
ret nz
ld a, $6
@@ -1036,23 +1043,23 @@ Func_5357:
ld a, [hl]
cp $fe
jr nc, .asm_5386
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
inc a
ld l, a
- ld h, wSpriteStateData1 / $100
+ ld h, HIGH(wSpriteStateData1)
ld [hl], $1
ret
.asm_5386
call Random
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add $8
ld l, a
- ld h, wSpriteStateData2 / $100
- ld a, [hRandomAdd]
+ ld h, HIGH(wSpriteStateData2)
+ ldh a, [hRandomAdd]
and $7f
ld [hl], a
dec h
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
inc a
ld l, a
ld [hl], $2
diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm
deleted file mode 100755
index 670cb121..00000000
--- a/engine/overworld/npc_movement.asm
+++ /dev/null
@@ -1,270 +0,0 @@
-PlayerStepOutFromDoor:
- ld hl, wd730
- res 1, [hl]
- call IsPlayerStandingOnDoorTile
- jr nc, .notStandingOnDoor
- ld a, $fc
- ld [wJoyIgnore], a
- ld hl, wd736
- set 1, [hl]
- ld a, $1
- ld [wSimulatedJoypadStatesIndex], a
- ld a, D_DOWN
- ld [wSimulatedJoypadStatesEnd], a
- xor a
- ld [wSpriteStateData1 + 2], a
- call StartSimulatingJoypadStates
- ret
-.notStandingOnDoor
- xor a
- ld [wWastedByteCD3A], a
- ld [wSimulatedJoypadStatesIndex], a
- ld [wSimulatedJoypadStatesEnd], a
- ld hl, wd736
- res 0, [hl]
- res 1, [hl]
- ld hl, wd730
- res 7, [hl]
- ret
-
-_EndNPCMovementScript:
- ld hl, wd730
- res 7, [hl]
- ld hl, wd72e
- res 7, [hl]
- ld hl, wd736
- res 0, [hl]
- res 1, [hl]
- xor a
- ld [wNPCMovementScriptSpriteOffset], a
- ld [wNPCMovementScriptFunctionNum], a
- ld [wNPCMovementScriptPointerTableNum], a
- ld [wWastedByteCD3A], a
- ld [wSimulatedJoypadStatesIndex], a
- ld [wSimulatedJoypadStatesEnd], a
- ret
-
-PalletMovementScriptPointerTable:
- dw PalletMovementScript_OakMoveLeft
- dw PalletMovementScript_PlayerMoveLeft
- dw PalletMovementScript_WaitAndWalkToLab
- dw PalletMovementScript_WalkToLab
- dw PalletMovementScript_Done
-
-PalletMovementScript_OakMoveLeft:
- ld a, [wXCoord]
- sub $a
- ld [wNumStepsToTake], a
- jr z, .playerOnLeftTile
-; The player is on the right tile of the northern path out of Pallet Town and
-; Prof. Oak is below.
-; Make Prof. Oak step to the left.
- ld b, 0
- ld c, a
- ld hl, wNPCMovementDirections2
- ld a, NPC_MOVEMENT_LEFT
- call FillMemory
- ld [hl], $ff
- ld a, [wSpriteIndex]
- ld [H_SPRITEINDEX], a
- ld de, wNPCMovementDirections2
- call MoveSprite
- ld a, $1
- ld [wNPCMovementScriptFunctionNum], a
- jr .done
-; The player is on the left tile of the northern path out of Pallet Town and
-; Prof. Oak is below.
-; Prof. Oak is already where he needs to be.
-.playerOnLeftTile
- ld a, $3
- ld [wNPCMovementScriptFunctionNum], a
-.done
- ld a, BANK(Music_MuseumGuy)
- ld c, a
- ld a, MUSIC_MUSEUM_GUY
- call PlayMusic
- ld hl, wFlags_D733
- set 1, [hl]
- ld a, $fc
- ld [wJoyIgnore], a
- ret
-
-PalletMovementScript_PlayerMoveLeft:
- ld a, [wd730]
- bit 0, a ; is an NPC being moved by a script?
- ret nz ; return if Oak is still moving
- ld a, [wNumStepsToTake]
- ld [wSimulatedJoypadStatesIndex], a
- ld [hNPCMovementDirections2Index], a
- predef ConvertNPCMovementDirectionsToJoypadMasks
- call StartSimulatingJoypadStates
- ld a, $2
- ld [wNPCMovementScriptFunctionNum], a
- ret
-
-PalletMovementScript_WaitAndWalkToLab:
- ld a, [wSimulatedJoypadStatesIndex]
- and a ; is the player done moving left yet?
- ret nz
-
-PalletMovementScript_WalkToLab:
- xor a
- ld [wOverrideSimulatedJoypadStatesMask], a
- ld a, [wSpriteIndex]
- swap a
- ld [wNPCMovementScriptSpriteOffset], a
- xor a
- ld [wSpriteStateData2 + $06], a
- ld hl, wSimulatedJoypadStatesEnd
- ld de, RLEList_PlayerWalkToLab
- call DecodeRLEList
- dec a
- ld [wSimulatedJoypadStatesIndex], a
- ld hl, wNPCMovementDirections2
- ld de, RLEList_ProfOakWalkToLab
- call DecodeRLEList
- ld hl, wd72e
- res 7, [hl]
- ld hl, wd730
- set 7, [hl]
- ld a, $4
- ld [wNPCMovementScriptFunctionNum], a
- ret
-
-
-RLEList_ProfOakWalkToLab:
- db NPC_MOVEMENT_DOWN, $06 ; differs from red
- db NPC_MOVEMENT_LEFT, $01
- db NPC_MOVEMENT_DOWN, $05
- db NPC_MOVEMENT_RIGHT, $03
- db NPC_MOVEMENT_UP, $01
- db $E0, $01 ; stand still
- db $FF
-
-RLEList_PlayerWalkToLab:
- db D_UP, $02
- db D_RIGHT, $03
- db D_DOWN, $05
- db D_LEFT, $01
- db D_DOWN, $07 ; differs from red
- db $FF
-
-PalletMovementScript_Done:
- ld a, [wSimulatedJoypadStatesIndex]
- and a
- ret nz
- ld a, HS_PALLET_TOWN_OAK
- ld [wMissableObjectIndex], a
- predef HideObject
- ld hl, wd730
- res 7, [hl]
- ld hl, wd72e
- res 7, [hl]
- jp EndNPCMovementScript
-
-PewterMuseumGuyMovementScriptPointerTable:
- dw PewterMovementScript_WalkToMuseum
- dw PewterMovementScript_Done
-
-PewterMovementScript_WalkToMuseum:
- ld a, BANK(Music_MuseumGuy)
- ld c, a
- ld a, MUSIC_MUSEUM_GUY
- call PlayMusic
- ld a, [wSpriteIndex]
- swap a
- ld [wNPCMovementScriptSpriteOffset], a
- call StartSimulatingJoypadStates
- ld hl, wSimulatedJoypadStatesEnd
- ld de, RLEList_PewterMuseumPlayer
- call DecodeRLEList
- dec a
- ld [wSimulatedJoypadStatesIndex], a
- xor a
- ld [wWhichPewterGuy], a
- call PewterGuys
- ld hl, wNPCMovementDirections2
- ld de, RLEList_PewterMuseumGuy
- call DecodeRLEList
- ld hl, wd72e
- res 7, [hl]
- ld a, $1
- ld [wNPCMovementScriptFunctionNum], a
- ret
-
-RLEList_PewterMuseumPlayer:
- db 0, $01
- db D_UP, $03
- db D_LEFT, $0D
- db D_UP, $06
- db $FF
-
-RLEList_PewterMuseumGuy:
- db NPC_MOVEMENT_UP, $06
- db NPC_MOVEMENT_LEFT, $0D
- db NPC_MOVEMENT_UP, $03
- db NPC_MOVEMENT_LEFT, $01
- db $FF
-
-PewterMovementScript_Done:
- ld a, [wSimulatedJoypadStatesIndex]
- and a
- ret nz
- ld hl, wd730
- res 7, [hl]
- ld hl, wd72e
- res 7, [hl]
- jp EndNPCMovementScript
-
-PewterGymGuyMovementScriptPointerTable:
- dw PewterMovementScript_WalkToGym
- dw PewterMovementScript_Done
-
-PewterMovementScript_WalkToGym:
- ld a, BANK(Music_MuseumGuy)
- ld c, a
- ld a, MUSIC_MUSEUM_GUY
- call PlayMusic
- ld a, [wSpriteIndex]
- swap a
- ld [wNPCMovementScriptSpriteOffset], a
- xor a
- ld [wSpriteStateData2 + $06], a
- ld hl, wSimulatedJoypadStatesEnd
- ld de, RLEList_PewterGymPlayer
- call DecodeRLEList
- dec a
- ld [wSimulatedJoypadStatesIndex], a
- ld a, 1
- ld [wWhichPewterGuy], a
- call PewterGuys
- ld hl, wNPCMovementDirections2
- ld de, RLEList_PewterGymGuy
- call DecodeRLEList
- ld hl, wd72e
- res 7, [hl]
- ld hl, wd730
- set 7, [hl]
- ld a, $1
- ld [wNPCMovementScriptFunctionNum], a
- ret
-
-RLEList_PewterGymPlayer:
- db 0, $01
- db D_RIGHT, $02
- db D_DOWN, $05
- db D_LEFT, $0B
- db D_UP, $05
- db D_LEFT, $0F
- db $FF
-
-RLEList_PewterGymGuy:
- db NPC_MOVEMENT_DOWN, $02
- db NPC_MOVEMENT_LEFT, $0F
- db NPC_MOVEMENT_UP, $05
- db NPC_MOVEMENT_LEFT, $0B
- db NPC_MOVEMENT_DOWN, $05
- db NPC_MOVEMENT_RIGHT, $03
- db $FF
-
-INCLUDE "engine/overworld/pewter_guys.asm"
diff --git a/engine/overworld/npc_movement_2.asm b/engine/overworld/npc_movement_2.asm
index 93d1afce..2ced9da6 100755
--- a/engine/overworld/npc_movement_2.asm
+++ b/engine/overworld/npc_movement_2.asm
@@ -1,4 +1,4 @@
-FreezeEnemyTrainerSprite:
+FreezeEnemyTrainerSprite::
ld a, [wCurMap]
cp POKEMON_TOWER_7F
ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't freeze them
@@ -7,18 +7,18 @@ FreezeEnemyTrainerSprite:
ld b, a
.loop
ld a, [hli]
- cp $ff
+ cp -1
jr z, .notRival
cp b
ret z ; the rival leaves after battling, so don't freeze him
jr .loop
.notRival
ld a, [wSpriteIndex]
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
jp SetSpriteMovementBytesToFF
RivalIDs:
- db OPP_SONY1
- db OPP_SONY2
- db OPP_SONY3
- db $ff
+ db OPP_RIVAL1
+ db OPP_RIVAL2
+ db OPP_RIVAL3
+ db -1 ; end
diff --git a/engine/overworld/oaks_aide.asm b/engine/overworld/oaks_aide.asm
deleted file mode 100755
index f5068fda..00000000
--- a/engine/overworld/oaks_aide.asm
+++ /dev/null
@@ -1,71 +0,0 @@
-OaksAideScript:
- ld hl, OaksAideHiText
- call PrintText
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- and a
- jr nz, .choseNo
- ld hl, wPokedexOwned
- ld b, wPokedexOwnedEnd - wPokedexOwned
- call CountSetBits
- ld a, [wNumSetBits]
- ld [hOaksAideNumMonsOwned], a
- ld b, a
- ld a, [hOaksAideRequirement]
- cp b
- jr z, .giveItem
- jr nc, .notEnoughOwnedMons
-.giveItem
- ld hl, OaksAideHereYouGoText
- call PrintText
- ld a, [hOaksAideRewardItem]
- ld b, a
- ld c, 1
- call GiveItem
- jr nc, .bagFull
- ld hl, OaksAideGotItemText
- call PrintText
- ld a, $1
- jr .done
-.bagFull
- ld hl, OaksAideNoRoomText
- call PrintText
- xor a
- jr .done
-.notEnoughOwnedMons
- ld hl, OaksAideUhOhText
- call PrintText
- ld a, $80
- jr .done
-.choseNo
- ld hl, OaksAideComeBackText
- call PrintText
- ld a, $ff
-.done
- ld [hOaksAideResult], a
- ret
-
-OaksAideHiText:
- TX_FAR _OaksAideHiText
- db "@"
-
-OaksAideUhOhText:
- TX_FAR _OaksAideUhOhText
- db "@"
-
-OaksAideComeBackText:
- TX_FAR _OaksAideComeBackText
- db "@"
-
-OaksAideHereYouGoText:
- TX_FAR _OaksAideHereYouGoText
- db "@"
-
-OaksAideGotItemText:
- TX_FAR _OaksAideGotItemText
- TX_SFX_ITEM_1
- db "@"
-
-OaksAideNoRoomText:
- TX_FAR _OaksAideNoRoomText
- db "@"
diff --git a/engine/overworld/oam.asm b/engine/overworld/oam.asm
deleted file mode 100644
index 5a831327..00000000
--- a/engine/overworld/oam.asm
+++ /dev/null
@@ -1,232 +0,0 @@
-PrepareOAMData:
-; Determine OAM data for currently visible
-; sprites and write it to wOAMBuffer.
-; Yellow code has been changed to use registers more efficiently
-; as well as tweaking the code to show gbc palettes
-
- ld a, [wUpdateSpritesEnabled]
- dec a
- jr z, .updateEnabled
-
- cp -1
- ret nz
- ld [wUpdateSpritesEnabled], a
- jp HideSprites
-
-.updateEnabled
- xor a
- ld [hOAMBufferOffset], a
-
-.spriteLoop
- ld [hSpriteOffset2], a
-
- ld e, a
- ld d, wSpriteStateData1 / $100
-
- ld a, [de] ; c1x0
- and a
- jp z, .nextSprite
-
- inc e
- inc e
- ld a, [de] ; c1x2 (facing/anim)
- ld [wd5cd], a
- cp $ff ; off-screen (don't draw)
- jr nz, .visible
-
- call GetSpriteScreenXY
- jr .nextSprite
-
-.visible
- cp $a0 ; is the sprite unchanging like an item ball or boulder?
- jr c, .usefacing
-
-; unchanging
- ld a, $0
- jr .next
-
-.usefacing
- and $f
-
-.next
-; read the entry from the table
- ld c, a
- ld b, 0
- ld hl, SpriteFacingAndAnimationTable
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
-; get sprite priority
- push de
- inc d
- ld a, e
- add $5
- ld e, a
- ld a, [de] ; c2x7
- and $80
- ld [hSpritePriority], a ; temp store sprite priority
- pop de
-
-
- call GetSpriteScreenXY
-
- ld a, [hOAMBufferOffset]
- add [hl]
- cp $a0
- jr z, .hidden
- jr nc, .asm_4a41
-.hidden
- call Func_4a7b
- ld [wd5cd], a
- ld a, [hOAMBufferOffset]
-
- ld e, a
- ld d, wOAMBuffer / $100
-
-.tileLoop
- ld a, [hli]
- ld c, a
-.loop
- ld a, [hSpriteScreenY] ; temp for sprite Y position
- add $10 ; Y=16 is top of screen (Y=0 is invisible)
- add [hl] ; add Y offset from table
- ld [de], a ; write new sprite OAM Y position
- inc hl
- inc e
- ld a, [hSpriteScreenX] ; temp for sprite X position
- add $8 ; X=8 is left of screen (X=0 is invisible)
- add [hl] ; add X offset from table
- ld [de], a
- inc hl
- inc e
- ld a, [wd5cd]
- add [hl]
- cp $80
- jr c, .asm_4a1c
- ld b, a
- ld a, [$fffc]
- add b
-.asm_4a1c
- ld [de], a ; tile id
- inc hl
- inc e
- ld a, [hl]
- bit 1, a ; is the tile allowed to set the sprite priority bit?
- jr z, .skipPriority
- ld a, [hSpritePriority]
- or [hl]
-.skipPriority
- and $f0
- bit 4, a ; OBP0 or OBP1
- jr z, .spriteusesOBP0
- or %100 ; palettes 4-7 are OBP1
-.spriteusesOBP0
- ld [de], a
- inc hl
- inc e
- dec c
- jr nz, .loop
-
- ld a, e
- ld [hOAMBufferOffset], a
-.nextSprite
- ld a, [hSpriteOffset2]
- add $10
- cp $100 % $100
- jp nz, .spriteLoop
-
- ; Clear unused OAM.
-.asm_4a41
- ld a, [wd736]
- bit 6, a ; jumping down ledge or fishing animation?
- ld c, $a0
- jr z, .clear
-
-; Don't clear the last 4 entries because they are used for the shadow in the
-; jumping down ledge animation and the rod in the fishing animation.
- ld c, $90
-
-.clear
- ld a, [hOAMBufferOffset]
- cp c
- ret nc
- ld l, a
- ld h, wOAMBuffer / $100
- ld a, c
- ld de, $4 ; entry size
- ld b, $a0
-.clearLoop
- ld [hl], b
- add hl, de
- cp l
- jr nz, .clearLoop
- ret
-
-GetSpriteScreenXY:
- inc e
- inc e
- ld a, [de] ; c1x4
- ld [hSpriteScreenY], a
- inc e
- inc e
- ld a, [de] ; c1x6
- ld [hSpriteScreenX], a
- ld a, 4
- add e
- ld e, a
- ld a, [hSpriteScreenY]
- add 4
- and $f0
- ld [de], a ; c1xa (y)
- inc e
- ld a, [hSpriteScreenX]
- and $f0
- ld [de], a ; c1xb (x)
- ret
-
-Func_4a7b:
- push bc
- ld a, [wd5cd] ; temp copy of c1x2
- swap a ; high nybble determines sprite used (0 is always player sprite, next are some npcs)
- and $f
-
- ; Sprites $a and $b have one face (and therefore 4 tiles instead of 12).
- ; As a result, sprite $b's tile offset is less than normal.
- cp $b
- jr nz, .notFourTileSprite
- ld a, $a * 12 + 4 ; $7c
- jr .done
-
-.notFourTileSprite
- ; a *= 12
- add a
- add a
- ld c, a
- add a
- add c
-.done
- pop bc
- ret
-
-INCLUDE "engine/oam_dma.asm"
-
-_IsTilePassable::
- ld hl,wTilesetCollisionPtr ; pointer to list of passable tiles
- ld a,[hli]
- ld h,[hl]
- ld l,a ; hl now points to passable tiles
-.loop
- ld a,[hli]
- cp a,$ff
- jr z,.tileNotPassable
- cp c
- jr nz,.loop
- xor a
- ret
-.tileNotPassable
- scf
- ret
-
-INCLUDE "data/collision.asm" ; probably
diff --git a/engine/overworld/pathfinding.asm b/engine/overworld/pathfinding.asm
new file mode 100644
index 00000000..a824d337
--- /dev/null
+++ b/engine/overworld/pathfinding.asm
@@ -0,0 +1,201 @@
+FindPathToPlayer:
+ xor a
+ ld hl, hFindPathNumSteps
+ ld [hli], a ; hFindPathNumSteps
+ ld [hli], a ; hFindPathFlags
+ ld [hli], a ; hFindPathYProgress
+ ld [hl], a ; hFindPathXProgress
+ ld hl, wNPCMovementDirections2
+ ld de, $0
+.loop
+ ldh a, [hFindPathYProgress]
+ ld b, a
+ ldh a, [hNPCPlayerYDistance] ; Y distance in steps
+ call CalcDifference
+ ld d, a
+ and a
+ jr nz, .asm_f76a
+ ldh a, [hFindPathFlags]
+ set 0, a ; current end of path matches the player's Y coordinate
+ ldh [hFindPathFlags], a
+.asm_f76a
+ ldh a, [hFindPathXProgress]
+ ld b, a
+ ldh a, [hNPCPlayerXDistance] ; X distance in steps
+ call CalcDifference
+ ld e, a
+ and a
+ jr nz, .asm_f77c
+ ldh a, [hFindPathFlags]
+ set 1, a ; current end of path matches the player's X coordinate
+ ldh [hFindPathFlags], a
+.asm_f77c
+ ldh a, [hFindPathFlags]
+ cp $3 ; has the end of the path reached the player's position?
+ jr z, .done
+; Compare whether the X distance between the player and the current of the path
+; is greater or if the Y distance is. Then, try to reduce whichever is greater.
+ ld a, e
+ cp d
+ jr c, .yDistanceGreater
+; x distance is greater
+ ldh a, [hNPCPlayerRelativePosFlags]
+ bit 1, a
+ jr nz, .playerIsLeftOfNPC
+ ld d, NPC_MOVEMENT_RIGHT
+ jr .next1
+.playerIsLeftOfNPC
+ ld d, NPC_MOVEMENT_LEFT
+.next1
+ ldh a, [hFindPathXProgress]
+ add 1
+ ldh [hFindPathXProgress], a
+ jr .storeDirection
+.yDistanceGreater
+ ldh a, [hNPCPlayerRelativePosFlags]
+ bit 0, a
+ jr nz, .playerIsAboveNPC
+ ld d, NPC_MOVEMENT_DOWN
+ jr .next2
+.playerIsAboveNPC
+ ld d, NPC_MOVEMENT_UP
+.next2
+ ldh a, [hFindPathYProgress]
+ add 1
+ ldh [hFindPathYProgress], a
+.storeDirection
+ ld a, d
+ ld [hli], a
+ ldh a, [hFindPathNumSteps]
+ inc a
+ ldh [hFindPathNumSteps], a
+ jp .loop
+.done
+ ld [hl], $ff
+ ret
+
+CalcPositionOfPlayerRelativeToNPC:
+ xor a
+ ldh [hNPCPlayerRelativePosFlags], a
+ ld a, [wSpritePlayerStateData1YPixels]
+ ld d, a
+ ld a, [wSpritePlayerStateData1XPixels]
+ ld e, a
+ ld hl, wSpriteStateData1
+ ldh a, [hNPCSpriteOffset]
+ add l
+ add SPRITESTATEDATA1_YPIXELS
+ ld l, a
+ jr nc, .noCarry
+ inc h
+.noCarry
+ ld a, d
+ ld b, a
+ ld a, [hli] ; NPC sprite screen Y position in pixels
+ call CalcDifference
+ jr nc, .NPCSouthOfOrAlignedWithPlayer
+.NPCNorthOfPlayer
+ push hl
+ ld hl, hNPCPlayerRelativePosFlags
+ bit 0, [hl]
+ set 0, [hl]
+ pop hl
+ jr .divideYDistance
+.NPCSouthOfOrAlignedWithPlayer
+ push hl
+ ld hl, hNPCPlayerRelativePosFlags
+ bit 0, [hl]
+ res 0, [hl]
+ pop hl
+.divideYDistance
+ push hl
+ ld hl, hDividend2
+ ld [hli], a
+ ld a, 16
+ ld [hli], a
+ call DivideBytes ; divide Y absolute distance by 16
+ ld a, [hl] ; quotient
+ ldh [hNPCPlayerYDistance], a
+ pop hl
+ inc hl
+ ld b, e
+ ld a, [hl] ; NPC sprite screen X position in pixels
+ call CalcDifference
+ jr nc, .NPCEastOfOrAlignedWithPlayer
+.NPCWestOfPlayer
+ push hl
+ ld hl, hNPCPlayerRelativePosFlags
+ bit 1, [hl]
+ set 1, [hl]
+ pop hl
+ jr .divideXDistance
+.NPCEastOfOrAlignedWithPlayer
+ push hl
+ ld hl, hNPCPlayerRelativePosFlags
+ bit 1, [hl]
+ res 1, [hl]
+ pop hl
+.divideXDistance
+ ldh [hDividend2], a
+ ld a, 16
+ ldh [hDivisor2], a
+ call DivideBytes ; divide X absolute distance by 16
+ ldh a, [hQuotient2]
+ ldh [hNPCPlayerXDistance], a
+ ldh a, [hNPCPlayerRelativePosPerspective]
+ and a
+ ret z
+ ldh a, [hNPCPlayerRelativePosFlags]
+ cpl
+ and $3
+ ldh [hNPCPlayerRelativePosFlags], a
+ ret
+
+ConvertNPCMovementDirectionsToJoypadMasks:
+ ldh a, [hNPCMovementDirections2Index]
+ ld [wNPCMovementDirections2Index], a
+ dec a
+ ld de, wSimulatedJoypadStatesEnd
+ ld hl, wNPCMovementDirections2
+ add l
+ ld l, a
+ jr nc, .loop
+ inc h
+.loop
+ ld a, [hld]
+ call ConvertNPCMovementDirectionToJoypadMask
+ ld [de], a
+ inc de
+ ldh a, [hNPCMovementDirections2Index]
+ dec a
+ ldh [hNPCMovementDirections2Index], a
+ jr nz, .loop
+ ret
+
+ConvertNPCMovementDirectionToJoypadMask:
+ push hl
+ ld b, a
+ ld hl, NPCMovementDirectionsToJoypadMasksTable
+.loop
+ ld a, [hli]
+ cp $ff
+ jr z, .done
+ cp b
+ jr z, .loadJoypadMask
+ inc hl
+ jr .loop
+.loadJoypadMask
+ ld a, [hl]
+.done
+ pop hl
+ ret
+
+NPCMovementDirectionsToJoypadMasksTable:
+ db NPC_MOVEMENT_UP, D_UP
+ db NPC_MOVEMENT_DOWN, D_DOWN
+ db NPC_MOVEMENT_LEFT, D_LEFT
+ db NPC_MOVEMENT_RIGHT, D_RIGHT
+ db $ff
+
+; unreferenced
+ ret
diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm
index d4ecec53..5056c0b2 100755
--- a/engine/overworld/player_animations.asm
+++ b/engine/overworld/player_animations.asm
@@ -1,7 +1,7 @@
-EnterMapAnim:
+EnterMapAnim::
call InitFacingDirectionList
ld a, $ec
- ld [wSpriteStateData1 + 4], a ; player's sprite Y screen position
+ ld [wSpritePlayerStateData1YPixels], a
call Delay3
push hl
call GBFadeInFromWhite
@@ -94,7 +94,7 @@ PlayerSpinWhileMovingDown:
jp PlayerSpinWhileMovingUpOrDown
-_LeaveMapAnim:
+_LeaveMapAnim::
call Func_1510
call InitFacingDirectionList
call IsPlayerStandingOnWarpPadOrHole
@@ -232,19 +232,19 @@ DoFlyAnimation:
ld a, [wFlyAnimBirdSpriteImageIndex]
xor $1 ; make the bird flap its wings
ld [wFlyAnimBirdSpriteImageIndex], a
- ld [wSpriteStateData1 + 2], a
+ ld [wSpritePlayerStateData1ImageIndex], a
call Delay3
ld a, [wFlyAnimUsingCoordList]
cp $ff
jr z, .skipCopyingCoords ; if the bird is flapping its wings in place
- ld hl, wSpriteStateData1 + 4
+ ld hl, wSpritePlayerStateData1YPixels
ld a, [de]
inc de
- ld [hli], a
+ ld [hli], a ; y
inc hl
ld a, [de]
inc de
- ld [hl], a
+ ld [hl], a ; x
.skipCopyingCoords
ld a, [wFlyAnimCounter]
dec a
@@ -258,22 +258,22 @@ LoadBirdSpriteGraphics:
ld c, $c
ld hl, vNPCSprites
call CopyVideoData
- ld de, BirdSprite + $c0 ; moving animation sprite
+ ld de, BirdSprite tile 12 ; moving animation sprite
ld b, BANK(BirdSprite)
- ld c, $0c
+ ld c, 12
ld hl, vNPCSprites2
jp CopyVideoData
InitFacingDirectionList:
- ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction (image index is locked to standing images)
+ ld a, [wSpritePlayerStateData1ImageIndex] ; (image index is locked to standing images)
ld [wSavedPlayerFacingDirection], a
- ld a, [wSpriteStateData1 + 4] ; player's sprite Y screen position
+ ld a, [wSpritePlayerStateData1YPixels]
ld [wSavedPlayerScreenY], a
ld hl, PlayerSpinningFacingOrder
ld de, wFacingDirectionList
ld bc, 4
call CopyData
- ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction (image index is locked to standing images)
+ ld a, [wSpritePlayerStateData1ImageIndex] ; (image index is locked to standing images)
ld hl, wFacingDirectionList
; find the place in the list that matches the current facing direction
.loop
@@ -291,7 +291,7 @@ PlayerSpinningFacingOrder:
SpinPlayerSprite:
; copy the current value from the list into the sprite data and rotate the list
ld a, [hl]
- ld [wSpriteStateData1 + 2], a ; player's sprite facing direction (image index is locked to standing images)
+ ld [wSpritePlayerStateData1ImageIndex], a ; (image index is locked to standing images)
push hl
ld hl, wFacingDirectionList
ld de, wFacingDirectionList - 1
@@ -327,9 +327,9 @@ PlayerSpinWhileMovingUpOrDown:
call SpinPlayerSprite
ld a, [wPlayerSpinWhileMovingUpOrDownAnimDeltaY]
ld c, a
- ld a, [wSpriteStateData1 + 4] ; player's sprite Y screen position
+ ld a, [wSpritePlayerStateData1YPixels]
add c
- ld [wSpriteStateData1 + 4], a
+ ld [wSpritePlayerStateData1YPixels], a
ld c, a
ld a, [wPlayerSpinWhileMovingUpOrDownAnimMaxY]
cp c
@@ -341,9 +341,9 @@ PlayerSpinWhileMovingUpOrDown:
RestoreFacingDirectionAndYScreenPos:
ld a, [wSavedPlayerScreenY]
- ld [wSpriteStateData1 + 4], a
+ ld [wSpritePlayerStateData1YPixels], a
ld a, [wSavedPlayerFacingDirection]
- ld [wSpriteStateData1 + 2], a
+ ld [wSpritePlayerStateData1ImageIndex], a ; (image index is locked to standing images)
ret
; if SGB, 2 frames, else 3 frames
@@ -354,9 +354,9 @@ GetPlayerTeleportAnimFrameDelay:
inc a
ret
-IsPlayerStandingOnWarpPadOrHole:
+IsPlayerStandingOnWarpPadOrHole::
ld b, 0
- ld hl, .warpPadAndHoleData
+ ld hl, WarpPadAndHoleData
ld a, [wCurMapTileset]
ld c, a
.loop
@@ -365,7 +365,7 @@ IsPlayerStandingOnWarpPadOrHole:
jr z, .done
cp c
jr nz, .nextEntry
- aCoord 8, 9
+ lda_coord 8, 9
cp [hl]
jr z, .foundMatch
.nextEntry
@@ -380,13 +380,7 @@ IsPlayerStandingOnWarpPadOrHole:
ld [wStandingOnWarpPadOrHole], a
ret
-; format: db tileset id, tile id, value to be put in [wStandingOnWarpPadOrHole]
-.warpPadAndHoleData:
- db FACILITY, $20, 1 ; warp pad
- db FACILITY, $11, 2 ; hole
- db CAVERN, $22, 2 ; hole
- db INTERIOR, $55, 1 ; warp pad
- db $FF
+INCLUDE "data/tilesets/warp_pad_hole_tile_ids.asm"
FishingAnim:
ld c, 10
@@ -396,12 +390,12 @@ FishingAnim:
ld hl, vNPCSprites
ld de, RedSprite
ld b, BANK(RedSprite)
- ld c, $c
+ ld c, 12
call CopyVideoData
ld a, $4
ld hl, RedFishingTiles
call LoadAnimSpriteGfx
- ld a, [wSpriteStateData1 + 2]
+ ld a, [wSpritePlayerStateData1ImageIndex]
ld c, a
ld b, $0
ld hl, FishingRodOAM
@@ -424,7 +418,7 @@ FishingAnim:
; shake the player's sprite vertically
ld b, 10
.loop
- ld hl, wSpriteStateData1 + 4 ; player's sprite Y screen position
+ ld hl, wSpritePlayerStateData1YPixels
call .ShakePlayerSprite
ld hl, wOAMBuffer + $9c
call .ShakePlayerSprite
@@ -434,7 +428,7 @@ FishingAnim:
; If the player is facing up, hide the fishing rod so it doesn't overlap with
; the exclamation bubble that will be shown next.
- ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction
+ ld a, [wSpritePlayerStateData1ImageIndex] ; (image index is locked to standing images)
cp SPRITE_FACING_UP
jr nz, .skipHidingFishingRod
ld a, $a0
@@ -448,7 +442,7 @@ FishingAnim:
predef EmotionBubble
; If the player is facing up, unhide the fishing rod.
- ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction
+ ld a, [wSpritePlayerStateData1ImageIndex] ; (image index is locked to standing images)
cp SPRITE_FACING_UP
jr nz, .skipUnhidingFishingRod
ld a, $44
@@ -471,46 +465,38 @@ FishingAnim:
ret
NoNibbleText:
- TX_FAR _NoNibbleText
- db "@"
+ text_far _NoNibbleText
+ text_end
NothingHereText:
- TX_FAR _NothingHereText
- db "@"
+ text_far _NothingHereText
+ text_end
ItsABiteText:
- TX_FAR _ItsABiteText
- db "@"
+ text_far _ItsABiteText
+ text_end
FishingRodOAM:
; specifies how the fishing rod should be drawn on the screen
-; first byte = screen y coordinate
-; second byte = screen x coordinate
-; third byte = tile number
-; fourth byte = sprite properties
- db $5B, $4C, $FD, $00 ; player facing down
- db $44, $4C, $FD, $00 ; player facing up
- db $50, $40, $FE, $00 ; player facing left
- db $50, $58, $FE, $20 ; player facing right ($20 means "horizontally flip the tile")
+ dbsprite 9, 11, 4, 3, $fd, 0 ; down
+ dbsprite 9, 8, 4, 4, $fd, 0 ; up
+ dbsprite 8, 10, 0, 0, $fe, 0 ; left
+ dbsprite 11, 10, 0, 0, $fe, OAM_HFLIP ; right
+
+fishing_gfx: MACRO
+ dw \1
+ db \2
+ db BANK(\1)
+ dw vNPCSprites tile \3
+ENDM
RedFishingTiles:
- dw RedFishingTilesFront
- db 2, BANK(RedFishingTilesFront)
- dw vNPCSprites + $20
-
- dw RedFishingTilesBack
- db 2, BANK(RedFishingTilesBack)
- dw vNPCSprites + $60
-
- dw RedFishingTilesSide
- db 2, BANK(RedFishingTilesSide)
- dw vNPCSprites + $a0
-
- dw RedFishingRodTiles
- db 3, BANK(RedFishingRodTiles)
- dw vNPCSprites2 + $7d0
+ fishing_gfx RedFishingTilesFront, 2, $02
+ fishing_gfx RedFishingTilesBack, 2, $06
+ fishing_gfx RedFishingTilesSide, 2, $0a
+ fishing_gfx RedFishingRodTiles, 3, $fd
-_HandleMidJump:
+_HandleMidJump::
ld a, [wPlayerJumpingYScreenCoordsIndex]
ld c, a
inc a
@@ -521,7 +507,7 @@ _HandleMidJump:
ld hl, PlayerJumpingYScreenCoords
add hl, bc
ld a, [hl]
- ld [wSpriteStateData1 + 4], a ; player's sprite y coordinate
+ ld [wSpritePlayerStateData1YPixels], a
ret
.finishedJump
ld a, [wWalkCounter]
@@ -530,9 +516,9 @@ _HandleMidJump:
call UpdateSprites
call Delay3
xor a
- ld [hJoyHeld], a
- ld [hJoyPressed], a
- ld [hJoyReleased], a
+ ldh [hJoyHeld], a
+ ldh [hJoyPressed], a
+ ldh [hJoyReleased], a
ld [wPlayerJumpingYScreenCoordsIndex], a
ld hl, wd736
res 6, [hl] ; not jumping down a ledge any more
diff --git a/engine/overworld/player_state.asm b/engine/overworld/player_state.asm
index 8cbacc61..c966c128 100644
--- a/engine/overworld/player_state.asm
+++ b/engine/overworld/player_state.asm
@@ -1,5 +1,5 @@
; only used for setting bit 2 of wd736 upon entering a new map
-IsPlayerStandingOnWarp:
+IsPlayerStandingOnWarp::
ld a, [wNumberOfWarps]
and a
ret z
@@ -17,7 +17,7 @@ IsPlayerStandingOnWarp:
ld a, [hli] ; target warp
ld [wDestinationWarpID], a
ld a, [hl] ; target map
- ld [hWarpDestinationMap], a
+ ldh [hWarpDestinationMap], a
ld hl, wd736
set 2, [hl] ; standing on warp flag
ret
@@ -31,7 +31,7 @@ IsPlayerStandingOnWarp:
jr nz, .loop
ret
-CheckForceBikeOrSurf:
+CheckForceBikeOrSurf::
ld hl, wd732
bit 5, [hl]
ret nz
@@ -84,13 +84,13 @@ CheckForceBikeOrSurf:
call ForceBikeOrSurf
ret
-INCLUDE "data/force_bike_surf.asm"
+INCLUDE "data/maps/force_bike_surf.asm"
-IsPlayerFacingEdgeOfMap:
+IsPlayerFacingEdgeOfMap::
push hl
push de
push bc
- ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction
+ ld a, [wSpritePlayerStateData1FacingDirection]
srl a
ld c, a
ld b, $0
@@ -152,19 +152,19 @@ IsPlayerFacingEdgeOfMap:
scf
ret
-IsWarpTileInFrontOfPlayer:
+IsWarpTileInFrontOfPlayer::
push hl
push de
push bc
call _GetTileAndCoordsInFrontOfPlayer
ld a, [wCurMap]
cp SS_ANNE_BOW
- jr z, .ssAnne5
- ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction
+ jr z, IsSSAnneBowWarpTileInFrontOfPlayer
+ ld a, [wSpritePlayerStateData1FacingDirection]
srl a
ld c, a
ld b, 0
- ld hl, .warpTileListPointers
+ ld hl, WarpTileListPointers
add hl, bc
ld a, [hli]
ld h, [hl]
@@ -178,39 +178,23 @@ IsWarpTileInFrontOfPlayer:
pop hl
ret
-.warpTileListPointers:
- dw .facingDownWarpTiles
- dw .facingUpWarpTiles
- dw .facingLeftWarpTiles
- dw .facingRightWarpTiles
+INCLUDE "data/tilesets/warp_carpet_tile_ids.asm"
-.facingDownWarpTiles
- db $01,$12,$17,$3D,$04,$18,$33,$FF
-
-.facingUpWarpTiles
- db $01,$5C,$FF
-
-.facingLeftWarpTiles
- db $1A,$4B,$FF
-
-.facingRightWarpTiles
- db $0F,$4E,$FF
-
-.ssAnne5
+IsSSAnneBowWarpTileInFrontOfPlayer:
ld a, [wTileInFrontOfPlayer]
cp $15
jr nz, .notSSAnne5Warp
scf
- jr .done
+ jr IsWarpTileInFrontOfPlayer.done
.notSSAnne5Warp
and a
- jr .done
+ jr IsWarpTileInFrontOfPlayer.done
-IsPlayerStandingOnDoorTileOrWarpTile:
+IsPlayerStandingOnDoorTileOrWarpTile::
push hl
push de
push bc
- callba IsPlayerStandingOnDoorTile
+ farcall IsPlayerStandingOnDoorTile
jr c, .done
ld a, [wCurMapTileset]
add a
@@ -222,7 +206,7 @@ IsPlayerStandingOnDoorTileOrWarpTile:
ld h, [hl]
ld l, a
ld de, $1
- aCoord 8, 9
+ lda_coord 8, 9
call IsInArray
jr nc, .done
ld hl, wd736
@@ -233,35 +217,35 @@ IsPlayerStandingOnDoorTileOrWarpTile:
pop hl
ret
-INCLUDE "data/warp_tile_ids.asm"
+INCLUDE "data/tilesets/warp_tile_ids.asm"
-PrintSafariZoneSteps:
+PrintSafariZoneSteps::
ld a, [wCurMap]
cp SAFARI_ZONE_EAST
ret c
cp CERULEAN_CAVE_2F
ret nc
- coord hl, 0, 0
+ hlcoord 0, 0
lb bc, 3, 7
call TextBoxBorder
- coord hl, 1, 1
+ hlcoord 1, 1
ld de, wSafariSteps
lb bc, 2, 3
call PrintNumber
- coord hl, 4, 1
+ hlcoord 4, 1
ld de, SafariSteps
call PlaceString
- coord hl, 1, 3
+ hlcoord 1, 3
ld de, SafariBallText
call PlaceString
ld a, [wNumSafariBalls]
cp 10
jr nc, .numSafariBallsTwoDigits
- coord hl, 5, 3
+ hlcoord 5, 3
ld a, " "
ld [hl], a
.numSafariBallsTwoDigits
- coord hl, 6, 3
+ hlcoord 6, 3
ld de, wNumSafariBalls
lb bc, 1, 2
jp PrintNumber
@@ -280,32 +264,32 @@ _GetTileAndCoordsInFrontOfPlayer:
ld d, a
ld a, [wXCoord]
ld e, a
- ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
+ ld a, [wSpritePlayerStateData1FacingDirection]
and a ; cp SPRITE_FACING_DOWN
jr nz, .notFacingDown
; facing down
- aCoord 8, 11
+ lda_coord 8, 11
inc d
jr .storeTile
.notFacingDown
cp SPRITE_FACING_UP
jr nz, .notFacingUp
; facing up
- aCoord 8, 7
+ lda_coord 8, 7
dec d
jr .storeTile
.notFacingUp
cp SPRITE_FACING_LEFT
jr nz, .notFacingLeft
; facing left
- aCoord 6, 9
+ lda_coord 6, 9
dec e
jr .storeTile
.notFacingLeft
cp SPRITE_FACING_RIGHT
jr nz, .storeTile
; facing right
- aCoord 10, 9
+ lda_coord 10, 9
inc e
.storeTile
ld c, a
@@ -314,45 +298,45 @@ _GetTileAndCoordsInFrontOfPlayer:
GetTileTwoStepsInFrontOfPlayer:
xor a
- ld [$ffdb], a
+ ldh [hPlayerFacing], a
ld hl, wYCoord
ld a, [hli]
ld d, a
ld e, [hl]
- ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
+ ld a, [wSpritePlayerStateData1FacingDirection]
and a ; cp SPRITE_FACING_DOWN
jr nz, .notFacingDown
; facing down
- ld hl, $ffdb
+ ld hl, hPlayerFacing
set 0, [hl]
- aCoord 8, 13
+ lda_coord 8, 13
inc d
jr .storeTile
.notFacingDown
cp SPRITE_FACING_UP
jr nz, .notFacingUp
; facing up
- ld hl, $ffdb
+ ld hl, hPlayerFacing
set 1, [hl]
- aCoord 8, 5
+ lda_coord 8, 5
dec d
jr .storeTile
.notFacingUp
cp SPRITE_FACING_LEFT
jr nz, .notFacingLeft
; facing left
- ld hl, $ffdb
+ ld hl, hPlayerFacing
set 2, [hl]
- aCoord 4, 9
+ lda_coord 4, 9
dec e
jr .storeTile
.notFacingLeft
cp SPRITE_FACING_RIGHT
jr nz, .storeTile
; facing right
- ld hl, $ffdb
+ ld hl, hPlayerFacing
set 3, [hl]
- aCoord 12, 9
+ lda_coord 12, 9
inc e
.storeTile
ld c, a
@@ -384,36 +368,36 @@ CheckForBoulderCollisionWithSprites:
swap a
ld d, 0
ld e, a
- ld hl, wSpriteStateData2 + $14
+ ld hl, wSprite01StateData2MapY
add hl, de
ld a, [hli] ; map Y position
- ld [$ffdc], a
+ ldh [hPlayerYCoord], a
ld a, [hl] ; map X position
- ld [$ffdd], a
+ ldh [hPlayerXCoord], a
ld a, [wNumSprites]
ld c, a
ld de, $f
- ld hl, wSpriteStateData2 + $14
- ld a, [$ffdb]
+ ld hl, wSprite01StateData2MapY
+ ldh a, [hPlayerFacing]
and $3 ; facing up or down?
jr z, .pushingHorizontallyLoop
.pushingVerticallyLoop
inc hl
- ld a, [$ffdd]
+ ldh a, [hPlayerXCoord]
cp [hl]
jr nz, .nextSprite1 ; if X coordinates don't match
dec hl
ld a, [hli]
ld b, a
- ld a, [$ffdb]
+ ldh a, [hPlayerFacing]
rrca
jr c, .pushingDown
; pushing up
- ld a, [$ffdc]
+ ldh a, [hPlayerYCoord]
dec a
jr .compareYCoords
.pushingDown
- ld a, [$ffdc]
+ ldh a, [hPlayerYCoord]
inc a
.compareYCoords
cp b
@@ -426,19 +410,19 @@ CheckForBoulderCollisionWithSprites:
.pushingHorizontallyLoop
ld a, [hli]
ld b, a
- ld a, [$ffdc]
+ ldh a, [hPlayerYCoord]
cp b
jr nz, .nextSprite2
ld b, [hl]
- ld a, [$ffdb]
+ ldh a, [hPlayerFacing]
bit 2, a
jr nz, .pushingLeft
; pushing right
- ld a, [$ffdd]
+ ldh a, [hPlayerXCoord]
inc a
jr .compareXCoords
.pushingLeft
- ld a, [$ffdd]
+ ldh a, [hPlayerXCoord]
dec a
.compareXCoords
cp b
diff --git a/engine/overworld/poison.asm b/engine/overworld/poison.asm
deleted file mode 100644
index 03fb8a65..00000000
--- a/engine/overworld/poison.asm
+++ /dev/null
@@ -1,151 +0,0 @@
-ApplyOutOfBattlePoisonDamage:
- ld a, [wd730]
- add a
- jp c, .noBlackOut ; no black out if joypad states are being simulated
- ld a, [wd492]
- bit 7, a
- jp nz, .noBlackOut
- ld a, [wd72e]
- bit 6, a
- jp nz, .noBlackOut
- ld a, [wPartyCount]
- and a
- jp z, .noBlackOut
- call IncrementDayCareMonExp
- call Func_c4c7
- ld a, [wStepCounter]
- and $3 ; is the counter a multiple of 4?
- jp nz, .skipPoisonEffectAndSound ; only apply poison damage every fourth step
- ld [wWhichPokemon], a
- ld hl, wPartyMon1Status
- ld de, wPartySpecies
-.applyDamageLoop
- ld a, [hl]
- and (1 << PSN)
- jr z, .nextMon2 ; not poisoned
- dec hl
- dec hl
- ld a, [hld]
- ld b, a
- ld a, [hli]
- or b
- jr z, .nextMon ; already fainted
-; subtract 1 from HP
- ld a, [hl]
- dec a
- ld [hld], a
- inc a
- jr nz, .noBorrow
-; borrow 1 from upper byte of HP
- dec [hl]
- inc hl
- jr .nextMon
-.noBorrow
- ld a, [hli]
- or [hl]
- jr nz, .nextMon ; didn't faint from damage
-; the mon fainted from the damage
- push hl
- inc hl
- inc hl
- ld [hl], a
- ld a, [de]
- ld [wd11e], a
- push de
- ld a, [wWhichPokemon]
- ld hl, wPartyMonNicks
- call GetPartyMonName
- xor a
- ld [wJoyIgnore], a
- call EnableAutoTextBoxDrawing
- ld a, TEXT_MON_FAINTED
- ld [hSpriteIndexOrTextID], a
- call DisplayTextID
- callab IsThisPartymonStarterPikachu_Party
- jr nc, .curMonNotPlayerPikachu
- ld e, $3
- callab PlayPikachuSoundClip
- calladb_ModifyPikachuHappiness PIKAHAPPY_PSNFNT
-.curMonNotPlayerPikachu
- pop de
- pop hl
-.nextMon
- inc hl
- inc hl
-.nextMon2
- inc de
- ld a, [de]
- inc a
- jr z, .applyDamageLoopDone
- ld bc, wPartyMon2 - wPartyMon1
- add hl, bc
- push hl
- ld hl, wWhichPokemon
- inc [hl]
- pop hl
- jr .applyDamageLoop
-.applyDamageLoopDone
- ld hl, wPartyMon1Status
- ld a, [wPartyCount]
- ld d, a
- ld e, 0
-.countPoisonedLoop
- ld a, [hl]
- and (1 << PSN)
- or e
- ld e, a
- ld bc, wPartyMon2 - wPartyMon1
- add hl, bc
- dec d
- jr nz, .countPoisonedLoop
- ld a, e
- and a ; are any party members poisoned?
- jr z, .skipPoisonEffectAndSound
- ld b, $2
- predef ChangeBGPalColor0_4Frames ; change BG white to dark grey for 4 frames
- ld a, SFX_POISONED
- call PlaySound
-.skipPoisonEffectAndSound
- predef AnyPartyAlive
- ld a, d
- and a
- jr nz, .noBlackOut
- call EnableAutoTextBoxDrawing
- ld a, TEXT_BLACKED_OUT
- ld [hSpriteIndexOrTextID], a
- call DisplayTextID
- ld hl, wd72e
- set 5, [hl]
- ld a, $ff
- jr .done
-.noBlackOut
- xor a
-.done
- ld [wOutOfBattleBlackout], a
- ret
-
-Func_c4c7:
- ld a, [wStepCounter]
- and a
- jr nz, .asm_c4de
- call Random
- and $1
- jr z, .asm_c4de
- calladb_ModifyPikachuHappiness $6
-.asm_c4de
- ld hl, wPikachuMood
- ld a, [hl]
- cp $80
- jr z, .asm_c4ef
- jr c, .asm_c4ea
- dec a
- dec a
-.asm_c4ea
- inc a
- ld [hl], a
- cp $80
- ret nz
-.asm_c4ef
- xor a
- ld [wd49c], a
- ret
diff --git a/engine/overworld/pokecenter.asm b/engine/overworld/pokecenter.asm
deleted file mode 100755
index cf0159f9..00000000
--- a/engine/overworld/pokecenter.asm
+++ /dev/null
@@ -1,149 +0,0 @@
-DisplayPokemonCenterDialogue_:
- ld a, [wCurMap]
- cp PEWTER_POKECENTER
- jr nz, .regularCenter
- call CheckPikachuFollowingPlayer
- jr z, .regularCenter
- ld hl, LooksContentText ; if pikachu is sleeping, don't heal
- call PrintText
- ret
-.regularCenter
- call SaveScreenTilesToBuffer1 ; save screen
- ld hl, PokemonCenterWelcomeText
- call PrintText
- ld hl, wd72e
- bit 2, [hl]
- set 1, [hl]
- set 2, [hl]
- jr nz, .skipShallWeHealYourPokemon
- ld hl, ShallWeHealYourPokemonText
- call PrintText
-.skipShallWeHealYourPokemon
- call YesNoChoicePokeCenter ; yes/no menu
- call UpdateSprites
- ld a, [wCurrentMenuItem]
- and a
- jp nz, .declinedHealing ; if the player chose No
- call SetLastBlackoutMap
- callab IsStarterPikachuInOurParty
- jr nc, .notHealingPlayerPikachu
- call CheckPikachuFollowingPlayer
- jr nz, .notHealingPlayerPikachu
- call LoadCurrentMapView
- call Delay3
- call UpdateSprites
- callab PikachuWalksToNurseJoy ; todo
-.notHealingPlayerPikachu
- ld hl, NeedYourPokemonText
- call PrintText
- ld c, 64
- call DelayFrames
- call CheckPikachuFollowingPlayer
- jr nz, .playerPikachuNotOnScreen
- call DisablePikachuOverworldSpriteDrawing
- callab IsStarterPikachuInOurParty
- call c, Func_6eaa
-.playerPikachuNotOnScreen
- lb bc, 1, 8
- call Func_6ebb
- ld c, 30
- call DelayFrames
- callba AnimateHealingMachine ; do the healing machine animation
- predef HealParty
- xor a
- ld [wAudioFadeOutControl], a
- ld a, [wAudioSavedROMBank]
- ld [wAudioROMBank], a
- ld a, [wMapMusicSoundID]
- ld [wLastMusicSoundID], a
- ld [wNewSoundID], a
- call PlaySound
- call CheckPikachuFollowingPlayer
- jr nz, .doNotReturnPikachu
- callab IsStarterPikachuInOurParty
- call c, Func_6eaa
- ld a, $5
- ld [wPikachuSpawnState], a
- call EnablePikachuOverworldSpriteDrawing
-.doNotReturnPikachu
- lb bc, 1, 0
- call Func_6ebb
- ld hl, PokemonFightingFitText
- call PrintText
- callab IsStarterPikachuInOurParty
- jr nc, .notInParty
- lb bc, 15, 0
- call Func_6ebb
-.notInParty
- call LoadCurrentMapView
- call Delay3
- call UpdateSprites
- callab ReloadWalkingTilePatterns
- ld a, $1
- ld [H_SPRITEINDEX], a
- ld a, $1
- ld [hSpriteImageIndex], a
- call SpriteFunc_34a1
- ld c, 40
- call DelayFrames
- call UpdateSprites
- call LoadFontTilePatterns
- jr .done
-.declinedHealing
- call LoadScreenTilesFromBuffer1 ; restore screen
-.done
- ld hl, PokemonCenterFarewellText
- call PrintText
- call UpdateSprites
- ret
-
-Func_6eaa:
- ld a, $1
- ld [H_SPRITEINDEX], a
- ld a, $4
- ld [hSpriteImageIndex], a
- call SpriteFunc_34a1
- ld c, 64
- call DelayFrames
- ret
-
-Func_6ebb:
- ld a, b
- ld [H_SPRITEINDEX], a
- ld a, c
- ld [hSpriteImageIndex], a
- push bc
- call SetSpriteFacingDirectionAndDelay
- pop bc
- ld a, b
- ld [H_SPRITEINDEX], a
- ld a, c
- ld [hSpriteImageIndex], a
- call SpriteFunc_34a1
- ret
-
-PokemonCenterWelcomeText:
- TX_FAR _PokemonCenterWelcomeText
- db "@"
-
-ShallWeHealYourPokemonText:
- TX_DELAY
- TX_FAR _ShallWeHealYourPokemonText
- db "@"
-
-NeedYourPokemonText:
- TX_FAR _NeedYourPokemonText
- db "@"
-
-PokemonFightingFitText:
- TX_FAR _PokemonFightingFitText
- db "@"
-
-PokemonCenterFarewellText:
- TX_DELAY
- TX_FAR _PokemonCenterFarewellText
- db "@"
-
-LooksContentText:
- TX_FAR _LooksContentText
- db "@"
diff --git a/engine/overworld/pokemart.asm b/engine/overworld/pokemart.asm
deleted file mode 100755
index dc5b29b5..00000000
--- a/engine/overworld/pokemart.asm
+++ /dev/null
@@ -1,272 +0,0 @@
-DisplayPokemartDialogue_:
- ld a, [wListScrollOffset]
- ld [wSavedListScrollOffset], a
- call UpdateSprites
- xor a
- ld [wBoughtOrSoldItemInMart], a
-.loop
- xor a
- ld [wListScrollOffset], a
- ld [wCurrentMenuItem], a
- ld [wPlayerMonNumber], a
- inc a
- ld [wPrintItemPrices], a
- ld a, MONEY_BOX
- ld [wTextBoxID], a
- call DisplayTextBoxID
- ld a, BUY_SELL_QUIT_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID
-
-; This code is useless. It copies the address of the pokemart's inventory to hl,
-; but the address is never used.
- ld hl, wItemListPointer
- ld a, [hli]
- ld l, [hl]
- ld h, a
-
- ld a, [wMenuExitMethod]
- cp CANCELLED_MENU
- jp z, .done
- ld a, [wChosenMenuItem]
- and a ; buying?
- jp z, .buyMenu
- dec a ; selling?
- jp z, .sellMenu
- dec a ; quitting?
- jp z, .done
-.sellMenu
-
-; the same variables are set again below, so this code has no effect
- xor a
- ld [wPrintItemPrices], a
- ld a, INIT_BAG_ITEM_LIST
- ld [wInitListType], a
- callab InitList
-
- ld a, [wNumBagItems]
- and a
- jp z, .bagEmpty
- ld hl, PokemonSellingGreetingText
- call PrintText
- call SaveScreenTilesToBuffer1 ; save screen
-.sellMenuLoop
- call LoadScreenTilesFromBuffer1 ; restore saved screen
- ld a, MONEY_BOX
- ld [wTextBoxID], a
- call DisplayTextBoxID ; draw money text box
- ld hl, wNumBagItems
- ld a, l
- ld [wListPointer], a
- ld a, h
- ld [wListPointer + 1], a
- xor a
- ld [wPrintItemPrices], a
- ld [wCurrentMenuItem], a
- ld a, ITEMLISTMENU
- ld [wListMenuID], a
- call DisplayListMenuID
- jp c, .returnToMainPokemartMenu ; if the player closed the menu
-.confirmItemSale ; if the player is trying to sell a specific item
- call IsKeyItem
- ld a, [wIsKeyItem]
- and a
- jr nz, .unsellableItem
- ld a, [wcf91]
- call IsItemHM
- jr c, .unsellableItem
- ld a, PRICEDITEMLISTMENU
- ld [wListMenuID], a
- ld [hHalveItemPrices], a ; halve prices when selling
- call DisplayChooseQuantityMenu
- inc a
- jr z, .sellMenuLoop ; if the player closed the choose quantity menu with the B button
- ld hl, PokemartTellSellPriceText
- lb bc, 14, 1 ; location that PrintText always prints to, this is useless
- call PrintText
- coord hl, 14, 7
- lb bc, 8, 15
- ld a, TWO_OPTION_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID ; yes/no menu
- ld a, [wMenuExitMethod]
- cp CHOSE_SECOND_ITEM
- jr z, .sellMenuLoop ; if the player chose No or pressed the B button
-
-; The following code is supposed to check if the player chose No, but the above
-; check already catches it.
- ld a, [wChosenMenuItem]
- dec a
- jr z, .sellMenuLoop
-
-.sellItem
- ld a, [wBoughtOrSoldItemInMart]
- and a
- jr nz, .skipSettingFlag1
- inc a
- ld [wBoughtOrSoldItemInMart], a
-.skipSettingFlag1
- call AddAmountSoldToMoney
- ld hl, wNumBagItems
- call RemoveItemFromInventory
- jp .sellMenuLoop
-.unsellableItem
- ld hl, PokemartUnsellableItemText
- call PrintText
- jp .returnToMainPokemartMenu
-.bagEmpty
- ld hl, PokemartItemBagEmptyText
- call PrintText
- call SaveScreenTilesToBuffer1
- jp .returnToMainPokemartMenu
-.buyMenu
-
-; the same variables are set again below, so this code has no effect
- ld a, 1
- ld [wPrintItemPrices], a
- ld a, INIT_OTHER_ITEM_LIST
- ld [wInitListType], a
- callab InitList
-
- ld hl, PokemartBuyingGreetingText
- call PrintText
- call SaveScreenTilesToBuffer1
-.buyMenuLoop
- call LoadScreenTilesFromBuffer1
- ld a, MONEY_BOX
- ld [wTextBoxID], a
- call DisplayTextBoxID
- ld hl, wItemList
- ld a, l
- ld [wListPointer], a
- ld a, h
- ld [wListPointer + 1], a
- xor a
- ld [wCurrentMenuItem], a
- inc a
- ld [wPrintItemPrices], a
- inc a ; a = 2 (PRICEDITEMLISTMENU)
- ld [wListMenuID], a
- call DisplayListMenuID
- jr c, .returnToMainPokemartMenu ; if the player closed the menu
- ld a, 99
- ld [wMaxItemQuantity], a
- xor a
- ld [hHalveItemPrices], a ; don't halve item prices when buying
- call DisplayChooseQuantityMenu
- inc a
- jr z, .buyMenuLoop ; if the player closed the choose quantity menu with the B button
- ld a, [wcf91] ; item ID
- ld [wd11e], a ; store item ID for GetItemName
- call GetItemName
- call CopyStringToCF4B ; copy name to wcf4b
- ld hl, PokemartTellBuyPriceText
- call PrintText
- coord hl, 14, 7
- lb bc, 8, 15
- ld a, TWO_OPTION_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID ; yes/no menu
- ld a, [wMenuExitMethod]
- cp CHOSE_SECOND_ITEM
- jp z, .buyMenuLoop ; if the player chose No or pressed the B button
-
-; The following code is supposed to check if the player chose No, but the above
-; check already catches it.
- ld a, [wChosenMenuItem]
- dec a
- jr z, .buyMenuLoop
-
-.buyItem
- call .isThereEnoughMoney
- jr c, .notEnoughMoney
- ld hl, wNumBagItems
- call AddItemToInventory
- jr nc, .bagFull
- call SubtractAmountPaidFromMoney
- ld a, [wBoughtOrSoldItemInMart]
- and a
- jr nz, .skipSettingFlag2
- ld a, 1
- ld [wBoughtOrSoldItemInMart], a
-.skipSettingFlag2
- ld a, SFX_PURCHASE
- call PlaySoundWaitForCurrent
- call WaitForSoundToFinish
- ld hl, PokemartBoughtItemText
- call PrintText
- jp .buyMenuLoop
-.returnToMainPokemartMenu
- call LoadScreenTilesFromBuffer1
- ld a, MONEY_BOX
- ld [wTextBoxID], a
- call DisplayTextBoxID
- ld hl, PokemartAnythingElseText
- call PrintText
- jp .loop
-.isThereEnoughMoney
- ld de, wPlayerMoney
- ld hl, hMoney
- ld c, 3 ; length of money in bytes
- jp StringCmp
-.notEnoughMoney
- ld hl, PokemartNotEnoughMoneyText
- call PrintText
- jr .returnToMainPokemartMenu
-.bagFull
- ld hl, PokemartItemBagFullText
- call PrintText
- jr .returnToMainPokemartMenu
-.done
- ld hl, PokemartThankYouText
- call PrintText
- ld a, 1
- ld [wUpdateSpritesEnabled], a
- call UpdateSprites
- ld a, [wSavedListScrollOffset]
- ld [wListScrollOffset], a
- ret
-
-PokemartBuyingGreetingText:
- TX_FAR _PokemartBuyingGreetingText
- db "@"
-
-PokemartTellBuyPriceText:
- TX_FAR _PokemartTellBuyPriceText
- db "@"
-
-PokemartBoughtItemText:
- TX_FAR _PokemartBoughtItemText
- db "@"
-
-PokemartNotEnoughMoneyText:
- TX_FAR _PokemartNotEnoughMoneyText
- db "@"
-
-PokemartItemBagFullText:
- TX_FAR _PokemartItemBagFullText
- db "@"
-
-PokemonSellingGreetingText:
- TX_FAR _PokemonSellingGreetingText
- db "@"
-
-PokemartTellSellPriceText:
- TX_FAR _PokemartTellSellPriceText
- db "@"
-
-PokemartItemBagEmptyText:
- TX_FAR _PokemartItemBagEmptyText
- db "@"
-
-PokemartUnsellableItemText:
- TX_FAR _PokemartUnsellableItemText
- db "@"
-
-PokemartThankYouText:
- TX_FAR _PokemartThankYouText
- db "@"
-
-PokemartAnythingElseText:
- TX_FAR _PokemartAnythingElseText
- db "@"
diff --git a/engine/overworld/push_boulder.asm b/engine/overworld/push_boulder.asm
index 8a385345..09911ca3 100644
--- a/engine/overworld/push_boulder.asm
+++ b/engine/overworld/push_boulder.asm
@@ -1,4 +1,4 @@
-TryPushingBoulder:
+TryPushingBoulder::
ld a, [wd728]
bit 0, a ; using Strength?
ret z
@@ -8,15 +8,15 @@ Func_f0a7:
bit 1, a ; has boulder dust animation from previous push played yet?
ret nz
xor a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call IsSpriteInFrontOfPlayer
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
ld [wBoulderSpriteIndex], a
and a
jp z, ResetBoulderPushFlags
- ld hl, wSpriteStateData1 + 1
+ ld hl, wSpritePlayerStateData1MovementStatus
ld d, $0
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
swap a
ld e, a
add hl, de
@@ -29,16 +29,16 @@ Func_f0a7:
bit 6, [hl]
set 6, [hl] ; indicate that the player has tried pushing
ret z ; the player must try pushing twice before the boulder will move
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
and D_RIGHT | D_LEFT | D_UP | D_DOWN
ret z
predef CheckForCollisionWhenPushingBoulder
ld a, [wTileInFrontOfBoulderAndBoulderCollisionResult]
and a ; was there a collision?
jp nz, ResetBoulderPushFlags
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
ld b, a
- ld a, [wSpritePlayerStateData1FacingDirection] ; player's sprite facing direction
+ ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
jr z, .pushBoulderUp
cp SPRITE_FACING_LEFT
@@ -73,28 +73,32 @@ Func_f0a7:
ret
PushBoulderUpMovementData:
- db NPC_MOVEMENT_UP,$FF
+ db NPC_MOVEMENT_UP
+ db -1 ; end
PushBoulderDownMovementData:
- db NPC_MOVEMENT_DOWN,$FF
+ db NPC_MOVEMENT_DOWN
+ db -1 ; end
PushBoulderLeftMovementData:
- db NPC_MOVEMENT_LEFT,$FF
+ db NPC_MOVEMENT_LEFT
+ db -1 ; end
PushBoulderRightMovementData:
- db NPC_MOVEMENT_RIGHT,$FF
+ db NPC_MOVEMENT_RIGHT
+ db -1 ; end
-DoBoulderDustAnimation:
+DoBoulderDustAnimation::
ld a, [wd730]
bit 0, a
ret nz
- callab AnimateBoulderDust
+ callfar AnimateBoulderDust
call DiscardButtonPresses
ld [wJoyIgnore], a
call ResetBoulderPushFlags
set 7, [hl]
ld a, [wBoulderSpriteIndex]
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call GetSpriteMovementByte2Pointer
ld [hl], $10
ld a, SFX_CUT
diff --git a/engine/overworld/saffron_guards.asm b/engine/overworld/saffron_guards.asm
deleted file mode 100755
index 3b26b6f8..00000000
--- a/engine/overworld/saffron_guards.asm
+++ /dev/null
@@ -1,16 +0,0 @@
-RemoveGuardDrink:
- ld hl, GuardDrinksList
-.drinkLoop
- ld a, [hli]
- ld [$ffdb], a
- and a
- ret z
- push hl
- ld b, a
- call IsItemInBag
- pop hl
- jr z, .drinkLoop
- jpba RemoveItemByID
-
-GuardDrinksList:
- db FRESH_WATER, SODA_POP, LEMONADE, $00
diff --git a/engine/overworld/set_blackout_map.asm b/engine/overworld/set_blackout_map.asm
deleted file mode 100644
index bac2f0ca..00000000
--- a/engine/overworld/set_blackout_map.asm
+++ /dev/null
@@ -1,29 +0,0 @@
-SetLastBlackoutMap:
-; Set the map to return to when
-; blacking out or using Teleport or Dig.
-; Safari rest houses don't count.
-
- push hl
- ld hl, SafariZoneRestHouses
- ld a, [wCurMap]
- ld b, a
-.loop
- ld a, [hli]
- cp -1
- jr z, .notresthouse
- cp b
- jr nz, .loop
- jr .done
-
-.notresthouse
- ld a, [wLastMap]
- ld [wLastBlackoutMap], a
-.done
- pop hl
- ret
-
-SafariZoneRestHouses:
- db SAFARI_ZONE_WEST_REST_HOUSE
- db SAFARI_ZONE_EAST_REST_HOUSE
- db SAFARI_ZONE_NORTH_REST_HOUSE
- db -1
diff --git a/engine/overworld/special_warps.asm b/engine/overworld/special_warps.asm
new file mode 100644
index 00000000..61356a03
--- /dev/null
+++ b/engine/overworld/special_warps.asm
@@ -0,0 +1,149 @@
+SpecialWarpIn::
+ call LoadSpecialWarpData
+ predef LoadTilesetHeader
+ ld hl, wd732
+ bit 2, [hl] ; dungeon warp or fly warp?
+ res 2, [hl]
+ jr z, .next
+; if dungeon warp or fly warp
+ ld a, [wDestinationMap]
+ jr .next2
+.next
+ bit 1, [hl]
+ jr z, .next3
+ call DebugStart
+.next3
+ ld a, 0
+.next2
+ ld b, a
+ ld a, [wd72d]
+ and a
+ jr nz, .next4
+ ld a, b
+.next4
+ ld hl, wd732
+ bit 4, [hl] ; dungeon warp?
+ ret nz
+; if not dungeon warp
+ ld [wLastMap], a
+ ret
+
+; gets the map ID, tile block map view pointer, tileset, and coordinates
+LoadSpecialWarpData:
+ ld a, [wd72d]
+ cp TRADE_CENTER
+ jr nz, .notTradeCenter
+ ld hl, TradeCenterSpec1
+ ldh a, [hSerialConnectionStatus]
+ cp USING_INTERNAL_CLOCK ; which gameboy is clocking determines who is on the left and who is on the right
+ jr z, .copyWarpData
+ ld hl, TradeCenterSpec2
+ jr .copyWarpData
+.notTradeCenter
+ cp COLOSSEUM
+ jr nz, .notColosseum
+ ld hl, ColosseumSpec1
+ ldh a, [hSerialConnectionStatus]
+ cp USING_INTERNAL_CLOCK
+ jr z, .copyWarpData
+ ld hl, ColosseumSpec2
+ jr .copyWarpData
+.notColosseum
+ ld a, [wd732]
+ bit 1, a
+ jr nz, .notFirstMap
+ bit 2, a
+ jr nz, .notFirstMap
+ ld hl, FirstMapSpec
+.copyWarpData
+ ld de, wCurMap
+ ld c, $7
+.copyWarpDataLoop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .copyWarpDataLoop
+ ld a, [hli]
+ ld [wCurMapTileset], a
+ xor a
+ jr .done
+.notFirstMap
+ 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
+ bit 6, [hl] ; return to last pokemon center (or player's house)?
+ res 6, [hl]
+ jr z, .otherDestination
+; return to last pokemon center or player's house
+ ld a, [wLastBlackoutMap]
+ jr .usedFlyWarp
+.usedDunegonWarp
+ ld hl, wd72d
+ res 4, [hl]
+ ld a, [wDungeonWarpDestinationMap]
+ ld b, a
+ ld [wCurMap], a
+ ld a, [wWhichDungeonWarp]
+ ld c, a
+ ld hl, DungeonWarpList
+ ld de, 0
+ ld a, 6
+ ld [wDungeonWarpDataEntrySize], a
+.dungeonWarpListLoop
+ ld a, [hli]
+ cp b
+ jr z, .matchedDungeonWarpDestinationMap
+ inc hl
+ jr .nextDungeonWarp
+.matchedDungeonWarpDestinationMap
+ ld a, [hli]
+ cp c
+ jr z, .matchedDungeonWarpID
+.nextDungeonWarp
+ ld a, [wDungeonWarpDataEntrySize]
+ add e
+ ld e, a
+ jr .dungeonWarpListLoop
+.matchedDungeonWarpID
+ ld hl, DungeonWarpData
+ add hl, de
+ jr .copyWarpData2
+.otherDestination
+ ld a, [wDestinationMap]
+.usedFlyWarp
+ ld b, a
+ ld [wCurMap], a
+ ld hl, FlyWarpDataPtr
+.flyWarpDataPtrLoop
+ ld a, [hli]
+ inc hl
+ cp b
+ jr z, .foundFlyWarpMatch
+ inc hl
+ inc hl
+ jr .flyWarpDataPtrLoop
+.foundFlyWarpMatch
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+.copyWarpData2
+ ld de, wCurrentTileBlockMapViewPointer
+ ld c, $6
+.copyWarpDataLoop2
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .copyWarpDataLoop2
+ xor a ; OVERWORLD
+ ld [wCurMapTileset], a
+.done
+ ld [wYOffsetSinceLastSpecialWarp], a
+ ld [wXOffsetSinceLastSpecialWarp], a
+ ld a, $ff ; the player's coordinates have already been updated using a special warp, so don't use any of the normal warps
+ ld [wDestinationWarpID], a
+ ret
+
+INCLUDE "data/maps/special_warps.asm"
diff --git a/engine/overworld/spinners.asm b/engine/overworld/spinners.asm
new file mode 100644
index 00000000..0ac6380d
--- /dev/null
+++ b/engine/overworld/spinners.asm
@@ -0,0 +1,65 @@
+LoadSpinnerArrowTiles::
+ ld a, [wSpritePlayerStateData1ImageIndex]
+ srl a
+ srl a
+ ld hl, SpinnerPlayerFacingDirections
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hl]
+ ld [wSpritePlayerStateData1ImageIndex], a
+ ld a, [wCurMapTileset]
+ cp FACILITY
+ ld hl, FacilitySpinnerArrows
+ jr z, .asm_44ff6
+ ld hl, GymSpinnerArrows
+.asm_44ff6
+ ld a, [wSimulatedJoypadStatesIndex]
+ bit 0, a
+ jr nz, .asm_45001
+ ld de, $18
+ add hl, de
+.asm_45001
+ ld a, $4
+ ld bc, $0
+.asm_45006
+ push af
+ push hl
+ push bc
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ call CopyVideoData
+ pop bc
+ ld a, $6
+ add c
+ ld c, a
+ pop hl
+ pop af
+ dec a
+ jr nz, .asm_45006
+ ret
+
+INCLUDE "data/tilesets/spinner_tiles.asm"
+
+SpinnerPlayerFacingDirections:
+; This isn't the order of the facing directions. Rather, it's a list of
+; the facing directions that come next. For example, when the player is
+; facing down (00), the next facing direction is left (08).
+ db $08 ; down -> left
+ db $0C ; up -> right
+ db $04 ; left -> up
+ db $00 ; right -> down
+
+; these tiles are the animation for the tiles that push the player in dungeons like Rocket HQ
+SpinnerArrowAnimTiles:
+ INCBIN "gfx/overworld/spinners.2bpp"
diff --git a/engine/overworld/sprite_collisions.asm b/engine/overworld/sprite_collisions.asm
new file mode 100644
index 00000000..db81977b
--- /dev/null
+++ b/engine/overworld/sprite_collisions.asm
@@ -0,0 +1,392 @@
+_UpdateSprites::
+ ld h, wSpriteStateData1 / $100
+ inc h
+ ld a, SPRITESTATEDATA2_IMAGEBASEOFFSET
+.spriteLoop
+ ld l, a
+ sub SPRITESTATEDATA2_IMAGEBASEOFFSET
+ ld c, a
+ ldh [hCurrentSpriteOffset], a
+ ld a, [hl]
+ and a
+ jr z, .skipSprite ; tests SPRITESTATEDATA2_IMAGEBASEOFFSET
+ push hl
+ push de
+ push bc
+ call .updateCurrentSprite
+ pop bc
+ pop de
+ pop hl
+.skipSprite
+ ld a, l
+ add $10 ; move to next sprite
+ cp SPRITESTATEDATA2_IMAGEBASEOFFSET ; test for overflow (back at beginning)
+ jr nz, .spriteLoop
+ ret
+.updateCurrentSprite
+ ldh a, [hCurrentSpriteOffset]
+ and a
+ jp z, UpdatePlayerSprite
+ cp $f0 ; pikachu
+ jp z, SpawnPikachu
+ ld a, [hl]
+
+UpdateNonPlayerSprite:
+ dec a
+ swap a
+ ldh [hTilePlayerStandingOn], a ; $10 * sprite#
+ ld a, [wNPCMovementScriptSpriteOffset] ; some sprite offset?
+ ld b, a
+ ldh a, [hCurrentSpriteOffset]
+ cp b
+ jr nz, .unequal
+ jp DoScriptedNPCMovement
+.unequal
+ jp UpdateNPCSprite
+
+; This detects if the current sprite (whose offset is at hCurrentSpriteOffset)
+; is going to collide with another sprite by looping over the other sprites.
+; The current sprite's offset will be labelled with i (e.g. i#SPRITESTATEDATA1_PICTUREID).
+; The loop sprite's offset will labelled with j (e.g. j#SPRITESTATEDATA1_PICTUREID).
+;
+; Note that the Y coordinate of the sprite (in [k#SPRITESTATEDATA1_YPIXELS])
+; is one of the following 9 values when the sprite is aligned with the grid:
+; $fc, $0c, $1c, $2c, ..., $7c.
+; The reason that 4 is added below to the coordinate is to make it align with a
+; multiple of $10 to make comparisons easier.
+DetectCollisionBetweenSprites:
+ ; nop
+
+ ld h, HIGH(wSpriteStateData1)
+ ldh a, [hCurrentSpriteOffset]
+ ld l, a
+
+ ld a, [hl] ; a = [i#SPRITESTATEDATA1_PICTUREID] (0 if slot is unused)
+ and a ; is this sprite slot slot used?
+ ret z ; return if not used
+
+ ld a, l
+ add 3
+ ld l, a
+
+ ld a, [hli] ; a = [i#SPRITESTATEDATA1_YSTEPVECTOR] (-1, 0, or 1)
+ call SetSpriteCollisionValues
+
+ ld a, [hli] ; a = [i#SPRITESTATEDATA1_YPIXELS]
+ add 4 ; align with multiple of $10
+
+; The effect of the following 3 lines is to
+; add 7 to a if moving south or
+; subtract 7 from a if moving north.
+ add b
+ and $f0
+ or c
+
+ ldh [hFF90], a ; store Y coordinate adjusted for direction of movement
+
+ ld a, [hli] ; a = [i#SPRITESTATEDATA1_XSTEPVECTOR] (-1, 0, or 1)
+ call SetSpriteCollisionValues
+ ld a, [hl] ; a = [i#SPRITESTATEDATA1_XPIXELS]
+
+; The effect of the following 3 lines is to
+; add 7 to a if moving east or
+; subtract 7 from a if moving west.
+ add b
+ and $f0
+ or c
+
+ ldh [hFF91], a ; store X coordinate adjusted for direction of movement
+
+ ld a, l
+ add 7
+ ld l, a
+
+ xor a
+ ld [hld], a ; zero [i#SPRITESTATEDATA1_0D] XXX what's this for?
+ ld [hld], a ; zero [i#SPRITESTATEDATA1_COLLISIONDATA]
+
+ ldh a, [hFF91]
+ ld [hld], a ; [i#SPRITESTATEDATA1_XADJUSTED]
+ ldh a, [hFF90]
+ ld [hl], a ; [i#SPRITESTATEDATA1_YADJUSTED]
+
+ xor a ; zero the loop counter
+
+.loop
+ ldh [hFF8F], a ; store loop counter
+ swap a
+ ld e, a
+ ldh a, [hCurrentSpriteOffset]
+ cp e ; does the loop sprite match the current sprite?
+ jp z, .next ; go to the next sprite if they match
+
+ ld d, h
+ ld a, [de] ; a = [j#SPRITESTATEDATA1_PICTUREID] (0 if slot is unused)
+ and a ; is this sprite slot slot used?
+ jp z, .next ; go the next sprite if not used
+
+ inc e
+ inc e
+ ld a, [de] ; a = [j#SPRITESTATEDATA1_IMAGEINDEX] ($ff means the sprite is offscreen)
+ inc a
+ jp z, .next ; go the next sprite if offscreen
+
+ ldh a, [hCurrentSpriteOffset]
+ add 10
+ ld l, a
+
+ inc e
+ ld a, [de] ; a = [j#SPRITESTATEDATA1_YSTEPVECTOR]
+ call SetSpriteCollisionValues
+
+ inc e
+ ld a, [de] ; a = [j#SPRITESTATEDATA1_YPIXELS]
+ add 4 ; align with multiple of $10
+
+; The effect of the following 3 lines is to
+; add 7 to a if moving south or
+; subtract 7 from a if moving north.
+ add b
+ and $f0
+ or c
+
+ sub [hl] ; subtract [i#SPRITESTATEDATA1_YADJUSTED] from [j#SPRITESTATEDATA1_YADJUSTED]
+
+; calculate the absolute value of the difference to get the distance
+ jr nc, .noCarry1
+ cpl
+ inc a
+.noCarry1
+ ldh [hFF90], a ; store the distance between the two sprites' adjusted Y values
+
+; Use the carry flag set by the above subtraction to determine which sprite's
+; Y coordinate is larger. This information is used later to set
+; [i#SPRITESTATEDATA1_COLLISIONDATA].
+; The following 5 lines set the lowest 2 bits of c, which are later shifted left by 2.
+; If sprite i's Y is larger, set lowest 2 bits of c to 10.
+; If sprite j's Y is larger or both are equal, set lowest 2 bits of c to 01.
+ push af
+ rl c
+ pop af
+ ccf
+ rl c
+
+; If sprite i's delta Y is 0, then b = 7, else b = 9.
+ ld b, 7
+ ld a, [hl] ; a = [i#SPRITESTATEDATA1_YADJUSTED]
+ and $f
+ jr z, .next1
+ ld b, 9
+
+.next1
+ ldh a, [hFF90] ; a = distance between adjusted Y coordinates
+ sub b
+ ldh [hFF92], a ; store distance adjusted using sprite i's direction
+ ld a, b
+ ldh [hFF90], a ; store 7 or 9 depending on sprite i's delta Y
+ jr c, .checkXDistance
+
+; If sprite j's delta Y is 0, then b = 7, else b = 9.
+ ld b, 7
+ dec e
+ ld a, [de] ; a = [j#SPRITESTATEDATA1_YSTEPVECTOR]
+ inc e
+ and a
+ jr z, .next2
+ ld b, 9
+
+.next2
+ ldh a, [hFF92] ; a = distance adjusted using sprite i's direction
+ sub b ; adjust distance using sprite j's direction
+ jr z, .checkXDistance
+ jr nc, .next ; go to next sprite if distance is still positive after both adjustments
+
+.checkXDistance
+ inc e
+ inc l
+ ld a, [de] ; a = [j#SPRITESTATEDATA1_XSTEPVECTOR]
+
+ push bc
+
+ call SetSpriteCollisionValues
+ inc e
+ ld a, [de] ; a = [j#SPRITESTATEDATA1_XPIXELS]
+
+; The effect of the following 3 lines is to
+; add 7 to a if moving east or
+; subtract 7 from a if moving west.
+ add b
+ and $f0
+ or c
+
+ pop bc
+
+ sub [hl] ; subtract [i#SPRITESTATEDATA1_XADJUSTED] from [j#SPRITESTATEDATA1_XADJUSTED]
+
+; calculate the absolute value of the difference to get the distance
+ jr nc, .noCarry2
+ cpl
+ inc a
+.noCarry2
+ ldh [hFF91], a ; store the distance between the two sprites' adjusted X values
+
+; Use the carry flag set by the above subtraction to determine which sprite's
+; X coordinate is larger. This information is used later to set
+; [i#SPRITESTATEDATA1_COLLISIONDATA].
+; The following 5 lines set the lowest 2 bits of c.
+; If sprite i's X is larger, set lowest 2 bits of c to 10.
+; If sprite j's X is larger or both are equal, set lowest 2 bits of c to 01.
+ push af
+ rl c
+ pop af
+ ccf
+ rl c
+
+; If sprite i's delta X is 0, then b = 7, else b = 9.
+ ld b, 7
+ ld a, [hl] ; a = [i#SPRITESTATEDATA1_XADJUSTED]
+ and $f
+ jr z, .next3
+ ld b, 9
+
+.next3
+ ldh a, [hFF91] ; a = distance between adjusted X coordinates
+ sub b
+ ldh [hFF92], a ; store distance adjusted using sprite i's direction
+ ld a, b
+ ldh [hFF91], a ; store 7 or 9 depending on sprite i's delta X
+ jr c, .collision
+
+; If sprite j's delta X is 0, then b = 7, else b = 9.
+ ld b, 7
+ dec e
+ ld a, [de] ; a = [j#SPRITESTATEDATA1_XSTEPVECTOR]
+ inc e
+ and a
+ jr z, .next4
+ ld b, 9
+
+.next4
+ ldh a, [hFF92] ; a = distance adjusted using sprite i's direction
+ sub b ; adjust distance using sprite j's direction
+ jr z, .collision
+ jr nc, .next ; go to next sprite if distance is still positive after both adjustments
+
+.collision
+ ld a, l
+ and $f0 ; collision with pikachu?
+ jr nz, .asm_4cd9
+ xor a
+ ld [wd434], a
+ ldh a, [hFF8F]
+ cp $f
+ jr nz, .asm_4cd9
+ call Func_4d0a
+ jr .asm_4cef
+.asm_4cd9
+ ldh a, [hFF91] ; a = 7 or 9 depending on sprite i's delta X
+ ld b, a
+ ldh a, [hFF90] ; a = 7 or 9 depending on sprite i's delta Y
+ inc l
+
+; If delta X isn't 0 and delta Y is 0, then b = %0011, else b = %1100.
+; (note that normally if delta X isn't 0, then delta Y must be 0 and vice versa)
+ cp b
+ jr c, .next5
+ ld b, %1100
+ jr .next6
+.next5
+ ld b, %0011
+
+.next6
+ ld a, c ; c has 2 bits set (one of bits 0-1 is set for the X axis and one of bits 2-3 for the Y axis)
+ and b ; we select either the bit in bits 0-1 or bits 2-3 based on the calculation immediately above
+ or [hl] ; or with existing collision direction bits in [i#SPRITESTATEDATA1_COLLISIONDATA]
+ ld [hl], a ; store new value
+ ld a, c ; useless code because a is overwritten before being used again
+
+; set bit in [i#SPRITESTATEDATA1_0E] or [i#SPRITESTATEDATA1_0F]
+; to indicate which sprite the collision occurred with
+ inc l
+ inc l
+.asm_4cef
+ ldh a, [hFF8F] ; a = loop counter
+ ld de, SpriteCollisionBitTable
+ add a
+ add e
+ ld e, a
+ jr nc, .noCarry3
+ inc d
+.noCarry3
+ ld a, [de]
+ or [hl]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ or [hl]
+ ld [hl], a
+
+.next
+ ldh a, [hFF8F] ; a = loop counter
+ inc a
+ cp $10
+ jp nz, .loop
+ ret
+
+; takes delta X or delta Y in a
+; b = delta X/Y
+; c = 0 if delta X/Y is 0
+; c = 7 if delta X/Y is 1
+; c = 9 if delta X/Y is -1
+Func_4d0a:
+ ldh a, [hFF91]
+ ld b, a
+ ldh a, [hFF90]
+ inc l
+ cp b
+ jr c, .asm_4d17
+ ld b, %1100
+ jr .asm_4d19
+.asm_4d17
+ ld b, %11
+.asm_4d19
+ ld a, c
+ and b
+ ld [wd434], a
+ ld a, c
+ inc l
+ inc l
+ ret
+
+SetSpriteCollisionValues:
+ and a
+ ld b, 0
+ ld c, 0
+ jr z, .done
+ ld c, 9
+ cp -1
+ jr z, .ok
+ ld c, 7
+ ld a, 0
+.ok
+ ld b, a
+.done
+ ret
+
+SpriteCollisionBitTable:
+ db %00000000,%00000001
+ db %00000000,%00000010
+ db %00000000,%00000100
+ db %00000000,%00001000
+ db %00000000,%00010000
+ db %00000000,%00100000
+ db %00000000,%01000000
+ db %00000000,%10000000
+ db %00000001,%00000000
+ db %00000010,%00000000
+ db %00000100,%00000000
+ db %00001000,%00000000
+ db %00010000,%00000000
+ db %00100000,%00000000
+ db %01000000,%00000000
+ db %10000000,%00000000
diff --git a/engine/overworld/ssanne.asm b/engine/overworld/ssanne.asm
deleted file mode 100755
index cf3b1284..00000000
--- a/engine/overworld/ssanne.asm
+++ /dev/null
@@ -1,95 +0,0 @@
-AnimateBoulderDust:
- ld a, $1
- ld [wWhichAnimationOffsets], a ; select the boulder dust offsets
- ld a, [wUpdateSpritesEnabled]
- push af
- ld a, $ff
- ld [wUpdateSpritesEnabled], a
- ld a, %11100100
- ld [rOBP1], a
- call UpdateGBCPal_OBP1
- call LoadSmokeTileFourTimes
- callba WriteCutOrBoulderDustAnimationOAMBlock
- ld c, 8 ; number of steps in animation
-.loop
- push bc
- call GetMoveBoulderDustFunctionPointer
- ld bc, .returnAddress
- push bc
- ld c, 4
- jp hl
-.returnAddress
- ld a, [rOBP1]
- xor %01100100
- ld [rOBP1], a
- call UpdateGBCPal_OBP1
- call Delay3
- pop bc
- dec c
- jr nz, .loop
- pop af
- ld [wUpdateSpritesEnabled], a
- jp LoadPlayerSpriteGraphics
-
-GetMoveBoulderDustFunctionPointer:
- ld a, [wSpritePlayerStateData1FacingDirection] ; player's sprite facing direction
- ld hl, MoveBoulderDustFunctionPointerTable
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [hli]
- ld [wCoordAdjustmentAmount], a
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld h, [hl]
- ld l, a
- push hl
- ld hl, wOAMBuffer + $90
- ld d, $0
- add hl, de
- ld e, l
- ld d, h
- pop hl
- ret
-
-MoveBoulderDustFunctionPointerTable:
-; facing down
- db $FF,$00
- dw AdjustOAMBlockYPos
-
-; facing up
- db $01,$00
- dw AdjustOAMBlockYPos
-
-; facing left
- db $01,$01
- dw AdjustOAMBlockXPos
-
-; facing right
- db $FF,$01
- dw AdjustOAMBlockXPos
-
-LoadSmokeTileFourTimes:
- ld hl, vChars1 + $7c0
- ld c, $4
-.loop
- push bc
- push hl
- call LoadSmokeTile
- pop hl
- ld bc, $10
- add hl, bc
- pop bc
- dec c
- jr nz, .loop
- ret
-
-LoadSmokeTile:
- ld de, SSAnneSmokePuffTile
- lb bc, BANK(SSAnneSmokePuffTile), (SSAnneSmokePuffTileEnd - SSAnneSmokePuffTile) / $10
- jp CopyVideoData
-
-SSAnneSmokePuffTile:
- INCBIN "gfx/ss_anne_smoke_puff.2bpp"
-SSAnneSmokePuffTileEnd:
diff --git a/engine/overworld/tileset_header.asm b/engine/overworld/tileset_header.asm
deleted file mode 100644
index 05061651..00000000
--- a/engine/overworld/tileset_header.asm
+++ /dev/null
@@ -1,51 +0,0 @@
-LoadTilesetHeader:
- call GetPredefRegisters
- push hl
- ld d, 0
- ld a, [wCurMapTileset]
- add a
- add a
- ld e, a
- ld hl, Tilesets
- add hl, de
- add hl, de
- add hl, de
- ld de, wTilesetBank
- ld bc, $b
- call CopyData
- ld a, [hl]
- ld [hTilesetType], a
- xor a
- ld [$ffd8], a
- pop hl
- ld a, [wCurMapTileset]
- push hl
- push de
- ld hl, DungeonTilesets
- ld de, $1
- call IsInArray
- pop de
- pop hl
- jr c, .notDungeonTileset
- ld a, [wCurMapTileset]
- ld b, a
- ld a, [hPreviousTileset]
- cp b
- jr z, .done
-.notDungeonTileset
- ld a, [wDestinationWarpID]
- cp $ff
- jr z, .done
- call LoadDestinationWarpPosition
- ld a, [wYCoord]
- and $1
- ld [wYBlockCoord], a
- ld a, [wXCoord]
- and $1
- ld [wXBlockCoord], a
-.done
- ret
-
-INCLUDE "data/dungeon_tilesets.asm"
-
-INCLUDE "data/tileset_headers.asm"
diff --git a/engine/overworld/tilesets.asm b/engine/overworld/tilesets.asm
new file mode 100644
index 00000000..686fa50c
--- /dev/null
+++ b/engine/overworld/tilesets.asm
@@ -0,0 +1,51 @@
+LoadTilesetHeader:
+ call GetPredefRegisters
+ push hl
+ ld d, 0
+ ld a, [wCurMapTileset]
+ add a
+ add a
+ ld e, a
+ ld hl, Tilesets
+ add hl, de
+ add hl, de
+ add hl, de
+ ld de, wTilesetBank
+ ld bc, $b
+ call CopyData
+ ld a, [hl]
+ ldh [hTilesetType], a
+ xor a
+ ldh [hMovingBGTilesCounter1], a
+ pop hl
+ ld a, [wCurMapTileset]
+ push hl
+ push de
+ ld hl, DungeonTilesets
+ ld de, $1
+ call IsInArray
+ pop de
+ pop hl
+ jr c, .notDungeonTileset
+ ld a, [wCurMapTileset]
+ ld b, a
+ ldh a, [hPreviousTileset]
+ cp b
+ jr z, .done
+.notDungeonTileset
+ ld a, [wDestinationWarpID]
+ cp $ff
+ jr z, .done
+ call LoadDestinationWarpPosition
+ ld a, [wYCoord]
+ and $1
+ ld [wYBlockCoord], a
+ ld a, [wXCoord]
+ and $1
+ ld [wXBlockCoord], a
+.done
+ ret
+
+INCLUDE "data/tilesets/dungeon_tilesets.asm"
+
+INCLUDE "data/tilesets/tileset_headers.asm"
diff --git a/engine/overworld/trainer_sight.asm b/engine/overworld/trainer_sight.asm
new file mode 100755
index 00000000..816dea7f
--- /dev/null
+++ b/engine/overworld/trainer_sight.asm
@@ -0,0 +1,349 @@
+_GetSpritePosition1::
+ ld hl, wSpriteStateData1
+ ld de, SPRITESTATEDATA1_YPIXELS
+ ld a, [wSpriteIndex]
+ ldh [hSpriteIndex], a
+ call GetSpriteDataPointer
+ ld a, [hli] ; x#SPRITESTATEDATA1_YPIXELS
+ ldh [hSpriteScreenYCoord], a
+ inc hl
+ ld a, [hl] ; x#SPRITESTATEDATA1_XPIXELS
+ ldh [hSpriteScreenXCoord], a
+ ld de, wSpritePlayerStateData2MapY - wSpritePlayerStateData1XPixels
+ add hl, de
+ ld a, [hli] ; x#SPRITESTATEDATA2_MAPY
+ ldh [hSpriteMapYCoord], a
+ ld a, [hl] ; x#SPRITESTATEDATA2_MAPX
+ ldh [hSpriteMapXCoord], a
+ ret
+
+_GetSpritePosition2::
+ ld hl, wSpriteStateData1
+ ld de, SPRITESTATEDATA1_YPIXELS
+ ld a, [wSpriteIndex]
+ ldh [hSpriteIndex], a
+ call GetSpriteDataPointer
+ ld a, [hli] ; x#SPRITESTATEDATA1_YPIXELS
+ ld [wSavedSpriteScreenY], a
+ inc hl
+ ld a, [hl] ; x#SPRITESTATEDATA1_XPIXELS
+ ld [wSavedSpriteScreenX], a
+ ld de, wSpritePlayerStateData2MapY - wSpritePlayerStateData1XPixels
+ add hl, de
+ ld a, [hli] ; x#SPRITESTATEDATA2_MAPY
+ ld [wSavedSpriteMapY], a
+ ld a, [hl] ; x#SPRITESTATEDATA2_MAPX
+ ld [wSavedSpriteMapX], a
+ ret
+
+_SetSpritePosition1::
+ ld hl, wSpriteStateData1
+ ld de, SPRITESTATEDATA1_YPIXELS
+ ld a, [wSpriteIndex]
+ ldh [hSpriteIndex], a
+ call GetSpriteDataPointer
+ ldh a, [hSpriteScreenYCoord] ; x#SPRITESTATEDATA1_YPIXELS
+ ld [hli], a
+ inc hl
+ ldh a, [hSpriteScreenXCoord] ; x#SPRITESTATEDATA1_XPIXELS
+ ld [hl], a
+ ld de, wSpritePlayerStateData2MapY - wSpritePlayerStateData1XPixels
+ add hl, de
+ ldh a, [hSpriteMapYCoord] ; x#SPRITESTATEDATA2_MAPY
+ ld [hli], a
+ ldh a, [hSpriteMapXCoord] ; x#SPRITESTATEDATA2_MAPX
+ ld [hl], a
+ ret
+
+_SetSpritePosition2::
+ ld hl, wSpriteStateData1
+ ld de, SPRITESTATEDATA1_YPIXELS
+ ld a, [wSpriteIndex]
+ ldh [hSpriteIndex], a
+ call GetSpriteDataPointer
+ ld a, [wSavedSpriteScreenY]
+ ld [hli], a ; x#SPRITESTATEDATA1_YPIXELS
+ inc hl
+ ld a, [wSavedSpriteScreenX]
+ ld [hl], a ; x#SPRITESTATEDATA1_XPIXELS
+ ld de, wSpritePlayerStateData2MapY - wSpritePlayerStateData1XPixels
+ add hl, de
+ ld a, [wSavedSpriteMapY]
+ ld [hli], a ; x#SPRITESTATEDATA2_MAPY
+ ld a, [wSavedSpriteMapX]
+ ld [hl], a ; x#SPRITESTATEDATA2_MAPX
+ ret
+
+TrainerWalkUpToPlayer::
+ ld a, [wSpriteIndex]
+ swap a
+ ld [wTrainerSpriteOffset], a
+ call ReadTrainerScreenPosition
+ ld a, [wTrainerFacingDirection]
+ and a ; SPRITE_FACING_DOWN
+ jr z, .facingDown
+ cp SPRITE_FACING_UP
+ jr z, .facingUp
+ cp SPRITE_FACING_LEFT
+ jr z, .facingLeft
+ jr .facingRight
+.facingDown
+ ld a, [wTrainerScreenY]
+ ld b, a
+ ld a, $3c ; (fixed) player screen Y pos
+ call CalcDifference
+ cp $10 ; trainer is right above player
+ ret z
+ swap a
+ dec a
+ ld c, a ; bc = steps yet to go to reach player
+ xor a
+ ld b, a ; a = direction to go to
+ jr .writeWalkScript
+.facingUp
+ ld a, [wTrainerScreenY]
+ ld b, a
+ ld a, $3c ; (fixed) player screen Y pos
+ call CalcDifference
+ cp $10 ; trainer is right below player
+ ret z
+ swap a
+ dec a
+ ld c, a ; bc = steps yet to go to reach player
+ ld b, $0
+ ld a, $40 ; a = direction to go to
+ jr .writeWalkScript
+.facingRight
+ ld a, [wTrainerScreenX]
+ ld b, a
+ ld a, $40 ; (fixed) player screen X pos
+ call CalcDifference
+ cp $10 ; trainer is directly left of player
+ ret z
+ swap a
+ dec a
+ ld c, a ; bc = steps yet to go to reach player
+ ld b, $0
+ ld a, $c0 ; a = direction to go to
+ jr .writeWalkScript
+.facingLeft
+ ld a, [wTrainerScreenX]
+ ld b, a
+ ld a, $40 ; (fixed) player screen X pos
+ call CalcDifference
+ cp $10 ; trainer is directly right of player
+ ret z
+ swap a
+ dec a
+ ld c, a ; bc = steps yet to go to reach player
+ ld b, $0
+ ld a, $80 ; a = direction to go to
+.writeWalkScript
+ ld hl, wNPCMovementDirections2
+ ld de, wNPCMovementDirections2
+ call FillMemory ; write the necessary steps to reach player
+ ld [hl], $ff ; write end of list sentinel
+ ld a, [wSpriteIndex]
+ ldh [hSpriteIndex], a
+ jp MoveSprite_
+
+; input: de = offset within sprite entry
+; output: hl = pointer to sprite data
+GetSpriteDataPointer:
+ push de
+ add hl, de
+ ldh a, [hSpriteIndex]
+ swap a
+ ld d, $0
+ ld e, a
+ add hl, de
+ pop de
+ ret
+
+; tests if this trainer is in the right position to engage the player and do so if she is.
+TrainerEngage:
+ push hl
+ push de
+ ld a, [wTrainerSpriteOffset]
+ add SPRITESTATEDATA1_IMAGEINDEX
+ ld d, $0
+ ld e, a
+ ld hl, wSpriteStateData1
+ add hl, de
+ ld a, [hl] ; x#SPRITESTATEDATA1_IMAGEINDEX
+ sub $ff
+ jr nz, .spriteOnScreen ; test if sprite is on screen
+ jp .noEngage
+.spriteOnScreen
+ ld a, [wTrainerSpriteOffset]
+ add SPRITESTATEDATA1_FACINGDIRECTION
+ ld d, $0
+ ld e, a
+ ld hl, wSpriteStateData1
+ add hl, de
+ ld a, [hl] ; x#SPRITESTATEDATA1_FACINGDIRECTION
+ ld [wTrainerFacingDirection], a
+ call ReadTrainerScreenPosition
+ ld a, [wTrainerScreenY] ; sprite screen Y pos
+ ld b, a
+ ld a, $3c
+ cp b
+ jr z, .linedUpY
+ ld a, [wTrainerScreenX] ; sprite screen X pos
+ ld b, a
+ ld a, $40
+ cp b
+ jr z, .linedUpX
+ xor a
+ jp .noEngage
+.linedUpY
+ ld a, [wTrainerScreenX] ; sprite screen X pos
+ ld b, a
+ ld a, $40 ; (fixed) player X position
+ call CalcDifference ; calc distance
+ jr z, .noEngage ; exact same position as player
+ call CheckSpriteCanSeePlayer
+ jr c, .engage
+ xor a
+ jr .noEngage
+.linedUpX
+ ld a, [wTrainerScreenY] ; sprite screen Y pos
+ ld b, a
+ ld a, $3c ; (fixed) player Y position
+ call CalcDifference ; calc distance
+ jr z, .noEngage ; exact same position as player
+ call CheckSpriteCanSeePlayer
+ jr c, .engage
+ xor a
+ jp .noEngage
+.engage
+ call CheckPlayerIsInFrontOfSprite
+ ld a, [wTrainerSpriteOffset]
+ and a
+ jr z, .noEngage
+ ld hl, wFlags_0xcd60
+ set 0, [hl]
+ call EngageMapTrainer
+ ld a, $ff
+.noEngage
+ ld [wTrainerSpriteOffset], a
+ pop de
+ pop hl
+ ret
+
+; reads trainer's Y position to wTrainerScreenY and X position to wTrainerScreenX
+ReadTrainerScreenPosition:
+ ld a, [wTrainerSpriteOffset]
+ add SPRITESTATEDATA1_YPIXELS
+ ld d, $0
+ ld e, a
+ ld hl, wSpriteStateData1
+ add hl, de
+ ld a, [hl] ; x#SPRITESTATEDATA1_YPIXELS
+ ld [wTrainerScreenY], a
+ ld a, [wTrainerSpriteOffset]
+ add SPRITESTATEDATA1_XPIXELS
+ ld d, $0
+ ld e, a
+ ld hl, wSpriteStateData1
+ add hl, de
+ ld a, [hl] ; x#SPRITESTATEDATA1_XPIXELS
+ ld [wTrainerScreenX], a
+ ret
+
+; checks if the sprite is properly lined up with the player with respect to the direction it's looking. Also checks the distance between player and sprite
+; note that this does not necessarily mean the sprite is seeing the player, he could be behind it's back
+; a: distance player to sprite
+CheckSpriteCanSeePlayer:
+ ld b, a
+ ld a, [wTrainerEngageDistance] ; how far the trainer can see
+ cp b
+ jr nc, .checkIfLinedUp
+ jr .notInLine ; player too far away
+.checkIfLinedUp
+ ld a, [wTrainerFacingDirection] ; sprite facing direction
+ cp SPRITE_FACING_DOWN
+ jr z, .checkXCoord
+ cp SPRITE_FACING_UP
+ jr z, .checkXCoord
+ cp SPRITE_FACING_LEFT
+ jr z, .checkYCoord
+ cp SPRITE_FACING_RIGHT
+ jr z, .checkYCoord
+ jr .notInLine
+.checkXCoord
+ ld a, [wTrainerScreenX] ; sprite screen X position
+ ld b, a
+ cp $40
+ jr z, .inLine
+ jr .notInLine
+.checkYCoord
+ ld a, [wTrainerScreenY] ; sprite screen Y position
+ ld b, a
+ cp $3c
+ jr nz, .notInLine
+.inLine
+ scf
+ ret
+.notInLine
+ and a
+ ret
+
+; tests if the player is in front of the sprite (rather than behind it)
+CheckPlayerIsInFrontOfSprite:
+ ld a, [wCurMap]
+ cp POWER_PLANT
+ jp z, .engage ; bypass this for power plant to get voltorb fake items to work
+ ld a, [wTrainerSpriteOffset]
+ add SPRITESTATEDATA1_YPIXELS
+ ld d, $0
+ ld e, a
+ ld hl, wSpriteStateData1
+ add hl, de
+ ld a, [hl] ; x#SPRITESTATEDATA1_YPIXELS
+ cp $fc
+ jr nz, .notOnTopmostTile ; special case if sprite is on topmost tile (Y = $fc (-4)), make it come down a block
+ ld a, $c
+.notOnTopmostTile
+ ld [wTrainerScreenY], a
+ ld a, [wTrainerSpriteOffset]
+ add SPRITESTATEDATA1_XPIXELS
+ ld d, $0
+ ld e, a
+ ld hl, wSpriteStateData1
+ add hl, de
+ ld a, [hl] ; x#SPRITESTATEDATA1_XPIXELS
+ ld [wTrainerScreenX], a
+ ld a, [wTrainerFacingDirection] ; facing direction
+ cp SPRITE_FACING_DOWN
+ jr nz, .notFacingDown
+ ld a, [wTrainerScreenY] ; sprite screen Y pos
+ cp $3c
+ jr c, .engage ; sprite above player
+ jr .noEngage ; sprite below player
+.notFacingDown
+ cp SPRITE_FACING_UP
+ jr nz, .notFacingUp
+ ld a, [wTrainerScreenY] ; sprite screen Y pos
+ cp $3c
+ jr nc, .engage ; sprite below player
+ jr .noEngage ; sprite above player
+.notFacingUp
+ cp SPRITE_FACING_LEFT
+ jr nz, .notFacingLeft
+ ld a, [wTrainerScreenX] ; sprite screen X pos
+ cp $40
+ jr nc, .engage ; sprite right of player
+ jr .noEngage ; sprite left of player
+.notFacingLeft
+ ld a, [wTrainerScreenX] ; sprite screen X pos
+ cp $40
+ jr nc, .noEngage ; sprite right of player
+.engage
+ ld a, $ff
+ jr .done
+.noEngage
+ xor a
+.done
+ ld [wTrainerSpriteOffset], a
+ ret
diff --git a/engine/overworld/trainers.asm b/engine/overworld/trainers.asm
deleted file mode 100755
index 655c6b2a..00000000
--- a/engine/overworld/trainers.asm
+++ /dev/null
@@ -1,349 +0,0 @@
-_GetSpritePosition1:
- ld hl, wSpriteStateData1
- ld de, $4
- ld a, [wSpriteIndex]
- ld [H_SPRITEINDEX], a
- call GetSpriteDataPointer
- ld a, [hli] ; c1x4 (screen Y pos)
- ld [$ffeb], a
- inc hl
- ld a, [hl] ; c1x6 (screen X pos)
- ld [$ffec], a
- ld de, (wSpriteStateData2 + $4) - (wSpriteStateData1 + $6)
- add hl, de
- ld a, [hli] ; c2x4 (map Y pos)
- ld [$ffed], a
- ld a, [hl] ; c2x5 (map X pos)
- ld [$ffee], a
- ret
-
-_GetSpritePosition2:
- ld hl, wSpriteStateData1
- ld de, $4
- ld a, [wSpriteIndex]
- ld [H_SPRITEINDEX], a
- call GetSpriteDataPointer
- ld a, [hli] ; c1x4 (screen Y pos)
- ld [wSavedSpriteScreenY], a
- inc hl
- ld a, [hl] ; c1x6 (screen X pos)
- ld [wSavedSpriteScreenX], a
- ld de, (wSpriteStateData2 + $4) - (wSpriteStateData1 + $6)
- add hl, de
- ld a, [hli] ; c2x4 (map Y pos)
- ld [wSavedSpriteMapY], a
- ld a, [hl] ; c2x5 (map X pos)
- ld [wSavedSpriteMapX], a
- ret
-
-_SetSpritePosition1:
- ld hl, wSpriteStateData1
- ld de, $4
- ld a, [wSpriteIndex]
- ld [H_SPRITEINDEX], a
- call GetSpriteDataPointer
- ld a, [$ffeb] ; c1x4 (screen Y pos)
- ld [hli], a
- inc hl
- ld a, [$ffec] ; c1x6 (screen X pos)
- ld [hl], a
- ld de, (wSpriteStateData2 + $4) - (wSpriteStateData1 + $6)
- add hl, de
- ld a, [$ffed] ; c2x4 (map Y pos)
- ld [hli], a
- ld a, [$ffee] ; c2x5 (map X pos)
- ld [hl], a
- ret
-
-_SetSpritePosition2:
- ld hl, wSpriteStateData1
- ld de, 4
- ld a, [wSpriteIndex]
- ld [H_SPRITEINDEX], a
- call GetSpriteDataPointer
- ld a, [wSavedSpriteScreenY]
- ld [hli], a ; c1x4 (screen Y pos)
- inc hl
- ld a, [wSavedSpriteScreenX]
- ld [hl], a ; c1x6 (screen X pos)
- ld de, (wSpriteStateData2 + $4) - (wSpriteStateData1 + $6)
- add hl, de
- ld a, [wSavedSpriteMapY]
- ld [hli], a ; c2x4 (map Y pos)
- ld a, [wSavedSpriteMapX]
- ld [hl], a ; c2x5 (map X pos)
- ret
-
-TrainerWalkUpToPlayer:
- ld a, [wSpriteIndex]
- swap a
- ld [wTrainerSpriteOffset], a
- call ReadTrainerScreenPosition
- ld a, [wTrainerFacingDirection]
- and a ; SPRITE_FACING_DOWN
- jr z, .facingDown
- cp SPRITE_FACING_UP
- jr z, .facingUp
- cp SPRITE_FACING_LEFT
- jr z, .facingLeft
- jr .facingRight
-.facingDown
- ld a, [wTrainerScreenY]
- ld b, a
- ld a, $3c ; (fixed) player screen Y pos
- call CalcDifference
- cp $10 ; trainer is right above player
- ret z
- swap a
- dec a
- ld c, a ; bc = steps yet to go to reach player
- xor a
- ld b, a ; a = direction to go to
- jr .writeWalkScript
-.facingUp
- ld a, [wTrainerScreenY]
- ld b, a
- ld a, $3c ; (fixed) player screen Y pos
- call CalcDifference
- cp $10 ; trainer is right below player
- ret z
- swap a
- dec a
- ld c, a ; bc = steps yet to go to reach player
- ld b, $0
- ld a, $40 ; a = direction to go to
- jr .writeWalkScript
-.facingRight
- ld a, [wTrainerScreenX]
- ld b, a
- ld a, $40 ; (fixed) player screen X pos
- call CalcDifference
- cp $10 ; trainer is directly left of player
- ret z
- swap a
- dec a
- ld c, a ; bc = steps yet to go to reach player
- ld b, $0
- ld a, $c0 ; a = direction to go to
- jr .writeWalkScript
-.facingLeft
- ld a, [wTrainerScreenX]
- ld b, a
- ld a, $40 ; (fixed) player screen X pos
- call CalcDifference
- cp $10 ; trainer is directly right of player
- ret z
- swap a
- dec a
- ld c, a ; bc = steps yet to go to reach player
- ld b, $0
- ld a, $80 ; a = direction to go to
-.writeWalkScript
- ld hl, wNPCMovementDirections2
- ld de, wNPCMovementDirections2
- call FillMemory ; write the necessary steps to reach player
- ld [hl], $ff ; write end of list sentinel
- ld a, [wSpriteIndex]
- ld [H_SPRITEINDEX], a
- jp MoveSprite_
-
-; input: de = offset within sprite entry
-; output: hl = pointer to sprite data
-GetSpriteDataPointer:
- push de
- add hl, de
- ld a, [H_SPRITEINDEX]
- swap a
- ld d, $0
- ld e, a
- add hl, de
- pop de
- ret
-
-; tests if this trainer is in the right position to engage the player and do so if she is.
-TrainerEngage:
- push hl
- push de
- ld a, [wTrainerSpriteOffset]
- add $2
- ld d, $0
- ld e, a
- ld hl, wSpriteStateData1
- add hl, de
- ld a, [hl] ; c1x2: sprite image index
- sub $ff
- jr nz, .spriteOnScreen ; test if sprite is on screen
- jp .noEngage
-.spriteOnScreen
- ld a, [wTrainerSpriteOffset]
- add $9
- ld d, $0
- ld e, a
- ld hl, wSpriteStateData1
- add hl, de
- ld a, [hl] ; c1x9: facing direction
- ld [wTrainerFacingDirection], a
- call ReadTrainerScreenPosition
- ld a, [wTrainerScreenY] ; sprite screen Y pos
- ld b, a
- ld a, $3c
- cp b
- jr z, .linedUpY
- ld a, [wTrainerScreenX] ; sprite screen X pos
- ld b, a
- ld a, $40
- cp b
- jr z, .linedUpX
- xor a
- jp .noEngage
-.linedUpY
- ld a, [wTrainerScreenX] ; sprite screen X pos
- ld b, a
- ld a, $40 ; (fixed) player X position
- call CalcDifference ; calc distance
- jr z, .noEngage ; exact same position as player
- call CheckSpriteCanSeePlayer
- jr c, .engage
- xor a
- jr .noEngage
-.linedUpX
- ld a, [wTrainerScreenY] ; sprite screen Y pos
- ld b, a
- ld a, $3c ; (fixed) player Y position
- call CalcDifference ; calc distance
- jr z, .noEngage ; exact same position as player
- call CheckSpriteCanSeePlayer
- jr c, .engage
- xor a
- jp .noEngage
-.engage
- call CheckPlayerIsInFrontOfSprite
- ld a, [wTrainerSpriteOffset]
- and a
- jr z, .noEngage
- ld hl, wFlags_0xcd60
- set 0, [hl]
- call EngageMapTrainer
- ld a, $ff
-.noEngage
- ld [wTrainerSpriteOffset], a
- pop de
- pop hl
- ret
-
-; reads trainer's Y position to wTrainerScreenY and X position to wTrainerScreenX
-ReadTrainerScreenPosition:
- ld a, [wTrainerSpriteOffset]
- add $4
- ld d, $0
- ld e, a
- ld hl, wSpriteStateData1
- add hl, de
- ld a, [hl] ; c1x4 (sprite Y pos)
- ld [wTrainerScreenY], a
- ld a, [wTrainerSpriteOffset]
- add $6
- ld d, $0
- ld e, a
- ld hl, wSpriteStateData1
- add hl, de
- ld a, [hl] ; c1x6 (sprite X pos)
- ld [wTrainerScreenX], a
- ret
-
-; checks if the sprite is properly lined up with the player with respect to the direction it's looking. Also checks the distance between player and sprite
-; note that this does not necessarily mean the sprite is seeing the player, he could be behind it's back
-; a: distance player to sprite
-CheckSpriteCanSeePlayer:
- ld b, a
- ld a, [wTrainerEngageDistance] ; how far the trainer can see
- cp b
- jr nc, .checkIfLinedUp
- jr .notInLine ; player too far away
-.checkIfLinedUp
- ld a, [wTrainerFacingDirection] ; sprite facing direction
- cp SPRITE_FACING_DOWN
- jr z, .checkXCoord
- cp SPRITE_FACING_UP
- jr z, .checkXCoord
- cp SPRITE_FACING_LEFT
- jr z, .checkYCoord
- cp SPRITE_FACING_RIGHT
- jr z, .checkYCoord
- jr .notInLine
-.checkXCoord
- ld a, [wTrainerScreenX] ; sprite screen X position
- ld b, a
- cp $40
- jr z, .inLine
- jr .notInLine
-.checkYCoord
- ld a, [wTrainerScreenY] ; sprite screen Y position
- ld b, a
- cp $3c
- jr nz, .notInLine
-.inLine
- scf
- ret
-.notInLine
- and a
- ret
-
-; tests if the player is in front of the sprite (rather than behind it)
-CheckPlayerIsInFrontOfSprite:
- ld a, [wCurMap]
- cp POWER_PLANT
- jp z, .engage ; bypass this for power plant to get voltorb fake items to work
- ld a, [wTrainerSpriteOffset]
- add $4
- ld d, $0
- ld e, a
- ld hl, wSpriteStateData1
- add hl, de
- ld a, [hl] ; c1x4 (sprite screen Y pos)
- cp $fc
- jr nz, .notOnTopmostTile ; special case if sprite is on topmost tile (Y = $fc (-4)), make it come down a block
- ld a, $c
-.notOnTopmostTile
- ld [wTrainerScreenY], a
- ld a, [wTrainerSpriteOffset]
- add $6
- ld d, $0
- ld e, a
- ld hl, wSpriteStateData1
- add hl, de
- ld a, [hl] ; c1x6 (sprite screen X pos)
- ld [wTrainerScreenX], a
- ld a, [wTrainerFacingDirection] ; facing direction
- cp SPRITE_FACING_DOWN
- jr nz, .notFacingDown
- ld a, [wTrainerScreenY] ; sprite screen Y pos
- cp $3c
- jr c, .engage ; sprite above player
- jr .noEngage ; sprite below player
-.notFacingDown
- cp SPRITE_FACING_UP
- jr nz, .notFacingUp
- ld a, [wTrainerScreenY] ; sprite screen Y pos
- cp $3c
- jr nc, .engage ; sprite below player
- jr .noEngage ; sprite above player
-.notFacingUp
- cp SPRITE_FACING_LEFT
- jr nz, .notFacingLeft
- ld a, [wTrainerScreenX] ; sprite screen X pos
- cp $40
- jr nc, .engage ; sprite right of player
- jr .noEngage ; sprite left of player
-.notFacingLeft
- ld a, [wTrainerScreenX] ; sprite screen X pos
- cp $40
- jr nc, .noEngage ; sprite right of player
-.engage
- ld a, $ff
- jr .done
-.noEngage
- xor a
-.done
- ld [wTrainerSpriteOffset], a
- ret
diff --git a/engine/overworld/update_map.asm b/engine/overworld/update_map.asm
index 8577b9e7..53a5592d 100644
--- a/engine/overworld/update_map.asm
+++ b/engine/overworld/update_map.asm
@@ -50,20 +50,20 @@ RedrawMapView:
ld a, [wIsInBattle]
inc a
ret z
- ld a, [H_AUTOBGTRANSFERENABLED]
+ ldh a, [hAutoBGTransferEnabled]
push af
- ld a, [hTilesetType]
+ ldh a, [hTilesetType]
push af
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld [hTilesetType], a ; no flower/water BG tile animations
+ ldh [hAutoBGTransferEnabled], a
+ ldh [hTilesetType], a ; no flower/water BG tile animations
call LoadCurrentMapView
call RunDefaultPaletteCommand
ld hl, wMapViewVRAMPointer
ld a, [hli]
ld h, [hl]
ld l, a
- ld de, -2 * 32
+ ld de, -2 * BG_MAP_WIDTH
add hl, de
ld a, h
and $3
@@ -73,23 +73,23 @@ RedrawMapView:
ld a, h
ld [wBuffer + 1], a ; this copy of the address is not used
ld a, 2
- ld [$ffbe], a
- ld c, 9 ; number of rows of 2x2 tiles (this covers the whole screen)
+ ldh [hRedrawMapViewRowOffset], a
+ ld c, SCREEN_HEIGHT / 2 ; number of rows of 2x2 tiles (this covers the whole screen)
.redrawRowLoop
push bc
push hl
push hl
ld hl, wTileMap - 2 * SCREEN_WIDTH
ld de, SCREEN_WIDTH
- ld a, [$ffbe]
+ ldh a, [hRedrawMapViewRowOffset]
.calcWRAMAddrLoop
add hl, de
dec a
jr nz, .calcWRAMAddrLoop
call CopyToRedrawRowOrColumnSrcTiles
pop hl
- ld de, $20
- ld a, [$ffbe]
+ ld de, BG_MAP_WIDTH
+ ldh a, [hRedrawMapViewRowOffset]
ld c, a
.calcVRAMAddrLoop
add hl, de
@@ -98,13 +98,13 @@ RedrawMapView:
or $98
dec c
jr nz, .calcVRAMAddrLoop
- ld [hRedrawRowOrColumnDest + 1], a
+ ldh [hRedrawRowOrColumnDest + 1], a
ld a, l
- ld [hRedrawRowOrColumnDest], a
+ ldh [hRedrawRowOrColumnDest], a
ld a, REDRAW_ROW
- ld [hRedrawRowOrColumnMode], a
+ ldh [hRedrawRowOrColumnMode], a
call DelayFrame
- ld hl, $ffbe
+ ld hl, hRedrawMapViewRowOffset
inc [hl]
inc [hl]
pop hl
@@ -112,9 +112,9 @@ RedrawMapView:
dec c
jr nz, .redrawRowLoop
pop af
- ld [hTilesetType], a
+ ldh [hTilesetType], a
pop af
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ret
CompareHLWithBC:
diff --git a/engine/overworld/wild_mons.asm b/engine/overworld/wild_mons.asm
index dae57f23..2593e0ec 100644
--- a/engine/overworld/wild_mons.asm
+++ b/engine/overworld/wild_mons.asm
@@ -1,4 +1,4 @@
-LoadWildData:
+LoadWildData::
ld hl, WildDataPointers
ld a, [wCurMap]
@@ -16,10 +16,10 @@ LoadWildData:
jr z, .NoGrassData ; if no grass data, skip to surfing data
push hl
ld de, wGrassMons ; otherwise, load grass data
- ld bc, $0014
+ ld bc, $14
call CopyData
pop hl
- ld bc, $0014
+ ld bc, $14
add hl, bc
.NoGrassData
ld a, [hli]
@@ -27,7 +27,7 @@ LoadWildData:
and a
ret z ; if no water data, we're done
ld de, wWaterMons ; otherwise, load surfing data
- ld bc, $0014
+ ld bc, $14
jp CopyData
-INCLUDE "data/wild_mons.asm"
+INCLUDE "data/wild/grass_water.asm"
diff --git a/engine/palettes.asm b/engine/palettes.asm
deleted file mode 100755
index ec9816ab..00000000
--- a/engine/palettes.asm
+++ /dev/null
@@ -1,1116 +0,0 @@
-_RunPaletteCommand:
- call GetPredefRegisters
- ld a, b
- cp $ff
- 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
- add hl, hl
- ld de, SetPalFunctions
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, SendSGBPackets
- push de
- jp hl
-
-SetPal_Black:
- ld hl, PalPacket_Black
- ld de, BlkPacket_Battle
- ret
-
-; uses PalPacket_Empty to build a packet based on mon IDs and health color
-SetPal_Battle:
- ld hl, PalPacket_Empty
- ld de, wPalPacket
- ld bc, $10
- call CopyData
- ;ld a, [wPlayerBattleStatus3]
- ld hl, wBattleMonSpecies
- ld a, [hl]
- and a
- jr z, .asm_71ef9
- ld hl, wPartyMon1
- ld a, [wPlayerMonNumber]
- ld bc, wPartyMon2 - wPartyMon1
- call AddNTimes
-.asm_71ef9
- call DeterminePaletteID
- ld b, a
- ;ld a, [wEnemyBattleStatus3]
- ld hl, wEnemyMonSpecies2
- call DeterminePaletteID
- ld c, a
- ld hl, wPalPacket + 1
- ld a, [wPlayerHPBarColor]
- add PAL_GREENBAR
- ld [hli], a
- inc hl
- ld a, [wEnemyHPBarColor]
- add PAL_GREENBAR
- ld [hli], a
- inc hl
- ld a, b
- ld [hli], a
- inc hl
- ld a, c
- ld [hl], a
- ld hl, wPalPacket
- ld de, BlkPacket_Battle
- ld a, SET_PAL_BATTLE
- ld [wDefaultPaletteCommand], a
- ret
-
-SetPal_TownMap:
- ld hl, PalPacket_TownMap
- ld de, BlkPacket_WholeScreen
- ret
-
-; uses PalPacket_Empty to build a packet based the mon ID
-SetPal_StatusScreen:
- ld hl, PalPacket_Empty
- ld de, wPalPacket
- ld bc, $10
- call CopyData
- ld a, [wcf91]
- cp NUM_POKEMON_INDEXES + 1
- jr c, .pokemon
- ld a, $1 ; not pokemon
-.pokemon
- call DeterminePaletteIDOutOfBattle
- push af
- ld hl, wPalPacket + 1
- ld a, [wStatusScreenHPBarColor]
- add PAL_GREENBAR
- ld [hli], a
- inc hl
- pop af
- ld [hl], a
- ld hl, wPalPacket
- ld de, BlkPacket_StatusScreen
- ret
-
-SetPal_PartyMenu:
- ld hl, PalPacket_PartyMenu
- ld de, wPartyMenuBlkPacket
- ret
-
-SetPal_Pokedex:
- ld hl, PalPacket_Pokedex
- ld de, wPalPacket
- ld bc, $10
- call CopyData
- ld a, [wcf91]
- call DeterminePaletteIDOutOfBattle
- ld hl, wPalPacket + 3
- ld [hl], a
- ld hl, wPalPacket
- ld de, BlkPacket_Pokedex
- ret
-
-SetPal_Slots:
- ld hl, PalPacket_Slots
- ld de, BlkPacket_Slots
- ret
-
-SetPal_Titlescreen:
- ld hl, PalPacket_Titlescreen
- ld de, BlkPacket_Titlescreen
- ret
-
-; used mostly for menus and the Oak intro
-SetPal_Generic:
- ld hl, PalPacket_Generic
- ld de, BlkPacket_WholeScreen
- ret
-
-SetPal_NidorinoIntro:
- ld hl, PalPacket_NidorinoIntro
- ld de, BlkPacket_NidorinoIntro
- ret
-
-SetPal_GameFreakIntro:
- ld hl, PalPacket_GameFreakIntro
- ld de, BlkPacket_GameFreakIntro
- ld a, SET_PAL_GENERIC
- ld [wDefaultPaletteCommand], a
- ret
-
-; uses PalPacket_Empty to build a packet based on the current map
-SetPal_Overworld:
- ld hl, PalPacket_Empty
- ld de, wPalPacket
- ld bc, $10
- call CopyData
- ld a, [wCurMapTileset]
- cp CEMETERY
- jr z, .PokemonTowerOrAgatha
- cp CAVERN
- jr z, .caveOrBruno
- ld a, [wCurMap]
- cp REDS_HOUSE_1F
- jr c, .townOrRoute
- cp CERULEAN_CAVE_2F
- jr c, .normalDungeonOrBuilding
- cp NAME_RATERS_HOUSE
- jr c, .caveOrBruno
- cp LORELEIS_ROOM
- jr z, .Lorelei
- cp BRUNOS_ROOM
- jr z, .caveOrBruno
- cp TRADE_CENTER
- jr z, .trade_center_colosseum
- cp COLOSSEUM
- jr z, .trade_center_colosseum
-.normalDungeonOrBuilding
- ld a, [wLastMap] ; town or route that current dungeon or building is located
-.townOrRoute
- cp SAFFRON_CITY + 1
- jr c, .town
- ld a, PAL_ROUTE - 1
-.town
- 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, SET_PAL_OVERWORLD
- ld [wDefaultPaletteCommand], a
- ret
-.PokemonTowerOrAgatha
- ld a, PAL_GREYMON - 1
- jr .town
-.caveOrBruno
- ld a, PAL_CAVE - 1
- jr .town
-.Lorelei
- xor a
- jr .town
-.trade_center_colosseum
- ld a, PAL_GREYMON - 1
- jr .town
-
-; used when a Pokemon is the only thing on the screen
-; such as evolution, trading and the Hall of Fame
-SetPal_PokemonWholeScreen:
- push bc
- ld hl, PalPacket_Empty
- ld de, wPalPacket
- ld bc, $10
- call CopyData
- pop bc
- ld a, c
- and a
- ld a, PAL_BLACK
- jr nz, .next
- ld a, [wWholeScreenPaletteMonSpecies]
- call DeterminePaletteIDOutOfBattle
-.next
- ld [wPalPacket + 1], a
- ld hl, wPalPacket
- ld de, BlkPacket_WholeScreen
- ret
-
-SetPal_TrainerCard:
- ld hl, BlkPacket_TrainerCard
- ld de, wTrainerCardBlkPacket
- ld bc, $40
- call CopyData
- ld de, BadgeBlkDataLengths
- ld hl, wTrainerCardBlkPacket + 2
- ld a, [wObtainedBadges]
- ld c, 8
-.badgeLoop
- srl a
- push af
- 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
-.zeroBadgeDataLoop
- ld [hli], a
- dec c
- jr nz, .zeroBadgeDataLoop
- pop bc
- jr .nextBadge
-.haveBadge
-; The player does have the badge, so skip past the badge's blk data.
- ld a, [de]
-.skipBadgeDataLoop
- inc hl
- dec a
- jr nz, .skipBadgeDataLoop
-.nextBadge
- pop af
- inc de
- dec c
- jr nz, .badgeLoop
- ld hl, PalPacket_TrainerCard
- ld de, wTrainerCardBlkPacket
- ret
-
-SendUnknownPalPacket_7205d::
- ld hl, UnknownPalPacket_72811
- ld de, BlkPacket_WholeScreen
- ret
-
-SendUnknownPalPacket_72064::
- ld hl, UnknownPalPacket_72821
- ld de, UnknownPacket_72751
- ret
-
-SetPalFunctions:
- dw SetPal_Black
- 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
- dw SendUnknownPalPacket_7205d
- dw SendUnknownPalPacket_72064
-
-; 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:
- 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:
- ld a, [hl]
-DeterminePaletteIDOutOfBattle:
- ld [wd11e], a
- and a ; is the mon index 0?
- jr z, .skipDexNumConversion
- push bc
- predef IndexToPokedex
- pop bc
- ld a, [wd11e]
-.skipDexNumConversion
- ld e, a
- ld d, 0
- ld hl, MonsterPalettes ; not just for Pokemon, Trainers use it too
- add hl, de
- ld a, [hl]
- ret
-
-YellowIntroPaletteAction::
- ld a, e
- and a
- jr nz, .asm_720bd
- ld hl, PalPacket_Generic
- ld a, [hGBC]
- and a
- jp z, SendSGBPacket
- jp InitGBCPalettes
-
-.asm_720bd
- ld hl, UnknownPalPacket_72811
- ld a, [hGBC]
- and a
- jp z, SendSGBPacket
- call InitGBCPalettes
- ld hl, PalPacket_Generic
- inc hl
- ld a, [hli]
- call GetGBCBasePalAddress
- ld a, e
- ld [wGBCBasePalPointers + 2], a
- ld a, d
- ld [wGBCBasePalPointers + 2 + 1], a
- xor a ; CONVERT_BGP
- call DMGPalToGBCPal
- ld a, 1
- call TransferCurBGPData
- ret
-
-LoadOverworldPikachuFrontpicPalettes::
- ld hl, PalPacket_Empty
- ld de, wPalPacket
- ld bc, $10
- call CopyData
- call GetPal_Pikachu
- ld hl, wPartyMenuBlkPacket
- ld [hl], a
- ld hl, wPartyMenuBlkPacket + 2
- ld a, $26
- ld [hl], a
- ld hl, wPalPacket
- ld a, [hGBC]
- and a
- jr nz, .cgb_1
- call SendSGBPacket
- jr .okay_1
-
-.cgb_1
- call InitGBCPalettes
-.okay_1
- ld hl, BlkPacket_WholeScreen
- ld de, wPalPacket
- ld bc, $10
- call CopyData
- ld hl, wPartyMenuBlkPacket + 2
- ld a, $5
- ld [hli], a
- ld a, $7
- ld [hli], a
- ld a, $6
- ld [hli], a
- ld a, $b
- ld [hli], a
- ld a, $a
- ld [hl], a
- ld hl, wPalPacket
- ld a, [hGBC]
- and a
- jr nz, .cgb_2
- call SendSGBPacket
- jr .okay_2
-
-.cgb_2
- call InitGBCPalettes
-.okay_2
- ret
-
-GetPal_Pikachu::
-; similar to SetPal_Overworld
- ld a, [wCurMapTileset]
- cp CEMETERY
- jr z, .PokemonTowerOrAgatha
- cp CAVERN
- jr z, .caveOrBruno
- ld a, [wCurMap]
- cp REDS_HOUSE_1F
- jr c, .townOrRoute
- cp CERULEAN_CAVE_2F
- jr c, .normalDungeonOrBuilding
- cp NAME_RATERS_HOUSE
- jr c, .caveOrBruno
- cp LORELEIS_ROOM
- jr z, .Lorelei
- cp BRUNOS_ROOM
- jr z, .caveOrBruno
- cp TRADE_CENTER
- jr z, .battleOrTradeCenter
- cp COLOSSEUM
- jr z, .battleOrTradeCenter
-.normalDungeonOrBuilding
- ld a, [wLastMap] ; town or route that current dungeon or building is located
-.townOrRoute
- cp SAFFRON_CITY + 1
- jr c, .town
- ld a, PAL_ROUTE - 1
-.town
- inc a ; a town's pallete ID is its map ID + 1
- ret
-
-.PokemonTowerOrAgatha
- ld a, PAL_GREYMON - 1
- jr .town
-
-.caveOrBruno
- ld a, PAL_CAVE - 1
- jr .town
-
-.Lorelei
- xor a ; PAL_PALLET - 1
- jr .town
-
-.battleOrTradeCenter
- ld a, PAL_GREYMON - 1
- jr .town
-
-InitPartyMenuBlkPacket:
- ld hl, BlkPacket_PartyMenu
- ld de, wPartyMenuBlkPacket
- ld bc, $30
- jp CopyData
-
-UpdatePartyMenuBlkPacket:
-; 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
- add hl, de
- ld e, l
- ld d, h
- ld a, [de]
- and a
- ld e, (1 << 2) | 1 ; green
- jr z, .next
- dec a
- ld e, (2 << 2) | 2 ; yellow
- jr z, .next
- ld e, (3 << 2) | 3 ; red
-.next
- push de
- ld hl, wPartyMenuBlkPacket + 8 + 1
- ld bc, 6
- ld a, [wWhichPartyMenuHPBar]
- call AddNTimes
- pop de
- ld [hl], e
- ret
-
-SendSGBPacket:
- ld a, 1
- ld [hDisableJoypadPolling], a ; don't poll joypad while sending packet
- call _SendSGBPacket
- xor a
- ld [hDisableJoypadPolling], a
- ret
-
-_SendSGBPacket:
-;check number of packets
- ld a, [hl]
- and $07
- ret z
-; store number of packets in B
- ld b, a
-.loop2
-; save B for later use
- push bc
-; send RESET signal (P14=LOW, P15=LOW)
- xor a
- ld [rJOYP], a
-; set P14=HIGH, P15=HIGH
- ld a, $30
- ld [rJOYP], a
-;load length of packets (16 bytes)
- ld b, $10
-.nextByte
-;set bit counter (8 bits per byte)
- ld e, $08
-; get next byte in the packet
- ld a, [hli]
- ld d, a
-.nextBit0
- bit 0, d
-; if 0th bit is not zero set P14=HIGH, P15=LOW (send bit 1)
- ld a, $10
- jr nz, .next0
-; else (if 0th bit is zero) set P14=LOW, P15=HIGH (send bit 0)
- ld a, $20
-.next0
- ld [rJOYP], a
-; must set P14=HIGH, P15=HIGH between each "pulse"
- ld a, $30
- ld [rJOYP], a
-; rotation will put next bit in 0th position (so we can always use command
-; "bit 0, d" to fetch the bit that has to be sent)
- rr d
-; decrease bit counter so we know when we have sent all 8 bits of current byte
- dec e
- jr nz, .nextBit0
- dec b
- jr nz, .nextByte
-; send bit 1 as a "stop bit" (end of parameter data)
- ld a, $20
- ld [rJOYP], a
-; set P14=HIGH, P15=HIGH
- ld a, $30
- ld [rJOYP], a
-; wait for about 70000 cycles
- call Wait7000
-; restore (previously pushed) number of packets
- pop bc
- dec b
-; return if there are no more packets
- ret z
-; else send 16 more bytes
- jr .loop2
-
-LoadSGB:
- xor a
- ld [wOnSGB], a
- call CheckSGB
- jr c, .onSGB
- ld a, [hGBC]
- and a
- jr z, .onDMG
- ld a, $1
- ld [wOnSGB], a
-.onDMG
- ret
-.onSGB
- ld a, $1
- ld [wOnSGB], a
- di
- call PrepareSuperNintendoVRAMTransfer
- ei
- ld a, 1
- ld [wCopyingSGBTileData], a
- ld de, ChrTrnPacket
- ld hl, SGBBorderGraphics
- call CopyGfxToSuperNintendoVRAM
- xor a
- ld [wCopyingSGBTileData], a
- ld de, PctTrnPacket
- ld hl, BorderPalettes
- call CopyGfxToSuperNintendoVRAM
- xor a
- ld [wCopyingSGBTileData], a
- ld de, PalTrnPacket
- ld hl, SuperPalettes
- call CopyGfxToSuperNintendoVRAM
- call ClearVram
- ld hl, MaskEnCancelPacket
- jp SendSGBPacket
-
-PrepareSuperNintendoVRAMTransfer:
- ld hl, .packetPointers
- ld c, 9
-.loop
- push bc
- ld a, [hli]
- push hl
- ld h, [hl]
- ld l, a
- call SendSGBPacket
- pop hl
- inc hl
- pop bc
- dec c
- jr nz, .loop
- ret
-
-.packetPointers
-; Only the first packet is needed.
- dw MaskEnFreezePacket
- dw DataSnd_728a1
- dw DataSnd_728b1
- dw DataSnd_728c1
- dw DataSnd_728d1
- dw DataSnd_728e1
- dw DataSnd_728f1
- dw DataSnd_72901
- dw DataSnd_72911
-
-CheckSGB:
-; Returns whether the game is running on an SGB in carry.
- ld hl, MltReq2Packet
- call SendSGBPacket
- call Wait7000
- ld a, [rJOYP]
- and $3
- cp $3
- jr nz, .isSGB
- ld a, $20
- ld [rJOYP], a
- ld a, [rJOYP]
- ld a, [rJOYP]
- call Wait7000
- call Wait7000
- ld a, $30
- ld [rJOYP], a
- call Wait7000
- call Wait7000
- ld a, $10
- ld [rJOYP], a
- ld a, [rJOYP]
- ld a, [rJOYP]
- ld a, [rJOYP]
- ld a, [rJOYP]
- ld a, [rJOYP]
- ld a, [rJOYP]
- call Wait7000
- call Wait7000
- ld a, $30
- ld [rJOYP], a
- ld a, [rJOYP]
- ld a, [rJOYP]
- ld a, [rJOYP]
- call Wait7000
- call Wait7000
- ld a, [rJOYP]
- and $3
- cp $3
- jr nz, .isSGB
- call SendMltReq1Packet
- and a
- ret
-.isSGB
- call SendMltReq1Packet
- scf
- ret
-
-SendMltReq1Packet:
- ld hl, MltReq1Packet
- call SendSGBPacket
- jp Wait7000
-
-CopyGfxToSuperNintendoVRAM:
- di
- push de
- call DisableLCD
- ld a, $e4
- ld [rBGP], a
- call _UpdateGBCPal_BGP_CheckDMG
- ld de, vChars1
- ld a, [wCopyingSGBTileData]
- and a
- jr z, .notCopyingTileData
- call CopySGBBorderTiles
- jr .next
-.notCopyingTileData
- ld bc, $1000
- call CopyData
-.next
- ld hl, vBGMap0
- ld de, $c
- ld a, $80
- ld c, $d
-.loop
- ld b, $14
-.innerLoop
- ld [hli], a
- inc a
- dec b
- jr nz, .innerLoop
- add hl, de
- dec c
- jr nz, .loop
- ld a, $e3
- ld [rLCDC], a
- pop hl
- call SendSGBPacket
- xor a
- ld [rBGP], a
- call _UpdateGBCPal_BGP_CheckDMG
- ei
- ret
-
-Wait7000:
-; Each loop takes 9 cycles so this routine actually waits 63000 cycles.
- ld de, 7000
-.loop
- nop
- nop
- nop
- dec de
- ld a, d
- or e
- jr nz, .loop
- ret
-
-SendSGBPackets:
- ld a, [hGBC]
- and a
- jr z, .notGBC
- push de
- call InitGBCPalettes
- pop hl
- call InitGBCPalettes
- ld a, [rLCDC]
- and rLCDC_ENABLE_MASK
- ret z
- call Delay3
- ret
-.notGBC
- push de
- call SendSGBPacket
- pop hl
- jp SendSGBPacket
-
-InitGBCPalettes:
- ld a, [hl]
- and $f8
- cp $20
- jp z, TranslatePalPacketToBGMapAttributes
-
- inc hl
-
-index = 0
-
- REPT NUM_ACTIVE_PALS
- IF index > 0
- pop hl
- ENDC
-
- ld a, [hli]
- inc hl
-
- IF index < (NUM_ACTIVE_PALS + -1)
- push hl
- ENDC
-
- call GetGBCBasePalAddress
- ld a, e
- ld [wGBCBasePalPointers + index * 2], a
- ld a, d
- ld [wGBCBasePalPointers + index * 2 + 1], a
-
- xor a ; CONVERT_BGP
- call DMGPalToGBCPal
- ld a, index
- call TransferCurBGPData
-
- ld a, CONVERT_OBP0
- call DMGPalToGBCPal
- ld a, index
- call TransferCurOBPData
-
- ld a, CONVERT_OBP1
- call DMGPalToGBCPal
- ld a, index + 4
- call TransferCurOBPData
-
-index = index + 1
- ENDR
-
- ret
-
-GetGBCBasePalAddress::
-; Input: a = palette ID
-; Output: de = palette address
- push hl
- ld l, a
- xor a
- ld h, a
- add hl, hl
- add hl, hl
- add hl, hl
- ld de, GBCBasePalettes
- add hl, de
- ld a, l
- ld e, a
- ld a, h
- ld d, a
- pop hl
- ret
-
-DMGPalToGBCPal::
-; Populate wGBCPal with colors from a base palette, selected using one of the
-; DMG palette registers.
-; Input:
-; a = which DMG palette register
-; de = address of GBC base palette
- and a
- jr nz, .notBGP
- ld a, [rBGP]
- ld [wLastBGP], a
- jr .convert
-.notBGP
- dec a
- jr nz, .notOBP0
- ld a, [rOBP0]
- ld [wLastOBP0], a
- jr .convert
-.notOBP0
- ld a, [rOBP1]
- ld [wLastOBP1], a
-.convert
-color_index = 0
- REPT NUM_COLORS
- ld b, a
- and %11
- call .GetColorAddress
- ld a, [hli]
- ld [wGBCPal + color_index * 2], a
- ld a, [hl]
- ld [wGBCPal + color_index * 2 + 1], a
-
- IF color_index < (NUM_COLORS + -1)
- ld a, b
- rrca
- rrca
- ENDC
-
-color_index = color_index + 1
- ENDR
- ret
-
-.GetColorAddress:
- add a
- ld l, a
- xor a
- ld h, a
- add hl, de
- ret
-
-TransferCurBGPData::
- push de
- add a
- add a
- add a
- or $80 ; auto-increment
- ld [rBGPI], a
- ld de, rBGPD
- ld hl, wGBCPal
- ld b, %10 ; mask for non-V-blank/non-H-blank STAT mode
- ld a, [rLCDC]
- and rLCDC_ENABLE_MASK
- jr nz, .lcdEnabled
- rept NUM_COLORS
- call TransferPalColorLCDDisabled
- endr
- jr .done
-.lcdEnabled
- rept NUM_COLORS
- call TransferPalColorLCDEnabled
- endr
-.done
- pop de
- ret
-
-BufferBGPPal::
-; Copy wGBCPal to palette a in wBGPPalsBuffer.
- push de
- add a
- add a
- add a
- ld l, a
- xor a
- ld h, a
- ld de, wBGPPalsBuffer
- add hl, de
- ld de, wGBCPal
- ld c, PAL_SIZE
-.loop
- ld a, [de]
- ld [hli], a
- inc de
- dec c
- jr nz, .loop
- pop de
- ret
-
-TransferBGPPals::
-; Transfer the buffered BG palettes.
- ld a, [rLCDC]
- and rLCDC_ENABLE_MASK
- jr z, .lcdDisabled
- di
-.waitLoop
- ld a, [rLY]
- cp 144
- jr c, .waitLoop
-.lcdDisabled
- call .DoTransfer
- ei
- ret
-
-.DoTransfer:
- xor a
- or $80 ; auto-increment
- ld [rBGPI], a
- ld de, rBGPD
- ld hl, wBGPPalsBuffer
- ld c, 4 * PAL_SIZE
-.loop
- ld a, [hli]
- ld [de], a
- dec c
- jr nz, .loop
- ret
-
-TransferCurOBPData:
- push de
- add a
- add a
- add a
- or $80 ; auto-increment
- ld [rOBPI], a
- ld de, rOBPD
- ld hl, wGBCPal
- ld b, %10 ; mask for non-V-blank/non-H-blank STAT mode
- ld a, [rLCDC]
- and rLCDC_ENABLE_MASK
- jr nz, .lcdEnabled
- rept NUM_COLORS
- call TransferPalColorLCDDisabled
- endr
- jr .done
-.lcdEnabled
- rept NUM_COLORS
- call TransferPalColorLCDEnabled
- endr
-.done
- pop de
- ret
-
-TransferPalColorLCDEnabled:
-; Transfer a palette color while the LCD is enabled.
-
-; In case we're already in H-blank or V-blank, wait for it to end. This is a
-; precaution so that the transfer doesn't extend past the blanking period.
- ld a, [rSTAT]
- and b
- jr z, TransferPalColorLCDEnabled
-
-; Wait for H-blank or V-blank to begin.
-.notInBlankingPeriod
- ld a, [rSTAT]
- and b
- jr nz, .notInBlankingPeriod
-; fall through
-
-TransferPalColorLCDDisabled:
-; Transfer a palette color while the LCD is disabled.
- ld a, [hli]
- ld [de], a
- ld a, [hli]
- ld [de], a
- ret
-
-_UpdateGBCPal_BGP_CheckDMG::
- ld a, [hGBC]
- and a
- ret z
-; fall through
-
-_UpdateGBCPal_BGP::
-index = 0
-
- REPT NUM_ACTIVE_PALS
- ld a, [wGBCBasePalPointers + index * 2]
- ld e, a
- ld a, [wGBCBasePalPointers + index * 2 + 1]
- ld d, a
- xor a ; CONVERT_BGP
- call DMGPalToGBCPal
- ld a, index
- call BufferBGPPal
-
-index = index + 1
- ENDR
-
- call TransferBGPPals
- ret
-
-_UpdateGBCPal_OBP::
-index = 0
-
- REPT NUM_ACTIVE_PALS
- ld a, [wGBCBasePalPointers + index * 2]
- ld e, a
- ld a, [wGBCBasePalPointers + index * 2 + 1]
- ld d, a
- ld a, c
- call DMGPalToGBCPal
- ld a, c
- dec a
- rlca
- rlca
-
- IF index > 0
- IF index == 1
- inc a
- ELSE
- add index
- ENDC
- ENDC
-
- call TransferCurOBPData
-
-index = index + 1
- ENDR
-
- ret
-
-TranslatePalPacketToBGMapAttributes::
-; translate the SGB pal packets into something usable for the GBC
- push hl
- pop de
- ld hl, PalPacketPointers
- ld a, [hli]
- ld c, a
-.loop
- ld a, e
-.innerLoop
- cp [hl]
- jr z, .checkHighByte
- inc hl
- inc hl
- dec c
- jr nz, .innerLoop
- ret
-.checkHighByte
-; the low byte of pointer matched, so check the high byte
- inc hl
- ld a, d
- cp [hl]
- jr z, .foundMatchingPointer
- inc hl
- dec c
- jr nz, .loop
- ret
-.foundMatchingPointer
- callba LoadBGMapAttributes
- ret
-
-PalPacketPointers::
- db (palPacketPointersEnd - palPacketPointers) / 2
-palPacketPointers
- dw BlkPacket_WholeScreen
- dw BlkPacket_Battle
- dw BlkPacket_StatusScreen
- dw BlkPacket_Pokedex
- dw BlkPacket_Slots
- dw BlkPacket_Titlescreen
- dw BlkPacket_NidorinoIntro
- dw wPartyMenuBlkPacket
- dw wTrainerCardBlkPacket
- dw BlkPacket_GameFreakIntro
- dw wPalPacket
- dw UnknownPacket_72751
-palPacketPointersEnd
-
-CopySGBBorderTiles:
-; 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, .copyLoop
-
-; Zero bit planes 3 and 4.
- ld c, 16
- xor a
-.zeroLoop
- ld [de], a
- inc de
- dec c
- jr nz, .zeroLoop
-
- dec b
- jr nz, .tileLoop
- ret
-
-INCLUDE "data/sgb_packets.asm"
-
-INCLUDE "data/mon_palettes.asm"
-
-INCLUDE "data/super_palettes.asm"
-
-INCLUDE "data/sgb_border.asm"
diff --git a/engine/pathfinding.asm b/engine/pathfinding.asm
deleted file mode 100644
index f3d23b7c..00000000
--- a/engine/pathfinding.asm
+++ /dev/null
@@ -1,201 +0,0 @@
-FindPathToPlayer:
- xor a
- ld hl, hFindPathNumSteps
- ld [hli], a ; hFindPathNumSteps
- ld [hli], a ; hFindPathFlags
- ld [hli], a ; hFindPathYProgress
- ld [hl], a ; hFindPathXProgress
- ld hl, wNPCMovementDirections2
- ld de, $0
-.loop
- ld a, [hFindPathYProgress]
- ld b, a
- ld a, [hNPCPlayerYDistance] ; Y distance in steps
- call CalcDifference
- ld d, a
- and a
- jr nz, .asm_f76a
- ld a, [hFindPathFlags]
- set 0, a ; current end of path matches the player's Y coordinate
- ld [hFindPathFlags], a
-.asm_f76a
- ld a, [hFindPathXProgress]
- ld b, a
- ld a, [hNPCPlayerXDistance] ; X distance in steps
- call CalcDifference
- ld e, a
- and a
- jr nz, .asm_f77c
- ld a, [hFindPathFlags]
- set 1, a ; current end of path matches the player's X coordinate
- ld [hFindPathFlags], a
-.asm_f77c
- ld a, [hFindPathFlags]
- cp $3 ; has the end of the path reached the player's position?
- jr z, .done
-; Compare whether the X distance between the player and the current of the path
-; is greater or if the Y distance is. Then, try to reduce whichever is greater.
- ld a, e
- cp d
- jr c, .yDistanceGreater
-; x distance is greater
- ld a, [hNPCPlayerRelativePosFlags]
- bit 1, a
- jr nz, .playerIsLeftOfNPC
- ld d, NPC_MOVEMENT_RIGHT
- jr .next1
-.playerIsLeftOfNPC
- ld d, NPC_MOVEMENT_LEFT
-.next1
- ld a, [hFindPathXProgress]
- add 1
- ld [hFindPathXProgress], a
- jr .storeDirection
-.yDistanceGreater
- ld a, [hNPCPlayerRelativePosFlags]
- bit 0, a
- jr nz, .playerIsAboveNPC
- ld d, NPC_MOVEMENT_DOWN
- jr .next2
-.playerIsAboveNPC
- ld d, NPC_MOVEMENT_UP
-.next2
- ld a, [hFindPathYProgress]
- add 1
- ld [hFindPathYProgress], a
-.storeDirection
- ld a, d
- ld [hli], a
- ld a, [hFindPathNumSteps]
- inc a
- ld [hFindPathNumSteps], a
- jp .loop
-.done
- ld [hl], $ff
- ret
-
-CalcPositionOfPlayerRelativeToNPC:
- xor a
- ld [hNPCPlayerRelativePosFlags], a
- ld a, [wSpriteStateData1 + 4] ; player's sprite screen Y position in pixels
- ld d, a
- ld a, [wSpriteStateData1 + 6] ; player's sprite screen X position in pixels
- ld e, a
- ld hl, wSpriteStateData1
- ld a, [hNPCSpriteOffset]
- add l
- add $4
- ld l, a
- jr nc, .noCarry
- inc h
-.noCarry
- ld a, d
- ld b, a
- ld a, [hli] ; NPC sprite screen Y position in pixels
- call CalcDifference
- jr nc, .NPCSouthOfOrAlignedWithPlayer
-.NPCNorthOfPlayer
- push hl
- ld hl, hNPCPlayerRelativePosFlags
- bit 0, [hl]
- set 0, [hl]
- pop hl
- jr .divideYDistance
-.NPCSouthOfOrAlignedWithPlayer
- push hl
- ld hl, hNPCPlayerRelativePosFlags
- bit 0, [hl]
- res 0, [hl]
- pop hl
-.divideYDistance
- push hl
- ld hl, hDividend2
- ld [hli], a
- ld a, 16
- ld [hli], a
- call DivideBytes ; divide Y absolute distance by 16
- ld a, [hl] ; quotient
- ld [hNPCPlayerYDistance], a
- pop hl
- inc hl
- ld b, e
- ld a, [hl] ; NPC sprite screen X position in pixels
- call CalcDifference
- jr nc, .NPCEastOfOrAlignedWithPlayer
-.NPCWestOfPlayer
- push hl
- ld hl, hNPCPlayerRelativePosFlags
- bit 1, [hl]
- set 1, [hl]
- pop hl
- jr .divideXDistance
-.NPCEastOfOrAlignedWithPlayer
- push hl
- ld hl, hNPCPlayerRelativePosFlags
- bit 1, [hl]
- res 1, [hl]
- pop hl
-.divideXDistance
- ld [hDividend2], a
- ld a, 16
- ld [hDivisor2], a
- call DivideBytes ; divide X absolute distance by 16
- ld a, [hQuotient2]
- ld [hNPCPlayerXDistance], a
- ld a, [hNPCPlayerRelativePosPerspective]
- and a
- ret z
- ld a, [hNPCPlayerRelativePosFlags]
- cpl
- and $3
- ld [hNPCPlayerRelativePosFlags], a
- ret
-
-ConvertNPCMovementDirectionsToJoypadMasks:
- ld a, [hNPCMovementDirections2Index]
- ld [wNPCMovementDirections2Index], a
- dec a
- ld de, wSimulatedJoypadStatesEnd
- ld hl, wNPCMovementDirections2
- add l
- ld l, a
- jr nc, .loop
- inc h
-.loop
- ld a, [hld]
- call ConvertNPCMovementDirectionToJoypadMask
- ld [de], a
- inc de
- ld a, [hNPCMovementDirections2Index]
- dec a
- ld [hNPCMovementDirections2Index], a
- jr nz, .loop
- ret
-
-ConvertNPCMovementDirectionToJoypadMask:
- push hl
- ld b, a
- ld hl, NPCMovementDirectionsToJoypadMasksTable
-.loop
- ld a, [hli]
- cp $ff
- jr z, .done
- cp b
- jr z, .loadJoypadMask
- inc hl
- jr .loop
-.loadJoypadMask
- ld a, [hl]
-.done
- pop hl
- ret
-
-NPCMovementDirectionsToJoypadMasksTable:
- db NPC_MOVEMENT_UP, D_UP
- db NPC_MOVEMENT_DOWN, D_DOWN
- db NPC_MOVEMENT_LEFT, D_LEFT
- db NPC_MOVEMENT_RIGHT, D_RIGHT
- db $ff
-
-; unreferenced
- ret
diff --git a/engine/pikachu_emotions.asm b/engine/pikachu_emotions.asm
index 1518b28e..55262493 100755
--- a/engine/pikachu_emotions.asm
+++ b/engine/pikachu_emotions.asm
@@ -1,19 +1,19 @@
-IsPlayerTalkingToPikachu:
+IsPlayerTalkingToPikachu::
ld a, [wd436]
and a
ret z
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
cp $f
ret nz
call InitializePikachuTextID
xor a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
ld [wd436], a
ret
-InitializePikachuTextID:
- ld a, $d4 ; display
- ld [hSpriteIndexOrTextID], a
+InitializePikachuTextID::
+ ld a, TEXT_PIKACHU_ANIM ; display
+ ldh [hSpriteIndexOrTextID], a
xor a
ld [wPlayerMovingDirection], a
ld a, $1
@@ -92,7 +92,7 @@ StarterPikachuEmotionCommand_pcm:
PlayPikachuSoundClip_:
cp $ff
ret z
- callab PlayPikachuSoundClip
+ callfar PlayPikachuSoundClip
ret
StarterPikachuEmotionCommand_emote:
@@ -190,7 +190,7 @@ PlaySpecificPikachuEmotion:
ld a, e
jr load_expression
-TalkToPikachu:
+TalkToPikachu::
call MapSpecificPikachuExpression
jr c, load_expression
call GetPikaPicAnimationScriptIndex
@@ -267,7 +267,7 @@ MapSpecificPikachuExpression:
jr .check_pikachu_status
.notPewterPokecenter
- callab Func_f24ae
+ callfar Func_f24ae
ld a, e
cp $ff
jr nz, .play_emotion
@@ -277,7 +277,7 @@ MapSpecificPikachuExpression:
call IsPlayerPikachuAsleepInParty
ldpikaemotion a, PikachuEmotion11
jr c, .play_emotion
- callab CheckPikachuFaintedOrStatused ; same bank
+ callfar CheckPikachuFaintedOrStatused ; same bank
ldpikaemotion a, PikachuEmotion28
jr c, .play_emotion
ld a, [wCurMap]
@@ -327,7 +327,7 @@ IsPlayerPikachuAsleepInParty:
jr z, .done
cp PIKACHU
jr nz, .curMonNotStarterPikachu
- callab IsThisPartymonStarterPikachu
+ callfar IsThisPartymonStarterPikachu
jr nc, .curMonNotStarterPikachu
ld a, [wWhichPokemon]
ld hl, wPartyMon1Status
@@ -358,7 +358,7 @@ INCLUDE "data/pikachu_emotions.asm"
PikachuWalksToNurseJoy:
ld a, $40
- ld [h_0xFFFC], a
+ ldh [hFFFC], a
call LoadPikachuSpriteIntoVRAM
call .GetMovementData
and a
@@ -366,7 +366,7 @@ PikachuWalksToNurseJoy:
call ApplyPikachuMovementData
.skip
xor a
- ld [h_0xFFFC], a
+ ldh [hFFFC], a
ret
.GetMovementData:
diff --git a/engine/pikachu_follow.asm b/engine/pikachu_follow.asm
index d9dc91df..fd2fbc47 100755
--- a/engine/pikachu_follow.asm
+++ b/engine/pikachu_follow.asm
@@ -457,7 +457,7 @@ Func_fc76a:
call Func_fc82e
jr c, .skip
push bc
- callab InitializeSpriteScreenPosition
+ callfar InitializeSpriteScreenPosition
pop bc
.skip
ld hl, wSpritePikachuStateData1MovementStatus - wSpritePikachuStateData1
@@ -472,7 +472,7 @@ Func_fc76a:
Func_fc793:
call RefreshPikachuFollow
push bc
- callab InitializeSpriteScreenPosition
+ callfar InitializeSpriteScreenPosition
pop bc
ld hl, wSpritePikachuStateData1ImageIndex - wSpritePikachuStateData1
add hl, bc
@@ -583,7 +583,7 @@ Func_fc842:
ld hl, $0
push af
call Random
- ld a, [hRandomAdd]
+ ldh a, [hRandomAdd]
and %11
ld e, a
ld d, $0
@@ -1107,7 +1107,7 @@ IsPikachuRightNextToPlayer:
xor a
ret
-GetPikachuFacingDirectionAndReturnToE:
+GetPikachuFacingDirectionAndReturnToE::
call GetPikachuFacingDirection
ld e, a
ret
@@ -1475,7 +1475,7 @@ AreThereAtLeastTwoStepsInPikachuFollowCommandBuffer:
WillPikachuSpawnOnTheScreen:
ld h, wSpriteStateData2 / $100
- ld a, [H_CURRENTSPRITEOFFSET] ; If we're here, this can only be $f0
+ ldh a, [hCurrentSpriteOffset] ; If we're here, this can only be $f0
add wSpritePikachuStateData2MapY - wSpritePikachuStateData2
ld l, a
ld b, [hl]
@@ -1516,7 +1516,7 @@ WillPikachuSpawnOnTheScreen:
jr c, .on_screen
.not_on_screen
ld h, wSpriteStateData1 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add wSpritePikachuStateData1ImageIndex - wSpritePikachuStateData1
ld l, a
ld [hl], $ff
@@ -1525,7 +1525,7 @@ WillPikachuSpawnOnTheScreen:
.on_screen
ld h, wSpriteStateData2 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add wSpritePikachuStateData2GrassPriority - wSpritePikachuStateData2
ld l, a
ld a, [wGrassTile]
@@ -1541,7 +1541,7 @@ WillPikachuSpawnOnTheScreen:
.GetNPCCurrentTile:
ld h, wSpriteStateData1 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
+ ldh a, [hCurrentSpriteOffset]
add wSpritePikachuStateData1YPixels - wSpritePikachuStateData1
ld l, a
ld a, [hli]
diff --git a/engine/pikachu_movement.asm b/engine/pikachu_movement.asm
index 938715a4..2d87e947 100755
--- a/engine/pikachu_movement.asm
+++ b/engine/pikachu_movement.asm
@@ -914,14 +914,14 @@ LoadPikachuShadowOAMData:
jr nz, .loop
ret
-LoadPikachuShadowIntoVRAM:
+LoadPikachuShadowIntoVRAM::
ld hl, vNPCSprites2 + $7f * $10
ld de, LedgeHoppingShadowGFX_3F
lb bc, BANK(LedgeHoppingShadowGFX_3F), (LedgeHoppingShadowGFX_3FEnd - LedgeHoppingShadowGFX_3F) / 8
jp CopyVideoDataDoubleAlternate
LedgeHoppingShadowGFX_3F:
-INCBIN "gfx/ledge_hopping_shadow.1bpp"
+INCBIN "gfx/overworld/shadow.1bpp"
LedgeHoppingShadowGFX_3FEnd:
LoadPikachuBallIconIntoVRAM:
@@ -958,7 +958,7 @@ LoadPikachuSpriteIntoVRAM:
call CopyVideoDataAlternate
ld de, PikachuSprite + $c * $10
ld hl, vNPCSprites2 + $c * $10
- ld a, [h_0xFFFC]
+ ldh a, [hFFFC]
and a
jr z, .load
ld de, PikachuSprite + $c * $10
@@ -1006,7 +1006,7 @@ Cosine_e: ; cosine?
Sine_e: ; sine?
ld a, e
-asm_fd908
+asm_fd908:
and $3f
cp $20
jr nc, .asm_fd913
diff --git a/engine/pikachu_pcm.asm b/engine/pikachu_pcm.asm
index 1e6f8dc2..bf1aa57f 100755
--- a/engine/pikachu_pcm.asm
+++ b/engine/pikachu_pcm.asm
@@ -23,12 +23,12 @@ PlayPikachuSoundClip::
push bc
push hl
ld a, $80
- ld [rNR52], a
+ ldh [rNR52], a
ld a, $77
- ld [rNR50], a
+ ldh [rNR50], a
xor a
- ld [rNR30], a
- ld hl, $ff30 ; wave data
+ ldh [rNR30], a
+ ld hl, rWave_0 ; wave data
ld de, wRedrawRowOrColumnSrcTiles
.saveWaveDataLoop
ld a, [hl]
@@ -40,18 +40,18 @@ PlayPikachuSoundClip::
cp $40 ; end of wave data
jr nz, .saveWaveDataLoop
ld a, $80
- ld [rNR30], a
- ld a, [rNR51]
+ ldh [rNR30], a
+ ldh a, [rNR51]
or $44
- ld [rNR51], a
+ ldh [rNR51], a
ld a, $ff
- ld [rNR31], a
+ ldh [rNR31], a
ld a, $20
- ld [rNR32], a
+ ldh [rNR32], a
ld a, $ff
- ld [rNR33], a
+ ldh [rNR33], a
ld a, $87
- ld [rNR34], a
+ ldh [rNR34], a
pop hl
pop bc
call PlayPikachuPCM
@@ -59,10 +59,10 @@ PlayPikachuSoundClip::
ld [wc0f3], a
ld [wc0f4], a
ld a, $80
- ld [rNR52], a
+ ldh [rNR52], a
xor a
- ld [rNR30], a
- ld hl, $ff30
+ ldh [rNR30], a
+ ld hl, rWave_0
ld de, wRedrawRowOrColumnSrcTiles
.reloadWaveDataLoop
ld a, [de]
@@ -72,20 +72,20 @@ PlayPikachuSoundClip::
cp $40 ; end of wave data
jr nz, .reloadWaveDataLoop
ld a, $80
- ld [rNR30], a
- ld a, [rNR51]
+ ldh [rNR30], a
+ ldh a, [rNR51]
and $bb
- ld [rNR51], a
+ ldh [rNR51], a
xor a
ld [wChannelSoundIDs + Ch5], a
ld [wChannelSoundIDs + Ch6], a
ld [wChannelSoundIDs + Ch7], a
ld [wChannelSoundIDs + Ch8], a
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
ei
ret
-PikachuCriesPointerTable:
+PikachuCriesPointerTable::
; format:
; db bank
; dw pointer to cry
diff --git a/engine/pikachu_pic_animation.asm b/engine/pikachu_pic_animation.asm
index c79d9add..7829c048 100755
--- a/engine/pikachu_pic_animation.asm
+++ b/engine/pikachu_pic_animation.asm
@@ -88,10 +88,10 @@ PikaPicAnimationScriptPointerLookupTable:
dpikapic PikaPicAnimScript20
StarterPikachuEmotionCommand_pikapic:
- ld a, [H_AUTOBGTRANSFERENABLED]
+ ldh a, [hAutoBGTransferEnabled]
push af
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ld a, [de]
ld [wPikaPicAnimNumber], a
inc de
@@ -99,12 +99,12 @@ StarterPikachuEmotionCommand_pikapic:
call .RunPikapic
pop de
pop af
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ret
.RunPikapic:
call PlacePikapicTextBoxBorder
- callab LoadOverworldPikachuFrontpicPalettes
+ callfar LoadOverworldPikachuFrontpicPalettes
call ResetPikaPicAnimBuffer
call LoadCurrentPikaPicAnimScriptPointer
call ExecutePikaPicAnimScript
@@ -135,14 +135,14 @@ ResetPikaPicAnimBuffer:
PlacePikapicTextBoxBorder:
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- coord hl, 6, 5
+ ldh [hAutoBGTransferEnabled], a
+ hlcoord 6, 5
lb bc, 5, 5
call TextBoxBorder
call Delay3
call UpdateSprites
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call Delay3
ret
@@ -202,13 +202,13 @@ endm
ExecutePikaPicAnimScript:
.loop
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call RunPikaPicAnimSetupScript
call DummyFunction_fdad5
call AnimateCurrentPikaPicAnimFrame
call DummyFunction_fdad5
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call PikaPicAnimTimerAndJoypad
and a
jr z, .loop
@@ -220,7 +220,7 @@ PikaPicAnimTimerAndJoypad:
and a
ret nz
call JoypadLowSensitivity
- ld a, [hJoyPressed]
+ ldh a, [hJoyPressed]
and A_BUTTON | B_BUTTON
ret
@@ -460,7 +460,7 @@ LoadCurPikaPicObjectTilemap:
ld b, a
ld a, [wPikaPicPikaDrawStartY]
add b
- coord hl, 0, 0
+ hlcoord 0, 0
ld bc, SCREEN_WIDTH
call AddNTimes
ld a, [wCurPikaPicAnimObjectXOffset] ; X offset
@@ -611,14 +611,14 @@ PikaPicAnimCommand_loadgfx:
push af
ld a, $ff
ld [wUpdateSpritesEnabled], a
- ld a, [H_AUTOBGTRANSFERENABLED]
+ ldh a, [hAutoBGTransferEnabled]
push af
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld a, [hTilesetType]
+ ldh [hAutoBGTransferEnabled], a
+ ldh a, [hTilesetType]
push af
xor a
- ld [hTilesetType], a
+ ldh [hTilesetType], a
call GetPikaPicAnimByte
ld [wPikaPicAnimCurGraphicID], a
ld a, [wPikaPicAnimCurGraphicID]
@@ -633,9 +633,9 @@ PikaPicAnimCommand_loadgfx:
call DecompressRequestPikaPicAnimGFX
.done
pop af
- ld [hTilesetType], a
+ ldh [hTilesetType], a
pop af
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
pop af
ld [wUpdateSpritesEnabled], a
ret
@@ -783,7 +783,7 @@ PikaPicAnimCommand_cry:
cp $ff
ret z
ld e, a
- callab PlayPikachuSoundClip
+ callfar PlayPikachuSoundClip
ret
PikaPicAnimCommand_thunderbolt:
@@ -843,7 +843,7 @@ PikaPicAnimCommand_thunderbolt:
.UpdatePal:
ld a, b
- ld [rBGP], a
+ ldh [rBGP], a
call UpdateGBCPal_BGP
call DelayFrames
ret
diff --git a/engine/pokedex_rating.asm b/engine/pokedex_rating.asm
deleted file mode 100755
index 4dfb6b39..00000000
--- a/engine/pokedex_rating.asm
+++ /dev/null
@@ -1,154 +0,0 @@
-DisplayDexRating:
- ld hl, wPokedexSeen
- ld b, wPokedexSeenEnd - wPokedexSeen
- call CountSetBits
- ld a, [wNumSetBits]
- ld [hDexRatingNumMonsSeen], a
- ld hl, wPokedexOwned
- ld b, wPokedexOwnedEnd - wPokedexOwned
- call CountSetBits
- ld a, [wNumSetBits]
- ld [hDexRatingNumMonsOwned], a
- ld hl, DexRatingsTable
-.findRating
- ld a, [hli]
- ld b, a
- ld a, [hDexRatingNumMonsOwned]
- cp b
- jr c, .foundRating
- inc hl
- inc hl
- jr .findRating
-.foundRating
- ld a, [hli]
- ld h, [hl]
- ld l, a ; load text pointer into hl
- CheckAndResetEventA EVENT_HALL_OF_FAME_DEX_RATING
- jr nz, .hallOfFame
- push hl
- ld hl, DexCompletionText
- call PrintText
- pop hl
- call PrintText
- callba PlayPokedexRatingSfx
- jp WaitForTextScrollButtonPress
-.hallOfFame
- ld de, wDexRatingNumMonsSeen
- ld a, [hDexRatingNumMonsSeen]
- ld [de], a
- inc de
- ld a, [hDexRatingNumMonsOwned]
- ld [de], a
- inc de
-.copyRatingTextLoop
- ld a, [hli]
- cp "@"
- jr z, .doneCopying
- ld [de], a
- inc de
- jr .copyRatingTextLoop
-.doneCopying
- ld [de], a
- ret
-
-DexCompletionText:
- TX_FAR _DexCompletionText
- db "@"
-
-DexRatingsTable:
- db 10
- dw DexRatingText_Own0To9
- db 20
- dw DexRatingText_Own10To19
- db 30
- dw DexRatingText_Own20To29
- db 40
- dw DexRatingText_Own30To39
- db 50
- dw DexRatingText_Own40To49
- db 60
- dw DexRatingText_Own50To59
- db 70
- dw DexRatingText_Own60To69
- db 80
- dw DexRatingText_Own70To79
- db 90
- dw DexRatingText_Own80To89
- db 100
- dw DexRatingText_Own90To99
- db 110
- dw DexRatingText_Own100To109
- db 120
- dw DexRatingText_Own110To119
- db 130
- dw DexRatingText_Own120To129
- db 140
- dw DexRatingText_Own130To139
- db 150
- dw DexRatingText_Own140To149
- db NUM_POKEMON + 1
- dw DexRatingText_Own150To151
-
-DexRatingText_Own0To9:
- TX_FAR _DexRatingText_Own0To9
- db "@"
-
-DexRatingText_Own10To19:
- TX_FAR _DexRatingText_Own10To19
- db "@"
-
-DexRatingText_Own20To29:
- TX_FAR _DexRatingText_Own20To29
- db "@"
-
-DexRatingText_Own30To39:
- TX_FAR _DexRatingText_Own30To39
- db "@"
-
-DexRatingText_Own40To49:
- TX_FAR _DexRatingText_Own40To49
- db "@"
-
-DexRatingText_Own50To59:
- TX_FAR _DexRatingText_Own50To59
- db "@"
-
-DexRatingText_Own60To69:
- TX_FAR _DexRatingText_Own60To69
- db "@"
-
-DexRatingText_Own70To79:
- TX_FAR _DexRatingText_Own70To79
- db "@"
-
-DexRatingText_Own80To89:
- TX_FAR _DexRatingText_Own80To89
- db "@"
-
-DexRatingText_Own90To99:
- TX_FAR _DexRatingText_Own90To99
- db "@"
-
-DexRatingText_Own100To109:
- TX_FAR _DexRatingText_Own100To109
- db "@"
-
-DexRatingText_Own110To119:
- TX_FAR _DexRatingText_Own110To119
- db "@"
-
-DexRatingText_Own120To129:
- TX_FAR _DexRatingText_Own120To129
- db "@"
-
-DexRatingText_Own130To139:
- TX_FAR _DexRatingText_Own130To139
- db "@"
-
-DexRatingText_Own140To149:
- TX_FAR _DexRatingText_Own140To149
- db "@"
-
-DexRatingText_Own150To151:
- TX_FAR _DexRatingText_Own150To151
- db "@"
diff --git a/engine/pokemon/add_mon.asm b/engine/pokemon/add_mon.asm
new file mode 100644
index 00000000..d3d08e99
--- /dev/null
+++ b/engine/pokemon/add_mon.asm
@@ -0,0 +1,522 @@
+_AddPartyMon::
+; Adds a new mon to the player's or enemy's party.
+; [wMonDataLocation] is used in an unusual way in this function.
+; If the lower nybble is 0, the mon is added to the player's party, else the enemy's.
+; If the entire value is 0, then the player is allowed to name the mon.
+ ld de, wPartyCount
+ ld a, [wMonDataLocation]
+ and $f
+ jr z, .next
+ ld de, wEnemyPartyCount
+.next
+ ld a, [de]
+ inc a
+ cp PARTY_LENGTH + 1
+ ret nc ; return if the party is already full
+ ld [de], a
+ ld a, [de]
+ ldh [hNewPartyLength], a
+ add e
+ ld e, a
+ jr nc, .noCarry
+ inc d
+.noCarry
+ ld a, [wcf91]
+ ld [de], a ; write species of new mon in party list
+ inc de
+ ld a, $ff ; terminator
+ ld [de], a
+ ld hl, wPartyMonOT
+ ld a, [wMonDataLocation]
+ and $f
+ jr z, .next2
+ ld hl, wEnemyMonOT
+.next2
+ ldh a, [hNewPartyLength]
+ dec a
+ call SkipFixedLengthTextEntries
+ ld d, h
+ ld e, l
+ ld hl, wPlayerName
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld a, [wMonDataLocation]
+ and a
+ jr nz, .skipNaming
+ ld hl, wPartyMonNicks
+ ldh a, [hNewPartyLength]
+ dec a
+ call SkipFixedLengthTextEntries
+ ld a, NAME_MON_SCREEN
+ ld [wNamingScreenType], a
+ predef AskName
+.skipNaming
+ ld hl, wPartyMons
+ ld a, [wMonDataLocation]
+ and $f
+ jr z, .next3
+ ld hl, wEnemyMons
+.next3
+ ldh a, [hNewPartyLength]
+ dec a
+ ld bc, wPartyMon2 - wPartyMon1
+ call AddNTimes
+ ld e, l
+ ld d, h
+ push hl
+ ld a, [wcf91]
+ ld [wd0b5], a
+ call GetMonHeader
+ ld hl, wMonHeader
+ ld a, [hli]
+ ld [de], a ; species
+ inc de
+ pop hl
+ push hl
+ ld a, [wMonDataLocation]
+ and $f
+ ld a, ATKDEFDV_TRAINER ; set enemy trainer mon IVs to fixed average values
+ ld b, SPDSPCDV_TRAINER
+ jr nz, .next4
+
+; If the mon is being added to the player's party, update the pokedex.
+ ld a, [wcf91]
+ ld [wd11e], a
+ push de
+ predef IndexToPokedex
+ pop de
+ ld a, [wd11e]
+ dec a
+ ld c, a
+ ld b, FLAG_TEST
+ ld hl, wPokedexOwned
+ call FlagAction
+ ld a, c ; whether the mon was already flagged as owned
+ ld [wUnusedD153], a ; not read
+ ld a, [wd11e]
+ dec a
+ ld c, a
+ ld b, FLAG_SET
+ push bc
+ call FlagAction
+ pop bc
+ ld hl, wPokedexSeen
+ call FlagAction
+
+ pop hl
+ push hl
+
+ ld a, [wIsInBattle]
+ and a ; is this a wild mon caught in battle?
+ jr nz, .copyEnemyMonData
+
+; Not wild.
+ call Random ; generate random IVs
+ ld b, a
+ call Random
+
+.next4
+ push bc
+ ld bc, wPartyMon1DVs - wPartyMon1
+ add hl, bc
+ pop bc
+ ld [hli], a
+ ld [hl], b ; write IVs
+ ld bc, (wPartyMon1HPExp - 1) - (wPartyMon1DVs + 1)
+ add hl, bc
+ ld a, 1
+ ld c, a
+ xor a
+ ld b, a
+ call CalcStat ; calc HP stat (set cur Hp to max HP)
+ ldh a, [hMultiplicand+1]
+ ld [de], a
+ inc de
+ ldh a, [hMultiplicand+2]
+ ld [de], a
+ inc de
+ xor a
+ ld [de], a ; box level
+ inc de
+ ld [de], a ; status ailments
+ inc de
+ jr .copyMonTypesAndMoves
+.copyEnemyMonData
+ ld bc, wEnemyMon1DVs - wEnemyMon1
+ add hl, bc
+ ld a, [wEnemyMonDVs] ; copy IVs from cur enemy mon
+ ld [hli], a
+ ld a, [wEnemyMonDVs + 1]
+ ld [hl], a
+ ld a, [wEnemyMonHP] ; copy HP from cur enemy mon
+ ld [de], a
+ inc de
+ ld a, [wEnemyMonHP+1]
+ ld [de], a
+ inc de
+ xor a
+ ld [de], a ; box level
+ inc de
+ ld a, [wEnemyMonStatus] ; copy status ailments from cur enemy mon
+ ld [de], a
+ inc de
+.copyMonTypesAndMoves
+ ld hl, wMonHTypes
+ ld a, [hli] ; type 1
+ ld [de], a
+ inc de
+ ld a, [hli] ; type 2
+ ld [de], a
+ inc de
+ ld a, [hli] ; catch rate (held item in gen 2)
+ ld [de], a
+ ld a, [wcf91]
+ cp KADABRA
+ jr nz, .skipGivingTwistedSpoon
+ ld a, $60 ; twistedspoon in gen 2
+ ld [de], a
+.skipGivingTwistedSpoon
+ ld hl, wMonHMoves
+ ld a, [hli]
+ inc de
+ push de
+ ld [de], a
+ ld a, [hli]
+ inc de
+ ld [de], a
+ ld a, [hli]
+ inc de
+ ld [de], a
+ ld a, [hli]
+ inc de
+ ld [de], a
+ push de
+ dec de
+ dec de
+ dec de
+ xor a
+ ld [wLearningMovesFromDayCare], a
+ predef WriteMonMoves
+ pop de
+ ld a, [wPlayerID] ; set trainer ID to player ID
+ inc de
+ ld [de], a
+ ld a, [wPlayerID + 1]
+ inc de
+ ld [de], a
+ push de
+ ld a, [wCurEnemyLVL]
+ ld d, a
+ callfar CalcExperience
+ pop de
+ inc de
+ ldh a, [hExperience] ; write experience
+ ld [de], a
+ inc de
+ ldh a, [hExperience + 1]
+ ld [de], a
+ inc de
+ ldh a, [hExperience + 2]
+ ld [de], a
+ xor a
+ ld b, NUM_STATS * 2
+.writeEVsLoop ; set all EVs to 0
+ inc de
+ ld [de], a
+ dec b
+ jr nz, .writeEVsLoop
+ inc de
+ inc de
+ pop hl
+ call AddPartyMon_WriteMovePP
+ inc de
+ ld a, [wCurEnemyLVL]
+ ld [de], a
+ inc de
+ ld a, [wIsInBattle]
+ dec a
+ jr nz, .calcFreshStats
+ ld hl, wEnemyMonMaxHP
+ ld bc, $a
+ call CopyData ; copy stats of cur enemy mon
+ pop hl
+ jr .done
+.calcFreshStats
+ pop hl
+ ld bc, wPartyMon1HPExp - 1 - wPartyMon1
+ add hl, bc
+ ld b, $0
+ call CalcStats ; calculate fresh set of stats
+.done
+ scf
+ ret
+
+LoadMovePPs:
+ call GetPredefRegisters
+ ; fallthrough
+AddPartyMon_WriteMovePP:
+ ld b, NUM_MOVES
+.pploop
+ ld a, [hli] ; read move ID
+ and a
+ jr z, .empty
+ dec a
+ push hl
+ push de
+ push bc
+ ld hl, Moves
+ ld bc, MoveEnd - Moves
+ call AddNTimes
+ ld de, wcd6d
+ ld a, BANK(Moves)
+ call FarCopyData
+ pop bc
+ pop de
+ pop hl
+ ld a, [wcd6d + 5] ; PP is byte 5 of move data
+.empty
+ inc de
+ ld [de], a
+ dec b
+ jr nz, .pploop ; there are still moves to read
+ ret
+
+; adds enemy mon [wcf91] (at position [wWhichPokemon] in enemy list) to own party
+; used in the cable club trade center
+_AddEnemyMonToPlayerParty::
+ ld hl, wPartyCount
+ ld a, [hl]
+ cp PARTY_LENGTH
+ scf
+ ret z ; party full, return failure
+ inc a
+ ld [hl], a ; add 1 to party members
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [wcf91]
+ ld [hli], a ; add mon as last list entry
+ ld [hl], $ff ; write new sentinel
+ ld hl, wPartyMons
+ ld a, [wPartyCount]
+ dec a
+ ld bc, wPartyMon2 - wPartyMon1
+ call AddNTimes
+ ld e, l
+ ld d, h
+ ld hl, wLoadedMon
+ call CopyData ; write new mon's data (from wLoadedMon)
+ ld hl, wPartyMonOT
+ ld a, [wPartyCount]
+ dec a
+ call SkipFixedLengthTextEntries
+ ld d, h
+ ld e, l
+ ld hl, wEnemyMonOT
+ ld a, [wWhichPokemon]
+ call SkipFixedLengthTextEntries
+ ld bc, NAME_LENGTH
+ call CopyData ; write new mon's OT name (from an enemy mon)
+ ld hl, wPartyMonNicks
+ ld a, [wPartyCount]
+ dec a
+ call SkipFixedLengthTextEntries
+ ld d, h
+ ld e, l
+ ld hl, wEnemyMonNicks
+ ld a, [wWhichPokemon]
+ call SkipFixedLengthTextEntries
+ ld bc, NAME_LENGTH
+ call CopyData ; write new mon's nickname (from an enemy mon)
+ ld a, [wcf91]
+ ld [wd11e], a
+ predef IndexToPokedex
+ ld a, [wd11e]
+ dec a
+ ld c, a
+ ld b, FLAG_SET
+ ld hl, wPokedexOwned
+ push bc
+ call FlagAction ; add to owned pokemon
+ pop bc
+ ld hl, wPokedexSeen
+ call FlagAction ; add to seen pokemon
+ and a
+ ret ; return success
+
+_MoveMon::
+ ld a, [wMoveMonType]
+ and a ; BOX_TO_PARTY
+ jr z, .checkPartyMonSlots
+ cp DAYCARE_TO_PARTY
+ jr z, .checkPartyMonSlots
+ cp PARTY_TO_DAYCARE
+ ld hl, wDayCareMon
+ jr z, .findMonDataSrc
+ ; else it's PARTY_TO_BOX
+ ld hl, wNumInBox
+ ld a, [hl]
+ cp MONS_PER_BOX
+ jr nz, .partyOrBoxNotFull
+ jr .boxFull
+.checkPartyMonSlots
+ ld hl, wPartyCount
+ ld a, [hl]
+ cp PARTY_LENGTH
+ jr nz, .partyOrBoxNotFull
+.boxFull
+ scf
+ ret
+.partyOrBoxNotFull
+ inc a
+ ld [hl], a ; increment number of mons in party/box
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [wMoveMonType]
+ cp DAYCARE_TO_PARTY
+ ld a, [wDayCareMon]
+ jr z, .copySpecies
+ ld a, [wcf91]
+.copySpecies
+ ld [hli], a ; write new mon ID
+ ld [hl], $ff ; write new sentinel
+.findMonDataDest
+ ld a, [wMoveMonType]
+ dec a
+ ld hl, wPartyMons
+ ld bc, wPartyMon2 - wPartyMon1 ; $2c
+ ld a, [wPartyCount]
+ jr nz, .addMonOffset
+ ; if it's PARTY_TO_BOX
+ ld hl, wBoxMons
+ ld bc, wBoxMon2 - wBoxMon1 ; $21
+ ld a, [wNumInBox]
+.addMonOffset
+ dec a
+ call AddNTimes
+.findMonDataSrc
+ push hl
+ ld e, l
+ ld d, h
+ ld a, [wMoveMonType]
+ and a
+ ld hl, wBoxMons
+ ld bc, wBoxMon2 - wBoxMon1 ; $21
+ jr z, .addMonOffset2
+ cp DAYCARE_TO_PARTY
+ ld hl, wDayCareMon
+ jr z, .copyMonData
+ ld hl, wPartyMons
+ ld bc, wPartyMon2 - wPartyMon1 ; $2c
+.addMonOffset2
+ ld a, [wWhichPokemon]
+ call AddNTimes
+.copyMonData
+ push hl
+ push de
+ ld bc, wBoxMon2 - wBoxMon1
+ call CopyData
+ pop de
+ pop hl
+ ld a, [wMoveMonType]
+ and a ; BOX_TO_PARTY
+ jr z, .findOTdest
+ cp DAYCARE_TO_PARTY
+ jr z, .findOTdest
+ ld bc, wBoxMon2 - wBoxMon1
+ add hl, bc
+ ld a, [hl] ; hl = Level
+ inc de
+ inc de
+ inc de
+ ld [de], a ; de = BoxLevel
+.findOTdest
+ ld a, [wMoveMonType]
+ cp PARTY_TO_DAYCARE
+ ld de, wDayCareMonOT
+ jr z, .findOTsrc
+ dec a
+ ld hl, wPartyMonOT
+ ld a, [wPartyCount]
+ jr nz, .addOToffset
+ ld hl, wBoxMonOT
+ ld a, [wNumInBox]
+.addOToffset
+ dec a
+ call SkipFixedLengthTextEntries
+ ld d, h
+ ld e, l
+.findOTsrc
+ ld hl, wBoxMonOT
+ ld a, [wMoveMonType]
+ and a
+ jr z, .addOToffset2
+ ld hl, wDayCareMonOT
+ cp DAYCARE_TO_PARTY
+ jr z, .copyOT
+ ld hl, wPartyMonOT
+.addOToffset2
+ ld a, [wWhichPokemon]
+ call SkipFixedLengthTextEntries
+.copyOT
+ ld bc, NAME_LENGTH
+ call CopyData
+ ld a, [wMoveMonType]
+.findNickDest
+ cp PARTY_TO_DAYCARE
+ ld de, wDayCareMonName
+ jr z, .findNickSrc
+ dec a
+ ld hl, wPartyMonNicks
+ ld a, [wPartyCount]
+ jr nz, .addNickOffset
+ ld hl, wBoxMonNicks
+ ld a, [wNumInBox]
+.addNickOffset
+ dec a
+ call SkipFixedLengthTextEntries
+ ld d, h
+ ld e, l
+.findNickSrc
+ ld hl, wBoxMonNicks
+ ld a, [wMoveMonType]
+ and a
+ jr z, .addNickOffset2
+ ld hl, wDayCareMonName
+ cp DAYCARE_TO_PARTY
+ jr z, .copyNick
+ ld hl, wPartyMonNicks
+.addNickOffset2
+ ld a, [wWhichPokemon]
+ call SkipFixedLengthTextEntries
+.copyNick
+ ld bc, NAME_LENGTH
+ call CopyData
+ pop hl
+ ld a, [wMoveMonType]
+ cp PARTY_TO_BOX
+ jr z, .done
+ cp PARTY_TO_DAYCARE
+ jr z, .done
+ push hl
+ srl a
+ add $2
+ ld [wMonDataLocation], a
+ call LoadMonData
+ farcall CalcLevelFromExperience
+ ld a, d
+ ld [wCurEnemyLVL], a
+ pop hl
+ ld bc, wBoxMon2 - wBoxMon1
+ add hl, bc
+ ld [hli], a
+ ld d, h
+ ld e, l
+ ld bc, -18
+ add hl, bc
+ ld b, $1
+ call CalcStats
+.done
+ and a
+ ret
diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm
new file mode 100644
index 00000000..cc7864f2
--- /dev/null
+++ b/engine/pokemon/bills_pc.asm
@@ -0,0 +1,593 @@
+DisplayPCMainMenu::
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ call SaveScreenTilesToBuffer2
+ ld a, [wNumHoFTeams]
+ and a
+ jr nz, .leaguePCAvailable
+ CheckEvent EVENT_GOT_POKEDEX
+ jr z, .noOaksPC
+ ld a, [wNumHoFTeams]
+ and a
+ jr nz, .leaguePCAvailable
+ hlcoord 0, 0
+ lb bc, 8, 14
+ jr .next
+.noOaksPC
+ hlcoord 0, 0
+ lb bc, 6, 14
+ jr .next
+.leaguePCAvailable
+ hlcoord 0, 0
+ lb bc, 10, 14
+.next
+ call TextBoxBorder
+ call UpdateSprites
+ ld a, 3
+ ld [wMaxMenuItem], a
+ CheckEvent EVENT_MET_BILL
+ jr nz, .metBill
+ hlcoord 2, 2
+ ld de, SomeonesPCText
+ jr .next2
+.metBill
+ hlcoord 2, 2
+ ld de, BillsPCText
+.next2
+ call PlaceString
+ hlcoord 2, 4
+ ld de, wPlayerName
+ call PlaceString
+ ld l, c
+ ld h, b
+ ld de, PlayersPCText
+ call PlaceString
+ CheckEvent EVENT_GOT_POKEDEX
+ jr z, .noOaksPC2
+ hlcoord 2, 6
+ ld de, OaksPCText
+ call PlaceString
+ ld a, [wNumHoFTeams]
+ and a
+ jr z, .noLeaguePC
+ ld a, 4
+ ld [wMaxMenuItem], a
+ hlcoord 2, 8
+ ld de, PKMNLeaguePCText
+ call PlaceString
+ hlcoord 2, 10
+ ld de, LogOffPCText
+ jr .next3
+.noLeaguePC
+ hlcoord 2, 8
+ ld de, LogOffPCText
+ jr .next3
+.noOaksPC2
+ ld a, $2
+ ld [wMaxMenuItem], a
+ hlcoord 2, 6
+ ld de, LogOffPCText
+.next3
+ call PlaceString
+ ld a, A_BUTTON | B_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, 2
+ ld [wTopMenuItemY], a
+ ld a, 1
+ ld [wTopMenuItemX], a
+ xor a
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ ret
+
+SomeonesPCText: db "SOMEONE's PC@"
+BillsPCText: db "BILL's PC@"
+PlayersPCText: db "'s PC@"
+OaksPCText: db "PROF.OAK's PC@"
+PKMNLeaguePCText: db "<PKMN>LEAGUE@"
+LogOffPCText: db "LOG OFF@"
+
+BillsPC_::
+ ld hl, wd730
+ set 6, [hl]
+ xor a
+ ld [wParentMenuItem], a
+ inc a ; MONSTER_NAME
+ ld [wNameListType], a
+ call LoadHpBarAndStatusTilePatterns
+ ld a, [wListScrollOffset]
+ push af
+ ld a, [wFlags_0xcd60]
+ bit 3, a ; accessing Bill's PC through another PC?
+ jr nz, BillsPCMenu
+; accessing it directly
+ ld a, SFX_TURN_ON_PC
+ call PlaySound
+ ld hl, SwitchOnText
+ call PrintText
+
+BillsPCMenu:
+ ld a, [wParentMenuItem]
+ ld [wCurrentMenuItem], a
+ ld hl, vChars2 tile $78
+ ld de, PokeballTileGraphics
+ lb bc, BANK(PokeballTileGraphics), 1
+ call CopyVideoData
+ call LoadScreenTilesFromBuffer2DisableBGTransfer
+ hlcoord 0, 12
+ lb bc, 4, 18
+ call TextBoxBorder
+ hlcoord 0, 0
+ lb bc, 12, 12
+ call TextBoxBorder
+ call UpdateSprites
+ hlcoord 2, 2
+ ld de, BillsPCMenuText
+ call PlaceString
+ ld hl, wTopMenuItemY
+ ld a, 2
+ ld [hli], a ; wTopMenuItemY
+ dec a
+ ld [hli], a ; wTopMenuItemX
+ inc hl
+ inc hl
+ ld a, 5
+ ld [hli], a ; wMaxMenuItem
+ ld a, A_BUTTON | B_BUTTON
+ ld [hli], a ; wMenuWatchedKeys
+ xor a
+ ld [hli], a ; wLastMenuItem
+ ld [hli], a ; wPartyAndBillsPCSavedMenuItem
+ ld hl, wListScrollOffset
+ ld [hli], a ; wListScrollOffset
+ ld [hl], a ; wMenuWatchMovingOutOfBounds
+ ld [wPlayerMonNumber], a
+ hlcoord 9, 14
+ lb bc, 2, 9
+ call TextBoxBorder
+ ld a, [wCurrentBoxNum]
+ and $7f
+ cp 9
+ jr c, .singleDigitBoxNum
+; two digit box num
+ sub 9
+ hlcoord 17, 16
+ ld [hl], "1"
+ add "0"
+ jr .next
+.singleDigitBoxNum
+ add "1"
+.next
+ ldcoord_a 18, 16
+ hlcoord 10, 16
+ ld de, BoxNoPCText
+ call PlaceString
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ call Delay3
+ call HandleMenuInput
+ bit 1, a
+ jp nz, ExitBillsPC ; b button
+ call PlaceUnfilledArrowMenuCursor
+ ld a, [wCurrentMenuItem]
+ ld [wParentMenuItem], a
+ and a
+ jp z, BillsPCWithdraw ; withdraw
+ cp $1
+ jp z, BillsPCDeposit ; deposit
+ cp $2
+ jp z, BillsPCRelease ; release
+ cp $3
+ jp z, BillsPCChangeBox ; change box
+ cp $4
+ jp z, BillsPCPrintBox
+
+ExitBillsPC:
+ ld a, [wFlags_0xcd60]
+ bit 3, a ; accessing Bill's PC through another PC?
+ jr nz, .next
+; accessing it directly
+ call LoadTextBoxTilePatterns
+ ld a, SFX_TURN_OFF_PC
+ call PlaySound
+ call WaitForSoundToFinish
+.next
+ ld hl, wFlags_0xcd60
+ res 5, [hl]
+ call LoadScreenTilesFromBuffer2
+ pop af
+ ld [wListScrollOffset], a
+ ld hl, wd730
+ res 6, [hl]
+ ret
+
+BillsPCPrintBox:
+ callfar PrintPCBox
+ jp BillsPCMenu
+
+BillsPCDeposit:
+ ld a, [wPartyCount]
+ dec a
+ jr nz, .partyLargeEnough
+ ld hl, CantDepositLastMonText
+ call PrintText
+ jp BillsPCMenu
+.partyLargeEnough
+ ld a, [wNumInBox]
+ cp MONS_PER_BOX
+ jr nz, .boxNotFull
+ ld hl, BoxFullText
+ call PrintText
+ jp BillsPCMenu
+.boxNotFull
+ ld hl, wPartyCount
+ call DisplayMonListMenu
+ jp c, BillsPCMenu
+ callfar IsThisPartymonStarterPikachu_Party
+ jr nc, .asm_215ad
+ call CheckPikachuFollowingPlayer
+ jr z, .asm_215ad
+ ld hl, SleepingPikachuText2
+ call PrintText
+ jp BillsPCMenu
+.asm_215ad
+ call DisplayDepositWithdrawMenu
+ jp nc, BillsPCMenu
+ callfar IsThisPartymonStarterPikachu_Party
+ jr nc, .asm_215c9
+ ld e, $1b
+ callfar PlayPikachuSoundClip
+ jr .asm_215cf
+.asm_215c9
+ ld a, [wcf91]
+ call PlayCry
+.asm_215cf
+ callabd_ModifyPikachuHappiness PIKAHAPPY_DEPOSITED
+ ld a, PARTY_TO_BOX
+ ld [wMoveMonType], a
+ call MoveMon
+ xor a
+ ld [wRemoveMonFromBox], a
+ call RemovePokemon
+ call WaitForSoundToFinish
+ ld hl, wBoxNumString
+ ld a, [wCurrentBoxNum]
+ and $7f
+ cp 9
+ jr c, .singleDigitBoxNum
+ sub 9
+ ld [hl], "1"
+ inc hl
+ add "0"
+ jr .next
+.singleDigitBoxNum
+ add "1"
+.next
+ ld [hli], a
+ ld [hl], "@"
+ ld hl, MonWasStoredText
+ call PrintText
+ jp BillsPCMenu
+
+SleepingPikachuText2:
+ text_far _SleepingPikachuText2
+ text_end
+
+BillsPCWithdraw:
+ ld a, [wNumInBox]
+ and a
+ jr nz, .boxNotEmpty
+ ld hl, NoMonText
+ call PrintText
+ jp BillsPCMenu
+.boxNotEmpty
+ ld a, [wPartyCount]
+ cp PARTY_LENGTH
+ jr nz, .partyNotFull
+ ld hl, CantTakeMonText
+ call PrintText
+ jp BillsPCMenu
+.partyNotFull
+ ld hl, wNumInBox
+ call DisplayMonListMenu
+ jp c, BillsPCMenu
+ call DisplayDepositWithdrawMenu
+ jp nc, BillsPCMenu
+ ld a, [wWhichPokemon]
+ ld hl, wBoxMonNicks
+ call GetPartyMonName
+ callfar IsThisPartymonStarterPikachu_Box
+ jr nc, .asm_21660
+ ld e, $22
+ callfar PlayPikachuSoundClip
+ jr .asm_21666
+.asm_21660
+ ld a, [wcf91]
+ call PlayCry
+.asm_21666
+ xor a ; BOX_TO_PARTY
+ ld [wMoveMonType], a
+ call MoveMon
+ ld a, 1
+ ld [wRemoveMonFromBox], a
+ call RemovePokemon
+ call WaitForSoundToFinish
+ ld hl, MonIsTakenOutText
+ call PrintText
+ jp BillsPCMenu
+
+BillsPCRelease:
+ ld a, [wNumInBox]
+ and a
+ jr nz, .loop
+ ld hl, NoMonText
+ call PrintText
+ jp BillsPCMenu
+.loop
+ ld hl, wNumInBox
+ call DisplayMonListMenu
+ jp c, BillsPCMenu
+ callfar IsThisPartymonStarterPikachu_Box
+ jr c, .asm_216cb
+ ld hl, OnceReleasedText
+ call PrintText
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ jr nz, .loop
+ inc a
+ ld [wRemoveMonFromBox], a
+ call RemovePokemon
+ call WaitForSoundToFinish
+ ld a, [wcf91]
+ call PlayCry
+ ld hl, MonWasReleasedText
+ call PrintText
+ jp BillsPCMenu
+
+.asm_216cb
+ ld a, [wWhichPokemon]
+ ld hl, wBoxMonNicks
+ call GetPartyMonName
+ ld e, $27
+ callfar PlayPikachuSoundClip
+ ld hl, PikachuUnhappyText
+ call PrintText
+ jp BillsPCMenu
+
+BillsPCChangeBox:
+ farcall ChangeBox
+ jp BillsPCMenu
+
+DisplayMonListMenu:
+ ld a, l
+ ld [wListPointer], a
+ ld a, h
+ ld [wListPointer + 1], a
+ xor a
+ ld [wPrintItemPrices], a
+ ld [wListMenuID], a
+ inc a ; MONSTER_NAME
+ ld [wNameListType], a
+ ld a, [wPartyAndBillsPCSavedMenuItem]
+ ld [wCurrentMenuItem], a
+ call DisplayListMenuID
+ ld a, [wCurrentMenuItem]
+ ld [wPartyAndBillsPCSavedMenuItem], a
+ ret
+
+BillsPCMenuText:
+ db "WITHDRAW <PKMN>"
+ next "DEPOSIT <PKMN>"
+ next "RELEASE <PKMN>"
+ next "CHANGE BOX"
+ next "PRINT BOX"
+ next "SEE YA!"
+ db "@"
+
+BoxNoPCText:
+ db "BOX No.@"
+
+KnowsHMMove::
+; returns whether mon with party index [wWhichPokemon] knows an HM move
+ ld hl, wPartyMon1Moves
+ ld bc, wPartyMon2 - wPartyMon1
+ jr .next
+; unreachable
+ ld hl, wBoxMon1Moves
+ ld bc, wBoxMon2 - wBoxMon1
+.next
+ ld a, [wWhichPokemon]
+ call AddNTimes
+ ld b, NUM_MOVES
+.loop
+ ld a, [hli]
+ push hl
+ push bc
+ ld hl, HMMoveArray
+ ld de, 1
+ call IsInArray
+ pop bc
+ pop hl
+ ret c
+ dec b
+ jr nz, .loop
+ and a
+ ret
+
+HMMoveArray:
+INCLUDE "data/moves/hm_moves.asm"
+
+DisplayDepositWithdrawMenu:
+ hlcoord 9, 10
+ lb bc, 6, 9
+ call TextBoxBorder
+ ld a, [wParentMenuItem]
+ and a ; was the Deposit or Withdraw item selected in the parent menu?
+ ld de, DepositPCText
+ jr nz, .next
+ ld de, WithdrawPCText
+.next
+ hlcoord 11, 12
+ call PlaceString
+ hlcoord 11, 14
+ ld de, StatsCancelPCText
+ call PlaceString
+ ld hl, wTopMenuItemY
+ ld a, 12
+ ld [hli], a ; wTopMenuItemY
+ ld a, 10
+ ld [hli], a ; wTopMenuItemX
+ xor a
+ ld [hli], a ; wCurrentMenuItem
+ inc hl
+ ld a, 2
+ ld [hli], a ; wMaxMenuItem
+ ld a, A_BUTTON | B_BUTTON
+ ld [hli], a ; wMenuWatchedKeys
+ xor a
+ ld [hl], a ; wLastMenuItem
+ ld hl, wListScrollOffset
+ ld [hli], a ; wListScrollOffset
+ ld [hl], a ; wMenuWatchMovingOutOfBounds
+ ld [wPlayerMonNumber], a
+ ld [wPartyAndBillsPCSavedMenuItem], a
+.loop
+ call HandleMenuInput
+ bit 1, a ; pressed B?
+ jr nz, .exit
+ ld a, [wCurrentMenuItem]
+ and a
+ jr z, .choseDepositWithdraw
+ dec a
+ jr z, .viewStats
+.exit
+ and a
+ ret
+.choseDepositWithdraw
+ scf
+ ret
+.viewStats
+ call SaveScreenTilesToBuffer1
+ ld a, [wParentMenuItem]
+ and a
+ ld a, PLAYER_PARTY_DATA
+ jr nz, .next2
+ ld a, BOX_DATA
+.next2
+ ld [wMonDataLocation], a
+ predef StatusScreen
+ predef StatusScreen2
+ call LoadScreenTilesFromBuffer1
+ call ReloadTilesetTilePatterns
+ call RunDefaultPaletteCommand
+ call LoadGBPal
+ jr .loop
+
+DepositPCText: db "DEPOSIT@"
+WithdrawPCText: db "WITHDRAW@"
+StatsCancelPCText:
+ db "STATS"
+ next "CANCEL@"
+
+SwitchOnText:
+ text_far _SwitchOnText
+ text_end
+
+WhatText:
+ text_far _WhatText
+ text_end
+
+DepositWhichMonText:
+ text_far _DepositWhichMonText
+ text_end
+
+MonWasStoredText:
+ text_far _MonWasStoredText
+ text_end
+
+CantDepositLastMonText:
+ text_far _CantDepositLastMonText
+ text_end
+
+BoxFullText:
+ text_far _BoxFullText
+ text_end
+
+MonIsTakenOutText:
+ text_far _MonIsTakenOutText
+ text_end
+
+NoMonText:
+ text_far _NoMonText
+ text_end
+
+CantTakeMonText:
+ text_far _CantTakeMonText
+ text_end
+
+PikachuUnhappyText:
+ text_far _PikachuUnhappyText
+ text_end
+
+ReleaseWhichMonText:
+ text_far _ReleaseWhichMonText
+ text_end
+
+OnceReleasedText:
+ text_far _OnceReleasedText
+ text_end
+
+MonWasReleasedText:
+ text_far _MonWasReleasedText
+ text_end
+
+CableClubLeftGameboy::
+ ldh a, [hSerialConnectionStatus]
+ cp USING_EXTERNAL_CLOCK
+ ret z
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ cp SPRITE_FACING_RIGHT
+ ret nz
+ ld a, [wCurMap]
+ cp TRADE_CENTER
+ ld a, LINK_STATE_START_TRADE
+ jr z, .next
+ inc a ; LINK_STATE_START_BATTLE
+.next
+ ld [wLinkState], a
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump JustAMomentText
+
+CableClubRightGameboy::
+ ldh a, [hSerialConnectionStatus]
+ cp USING_INTERNAL_CLOCK
+ ret z
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ cp SPRITE_FACING_LEFT
+ ret nz
+ ld a, [wCurMap]
+ cp TRADE_CENTER
+ ld a, LINK_STATE_START_TRADE
+ jr z, .next
+ inc a ; LINK_STATE_START_BATTLE
+.next
+ ld [wLinkState], a
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump JustAMomentText
+
+JustAMomentText::
+ text_far _JustAMomentText
+ text_end
+
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ cp SPRITE_FACING_UP
+ ret nz
+ call EnableAutoTextBoxDrawing
+ tx_pre_jump OpenBillsPCText
+
+OpenBillsPCText::
+ script_bills_pc
+
diff --git a/engine/pokemon/evos_moves.asm b/engine/pokemon/evos_moves.asm
new file mode 100755
index 00000000..4e48fe30
--- /dev/null
+++ b/engine/pokemon/evos_moves.asm
@@ -0,0 +1,668 @@
+; try to evolve the mon in [wWhichPokemon]
+TryEvolvingMon:
+EvolveTradeMon:
+ ld hl, wCanEvolveFlags
+ xor a
+ ld [hl], a
+ ld a, [wWhichPokemon]
+ ld c, a
+ ld b, FLAG_SET
+ call Evolution_FlagAction
+
+; this is only called after battle
+; it is supposed to do level up evolutions, though there is a bug that allows item evolutions to occur
+EvolutionAfterBattle:
+ ldh a, [hTilesetType]
+ push af
+ xor a
+ ld [wEvolutionOccurred], a
+ dec a
+ ld [wWhichPokemon], a
+ push hl
+ push bc
+ push de
+ ld hl, wPartyCount
+ push hl
+
+Evolution_PartyMonLoop: ; loop over party mons
+ ld hl, wWhichPokemon
+ inc [hl]
+ pop hl
+ inc hl
+ ld a, [hl]
+ cp $ff ; have we reached the end of the party?
+ jp z, .done
+ ld [wEvoOldSpecies], a
+ push hl
+ ld a, [wWhichPokemon]
+ ld c, a
+ ld hl, wCanEvolveFlags
+ ld b, FLAG_TEST
+ call Evolution_FlagAction
+ ld a, c
+ and a ; is the mon's bit set?
+ jp z, Evolution_PartyMonLoop ; if not, go to the next mon
+ ld a, [wEvoOldSpecies]
+ dec a
+ ld b, 0
+ ld hl, EvosMovesPointerTable
+ add a
+ rl b
+ ld c, a
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ push hl
+ ld a, [wcf91]
+ push af
+ xor a ; PLAYER_PARTY_DATA
+ ld [wMonDataLocation], a
+ call LoadMonData
+ pop af
+ ld [wcf91], a
+ pop hl
+
+.evoEntryLoop ; loop over evolution entries
+ ld a, [hli]
+ and a ; have we reached the end of the evolution data?
+ jr z, Evolution_PartyMonLoop
+ ld b, a ; evolution type
+ cp EV_TRADE
+ jr z, .checkTradeEvo
+; not trade evolution
+ ld a, [wLinkState]
+ cp LINK_STATE_TRADING
+ jr z, Evolution_PartyMonLoop ; if trading, go the next mon
+ ld a, b
+ cp EV_ITEM
+ jr z, .checkItemEvo
+ ld a, [wForceEvolution]
+ and a
+ jr nz, Evolution_PartyMonLoop
+ ld a, b
+ cp EV_LEVEL
+ jr z, .checkLevel
+.checkTradeEvo
+ ld a, [wLinkState]
+ cp LINK_STATE_TRADING
+ jp nz, .nextEvoEntry1 ; if not trading, go to the next evolution entry
+ ld a, [hli] ; level requirement
+ ld b, a
+ ld a, [wLoadedMonLevel]
+ cp b ; is the mon's level greater than the evolution requirement?
+ jp c, Evolution_PartyMonLoop ; if so, go the next mon
+ jr .doEvolution
+.checkItemEvo
+ ld a, [wIsInBattle] ; are we in battle?
+ and a
+ ld a, [hli]
+ jp nz, .nextEvoEntry1 ; don't evolve if we're in a battle as wcf91 could be holding the last mon sent out
+
+ ld b, a ; evolution item
+ ld a, [wcf91] ; last item used
+ cp b ; was the evolution item in this entry used?
+ jp nz, .nextEvoEntry1 ; if not, go to the next evolution entry
+.checkLevel
+ ld a, [hli] ; level requirement
+ ld b, a
+ ld a, [wLoadedMonLevel]
+ cp b ; is the mon's level greater than the evolution requirement?
+ jp c, .nextEvoEntry2 ; if so, go the next evolution entry
+.doEvolution
+ ld [wCurEnemyLVL], a
+ ld a, 1
+ ld [wEvolutionOccurred], a
+ push hl
+ ld a, [hl]
+ ld [wEvoNewSpecies], a
+ ld a, [wWhichPokemon]
+ ld hl, wPartyMonNicks
+ call GetPartyMonName
+ call CopyStringToCF4B
+ ld hl, IsEvolvingText
+ call PrintText
+ ld c, 50
+ call DelayFrames
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ hlcoord 0, 0
+ lb bc, 12, 20
+ call ClearScreenArea
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ ld a, $ff
+ ld [wUpdateSpritesEnabled], a
+ call ClearSprites
+ callfar EvolveMon
+ jp c, CancelledEvolution
+ ld hl, EvolvedText
+ call PrintText
+ pop hl
+ ld a, [hl]
+ ld [wd0b5], a
+ ld [wLoadedMonSpecies], a
+ ld [wEvoNewSpecies], a
+ ld a, MONSTER_NAME
+ ld [wNameListType], a
+ ld a, BANK(MonsterNames) ; bank is not used for monster names
+ ld [wPredefBank], a
+ call GetName
+ push hl
+ ld hl, IntoText
+ call PrintText_NoCreatingTextBox
+ ld a, SFX_GET_ITEM_2
+ call PlaySoundWaitForCurrent
+ call WaitForSoundToFinish
+ ld c, 40
+ call DelayFrames
+ call ClearScreen
+ call RenameEvolvedMon
+ ld a, [wd11e]
+ push af
+ ld a, [wd0b5]
+ ld [wd11e], a
+ predef IndexToPokedex
+ ld a, [wd11e]
+ dec a
+ ld hl, BaseStats
+ ld bc, MonBaseStatsEnd - MonBaseStats
+ call AddNTimes
+ ld de, wMonHeader
+ call CopyData
+ ld a, [wd0b5]
+ ld [wMonHIndex], a
+ pop af
+ ld [wd11e], a
+ ld hl, wLoadedMonHPExp - 1
+ ld de, wLoadedMonStats
+ ld b, $1
+ call CalcStats
+ ld a, [wWhichPokemon]
+ ld hl, wPartyMon1
+ ld bc, wPartyMon2 - wPartyMon1
+ call AddNTimes
+ ld e, l
+ ld d, h
+ push hl
+ push bc
+ ld bc, wPartyMon1MaxHP - wPartyMon1
+ add hl, bc
+ ld a, [hli]
+ ld b, a
+ ld c, [hl]
+ ld hl, wLoadedMonMaxHP + 1
+ ld a, [hld]
+ sub c
+ ld c, a
+ ld a, [hl]
+ sbc b
+ ld b, a
+ ld hl, wLoadedMonHP + 1
+ ld a, [hl]
+ add c
+ ld [hld], a
+ ld a, [hl]
+ adc b
+ ld [hl], a
+ dec hl
+ pop bc
+ call CopyData
+ ld a, [wd0b5]
+ ld [wd11e], a
+ xor a
+ ld [wMonDataLocation], a
+ call LearnMoveFromLevelUp
+ pop hl
+ predef SetPartyMonTypes
+ ld a, [wIsInBattle]
+ and a
+ call z, Evolution_ReloadTilesetTilePatterns
+ predef IndexToPokedex
+ ld a, [wd11e]
+ dec a
+ ld c, a
+ ld b, FLAG_SET
+ ld hl, wPokedexOwned
+ push bc
+ call Evolution_FlagAction
+ pop bc
+ ld hl, wPokedexSeen
+ call Evolution_FlagAction
+ pop de
+ pop hl
+ ld a, [wLoadedMonSpecies]
+ ld [hl], a
+ push hl
+ ld l, e
+ ld h, d
+ jr .nextEvoEntry2
+
+.nextEvoEntry1
+ inc hl
+
+.nextEvoEntry2
+ inc hl
+ jp .evoEntryLoop
+
+.done
+ pop de
+ pop bc
+ pop hl
+ pop af
+ ldh [hTilesetType], a
+ ld a, [wLinkState]
+ cp LINK_STATE_TRADING
+ ret z
+ ld a, [wIsInBattle]
+ and a
+ ret nz
+ ld a, [wEvolutionOccurred]
+ and a
+ call nz, PlayDefaultMusic
+ ret
+
+RenameEvolvedMon:
+; 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, [wMonHIndex]
+ ld [wd0b5], a
+ call GetName
+ pop af
+ ld [wd0b5], a
+ ld hl, wcd6d
+ ld de, wcf4b
+.compareNamesLoop
+ ld a, [de]
+ inc de
+ cp [hl]
+ inc hl
+ ret nz
+ cp "@"
+ jr nz, .compareNamesLoop
+ ld a, [wWhichPokemon]
+ ld bc, NAME_LENGTH
+ ld hl, wPartyMonNicks
+ call AddNTimes
+ push hl
+ call GetName
+ ld hl, wcd6d
+ pop de
+ jp CopyData
+
+CancelledEvolution:
+ ld hl, StoppedEvolvingText
+ call PrintText
+ call ClearScreen
+ pop hl
+ call Evolution_ReloadTilesetTilePatterns
+ jp Evolution_PartyMonLoop
+
+EvolvedText:
+ text_far _EvolvedText
+ text_end
+
+IntoText:
+ text_far _IntoText
+ text_end
+
+StoppedEvolvingText:
+ text_far _StoppedEvolvingText
+ text_end
+
+IsEvolvingText:
+ text_far _IsEvolvingText
+ text_end
+
+Evolution_ReloadTilesetTilePatterns:
+ ld a, [wLinkState]
+ cp LINK_STATE_TRADING
+ ret z
+ jp ReloadTilesetTilePatterns
+
+LearnMoveFromLevelUp:
+ ld a, [wd11e] ; species
+ ld [wcf91], a
+ call GetMonLearnset
+.learnSetLoop ; loop over the learn set until we reach a move that is learnt at the current level or the end of the list
+ ld a, [hli]
+ 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, [wCurEnemyLVL]
+ cp b ; is the move learnt at the mon's current level?
+ ld a, [hli] ; move ID
+ jr nz, .learnSetLoop
+ ld d, a ; ID of move to learn
+ ld a, [wMonDataLocation]
+ and a
+ jr nz, .next
+; If [wMonDataLocation] is 0 (PLAYER_PARTY_DATA), get the address of the mon's
+; current moves in party data. Every call to this function sets
+; [wMonDataLocation] to 0 because other data locations are not supported.
+; If it is not 0, this function will not work properly.
+ ld hl, wPartyMon1Moves
+ ld a, [wWhichPokemon]
+ ld bc, wPartyMon2 - wPartyMon1
+ call AddNTimes
+.next
+ ld b, NUM_MOVES
+.checkCurrentMovesLoop ; check if the move to learn is already known
+ ld a, [hli]
+ cp d
+ jr z, .done ; if already known, jump
+ dec b
+ jr nz, .checkCurrentMovesLoop
+ ld a, d
+ ld [wMoveNum], a
+ ld [wd11e], a
+ call GetMoveName
+ call CopyStringToCF4B
+ predef LearnMove
+ ld a, b
+ and a
+ jr z, .done
+ callfar IsThisPartymonStarterPikachu_Party
+ jr nc, .done
+ ld a, [wMoveNum]
+ cp THUNDERBOLT
+ jr z, .foundThunderOrThunderbolt
+ cp THUNDER
+ jr nz, .done
+.foundThunderOrThunderbolt
+ ld a, $5
+ ld [wd49c], a
+ ld a, $85
+ ld [wPikachuMood], a
+.done
+ ld a, [wcf91]
+ ld [wd11e], a
+ ret
+
+Func_3b079:
+ ld a, [wcf91]
+ push af
+ call Func_3b0a2
+ jr c, .asm_3b09c
+
+ call Func_3b10f
+ jr nc, .asm_3b096
+
+ call Func_3b0a2
+ jr c, .asm_3b09c
+
+ call Func_3b10f
+ jr nc, .asm_3b096
+
+ call Func_3b0a2
+ jr c, .asm_3b09c
+.asm_3b096
+ pop af
+ ld [wcf91], a
+ and a
+ ret
+.asm_3b09c
+ pop af
+ ld [wcf91], a
+ scf
+ ret
+
+Func_3b0a2:
+; XXX what is wcf91 entering this function?
+ ld a, [wd11e]
+ ld [wMoveNum], a
+ predef CanLearnTM
+ ld a, c
+ and a
+ jr nz, .asm_3b0ec
+ ld hl, Pointer_3b0ee
+ ld a, [wcf91]
+ ld de, $1
+ call IsInArray
+ jr c, .asm_3b0d2
+ ld a, $ff
+ ld [wMonHGrowthRate], a
+ ld a, [wd11e]
+ ld hl, wMonHMoves
+ ld de, $1
+ call IsInArray
+ jr c, .asm_3b0ec
+.asm_3b0d2
+ ld a, [wd11e]
+ ld d, a
+ call GetMonLearnset
+.loop
+ ld a, [hli]
+ and a
+ jr z, .asm_3b0ea
+ ld b, a
+ ld a, [wCurEnemyLVL]
+ cp b
+ jr c, .asm_3b0ea
+ ld a, [hli]
+ cp d
+ jr z, .asm_3b0ec
+ jr .loop
+.asm_3b0ea
+ and a
+ ret
+.asm_3b0ec
+ scf
+ ret
+
+Pointer_3b0ee:
+ db NIDOKING
+ db IVYSAUR
+ db EXEGGUTOR
+ db GENGAR
+ db NIDOQUEEN
+ db ARCANINE
+ db GYARADOS
+ db BLASTOISE
+ db GOLEM
+ db DRAGONITE
+ db NINETALES
+ db DRAGONAIR
+ db KABUTOPS
+ db OMASTAR
+ db JIGGLYPUFF
+ db FLAREON
+ db JOLTEON
+ db VAPOREON
+ db BEEDRILL
+ db BUTTERFREE
+ db MACHAMP
+ db CLOYSTER
+ db CLEFABLE
+ db ALAKAZAM
+ db STARMIE
+ db VENUSAUR
+ db TENTACRUEL
+ db CHARMELEON
+ db WARTORTLE
+ db CHARIZARD
+ db VILEPLUME
+ db VICTREEBEL
+ db $ff
+
+Func_3b10f:
+ ld c, $0
+.asm_3b111
+ ld hl, EvosMovesPointerTable
+ ld b, $0
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+.asm_3b11b
+ ld a, [hli]
+ and a
+ jr z, .asm_3b130
+ cp $2
+ jr nz, .asm_3b124
+ inc hl
+.asm_3b124
+ inc hl
+ ld a, [wcf91]
+ cp [hl]
+ jr z, .asm_3b138
+ inc hl
+ ld a, [hl]
+ and a
+ jr nz, .asm_3b11b
+.asm_3b130
+ inc c
+ ld a, c
+ cp VICTREEBEL
+ jr c, .asm_3b111
+ and a
+ ret
+.asm_3b138
+ inc c
+ ld a, c
+ ld [wcf91], a
+ scf
+ ret
+
+; 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:
+ call GetPredefRegisters
+ push hl
+ push de
+ push bc
+ call GetMonLearnset
+ jr .firstMove
+.nextMove
+ pop de
+.nextMove2
+ inc hl
+.firstMove
+ ld a, [hli] ; read level of next move in learnset
+ and a
+ jp z, .done ; end of list
+ ld b, a
+ ld a, [wCurEnemyLVL]
+ cp b
+ jp c, .done ; mon level < move level (assumption: learnset is sorted by level)
+ ld a, [wLearningMovesFromDayCare]
+ and a
+ jr z, .skipMinLevelCheck
+ ld a, [wDayCareStartLevel]
+ cp b
+ jr nc, .nextMove2 ; min level >= move level
+
+.skipMinLevelCheck
+
+; check if the move is already known
+ push de
+ ld c, NUM_MOVES
+.alreadyKnowsCheckLoop
+ ld a, [de]
+ inc de
+ cp [hl]
+ jr z, .nextMove
+ dec c
+ jr nz, .alreadyKnowsCheckLoop
+
+; try to find an empty move slot
+ pop de
+ push de
+ ld c, NUM_MOVES
+.findEmptySlotLoop
+ ld a, [de]
+ and a
+ jr z, .writeMoveToSlot2
+ inc de
+ dec c
+ jr nz, .findEmptySlotLoop
+
+; no empty move slots found
+ pop de
+ push de
+ push hl
+ ld h, d
+ ld l, e
+ call WriteMonMoves_ShiftMoveData ; shift all moves one up (deleting move 1)
+ ld a, [wLearningMovesFromDayCare]
+ and a
+ jr z, .writeMoveToSlot
+
+; shift PP as well if learning moves from day care
+ push de
+ ld bc, wPartyMon1PP - (wPartyMon1Moves + 3)
+ add hl, bc
+ ld d, h
+ ld e, l
+ call WriteMonMoves_ShiftMoveData ; shift all move PP data one up
+ pop de
+
+.writeMoveToSlot
+ pop hl
+.writeMoveToSlot2
+ ld a, [hl]
+ ld [de], a
+ ld a, [wLearningMovesFromDayCare]
+ and a
+ jr z, .nextMove
+
+; write move PP value if learning moves from day care
+ push hl
+ ld a, [hl]
+ ld hl, wPartyMon1PP - wPartyMon1Moves
+ add hl, de
+ push hl
+ dec a
+ ld hl, Moves
+ ld bc, MoveEnd - Moves
+ call AddNTimes
+ ld de, wBuffer
+ ld a, BANK(Moves)
+ call FarCopyData
+ ld a, [wBuffer + 5]
+ pop hl
+ ld [hl], a
+ pop hl
+ jr .nextMove
+
+.done
+ pop bc
+ pop de
+ pop hl
+ ret
+
+; shifts all move data one up (freeing 4th move slot)
+WriteMonMoves_ShiftMoveData:
+ ld c, NUM_MOVES - 1
+.loop
+ inc de
+ ld a, [de]
+ ld [hli], a
+ dec c
+ jr nz, .loop
+ ret
+
+Evolution_FlagAction:
+ predef_jump FlagActionPredef
+
+GetMonLearnset:
+ ld hl, EvosMovesPointerTable
+ ld b, 0
+ ld a, [wcf91]
+ dec a
+ ld c, a
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+.skipEvolutionDataLoop ; loop to skip past the evolution data, which comes before the move data
+ ld a, [hli]
+ and a ; have we reached the end of the evolution data?
+ jr nz, .skipEvolutionDataLoop ; if not, jump back up
+ ret
+
+INCLUDE "data/pokemon/evos_moves.asm"
diff --git a/engine/pokemon/experience.asm b/engine/pokemon/experience.asm
new file mode 100755
index 00000000..427d2a7f
--- /dev/null
+++ b/engine/pokemon/experience.asm
@@ -0,0 +1,149 @@
+; calculates the level a mon should be based on its current exp
+CalcLevelFromExperience::
+ ld a, [wLoadedMonSpecies]
+ ld [wd0b5], a
+ call GetMonHeader
+ ld d, $1 ; init level to 1
+.loop
+ inc d ; increment level
+ call CalcExperience
+ push hl
+ ld hl, wLoadedMonExp + 2 ; current exp
+; compare exp needed for level d with current exp
+ ldh a, [hExperience + 2]
+ ld c, a
+ ld a, [hld]
+ sub c
+ ldh a, [hExperience + 1]
+ ld c, a
+ ld a, [hld]
+ sbc c
+ ldh a, [hExperience]
+ ld c, a
+ ld a, [hl]
+ sbc c
+ pop hl
+ jr nc, .loop ; if exp needed for level d is not greater than exp, try the next level
+ dec d ; since the exp was too high on the last loop iteration, go back to the previous value and return
+ ret
+
+; calculates the amount of experience needed for level d
+CalcExperience::
+ ld a, [wMonHGrowthRate]
+ add a
+ add a
+ ld c, a
+ ld b, 0
+ ld hl, GrowthRateTable
+ add hl, bc
+ call CalcDSquared
+ ld a, d
+ ldh [hMultiplier], a
+ call Multiply
+ ld a, [hl]
+ and $f0
+ swap a
+ ldh [hMultiplier], a
+ call Multiply
+ ld a, [hli]
+ and $f
+ ldh [hDivisor], a
+ ld b, $4
+ call Divide
+ ldh a, [hQuotient + 1]
+ push af
+ ldh a, [hQuotient + 2]
+ push af
+ ldh a, [hQuotient + 3]
+ push af
+ call CalcDSquared
+ ld a, [hl]
+ and $7f
+ ldh [hMultiplier], a
+ call Multiply
+ ldh a, [hProduct + 1]
+ push af
+ ldh a, [hProduct + 2]
+ push af
+ ldh a, [hProduct + 3]
+ push af
+ ld a, [hli]
+ push af
+ xor a
+ ldh [hMultiplicand], a
+ ldh [hMultiplicand + 1], a
+ ld a, d
+ ldh [hMultiplicand + 2], a
+ ld a, [hli]
+ ldh [hMultiplier], a
+ call Multiply
+ ld b, [hl]
+ ldh a, [hProduct + 3]
+ sub b
+ ldh [hProduct + 3], a
+ ld b, $0
+ ldh a, [hProduct + 2]
+ sbc b
+ ldh [hProduct + 2], a
+ ldh a, [hProduct + 1]
+ sbc b
+ ldh [hProduct + 1], a
+; The difference of the linear term and the constant term consists of 3 bytes
+; starting at hProduct + 1. Below, hExperience (an alias of that address) will
+; be used instead for the further work of adding or subtracting the squared
+; term and adding the cubed term.
+ pop af
+ and $80
+ jr nz, .subtractSquaredTerm ; check sign
+ pop bc
+ ldh a, [hExperience + 2]
+ add b
+ ldh [hExperience + 2], a
+ pop bc
+ ldh a, [hExperience + 1]
+ adc b
+ ldh [hExperience + 1], a
+ pop bc
+ ldh a, [hExperience]
+ adc b
+ ldh [hExperience], a
+ jr .addCubedTerm
+.subtractSquaredTerm
+ pop bc
+ ldh a, [hExperience + 2]
+ sub b
+ ldh [hExperience + 2], a
+ pop bc
+ ldh a, [hExperience + 1]
+ sbc b
+ ldh [hExperience + 1], a
+ pop bc
+ ldh a, [hExperience]
+ sbc b
+ ldh [hExperience], a
+.addCubedTerm
+ pop bc
+ ldh a, [hExperience + 2]
+ add b
+ ldh [hExperience + 2], a
+ pop bc
+ ldh a, [hExperience + 1]
+ adc b
+ ldh [hExperience + 1], a
+ pop bc
+ ldh a, [hExperience]
+ adc b
+ ldh [hExperience], a
+ ret
+
+; calculates d*d
+CalcDSquared:
+ xor a
+ ldh [hMultiplicand], a
+ ldh [hMultiplicand + 1], a
+ ld a, d
+ ldh [hMultiplicand + 2], a
+ ldh [hMultiplier], a
+ jp Multiply
+
+INCLUDE "data/growth_rates.asm"
diff --git a/engine/pokemon/learn_move.asm b/engine/pokemon/learn_move.asm
new file mode 100755
index 00000000..d365acd4
--- /dev/null
+++ b/engine/pokemon/learn_move.asm
@@ -0,0 +1,250 @@
+LearnMove:
+ call SaveScreenTilesToBuffer1
+ ld a, [wWhichPokemon]
+ ld hl, wPartyMonNicks
+ call GetPartyMonName
+ ld hl, wcd6d
+ ld de, wLearnMoveMonName
+ ld bc, NAME_LENGTH
+ call CopyData
+
+DontAbandonLearning:
+ ld hl, wPartyMon1Moves
+ ld bc, wPartyMon2Moves - wPartyMon1Moves
+ ld a, [wWhichPokemon]
+ call AddNTimes
+ ld d, h
+ ld e, l
+ ld b, NUM_MOVES
+.findEmptyMoveSlotLoop
+ ld a, [hl]
+ and a
+ jr z, .next
+ inc hl
+ dec b
+ jr nz, .findEmptyMoveSlotLoop
+ push de
+ call TryingToLearn
+ pop de
+ jp c, AbandonLearning
+ push hl
+ push de
+ ld [wd11e], a
+ call GetMoveName
+ ld hl, OneTwoAndText
+ call PrintText
+ pop de
+ pop hl
+.next
+ ld a, [wMoveNum]
+ ld [hl], a
+ ld bc, wPartyMon1PP - wPartyMon1Moves
+ add hl, bc
+ push hl
+ push de
+ dec a
+ ld hl, Moves
+ ld bc, MoveEnd - Moves
+ call AddNTimes
+ ld de, wBuffer
+ ld a, BANK(Moves)
+ call FarCopyData
+ ld a, [wBuffer + 5] ; a = move's max PP
+ pop de
+ pop hl
+ ld [hl], a
+ ld a, [wIsInBattle]
+ and a
+ jp z, PrintLearnedMove
+ ld a, [wWhichPokemon]
+ ld b, a
+ ld a, [wPlayerMonNumber]
+ cp b
+ jp nz, PrintLearnedMove
+ ld h, d
+ ld l, e
+ ld de, wBattleMonMoves
+ ld bc, NUM_MOVES
+ call CopyData
+ ld bc, wPartyMon1PP - wPartyMon1OTID
+ add hl, bc
+ ld de, wBattleMonPP
+ ld bc, NUM_MOVES
+ call CopyData
+ jp PrintLearnedMove
+
+AbandonLearning:
+ ld hl, AbandonLearningText
+ call PrintText
+ hlcoord 14, 7
+ lb bc, 8, 15
+ ld a, TWO_OPTION_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID ; yes/no menu
+ ld a, [wCurrentMenuItem]
+ and a
+ jp nz, DontAbandonLearning
+ ld hl, DidNotLearnText
+ call PrintText
+ ld b, 0
+ ret
+
+PrintLearnedMove:
+ ld hl, LearnedMove1Text
+ call PrintText
+ ld b, 1
+ ret
+
+TryingToLearn:
+ push hl
+ ld hl, TryingToLearnText
+ call PrintText
+ hlcoord 14, 7
+ lb bc, 8, 15
+ ld a, TWO_OPTION_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID ; yes/no menu
+ pop hl
+ ld a, [wCurrentMenuItem]
+ rra
+ ret c
+ ld bc, -NUM_MOVES
+ add hl, bc
+ push hl
+ ld de, wMoves
+ ld bc, NUM_MOVES
+ call CopyData
+ callfar FormatMovesString
+ pop hl
+.loop
+ push hl
+ ld hl, WhichMoveToForgetText
+ call PrintText
+ hlcoord 4, 7
+ lb bc, 4, 14
+ call TextBoxBorder
+ hlcoord 6, 8
+ ld de, wMovesString
+ ldh a, [hFlagsFFFA]
+ set 2, a
+ ldh [hFlagsFFFA], a
+ call PlaceString
+ ldh a, [hFlagsFFFA]
+ res 2, a
+ ldh [hFlagsFFFA], a
+ ld hl, wTopMenuItemY
+ ld a, 8
+ ld [hli], a ; wTopMenuItemY
+ ld a, 5
+ ld [hli], a ; wTopMenuItemX
+ xor a
+ ld [hli], a ; wCurrentMenuItem
+ inc hl
+ ld a, [wNumMovesMinusOne]
+ ld [hli], a ; wMaxMenuItem
+ ld a, A_BUTTON | B_BUTTON
+ ld [hli], a ; wMenuWatchedKeys
+ ld [hl], 0 ; wLastMenuItem
+ ld hl, hFlagsFFFA
+ set 1, [hl]
+ call HandleMenuInput
+ ld hl, hFlagsFFFA
+ res 1, [hl]
+ push af
+ call LoadScreenTilesFromBuffer1
+ pop af
+ pop hl
+ bit 1, a ; pressed b
+ jr nz, .cancel
+ push hl
+ ld a, [wCurrentMenuItem]
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hl]
+ push af
+ push bc
+ call IsMoveHM
+ pop bc
+ pop de
+ ld a, d
+ jr c, .hm
+ pop hl
+ add hl, bc
+ and a
+ ret
+.hm
+ ld hl, HMCantDeleteText
+ call PrintText
+ pop hl
+ jr .loop
+.cancel
+ scf
+ ret
+
+LearnedMove1Text:
+ text_far _LearnedMove1Text
+ sound_get_item_1 ; plays SFX_GET_ITEM_1 in the party menu (rare candy) and plays SFX_LEVEL_UP in battle
+ text_promptbutton
+ text_end
+
+WhichMoveToForgetText:
+ text_far _WhichMoveToForgetText
+ text_end
+
+AbandonLearningText:
+ text_far _AbandonLearningText
+ text_end
+
+DidNotLearnText:
+ text_far _DidNotLearnText
+ text_end
+
+TryingToLearnText:
+ text_far _TryingToLearnText
+ text_end
+
+OneTwoAndText:
+; bugfix: In Red/Blue, the SFX_SWAP sound was played in the wrong bank, which played an incorrect sound
+; Yellow has fixed this by swapping to the correct bank
+ text_far _OneTwoAndText
+ text_pause
+ text_asm
+ push af
+ push bc
+ push de
+ push hl
+ ld a, $1
+ ld [wMuteAudioAndPauseMusic], a
+ call DelayFrame
+ ld a, [wAudioROMBank]
+ push af
+ ld a, BANK(SFX_Swap_1)
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
+ call WaitForSoundToFinish
+ ld a, SFX_SWAP
+ call PlaySound
+ call WaitForSoundToFinish
+ pop af
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
+ xor a
+ ld [wMuteAudioAndPauseMusic], a
+ pop hl
+ pop de
+ pop bc
+ pop af
+ ld hl, PoofText
+ ret
+
+PoofText:
+ text_far _PoofText
+ text_pause
+ForgotAndText:
+ text_far _ForgotAndText
+ text_end
+
+HMCantDeleteText:
+ text_far _HMCantDeleteText
+ text_end
diff --git a/engine/pokemon/load_mon_data.asm b/engine/pokemon/load_mon_data.asm
new file mode 100644
index 00000000..53840728
--- /dev/null
+++ b/engine/pokemon/load_mon_data.asm
@@ -0,0 +1,68 @@
+LoadMonData_::
+; Load monster [wWhichPokemon] from list [wMonDataLocation]:
+; 0: partymon
+; 1: enemymon
+; 2: boxmon
+; 3: daycaremon
+; Return monster id at wcf91 and its data at wLoadedMon.
+; Also load base stats at wMonHeader for convenience.
+
+ ld a, [wDayCareMonSpecies]
+ ld [wcf91], a
+ ld a, [wMonDataLocation]
+ cp DAYCARE_DATA
+ jr z, .GetMonHeader
+
+ ld a, [wWhichPokemon]
+ ld e, a
+ call GetMonSpecies
+
+.GetMonHeader
+ ld a, [wcf91]
+ ld [wd0b5], a ; input for GetMonHeader
+ call GetMonHeader
+
+ ld hl, wPartyMons
+ ld bc, wPartyMon2 - wPartyMon1
+ ld a, [wMonDataLocation]
+ cp ENEMY_PARTY_DATA
+ jr c, .getMonEntry
+
+ ld hl, wEnemyMons
+ jr z, .getMonEntry
+
+ cp 2
+ ld hl, wBoxMons
+ ld bc, wBoxMon2 - wBoxMon1
+ jr z, .getMonEntry
+
+ ld hl, wDayCareMon
+ jr .copyMonData
+
+.getMonEntry
+ ld a, [wWhichPokemon]
+ call AddNTimes
+
+.copyMonData
+ ld de, wLoadedMon
+ ld bc, wPartyMon2 - wPartyMon1
+ jp CopyData
+
+; get species of mon e in list [wMonDataLocation] for LoadMonData
+GetMonSpecies:
+ ld hl, wPartySpecies
+ ld a, [wMonDataLocation]
+ and a
+ jr z, .getSpecies
+ dec a
+ jr z, .enemyParty
+ ld hl, wBoxSpecies
+ jr .getSpecies
+.enemyParty
+ ld hl, wEnemyPartyMons
+.getSpecies
+ ld d, 0
+ add hl, de
+ ld a, [hl]
+ ld [wcf91], a
+ ret
diff --git a/engine/pokemon/remove_mon.asm b/engine/pokemon/remove_mon.asm
new file mode 100644
index 00000000..c85b96bf
--- /dev/null
+++ b/engine/pokemon/remove_mon.asm
@@ -0,0 +1,95 @@
+_RemovePokemon::
+ ld hl, wPartyCount
+ ld a, [wRemoveMonFromBox]
+ and a
+ jr z, .usePartyCount
+ ld hl, wNumInBox
+.usePartyCount
+ ld a, [hl]
+ dec a
+ ld [hli], a
+ ld a, [wWhichPokemon]
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld e, l
+ ld d, h
+ inc de
+.shiftMonSpeciesLoop
+ ld a, [de]
+ inc de
+ ld [hli], a
+ inc a ; reached terminator?
+ jr nz, .shiftMonSpeciesLoop ; if not, continue shifting species
+ ld hl, wPartyMonOT
+ ld d, PARTY_LENGTH - 1 ; max number of pokemon to shift
+ ld a, [wRemoveMonFromBox]
+ and a
+ jr z, .usePartyMonOTs
+ ld hl, wBoxMonOT
+ ld d, MONS_PER_BOX - 1
+.usePartyMonOTs
+ ld a, [wWhichPokemon]
+ call SkipFixedLengthTextEntries
+ ld a, [wWhichPokemon]
+ cp d ; are we removing the last pokemon?
+ jr nz, .notRemovingLastMon ; if not, shift the pokemon below
+ ld [hl], $ff ; else, write the terminator and return
+ ret
+.notRemovingLastMon
+ ld d, h
+ ld e, l
+ ld bc, NAME_LENGTH
+ add hl, bc
+ ld bc, wPartyMonNicks
+ ld a, [wRemoveMonFromBox]
+ and a
+ jr z, .usePartyMonNicks
+ ld bc, wBoxMonNicks
+.usePartyMonNicks
+ call CopyDataUntil
+ ld hl, wPartyMons
+ ld bc, wPartyMon2 - wPartyMon1
+ ld a, [wRemoveMonFromBox]
+ and a
+ jr z, .usePartyMonStructs
+ ld hl, wBoxMons
+ ld bc, wBoxMon2 - wBoxMon1
+.usePartyMonStructs
+ ld a, [wWhichPokemon]
+ call AddNTimes ; get address of the pokemon removed
+ ld d, h ; store in de for CopyDataUntil
+ ld e, l
+ ld a, [wRemoveMonFromBox]
+ and a
+ jr z, .copyUntilPartyMonOTs
+ ld bc, wBoxMon2 - wBoxMon1
+ add hl, bc ; get address of pokemon after the pokemon removed
+ ld bc, wBoxMonOT ; address of when to stop copying
+ jr .continue
+.copyUntilPartyMonOTs
+ ld bc, wPartyMon2 - wPartyMon1
+ add hl, bc ; get address of pokemon after the pokemon removed
+ ld bc, wPartyMonOT ; address of when to stop copying
+.continue
+ call CopyDataUntil ; shift all pokemon data after the removed mon to the removed mon's location
+ ld hl, wPartyMonNicks
+ ld a, [wRemoveMonFromBox]
+ and a
+ jr z, .usePartyMonNicks2
+ ld hl, wBoxMonNicks
+.usePartyMonNicks2
+ ld bc, NAME_LENGTH
+ ld a, [wWhichPokemon]
+ call AddNTimes
+ ld d, h
+ ld e, l
+ ld bc, NAME_LENGTH
+ add hl, bc
+ ld bc, wPartyMonNicksEnd
+ ld a, [wRemoveMonFromBox]
+ and a
+ jr z, .copyUntilPartyMonNicksEnd
+ ld bc, wBoxMonNicksEnd
+.copyUntilPartyMonNicksEnd
+ jp CopyDataUntil
diff --git a/engine/predefs17_2.asm b/engine/pokemon/set_types.asm
index e9235f13..e9235f13 100755
--- a/engine/predefs17_2.asm
+++ b/engine/pokemon/set_types.asm
diff --git a/engine/pokemon/status_ailments.asm b/engine/pokemon/status_ailments.asm
new file mode 100755
index 00000000..3da1fc43
--- /dev/null
+++ b/engine/pokemon/status_ailments.asm
@@ -0,0 +1,46 @@
+PrintStatusAilment::
+ ld a, [de]
+ bit PSN, a
+ jr nz, .psn
+ bit BRN, a
+ jr nz, .brn
+ bit FRZ, a
+ jr nz, .frz
+ bit PAR, a
+ jr nz, .par
+ and SLP
+ ret z
+ ld a, "S"
+ ld [hli], a
+ ld a, "L"
+ ld [hli], a
+ ld [hl], "P"
+ ret
+.psn
+ ld a, "P"
+ ld [hli], a
+ ld a, "S"
+ ld [hli], a
+ ld [hl], "N"
+ ret
+.brn
+ ld a, "B"
+ ld [hli], a
+ ld a, "R"
+ ld [hli], a
+ ld [hl], "N"
+ ret
+.frz
+ ld a, "F"
+ ld [hli], a
+ ld a, "R"
+ ld [hli], a
+ ld [hl], "Z"
+ ret
+.par
+ ld a, "P"
+ ld [hli], a
+ ld a, "A"
+ ld [hli], a
+ ld [hl], "R"
+ ret
diff --git a/engine/pokemon/status_screen.asm b/engine/pokemon/status_screen.asm
new file mode 100755
index 00000000..a2cfb595
--- /dev/null
+++ b/engine/pokemon/status_screen.asm
@@ -0,0 +1,496 @@
+DrawHP:
+; Draws the HP bar in the stats screen
+ call GetPredefRegisters
+ ld a, $1
+ jr DrawHP_
+
+DrawHP2:
+; Draws the HP bar in the party screen
+ call GetPredefRegisters
+ ld a, $2
+
+DrawHP_:
+ ld [wHPBarType], a
+ push hl
+ ld a, [wLoadedMonHP]
+ ld b, a
+ ld a, [wLoadedMonHP + 1]
+ ld c, a
+ or b
+ jr nz, .nonzeroHP
+ xor a
+ ld c, a
+ ld e, a
+ ld a, $6
+ ld d, a
+ jp .drawHPBarAndPrintFraction
+.nonzeroHP
+ ld a, [wLoadedMonMaxHP]
+ ld d, a
+ ld a, [wLoadedMonMaxHP + 1]
+ ld e, a
+ predef HPBarLength
+ ld a, $6
+ ld d, a
+ ld c, a
+.drawHPBarAndPrintFraction
+ pop hl
+ push de
+ push hl
+ push hl
+ call DrawHPBar
+ pop hl
+ ldh a, [hFlagsFFFA]
+ bit 0, a
+ jr z, .printFractionBelowBar
+ ld bc, $9 ; right of bar
+ jr .printFraction
+.printFractionBelowBar
+ ld bc, SCREEN_WIDTH + 1 ; below bar
+.printFraction
+ add hl, bc
+ ld de, wLoadedMonHP
+ lb bc, 2, 3
+ call PrintNumber
+ ld a, "/"
+ ld [hli], a
+ ld de, wLoadedMonMaxHP
+ lb bc, 2, 3
+ call PrintNumber
+ pop hl
+ pop de
+ ret
+
+
+; Predef 0x37
+StatusScreen:
+ call LoadMonData
+ ld a, [wMonDataLocation]
+ cp BOX_DATA
+ jr c, .DontRecalculate
+; mon is in a box or daycare
+ ld a, [wLoadedMonBoxLevel]
+ ld [wLoadedMonLevel], a
+ ld [wCurEnemyLVL], a
+ ld hl, wLoadedMonHPExp - 1
+ ld de, wLoadedMonStats
+ ld b, $1
+ call CalcStats ; Recalculate stats
+.DontRecalculate
+ ld hl, wd72c
+ set 1, [hl]
+ ld a, $33
+ ldh [rNR50], a ; Reduce the volume
+ call GBPalWhiteOutWithDelay3
+ call ClearScreen
+ call UpdateSprites
+ call LoadHpBarAndStatusTilePatterns
+ ld de, BattleHudTiles1 ; source
+ ld hl, vChars2 tile $6d ; dest
+ lb bc, BANK(BattleHudTiles1), 3
+ call CopyVideoDataDouble ; ·│ :L and halfarrow line end
+ ld de, BattleHudTiles2
+ ld hl, vChars2 tile $78
+ lb bc, BANK(BattleHudTiles2), 1
+ call CopyVideoDataDouble ; │
+ ld de, BattleHudTiles3
+ ld hl, vChars2 tile $76
+ lb bc, BANK(BattleHudTiles3), 2
+ call CopyVideoDataDouble ; ─ ┘
+ ld de, PTile
+ ld hl, vChars2 tile $72
+ lb bc, BANK(PTile), 1
+ call CopyVideoDataDouble ; bold P (for PP)
+ ldh a, [hTilesetType]
+ push af
+ xor a
+ ldh [hTilesetType], a
+ hlcoord 19, 1
+ lb bc, 6, 10
+ call DrawLineBox ; Draws the box around name, HP and status
+ ld de, -6
+ add hl, de
+ ld [hl], "<DOT>"
+ dec hl
+ ld [hl], "№"
+ hlcoord 19, 9
+ lb bc, 8, 6
+ call DrawLineBox ; Draws the box around types, ID No. and OT
+ hlcoord 10, 9
+ ld de, Type1Text
+ call PlaceString ; "TYPE1/"
+ hlcoord 11, 3
+ predef DrawHP
+ ld hl, wStatusScreenHPBarColor
+ call GetHealthBarColor
+ ld b, SET_PAL_STATUS_SCREEN
+ call RunPaletteCommand
+ hlcoord 16, 6
+ ld de, wLoadedMonStatus
+ call PrintStatusCondition
+ jr nz, .StatusWritten
+ hlcoord 16, 6
+ ld de, OKText
+ call PlaceString ; "OK"
+.StatusWritten
+ hlcoord 9, 6
+ ld de, StatusText
+ call PlaceString ; "STATUS/"
+ hlcoord 14, 2
+ call PrintLevel ; Pokémon level
+ ld a, [wMonHIndex]
+ ld [wd11e], a
+ ld [wd0b5], a
+ predef IndexToPokedex
+ hlcoord 3, 7
+ ld de, wd11e
+ lb bc, LEADING_ZEROES | 1, 3
+ call PrintNumber ; Pokémon no.
+ hlcoord 11, 10
+ predef PrintMonType
+ ld hl, NamePointers2
+ call .GetStringPointer
+ ld d, h
+ ld e, l
+ hlcoord 9, 1
+ call PlaceString ; Pokémon name
+ ld hl, OTPointers
+ call .GetStringPointer
+ ld d, h
+ ld e, l
+ hlcoord 12, 16
+ call PlaceString ; OT
+ hlcoord 12, 14
+ ld de, wLoadedMonOTID
+ lb bc, LEADING_ZEROES | 2, 5
+ call PrintNumber ; ID Number
+ ld d, $0
+ call PrintStatsBox
+ call Delay3
+ call GBPalNormal
+ hlcoord 1, 0
+ call LoadFlippedFrontSpriteByMonIndex ; draw Pokémon picture
+ ld a, [wMonDataLocation]
+ cp ENEMY_PARTY_DATA
+ jr z, .playRegularCry
+ cp BOX_DATA
+ jr z, .checkBoxData
+ callfar IsThisPartymonStarterPikachu_Party
+ jr nc, .playRegularCry
+ jr .playPikachuSoundClip
+.checkBoxData
+ callfar IsThisPartymonStarterPikachu_Box
+ jr nc, .playRegularCry
+.playPikachuSoundClip
+ ld e, 16
+ callfar PlayPikachuSoundClip
+ jr .continue
+.playRegularCry
+ ld a, [wcf91]
+ call PlayCry ; play Pokémon cry
+.continue
+ call WaitForTextScrollButtonPress ; wait for button
+ pop af
+ ldh [hTilesetType], a
+ ret
+
+.GetStringPointer
+ ld a, [wMonDataLocation]
+ add a
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [wMonDataLocation]
+ cp DAYCARE_DATA
+ ret z
+ ld a, [wWhichPokemon]
+ jp SkipFixedLengthTextEntries
+
+OTPointers:
+ dw wPartyMonOT
+ dw wEnemyMonOT
+ dw wBoxMonOT
+ dw wDayCareMonOT
+
+NamePointers2:
+ dw wPartyMonNicks
+ dw wEnemyMonNicks
+ dw wBoxMonNicks
+ dw wDayCareMonName
+
+Type1Text:
+ db "TYPE1/"
+ next ""
+ ; fallthrough
+Type2Text:
+ db "TYPE2/"
+ next ""
+ ; fallthrough
+IDNoText:
+ db "<ID>№/"
+ next ""
+ ; fallthrough
+OTText:
+ db "OT/"
+ next "@"
+
+StatusText:
+ db "STATUS/@"
+
+OKText:
+ db "OK@"
+
+; Draws a line starting from hl high b and wide c
+DrawLineBox:
+ ld de, SCREEN_WIDTH ; New line
+.PrintVerticalLine
+ ld [hl], $78 ; │
+ add hl, de
+ dec b
+ jr nz, .PrintVerticalLine
+ ld [hl], $77 ; ┘
+ dec hl
+.PrintHorizLine
+ ld [hl], $76 ; ─
+ dec hl
+ dec c
+ jr nz, .PrintHorizLine
+ ld [hl], $6f ; ← (halfarrow ending)
+ ret
+
+PTile: INCBIN "gfx/font/P.1bpp"
+
+PrintStatsBox:
+ ld a, d
+ and a ; a is 0 from the status screen
+ jr nz, .DifferentBox
+ hlcoord 0, 8
+ lb bc, 8, 8
+ call TextBoxBorder ; Draws the box
+ hlcoord 1, 9 ; Start printing stats from here
+ ld bc, $19 ; Number offset
+ jr .PrintStats
+.DifferentBox
+ hlcoord 9, 2
+ lb bc, 8, 9
+ call TextBoxBorder
+ hlcoord 11, 3
+ ld bc, $18
+.PrintStats
+ push bc
+ push hl
+ ld de, StatsText
+ call PlaceString
+ pop hl
+ pop bc
+ add hl, bc
+ ld de, wLoadedMonAttack
+ lb bc, 2, 3
+ call PrintStat
+ ld de, wLoadedMonDefense
+ call PrintStat
+ ld de, wLoadedMonSpeed
+ call PrintStat
+ ld de, wLoadedMonSpecial
+ jp PrintNumber
+PrintStat:
+ push hl
+ call PrintNumber
+ pop hl
+ ld de, SCREEN_WIDTH * 2
+ add hl, de
+ ret
+
+StatsText:
+ db "ATTACK"
+ next "DEFENSE"
+ next "SPEED"
+ next "SPECIAL@"
+
+StatusScreen2:
+ ldh a, [hTilesetType]
+ push af
+ xor a
+ ldh [hTilesetType], a
+ ldh [hAutoBGTransferEnabled], a
+ ld bc, NUM_MOVES + 1
+ ld hl, wMoves
+ call FillMemory
+ ld hl, wLoadedMonMoves
+ ld de, wMoves
+ ld bc, NUM_MOVES
+ call CopyData
+ callfar FormatMovesString
+ hlcoord 9, 2
+ lb bc, 5, 10
+ call ClearScreenArea ; Clear under name
+ hlcoord 19, 3
+ ld [hl], $78
+ hlcoord 0, 8
+ lb bc, 8, 18
+ call TextBoxBorder ; Draw move container
+ hlcoord 2, 9
+ ld de, wMovesString
+ call PlaceString ; Print moves
+ ld a, [wNumMovesMinusOne]
+ inc a
+ ld c, a
+ ld a, $4
+ sub c
+ ld b, a ; Number of moves ?
+ hlcoord 11, 10
+ ld de, SCREEN_WIDTH * 2
+ ld a, "<BOLD_P>"
+ call StatusScreen_PrintPP ; Print "PP"
+ ld a, b
+ and a
+ jr z, .InitPP
+ ld c, a
+ ld a, "-"
+ call StatusScreen_PrintPP ; Fill the rest with --
+.InitPP
+ ld hl, wLoadedMonMoves
+ decoord 14, 10
+ ld b, 0
+.PrintPP
+ ld a, [hli]
+ and a
+ jr z, .PPDone
+ push bc
+ push hl
+ push de
+ ld hl, wCurrentMenuItem
+ ld a, [hl]
+ push af
+ ld a, b
+ ld [hl], a
+ push hl
+ callfar GetMaxPP
+ pop hl
+ pop af
+ ld [hl], a
+ pop de
+ pop hl
+ push hl
+ ld bc, wPartyMon1PP - wPartyMon1Moves - 1
+ add hl, bc
+ ld a, [hl]
+ and $3f
+ ld [wStatusScreenCurrentPP], a
+ ld h, d
+ ld l, e
+ push hl
+ ld de, wStatusScreenCurrentPP
+ lb bc, 1, 2
+ call PrintNumber
+ ld a, "/"
+ ld [hli], a
+ ld de, wMaxPP
+ lb bc, 1, 2
+ call PrintNumber
+ pop hl
+ ld de, SCREEN_WIDTH * 2
+ add hl, de
+ ld d, h
+ ld e, l
+ pop hl
+ pop bc
+ inc b
+ ld a, b
+ cp $4
+ jr nz, .PrintPP
+.PPDone
+ hlcoord 9, 3
+ ld de, StatusScreenExpText
+ call PlaceString
+ ld a, [wLoadedMonLevel]
+ push af
+ cp MAX_LEVEL
+ jr z, .Level100
+ inc a
+ ld [wLoadedMonLevel], a ; Increase temporarily if not 100
+.Level100
+ hlcoord 14, 6
+ ld [hl], "<to>"
+ inc hl
+ inc hl
+ call PrintLevel
+ pop af
+ ld [wLoadedMonLevel], a
+ ld de, wLoadedMonExp
+ hlcoord 12, 4
+ lb bc, 3, 7
+ call PrintNumber ; exp
+ call CalcExpToLevelUp
+ ld de, wLoadedMonExp
+ hlcoord 7, 6
+ lb bc, 3, 7
+ call PrintNumber ; exp needed to level up
+ hlcoord 9, 0
+ call StatusScreen_ClearName
+ hlcoord 9, 1
+ call StatusScreen_ClearName
+ ld a, [wMonHIndex]
+ ld [wd11e], a
+ call GetMonName
+ hlcoord 9, 1
+ call PlaceString
+ ld a, $1
+ ldh [hAutoBGTransferEnabled], a
+ call Delay3
+ call WaitForTextScrollButtonPress ; wait for button
+ pop af
+ ldh [hTilesetType], a
+ ld hl, wd72c
+ res 1, [hl]
+ ld a, $77
+ ldh [rNR50], a
+ call GBPalWhiteOut
+ jp ClearScreen
+
+CalcExpToLevelUp:
+ ld a, [wLoadedMonLevel]
+ cp MAX_LEVEL
+ jr z, .atMaxLevel
+ inc a
+ ld d, a
+ callfar CalcExperience
+ ld hl, wLoadedMonExp + 2
+ ldh a, [hExperience + 2]
+ sub [hl]
+ ld [hld], a
+ ldh a, [hExperience + 1]
+ sbc [hl]
+ ld [hld], a
+ ldh a, [hExperience]
+ sbc [hl]
+ ld [hld], a
+ ret
+.atMaxLevel
+ ld hl, wLoadedMonExp
+ xor a
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+ ret
+
+StatusScreenExpText:
+ db "EXP POINTS"
+ next "LEVEL UP@"
+
+StatusScreen_ClearName:
+ ld bc, 10
+ ld a, " "
+ jp FillMemory
+
+StatusScreen_PrintPP:
+; print PP or -- c times, going down two rows each time
+ ld [hli], a
+ ld [hld], a
+ add hl, de
+ dec c
+ jr nz, StatusScreen_PrintPP
+ ret
diff --git a/engine/predefs.asm b/engine/predefs.asm
index cc6af5ac..73f69d03 100755
--- a/engine/predefs.asm
+++ b/engine/predefs.asm
@@ -1,4 +1,4 @@
-GetPredefPointer:
+GetPredefPointer::
; Store the contents of the register
; pairs (hl, de, bc) at wPredefRegisters.
; Then put the bank and address of predef
@@ -49,113 +49,4 @@ GetPredefPointer:
ret
-PredefPointers::
- ; these are pointers to ASM routines.
- ; they appear to be used in overworld map scripts.
- const_def
- add_predef DrawPlayerHUDAndHPBar
- add_predef CopyUncompressedPicToTilemap
- add_predef AnimateSendingOutMon
- add_predef ScaleSpriteByTwo
- add_predef LoadMonBackPic
- add_predef CopyDownscaledMonTiles
- add_predef Func_f0a7
- add_predef HealParty
- add_predef MoveAnimation
- add_predef DivideBCDPredef
- add_predef DivideBCDPredef2
- add_predef AddBCDPredef
- add_predef SubBCDPredef
- add_predef DivideBCDPredef3
- add_predef DivideBCDPredef4
- add_predef InitPlayerData
- add_predef FlagActionPredef
- add_predef HideObject
- add_predef IsObjectHidden
- add_predef ApplyOutOfBattlePoisonDamage
- add_predef AnyPartyAlive
- add_predef ShowObject
- add_predef ShowObject2
- add_predef ReplaceTileBlock
- add_predef InitPlayerData2
- add_predef LoadTilesetHeader
- add_predef LearnMoveFromLevelUp
- add_predef LearnMove
- add_predef GetQuantityOfItemInBag
-
- predef_const CheckForHiddenObjectOrBookshelfOrCardKeyDoor
- predef_const GiveItem
- dbw $03, CheckForHiddenObjectOrBookshelfOrCardKeyDoor ; home bank
- dbw $03, GiveItem ; home bank
-
- add_predef ChangeBGPalColor0_4Frames
- add_predef FindPathToPlayer
- add_predef PredefShakeScreenVertically
- add_predef CalcPositionOfPlayerRelativeToNPC
- add_predef ConvertNPCMovementDirectionsToJoypadMasks
- add_predef PredefShakeScreenHorizontally
- add_predef UpdateHPBar
- add_predef HPBarLength
- add_predef Diploma_TextBoxBorder
- add_predef DoubleOrHalveSelectedStats
- add_predef ShowPokedexMenu
- add_predef EvolutionAfterBattle
- add_predef SaveSAVtoSRAM0
- add_predef InitOpponent
- add_predef CableClub_Run
- add_predef DrawBadges
- add_predef ExternalClockTradeAnim
- add_predef BattleTransition
- add_predef CopyTileIDsFromList
- add_predef PlayIntro
- add_predef GetMoveSoundB
- add_predef FlashScreen
- add_predef GetTileAndCoordsInFrontOfPlayer
- add_predef StatusScreen
- add_predef StatusScreen2
- add_predef InternalClockTradeAnim
- add_predef TrainerEngage
- add_predef IndexToPokedex
- add_predef DisplayPicCenteredOrUpperRight
- add_predef UsedCut
- add_predef ShowPokedexData
- add_predef WriteMonMoves
- add_predef SaveSAV
- add_predef LoadSGB
- add_predef MarkTownVisitedAndLoadMissableObjects
- add_predef SetPartyMonTypes
- add_predef CanLearnTM
- add_predef TMToMove
- add_predef _RunPaletteCommand
- add_predef StarterDex
- add_predef _AddPartyMon
- add_predef UpdateHPBar2
- add_predef DrawEnemyHUDAndHPBar
- add_predef LoadTownMap_Nest
- add_predef PrintMonType
- add_predef EmotionBubble
- add_predef EmptyFunc3 ; return immediately
- add_predef AskName
- add_predef PewterGuys
- add_predef SaveSAVtoSRAM2
- add_predef LoadSAV2
- add_predef LoadSAV
- add_predef SaveSAVtoSRAM1
- add_predef DoInGameTradeDialogue
- add_predef HallOfFamePC
- add_predef DisplayDexRating
-
- predef_const _LeaveMapAnim
- predef_const EnterMapAnim
- dbw $1E, _LeaveMapAnim ; wrong bank
- dbw $1E, EnterMapAnim ; wrong bank
- add_predef GetTileTwoStepsInFrontOfPlayer
- add_predef CheckForCollisionWhenPushingBoulder
- add_predef PrintStrengthTxt
- add_predef PickUpItem
- add_predef PrintMoveType
- add_predef LoadMovePPs
- add_predef DrawHP
- add_predef DrawHP2
- add_predef DisplayElevatorFloorMenu
- add_predef OaksAideScript
+INCLUDE "data/predef_pointers.asm"
diff --git a/engine/predefs17.asm b/engine/predefs17.asm
deleted file mode 100755
index 21289c6a..00000000
--- a/engine/predefs17.asm
+++ /dev/null
@@ -1,9 +0,0 @@
-; this function temporarily makes the starters (and Ivysaur) seen
-; so that the full Pokedex information gets displayed in Oak's lab
-StarterDex:
- ld a, %01001011 ; set starter flags
- ld [wPokedexOwned], a
- predef ShowPokedexData
- xor a ; unset starter flags
- ld [wPokedexOwned], a
- ret
diff --git a/engine/predefs7.asm b/engine/predefs7.asm
deleted file mode 100755
index bfa0ab57..00000000
--- a/engine/predefs7.asm
+++ /dev/null
@@ -1,54 +0,0 @@
-DisplayElevatorFloorMenu:
- ld hl, wd730
- ld a, [hl]
- push af
- set 6, [hl]
- ld hl, WhichFloorText
- call PrintText
- pop af
- ld [wd730], a
- ld hl, wItemList
- ld a, l
- ld [wListPointer], a
- ld a, h
- ld [wListPointer + 1], a
- ld a, [wListScrollOffset]
- push af
- xor a
- ld [wCurrentMenuItem], a
- ld [wListScrollOffset], a
- ld [wPrintItemPrices], a
- ld a, SPECIALLISTMENU
- ld [wListMenuID], a
- call DisplayListMenuID
- pop bc
- ld a, b
- ld [wListScrollOffset], a
- ret c
- ld hl, wCurrentMapScriptFlags
- set 7, [hl]
- ld hl, wElevatorWarpMaps
- ld a, [wWhichPokemon]
- add a
- ld d, 0
- ld e, a
- add hl, de
- ld a, [hli]
- ld b, a
- ld a, [hl]
- ld c, a
- ld hl, wWarpEntries
- call .UpdateWarp
-
-.UpdateWarp
- inc hl
- inc hl
- ld a, b
- ld [hli], a ; destination warp ID
- ld a, c
- ld [hli], a ; destination map ID
- ret
-
-WhichFloorText:
- TX_FAR _WhichFloorText
- db "@"
diff --git a/engine/predefsA.asm b/engine/predefsA.asm
deleted file mode 100644
index e25735c5..00000000
--- a/engine/predefsA.asm
+++ /dev/null
@@ -1,73 +0,0 @@
-; inverts the BGP for 4 (6 on CGB due to lag) frames
-ChangeBGPalColor0_4Frames:
- call GetPredefRegisters ; leftover of red/blue, has no use here
- ld a, [rBGP]
- xor $ff
- ld [rBGP], a
- call UpdateGBCPal_BGP
- ld c, 4
- call DelayFrames
- ld a, [rBGP]
- xor $ff
- ld [rBGP], a
- call UpdateGBCPal_BGP
- ret
-
-PredefShakeScreenVertically:
-; Moves the window down and then back in a sequence of progressively smaller
-; numbers of pixels, starting at b.
- call GetPredefRegisters
- ld a, 1
- ld [wDisableVBlankWYUpdate], a
- xor a
-.loop
- ld [$ff96], a
- call .MutateWY
- call .MutateWY
- dec b
- ld a, b
- jr nz, .loop
- xor a
- ld [wDisableVBlankWYUpdate], a
- ret
-
-.MutateWY
- ld a, [$ff96]
- xor b
- ld [$ff96], a
- ld [rWY], a
- ld c, 3
- jp DelayFrames
-
-PredefShakeScreenHorizontally:
-; Moves the window right and then back in a sequence of progressively smaller
-; numbers of pixels, starting at b.
- call GetPredefRegisters
- xor a
-.loop
- ld [$ff97], a
- call .MutateWX
- ld c, 1
- call DelayFrames
- call .MutateWX
- dec b
- ld a, b
- jr nz, .loop
-
-; restore normal WX
- ld a, 7
- ld [rWX], a
- ret
-
-.MutateWX
- ld a, [$ff97]
- xor b
- ld [$ff97], a
- bit 7, a
- jr z, .skipZeroing
- xor a ; zero a if it's negative
-.skipZeroing
- add 7
- ld [rWX], a
- ld c, 4
- jp DelayFrames
diff --git a/engine/print_waiting_text.asm b/engine/print_waiting_text.asm
deleted file mode 100644
index bd2180a1..00000000
--- a/engine/print_waiting_text.asm
+++ /dev/null
@@ -1,19 +0,0 @@
-PrintWaitingText:
- coord hl, 3, 10
- lb bc, 1, 11
- ld a, [wIsInBattle]
- and a
- jr z, .asm_4b9a
- call TextBoxBorder
- jr .asm_4b9d
-.asm_4b9a
- call CableClub_TextBoxBorder
-.asm_4b9d
- coord hl, 4, 11
- ld de, WaitingText
- call PlaceString
- ld c, 50
- jp DelayFrames
-
-WaitingText:
- db "Waiting...!@"
diff --git a/engine/printer.asm b/engine/printer.asm
index 5be5286c..f0b681af 100644
--- a/engine/printer.asm
+++ b/engine/printer.asm
@@ -16,16 +16,16 @@ PrintPokedexEntry:
push af
xor a
ld [wUpdateSpritesEnabled], a
- ld [hCanceledPrinting], a
+ ldh [hCanceledPrinting], a
call Printer_PlayPrinterMusic
- ld a, [rIE]
+ ldh a, [rIE]
push af
xor a
- ld [rIF], a
+ ldh [rIF], a
ld a, $9
- ld [rIE], a
+ ldh [rIE], a
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call Printer_GetDexEntryRegisters
call Printer_StartTransmission
ld a, [wPrinterPokedexMonIsOwned]
@@ -40,10 +40,10 @@ PrintPokedexEntry:
ld [wcae2], a
call Printer_CopyTileMapToPrinterTileBuffer
call ClearScreen
- callab Pokedex_DrawInterface
- callab Pokedex_PlacePokemonList
+ callfar Pokedex_DrawInterface
+ callfar Pokedex_PlacePokemonList
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call .TryPrintPage
jr c, .finish_printing
ld a, [wPrinterPokedexMonIsOwned]
@@ -56,7 +56,7 @@ PrintPokedexEntry:
call DelayFrames
call SaveScreenTilesToBuffer1
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call Printer_PrepareDexEntryForPrinting
ld a, $7
call Printer_StartTransmission
@@ -65,16 +65,16 @@ PrintPokedexEntry:
call Printer_CopyTileMapToPrinterTileBuffer
call LoadScreenTilesFromBuffer1
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call .TryPrintPage
.finish_printing
xor a
ld [wPrinterConnectionOpen], a
ld [wPrinterOpcode], a
xor a
- ld [rIF], a
+ ldh [rIF], a
pop af
- ld [rIE], a
+ ldh [rIE], a
call ReloadMapAfterPrinter
call Printer_PlayMapMusic
pop af
@@ -105,7 +105,7 @@ PrintPokedexEntry:
ret
Printer_GetDexEntryRegisters:
- callab DrawDexEntryOnScreen
+ callfar DrawDexEntryOnScreen
ld a, l
ld [wPrinterPokedexEntryTextPointer], a
ld a, h
@@ -125,20 +125,20 @@ Printer_GetDexEntryRegisters:
Printer_PrepareDexEntryForPrinting:
call ClearScreen
- callab Pokedex_PrepareDexEntryForPrinting
+ callfar Pokedex_PrepareDexEntryForPrinting
ret
PrintSurfingMinigameHighScore:
xor a
- ld [hCanceledPrinting], a
+ ldh [hCanceledPrinting], a
call Printer_PlayPrinterMusic
call Printer_PrepareSurfingMinigameHighScoreTileMap
- ld a, [rIE]
+ ldh a, [rIE]
push af
xor a
- ld [rIF], a
+ ldh [rIF], a
ld a, $9
- ld [rIE], a
+ ldh [rIE], a
call StartTransmission_Send9Rows
ld a, $13
ld [wcae2], a
@@ -163,24 +163,24 @@ PrintSurfingMinigameHighScore:
ld [wPrinterOpcode], a
call Printer_CopyTileMapFromPrinterTileBuffer
xor a
- ld [rIF], a
+ ldh [rIF], a
pop af
- ld [rIE], a
+ ldh [rIE], a
call ReloadMapAfterPrinter
call Printer_PlayMapMusic
ret
-PrintDiploma:
+PrintDiploma::
xor a
- ld [hCanceledPrinting], a
+ ldh [hCanceledPrinting], a
call Printer_PlayPrinterMusic
call _DisplayDiploma
- ld a, [rIE]
+ ldh a, [rIE]
push af
xor a
- ld [rIF], a
+ ldh [rIF], a
ld a, $9
- ld [rIE], a
+ ldh [rIE], a
call StartTransmission_Send9Rows
ld a, $10
ld [wcae2], a
@@ -194,7 +194,7 @@ PrintDiploma:
call DelayFrames
call SaveScreenTilesToBuffer1
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call Func_e9ad3
call StartTransmission_Send9Rows
ld a, $3
@@ -208,9 +208,9 @@ PrintDiploma:
ld [wPrinterOpcode], a
call Printer_CopyTileMapFromPrinterTileBuffer
xor a
- ld [rIF], a
+ ldh [rIF], a
pop af
- ld [rIE], a
+ ldh [rIE], a
call ReloadMapAfterPrinter
call Printer_PlayMapMusic
ret
@@ -246,17 +246,17 @@ PrintPCBox::
push af
xor a
ld [wUpdateSpritesEnabled], a
- ld [hCanceledPrinting], a
+ ldh [hCanceledPrinting], a
call Printer_PlayPrinterMusic
- ld a, [rIE]
+ ldh a, [rIE]
push af
xor a
- ld [rIF], a
+ ldh [rIF], a
ld a, $9
- ld [rIE], a
+ ldh [rIE], a
call SaveScreenTilesToBuffer1
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call PrintPCBox_DrawPage1
call StartTransmission_Send9Rows
ld a, $10
@@ -271,7 +271,7 @@ PrintPCBox::
ld c, 12
call DelayFrames
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call PrintPCBox_DrawPage2
call StartTransmission_Send9Rows
ld a, $0
@@ -286,7 +286,7 @@ PrintPCBox::
ld c, 12
call DelayFrames
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call PrintPCBox_DrawPage3
call StartTransmission_Send9Rows
ld a, $0
@@ -301,7 +301,7 @@ PrintPCBox::
ld c, 12
call DelayFrames
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call PrintPCBox_DrawPage4
call StartTransmission_Send9Rows
ld a, $3
@@ -314,9 +314,9 @@ PrintPCBox::
ld [wPrinterConnectionOpen], a
ld [wPrinterOpcode], a
xor a
- ld [rIF], a
+ ldh [rIF], a
pop af
- ld [rIE], a
+ ldh [rIE], a
call ReloadMapAfterPrinter
call Printer_PlayMapMusic
pop af
@@ -352,20 +352,20 @@ Func_e8dfb:
ret
String_e8e1f:
- TX_FAR _NoPokemonText
- db "@"
+ text_far _NoPokemonText
+ text_end
-PrintFanClubPortrait:
+PrintFanClubPortrait::
xor a
- ld [hCanceledPrinting], a
+ ldh [hCanceledPrinting], a
call Printer_PlayPrinterMusic
call Printer_GetMonStats
- ld a, [rIE]
+ ldh a, [rIE]
push af
xor a
- ld [rIF], a
+ ldh [rIF], a
ld a, $9
- ld [rIE], a
+ ldh [rIE], a
call StartTransmission_Send9Rows
ld a, $13
ld [wcae2], a
@@ -390,9 +390,9 @@ PrintFanClubPortrait:
ld [wPrinterOpcode], a
call Printer_CopyTileMapFromPrinterTileBuffer
xor a
- ld [rIF], a
+ ldh [rIF], a
pop af
- ld [rIE], a
+ ldh [rIE], a
call ReloadMapAfterPrinter
call Printer_PlayMapMusic
ret
@@ -403,17 +403,17 @@ PrinterDebug:
push de
push hl
call StopAllMusic
- ld a, [rIE]
+ ldh a, [rIE]
push af
xor a
- ld [rIF], a
+ ldh [rIF], a
ld a, $9
- ld [rIE], a
+ ldh [rIE], a
call StartTransmission_Send9Rows
ld a, $13
ld [wcae2], a
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call Printer_CopyTileMapToPrinterTileBuffer
call PrinterDebug_LoadGFX
.loop
@@ -434,9 +434,9 @@ PrinterDebug:
xor a
call FillMemory
xor a
- ld [rIF], a
+ ldh [rIF], a
pop af
- ld [rIE], a
+ ldh [rIE], a
pop hl
pop de
pop bc
@@ -444,7 +444,7 @@ PrinterDebug:
ret
Printer_CheckPressingB:
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
and B_BUTTON
jr nz, .quit
and a
@@ -461,43 +461,43 @@ Printer_CheckPressingB:
ld a, $16
ld [wPrinterOpcode], a
ld a, $88
- ld [rSB], a
+ ldh [rSB], a
ld a, $1
- ld [rSC], a
+ ldh [rSC], a
ld a, $81
- ld [rSC], a
+ ldh [rSC], a
.wait_send_cancel
ld a, [wPrinterOpcode]
and a
jr nz, .wait_send_cancel
.already_done
ld a, $1
- ld [hCanceledPrinting], a
+ ldh [hCanceledPrinting], a
scf
ret
Printer_CopyTileMapToPrinterTileBuffer:
- coord hl, 0, 0
- coord de, 0, 0, wPrinterTileBuffer
+ hlcoord 0, 0
+ decoord 0, 0, wPrinterTileBuffer
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
call CopyData
ret
Printer_CopyTileMapFromPrinterTileBuffer:
- coord hl, 0, 0, wPrinterTileBuffer
- coord de, 0, 0
+ hlcoord 0, 0, wPrinterTileBuffer
+ decoord 0, 0
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
call CopyData
ret
Printer_ResetJoypadHRAM:
xor a
- ld [hJoyLast], a
- ld [hJoyReleased], a
- ld [hJoyPressed], a
- ld [hJoyHeld], a
- ld [hJoy5], a
- ld [hJoy6], a
+ ldh [hJoyLast], a
+ ldh [hJoyReleased], a
+ ldh [hJoyPressed], a
+ ldh [hJoyHeld], a
+ ldh [hJoy5], a
+ ldh [hJoy6], a
ret
Printer_PlayPrinterMusic:
@@ -568,8 +568,8 @@ GBPrinter_UpdateStatusMessage:
ret z
push af
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- coord hl, 0, 5
+ ldh [hAutoBGTransferEnabled], a
+ hlcoord 0, 5
lb bc, 10, 18
call TextBoxBorder
pop af
@@ -581,13 +581,13 @@ GBPrinter_UpdateStatusMessage:
ld e, [hl]
inc hl
ld d, [hl]
- coord hl, 1, 7
+ hlcoord 1, 7
call PlaceString
- coord hl, 2, 15
+ hlcoord 2, 15
ld de, .PressBToCancel
call PlaceString
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
xor a
ld [wPrinterStatusIndicator], a
ret
@@ -648,39 +648,39 @@ Printer_PrepareSurfingMinigameHighScoreTileMap:
ld hl, vChars2
lb bc, BANK(SurfingPikachu2Graphics), (SurfingPikachu2GraphicsEnd - SurfingPikachu2Graphics) / $10
call CopyVideoData
- coord hl, 0, 0
+ hlcoord 0, 0
call .PlaceRowAlternatingTiles
- coord hl, 0, 17
+ hlcoord 0, 17
call .PlaceRowAlternatingTiles
- coord hl, 0, 0
+ hlcoord 0, 0
call .PlaceColumnAlternatingTiles
- coord hl, 19, 0
+ hlcoord 19, 0
call .PlaceColumnAlternatingTiles
ld a, $4
- coord hl, 0, 0
+ hlcoord 0, 0
ld [hl], a
- coord hl, 0, 17
+ hlcoord 0, 17
ld [hl], a
- coord hl, 19, 0
+ hlcoord 19, 0
ld [hl], a
- coord hl, 19, 17
+ hlcoord 19, 17
ld [hl], a
ld de, .Tilemap1
- coord hl, 10, 8
+ hlcoord 10, 8
lb bc, 3, 8
call Diploma_Surfing_CopyBox
ld de, .Tilemap2
- coord hl, 2, 11
+ hlcoord 2, 11
lb bc, 6, 16
call Diploma_Surfing_CopyBox
ld de, .PikachusBeachString
- coord hl, 3, 2
+ hlcoord 3, 2
call PlaceString
ld de, .HiScoreString
- coord hl, 9, 4
+ hlcoord 9, 4
call PlaceString
ld de, .PointsString
- coord hl, 12, 6
+ hlcoord 12, 6
call PlaceString
ld de, wPlayerName
ld hl, wPlayerName
@@ -696,14 +696,14 @@ Printer_PrepareSurfingMinigameHighScoreTileMap:
xor a
.got_name_length
ld c, a
- coord hl, 2, 4
+ hlcoord 2, 4
add hl, bc
call PlaceString
call CopySurfingMinigameScore
ld b, 8
call RunPaletteCommand
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call Delay3
call GBPalNormal
ret
@@ -771,7 +771,7 @@ Diploma_Surfing_CopyBox:
CopySurfingMinigameScore:
ld de, wSurfingMinigameHiScore + 1
- coord hl, 7, 6
+ hlcoord 7, 6
ld a, [de]
call .BCDConvertScore
ld a, [de]
@@ -796,19 +796,19 @@ PrintPCBox_DrawPage1:
ld [wBoxNumString], a
call ClearScreen
call PrintPCBox_PlaceHorizontalLines
- coord hl, 0, 0
+ hlcoord 0, 0
ld bc, 11 * SCREEN_WIDTH
ld a, " "
call FillMemory
call PrintPCBox_DrawLeftAndRightBorders
call PrintPCBox_DrawTopBorder
- coord hl, 4, 4
+ hlcoord 4, 4
ld de, .PokemonListString
call PlaceString
- coord hl, 7, 6
+ hlcoord 7, 6
ld de, .BoxString
call PlaceString
- coord hl, 11, 6
+ hlcoord 11, 6
ld a, [wCurrentBoxNum]
and $7f
cp 9
@@ -823,7 +823,7 @@ PrintPCBox_DrawPage1:
add "1"
.placed_box_number
ld [hl], a
- coord hl, 4, 9
+ hlcoord 4, 9
ld de, wBoxSpecies
ld c, $3
call PrintPCBox_PlaceBoxMonInfo
@@ -839,7 +839,7 @@ PrintPCBox_DrawPage2:
ld a, [wBoxDataStart]
cp 4
ret c
- coord hl, 4, 0
+ hlcoord 4, 0
ld de, wBoxSpecies + 3
ld c, 6
call PrintPCBox_PlaceBoxMonInfo
@@ -852,7 +852,7 @@ PrintPCBox_DrawPage3:
ld a, [wBoxDataStart]
cp 10
ret c
- coord hl, 4, 0
+ hlcoord 4, 0
ld de, wBoxSpecies + 9
ld c, 6
call PrintPCBox_PlaceBoxMonInfo
@@ -862,16 +862,16 @@ PrintPCBox_DrawPage4:
call ClearScreen
call PrintPCBox_PlaceHorizontalLines
call PrintPCBox_DrawLeftAndRightBorders
- coord hl, 0, 15
+ hlcoord 0, 15
call PrintPCBox_DrawBottomBorderAtHL
- coord hl, 0, 16
+ hlcoord 0, 16
ld bc, 2 * SCREEN_WIDTH
ld a, " "
call FillMemory
ld a, [wBoxDataStart]
cp 16
ret c
- coord hl, 4, 0
+ hlcoord 4, 0
ld de, wBoxSpecies + 15
ld c, 5
call PrintPCBox_PlaceBoxMonInfo
@@ -933,7 +933,7 @@ PrintPCBox_PlaceBoxMonInfo:
ret
PrintPCBox_DrawTopBorder:
- coord hl, 0, 0
+ hlcoord 0, 0
ld a, $79
ld [hli], a
ld a, $7a
@@ -947,7 +947,7 @@ PrintPCBox_DrawTopBorder:
ret
PrintPCBox_DrawLeftAndRightBorders:
- coord hl, 0, 0
+ hlcoord 0, 0
ld de, SCREEN_WIDTH - 1
ld c, SCREEN_HEIGHT
.loop
@@ -961,7 +961,7 @@ PrintPCBox_DrawLeftAndRightBorders:
ret
PrintPCBox_DrawBottomBorder:
- coord hl, 0, 17
+ hlcoord 0, 17
PrintPCBox_DrawBottomBorderAtHL:
ld a, $7d
ld [hli], a
@@ -976,10 +976,10 @@ PrintPCBox_DrawBottomBorderAtHL:
ret
PrintPCBox_PlaceHorizontalLines:
- coord hl, 4, 0
+ hlcoord 4, 0
ld c, 6
call .PlaceHorizontalLine
- coord hl, 6, 1
+ hlcoord 6, 1
ld c, 6
.PlaceHorizontalLine:
.loop
diff --git a/engine/printer/serial.asm b/engine/printer/serial.asm
index fa83eb9d..97f655bb 100755
--- a/engine/printer/serial.asm
+++ b/engine/printer/serial.asm
@@ -7,8 +7,8 @@ Printer_StartTransmission:
xor a
call Printer_FillMemory
xor a
- ld [rSB], a
- ld [rSC], a
+ ldh [rSB], a
+ ldh [rSC], a
ld [wPrinterOpcode], a
ld hl, wPrinterConnectionOpen
set 0, [hl]
@@ -269,11 +269,11 @@ Printer_PrepareToSend:
ld a, $1
ld [wPrinterOpcode], a
ld a, $88
- ld [rSB], a
+ ldh [rSB], a
ld a, $1
- ld [rSC], a
+ ldh [rSC], a
ld a, $81
- ld [rSC], a
+ ldh [rSC], a
ret
CopyPrinterDataHeader:
@@ -438,7 +438,7 @@ PrinterDataPacket6: ; unused
db 15, 0, $00, 0
dw 15
-PrinterSerial_:
+PrinterSerial_::
ld a, [wPrinterOpcode]
ld e, a
ld d, 0
@@ -573,7 +573,7 @@ PrinterSerial_:
ret
.Receive1:
- ld a, [rSB]
+ ldh a, [rSB]
ld [wPrinterHandshake], a
ld a, $0
call .SendByte
@@ -581,7 +581,7 @@ PrinterSerial_:
ret
.Receive2:
- ld a, [rSB]
+ ldh a, [rSB]
ld [wPrinterStatusFlags], a
xor a
ld [wPrinterOpcode], a
@@ -606,15 +606,15 @@ PrinterSerial_:
ret
.SendByte:
- ld [rSB], a
+ ldh [rSB], a
ld a, $1
- ld [rSC], a
+ ldh [rSC], a
ld a, $81
- ld [rSC], a
+ ldh [rSC], a
ret
.Receive2_:
- ld a, [rSB]
+ ldh a, [rSB]
ld [wPrinterStatusFlags], a
xor a
ld [wPrinterOpcode], a
diff --git a/engine/random.asm b/engine/random.asm
deleted file mode 100755
index 2fc83f6f..00000000
--- a/engine/random.asm
+++ /dev/null
@@ -1,13 +0,0 @@
-Random_::
-; Generate a random 16-bit value.
- ld a, [rDIV]
- ld b, a
- ld a, [hRandomAdd]
- adc b
- ld [hRandomAdd], a
- ld a, [rDIV]
- ld b, a
- ld a, [hRandomSub]
- sbc b
- ld [hRandomSub], a
- ret
diff --git a/engine/remove_pokemon.asm b/engine/remove_pokemon.asm
deleted file mode 100644
index f29a428d..00000000
--- a/engine/remove_pokemon.asm
+++ /dev/null
@@ -1,95 +0,0 @@
-_RemovePokemon:
- ld hl, wPartyCount
- ld a, [wRemoveMonFromBox]
- and a
- jr z, .usePartyCount
- ld hl, wNumInBox
-.usePartyCount
- ld a, [hl]
- dec a
- ld [hli], a
- ld a, [wWhichPokemon]
- ld c, a
- ld b, $0
- add hl, bc
- ld e, l
- ld d, h
- inc de
-.shiftMonSpeciesLoop
- ld a, [de]
- inc de
- ld [hli], a
- inc a ; reached terminator?
- jr nz, .shiftMonSpeciesLoop ; if not, continue shifting species
- ld hl, wPartyMonOT
- ld d, PARTY_LENGTH - 1 ; max number of pokemon to shift
- ld a, [wRemoveMonFromBox]
- and a
- jr z, .usePartyMonOTs
- ld hl, wBoxMonOT
- ld d, MONS_PER_BOX - 1
-.usePartyMonOTs
- ld a, [wWhichPokemon]
- call SkipFixedLengthTextEntries
- ld a, [wWhichPokemon]
- cp d ; are we removing the last pokemon?
- jr nz, .notRemovingLastMon ; if not, shift the pokemon below
- ld [hl], $ff ; else, write the terminator and return
- ret
-.notRemovingLastMon
- ld d, h
- ld e, l
- ld bc, NAME_LENGTH
- add hl, bc
- ld bc, wPartyMonNicks
- ld a, [wRemoveMonFromBox]
- and a
- jr z, .usePartyMonNicks
- ld bc, wBoxMonNicks
-.usePartyMonNicks
- call CopyDataUntil
- ld hl, wPartyMons
- ld bc, wPartyMon2 - wPartyMon1
- ld a, [wRemoveMonFromBox]
- and a
- jr z, .usePartyMonStructs
- ld hl, wBoxMons
- ld bc, wBoxMon2 - wBoxMon1
-.usePartyMonStructs
- ld a, [wWhichPokemon]
- call AddNTimes ; get address of the pokemon removed
- ld d, h ; store in de for CopyDataUntil
- ld e, l
- ld a, [wRemoveMonFromBox]
- and a
- jr z, .copyUntilPartyMonOTs
- ld bc, wBoxMon2 - wBoxMon1
- add hl, bc ; get address of pokemon after the pokemon removed
- ld bc, wBoxMonOT ; address of when to stop copying
- jr .continue
-.copyUntilPartyMonOTs
- ld bc, wPartyMon2 - wPartyMon1
- add hl, bc ; get address of pokemon after the pokemon removed
- ld bc, wPartyMonOT ; address of when to stop copying
-.continue
- call CopyDataUntil ; shift all pokemon data after the removed mon to the removed mon's location
- ld hl, wPartyMonNicks
- ld a, [wRemoveMonFromBox]
- and a
- jr z, .usePartyMonNicks2
- ld hl, wBoxMonNicks
-.usePartyMonNicks2
- ld bc, NAME_LENGTH
- ld a, [wWhichPokemon]
- call AddNTimes
- ld d, h
- ld e, l
- ld bc, NAME_LENGTH
- add hl, bc
- ld bc, wPartyMonNicksEnd
- ld a, [wRemoveMonFromBox]
- and a
- jr z, .copyUntilPartyMonNicksEnd
- ld bc, wBoxMonNicksEnd
-.copyUntilPartyMonNicksEnd
- jp CopyDataUntil
diff --git a/engine/save.asm b/engine/save.asm
deleted file mode 100755
index 7f453bf0..00000000
--- a/engine/save.asm
+++ /dev/null
@@ -1,682 +0,0 @@
-LoadSAV:
-;(if carry -> write
-;"the file data is destroyed")
- call ClearScreen
- call LoadFontTilePatterns
- call LoadTextBoxTilePatterns
- call LoadSAV0
- jr c, .badsum
- call LoadSAV1
- jr c, .badsum
- call LoadSAV2
- jr c, .badsum
- ld a, $2 ; good checksum
- jr .goodsum
-.badsum
- ld hl, wd730
- push hl
- set 6, [hl]
- ld hl, FileDataDestroyedText
- call PrintText
- ld c, 100
- call DelayFrames
- pop hl
- res 6, [hl]
- ld a, $1 ; bad checksum
-.goodsum
- ld [wSaveFileStatus], a
- ret
-
-FileDataDestroyedText:
- TX_FAR _FileDataDestroyedText
- db "@"
-
-LoadSAV0:
- call EnableSRAMAndLatchClockData
- ld a, $1
- ld [MBC1SRamBank], a
- ld hl, sPlayerName ; hero name located in SRAM
- ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV
- call SAVCheckSum
- ld c, a
- ld a, [sMainDataCheckSum] ; SAV's checksum
- cp c
- jp z, .checkSumsMatched
-
-; If the computed checksum didn't match the saved on, try again.
- ld hl, sPlayerName
- ld bc, sMainDataCheckSum - sPlayerName
- call SAVCheckSum
- ld c, a
- ld a, [sMainDataCheckSum] ; SAV's checksum
- cp c
- jp nz, SAVBadCheckSum
-
-.checkSumsMatched
- ld hl, sPlayerName
- ld de, wPlayerName
- ld bc, NAME_LENGTH
- call CopyData
- ld hl, sMainData
- ld de, wMainDataStart
- ld bc, wMainDataEnd - wMainDataStart
- call CopyData
- ld hl, wCurMapTileset
- set 7, [hl]
- ld hl, sSpriteData
- ld de, wSpriteDataStart
- ld bc, wSpriteDataEnd - wSpriteDataStart
- call CopyData
- ld a, [sTilesetType]
- ld [hTilesetType], a
- ld hl, sCurBoxData
- ld de, wBoxDataStart
- ld bc, wBoxDataEnd - wBoxDataStart
- call CopyData
- and a
- jp SAVGoodChecksum
-
-LoadSAV1:
- call EnableSRAMAndLatchClockData
- ld a, $1
- ld [MBC1SRamBank], a
- ld hl, sPlayerName ; hero name located in SRAM
- ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV
- call SAVCheckSum
- ld c, a
- ld a, [sMainDataCheckSum] ; SAV's checksum
- cp c
- jr nz, SAVBadCheckSum
- ld hl, sCurBoxData
- ld de, wBoxDataStart
- ld bc, wBoxDataEnd - wBoxDataStart
- call CopyData
- and a
- jp SAVGoodChecksum
-
-LoadSAV2:
- call EnableSRAMAndLatchClockData
- ld a, $1
- ld [MBC1SRamBank], a
- ld hl, sPlayerName ; hero name located in SRAM
- ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV
- call SAVCheckSum
- ld c, a
- ld a, [sMainDataCheckSum] ; SAV's checksum
- cp c
- jp nz, SAVBadCheckSum
- ld hl, sPartyData
- ld de, wPartyDataStart
- ld bc, wPartyDataEnd - wPartyDataStart
- call CopyData
- ld hl, sMainData
- ld de, wPokedexOwned
- ld bc, wPokedexSeenEnd - wPokedexOwned
- call CopyData
- and a
- jp SAVGoodChecksum
-
-SAVBadCheckSum:
- scf
-
-SAVGoodChecksum:
- call DisableSRAMAndPrepareClockData
- ret
-
-LoadSAVIgnoreBadCheckSum:
-; unused function that loads save data and ignores bad checksums
- call LoadSAV0
- call LoadSAV1
- jp LoadSAV2
-
-SaveSAV:
- callba PrintSaveScreenText
- ld c, 10
- call DelayFrames
- ld hl, WouldYouLikeToSaveText
- call SaveSAVConfirm
- and a ;|0 = Yes|1 = No|
- ret nz
- ld c, 10
- call DelayFrames
- ld a, [wSaveFileStatus]
- cp $1
- jr z, .save
- call SAVCheckRandomID
- jr z, .save
- ld hl, OlderFileWillBeErasedText
- call SaveSAVConfirm
- and a
- ret nz
-.save
- call SaveSAVtoSRAM
- ld hl, SavingText
- call PrintText
- ld c, 128
- call DelayFrames
- ld hl, GameSavedText
- call PrintText
- ld c,10
- call DelayFrames
- ld a, SFX_SAVE
- call PlaySoundWaitForCurrent
- call WaitForSoundToFinish
- ld c, 30
- call DelayFrames
- ret
-
-SaveSAVConfirm:
- call PrintText
- coord hl, 0, 7
- lb bc, 8, 1
- ld a, TWO_OPTION_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID ; yes/no menu
- ld a, [wCurrentMenuItem]
- ret
-
-WouldYouLikeToSaveText:
- TX_FAR _WouldYouLikeToSaveText
- db "@"
-
-SavingText:
- TX_FAR _SavingText
- db "@"
-
-GameSavedText:
- TX_FAR _GameSavedText
- db "@"
-
-OlderFileWillBeErasedText:
- TX_FAR _OlderFileWillBeErasedText
- db "@"
-
-SaveSAVtoSRAM0:
- call EnableSRAMAndLatchClockData
- ld a, $1
- ld [MBC1SRamBank], a
- ld hl, wPlayerName
- ld de, sPlayerName
- ld bc, NAME_LENGTH
- call CopyData
- ld hl, wMainDataStart
- ld de, sMainData
- ld bc, wMainDataEnd - wMainDataStart
- call CopyData
- ld hl, wSpriteDataStart
- ld de, sSpriteData
- ld bc, wSpriteDataEnd - wSpriteDataStart
- call CopyData
- ld hl, wBoxDataStart
- ld de, sCurBoxData
- ld bc, wBoxDataEnd - wBoxDataStart
- call CopyData
- ld a, [hTilesetType]
- ld [sTilesetType], a
- ld hl, sPlayerName
- ld bc, sMainDataCheckSum - sPlayerName
- call SAVCheckSum
- ld [sMainDataCheckSum], a
- call DisableSRAMAndPrepareClockData
- ret
-
-SaveSAVtoSRAM1:
-; stored pokémon
- call EnableSRAMAndLatchClockData
- ld a, $1
- ld [MBC1SRamBank], a
- ld hl, wBoxDataStart
- ld de, sCurBoxData
- ld bc, wBoxDataEnd - wBoxDataStart
- call CopyData
- ld hl, sPlayerName
- ld bc, sMainDataCheckSum - sPlayerName
- call SAVCheckSum
- ld [sMainDataCheckSum], a
- call DisableSRAMAndPrepareClockData
- ret
-
-SaveSAVtoSRAM2:
- call EnableSRAMAndLatchClockData
- ld a, $1
- ld [MBC1SRamBank], a
- ld hl, wPartyDataStart
- ld de, sPartyData
- ld bc, wPartyDataEnd - wPartyDataStart
- call CopyData
- ld hl, wPokedexOwned ; pokédex only
- ld de, sMainData
- ld bc, wPokedexSeenEnd - wPokedexOwned
- call CopyData
- ld hl, wPikachuHappiness
- ld de, sMainData + $179
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hl]
- ld [de], a
- ld hl, sPlayerName
- ld bc, sMainDataCheckSum - sPlayerName
- call SAVCheckSum
- ld [sMainDataCheckSum], a
- call DisableSRAMAndPrepareClockData
- ret
-
-SaveSAVtoSRAM:
- ld a, $2
- ld [wSaveFileStatus], a
- call SaveSAVtoSRAM0
- call SaveSAVtoSRAM1
- jp SaveSAVtoSRAM2
-
-SAVCheckSum:
-;Check Sum (result[1 byte] is complemented)
- ld d, 0
-.loop
- ld a, [hli]
- add d
- ld d, a
- dec bc
- ld a, b
- or c
- jr nz, .loop
- ld a, d
- cpl
- ret
-
-CalcIndividualBoxCheckSums:
- ld hl, sBox1 ; sBox7
- ld de, sBank2IndividualBoxChecksums ; sBank3IndividualBoxChecksums
- ld b, NUM_BOXES / 2
-.loop
- push bc
- push de
- ld bc, wBoxDataEnd - wBoxDataStart
- call SAVCheckSum
- pop de
- ld [de], a
- inc de
- pop bc
- dec b
- jr nz, .loop
- ret
-
-GetBoxSRAMLocation:
-; in: a = box num
-; out: b = box SRAM bank, hl = pointer to start of box
- ld hl, BoxSRAMPointerTable
- ld a, [wCurrentBoxNum]
- and $7f
- cp NUM_BOXES / 2
- ld b, 2
- jr c, .next
- inc b
- sub NUM_BOXES / 2
-.next
- ld e, a
- ld d, 0
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ret
-
-BoxSRAMPointerTable:
- dw sBox1 ; sBox7
- dw sBox2 ; sBox8
- dw sBox3 ; sBox9
- dw sBox4 ; sBox10
- dw sBox5 ; sBox11
- dw sBox6 ; sBox12
-
-ChangeBox::
- ld hl, WhenYouChangeBoxText
- call PrintText
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- and a
- ret nz ; return if No was chosen
- ld hl, wCurrentBoxNum
- bit 7, [hl] ; is it the first time player is changing the box?
- call z, EmptyAllSRAMBoxes ; if so, empty all boxes in SRAM
- call DisplayChangeBoxMenu
- call UpdateSprites
- ld hl, hFlags_0xFFFA
- set 1, [hl]
- call HandleMenuInput
- ld hl, hFlags_0xFFFA
- res 1, [hl]
- bit 1, a ; pressed b
- ret nz
- ld a, $b6
- call PlaySoundWaitForCurrent
- call WaitForSoundToFinish
- call GetBoxSRAMLocation
- ld e, l
- ld d, h
- 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, wBoxDataStart
- call CopyBoxToOrFromSRAM ; copy new box from SRAM to WRAM
- ld hl, wMapTextPtr
- ld de, wChangeBoxSavedMapTextPointer
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hl]
- ld [de], a
- call RestoreMapTextPointer
- call SaveSAVtoSRAM
- ld hl, wChangeBoxSavedMapTextPointer
- call SetMapTextPointer
- ret
-
-WhenYouChangeBoxText:
- TX_FAR _WhenYouChangeBoxText
- db "@"
-
-CopyBoxToOrFromSRAM:
-; copy an entire box from hl to de with b as the SRAM bank
- push hl
- call EnableSRAMAndLatchClockData
- ld a, b
- ld [MBC1SRamBank], a
- ld bc, wBoxDataEnd - wBoxDataStart
- call CopyData
- pop hl
-
-; mark the memory that the box was copied from as am empty box
- xor a
- ld [hli], a
- dec a
- ld [hl], a
-
- ld hl, sBox1 ; sBox7
- ld bc, sBank2AllBoxesChecksum - sBox1
- call SAVCheckSum
- ld [sBank2AllBoxesChecksum], a ; sBank3AllBoxesChecksum
- call CalcIndividualBoxCheckSums
- call DisableSRAMAndPrepareClockData
- ret
-
-DisplayChangeBoxMenu:
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld a, A_BUTTON | B_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, 11
- ld [wMaxMenuItem], a
- ld a, 1
- ld [wTopMenuItemY], a
- ld a, 12
- ld [wTopMenuItemX], a
- xor a
- ld [wMenuWatchMovingOutOfBounds], a
- ld a, [wCurrentBoxNum]
- and $7f
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- coord hl, 0, 0
- lb bc, 2, 9
- call TextBoxBorder
- ld hl, ChooseABoxText
- call PrintText
- coord hl, 11, 0
- lb bc, 12, 7
- call TextBoxBorder
- ld hl, hFlags_0xFFFA
- set 2, [hl]
- ld de, BoxNames
- coord hl, 13, 1
- call PlaceString
- ld hl, hFlags_0xFFFA
- res 2, [hl]
- ld a, [wCurrentBoxNum]
- and $7f
- cp 9
- jr c, .singleDigitBoxNum
- sub 9
- coord hl, 8, 2
- ld [hl], "1"
- add "0"
- jr .next
-.singleDigitBoxNum
- add "1"
-.next
- Coorda 9, 2
- coord hl, 1, 2
- ld de, BoxNoText
- call PlaceString
- call GetMonCountsForAllBoxes
- coord hl, 18, 1
- ld de, wBoxMonCounts
- ld bc, SCREEN_WIDTH
- ld a, $c
-.loop
- push af
- ld a, [de]
- and a ; is the box empty?
- jr z, .skipPlacingPokeball
- ld [hl], $78 ; place pokeball tile next to box name if box not empty
-.skipPlacingPokeball
- add hl, bc
- inc de
- pop af
- dec a
- jr nz, .loop
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- ret
-
-ChooseABoxText:
- TX_FAR _ChooseABoxText
- db "@"
-
-BoxNames:
- db "BOX 1"
- next "BOX 2"
- next "BOX 3"
- next "BOX 4"
- next "BOX 5"
- next "BOX 6"
- next "BOX 7"
- next "BOX 8"
- next "BOX 9"
- next "BOX10"
- next "BOX11"
- next "BOX12@"
-
-BoxNoText:
- db "BOX No.@"
-
-EmptyAllSRAMBoxes:
-; marks all boxes in SRAM as empty (initialisation for the first time the
-; player changes the box)
- call EnableSRAMAndLatchClockData
- ld a, 2
- ld [MBC1SRamBank], a
- call EmptySRAMBoxesInBank
- ld a, 3
- ld [MBC1SRamBank], a
- call EmptySRAMBoxesInBank
- call DisableSRAMAndPrepareClockData
- ret
-
-EmptySRAMBoxesInBank:
-; marks every box in the current SRAM bank as empty
- ld hl, sBox1 ; sBox7
- call EmptySRAMBox
- ld hl, sBox2 ; sBox8
- call EmptySRAMBox
- ld hl, sBox3 ; sBox9
- call EmptySRAMBox
- ld hl, sBox4 ; sBox10
- call EmptySRAMBox
- ld hl, sBox5 ; sBox11
- call EmptySRAMBox
- ld hl, sBox6 ; sBox12
- call EmptySRAMBox
- ld hl, sBox1 ; sBox7
- ld bc, sBank2AllBoxesChecksum - sBox1
- call SAVCheckSum
- ld [sBank2AllBoxesChecksum], a ; sBank3AllBoxesChecksum
- call CalcIndividualBoxCheckSums
- ret
-
-EmptySRAMBox:
- xor a
- ld [hli], a
- dec a
- ld [hl], a
- ret
-
-GetMonCountsForAllBoxes:
- ld hl, wBoxMonCounts
- push hl
- call EnableSRAMAndLatchClockData
- ld a, $2
- ld [MBC1SRamBank], a
- call GetMonCountsForBoxesInBank
- ld a, $3
- ld [MBC1SRamBank], a
- call GetMonCountsForBoxesInBank
- call DisableSRAMAndPrepareClockData
- pop hl
-
-; copy the count for the current box from WRAM
- ld a, [wCurrentBoxNum]
- and $7f
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [wNumInBox]
- ld [hl], a
-
- ret
-
-GetMonCountsForBoxesInBank:
- ld a, [sBox1] ; sBox7
- ld [hli], a
- ld a, [sBox2] ; sBox8
- ld [hli], a
- ld a, [sBox3] ; sBox9
- ld [hli], a
- ld a, [sBox4] ; sBox10
- ld [hli], a
- ld a, [sBox5] ; sBox11
- ld [hli], a
- ld a, [sBox6] ; sBox12
- ld [hli], a
- ret
-
-SAVCheckRandomID:
-;checks if Sav file is the same by checking player's name 1st letter ($a598)
-; and the two random numbers generated at game beginning
-;(which are stored at wPlayerID)s
- call EnableSRAMAndLatchClockData
- ld a, $1
- ld [MBC1SRamBank], a
- ld a, [sPlayerName]
- and a
- jr z, .next
- ld hl, sPlayerName
- ld bc, sMainDataCheckSum - sPlayerName
- call SAVCheckSum
- ld c, a
- ld a, [sMainDataCheckSum]
- cp c
- jr nz, .next
- ld hl, sMainData + (wPlayerID - wMainDataStart) ; player ID
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [wPlayerID]
- cp l
- jr nz, .next
- ld a, [wPlayerID + 1]
- cp h
-.next
- ld a, $00
- ld [MBC1SRamBankingMode], a
- ld [MBC1SRamEnable], a
- ret
-
-SaveHallOfFameTeams:
- ld a, [wNumHoFTeams]
- dec a
- cp HOF_TEAM_CAPACITY
- jr nc, .shiftHOFTeams
- ld hl, sHallOfFame
- ld bc, HOF_TEAM
- call AddNTimes
- ld e, l
- ld d, h
- ld hl, wHallOfFame
- ld bc, HOF_TEAM
- jr HallOfFame_Copy
-
-.shiftHOFTeams
-; if the space designated for HOF teams is full, then shift all HOF teams to the next slot, making space for the new HOF team
-; this deletes the last HOF team though
- ld hl, sHallOfFame + HOF_TEAM
- ld de, sHallOfFame
- ld bc, HOF_TEAM * (HOF_TEAM_CAPACITY - 1)
- call HallOfFame_Copy
- ld hl, wHallOfFame
- ld de, sHallOfFame + HOF_TEAM * (HOF_TEAM_CAPACITY - 1)
- ld bc, HOF_TEAM
- jr HallOfFame_Copy
-
-LoadHallOfFameTeams:
- ld hl, sHallOfFame
- ld bc, HOF_TEAM
- ld a, [wHoFTeamIndex]
- call AddNTimes
- ld de, wHallOfFame
- ld bc, HOF_TEAM
- ; fallthrough
-
-HallOfFame_Copy:
- call EnableSRAMAndLatchClockData
- xor a
- ld [MBC1SRamBank], a
- call CopyData
- call DisableSRAMAndPrepareClockData
- ret
-
-ClearSAV:
- call EnableSRAMAndLatchClockData
- ld a, $4
-.loop
- dec a
- push af
- call PadSRAM_FF
- pop af
- jr nz, .loop
- call DisableSRAMAndPrepareClockData
- ret
-
-PadSRAM_FF:
- ld [MBC1SRamBank], a
- ld hl, $a000
- ld bc, $2000
- ld a, $ff
- jp FillMemory
-
-EnableSRAMAndLatchClockData:
- ld a, $1
- ld [MBC1SRamBankingMode], a
- ld a, SRAM_ENABLE
- ld [MBC1SRamEnable], a
- ret
-
-DisableSRAMAndPrepareClockData:
- ld a, SRAM_DISABLE
- ld [MBC1SRamBankingMode], a
- ld [MBC1SRamEnable], a
- ret
diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm
deleted file mode 100755
index b4514618..00000000
--- a/engine/slot_machine.asm
+++ /dev/null
@@ -1,891 +0,0 @@
-PromptUserToPlaySlots:
- call SaveScreenTilesToBuffer2
- ld a, BANK(DisplayTextIDInit)
- ld [wAutoTextBoxDrawingControl], a
- ld b, a
- ld hl, DisplayTextIDInit
- call Bankswitch
- ld hl, PlaySlotMachineText
- call PrintText
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- and a
- jr nz, .done ; if player chose No
- dec a
- ld [wUpdateSpritesEnabled], a
- ld hl, wSlotMachineRerollCounter
- xor a
- ld [hli], a
- ld [hl], SMILE_BUBBLE
- predef EmotionBubble
- call GBPalWhiteOutWithDelay3
- call LoadSlotMachineTiles
- call LoadFontTilePatterns
- ld b, SET_PAL_SLOTS
- call RunPaletteCommand
- call Delay3
- call GBPalNormal
- ld a, $e4
- ld [rOBP0], a
- call UpdateGBCPal_OBP0
- ld hl, wd730
- set 6, [hl]
- xor a
- ld [wSlotMachineAllowMatchesCounter], a
- ld hl, wStoppingWhichSlotMachineWheel
- ld bc, $0014
- call FillMemory
- call MainSlotMachineLoop
- ld hl, wd730
- res 6, [hl]
- xor a
- ld [wSlotMachineAllowMatchesCounter], a
- call GBPalWhiteOutWithDelay3
- ld a, $1
- ld [wUpdateSpritesEnabled], a
- call RunDefaultPaletteCommand
- call ReloadMapSpriteTilePatterns
- call ReloadTilesetTilePatterns
-.done
- call LoadScreenTilesFromBuffer2
- call Delay3
- call GBPalNormal
- ld a, [wSlotMachineSavedROMBank]
- push af
- jp CloseTextDisplay
-
-PlaySlotMachineText:
- TX_FAR _PlaySlotMachineText
- db "@"
-
-MainSlotMachineLoop:
- call SlotMachine_PrintCreditCoins
- xor a
- ld hl, wPayoutCoins
- ld [hli], a
- ld [hl], a
- call SlotMachine_PrintPayoutCoins
- ld hl, BetHowManySlotMachineText
- call PrintText
- call SaveScreenTilesToBuffer1
-.loop
- ld a, A_BUTTON | B_BUTTON
- ld [wMenuWatchedKeys], a
- ld a, 2
- ld [wMaxMenuItem], a
- ld a, 12
- ld [wTopMenuItemY], a
- ld a, 15
- ld [wTopMenuItemX], a
- xor a
- ld [wCurrentMenuItem], a
- ld [wLastMenuItem], a
- ld [wMenuWatchMovingOutOfBounds], a
- coord hl, 14, 11
- lb bc, 5, 4
- call TextBoxBorder
- coord hl, 16, 12
- ld de, CoinMultiplierSlotMachineText
- call PlaceString
- call HandleMenuInput
- and B_BUTTON
- jp nz, LoadScreenTilesFromBuffer1
- ld a, [wCurrentMenuItem]
- ld b, a
- ld a, 3
- sub b
- ld [wSlotMachineBet], a
- ld hl, wPlayerCoins
- ld c, a
- ld a, [hli]
- and a
- jr nz, .skip1
- ld a, [hl]
- cp c
- jr nc, .skip1
- ld hl, NotEnoughCoinsSlotMachineText
- call PrintText
- jr .loop
-.skip1
- call LoadScreenTilesFromBuffer1
- call SlotMachine_SubtractBetFromPlayerCoins
- call SlotMachine_LightBalls
- call SlotMachine_SetFlags
- ld a, 4
- ld hl, wSlotMachineWheel1SlipCounter
- ld [hli], a
- ld [hli], a
- ld [hl], a
- call WaitForSoundToFinish
- ld a, SFX_SLOTS_NEW_SPIN
- call PlaySound
- ld hl, StartSlotMachineText
- call PrintText
- call SlotMachine_SpinWheels
- call SlotMachine_CheckForMatches
- ld hl, wPlayerCoins
- ld a, [hli]
- or [hl]
- jr nz, .skip2
- ld hl, OutOfCoinsSlotMachineText
- call PrintText
- ld c, 60
- jp DelayFrames
-.skip2
- ld hl, OneMoreGoSlotMachineText
- call PrintText
- coord hl, 14, 12
- lb bc, 13, 15
- xor a ; YES_NO_MENU
- ld [wTwoOptionMenuID], a
- ld a, TWO_OPTION_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID
- ld a, [wCurrentMenuItem]
- and a
- ret nz
- call SlotMachine_PutOutLitBalls
- jp MainSlotMachineLoop
-
-CoinMultiplierSlotMachineText:
- db "×3"
- next "×2"
- next "×1@"
-
-OutOfCoinsSlotMachineText:
- TX_FAR _OutOfCoinsSlotMachineText
- db "@"
-
-BetHowManySlotMachineText:
- TX_FAR _BetHowManySlotMachineText
- db "@"
-
-StartSlotMachineText:
- TX_FAR _StartSlotMachineText
- db "@"
-
-NotEnoughCoinsSlotMachineText:
- TX_FAR _NotEnoughCoinsSlotMachineText
- db "@"
-
-OneMoreGoSlotMachineText:
- TX_FAR _OneMoreGoSlotMachineText
- db "@"
-
-SlotMachine_SetFlags:
- ld hl, wSlotMachineFlags
- bit 7, [hl]
- ret nz
- ld a, [wSlotMachineAllowMatchesCounter]
- and a
- jr nz, .allowMatches
- call Random
- and a
- jr z, .setAllowMatchesCounter ; 1/256 (~0.4%) chance
- ld b, a
- ld a, [wSlotMachineSevenAndBarModeChance]
- cp b
- jr c, .allowSevenAndBarMatches
- ld a, 210
- cp b
- jr c, .allowMatches ; 55/256 (~21.5%) chance
- ld [hl], 0
- ret
-.allowMatches
- set 6, [hl]
- ret
-.setAllowMatchesCounter
- ld a, 60
- ld [wSlotMachineAllowMatchesCounter], a
- ret
-.allowSevenAndBarMatches
- set 7, [hl]
- ret
-
-SlotMachine_SpinWheels:
- ld c, 20
-.loop1
- push bc
- call SlotMachine_AnimWheel1
- call SlotMachine_AnimWheel2
- call SlotMachine_AnimWheel3
- ld c, 2
- call DelayFrames
- pop bc
- dec c
- jr nz, .loop1
- xor a
- ld [wStoppingWhichSlotMachineWheel], a
-.loop2
- call SlotMachine_HandleInputWhileWheelsSpin
- call SlotMachine_StopOrAnimWheel1
- call SlotMachine_StopOrAnimWheel2
- call SlotMachine_StopOrAnimWheel3
- ret c
- ld a, [wOnSGB]
- xor $1
- inc a
- ld c, a
- call DelayFrames
- jr .loop2
-
-; Note that the wheels can only stop when a symbol is centred in the wheel
-; and thus 3 full symbols rather than 2 full symbols and 2 half symbols are
-; visible. The 3 functions below ensure this by checking if the wheel offset
-; is even before stopping the wheel.
-
-SlotMachine_StopOrAnimWheel1:
- ld a, [wStoppingWhichSlotMachineWheel]
- cp 1
- jr c, .animWheel
- ld de, wSlotMachineWheel1Offset
- ld a, [de]
- rra
- jr nc, .animWheel ; check that a symbol is centred in the wheel
- ld hl, wSlotMachineWheel1SlipCounter
- ld a, [hl]
- and a
- ret z
- dec [hl]
- call SlotMachine_StopWheel1Early
- ret nz
-.animWheel
- jp SlotMachine_AnimWheel1
-
-SlotMachine_StopOrAnimWheel2:
- ld a, [wStoppingWhichSlotMachineWheel]
- cp 2
- jr c, .animWheel
- ld de, wSlotMachineWheel2Offset
- ld a, [de]
- rra
- jr nc, .animWheel ; check that a symbol is centred in the wheel
- ld hl, wSlotMachineWheel2SlipCounter
- ld a, [hl]
- and a
- ret z
- dec [hl]
- call SlotMachine_StopWheel2Early
- ret z
-.animWheel
- jp SlotMachine_AnimWheel2
-
-SlotMachine_StopOrAnimWheel3:
- ld a, [wStoppingWhichSlotMachineWheel]
- cp 3
- jr c, .animWheel
- ld de, wSlotMachineWheel3Offset
- ld a, [de]
- rra
- jr nc, .animWheel ; check that a symbol is centred in the wheel
-; wheel 3 stops as soon as possible
- scf
- ret
-.animWheel
- call SlotMachine_AnimWheel3
- and a
- ret
-
-SlotMachine_StopWheel1Early:
- call SlotMachine_GetWheel1Tiles
- ld hl, wSlotMachineWheel1BottomTile
- ld a, [wSlotMachineFlags]
- and $80
- jr nz, .sevenAndBarMode
-; Stop early if the middle symbol is not a cherry.
- inc hl
- ld a, [hl]
- cp SLOTSCHERRY >> 8
- jr nz, .stopWheel
- ret
-; It looks like this was intended to make the wheel stop when a 7 symbol was
-; visible, but it has a bug and so the wheel stops randomly.
-.sevenAndBarMode
- ld c, $3
-.loop
- ld a, [hli]
- cp SLOTS7 >> 8
- jr c, .stopWheel ; condition never true
- dec c
- jr nz, .loop
- ret
-.stopWheel
- inc a
- ld hl, wSlotMachineWheel1SlipCounter
- ld [hl], 0
- ret
-
-SlotMachine_StopWheel2Early:
- call SlotMachine_GetWheel2Tiles
- ld a, [wSlotMachineFlags]
- and $80
- jr nz, .sevenAndBarMode
-; Stop early if any symbols are lined up in the first two wheels.
- call SlotMachine_FindWheel1Wheel2Matches
- ret nz
- jr .stopWheel
-; Stop early if two 7 symbols or two bar symbols are lined up in the first two
-; wheels OR if no symbols are lined up and the bottom symbol in wheel 2 is a
-; 7 symbol or bar symbol. The second part could be a bug or a way to reduce the
-; player's odds.
-.sevenAndBarMode
- call SlotMachine_FindWheel1Wheel2Matches
- ld a, [de]
- cp (SLOTSBAR >> 8) + 1
- ret nc
-.stopWheel
- xor a
- ld [wSlotMachineWheel2SlipCounter], a
- ret
-
-SlotMachine_FindWheel1Wheel2Matches:
-; return whether wheel 1 and wheel 2's current positions allow a match (given
-; that wheel 3 stops in a good position) in Z
- ld hl, wSlotMachineWheel1BottomTile
- ld de, wSlotMachineWheel2BottomTile
- ld a, [de]
- cp [hl] ; wheel 1 bottom, wheel 2 bottom
- ret z
- inc de
- ld a, [de]
- cp [hl] ; wheel 1 bottom, wheel 2 middle
- ret z
- inc hl
- cp [hl] ; wheel 1 middle, wheel 2 middle
- ret z
- inc hl
- cp [hl] ; wheel 1 top, wheel 2 middle
- ret z
- inc de
- ld a, [de]
- cp [hl] ; wheel 1 top, wheel 2 top
- ret z
- dec de
- dec de
- ret
-
-SlotMachine_CheckForMatches:
- call SlotMachine_GetWheel3Tiles
- ld a, [wSlotMachineBet]
- cp 2
- jr z, .checkMatchesFor2CoinBet
- cp 1
- jr z, .checkMatchFor1CoinBet
-; 3 coin bet allows diagonal matches (plus the matches for 1/2 coin bets)
- ld hl, wSlotMachineWheel1BottomTile
- ld de, wSlotMachineWheel2MiddleTile
- ld bc, wSlotMachineWheel3TopTile
- call SlotMachine_CheckForMatch
- jp z, .foundMatch
- ld hl, wSlotMachineWheel1TopTile
- ld de, wSlotMachineWheel2MiddleTile
- ld bc, wSlotMachineWheel3BottomTile
- call SlotMachine_CheckForMatch
- jr z, .foundMatch
-; 2 coin bet allows top/bottom horizontal matches (plus the match for a 1 coin bet)
-.checkMatchesFor2CoinBet
- ld hl, wSlotMachineWheel1TopTile
- ld de, wSlotMachineWheel2TopTile
- ld bc, wSlotMachineWheel3TopTile
- call SlotMachine_CheckForMatch
- jr z, .foundMatch
- ld hl, wSlotMachineWheel1BottomTile
- ld de, wSlotMachineWheel2BottomTile
- ld bc, wSlotMachineWheel3BottomTile
- call SlotMachine_CheckForMatch
- jr z, .foundMatch
-; 1 coin bet only allows a middle horizontal match
-.checkMatchFor1CoinBet
- ld hl, wSlotMachineWheel1MiddleTile
- ld de, wSlotMachineWheel2MiddleTile
- ld bc, wSlotMachineWheel3MiddleTile
- call SlotMachine_CheckForMatch
- jr z, .foundMatch
- ld a, [wSlotMachineFlags]
- and $c0
- jr z, .noMatch
- ld hl, wSlotMachineRerollCounter
- dec [hl]
- jr nz, .rollWheel3DownByOneSymbol
-.noMatch
- ld hl, NotThisTimeText
- call PrintText
-.done
- xor a
- ld [wMuteAudioAndPauseMusic], a
- ret
-.rollWheel3DownByOneSymbol
- call SlotMachine_AnimWheel3
- call DelayFrame
- call SlotMachine_AnimWheel3
- call DelayFrame
- jp SlotMachine_CheckForMatches
-.foundMatch
- ld a, [wSlotMachineFlags]
- and $c0
- jr z, .rollWheel3DownByOneSymbol ; roll wheel if player isn't allowed to win
- and $80
- jr nz, .acceptMatch
-; if 7/bar matches aren't enabled and the match was a 7/bar symbol, roll wheel
- ld a, [hl]
- cp (SLOTSBAR >> 8) + 1
- jr c, .rollWheel3DownByOneSymbol
-.acceptMatch
- ld a, [hl]
- sub $2
- ld [wSlotMachineWinningSymbol], a
- ld hl, SlotRewardPointers
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- push de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, wcf4b
- ld bc, 4
- call CopyData
- pop hl
- ld de, .flashScreenLoop
- push de
- jp hl
-
-.flashScreenLoop
- ld a, [rBGP]
- xor $40
- ld [rBGP], a
- call UpdateGBCPal_BGP
- ld c, 5
- call DelayFrames
- dec b
- jr nz, .flashScreenLoop
- ld hl, wPayoutCoins
- ld [hl], d
- inc hl
- ld [hl], e
- call SlotMachine_PrintPayoutCoins
- ld hl, SymbolLinedUpSlotMachineText
- call PrintText
- call WaitForTextScrollButtonPress
- call SlotMachine_PayCoinsToPlayer
- call SlotMachine_PrintPayoutCoins
- ld a, $e4
- ld [rOBP0], a
- call UpdateGBCPal_OBP0
- jp .done
-
-SymbolLinedUpSlotMachineText:
- TX_ASM
- push bc
- call SlotMachine_PrintWinningSymbol
- ld hl, LinedUpText
- pop bc
- inc bc
- inc bc
- inc bc
- inc bc
- ret
-
-LinedUpText:
- TX_FAR _LinedUpText
- db "@"
-
-SlotRewardPointers:
- dw SlotReward300Func
- dw SlotReward300Text
- dw SlotReward100Func
- dw SlotReward100Text
- dw SlotReward8Func
- dw SlotReward8Text
- dw SlotReward15Func
- dw SlotReward15Text
- dw SlotReward15Func
- dw SlotReward15Text
- dw SlotReward15Func
- dw SlotReward15Text
-
-SlotReward300Text:
- db "300@"
-
-SlotReward100Text:
- db "100@"
-
-SlotReward8Text:
- db "8@"
-
-SlotReward15Text:
- db "15@"
-
-NotThisTimeText:
- TX_FAR _NotThisTimeText
- db "@"
-
-; compares the slot machine tiles at bc, de, and hl
-SlotMachine_CheckForMatch:
- ld a, [de]
- cp [hl]
- ret nz
- ld a, [bc]
- cp [hl]
- ret
-
-SlotMachine_GetWheel3Tiles:
- ld de, wSlotMachineWheel3BottomTile
- ld hl, SlotMachineWheel3
- ld a, [wSlotMachineWheel3Offset]
- call SlotMachine_GetWheelTiles
-
-SlotMachine_GetWheel2Tiles:
- ld de, wSlotMachineWheel2BottomTile
- ld hl, SlotMachineWheel2
- ld a, [wSlotMachineWheel2Offset]
- call SlotMachine_GetWheelTiles
-
-SlotMachine_GetWheel1Tiles:
- ld de, wSlotMachineWheel1BottomTile
- ld hl, SlotMachineWheel1
- ld a, [wSlotMachineWheel1Offset]
-
-SlotMachine_GetWheelTiles:
- ld c, a
- ld b, 0
- add hl, bc
- ld c, 3
-.loop
- ld a, [hli]
- ld [de], a
- inc de
- inc hl
- dec c
- jr nz, .loop
- ret
-
-SlotReward8Func:
- ld hl, wSlotMachineAllowMatchesCounter
- ld a, [hl]
- and a
- jr z, .skip
- dec [hl]
-.skip
- ld b, $2
- ld de, 8
- ret
-
-SlotReward15Func:
- ld hl, wSlotMachineAllowMatchesCounter
- ld a, [hl]
- and a
- jr z, .skip
- dec [hl]
-.skip
- ld b, $4
- ld de, 15
- ret
-
-SlotReward100Func:
- ld a, SFX_GET_KEY_ITEM
- call PlaySound
- xor a
- ld [wSlotMachineFlags], a
- ld b, $8
- ld de, 100
- ret
-
-SlotReward300Func:
- ld hl, YeahText
- call PrintText
- ld a, SFX_GET_ITEM_2
- call PlaySound
- call Random
- cp $80
- ld a, $0
- jr c, .skip
- ld [wSlotMachineFlags], a
-.skip
- ld [wSlotMachineAllowMatchesCounter], a
- ld b, $14
- ld de, 300
- ret
-
-YeahText:
- TX_FAR _YeahText
- TX_DELAY
- db "@"
-
-SlotMachine_PrintWinningSymbol:
-; prints winning symbol and down arrow in text box
- coord hl, 2, 14
- ld a, [wSlotMachineWinningSymbol]
- add $25
- ld [hli], a
- inc a
- ld [hld], a
- inc a
- ld de, -SCREEN_WIDTH
- add hl, de
- ld [hli], a
- inc a
- ld [hl], a
- coord hl, 18, 16
- ld [hl], "▼"
- ret
-
-SlotMachine_SubtractBetFromPlayerCoins:
- ld hl, wTempCoins2 + 1
- ld a, [wSlotMachineBet]
- ld [hld], a
- xor a
- ld [hli], a
- ld de, wPlayerCoins + 1
- ld c, $2
- predef SubBCDPredef
-
-SlotMachine_PrintCreditCoins:
- coord hl, 5, 1
- ld de, wPlayerCoins
- ld c, $2
- jp PrintBCDNumber
-
-SlotMachine_PrintPayoutCoins:
- coord hl, 11, 1
- ld de, wPayoutCoins
- lb bc, LEADING_ZEROES | 2, 4 ; 2 bytes, 4 digits
- jp PrintNumber
-
-SlotMachine_PayCoinsToPlayer:
- ld a, $1
- ld [wMuteAudioAndPauseMusic], a
- call WaitForSoundToFinish
-
-; Put 1 in the temp coins variable. This value is added to the player's coins
-; repeatedly so the player can watch the value go up 1 coin at a time.
- ld hl, wTempCoins1
- xor a
- ld [hli], a
- inc a
- ld [hl], a
-
- ld a, 5
- ld [wAnimCounter], a
-
-; Subtract 1 from the payout amount and add 1 to the player's coins each
-; iteration until the payout amount reaches 0.
-.loop
- ld a, [wPayoutCoins + 1]
- ld l, a
- ld a, [wPayoutCoins]
- ld h, a
- or l
- ret z
- ld de, -1
- add hl, de
- ld a, l
- ld [wPayoutCoins + 1], a
- ld a, h
- ld [wPayoutCoins], a
- ld hl, wTempCoins1 + 1
- ld de, wPlayerCoins + 1
- ld c, $2
- predef AddBCDPredef
- call SlotMachine_PrintCreditCoins
- call SlotMachine_PrintPayoutCoins
- ld a, SFX_SLOTS_REWARD
- call PlaySound
- ld a, [wAnimCounter]
- dec a
- jr nz, .skip1
- ld a, [rOBP0]
- xor $40 ; make the slot wheel symbols flash
- ld [rOBP0], a
- call UpdateGBCPal_OBP0
- ld a, 5
-.skip1
- ld [wAnimCounter], a
- ld a, [wSlotMachineWinningSymbol]
- cp (SLOTSBAR >> 8) + 1
- ld c, 8
- jr nc, .skip2
- srl c ; c = 4 (make the the coins transfer faster if the symbol was 7 or bar)
-.skip2
- call DelayFrames
- jr .loop
-
-SlotMachine_PutOutLitBalls:
- ld a, $23
- ld [wNewSlotMachineBallTile], a
- jr SlotMachine_UpdateThreeCoinBallTiles
-
-SlotMachine_LightBalls:
- ld a, $14
- ld [wNewSlotMachineBallTile], a
- ld a, [wSlotMachineBet]
- dec a
- jr z, SlotMachine_UpdateOneCoinBallTiles
- dec a
- jr z, SlotMachine_UpdateTwoCoinBallTiles
-
-SlotMachine_UpdateThreeCoinBallTiles:
- coord hl, 3, 2
- call SlotMachine_UpdateBallTiles
- coord hl, 3, 10
- call SlotMachine_UpdateBallTiles
-
-SlotMachine_UpdateTwoCoinBallTiles:
- coord hl, 3, 4
- call SlotMachine_UpdateBallTiles
- coord hl, 3, 8
- call SlotMachine_UpdateBallTiles
-
-SlotMachine_UpdateOneCoinBallTiles:
- coord hl, 3, 6
-
-SlotMachine_UpdateBallTiles:
- ld a, [wNewSlotMachineBallTile]
- ld [hl], a
- ld bc, 13
- add hl, bc
- ld [hl], a
- ld bc, 7
- add hl, bc
- inc a
- ld [hl], a
- ld bc, 13
- add hl, bc
- ld [hl], a
- ret
-
-SlotMachine_AnimWheel1:
- ld bc, SlotMachineWheel1
- ld de, wSlotMachineWheel1Offset
- ld hl, wOAMBuffer
- ld a, $30
- ld [wBaseCoordX], a
- jr SlotMachine_AnimWheel
-
-SlotMachine_AnimWheel2:
- ld bc, SlotMachineWheel2
- ld de, wSlotMachineWheel2Offset
- ld hl, wOAMBuffer + $30
- ld a, $50
- ld [wBaseCoordX], a
- jr SlotMachine_AnimWheel
-
-SlotMachine_AnimWheel3:
- ld bc, SlotMachineWheel3
- ld de, wSlotMachineWheel3Offset
- ld hl, wOAMBuffer + $60
- ld a, $70
- ld [wBaseCoordX], a
-
-SlotMachine_AnimWheel:
- ld a, $58
- ld [wBaseCoordY], a
- push de
- ld a, [de]
- ld d, b
- add c
- ld e, a
- jr nc, .loop
- inc d
-.loop
- ld a, [wBaseCoordY]
- ld [hli], a
- ld a, [wBaseCoordX]
- ld [hli], a
- ld a, [de]
- ld [hli], a
- ld a, $80
- ld [hli], a
- ld a, [wBaseCoordY]
- ld [hli], a
- ld a, [wBaseCoordX]
- add $8
- ld [hli], a
- ld a, [de]
- inc a
- ld [hli], a
- ld a, $80
- ld [hli], a
- inc de
- ld a, [wBaseCoordY]
- sub $8
- ld [wBaseCoordY], a
- cp $28
- jr nz, .loop
- pop de
- ld a, [de]
- inc a ; advance the offset so that the wheel animates
- cp 30
- jr nz, .skip
- xor a ; wrap around to 0 when the offset reaches 30
-.skip
- ld [de], a
- ret
-
-SlotMachine_HandleInputWhileWheelsSpin:
- call DelayFrame
- call JoypadLowSensitivity
- ld a, [hJoy5]
- and A_BUTTON
- ret z
- ld hl, wStoppingWhichSlotMachineWheel
- ld a, [hl]
- dec a
- ld de, wSlotMachineWheel1SlipCounter
- jr z, .skip
- dec a
- ld de, wSlotMachineWheel2SlipCounter
- jr z, .skip
-.loop
- inc [hl]
- ld a, SFX_SLOTS_STOP_WHEEL
- jp PlaySound
-.skip
- ld a, [de]
- and a
- ret nz
- jr .loop
-
-LoadSlotMachineTiles:
- call DisableLCD
- ld hl, SlotMachineTiles2
- ld de, vChars0
- ld bc, $1c0
- ld a, BANK(SlotMachineTiles2)
- call FarCopyData
- ld hl, SlotMachineTiles1
- ld de, vChars2
- ld bc, $250
- ld a, BANK(SlotMachineTiles1)
- call FarCopyData
- ld hl, SlotMachineTiles2
- ld de, vChars2 + $250
- ld bc, $1c0
- ld a, BANK(SlotMachineTiles2)
- call FarCopyData
- ld hl, SlotMachineMap
- coord de, 0, 0
- ld bc, SlotMachineMapEnd - SlotMachineMap
- call CopyData
- call EnableLCD
- ld hl, wSlotMachineWheel1Offset
- ld a, $1c
- ld [hli], a
- ld [hli], a
- ld [hl], a
- call SlotMachine_AnimWheel1
- call SlotMachine_AnimWheel2
- jp SlotMachine_AnimWheel3
-
-SlotMachineMap:
- INCBIN "gfx/tilemaps/slotmachine.map"
-SlotMachineMapEnd:
-
-INCLUDE "data/slot_machine_wheels.asm"
-
-SlotMachineTiles1:
- INCBIN "gfx/slotmachine1.2bpp"
diff --git a/engine/slots/game_corner_slots.asm b/engine/slots/game_corner_slots.asm
new file mode 100755
index 00000000..48321974
--- /dev/null
+++ b/engine/slots/game_corner_slots.asm
@@ -0,0 +1,54 @@
+StartSlotMachine:
+ ld a, [wHiddenObjectFunctionArgument]
+ cp SLOTS_OUTOFORDER
+ jr z, .printOutOfOrder
+ cp SLOTS_OUTTOLUNCH
+ jr z, .printOutToLunch
+ cp SLOTS_SOMEONESKEYS
+ jr z, .printSomeonesKeys
+ farcall AbleToPlaySlotsCheck
+ ld a, [wCanPlaySlots]
+ and a
+ ret z
+ ld a, [wLuckySlotHiddenObjectIndex]
+ ld b, a
+ ld a, [wHiddenObjectIndex]
+ inc a
+ cp b
+ jr z, .match
+ ld a, 253
+ jr .next
+.match
+ ld a, 250
+.next
+ ld [wSlotMachineSevenAndBarModeChance], a
+ ldh a, [hLoadedROMBank]
+ ld [wSlotMachineSavedROMBank], a
+ call PromptUserToPlaySlots
+ ret
+.printOutOfOrder
+ tx_pre_id GameCornerOutOfOrderText
+ jr .printText
+.printOutToLunch
+ tx_pre_id GameCornerOutToLunchText
+ jr .printText
+.printSomeonesKeys
+ tx_pre_id GameCornerSomeonesKeysText
+.printText
+ push af
+ call EnableAutoTextBoxDrawing
+ pop af
+ call PrintPredefTextID
+ ret
+
+GameCornerOutOfOrderText::
+ text_far _GameCornerOutOfOrderText
+ text_end
+
+GameCornerOutToLunchText::
+ text_far _GameCornerOutToLunchText
+ text_end
+
+GameCornerSomeonesKeysText::
+ text_far _GameCornerSomeonesKeysText
+ text_end
diff --git a/engine/slots/game_corner_slots2.asm b/engine/slots/game_corner_slots2.asm
new file mode 100755
index 00000000..a4ba4ec1
--- /dev/null
+++ b/engine/slots/game_corner_slots2.asm
@@ -0,0 +1,31 @@
+AbleToPlaySlotsCheck:
+ ld a, [wSpritePlayerStateData1ImageIndex]
+ and $8
+ jr z, .done ; not able
+ ld b, COIN_CASE
+ predef GetQuantityOfItemInBag
+ ld a, b
+ and a
+ ld b, (GameCornerCoinCaseText_id - TextPredefs) / 2 + 1
+ jr z, .printCoinCaseRequired
+ ld hl, wPlayerCoins
+ ld a, [hli]
+ or [hl]
+ jr nz, .done ; able to play
+ ld b, (GameCornerNoCoinsText_id - TextPredefs) / 2 + 1
+.printCoinCaseRequired
+ call EnableAutoTextBoxDrawing
+ ld a, b
+ call PrintPredefTextID
+ xor a
+.done
+ ld [wCanPlaySlots], a
+ ret
+
+GameCornerCoinCaseText::
+ text_far _GameCornerCoinCaseText
+ text_end
+
+GameCornerNoCoinsText::
+ text_far _GameCornerNoCoinsText
+ text_end
diff --git a/engine/slots/slot_machine.asm b/engine/slots/slot_machine.asm
new file mode 100755
index 00000000..ba007d9d
--- /dev/null
+++ b/engine/slots/slot_machine.asm
@@ -0,0 +1,892 @@
+PromptUserToPlaySlots:
+ call SaveScreenTilesToBuffer2
+ ld a, BANK(DisplayTextIDInit) ; TRUE
+ ld [wAutoTextBoxDrawingControl], a
+ ld b, a
+ ld hl, DisplayTextIDInit
+ call Bankswitch
+ ld hl, PlaySlotMachineText
+ call PrintText
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ jr nz, .done ; if player chose No
+ dec a
+ ld [wUpdateSpritesEnabled], a
+ ld hl, wSlotMachineRerollCounter
+ xor a
+ ld [hli], a
+ ld [hl], SMILE_BUBBLE
+ predef EmotionBubble
+ call GBPalWhiteOutWithDelay3
+ call LoadSlotMachineTiles
+ call LoadFontTilePatterns
+ ld b, SET_PAL_SLOTS
+ call RunPaletteCommand
+ call Delay3
+ call GBPalNormal
+ ld a, $e4
+ ldh [rOBP0], a
+ call UpdateGBCPal_OBP0
+ ld hl, wd730
+ set 6, [hl]
+ xor a
+ ld [wSlotMachineAllowMatchesCounter], a
+ ld hl, wStoppingWhichSlotMachineWheel
+ ld bc, $14
+ call FillMemory
+ call MainSlotMachineLoop
+ ld hl, wd730
+ res 6, [hl]
+ xor a
+ ld [wSlotMachineAllowMatchesCounter], a
+ call GBPalWhiteOutWithDelay3
+ ld a, $1
+ ld [wUpdateSpritesEnabled], a
+ call RunDefaultPaletteCommand
+ call ReloadMapSpriteTilePatterns
+ call ReloadTilesetTilePatterns
+.done
+ call LoadScreenTilesFromBuffer2
+ call Delay3
+ call GBPalNormal
+ ld a, [wSlotMachineSavedROMBank]
+ push af
+ jp CloseTextDisplay
+
+PlaySlotMachineText:
+ text_far _PlaySlotMachineText
+ text_end
+
+MainSlotMachineLoop:
+ call SlotMachine_PrintCreditCoins
+ xor a
+ ld hl, wPayoutCoins
+ ld [hli], a
+ ld [hl], a
+ call SlotMachine_PrintPayoutCoins
+ ld hl, BetHowManySlotMachineText
+ call PrintText
+ call SaveScreenTilesToBuffer1
+.loop
+ ld a, A_BUTTON | B_BUTTON
+ ld [wMenuWatchedKeys], a
+ ld a, 2
+ ld [wMaxMenuItem], a
+ ld a, 12
+ ld [wTopMenuItemY], a
+ ld a, 15
+ ld [wTopMenuItemX], a
+ xor a
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
+ ld [wMenuWatchMovingOutOfBounds], a
+ hlcoord 14, 11
+ lb bc, 5, 4
+ call TextBoxBorder
+ hlcoord 16, 12
+ ld de, CoinMultiplierSlotMachineText
+ call PlaceString
+ call HandleMenuInput
+ and B_BUTTON
+ jp nz, LoadScreenTilesFromBuffer1
+ ld a, [wCurrentMenuItem]
+ ld b, a
+ ld a, 3
+ sub b
+ ld [wSlotMachineBet], a
+ ld hl, wPlayerCoins
+ ld c, a
+ ld a, [hli]
+ and a
+ jr nz, .skip1
+ ld a, [hl]
+ cp c
+ jr nc, .skip1
+ ld hl, NotEnoughCoinsSlotMachineText
+ call PrintText
+ jr .loop
+.skip1
+ call LoadScreenTilesFromBuffer1
+ call SlotMachine_SubtractBetFromPlayerCoins
+ call SlotMachine_LightBalls
+ call SlotMachine_SetFlags
+ ld a, 4
+ ld hl, wSlotMachineWheel1SlipCounter
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+ call WaitForSoundToFinish
+ ld a, SFX_SLOTS_NEW_SPIN
+ call PlaySound
+ ld hl, StartSlotMachineText
+ call PrintText
+ call SlotMachine_SpinWheels
+ call SlotMachine_CheckForMatches
+ ld hl, wPlayerCoins
+ ld a, [hli]
+ or [hl]
+ jr nz, .skip2
+ ld hl, OutOfCoinsSlotMachineText
+ call PrintText
+ ld c, 60
+ jp DelayFrames
+.skip2
+ ld hl, OneMoreGoSlotMachineText
+ call PrintText
+ hlcoord 14, 12
+ lb bc, 13, 15
+ xor a ; YES_NO_MENU
+ ld [wTwoOptionMenuID], a
+ ld a, TWO_OPTION_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ ld a, [wCurrentMenuItem]
+ and a
+ ret nz
+ call SlotMachine_PutOutLitBalls
+ jp MainSlotMachineLoop
+
+CoinMultiplierSlotMachineText:
+ db "×3"
+ next "×2"
+ next "×1@"
+
+OutOfCoinsSlotMachineText:
+ text_far _OutOfCoinsSlotMachineText
+ text_end
+
+BetHowManySlotMachineText:
+ text_far _BetHowManySlotMachineText
+ text_end
+
+StartSlotMachineText:
+ text_far _StartSlotMachineText
+ text_end
+
+NotEnoughCoinsSlotMachineText:
+ text_far _NotEnoughCoinsSlotMachineText
+ text_end
+
+OneMoreGoSlotMachineText:
+ text_far _OneMoreGoSlotMachineText
+ text_end
+
+SlotMachine_SetFlags:
+ ld hl, wSlotMachineFlags
+ bit 7, [hl]
+ ret nz
+ ld a, [wSlotMachineAllowMatchesCounter]
+ and a
+ jr nz, .allowMatches
+ call Random
+ and a
+ jr z, .setAllowMatchesCounter ; 1/256 (~0.4%) chance
+ ld b, a
+ ld a, [wSlotMachineSevenAndBarModeChance]
+ cp b
+ jr c, .allowSevenAndBarMatches
+ ld a, 210
+ cp b
+ jr c, .allowMatches ; 55/256 (~21.5%) chance
+ ld [hl], 0
+ ret
+.allowMatches
+ set 6, [hl]
+ ret
+.setAllowMatchesCounter
+ ld a, 60
+ ld [wSlotMachineAllowMatchesCounter], a
+ ret
+.allowSevenAndBarMatches
+ set 7, [hl]
+ ret
+
+SlotMachine_SpinWheels:
+ ld c, 20
+.loop1
+ push bc
+ call SlotMachine_AnimWheel1
+ call SlotMachine_AnimWheel2
+ call SlotMachine_AnimWheel3
+ ld c, 2
+ call DelayFrames
+ pop bc
+ dec c
+ jr nz, .loop1
+ xor a
+ ld [wStoppingWhichSlotMachineWheel], a
+.loop2
+ call SlotMachine_HandleInputWhileWheelsSpin
+ call SlotMachine_StopOrAnimWheel1
+ call SlotMachine_StopOrAnimWheel2
+ call SlotMachine_StopOrAnimWheel3
+ ret c
+ ld a, [wOnSGB]
+ xor $1
+ inc a
+ ld c, a
+ call DelayFrames
+ jr .loop2
+
+; Note that the wheels can only stop when a symbol is centred in the wheel
+; and thus 3 full symbols rather than 2 full symbols and 2 half symbols are
+; visible. The 3 functions below ensure this by checking if the wheel offset
+; is even before stopping the wheel.
+
+SlotMachine_StopOrAnimWheel1:
+ ld a, [wStoppingWhichSlotMachineWheel]
+ cp 1
+ jr c, .animWheel
+ ld de, wSlotMachineWheel1Offset
+ ld a, [de]
+ rra
+ jr nc, .animWheel ; check that a symbol is centred in the wheel
+ ld hl, wSlotMachineWheel1SlipCounter
+ ld a, [hl]
+ and a
+ ret z
+ dec [hl]
+ call SlotMachine_StopWheel1Early
+ ret nz
+.animWheel
+ jp SlotMachine_AnimWheel1
+
+SlotMachine_StopOrAnimWheel2:
+ ld a, [wStoppingWhichSlotMachineWheel]
+ cp 2
+ jr c, .animWheel
+ ld de, wSlotMachineWheel2Offset
+ ld a, [de]
+ rra
+ jr nc, .animWheel ; check that a symbol is centred in the wheel
+ ld hl, wSlotMachineWheel2SlipCounter
+ ld a, [hl]
+ and a
+ ret z
+ dec [hl]
+ call SlotMachine_StopWheel2Early
+ ret z
+.animWheel
+ jp SlotMachine_AnimWheel2
+
+SlotMachine_StopOrAnimWheel3:
+ ld a, [wStoppingWhichSlotMachineWheel]
+ cp 3
+ jr c, .animWheel
+ ld de, wSlotMachineWheel3Offset
+ ld a, [de]
+ rra
+ jr nc, .animWheel ; check that a symbol is centred in the wheel
+; wheel 3 stops as soon as possible
+ scf
+ ret
+.animWheel
+ call SlotMachine_AnimWheel3
+ and a
+ ret
+
+SlotMachine_StopWheel1Early:
+ call SlotMachine_GetWheel1Tiles
+ ld hl, wSlotMachineWheel1BottomTile
+ ld a, [wSlotMachineFlags]
+ and $80
+ jr nz, .sevenAndBarMode
+; Stop early if the middle symbol is not a cherry.
+ inc hl
+ ld a, [hl]
+ cp HIGH(SLOTSCHERRY)
+ jr nz, .stopWheel
+ ret
+; It looks like this was intended to make the wheel stop when a 7 symbol was
+; visible, but it has a bug and so the wheel stops randomly.
+.sevenAndBarMode
+ ld c, $3
+.loop
+ ld a, [hli]
+ cp HIGH(SLOTS7)
+ jr c, .stopWheel ; condition never true
+ dec c
+ jr nz, .loop
+ ret
+.stopWheel
+ inc a
+ ld hl, wSlotMachineWheel1SlipCounter
+ ld [hl], 0
+ ret
+
+SlotMachine_StopWheel2Early:
+ call SlotMachine_GetWheel2Tiles
+ ld a, [wSlotMachineFlags]
+ and $80
+ jr nz, .sevenAndBarMode
+; Stop early if any symbols are lined up in the first two wheels.
+ call SlotMachine_FindWheel1Wheel2Matches
+ ret nz
+ jr .stopWheel
+; Stop early if two 7 symbols or two bar symbols are lined up in the first two
+; wheels OR if no symbols are lined up and the bottom symbol in wheel 2 is a
+; 7 symbol or bar symbol. The second part could be a bug or a way to reduce the
+; player's odds.
+.sevenAndBarMode
+ call SlotMachine_FindWheel1Wheel2Matches
+ ld a, [de]
+ cp HIGH(SLOTSBAR) + 1
+ ret nc
+.stopWheel
+ xor a
+ ld [wSlotMachineWheel2SlipCounter], a
+ ret
+
+SlotMachine_FindWheel1Wheel2Matches:
+; return whether wheel 1 and wheel 2's current positions allow a match (given
+; that wheel 3 stops in a good position) in Z
+ ld hl, wSlotMachineWheel1BottomTile
+ ld de, wSlotMachineWheel2BottomTile
+ ld a, [de]
+ cp [hl] ; wheel 1 bottom, wheel 2 bottom
+ ret z
+ inc de
+ ld a, [de]
+ cp [hl] ; wheel 1 bottom, wheel 2 middle
+ ret z
+ inc hl
+ cp [hl] ; wheel 1 middle, wheel 2 middle
+ ret z
+ inc hl
+ cp [hl] ; wheel 1 top, wheel 2 middle
+ ret z
+ inc de
+ ld a, [de]
+ cp [hl] ; wheel 1 top, wheel 2 top
+ ret z
+ dec de
+ dec de
+ ret
+
+SlotMachine_CheckForMatches:
+ call SlotMachine_GetWheel3Tiles
+ ld a, [wSlotMachineBet]
+ cp 2
+ jr z, .checkMatchesFor2CoinBet
+ cp 1
+ jr z, .checkMatchFor1CoinBet
+; 3 coin bet allows diagonal matches (plus the matches for 1/2 coin bets)
+ ld hl, wSlotMachineWheel1BottomTile
+ ld de, wSlotMachineWheel2MiddleTile
+ ld bc, wSlotMachineWheel3TopTile
+ call SlotMachine_CheckForMatch
+ jp z, .foundMatch
+ ld hl, wSlotMachineWheel1TopTile
+ ld de, wSlotMachineWheel2MiddleTile
+ ld bc, wSlotMachineWheel3BottomTile
+ call SlotMachine_CheckForMatch
+ jr z, .foundMatch
+; 2 coin bet allows top/bottom horizontal matches (plus the match for a 1 coin bet)
+.checkMatchesFor2CoinBet
+ ld hl, wSlotMachineWheel1TopTile
+ ld de, wSlotMachineWheel2TopTile
+ ld bc, wSlotMachineWheel3TopTile
+ call SlotMachine_CheckForMatch
+ jr z, .foundMatch
+ ld hl, wSlotMachineWheel1BottomTile
+ ld de, wSlotMachineWheel2BottomTile
+ ld bc, wSlotMachineWheel3BottomTile
+ call SlotMachine_CheckForMatch
+ jr z, .foundMatch
+; 1 coin bet only allows a middle horizontal match
+.checkMatchFor1CoinBet
+ ld hl, wSlotMachineWheel1MiddleTile
+ ld de, wSlotMachineWheel2MiddleTile
+ ld bc, wSlotMachineWheel3MiddleTile
+ call SlotMachine_CheckForMatch
+ jr z, .foundMatch
+ ld a, [wSlotMachineFlags]
+ and $c0
+ jr z, .noMatch
+ ld hl, wSlotMachineRerollCounter
+ dec [hl]
+ jr nz, .rollWheel3DownByOneSymbol
+.noMatch
+ ld hl, NotThisTimeText
+ call PrintText
+.done
+ xor a
+ ld [wMuteAudioAndPauseMusic], a
+ ret
+.rollWheel3DownByOneSymbol
+ call SlotMachine_AnimWheel3
+ call DelayFrame
+ call SlotMachine_AnimWheel3
+ call DelayFrame
+ jp SlotMachine_CheckForMatches
+.foundMatch
+ ld a, [wSlotMachineFlags]
+ and $c0
+ jr z, .rollWheel3DownByOneSymbol ; roll wheel if player isn't allowed to win
+ and $80
+ jr nz, .acceptMatch
+; if 7/bar matches aren't enabled and the match was a 7/bar symbol, roll wheel
+ ld a, [hl]
+ cp HIGH(SLOTSBAR) + 1
+ jr c, .rollWheel3DownByOneSymbol
+.acceptMatch
+ ld a, [hl]
+ sub $2
+ ld [wSlotMachineWinningSymbol], a
+ ld hl, SlotRewardPointers
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ push de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, wcf4b
+ ld bc, 4
+ call CopyData
+ pop hl
+ ld de, .flashScreenLoop
+ push de
+ jp hl
+
+.flashScreenLoop
+ ldh a, [rBGP]
+ xor $40
+ ldh [rBGP], a
+ call UpdateGBCPal_BGP
+ ld c, 5
+ call DelayFrames
+ dec b
+ jr nz, .flashScreenLoop
+ ld hl, wPayoutCoins
+ ld [hl], d
+ inc hl
+ ld [hl], e
+ call SlotMachine_PrintPayoutCoins
+ ld hl, SymbolLinedUpSlotMachineText
+ call PrintText
+ call WaitForTextScrollButtonPress
+ call SlotMachine_PayCoinsToPlayer
+ call SlotMachine_PrintPayoutCoins
+ ld a, $e4
+ ldh [rOBP0], a
+ call UpdateGBCPal_OBP0
+ jp .done
+
+SymbolLinedUpSlotMachineText:
+ text_asm
+ push bc
+ call SlotMachine_PrintWinningSymbol
+ ld hl, LinedUpText
+ pop bc
+ inc bc
+ inc bc
+ inc bc
+ inc bc
+ ret
+
+LinedUpText:
+ text_far _LinedUpText
+ text_end
+
+SlotRewardPointers:
+ dw SlotReward300Func
+ dw SlotReward300Text
+ dw SlotReward100Func
+ dw SlotReward100Text
+ dw SlotReward8Func
+ dw SlotReward8Text
+ dw SlotReward15Func
+ dw SlotReward15Text
+ dw SlotReward15Func
+ dw SlotReward15Text
+ dw SlotReward15Func
+ dw SlotReward15Text
+
+SlotReward300Text:
+ db "300@"
+
+SlotReward100Text:
+ db "100@"
+
+SlotReward8Text:
+ db "8@"
+
+SlotReward15Text:
+ db "15@"
+
+NotThisTimeText:
+ text_far _NotThisTimeText
+ text_end
+
+; compares the slot machine tiles at bc, de, and hl
+SlotMachine_CheckForMatch:
+ ld a, [de]
+ cp [hl]
+ ret nz
+ ld a, [bc]
+ cp [hl]
+ ret
+
+SlotMachine_GetWheel3Tiles:
+ ld de, wSlotMachineWheel3BottomTile
+ ld hl, SlotMachineWheel3
+ ld a, [wSlotMachineWheel3Offset]
+ call SlotMachine_GetWheelTiles
+
+SlotMachine_GetWheel2Tiles:
+ ld de, wSlotMachineWheel2BottomTile
+ ld hl, SlotMachineWheel2
+ ld a, [wSlotMachineWheel2Offset]
+ call SlotMachine_GetWheelTiles
+
+SlotMachine_GetWheel1Tiles:
+ ld de, wSlotMachineWheel1BottomTile
+ ld hl, SlotMachineWheel1
+ ld a, [wSlotMachineWheel1Offset]
+
+SlotMachine_GetWheelTiles:
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld c, 3
+.loop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ inc hl
+ dec c
+ jr nz, .loop
+ ret
+
+SlotReward8Func:
+ ld hl, wSlotMachineAllowMatchesCounter
+ ld a, [hl]
+ and a
+ jr z, .skip
+ dec [hl]
+.skip
+ ld b, $2
+ ld de, 8
+ ret
+
+SlotReward15Func:
+ ld hl, wSlotMachineAllowMatchesCounter
+ ld a, [hl]
+ and a
+ jr z, .skip
+ dec [hl]
+.skip
+ ld b, $4
+ ld de, 15
+ ret
+
+SlotReward100Func:
+ ld a, SFX_GET_KEY_ITEM
+ call PlaySound
+ xor a
+ ld [wSlotMachineFlags], a
+ ld b, $8
+ ld de, 100
+ ret
+
+SlotReward300Func:
+ ld hl, YeahText
+ call PrintText
+ ld a, SFX_GET_ITEM_2
+ call PlaySound
+ call Random
+ cp $80
+ ld a, $0
+ jr c, .skip
+ ld [wSlotMachineFlags], a
+.skip
+ ld [wSlotMachineAllowMatchesCounter], a
+ ld b, $14
+ ld de, 300
+ ret
+
+YeahText:
+ text_far _YeahText
+ text_pause
+ text_end
+
+SlotMachine_PrintWinningSymbol:
+; prints winning symbol and down arrow in text box
+ hlcoord 2, 14
+ ld a, [wSlotMachineWinningSymbol]
+ add $25
+ ld [hli], a
+ inc a
+ ld [hld], a
+ inc a
+ ld de, -SCREEN_WIDTH
+ add hl, de
+ ld [hli], a
+ inc a
+ ld [hl], a
+ hlcoord 18, 16
+ ld [hl], "▼"
+ ret
+
+SlotMachine_SubtractBetFromPlayerCoins:
+ ld hl, wTempCoins2 + 1
+ ld a, [wSlotMachineBet]
+ ld [hld], a
+ xor a
+ ld [hli], a
+ ld de, wPlayerCoins + 1
+ ld c, $2
+ predef SubBCDPredef
+
+SlotMachine_PrintCreditCoins:
+ hlcoord 5, 1
+ ld de, wPlayerCoins
+ ld c, $2
+ jp PrintBCDNumber
+
+SlotMachine_PrintPayoutCoins:
+ hlcoord 11, 1
+ ld de, wPayoutCoins
+ lb bc, LEADING_ZEROES | 2, 4 ; 2 bytes, 4 digits
+ jp PrintNumber
+
+SlotMachine_PayCoinsToPlayer:
+ ld a, $1
+ ld [wMuteAudioAndPauseMusic], a
+ call WaitForSoundToFinish
+
+; Put 1 in the temp coins variable. This value is added to the player's coins
+; repeatedly so the player can watch the value go up 1 coin at a time.
+ ld hl, wTempCoins1
+ xor a
+ ld [hli], a
+ inc a
+ ld [hl], a
+
+ ld a, 5
+ ld [wAnimCounter], a
+
+; Subtract 1 from the payout amount and add 1 to the player's coins each
+; iteration until the payout amount reaches 0.
+.loop
+ ld a, [wPayoutCoins + 1]
+ ld l, a
+ ld a, [wPayoutCoins]
+ ld h, a
+ or l
+ ret z
+ ld de, -1
+ add hl, de
+ ld a, l
+ ld [wPayoutCoins + 1], a
+ ld a, h
+ ld [wPayoutCoins], a
+ ld hl, wTempCoins1 + 1
+ ld de, wPlayerCoins + 1
+ ld c, $2
+ predef AddBCDPredef
+ call SlotMachine_PrintCreditCoins
+ call SlotMachine_PrintPayoutCoins
+ ld a, SFX_SLOTS_REWARD
+ call PlaySound
+ ld a, [wAnimCounter]
+ dec a
+ jr nz, .skip1
+ ldh a, [rOBP0]
+ xor $40 ; make the slot wheel symbols flash
+ ldh [rOBP0], a
+ call UpdateGBCPal_OBP0
+ ld a, 5
+.skip1
+ ld [wAnimCounter], a
+ ld a, [wSlotMachineWinningSymbol]
+ cp HIGH(SLOTSBAR) + 1
+ ld c, 8
+ jr nc, .skip2
+ srl c ; c = 4 (make the the coins transfer faster if the symbol was 7 or bar)
+.skip2
+ call DelayFrames
+ jr .loop
+
+SlotMachine_PutOutLitBalls:
+ ld a, $23
+ ld [wNewSlotMachineBallTile], a
+ jr SlotMachine_UpdateThreeCoinBallTiles
+
+SlotMachine_LightBalls:
+ ld a, $14
+ ld [wNewSlotMachineBallTile], a
+ ld a, [wSlotMachineBet]
+ dec a
+ jr z, SlotMachine_UpdateOneCoinBallTiles
+ dec a
+ jr z, SlotMachine_UpdateTwoCoinBallTiles
+
+SlotMachine_UpdateThreeCoinBallTiles:
+ hlcoord 3, 2
+ call SlotMachine_UpdateBallTiles
+ hlcoord 3, 10
+ call SlotMachine_UpdateBallTiles
+
+SlotMachine_UpdateTwoCoinBallTiles:
+ hlcoord 3, 4
+ call SlotMachine_UpdateBallTiles
+ hlcoord 3, 8
+ call SlotMachine_UpdateBallTiles
+
+SlotMachine_UpdateOneCoinBallTiles:
+ hlcoord 3, 6
+
+SlotMachine_UpdateBallTiles:
+ ld a, [wNewSlotMachineBallTile]
+ ld [hl], a
+ ld bc, 13
+ add hl, bc
+ ld [hl], a
+ ld bc, 7
+ add hl, bc
+ inc a
+ ld [hl], a
+ ld bc, 13
+ add hl, bc
+ ld [hl], a
+ ret
+
+SlotMachine_AnimWheel1:
+ ld bc, SlotMachineWheel1
+ ld de, wSlotMachineWheel1Offset
+ ld hl, wOAMBuffer
+ ld a, $30
+ ld [wBaseCoordX], a
+ jr SlotMachine_AnimWheel
+
+SlotMachine_AnimWheel2:
+ ld bc, SlotMachineWheel2
+ ld de, wSlotMachineWheel2Offset
+ ld hl, wOAMBuffer + $30
+ ld a, $50
+ ld [wBaseCoordX], a
+ jr SlotMachine_AnimWheel
+
+SlotMachine_AnimWheel3:
+ ld bc, SlotMachineWheel3
+ ld de, wSlotMachineWheel3Offset
+ ld hl, wOAMBuffer + $60
+ ld a, $70
+ ld [wBaseCoordX], a
+
+SlotMachine_AnimWheel:
+ ld a, $58
+ ld [wBaseCoordY], a
+ push de
+ ld a, [de]
+ ld d, b
+ add c
+ ld e, a
+ jr nc, .loop
+ inc d
+.loop
+ ld a, [wBaseCoordY]
+ ld [hli], a
+ ld a, [wBaseCoordX]
+ ld [hli], a
+ ld a, [de]
+ ld [hli], a
+ ld a, $80
+ ld [hli], a
+ ld a, [wBaseCoordY]
+ ld [hli], a
+ ld a, [wBaseCoordX]
+ add $8
+ ld [hli], a
+ ld a, [de]
+ inc a
+ ld [hli], a
+ ld a, $80
+ ld [hli], a
+ inc de
+ ld a, [wBaseCoordY]
+ sub $8
+ ld [wBaseCoordY], a
+ cp $28
+ jr nz, .loop
+ pop de
+ ld a, [de]
+ inc a ; advance the offset so that the wheel animates
+ cp 30
+ jr nz, .skip
+ xor a ; wrap around to 0 when the offset reaches 30
+.skip
+ ld [de], a
+ ret
+
+SlotMachine_HandleInputWhileWheelsSpin:
+ call DelayFrame
+ call JoypadLowSensitivity
+ ldh a, [hJoy5]
+ and A_BUTTON
+ ret z
+ ld hl, wStoppingWhichSlotMachineWheel
+ ld a, [hl]
+ dec a
+ ld de, wSlotMachineWheel1SlipCounter
+ jr z, .skip
+ dec a
+ ld de, wSlotMachineWheel2SlipCounter
+ jr z, .skip
+.loop
+ inc [hl]
+ ld a, SFX_SLOTS_STOP_WHEEL
+ jp PlaySound
+.skip
+ ld a, [de]
+ and a
+ ret nz
+ jr .loop
+
+LoadSlotMachineTiles:
+ call DisableLCD
+ ld hl, SlotMachineTiles2
+ ld de, vChars0
+ ld bc, $1c tiles ; should be SlotMachineTiles2End - SlotMachineTiles2, or $18 tiles
+ ld a, BANK(SlotMachineTiles2)
+ call FarCopyData
+ ld hl, SlotMachineTiles1
+ ld de, vChars2
+ ld bc, SlotMachineTiles1End - SlotMachineTiles1
+ ld a, BANK(SlotMachineTiles1)
+ call FarCopyData
+ ld hl, SlotMachineTiles2
+ ld de, vChars2 tile $25
+ ld bc, $1c tiles ; should be SlotMachineTiles2End - SlotMachineTiles2, or $18 tiles
+ ld a, BANK(SlotMachineTiles2)
+ call FarCopyData
+ ld hl, SlotMachineMap
+ decoord 0, 0
+ ld bc, SlotMachineMapEnd - SlotMachineMap
+ call CopyData
+ call EnableLCD
+ ld hl, wSlotMachineWheel1Offset
+ ld a, $1c
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+ call SlotMachine_AnimWheel1
+ call SlotMachine_AnimWheel2
+ jp SlotMachine_AnimWheel3
+
+SlotMachineMap:
+ INCBIN "gfx/slots/slots.tilemap"
+SlotMachineMapEnd:
+
+INCLUDE "data/events/slot_machine_wheels.asm"
+
+SlotMachineTiles1:
+ INCBIN "gfx/slots/slots_1.2bpp"
+SlotMachineTiles1End:
diff --git a/engine/special_warps.asm b/engine/special_warps.asm
deleted file mode 100644
index 3a8b8b86..00000000
--- a/engine/special_warps.asm
+++ /dev/null
@@ -1,149 +0,0 @@
-SpecialWarpIn:
- call LoadSpecialWarpData
- predef LoadTilesetHeader
- ld hl, wd732
- bit 2, [hl] ; dungeon warp or fly warp?
- res 2, [hl]
- jr z, .next
-; if dungeon warp or fly warp
- ld a, [wDestinationMap]
- jr .next2
-.next
- bit 1, [hl]
- jr z, .next3
- call EmptyFunc
-.next3
- ld a, 0
-.next2
- ld b, a
- ld a, [wd72d]
- and a
- jr nz, .next4
- ld a, b
-.next4
- ld hl, wd732
- bit 4, [hl] ; dungeon warp?
- ret nz
-; if not dungeon warp
- ld [wLastMap], a
- ret
-
-; gets the map ID, tile block map view pointer, tileset, and coordinates
-LoadSpecialWarpData:
- ld a, [wd72d]
- cp TRADE_CENTER
- jr nz, .notTradeCenter
- ld hl, TradeCenterSpec1
- ld a, [hSerialConnectionStatus]
- cp USING_INTERNAL_CLOCK ; which gameboy is clocking determines who is on the left and who is on the right
- jr z, .copyWarpData
- ld hl, TradeCenterSpec2
- jr .copyWarpData
-.notTradeCenter
- cp COLOSSEUM
- jr nz, .notColosseum
- ld hl, ColosseumSpec1
- ld a, [hSerialConnectionStatus]
- cp USING_INTERNAL_CLOCK
- jr z, .copyWarpData
- ld hl, ColosseumSpec2
- jr .copyWarpData
-.notColosseum
- ld a, [wd732]
- bit 1, a
- jr nz, .notFirstMap
- bit 2, a
- jr nz, .notFirstMap
- ld hl, FirstMapSpec
-.copyWarpData
- ld de, wCurMap
- ld c, $7
-.copyWarpDataLoop
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .copyWarpDataLoop
- ld a, [hli]
- ld [wCurMapTileset], a
- xor a
- jr .done
-.notFirstMap
- 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
- bit 6, [hl] ; return to last pokemon center (or player's house)?
- res 6, [hl]
- jr z, .otherDestination
-; return to last pokemon center or player's house
- ld a, [wLastBlackoutMap]
- jr .usedFlyWarp
-.usedDunegonWarp
- ld hl, wd72d
- res 4, [hl]
- ld a, [wDungeonWarpDestinationMap]
- ld b, a
- ld [wCurMap], a
- ld a, [wWhichDungeonWarp]
- ld c, a
- ld hl, DungeonWarpList
- ld de, 0
- ld a, 6
- ld [wDungeonWarpDataEntrySize], a
-.dungeonWarpListLoop
- ld a, [hli]
- cp b
- jr z, .matchedDungeonWarpDestinationMap
- inc hl
- jr .nextDungeonWarp
-.matchedDungeonWarpDestinationMap
- ld a, [hli]
- cp c
- jr z, .matchedDungeonWarpID
-.nextDungeonWarp
- ld a, [wDungeonWarpDataEntrySize]
- add e
- ld e, a
- jr .dungeonWarpListLoop
-.matchedDungeonWarpID
- ld hl, DungeonWarpData
- add hl, de
- jr .copyWarpData2
-.otherDestination
- ld a, [wDestinationMap]
-.usedFlyWarp
- ld b, a
- ld [wCurMap], a
- ld hl, FlyWarpDataPtr
-.flyWarpDataPtrLoop
- ld a, [hli]
- inc hl
- cp b
- jr z, .foundFlyWarpMatch
- inc hl
- inc hl
- jr .flyWarpDataPtrLoop
-.foundFlyWarpMatch
- ld a, [hli]
- ld h, [hl]
- ld l, a
-.copyWarpData2
- ld de, wCurrentTileBlockMapViewPointer
- ld c, $6
-.copyWarpDataLoop2
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .copyWarpDataLoop2
- xor a ; OVERWORLD
- ld [wCurMapTileset], a
-.done
- ld [wYOffsetSinceLastSpecialWarp], a
- ld [wXOffsetSinceLastSpecialWarp], a
- ld a, $ff ; the player's coordinates have already been updated using a special warp, so don't use any of the normal warps
- ld [wDestinationWarpID], a
- ret
-
-INCLUDE "data/special_warps.asm"
diff --git a/engine/status_ailments.asm b/engine/status_ailments.asm
deleted file mode 100755
index 787533c4..00000000
--- a/engine/status_ailments.asm
+++ /dev/null
@@ -1,46 +0,0 @@
-PrintStatusAilment:
- ld a, [de]
- bit PSN, a
- jr nz, .psn
- bit BRN, a
- jr nz, .brn
- bit FRZ, a
- jr nz, .frz
- bit PAR, a
- jr nz, .par
- and SLP
- ret z
- ld a, "S"
- ld [hli], a
- ld a, "L"
- ld [hli], a
- ld [hl], "P"
- ret
-.psn
- ld a, "P"
- ld [hli], a
- ld a, "S"
- ld [hli], a
- ld [hl], "N"
- ret
-.brn
- ld a, "B"
- ld [hli], a
- ld a, "R"
- ld [hli], a
- ld [hl], "N"
- ret
-.frz
- ld a, "F"
- ld [hli], a
- ld a, "R"
- ld [hli], a
- ld [hl], "Z"
- ret
-.par
- ld a, "P"
- ld [hli], a
- ld a, "A"
- ld [hli], a
- ld [hl], "R"
- ret
diff --git a/engine/subtract_paid_money.asm b/engine/subtract_paid_money.asm
deleted file mode 100644
index a6a6ec2e..00000000
--- a/engine/subtract_paid_money.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-; subtracts the amount the player paid from their money
-; sets carry flag if there is enough money and unsets carry flag if not
-SubtractAmountPaidFromMoney_:
- ld de, wPlayerMoney
- ld hl, hMoney ; total price of items
- ld c, 3 ; length of money in bytes
- call StringCmp
- ret c
- ld de, wPlayerMoney + 2
- ld hl, hMoney + 2 ; total price of items
- ld c, 3 ; length of money in bytes
- predef SubBCDPredef ; subtract total price from money
- ld a, MONEY_BOX
- ld [wTextBoxID], a
- call DisplayTextBoxID ; redraw money text box
- and a
- ret
diff --git a/engine/surfing_minigame.asm b/engine/surfing_minigame.asm
index b89d22dc..578e6b1e 100755
--- a/engine/surfing_minigame.asm
+++ b/engine/surfing_minigame.asm
@@ -3,52 +3,52 @@ SurfingPikachuMinigame:
call DelayFrame
call DelayFrame
call DelayFrame
- ld a, [hTilesetType]
+ ldh a, [hTilesetType]
push af
xor a
- ld [hTilesetType], a
+ ldh [hTilesetType], a
ld a, [wUpdateSpritesEnabled]
push af
ld a, $ff
ld [wUpdateSpritesEnabled], a
- ld a, [rIE]
+ ldh a, [rIE]
push af
xor a
- ld [rIF], a
+ ldh [rIF], a
ld a, $f
- ld [rIE], a
+ ldh [rIE], a
ld a, $8
- ld [rSTAT], a
- ld a, [H_AUTOBGTRANSFERDEST + 1]
+ ldh [rSTAT], a
+ ldh a, [hAutoBGTransferDest + 1]
push af
ld a, $98
- ld [H_AUTOBGTRANSFERDEST + 1], a
+ ldh [hAutoBGTransferDest + 1], a
call SurfingPikachuMinigameIntro
call SurfingPikachuLoop
xor a
- ld [rBGP], a
- ld [rOBP0], a
- ld [rOBP1], a
+ ldh [rBGP], a
+ ldh [rOBP0], a
+ ldh [rOBP1], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
call ClearObjectAnimationBuffers
call ClearSprites
xor a
- ld [hLCDCPointer], a
- ld [hSCX], a
- ld [hSCY], a
+ ldh [hLCDCPointer], a
+ ldh [hSCX], a
+ ldh [hSCY], a
ld a, $90
- ld [hWY], a
+ ldh [hWY], a
call DelayFrame
pop af
- ld [H_AUTOBGTRANSFERDEST + 1], a
+ ldh [hAutoBGTransferDest + 1], a
xor a
- ld [rIF], a
+ ldh [rIF], a
pop af
- ld [rIE], a
+ ldh [rIE], a
xor a
- ld [rSTAT], a
+ ldh [rSTAT], a
call RunDefaultPaletteCommand
call ReloadMapAfterSurfingMinigame
call PlayDefaultMusic
@@ -56,7 +56,7 @@ SurfingPikachuMinigame:
pop af
ld [wUpdateSpritesEnabled], a
pop af
- ld [hTilesetType], a
+ ldh [hTilesetType], a
ret
SurfingPikachuLoop:
@@ -88,12 +88,12 @@ SurfingPikachu_CheckPressedSelect:
ld hl, wd492
bit 1, [hl]
ret z
- ld a, [hJoyPressed]
+ ldh a, [hJoyPressed]
and SELECT
ret
Func_f80b7:
- ld a, [hJoyPressed]
+ ldh a, [hJoyPressed]
and START
ret z
ld hl, wc5e2
@@ -175,7 +175,7 @@ SurfingPikachuMinigame_LoadGFXAndLayout:
xor a
call FillMemory
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call ClearObjectAnimationBuffers
ld hl, SurfingPikachu1Graphics1
@@ -230,12 +230,12 @@ SurfingPikachuMinigame_LoadGFXAndLayout:
call SurfingMinigame_InitScanlineOverrides
xor a
- ld [hSCX], a
- ld [hSCY], a
+ ldh [hSCX], a
+ ldh [hSCY], a
ld a, $7e
- ld [hWY], a
+ ldh [hWY], a
ld a, rSCY - $ff00
- ld [hLCDCPointer], a
+ ldh [hLCDCPointer], a
ld a, $40
ld [wSurfingMinigamePikachuSpeed], a
xor a
@@ -251,12 +251,12 @@ SurfingPikachuMinigame_LoadGFXAndLayout:
call Func_f81ff
call Func_f8256
ld a, $e3
- ld [rLCDC], a
+ ldh [rLCDC], a
call SurfingPikachuMinigame_SetBGPals
ld a, $e4
- ld [rOBP0], a
+ ldh [rOBP0], a
ld a, $e0
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
ret
@@ -266,13 +266,13 @@ SurfingPikachuMinigame_SetBGPals:
and a
jr nz, .sgb
ld a, $d0
- ld [rBGP], a
+ ldh [rBGP], a
call UpdateGBCPal_BGP
ret
.sgb
ld a, $e4
- ld [rBGP], a
+ ldh [rBGP], a
call UpdateGBCPal_BGP
ret
@@ -479,31 +479,31 @@ Func_f8324:
ld hl, wSurfingMinigameRoutineNumber
inc [hl]
ld a, $90
- ld [hSCX], a
+ ldh [hSCX], a
ld a, $72
ld [wSurfingMinigameWaveFunctionNumber], a
ld a, $4
ld [wc5d2], a
xor a
- ld [hLCDCPointer], a
+ ldh [hLCDCPointer], a
ld [wSurfingMinigameSCX], a
ld [wSurfingMinigameSCX + 1], a
ld [wSurfingMinigameSCX + 2], a
ret
Func_f835c:
- ld a, [hSCX]
+ ldh a, [hSCX]
and a
jr z, .asm_f837b
call SurfingMinigame_UpdateLYOverrides
call SurfingMinigame_SetPikachuHeight
call SurfingMinigame_ReadBGMapBuffer
- ld a, [hSCX]
+ ldh a, [hSCX]
dec a
dec a
dec a
dec a
- ld [hSCX], a
+ ldh [hSCX], a
ld a, $e0
ld [wSurfingMinigameXOffset], a
call SurfingMinigame_GenerateBGMap
@@ -599,7 +599,7 @@ SurfingMinigame_WaitLast:
SurfingMinigame_ExitOnPressA:
call SurfingMinigame_UpdateLYOverrides
- ld a, [hJoyPressed]
+ ldh a, [hJoyPressed]
and A_BUTTON
ret z
ld hl, wSurfingMinigameRoutineNumber
@@ -620,7 +620,7 @@ SurfingMinigame_GameOver:
ret
.wait_press_a
- ld a, [hJoyPressed]
+ ldh a, [hJoyPressed]
and A_BUTTON
ret z
ld hl, wSurfingMinigameRoutineNumber
@@ -662,7 +662,7 @@ SurfingMinigame_UpdatePikachuDistance:
dec [hl]
ret
-SurfingMinigameAnimatedObjectFn_Pikachu
+SurfingMinigameAnimatedObjectFn_Pikachu:
ld a, [wc5d2]
ld e, a
ld d, $0
@@ -1088,7 +1088,7 @@ SufingMinigame_ReduceSpeedBy128:
ret
Func_f871e:
- ld a, [hSCX]
+ ldh a, [hSCX]
and $7
cp $3
jr c, .asm_f8740
@@ -1110,7 +1110,7 @@ Func_f871e:
ret
Func_f8742:
- ld a, [hSCX]
+ ldh a, [hSCX]
and $7
cp $3
ret c
@@ -1209,7 +1209,7 @@ Func_f87b5:
ret
.GetYCoord:
- ld a, [hSCX]
+ ldh a, [hSCX]
and $8
jr nz, .get_height_plus_9
ld hl, wSurfingMinigameWaveHeight + 8
@@ -1229,7 +1229,7 @@ Func_f87b5:
ret
.six_or_twenty
- ld a, [hSCX]
+ ldh a, [hSCX]
and $7
ld e, a
ld a, [hl]
@@ -1237,7 +1237,7 @@ Func_f87b5:
ret
.seven
- ld a, [hSCX]
+ ldh a, [hSCX]
and $7
add [hl]
ret
@@ -1328,7 +1328,7 @@ SurfingMinigame_MoveClouds:
SurfingMinigame_ReadBGMapBuffer:
ld a, [wSurfingMinigameBGMapReadBuffer] ; ???
- ld a, [hSCX]
+ ldh a, [hSCX]
add $48
ld e, a
srl e
@@ -1358,19 +1358,19 @@ SurfingMinigame_ReadBGMapBuffer:
.copy
ld de, wSurfingMinigameBGMapReadBuffer
ld a, e
- ld [H_VBCOPYDEST], a
+ ldh [hVBlankCopyDest], a
ld a, d
- ld [H_VBCOPYDEST + 1], a
+ ldh [hVBlankCopyDest + 1], a
ld a, l
- ld [H_VBCOPYSRC], a
+ ldh [hVBlankCopySource], a
ld a, h
- ld [H_VBCOPYSRC + 1], a
+ ldh [hVBlankCopySource + 1], a
ld a, 16 / $10
- ld [H_VBCOPYSIZE], a
+ ldh [hVBlankCopySize], a
ret
SurfingMinigame_SetPikachuHeight:
- ld a, [hSCX]
+ ldh a, [hSCX]
and $8
jr nz, .asm_f88b9
ld hl, wSurfingMinigameWaveHeight + 7
@@ -1391,7 +1391,7 @@ SurfingMinigame_SetPikachuHeight:
ret
.asm_f88d0
- ld a, [hSCX]
+ ldh a, [hSCX]
and $7
ld e, a
ld a, [hl]
@@ -1400,7 +1400,7 @@ SurfingMinigame_SetPikachuHeight:
ret
.asm_f88db
- ld a, [hSCX]
+ ldh a, [hSCX]
and $7
add [hl]
ld [wSurfingMinigamePikachuObjectHeight], a
@@ -1457,7 +1457,7 @@ SurfingMinigame_DrawResultsScreen:
xor a
call FillMemory
ld hl, .BeachTilemap
- coord de, 0, 6
+ decoord 0, 6
ld bc, .BeachTilemapEnd - .BeachTilemap
call CopyData
call .PlaceTextbox
@@ -1466,7 +1466,7 @@ SurfingMinigame_DrawResultsScreen:
xor a
call FillMemory
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ret
.BeachTilemap:
@@ -1474,39 +1474,39 @@ INCBIN "gfx/unknown_f8946.map"
.BeachTilemapEnd:
.PlaceTextbox:
- coord hl, 1, 1
+ hlcoord 1, 1
lb de, $3b, $3c
ld a, $40
call .place_row
- coord hl, 1, 2
+ hlcoord 1, 2
lb de, $3f, $3f
ld a, $ff
call .place_row
- coord hl, 1, 3
+ hlcoord 1, 3
lb de, $3f, $3f
ld a, $ff
call .place_row
- coord hl, 1, 4
+ hlcoord 1, 4
lb de, $3f, $3f
ld a, $ff
call .place_row
- coord hl, 1, 5
+ hlcoord 1, 5
lb de, $3f, $3f
ld a, $ff
call .place_row
- coord hl, 1, 6
+ hlcoord 1, 6
lb de, $3f, $3f
ld a, $ff
call .place_row
- coord hl, 1, 7
+ hlcoord 1, 7
lb de, $3f, $3f
ld a, $ff
call .place_row
- coord hl, 1, 8
+ hlcoord 1, 8
lb de, $3f, $3f
ld a, $ff
call .place_row
- coord hl, 1, 9
+ hlcoord 1, 9
lb de, $3d, $3e
ld a, $40
call .place_row
@@ -1525,7 +1525,7 @@ INCBIN "gfx/unknown_f8946.map"
SurfingMinigame_PrintTextHiScore:
ld hl, .Hi_Score
- coord de, 6, 8
+ decoord 6, 8
ld bc, $9
call CopyData
ret
@@ -1535,7 +1535,7 @@ SurfingMinigame_PrintTextHiScore:
SurfingMinigame_WriteHPLeft:
ld hl, .HP_Left
- coord de, 2, 2
+ decoord 2, 2
ld bc, $7
call CopyData
call SurfingMinigame_BCDPrintHPLeft
@@ -1570,7 +1570,7 @@ SurfingMinigame_AddRemainingHPToTotal:
ret
SurfingMinigame_BCDPrintHPLeft:
- coord hl, 10, 2
+ hlcoord 10, 2
ld de, wSurfingMinigamePikachuHP + 1
ld a, [de]
call SurfingPikachu_PlaceBCDNumber
@@ -1588,7 +1588,7 @@ SurfingMinigame_BCDPrintHPLeft:
SurfingMinigame_WriteRadness:
ld hl, .Radness
- coord de, 2, 4
+ decoord 2, 4
ld bc, $7
call CopyData
call SurfingMinigame_BCDPrintRadness
@@ -1633,10 +1633,10 @@ SurfingMinigame_AddRadnessToTotal:
SurfingMinigame_BCDPrintRadness:
ld a, [wSurfingMinigameRadnessScore + 1]
- coord hl, 10, 4
+ hlcoord 10, 4
call SurfingPikachu_PlaceBCDNumber
ld a, [wSurfingMinigameRadnessScore]
- coord hl, 12, 4
+ hlcoord 12, 4
call SurfingPikachu_PlaceBCDNumber
inc hl
inc hl
@@ -1664,10 +1664,10 @@ SurfingMinigame_AddPointsToTotal:
SurfingMinigame_BCDPrintTotalScore:
ld a, [wSurfingMinigameTotalScore + 1]
- coord hl, 10, 6
+ hlcoord 10, 6
call SurfingPikachu_PlaceBCDNumber
ld a, [wSurfingMinigameTotalScore]
- coord hl, 12, 6
+ hlcoord 12, 6
call SurfingPikachu_PlaceBCDNumber
inc hl
inc hl
@@ -1680,7 +1680,7 @@ SurfingMinigame_BCDPrintTotalScore:
SurfingMinigame_WriteTotal:
ld hl, .Total
- coord de, 2, 6
+ decoord 2, 6
ld bc, $5
call CopyData
call SurfingMinigame_BCDPrintRadness
@@ -1723,10 +1723,10 @@ DidPlayerGetAHighScore:
SurfingMinigame_PlayPikaCryIfSurfingPikaInParty:
push de
- callab IsSurfingPikachuInThePlayersParty
+ callfar IsSurfingPikachuInThePlayersParty
pop de
ret nc
- callab PlayPikachuSoundClip
+ callfar PlayPikachuSoundClip
ret
SurfingMinigame_IncreaseRadnessMeter:
@@ -1853,7 +1853,7 @@ SurfingMinigame_AddRadness:
Func_f8c97:
ld a, $a0
ld [wSurfingMinigameXOffset], a
- ld a, [hSCX]
+ ldh a, [hSCX]
ld h, a
ld a, [wSurfingMinigameSCX]
ld l, a
@@ -1862,13 +1862,13 @@ Func_f8c97:
ld a, l
ld [wSurfingMinigameSCX], a
ld a, h
- ld [hSCX], a
+ ldh [hSCX], a
jr SurfingMinigame_GenerateBGMap
SurfingMinigame_ScrollAndGenerateBGMap:
ld a, $a0
ld [wSurfingMinigameXOffset], a
- ld a, [hSCX]
+ ldh a, [hSCX]
ld h, a
ld a, [wSurfingMinigameSCX]
ld l, a
@@ -1877,10 +1877,10 @@ SurfingMinigame_ScrollAndGenerateBGMap:
ld a, l
ld [wSurfingMinigameSCX], a
ld a, h
- ld [hSCX], a
+ ldh [hSCX], a
SurfingMinigame_GenerateBGMap:
ld hl, wSurfingMinigameSCX + 1
- ld a, [hSCX]
+ ldh a, [hSCX]
cp [hl]
ret z
ld [hl], a
@@ -1921,7 +1921,7 @@ SurfingMinigame_GenerateBGMap:
jr nz, .loop
ld a, [wSurfingMinigameXOffset]
ld e, a
- ld a, [hSCX]
+ ldh a, [hSCX]
add e
and $f0
srl a
@@ -1932,11 +1932,11 @@ SurfingMinigame_GenerateBGMap:
ld hl, vBGMap0
add hl, de
ld a, l
- ld [hRedrawRowOrColumnDest], a
+ ldh [hRedrawRowOrColumnDest], a
ld a, h
- ld [hRedrawRowOrColumnDest + 1], a
+ ldh [hRedrawRowOrColumnDest + 1], a
ld a, $1
- ld [hRedrawRowOrColumnMode], a
+ ldh [hRedrawRowOrColumnMode], a
ret
.CopyRedrawSrcTiles:
@@ -2330,7 +2330,7 @@ SurfingPikachuMinigameIntro:
call ClearSprites
call DisableLCD
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call ClearObjectAnimationBuffers
ld hl, SurfingPikachu1Graphics3
ld de, $8800
@@ -2358,24 +2358,24 @@ SurfingPikachuMinigameIntro:
call SpawnAnimatedObject
call DrawSurfingPikachuMinigameIntroBackground
xor a
- ld [hSCX], a
- ld [hSCY], a
+ ldh [hSCX], a
+ ldh [hSCY], a
ld a, $90
- ld [hWY], a
+ ldh [hWY], a
ld b, $f
call RunPaletteCommand
ld a, $e3
- ld [rLCDC], a
+ ldh [rLCDC], a
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call DelayFrame
call DelayFrame
call DelayFrame
call SurfingPikachuMinigame_SetBGPals
ld a, $e4
- ld [rOBP0], a
+ ldh [rOBP0], a
ld a, $e0
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
call DelayFrame
@@ -2400,22 +2400,22 @@ DrawSurfingPikachuMinigameIntroBackground:
ld a, $ff
call FillMemory
ld hl, Tilemap_f90bc
- coord de, 0, 6
+ decoord 0, 6
ld bc, 12 * SCREEN_WIDTH
call CopyData
ld de, Tilemap_f91c8
- coord hl, 4, 0
+ hlcoord 4, 0
lb bc, 6, 12
call .CopyBox
- coord hl, 3, 7
+ hlcoord 3, 7
lb bc, 3, 15
call .FillBoxWithFF
ld hl, Tilemap_f91ac
- coord de, 3, 7
+ decoord 3, 7
ld bc, 15
call CopyData
ld hl, Tilemap_f91bb
- coord de, 4, 9
+ decoord 4, 9
ld bc, 13
call CopyData
ret
@@ -2499,25 +2499,25 @@ SurfingMinigame_InitScanlineOverrides:
SurfingPikachu_GetJoypad_3FrameBuffer:
call Joypad
- ld a, [H_FRAMECOUNTER]
+ ldh a, [hFrameCounter]
and a
jr nz, .delayed
- ld a, [hJoyHeld]
- ld [hJoy5], a
+ ldh a, [hJoyHeld]
+ ldh [hJoy5], a
ld a, $2
- ld [H_FRAMECOUNTER], a
+ ldh [hFrameCounter], a
ret
.delayed
xor a
- ld [hJoy5], a
+ ldh [hJoy5], a
ret
SurfingPikachuMinigame_BlankPals:
xor a
- ld [rBGP], a
- ld [rOBP0], a
- ld [rOBP1], a
+ ldh [rBGP], a
+ ldh [rOBP0], a
+ ldh [rOBP1], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
@@ -2525,10 +2525,10 @@ SurfingPikachuMinigame_BlankPals:
SurfingPikachuMinigame_NormalPals:
ld a, $e4
- ld [rBGP], a
- ld [rOBP0], a
+ ldh [rBGP], a
+ ldh [rOBP0], a
ld a, $e0
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
diff --git a/engine/test_battle.asm b/engine/test_battle.asm
deleted file mode 100644
index d9dcf1fa..00000000
--- a/engine/test_battle.asm
+++ /dev/null
@@ -1,45 +0,0 @@
-TestBattle:
- ret
-
-.loop
- call GBPalNormal
-
- ; Don't mess around
- ; with obedience.
- ld a, %10000000 ; EARTHBADGE
- ld [wObtainedBadges], a
-
- ld hl, wFlags_D733
- set BIT_TEST_BATTLE, [hl]
-
- ; Reset the party.
- ld hl, wPartyCount
- xor a
- ld [hli], a
- dec a
- ld [hl], a
-
- ; Give the player a
- ; level 20 Rhydon.
- ld a, RHYDON
- ld [wcf91], a
- ld a, 20
- ld [wCurEnemyLVL], a
- xor a
- ld [wMonDataLocation], a
- ld [wCurMap], a
- call AddPartyMon
-
- ; Fight against a
- ; level 20 Rhydon.
- ld a, RHYDON
- ld [wCurOpponent], a
-
- predef InitOpponent
-
- ; When the battle ends,
- ; do it all again.
- ld a, 1
- ld [wUpdateSpritesEnabled], a
- ld [H_AUTOBGTRANSFERENABLED], a
- jr .loop
diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm
deleted file mode 100755
index d4dd0fd3..00000000
--- a/engine/titlescreen.asm
+++ /dev/null
@@ -1,370 +0,0 @@
-SetDefaultNamesBeforeTitlescreen:
- ld hl, NintenText
- ld de, wPlayerName
- call CopyFixedLengthText
- ld hl, SonyText
- ld de, wRivalName
- call CopyFixedLengthText
- xor a
- ld [hWY], a
- ld [wLetterPrintingDelayFlags], a
- ld hl, wd732
- ld [hli], a
- ld [hli], a
- ld [hl], a
- ld a, BANK(Music_TitleScreen)
- ld [wAudioROMBank], a
- ld [wAudioSavedROMBank], a
-
-DisplayTitleScreen:
- call GBPalWhiteOut
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- xor a
- ld [hTilesetType], a
- ld [hSCX], a
- ld a, $40
- ld [hSCY], a
- ld a, $90
- ld [hWY], a
- call ClearScreen
- call DisableLCD
- call LoadFontTilePatterns
-; todo: fix hl pointers
- ld hl, NintendoCopyrightLogoGraphics
- ld de, vTitleLogo + $600
- ld bc, $50
- ld a, BANK(NintendoCopyrightLogoGraphics)
- call FarCopyData
- ld hl, NineTile
- ld de, vTitleLogo + $6e0
- ld bc, $10
- ld a, BANK(NineTile)
- call FarCopyData
- ld hl, GamefreakLogoGraphics
- ld de, vTitleLogo + 101 * $10
- ld bc, 9 * $10
- ld a, BANK(GamefreakLogoGraphics)
- call FarCopyData
- callab LoadYellowTitleScreenGFX
- ld hl, vBGMap0
- ld bc, (vBGMap1 + $400) - vBGMap0
- ld a, " "
- call FillMemory
- callab TitleScreen_PlacePokemonLogo
- call FillSpriteBuffer0WithAA
- call .WriteCopyrightTiles
- call SaveScreenTilesToBuffer2
- call LoadScreenTilesFromBuffer2
- call EnableLCD
- callab TitleScreen_PlacePikachu
- ld a, $9b
- call TitleScreenCopyTileMapToVRAM
- call SaveScreenTilesToBuffer1
- ld a, $40
- ld [hWY], a
- call LoadScreenTilesFromBuffer2
- ld a, vBGMap0 / $100
- call TitleScreenCopyTileMapToVRAM
- ld b, SET_PAL_TITLE_SCREEN
- call RunPaletteCommand
- call GBPalNormal
- ld a, %11100000
- ld [rOBP0], a
- call UpdateGBCPal_OBP0
-
-; make pokemon logo bounce up and down
- ld bc, hSCY ; background scroll Y
- ld hl, .TitleScreenPokemonLogoYScrolls
-.bouncePokemonLogoLoop
- ld a, [hli]
- and a
- jr z, .finishedBouncingPokemonLogo
- ld d, a
- cp -3
- jr nz, .skipPlayingSound
- ld a, SFX_INTRO_CRASH
- call PlaySound
-.skipPlayingSound
- ld a, [hli]
- ld e, a
- call .ScrollTitleScreenPokemonLogo
- jr .bouncePokemonLogoLoop
-
-.TitleScreenPokemonLogoYScrolls:
-; Controls the bouncing effect of the Pokemon logo on the title screen
- db -4,16 ; y scroll amount, number of times to scroll
- db 3,4
- db -3,4
- db 2,2
- db -2,2
- db 1,2
- db -1,2
- db 0 ; terminate list with 0
-
-.ScrollTitleScreenPokemonLogo:
-; Scrolls the Pokemon logo on the title screen to create the bouncing effect
-; Scrolls d pixels e times
- call DelayFrame
- ld a, [bc] ; background scroll Y
- add d
- ld [bc], a
- dec e
- jr nz, .ScrollTitleScreenPokemonLogo
- ret
-
-; place tiles for title screen copyright
-.WriteCopyrightTiles
- coord hl, 2, 17
- ld de, .tileScreenCopyrightTiles
-.titleScreenCopyrightTilesLoop
- ld a, [de]
- inc de
- cp $ff
- ret z
- ld [hli], a
- jr .titleScreenCopyrightTilesLoop
-
-.tileScreenCopyrightTiles
- db $e0,$e1,$e2,$e3,$e1,$e2,$ee,$e5,$e6,$e7,$e8,$e9,$ea,$eb,$ec,$ed,$ff ; ©1995-1999 GAME FREAK inc.
-
-.finishedBouncingPokemonLogo
- call LoadScreenTilesFromBuffer1
- ld c, 36
- call DelayFrames
- ld a, SFX_INTRO_WHOOSH
- call PlaySound
-
-; scroll game version in from the right
- callab TitleScreen_PlacePikaSpeechBubble
- ld a, SCREEN_HEIGHT_PIXELS
- ld [hWY], a
- call Delay3
- ld e, 0
- call TitleScreen_PlayPikachuPCM
- call WaitForSoundToFinish
- call StopAllMusic
- ld a, MUSIC_TITLE_SCREEN
- ld [wNewSoundID], a
- call PlaySound
-.loop
- xor a
- ld [wUnusedCC5B], a
- ld [wTitleScreenScene], a
- ld [wTitleScreenScene + 1], a
- ld [wTitleScreenScene + 2], a
- ld [wTitleScreenScene + 3], a
- ld a, $f
- ld [wTitleScreenScene + 4], a
-.titleScreenLoop
- call IncrementResetCounter
- jp c, .doTitlescreenReset
- call DelayFrame
- call JoypadLowSensitivity
- ld a, [hJoyHeld]
- cp D_UP | SELECT | B_BUTTON
- jr z, .go_to_main_menu
- and A_BUTTON | START
- jr nz, .go_to_main_menu
- call DoTitleScreenFunction
- jr .titleScreenLoop
-
-.go_to_main_menu
- ld e, $a
- call TitleScreen_PlayPikachuPCM
- call GBPalWhiteOutWithDelay3
- call ClearSprites
- xor a
- ld [hWY], a
- inc a
- ld [H_AUTOBGTRANSFERENABLED], a
- call ClearScreen
- ld a, vBGMap0 / $100
- call TitleScreenCopyTileMapToVRAM
- ld a, vBGMap1 / $100
- call TitleScreenCopyTileMapToVRAM
- call Delay3
- call LoadGBPal
- ld a, [hJoyHeld]
- ld b, a
- and D_UP | SELECT | B_BUTTON
- cp D_UP | SELECT | B_BUTTON
- jp z, .doClearSaveDialogue
- jp MainMenu
-
-.asm_42f0
-; unreferenced
- callab PrinterDebug
- jp .loop
-
-.asm_42fb
-; unreferenced
- ld a, [wTitleScreenScene + 4]
- inc a
- cp $2a
- jr c, .asm_4305
- ld a, $f
-.asm_4305
- ld [wTitleScreenScene + 4], a
- ld e, a
- callab PlayPikachuSoundClip
- xor a
- ld [wTitleScreenScene + 2], a
- ld [wTitleScreenScene + 3], a
- jp .titleScreenLoop
-
-.doTitlescreenReset
- ld [wAudioFadeOutControl], a
- call StopAllMusic
-.audioFadeLoop
- ld a, [wAudioFadeOutControl]
- and a
- jr nz, .audioFadeLoop
- jp Init
-
-.doClearSaveDialogue
- jpba DoClearSaveDialogue
-
-
-TitleScreenCopyTileMapToVRAM:
- ld [H_AUTOBGTRANSFERDEST + 1], a
- jp Delay3
-
-LoadCopyrightAndTextBoxTiles:
- xor a
- ld [hWY], a
- call ClearScreen
- call LoadTextBoxTilePatterns
-
-LoadCopyrightTiles:
- ld de, NintendoCopyrightLogoGraphics
- ld hl, vChars2 + $600
- lb bc, BANK(NintendoCopyrightLogoGraphics), (TextBoxGraphics + $10 - NintendoCopyrightLogoGraphics) / $10 ; bug: overflows into text box graphics and copies the "A" tile
- call CopyVideoData
- coord hl, 2, 7
- ld de, CopyrightTextString
- jp PlaceString
-
-CopyrightTextString:
- db $60,$61,$62,$63,$61,$62,$7c,$7f,$65,$66,$67,$68,$69,$6a ; ©1995-1999 Nintendo
- next $60,$61,$62,$63,$61,$62,$7c,$7f,$6b,$6c,$6d,$6e,$6f,$70,$71,$72 ; ©1995-1999 Creatures inc.
- next $60,$61,$62,$63,$61,$62,$7c,$7f,$73,$74,$75,$76,$77,$78,$79,$7a,$7b ; ©1995-1999 GAME FREAK inc.
- db "@"
-
-TitleScreen_PlayPikachuPCM:
- callab PlayPikachuSoundClip
- ret
-
-DoTitleScreenFunction:
- call .CheckTimer
- ld a, [wTitleScreenScene]
- ld e, a
- ld d, 0
- ld hl, .Jumptable
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-
-.Jumptable:
- dw .Nop
- dw .BlinkHalf
- dw .BlinkWait
- dw .BlinkWait
- dw .BlinkClosed
- dw .BlinkWait
- dw .BlinkWait
- dw .BlinkHalf
- dw .BlinkWait
- dw .BlinkWait
- dw .BlinkOpen
- dw .GoBackToStart
-
-.GoBackToStart:
- xor a
- ld [wTitleScreenScene], a
-.Nop
- ret
-
-.BlinkOpen:
- ld e, 0
- jr .LoadBlinkFrame
-
-.BlinkHalf:
- ld e, 4
- jr .LoadBlinkFrame
-
-.BlinkClosed:
- ld e, 8
-.LoadBlinkFrame:
- ld hl, wOAMBuffer + 2
- ld c, 8
-.loop
- ld a, [hl]
- and $f3
- or e
- ld [hli], a
- inc hl
- inc hl
- inc hl
- dec c
- jr nz, .loop
-.BlinkWait:
- ld hl, wTitleScreenScene
- inc [hl]
- ret
-
-.CheckTimer:
- ld hl, wTitleScreenTimer
- ld a, [hl]
- inc [hl]
- and a
- jr z, .restart
- cp $80
- jr z, .restart
- cp $90
- ret nz
-.restart
- ld a, $1
- ld [wTitleScreenScene], a
- ret
-
-; copy text of fixed length NAME_LENGTH (like player name, rival name, mon names, ...)
-CopyFixedLengthText:
- ld bc, NAME_LENGTH
- jp CopyData
-
-NintenText: db "NINTEN@"
-SonyText: db "SONY@"
-
-IncrementResetCounter:
- ld hl, wTitleScreenScene + 2
- ld e, [hl]
- inc hl
- ld d, [hl]
- inc de
- ld a, d
- cp $c
- jr z, .doReset
- ld [hl], d
- dec hl
- ld [hl], e
- and a
- ret
-
-.doReset
- scf
- ret
-
-FillSpriteBuffer0WithAA:
- xor a
- call SwitchSRAMBankAndLatchClockData
- ld hl, sSpriteBuffer0
- ld bc, $20
- ld a, $aa
- call FillMemory
- call PrepareRTCDataAndDisableSRAM
- ret
diff --git a/engine/titlescreen2.asm b/engine/titlescreen2.asm
deleted file mode 100755
index 8b4bc4de..00000000
--- a/engine/titlescreen2.asm
+++ /dev/null
@@ -1,122 +0,0 @@
-; Leftover of Red/Blue. Seemingly unused
-
-TitleScroll_WaitBall:
-; Wait around for the TitleBall animation to play out.
-; hi: speed
-; lo: duration
- db $05, $05, 0
-
-TitleScroll_In:
-; Scroll a TitleMon in from the right.
-; hi: speed
-; lo: duration
- db $a2, $94, $84, $63, $52, $31, $11, 0
-
-TitleScroll_Out:
-; Scroll a TitleMon out to the left.
-; hi: speed
-; lo: duration
- db $12, $22, $32, $42, $52, $62, $83, $93, 0
-
-TitleScroll:
- ld a, d
-
- ld bc, TitleScroll_In
- ld d, $88
- ld e, 0 ; don't animate titleball
-
- and a
- jr nz, .ok
-
- ld bc, TitleScroll_Out
- ld d, $00
- ld e, 0 ; don't animate titleball
-.ok
-
-_TitleScroll:
- ld a, [bc]
- and a
- ret z
-
- inc bc
- push bc
-
- ld b, a
- and $f
- ld c, a
- ld a, b
- and $f0
- swap a
- ld b, a
-
-.loop
- ld h, d
- ld l, $48
- call .ScrollBetween
-
- ld h, $00
- ld l, $88
- call .ScrollBetween
-
- ld a, d
- add b
- ld d, a
-
- call GetTitleBallY
- dec c
- jr nz, .loop
-
- pop bc
- jr _TitleScroll
-
-.ScrollBetween:
-.wait
- ld a, [rLY] ; rLY
- cp l
- jr nz, .wait
-
- ld a, h
- ld [rSCX], a
-
-.wait2
- ld a, [rLY] ; rLY
- cp h
- jr z, .wait2
- ret
-
-TitleBallYTable:
-; OBJ y-positions for the Poke Ball held by Red in the title screen.
-; This is really two 0-terminated lists. Initiated with an index of 1.
- db 0, $71, $6f, $6e, $6d, $6c, $6d, $6e, $6f, $71, $74, 0
-
-TitleScreenAnimateBallIfStarterOut:
-; Animate the TitleBall if a starter just got scrolled out.
- ld a, [wTitleScreenScene]
- cp STARTER1
- jr z, .ok
- cp STARTER2
- jr z, .ok
- cp STARTER3
- ret nz
-.ok
- ld e, 1 ; animate titleball
- ld bc, TitleScroll_WaitBall
- ld d, 0
- jp _TitleScroll
-
-GetTitleBallY:
-; Get position e from TitleBallYTable
- push de
- push hl
- xor a
- ld d, a
- ld hl, TitleBallYTable
- add hl, de
- ld a, [hl]
- pop hl
- pop de
- and a
- ret z
- ld [wOAMBuffer + $28], a
- inc e
- ret
diff --git a/engine/town_map.asm b/engine/town_map.asm
deleted file mode 100755
index 7d32b5fe..00000000
--- a/engine/town_map.asm
+++ /dev/null
@@ -1,628 +0,0 @@
-DisplayTownMap:
- call LoadTownMap
- ld hl, wUpdateSpritesEnabled
- ld a, [hl]
- push af
- ld [hl], $ff
- push hl
- ld a, $1
- ld [hJoy7], a
- ld a, [wCurMap]
- push af
- ld b, $0
- call DrawPlayerOrBirdSprite ; player sprite
- coord hl, 1, 0
- ld de, wcd6d
- call PlaceString
- ld hl, wOAMBuffer
- ld de, wTileMapBackup
- ld bc, $10
- call CopyData
- ld hl, vSprites + $40
- ld de, TownMapCursor
- lb bc, BANK(TownMapCursor), (TownMapCursorEnd - TownMapCursor) / $8
- call CopyVideoDataDouble
- xor a
- ld [wWhichTownMapLocation], a
- pop af
- jr .enterLoop
-
-.townMapLoop
- coord hl, 0, 0
- lb bc, 1, 20
- call ClearScreenArea
- ld hl, TownMapOrder
- ld a, [wWhichTownMapLocation]
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [hl]
-.enterLoop
- ld de, wTownMapCoords
- call LoadTownMapEntry
- ld a, [de]
- push hl
- call TownMapCoordsToOAMCoords
- ld a, $4
- ld [wOAMBaseTile], a
- ld hl, wOAMBuffer + $10
- call WriteTownMapSpriteOAM ; town map cursor sprite
- pop hl
- ld de, wcd6d
-.copyMapName
- ld a, [hli]
- ld [de], a
- inc de
- cp $50
- jr nz, .copyMapName
- coord hl, 1, 0
- ld de, wcd6d
- call PlaceString
- ld hl, wOAMBuffer + $10
- ld de, wTileMapBackup + 16
- ld bc, $10
- call CopyData
-.inputLoop
- call TownMapSpriteBlinkingAnimation
- call JoypadLowSensitivity
- ld a, [hJoy5]
- ld b, a
- and A_BUTTON | B_BUTTON | D_UP | D_DOWN
- jr z, .inputLoop
- ld a, SFX_TINK
- call PlaySound
- bit 6, b
- jr nz, .pressedUp
- bit 7, b
- jr nz, .pressedDown
- xor a
- ld [wTownMapSpriteBlinkingEnabled], a
- ld [hJoy7], a
- ld [wAnimCounter], a
- call ExitTownMap
- pop hl
- pop af
- ld [hl], a
- ret
-.pressedUp
- ld a, [wWhichTownMapLocation]
- inc a
- cp TownMapOrderEnd - TownMapOrder ; number of list items + 1
- jr nz, .noOverflow
- xor a
-.noOverflow
- ld [wWhichTownMapLocation], a
- jp .townMapLoop
-.pressedDown
- ld a, [wWhichTownMapLocation]
- dec a
- cp -1
- jr nz, .noUnderflow
- ld a, TownMapOrderEnd - TownMapOrder - 1 ; number of list items
-.noUnderflow
- ld [wWhichTownMapLocation], a
- jp .townMapLoop
-
-.asm_70f87
- ld a,[hJoy5]
- and D_DOWN | D_UP
- ret z
- callab PlayPikachuSoundClip
- ret
-
-INCLUDE "data/town_map_order.asm"
-
-TownMapCursor:
- INCBIN "gfx/town_map_cursor.1bpp"
-TownMapCursorEnd:
-
-LoadTownMap_Nest:
- call LoadTownMap
- ld hl, wUpdateSpritesEnabled
- ld a, [hl]
- push af
- ld [hl], $ff
- push hl
- call DisplayWildLocations
- call GetMonName
- coord hl, 1, 0
- call PlaceString
- ld h, b
- ld l, c
- ld de, MonsNestText
- call PlaceString
- call WaitForTextScrollButtonPress
- call ExitTownMap
- pop hl
- pop af
- ld [hl], a
- ret
-
-MonsNestText:
- db "'s NEST@"
-
-LoadTownMap_Fly:
- call ClearSprites
- call LoadTownMap
- ld a, $1
- ld [hJoy7], a
- call LoadPlayerSpriteGraphics
- call LoadFontTilePatterns
- ld de, BirdSprite
- ld b, BANK(BirdSprite)
- ld c, $c
- ld hl, vSprites + $40
- call CopyVideoData
- ld de, TownMapUpArrow
- ld hl, vChars1 + $6d0
- lb bc, BANK(TownMapUpArrow), (TownMapUpArrowEnd - TownMapUpArrow) / $8
- call CopyVideoDataDouble
- call BuildFlyLocationsList
- ld hl, wUpdateSpritesEnabled
- ld a, [hl]
- push af
- ld [hl], $ff
- push hl
- coord hl, 0, 0
- ld de, ToText
- call PlaceString
- ld a, [wCurMap]
- ld b, $0
- call DrawPlayerOrBirdSprite
- ld hl, wFlyLocationsList
- coord de, 18, 0
-.townMapFlyLoop
- ld a, " "
- ld [de], a
- push hl
- push hl
- coord hl, 3, 0
- lb bc, 1, 15
- call ClearScreenArea
- pop hl
- ld a, [hl]
- ld b, $4
- call DrawPlayerOrBirdSprite ; draw bird sprite
- coord hl, 3, 0
- ld de, wcd6d
- call PlaceString
- ld c, 15
- call DelayFrames
- coord hl, 18, 0
- ld [hl], "▶"
- coord hl, 19, 0
- ld [hl], "▼"
- pop hl
-.inputLoop
- push hl
- call DelayFrame
- call JoypadLowSensitivity
- ld a, [hJoy5]
- ld b, a
- pop hl
- and A_BUTTON | B_BUTTON | D_UP | D_DOWN
- jr z, .inputLoop
- bit 0, b
- jr nz, .pressedA
- ld a, SFX_TINK
- call PlaySound
- bit 6, b
- jr nz, .pressedUp
- bit 7, b
- jr nz, .pressedDown
- jr .pressedB
-.pressedA
- ld a, SFX_HEAL_AILMENT
- call PlaySound
- ld a, [hl]
- ld [wDestinationMap], a
- ld hl, wd732
- set 3, [hl]
- inc hl
- set 7, [hl]
-.pressedB
- xor a
- ld [wTownMapSpriteBlinkingEnabled], a
- ld [hJoy7], a
- call GBPalWhiteOutWithDelay3
- pop hl
- pop af
- ld [hl], a
- ret
-.pressedUp
- coord de, 18, 0
- inc hl
- ld a, [hl]
- cp $ff
- jr z, .wrapToStartOfList
- cp $fe
- jr z, .pressedUp ; skip past unvisited towns
- jp .townMapFlyLoop
-.wrapToStartOfList
- ld hl, wFlyLocationsList
- jp .townMapFlyLoop
-.pressedDown
- coord de, 19, 0
- dec hl
- ld a, [hl]
- cp $ff
- jr z, .wrapToEndOfList
- cp $fe
- jr z, .pressedDown ; skip past unvisited towns
- jp .townMapFlyLoop
-.wrapToEndOfList
- ld hl, wFlyLocationsList + 11
- jr .pressedDown
-
-ToText:
- db "To@"
-
-BuildFlyLocationsList:
- ld hl, wFlyLocationsList - 1
- ld [hl], $ff
- inc hl
- ld a, [wTownVisitedFlag]
- ld e, a
- ld a, [wTownVisitedFlag + 1]
- ld d, a
- ld bc, SAFFRON_CITY + 1
-.loop
- srl d
- rr e
- ld a, $fe ; store $fe if the town hasn't been visited
- jr nc, .notVisited
- ld a, b ; store the map number of the town if it has been visited
-.notVisited
- ld [hl], a
- inc hl
- inc b
- dec c
- jr nz, .loop
- ld [hl], $ff
- ret
-
-TownMapUpArrow:
- INCBIN "gfx/up_arrow.1bpp"
-TownMapUpArrowEnd:
-
-LoadTownMap:
- call GBPalWhiteOutWithDelay3
- call ClearScreen
- call UpdateSprites
- coord hl, 0, 0
- lb bc, $12, $12
- call TextBoxBorder
- call DisableLCD
- ld hl, WorldMapTileGraphics
- ld de, vChars2 + $600
- ld bc, WorldMapTileGraphicsEnd - WorldMapTileGraphics
- ld a, BANK(WorldMapTileGraphics)
- call FarCopyData
- ld hl, MonNestIcon
- ld de, vSprites + $40
- ld bc, MonNestIconEnd - MonNestIcon
- ld a, BANK(MonNestIcon)
- call FarCopyDataDouble
- coord hl, 0, 0
- ld de, CompressedMap
-.nextTile
- ld a, [de]
- and a
- jr z, .done
- ld b, a
- and $f
- ld c, a
- ld a, b
- swap a
- and $f
- add $60
-.writeRunLoop
- ld [hli], a
- dec c
- jr nz, .writeRunLoop
- inc de
- jr .nextTile
-.done
- call EnableLCD
- ld b, SET_PAL_TOWN_MAP
- call RunPaletteCommand
- call Delay3
- call GBPalNormal
- xor a
- ld [wAnimCounter], a
- inc a
- ld [wTownMapSpriteBlinkingEnabled], a
- ret
-
-CompressedMap:
-; you can decompress this file with the redrle program in the extras/ dir
- INCBIN "gfx/town_map.rle"
-
-ExitTownMap:
-; clear town map graphics data and load usual graphics data
- xor a
- ld [wTownMapSpriteBlinkingEnabled], a
- call GBPalWhiteOut
- call ClearScreen
- call ClearSprites
- call LoadPlayerSpriteGraphics
- call LoadFontTilePatterns
- call UpdateSprites
- jp RunDefaultPaletteCommand
-
-DrawPlayerOrBirdSprite:
-; a = map number
-; b = OAM base tile
- push af
- ld a, b
- ld [wOAMBaseTile], a
- pop af
- ld de, wTownMapCoords
- call LoadTownMapEntry
- ld a, [de]
- push hl
- call TownMapCoordsToOAMCoords
- call WritePlayerOrBirdSpriteOAM
- pop hl
- ld de, wcd6d
-.loop
- ld a, [hli]
- ld [de], a
- inc de
- cp "@"
- jr nz, .loop
- ld hl, wOAMBuffer
- ld de, wTileMapBackup
- ld bc, $a0
- jp CopyData
-
-DisplayWildLocations:
- callba FindWildLocationsOfMon
- call ZeroOutDuplicatesInList
- ld hl, wOAMBuffer
- ld de, wTownMapCoords
-.loop
- ld a, [de]
- cp $ff
- jr z, .exitLoop
- and a
- jr z, .nextEntry
- push hl
- call LoadTownMapEntry
- pop hl
- ld a, [de]
- cp $19 ; Cerulean Cave's coordinates
- jr z, .nextEntry ; skip Cerulean Cave
- call TownMapCoordsToOAMCoords
- ld a, $4 ; nest icon tile no.
- ld [hli], a
- xor a
- ld [hli], a
-.nextEntry
- inc de
- jr .loop
-.exitLoop
- ld a, l
- and a ; were any OAM entries written?
- jr nz, .drawPlayerSprite
-; if no OAM entries were written, print area unknown text
- coord hl, 1, 7
- lb bc, 2, 15
- call TextBoxBorder
- coord hl, 2, 9
- ld de, AreaUnknownText
- call PlaceString
- jr .done
-.drawPlayerSprite
- ld a, [wCurMap]
- ld b, $0
- call DrawPlayerOrBirdSprite
-.done
- ld hl, wOAMBuffer
- ld de, wTileMapBackup
- ld bc, $a0
- jp CopyData
-
-AreaUnknownText:
- db " AREA UNKNOWN@"
-
-TownMapCoordsToOAMCoords:
-; in: lower nybble of a = x, upper nybble of a = y
-; out: b and [hl] = (y * 8) + 24, c and [hl+1] = (x * 8) + 24
- push af
- and $f0
- srl a
- add 24
- ld b, a
- ld [hli], a
- pop af
- and $f
- swap a
- srl a
- add 24
- ld c, a
- ld [hli], a
- ret
-
-WritePlayerOrBirdSpriteOAM:
- ld a, [wOAMBaseTile]
- and a
- ld hl, wOAMBuffer + $90 ; for player sprite
- jr z, WriteTownMapSpriteOAM
- ld hl, wOAMBuffer + $80 ; for bird sprite
-
-WriteTownMapSpriteOAM:
- 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
-
- ld b, h
- ld c, l
- pop hl
-
-WriteAsymmetricMonPartySpriteOAM:
-; Writes 4 OAM blocks for a helix mon party sprite, since it does not have
-; a vertical line of symmetry.
- lb de, 2, 2
-.loop
- push de
- push bc
-.innerLoop
- ld a, b
- ld [hli], a
- ld a, c
- ld [hli], a
- ld a, [wOAMBaseTile]
- ld [hli], a
- inc a
- ld [wOAMBaseTile], a
- xor a
- ld [hli], a
- inc d
- ld a, 8
- add c
- ld c, a
- dec e
- jr nz, .innerLoop
- pop bc
- pop de
- ld a, 8
- add b
- ld b, a
- dec d
- jr nz, .loop
- ret
-
-WriteSymmetricMonPartySpriteOAM:
-; Writes 4 OAM blocks for a mon party sprite other than a helix. All the
-; sprites other than the helix one have a vertical line of symmetry which allows
-; the X-flip OAM bit to be used so that only 2 rather than 4 tile patterns are
-; needed.
- xor a
- ld [wSymmetricSpriteOAMAttributes], a
- lb de, 2, 2
-.loop
- push de
- push bc
-.innerLoop
- ld a, b
- ld [hli], a ; Y
- ld a, c
- ld [hli], a ; X
- ld a, [wOAMBaseTile]
- ld [hli], a ; tile
- ld a, [wSymmetricSpriteOAMAttributes]
- ld [hli], a ; attributes
- xor (1 << OAM_X_FLIP)
- ld [wSymmetricSpriteOAMAttributes], a
- inc d
- ld a, 8
- add c
- ld c, a
- dec e
- jr nz, .innerLoop
- pop bc
- pop de
- push hl
- ld hl, wOAMBaseTile
- inc [hl]
- inc [hl]
- pop hl
- ld a, 8
- add b
- ld b, a
- dec d
- jr nz, .loop
- ret
-
-ZeroOutDuplicatesInList:
-; replace duplicate bytes in the list of wild pokemon locations with 0
- ld de, wBuffer
-.loop
- ld a, [de]
- inc de
- cp $ff
- ret z
- ld c, a
- ld l, e
- ld h, d
-.zeroDuplicatesLoop
- ld a, [hl]
- cp $ff
- jr z, .loop
- cp c
- jr nz, .skipZeroing
- xor a
- ld [hl], a
-.skipZeroing
- inc hl
- jr .zeroDuplicatesLoop
-
-LoadTownMapEntry:
-; in: a = map number
-; out: lower nybble of [de] = x, upper nybble of [de] = y, hl = address of name
- cp REDS_HOUSE_1F
- jr c, .external
- ld bc, 4
- ld hl, InternalMapEntries
-.loop
- cp [hl]
- jr c, .foundEntry
- add hl, bc
- jr .loop
-.foundEntry
- inc hl
- jr .readEntry
-.external
- ld hl, ExternalMapEntries
- ld c, a
- ld b, 0
- add hl, bc
- add hl, bc
- add hl, bc
-.readEntry
- ld a, [hli]
- ld [de], a
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ret
-
-INCLUDE "data/town_map_entries.asm"
-
-INCLUDE "text/map_names.asm"
-
-MonNestIcon:
- INCBIN "gfx/mon_nest_icon.1bpp"
-MonNestIconEnd:
-
-TownMapSpriteBlinkingAnimation:
- ld a, [wAnimCounter]
- inc a
- cp 25
- jr z, .hideSprites
- cp 50
- jr nz, .done
-; show sprites when the counter reaches 50
- ld hl, wTileMapBackup
- ld de, wOAMBuffer
- ld bc, $90
- call CopyData
- xor a
- jr .done
-.hideSprites
- ld hl, wOAMBuffer
- ld b, $24
- ld de, $4
-.hideSpritesLoop
- ld [hl], $a0
- add hl, de
- dec b
- jr nz, .hideSpritesLoop
- ld a, 25
-.done
- ld [wAnimCounter], a
- jp DelayFrame
diff --git a/engine/trade.asm b/engine/trade.asm
deleted file mode 100755
index e4bc0768..00000000
--- a/engine/trade.asm
+++ /dev/null
@@ -1,857 +0,0 @@
-InternalClockTradeAnim:
-; Do the trading animation with the player's gameboy on the left.
-; In-game trades and internally clocked link cable trades use this.
- ld a, [wTradedPlayerMonSpecies]
- ld [wLeftGBMonSpecies], a
- ld a, [wTradedEnemyMonSpecies]
- ld [wRightGBMonSpecies], a
- ld de, InternalClockTradeFuncSequence
- jr TradeAnimCommon
-
-ExternalClockTradeAnim:
-; Do the trading animation with the player's gameboy on the right.
-; Externally clocked link cable trades use this.
- ld a, [wTradedEnemyMonSpecies]
- ld [wLeftGBMonSpecies], a
- ld a, [wTradedPlayerMonSpecies]
- ld [wRightGBMonSpecies], a
- ld de, ExternalClockTradeFuncSequence
-
-TradeAnimCommon:
- ld a, [wOptions]
- push af
- and %110000 ; preserve speaker options
- ld [wOptions], a
- ld a, [hSCY]
- push af
- ld a, [hSCX]
- push af
- xor a
- ld [hSCY], a
- ld [hSCX], a
- push de
-.loop
- pop de
- ld a, [de]
- cp $ff
- jr z, .done
- inc de
- push de
- ld hl, TradeFuncPointerTable
- add a
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, .loop
- push de
- jp hl ; call trade func, which will return to the top of the loop
-.done
- pop af
- ld [hSCX], a
- pop af
- ld [hSCY], a
- pop af
- ld [wOptions], a
- ret
-
-addtradefunc: MACRO
-\1TradeFunc::
- dw \1
- ENDM
-
-tradefunc: MACRO
- db (\1TradeFunc - TradeFuncPointerTable) / 2
- ENDM
-
-; The functions in the sequences below are executed in order by TradeFuncCommon.
-; They are from opposite perspectives. The external clock one makes use of
-; Trade_SwapNames to swap the player and enemy names for some functions.
-
-InternalClockTradeFuncSequence:
- tradefunc LoadTradingGFXAndMonNames
- tradefunc Trade_ShowPlayerMon
- tradefunc Trade_DrawOpenEndOfLinkCable
- tradefunc Trade_AnimateBallEnteringLinkCable
- tradefunc Trade_AnimLeftToRight
- tradefunc Trade_Delay100
- tradefunc Trade_ShowClearedWindow
- tradefunc PrintTradeWentToText
- tradefunc PrintTradeForSendsText
- tradefunc PrintTradeFarewellText
- tradefunc Trade_AnimRightToLeft
- tradefunc Trade_ShowClearedWindow
- tradefunc Trade_DrawOpenEndOfLinkCable
- tradefunc Trade_ShowEnemyMon
- tradefunc Trade_Delay100
- tradefunc Trade_Cleanup
- db $FF
-
-ExternalClockTradeFuncSequence:
- tradefunc LoadTradingGFXAndMonNames
- tradefunc Trade_ShowClearedWindow
- tradefunc PrintTradeWillTradeText
- tradefunc PrintTradeFarewellText
- tradefunc Trade_SwapNames
- tradefunc Trade_AnimLeftToRight
- tradefunc Trade_SwapNames
- tradefunc Trade_ShowClearedWindow
- tradefunc Trade_DrawOpenEndOfLinkCable
- tradefunc Trade_ShowEnemyMon
- tradefunc Trade_SlideTextBoxOffScreen
- tradefunc Trade_ShowPlayerMon
- tradefunc Trade_DrawOpenEndOfLinkCable
- tradefunc Trade_AnimateBallEnteringLinkCable
- tradefunc Trade_SwapNames
- tradefunc Trade_AnimRightToLeft
- tradefunc Trade_SwapNames
- tradefunc Trade_Delay100
- tradefunc Trade_ShowClearedWindow
- tradefunc PrintTradeWentToText
- tradefunc Trade_Cleanup
- db $FF
-
-TradeFuncPointerTable:
- addtradefunc LoadTradingGFXAndMonNames
- addtradefunc Trade_ShowPlayerMon
- addtradefunc Trade_DrawOpenEndOfLinkCable
- addtradefunc Trade_AnimateBallEnteringLinkCable
- addtradefunc Trade_ShowEnemyMon
- addtradefunc Trade_AnimLeftToRight
- addtradefunc Trade_AnimRightToLeft
- addtradefunc Trade_Delay100
- addtradefunc Trade_ShowClearedWindow
- addtradefunc PrintTradeWentToText
- addtradefunc PrintTradeForSendsText
- addtradefunc PrintTradeFarewellText
- addtradefunc PrintTradeTakeCareText
- addtradefunc PrintTradeWillTradeText
- addtradefunc Trade_Cleanup
- addtradefunc Trade_SlideTextBoxOffScreen
- addtradefunc Trade_SwapNames
-
-Trade_Delay100:
- ld c, 100
- jp DelayFrames
-
-Trade_CopyTileMapToVRAM:
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- call Delay3
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ret
-
-Trade_Delay80:
- ld c, 80
- jp DelayFrames
-
-Trade_ClearTileMap:
- coord hl, 0, 0
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- ld a, " "
- jp FillMemory
-
-LoadTradingGFXAndMonNames:
- call Trade_ClearTileMap
- call DisableLCD
- ld hl, TradingAnimationGraphics
- ld de, vChars2 + $310
- ld bc, TradingAnimationGraphicsEnd - TradingAnimationGraphics
- ld a, BANK(TradingAnimationGraphics)
- call FarCopyData
- ld hl, TradingAnimationGraphics2
- ld de, vSprites + $7c0
- ld bc, TradingAnimationGraphics2End - TradingAnimationGraphics2
- ld a, BANK(TradingAnimationGraphics2)
- call FarCopyData
- ld hl, vBGMap0
- ld bc, $800
- ld a, " "
- call FillMemory
- call ClearSprites
- ld a, $ff
- ld [wUpdateSpritesEnabled], a
- ld hl, wd730
- set 6, [hl] ; turn on instant text printing
- ld a, [wOnSGB]
- and a
- ld a, $e4 ; non-SGB OBP0
- jr z, .next
- ld a, $f0 ; SGB OBP0
-.next
- ld [rOBP0], a
- call UpdateGBCPal_OBP0
- call EnableLCD
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld a, [wTradedPlayerMonSpecies]
- ld [wd11e], a
- call GetMonName
- ld hl, wcd6d
- ld de, wcf4b
- ld bc, NAME_LENGTH
- call CopyData
- ld a, [wTradedEnemyMonSpecies]
- ld [wd11e], a
- jp GetMonName
-
-Trade_LoadMonPartySpriteGfx:
- ld a, %11010000
- ld [rOBP1], a
- call UpdateGBCPal_OBP1
- jpba LoadMonPartySpriteGfx
-
-Trade_SwapNames:
- ld hl, wPlayerName
- ld de, wBuffer
- ld bc, NAME_LENGTH
- call CopyData
- ld hl, wLinkEnemyTrainerName
- ld de, wPlayerName
- ld bc, NAME_LENGTH
- call CopyData
- ld hl, wBuffer
- ld de, wLinkEnemyTrainerName
- ld bc, NAME_LENGTH
- jp CopyData
-
-Trade_Cleanup:
- xor a
- call LoadGBPal
- ld hl, wd730
- res 6, [hl] ; turn off instant text printing
- ret
-
-Trade_ShowPlayerMon:
- ld a, %10101011
- ld [rLCDC], a
- ld a, $50
- ld [hWY], a
- ld a, $86
- ld [rWX], a
- ld [hSCX], a
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- coord hl, 4, 0
- lb bc, 6, 10
- call TextBoxBorder
- call Trade_PrintPlayerMonInfoText
- ld b, vBGMap0 / $100
- call CopyScreenTileBufferToVRAM
- call ClearScreen
- ld a, [wTradedPlayerMonSpecies]
- call Trade_LoadMonSprite
- ld a, $7e
-.slideScreenLoop
- push af
- call DelayFrame
- pop af
- ld [rWX], a
- ld [hSCX], a
- dec a
- dec a
- and a
- jr nz, .slideScreenLoop
- call Trade_Delay80
- ld a, TRADE_BALL_POOF_ANIM
- call Trade_ShowAnimation
- ld a, TRADE_BALL_DROP_ANIM
- call Trade_ShowAnimation ; clears mon pic
- ld a, [wTradedPlayerMonSpecies]
- call PlayCry
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ret
-
-Trade_DrawOpenEndOfLinkCable:
- call Trade_ClearTileMap
- ld b, vBGMap0 / $100
- call CopyScreenTileBufferToVRAM
- 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.
- ld hl, vBGMap1 + $8c
- call Trade_CopyCableTilesOffScreen
-
- ld a, $a0
- ld [hSCX], a
- call DelayFrame
- ld a, %10001011
- ld [rLCDC], a
- coord hl, 6, 2
- ld b, $7 ; open end of link cable tile ID list index
- call CopyTileIDsFromList_ZeroBaseTileID
- call Trade_CopyTileMapToVRAM
- ld a, SFX_HEAL_HP
- call PlaySound
- ld c, 20
-.loop
- ld a, [hSCX]
- add 4
- ld [hSCX], a
- dec c
- jr nz, .loop
- ret
-
-Trade_AnimateBallEnteringLinkCable:
- ld a, TRADE_BALL_SHAKE_ANIM
- call Trade_ShowAnimation
- ld c, 10
- call DelayFrames
- ld a, %11100100
- ld [rOBP0], a
- call UpdateGBCPal_OBP0
- xor a
- ld [wLinkCableAnimBulgeToggle], a
- lb bc, $20, $60
-.moveBallInsideLinkCableLoop
- push bc
- xor a
- ld de, Trade_BallInsideLinkCableOAM
- call WriteOAMBlock
- ld a, [wLinkCableAnimBulgeToggle]
- xor $1
- ld [wLinkCableAnimBulgeToggle], a
- add $7e
- ld hl, wOAMBuffer + $02
- ld de, 4
- ld c, e
-.cycleLinkCableBulgeTile
- ld [hl], a
- add hl, de
- dec c
- jr nz, .cycleLinkCableBulgeTile
- call Delay3
- pop bc
- ld a, c
- add $4
- ld c, a
- cp $a0
- jr nc, .ballSpriteReachedEdgeOfScreen
- ld a, SFX_TINK
- call PlaySound
- jr .moveBallInsideLinkCableLoop
-.ballSpriteReachedEdgeOfScreen
- call ClearSprites
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- call ClearScreen
- ld b, $98
- call CopyScreenTileBufferToVRAM
- call Delay3
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ret
-
-Trade_BallInsideLinkCableOAM:
- db $7E,$00,$7E,$20
- db $7E,$40,$7E,$60
-
-Trade_ShowEnemyMon:
- ld a, TRADE_BALL_TILT_ANIM
- call Trade_ShowAnimation
- call Trade_ShowClearedWindow
- coord hl, 4, 10
- lb bc, 6, 10
- call TextBoxBorder
- call Trade_PrintEnemyMonInfoText
- call Trade_CopyTileMapToVRAM
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- ld a, [wTradedEnemyMonSpecies]
- call Trade_LoadMonSprite
- ld a, TRADE_BALL_POOF_ANIM
- call Trade_ShowAnimation
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- ld a, [wTradedEnemyMonSpecies]
- call PlayCry
- call Trade_Delay100
- coord hl, 4, 10
- lb bc, 8, 12
- call ClearScreenArea
- jp PrintTradeTakeCareText
-
-Trade_AnimLeftToRight:
-; Animates the mon moving from the left GB to the right one.
- call Trade_InitGameboyTransferGfx
- ld a, $1
- ld [wTradedMonMovingRight], a
- ld a, %11100100
- ld [rOBP0], a
- call UpdateGBCPal_OBP0
- ld a, $54
- ld [wBaseCoordX], a
- ld a, $1c
- ld [wBaseCoordY], a
- ld a, [wLeftGBMonSpecies]
- ld [wMonPartySpriteSpecies], a
- call Trade_WriteCircledMonOAM
- call Trade_DrawLeftGameboy
- call Trade_CopyTileMapToVRAM
- call Trade_DrawCableAcrossScreen
- ld hl, vBGMap1 + $8c
- call Trade_CopyCableTilesOffScreen
- ld b, $6
- call Trade_AnimMonMoveHorizontal
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- call Trade_DrawCableAcrossScreen
- ld b, $4
- call Trade_AnimMonMoveHorizontal
- call Trade_DrawRightGameboy
- ld b, $6
- call Trade_AnimMonMoveHorizontal
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- call Trade_AnimMonMoveVertical
- jp ClearSprites
-
-Trade_AnimRightToLeft:
-; Animates the mon moving from the right GB to the left one.
- call Trade_InitGameboyTransferGfx
- xor a
- ld [wTradedMonMovingRight], a
- ld a, $64
- ld [wBaseCoordX], a
- ld a, $44
- ld [wBaseCoordY], a
- ld a, [wRightGBMonSpecies]
- ld [wMonPartySpriteSpecies], a
- call Trade_WriteCircledMonOAM
- call Trade_DrawRightGameboy
- call Trade_CopyTileMapToVRAM
- call Trade_DrawCableAcrossScreen
- ld hl, vBGMap1 + $94
- call Trade_CopyCableTilesOffScreen
- call Trade_AnimMonMoveVertical
- ld b, $6
- call Trade_AnimMonMoveHorizontal
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- call Trade_DrawCableAcrossScreen
- ld b, $4
- call Trade_AnimMonMoveHorizontal
- call Trade_DrawLeftGameboy
- ld b, $6
- call Trade_AnimMonMoveHorizontal
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- jp ClearSprites
-
-Trade_InitGameboyTransferGfx:
-; Initialises the graphics for showing a mon moving between gameboys.
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- call ClearScreen
- ld b, SET_PAL_GENERIC
- call RunPaletteCommand
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- call Trade_LoadMonPartySpriteGfx
- call DelayFrame
- ld a, %10101011
- ld [rLCDC], a
- xor a
- ld [hSCX], a
- ld a, $90
- ld [hWY], a
- ret
-
-Trade_DrawLeftGameboy:
- call Trade_ClearTileMap
-
-; draw link cable
- coord hl, 11, 4
- ld a, $5d
- ld [hli], a
- ld a, $5e
- ld c, 8
-.loop
- ld [hli], a
- dec c
- jr nz, .loop
-
-; draw gameboy pic
- coord hl, 5, 3
- ld b, $6
- call CopyTileIDsFromList_ZeroBaseTileID
-
-; draw text box with player name below gameboy pic
- coord hl, 4, 12
- lb bc, 2, 7
- call TextBoxBorder
- coord hl, 5, 14
- ld de, wPlayerName
- call PlaceString
-
- jp DelayFrame
-
-Trade_DrawRightGameboy:
- call Trade_ClearTileMap
-
-; draw horizontal segment of link cable
- coord hl, 0, 4
- ld a, $5e
- ld c, $e
-.loop
- ld [hli], a
- dec c
- jr nz, .loop
-
-; draw vertical segment of link cable
- ld a, $5f
- ld [hl], a
- ld de, SCREEN_WIDTH
- add hl, de
- ld a, $61
- ld [hl], a
- add hl, de
- ld [hl], a
- add hl, de
- ld [hl], a
- add hl, de
- ld [hl], a
- add hl, de
- ld a, $60
- ld [hld], a
- ld a, $5d
- ld [hl], a
-
-; draw gameboy pic
- coord hl, 7, 8
- ld b, $6
- call CopyTileIDsFromList_ZeroBaseTileID
-
-; draw text box with enemy name above link cable
- coord hl, 6, 0
- lb bc, 2, 7
- call TextBoxBorder
- coord hl, 7, 2
- ld de, wLinkEnemyTrainerName
- call PlaceString
-
- jp DelayFrame
-
-Trade_DrawCableAcrossScreen:
-; Draws the link cable across the screen.
- call Trade_ClearTileMap
- coord hl, 0, 4
- ld a, $5e
- ld c, SCREEN_WIDTH
-.loop
- ld [hli], a
- dec c
- jr nz, .loop
- ret
-
-Trade_CopyCableTilesOffScreen:
-; This is used to copy the link cable tiles off screen so that the cable
-; continues when the screen is scrolled.
- push hl
- coord hl, 0, 4
- call CopyToRedrawRowOrColumnSrcTiles
- pop hl
- ld a, h
- ld [hRedrawRowOrColumnDest + 1], a
- ld a, l
- ld [hRedrawRowOrColumnDest], a
- ld a, REDRAW_ROW
- ld [hRedrawRowOrColumnMode], a
- ld c, 10
- jp DelayFrames
-
-Trade_AnimMonMoveHorizontal:
-; Animates the mon going through the link cable horizontally over a distance of
-; b 16-pixel units.
- ld a, [wTradedMonMovingRight]
- ld e, a
- ld d, $8
-.scrollLoop
- ld a, e
- dec a
- jr z, .movingRight
-; moving left
- ld a, [hSCX]
- sub $2
- jr .next
-.movingRight
- ld a, [hSCX]
- add $2
-.next
- ld [hSCX], a
- call DelayFrame
- dec d
- jr nz, .scrollLoop
- call Trade_AnimCircledMon
- dec b
- jr nz, Trade_AnimMonMoveHorizontal
- ret
-
-Trade_AnimCircledMon:
-; Cycles between the two animation frames of the mon party sprite, cycles
-; between a circle and an oval around the mon sprite, and makes the cable flash.
- push de
- push bc
- push hl
- ld a, [rBGP]
- xor $3c ; make link cable flash
- ld [rBGP], a
- call UpdateGBCPal_BGP
- ld hl, wOAMBuffer + $02
- ld de, $4
- ld c, $14
-.loop
- ld a, [hl]
- xor $40
- ld [hl], a
- add hl, de
- dec c
- jr nz, .loop
- pop hl
- pop bc
- pop de
- ret
-
-Trade_WriteCircledMonOAM:
- callba WriteMonPartySpriteOAMBySpecies
- call Trade_WriteCircleOAM
-
-Trade_AddOffsetsToOAMCoords:
- ld hl, wOAMBuffer
- ld c, $14 ; SCREEN_WIDTH?
-.loop
- ld a, [wBaseCoordY]
- add [hl]
- ld [hli], a
- ld a, [wBaseCoordX]
- add [hl]
- ld [hli], a
- inc hl
- inc hl
- dec c
- jr nz, .loop
- ret
-
-Trade_AnimMonMoveVertical:
-; Animates the mon going through the link cable vertically as well as
-; horizontally for a bit. The last bit of horizontal movement (when moving
-; right) or the first bit of horizontal movement (when moving left) are done
-; here instead of Trade_AnimMonMoveHorizontal because this function moves the
-; sprite itself rather than scrolling the screen around the sprite. Moving the
-; sprite itself is necessary because the vertical segment of the link cable is
-; to the right of the screen position that the mon sprite has when
-; Trade_AnimMonMoveHorizontal is executing.
- ld a, [wTradedMonMovingRight]
- and a
- jr z, .movingLeft
-; moving right
- lb bc, 4, 0 ; move right
- call .doAnim
- lb bc, 0, 10 ; move down
- jr .doAnim
-.movingLeft
- lb bc, 0, -10 ; move up
- call .doAnim
- lb bc, -4, 0 ; move left
-.doAnim
- ld a, b
- ld [wBaseCoordX], a
- ld a, c
- ld [wBaseCoordY], a
- ld d, $4
-.loop
- call Trade_AddOffsetsToOAMCoords
- call Trade_AnimCircledMon
- ld c, 8
- call DelayFrames
- dec d
- jr nz, .loop
- ret
-
-Trade_WriteCircleOAM:
-; Writes the OAM blocks for the circle around the traded mon as it passes
-; the link cable.
- ld hl, Trade_CircleOAMPointers
- ld c, $4
- xor a
-.loop
- push bc
- ld e, [hl]
- inc hl
- ld d, [hl]
- inc hl
- ld c, [hl]
- inc hl
- ld b, [hl]
- inc hl
- push hl
- inc a
- push af
- call WriteOAMBlock
- pop af
- pop hl
- pop bc
- dec c
- jr nz, .loop
- ret
-
-Trade_CircleOAMPointers:
- dw Trade_CircleOAM0
- db $08,$08
- dw Trade_CircleOAM1
- db $18,$08
- dw Trade_CircleOAM2
- db $08,$18
- dw Trade_CircleOAM3
- db $18,$18
-
-Trade_CircleOAM0:
- db $38,$10,$39,$10
- db $3A,$10,$3B,$10
-
-Trade_CircleOAM1:
- db $39,$30,$38,$30
- db $3B,$30,$3A,$30
-
-Trade_CircleOAM2:
- db $3A,$50,$3B,$50
- db $38,$50,$39,$50
-
-Trade_CircleOAM3:
- db $3B,$70,$3A,$70
- db $39,$70,$38,$70
-
-; a = species
-Trade_LoadMonSprite:
- ld [wcf91], a
- ld [wd0b5], a
- 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
- call GetMonHeader
- coord hl, 7, 2
- call LoadFlippedFrontSpriteByMonIndex
- ld c, 10
- jp DelayFrames
-
-Trade_ShowClearedWindow:
-; clears the window and covers the BG entirely with the window
- ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
- call ClearScreen
- ld a, %11100011
- ld [rLCDC], a
- ld a, $7
- ld [rWX], a
- xor a
- ld [hWY], a
- ld a, $90
- ld [hSCX], a
- ret
-
-Trade_SlideTextBoxOffScreen:
-; Slides the window right until it's off screen. The window usually just has
-; a text box at the bottom when this is called. However, when this is called
-; after Trade_ShowEnemyMon in the external clock sequence, there is a mon pic
-; above the text box and it is also scrolled off the screen.
- ld c, 50
- call DelayFrames
-.loop
- call DelayFrame
- ld a, [rWX]
- inc a
- inc a
- ld [rWX], a
- cp $a1
- jr nz, .loop
- call Trade_ClearTileMap
- ld c, 10
- call DelayFrames
- ld a, $7
- ld [rWX], a
- ret
-
-PrintTradeWentToText:
- ld hl, TradeWentToText
- call PrintText
- ld c, 200
- call DelayFrames
- jp Trade_SlideTextBoxOffScreen
-
-TradeWentToText:
- TX_FAR _TradeWentToText
- db "@"
-
-PrintTradeForSendsText:
- ld hl, TradeForText
- call PrintText
- call Trade_Delay80
- ld hl, TradeSendsText
- call PrintText
- jp Trade_Delay80
-
-TradeForText:
- TX_FAR _TradeForText
- db "@"
-
-TradeSendsText:
- TX_FAR _TradeSendsText
- db "@"
-
-PrintTradeFarewellText:
- ld hl, TradeWavesFarewellText
- call PrintText
- call Trade_Delay80
- ld hl, TradeTransferredText
- call PrintText
- call Trade_Delay80
- jp Trade_SlideTextBoxOffScreen
-
-TradeWavesFarewellText:
- TX_FAR _TradeWavesFarewellText
- db "@"
-
-TradeTransferredText:
- TX_FAR _TradeTransferredText
- db "@"
-
-PrintTradeTakeCareText:
- ld hl, TradeTakeCareText
- call PrintText
- jp Trade_Delay80
-
-TradeTakeCareText:
- TX_FAR _TradeTakeCareText
- db "@"
-
-PrintTradeWillTradeText:
- ld hl, TradeWillTradeText
- call PrintText
- call Trade_Delay80
- ld hl, TradeforText
- call PrintText
- jp Trade_Delay80
-
-TradeWillTradeText:
- TX_FAR _TradeWillTradeText
- db "@"
-
-TradeforText:
- TX_FAR _TradeforText
- db "@"
-
-Trade_ShowAnimation:
- ld [wAnimationID], a
- xor a
- ld [wAnimationType], a
- predef_jump MoveAnimation
diff --git a/engine/trade2.asm b/engine/trade2.asm
deleted file mode 100755
index 2c79e077..00000000
--- a/engine/trade2.asm
+++ /dev/null
@@ -1,48 +0,0 @@
-Trade_PrintPlayerMonInfoText:
- coord hl, 5, 0
- ld de, Trade_MonInfoText
- call PlaceString
- ld a, [wTradedPlayerMonSpecies]
- ld [wd11e], a
- predef IndexToPokedex
- coord hl, 9, 0
- ld de, wd11e
- lb bc, LEADING_ZEROES | 1, 3
- call PrintNumber
- coord hl, 5, 2
- ld de, wcf4b
- call PlaceString
- coord hl, 8, 4
- ld de, wTradedPlayerMonOT
- call PlaceString
- coord hl, 8, 6
- ld de, wTradedPlayerMonOTID
- lb bc, LEADING_ZEROES | 2, 5
- jp PrintNumber
-
-Trade_PrintEnemyMonInfoText:
- coord hl, 5, 10
- ld de, Trade_MonInfoText
- call PlaceString
- ld a, [wTradedEnemyMonSpecies]
- ld [wd11e], a
- predef IndexToPokedex
- coord hl, 9, 10
- ld de, wd11e
- lb bc, LEADING_ZEROES | 1, 3
- call PrintNumber
- coord hl, 5, 12
- ld de, wcd6d
- call PlaceString
- coord hl, 8, 14
- ld de, wTradedEnemyMonOT
- call PlaceString
- coord hl, 8, 16
- ld de, wTradedEnemyMonOTID
- lb bc, LEADING_ZEROES | 2, 5
- jp PrintNumber
-
-Trade_MonInfoText:
- db "──№⠄",$4E
- next "OT/"
- next $73,"№⠄","@"
diff --git a/engine/unknown_ea3ea.asm b/engine/unknown_ea3ea.asm
index 1908809b..c10f1555 100755
--- a/engine/unknown_ea3ea.asm
+++ b/engine/unknown_ea3ea.asm
@@ -13,7 +13,7 @@ Printer_GetMonStats:
call CopyVideoDataDouble
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
xor a
ld [wWhichTradeMonSelectionMenu], a
call LoadMonData
@@ -22,22 +22,22 @@ Printer_GetMonStats:
lb bc, 16, 18
call TextBoxBorder
- coord hl, 0, 12
+ hlcoord 0, 12
lb bc, 4, 18
call TextBoxBorder
- coord hl, 3, 10
+ hlcoord 3, 10
call PrintLevelFull
- coord hl, 2, 10
+ hlcoord 2, 10
ld a, $6e
ld [hli], a
ld [hl], " "
- coord hl, 2, 11
- ld [hl], "′"
+ hlcoord 2, 11
+ ld [hl], "’"
- coord hl, 4, 11
+ hlcoord 4, 11
ld de, wLoadedMonMaxHP
lb bc, 2, 3
call PrintNumber
@@ -47,15 +47,15 @@ Printer_GetMonStats:
ld [wd0b5], a
ld hl, wPartyMonNicks
call .GetNamePointer
- coord hl, 8, 2
+ hlcoord 8, 2
call PlaceString
call GetMonName
- coord hl, 9, 3
+ hlcoord 9, 3
call PlaceString
predef IndexToPokedex
- coord hl, 2, 8
+ hlcoord 2, 8
ld [hl], "№"
inc hl
ld [hl], $f2
@@ -64,35 +64,35 @@ Printer_GetMonStats:
lb bc, $80 | 1, 3
call PrintNumber
- coord hl, 8, 4
+ hlcoord 8, 4
ld de, .OT
call PlaceString
ld hl, wPartyMonOT
call .GetNamePointer
- coord hl, 9, 5
+ hlcoord 9, 5
call PlaceString
- coord hl, 9, 6
+ hlcoord 9, 6
ld de, .IDNo
call PlaceString
- coord hl, 13, 6
+ hlcoord 13, 6
ld de, wLoadedMonOTID
lb bc, $80 | 2, 5
call PrintNumber
- coord hl, 9, 8
+ hlcoord 9, 8
ld de, .Stats
- ld a, [hFlags_0xFFFA]
+ ldh a, [hFlagsFFFA]
set 2, a
- ld [hFlags_0xFFFA], a
+ ldh [hFlagsFFFA], a
call PlaceString
- ld a, [hFlags_0xFFFA]
+ ldh a, [hFlagsFFFA]
res 2, a
- ld [hFlags_0xFFFA], a
+ ldh [hFlagsFFFA], a
- coord hl, 16, 8
+ hlcoord 16, 8
ld de, wLoadedMonAttack
ld a, 4
.loop
@@ -113,19 +113,19 @@ Printer_GetMonStats:
dec a
jr nz, .loop
- coord hl, 1, 13
+ hlcoord 1, 13
ld a, [wLoadedMonMoves]
call .PlaceMoveName
- coord hl, 1, 14
+ hlcoord 1, 14
ld a, [wLoadedMonMoves + 1]
call .PlaceMoveName
- coord hl, 1, 15
+ hlcoord 1, 15
ld a, [wLoadedMonMoves + 2]
call .PlaceMoveName
- coord hl, 1, 16
+ hlcoord 1, 16
ld a, [wLoadedMonMoves + 3]
call .PlaceMoveName
@@ -133,10 +133,10 @@ Printer_GetMonStats:
call RunPaletteCommand
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call Delay3
call GBPalNormal
- coord hl, 1, 1
+ hlcoord 1, 1
call LoadFlippedFrontSpriteByMonIndex
ret
@@ -468,11 +468,11 @@ Func_ea74c:
ld [wPrinterSendByteOffset], a
ld [wPrinterSendByteOffset + 1], a
ld a, $88
- ld [rSB], a
+ ldh [rSB], a
ld a, $1
- ld [rSC], a
+ ldh [rSC], a
ld a, $81
- ld [rSC], a
+ ldh [rSC], a
ret
Func_ea76b:
@@ -832,25 +832,25 @@ PrinterDebug_PrepOAMForPrinting:
dw .Pal3
.Pal0:
- ld a, [rOBP0]
+ ldh a, [rOBP0]
and $3
ret
.Pal2:
- ld a, [rOBP0]
+ ldh a, [rOBP0]
and $c
srl a
srl a
ret
.Pal1:
- ld a, [rOBP0]
+ ldh a, [rOBP0]
and $30
swap a
ret
.Pal3:
- ld a, [rOBP0]
+ ldh a, [rOBP0]
and $c0
rlca
rlca
diff --git a/engine/vermilion_gym_trash_cans.asm b/engine/vermilion_gym_trash_cans.asm
index 49dee50c..1bc0590b 100755
--- a/engine/vermilion_gym_trash_cans.asm
+++ b/engine/vermilion_gym_trash_cans.asm
@@ -54,7 +54,7 @@ Yellow_SampleSecondTrashCan:
call AddNTimes
call AddNTimes ; ????
ld a, [hli]
- ld [hGymTrashCanRandNumMask], a
+ ldh [hGymTrashCanRandNumMask], a
ld e, a
push hl
call TrashCanRandom
diff --git a/engine/yellow_intro.asm b/engine/yellow_intro.asm
index 9c9e26b3..324ba86d 100755
--- a/engine/yellow_intro.asm
+++ b/engine/yellow_intro.asm
@@ -1,12 +1,12 @@
PlayIntroScene:
- ld a, [rIE]
+ ldh a, [rIE]
push af
xor a
- ld [rIF], a
+ ldh [rIF], a
ld a, $f
- ld [rIE], a
+ ldh [rIE], a
ld a, $8
- ld [rSTAT], a
+ ldh [rSTAT], a
call InitYellowIntroGFXAndMusic
call DelayFrame
.loop
@@ -14,7 +14,7 @@ PlayIntroScene:
bit 7, a
jr nz, .go_to_title_screen
call JoypadLowSensitivity
- ld a, [hJoyPressed]
+ ldh a, [hJoyPressed]
and A_BUTTON | B_BUTTON | START
jr nz, .go_to_title_screen
call Func_f98fc
@@ -32,14 +32,14 @@ PlayIntroScene:
.go_to_title_screen
call YellowIntro_BlankPalettes
xor a
- ld [hLCDCPointer], a
+ ldh [hLCDCPointer], a
call DelayFrame
xor a
- ld [rIF], a
+ ldh [rIF], a
pop af
- ld [rIE], a
+ ldh [rIE], a
ld a, $90
- ld [hWY], a
+ ldh [hWY], a
call ClearObjectAnimationBuffers
ld hl, wTileMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
@@ -47,12 +47,12 @@ PlayIntroScene:
call Bank3E_FillMemory
call YellowIntro_BlankOAMBuffer
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call DelayFrame
call DelayFrame
call DelayFrame
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ret
Func_f98a2:
@@ -127,20 +127,20 @@ YellowIntro_NextScene:
YellowIntroScene0:
xor a
- ld [hLCDCPointer], a
+ ldh [hLCDCPointer], a
lb de, $58, $58
ld a, $1
call YellowIntro_SpawnAnimatedObjectAndSavePointer
xor a
- ld [hSCX], a
- ld [hSCY], a
+ ldh [hSCX], a
+ ldh [hSCY], a
ld a, $90
- ld [hWY], a
+ ldh [hWY], a
ld a, $e4
- ld [rBGP], a
- ld [rOBP0], a
+ ldh [rBGP], a
+ ldh [rOBP0], a
ld a, $c4
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
@@ -161,7 +161,7 @@ YellowIntroScene2:
ld c, $8
call UpdateMusicCTimes
xor a
- ld [hLCDCPointer], a
+ ldh [hLCDCPointer], a
ld hl, vBGMap0
ld bc, $400
xor a
@@ -196,7 +196,7 @@ YellowIntroScene2_PlaceGraphic:
add $10
dec b
jr nz, .row
- ld a, [hGBC]
+ ldh a, [hGBC]
and a
jr z, .dmg_sgb
; We can actually set palettes!
@@ -204,7 +204,7 @@ YellowIntroScene2_PlaceGraphic:
ld de, $20
ld b, $6
ld a, $1
- ld [rVBK], a
+ ldh [rVBK], a
.attr_row
ld c, $6
push hl
@@ -217,7 +217,7 @@ YellowIntroScene2_PlaceGraphic:
dec b
jr nz, .attr_row
xor a
- ld [rVBK], a
+ ldh [rVBK], a
.dmg_sgb
ret
@@ -260,11 +260,11 @@ YellowIntroFlyingSpeedBarData:
YellowIntroScene3:
call YellowIntro_CheckFrameTimerDecrement
jr c, .expired
- ld a, [hSCX]
+ ldh a, [hSCX]
cp $68
ret z
add $4
- ld [hSCX], a
+ ldh [hSCX], a
ret
.expired
@@ -276,7 +276,7 @@ YellowIntroScene4:
call YellowIntro_BlankPalsDelay2AndDisableLCD
ld c, $5
call UpdateMusicCTimes
- ld a, [hGBC]
+ ldh a, [hGBC]
and a
jr z, .dmg_sgb
; We can actually set palettes!
@@ -284,7 +284,7 @@ YellowIntroScene4:
ld de, $20
ld b, $6
ld a, $1
- ld [rVBK], a
+ ldh [rVBK], a
xor a
.attr_row
ld c, $6
@@ -298,10 +298,10 @@ YellowIntroScene4:
dec b
jr nz, .attr_row
xor a
- ld [rVBK], a
+ ldh [rVBK], a
.dmg_sgb
xor a
- ld [hLCDCPointer], a
+ ldh [hLCDCPointer], a
call Func_f9e5f
lb de, $58, $58
ld a, $2
@@ -324,7 +324,7 @@ YellowIntroScene6:
ld c, $5
call UpdateMusicCTimes
ld a, rSCY - $ff00
- ld [hLCDCPointer], a
+ ldh [hLCDCPointer], a
call YellowIntro_Copy8BitSineWave
ld hl, vBGMap0
ld bc, $60
@@ -385,7 +385,7 @@ YellowIntroScene8:
ld c, $5
call UpdateMusicCTimes
xor a
- ld [hLCDCPointer], a
+ ldh [hLCDCPointer], a
call Func_f9e5f
lb de, $58, $58
ld a, $3
@@ -408,7 +408,7 @@ YellowIntroScene10:
ld c, $5
call UpdateMusicCTimes
xor a
- ld [hLCDCPointer], a
+ ldh [hLCDCPointer], a
ld hl, vBGMap0
ld bc, $400
xor a
@@ -476,15 +476,15 @@ YellowIntroScene11:
ld hl, YellowIntroCloudGFX1
add hl, de
ld a, l
- ld [H_VBCOPYSRC], a
+ ldh [hVBlankCopySource], a
ld a, h
- ld [H_VBCOPYSRC + 1], a
+ ldh [hVBlankCopySource + 1], a
xor a
- ld [H_VBCOPYDEST], a
+ ldh [hVBlankCopyDest], a
ld a, $96
- ld [H_VBCOPYDEST + 1], a
+ ldh [hVBlankCopyDest + 1], a
ld a, $4
- ld [H_VBCOPYSIZE], a
+ ldh [hVBlankCopySize], a
ret
.expired
@@ -500,7 +500,7 @@ YellowIntroScene12:
ld c, $5
call UpdateMusicCTimes
xor a
- ld [hLCDCPointer], a
+ ldh [hLCDCPointer], a
ld hl, vBGMap0
ld bc, $80
ld a, $1
@@ -561,10 +561,10 @@ YellowIntroScene14:
ld de, YellowIntroPalSequence_f9dd6
call YellowIntro_LoadDMGPalAndIncrementCounter
jr c, .expired
- ld [rBGP], a
- ld [rOBP0], a
+ ldh [rBGP], a
+ ldh [rOBP0], a
and $f0
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
@@ -577,24 +577,24 @@ YellowIntroScene14:
ld bc, $50
ld a, $1
call Bank3E_FillMemory
- coord hl, 0, 4
+ hlcoord 0, 4
ld bc, CopyVideoDataAlternate
xor a
call Bank3E_FillMemory
- coord hl, 0, 14
+ hlcoord 0, 14
ld bc, $50
ld a, $1
call Bank3E_FillMemory
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call DelayFrame
call DelayFrame
call DelayFrame
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ld a, $e4
- ld [rOBP0], a
- ld [rBGP], a
+ ldh [rOBP0], a
+ ldh [rBGP], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
lb de, $58, $58
@@ -611,22 +611,22 @@ YellowIntroScene15:
ld a, [wYellowIntroSceneTimer]
and $3
ret nz
- ld a, [rOBP0]
+ ldh a, [rOBP0]
xor $ff
- ld [rOBP0], a
- ld a, [rBGP]
+ ldh [rOBP0], a
+ ldh a, [rBGP]
xor $3
- ld [rBGP], a
+ ldh [rBGP], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
ret
.expired
xor a
- ld [hLCDCPointer], a
+ ldh [hLCDCPointer], a
ld a, $e4
- ld [rBGP], a
- ld [rOBP0], a
+ ldh [rBGP], a
+ ldh [rOBP0], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call YellowIntro_NextScene
@@ -634,8 +634,8 @@ YellowIntroScene16:
ld de, YellowIntroPalSequence_f9e0a
call YellowIntro_LoadDMGPalAndIncrementCounter
jr c, .expired
- ld [rOBP0], a
- ld [rBGP], a
+ ldh [rOBP0], a
+ ldh [rBGP], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
ret
@@ -743,9 +743,9 @@ Func_f9e5f:
YellowIntro_BlankPalsDelay2AndDisableLCD:
xor a
- ld [rBGP], a
- ld [rOBP0], a
- ld [rOBP1], a
+ ldh [rBGP], a
+ ldh [rOBP0], a
+ ldh [rOBP1], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
@@ -756,19 +756,19 @@ YellowIntro_BlankPalsDelay2AndDisableLCD:
Func_f9e9a:
ld e, a
- callab YellowIntroPaletteAction
+ callfar YellowIntroPaletteAction
xor a
- ld [hSCX], a
- ld [hSCY], a
+ ldh [hSCX], a
+ ldh [hSCY], a
ld a, $90
- ld [hWY], a
+ ldh [hWY], a
ld a, $e3
- ld [rLCDC], a
+ ldh [rLCDC], a
ld a, $e4
- ld [rBGP], a
- ld [rOBP0], a
+ ldh [rBGP], a
+ ldh [rOBP0], a
ld a, $e0
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
@@ -798,41 +798,41 @@ YellowIntro_Copy8BitSineWave:
Request7TileTransferFromC810ToC710:
ld a, $10
- ld [H_VBCOPYSRC], a
+ ldh [hVBlankCopySource], a
ld a, wLYOverridesBuffer / $100
- ld [H_VBCOPYSRC + 1], a
+ ldh [hVBlankCopySource + 1], a
ld a, $10
- ld [H_VBCOPYDEST], a
+ ldh [hVBlankCopyDest], a
ld a, wLYOverrides / $100
- ld [H_VBCOPYDEST + 1], a
+ ldh [hVBlankCopyDest + 1], a
ld a, $7
- ld [H_VBCOPYSIZE], a
+ ldh [hVBlankCopySize], a
ret
InitYellowIntroGFXAndMusic:
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld [hSCX], a
- ld [hSCY], a
- ld [H_AUTOBGTRANSFERDEST], a
+ ldh [hAutoBGTransferEnabled], a
+ ldh [hSCX], a
+ ldh [hSCY], a
+ ldh [hAutoBGTransferDest], a
ld a, $98
- ld [H_AUTOBGTRANSFERDEST + 1], a
+ ldh [hAutoBGTransferDest + 1], a
call YellowIntro_BlankTileMap
ld hl, wTileMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, $1
call Bank3E_FillMemory
- coord hl, 0, 4
+ hlcoord 0, 4
ld bc, CopyVideoDataAlternate
xor a
call Bank3E_FillMemory
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call DelayFrame
call DelayFrame
call DelayFrame
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ld de, $6b5a
ld hl, $8000
ld bc, $3eff
@@ -915,9 +915,9 @@ YellowIntro_BlankOAMBuffer:
YellowIntro_BlankPalettes:
xor a
- ld [rBGP], a
- ld [rOBP0], a
- ld [rOBP1], a
+ ldh [rBGP], a
+ ldh [rOBP0], a
+ ldh [rOBP1], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
diff --git a/gfx/attack_anim_1.png b/gfx/attack_anim_1.png
deleted file mode 100644
index 12bd7aa2..00000000
--- a/gfx/attack_anim_1.png
+++ /dev/null
Binary files differ
diff --git a/gfx/attack_anim_2.png b/gfx/attack_anim_2.png
deleted file mode 100644
index 57abbfde..00000000
--- a/gfx/attack_anim_2.png
+++ /dev/null
Binary files differ
diff --git a/gfx/battle/attack_anim_1.png b/gfx/battle/attack_anim_1.png
new file mode 100644
index 00000000..f3728737
--- /dev/null
+++ b/gfx/battle/attack_anim_1.png
Binary files differ
diff --git a/gfx/battle/attack_anim_2.png b/gfx/battle/attack_anim_2.png
new file mode 100644
index 00000000..6867d650
--- /dev/null
+++ b/gfx/battle/attack_anim_2.png
Binary files differ
diff --git a/gfx/battle/balls.png b/gfx/battle/balls.png
new file mode 100644
index 00000000..21bb5e37
--- /dev/null
+++ b/gfx/battle/balls.png
Binary files differ
diff --git a/gfx/battle/battle_hud_1.png b/gfx/battle/battle_hud_1.png
new file mode 100644
index 00000000..ed9d4a56
--- /dev/null
+++ b/gfx/battle/battle_hud_1.png
Binary files differ
diff --git a/gfx/battle/battle_hud_2.png b/gfx/battle/battle_hud_2.png
new file mode 100644
index 00000000..0f6954b5
--- /dev/null
+++ b/gfx/battle/battle_hud_2.png
Binary files differ
diff --git a/gfx/battle/battle_hud_3.png b/gfx/battle/battle_hud_3.png
new file mode 100644
index 00000000..fd1c57f7
--- /dev/null
+++ b/gfx/battle/battle_hud_3.png
Binary files differ
diff --git a/pic/other/ghost.png b/gfx/battle/ghost.png
index bfe7ef12..bfe7ef12 100644
--- a/pic/other/ghost.png
+++ b/gfx/battle/ghost.png
Binary files differ
diff --git a/gfx/minimized_mon_sprite.png b/gfx/battle/minimize.png
index 35ca75cb..35ca75cb 100644
--- a/gfx/minimized_mon_sprite.png
+++ b/gfx/battle/minimize.png
Binary files differ
diff --git a/pic/trainer/oldman.png b/gfx/battle/oldman.png
index 6d48000f..6d48000f 100644
--- a/pic/trainer/oldman.png
+++ b/gfx/battle/oldman.png
Binary files differ
diff --git a/pic/ytrainer/prof.oakb.png b/gfx/battle/prof.oakb.png
index fb96bbf9..fb96bbf9 100644
--- a/pic/ytrainer/prof.oakb.png
+++ b/gfx/battle/prof.oakb.png
Binary files differ
diff --git a/gfx/battle_hud1.png b/gfx/battle_hud1.png
deleted file mode 100644
index 74e6361f..00000000
--- a/gfx/battle_hud1.png
+++ /dev/null
Binary files differ
diff --git a/gfx/battle_hud2.png b/gfx/battle_hud2.png
deleted file mode 100644
index a5df75c8..00000000
--- a/gfx/battle_hud2.png
+++ /dev/null
Binary files differ
diff --git a/gfx/battle_hud3.png b/gfx/battle_hud3.png
deleted file mode 100644
index 00643de7..00000000
--- a/gfx/battle_hud3.png
+++ /dev/null
Binary files differ
diff --git a/gfx/theend.png b/gfx/credits/the_end.png
index 025ebb61..025ebb61 100644
--- a/gfx/theend.png
+++ b/gfx/credits/the_end.png
Binary files differ
diff --git a/gfx/emotes/bolt.png b/gfx/emotes/bolt.png
new file mode 100644
index 00000000..0eef6ad3
--- /dev/null
+++ b/gfx/emotes/bolt.png
Binary files differ
diff --git a/gfx/emotes/fish.png b/gfx/emotes/fish.png
new file mode 100644
index 00000000..216c9c43
--- /dev/null
+++ b/gfx/emotes/fish.png
Binary files differ
diff --git a/gfx/emotes/happy.png b/gfx/emotes/happy.png
new file mode 100644
index 00000000..dd65f4d1
--- /dev/null
+++ b/gfx/emotes/happy.png
Binary files differ
diff --git a/gfx/emotes/heart.png b/gfx/emotes/heart.png
new file mode 100644
index 00000000..166fff51
--- /dev/null
+++ b/gfx/emotes/heart.png
Binary files differ
diff --git a/gfx/emotes/question.png b/gfx/emotes/question.png
new file mode 100644
index 00000000..091ddbba
--- /dev/null
+++ b/gfx/emotes/question.png
Binary files differ
diff --git a/gfx/emotes/shock.png b/gfx/emotes/shock.png
new file mode 100644
index 00000000..f15cf50f
--- /dev/null
+++ b/gfx/emotes/shock.png
Binary files differ
diff --git a/gfx/emotes/skull.png b/gfx/emotes/skull.png
new file mode 100644
index 00000000..e241a5b1
--- /dev/null
+++ b/gfx/emotes/skull.png
Binary files differ
diff --git a/gfx/emotes/zzz.png b/gfx/emotes/zzz.png
new file mode 100644
index 00000000..41c958f7
--- /dev/null
+++ b/gfx/emotes/zzz.png
Binary files differ
diff --git a/gfx/emotion_bubbles.png b/gfx/emotion_bubbles.png
deleted file mode 100644
index 652c56b1..00000000
--- a/gfx/emotion_bubbles.png
+++ /dev/null
Binary files differ
diff --git a/gfx/fishing.asm b/gfx/fishing.asm
new file mode 100644
index 00000000..0a040262
--- /dev/null
+++ b/gfx/fishing.asm
@@ -0,0 +1,4 @@
+RedFishingTilesFront: INCBIN "gfx/overworld/red_fish_front.2bpp"
+RedFishingTilesBack: INCBIN "gfx/overworld/red_fish_back.2bpp"
+RedFishingTilesSide: INCBIN "gfx/overworld/red_fish_side.2bpp"
+RedFishingRodTiles: INCBIN "gfx/overworld/fishing_rod.2bpp"
diff --git a/gfx/font.asm b/gfx/font.asm
new file mode 100644
index 00000000..51d61de4
--- /dev/null
+++ b/gfx/font.asm
@@ -0,0 +1,33 @@
+PokemonLogoJapanGraphics: INCBIN "gfx/title/pokemon_logo_japan.2bpp"
+FontGraphics:: INCBIN "gfx/font/font.1bpp"
+FontGraphicsEnd::
+
+ABTiles: INCBIN "gfx/font/AB.2bpp"
+
+HpBarAndStatusGraphics:: INCBIN "gfx/font/font_battle_extra.2bpp"
+HpBarAndStatusGraphicsEnd::
+
+BattleHudTiles1: INCBIN "gfx/battle/battle_hud_1.1bpp"
+BattleHudTiles1End:
+BattleHudTiles2: INCBIN "gfx/battle/battle_hud_2.1bpp"
+BattleHudTiles3: INCBIN "gfx/battle/battle_hud_3.1bpp"
+BattleHudTiles3End:
+
+NintendoCopyrightLogoGraphics: INCBIN "gfx/splash/copyright.2bpp"
+
+GamefreakLogoGraphics: INCBIN "gfx/title/gamefreak_inc.2bpp"
+GamefreakLogoGraphicsEnd:
+
+NineTile: INCBIN "gfx/9_tile.2bpp"
+
+TextBoxGraphics:: INCBIN "gfx/font/font_extra.2bpp"
+TextBoxGraphicsEnd::
+
+PokedexTileGraphics: INCBIN "gfx/pokedex/pokedex.2bpp"
+PokedexTileGraphicsEnd:
+
+WorldMapTileGraphics: INCBIN "gfx/town_map/town_map.2bpp"
+WorldMapTileGraphicsEnd:
+
+PlayerCharacterTitleGraphics: INCBIN "gfx/title/player.2bpp"
+PlayerCharacterTitleGraphicsEnd:
diff --git a/gfx/AB.png b/gfx/font/AB.png
index 89ac01db..89ac01db 100644
--- a/gfx/AB.png
+++ b/gfx/font/AB.png
Binary files differ
diff --git a/gfx/ED_tile.png b/gfx/font/ED.png
index 352489d6..352489d6 100644
--- a/gfx/ED_tile.png
+++ b/gfx/font/ED.png
Binary files differ
diff --git a/gfx/p_tile.png b/gfx/font/P.png
index 3df11133..3df11133 100644
--- a/gfx/p_tile.png
+++ b/gfx/font/P.png
Binary files differ
diff --git a/gfx/font.png b/gfx/font/font.png
index 34e86b4a..34e86b4a 100644
--- a/gfx/font.png
+++ b/gfx/font/font.png
Binary files differ
diff --git a/gfx/font/font_battle_extra.png b/gfx/font/font_battle_extra.png
new file mode 100644
index 00000000..d00ae7bc
--- /dev/null
+++ b/gfx/font/font_battle_extra.png
Binary files differ
diff --git a/gfx/font/font_extra.png b/gfx/font/font_extra.png
new file mode 100644
index 00000000..243acda0
--- /dev/null
+++ b/gfx/font/font_extra.png
Binary files differ
diff --git a/gfx/hp_bar_and_status.png b/gfx/hp_bar_and_status.png
deleted file mode 100644
index 1a832831..00000000
--- a/gfx/hp_bar_and_status.png
+++ /dev/null
Binary files differ
diff --git a/gfx/icons/bug.png b/gfx/icons/bug.png
new file mode 100644
index 00000000..40611eb6
--- /dev/null
+++ b/gfx/icons/bug.png
Binary files differ
diff --git a/gfx/icons/plant.png b/gfx/icons/plant.png
new file mode 100644
index 00000000..41b7aea3
--- /dev/null
+++ b/gfx/icons/plant.png
Binary files differ
diff --git a/gfx/icons/quadruped.png b/gfx/icons/quadruped.png
new file mode 100644
index 00000000..c9307b10
--- /dev/null
+++ b/gfx/icons/quadruped.png
Binary files differ
diff --git a/gfx/icons/snake.png b/gfx/icons/snake.png
new file mode 100644
index 00000000..a6076700
--- /dev/null
+++ b/gfx/icons/snake.png
Binary files differ
diff --git a/gfx/intro/gengar_1.tilemap b/gfx/intro/gengar_1.tilemap
new file mode 100644
index 00000000..c962326a
--- /dev/null
+++ b/gfx/intro/gengar_1.tilemap
Binary files differ
diff --git a/gfx/intro/gengar_2.tilemap b/gfx/intro/gengar_2.tilemap
new file mode 100644
index 00000000..a909ba5e
--- /dev/null
+++ b/gfx/intro/gengar_2.tilemap
Binary files differ
diff --git a/gfx/intro/gengar_3.tilemap b/gfx/intro/gengar_3.tilemap
new file mode 100644
index 00000000..231106d8
--- /dev/null
+++ b/gfx/intro/gengar_3.tilemap
Binary files differ
diff --git a/gfx/mon_ow_sprites.png b/gfx/mon_ow_sprites.png
deleted file mode 100644
index 8402af2d..00000000
--- a/gfx/mon_ow_sprites.png
+++ /dev/null
Binary files differ
diff --git a/gfx/battle_transition.png b/gfx/overworld/battle_transition.png
index e2bd6299..e2bd6299 100644
--- a/gfx/battle_transition.png
+++ b/gfx/overworld/battle_transition.png
Binary files differ
diff --git a/gfx/red_fishingrod_tiles.png b/gfx/overworld/fishing_rod.png
index e097c6c9..e097c6c9 100644
--- a/gfx/red_fishingrod_tiles.png
+++ b/gfx/overworld/fishing_rod.png
Binary files differ
diff --git a/gfx/pokecenter_ball.png b/gfx/overworld/heal_machine.png
index 1832c842..1832c842 100644
--- a/gfx/pokecenter_ball.png
+++ b/gfx/overworld/heal_machine.png
Binary files differ
diff --git a/gfx/red_fishing_tile_back.png b/gfx/overworld/red_fish_back.png
index 0972377c..0972377c 100644
--- a/gfx/red_fishing_tile_back.png
+++ b/gfx/overworld/red_fish_back.png
Binary files differ
diff --git a/gfx/red_fishing_tile_front.png b/gfx/overworld/red_fish_front.png
index e18a27d8..e18a27d8 100644
--- a/gfx/red_fishing_tile_front.png
+++ b/gfx/overworld/red_fish_front.png
Binary files differ
diff --git a/gfx/red_fishing_tile_side.png b/gfx/overworld/red_fish_side.png
index 11f25c2a..11f25c2a 100644
--- a/gfx/red_fishing_tile_side.png
+++ b/gfx/overworld/red_fish_side.png
Binary files differ
diff --git a/gfx/ledge_hopping_shadow.png b/gfx/overworld/shadow.png
index ba3dab5b..ba3dab5b 100644
--- a/gfx/ledge_hopping_shadow.png
+++ b/gfx/overworld/shadow.png
Binary files differ
diff --git a/gfx/ss_anne_smoke_puff.png b/gfx/overworld/smoke.png
index 5bcaf18a..5bcaf18a 100644
--- a/gfx/ss_anne_smoke_puff.png
+++ b/gfx/overworld/smoke.png
Binary files differ
diff --git a/gfx/overworld/spinners.png b/gfx/overworld/spinners.png
new file mode 100644
index 00000000..534ae610
--- /dev/null
+++ b/gfx/overworld/spinners.png
Binary files differ
diff --git a/gfx/pics.asm b/gfx/pics.asm
new file mode 100644
index 00000000..4019fe36
--- /dev/null
+++ b/gfx/pics.asm
@@ -0,0 +1,376 @@
+SECTION "Pics 1", ROMX
+
+RhydonPicFront:: INCBIN "gfx/pokemon/front_yellow/rhydon.pic"
+RhydonPicBack:: INCBIN "gfx/pokemon/back/rhydonb.pic"
+KangaskhanPicFront:: INCBIN "gfx/pokemon/front_yellow/kangaskhan.pic"
+KangaskhanPicBack:: INCBIN "gfx/pokemon/back/kangaskhanb.pic"
+NidoranMPicFront:: INCBIN "gfx/pokemon/front_yellow/nidoranm.pic"
+NidoranMPicBack:: INCBIN "gfx/pokemon/back/nidoranmb.pic"
+ClefairyPicFront:: INCBIN "gfx/pokemon/front_yellow/clefairy.pic"
+ClefairyPicBack:: INCBIN "gfx/pokemon/back/clefairyb.pic"
+SpearowPicFront:: INCBIN "gfx/pokemon/front_yellow/spearow.pic"
+SpearowPicBack:: INCBIN "gfx/pokemon/back/spearowb.pic"
+VoltorbPicFront:: INCBIN "gfx/pokemon/front_yellow/voltorb.pic"
+VoltorbPicBack:: INCBIN "gfx/pokemon/back/voltorbb.pic"
+NidokingPicFront:: INCBIN "gfx/pokemon/front_yellow/nidoking.pic"
+NidokingPicBack:: INCBIN "gfx/pokemon/back/nidokingb.pic"
+SlowbroPicFront:: INCBIN "gfx/pokemon/front_yellow/slowbro.pic"
+SlowbroPicBack:: INCBIN "gfx/pokemon/back/slowbrob.pic"
+IvysaurPicFront:: INCBIN "gfx/pokemon/front_yellow/ivysaur.pic"
+IvysaurPicBack:: INCBIN "gfx/pokemon/back/ivysaurb.pic"
+ExeggutorPicFront:: INCBIN "gfx/pokemon/front_yellow/exeggutor.pic"
+ExeggutorPicBack:: INCBIN "gfx/pokemon/back/exeggutorb.pic"
+LickitungPicFront:: INCBIN "gfx/pokemon/front_yellow/lickitung.pic"
+LickitungPicBack:: INCBIN "gfx/pokemon/back/lickitungb.pic"
+ExeggcutePicFront:: INCBIN "gfx/pokemon/front_yellow/exeggcute.pic"
+ExeggcutePicBack:: INCBIN "gfx/pokemon/back/exeggcuteb.pic"
+GrimerPicFront:: INCBIN "gfx/pokemon/front_yellow/grimer.pic"
+GrimerPicBack:: INCBIN "gfx/pokemon/back/grimerb.pic"
+GengarPicFront:: INCBIN "gfx/pokemon/front_yellow/gengar.pic"
+GengarPicBack:: INCBIN "gfx/pokemon/back/gengarb.pic"
+NidoranFPicFront:: INCBIN "gfx/pokemon/front_yellow/nidoranf.pic"
+NidoranFPicBack:: INCBIN "gfx/pokemon/back/nidoranfb.pic"
+NidoqueenPicFront:: INCBIN "gfx/pokemon/front_yellow/nidoqueen.pic"
+NidoqueenPicBack:: INCBIN "gfx/pokemon/back/nidoqueenb.pic"
+CubonePicFront:: INCBIN "gfx/pokemon/front_yellow/cubone.pic"
+CubonePicBack:: INCBIN "gfx/pokemon/back/cuboneb.pic"
+RhyhornPicFront:: INCBIN "gfx/pokemon/front_yellow/rhyhorn.pic"
+RhyhornPicBack:: INCBIN "gfx/pokemon/back/rhyhornb.pic"
+LaprasPicFront:: INCBIN "gfx/pokemon/front_yellow/lapras.pic"
+LaprasPicBack:: INCBIN "gfx/pokemon/back/laprasb.pic"
+ArcaninePicFront:: INCBIN "gfx/pokemon/front_yellow/arcanine.pic"
+ArcaninePicBack:: INCBIN "gfx/pokemon/back/arcanineb.pic"
+MewPicFront:: INCBIN "gfx/pokemon/front_yellow/mew.pic"
+MewPicBack:: INCBIN "gfx/pokemon/back/mewb.pic"
+GyaradosPicFront:: INCBIN "gfx/pokemon/front_yellow/gyarados.pic"
+GyaradosPicBack:: INCBIN "gfx/pokemon/back/gyaradosb.pic"
+ShellderPicFront:: INCBIN "gfx/pokemon/front_yellow/shellder.pic"
+ShellderPicBack:: INCBIN "gfx/pokemon/back/shellderb.pic"
+TentacoolPicFront:: INCBIN "gfx/pokemon/front_yellow/tentacool.pic"
+TentacoolPicBack:: INCBIN "gfx/pokemon/back/tentacoolb.pic"
+GastlyPicFront:: INCBIN "gfx/pokemon/front_yellow/gastly.pic"
+GastlyPicBack:: INCBIN "gfx/pokemon/back/gastlyb.pic"
+ScytherPicFront:: INCBIN "gfx/pokemon/front_yellow/scyther.pic"
+ScytherPicBack:: INCBIN "gfx/pokemon/back/scytherb.pic"
+StaryuPicFront:: INCBIN "gfx/pokemon/front_yellow/staryu.pic"
+StaryuPicBack:: INCBIN "gfx/pokemon/back/staryub.pic"
+BlastoisePicFront:: INCBIN "gfx/pokemon/front_yellow/blastoise.pic"
+BlastoisePicBack:: INCBIN "gfx/pokemon/back/blastoiseb.pic"
+PinsirPicFront:: INCBIN "gfx/pokemon/front_yellow/pinsir.pic"
+PinsirPicBack:: INCBIN "gfx/pokemon/back/pinsirb.pic"
+TangelaPicFront:: INCBIN "gfx/pokemon/front_yellow/tangela.pic"
+TangelaPicBack:: INCBIN "gfx/pokemon/back/tangelab.pic"
+
+
+SECTION "Pics 2", ROMX
+
+GrowlithePicFront:: INCBIN "gfx/pokemon/front_yellow/growlithe.pic"
+GrowlithePicBack:: INCBIN "gfx/pokemon/back/growlitheb.pic"
+OnixPicFront:: INCBIN "gfx/pokemon/front_yellow/onix.pic"
+OnixPicBack:: INCBIN "gfx/pokemon/back/onixb.pic"
+FearowPicFront:: INCBIN "gfx/pokemon/front_yellow/fearow.pic"
+FearowPicBack:: INCBIN "gfx/pokemon/back/fearowb.pic"
+PidgeyPicFront:: INCBIN "gfx/pokemon/front_yellow/pidgey.pic"
+PidgeyPicBack:: INCBIN "gfx/pokemon/back/pidgeyb.pic"
+SlowpokePicFront:: INCBIN "gfx/pokemon/front_yellow/slowpoke.pic"
+SlowpokePicBack:: INCBIN "gfx/pokemon/back/slowpokeb.pic"
+KadabraPicFront:: INCBIN "gfx/pokemon/front_yellow/kadabra.pic"
+KadabraPicBack:: INCBIN "gfx/pokemon/back/kadabrab.pic"
+GravelerPicFront:: INCBIN "gfx/pokemon/front_yellow/graveler.pic"
+GravelerPicBack:: INCBIN "gfx/pokemon/back/gravelerb.pic"
+ChanseyPicFront:: INCBIN "gfx/pokemon/front_yellow/chansey.pic"
+ChanseyPicBack:: INCBIN "gfx/pokemon/back/chanseyb.pic"
+MachokePicFront:: INCBIN "gfx/pokemon/front_yellow/machoke.pic"
+MachokePicBack:: INCBIN "gfx/pokemon/back/machokeb.pic"
+MrMimePicFront:: INCBIN "gfx/pokemon/front_yellow/mr.mime.pic"
+MrMimePicBack:: INCBIN "gfx/pokemon/back/mr.mimeb.pic"
+HitmonleePicFront:: INCBIN "gfx/pokemon/front_yellow/hitmonlee.pic"
+HitmonleePicBack:: INCBIN "gfx/pokemon/back/hitmonleeb.pic"
+HitmonchanPicFront:: INCBIN "gfx/pokemon/front_yellow/hitmonchan.pic"
+HitmonchanPicBack:: INCBIN "gfx/pokemon/back/hitmonchanb.pic"
+ArbokPicFront:: INCBIN "gfx/pokemon/front_yellow/arbok.pic"
+ArbokPicBack:: INCBIN "gfx/pokemon/back/arbokb.pic"
+ParasectPicFront:: INCBIN "gfx/pokemon/front_yellow/parasect.pic"
+ParasectPicBack:: INCBIN "gfx/pokemon/back/parasectb.pic"
+PsyduckPicFront:: INCBIN "gfx/pokemon/front_yellow/psyduck.pic"
+PsyduckPicBack:: INCBIN "gfx/pokemon/back/psyduckb.pic"
+DrowzeePicFront:: INCBIN "gfx/pokemon/front_yellow/drowzee.pic"
+DrowzeePicBack:: INCBIN "gfx/pokemon/back/drowzeeb.pic"
+GolemPicFront:: INCBIN "gfx/pokemon/front_yellow/golem.pic"
+GolemPicBack:: INCBIN "gfx/pokemon/back/golemb.pic"
+MagmarPicFront:: INCBIN "gfx/pokemon/front_yellow/magmar.pic"
+MagmarPicBack:: INCBIN "gfx/pokemon/back/magmarb.pic"
+ElectabuzzPicFront:: INCBIN "gfx/pokemon/front_yellow/electabuzz.pic"
+ElectabuzzPicBack:: INCBIN "gfx/pokemon/back/electabuzzb.pic"
+MagnetonPicFront:: INCBIN "gfx/pokemon/front_yellow/magneton.pic"
+MagnetonPicBack:: INCBIN "gfx/pokemon/back/magnetonb.pic"
+KoffingPicFront:: INCBIN "gfx/pokemon/front_yellow/koffing.pic"
+KoffingPicBack:: INCBIN "gfx/pokemon/back/koffingb.pic"
+MankeyPicFront:: INCBIN "gfx/pokemon/front_yellow/mankey.pic"
+MankeyPicBack:: INCBIN "gfx/pokemon/back/mankeyb.pic"
+SeelPicFront:: INCBIN "gfx/pokemon/front_yellow/seel.pic"
+SeelPicBack:: INCBIN "gfx/pokemon/back/seelb.pic"
+DiglettPicFront:: INCBIN "gfx/pokemon/front_yellow/diglett.pic"
+DiglettPicBack:: INCBIN "gfx/pokemon/back/diglettb.pic"
+TaurosPicFront:: INCBIN "gfx/pokemon/front_yellow/tauros.pic"
+TaurosPicBack:: INCBIN "gfx/pokemon/back/taurosb.pic"
+FarfetchdPicFront:: INCBIN "gfx/pokemon/front_yellow/farfetchd.pic"
+FarfetchdPicBack:: INCBIN "gfx/pokemon/back/farfetchdb.pic"
+VenonatPicFront:: INCBIN "gfx/pokemon/front_yellow/venonat.pic"
+VenonatPicBack:: INCBIN "gfx/pokemon/back/venonatb.pic"
+DragonitePicFront:: INCBIN "gfx/pokemon/front_yellow/dragonite.pic"
+DragonitePicBack:: INCBIN "gfx/pokemon/back/dragoniteb.pic"
+DoduoPicFront:: INCBIN "gfx/pokemon/front_yellow/doduo.pic"
+DoduoPicBack:: INCBIN "gfx/pokemon/back/doduob.pic"
+PoliwagPicFront:: INCBIN "gfx/pokemon/front_yellow/poliwag.pic"
+PoliwagPicBack:: INCBIN "gfx/pokemon/back/poliwagb.pic"
+JynxPicFront:: INCBIN "gfx/pokemon/front_yellow/jynx.pic"
+JynxPicBack:: INCBIN "gfx/pokemon/back/jynxb.pic"
+MoltresPicFront:: INCBIN "gfx/pokemon/front_yellow/moltres.pic"
+MoltresPicBack:: INCBIN "gfx/pokemon/back/moltresb.pic"
+
+
+SECTION "Pics 3", ROMX
+
+ArticunoPicFront:: INCBIN "gfx/pokemon/front_yellow/articuno.pic"
+ArticunoPicBack:: INCBIN "gfx/pokemon/back/articunob.pic"
+ZapdosPicFront:: INCBIN "gfx/pokemon/front_yellow/zapdos.pic"
+ZapdosPicBack:: INCBIN "gfx/pokemon/back/zapdosb.pic"
+DittoPicFront:: INCBIN "gfx/pokemon/front_yellow/ditto.pic"
+DittoPicBack:: INCBIN "gfx/pokemon/back/dittob.pic"
+MeowthPicFront:: INCBIN "gfx/pokemon/front_yellow/meowth.pic"
+MeowthPicBack:: INCBIN "gfx/pokemon/back/meowthb.pic"
+KrabbyPicFront:: INCBIN "gfx/pokemon/front_yellow/krabby.pic"
+KrabbyPicBack:: INCBIN "gfx/pokemon/back/krabbyb.pic"
+VulpixPicFront:: INCBIN "gfx/pokemon/front_yellow/vulpix.pic"
+VulpixPicBack:: INCBIN "gfx/pokemon/back/vulpixb.pic"
+NinetalesPicFront:: INCBIN "gfx/pokemon/front_yellow/ninetales.pic"
+NinetalesPicBack:: INCBIN "gfx/pokemon/back/ninetalesb.pic"
+PikachuPicFront:: INCBIN "gfx/pokemon/front_yellow/pikachu.pic"
+PikachuPicBack:: INCBIN "gfx/pokemon/back/pikachub.pic"
+RaichuPicFront:: INCBIN "gfx/pokemon/front_yellow/raichu.pic"
+RaichuPicBack:: INCBIN "gfx/pokemon/back/raichub.pic"
+DratiniPicFront:: INCBIN "gfx/pokemon/front_yellow/dratini.pic"
+DratiniPicBack:: INCBIN "gfx/pokemon/back/dratinib.pic"
+DragonairPicFront:: INCBIN "gfx/pokemon/front_yellow/dragonair.pic"
+DragonairPicBack:: INCBIN "gfx/pokemon/back/dragonairb.pic"
+KabutoPicFront:: INCBIN "gfx/pokemon/front_yellow/kabuto.pic"
+KabutoPicBack:: INCBIN "gfx/pokemon/back/kabutob.pic"
+KabutopsPicFront:: INCBIN "gfx/pokemon/front_yellow/kabutops.pic"
+KabutopsPicBack:: INCBIN "gfx/pokemon/back/kabutopsb.pic"
+HorseaPicFront:: INCBIN "gfx/pokemon/front_yellow/horsea.pic"
+HorseaPicBack:: INCBIN "gfx/pokemon/back/horseab.pic"
+SeadraPicFront:: INCBIN "gfx/pokemon/front_yellow/seadra.pic"
+SeadraPicBack:: INCBIN "gfx/pokemon/back/seadrab.pic"
+SandshrewPicFront:: INCBIN "gfx/pokemon/front_yellow/sandshrew.pic"
+SandshrewPicBack:: INCBIN "gfx/pokemon/back/sandshrewb.pic"
+SandslashPicFront:: INCBIN "gfx/pokemon/front_yellow/sandslash.pic"
+SandslashPicBack:: INCBIN "gfx/pokemon/back/sandslashb.pic"
+OmanytePicFront:: INCBIN "gfx/pokemon/front_yellow/omanyte.pic"
+OmanytePicBack:: INCBIN "gfx/pokemon/back/omanyteb.pic"
+OmastarPicFront:: INCBIN "gfx/pokemon/front_yellow/omastar.pic"
+OmastarPicBack:: INCBIN "gfx/pokemon/back/omastarb.pic"
+JigglypuffPicFront:: INCBIN "gfx/pokemon/front_yellow/jigglypuff.pic"
+JigglypuffPicBack:: INCBIN "gfx/pokemon/back/jigglypuffb.pic"
+WigglytuffPicFront:: INCBIN "gfx/pokemon/front_yellow/wigglytuff.pic"
+WigglytuffPicBack:: INCBIN "gfx/pokemon/back/wigglytuffb.pic"
+EeveePicFront:: INCBIN "gfx/pokemon/front_yellow/eevee.pic"
+EeveePicBack:: INCBIN "gfx/pokemon/back/eeveeb.pic"
+FlareonPicFront:: INCBIN "gfx/pokemon/front_yellow/flareon.pic"
+FlareonPicBack:: INCBIN "gfx/pokemon/back/flareonb.pic"
+JolteonPicFront:: INCBIN "gfx/pokemon/front_yellow/jolteon.pic"
+JolteonPicBack:: INCBIN "gfx/pokemon/back/jolteonb.pic"
+VaporeonPicFront:: INCBIN "gfx/pokemon/front_yellow/vaporeon.pic"
+VaporeonPicBack:: INCBIN "gfx/pokemon/back/vaporeonb.pic"
+MachopPicFront:: INCBIN "gfx/pokemon/front_yellow/machop.pic"
+MachopPicBack:: INCBIN "gfx/pokemon/back/machopb.pic"
+ZubatPicFront:: INCBIN "gfx/pokemon/front_yellow/zubat.pic"
+ZubatPicBack:: INCBIN "gfx/pokemon/back/zubatb.pic"
+EkansPicFront:: INCBIN "gfx/pokemon/front_yellow/ekans.pic"
+EkansPicBack:: INCBIN "gfx/pokemon/back/ekansb.pic"
+ParasPicFront:: INCBIN "gfx/pokemon/front_yellow/paras.pic"
+ParasPicBack:: INCBIN "gfx/pokemon/back/parasb.pic"
+PoliwhirlPicFront:: INCBIN "gfx/pokemon/front_yellow/poliwhirl.pic"
+PoliwhirlPicBack:: INCBIN "gfx/pokemon/back/poliwhirlb.pic"
+PoliwrathPicFront:: INCBIN "gfx/pokemon/front_yellow/poliwrath.pic"
+PoliwrathPicBack:: INCBIN "gfx/pokemon/back/poliwrathb.pic"
+WeedlePicFront:: INCBIN "gfx/pokemon/front_yellow/weedle.pic"
+WeedlePicBack:: INCBIN "gfx/pokemon/back/weedleb.pic"
+KakunaPicFront:: INCBIN "gfx/pokemon/front_yellow/kakuna.pic"
+KakunaPicBack:: INCBIN "gfx/pokemon/back/kakunab.pic"
+BeedrillPicFront:: INCBIN "gfx/pokemon/front_yellow/beedrill.pic"
+BeedrillPicBack:: INCBIN "gfx/pokemon/back/beedrillb.pic"
+
+FossilKabutopsPic:: INCBIN "gfx/pokemon/front_yellow/fossilkabutops.pic"
+
+
+SECTION "Pics 4", ROMX
+
+DodrioPicFront:: INCBIN "gfx/pokemon/front_yellow/dodrio.pic"
+DodrioPicBack:: INCBIN "gfx/pokemon/back/dodriob.pic"
+PrimeapePicFront:: INCBIN "gfx/pokemon/front_yellow/primeape.pic"
+PrimeapePicBack:: INCBIN "gfx/pokemon/back/primeapeb.pic"
+DugtrioPicFront:: INCBIN "gfx/pokemon/front_yellow/dugtrio.pic"
+DugtrioPicBack:: INCBIN "gfx/pokemon/back/dugtriob.pic"
+VenomothPicFront:: INCBIN "gfx/pokemon/front_yellow/venomoth.pic"
+VenomothPicBack:: INCBIN "gfx/pokemon/back/venomothb.pic"
+DewgongPicFront:: INCBIN "gfx/pokemon/front_yellow/dewgong.pic"
+DewgongPicBack:: INCBIN "gfx/pokemon/back/dewgongb.pic"
+CaterpiePicFront:: INCBIN "gfx/pokemon/front_yellow/caterpie.pic"
+CaterpiePicBack:: INCBIN "gfx/pokemon/back/caterpieb.pic"
+MetapodPicFront:: INCBIN "gfx/pokemon/front_yellow/metapod.pic"
+MetapodPicBack:: INCBIN "gfx/pokemon/back/metapodb.pic"
+ButterfreePicFront:: INCBIN "gfx/pokemon/front_yellow/butterfree.pic"
+ButterfreePicBack:: INCBIN "gfx/pokemon/back/butterfreeb.pic"
+MachampPicFront:: INCBIN "gfx/pokemon/front_yellow/machamp.pic"
+MachampPicBack:: INCBIN "gfx/pokemon/back/machampb.pic"
+GolduckPicFront:: INCBIN "gfx/pokemon/front_yellow/golduck.pic"
+GolduckPicBack:: INCBIN "gfx/pokemon/back/golduckb.pic"
+HypnoPicFront:: INCBIN "gfx/pokemon/front_yellow/hypno.pic"
+HypnoPicBack:: INCBIN "gfx/pokemon/back/hypnob.pic"
+GolbatPicFront:: INCBIN "gfx/pokemon/front_yellow/golbat.pic"
+GolbatPicBack:: INCBIN "gfx/pokemon/back/golbatb.pic"
+MewtwoPicFront:: INCBIN "gfx/pokemon/front_yellow/mewtwo.pic"
+MewtwoPicBack:: INCBIN "gfx/pokemon/back/mewtwob.pic"
+SnorlaxPicFront:: INCBIN "gfx/pokemon/front_yellow/snorlax.pic"
+SnorlaxPicBack:: INCBIN "gfx/pokemon/back/snorlaxb.pic"
+MagikarpPicFront:: INCBIN "gfx/pokemon/front_yellow/magikarp.pic"
+MagikarpPicBack:: INCBIN "gfx/pokemon/back/magikarpb.pic"
+MukPicFront:: INCBIN "gfx/pokemon/front_yellow/muk.pic"
+MukPicBack:: INCBIN "gfx/pokemon/back/mukb.pic"
+KinglerPicFront:: INCBIN "gfx/pokemon/front_yellow/kingler.pic"
+KinglerPicBack:: INCBIN "gfx/pokemon/back/kinglerb.pic"
+CloysterPicFront:: INCBIN "gfx/pokemon/front_yellow/cloyster.pic"
+CloysterPicBack:: INCBIN "gfx/pokemon/back/cloysterb.pic"
+ElectrodePicFront:: INCBIN "gfx/pokemon/front_yellow/electrode.pic"
+ElectrodePicBack:: INCBIN "gfx/pokemon/back/electrodeb.pic"
+ClefablePicFront:: INCBIN "gfx/pokemon/front_yellow/clefable.pic"
+ClefablePicBack:: INCBIN "gfx/pokemon/back/clefableb.pic"
+WeezingPicFront:: INCBIN "gfx/pokemon/front_yellow/weezing.pic"
+WeezingPicBack:: INCBIN "gfx/pokemon/back/weezingb.pic"
+PersianPicFront:: INCBIN "gfx/pokemon/front_yellow/persian.pic"
+PersianPicBack:: INCBIN "gfx/pokemon/back/persianb.pic"
+MarowakPicFront:: INCBIN "gfx/pokemon/front_yellow/marowak.pic"
+MarowakPicBack:: INCBIN "gfx/pokemon/back/marowakb.pic"
+HaunterPicFront:: INCBIN "gfx/pokemon/front_yellow/haunter.pic"
+HaunterPicBack:: INCBIN "gfx/pokemon/back/haunterb.pic"
+AbraPicFront:: INCBIN "gfx/pokemon/front_yellow/abra.pic"
+AbraPicBack:: INCBIN "gfx/pokemon/back/abrab.pic"
+AlakazamPicFront:: INCBIN "gfx/pokemon/front_yellow/alakazam.pic"
+AlakazamPicBack:: INCBIN "gfx/pokemon/back/alakazamb.pic"
+PidgeottoPicFront:: INCBIN "gfx/pokemon/front_yellow/pidgeotto.pic"
+PidgeottoPicBack:: INCBIN "gfx/pokemon/back/pidgeottob.pic"
+PidgeotPicFront:: INCBIN "gfx/pokemon/front_yellow/pidgeot.pic"
+PidgeotPicBack:: INCBIN "gfx/pokemon/back/pidgeotb.pic"
+StarmiePicFront:: INCBIN "gfx/pokemon/front_yellow/starmie.pic"
+StarmiePicBack:: INCBIN "gfx/pokemon/back/starmieb.pic"
+
+
+SECTION "Pics 5", ROMX
+
+BulbasaurPicFront:: INCBIN "gfx/pokemon/front_yellow/bulbasaur.pic"
+BulbasaurPicBack:: INCBIN "gfx/pokemon/back/bulbasaurb.pic"
+VenusaurPicFront:: INCBIN "gfx/pokemon/front_yellow/venusaur.pic"
+VenusaurPicBack:: INCBIN "gfx/pokemon/back/venusaurb.pic"
+TentacruelPicFront:: INCBIN "gfx/pokemon/front_yellow/tentacruel.pic"
+TentacruelPicBack:: INCBIN "gfx/pokemon/back/tentacruelb.pic"
+GoldeenPicFront:: INCBIN "gfx/pokemon/front_yellow/goldeen.pic"
+GoldeenPicBack:: INCBIN "gfx/pokemon/back/goldeenb.pic"
+SeakingPicFront:: INCBIN "gfx/pokemon/front_yellow/seaking.pic"
+SeakingPicBack:: INCBIN "gfx/pokemon/back/seakingb.pic"
+PonytaPicFront:: INCBIN "gfx/pokemon/front_yellow/ponyta.pic"
+RapidashPicFront:: INCBIN "gfx/pokemon/front_yellow/rapidash.pic"
+PonytaPicBack:: INCBIN "gfx/pokemon/back/ponytab.pic"
+RapidashPicBack:: INCBIN "gfx/pokemon/back/rapidashb.pic"
+RattataPicFront:: INCBIN "gfx/pokemon/front_yellow/rattata.pic"
+RattataPicBack:: INCBIN "gfx/pokemon/back/rattatab.pic"
+RaticatePicFront:: INCBIN "gfx/pokemon/front_yellow/raticate.pic"
+RaticatePicBack:: INCBIN "gfx/pokemon/back/raticateb.pic"
+NidorinoPicFront:: INCBIN "gfx/pokemon/front_yellow/nidorino.pic"
+NidorinoPicBack:: INCBIN "gfx/pokemon/back/nidorinob.pic"
+NidorinaPicFront:: INCBIN "gfx/pokemon/front_yellow/nidorina.pic"
+NidorinaPicBack:: INCBIN "gfx/pokemon/back/nidorinab.pic"
+GeodudePicFront:: INCBIN "gfx/pokemon/front_yellow/geodude.pic"
+GeodudePicBack:: INCBIN "gfx/pokemon/back/geodudeb.pic"
+PorygonPicFront:: INCBIN "gfx/pokemon/front_yellow/porygon.pic"
+PorygonPicBack:: INCBIN "gfx/pokemon/back/porygonb.pic"
+AerodactylPicFront:: INCBIN "gfx/pokemon/front_yellow/aerodactyl.pic"
+AerodactylPicBack:: INCBIN "gfx/pokemon/back/aerodactylb.pic"
+MagnemitePicFront:: INCBIN "gfx/pokemon/front_yellow/magnemite.pic"
+MagnemitePicBack:: INCBIN "gfx/pokemon/back/magnemiteb.pic"
+CharmanderPicFront:: INCBIN "gfx/pokemon/front_yellow/charmander.pic"
+CharmanderPicBack:: INCBIN "gfx/pokemon/back/charmanderb.pic"
+SquirtlePicFront:: INCBIN "gfx/pokemon/front_yellow/squirtle.pic"
+SquirtlePicBack:: INCBIN "gfx/pokemon/back/squirtleb.pic"
+CharmeleonPicFront:: INCBIN "gfx/pokemon/front_yellow/charmeleon.pic"
+CharmeleonPicBack:: INCBIN "gfx/pokemon/back/charmeleonb.pic"
+WartortlePicFront:: INCBIN "gfx/pokemon/front_yellow/wartortle.pic"
+WartortlePicBack:: INCBIN "gfx/pokemon/back/wartortleb.pic"
+CharizardPicFront:: INCBIN "gfx/pokemon/front_yellow/charizard.pic"
+CharizardPicBack:: INCBIN "gfx/pokemon/back/charizardb.pic"
+FossilAerodactylPic:: INCBIN "gfx/pokemon/front_yellow/fossilaerodactyl.pic"
+GhostPic:: INCBIN "gfx/battle/ghost.pic"
+OddishPicFront:: INCBIN "gfx/pokemon/front_yellow/oddish.pic"
+OddishPicBack:: INCBIN "gfx/pokemon/back/oddishb.pic"
+GloomPicFront:: INCBIN "gfx/pokemon/front_yellow/gloom.pic"
+GloomPicBack:: INCBIN "gfx/pokemon/back/gloomb.pic"
+VileplumePicFront:: INCBIN "gfx/pokemon/front_yellow/vileplume.pic"
+VileplumePicBack:: INCBIN "gfx/pokemon/back/vileplumeb.pic"
+BellsproutPicFront:: INCBIN "gfx/pokemon/front_yellow/bellsprout.pic"
+BellsproutPicBack:: INCBIN "gfx/pokemon/back/bellsproutb.pic"
+WeepinbellPicFront:: INCBIN "gfx/pokemon/front_yellow/weepinbell.pic"
+WeepinbellPicBack:: INCBIN "gfx/pokemon/back/weepinbellb.pic"
+VictreebelPicFront:: INCBIN "gfx/pokemon/front_yellow/victreebel.pic"
+VictreebelPicBack:: INCBIN "gfx/pokemon/back/victreebelb.pic"
+
+
+SECTION "Pics 6", ROMX
+
+TrainerPics::
+YoungsterPic:: INCBIN "gfx/trainers/youngster.pic"
+BugCatcherPic:: INCBIN "gfx/trainers/bugcatcher.pic"
+LassPic:: INCBIN "gfx/trainers/lass.pic"
+SailorPic:: INCBIN "gfx/trainers/sailor.pic"
+JrTrainerMPic:: INCBIN "gfx/trainers/jr.trainerm.pic"
+JrTrainerFPic:: INCBIN "gfx/trainers/jr.trainerf.pic"
+PokemaniacPic:: INCBIN "gfx/trainers/pokemaniac.pic"
+SuperNerdPic:: INCBIN "gfx/trainers/supernerd.pic"
+HikerPic:: INCBIN "gfx/trainers/hiker.pic"
+BikerPic:: INCBIN "gfx/trainers/biker.pic"
+BurglarPic:: INCBIN "gfx/trainers/burglar.pic"
+EngineerPic:: INCBIN "gfx/trainers/engineer.pic"
+FisherPic:: INCBIN "gfx/trainers/fisher.pic"
+SwimmerPic:: INCBIN "gfx/trainers/swimmer.pic"
+CueBallPic:: INCBIN "gfx/trainers/cueball.pic"
+GamblerPic:: INCBIN "gfx/trainers/gambler.pic"
+BeautyPic:: INCBIN "gfx/trainers/beauty.pic"
+PsychicPic:: INCBIN "gfx/trainers/psychic.pic"
+RockerPic:: INCBIN "gfx/trainers/rocker.pic"
+JugglerPic:: INCBIN "gfx/trainers/juggler.pic"
+TamerPic:: INCBIN "gfx/trainers/tamer.pic"
+BirdKeeperPic:: INCBIN "gfx/trainers/birdkeeper.pic"
+BlackbeltPic:: INCBIN "gfx/trainers/blackbelt.pic"
+Rival1Pic:: INCBIN "gfx/trainers/yellow/rival1.pic"
+ProfOakPic:: INCBIN "gfx/trainers/prof.oak.pic"
+ChiefPic::
+ScientistPic:: INCBIN "gfx/trainers/scientist.pic"
+GiovanniPic:: INCBIN "gfx/trainers/giovanni.pic"
+RocketPic:: INCBIN "gfx/trainers/rocket.pic"
+CooltrainerMPic:: INCBIN "gfx/trainers/cooltrainerm.pic"
+CooltrainerFPic:: INCBIN "gfx/trainers/cooltrainerf.pic"
+BrunoPic:: INCBIN "gfx/trainers/bruno.pic"
+BrockPic:: INCBIN "gfx/trainers/yellow/brock.pic"
+MistyPic:: INCBIN "gfx/trainers/yellow/misty.pic"
+LtSurgePic:: INCBIN "gfx/trainers/lt.surge.pic"
+ErikaPic:: INCBIN "gfx/trainers/yellow/erika.pic"
+KogaPic:: INCBIN "gfx/trainers/koga.pic"
+BlainePic:: INCBIN "gfx/trainers/blaine.pic"
+SabrinaPic:: INCBIN "gfx/trainers/sabrina.pic"
+GentlemanPic:: INCBIN "gfx/trainers/gentleman.pic"
+Rival2Pic:: INCBIN "gfx/trainers/yellow/rival2.pic"
+Rival3Pic:: INCBIN "gfx/trainers/yellow/rival3.pic"
+LoreleiPic:: INCBIN "gfx/trainers/lorelei.pic"
+ChannelerPic:: INCBIN "gfx/trainers/channeler.pic"
+AgathaPic:: INCBIN "gfx/trainers/agatha.pic"
+LancePic:: INCBIN "gfx/trainers/lance.pic"
+JessieJamesPic:: INCBIN "gfx/trainers/yellow/jessiejames.pic"
diff --git a/gfx/player.asm b/gfx/player.asm
new file mode 100644
index 00000000..20eb48b4
--- /dev/null
+++ b/gfx/player.asm
@@ -0,0 +1,3 @@
+RedPicFront:: INCBIN "gfx/player/yellow/red.pic"
+ShrinkPic1:: INCBIN "gfx/player/shrink1.pic"
+ShrinkPic2:: INCBIN "gfx/player/shrink2.pic"
diff --git a/pic/trainer/red.png b/gfx/player/red.png
index 9098fc76..9098fc76 100644
--- a/pic/trainer/red.png
+++ b/gfx/player/red.png
Binary files differ
diff --git a/pic/trainer/redb.png b/gfx/player/redb.png
index 6e8d9eec..6e8d9eec 100644
--- a/pic/trainer/redb.png
+++ b/gfx/player/redb.png
Binary files differ
diff --git a/pic/trainer/shrink1.png b/gfx/player/shrink1.png
index ef7a61ae..ef7a61ae 100644
--- a/pic/trainer/shrink1.png
+++ b/gfx/player/shrink1.png
Binary files differ
diff --git a/pic/trainer/shrink2.png b/gfx/player/shrink2.png
index 01706b22..01706b22 100644
--- a/pic/trainer/shrink2.png
+++ b/gfx/player/shrink2.png
Binary files differ
diff --git a/pic/ytrainer/red.png b/gfx/player/yellow/red.png
index dff68167..dff68167 100644
--- a/pic/ytrainer/red.png
+++ b/gfx/player/yellow/red.png
Binary files differ
diff --git a/gfx/pokeball.png b/gfx/pokeball.png
deleted file mode 100644
index 830f72b2..00000000
--- a/gfx/pokeball.png
+++ /dev/null
Binary files differ
diff --git a/gfx/pokedex.png b/gfx/pokedex/pokedex.png
index 0a2c89ea..0a2c89ea 100644
--- a/gfx/pokedex.png
+++ b/gfx/pokedex/pokedex.png
Binary files differ
diff --git a/pic/monback/abrab.png b/gfx/pokemon/back/abrab.png
index 828c063c..828c063c 100644
--- a/pic/monback/abrab.png
+++ b/gfx/pokemon/back/abrab.png
Binary files differ
diff --git a/pic/monback/aerodactylb.png b/gfx/pokemon/back/aerodactylb.png
index 88643489..88643489 100644
--- a/pic/monback/aerodactylb.png
+++ b/gfx/pokemon/back/aerodactylb.png
Binary files differ
diff --git a/pic/monback/alakazamb.png b/gfx/pokemon/back/alakazamb.png
index acee9083..acee9083 100644
--- a/pic/monback/alakazamb.png
+++ b/gfx/pokemon/back/alakazamb.png
Binary files differ
diff --git a/pic/monback/arbokb.png b/gfx/pokemon/back/arbokb.png
index 8aed21b5..8aed21b5 100644
--- a/pic/monback/arbokb.png
+++ b/gfx/pokemon/back/arbokb.png
Binary files differ
diff --git a/pic/monback/arcanineb.png b/gfx/pokemon/back/arcanineb.png
index bc46be7f..bc46be7f 100644
--- a/pic/monback/arcanineb.png
+++ b/gfx/pokemon/back/arcanineb.png
Binary files differ
diff --git a/pic/monback/articunob.png b/gfx/pokemon/back/articunob.png
index b4529453..b4529453 100644
--- a/pic/monback/articunob.png
+++ b/gfx/pokemon/back/articunob.png
Binary files differ
diff --git a/pic/monback/beedrillb.png b/gfx/pokemon/back/beedrillb.png
index 66787e7c..66787e7c 100644
--- a/pic/monback/beedrillb.png
+++ b/gfx/pokemon/back/beedrillb.png
Binary files differ
diff --git a/pic/monback/bellsproutb.png b/gfx/pokemon/back/bellsproutb.png
index e8682420..e8682420 100644
--- a/pic/monback/bellsproutb.png
+++ b/gfx/pokemon/back/bellsproutb.png
Binary files differ
diff --git a/pic/monback/blastoiseb.png b/gfx/pokemon/back/blastoiseb.png
index 0df4ec2c..0df4ec2c 100644
--- a/pic/monback/blastoiseb.png
+++ b/gfx/pokemon/back/blastoiseb.png
Binary files differ
diff --git a/pic/monback/bulbasaurb.png b/gfx/pokemon/back/bulbasaurb.png
index dbe2e487..dbe2e487 100644
--- a/pic/monback/bulbasaurb.png
+++ b/gfx/pokemon/back/bulbasaurb.png
Binary files differ
diff --git a/pic/monback/butterfreeb.png b/gfx/pokemon/back/butterfreeb.png
index 5f3d5ac8..5f3d5ac8 100644
--- a/pic/monback/butterfreeb.png
+++ b/gfx/pokemon/back/butterfreeb.png
Binary files differ
diff --git a/pic/monback/caterpieb.png b/gfx/pokemon/back/caterpieb.png
index f9568087..f9568087 100644
--- a/pic/monback/caterpieb.png
+++ b/gfx/pokemon/back/caterpieb.png
Binary files differ
diff --git a/pic/monback/chanseyb.png b/gfx/pokemon/back/chanseyb.png
index c2f5ac3b..c2f5ac3b 100644
--- a/pic/monback/chanseyb.png
+++ b/gfx/pokemon/back/chanseyb.png
Binary files differ
diff --git a/pic/monback/charizardb.png b/gfx/pokemon/back/charizardb.png
index f5540842..f5540842 100644
--- a/pic/monback/charizardb.png
+++ b/gfx/pokemon/back/charizardb.png
Binary files differ
diff --git a/pic/monback/charmanderb.png b/gfx/pokemon/back/charmanderb.png
index ed75d27d..ed75d27d 100644
--- a/pic/monback/charmanderb.png
+++ b/gfx/pokemon/back/charmanderb.png
Binary files differ
diff --git a/pic/monback/charmeleonb.png b/gfx/pokemon/back/charmeleonb.png
index fedd2f10..fedd2f10 100644
--- a/pic/monback/charmeleonb.png
+++ b/gfx/pokemon/back/charmeleonb.png
Binary files differ
diff --git a/pic/monback/clefableb.png b/gfx/pokemon/back/clefableb.png
index 341b48b9..341b48b9 100644
--- a/pic/monback/clefableb.png
+++ b/gfx/pokemon/back/clefableb.png
Binary files differ
diff --git a/pic/monback/clefairyb.png b/gfx/pokemon/back/clefairyb.png
index ea0590fc..ea0590fc 100644
--- a/pic/monback/clefairyb.png
+++ b/gfx/pokemon/back/clefairyb.png
Binary files differ
diff --git a/pic/monback/cloysterb.png b/gfx/pokemon/back/cloysterb.png
index 0cfb046e..0cfb046e 100644
--- a/pic/monback/cloysterb.png
+++ b/gfx/pokemon/back/cloysterb.png
Binary files differ
diff --git a/pic/monback/cuboneb.png b/gfx/pokemon/back/cuboneb.png
index dc82e13f..dc82e13f 100644
--- a/pic/monback/cuboneb.png
+++ b/gfx/pokemon/back/cuboneb.png
Binary files differ
diff --git a/pic/monback/dewgongb.png b/gfx/pokemon/back/dewgongb.png
index cbbd148d..cbbd148d 100644
--- a/pic/monback/dewgongb.png
+++ b/gfx/pokemon/back/dewgongb.png
Binary files differ
diff --git a/pic/monback/diglettb.png b/gfx/pokemon/back/diglettb.png
index 15f4dc47..15f4dc47 100644
--- a/pic/monback/diglettb.png
+++ b/gfx/pokemon/back/diglettb.png
Binary files differ
diff --git a/pic/monback/dittob.png b/gfx/pokemon/back/dittob.png
index 9b95a5db..9b95a5db 100644
--- a/pic/monback/dittob.png
+++ b/gfx/pokemon/back/dittob.png
Binary files differ
diff --git a/pic/monback/dodriob.png b/gfx/pokemon/back/dodriob.png
index 7b5796aa..7b5796aa 100644
--- a/pic/monback/dodriob.png
+++ b/gfx/pokemon/back/dodriob.png
Binary files differ
diff --git a/pic/monback/doduob.png b/gfx/pokemon/back/doduob.png
index 007b9994..007b9994 100644
--- a/pic/monback/doduob.png
+++ b/gfx/pokemon/back/doduob.png
Binary files differ
diff --git a/pic/monback/dragonairb.png b/gfx/pokemon/back/dragonairb.png
index 581d5d6a..581d5d6a 100644
--- a/pic/monback/dragonairb.png
+++ b/gfx/pokemon/back/dragonairb.png
Binary files differ
diff --git a/pic/monback/dragoniteb.png b/gfx/pokemon/back/dragoniteb.png
index 53f14038..53f14038 100644
--- a/pic/monback/dragoniteb.png
+++ b/gfx/pokemon/back/dragoniteb.png
Binary files differ
diff --git a/pic/monback/dratinib.png b/gfx/pokemon/back/dratinib.png
index 3d40256d..3d40256d 100644
--- a/pic/monback/dratinib.png
+++ b/gfx/pokemon/back/dratinib.png
Binary files differ
diff --git a/pic/monback/drowzeeb.png b/gfx/pokemon/back/drowzeeb.png
index 682c1797..682c1797 100644
--- a/pic/monback/drowzeeb.png
+++ b/gfx/pokemon/back/drowzeeb.png
Binary files differ
diff --git a/pic/monback/dugtriob.png b/gfx/pokemon/back/dugtriob.png
index 4e72aa93..4e72aa93 100644
--- a/pic/monback/dugtriob.png
+++ b/gfx/pokemon/back/dugtriob.png
Binary files differ
diff --git a/pic/monback/eeveeb.png b/gfx/pokemon/back/eeveeb.png
index 56cfcd2c..56cfcd2c 100644
--- a/pic/monback/eeveeb.png
+++ b/gfx/pokemon/back/eeveeb.png
Binary files differ
diff --git a/pic/monback/ekansb.png b/gfx/pokemon/back/ekansb.png
index 82dd96dd..82dd96dd 100644
--- a/pic/monback/ekansb.png
+++ b/gfx/pokemon/back/ekansb.png
Binary files differ
diff --git a/pic/monback/electabuzzb.png b/gfx/pokemon/back/electabuzzb.png
index 12442d39..12442d39 100644
--- a/pic/monback/electabuzzb.png
+++ b/gfx/pokemon/back/electabuzzb.png
Binary files differ
diff --git a/pic/monback/electrodeb.png b/gfx/pokemon/back/electrodeb.png
index ab1a5550..ab1a5550 100644
--- a/pic/monback/electrodeb.png
+++ b/gfx/pokemon/back/electrodeb.png
Binary files differ
diff --git a/pic/monback/exeggcuteb.png b/gfx/pokemon/back/exeggcuteb.png
index 6af005b6..6af005b6 100644
--- a/pic/monback/exeggcuteb.png
+++ b/gfx/pokemon/back/exeggcuteb.png
Binary files differ
diff --git a/pic/monback/exeggutorb.png b/gfx/pokemon/back/exeggutorb.png
index 95777871..95777871 100644
--- a/pic/monback/exeggutorb.png
+++ b/gfx/pokemon/back/exeggutorb.png
Binary files differ
diff --git a/pic/monback/farfetchdb.png b/gfx/pokemon/back/farfetchdb.png
index 389dd556..389dd556 100644
--- a/pic/monback/farfetchdb.png
+++ b/gfx/pokemon/back/farfetchdb.png
Binary files differ
diff --git a/pic/monback/fearowb.png b/gfx/pokemon/back/fearowb.png
index 542cd06a..542cd06a 100644
--- a/pic/monback/fearowb.png
+++ b/gfx/pokemon/back/fearowb.png
Binary files differ
diff --git a/pic/monback/flareonb.png b/gfx/pokemon/back/flareonb.png
index d73544b2..d73544b2 100644
--- a/pic/monback/flareonb.png
+++ b/gfx/pokemon/back/flareonb.png
Binary files differ
diff --git a/pic/monback/gastlyb.png b/gfx/pokemon/back/gastlyb.png
index b9c9584b..b9c9584b 100644
--- a/pic/monback/gastlyb.png
+++ b/gfx/pokemon/back/gastlyb.png
Binary files differ
diff --git a/pic/monback/gengarb.png b/gfx/pokemon/back/gengarb.png
index 64ecc4c6..64ecc4c6 100644
--- a/pic/monback/gengarb.png
+++ b/gfx/pokemon/back/gengarb.png
Binary files differ
diff --git a/pic/monback/geodudeb.png b/gfx/pokemon/back/geodudeb.png
index e6d6f2a7..e6d6f2a7 100644
--- a/pic/monback/geodudeb.png
+++ b/gfx/pokemon/back/geodudeb.png
Binary files differ
diff --git a/pic/monback/gloomb.png b/gfx/pokemon/back/gloomb.png
index e05973b6..e05973b6 100644
--- a/pic/monback/gloomb.png
+++ b/gfx/pokemon/back/gloomb.png
Binary files differ
diff --git a/pic/monback/golbatb.png b/gfx/pokemon/back/golbatb.png
index bbce03c5..bbce03c5 100644
--- a/pic/monback/golbatb.png
+++ b/gfx/pokemon/back/golbatb.png
Binary files differ
diff --git a/pic/monback/goldeenb.png b/gfx/pokemon/back/goldeenb.png
index e7d242df..e7d242df 100644
--- a/pic/monback/goldeenb.png
+++ b/gfx/pokemon/back/goldeenb.png
Binary files differ
diff --git a/pic/monback/golduckb.png b/gfx/pokemon/back/golduckb.png
index 634605e2..634605e2 100644
--- a/pic/monback/golduckb.png
+++ b/gfx/pokemon/back/golduckb.png
Binary files differ
diff --git a/pic/monback/golemb.png b/gfx/pokemon/back/golemb.png
index 1242d7b5..1242d7b5 100644
--- a/pic/monback/golemb.png
+++ b/gfx/pokemon/back/golemb.png
Binary files differ
diff --git a/pic/monback/gravelerb.png b/gfx/pokemon/back/gravelerb.png
index 18a9c317..18a9c317 100644
--- a/pic/monback/gravelerb.png
+++ b/gfx/pokemon/back/gravelerb.png
Binary files differ
diff --git a/pic/monback/grimerb.png b/gfx/pokemon/back/grimerb.png
index d4b6baf3..d4b6baf3 100644
--- a/pic/monback/grimerb.png
+++ b/gfx/pokemon/back/grimerb.png
Binary files differ
diff --git a/pic/monback/growlitheb.png b/gfx/pokemon/back/growlitheb.png
index b5dd0f7f..b5dd0f7f 100644
--- a/pic/monback/growlitheb.png
+++ b/gfx/pokemon/back/growlitheb.png
Binary files differ
diff --git a/pic/monback/gyaradosb.png b/gfx/pokemon/back/gyaradosb.png
index 3c6e05a4..3c6e05a4 100644
--- a/pic/monback/gyaradosb.png
+++ b/gfx/pokemon/back/gyaradosb.png
Binary files differ
diff --git a/pic/monback/haunterb.png b/gfx/pokemon/back/haunterb.png
index 3767db06..3767db06 100644
--- a/pic/monback/haunterb.png
+++ b/gfx/pokemon/back/haunterb.png
Binary files differ
diff --git a/pic/monback/hitmonchanb.png b/gfx/pokemon/back/hitmonchanb.png
index 7b7f0ee6..7b7f0ee6 100644
--- a/pic/monback/hitmonchanb.png
+++ b/gfx/pokemon/back/hitmonchanb.png
Binary files differ
diff --git a/pic/monback/hitmonleeb.png b/gfx/pokemon/back/hitmonleeb.png
index 17251aff..17251aff 100644
--- a/pic/monback/hitmonleeb.png
+++ b/gfx/pokemon/back/hitmonleeb.png
Binary files differ
diff --git a/pic/monback/horseab.png b/gfx/pokemon/back/horseab.png
index 39e9163e..39e9163e 100644
--- a/pic/monback/horseab.png
+++ b/gfx/pokemon/back/horseab.png
Binary files differ
diff --git a/pic/monback/hypnob.png b/gfx/pokemon/back/hypnob.png
index 90bcd0e7..90bcd0e7 100644
--- a/pic/monback/hypnob.png
+++ b/gfx/pokemon/back/hypnob.png
Binary files differ
diff --git a/pic/monback/ivysaurb.png b/gfx/pokemon/back/ivysaurb.png
index c6070b7a..c6070b7a 100644
--- a/pic/monback/ivysaurb.png
+++ b/gfx/pokemon/back/ivysaurb.png
Binary files differ
diff --git a/pic/monback/jigglypuffb.png b/gfx/pokemon/back/jigglypuffb.png
index cb224907..cb224907 100644
--- a/pic/monback/jigglypuffb.png
+++ b/gfx/pokemon/back/jigglypuffb.png
Binary files differ
diff --git a/pic/monback/jolteonb.png b/gfx/pokemon/back/jolteonb.png
index 30e92499..30e92499 100644
--- a/pic/monback/jolteonb.png
+++ b/gfx/pokemon/back/jolteonb.png
Binary files differ
diff --git a/pic/monback/jynxb.png b/gfx/pokemon/back/jynxb.png
index 00c2ad04..00c2ad04 100644
--- a/pic/monback/jynxb.png
+++ b/gfx/pokemon/back/jynxb.png
Binary files differ
diff --git a/pic/monback/kabutob.png b/gfx/pokemon/back/kabutob.png
index 8c744494..8c744494 100644
--- a/pic/monback/kabutob.png
+++ b/gfx/pokemon/back/kabutob.png
Binary files differ
diff --git a/pic/monback/kabutopsb.png b/gfx/pokemon/back/kabutopsb.png
index cdd1be4f..cdd1be4f 100644
--- a/pic/monback/kabutopsb.png
+++ b/gfx/pokemon/back/kabutopsb.png
Binary files differ
diff --git a/pic/monback/kadabrab.png b/gfx/pokemon/back/kadabrab.png
index a82d2f11..a82d2f11 100644
--- a/pic/monback/kadabrab.png
+++ b/gfx/pokemon/back/kadabrab.png
Binary files differ
diff --git a/pic/monback/kakunab.png b/gfx/pokemon/back/kakunab.png
index b9fba0ae..b9fba0ae 100644
--- a/pic/monback/kakunab.png
+++ b/gfx/pokemon/back/kakunab.png
Binary files differ
diff --git a/pic/monback/kangaskhanb.png b/gfx/pokemon/back/kangaskhanb.png
index 9d39e9bc..9d39e9bc 100644
--- a/pic/monback/kangaskhanb.png
+++ b/gfx/pokemon/back/kangaskhanb.png
Binary files differ
diff --git a/pic/monback/kinglerb.png b/gfx/pokemon/back/kinglerb.png
index b7db5dc0..b7db5dc0 100644
--- a/pic/monback/kinglerb.png
+++ b/gfx/pokemon/back/kinglerb.png
Binary files differ
diff --git a/pic/monback/koffingb.png b/gfx/pokemon/back/koffingb.png
index f3942061..f3942061 100644
--- a/pic/monback/koffingb.png
+++ b/gfx/pokemon/back/koffingb.png
Binary files differ
diff --git a/pic/monback/krabbyb.png b/gfx/pokemon/back/krabbyb.png
index d2e72cf8..d2e72cf8 100644
--- a/pic/monback/krabbyb.png
+++ b/gfx/pokemon/back/krabbyb.png
Binary files differ
diff --git a/pic/monback/laprasb.png b/gfx/pokemon/back/laprasb.png
index 83e852f3..83e852f3 100644
--- a/pic/monback/laprasb.png
+++ b/gfx/pokemon/back/laprasb.png
Binary files differ
diff --git a/pic/monback/lickitungb.png b/gfx/pokemon/back/lickitungb.png
index 34a8dc7f..34a8dc7f 100644
--- a/pic/monback/lickitungb.png
+++ b/gfx/pokemon/back/lickitungb.png
Binary files differ
diff --git a/pic/monback/machampb.png b/gfx/pokemon/back/machampb.png
index 816584bc..816584bc 100644
--- a/pic/monback/machampb.png
+++ b/gfx/pokemon/back/machampb.png
Binary files differ
diff --git a/pic/monback/machokeb.png b/gfx/pokemon/back/machokeb.png
index f621546f..f621546f 100644
--- a/pic/monback/machokeb.png
+++ b/gfx/pokemon/back/machokeb.png
Binary files differ
diff --git a/pic/monback/machopb.png b/gfx/pokemon/back/machopb.png
index 154f9623..154f9623 100644
--- a/pic/monback/machopb.png
+++ b/gfx/pokemon/back/machopb.png
Binary files differ
diff --git a/pic/monback/magikarpb.png b/gfx/pokemon/back/magikarpb.png
index e4e93564..e4e93564 100644
--- a/pic/monback/magikarpb.png
+++ b/gfx/pokemon/back/magikarpb.png
Binary files differ
diff --git a/pic/monback/magmarb.png b/gfx/pokemon/back/magmarb.png
index 3278b43c..3278b43c 100644
--- a/pic/monback/magmarb.png
+++ b/gfx/pokemon/back/magmarb.png
Binary files differ
diff --git a/pic/monback/magnemiteb.png b/gfx/pokemon/back/magnemiteb.png
index be2aeadb..be2aeadb 100644
--- a/pic/monback/magnemiteb.png
+++ b/gfx/pokemon/back/magnemiteb.png
Binary files differ
diff --git a/pic/monback/magnetonb.png b/gfx/pokemon/back/magnetonb.png
index 19874b61..19874b61 100644
--- a/pic/monback/magnetonb.png
+++ b/gfx/pokemon/back/magnetonb.png
Binary files differ
diff --git a/pic/monback/mankeyb.png b/gfx/pokemon/back/mankeyb.png
index bba4907b..bba4907b 100644
--- a/pic/monback/mankeyb.png
+++ b/gfx/pokemon/back/mankeyb.png
Binary files differ
diff --git a/pic/monback/marowakb.png b/gfx/pokemon/back/marowakb.png
index 62907099..62907099 100644
--- a/pic/monback/marowakb.png
+++ b/gfx/pokemon/back/marowakb.png
Binary files differ
diff --git a/pic/monback/meowthb.png b/gfx/pokemon/back/meowthb.png
index c9d7057b..c9d7057b 100644
--- a/pic/monback/meowthb.png
+++ b/gfx/pokemon/back/meowthb.png
Binary files differ
diff --git a/pic/monback/metapodb.png b/gfx/pokemon/back/metapodb.png
index db7d4e06..db7d4e06 100644
--- a/pic/monback/metapodb.png
+++ b/gfx/pokemon/back/metapodb.png
Binary files differ
diff --git a/pic/monback/mewb.png b/gfx/pokemon/back/mewb.png
index 89816a6f..89816a6f 100644
--- a/pic/monback/mewb.png
+++ b/gfx/pokemon/back/mewb.png
Binary files differ
diff --git a/pic/monback/mewtwob.png b/gfx/pokemon/back/mewtwob.png
index c57ffe5d..c57ffe5d 100644
--- a/pic/monback/mewtwob.png
+++ b/gfx/pokemon/back/mewtwob.png
Binary files differ
diff --git a/pic/monback/moltresb.png b/gfx/pokemon/back/moltresb.png
index 992708c9..992708c9 100644
--- a/pic/monback/moltresb.png
+++ b/gfx/pokemon/back/moltresb.png
Binary files differ
diff --git a/pic/monback/mr.mimeb.png b/gfx/pokemon/back/mr.mimeb.png
index 3902dace..3902dace 100644
--- a/pic/monback/mr.mimeb.png
+++ b/gfx/pokemon/back/mr.mimeb.png
Binary files differ
diff --git a/pic/monback/mukb.png b/gfx/pokemon/back/mukb.png
index 9fcaab51..9fcaab51 100644
--- a/pic/monback/mukb.png
+++ b/gfx/pokemon/back/mukb.png
Binary files differ
diff --git a/pic/monback/nidokingb.png b/gfx/pokemon/back/nidokingb.png
index cfd9c689..cfd9c689 100644
--- a/pic/monback/nidokingb.png
+++ b/gfx/pokemon/back/nidokingb.png
Binary files differ
diff --git a/pic/monback/nidoqueenb.png b/gfx/pokemon/back/nidoqueenb.png
index c6114752..c6114752 100644
--- a/pic/monback/nidoqueenb.png
+++ b/gfx/pokemon/back/nidoqueenb.png
Binary files differ
diff --git a/pic/monback/nidoranfb.png b/gfx/pokemon/back/nidoranfb.png
index 803ac656..803ac656 100644
--- a/pic/monback/nidoranfb.png
+++ b/gfx/pokemon/back/nidoranfb.png
Binary files differ
diff --git a/pic/monback/nidoranmb.png b/gfx/pokemon/back/nidoranmb.png
index 756fe9bf..756fe9bf 100644
--- a/pic/monback/nidoranmb.png
+++ b/gfx/pokemon/back/nidoranmb.png
Binary files differ
diff --git a/pic/monback/nidorinab.png b/gfx/pokemon/back/nidorinab.png
index 7b369bcc..7b369bcc 100644
--- a/pic/monback/nidorinab.png
+++ b/gfx/pokemon/back/nidorinab.png
Binary files differ
diff --git a/pic/monback/nidorinob.png b/gfx/pokemon/back/nidorinob.png
index a5df5095..a5df5095 100644
--- a/pic/monback/nidorinob.png
+++ b/gfx/pokemon/back/nidorinob.png
Binary files differ
diff --git a/pic/monback/ninetalesb.png b/gfx/pokemon/back/ninetalesb.png
index 8c5e5953..8c5e5953 100644
--- a/pic/monback/ninetalesb.png
+++ b/gfx/pokemon/back/ninetalesb.png
Binary files differ
diff --git a/pic/monback/oddishb.png b/gfx/pokemon/back/oddishb.png
index 022491c4..022491c4 100644
--- a/pic/monback/oddishb.png
+++ b/gfx/pokemon/back/oddishb.png
Binary files differ
diff --git a/pic/monback/omanyteb.png b/gfx/pokemon/back/omanyteb.png
index fd3152e8..fd3152e8 100644
--- a/pic/monback/omanyteb.png
+++ b/gfx/pokemon/back/omanyteb.png
Binary files differ
diff --git a/pic/monback/omastarb.png b/gfx/pokemon/back/omastarb.png
index 38defee4..38defee4 100644
--- a/pic/monback/omastarb.png
+++ b/gfx/pokemon/back/omastarb.png
Binary files differ
diff --git a/pic/monback/onixb.png b/gfx/pokemon/back/onixb.png
index c2f35005..c2f35005 100644
--- a/pic/monback/onixb.png
+++ b/gfx/pokemon/back/onixb.png
Binary files differ
diff --git a/pic/monback/parasb.png b/gfx/pokemon/back/parasb.png
index 810cac1a..810cac1a 100644
--- a/pic/monback/parasb.png
+++ b/gfx/pokemon/back/parasb.png
Binary files differ
diff --git a/pic/monback/parasectb.png b/gfx/pokemon/back/parasectb.png
index 1cbaade2..1cbaade2 100644
--- a/pic/monback/parasectb.png
+++ b/gfx/pokemon/back/parasectb.png
Binary files differ
diff --git a/pic/monback/persianb.png b/gfx/pokemon/back/persianb.png
index 6fe4545d..6fe4545d 100644
--- a/pic/monback/persianb.png
+++ b/gfx/pokemon/back/persianb.png
Binary files differ
diff --git a/pic/monback/pidgeotb.png b/gfx/pokemon/back/pidgeotb.png
index 06131268..06131268 100644
--- a/pic/monback/pidgeotb.png
+++ b/gfx/pokemon/back/pidgeotb.png
Binary files differ
diff --git a/pic/monback/pidgeottob.png b/gfx/pokemon/back/pidgeottob.png
index b7b5f707..b7b5f707 100644
--- a/pic/monback/pidgeottob.png
+++ b/gfx/pokemon/back/pidgeottob.png
Binary files differ
diff --git a/pic/monback/pidgeyb.png b/gfx/pokemon/back/pidgeyb.png
index c7eec098..c7eec098 100644
--- a/pic/monback/pidgeyb.png
+++ b/gfx/pokemon/back/pidgeyb.png
Binary files differ
diff --git a/pic/monback/pikachub.png b/gfx/pokemon/back/pikachub.png
index a0cb1faf..a0cb1faf 100644
--- a/pic/monback/pikachub.png
+++ b/gfx/pokemon/back/pikachub.png
Binary files differ
diff --git a/pic/monback/pinsirb.png b/gfx/pokemon/back/pinsirb.png
index 14b65dc5..14b65dc5 100644
--- a/pic/monback/pinsirb.png
+++ b/gfx/pokemon/back/pinsirb.png
Binary files differ
diff --git a/pic/monback/poliwagb.png b/gfx/pokemon/back/poliwagb.png
index d46d804f..d46d804f 100644
--- a/pic/monback/poliwagb.png
+++ b/gfx/pokemon/back/poliwagb.png
Binary files differ
diff --git a/pic/monback/poliwhirlb.png b/gfx/pokemon/back/poliwhirlb.png
index 0b078460..0b078460 100644
--- a/pic/monback/poliwhirlb.png
+++ b/gfx/pokemon/back/poliwhirlb.png
Binary files differ
diff --git a/pic/monback/poliwrathb.png b/gfx/pokemon/back/poliwrathb.png
index 9d80eafc..9d80eafc 100644
--- a/pic/monback/poliwrathb.png
+++ b/gfx/pokemon/back/poliwrathb.png
Binary files differ
diff --git a/pic/monback/ponytab.png b/gfx/pokemon/back/ponytab.png
index 1efc01af..1efc01af 100644
--- a/pic/monback/ponytab.png
+++ b/gfx/pokemon/back/ponytab.png
Binary files differ
diff --git a/pic/monback/porygonb.png b/gfx/pokemon/back/porygonb.png
index c9f94319..c9f94319 100644
--- a/pic/monback/porygonb.png
+++ b/gfx/pokemon/back/porygonb.png
Binary files differ
diff --git a/pic/monback/primeapeb.png b/gfx/pokemon/back/primeapeb.png
index 0a4da28f..0a4da28f 100644
--- a/pic/monback/primeapeb.png
+++ b/gfx/pokemon/back/primeapeb.png
Binary files differ
diff --git a/pic/monback/psyduckb.png b/gfx/pokemon/back/psyduckb.png
index 7d77dc75..7d77dc75 100644
--- a/pic/monback/psyduckb.png
+++ b/gfx/pokemon/back/psyduckb.png
Binary files differ
diff --git a/pic/monback/raichub.png b/gfx/pokemon/back/raichub.png
index 3d8d93c7..3d8d93c7 100644
--- a/pic/monback/raichub.png
+++ b/gfx/pokemon/back/raichub.png
Binary files differ
diff --git a/pic/monback/rapidashb.png b/gfx/pokemon/back/rapidashb.png
index 36258b71..36258b71 100644
--- a/pic/monback/rapidashb.png
+++ b/gfx/pokemon/back/rapidashb.png
Binary files differ
diff --git a/pic/monback/raticateb.png b/gfx/pokemon/back/raticateb.png
index bbc1ac5a..bbc1ac5a 100644
--- a/pic/monback/raticateb.png
+++ b/gfx/pokemon/back/raticateb.png
Binary files differ
diff --git a/pic/monback/rattatab.png b/gfx/pokemon/back/rattatab.png
index e1aa812d..e1aa812d 100644
--- a/pic/monback/rattatab.png
+++ b/gfx/pokemon/back/rattatab.png
Binary files differ
diff --git a/pic/monback/rhydonb.png b/gfx/pokemon/back/rhydonb.png
index 12a20582..12a20582 100644
--- a/pic/monback/rhydonb.png
+++ b/gfx/pokemon/back/rhydonb.png
Binary files differ
diff --git a/pic/monback/rhyhornb.png b/gfx/pokemon/back/rhyhornb.png
index 88dc72c1..88dc72c1 100644
--- a/pic/monback/rhyhornb.png
+++ b/gfx/pokemon/back/rhyhornb.png
Binary files differ
diff --git a/pic/monback/sandshrewb.png b/gfx/pokemon/back/sandshrewb.png
index 439c59f0..439c59f0 100644
--- a/pic/monback/sandshrewb.png
+++ b/gfx/pokemon/back/sandshrewb.png
Binary files differ
diff --git a/pic/monback/sandslashb.png b/gfx/pokemon/back/sandslashb.png
index 18a5490f..18a5490f 100644
--- a/pic/monback/sandslashb.png
+++ b/gfx/pokemon/back/sandslashb.png
Binary files differ
diff --git a/pic/monback/scytherb.png b/gfx/pokemon/back/scytherb.png
index d68204b0..d68204b0 100644
--- a/pic/monback/scytherb.png
+++ b/gfx/pokemon/back/scytherb.png
Binary files differ
diff --git a/pic/monback/seadrab.png b/gfx/pokemon/back/seadrab.png
index a7ab0daf..a7ab0daf 100644
--- a/pic/monback/seadrab.png
+++ b/gfx/pokemon/back/seadrab.png
Binary files differ
diff --git a/pic/monback/seakingb.png b/gfx/pokemon/back/seakingb.png
index a46b61b8..a46b61b8 100644
--- a/pic/monback/seakingb.png
+++ b/gfx/pokemon/back/seakingb.png
Binary files differ
diff --git a/pic/monback/seelb.png b/gfx/pokemon/back/seelb.png
index f8b1a190..f8b1a190 100644
--- a/pic/monback/seelb.png
+++ b/gfx/pokemon/back/seelb.png
Binary files differ
diff --git a/pic/monback/shellderb.png b/gfx/pokemon/back/shellderb.png
index e7288bf6..e7288bf6 100644
--- a/pic/monback/shellderb.png
+++ b/gfx/pokemon/back/shellderb.png
Binary files differ
diff --git a/pic/monback/slowbrob.png b/gfx/pokemon/back/slowbrob.png
index d1a58548..d1a58548 100644
--- a/pic/monback/slowbrob.png
+++ b/gfx/pokemon/back/slowbrob.png
Binary files differ
diff --git a/pic/monback/slowpokeb.png b/gfx/pokemon/back/slowpokeb.png
index ddb3a878..ddb3a878 100644
--- a/pic/monback/slowpokeb.png
+++ b/gfx/pokemon/back/slowpokeb.png
Binary files differ
diff --git a/pic/monback/snorlaxb.png b/gfx/pokemon/back/snorlaxb.png
index ea704f80..ea704f80 100644
--- a/pic/monback/snorlaxb.png
+++ b/gfx/pokemon/back/snorlaxb.png
Binary files differ
diff --git a/pic/monback/spearowb.png b/gfx/pokemon/back/spearowb.png
index 7bd385a9..7bd385a9 100644
--- a/pic/monback/spearowb.png
+++ b/gfx/pokemon/back/spearowb.png
Binary files differ
diff --git a/pic/monback/squirtleb.png b/gfx/pokemon/back/squirtleb.png
index a5679293..a5679293 100644
--- a/pic/monback/squirtleb.png
+++ b/gfx/pokemon/back/squirtleb.png
Binary files differ
diff --git a/pic/monback/starmieb.png b/gfx/pokemon/back/starmieb.png
index f01303b8..f01303b8 100644
--- a/pic/monback/starmieb.png
+++ b/gfx/pokemon/back/starmieb.png
Binary files differ
diff --git a/pic/monback/staryub.png b/gfx/pokemon/back/staryub.png
index 2e35efa8..2e35efa8 100644
--- a/pic/monback/staryub.png
+++ b/gfx/pokemon/back/staryub.png
Binary files differ
diff --git a/pic/monback/tangelab.png b/gfx/pokemon/back/tangelab.png
index cbb035d9..cbb035d9 100644
--- a/pic/monback/tangelab.png
+++ b/gfx/pokemon/back/tangelab.png
Binary files differ
diff --git a/pic/monback/taurosb.png b/gfx/pokemon/back/taurosb.png
index 9e835e80..9e835e80 100644
--- a/pic/monback/taurosb.png
+++ b/gfx/pokemon/back/taurosb.png
Binary files differ
diff --git a/pic/monback/tentacoolb.png b/gfx/pokemon/back/tentacoolb.png
index 5aa3b9cd..5aa3b9cd 100644
--- a/pic/monback/tentacoolb.png
+++ b/gfx/pokemon/back/tentacoolb.png
Binary files differ
diff --git a/pic/monback/tentacruelb.png b/gfx/pokemon/back/tentacruelb.png
index 8510367f..8510367f 100644
--- a/pic/monback/tentacruelb.png
+++ b/gfx/pokemon/back/tentacruelb.png
Binary files differ
diff --git a/pic/monback/vaporeonb.png b/gfx/pokemon/back/vaporeonb.png
index dd7f7818..dd7f7818 100644
--- a/pic/monback/vaporeonb.png
+++ b/gfx/pokemon/back/vaporeonb.png
Binary files differ
diff --git a/pic/monback/venomothb.png b/gfx/pokemon/back/venomothb.png
index 8282fa45..8282fa45 100644
--- a/pic/monback/venomothb.png
+++ b/gfx/pokemon/back/venomothb.png
Binary files differ
diff --git a/pic/monback/venonatb.png b/gfx/pokemon/back/venonatb.png
index 1eafa547..1eafa547 100644
--- a/pic/monback/venonatb.png
+++ b/gfx/pokemon/back/venonatb.png
Binary files differ
diff --git a/pic/monback/venusaurb.png b/gfx/pokemon/back/venusaurb.png
index f0f85d44..f0f85d44 100644
--- a/pic/monback/venusaurb.png
+++ b/gfx/pokemon/back/venusaurb.png
Binary files differ
diff --git a/pic/monback/victreebelb.png b/gfx/pokemon/back/victreebelb.png
index 7f1c8057..7f1c8057 100644
--- a/pic/monback/victreebelb.png
+++ b/gfx/pokemon/back/victreebelb.png
Binary files differ
diff --git a/pic/monback/vileplumeb.png b/gfx/pokemon/back/vileplumeb.png
index 34ac2d95..34ac2d95 100644
--- a/pic/monback/vileplumeb.png
+++ b/gfx/pokemon/back/vileplumeb.png
Binary files differ
diff --git a/pic/monback/voltorbb.png b/gfx/pokemon/back/voltorbb.png
index 119bce73..119bce73 100644
--- a/pic/monback/voltorbb.png
+++ b/gfx/pokemon/back/voltorbb.png
Binary files differ
diff --git a/pic/monback/vulpixb.png b/gfx/pokemon/back/vulpixb.png
index 29bb2ff9..29bb2ff9 100644
--- a/pic/monback/vulpixb.png
+++ b/gfx/pokemon/back/vulpixb.png
Binary files differ
diff --git a/pic/monback/wartortleb.png b/gfx/pokemon/back/wartortleb.png
index d0e6ad69..d0e6ad69 100644
--- a/pic/monback/wartortleb.png
+++ b/gfx/pokemon/back/wartortleb.png
Binary files differ
diff --git a/pic/monback/weedleb.png b/gfx/pokemon/back/weedleb.png
index 2acaf4ee..2acaf4ee 100644
--- a/pic/monback/weedleb.png
+++ b/gfx/pokemon/back/weedleb.png
Binary files differ
diff --git a/pic/monback/weepinbellb.png b/gfx/pokemon/back/weepinbellb.png
index 6362db7e..6362db7e 100644
--- a/pic/monback/weepinbellb.png
+++ b/gfx/pokemon/back/weepinbellb.png
Binary files differ
diff --git a/pic/monback/weezingb.png b/gfx/pokemon/back/weezingb.png
index 20d59b12..20d59b12 100644
--- a/pic/monback/weezingb.png
+++ b/gfx/pokemon/back/weezingb.png
Binary files differ
diff --git a/pic/monback/wigglytuffb.png b/gfx/pokemon/back/wigglytuffb.png
index 235bc319..235bc319 100644
--- a/pic/monback/wigglytuffb.png
+++ b/gfx/pokemon/back/wigglytuffb.png
Binary files differ
diff --git a/pic/monback/zapdosb.png b/gfx/pokemon/back/zapdosb.png
index 72831372..72831372 100644
--- a/pic/monback/zapdosb.png
+++ b/gfx/pokemon/back/zapdosb.png
Binary files differ
diff --git a/pic/monback/zubatb.png b/gfx/pokemon/back/zubatb.png
index 2738acd8..2738acd8 100644
--- a/pic/monback/zubatb.png
+++ b/gfx/pokemon/back/zubatb.png
Binary files differ
diff --git a/gfx/pokemon/downscaled_3x3.tilemap b/gfx/pokemon/downscaled_3x3.tilemap
new file mode 100644
index 00000000..885f4a55
--- /dev/null
+++ b/gfx/pokemon/downscaled_3x3.tilemap
@@ -0,0 +1 @@
+1F[4I^7La \ No newline at end of file
diff --git a/gfx/pokemon/downscaled_5x5.tilemap b/gfx/pokemon/downscaled_5x5.tilemap
new file mode 100644
index 00000000..bc99ac23
--- /dev/null
+++ b/gfx/pokemon/downscaled_5x5.tilemap
@@ -0,0 +1 @@
+18FT[29GU\4;IW^6=KY`7>LZa \ No newline at end of file
diff --git a/gfx/pokemon/front.tilemap b/gfx/pokemon/front.tilemap
new file mode 100644
index 00000000..2f3cb316
--- /dev/null
+++ b/gfx/pokemon/front.tilemap
Binary files differ
diff --git a/gfx/pokemon/front/abra.png b/gfx/pokemon/front/abra.png
new file mode 100644
index 00000000..12045ee3
--- /dev/null
+++ b/gfx/pokemon/front/abra.png
Binary files differ
diff --git a/gfx/pokemon/front/aerodactyl.png b/gfx/pokemon/front/aerodactyl.png
new file mode 100644
index 00000000..4cbfdeeb
--- /dev/null
+++ b/gfx/pokemon/front/aerodactyl.png
Binary files differ
diff --git a/gfx/pokemon/front/alakazam.png b/gfx/pokemon/front/alakazam.png
new file mode 100644
index 00000000..9c379b6a
--- /dev/null
+++ b/gfx/pokemon/front/alakazam.png
Binary files differ
diff --git a/gfx/pokemon/front/arbok.png b/gfx/pokemon/front/arbok.png
new file mode 100644
index 00000000..bd8da001
--- /dev/null
+++ b/gfx/pokemon/front/arbok.png
Binary files differ
diff --git a/gfx/pokemon/front/arcanine.png b/gfx/pokemon/front/arcanine.png
new file mode 100644
index 00000000..5d25961d
--- /dev/null
+++ b/gfx/pokemon/front/arcanine.png
Binary files differ
diff --git a/gfx/pokemon/front/articuno.png b/gfx/pokemon/front/articuno.png
new file mode 100644
index 00000000..66986add
--- /dev/null
+++ b/gfx/pokemon/front/articuno.png
Binary files differ
diff --git a/gfx/pokemon/front/beedrill.png b/gfx/pokemon/front/beedrill.png
new file mode 100644
index 00000000..36b4a06f
--- /dev/null
+++ b/gfx/pokemon/front/beedrill.png
Binary files differ
diff --git a/gfx/pokemon/front/bellsprout.png b/gfx/pokemon/front/bellsprout.png
new file mode 100644
index 00000000..e4fc5e18
--- /dev/null
+++ b/gfx/pokemon/front/bellsprout.png
Binary files differ
diff --git a/gfx/pokemon/front/blastoise.png b/gfx/pokemon/front/blastoise.png
new file mode 100644
index 00000000..2192b43a
--- /dev/null
+++ b/gfx/pokemon/front/blastoise.png
Binary files differ
diff --git a/gfx/pokemon/front/bulbasaur.png b/gfx/pokemon/front/bulbasaur.png
new file mode 100644
index 00000000..a2a924c7
--- /dev/null
+++ b/gfx/pokemon/front/bulbasaur.png
Binary files differ
diff --git a/gfx/pokemon/front/butterfree.png b/gfx/pokemon/front/butterfree.png
new file mode 100644
index 00000000..8f1a69aa
--- /dev/null
+++ b/gfx/pokemon/front/butterfree.png
Binary files differ
diff --git a/gfx/pokemon/front/caterpie.png b/gfx/pokemon/front/caterpie.png
new file mode 100644
index 00000000..8e1a49dd
--- /dev/null
+++ b/gfx/pokemon/front/caterpie.png
Binary files differ
diff --git a/gfx/pokemon/front/chansey.png b/gfx/pokemon/front/chansey.png
new file mode 100644
index 00000000..832ba27c
--- /dev/null
+++ b/gfx/pokemon/front/chansey.png
Binary files differ
diff --git a/gfx/pokemon/front/charizard.png b/gfx/pokemon/front/charizard.png
new file mode 100644
index 00000000..ad29e489
--- /dev/null
+++ b/gfx/pokemon/front/charizard.png
Binary files differ
diff --git a/gfx/pokemon/front/charmander.png b/gfx/pokemon/front/charmander.png
new file mode 100644
index 00000000..12d16f01
--- /dev/null
+++ b/gfx/pokemon/front/charmander.png
Binary files differ
diff --git a/gfx/pokemon/front/charmeleon.png b/gfx/pokemon/front/charmeleon.png
new file mode 100644
index 00000000..a5cff72f
--- /dev/null
+++ b/gfx/pokemon/front/charmeleon.png
Binary files differ
diff --git a/gfx/pokemon/front/clefable.png b/gfx/pokemon/front/clefable.png
new file mode 100644
index 00000000..2fcfac0a
--- /dev/null
+++ b/gfx/pokemon/front/clefable.png
Binary files differ
diff --git a/gfx/pokemon/front/clefairy.png b/gfx/pokemon/front/clefairy.png
new file mode 100644
index 00000000..5a7f3721
--- /dev/null
+++ b/gfx/pokemon/front/clefairy.png
Binary files differ
diff --git a/gfx/pokemon/front/cloyster.png b/gfx/pokemon/front/cloyster.png
new file mode 100644
index 00000000..71f63a7f
--- /dev/null
+++ b/gfx/pokemon/front/cloyster.png
Binary files differ
diff --git a/gfx/pokemon/front/cubone.png b/gfx/pokemon/front/cubone.png
new file mode 100644
index 00000000..23e3a23a
--- /dev/null
+++ b/gfx/pokemon/front/cubone.png
Binary files differ
diff --git a/gfx/pokemon/front/dewgong.png b/gfx/pokemon/front/dewgong.png
new file mode 100644
index 00000000..aac4e65c
--- /dev/null
+++ b/gfx/pokemon/front/dewgong.png
Binary files differ
diff --git a/gfx/pokemon/front/diglett.png b/gfx/pokemon/front/diglett.png
new file mode 100644
index 00000000..f92ae5bc
--- /dev/null
+++ b/gfx/pokemon/front/diglett.png
Binary files differ
diff --git a/gfx/pokemon/front/ditto.png b/gfx/pokemon/front/ditto.png
new file mode 100644
index 00000000..4485e6ec
--- /dev/null
+++ b/gfx/pokemon/front/ditto.png
Binary files differ
diff --git a/gfx/pokemon/front/dodrio.png b/gfx/pokemon/front/dodrio.png
new file mode 100644
index 00000000..92e6839d
--- /dev/null
+++ b/gfx/pokemon/front/dodrio.png
Binary files differ
diff --git a/gfx/pokemon/front/doduo.png b/gfx/pokemon/front/doduo.png
new file mode 100644
index 00000000..20cba7ba
--- /dev/null
+++ b/gfx/pokemon/front/doduo.png
Binary files differ
diff --git a/gfx/pokemon/front/dragonair.png b/gfx/pokemon/front/dragonair.png
new file mode 100644
index 00000000..55d1ef5b
--- /dev/null
+++ b/gfx/pokemon/front/dragonair.png
Binary files differ
diff --git a/gfx/pokemon/front/dragonite.png b/gfx/pokemon/front/dragonite.png
new file mode 100644
index 00000000..4c387c3e
--- /dev/null
+++ b/gfx/pokemon/front/dragonite.png
Binary files differ
diff --git a/gfx/pokemon/front/dratini.png b/gfx/pokemon/front/dratini.png
new file mode 100644
index 00000000..9df332e4
--- /dev/null
+++ b/gfx/pokemon/front/dratini.png
Binary files differ
diff --git a/gfx/pokemon/front/drowzee.png b/gfx/pokemon/front/drowzee.png
new file mode 100644
index 00000000..cc85510b
--- /dev/null
+++ b/gfx/pokemon/front/drowzee.png
Binary files differ
diff --git a/gfx/pokemon/front/dugtrio.png b/gfx/pokemon/front/dugtrio.png
new file mode 100644
index 00000000..433f95ef
--- /dev/null
+++ b/gfx/pokemon/front/dugtrio.png
Binary files differ
diff --git a/gfx/pokemon/front/eevee.png b/gfx/pokemon/front/eevee.png
new file mode 100644
index 00000000..956f8ce0
--- /dev/null
+++ b/gfx/pokemon/front/eevee.png
Binary files differ
diff --git a/gfx/pokemon/front/ekans.png b/gfx/pokemon/front/ekans.png
new file mode 100644
index 00000000..6dffaf84
--- /dev/null
+++ b/gfx/pokemon/front/ekans.png
Binary files differ
diff --git a/gfx/pokemon/front/electabuzz.png b/gfx/pokemon/front/electabuzz.png
new file mode 100644
index 00000000..0ddccbe1
--- /dev/null
+++ b/gfx/pokemon/front/electabuzz.png
Binary files differ
diff --git a/gfx/pokemon/front/electrode.png b/gfx/pokemon/front/electrode.png
new file mode 100644
index 00000000..8df79e6a
--- /dev/null
+++ b/gfx/pokemon/front/electrode.png
Binary files differ
diff --git a/gfx/pokemon/front/exeggcute.png b/gfx/pokemon/front/exeggcute.png
new file mode 100644
index 00000000..0ddf8e32
--- /dev/null
+++ b/gfx/pokemon/front/exeggcute.png
Binary files differ
diff --git a/gfx/pokemon/front/exeggutor.png b/gfx/pokemon/front/exeggutor.png
new file mode 100644
index 00000000..89ccbdc4
--- /dev/null
+++ b/gfx/pokemon/front/exeggutor.png
Binary files differ
diff --git a/gfx/pokemon/front/farfetchd.png b/gfx/pokemon/front/farfetchd.png
new file mode 100644
index 00000000..490e2b7c
--- /dev/null
+++ b/gfx/pokemon/front/farfetchd.png
Binary files differ
diff --git a/gfx/pokemon/front/fearow.png b/gfx/pokemon/front/fearow.png
new file mode 100644
index 00000000..c2c65257
--- /dev/null
+++ b/gfx/pokemon/front/fearow.png
Binary files differ
diff --git a/gfx/pokemon/front/flareon.png b/gfx/pokemon/front/flareon.png
new file mode 100644
index 00000000..eadebd27
--- /dev/null
+++ b/gfx/pokemon/front/flareon.png
Binary files differ
diff --git a/pic/ymon/fossilaerodactyl.png b/gfx/pokemon/front/fossilaerodactyl.png
index eb7fc3a3..eb7fc3a3 100644
--- a/pic/ymon/fossilaerodactyl.png
+++ b/gfx/pokemon/front/fossilaerodactyl.png
Binary files differ
diff --git a/pic/ymon/fossilkabutops.png b/gfx/pokemon/front/fossilkabutops.png
index dd8d41ea..dd8d41ea 100644
--- a/pic/ymon/fossilkabutops.png
+++ b/gfx/pokemon/front/fossilkabutops.png
Binary files differ
diff --git a/gfx/pokemon/front/gastly.png b/gfx/pokemon/front/gastly.png
new file mode 100644
index 00000000..081b121d
--- /dev/null
+++ b/gfx/pokemon/front/gastly.png
Binary files differ
diff --git a/gfx/pokemon/front/gengar.png b/gfx/pokemon/front/gengar.png
new file mode 100644
index 00000000..450662d7
--- /dev/null
+++ b/gfx/pokemon/front/gengar.png
Binary files differ
diff --git a/gfx/pokemon/front/geodude.png b/gfx/pokemon/front/geodude.png
new file mode 100644
index 00000000..4202192a
--- /dev/null
+++ b/gfx/pokemon/front/geodude.png
Binary files differ
diff --git a/gfx/pokemon/front/gloom.png b/gfx/pokemon/front/gloom.png
new file mode 100644
index 00000000..c2ea9ba4
--- /dev/null
+++ b/gfx/pokemon/front/gloom.png
Binary files differ
diff --git a/gfx/pokemon/front/golbat.png b/gfx/pokemon/front/golbat.png
new file mode 100644
index 00000000..6abc6f0a
--- /dev/null
+++ b/gfx/pokemon/front/golbat.png
Binary files differ
diff --git a/gfx/pokemon/front/goldeen.png b/gfx/pokemon/front/goldeen.png
new file mode 100644
index 00000000..e8cbfddc
--- /dev/null
+++ b/gfx/pokemon/front/goldeen.png
Binary files differ
diff --git a/gfx/pokemon/front/golduck.png b/gfx/pokemon/front/golduck.png
new file mode 100644
index 00000000..5448f7c8
--- /dev/null
+++ b/gfx/pokemon/front/golduck.png
Binary files differ
diff --git a/gfx/pokemon/front/golem.png b/gfx/pokemon/front/golem.png
new file mode 100644
index 00000000..1dba6a67
--- /dev/null
+++ b/gfx/pokemon/front/golem.png
Binary files differ
diff --git a/gfx/pokemon/front/graveler.png b/gfx/pokemon/front/graveler.png
new file mode 100644
index 00000000..0d9da672
--- /dev/null
+++ b/gfx/pokemon/front/graveler.png
Binary files differ
diff --git a/gfx/pokemon/front/grimer.png b/gfx/pokemon/front/grimer.png
new file mode 100644
index 00000000..255b10b9
--- /dev/null
+++ b/gfx/pokemon/front/grimer.png
Binary files differ
diff --git a/gfx/pokemon/front/growlithe.png b/gfx/pokemon/front/growlithe.png
new file mode 100644
index 00000000..b753bce7
--- /dev/null
+++ b/gfx/pokemon/front/growlithe.png
Binary files differ
diff --git a/gfx/pokemon/front/gyarados.png b/gfx/pokemon/front/gyarados.png
new file mode 100644
index 00000000..a7ed0c17
--- /dev/null
+++ b/gfx/pokemon/front/gyarados.png
Binary files differ
diff --git a/gfx/pokemon/front/haunter.png b/gfx/pokemon/front/haunter.png
new file mode 100644
index 00000000..4d6c758d
--- /dev/null
+++ b/gfx/pokemon/front/haunter.png
Binary files differ
diff --git a/gfx/pokemon/front/hitmonchan.png b/gfx/pokemon/front/hitmonchan.png
new file mode 100644
index 00000000..d8a6ffd3
--- /dev/null
+++ b/gfx/pokemon/front/hitmonchan.png
Binary files differ
diff --git a/gfx/pokemon/front/hitmonlee.png b/gfx/pokemon/front/hitmonlee.png
new file mode 100644
index 00000000..36042c68
--- /dev/null
+++ b/gfx/pokemon/front/hitmonlee.png
Binary files differ
diff --git a/gfx/pokemon/front/horsea.png b/gfx/pokemon/front/horsea.png
new file mode 100644
index 00000000..cd28df8c
--- /dev/null
+++ b/gfx/pokemon/front/horsea.png
Binary files differ
diff --git a/gfx/pokemon/front/hypno.png b/gfx/pokemon/front/hypno.png
new file mode 100644
index 00000000..e7434ea4
--- /dev/null
+++ b/gfx/pokemon/front/hypno.png
Binary files differ
diff --git a/gfx/pokemon/front/ivysaur.png b/gfx/pokemon/front/ivysaur.png
new file mode 100644
index 00000000..dad10ae0
--- /dev/null
+++ b/gfx/pokemon/front/ivysaur.png
Binary files differ
diff --git a/gfx/pokemon/front/jigglypuff.png b/gfx/pokemon/front/jigglypuff.png
new file mode 100644
index 00000000..a5475777
--- /dev/null
+++ b/gfx/pokemon/front/jigglypuff.png
Binary files differ
diff --git a/gfx/pokemon/front/jolteon.png b/gfx/pokemon/front/jolteon.png
new file mode 100644
index 00000000..7ecd6fbb
--- /dev/null
+++ b/gfx/pokemon/front/jolteon.png
Binary files differ
diff --git a/gfx/pokemon/front/jynx.png b/gfx/pokemon/front/jynx.png
new file mode 100644
index 00000000..583bd5da
--- /dev/null
+++ b/gfx/pokemon/front/jynx.png
Binary files differ
diff --git a/gfx/pokemon/front/kabuto.png b/gfx/pokemon/front/kabuto.png
new file mode 100644
index 00000000..e8e44e15
--- /dev/null
+++ b/gfx/pokemon/front/kabuto.png
Binary files differ
diff --git a/gfx/pokemon/front/kabutops.png b/gfx/pokemon/front/kabutops.png
new file mode 100644
index 00000000..39fcb900
--- /dev/null
+++ b/gfx/pokemon/front/kabutops.png
Binary files differ
diff --git a/gfx/pokemon/front/kadabra.png b/gfx/pokemon/front/kadabra.png
new file mode 100644
index 00000000..36589440
--- /dev/null
+++ b/gfx/pokemon/front/kadabra.png
Binary files differ
diff --git a/gfx/pokemon/front/kakuna.png b/gfx/pokemon/front/kakuna.png
new file mode 100644
index 00000000..ee350ffd
--- /dev/null
+++ b/gfx/pokemon/front/kakuna.png
Binary files differ
diff --git a/gfx/pokemon/front/kangaskhan.png b/gfx/pokemon/front/kangaskhan.png
new file mode 100644
index 00000000..1c0ba99c
--- /dev/null
+++ b/gfx/pokemon/front/kangaskhan.png
Binary files differ
diff --git a/gfx/pokemon/front/kingler.png b/gfx/pokemon/front/kingler.png
new file mode 100644
index 00000000..b2bd7418
--- /dev/null
+++ b/gfx/pokemon/front/kingler.png
Binary files differ
diff --git a/gfx/pokemon/front/koffing.png b/gfx/pokemon/front/koffing.png
new file mode 100644
index 00000000..36961502
--- /dev/null
+++ b/gfx/pokemon/front/koffing.png
Binary files differ
diff --git a/gfx/pokemon/front/krabby.png b/gfx/pokemon/front/krabby.png
new file mode 100644
index 00000000..b280e8db
--- /dev/null
+++ b/gfx/pokemon/front/krabby.png
Binary files differ
diff --git a/gfx/pokemon/front/lapras.png b/gfx/pokemon/front/lapras.png
new file mode 100644
index 00000000..822c00e9
--- /dev/null
+++ b/gfx/pokemon/front/lapras.png
Binary files differ
diff --git a/gfx/pokemon/front/lickitung.png b/gfx/pokemon/front/lickitung.png
new file mode 100644
index 00000000..050f7d23
--- /dev/null
+++ b/gfx/pokemon/front/lickitung.png
Binary files differ
diff --git a/gfx/pokemon/front/machamp.png b/gfx/pokemon/front/machamp.png
new file mode 100644
index 00000000..c854a2cf
--- /dev/null
+++ b/gfx/pokemon/front/machamp.png
Binary files differ
diff --git a/gfx/pokemon/front/machoke.png b/gfx/pokemon/front/machoke.png
new file mode 100644
index 00000000..317dad96
--- /dev/null
+++ b/gfx/pokemon/front/machoke.png
Binary files differ
diff --git a/gfx/pokemon/front/machop.png b/gfx/pokemon/front/machop.png
new file mode 100644
index 00000000..63909c11
--- /dev/null
+++ b/gfx/pokemon/front/machop.png
Binary files differ
diff --git a/gfx/pokemon/front/magikarp.png b/gfx/pokemon/front/magikarp.png
new file mode 100644
index 00000000..e71402f8
--- /dev/null
+++ b/gfx/pokemon/front/magikarp.png
Binary files differ
diff --git a/gfx/pokemon/front/magmar.png b/gfx/pokemon/front/magmar.png
new file mode 100644
index 00000000..9bc1d929
--- /dev/null
+++ b/gfx/pokemon/front/magmar.png
Binary files differ
diff --git a/gfx/pokemon/front/magnemite.png b/gfx/pokemon/front/magnemite.png
new file mode 100644
index 00000000..f2254bed
--- /dev/null
+++ b/gfx/pokemon/front/magnemite.png
Binary files differ
diff --git a/gfx/pokemon/front/magneton.png b/gfx/pokemon/front/magneton.png
new file mode 100644
index 00000000..4d0f2cc7
--- /dev/null
+++ b/gfx/pokemon/front/magneton.png
Binary files differ
diff --git a/gfx/pokemon/front/mankey.png b/gfx/pokemon/front/mankey.png
new file mode 100644
index 00000000..303ce1f2
--- /dev/null
+++ b/gfx/pokemon/front/mankey.png
Binary files differ
diff --git a/gfx/pokemon/front/marowak.png b/gfx/pokemon/front/marowak.png
new file mode 100644
index 00000000..b2d18437
--- /dev/null
+++ b/gfx/pokemon/front/marowak.png
Binary files differ
diff --git a/gfx/pokemon/front/meowth.png b/gfx/pokemon/front/meowth.png
new file mode 100644
index 00000000..0e706c35
--- /dev/null
+++ b/gfx/pokemon/front/meowth.png
Binary files differ
diff --git a/gfx/pokemon/front/metapod.png b/gfx/pokemon/front/metapod.png
new file mode 100644
index 00000000..cbfa6e1e
--- /dev/null
+++ b/gfx/pokemon/front/metapod.png
Binary files differ
diff --git a/gfx/pokemon/front/mew.png b/gfx/pokemon/front/mew.png
new file mode 100644
index 00000000..7e25a96d
--- /dev/null
+++ b/gfx/pokemon/front/mew.png
Binary files differ
diff --git a/gfx/pokemon/front/mewtwo.png b/gfx/pokemon/front/mewtwo.png
new file mode 100644
index 00000000..b7a31296
--- /dev/null
+++ b/gfx/pokemon/front/mewtwo.png
Binary files differ
diff --git a/gfx/pokemon/front/moltres.png b/gfx/pokemon/front/moltres.png
new file mode 100644
index 00000000..7c153998
--- /dev/null
+++ b/gfx/pokemon/front/moltres.png
Binary files differ
diff --git a/gfx/pokemon/front/mr.mime.png b/gfx/pokemon/front/mr.mime.png
new file mode 100644
index 00000000..d9085ec6
--- /dev/null
+++ b/gfx/pokemon/front/mr.mime.png
Binary files differ
diff --git a/gfx/pokemon/front/muk.png b/gfx/pokemon/front/muk.png
new file mode 100644
index 00000000..f69b83b7
--- /dev/null
+++ b/gfx/pokemon/front/muk.png
Binary files differ
diff --git a/gfx/pokemon/front/nidoking.png b/gfx/pokemon/front/nidoking.png
new file mode 100644
index 00000000..24330538
--- /dev/null
+++ b/gfx/pokemon/front/nidoking.png
Binary files differ
diff --git a/gfx/pokemon/front/nidoqueen.png b/gfx/pokemon/front/nidoqueen.png
new file mode 100644
index 00000000..c0043e1b
--- /dev/null
+++ b/gfx/pokemon/front/nidoqueen.png
Binary files differ
diff --git a/gfx/pokemon/front/nidoranf.png b/gfx/pokemon/front/nidoranf.png
new file mode 100644
index 00000000..6b58b274
--- /dev/null
+++ b/gfx/pokemon/front/nidoranf.png
Binary files differ
diff --git a/gfx/pokemon/front/nidoranm.png b/gfx/pokemon/front/nidoranm.png
new file mode 100644
index 00000000..92d0cb49
--- /dev/null
+++ b/gfx/pokemon/front/nidoranm.png
Binary files differ
diff --git a/gfx/pokemon/front/nidorina.png b/gfx/pokemon/front/nidorina.png
new file mode 100644
index 00000000..68aca7c4
--- /dev/null
+++ b/gfx/pokemon/front/nidorina.png
Binary files differ
diff --git a/gfx/pokemon/front/nidorino.png b/gfx/pokemon/front/nidorino.png
new file mode 100644
index 00000000..795bf0c5
--- /dev/null
+++ b/gfx/pokemon/front/nidorino.png
Binary files differ
diff --git a/gfx/pokemon/front/ninetales.png b/gfx/pokemon/front/ninetales.png
new file mode 100644
index 00000000..ed6bb398
--- /dev/null
+++ b/gfx/pokemon/front/ninetales.png
Binary files differ
diff --git a/gfx/pokemon/front/oddish.png b/gfx/pokemon/front/oddish.png
new file mode 100644
index 00000000..e47dabe1
--- /dev/null
+++ b/gfx/pokemon/front/oddish.png
Binary files differ
diff --git a/gfx/pokemon/front/omanyte.png b/gfx/pokemon/front/omanyte.png
new file mode 100644
index 00000000..bdfa5440
--- /dev/null
+++ b/gfx/pokemon/front/omanyte.png
Binary files differ
diff --git a/gfx/pokemon/front/omastar.png b/gfx/pokemon/front/omastar.png
new file mode 100644
index 00000000..3221d3d8
--- /dev/null
+++ b/gfx/pokemon/front/omastar.png
Binary files differ
diff --git a/gfx/pokemon/front/onix.png b/gfx/pokemon/front/onix.png
new file mode 100644
index 00000000..44a21a61
--- /dev/null
+++ b/gfx/pokemon/front/onix.png
Binary files differ
diff --git a/gfx/pokemon/front/paras.png b/gfx/pokemon/front/paras.png
new file mode 100644
index 00000000..f4909bbd
--- /dev/null
+++ b/gfx/pokemon/front/paras.png
Binary files differ
diff --git a/gfx/pokemon/front/parasect.png b/gfx/pokemon/front/parasect.png
new file mode 100644
index 00000000..938bf53b
--- /dev/null
+++ b/gfx/pokemon/front/parasect.png
Binary files differ
diff --git a/gfx/pokemon/front/persian.png b/gfx/pokemon/front/persian.png
new file mode 100644
index 00000000..cc15677a
--- /dev/null
+++ b/gfx/pokemon/front/persian.png
Binary files differ
diff --git a/gfx/pokemon/front/pidgeot.png b/gfx/pokemon/front/pidgeot.png
new file mode 100644
index 00000000..7daf609f
--- /dev/null
+++ b/gfx/pokemon/front/pidgeot.png
Binary files differ
diff --git a/gfx/pokemon/front/pidgeotto.png b/gfx/pokemon/front/pidgeotto.png
new file mode 100644
index 00000000..c86b86f1
--- /dev/null
+++ b/gfx/pokemon/front/pidgeotto.png
Binary files differ
diff --git a/gfx/pokemon/front/pidgey.png b/gfx/pokemon/front/pidgey.png
new file mode 100644
index 00000000..70d9dd4a
--- /dev/null
+++ b/gfx/pokemon/front/pidgey.png
Binary files differ
diff --git a/gfx/pokemon/front/pikachu.png b/gfx/pokemon/front/pikachu.png
new file mode 100644
index 00000000..159e47e9
--- /dev/null
+++ b/gfx/pokemon/front/pikachu.png
Binary files differ
diff --git a/gfx/pokemon/front/pinsir.png b/gfx/pokemon/front/pinsir.png
new file mode 100644
index 00000000..320c79cb
--- /dev/null
+++ b/gfx/pokemon/front/pinsir.png
Binary files differ
diff --git a/gfx/pokemon/front/poliwag.png b/gfx/pokemon/front/poliwag.png
new file mode 100644
index 00000000..397d2e66
--- /dev/null
+++ b/gfx/pokemon/front/poliwag.png
Binary files differ
diff --git a/gfx/pokemon/front/poliwhirl.png b/gfx/pokemon/front/poliwhirl.png
new file mode 100644
index 00000000..a7039145
--- /dev/null
+++ b/gfx/pokemon/front/poliwhirl.png
Binary files differ
diff --git a/gfx/pokemon/front/poliwrath.png b/gfx/pokemon/front/poliwrath.png
new file mode 100644
index 00000000..f31d0680
--- /dev/null
+++ b/gfx/pokemon/front/poliwrath.png
Binary files differ
diff --git a/gfx/pokemon/front/ponyta.png b/gfx/pokemon/front/ponyta.png
new file mode 100644
index 00000000..4d8c1bee
--- /dev/null
+++ b/gfx/pokemon/front/ponyta.png
Binary files differ
diff --git a/gfx/pokemon/front/porygon.png b/gfx/pokemon/front/porygon.png
new file mode 100644
index 00000000..ba3500c6
--- /dev/null
+++ b/gfx/pokemon/front/porygon.png
Binary files differ
diff --git a/gfx/pokemon/front/primeape.png b/gfx/pokemon/front/primeape.png
new file mode 100644
index 00000000..7c5a1a09
--- /dev/null
+++ b/gfx/pokemon/front/primeape.png
Binary files differ
diff --git a/gfx/pokemon/front/psyduck.png b/gfx/pokemon/front/psyduck.png
new file mode 100644
index 00000000..86772256
--- /dev/null
+++ b/gfx/pokemon/front/psyduck.png
Binary files differ
diff --git a/gfx/pokemon/front/raichu.png b/gfx/pokemon/front/raichu.png
new file mode 100644
index 00000000..a29731e5
--- /dev/null
+++ b/gfx/pokemon/front/raichu.png
Binary files differ
diff --git a/gfx/pokemon/front/rapidash.png b/gfx/pokemon/front/rapidash.png
new file mode 100644
index 00000000..62d47506
--- /dev/null
+++ b/gfx/pokemon/front/rapidash.png
Binary files differ
diff --git a/gfx/pokemon/front/raticate.png b/gfx/pokemon/front/raticate.png
new file mode 100644
index 00000000..64340846
--- /dev/null
+++ b/gfx/pokemon/front/raticate.png
Binary files differ
diff --git a/gfx/pokemon/front/rattata.png b/gfx/pokemon/front/rattata.png
new file mode 100644
index 00000000..9b391cca
--- /dev/null
+++ b/gfx/pokemon/front/rattata.png
Binary files differ
diff --git a/gfx/pokemon/front/rhydon.png b/gfx/pokemon/front/rhydon.png
new file mode 100644
index 00000000..92406476
--- /dev/null
+++ b/gfx/pokemon/front/rhydon.png
Binary files differ
diff --git a/gfx/pokemon/front/rhyhorn.png b/gfx/pokemon/front/rhyhorn.png
new file mode 100644
index 00000000..9452b701
--- /dev/null
+++ b/gfx/pokemon/front/rhyhorn.png
Binary files differ
diff --git a/gfx/pokemon/front/sandshrew.png b/gfx/pokemon/front/sandshrew.png
new file mode 100644
index 00000000..bcf52215
--- /dev/null
+++ b/gfx/pokemon/front/sandshrew.png
Binary files differ
diff --git a/gfx/pokemon/front/sandslash.png b/gfx/pokemon/front/sandslash.png
new file mode 100644
index 00000000..3b212a60
--- /dev/null
+++ b/gfx/pokemon/front/sandslash.png
Binary files differ
diff --git a/gfx/pokemon/front/scyther.png b/gfx/pokemon/front/scyther.png
new file mode 100644
index 00000000..3fe6eeae
--- /dev/null
+++ b/gfx/pokemon/front/scyther.png
Binary files differ
diff --git a/gfx/pokemon/front/seadra.png b/gfx/pokemon/front/seadra.png
new file mode 100644
index 00000000..e8af292f
--- /dev/null
+++ b/gfx/pokemon/front/seadra.png
Binary files differ
diff --git a/gfx/pokemon/front/seaking.png b/gfx/pokemon/front/seaking.png
new file mode 100644
index 00000000..ebe70c7e
--- /dev/null
+++ b/gfx/pokemon/front/seaking.png
Binary files differ
diff --git a/gfx/pokemon/front/seel.png b/gfx/pokemon/front/seel.png
new file mode 100644
index 00000000..c4b2315a
--- /dev/null
+++ b/gfx/pokemon/front/seel.png
Binary files differ
diff --git a/gfx/pokemon/front/shellder.png b/gfx/pokemon/front/shellder.png
new file mode 100644
index 00000000..cf44a7fe
--- /dev/null
+++ b/gfx/pokemon/front/shellder.png
Binary files differ
diff --git a/gfx/pokemon/front/slowbro.png b/gfx/pokemon/front/slowbro.png
new file mode 100644
index 00000000..e61ad34b
--- /dev/null
+++ b/gfx/pokemon/front/slowbro.png
Binary files differ
diff --git a/gfx/pokemon/front/slowpoke.png b/gfx/pokemon/front/slowpoke.png
new file mode 100644
index 00000000..fdf701d7
--- /dev/null
+++ b/gfx/pokemon/front/slowpoke.png
Binary files differ
diff --git a/gfx/pokemon/front/snorlax.png b/gfx/pokemon/front/snorlax.png
new file mode 100644
index 00000000..5b571a18
--- /dev/null
+++ b/gfx/pokemon/front/snorlax.png
Binary files differ
diff --git a/gfx/pokemon/front/spearow.png b/gfx/pokemon/front/spearow.png
new file mode 100644
index 00000000..835800a5
--- /dev/null
+++ b/gfx/pokemon/front/spearow.png
Binary files differ
diff --git a/gfx/pokemon/front/squirtle.png b/gfx/pokemon/front/squirtle.png
new file mode 100644
index 00000000..bc0c9979
--- /dev/null
+++ b/gfx/pokemon/front/squirtle.png
Binary files differ
diff --git a/gfx/pokemon/front/starmie.png b/gfx/pokemon/front/starmie.png
new file mode 100644
index 00000000..24025ddf
--- /dev/null
+++ b/gfx/pokemon/front/starmie.png
Binary files differ
diff --git a/gfx/pokemon/front/staryu.png b/gfx/pokemon/front/staryu.png
new file mode 100644
index 00000000..394732e9
--- /dev/null
+++ b/gfx/pokemon/front/staryu.png
Binary files differ
diff --git a/gfx/pokemon/front/tangela.png b/gfx/pokemon/front/tangela.png
new file mode 100644
index 00000000..eff9c5a5
--- /dev/null
+++ b/gfx/pokemon/front/tangela.png
Binary files differ
diff --git a/gfx/pokemon/front/tauros.png b/gfx/pokemon/front/tauros.png
new file mode 100644
index 00000000..3a4edfee
--- /dev/null
+++ b/gfx/pokemon/front/tauros.png
Binary files differ
diff --git a/gfx/pokemon/front/tentacool.png b/gfx/pokemon/front/tentacool.png
new file mode 100644
index 00000000..534e5496
--- /dev/null
+++ b/gfx/pokemon/front/tentacool.png
Binary files differ
diff --git a/gfx/pokemon/front/tentacruel.png b/gfx/pokemon/front/tentacruel.png
new file mode 100644
index 00000000..7a26a305
--- /dev/null
+++ b/gfx/pokemon/front/tentacruel.png
Binary files differ
diff --git a/gfx/pokemon/front/vaporeon.png b/gfx/pokemon/front/vaporeon.png
new file mode 100644
index 00000000..48dafce6
--- /dev/null
+++ b/gfx/pokemon/front/vaporeon.png
Binary files differ
diff --git a/gfx/pokemon/front/venomoth.png b/gfx/pokemon/front/venomoth.png
new file mode 100644
index 00000000..e28b1017
--- /dev/null
+++ b/gfx/pokemon/front/venomoth.png
Binary files differ
diff --git a/gfx/pokemon/front/venonat.png b/gfx/pokemon/front/venonat.png
new file mode 100644
index 00000000..edf15889
--- /dev/null
+++ b/gfx/pokemon/front/venonat.png
Binary files differ
diff --git a/gfx/pokemon/front/venusaur.png b/gfx/pokemon/front/venusaur.png
new file mode 100644
index 00000000..dd39184a
--- /dev/null
+++ b/gfx/pokemon/front/venusaur.png
Binary files differ
diff --git a/gfx/pokemon/front/victreebel.png b/gfx/pokemon/front/victreebel.png
new file mode 100644
index 00000000..29a471c8
--- /dev/null
+++ b/gfx/pokemon/front/victreebel.png
Binary files differ
diff --git a/gfx/pokemon/front/vileplume.png b/gfx/pokemon/front/vileplume.png
new file mode 100644
index 00000000..e788425e
--- /dev/null
+++ b/gfx/pokemon/front/vileplume.png
Binary files differ
diff --git a/gfx/pokemon/front/voltorb.png b/gfx/pokemon/front/voltorb.png
new file mode 100644
index 00000000..22d0c675
--- /dev/null
+++ b/gfx/pokemon/front/voltorb.png
Binary files differ
diff --git a/gfx/pokemon/front/vulpix.png b/gfx/pokemon/front/vulpix.png
new file mode 100644
index 00000000..f4780ef2
--- /dev/null
+++ b/gfx/pokemon/front/vulpix.png
Binary files differ
diff --git a/gfx/pokemon/front/wartortle.png b/gfx/pokemon/front/wartortle.png
new file mode 100644
index 00000000..bd844562
--- /dev/null
+++ b/gfx/pokemon/front/wartortle.png
Binary files differ
diff --git a/gfx/pokemon/front/weedle.png b/gfx/pokemon/front/weedle.png
new file mode 100644
index 00000000..445fe8f3
--- /dev/null
+++ b/gfx/pokemon/front/weedle.png
Binary files differ
diff --git a/gfx/pokemon/front/weepinbell.png b/gfx/pokemon/front/weepinbell.png
new file mode 100644
index 00000000..6ee57334
--- /dev/null
+++ b/gfx/pokemon/front/weepinbell.png
Binary files differ
diff --git a/gfx/pokemon/front/weezing.png b/gfx/pokemon/front/weezing.png
new file mode 100644
index 00000000..deb2a623
--- /dev/null
+++ b/gfx/pokemon/front/weezing.png
Binary files differ
diff --git a/gfx/pokemon/front/wigglytuff.png b/gfx/pokemon/front/wigglytuff.png
new file mode 100644
index 00000000..c7cd495b
--- /dev/null
+++ b/gfx/pokemon/front/wigglytuff.png
Binary files differ
diff --git a/gfx/pokemon/front/zapdos.png b/gfx/pokemon/front/zapdos.png
new file mode 100644
index 00000000..0bd71f4e
--- /dev/null
+++ b/gfx/pokemon/front/zapdos.png
Binary files differ
diff --git a/gfx/pokemon/front/zubat.png b/gfx/pokemon/front/zubat.png
new file mode 100644
index 00000000..73078725
--- /dev/null
+++ b/gfx/pokemon/front/zubat.png
Binary files differ
diff --git a/pic/rgmon/abra.png b/gfx/pokemon/front_rg/abra.png
index bc0cb24b..bc0cb24b 100644
--- a/pic/rgmon/abra.png
+++ b/gfx/pokemon/front_rg/abra.png
Binary files differ
diff --git a/pic/rgmon/aerodactyl.png b/gfx/pokemon/front_rg/aerodactyl.png
index 89812b32..89812b32 100644
--- a/pic/rgmon/aerodactyl.png
+++ b/gfx/pokemon/front_rg/aerodactyl.png
Binary files differ
diff --git a/pic/rgmon/alakazam.png b/gfx/pokemon/front_rg/alakazam.png
index 3a8b32d1..3a8b32d1 100644
--- a/pic/rgmon/alakazam.png
+++ b/gfx/pokemon/front_rg/alakazam.png
Binary files differ
diff --git a/pic/rgmon/arbok.png b/gfx/pokemon/front_rg/arbok.png
index dab294f5..dab294f5 100644
--- a/pic/rgmon/arbok.png
+++ b/gfx/pokemon/front_rg/arbok.png
Binary files differ
diff --git a/pic/rgmon/arcanine.png b/gfx/pokemon/front_rg/arcanine.png
index 0149138b..0149138b 100644
--- a/pic/rgmon/arcanine.png
+++ b/gfx/pokemon/front_rg/arcanine.png
Binary files differ
diff --git a/pic/rgmon/articuno.png b/gfx/pokemon/front_rg/articuno.png
index 99b6385d..99b6385d 100644
--- a/pic/rgmon/articuno.png
+++ b/gfx/pokemon/front_rg/articuno.png
Binary files differ
diff --git a/pic/rgmon/beedrill.png b/gfx/pokemon/front_rg/beedrill.png
index b6f31036..b6f31036 100644
--- a/pic/rgmon/beedrill.png
+++ b/gfx/pokemon/front_rg/beedrill.png
Binary files differ
diff --git a/pic/rgmon/bellsprout.png b/gfx/pokemon/front_rg/bellsprout.png
index 380913d5..380913d5 100644
--- a/pic/rgmon/bellsprout.png
+++ b/gfx/pokemon/front_rg/bellsprout.png
Binary files differ
diff --git a/pic/rgmon/blastoise.png b/gfx/pokemon/front_rg/blastoise.png
index 97bf497b..97bf497b 100644
--- a/pic/rgmon/blastoise.png
+++ b/gfx/pokemon/front_rg/blastoise.png
Binary files differ
diff --git a/pic/rgmon/bulbasaur.png b/gfx/pokemon/front_rg/bulbasaur.png
index 1a4676a1..1a4676a1 100644
--- a/pic/rgmon/bulbasaur.png
+++ b/gfx/pokemon/front_rg/bulbasaur.png
Binary files differ
diff --git a/pic/rgmon/butterfree.png b/gfx/pokemon/front_rg/butterfree.png
index 0b3044d4..0b3044d4 100644
--- a/pic/rgmon/butterfree.png
+++ b/gfx/pokemon/front_rg/butterfree.png
Binary files differ
diff --git a/pic/rgmon/caterpie.png b/gfx/pokemon/front_rg/caterpie.png
index dca52b88..dca52b88 100644
--- a/pic/rgmon/caterpie.png
+++ b/gfx/pokemon/front_rg/caterpie.png
Binary files differ
diff --git a/pic/rgmon/chansey.png b/gfx/pokemon/front_rg/chansey.png
index fa47540e..fa47540e 100644
--- a/pic/rgmon/chansey.png
+++ b/gfx/pokemon/front_rg/chansey.png
Binary files differ
diff --git a/pic/rgmon/charizard.png b/gfx/pokemon/front_rg/charizard.png
index a8b87e05..a8b87e05 100644
--- a/pic/rgmon/charizard.png
+++ b/gfx/pokemon/front_rg/charizard.png
Binary files differ
diff --git a/pic/rgmon/charmander.png b/gfx/pokemon/front_rg/charmander.png
index 153f9381..153f9381 100644
--- a/pic/rgmon/charmander.png
+++ b/gfx/pokemon/front_rg/charmander.png
Binary files differ
diff --git a/pic/rgmon/charmeleon.png b/gfx/pokemon/front_rg/charmeleon.png
index f60d1294..f60d1294 100644
--- a/pic/rgmon/charmeleon.png
+++ b/gfx/pokemon/front_rg/charmeleon.png
Binary files differ
diff --git a/pic/rgmon/clefable.png b/gfx/pokemon/front_rg/clefable.png
index 8ef6be5f..8ef6be5f 100644
--- a/pic/rgmon/clefable.png
+++ b/gfx/pokemon/front_rg/clefable.png
Binary files differ
diff --git a/pic/rgmon/clefairy.png b/gfx/pokemon/front_rg/clefairy.png
index 632844d5..632844d5 100644
--- a/pic/rgmon/clefairy.png
+++ b/gfx/pokemon/front_rg/clefairy.png
Binary files differ
diff --git a/pic/rgmon/cloyster.png b/gfx/pokemon/front_rg/cloyster.png
index b6e16485..b6e16485 100644
--- a/pic/rgmon/cloyster.png
+++ b/gfx/pokemon/front_rg/cloyster.png
Binary files differ
diff --git a/pic/rgmon/cubone.png b/gfx/pokemon/front_rg/cubone.png
index 1312b7c7..1312b7c7 100644
--- a/pic/rgmon/cubone.png
+++ b/gfx/pokemon/front_rg/cubone.png
Binary files differ
diff --git a/pic/rgmon/dewgong.png b/gfx/pokemon/front_rg/dewgong.png
index 823b7125..823b7125 100644
--- a/pic/rgmon/dewgong.png
+++ b/gfx/pokemon/front_rg/dewgong.png
Binary files differ
diff --git a/pic/rgmon/diglett.png b/gfx/pokemon/front_rg/diglett.png
index 69b93a90..69b93a90 100644
--- a/pic/rgmon/diglett.png
+++ b/gfx/pokemon/front_rg/diglett.png
Binary files differ
diff --git a/pic/rgmon/ditto.png b/gfx/pokemon/front_rg/ditto.png
index 1a38c474..1a38c474 100644
--- a/pic/rgmon/ditto.png
+++ b/gfx/pokemon/front_rg/ditto.png
Binary files differ
diff --git a/pic/rgmon/dodrio.png b/gfx/pokemon/front_rg/dodrio.png
index c88fa388..c88fa388 100644
--- a/pic/rgmon/dodrio.png
+++ b/gfx/pokemon/front_rg/dodrio.png
Binary files differ
diff --git a/pic/rgmon/doduo.png b/gfx/pokemon/front_rg/doduo.png
index c95aae73..c95aae73 100644
--- a/pic/rgmon/doduo.png
+++ b/gfx/pokemon/front_rg/doduo.png
Binary files differ
diff --git a/pic/rgmon/dragonair.png b/gfx/pokemon/front_rg/dragonair.png
index fe097cfa..fe097cfa 100644
--- a/pic/rgmon/dragonair.png
+++ b/gfx/pokemon/front_rg/dragonair.png
Binary files differ
diff --git a/pic/rgmon/dragonite.png b/gfx/pokemon/front_rg/dragonite.png
index 49474a4d..49474a4d 100644
--- a/pic/rgmon/dragonite.png
+++ b/gfx/pokemon/front_rg/dragonite.png
Binary files differ
diff --git a/pic/rgmon/dratini.png b/gfx/pokemon/front_rg/dratini.png
index 9c7e454d..9c7e454d 100644
--- a/pic/rgmon/dratini.png
+++ b/gfx/pokemon/front_rg/dratini.png
Binary files differ
diff --git a/pic/rgmon/drowzee.png b/gfx/pokemon/front_rg/drowzee.png
index b8cdf0db..b8cdf0db 100644
--- a/pic/rgmon/drowzee.png
+++ b/gfx/pokemon/front_rg/drowzee.png
Binary files differ
diff --git a/pic/rgmon/dugtrio.png b/gfx/pokemon/front_rg/dugtrio.png
index 1619ab92..1619ab92 100644
--- a/pic/rgmon/dugtrio.png
+++ b/gfx/pokemon/front_rg/dugtrio.png
Binary files differ
diff --git a/pic/rgmon/eevee.png b/gfx/pokemon/front_rg/eevee.png
index b8fcab5a..b8fcab5a 100644
--- a/pic/rgmon/eevee.png
+++ b/gfx/pokemon/front_rg/eevee.png
Binary files differ
diff --git a/pic/rgmon/ekans.png b/gfx/pokemon/front_rg/ekans.png
index cd43c69c..cd43c69c 100644
--- a/pic/rgmon/ekans.png
+++ b/gfx/pokemon/front_rg/ekans.png
Binary files differ
diff --git a/pic/rgmon/electabuzz.png b/gfx/pokemon/front_rg/electabuzz.png
index 24791e64..24791e64 100644
--- a/pic/rgmon/electabuzz.png
+++ b/gfx/pokemon/front_rg/electabuzz.png
Binary files differ
diff --git a/pic/rgmon/electrode.png b/gfx/pokemon/front_rg/electrode.png
index ff812003..ff812003 100644
--- a/pic/rgmon/electrode.png
+++ b/gfx/pokemon/front_rg/electrode.png
Binary files differ
diff --git a/pic/rgmon/exeggcute.png b/gfx/pokemon/front_rg/exeggcute.png
index 63b55927..63b55927 100644
--- a/pic/rgmon/exeggcute.png
+++ b/gfx/pokemon/front_rg/exeggcute.png
Binary files differ
diff --git a/pic/rgmon/exeggutor.png b/gfx/pokemon/front_rg/exeggutor.png
index dc1f7287..dc1f7287 100644
--- a/pic/rgmon/exeggutor.png
+++ b/gfx/pokemon/front_rg/exeggutor.png
Binary files differ
diff --git a/pic/rgmon/farfetchd.png b/gfx/pokemon/front_rg/farfetchd.png
index bd97b9e8..bd97b9e8 100644
--- a/pic/rgmon/farfetchd.png
+++ b/gfx/pokemon/front_rg/farfetchd.png
Binary files differ
diff --git a/pic/rgmon/fearow.png b/gfx/pokemon/front_rg/fearow.png
index 93d7a847..93d7a847 100644
--- a/pic/rgmon/fearow.png
+++ b/gfx/pokemon/front_rg/fearow.png
Binary files differ
diff --git a/pic/rgmon/flareon.png b/gfx/pokemon/front_rg/flareon.png
index 7a39866a..7a39866a 100644
--- a/pic/rgmon/flareon.png
+++ b/gfx/pokemon/front_rg/flareon.png
Binary files differ
diff --git a/pic/rgmon/fossilaerodactyl.png b/gfx/pokemon/front_rg/fossilaerodactyl.png
index 27d5c3ac..27d5c3ac 100644
--- a/pic/rgmon/fossilaerodactyl.png
+++ b/gfx/pokemon/front_rg/fossilaerodactyl.png
Binary files differ
diff --git a/pic/rgmon/fossilkabutops.png b/gfx/pokemon/front_rg/fossilkabutops.png
index d37edb02..d37edb02 100644
--- a/pic/rgmon/fossilkabutops.png
+++ b/gfx/pokemon/front_rg/fossilkabutops.png
Binary files differ
diff --git a/pic/rgmon/gastly.png b/gfx/pokemon/front_rg/gastly.png
index a5c0f406..a5c0f406 100644
--- a/pic/rgmon/gastly.png
+++ b/gfx/pokemon/front_rg/gastly.png
Binary files differ
diff --git a/pic/rgmon/gengar.png b/gfx/pokemon/front_rg/gengar.png
index cb31fecf..cb31fecf 100644
--- a/pic/rgmon/gengar.png
+++ b/gfx/pokemon/front_rg/gengar.png
Binary files differ
diff --git a/pic/rgmon/geodude.png b/gfx/pokemon/front_rg/geodude.png
index 02b690e9..02b690e9 100644
--- a/pic/rgmon/geodude.png
+++ b/gfx/pokemon/front_rg/geodude.png
Binary files differ
diff --git a/pic/rgmon/gloom.png b/gfx/pokemon/front_rg/gloom.png
index c2fd2aa7..c2fd2aa7 100644
--- a/pic/rgmon/gloom.png
+++ b/gfx/pokemon/front_rg/gloom.png
Binary files differ
diff --git a/pic/rgmon/golbat.png b/gfx/pokemon/front_rg/golbat.png
index 1fb2a341..1fb2a341 100644
--- a/pic/rgmon/golbat.png
+++ b/gfx/pokemon/front_rg/golbat.png
Binary files differ
diff --git a/pic/rgmon/goldeen.png b/gfx/pokemon/front_rg/goldeen.png
index bee7de2a..bee7de2a 100644
--- a/pic/rgmon/goldeen.png
+++ b/gfx/pokemon/front_rg/goldeen.png
Binary files differ
diff --git a/pic/rgmon/golduck.png b/gfx/pokemon/front_rg/golduck.png
index a0827b54..a0827b54 100644
--- a/pic/rgmon/golduck.png
+++ b/gfx/pokemon/front_rg/golduck.png
Binary files differ
diff --git a/pic/rgmon/golem.png b/gfx/pokemon/front_rg/golem.png
index 86ea3c68..86ea3c68 100644
--- a/pic/rgmon/golem.png
+++ b/gfx/pokemon/front_rg/golem.png
Binary files differ
diff --git a/pic/rgmon/graveler.png b/gfx/pokemon/front_rg/graveler.png
index 5e876f0b..5e876f0b 100644
--- a/pic/rgmon/graveler.png
+++ b/gfx/pokemon/front_rg/graveler.png
Binary files differ
diff --git a/pic/rgmon/grimer.png b/gfx/pokemon/front_rg/grimer.png
index cc6931fb..cc6931fb 100644
--- a/pic/rgmon/grimer.png
+++ b/gfx/pokemon/front_rg/grimer.png
Binary files differ
diff --git a/pic/rgmon/growlithe.png b/gfx/pokemon/front_rg/growlithe.png
index 1aafd535..1aafd535 100644
--- a/pic/rgmon/growlithe.png
+++ b/gfx/pokemon/front_rg/growlithe.png
Binary files differ
diff --git a/pic/rgmon/gyarados.png b/gfx/pokemon/front_rg/gyarados.png
index 4d25aabb..4d25aabb 100644
--- a/pic/rgmon/gyarados.png
+++ b/gfx/pokemon/front_rg/gyarados.png
Binary files differ
diff --git a/pic/rgmon/haunter.png b/gfx/pokemon/front_rg/haunter.png
index 531c8a62..531c8a62 100644
--- a/pic/rgmon/haunter.png
+++ b/gfx/pokemon/front_rg/haunter.png
Binary files differ
diff --git a/pic/rgmon/hitmonchan.png b/gfx/pokemon/front_rg/hitmonchan.png
index 1774dd18..1774dd18 100644
--- a/pic/rgmon/hitmonchan.png
+++ b/gfx/pokemon/front_rg/hitmonchan.png
Binary files differ
diff --git a/pic/rgmon/hitmonlee.png b/gfx/pokemon/front_rg/hitmonlee.png
index 04ca9be3..04ca9be3 100644
--- a/pic/rgmon/hitmonlee.png
+++ b/gfx/pokemon/front_rg/hitmonlee.png
Binary files differ
diff --git a/pic/rgmon/horsea.png b/gfx/pokemon/front_rg/horsea.png
index 0d11d78c..0d11d78c 100644
--- a/pic/rgmon/horsea.png
+++ b/gfx/pokemon/front_rg/horsea.png
Binary files differ
diff --git a/pic/rgmon/hypno.png b/gfx/pokemon/front_rg/hypno.png
index f29559c2..f29559c2 100644
--- a/pic/rgmon/hypno.png
+++ b/gfx/pokemon/front_rg/hypno.png
Binary files differ
diff --git a/pic/rgmon/ivysaur.png b/gfx/pokemon/front_rg/ivysaur.png
index 337bc27d..337bc27d 100644
--- a/pic/rgmon/ivysaur.png
+++ b/gfx/pokemon/front_rg/ivysaur.png
Binary files differ
diff --git a/pic/rgmon/jigglypuff.png b/gfx/pokemon/front_rg/jigglypuff.png
index 607c429e..607c429e 100644
--- a/pic/rgmon/jigglypuff.png
+++ b/gfx/pokemon/front_rg/jigglypuff.png
Binary files differ
diff --git a/pic/rgmon/jolteon.png b/gfx/pokemon/front_rg/jolteon.png
index fab34a30..fab34a30 100644
--- a/pic/rgmon/jolteon.png
+++ b/gfx/pokemon/front_rg/jolteon.png
Binary files differ
diff --git a/pic/rgmon/jynx.png b/gfx/pokemon/front_rg/jynx.png
index 6966ce34..6966ce34 100644
--- a/pic/rgmon/jynx.png
+++ b/gfx/pokemon/front_rg/jynx.png
Binary files differ
diff --git a/pic/rgmon/kabuto.png b/gfx/pokemon/front_rg/kabuto.png
index b8923ad7..b8923ad7 100644
--- a/pic/rgmon/kabuto.png
+++ b/gfx/pokemon/front_rg/kabuto.png
Binary files differ
diff --git a/pic/rgmon/kabutops.png b/gfx/pokemon/front_rg/kabutops.png
index 0f33c4d0..0f33c4d0 100644
--- a/pic/rgmon/kabutops.png
+++ b/gfx/pokemon/front_rg/kabutops.png
Binary files differ
diff --git a/pic/rgmon/kadabra.png b/gfx/pokemon/front_rg/kadabra.png
index 8b8abc1a..8b8abc1a 100644
--- a/pic/rgmon/kadabra.png
+++ b/gfx/pokemon/front_rg/kadabra.png
Binary files differ
diff --git a/pic/rgmon/kakuna.png b/gfx/pokemon/front_rg/kakuna.png
index 0cc6eabf..0cc6eabf 100644
--- a/pic/rgmon/kakuna.png
+++ b/gfx/pokemon/front_rg/kakuna.png
Binary files differ
diff --git a/pic/rgmon/kangaskhan.png b/gfx/pokemon/front_rg/kangaskhan.png
index c9d3361d..c9d3361d 100644
--- a/pic/rgmon/kangaskhan.png
+++ b/gfx/pokemon/front_rg/kangaskhan.png
Binary files differ
diff --git a/pic/rgmon/kingler.png b/gfx/pokemon/front_rg/kingler.png
index c1302fbf..c1302fbf 100644
--- a/pic/rgmon/kingler.png
+++ b/gfx/pokemon/front_rg/kingler.png
Binary files differ
diff --git a/pic/rgmon/koffing.png b/gfx/pokemon/front_rg/koffing.png
index e6dfee04..e6dfee04 100644
--- a/pic/rgmon/koffing.png
+++ b/gfx/pokemon/front_rg/koffing.png
Binary files differ
diff --git a/pic/rgmon/krabby.png b/gfx/pokemon/front_rg/krabby.png
index 2740128f..2740128f 100644
--- a/pic/rgmon/krabby.png
+++ b/gfx/pokemon/front_rg/krabby.png
Binary files differ
diff --git a/pic/rgmon/lapras.png b/gfx/pokemon/front_rg/lapras.png
index b696b8d9..b696b8d9 100644
--- a/pic/rgmon/lapras.png
+++ b/gfx/pokemon/front_rg/lapras.png
Binary files differ
diff --git a/pic/rgmon/lickitung.png b/gfx/pokemon/front_rg/lickitung.png
index 3deb9b12..3deb9b12 100644
--- a/pic/rgmon/lickitung.png
+++ b/gfx/pokemon/front_rg/lickitung.png
Binary files differ
diff --git a/pic/rgmon/machamp.png b/gfx/pokemon/front_rg/machamp.png
index a6f773a0..a6f773a0 100644
--- a/pic/rgmon/machamp.png
+++ b/gfx/pokemon/front_rg/machamp.png
Binary files differ
diff --git a/pic/rgmon/machoke.png b/gfx/pokemon/front_rg/machoke.png
index ed637897..ed637897 100644
--- a/pic/rgmon/machoke.png
+++ b/gfx/pokemon/front_rg/machoke.png
Binary files differ
diff --git a/pic/rgmon/machop.png b/gfx/pokemon/front_rg/machop.png
index a5e20532..a5e20532 100644
--- a/pic/rgmon/machop.png
+++ b/gfx/pokemon/front_rg/machop.png
Binary files differ
diff --git a/pic/rgmon/magikarp.png b/gfx/pokemon/front_rg/magikarp.png
index 68bc4f8c..68bc4f8c 100644
--- a/pic/rgmon/magikarp.png
+++ b/gfx/pokemon/front_rg/magikarp.png
Binary files differ
diff --git a/pic/rgmon/magmar.png b/gfx/pokemon/front_rg/magmar.png
index f12bd2f2..f12bd2f2 100644
--- a/pic/rgmon/magmar.png
+++ b/gfx/pokemon/front_rg/magmar.png
Binary files differ
diff --git a/pic/rgmon/magnemite.png b/gfx/pokemon/front_rg/magnemite.png
index fc807398..fc807398 100644
--- a/pic/rgmon/magnemite.png
+++ b/gfx/pokemon/front_rg/magnemite.png
Binary files differ
diff --git a/pic/rgmon/magneton.png b/gfx/pokemon/front_rg/magneton.png
index 51a3f12c..51a3f12c 100644
--- a/pic/rgmon/magneton.png
+++ b/gfx/pokemon/front_rg/magneton.png
Binary files differ
diff --git a/pic/rgmon/mankey.png b/gfx/pokemon/front_rg/mankey.png
index 9ae43757..9ae43757 100644
--- a/pic/rgmon/mankey.png
+++ b/gfx/pokemon/front_rg/mankey.png
Binary files differ
diff --git a/pic/rgmon/marowak.png b/gfx/pokemon/front_rg/marowak.png
index 8ac6c6ee..8ac6c6ee 100644
--- a/pic/rgmon/marowak.png
+++ b/gfx/pokemon/front_rg/marowak.png
Binary files differ
diff --git a/pic/rgmon/meowth.png b/gfx/pokemon/front_rg/meowth.png
index d00a08db..d00a08db 100644
--- a/pic/rgmon/meowth.png
+++ b/gfx/pokemon/front_rg/meowth.png
Binary files differ
diff --git a/pic/rgmon/metapod.png b/gfx/pokemon/front_rg/metapod.png
index 5d7514f4..5d7514f4 100644
--- a/pic/rgmon/metapod.png
+++ b/gfx/pokemon/front_rg/metapod.png
Binary files differ
diff --git a/pic/rgmon/mew.png b/gfx/pokemon/front_rg/mew.png
index 0d9bef36..0d9bef36 100644
--- a/pic/rgmon/mew.png
+++ b/gfx/pokemon/front_rg/mew.png
Binary files differ
diff --git a/pic/rgmon/mewtwo.png b/gfx/pokemon/front_rg/mewtwo.png
index b41409ca..b41409ca 100644
--- a/pic/rgmon/mewtwo.png
+++ b/gfx/pokemon/front_rg/mewtwo.png
Binary files differ
diff --git a/pic/rgmon/moltres.png b/gfx/pokemon/front_rg/moltres.png
index 52259f4a..52259f4a 100644
--- a/pic/rgmon/moltres.png
+++ b/gfx/pokemon/front_rg/moltres.png
Binary files differ
diff --git a/pic/rgmon/mr.mime.png b/gfx/pokemon/front_rg/mr.mime.png
index 6dca1791..6dca1791 100644
--- a/pic/rgmon/mr.mime.png
+++ b/gfx/pokemon/front_rg/mr.mime.png
Binary files differ
diff --git a/pic/rgmon/muk.png b/gfx/pokemon/front_rg/muk.png
index 8816e939..8816e939 100644
--- a/pic/rgmon/muk.png
+++ b/gfx/pokemon/front_rg/muk.png
Binary files differ
diff --git a/pic/rgmon/nidoking.png b/gfx/pokemon/front_rg/nidoking.png
index c181e60c..c181e60c 100644
--- a/pic/rgmon/nidoking.png
+++ b/gfx/pokemon/front_rg/nidoking.png
Binary files differ
diff --git a/pic/rgmon/nidoqueen.png b/gfx/pokemon/front_rg/nidoqueen.png
index 86cba6d6..86cba6d6 100644
--- a/pic/rgmon/nidoqueen.png
+++ b/gfx/pokemon/front_rg/nidoqueen.png
Binary files differ
diff --git a/pic/rgmon/nidoranf.png b/gfx/pokemon/front_rg/nidoranf.png
index 8d99c920..8d99c920 100644
--- a/pic/rgmon/nidoranf.png
+++ b/gfx/pokemon/front_rg/nidoranf.png
Binary files differ
diff --git a/pic/rgmon/nidoranm.png b/gfx/pokemon/front_rg/nidoranm.png
index 9a93e864..9a93e864 100644
--- a/pic/rgmon/nidoranm.png
+++ b/gfx/pokemon/front_rg/nidoranm.png
Binary files differ
diff --git a/pic/rgmon/nidorina.png b/gfx/pokemon/front_rg/nidorina.png
index a8d277b8..a8d277b8 100644
--- a/pic/rgmon/nidorina.png
+++ b/gfx/pokemon/front_rg/nidorina.png
Binary files differ
diff --git a/pic/rgmon/nidorino.png b/gfx/pokemon/front_rg/nidorino.png
index 4d6c9e55..4d6c9e55 100644
--- a/pic/rgmon/nidorino.png
+++ b/gfx/pokemon/front_rg/nidorino.png
Binary files differ
diff --git a/pic/rgmon/ninetales.png b/gfx/pokemon/front_rg/ninetales.png
index 128e8e53..128e8e53 100644
--- a/pic/rgmon/ninetales.png
+++ b/gfx/pokemon/front_rg/ninetales.png
Binary files differ
diff --git a/pic/rgmon/oddish.png b/gfx/pokemon/front_rg/oddish.png
index 55aa2d09..55aa2d09 100644
--- a/pic/rgmon/oddish.png
+++ b/gfx/pokemon/front_rg/oddish.png
Binary files differ
diff --git a/pic/rgmon/omanyte.png b/gfx/pokemon/front_rg/omanyte.png
index d042710e..d042710e 100644
--- a/pic/rgmon/omanyte.png
+++ b/gfx/pokemon/front_rg/omanyte.png
Binary files differ
diff --git a/pic/rgmon/omastar.png b/gfx/pokemon/front_rg/omastar.png
index af84f55f..af84f55f 100644
--- a/pic/rgmon/omastar.png
+++ b/gfx/pokemon/front_rg/omastar.png
Binary files differ
diff --git a/pic/rgmon/onix.png b/gfx/pokemon/front_rg/onix.png
index 3b731ece..3b731ece 100644
--- a/pic/rgmon/onix.png
+++ b/gfx/pokemon/front_rg/onix.png
Binary files differ
diff --git a/pic/rgmon/paras.png b/gfx/pokemon/front_rg/paras.png
index b8ee6517..b8ee6517 100644
--- a/pic/rgmon/paras.png
+++ b/gfx/pokemon/front_rg/paras.png
Binary files differ
diff --git a/pic/rgmon/parasect.png b/gfx/pokemon/front_rg/parasect.png
index 3d58b8e5..3d58b8e5 100644
--- a/pic/rgmon/parasect.png
+++ b/gfx/pokemon/front_rg/parasect.png
Binary files differ
diff --git a/pic/rgmon/persian.png b/gfx/pokemon/front_rg/persian.png
index aed4d6dc..aed4d6dc 100644
--- a/pic/rgmon/persian.png
+++ b/gfx/pokemon/front_rg/persian.png
Binary files differ
diff --git a/pic/rgmon/pidgeot.png b/gfx/pokemon/front_rg/pidgeot.png
index 4b4aa72f..4b4aa72f 100644
--- a/pic/rgmon/pidgeot.png
+++ b/gfx/pokemon/front_rg/pidgeot.png
Binary files differ
diff --git a/pic/rgmon/pidgeotto.png b/gfx/pokemon/front_rg/pidgeotto.png
index 58a51f5d..58a51f5d 100644
--- a/pic/rgmon/pidgeotto.png
+++ b/gfx/pokemon/front_rg/pidgeotto.png
Binary files differ
diff --git a/pic/rgmon/pidgey.png b/gfx/pokemon/front_rg/pidgey.png
index 7636fb67..7636fb67 100644
--- a/pic/rgmon/pidgey.png
+++ b/gfx/pokemon/front_rg/pidgey.png
Binary files differ
diff --git a/pic/rgmon/pikachu.png b/gfx/pokemon/front_rg/pikachu.png
index 5a3eb782..5a3eb782 100644
--- a/pic/rgmon/pikachu.png
+++ b/gfx/pokemon/front_rg/pikachu.png
Binary files differ
diff --git a/pic/rgmon/pinsir.png b/gfx/pokemon/front_rg/pinsir.png
index 2944c453..2944c453 100644
--- a/pic/rgmon/pinsir.png
+++ b/gfx/pokemon/front_rg/pinsir.png
Binary files differ
diff --git a/pic/rgmon/poliwag.png b/gfx/pokemon/front_rg/poliwag.png
index a1ad26c8..a1ad26c8 100644
--- a/pic/rgmon/poliwag.png
+++ b/gfx/pokemon/front_rg/poliwag.png
Binary files differ
diff --git a/pic/rgmon/poliwhirl.png b/gfx/pokemon/front_rg/poliwhirl.png
index d18311d6..d18311d6 100644
--- a/pic/rgmon/poliwhirl.png
+++ b/gfx/pokemon/front_rg/poliwhirl.png
Binary files differ
diff --git a/pic/rgmon/poliwrath.png b/gfx/pokemon/front_rg/poliwrath.png
index 49f07b96..49f07b96 100644
--- a/pic/rgmon/poliwrath.png
+++ b/gfx/pokemon/front_rg/poliwrath.png
Binary files differ
diff --git a/pic/rgmon/ponyta.png b/gfx/pokemon/front_rg/ponyta.png
index c3a67849..c3a67849 100644
--- a/pic/rgmon/ponyta.png
+++ b/gfx/pokemon/front_rg/ponyta.png
Binary files differ
diff --git a/pic/rgmon/porygon.png b/gfx/pokemon/front_rg/porygon.png
index 1ed804ff..1ed804ff 100644
--- a/pic/rgmon/porygon.png
+++ b/gfx/pokemon/front_rg/porygon.png
Binary files differ
diff --git a/pic/rgmon/primeape.png b/gfx/pokemon/front_rg/primeape.png
index 42c03f6d..42c03f6d 100644
--- a/pic/rgmon/primeape.png
+++ b/gfx/pokemon/front_rg/primeape.png
Binary files differ
diff --git a/pic/rgmon/psyduck.png b/gfx/pokemon/front_rg/psyduck.png
index cd0a5e9e..cd0a5e9e 100644
--- a/pic/rgmon/psyduck.png
+++ b/gfx/pokemon/front_rg/psyduck.png
Binary files differ
diff --git a/pic/rgmon/raichu.png b/gfx/pokemon/front_rg/raichu.png
index 961d2aeb..961d2aeb 100644
--- a/pic/rgmon/raichu.png
+++ b/gfx/pokemon/front_rg/raichu.png
Binary files differ
diff --git a/pic/rgmon/rapidash.png b/gfx/pokemon/front_rg/rapidash.png
index d118b947..d118b947 100644
--- a/pic/rgmon/rapidash.png
+++ b/gfx/pokemon/front_rg/rapidash.png
Binary files differ
diff --git a/pic/rgmon/raticate.png b/gfx/pokemon/front_rg/raticate.png
index 895c1006..895c1006 100644
--- a/pic/rgmon/raticate.png
+++ b/gfx/pokemon/front_rg/raticate.png
Binary files differ
diff --git a/pic/rgmon/rattata.png b/gfx/pokemon/front_rg/rattata.png
index 8d114876..8d114876 100644
--- a/pic/rgmon/rattata.png
+++ b/gfx/pokemon/front_rg/rattata.png
Binary files differ
diff --git a/pic/rgmon/rhydon.png b/gfx/pokemon/front_rg/rhydon.png
index 772e64d8..772e64d8 100644
--- a/pic/rgmon/rhydon.png
+++ b/gfx/pokemon/front_rg/rhydon.png
Binary files differ
diff --git a/pic/rgmon/rhyhorn.png b/gfx/pokemon/front_rg/rhyhorn.png
index 1b968785..1b968785 100644
--- a/pic/rgmon/rhyhorn.png
+++ b/gfx/pokemon/front_rg/rhyhorn.png
Binary files differ
diff --git a/pic/rgmon/sandshrew.png b/gfx/pokemon/front_rg/sandshrew.png
index e078d6d3..e078d6d3 100644
--- a/pic/rgmon/sandshrew.png
+++ b/gfx/pokemon/front_rg/sandshrew.png
Binary files differ
diff --git a/pic/rgmon/sandslash.png b/gfx/pokemon/front_rg/sandslash.png
index 55320b96..55320b96 100644
--- a/pic/rgmon/sandslash.png
+++ b/gfx/pokemon/front_rg/sandslash.png
Binary files differ
diff --git a/pic/rgmon/scyther.png b/gfx/pokemon/front_rg/scyther.png
index de4d89ed..de4d89ed 100644
--- a/pic/rgmon/scyther.png
+++ b/gfx/pokemon/front_rg/scyther.png
Binary files differ
diff --git a/pic/rgmon/seadra.png b/gfx/pokemon/front_rg/seadra.png
index 17cdf4ea..17cdf4ea 100644
--- a/pic/rgmon/seadra.png
+++ b/gfx/pokemon/front_rg/seadra.png
Binary files differ
diff --git a/pic/rgmon/seaking.png b/gfx/pokemon/front_rg/seaking.png
index 184f0556..184f0556 100644
--- a/pic/rgmon/seaking.png
+++ b/gfx/pokemon/front_rg/seaking.png
Binary files differ
diff --git a/pic/rgmon/seel.png b/gfx/pokemon/front_rg/seel.png
index cb2f7f2e..cb2f7f2e 100644
--- a/pic/rgmon/seel.png
+++ b/gfx/pokemon/front_rg/seel.png
Binary files differ
diff --git a/pic/rgmon/shellder.png b/gfx/pokemon/front_rg/shellder.png
index b7c41dd2..b7c41dd2 100644
--- a/pic/rgmon/shellder.png
+++ b/gfx/pokemon/front_rg/shellder.png
Binary files differ
diff --git a/pic/rgmon/slowbro.png b/gfx/pokemon/front_rg/slowbro.png
index b67bbc08..b67bbc08 100644
--- a/pic/rgmon/slowbro.png
+++ b/gfx/pokemon/front_rg/slowbro.png
Binary files differ
diff --git a/pic/rgmon/slowpoke.png b/gfx/pokemon/front_rg/slowpoke.png
index d59e9008..d59e9008 100644
--- a/pic/rgmon/slowpoke.png
+++ b/gfx/pokemon/front_rg/slowpoke.png
Binary files differ
diff --git a/pic/rgmon/snorlax.png b/gfx/pokemon/front_rg/snorlax.png
index c249327d..c249327d 100644
--- a/pic/rgmon/snorlax.png
+++ b/gfx/pokemon/front_rg/snorlax.png
Binary files differ
diff --git a/pic/rgmon/spearow.png b/gfx/pokemon/front_rg/spearow.png
index c1fce869..c1fce869 100644
--- a/pic/rgmon/spearow.png
+++ b/gfx/pokemon/front_rg/spearow.png
Binary files differ
diff --git a/pic/rgmon/squirtle.png b/gfx/pokemon/front_rg/squirtle.png
index 3139cddc..3139cddc 100644
--- a/pic/rgmon/squirtle.png
+++ b/gfx/pokemon/front_rg/squirtle.png
Binary files differ
diff --git a/pic/rgmon/starmie.png b/gfx/pokemon/front_rg/starmie.png
index 395fd857..395fd857 100644
--- a/pic/rgmon/starmie.png
+++ b/gfx/pokemon/front_rg/starmie.png
Binary files differ
diff --git a/pic/rgmon/staryu.png b/gfx/pokemon/front_rg/staryu.png
index 740089e8..740089e8 100644
--- a/pic/rgmon/staryu.png
+++ b/gfx/pokemon/front_rg/staryu.png
Binary files differ
diff --git a/pic/rgmon/tangela.png b/gfx/pokemon/front_rg/tangela.png
index a6f6327c..a6f6327c 100644
--- a/pic/rgmon/tangela.png
+++ b/gfx/pokemon/front_rg/tangela.png
Binary files differ
diff --git a/pic/rgmon/tauros.png b/gfx/pokemon/front_rg/tauros.png
index ae57f111..ae57f111 100644
--- a/pic/rgmon/tauros.png
+++ b/gfx/pokemon/front_rg/tauros.png
Binary files differ
diff --git a/pic/rgmon/tentacool.png b/gfx/pokemon/front_rg/tentacool.png
index 59a979c2..59a979c2 100644
--- a/pic/rgmon/tentacool.png
+++ b/gfx/pokemon/front_rg/tentacool.png
Binary files differ
diff --git a/pic/rgmon/tentacruel.png b/gfx/pokemon/front_rg/tentacruel.png
index aaf4d426..aaf4d426 100644
--- a/pic/rgmon/tentacruel.png
+++ b/gfx/pokemon/front_rg/tentacruel.png
Binary files differ
diff --git a/pic/rgmon/vaporeon.png b/gfx/pokemon/front_rg/vaporeon.png
index 72db05da..72db05da 100644
--- a/pic/rgmon/vaporeon.png
+++ b/gfx/pokemon/front_rg/vaporeon.png
Binary files differ
diff --git a/pic/rgmon/venomoth.png b/gfx/pokemon/front_rg/venomoth.png
index e677255e..e677255e 100644
--- a/pic/rgmon/venomoth.png
+++ b/gfx/pokemon/front_rg/venomoth.png
Binary files differ
diff --git a/pic/rgmon/venonat.png b/gfx/pokemon/front_rg/venonat.png
index cf2f4df1..cf2f4df1 100644
--- a/pic/rgmon/venonat.png
+++ b/gfx/pokemon/front_rg/venonat.png
Binary files differ
diff --git a/pic/rgmon/venusaur.png b/gfx/pokemon/front_rg/venusaur.png
index f444a234..f444a234 100644
--- a/pic/rgmon/venusaur.png
+++ b/gfx/pokemon/front_rg/venusaur.png
Binary files differ
diff --git a/pic/rgmon/victreebel.png b/gfx/pokemon/front_rg/victreebel.png
index 62193011..62193011 100644
--- a/pic/rgmon/victreebel.png
+++ b/gfx/pokemon/front_rg/victreebel.png
Binary files differ
diff --git a/pic/rgmon/vileplume.png b/gfx/pokemon/front_rg/vileplume.png
index e39d50e0..e39d50e0 100644
--- a/pic/rgmon/vileplume.png
+++ b/gfx/pokemon/front_rg/vileplume.png
Binary files differ
diff --git a/pic/rgmon/voltorb.png b/gfx/pokemon/front_rg/voltorb.png
index c2159e6c..c2159e6c 100644
--- a/pic/rgmon/voltorb.png
+++ b/gfx/pokemon/front_rg/voltorb.png
Binary files differ
diff --git a/pic/rgmon/vulpix.png b/gfx/pokemon/front_rg/vulpix.png
index 8b8810ad..8b8810ad 100644
--- a/pic/rgmon/vulpix.png
+++ b/gfx/pokemon/front_rg/vulpix.png
Binary files differ
diff --git a/pic/rgmon/wartortle.png b/gfx/pokemon/front_rg/wartortle.png
index 6e65bb7c..6e65bb7c 100644
--- a/pic/rgmon/wartortle.png
+++ b/gfx/pokemon/front_rg/wartortle.png
Binary files differ
diff --git a/pic/rgmon/weedle.png b/gfx/pokemon/front_rg/weedle.png
index 3efbd49d..3efbd49d 100644
--- a/pic/rgmon/weedle.png
+++ b/gfx/pokemon/front_rg/weedle.png
Binary files differ
diff --git a/pic/rgmon/weepinbell.png b/gfx/pokemon/front_rg/weepinbell.png
index 18b44783..18b44783 100644
--- a/pic/rgmon/weepinbell.png
+++ b/gfx/pokemon/front_rg/weepinbell.png
Binary files differ
diff --git a/pic/rgmon/weezing.png b/gfx/pokemon/front_rg/weezing.png
index 5b30b4e0..5b30b4e0 100644
--- a/pic/rgmon/weezing.png
+++ b/gfx/pokemon/front_rg/weezing.png
Binary files differ
diff --git a/pic/rgmon/wigglytuff.png b/gfx/pokemon/front_rg/wigglytuff.png
index e986affd..e986affd 100644
--- a/pic/rgmon/wigglytuff.png
+++ b/gfx/pokemon/front_rg/wigglytuff.png
Binary files differ
diff --git a/pic/rgmon/zapdos.png b/gfx/pokemon/front_rg/zapdos.png
index 534ac4a9..534ac4a9 100644
--- a/pic/rgmon/zapdos.png
+++ b/gfx/pokemon/front_rg/zapdos.png
Binary files differ
diff --git a/pic/rgmon/zubat.png b/gfx/pokemon/front_rg/zubat.png
index 14dc9118..14dc9118 100644
--- a/pic/rgmon/zubat.png
+++ b/gfx/pokemon/front_rg/zubat.png
Binary files differ
diff --git a/pic/ymon/abra.png b/gfx/pokemon/front_yellow/abra.png
index 3573a040..3573a040 100644
--- a/pic/ymon/abra.png
+++ b/gfx/pokemon/front_yellow/abra.png
Binary files differ
diff --git a/pic/ymon/aerodactyl.png b/gfx/pokemon/front_yellow/aerodactyl.png
index cf0212a0..cf0212a0 100644
--- a/pic/ymon/aerodactyl.png
+++ b/gfx/pokemon/front_yellow/aerodactyl.png
Binary files differ
diff --git a/pic/ymon/alakazam.png b/gfx/pokemon/front_yellow/alakazam.png
index 613ae5ad..613ae5ad 100644
--- a/pic/ymon/alakazam.png
+++ b/gfx/pokemon/front_yellow/alakazam.png
Binary files differ
diff --git a/pic/ymon/arbok.png b/gfx/pokemon/front_yellow/arbok.png
index 45df87b1..45df87b1 100644
--- a/pic/ymon/arbok.png
+++ b/gfx/pokemon/front_yellow/arbok.png
Binary files differ
diff --git a/pic/ymon/arcanine.png b/gfx/pokemon/front_yellow/arcanine.png
index 77bb89b0..77bb89b0 100644
--- a/pic/ymon/arcanine.png
+++ b/gfx/pokemon/front_yellow/arcanine.png
Binary files differ
diff --git a/pic/ymon/articuno.png b/gfx/pokemon/front_yellow/articuno.png
index e8ae875e..e8ae875e 100644
--- a/pic/ymon/articuno.png
+++ b/gfx/pokemon/front_yellow/articuno.png
Binary files differ
diff --git a/pic/ymon/beedrill.png b/gfx/pokemon/front_yellow/beedrill.png
index bc9ca73d..bc9ca73d 100644
--- a/pic/ymon/beedrill.png
+++ b/gfx/pokemon/front_yellow/beedrill.png
Binary files differ
diff --git a/pic/ymon/bellsprout.png b/gfx/pokemon/front_yellow/bellsprout.png
index f3d2ff1c..f3d2ff1c 100644
--- a/pic/ymon/bellsprout.png
+++ b/gfx/pokemon/front_yellow/bellsprout.png
Binary files differ
diff --git a/pic/ymon/blastoise.png b/gfx/pokemon/front_yellow/blastoise.png
index 6cdd8e30..6cdd8e30 100644
--- a/pic/ymon/blastoise.png
+++ b/gfx/pokemon/front_yellow/blastoise.png
Binary files differ
diff --git a/pic/ymon/bulbasaur.png b/gfx/pokemon/front_yellow/bulbasaur.png
index 27abe273..27abe273 100644
--- a/pic/ymon/bulbasaur.png
+++ b/gfx/pokemon/front_yellow/bulbasaur.png
Binary files differ
diff --git a/pic/ymon/butterfree.png b/gfx/pokemon/front_yellow/butterfree.png
index 951ae4c4..951ae4c4 100644
--- a/pic/ymon/butterfree.png
+++ b/gfx/pokemon/front_yellow/butterfree.png
Binary files differ
diff --git a/pic/ymon/caterpie.png b/gfx/pokemon/front_yellow/caterpie.png
index 8e3205c9..8e3205c9 100644
--- a/pic/ymon/caterpie.png
+++ b/gfx/pokemon/front_yellow/caterpie.png
Binary files differ
diff --git a/pic/ymon/chansey.png b/gfx/pokemon/front_yellow/chansey.png
index d517535a..d517535a 100644
--- a/pic/ymon/chansey.png
+++ b/gfx/pokemon/front_yellow/chansey.png
Binary files differ
diff --git a/pic/ymon/charizard.png b/gfx/pokemon/front_yellow/charizard.png
index 100416d4..100416d4 100644
--- a/pic/ymon/charizard.png
+++ b/gfx/pokemon/front_yellow/charizard.png
Binary files differ
diff --git a/pic/ymon/charmander.png b/gfx/pokemon/front_yellow/charmander.png
index 155a68a4..155a68a4 100644
--- a/pic/ymon/charmander.png
+++ b/gfx/pokemon/front_yellow/charmander.png
Binary files differ
diff --git a/pic/ymon/charmeleon.png b/gfx/pokemon/front_yellow/charmeleon.png
index 63808b25..63808b25 100644
--- a/pic/ymon/charmeleon.png
+++ b/gfx/pokemon/front_yellow/charmeleon.png
Binary files differ
diff --git a/pic/ymon/clefable.png b/gfx/pokemon/front_yellow/clefable.png
index 8e5111f9..8e5111f9 100644
--- a/pic/ymon/clefable.png
+++ b/gfx/pokemon/front_yellow/clefable.png
Binary files differ
diff --git a/pic/ymon/clefairy.png b/gfx/pokemon/front_yellow/clefairy.png
index 4a26be0b..4a26be0b 100644
--- a/pic/ymon/clefairy.png
+++ b/gfx/pokemon/front_yellow/clefairy.png
Binary files differ
diff --git a/pic/ymon/cloyster.png b/gfx/pokemon/front_yellow/cloyster.png
index 67542d93..67542d93 100644
--- a/pic/ymon/cloyster.png
+++ b/gfx/pokemon/front_yellow/cloyster.png
Binary files differ
diff --git a/pic/ymon/cubone.png b/gfx/pokemon/front_yellow/cubone.png
index c5dec329..c5dec329 100644
--- a/pic/ymon/cubone.png
+++ b/gfx/pokemon/front_yellow/cubone.png
Binary files differ
diff --git a/pic/ymon/dewgong.png b/gfx/pokemon/front_yellow/dewgong.png
index c7bb5424..c7bb5424 100644
--- a/pic/ymon/dewgong.png
+++ b/gfx/pokemon/front_yellow/dewgong.png
Binary files differ
diff --git a/pic/ymon/diglett.png b/gfx/pokemon/front_yellow/diglett.png
index a9becda8..a9becda8 100644
--- a/pic/ymon/diglett.png
+++ b/gfx/pokemon/front_yellow/diglett.png
Binary files differ
diff --git a/pic/ymon/ditto.png b/gfx/pokemon/front_yellow/ditto.png
index 3c662491..3c662491 100644
--- a/pic/ymon/ditto.png
+++ b/gfx/pokemon/front_yellow/ditto.png
Binary files differ
diff --git a/pic/ymon/dodrio.png b/gfx/pokemon/front_yellow/dodrio.png
index 45606e63..45606e63 100644
--- a/pic/ymon/dodrio.png
+++ b/gfx/pokemon/front_yellow/dodrio.png
Binary files differ
diff --git a/pic/ymon/doduo.png b/gfx/pokemon/front_yellow/doduo.png
index 0aa722c0..0aa722c0 100644
--- a/pic/ymon/doduo.png
+++ b/gfx/pokemon/front_yellow/doduo.png
Binary files differ
diff --git a/pic/ymon/dragonair.png b/gfx/pokemon/front_yellow/dragonair.png
index e7fc1448..e7fc1448 100644
--- a/pic/ymon/dragonair.png
+++ b/gfx/pokemon/front_yellow/dragonair.png
Binary files differ
diff --git a/pic/ymon/dragonite.png b/gfx/pokemon/front_yellow/dragonite.png
index 7ac78924..7ac78924 100644
--- a/pic/ymon/dragonite.png
+++ b/gfx/pokemon/front_yellow/dragonite.png
Binary files differ
diff --git a/pic/ymon/dratini.png b/gfx/pokemon/front_yellow/dratini.png
index 5a1a880f..5a1a880f 100644
--- a/pic/ymon/dratini.png
+++ b/gfx/pokemon/front_yellow/dratini.png
Binary files differ
diff --git a/pic/ymon/drowzee.png b/gfx/pokemon/front_yellow/drowzee.png
index 16d3edfc..16d3edfc 100644
--- a/pic/ymon/drowzee.png
+++ b/gfx/pokemon/front_yellow/drowzee.png
Binary files differ
diff --git a/pic/ymon/dugtrio.png b/gfx/pokemon/front_yellow/dugtrio.png
index c20d01b6..c20d01b6 100644
--- a/pic/ymon/dugtrio.png
+++ b/gfx/pokemon/front_yellow/dugtrio.png
Binary files differ
diff --git a/pic/ymon/eevee.png b/gfx/pokemon/front_yellow/eevee.png
index 7bc62ae9..7bc62ae9 100644
--- a/pic/ymon/eevee.png
+++ b/gfx/pokemon/front_yellow/eevee.png
Binary files differ
diff --git a/pic/ymon/ekans.png b/gfx/pokemon/front_yellow/ekans.png
index 1d454a13..1d454a13 100644
--- a/pic/ymon/ekans.png
+++ b/gfx/pokemon/front_yellow/ekans.png
Binary files differ
diff --git a/pic/ymon/electabuzz.png b/gfx/pokemon/front_yellow/electabuzz.png
index 77647d26..77647d26 100644
--- a/pic/ymon/electabuzz.png
+++ b/gfx/pokemon/front_yellow/electabuzz.png
Binary files differ
diff --git a/pic/ymon/electrode.png b/gfx/pokemon/front_yellow/electrode.png
index f5e05464..f5e05464 100755
--- a/pic/ymon/electrode.png
+++ b/gfx/pokemon/front_yellow/electrode.png
Binary files differ
diff --git a/pic/ymon/exeggcute.png b/gfx/pokemon/front_yellow/exeggcute.png
index 901e2244..901e2244 100644
--- a/pic/ymon/exeggcute.png
+++ b/gfx/pokemon/front_yellow/exeggcute.png
Binary files differ
diff --git a/pic/ymon/exeggutor.png b/gfx/pokemon/front_yellow/exeggutor.png
index 3e8d37cb..3e8d37cb 100644
--- a/pic/ymon/exeggutor.png
+++ b/gfx/pokemon/front_yellow/exeggutor.png
Binary files differ
diff --git a/pic/ymon/farfetchd.png b/gfx/pokemon/front_yellow/farfetchd.png
index 8412e767..8412e767 100644
--- a/pic/ymon/farfetchd.png
+++ b/gfx/pokemon/front_yellow/farfetchd.png
Binary files differ
diff --git a/pic/ymon/fearow.png b/gfx/pokemon/front_yellow/fearow.png
index 7b54a854..7b54a854 100644
--- a/pic/ymon/fearow.png
+++ b/gfx/pokemon/front_yellow/fearow.png
Binary files differ
diff --git a/pic/ymon/flareon.png b/gfx/pokemon/front_yellow/flareon.png
index 5b0e5376..5b0e5376 100644
--- a/pic/ymon/flareon.png
+++ b/gfx/pokemon/front_yellow/flareon.png
Binary files differ
diff --git a/gfx/pokemon/front_yellow/fossilaerodactyl.png b/gfx/pokemon/front_yellow/fossilaerodactyl.png
new file mode 100644
index 00000000..eb7fc3a3
--- /dev/null
+++ b/gfx/pokemon/front_yellow/fossilaerodactyl.png
Binary files differ
diff --git a/gfx/pokemon/front_yellow/fossilkabutops.png b/gfx/pokemon/front_yellow/fossilkabutops.png
new file mode 100644
index 00000000..dd8d41ea
--- /dev/null
+++ b/gfx/pokemon/front_yellow/fossilkabutops.png
Binary files differ
diff --git a/pic/ymon/gastly.png b/gfx/pokemon/front_yellow/gastly.png
index 9d236e5a..9d236e5a 100644
--- a/pic/ymon/gastly.png
+++ b/gfx/pokemon/front_yellow/gastly.png
Binary files differ
diff --git a/pic/ymon/gengar.png b/gfx/pokemon/front_yellow/gengar.png
index 1993bcfc..1993bcfc 100644
--- a/pic/ymon/gengar.png
+++ b/gfx/pokemon/front_yellow/gengar.png
Binary files differ
diff --git a/pic/ymon/geodude.png b/gfx/pokemon/front_yellow/geodude.png
index c28db680..c28db680 100644
--- a/pic/ymon/geodude.png
+++ b/gfx/pokemon/front_yellow/geodude.png
Binary files differ
diff --git a/pic/ymon/gloom.png b/gfx/pokemon/front_yellow/gloom.png
index 6071ea5d..6071ea5d 100644
--- a/pic/ymon/gloom.png
+++ b/gfx/pokemon/front_yellow/gloom.png
Binary files differ
diff --git a/pic/ymon/golbat.png b/gfx/pokemon/front_yellow/golbat.png
index 7d2b17da..7d2b17da 100644
--- a/pic/ymon/golbat.png
+++ b/gfx/pokemon/front_yellow/golbat.png
Binary files differ
diff --git a/pic/ymon/goldeen.png b/gfx/pokemon/front_yellow/goldeen.png
index c6bbeae5..c6bbeae5 100644
--- a/pic/ymon/goldeen.png
+++ b/gfx/pokemon/front_yellow/goldeen.png
Binary files differ
diff --git a/pic/ymon/golduck.png b/gfx/pokemon/front_yellow/golduck.png
index 299b6300..299b6300 100644
--- a/pic/ymon/golduck.png
+++ b/gfx/pokemon/front_yellow/golduck.png
Binary files differ
diff --git a/pic/ymon/golem.png b/gfx/pokemon/front_yellow/golem.png
index 7d317b7d..7d317b7d 100644
--- a/pic/ymon/golem.png
+++ b/gfx/pokemon/front_yellow/golem.png
Binary files differ
diff --git a/pic/ymon/graveler.png b/gfx/pokemon/front_yellow/graveler.png
index 26d4b0a1..26d4b0a1 100644
--- a/pic/ymon/graveler.png
+++ b/gfx/pokemon/front_yellow/graveler.png
Binary files differ
diff --git a/pic/ymon/grimer.png b/gfx/pokemon/front_yellow/grimer.png
index a72c9e45..a72c9e45 100644
--- a/pic/ymon/grimer.png
+++ b/gfx/pokemon/front_yellow/grimer.png
Binary files differ
diff --git a/pic/ymon/growlithe.png b/gfx/pokemon/front_yellow/growlithe.png
index e75173cf..e75173cf 100644
--- a/pic/ymon/growlithe.png
+++ b/gfx/pokemon/front_yellow/growlithe.png
Binary files differ
diff --git a/pic/ymon/gyarados.png b/gfx/pokemon/front_yellow/gyarados.png
index 387c2725..387c2725 100644
--- a/pic/ymon/gyarados.png
+++ b/gfx/pokemon/front_yellow/gyarados.png
Binary files differ
diff --git a/pic/ymon/haunter.png b/gfx/pokemon/front_yellow/haunter.png
index d7f96e3d..d7f96e3d 100644
--- a/pic/ymon/haunter.png
+++ b/gfx/pokemon/front_yellow/haunter.png
Binary files differ
diff --git a/pic/ymon/hitmonchan.png b/gfx/pokemon/front_yellow/hitmonchan.png
index 2fb7122b..2fb7122b 100644
--- a/pic/ymon/hitmonchan.png
+++ b/gfx/pokemon/front_yellow/hitmonchan.png
Binary files differ
diff --git a/pic/ymon/hitmonlee.png b/gfx/pokemon/front_yellow/hitmonlee.png
index acbe68ff..acbe68ff 100644
--- a/pic/ymon/hitmonlee.png
+++ b/gfx/pokemon/front_yellow/hitmonlee.png
Binary files differ
diff --git a/pic/ymon/horsea.png b/gfx/pokemon/front_yellow/horsea.png
index 390c419d..390c419d 100644
--- a/pic/ymon/horsea.png
+++ b/gfx/pokemon/front_yellow/horsea.png
Binary files differ
diff --git a/pic/ymon/hypno.png b/gfx/pokemon/front_yellow/hypno.png
index ed100f66..ed100f66 100644
--- a/pic/ymon/hypno.png
+++ b/gfx/pokemon/front_yellow/hypno.png
Binary files differ
diff --git a/pic/ymon/ivysaur.png b/gfx/pokemon/front_yellow/ivysaur.png
index 4da5664b..4da5664b 100644
--- a/pic/ymon/ivysaur.png
+++ b/gfx/pokemon/front_yellow/ivysaur.png
Binary files differ
diff --git a/pic/ymon/jigglypuff.png b/gfx/pokemon/front_yellow/jigglypuff.png
index d11ec165..d11ec165 100644
--- a/pic/ymon/jigglypuff.png
+++ b/gfx/pokemon/front_yellow/jigglypuff.png
Binary files differ
diff --git a/pic/ymon/jolteon.png b/gfx/pokemon/front_yellow/jolteon.png
index a1942ec6..a1942ec6 100644
--- a/pic/ymon/jolteon.png
+++ b/gfx/pokemon/front_yellow/jolteon.png
Binary files differ
diff --git a/pic/ymon/jynx.png b/gfx/pokemon/front_yellow/jynx.png
index 699ab3f5..699ab3f5 100644
--- a/pic/ymon/jynx.png
+++ b/gfx/pokemon/front_yellow/jynx.png
Binary files differ
diff --git a/pic/ymon/kabuto.png b/gfx/pokemon/front_yellow/kabuto.png
index 58f27e0f..58f27e0f 100644
--- a/pic/ymon/kabuto.png
+++ b/gfx/pokemon/front_yellow/kabuto.png
Binary files differ
diff --git a/pic/ymon/kabutops.png b/gfx/pokemon/front_yellow/kabutops.png
index e898ca12..e898ca12 100644
--- a/pic/ymon/kabutops.png
+++ b/gfx/pokemon/front_yellow/kabutops.png
Binary files differ
diff --git a/pic/ymon/kadabra.png b/gfx/pokemon/front_yellow/kadabra.png
index 58aff19a..58aff19a 100644
--- a/pic/ymon/kadabra.png
+++ b/gfx/pokemon/front_yellow/kadabra.png
Binary files differ
diff --git a/pic/ymon/kakuna.png b/gfx/pokemon/front_yellow/kakuna.png
index fb4ec863..fb4ec863 100644
--- a/pic/ymon/kakuna.png
+++ b/gfx/pokemon/front_yellow/kakuna.png
Binary files differ
diff --git a/pic/ymon/kangaskhan.png b/gfx/pokemon/front_yellow/kangaskhan.png
index 56ab2619..56ab2619 100644
--- a/pic/ymon/kangaskhan.png
+++ b/gfx/pokemon/front_yellow/kangaskhan.png
Binary files differ
diff --git a/pic/ymon/kingler.png b/gfx/pokemon/front_yellow/kingler.png
index c7610d11..c7610d11 100644
--- a/pic/ymon/kingler.png
+++ b/gfx/pokemon/front_yellow/kingler.png
Binary files differ
diff --git a/pic/ymon/koffing.png b/gfx/pokemon/front_yellow/koffing.png
index 9d394cdc..9d394cdc 100644
--- a/pic/ymon/koffing.png
+++ b/gfx/pokemon/front_yellow/koffing.png
Binary files differ
diff --git a/pic/ymon/krabby.png b/gfx/pokemon/front_yellow/krabby.png
index fe463732..fe463732 100644
--- a/pic/ymon/krabby.png
+++ b/gfx/pokemon/front_yellow/krabby.png
Binary files differ
diff --git a/pic/ymon/lapras.png b/gfx/pokemon/front_yellow/lapras.png
index ee954079..ee954079 100644
--- a/pic/ymon/lapras.png
+++ b/gfx/pokemon/front_yellow/lapras.png
Binary files differ
diff --git a/pic/ymon/lickitung.png b/gfx/pokemon/front_yellow/lickitung.png
index 3b480655..3b480655 100644
--- a/pic/ymon/lickitung.png
+++ b/gfx/pokemon/front_yellow/lickitung.png
Binary files differ
diff --git a/pic/ymon/machamp.png b/gfx/pokemon/front_yellow/machamp.png
index f2bf5a0b..f2bf5a0b 100644
--- a/pic/ymon/machamp.png
+++ b/gfx/pokemon/front_yellow/machamp.png
Binary files differ
diff --git a/pic/ymon/machoke.png b/gfx/pokemon/front_yellow/machoke.png
index 7079a52b..7079a52b 100644
--- a/pic/ymon/machoke.png
+++ b/gfx/pokemon/front_yellow/machoke.png
Binary files differ
diff --git a/pic/ymon/machop.png b/gfx/pokemon/front_yellow/machop.png
index cd6d6891..cd6d6891 100644
--- a/pic/ymon/machop.png
+++ b/gfx/pokemon/front_yellow/machop.png
Binary files differ
diff --git a/pic/ymon/magikarp.png b/gfx/pokemon/front_yellow/magikarp.png
index 881aa50a..881aa50a 100644
--- a/pic/ymon/magikarp.png
+++ b/gfx/pokemon/front_yellow/magikarp.png
Binary files differ
diff --git a/pic/ymon/magmar.png b/gfx/pokemon/front_yellow/magmar.png
index 839fa204..839fa204 100644
--- a/pic/ymon/magmar.png
+++ b/gfx/pokemon/front_yellow/magmar.png
Binary files differ
diff --git a/pic/ymon/magnemite.png b/gfx/pokemon/front_yellow/magnemite.png
index 4cb5e3da..4cb5e3da 100644
--- a/pic/ymon/magnemite.png
+++ b/gfx/pokemon/front_yellow/magnemite.png
Binary files differ
diff --git a/pic/ymon/magneton.png b/gfx/pokemon/front_yellow/magneton.png
index 5d2a3eaa..5d2a3eaa 100644
--- a/pic/ymon/magneton.png
+++ b/gfx/pokemon/front_yellow/magneton.png
Binary files differ
diff --git a/pic/ymon/mankey.png b/gfx/pokemon/front_yellow/mankey.png
index f3266f29..f3266f29 100644
--- a/pic/ymon/mankey.png
+++ b/gfx/pokemon/front_yellow/mankey.png
Binary files differ
diff --git a/pic/ymon/marowak.png b/gfx/pokemon/front_yellow/marowak.png
index d90e4627..d90e4627 100644
--- a/pic/ymon/marowak.png
+++ b/gfx/pokemon/front_yellow/marowak.png
Binary files differ
diff --git a/pic/ymon/meowth.png b/gfx/pokemon/front_yellow/meowth.png
index de82b0c2..de82b0c2 100644
--- a/pic/ymon/meowth.png
+++ b/gfx/pokemon/front_yellow/meowth.png
Binary files differ
diff --git a/pic/ymon/metapod.png b/gfx/pokemon/front_yellow/metapod.png
index 6268ed9a..6268ed9a 100644
--- a/pic/ymon/metapod.png
+++ b/gfx/pokemon/front_yellow/metapod.png
Binary files differ
diff --git a/pic/ymon/mew.png b/gfx/pokemon/front_yellow/mew.png
index a00783a9..a00783a9 100644
--- a/pic/ymon/mew.png
+++ b/gfx/pokemon/front_yellow/mew.png
Binary files differ
diff --git a/pic/ymon/mewtwo.png b/gfx/pokemon/front_yellow/mewtwo.png
index 40c6f217..40c6f217 100644
--- a/pic/ymon/mewtwo.png
+++ b/gfx/pokemon/front_yellow/mewtwo.png
Binary files differ
diff --git a/pic/ymon/moltres.png b/gfx/pokemon/front_yellow/moltres.png
index e5e3d02e..e5e3d02e 100644
--- a/pic/ymon/moltres.png
+++ b/gfx/pokemon/front_yellow/moltres.png
Binary files differ
diff --git a/pic/ymon/mr.mime.png b/gfx/pokemon/front_yellow/mr.mime.png
index 5a3642d3..5a3642d3 100644
--- a/pic/ymon/mr.mime.png
+++ b/gfx/pokemon/front_yellow/mr.mime.png
Binary files differ
diff --git a/pic/ymon/muk.png b/gfx/pokemon/front_yellow/muk.png
index d7d98e37..d7d98e37 100644
--- a/pic/ymon/muk.png
+++ b/gfx/pokemon/front_yellow/muk.png
Binary files differ
diff --git a/pic/ymon/nidoking.png b/gfx/pokemon/front_yellow/nidoking.png
index 785adc67..785adc67 100644
--- a/pic/ymon/nidoking.png
+++ b/gfx/pokemon/front_yellow/nidoking.png
Binary files differ
diff --git a/pic/ymon/nidoqueen.png b/gfx/pokemon/front_yellow/nidoqueen.png
index 24f786c7..24f786c7 100644
--- a/pic/ymon/nidoqueen.png
+++ b/gfx/pokemon/front_yellow/nidoqueen.png
Binary files differ
diff --git a/pic/ymon/nidoranf.png b/gfx/pokemon/front_yellow/nidoranf.png
index 1f6532d2..1f6532d2 100644
--- a/pic/ymon/nidoranf.png
+++ b/gfx/pokemon/front_yellow/nidoranf.png
Binary files differ
diff --git a/pic/ymon/nidoranm.png b/gfx/pokemon/front_yellow/nidoranm.png
index bb960e01..bb960e01 100644
--- a/pic/ymon/nidoranm.png
+++ b/gfx/pokemon/front_yellow/nidoranm.png
Binary files differ
diff --git a/pic/ymon/nidorina.png b/gfx/pokemon/front_yellow/nidorina.png
index 76edf719..76edf719 100644
--- a/pic/ymon/nidorina.png
+++ b/gfx/pokemon/front_yellow/nidorina.png
Binary files differ
diff --git a/pic/ymon/nidorino.png b/gfx/pokemon/front_yellow/nidorino.png
index c68dbdd1..c68dbdd1 100644
--- a/pic/ymon/nidorino.png
+++ b/gfx/pokemon/front_yellow/nidorino.png
Binary files differ
diff --git a/pic/ymon/ninetales.png b/gfx/pokemon/front_yellow/ninetales.png
index f7ff9ff6..f7ff9ff6 100644
--- a/pic/ymon/ninetales.png
+++ b/gfx/pokemon/front_yellow/ninetales.png
Binary files differ
diff --git a/pic/ymon/oddish.png b/gfx/pokemon/front_yellow/oddish.png
index 17281e3b..17281e3b 100644
--- a/pic/ymon/oddish.png
+++ b/gfx/pokemon/front_yellow/oddish.png
Binary files differ
diff --git a/pic/ymon/omanyte.png b/gfx/pokemon/front_yellow/omanyte.png
index eafbd593..eafbd593 100644
--- a/pic/ymon/omanyte.png
+++ b/gfx/pokemon/front_yellow/omanyte.png
Binary files differ
diff --git a/pic/ymon/omastar.png b/gfx/pokemon/front_yellow/omastar.png
index 2eb40d37..2eb40d37 100644
--- a/pic/ymon/omastar.png
+++ b/gfx/pokemon/front_yellow/omastar.png
Binary files differ
diff --git a/pic/ymon/onix.png b/gfx/pokemon/front_yellow/onix.png
index 1e49634f..1e49634f 100644
--- a/pic/ymon/onix.png
+++ b/gfx/pokemon/front_yellow/onix.png
Binary files differ
diff --git a/pic/ymon/paras.png b/gfx/pokemon/front_yellow/paras.png
index 73c805c8..73c805c8 100644
--- a/pic/ymon/paras.png
+++ b/gfx/pokemon/front_yellow/paras.png
Binary files differ
diff --git a/pic/ymon/parasect.png b/gfx/pokemon/front_yellow/parasect.png
index def9e493..def9e493 100644
--- a/pic/ymon/parasect.png
+++ b/gfx/pokemon/front_yellow/parasect.png
Binary files differ
diff --git a/pic/ymon/persian.png b/gfx/pokemon/front_yellow/persian.png
index 831a9da8..831a9da8 100644
--- a/pic/ymon/persian.png
+++ b/gfx/pokemon/front_yellow/persian.png
Binary files differ
diff --git a/pic/ymon/pidgeot.png b/gfx/pokemon/front_yellow/pidgeot.png
index 4bb98422..4bb98422 100644
--- a/pic/ymon/pidgeot.png
+++ b/gfx/pokemon/front_yellow/pidgeot.png
Binary files differ
diff --git a/pic/ymon/pidgeotto.png b/gfx/pokemon/front_yellow/pidgeotto.png
index 0490003c..0490003c 100644
--- a/pic/ymon/pidgeotto.png
+++ b/gfx/pokemon/front_yellow/pidgeotto.png
Binary files differ
diff --git a/pic/ymon/pidgey.png b/gfx/pokemon/front_yellow/pidgey.png
index fe507e6d..fe507e6d 100644
--- a/pic/ymon/pidgey.png
+++ b/gfx/pokemon/front_yellow/pidgey.png
Binary files differ
diff --git a/pic/ymon/pikachu.png b/gfx/pokemon/front_yellow/pikachu.png
index 4fc61c87..4fc61c87 100644
--- a/pic/ymon/pikachu.png
+++ b/gfx/pokemon/front_yellow/pikachu.png
Binary files differ
diff --git a/pic/ymon/pinsir.png b/gfx/pokemon/front_yellow/pinsir.png
index 0f8d8639..0f8d8639 100644
--- a/pic/ymon/pinsir.png
+++ b/gfx/pokemon/front_yellow/pinsir.png
Binary files differ
diff --git a/pic/ymon/poliwag.png b/gfx/pokemon/front_yellow/poliwag.png
index 1c19fd1c..1c19fd1c 100644
--- a/pic/ymon/poliwag.png
+++ b/gfx/pokemon/front_yellow/poliwag.png
Binary files differ
diff --git a/pic/ymon/poliwhirl.png b/gfx/pokemon/front_yellow/poliwhirl.png
index f56f75df..f56f75df 100644
--- a/pic/ymon/poliwhirl.png
+++ b/gfx/pokemon/front_yellow/poliwhirl.png
Binary files differ
diff --git a/pic/ymon/poliwrath.png b/gfx/pokemon/front_yellow/poliwrath.png
index 20fe9e6c..20fe9e6c 100644
--- a/pic/ymon/poliwrath.png
+++ b/gfx/pokemon/front_yellow/poliwrath.png
Binary files differ
diff --git a/pic/ymon/ponyta.png b/gfx/pokemon/front_yellow/ponyta.png
index b4ec63b2..b4ec63b2 100644
--- a/pic/ymon/ponyta.png
+++ b/gfx/pokemon/front_yellow/ponyta.png
Binary files differ
diff --git a/pic/ymon/porygon.png b/gfx/pokemon/front_yellow/porygon.png
index f991dd6e..f991dd6e 100644
--- a/pic/ymon/porygon.png
+++ b/gfx/pokemon/front_yellow/porygon.png
Binary files differ
diff --git a/pic/ymon/primeape.png b/gfx/pokemon/front_yellow/primeape.png
index a14234f5..a14234f5 100644
--- a/pic/ymon/primeape.png
+++ b/gfx/pokemon/front_yellow/primeape.png
Binary files differ
diff --git a/pic/ymon/psyduck.png b/gfx/pokemon/front_yellow/psyduck.png
index 75cd2f17..75cd2f17 100644
--- a/pic/ymon/psyduck.png
+++ b/gfx/pokemon/front_yellow/psyduck.png
Binary files differ
diff --git a/pic/ymon/raichu.png b/gfx/pokemon/front_yellow/raichu.png
index 1ef39dc9..1ef39dc9 100644
--- a/pic/ymon/raichu.png
+++ b/gfx/pokemon/front_yellow/raichu.png
Binary files differ
diff --git a/pic/ymon/rapidash.png b/gfx/pokemon/front_yellow/rapidash.png
index 804e7829..804e7829 100644
--- a/pic/ymon/rapidash.png
+++ b/gfx/pokemon/front_yellow/rapidash.png
Binary files differ
diff --git a/pic/ymon/raticate.png b/gfx/pokemon/front_yellow/raticate.png
index 95018e0b..95018e0b 100644
--- a/pic/ymon/raticate.png
+++ b/gfx/pokemon/front_yellow/raticate.png
Binary files differ
diff --git a/pic/ymon/rattata.png b/gfx/pokemon/front_yellow/rattata.png
index 423299bb..423299bb 100644
--- a/pic/ymon/rattata.png
+++ b/gfx/pokemon/front_yellow/rattata.png
Binary files differ
diff --git a/pic/ymon/rhydon.png b/gfx/pokemon/front_yellow/rhydon.png
index 6d75e4be..6d75e4be 100644
--- a/pic/ymon/rhydon.png
+++ b/gfx/pokemon/front_yellow/rhydon.png
Binary files differ
diff --git a/pic/ymon/rhyhorn.png b/gfx/pokemon/front_yellow/rhyhorn.png
index dcf9dd6a..dcf9dd6a 100644
--- a/pic/ymon/rhyhorn.png
+++ b/gfx/pokemon/front_yellow/rhyhorn.png
Binary files differ
diff --git a/pic/ymon/sandshrew.png b/gfx/pokemon/front_yellow/sandshrew.png
index 010908fd..010908fd 100644
--- a/pic/ymon/sandshrew.png
+++ b/gfx/pokemon/front_yellow/sandshrew.png
Binary files differ
diff --git a/pic/ymon/sandslash.png b/gfx/pokemon/front_yellow/sandslash.png
index d37a8de1..d37a8de1 100644
--- a/pic/ymon/sandslash.png
+++ b/gfx/pokemon/front_yellow/sandslash.png
Binary files differ
diff --git a/pic/ymon/scyther.png b/gfx/pokemon/front_yellow/scyther.png
index 51663342..51663342 100644
--- a/pic/ymon/scyther.png
+++ b/gfx/pokemon/front_yellow/scyther.png
Binary files differ
diff --git a/pic/ymon/seadra.png b/gfx/pokemon/front_yellow/seadra.png
index 150416dc..150416dc 100644
--- a/pic/ymon/seadra.png
+++ b/gfx/pokemon/front_yellow/seadra.png
Binary files differ
diff --git a/pic/ymon/seaking.png b/gfx/pokemon/front_yellow/seaking.png
index 75060461..75060461 100644
--- a/pic/ymon/seaking.png
+++ b/gfx/pokemon/front_yellow/seaking.png
Binary files differ
diff --git a/pic/ymon/seel.png b/gfx/pokemon/front_yellow/seel.png
index ef3574b0..ef3574b0 100644
--- a/pic/ymon/seel.png
+++ b/gfx/pokemon/front_yellow/seel.png
Binary files differ
diff --git a/pic/ymon/shellder.png b/gfx/pokemon/front_yellow/shellder.png
index d7ddfa48..d7ddfa48 100644
--- a/pic/ymon/shellder.png
+++ b/gfx/pokemon/front_yellow/shellder.png
Binary files differ
diff --git a/pic/ymon/slowbro.png b/gfx/pokemon/front_yellow/slowbro.png
index e506c9ec..e506c9ec 100644
--- a/pic/ymon/slowbro.png
+++ b/gfx/pokemon/front_yellow/slowbro.png
Binary files differ
diff --git a/pic/ymon/slowpoke.png b/gfx/pokemon/front_yellow/slowpoke.png
index 1328f4a0..1328f4a0 100644
--- a/pic/ymon/slowpoke.png
+++ b/gfx/pokemon/front_yellow/slowpoke.png
Binary files differ
diff --git a/pic/ymon/snorlax.png b/gfx/pokemon/front_yellow/snorlax.png
index 00c78d27..00c78d27 100644
--- a/pic/ymon/snorlax.png
+++ b/gfx/pokemon/front_yellow/snorlax.png
Binary files differ
diff --git a/pic/ymon/spearow.png b/gfx/pokemon/front_yellow/spearow.png
index d9349987..d9349987 100644
--- a/pic/ymon/spearow.png
+++ b/gfx/pokemon/front_yellow/spearow.png
Binary files differ
diff --git a/pic/ymon/squirtle.png b/gfx/pokemon/front_yellow/squirtle.png
index db7aa6c7..db7aa6c7 100644
--- a/pic/ymon/squirtle.png
+++ b/gfx/pokemon/front_yellow/squirtle.png
Binary files differ
diff --git a/pic/ymon/starmie.png b/gfx/pokemon/front_yellow/starmie.png
index 2ed93b4d..2ed93b4d 100644
--- a/pic/ymon/starmie.png
+++ b/gfx/pokemon/front_yellow/starmie.png
Binary files differ
diff --git a/pic/ymon/staryu.png b/gfx/pokemon/front_yellow/staryu.png
index 320fb6a6..320fb6a6 100644
--- a/pic/ymon/staryu.png
+++ b/gfx/pokemon/front_yellow/staryu.png
Binary files differ
diff --git a/pic/ymon/tangela.png b/gfx/pokemon/front_yellow/tangela.png
index 43d04726..43d04726 100644
--- a/pic/ymon/tangela.png
+++ b/gfx/pokemon/front_yellow/tangela.png
Binary files differ
diff --git a/pic/ymon/tauros.png b/gfx/pokemon/front_yellow/tauros.png
index 8086fd13..8086fd13 100644
--- a/pic/ymon/tauros.png
+++ b/gfx/pokemon/front_yellow/tauros.png
Binary files differ
diff --git a/pic/ymon/tentacool.png b/gfx/pokemon/front_yellow/tentacool.png
index 88d7fde3..88d7fde3 100644
--- a/pic/ymon/tentacool.png
+++ b/gfx/pokemon/front_yellow/tentacool.png
Binary files differ
diff --git a/pic/ymon/tentacruel.png b/gfx/pokemon/front_yellow/tentacruel.png
index 47383372..47383372 100644
--- a/pic/ymon/tentacruel.png
+++ b/gfx/pokemon/front_yellow/tentacruel.png
Binary files differ
diff --git a/pic/ymon/vaporeon.png b/gfx/pokemon/front_yellow/vaporeon.png
index 2c35af22..2c35af22 100644
--- a/pic/ymon/vaporeon.png
+++ b/gfx/pokemon/front_yellow/vaporeon.png
Binary files differ
diff --git a/pic/ymon/venomoth.png b/gfx/pokemon/front_yellow/venomoth.png
index 9d801497..9d801497 100644
--- a/pic/ymon/venomoth.png
+++ b/gfx/pokemon/front_yellow/venomoth.png
Binary files differ
diff --git a/pic/ymon/venonat.png b/gfx/pokemon/front_yellow/venonat.png
index 574ed26b..574ed26b 100644
--- a/pic/ymon/venonat.png
+++ b/gfx/pokemon/front_yellow/venonat.png
Binary files differ
diff --git a/pic/ymon/venusaur.png b/gfx/pokemon/front_yellow/venusaur.png
index f6a964e3..f6a964e3 100644
--- a/pic/ymon/venusaur.png
+++ b/gfx/pokemon/front_yellow/venusaur.png
Binary files differ
diff --git a/pic/ymon/victreebel.png b/gfx/pokemon/front_yellow/victreebel.png
index 115c45a3..115c45a3 100644
--- a/pic/ymon/victreebel.png
+++ b/gfx/pokemon/front_yellow/victreebel.png
Binary files differ
diff --git a/pic/ymon/vileplume.png b/gfx/pokemon/front_yellow/vileplume.png
index af4f0862..af4f0862 100644
--- a/pic/ymon/vileplume.png
+++ b/gfx/pokemon/front_yellow/vileplume.png
Binary files differ
diff --git a/pic/ymon/voltorb.png b/gfx/pokemon/front_yellow/voltorb.png
index 8b4bc64d..8b4bc64d 100644
--- a/pic/ymon/voltorb.png
+++ b/gfx/pokemon/front_yellow/voltorb.png
Binary files differ
diff --git a/pic/ymon/vulpix.png b/gfx/pokemon/front_yellow/vulpix.png
index cef8fbd8..cef8fbd8 100644
--- a/pic/ymon/vulpix.png
+++ b/gfx/pokemon/front_yellow/vulpix.png
Binary files differ
diff --git a/pic/ymon/wartortle.png b/gfx/pokemon/front_yellow/wartortle.png
index 961aaf4f..961aaf4f 100644
--- a/pic/ymon/wartortle.png
+++ b/gfx/pokemon/front_yellow/wartortle.png
Binary files differ
diff --git a/pic/ymon/weedle.png b/gfx/pokemon/front_yellow/weedle.png
index 989b57b5..989b57b5 100644
--- a/pic/ymon/weedle.png
+++ b/gfx/pokemon/front_yellow/weedle.png
Binary files differ
diff --git a/pic/ymon/weepinbell.png b/gfx/pokemon/front_yellow/weepinbell.png
index 8dd8fc34..8dd8fc34 100644
--- a/pic/ymon/weepinbell.png
+++ b/gfx/pokemon/front_yellow/weepinbell.png
Binary files differ
diff --git a/pic/ymon/weezing.png b/gfx/pokemon/front_yellow/weezing.png
index 445556b3..445556b3 100644
--- a/pic/ymon/weezing.png
+++ b/gfx/pokemon/front_yellow/weezing.png
Binary files differ
diff --git a/pic/ymon/wigglytuff.png b/gfx/pokemon/front_yellow/wigglytuff.png
index c9ae89ad..c9ae89ad 100644
--- a/pic/ymon/wigglytuff.png
+++ b/gfx/pokemon/front_yellow/wigglytuff.png
Binary files differ
diff --git a/pic/ymon/zapdos.png b/gfx/pokemon/front_yellow/zapdos.png
index 47b63d6a..47b63d6a 100644
--- a/pic/ymon/zapdos.png
+++ b/gfx/pokemon/front_yellow/zapdos.png
Binary files differ
diff --git a/pic/ymon/zubat.png b/gfx/pokemon/front_yellow/zubat.png
index 86ac4710..86ac4710 100644
--- a/pic/ymon/zubat.png
+++ b/gfx/pokemon/front_yellow/zubat.png
Binary files differ
diff --git a/gfx/pokemon/slide_down_7x3.tilemap b/gfx/pokemon/slide_down_7x3.tilemap
new file mode 100644
index 00000000..9976218b
--- /dev/null
+++ b/gfx/pokemon/slide_down_7x3.tilemap
Binary files differ
diff --git a/gfx/pokemon/slide_down_7x5.tilemap b/gfx/pokemon/slide_down_7x5.tilemap
new file mode 100644
index 00000000..c82337fe
--- /dev/null
+++ b/gfx/pokemon/slide_down_7x5.tilemap
Binary files differ
diff --git a/gfx/pokemon_yellow.png b/gfx/sgb/border.png
index 7c86a1ec..7c86a1ec 100644
--- a/gfx/pokemon_yellow.png
+++ b/gfx/sgb/border.png
Binary files differ
diff --git a/gfx/tilemaps/sgbborder.map b/gfx/sgb/border.tilemap
index 9c97c339..9c97c339 100644
--- a/gfx/tilemaps/sgbborder.map
+++ b/gfx/sgb/border.tilemap
Binary files differ
diff --git a/gfx/sgb/green_border.png b/gfx/sgb/green_border.png
new file mode 100644
index 00000000..939f2240
--- /dev/null
+++ b/gfx/sgb/green_border.png
Binary files differ
diff --git a/gfx/sgb/green_border.tilemap b/gfx/sgb/green_border.tilemap
new file mode 100644
index 00000000..5381bb17
--- /dev/null
+++ b/gfx/sgb/green_border.tilemap
Binary files differ
diff --git a/gfx/slotmachine1.png b/gfx/slotmachine1.png
deleted file mode 100644
index 335ce97c..00000000
--- a/gfx/slotmachine1.png
+++ /dev/null
Binary files differ
diff --git a/gfx/slots/green_slots_1.png b/gfx/slots/green_slots_1.png
new file mode 100644
index 00000000..dc7bffdd
--- /dev/null
+++ b/gfx/slots/green_slots_1.png
Binary files differ
diff --git a/gfx/slots/green_slots_2.png b/gfx/slots/green_slots_2.png
new file mode 100644
index 00000000..5072b556
--- /dev/null
+++ b/gfx/slots/green_slots_2.png
Binary files differ
diff --git a/gfx/tilemaps/slotmachine.map b/gfx/slots/slots.tilemap
index 68807bbd..68807bbd 100644
--- a/gfx/tilemaps/slotmachine.map
+++ b/gfx/slots/slots.tilemap
Binary files differ
diff --git a/gfx/slots/slots_1.png b/gfx/slots/slots_1.png
new file mode 100644
index 00000000..cee209f5
--- /dev/null
+++ b/gfx/slots/slots_1.png
Binary files differ
diff --git a/gfx/slotmachine2.png b/gfx/slots/slots_2.png
index b4bdf8a8..b4bdf8a8 100644
--- a/gfx/slotmachine2.png
+++ b/gfx/slots/slots_2.png
Binary files differ
diff --git a/gfx/spinner_arrow.png b/gfx/spinner_arrow.png
deleted file mode 100644
index aea0672b..00000000
--- a/gfx/spinner_arrow.png
+++ /dev/null
Binary files differ
diff --git a/gfx/copyright.png b/gfx/splash/copyright.png
index 71a2085f..71a2085f 100644
--- a/gfx/copyright.png
+++ b/gfx/splash/copyright.png
Binary files differ
diff --git a/gfx/falling_star.png b/gfx/splash/falling_star.png
index 9093bef4..9093bef4 100644
--- a/gfx/falling_star.png
+++ b/gfx/splash/falling_star.png
Binary files differ
diff --git a/gfx/gamefreak_logo.png b/gfx/splash/gamefreak_logo.png
index 1671943b..1671943b 100644
--- a/gfx/gamefreak_logo.png
+++ b/gfx/splash/gamefreak_logo.png
Binary files differ
diff --git a/gfx/gamefreak_intro.png b/gfx/splash/gamefreak_presents.png
index f65c64ed..f65c64ed 100644
--- a/gfx/gamefreak_intro.png
+++ b/gfx/splash/gamefreak_presents.png
Binary files differ
diff --git a/gfx/sprites.asm b/gfx/sprites.asm
new file mode 100644
index 00000000..ebafac20
--- /dev/null
+++ b/gfx/sprites.asm
@@ -0,0 +1,74 @@
+SECTION "NPC Sprites 1", ROMX
+
+ScientistSprite:: INCBIN "gfx/sprites/scientist.2bpp"
+RockerSprite:: INCBIN "gfx/sprites/rocker.2bpp"
+SwimmerSprite:: INCBIN "gfx/sprites/swimmer.2bpp"
+SafariZoneWorkerSprite:: INCBIN "gfx/sprites/safari_zone_worker.2bpp"
+GymGuideSprite:: INCBIN "gfx/sprites/gym_guide.2bpp"
+GrampsSprite:: INCBIN "gfx/sprites/gramps.2bpp"
+ClerkSprite:: INCBIN "gfx/sprites/clerk.2bpp"
+FishingGuruSprite:: INCBIN "gfx/sprites/fishing_guru.2bpp"
+GrannySprite:: INCBIN "gfx/sprites/granny.2bpp"
+NurseSprite:: INCBIN "gfx/sprites/nurse.2bpp"
+LinkReceptionistSprite:: INCBIN "gfx/sprites/link_receptionist.2bpp"
+SilphPresidentSprite:: INCBIN "gfx/sprites/silph_president.2bpp"
+SilphWorkerSprite:: INCBIN "gfx/sprites/silph_worker.2bpp"
+WardenSprite:: INCBIN "gfx/sprites/warden.2bpp"
+CaptainSprite:: INCBIN "gfx/sprites/captain.2bpp"
+FisherSprite:: INCBIN "gfx/sprites/fisher.2bpp"
+KogaSprite:: INCBIN "gfx/sprites/koga.2bpp"
+GuardSprite:: INCBIN "gfx/sprites/guard.2bpp"
+PokeBallSprite:: INCBIN "gfx/sprites/poke_ball.2bpp"
+FossilSprite:: INCBIN "gfx/sprites/fossil.2bpp"
+BoulderSprite:: INCBIN "gfx/sprites/boulder.2bpp"
+PaperSprite:: INCBIN "gfx/sprites/paper.2bpp"
+PokedexSprite:: INCBIN "gfx/sprites/pokedex.2bpp"
+ClipboardSprite:: INCBIN "gfx/sprites/clipboard.2bpp"
+SnorlaxSprite:: INCBIN "gfx/sprites/snorlax.2bpp"
+OldAmberSprite:: INCBIN "gfx/sprites/old_amber.2bpp"
+GamblerAsleepSprite:: INCBIN "gfx/sprites/gambler_asleep.2bpp"
+QuestionMarkSprite:: INCBIN "gfx/sprites/question_mark.2bpp"
+
+
+SECTION "NPC Sprites 2", ROMX
+
+RedBikeSprite:: INCBIN "gfx/sprites/red_bike.2bpp"
+RedSprite:: INCBIN "gfx/sprites/red.2bpp"
+BlueSprite:: INCBIN "gfx/sprites/blue.2bpp"
+OakSprite:: INCBIN "gfx/sprites/oak.2bpp"
+YoungsterSprite:: INCBIN "gfx/sprites/youngster.2bpp"
+MonsterSprite:: INCBIN "gfx/sprites/monster.2bpp"
+CooltrainerFSprite:: INCBIN "gfx/sprites/cooltrainer_f.2bpp"
+CooltrainerMSprite:: INCBIN "gfx/sprites/cooltrainer_m.2bpp"
+LittleGirlSprite:: INCBIN "gfx/sprites/little_girl.2bpp"
+BirdSprite:: INCBIN "gfx/sprites/bird.2bpp"
+MiddleAgedManSprite:: INCBIN "gfx/sprites/middle_aged_man.2bpp"
+GamblerSprite:: INCBIN "gfx/sprites/gambler.2bpp"
+SuperNerdSprite:: INCBIN "gfx/sprites/super_nerd.2bpp"
+GirlSprite:: INCBIN "gfx/sprites/girl.2bpp"
+HikerSprite:: INCBIN "gfx/sprites/hiker.2bpp"
+BeautySprite:: INCBIN "gfx/sprites/beauty.2bpp"
+GentlemanSprite:: INCBIN "gfx/sprites/gentleman.2bpp"
+DaisySprite:: INCBIN "gfx/sprites/daisy.2bpp"
+BikerSprite:: INCBIN "gfx/sprites/biker.2bpp"
+SailorSprite:: INCBIN "gfx/sprites/sailor.2bpp"
+CookSprite:: INCBIN "gfx/sprites/cook.2bpp"
+BikeShopClerkSprite:: INCBIN "gfx/sprites/bike_shop_clerk.2bpp"
+MrFujiSprite:: INCBIN "gfx/sprites/mr_fuji.2bpp"
+GiovanniSprite:: INCBIN "gfx/sprites/giovanni.2bpp"
+RocketSprite:: INCBIN "gfx/sprites/rocket.2bpp"
+ChannelerSprite:: INCBIN "gfx/sprites/channeler.2bpp"
+WaiterSprite:: INCBIN "gfx/sprites/waiter.2bpp"
+ErikaSprite:: INCBIN "gfx/sprites/erika.2bpp"
+MiddleAgedWomanSprite:: INCBIN "gfx/sprites/middle_aged_woman.2bpp"
+BrunetteGirlSprite:: INCBIN "gfx/sprites/brunette_girl.2bpp"
+LanceSprite:: INCBIN "gfx/sprites/lance.2bpp"
+MomSprite:: INCBIN "gfx/sprites/mom.2bpp"
+BaldingGuySprite:: INCBIN "gfx/sprites/balding_guy.2bpp"
+LittleBoySprite:: INCBIN "gfx/sprites/little_boy.2bpp"
+GameboyKidSprite:: INCBIN "gfx/sprites/gameboy_kid.2bpp"
+FairySprite:: INCBIN "gfx/sprites/fairy.2bpp"
+AgathaSprite:: INCBIN "gfx/sprites/agatha.2bpp"
+BrunoSprite:: INCBIN "gfx/sprites/bruno.2bpp"
+LoreleiSprite:: INCBIN "gfx/sprites/lorelei.2bpp"
+SeelSprite:: INCBIN "gfx/sprites/seel.2bpp"
diff --git a/gfx/sprites/foulard_woman.png b/gfx/sprites/beauty.png
index 4e510400..4e510400 100644
--- a/gfx/sprites/foulard_woman.png
+++ b/gfx/sprites/beauty.png
Binary files differ
diff --git a/gfx/sprites/bike_shop_guy.png b/gfx/sprites/bike_shop_clerk.png
index da3d5ac6..da3d5ac6 100644
--- a/gfx/sprites/bike_shop_guy.png
+++ b/gfx/sprites/bike_shop_clerk.png
Binary files differ
diff --git a/gfx/sprites/ss_captain.png b/gfx/sprites/captain.png
index d2967e0f..d2967e0f 100644
--- a/gfx/sprites/ss_captain.png
+++ b/gfx/sprites/captain.png
Binary files differ
diff --git a/gfx/sprites/medium.png b/gfx/sprites/channeler.png
index 17f7603f..17f7603f 100644
--- a/gfx/sprites/medium.png
+++ b/gfx/sprites/channeler.png
Binary files differ
diff --git a/gfx/sprites/clefairy.png b/gfx/sprites/clefairy.png
index 06fe0076..e8502ddd 100644
--- a/gfx/sprites/clefairy.png
+++ b/gfx/sprites/clefairy.png
Binary files differ
diff --git a/gfx/sprites/clefairy2.png b/gfx/sprites/clefairy2.png
deleted file mode 100644
index e8502ddd..00000000
--- a/gfx/sprites/clefairy2.png
+++ /dev/null
Binary files differ
diff --git a/gfx/sprites/mart_guy.png b/gfx/sprites/clerk.png
index 66448e77..66448e77 100644
--- a/gfx/sprites/mart_guy.png
+++ b/gfx/sprites/clerk.png
Binary files differ
diff --git a/gfx/sprites/lass.png b/gfx/sprites/cooltrainer_f.png
index 53bf81b1..53bf81b1 100644
--- a/gfx/sprites/lass.png
+++ b/gfx/sprites/cooltrainer_f.png
Binary files differ
diff --git a/gfx/sprites/black_hair_boy_1.png b/gfx/sprites/cooltrainer_m.png
index ffd94f41..ffd94f41 100644
--- a/gfx/sprites/black_hair_boy_1.png
+++ b/gfx/sprites/cooltrainer_m.png
Binary files differ
diff --git a/gfx/sprites/fairy.png b/gfx/sprites/fairy.png
new file mode 100644
index 00000000..06fe0076
--- /dev/null
+++ b/gfx/sprites/fairy.png
Binary files differ
diff --git a/gfx/sprites/fisher.png b/gfx/sprites/fisher.png
index ef3f864b..a84a2e37 100644
--- a/gfx/sprites/fisher.png
+++ b/gfx/sprites/fisher.png
Binary files differ
diff --git a/gfx/sprites/fisher2.png b/gfx/sprites/fisher2.png
deleted file mode 100644
index a84a2e37..00000000
--- a/gfx/sprites/fisher2.png
+++ /dev/null
Binary files differ
diff --git a/gfx/sprites/fishing_guru.png b/gfx/sprites/fishing_guru.png
new file mode 100644
index 00000000..ef3f864b
--- /dev/null
+++ b/gfx/sprites/fishing_guru.png
Binary files differ
diff --git a/gfx/sprites/omanyte.png b/gfx/sprites/fossil.png
index 9dd1e5c5..9dd1e5c5 100644
--- a/gfx/sprites/omanyte.png
+++ b/gfx/sprites/fossil.png
Binary files differ
diff --git a/gfx/sprites/lying_old_man.png b/gfx/sprites/gambler_asleep.png
index 43a9f8df..43a9f8df 100644
--- a/gfx/sprites/lying_old_man.png
+++ b/gfx/sprites/gambler_asleep.png
Binary files differ
diff --git a/gfx/sprites/old_person.png b/gfx/sprites/gramps.png
index 729092db..729092db 100644
--- a/gfx/sprites/old_person.png
+++ b/gfx/sprites/gramps.png
Binary files differ
diff --git a/gfx/sprites/old_medium_woman.png b/gfx/sprites/granny.png
index fe771c0f..fe771c0f 100644
--- a/gfx/sprites/old_medium_woman.png
+++ b/gfx/sprites/granny.png
Binary files differ
diff --git a/gfx/sprites/gym_helper.png b/gfx/sprites/gym_guide.png
index 15d83d9c..15d83d9c 100644
--- a/gfx/sprites/gym_helper.png
+++ b/gfx/sprites/gym_guide.png
Binary files differ
diff --git a/gfx/sprites/blackbelt.png b/gfx/sprites/koga.png
index 56a64e31..56a64e31 100644
--- a/gfx/sprites/blackbelt.png
+++ b/gfx/sprites/koga.png
Binary files differ
diff --git a/gfx/sprites/cable_club_woman.png b/gfx/sprites/link_receptionist.png
index 3858c52f..3858c52f 100644
--- a/gfx/sprites/cable_club_woman.png
+++ b/gfx/sprites/link_receptionist.png
Binary files differ
diff --git a/gfx/sprites/young_boy.png b/gfx/sprites/little_boy.png
index 24996549..24996549 100644
--- a/gfx/sprites/young_boy.png
+++ b/gfx/sprites/little_boy.png
Binary files differ
diff --git a/gfx/sprites/fat_bald_guy.png b/gfx/sprites/middle_aged_man.png
index fea7979d..fea7979d 100644
--- a/gfx/sprites/fat_bald_guy.png
+++ b/gfx/sprites/middle_aged_man.png
Binary files differ
diff --git a/gfx/sprites/mom_geisha.png b/gfx/sprites/middle_aged_woman.png
index 13862615..13862615 100644
--- a/gfx/sprites/mom_geisha.png
+++ b/gfx/sprites/middle_aged_woman.png
Binary files differ
diff --git a/gfx/sprites/slowbro.png b/gfx/sprites/monster.png
index 80d615b2..80d615b2 100644
--- a/gfx/sprites/slowbro.png
+++ b/gfx/sprites/monster.png
Binary files differ
diff --git a/gfx/sprites/paper_sheet.png b/gfx/sprites/paper.png
index 675183b6..675183b6 100644
--- a/gfx/sprites/paper_sheet.png
+++ b/gfx/sprites/paper.png
Binary files differ
diff --git a/gfx/sprites/ball.png b/gfx/sprites/poke_ball.png
index dcce4700..dcce4700 100644
--- a/gfx/sprites/ball.png
+++ b/gfx/sprites/poke_ball.png
Binary files differ
diff --git a/gfx/sprites/book_map_dex.png b/gfx/sprites/pokedex.png
index 60554979..60554979 100644
--- a/gfx/sprites/book_map_dex.png
+++ b/gfx/sprites/pokedex.png
Binary files differ
diff --git a/gfx/sprites/cycling.png b/gfx/sprites/red_bike.png
index ed117d0b..ed117d0b 100644
--- a/gfx/sprites/cycling.png
+++ b/gfx/sprites/red_bike.png
Binary files differ
diff --git a/gfx/sprites/white_player.png b/gfx/sprites/safari_zone_worker.png
index e55dab9d..e55dab9d 100644
--- a/gfx/sprites/white_player.png
+++ b/gfx/sprites/safari_zone_worker.png
Binary files differ
diff --git a/gfx/sprites/oak_aide.png b/gfx/sprites/scientist.png
index a91708e6..a91708e6 100644
--- a/gfx/sprites/oak_aide.png
+++ b/gfx/sprites/scientist.png
Binary files differ
diff --git a/gfx/sprites/mr_masterball.png b/gfx/sprites/silph_president.png
index 81818568..81818568 100644
--- a/gfx/sprites/mr_masterball.png
+++ b/gfx/sprites/silph_president.png
Binary files differ
diff --git a/gfx/sprites/lapras_giver.png b/gfx/sprites/silph_worker.png
index 00f369fd..00f369fd 100644
--- a/gfx/sprites/lapras_giver.png
+++ b/gfx/sprites/silph_worker.png
Binary files differ
diff --git a/gfx/sprites/black_hair_boy_2.png b/gfx/sprites/super_nerd.png
index 7d1b0ddd..7d1b0ddd 100644
--- a/gfx/sprites/black_hair_boy_2.png
+++ b/gfx/sprites/super_nerd.png
Binary files differ
diff --git a/gfx/sprites/bug_catcher.png b/gfx/sprites/youngster.png
index da64ee1c..da64ee1c 100644
--- a/gfx/sprites/bug_catcher.png
+++ b/gfx/sprites/youngster.png
Binary files differ
diff --git a/gfx/surfing_pikachu_1.png b/gfx/surfing_pikachu_1.png
deleted file mode 100644
index abaf4ba4..00000000
--- a/gfx/surfing_pikachu_1.png
+++ /dev/null
Binary files differ
diff --git a/gfx/text_box.png b/gfx/text_box.png
deleted file mode 100644
index 3673e74c..00000000
--- a/gfx/text_box.png
+++ /dev/null
Binary files differ
diff --git a/gfx/tilesets.asm b/gfx/tilesets.asm
new file mode 100644
index 00000000..e6db3c21
--- /dev/null
+++ b/gfx/tilesets.asm
@@ -0,0 +1,64 @@
+SECTION "Tilesets 1", ROMX
+
+Overworld_GFX:: INCBIN "gfx/tilesets/overworld.2bpp"
+ ds 32
+Overworld_Block:: INCBIN "gfx/blocksets/overworld.bst"
+
+RedsHouse1_GFX::
+RedsHouse2_GFX:: INCBIN "gfx/tilesets/reds_house.2bpp"
+RedsHouse1_Block::
+RedsHouse2_Block:: INCBIN "gfx/blocksets/reds_house.bst"
+
+House_GFX:: INCBIN "gfx/tilesets/house.2bpp"
+House_Block:: INCBIN "gfx/blocksets/house.bst"
+Mansion_GFX:: INCBIN "gfx/tilesets/mansion.2bpp"
+Mansion_Block:: INCBIN "gfx/blocksets/mansion.bst"
+ShipPort_GFX:: INCBIN "gfx/tilesets/ship_port.2bpp"
+ShipPort_Block:: INCBIN "gfx/blocksets/ship_port.bst"
+Interior_GFX:: INCBIN "gfx/tilesets/interior.2bpp"
+Interior_Block:: INCBIN "gfx/blocksets/interior.bst"
+Plateau_GFX:: INCBIN "gfx/tilesets/plateau.2bpp"
+Plateau_Block:: INCBIN "gfx/blocksets/plateau.bst"
+
+
+SECTION "Tilesets 2", ROMX
+
+Dojo_GFX::
+Gym_GFX:: INCBIN "gfx/tilesets/gym.2bpp"
+Dojo_Block::
+Gym_Block:: INCBIN "gfx/blocksets/gym.bst"
+
+Mart_GFX::
+Pokecenter_GFX:: INCBIN "gfx/tilesets/pokecenter.2bpp"
+Mart_Block::
+Pokecenter_Block:: INCBIN "gfx/blocksets/pokecenter.bst"
+
+ForestGate_GFX::
+Museum_GFX::
+Gate_GFX:: INCBIN "gfx/tilesets/gate.2bpp"
+ForestGate_Block::
+Museum_Block::
+Gate_Block:: INCBIN "gfx/blocksets/gate.bst"
+
+Forest_GFX:: INCBIN "gfx/tilesets/forest.2bpp"
+Forest_Block:: INCBIN "gfx/blocksets/forest.bst"
+Facility_GFX:: INCBIN "gfx/tilesets/facility.2bpp"
+Facility_Block:: INCBIN "gfx/blocksets/facility.bst"
+
+
+SECTION "Tilesets 3", ROMX
+
+Cemetery_GFX:: INCBIN "gfx/tilesets/cemetery.2bpp"
+Cemetery_Block:: INCBIN "gfx/blocksets/cemetery.bst"
+Cavern_GFX:: INCBIN "gfx/tilesets/cavern.2bpp"
+Cavern_Block:: INCBIN "gfx/blocksets/cavern.bst"
+Lobby_GFX:: INCBIN "gfx/tilesets/lobby.2bpp"
+Lobby_Block:: INCBIN "gfx/blocksets/lobby.bst"
+Ship_GFX:: INCBIN "gfx/tilesets/ship.2bpp"
+Ship_Block:: INCBIN "gfx/blocksets/ship.bst"
+Lab_GFX:: INCBIN "gfx/tilesets/lab.2bpp"
+Lab_Block:: INCBIN "gfx/blocksets/lab.bst"
+Club_GFX:: INCBIN "gfx/tilesets/club.2bpp"
+Club_Block:: INCBIN "gfx/blocksets/club.bst"
+Underground_GFX:: INCBIN "gfx/tilesets/underground.2bpp"
+Underground_Block:: INCBIN "gfx/blocksets/underground.bst"
diff --git a/gfx/tilesets/beachhouse.tilecoll b/gfx/tilesets/beachhouse.tilecoll
deleted file mode 100644
index 54ddac19..00000000
--- a/gfx/tilesets/beachhouse.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/gfx/tilesets/cavern.tilecoll b/gfx/tilesets/cavern.tilecoll
deleted file mode 100644
index dab3e10f..00000000
--- a/gfx/tilesets/cavern.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
- !"*-0 \ No newline at end of file
diff --git a/gfx/tilesets/cemetery.tilecoll b/gfx/tilesets/cemetery.tilecoll
deleted file mode 100644
index f4bee2ee..00000000
--- a/gfx/tilesets/cemetery.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
-"BR \ No newline at end of file
diff --git a/gfx/tilesets/club.tilecoll b/gfx/tilesets/club.tilecoll
deleted file mode 100644
index 9bd5f3ba..00000000
--- a/gfx/tilesets/club.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
-&(),-./A \ No newline at end of file
diff --git a/gfx/tilesets/facility.tilecoll b/gfx/tilesets/facility.tilecoll
deleted file mode 100644
index d55b119b..00000000
--- a/gfx/tilesets/facility.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
- !"012BCHRUX^ \ No newline at end of file
diff --git a/gfx/tilesets/forest.tilecoll b/gfx/tilesets/forest.tilecoll
deleted file mode 100644
index 45bf737e..00000000
--- a/gfx/tilesets/forest.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
- .0479:@QRZ\^_ \ No newline at end of file
diff --git a/gfx/tilesets/gate.tilecoll b/gfx/tilesets/gate.tilecoll
deleted file mode 100644
index dd06b044..00000000
--- a/gfx/tilesets/gate.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
-78;<^ \ No newline at end of file
diff --git a/gfx/tilesets/gym.tilecoll b/gfx/tilesets/gym.tilecoll
deleted file mode 100644
index 916e2579..00000000
--- a/gfx/tilesets/gym.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
-+<=?JLM \ No newline at end of file
diff --git a/gfx/tilesets/house.tilecoll b/gfx/tilesets/house.tilecoll
deleted file mode 100644
index 95497e70..00000000
--- a/gfx/tilesets/house.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
-(27DT\ \ No newline at end of file
diff --git a/gfx/tilesets/interior.tilecoll b/gfx/tilesets/interior.tilecoll
deleted file mode 100644
index b5d32687..00000000
--- a/gfx/tilesets/interior.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
-;EGUV \ No newline at end of file
diff --git a/gfx/tilesets/lab.tilecoll b/gfx/tilesets/lab.tilecoll
deleted file mode 100644
index c171ba99..00000000
--- a/gfx/tilesets/lab.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
- &47 \ No newline at end of file
diff --git a/gfx/tilesets/lobby.tilecoll b/gfx/tilesets/lobby.tilecoll
deleted file mode 100644
index 6388083c..00000000
--- a/gfx/tilesets/lobby.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
- 8E \ No newline at end of file
diff --git a/gfx/tilesets/mansion.tilecoll b/gfx/tilesets/mansion.tilecoll
deleted file mode 100644
index e07ea10a..00000000
--- a/gfx/tilesets/mansion.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
-,S \ No newline at end of file
diff --git a/gfx/tilesets/overworld.tilecoll b/gfx/tilesets/overworld.tilecoll
deleted file mode 100644
index dae824f1..00000000
--- a/gfx/tilesets/overworld.tilecoll
+++ /dev/null
Binary files differ
diff --git a/gfx/tilesets/plateau.tilecoll b/gfx/tilesets/plateau.tilecoll
deleted file mode 100644
index 5958688e..00000000
--- a/gfx/tilesets/plateau.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
-#,-;E \ No newline at end of file
diff --git a/gfx/tilesets/pokecenter.tilecoll b/gfx/tilesets/pokecenter.tilecoll
deleted file mode 100644
index 928af693..00000000
--- a/gfx/tilesets/pokecenter.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
-<^ \ No newline at end of file
diff --git a/gfx/tilesets/reds_house.tilecoll b/gfx/tilesets/reds_house.tilecoll
deleted file mode 100644
index b19db300..00000000
--- a/gfx/tilesets/reds_house.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/gfx/tilesets/ship.tilecoll b/gfx/tilesets/ship.tilecoll
deleted file mode 100644
index d78bcc45..00000000
--- a/gfx/tilesets/ship.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
- #479J \ No newline at end of file
diff --git a/gfx/tilesets/ship_port.tilecoll b/gfx/tilesets/ship_port.tilecoll
deleted file mode 100644
index 2dc99b5c..00000000
--- a/gfx/tilesets/ship_port.tilecoll
+++ /dev/null
@@ -1,2 +0,0 @@
-
-2; \ No newline at end of file
diff --git a/gfx/tilesets/tilesets_rg/flower.png b/gfx/tilesets/tilesets_rg/flower.png
new file mode 100644
index 00000000..bb54085a
--- /dev/null
+++ b/gfx/tilesets/tilesets_rg/flower.png
Binary files differ
diff --git a/gfx/tilesets/tilesets_rg/forest.png b/gfx/tilesets/tilesets_rg/forest.png
new file mode 100644
index 00000000..bd01b7cf
--- /dev/null
+++ b/gfx/tilesets/tilesets_rg/forest.png
Binary files differ
diff --git a/gfx/tilesets/tilesets_rg/overworld.png b/gfx/tilesets/tilesets_rg/overworld.png
new file mode 100644
index 00000000..009c1359
--- /dev/null
+++ b/gfx/tilesets/tilesets_rg/overworld.png
Binary files differ
diff --git a/gfx/tilesets/underground.tilecoll b/gfx/tilesets/underground.tilecoll
deleted file mode 100644
index 75efd22b..00000000
--- a/gfx/tilesets/underground.tilecoll
+++ /dev/null
@@ -1 +0,0 @@
-  \ No newline at end of file
diff --git a/gfx/blueversion.png b/gfx/title/blue_version.png
index a9c87be8..a9c87be8 100644
--- a/gfx/blueversion.png
+++ b/gfx/title/blue_version.png
Binary files differ
diff --git a/gfx/gamefreak.png b/gfx/title/gamefreak_inc.png
index 509232bd..509232bd 100644
--- a/gfx/gamefreak.png
+++ b/gfx/title/gamefreak_inc.png
Binary files differ
diff --git a/gfx/player_title.png b/gfx/title/player.png
index 093664d1..093664d1 100644
--- a/gfx/player_title.png
+++ b/gfx/title/player.png
Binary files differ
diff --git a/gfx/pokemon_logo.png b/gfx/title/pokemon_logo.png
index 64f9b23f..64f9b23f 100644
--- a/gfx/pokemon_logo.png
+++ b/gfx/title/pokemon_logo.png
Binary files differ
diff --git a/gfx/pokemon_logo_japan.png b/gfx/title/pokemon_logo_japan.png
index d75bb302..d75bb302 100644
--- a/gfx/pokemon_logo_japan.png
+++ b/gfx/title/pokemon_logo_japan.png
Binary files differ
diff --git a/gfx/mon_nest_icon.png b/gfx/town_map/mon_nest_icon.png
index ade69944..ade69944 100644
--- a/gfx/mon_nest_icon.png
+++ b/gfx/town_map/mon_nest_icon.png
Binary files differ
diff --git a/gfx/town_map.png b/gfx/town_map/town_map.png
index 23e52130..23e52130 100644
--- a/gfx/town_map.png
+++ b/gfx/town_map/town_map.png
Binary files differ
diff --git a/gfx/town_map.rle b/gfx/town_map/town_map.rle
index f9ede0ec..f9ede0ec 100755
--- a/gfx/town_map.rle
+++ b/gfx/town_map/town_map.rle
Binary files differ
diff --git a/gfx/town_map_cursor.png b/gfx/town_map/town_map_cursor.png
index 39cf2c2e..39cf2c2e 100644
--- a/gfx/town_map_cursor.png
+++ b/gfx/town_map/town_map_cursor.png
Binary files differ
diff --git a/gfx/up_arrow.png b/gfx/town_map/up_arrow.png
index 6ebd7bfd..6ebd7bfd 100644
--- a/gfx/up_arrow.png
+++ b/gfx/town_map/up_arrow.png
Binary files differ
diff --git a/gfx/trade.asm b/gfx/trade.asm
new file mode 100644
index 00000000..e5d8db05
--- /dev/null
+++ b/gfx/trade.asm
@@ -0,0 +1,7 @@
+TradingAnimationGraphics:
+INCBIN "gfx/trade/game_boy.2bpp"
+INCBIN "gfx/trade/link_cable.2bpp"
+TradingAnimationGraphicsEnd:
+
+TradingAnimationGraphics2: INCBIN "gfx/trade/cable_ball.2bpp"
+TradingAnimationGraphics2End:
diff --git a/gfx/trade/bubble.png b/gfx/trade/bubble.png
new file mode 100644
index 00000000..93611a60
--- /dev/null
+++ b/gfx/trade/bubble.png
Binary files differ
diff --git a/gfx/trade2.png b/gfx/trade/cable_ball.png
index ccd3a222..ccd3a222 100644
--- a/gfx/trade2.png
+++ b/gfx/trade/cable_ball.png
Binary files differ
diff --git a/gfx/game_boy.png b/gfx/trade/game_boy.png
index 62144956..62144956 100644
--- a/gfx/game_boy.png
+++ b/gfx/trade/game_boy.png
Binary files differ
diff --git a/gfx/trade/game_boy.tilemap b/gfx/trade/game_boy.tilemap
new file mode 100644
index 00000000..5f772126
--- /dev/null
+++ b/gfx/trade/game_boy.tilemap
@@ -0,0 +1 @@
+12222345667849::;8<=>>?@ABCCDEFGCHIJACKLMNOPPPQR \ No newline at end of file
diff --git a/gfx/link_cable.png b/gfx/trade/link_cable.png
index d0421472..d0421472 100644
--- a/gfx/link_cable.png
+++ b/gfx/trade/link_cable.png
Binary files differ
diff --git a/gfx/trade/link_cable.tilemap b/gfx/trade/link_cable.tilemap
new file mode 100644
index 00000000..3f7e248a
--- /dev/null
+++ b/gfx/trade/link_cable.tilemap
@@ -0,0 +1 @@
+CUVSSSSSSSSSCWXTTTTTTTTTCYZCCCCCCCCC \ No newline at end of file
diff --git a/gfx/trainer_card.asm b/gfx/trainer_card.asm
new file mode 100644
index 00000000..7484e4ee
--- /dev/null
+++ b/gfx/trainer_card.asm
@@ -0,0 +1,8 @@
+TrainerInfoTextBoxTileGraphics: INCBIN "gfx/trainer_card/trainer_info.2bpp"
+TrainerInfoTextBoxTileGraphicsEnd:
+
+BlankLeaderNames: INCBIN "gfx/trainer_card/blank_leader_names.2bpp"
+
+CircleTile: INCBIN "gfx/trainer_card/circle_tile.2bpp"
+
+BadgeNumbersTileGraphics: INCBIN "gfx/trainer_card/badge_numbers.2bpp"
diff --git a/gfx/badge_numbers.png b/gfx/trainer_card/badge_numbers.png
index c9283065..c9283065 100644
--- a/gfx/badge_numbers.png
+++ b/gfx/trainer_card/badge_numbers.png
Binary files differ
diff --git a/gfx/badges.png b/gfx/trainer_card/badges.png
index 46e7add3..46e7add3 100644
--- a/gfx/badges.png
+++ b/gfx/trainer_card/badges.png
Binary files differ
diff --git a/gfx/blank_leader_names.png b/gfx/trainer_card/blank_leader_names.png
index 867a39fe..867a39fe 100644
--- a/gfx/blank_leader_names.png
+++ b/gfx/trainer_card/blank_leader_names.png
Binary files differ
diff --git a/gfx/circle_tile.png b/gfx/trainer_card/circle_tile.png
index 64c00c9f..64c00c9f 100644
--- a/gfx/circle_tile.png
+++ b/gfx/trainer_card/circle_tile.png
Binary files differ
diff --git a/gfx/trainer_info.png b/gfx/trainer_card/trainer_info.png
index d3ac169f..d3ac169f 100644
--- a/gfx/trainer_info.png
+++ b/gfx/trainer_card/trainer_info.png
Binary files differ
diff --git a/pic/trainer/agatha.png b/gfx/trainers/agatha.png
index d95b77be..d95b77be 100644
--- a/pic/trainer/agatha.png
+++ b/gfx/trainers/agatha.png
Binary files differ
diff --git a/pic/trainer/beauty.png b/gfx/trainers/beauty.png
index a7e53c13..a7e53c13 100644
--- a/pic/trainer/beauty.png
+++ b/gfx/trainers/beauty.png
Binary files differ
diff --git a/pic/trainer/biker.png b/gfx/trainers/biker.png
index b64809f9..b64809f9 100644
--- a/pic/trainer/biker.png
+++ b/gfx/trainers/biker.png
Binary files differ
diff --git a/pic/trainer/birdkeeper.png b/gfx/trainers/birdkeeper.png
index 6e06d839..6e06d839 100644
--- a/pic/trainer/birdkeeper.png
+++ b/gfx/trainers/birdkeeper.png
Binary files differ
diff --git a/pic/trainer/blackbelt.png b/gfx/trainers/blackbelt.png
index 8ba5480f..8ba5480f 100644
--- a/pic/trainer/blackbelt.png
+++ b/gfx/trainers/blackbelt.png
Binary files differ
diff --git a/pic/trainer/blaine.png b/gfx/trainers/blaine.png
index 0698b3b9..0698b3b9 100644
--- a/pic/trainer/blaine.png
+++ b/gfx/trainers/blaine.png
Binary files differ
diff --git a/pic/trainer/brock.png b/gfx/trainers/brock.png
index fc8f2378..fc8f2378 100644
--- a/pic/trainer/brock.png
+++ b/gfx/trainers/brock.png
Binary files differ
diff --git a/pic/trainer/bruno.png b/gfx/trainers/bruno.png
index 651b7c9c..651b7c9c 100644
--- a/pic/trainer/bruno.png
+++ b/gfx/trainers/bruno.png
Binary files differ
diff --git a/pic/trainer/bugcatcher.png b/gfx/trainers/bugcatcher.png
index 0d108f40..0d108f40 100644
--- a/pic/trainer/bugcatcher.png
+++ b/gfx/trainers/bugcatcher.png
Binary files differ
diff --git a/pic/trainer/burglar.png b/gfx/trainers/burglar.png
index d4af219b..d4af219b 100644
--- a/pic/trainer/burglar.png
+++ b/gfx/trainers/burglar.png
Binary files differ
diff --git a/pic/trainer/channeler.png b/gfx/trainers/channeler.png
index 3fd174a5..3fd174a5 100644
--- a/pic/trainer/channeler.png
+++ b/gfx/trainers/channeler.png
Binary files differ
diff --git a/pic/trainer/cooltrainerf.png b/gfx/trainers/cooltrainerf.png
index 0a90c5e5..0a90c5e5 100644
--- a/pic/trainer/cooltrainerf.png
+++ b/gfx/trainers/cooltrainerf.png
Binary files differ
diff --git a/pic/trainer/cooltrainerm.png b/gfx/trainers/cooltrainerm.png
index 2482bc2b..2482bc2b 100644
--- a/pic/trainer/cooltrainerm.png
+++ b/gfx/trainers/cooltrainerm.png
Binary files differ
diff --git a/pic/trainer/cueball.png b/gfx/trainers/cueball.png
index 6d3ae768..6d3ae768 100644
--- a/pic/trainer/cueball.png
+++ b/gfx/trainers/cueball.png
Binary files differ
diff --git a/pic/trainer/engineer.png b/gfx/trainers/engineer.png
index dd0ab2c0..dd0ab2c0 100644
--- a/pic/trainer/engineer.png
+++ b/gfx/trainers/engineer.png
Binary files differ
diff --git a/pic/trainer/erika.png b/gfx/trainers/erika.png
index 961d094b..961d094b 100644
--- a/pic/trainer/erika.png
+++ b/gfx/trainers/erika.png
Binary files differ
diff --git a/pic/trainer/fisher.png b/gfx/trainers/fisher.png
index ccc9d705..ccc9d705 100644
--- a/pic/trainer/fisher.png
+++ b/gfx/trainers/fisher.png
Binary files differ
diff --git a/pic/trainer/gambler.png b/gfx/trainers/gambler.png
index d3ec85b7..d3ec85b7 100644
--- a/pic/trainer/gambler.png
+++ b/gfx/trainers/gambler.png
Binary files differ
diff --git a/pic/trainer/gentleman.png b/gfx/trainers/gentleman.png
index 62a2ffb7..62a2ffb7 100644
--- a/pic/trainer/gentleman.png
+++ b/gfx/trainers/gentleman.png
Binary files differ
diff --git a/pic/trainer/giovanni.png b/gfx/trainers/giovanni.png
index 505adebd..505adebd 100644
--- a/pic/trainer/giovanni.png
+++ b/gfx/trainers/giovanni.png
Binary files differ
diff --git a/pic/trainer/hiker.png b/gfx/trainers/hiker.png
index 5223a7d0..5223a7d0 100644
--- a/pic/trainer/hiker.png
+++ b/gfx/trainers/hiker.png
Binary files differ
diff --git a/pic/trainer/jr.trainerf.png b/gfx/trainers/jr.trainerf.png
index 55ceef30..55ceef30 100644
--- a/pic/trainer/jr.trainerf.png
+++ b/gfx/trainers/jr.trainerf.png
Binary files differ
diff --git a/pic/trainer/jr.trainerm.png b/gfx/trainers/jr.trainerm.png
index 48392bf5..48392bf5 100644
--- a/pic/trainer/jr.trainerm.png
+++ b/gfx/trainers/jr.trainerm.png
Binary files differ
diff --git a/pic/trainer/juggler.png b/gfx/trainers/juggler.png
index 58dd61ee..58dd61ee 100644
--- a/pic/trainer/juggler.png
+++ b/gfx/trainers/juggler.png
Binary files differ
diff --git a/pic/trainer/koga.png b/gfx/trainers/koga.png
index 6caa7da5..6caa7da5 100644
--- a/pic/trainer/koga.png
+++ b/gfx/trainers/koga.png
Binary files differ
diff --git a/pic/trainer/lance.png b/gfx/trainers/lance.png
index d836b284..d836b284 100644
--- a/pic/trainer/lance.png
+++ b/gfx/trainers/lance.png
Binary files differ
diff --git a/pic/trainer/lass.png b/gfx/trainers/lass.png
index 432f4090..432f4090 100644
--- a/pic/trainer/lass.png
+++ b/gfx/trainers/lass.png
Binary files differ
diff --git a/pic/trainer/lorelei.png b/gfx/trainers/lorelei.png
index 608107bf..608107bf 100644
--- a/pic/trainer/lorelei.png
+++ b/gfx/trainers/lorelei.png
Binary files differ
diff --git a/pic/trainer/lt.surge.png b/gfx/trainers/lt.surge.png
index 5a06a320..5a06a320 100644
--- a/pic/trainer/lt.surge.png
+++ b/gfx/trainers/lt.surge.png
Binary files differ
diff --git a/pic/trainer/misty.png b/gfx/trainers/misty.png
index ea2e655a..ea2e655a 100644
--- a/pic/trainer/misty.png
+++ b/gfx/trainers/misty.png
Binary files differ
diff --git a/pic/trainer/pokemaniac.png b/gfx/trainers/pokemaniac.png
index 954bbc43..954bbc43 100644
--- a/pic/trainer/pokemaniac.png
+++ b/gfx/trainers/pokemaniac.png
Binary files differ
diff --git a/pic/trainer/prof.oak.png b/gfx/trainers/prof.oak.png
index 4334e1d0..4334e1d0 100644
--- a/pic/trainer/prof.oak.png
+++ b/gfx/trainers/prof.oak.png
Binary files differ
diff --git a/pic/trainer/psychic.png b/gfx/trainers/psychic.png
index 58244d80..58244d80 100644
--- a/pic/trainer/psychic.png
+++ b/gfx/trainers/psychic.png
Binary files differ
diff --git a/pic/trainer/rival1.png b/gfx/trainers/rival1.png
index 6b94fd27..6b94fd27 100644
--- a/pic/trainer/rival1.png
+++ b/gfx/trainers/rival1.png
Binary files differ
diff --git a/pic/trainer/rival2.png b/gfx/trainers/rival2.png
index df9b2524..df9b2524 100644
--- a/pic/trainer/rival2.png
+++ b/gfx/trainers/rival2.png
Binary files differ
diff --git a/pic/trainer/rival3.png b/gfx/trainers/rival3.png
index 5e6fc5ff..5e6fc5ff 100644
--- a/pic/trainer/rival3.png
+++ b/gfx/trainers/rival3.png
Binary files differ
diff --git a/pic/trainer/rocker.png b/gfx/trainers/rocker.png
index 70ecf4e8..70ecf4e8 100644
--- a/pic/trainer/rocker.png
+++ b/gfx/trainers/rocker.png
Binary files differ
diff --git a/pic/trainer/rocket.png b/gfx/trainers/rocket.png
index a5e73de3..a5e73de3 100644
--- a/pic/trainer/rocket.png
+++ b/gfx/trainers/rocket.png
Binary files differ
diff --git a/pic/trainer/sabrina.png b/gfx/trainers/sabrina.png
index 391144fc..391144fc 100644
--- a/pic/trainer/sabrina.png
+++ b/gfx/trainers/sabrina.png
Binary files differ
diff --git a/pic/trainer/sailor.png b/gfx/trainers/sailor.png
index b3b06e4c..b3b06e4c 100644
--- a/pic/trainer/sailor.png
+++ b/gfx/trainers/sailor.png
Binary files differ
diff --git a/pic/trainer/scientist.png b/gfx/trainers/scientist.png
index eef66fe7..eef66fe7 100644
--- a/pic/trainer/scientist.png
+++ b/gfx/trainers/scientist.png
Binary files differ
diff --git a/pic/trainer/supernerd.png b/gfx/trainers/supernerd.png
index 37ef663e..37ef663e 100644
--- a/pic/trainer/supernerd.png
+++ b/gfx/trainers/supernerd.png
Binary files differ
diff --git a/pic/trainer/swimmer.png b/gfx/trainers/swimmer.png
index 06bae30c..06bae30c 100644
--- a/pic/trainer/swimmer.png
+++ b/gfx/trainers/swimmer.png
Binary files differ
diff --git a/pic/trainer/tamer.png b/gfx/trainers/tamer.png
index 14fe7a53..14fe7a53 100644
--- a/pic/trainer/tamer.png
+++ b/gfx/trainers/tamer.png
Binary files differ
diff --git a/pic/ytrainer/brock.png b/gfx/trainers/yellow/brock.png
index 8b33e8b9..8b33e8b9 100644
--- a/pic/ytrainer/brock.png
+++ b/gfx/trainers/yellow/brock.png
Binary files differ
diff --git a/pic/ytrainer/erika.png b/gfx/trainers/yellow/erika.png
index 446ed6aa..446ed6aa 100644
--- a/pic/ytrainer/erika.png
+++ b/gfx/trainers/yellow/erika.png
Binary files differ
diff --git a/pic/ytrainer/jessiejames.png b/gfx/trainers/yellow/jessiejames.png
index 764e5af4..764e5af4 100644
--- a/pic/ytrainer/jessiejames.png
+++ b/gfx/trainers/yellow/jessiejames.png
Binary files differ
diff --git a/pic/ytrainer/misty.png b/gfx/trainers/yellow/misty.png
index a7fdd6bc..a7fdd6bc 100644
--- a/pic/ytrainer/misty.png
+++ b/gfx/trainers/yellow/misty.png
Binary files differ
diff --git a/pic/ytrainer/rival1.png b/gfx/trainers/yellow/rival1.png
index 4a0ba97c..4a0ba97c 100644
--- a/pic/ytrainer/rival1.png
+++ b/gfx/trainers/yellow/rival1.png
Binary files differ
diff --git a/pic/ytrainer/rival2.png b/gfx/trainers/yellow/rival2.png
index e8718589..e8718589 100644
--- a/pic/ytrainer/rival2.png
+++ b/gfx/trainers/yellow/rival2.png
Binary files differ
diff --git a/pic/ytrainer/rival3.png b/gfx/trainers/yellow/rival3.png
index 08e22813..08e22813 100644
--- a/pic/ytrainer/rival3.png
+++ b/gfx/trainers/yellow/rival3.png
Binary files differ
diff --git a/pic/trainer/youngster.png b/gfx/trainers/youngster.png
index 51fa5e0f..51fa5e0f 100644
--- a/pic/trainer/youngster.png
+++ b/gfx/trainers/youngster.png
Binary files differ
diff --git a/gfx/version.asm b/gfx/version.asm
new file mode 100644
index 00000000..45010029
--- /dev/null
+++ b/gfx/version.asm
@@ -0,0 +1,3 @@
+Version_GFX:
+INCBIN "gfx/title/blue_version.1bpp" ; unused
+Version_GFXEnd:
diff --git a/home.asm b/home.asm
index 9d9b5dd4..17701681 100644
--- a/home.asm
+++ b/home.asm
@@ -1,105 +1,23 @@
-; The rst vectors are unused.
-SECTION "rst 00", ROM0
- rst $38
-SECTION "rst 08", ROM0
- rst $38
-SECTION "rst 10", ROM0
- rst $38
-SECTION "rst 18", ROM0
- rst $38
-SECTION "rst 20", ROM0
- rst $38
-SECTION "rst 28", ROM0
- rst $38
-SECTION "rst 30", ROM0
- rst $38
-SECTION "rst 38", ROM0
- rst $38
+INCLUDE "constants.asm"
-; Hardware interrupts
-SECTION "vblank", ROM0
- jp VBlank
-SECTION "hblank", ROM0
- jp LCDC
-SECTION "timer", ROM0
- jp Timer
-SECTION "serial", ROM0
- jp Serial
-SECTION "joypad", ROM0
- reti
+SECTION "NULL", ROM0
+NULL::
-SECTION "Home", ROM0
-
-DisableLCD::
- xor a
- ld [rIF], a
- ld a, [rIE]
- ld b, a
- res 0, a
- ld [rIE], a
+INCLUDE "home/header.asm"
-.wait
- ld a, [rLY]
- cp LY_VBLANK
- jr nz, .wait
- ld a, [rLCDC]
- and $ff ^ rLCDC_ENABLE_MASK
- ld [rLCDC], a
- ld a, b
- ld [rIE], a
- ret
-
-EnableLCD::
- ld a, [rLCDC]
- set rLCDC_ENABLE, a
- ld [rLCDC], a
- ret
-
-ClearSprites::
- xor a
- ld hl, wOAMBuffer
- ld b, 40 * 4
-.loop
- ld [hli], a
- dec b
- jr nz, .loop
- ret
-
-HideSprites::
- ld a, 160
- ld hl, wOAMBuffer
- ld de, 4
- ld b, 40
-.loop
- ld [hl], a
- add hl, de
- dec b
- jr nz, .loop
- ret
+SECTION "High Home", ROM0
+INCLUDE "home/lcd.asm"
+INCLUDE "home/clear_sprites.asm"
INCLUDE "home/copy.asm"
-SECTION "Entry", ROM0
-
- nop
- jp Start
-
-
-SECTION "Header", ROM0
-
- ; The header is generated by rgbfix.
- ; The space here is allocated to prevent code from being overwritten.
-
- ds $150 - $104
-
-
-SECTION "Main", ROM0
+SECTION "Home", ROM0
PlayPikachuPCM::
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, b
call BankswitchCommon
@@ -134,7 +52,7 @@ LoadNextSoundClipSample::
and $80
srl a
srl a
- ld [rNR32], a
+ ldh [rNR32], a
sla d
ret
@@ -145,830 +63,15 @@ PlaySoundClipSample::
jr nz, .loop
ret
-Start::
- cp GBC
- jr z, .gbc
- xor a
- jr .ok
-.gbc
- ld a, 1
-.ok
- ld [hGBC], a
- jp Init
-
-Joypad::
- homecall_jump _Joypad
-
-ReadJoypad::
- homecall_jump ReadJoypad_
+INCLUDE "home/start.asm"
+INCLUDE "home/joypad.asm"
INCLUDE "home/overworld.asm"
-
-CheckForUserInterruption::
-; Return carry if Up + Select + B, Start or A are pressed in c frames.
-; Used only in the intro and title screen.
- call DelayFrame
-
- push bc
- call JoypadLowSensitivity
- pop bc
-
- ld a, [hJoyHeld]
- cp D_UP + SELECT + B_BUTTON
- jr z, .input
-
- ld a, [hJoy5]
- and START | A_BUTTON
- jr nz, .input
-
- dec c
- jr nz, CheckForUserInterruption
-
- and a
- ret
-
-.input
- scf
- ret
-
-; function to load position data for destination warp when switching maps
-; INPUT:
-; a = ID of destination warp within destination map
-LoadDestinationWarpPosition::
- ld b, a
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, [wPredefParentBank]
- ld [H_LOADEDROMBANK], a
- ld [MBC1RomBank], a
- ld a, b
- add a
- add a
- ld c, a
- ld b, 0
- add hl, bc
- ld bc, 4
- ld de, wCurrentTileBlockMapViewPointer
- call CopyData
- pop af
- ld [H_LOADEDROMBANK], a
- ld [MBC1RomBank], a
- ret
-
-
-DrawHPBar::
-; Draw an HP bar d tiles long, and fill it to e pixels.
-; If c is nonzero, show at least a sliver regardless.
-; The right end of the bar changes with [wHPBarType].
-
- push hl
- push de
- ;push bc
-
- ; Left
- ld a, $71 ; "HP:"
- ld [hli], a
- ld a, $62
- ld [hli], a
-
- push hl
-
- ; Middle
- ld a, $63 ; empty
-.draw
- ld [hli], a
- dec d
- jr nz, .draw
-
- ; Right
- ld a, [wHPBarType]
- dec a
- ld a, $6d ; status screen and battle
- jr z, .ok
- dec a ; pokemon menu
-.ok
- ld [hl], a
-
- pop hl
-
- ld a, e
- and a
- jr nz, .fill
-
- ; If c is nonzero, draw a pixel anyway.
- ld a, c
- and a
- jr z, .done
- ld e, 1
-
-.fill
- ld a, e
- sub 8
- jr c, .partial
- ld e, a
- ld a, $6b ; full
- ld [hli], a
- ld a, e
- and a
- jr z, .done
- jr .fill
-
-.partial
- ; Fill remaining pixels at the end if necessary.
- ld a, $63 ; empty
- add e
- ld [hl], a
-.done
- ;pop bc
- pop de
- pop hl
- ret
-
-
-; loads pokemon data from one of multiple sources to wLoadedMon
-; loads base stats to wMonHeader
-; INPUT:
-; [wWhichPokemon] = index of pokemon within party/box
-; [wMonDataLocation] = source
-; 00: player's party
-; 01: enemy's party
-; 02: current box
-; 03: daycare
-; OUTPUT:
-; [wcf91] = pokemon ID
-; wLoadedMon = base address of pokemon data
-; wMonHeader = base address of base stats
-LoadMonData::
- jpab LoadMonData_
-
-OverwritewMoves::
-; Write c to [wMoves + b]. Unused.
- ld hl, wMoves
- ld e, b
- ld d, 0
- add hl, de
- ld a, c
- ld [hl], a
- ret
-
-LoadFlippedFrontSpriteByMonIndex::
- ld a, 1
- ld [wSpriteFlipped], a
-
-LoadFrontSpriteByMonIndex::
- push hl
- ld a, [wd11e]
- push af
- ld a, [wcf91]
- ld [wd11e], a
- predef IndexToPokedex
- ld hl, wd11e
- ld a, [hl]
- pop bc
- ld [hl], b
- and a
- pop hl
- jr z, .invalidDexNumber ; dex #0 invalid
- cp NUM_POKEMON + 1
- jr c, .validDexNumber ; dex >#151 invalid
-.invalidDexNumber
- ld a, RHYDON ; $1
- ld [wcf91], a
- ret
-.validDexNumber
- push hl
- ld de, vFrontPic
- call LoadMonFrontSprite
- pop hl
- ld a, [H_LOADEDROMBANK]
- push af
- switchbank CopyUncompressedPicToHL
- xor a
- ld [hStartTileID], a
- call CopyUncompressedPicToHL
- xor a
- ld [wSpriteFlipped], a
- pop af
- jp BankswitchCommon
-
-PlayCry::
-; Play monster a's cry.
- push bc
- ld b, a
- ld a, [wLowHealthAlarm]
- push af
- xor a
- ld [wLowHealthAlarm], a
- ld a, b
- call GetCryData
- call PlaySound
- call WaitForSoundToFinish
- pop af
- ld [wLowHealthAlarm], a
- pop bc
- ret
-
-GetCryData::
-; Load cry data for monster a.
- dec a
- ld c, a
- ld b, 0
- ld hl, CryData
- add hl, bc
- add hl, bc
- add hl, bc
-
- ld a, BANK(CryData)
- call BankswitchHome
- ld a, [hli]
- ld b, a ; cry id
- ld a, [hli]
- ld [wFrequencyModifier], a
- ld a, [hl]
- ld [wTempoModifier], a
- call BankswitchBack
-
- ; Cry headers have 3 channels,
- ; and start from index $14,
- ; so add 3 times the cry id.
- ld a, b
- ld c, $14
- rlca ; * 2
- add b
- add c
- ret
-
-DisplayPartyMenu::
- ld a, [hTilesetType]
- push af
- xor a
- ld [hTilesetType], a
- call GBPalWhiteOutWithDelay3
- call ClearSprites
- call PartyMenuInit
- call DrawPartyMenu
- jp HandlePartyMenuInput
-
-GoBackToPartyMenu::
- ld a, [hTilesetType]
- push af
- xor a
- ld [hTilesetType], a
- call PartyMenuInit
- call RedrawPartyMenu
- jp HandlePartyMenuInput
-
-PartyMenuInit::
- ld a, 1 ; hardcoded bank
- call BankswitchHome
- call LoadHpBarAndStatusTilePatterns
- ld hl, wd730
- set 6, [hl] ; turn off letter printing delay
- xor a ; PLAYER_PARTY_DATA
- ld [wMonDataLocation], a
- ld [wMenuWatchMovingOutOfBounds], a
- ld hl, wTopMenuItemY
- inc a
- ld [hli], a ; top menu item Y
- xor a
- ld [hli], a ; top menu item X
- ld a, [wPartyAndBillsPCSavedMenuItem]
- push af
- ld [hli], a ; current menu item ID
- inc hl
- ld a, [wPartyCount]
- and a ; are there more than 0 pokemon in the party?
- jr z, .storeMaxMenuItemID
- dec a
-; if party is not empty, the max menu item ID is ([wPartyCount] - 1)
-; otherwise, it is 0
-.storeMaxMenuItemID
- ld [hli], a ; max menu item ID
- ld a, [wForcePlayerToChooseMon]
- and a
- ld a, A_BUTTON | B_BUTTON
- jr z, .next
- xor a
- ld [wForcePlayerToChooseMon], a
- inc a ; a = A_BUTTON
-.next
- ld [hli], a ; menu watched keys
- pop af
- ld [hl], a ; old menu item ID
- ret
-
-HandlePartyMenuInput::
- ld a, 1
- ld [wMenuWrappingEnabled], a
- ld a, $40
- ld [wPartyMenuAnimMonEnabled], a
- call HandleMenuInputPokemonSelection
- push af ; save hJoy5 OR wMenuWrapping enabled, if no inputs were selected within a certain period of time
- bit 1, a ; was B button pressed?
- ld a, $0
- ld [wPartyMenuAnimMonEnabled], a
- ld a, [wCurrentMenuItem]
- ld [wPartyAndBillsPCSavedMenuItem], a
- jr nz, .asm_1258
- ld a, [wCurrentMenuItem]
- ld [wWhichPokemon], a
- callab IsThisPartymonStarterPikachu_Party
- jr nc, .asm_1258
- call CheckPikachuFollowingPlayer
- jr nz, .asm_128f
-.asm_1258
- pop af
- call PlaceUnfilledArrowMenuCursor
- ld b, a
- ld hl, wd730
- res 6, [hl] ; turn on letter printing delay
- ld a, [wMenuItemToSwap]
- and a
- jp nz, .swappingPokemon
- pop af
- ld [hTilesetType], a
- bit 1, b
- jr nz, .noPokemonChosen
- ld a, [wPartyCount]
- and a
- jr z, .noPokemonChosen
- ld a, [wCurrentMenuItem]
- ld [wWhichPokemon], a
- ld hl, wPartySpecies
- ld b, 0
- ld c, a
- add hl, bc
- ld a, [hl]
- ld [wcf91], a
- ld [wBattleMonSpecies2], a
- call BankswitchBack
- and a
- ret
-.asm_128f
- pop af
- ld hl, PartyMenuText_12cc
- call PrintText
- xor a
- ld [wMenuItemToSwap], a
- pop af
- ld [hTilesetType], a
-.noPokemonChosen
- call BankswitchBack
- scf
- ret
-.swappingPokemon
- bit 1, b ; was the B button pressed?
- jr z, .handleSwap ; if not, handle swapping the pokemon
-.cancelSwap ; if the B button was pressed
- callba ErasePartyMenuCursors
- xor a
- ld [wMenuItemToSwap], a
- ld [wPartyMenuTypeOrMessageID], a
- call RedrawPartyMenu
- jp HandlePartyMenuInput
-.handleSwap
- ld a, [wCurrentMenuItem]
- ld [wWhichPokemon], a
- callba SwitchPartyMon
- jp HandlePartyMenuInput
-
-PartyMenuText_12cc::
- TX_FAR _SleepingPikachuText1
- db "@"
-
-DrawPartyMenu::
- ld hl, DrawPartyMenu_
- jr DrawPartyMenuCommon
-
-RedrawPartyMenu::
- ld hl, RedrawPartyMenu_
-
-DrawPartyMenuCommon::
- ld b, BANK(RedrawPartyMenu_)
- jp Bankswitch
-
-; prints a pokemon's status condition
-; INPUT:
-; de = address of status condition
-; hl = destination address
-PrintStatusCondition::
- push de
- dec de
- dec de ; de = address of current HP
- ld a, [de]
- ld b, a
- dec de
- ld a, [de]
- or b ; is the pokemon's HP zero?
- pop de
- jr nz, PrintStatusConditionNotFainted
-; if the pokemon's HP is 0, print "FNT"
- ld a, "F"
- ld [hli], a
- ld a, "N"
- ld [hli], a
- ld [hl], "T"
- and a
- ret
-
-PrintStatusConditionNotFainted:
- homecall_jump_sf PrintStatusAilment
-
-; function to print pokemon level, leaving off the ":L" if the level is at least 100
-; INPUT:
-; hl = destination address
-; [wLoadedMonLevel] = level
-PrintLevel::
- ld a, $6e ; ":L" tile ID
- ld [hli], a
- ld c, 2 ; number of digits
- ld a, [wLoadedMonLevel] ; level
- cp 100
- jr c, PrintLevelCommon
-; if level at least 100, write over the ":L" tile
- dec hl
- inc c ; increment number of digits to 3
- jr PrintLevelCommon
-
-; prints the level without leaving off ":L" regardless of level
-; INPUT:
-; hl = destination address
-; [wLoadedMonLevel] = level
-PrintLevelFull::
- ld a, $6e ; ":L" tile ID
- ld [hli], a
- ld c, 3 ; number of digits
- ld a, [wLoadedMonLevel] ; level
-
-PrintLevelCommon::
- ld [wd11e], a
- ld de, wd11e
- ld b, LEFT_ALIGN | 1 ; 1 byte
- jp PrintNumber
-
-GetwMoves::
-; Unused. Returns the move at index a from wMoves in a
- ld hl, wMoves
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [hl]
- ret
-
-; copies the base stat data of a pokemon to wMonHeader
-; INPUT:
-; [wd0b5] = pokemon ID
-GetMonHeader::
- ld a, [H_LOADEDROMBANK]
- push af
- switchbank BaseStats
- push bc
- push de
- push hl
- ld a, [wd11e]
- push af
- ld a, [wd0b5]
- ld [wd11e], a
- ld de, FossilKabutopsPic
- ld b, $66 ; size of Kabutops fossil and Ghost sprites
- cp FOSSIL_KABUTOPS ; Kabutops fossil
- jr z, .specialID
- ld de, GhostPic
- cp MON_GHOST ; Ghost
- jr z, .specialID
- ld de, FossilAerodactylPic
- ld b, $77 ; size of Aerodactyl fossil sprite
- cp FOSSIL_AERODACTYL ; Aerodactyl fossil
- jr z, .specialID
- ;cp MEW
- ;jr z, .mew
- predef IndexToPokedex ; convert pokemon ID in [wd11e] to pokedex number
- ld a, [wd11e]
- dec a
- ld bc, MonBaseStatsEnd - MonBaseStats
- ld hl, BaseStats
- call AddNTimes
- ld de, wMonHeader
- ld bc, MonBaseStatsEnd - MonBaseStats
- call CopyData
- jr .done
-.specialID
- ld hl, wMonHSpriteDim
- ld [hl], b ; write sprite dimensions
- inc hl
- ld [hl], e ; write front sprite pointer
- inc hl
- ld [hl], d
-.done
- ld a, [wd0b5]
- ld [wMonHIndex], a
- pop af
- ld [wd11e], a
- pop hl
- pop de
- pop bc
- pop af
- call BankswitchCommon
- ret
-
-; copy party pokemon's name to wcd6d
-GetPartyMonName2::
- ld a, [wWhichPokemon] ; index within party
- ld hl, wPartyMonNicks
-
-; this is called more often
-GetPartyMonName::
- push hl
- push bc
- call SkipFixedLengthTextEntries ; add NAME_LENGTH to hl, a times
- ld de, wcd6d
- push de
- ld bc, NAME_LENGTH
- call CopyData
- pop de
- pop bc
- pop hl
- ret
-
-; function to print a BCD (Binary-coded decimal) number
-; de = address of BCD number
-; hl = destination address
-; c = flags and length
-; bit 7: if set, do not print leading zeroes
-; if unset, print leading zeroes
-; bit 6: if set, left-align the string (do not pad empty digits with spaces)
-; if unset, right-align the string
-; bit 5: if set, print currency symbol at the beginning of the string
-; if unset, do not print the currency symbol
-; bits 0-4: length of BCD number in bytes
-; Note that bits 5 and 7 are modified during execution. The above reflects
-; their meaning at the beginning of the functions's execution.
-PrintBCDNumber::
- ld b, c ; save flags in b
- res 7, c
- res 6, c
- res 5, c ; c now holds the length
- bit 5, b
- jr z, .loop
- bit 7, b
- jr nz, .loop
- ld [hl], "¥"
- inc hl
-.loop
- ld a, [de]
- swap a
- call PrintBCDDigit ; print upper digit
- ld a, [de]
- call PrintBCDDigit ; print lower digit
- inc de
- dec c
- jr nz, .loop
- bit 7, b ; were any non-zero digits printed?
- jr z, .done ; if so, we are done
-.numberEqualsZero ; if every digit of the BCD number is zero
- bit 6, b ; left or right alignment?
- jr nz, .skipRightAlignmentAdjustment
- dec hl ; if the string is right-aligned, it needs to be moved back one space
-.skipRightAlignmentAdjustment
- bit 5, b
- jr z, .skipCurrencySymbol
- ld [hl], "¥"
- inc hl
-.skipCurrencySymbol
- ld [hl], "0"
- call PrintLetterDelay
- inc hl
-.done
- ret
-
-PrintBCDDigit::
- and $f
- and a
- jr z, .zeroDigit
-.nonzeroDigit
- bit 7, b ; have any non-space characters been printed?
- jr z, .outputDigit
-; if bit 7 is set, then no numbers have been printed yet
- bit 5, b ; print the currency symbol?
- jr z, .skipCurrencySymbol
- ld [hl], "¥"
- inc hl
- res 5, b
-.skipCurrencySymbol
- res 7, b ; unset 7 to indicate that a nonzero digit has been reached
-.outputDigit
- add "0"
- ld [hli], a
- jp PrintLetterDelay
-.zeroDigit
- bit 7, b ; either printing leading zeroes or already reached a nonzero digit?
- jr z, .outputDigit ; if so, print a zero digit
- bit 6, b ; left or right alignment?
- ret nz
- inc hl ; if right-aligned, "print" a space by advancing the pointer
- ret
-
-; uncompresses the front or back sprite of the specified mon
-; assumes the corresponding mon header is already loaded
-; hl contains offset to sprite pointer ($b for front or $d for back)
-UncompressMonSprite::
- ld bc, wMonHeader
- add hl, bc
- ld a, [hli]
- ld [wSpriteInputPtr], a ; fetch sprite input pointer
- ld a, [hl]
- 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
-; index < $1F, bank 9
-; $1F ≤ index < $4A, bank $A
-; $4A ≤ index < $74, bank $B
-; $74 ≤ index < $99, bank $C
-; $99 ≤ index, bank $D
- ld a, [wcf91] ; XXX name for this ram location
- ld b, a
- ;cp MEW
- ;ld a, BANK(MewPicFront)
- ;jr z, .GotBank
- ;ld a, b
- cp FOSSIL_KABUTOPS
- ld a, BANK(FossilKabutopsPic)
- jr z, .GotBank
- ld a, b
- cp TANGELA + 1
- ld a, BANK(TangelaPicFront)
- jr c, .GotBank
- ld a, b
- cp MOLTRES + 1
- ld a, BANK(MoltresPicFront)
- jr c, .GotBank
- ld a, b
- cp BEEDRILL + 2
- ld a, BANK(BeedrillPicFront)
- jr c, .GotBank
- ld a, b
- cp STARMIE + 1
- ld a, BANK(StarmiePicFront)
- jr c, .GotBank
- ld a, BANK(VictreebelPicFront)
-.GotBank
- jp UncompressSpriteData
-
-; de: destination location
-LoadMonFrontSprite::
- push de
- ld hl, wMonHFrontSprite - wMonHeader
- call UncompressMonSprite
- ld hl, wMonHSpriteDim
- ld a, [hli]
- ld c, a
- pop de
- ; fall through
-
-; postprocesses uncompressed sprite chunks to a 2bpp sprite and loads it into video ram
-; calculates alignment parameters to place both sprite chunks in the center of the 7*7 tile sprite buffers
-; de: destination location
-; a, c: sprite dimensions (in tiles of 8x8 each)
-LoadUncompressedSpriteData::
- push de
- and $f
- ld [H_SPRITEWIDTH], a ; each byte contains 8 pixels (in 1bpp), so tiles=bytes for width
- ld b, a
- ld a, $7
- sub b ; 7-w
- inc a ; 8-w
- srl a ; (8-w)/2 ; horizontal center (in tiles, rounded up)
- ld b, a
- add a
- add a
- add a
- sub b ; 7*((8-w)/2) ; skip for horizontal center (in tiles)
- ld [H_SPRITEOFFSET], a
- ld a, c
- swap a
- and $f
- ld b, a
- add a
- add a
- add a ; 8*tiles is height in bytes
- ld [H_SPRITEHEIGHT], a
- ld a, $7
- sub b ; 7-h ; skip for vertical center (in tiles, relative to current column)
- ld b, a
- ld a, [H_SPRITEOFFSET]
- add b ; 7*((8-w)/2) + 7-h ; combined overall offset (in tiles)
- add a
- add a
- add a ; 8*(7*((8-w)/2) + 7-h) ; combined overall offset (in bytes)
- ld [H_SPRITEOFFSET], a
- ld a, $0
- call SwitchSRAMBankAndLatchClockData
- ld hl, sSpriteBuffer0
- call ZeroSpriteBuffer ; zero buffer 0
- ld de, sSpriteBuffer1
- ld hl, sSpriteBuffer0
- call AlignSpriteDataCentered ; copy and align buffer 1 to 0 (containing the MSB of the 2bpp sprite)
- ld hl, sSpriteBuffer1
- call ZeroSpriteBuffer ; zero buffer 1
- ld de, sSpriteBuffer2
- ld hl, sSpriteBuffer1
- call AlignSpriteDataCentered ; copy and align buffer 2 to 1 (containing the LSB of the 2bpp sprite)
- call PrepareRTCDataAndDisableSRAM
- pop de
- jp InterlaceMergeSpriteBuffers
-
-; copies and aligns the sprite data properly inside the sprite buffer
-; sprite buffers are 7*7 tiles in size, the loaded sprite is centered within this area
-AlignSpriteDataCentered::
- ld a, [H_SPRITEOFFSET]
- ld b, $0
- ld c, a
- add hl, bc
- ld a, [H_SPRITEWIDTH]
-.columnLoop
- push af
- push hl
- ld a, [H_SPRITEHEIGHT]
- ld c, a
-.columnInnerLoop
- ld a, [de]
- inc de
- ld [hli], a
- dec c
- jr nz, .columnInnerLoop
- pop hl
- ld bc, 7*8 ; 7 tiles
- add hl, bc ; advance one full column
- pop af
- dec a
- jr nz, .columnLoop
- ret
-
-; fills the sprite buffer (pointed to in hl) with zeros
-ZeroSpriteBuffer::
- ld bc, SPRITEBUFFERSIZE
-.nextByteLoop
- xor a
- ld [hli], a
- dec bc
- ld a, b
- or c
- jr nz, .nextByteLoop
- ret
-
-; combines the (7*7 tiles, 1bpp) sprite chunks in buffer 0 and 1 into a 2bpp sprite located in buffer 1 through 2
-; in the resulting sprite, the rows of the two source sprites are interlaced
-; de: output address
-InterlaceMergeSpriteBuffers::
- ld a, $0
- call SwitchSRAMBankAndLatchClockData
- push de
- 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
- ld a, [de]
- dec de
- ld [hld], a ; write byte of source 2
- ld a, [bc]
- dec bc
- ld [hld], a ; write byte of source 1
- ld a, [de]
- dec de
- ld [hld], a ; write byte of source 2
- ld a, [bc]
- dec bc
- ld [hld], a ; write byte of source 1
- ld a, [H_SPRITEINTERLACECOUNTER]
- dec a
- ld [H_SPRITEINTERLACECOUNTER], a
- jr nz, .interlaceLoop
- ld a, [wSpriteFlipped]
- and a
- jr z, .notFlipped
- ld bc, 2*SPRITEBUFFERSIZE
- ld hl, sSpriteBuffer1
-.swapLoop
- swap [hl] ; if flipped swap nybbles in all bytes
- inc hl
- dec bc
- ld a, b
- or c
- jr nz, .swapLoop
-.notFlipped
- pop hl
- ld de, sSpriteBuffer1
- ld c, (2*SPRITEBUFFERSIZE)/16 ; $31, number of 16 byte chunks to be copied
- ld a, [H_LOADEDROMBANK]
- ld b, a
- call CopyVideoData
- jp PrepareRTCDataAndDisableSRAM
+INCLUDE "home/pokemon.asm"
+INCLUDE "home/print_bcd.asm"
+INCLUDE "home/pics.asm"
INCLUDE "home/pikachu.asm"
-;INCLUDE "data/collision.asm"
INCLUDE "home/lcdc.asm"
@@ -987,1240 +90,43 @@ INCLUDE "home/play_time.asm"
INCLUDE "home/serial.asm"
INCLUDE "home/timer.asm"
INCLUDE "home/audio.asm"
+INCLUDE "home/update_sprites.asm"
+INCLUDE "data/items/marts.asm"
-UpdateSprites::
- ld a, [wUpdateSpritesEnabled]
- dec a
- ret nz
- ld a, [H_LOADEDROMBANK]
- push af
- switchbank _UpdateSprites
- ld a, $ff
- ld [wUpdateSpritesEnabled], a
- call _UpdateSprites
- ld a, $1
- ld [wUpdateSpritesEnabled], a
- pop af
- call BankswitchCommon
- ret
-
-INCLUDE "data/mart_inventories.asm"
-
-TextScriptEndingChar::
- db "@"
-TextScriptEnd::
- ld hl, TextScriptEndingChar
- ret
-
-ExclamationText::
- TX_FAR _ExclamationText
- db "@"
-
-GroundRoseText::
- TX_FAR _GroundRoseText
- db "@"
-
-BoulderText::
- TX_FAR _BoulderText
- db "@"
-
-MartSignText::
- TX_FAR _MartSignText
- db "@"
-
-PokeCenterSignText::
- TX_FAR _PokeCenterSignText
- db "@"
-
-PickUpItemText::
- TX_ASM
- predef PickUpItem
- jp TextScriptEnd
-
-
-INCLUDE "home/pic.asm"
-
-
-ResetPlayerSpriteData::
- ld hl, wSpriteStateData1
- call ResetPlayerSpriteData_ClearSpriteData
- ld hl, wSpriteStateData2
- call ResetPlayerSpriteData_ClearSpriteData
- ld a, $1
- ld [wSpriteStateData1], a
- ld [wSpriteStateData2 + $0e], a
- ld hl, wSpriteStateData1 + 4
- ld [hl], $3c ; set Y screen pos
- inc hl
- inc hl
- ld [hl], $40 ; set X screen pos
- ret
-
-; overwrites sprite data with zeroes
-ResetPlayerSpriteData_ClearSpriteData::
- ld bc, $10
- xor a
- call FillMemory
- ret
-
-FadeOutAudio::
- ld a, [wAudioFadeOutControl]
- and a ; currently fading out audio?
- jr nz, .fadingOut
- ld a, [wd72c]
- bit 1, a
- ret nz
- ld a, $77
- ld [rNR50], a
- ret
-.fadingOut
- ld a, [wAudioFadeOutCounter]
- and a
- jr z, .counterReachedZero
- dec a
- ld [wAudioFadeOutCounter], a
- ret
-.counterReachedZero
- ld a, [wAudioFadeOutCounterReloadValue]
- ld [wAudioFadeOutCounter], a
- ld a, [rNR50]
- and a ; has the volume reached 0?
- jr z, .fadeOutComplete
- ld b, a
- and $f
- dec a
- ld c, a
- ld a, b
- and $f0
- swap a
- dec a
- swap a
- or c
- ld [rNR50], a
- ret
-.fadeOutComplete
- ld a, [wAudioFadeOutControl]
- ld b, a
- xor a
- ld [wAudioFadeOutControl], a
- call StopAllMusic
- ld a, [wAudioSavedROMBank]
- ld [wAudioROMBank], a
- ld a, b
- ld [wNewSoundID], a
- jp PlaySound
+INCLUDE "home/overworld_text.asm"
+INCLUDE "home/uncompress.asm"
+INCLUDE "home/reset_player_sprite.asm"
+INCLUDE "home/fade_audio.asm"
UnknownText_2812::
- TX_FAR _PokemonText
- db "@"
-
-; this function is used to display sign messages, sprite dialog, etc.
-; INPUT: [hSpriteIndexOrTextID] = sprite ID or text ID
-DisplayTextID::
- ld a, [H_LOADEDROMBANK]
- push af
- callba DisplayTextIDInit ; initialization
- ld hl, wTextPredefFlag
- bit 0, [hl]
- res 0, [hl]
- jr nz, .skipSwitchToMapBank
- ld a, [wCurMap]
- call SwitchToMapRomBank
-.skipSwitchToMapBank
- ld a, 30 ; half a second
- ld [H_FRAMECOUNTER], a ; used as joypad poll timer
- ld hl, wMapTextPtr
- ld a, [hli]
- ld h, [hl]
- ld l, a ; hl = map text pointer
- ld d, $00
- ld a, [hSpriteIndexOrTextID] ; text ID
- ld [wSpriteIndex], a
- and a
- jp z, DisplayStartMenu
- cp TEXT_PIKACHU_ANIM
- jp z, DisplayPikachuEmotion
- cp TEXT_SAFARI_GAME_OVER
- jp z, DisplaySafariGameOverText
- cp TEXT_MON_FAINTED
- jp z, DisplayPokemonFaintedText
- cp TEXT_BLACKED_OUT
- jp z, DisplayPlayerBlackedOutText
- cp TEXT_REPEL_WORE_OFF
- jp z, DisplayRepelWoreOffText
- ld a, [wNumSprites]
- ld e, a
- ld a, [hSpriteIndexOrTextID] ; sprite ID
- cp e
- jr z, .spriteHandling
- jr nc, .skipSpriteHandling
-.spriteHandling
-; get the text ID of the sprite
- push hl
- ;push de
- ;push bc
- ;callba UpdateSpriteFacingOffsetAndDelayMovement ; update the graphics of the sprite the player is talking to (to face the right direction)
- ;pop bc
- ;pop de
- ld hl, wMapSpriteData ; NPC text entries
- ld a, [hSpriteIndexOrTextID]
- dec a
- add a
- ld e, a
- ld d, $0
- add hl, de
- inc hl
- ld a, [hl] ; a = text ID of the sprite
- pop hl
-.skipSpriteHandling
-; look up the address of the text in the map's text entries
- dec a
- ld e, a
- ld d, $0
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a ; hl = address of the text
- ld a, [hl] ; a = first byte of text
-; check first byte of text for special cases
- cp $fe ; Pokemart NPC
- jp z, DisplayPokemartDialogue
- cp $ff ; Pokemon Center NPC
- jp z, DisplayPokemonCenterDialogue
- cp $fc ; Item Storage PC
- jp z, FuncTX_ItemStoragePC
- cp $fd ; Bill's PC
- jp z, FuncTX_BillsPC
- cp $f9 ; Pokemon Center PC
- jp z, FuncTX_PokemonCenterPC
- cp $f5 ; Vending Machine
- jr nz, .notVendingMachine
- callba VendingMachineMenu ; jump banks to vending machine routine
- jr AfterDisplayingTextID
-.notVendingMachine
- cp $f7 ; prize menu
- jp z, FuncTX_GameCornerPrizeMenu
- cp $f6 ; cable connection NPC in Pokemon Center
- jr nz, .notSpecialCase
- callab CableClubNPC
- jr AfterDisplayingTextID
-.notSpecialCase
- call PrintText_NoCreatingTextBox ; display the text
- ld a, [wDoNotWaitForButtonPressAfterDisplayingText]
- and a
- jr nz, HoldTextDisplayOpen
-
-AfterDisplayingTextID::
- ld a, [wEnteringCableClub]
- and a
- jr nz, HoldTextDisplayOpen
- call WaitForTextScrollButtonPress ; wait for a button press after displaying all the text
-
-; loop to hold the dialogue box open as long as the player keeps holding down the A button
-HoldTextDisplayOpen::
- call Joypad
- ld a, [hJoyHeld]
- bit 0, a ; is the A button being pressed?
- jr nz, HoldTextDisplayOpen
-
-CloseTextDisplay::
- ld a, [wCurMap]
- call SwitchToMapRomBank
- ld a, $90
- ld [hWY], a ; move the window off the screen
- call DelayFrame
- call LoadGBPal
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a ; disable continuous WRAM to VRAM transfer each V-blank
-; loop to make sprites face the directions they originally faced before the dialogue
- ld hl, wSpriteStateData2 + $19
- ld c, $0f
- ld de, $0010
-.restoreSpriteFacingDirectionLoop
- ld a, [hl]
- dec h
- ld [hl], a
- inc h
- add hl, de
- dec c
- jr nz, .restoreSpriteFacingDirectionLoop
- call InitMapSprites ; reload sprite tile pattern data (since it was partially overwritten by text tile patterns)
- ld hl, wFontLoaded
- res 0, [hl]
- ld a, [wd732]
- bit 3, a ; used fly warp
- call z, LoadPlayerSpriteGraphics
- call LoadCurrentMapView
- pop af
- call BankswitchCommon
- jp UpdateSprites
-
-DisplayPokemartDialogue::
- push hl
- ld hl, PokemartGreetingText
- call PrintText
- pop hl
- inc hl
- call LoadItemList
- ld a, PRICEDITEMLISTMENU
- ld [wListMenuID], a
- homecall DisplayPokemartDialogue_
- jp AfterDisplayingTextID
-
-PokemartGreetingText::
- TX_FAR _PokemartGreetingText
- db "@"
-
-LoadItemList::
- ld a, 1
- ld [wUpdateSpritesEnabled], a
- ld a, h
- ld [wItemListPointer], a
- ld a, l
- ld [wItemListPointer + 1], a
- ld de, wItemList
-.loop
- ld a, [hli]
- ld [de], a
- inc de
- cp $ff
- jr nz, .loop
- ret
-
-DisplayPokemonCenterDialogue::
-; zeroing these doesn't appear to serve any purpose
- xor a
- ld [$ff8b], a
- ld [$ff8c], a
- ld [$ff8d], a
-
- inc hl
- homecall DisplayPokemonCenterDialogue_
- jp AfterDisplayingTextID
-
-DisplaySafariGameOverText::
- callab PrintSafariGameOverText
- jp AfterDisplayingTextID
-
-DisplayPokemonFaintedText::
- ld hl, PokemonFaintedText
- call PrintText
- jp AfterDisplayingTextID
-
-PokemonFaintedText::
- TX_FAR _PokemonFaintedText
- db "@"
-
-DisplayPlayerBlackedOutText::
- ld hl, PlayerBlackedOutText
- call PrintText
- ld a, [wd732]
- res 5, a ; reset forced to use bike bit
- ld [wd732], a
- CheckEvent EVENT_IN_SAFARI_ZONE
- jr z, .didnotblackoutinsafari
- xor a
- ld [wNumSafariBalls], a
- ld [wSafariSteps], a
- ld [wSafariSteps + 1], a
- EventFlagAddressa EVENT_IN_SAFARI_ZONE
- ld [wcf0d], a
- ld [wSafariZoneGateCurScript], a
-.didnotblackoutinsafari
- jp HoldTextDisplayOpen
-
-PlayerBlackedOutText::
- TX_FAR _PlayerBlackedOutText
- db "@"
-
-DisplayRepelWoreOffText::
- ld hl, RepelWoreOffText
- call PrintText
- jp AfterDisplayingTextID
-
-RepelWoreOffText::
- TX_FAR _RepelWoreOffText
- db "@"
-
-DisplayPikachuEmotion::
- callab TalkToPikachu
- jp CloseTextDisplay
-
-INCLUDE "engine/menu/start_menu.asm"
-
-; function to count how many bits are set in a string of bytes
-; INPUT:
-; hl = address of string of bytes
-; b = length of string of bytes
-; OUTPUT:
-; [wNumSetBits] = number of set bits
-CountSetBits::
- ld c, 0
-.loop
- ld a, [hli]
- ld e, a
- ld d, 8
-.innerLoop ; count how many bits are set in the current byte
- srl e
- ld a, 0
- adc c
- ld c, a
- dec d
- jr nz, .innerLoop
- dec b
- jr nz, .loop
- ld a, c
- ld [wNumSetBits], a
- ret
-
-; subtracts the amount the player paid from their money
-; sets carry flag if there is enough money and unsets carry flag if not
-SubtractAmountPaidFromMoney::
- jpba SubtractAmountPaidFromMoney_
-
-; adds the amount the player sold to their money
-AddAmountSoldToMoney::
- ld de, wPlayerMoney + 2
- ld hl, hMoney + 2 ; total price of items
- ld c, 3 ; length of money in bytes
- predef AddBCDPredef ; add total price to money
- ld a, MONEY_BOX
- ld [wTextBoxID], a
- call DisplayTextBoxID ; redraw money text box
- ld a, SFX_PURCHASE
- call PlaySoundWaitForCurrent
- jp WaitForSoundToFinish
-
-; function to remove an item (in varying quantities) from the player's bag or PC box
-; INPUT:
-; HL = address of inventory (either wNumBagItems or wNumBoxItems)
-; [wWhichPokemon] = index (within the inventory) of the item to remove
-; [wItemQuantity] = quantity to remove
-RemoveItemFromInventory::
- homecall RemoveItemFromInventory_
- ret
-
-; function to add an item (in varying quantities) to the player's bag or PC box
-; INPUT:
-; HL = address of inventory (either wNumBagItems or wNumBoxItems)
-; [wcf91] = item ID
-; [wItemQuantity] = item quantity
-; sets carry flag if successful, unsets carry flag if unsuccessful
-AddItemToInventory::
- push bc
- homecall_sf AddItemToInventory_
- pop bc
- ret
-
-; INPUT:
-; [wListMenuID] = list menu ID
-; [wListPointer] = address of the list (2 bytes)
-DisplayListMenuID::
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a ; disable auto-transfer
- ld a, 1
- ld [hJoy7], a ; joypad state update flag
- ld a, [wBattleType]
- and a ; is it the Old Man battle?
- jr nz, .specialBattleType
- ld a, $01 ; hardcoded bank
- jr .bankswitch
-.specialBattleType ; Old Man battle
- ld a, BANK(DisplayBattleMenu)
-.bankswitch
- call BankswitchHome
- ld hl, wd730
- set 6, [hl] ; turn off letter printing delay
- xor a
- ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped
- ld [wListCount], a
- ld a, [wListPointer]
- ld l, a
- ld a, [wListPointer + 1]
- ld h, a ; hl = address of the list
- ld a, [hl] ; the first byte is the number of entries in the list
- ld [wListCount], a
- ld a, LIST_MENU_BOX
- ld [wTextBoxID], a
- call DisplayTextBoxID ; draw the menu text box
- call UpdateSprites ; disable sprites behind the text box
-; the code up to .skipMovingSprites appears to be useless
- coord hl, 4, 2 ; coordinates of upper left corner of menu text box
- lb de, 9, 14 ; height and width of menu text box
- ld a, [wListMenuID]
- and a ; is it a PC pokemon list?
- jr nz, .skipMovingSprites
- call UpdateSprites
-.skipMovingSprites
- ld a, 1 ; max menu item ID is 1 if the list has less than 2 entries
- ld [wMenuWatchMovingOutOfBounds], a
- ld a, [wListCount]
- cp 2 ; does the list have less than 2 entries?
- jr c, .setMenuVariables
- ld a, 2 ; max menu item ID is 2 if the list has at least 2 entries
-.setMenuVariables
- ld [wMaxMenuItem], a
- ld a, 4
- ld [wTopMenuItemY], a
- ld a, 5
- ld [wTopMenuItemX], a
- ld a, A_BUTTON | B_BUTTON | SELECT
- ld [wMenuWatchedKeys], a
- ld c, 10
- call DelayFrames
-
-DisplayListMenuIDLoop::
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a ; disable transfer
- call PrintListMenuEntries
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a ; enable transfer
- call Delay3
- ld a, [wBattleType]
- and a ; is it the Old Man battle?
- jr z, .notOldManBattle
-.oldManBattle
- ld a, "▶"
- Coorda 5, 4 ; place menu cursor in front of first menu entry
- ld c, 20
- call DelayFrames
- xor a
- ld [wCurrentMenuItem], a
- coord hl, 5, 4
- ld a, l
- ld [wMenuCursorLocation], a
- ld a, h
- ld [wMenuCursorLocation + 1], a
- jr .buttonAPressed
-.notOldManBattle
- call LoadGBPal
- call HandleMenuInput
- push af
- call PlaceMenuCursor
- pop af
- bit 0, a ; was the A button pressed?
- jp z, .checkOtherKeys
-.buttonAPressed
- ld a, [wCurrentMenuItem]
- call PlaceUnfilledArrowMenuCursor
-
-; pointless because both values are overwritten before they are read
- ld a, $01
- ld [wMenuExitMethod], a
- ld [wChosenMenuItem], a
-
- xor a
- ld [wMenuWatchMovingOutOfBounds], a
- ld a, [wCurrentMenuItem]
- ld c, a
- ld a, [wListScrollOffset]
- add c
- ld c, a
- ld a, [wListCount]
- and a ; is the list empty?
- jp z, ExitListMenu ; if so, exit the menu
- dec a
- cp c ; did the player select Cancel?
- jp c, ExitListMenu ; if so, exit the menu
- ld a, c
- ld [wWhichPokemon], a
- ld a, [wListMenuID]
- cp ITEMLISTMENU
- jr nz, .skipMultiplying
-; if it's an item menu
- sla c ; item entries are 2 bytes long, so multiply by 2
-.skipMultiplying
- ld a, [wListPointer]
- ld l, a
- ld a, [wListPointer + 1]
- ld h, a
- inc hl ; hl = beginning of list entries
- ld b, 0
- add hl, bc
- ld a, [hl]
- ld [wcf91], a
- ld a, [wListMenuID]
- and a ; is it a PC pokemon list?
- jr z, .pokemonList
- push hl
- call GetItemPrice
- pop hl
- ld a, [wListMenuID]
- cp ITEMLISTMENU
- jr nz, .skipGettingQuantity
-; if it's an item menu
- inc hl
- ld a, [hl] ; a = item quantity
- ld [wMaxItemQuantity], a
-.skipGettingQuantity
- ld a, [wcf91]
- ld [wd0b5], a
- ld a, BANK(ItemNames)
- ld [wPredefBank], a
- call GetName
- jr .storeChosenEntry
-.pokemonList
- ld hl, wPartyCount
- ld a, [wListPointer]
- cp l ; is it a list of party pokemon or box pokemon?
- ld hl, wPartyMonNicks
- jr z, .getPokemonName
- ld hl, wBoxMonNicks ; box pokemon names
-.getPokemonName
- ld a, [wWhichPokemon]
- call GetPartyMonName
-.storeChosenEntry ; store the menu entry that the player chose and return
- ld de, wcd6d
- call CopyStringToCF4B ; copy name to wcf4b
- ld a, CHOSE_MENU_ITEM
- ld [wMenuExitMethod], a
- ld a, [wCurrentMenuItem]
- ld [wChosenMenuItem], a
- xor a
- ld [hJoy7], a ; joypad state update flag
- ld hl, wd730
- res 6, [hl] ; turn on letter printing delay
- jp BankswitchBack
-.checkOtherKeys ; check B, SELECT, Up, and Down keys
- bit 1, a ; was the B button pressed?
- jp nz, ExitListMenu ; if so, exit the menu
- bit 2, a ; was the select button pressed?
- jp nz, HandleItemListSwapping ; if so, allow the player to swap menu entries
- ld b, a
- bit 7, b ; was Down pressed?
- ld hl, wListScrollOffset
- jr z, .upPressed
-.downPressed
- ld a, [hl]
- add 3
- ld b, a
- ld a, [wListCount]
- cp b ; will going down scroll past the Cancel button?
- jp c, DisplayListMenuIDLoop
- inc [hl] ; if not, go down
- jp DisplayListMenuIDLoop
-.upPressed
- ld a, [hl]
- and a
- jp z, DisplayListMenuIDLoop
- dec [hl]
- jp DisplayListMenuIDLoop
-
-DisplayChooseQuantityMenu::
-; text box dimensions/coordinates for just quantity
- coord hl, 15, 9
- lb bc, 1, 3 ; height and width
- ld a, [wListMenuID]
- cp PRICEDITEMLISTMENU
- jr nz, .drawTextBox
-; text box dimensions/coordinates for quantity and price
- coord hl, 7, 9
- lb bc, 1, 11 ; height and width
-.drawTextBox
- call TextBoxBorder
- coord hl, 16, 10
- ld a, [wListMenuID]
- cp PRICEDITEMLISTMENU
- jr nz, .printInitialQuantity
- coord hl, 8, 10
-.printInitialQuantity
- ld de, InitialQuantityText
- call PlaceString
- xor a
- ld [wItemQuantity], a ; initialize current quantity to 0
- jp .incrementQuantity
-.waitForKeyPressLoop
- call JoypadLowSensitivity
- ld a, [hJoyPressed] ; newly pressed buttons
- bit 0, a ; was the A button pressed?
- jp nz, .buttonAPressed
- bit 1, a ; was the B button pressed?
- jp nz, .buttonBPressed
- bit 6, a ; was Up pressed?
- jr nz, .incrementQuantity
- bit 7, a ; was Down pressed?
- jr nz, .decrementQuantity
- jr .waitForKeyPressLoop
-.incrementQuantity
- ld a, [wMaxItemQuantity]
- inc a
- ld b, a
- ld hl, wItemQuantity ; current quantity
- inc [hl]
- ld a, [hl]
- cp b
- jr nz, .handleNewQuantity
-; wrap to 1 if the player goes above the max quantity
- ld a, 1
- ld [hl], a
- jr .handleNewQuantity
-.decrementQuantity
- ld hl, wItemQuantity ; current quantity
- dec [hl]
- jr nz, .handleNewQuantity
-; wrap to the max quantity if the player goes below 1
- ld a, [wMaxItemQuantity]
- ld [hl], a
-.handleNewQuantity
- coord hl, 17, 10
- ld a, [wListMenuID]
- cp PRICEDITEMLISTMENU
- jr nz, .printQuantity
-.printPrice
- ld c, $03
- ld a, [wItemQuantity]
- ld b, a
- ld hl, hMoney ; total price
-; initialize total price to 0
- xor a
- ld [hli], a
- ld [hli], a
- ld [hl], a
-.addLoop ; loop to multiply the individual price by the quantity to get the total price
- ld de, hMoney + 2
- ld hl, hItemPrice + 2
- push bc
- predef AddBCDPredef ; add the individual price to the current sum
- pop bc
- dec b
- jr nz, .addLoop
- ld a, [hHalveItemPrices]
- and a ; should the price be halved (for selling items)?
- jr z, .skipHalvingPrice
- xor a
- ld [hDivideBCDDivisor], a
- ld [hDivideBCDDivisor + 1], a
- ld a, $02
- ld [hDivideBCDDivisor + 2], a
- predef DivideBCDPredef3 ; halves the price
-; store the halved price
- ld a, [hDivideBCDQuotient]
- ld [hMoney], a
- ld a, [hDivideBCDQuotient + 1]
- ld [hMoney + 1], a
- ld a, [hDivideBCDQuotient + 2]
- ld [hMoney + 2], a
-.skipHalvingPrice
- coord hl, 12, 10
- ld de, SpacesBetweenQuantityAndPriceText
- call PlaceString
- ld de, hMoney ; total price
- ld c, $a3
- call PrintBCDNumber
- coord hl, 9, 10
-.printQuantity
- ld de, wItemQuantity ; current quantity
- lb bc, LEADING_ZEROES | 1, 2 ; 1 byte, 2 digits
- call PrintNumber
- jp .waitForKeyPressLoop
-.buttonAPressed ; the player chose to make the transaction
- xor a
- ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped
- ret
-.buttonBPressed ; the player chose to cancel the transaction
- xor a
- ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped
- ld a, $ff
- ret
-
-InitialQuantityText::
- db "×01@"
-
-SpacesBetweenQuantityAndPriceText::
- db " @"
-
-ExitListMenu::
- ld a, [wCurrentMenuItem]
- ld [wChosenMenuItem], a
- ld a, CANCELLED_MENU
- ld [wMenuExitMethod], a
- ld [wMenuWatchMovingOutOfBounds], a
- xor a
- ld [hJoy7], a
- ld hl, wd730
- res 6, [hl]
- call BankswitchBack
- xor a
- ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped
- scf
- ret
-
-PrintListMenuEntries::
- coord hl, 5, 3
- lb bc, 9, 14
- call ClearScreenArea
- ld a, [wListPointer]
- ld e, a
- ld a, [wListPointer + 1]
- ld d, a
- inc de ; de = beginning of list entries
- ld a, [wListScrollOffset]
- ld c, a
- ld a, [wListMenuID]
- cp ITEMLISTMENU
- ld a, c
- jr nz, .skipMultiplying
-; if it's an item menu
-; item entries are 2 bytes long, so multiply by 2
- add a
- sla c
-.skipMultiplying
- add e
- ld e, a
- jr nc, .noCarry
- inc d
-.noCarry
- coord hl, 6, 4 ; coordinates of first list entry name
- ld b, 4 ; print 4 names
-.loop
- ld a, b
- ld [wWhichPokemon], a
- ld a, [de]
- ld [wd11e], a
- cp $ff
- jp z, .printCancelMenuItem
- push bc
- push de
- push hl
- push hl
- push de
- ld a, [wListMenuID]
- and a
- jr z, .pokemonPCMenu
- cp MOVESLISTMENU
- jr z, .movesMenu
-.itemMenu
- call GetItemName
- jr .placeNameString
-.pokemonPCMenu
- push hl
- ld hl, wPartyCount
- ld a, [wListPointer]
- cp l ; is it a list of party pokemon or box pokemon?
- ld hl, wPartyMonNicks
- jr z, .getPokemonName
- ld hl, wBoxMonNicks ; box pokemon names
-.getPokemonName
- ld a, [wWhichPokemon]
- ld b, a
- ld a, 4
- sub b
- ld b, a
- ld a, [wListScrollOffset]
- add b
- call GetPartyMonName
- pop hl
- jr .placeNameString
-.movesMenu
- call GetMoveName
-.placeNameString
- call PlaceString
- pop de
- pop hl
- ld a, [wPrintItemPrices]
- and a ; should prices be printed?
- jr z, .skipPrintingItemPrice
-.printItemPrice
- push hl
- ld a, [de]
- ld de, ItemPrices
- ld [wcf91], a
- call GetItemPrice ; get price
- pop hl
- ld bc, SCREEN_WIDTH + 5 ; 1 row down and 5 columns right
- add hl, bc
- ld c, $a3 ; no leading zeroes, right-aligned, print currency symbol, 3 bytes
- call PrintBCDNumber
-.skipPrintingItemPrice
- ld a, [wListMenuID]
- and a
- jr nz, .skipPrintingPokemonLevel
-.printPokemonLevel
- ld a, [wd11e]
- push af
- push hl
- ld hl, wPartyCount
- ld a, [wListPointer]
- cp l ; is it a list of party pokemon or box pokemon?
- ld a, PLAYER_PARTY_DATA
- jr z, .next
- ld a, BOX_DATA
-.next
- ld [wMonDataLocation], a
- ld hl, wWhichPokemon
- ld a, [hl]
- ld b, a
- ld a, $04
- sub b
- ld b, a
- ld a, [wListScrollOffset]
- add b
- ld [hl], a
- call LoadMonData
- ld a, [wMonDataLocation]
- and a ; is it a list of party pokemon or box pokemon?
- jr z, .skipCopyingLevel
-.copyLevel
- ld a, [wLoadedMonBoxLevel]
- ld [wLoadedMonLevel], a
-.skipCopyingLevel
- pop hl
- ld bc, $001c
- add hl, bc
- call PrintLevel
- pop af
- ld [wd11e], a
-.skipPrintingPokemonLevel
- pop hl
- pop de
- inc de
- ld a, [wListMenuID]
- cp ITEMLISTMENU
- jr nz, .nextListEntry
-.printItemQuantity
- ld a, [wd11e]
- ld [wcf91], a
- call IsKeyItem ; check if item is unsellable
- ld a, [wIsKeyItem]
- and a ; is the item unsellable?
- jr nz, .skipPrintingItemQuantity ; if so, don't print the quantity
- push hl
- ld bc, SCREEN_WIDTH + 8 ; 1 row down and 8 columns right
- add hl, bc
- ld a, "×"
- ld [hli], a
- ld a, [wd11e]
- push af
- ld a, [de]
- ld [wMaxItemQuantity], a
- push de
- ld de, wd11e
- ld [de], a
- lb bc, 1, 2
- call PrintNumber
- pop de
- pop af
- ld [wd11e], a
- pop hl
-.skipPrintingItemQuantity
- inc de
- pop bc
- inc c
- push bc
- inc c
- ld a, [wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1)
- and a ; is an item being swapped?
- jr z, .nextListEntry
- add a
- cp c ; is it this item?
- jr nz, .nextListEntry
- dec hl
- ld a, $ec ; unfilled right arrow menu cursor to indicate an item being swapped
- ld [hli], a
-.nextListEntry
- ld bc, 2 * SCREEN_WIDTH ; 2 rows
- add hl, bc
- pop bc
- inc c
- dec b
- jp nz, .loop
- ld bc, -8
- add hl, bc
- ld a, "▼"
- ld [hl], a
- ret
-.printCancelMenuItem
- ld de, ListMenuCancelText
- jp PlaceString
-
-ListMenuCancelText::
- db "CANCEL@"
-
-GetMonName::
- push hl
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, BANK(MonsterNames)
- ld [H_LOADEDROMBANK], a
- ld [MBC1RomBank], a
- ld a, [wd11e]
- dec a
- ld hl, MonsterNames
- ld c, 10
- ld b, 0
- call AddNTimes
- ld de, wcd6d
- push de
- ld bc, 10
- call CopyData
- ld hl, wcd6d + 10
- ld [hl], "@"
- pop de
- pop af
- ld [H_LOADEDROMBANK], a
- ld [MBC1RomBank], a
- pop hl
- ret
-
-GetItemName::
-; given an item ID at [wd11e], store the name of the item into a string
-; starting at wcd6d
- push hl
- push bc
- ld a, [wd11e]
- cp HM_01 ; is this a TM/HM?
- jr nc, .Machine
-
- ld [wd0b5], a
- ld a, ITEM_NAME
- ld [wNameListType], a
- ld a, BANK(ItemNames)
- ld [wPredefBank], a
- call GetName
- jr .Finish
-
-.Machine
- call GetMachineName
-.Finish
- ld de, wcd6d ; pointer to where item name is stored in RAM
- pop bc
- pop hl
- ret
-
-GetMachineName::
-; copies the name of the TM/HM in [wd11e] to wcd6d
- push hl
- push de
- push bc
- ld a, [wd11e]
- push af
- cp TM_01 ; is this a TM? [not HM]
- jr nc, .WriteTM
-; if HM, then write "HM" and add 5 to the item ID, so we can reuse the
-; TM printing code
- add 5
- ld [wd11e], a
- ld hl, HiddenPrefix ; points to "HM"
- ld bc, 2
- jr .WriteMachinePrefix
-.WriteTM
- ld hl, TechnicalPrefix ; points to "TM"
- ld bc, 2
-.WriteMachinePrefix
- ld de, wcd6d
- call CopyData
-
-; now get the machine number and convert it to text
- ld a, [wd11e]
- sub TM_01 - 1
- ld b, "0"
-.FirstDigit
- sub 10
- jr c, .SecondDigit
- inc b
- jr .FirstDigit
-.SecondDigit
- add 10
- push af
- ld a, b
- ld [de], a
- inc de
- pop af
- ld b, "0"
- add b
- ld [de], a
- inc de
- ld a, "@"
- ld [de], a
- pop af
- ld [wd11e], a
- pop bc
- pop de
- pop hl
- ret
-
-TechnicalPrefix::
- db "TM"
-HiddenPrefix::
- db "HM"
-
-; sets carry if item is HM, clears carry if item is not HM
-; Input: a = item ID
-IsItemHM::
- cp HM_01
- jr c, .notHM
- cp TM_01
- ret
-.notHM
- and a
- ret
-
-; sets carry if move is an HM, clears carry if move is not an HM
-; Input: a = move ID
-IsMoveHM::
- ld hl, HMMoves
- ld de, 1
- jp IsInArray
-
-HMMoves::
- db CUT, FLY, SURF, STRENGTH, FLASH
- db $ff ; terminator
-
-GetMoveName::
- push hl
- ld a, MOVE_NAME
- ld [wNameListType], a
- ld a, [wd11e]
- ld [wd0b5], a
- ld a, BANK(MoveNames)
- ld [wPredefBank], a
- call GetName
- ld de, wcd6d ; pointer to where move name is stored in RAM
- pop hl
- ret
-
-; reloads text box tile patterns, current map view, and tileset tile patterns
-ReloadMapData::
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, [wCurMap]
- call SwitchToMapRomBank
- call DisableLCD
- call LoadTextBoxTilePatterns
- call LoadCurrentMapView
- call LoadTilesetTilePatternData
- call EnableLCD
- pop af
- call BankswitchCommon
- ret
-
-; reloads tileset tile patterns
-ReloadTilesetTilePatterns::
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, [wCurMap]
- call SwitchToMapRomBank
- call DisableLCD
- call LoadTilesetTilePatternData
- call EnableLCD
- pop af
- call BankswitchCommon
- ret
-
-; shows the town map and lets the player choose a destination to fly to
-ChooseFlyDestination::
- ld hl, wd72e
- res 4, [hl]
- jpba LoadTownMap_Fly
-
-PrinterSerial::
- homecall PrinterSerial_
- ret
-
-SerialFunction::
- ld a, [wPrinterConnectionOpen]
- bit 0, a
- ret z
- ld a, [wPrinterOpcode]
- and a
- ret nz
- ld hl, wOverworldMap + 650
- inc [hl]
- ld a, [hl]
- cp $6
- ret c
- xor a
- ld [hl], a
- ld a, $0c
- ld [wPrinterOpcode], a
- ld a, $88
- ld [rSB], a
- ld a, $1
- ld [rSC], a
- ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
- ret
-
-; causes the text box to close without waiting for a button press after displaying text
-DisableWaitingAfterTextDisplay::
- ld a, $01
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ret
-
-; uses an item
-; UseItem is used with dummy items to perform certain other functions as well
-; INPUT:
-; [wcf91] = item ID
-; OUTPUT:
-; [wActionResultOrTookBattleTurn] = success
-; 00: unsuccessful
-; 01: successful
-; 02: not able to be used right now, no extra menu displayed (only certain items use this)
-UseItem::
- jpba UseItem_
-
-; confirms the item toss and then tosses the item
-; INPUT:
-; hl = address of inventory (either wNumBagItems or wNumBoxItems)
-; [wcf91] = item ID
-; [wWhichPokemon] = index of item within inventory
-; [wItemQuantity] = quantity to toss
-; OUTPUT:
-; clears carry flag if the item is tossed, sets carry flag if not
-TossItem::
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, BANK(TossItem_)
- ld [H_LOADEDROMBANK], a
- ld [MBC1RomBank], a
- call TossItem_
- pop de
- ld a, d
- ld [H_LOADEDROMBANK], a
- ld [MBC1RomBank], a
- ret
-
-; checks if an item is a key item
-; INPUT:
-; [wcf91] = item ID
-; OUTPUT:
-; [wIsKeyItem] = result
-; 00: item is not key item
-; 01: item is key item
-IsKeyItem::
- push hl
- push de
- push bc
- callba IsKeyItem_
- pop bc
- pop de
- pop hl
- ret
-
-; function to draw various text boxes
-; INPUT:
-; [wTextBoxID] = text box ID
-; b, c = y, x cursor position (TWO_OPTION_MENU only)
-DisplayTextBoxID::
- homecall_sf DisplayTextBoxID_
- ret
+ text_far _PokemonText
+ text_end
+
+INCLUDE "home/text_script.asm"
+INCLUDE "home/start_menu.asm"
+INCLUDE "home/count_set_bits.asm"
+INCLUDE "home/inventory.asm"
+INCLUDE "home/list_menu.asm"
+INCLUDE "home/names.asm"
+INCLUDE "home/reload_tiles.asm"
+INCLUDE "home/item.asm"
+INCLUDE "home/textbox.asm"
UpdateGBCPal_BGP::
push af
- ld a, [hGBC]
+ ldh a, [hGBC]
and a
jr z, .notGBC
push bc
push de
push hl
- ld a, [rBGP]
+ ldh a, [rBGP]
ld b, a
ld a, [wLastBGP]
cp b
jr z, .noChangeInBGP
- callba _UpdateGBCPal_BGP
+ farcall _UpdateGBCPal_BGP
.noChangeInBGP
pop hl
pop de
@@ -2231,13 +137,13 @@ UpdateGBCPal_BGP::
UpdateGBCPal_OBP0::
push af
- ld a, [hGBC]
+ ldh a, [hGBC]
and a
jr z, .notGBC
push bc
push de
push hl
- ld a, [rOBP0]
+ ldh a, [rOBP0]
ld b, a
ld a, [wLastOBP0]
cp b
@@ -2256,13 +162,13 @@ UpdateGBCPal_OBP0::
UpdateGBCPal_OBP1::
push af
- ld a, [hGBC]
+ ldh a, [hGBC]
and a
jr z, .notGBC
push bc
push de
push hl
- ld a, [rOBP1]
+ ldh a, [rOBP1]
ld b, a
ld a, [wLastOBP1]
cp b
@@ -2280,7 +186,7 @@ UpdateGBCPal_OBP1::
ret
Func_3082::
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
call FadeOutAudio
callbs Music_DoLowHealthAlarm
@@ -2289,2064 +195,32 @@ Func_3082::
call BankswitchCommon
ret
-; not zero if an NPC movement script is running, the player character is
-; automatically stepping down from a door, or joypad states are being simulated
-IsPlayerCharacterBeingControlledByGame::
- ld a, [wNPCMovementScriptPointerTableNum]
- and a
- ret nz
- ld a, [wd736]
- bit 1, a ; currently stepping down from door bit
- ret nz
- ld a, [wd730]
- and $80
- ret
-
-RunNPCMovementScript::
- ld hl, wd736
- bit 0, [hl]
- res 0, [hl]
- jr nz, .playerStepOutFromDoor
- ld a, [wNPCMovementScriptPointerTableNum]
- and a
- ret z
- dec a
- add a
- ld d, 0
- ld e, a
- ld hl, .NPCMovementScriptPointerTables
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, [wNPCMovementScriptBank]
- call BankswitchCommon
- ld a, [wNPCMovementScriptFunctionNum]
- call CallFunctionInTable
- pop af
- call BankswitchCommon
- ret
-
-.NPCMovementScriptPointerTables
- dw PalletMovementScriptPointerTable
- dw PewterMuseumGuyMovementScriptPointerTable
- dw PewterGymGuyMovementScriptPointerTable
-.playerStepOutFromDoor
- jpba PlayerStepOutFromDoor
-
-EndNPCMovementScript::
- jpba _EndNPCMovementScript
-
-EmptyFunc2::
- ret
-
-; stores hl in [wTrainerHeaderPtr]
-StoreTrainerHeaderPointer::
- ld a, h
- ld [wTrainerHeaderPtr], a
- ld a, l
- ld [wTrainerHeaderPtr + 1], a
- ret
-
-; executes the current map script from the function pointer array provided in hl.
-; a: map script index to execute (unless overridden by [wd733] bit 4)
-ExecuteCurMapScriptInTable::
- push af
- push de
- call StoreTrainerHeaderPointer
- pop hl
- pop af
- push hl
- ld hl, wFlags_D733
- bit 4, [hl]
- res 4, [hl]
- jr z, .useProvidedIndex ; test if map script index was overridden manually
- ld a, [wCurMapScript]
-.useProvidedIndex
- pop hl
- ld [wCurMapScript], a
- call CallFunctionInTable
- ld a, [wCurMapScript]
- ret
-
-LoadGymLeaderAndCityName::
- push de
- ld de, wGymCityName
- ld bc, $11
- call CopyData ; load city name
- pop hl
- ld de, wGymLeaderName
- ld bc, NAME_LENGTH
- jp CopyData ; load gym leader name
-
-; 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)
-; 4 -> before battle text (into hl)
-; 6 -> after battle text (into hl)
-; 8 -> end battle text (into hl)
-ReadTrainerHeaderInfo::
- push de
- push af
- ld d, $0
- ld e, a
- ld hl, wTrainerHeaderPtr
- ld a, [hli]
- ld l, [hl]
- ld h, a
- add hl, de
- pop af
- and a
- jr nz, .nonZeroOffset
- ld a, [hl]
- ld [wTrainerHeaderFlagBit], a ; store flag's bit
- jr .done
-.nonZeroOffset
- cp $2
- jr z, .readPointer ; read flag's byte ptr
- cp $4
- jr z, .readPointer ; read before battle text
- cp $6
- jr z, .readPointer ; read after battle text
- cp $8
- jr z, .readPointer ; read end battle text
- cp $a
- jr nz, .done
- ld a, [hli] ; read end battle text (2) but override the result afterwards (XXX why, bug?)
- ld d, [hl]
- ld e, a
- jr .done
-.readPointer
- ld a, [hli]
- ld h, [hl]
- ld l, a
-.done
- pop de
- ret
-
-TrainerFlagAction::
- predef_jump FlagActionPredef
-
-TalkToTrainer::
- call StoreTrainerHeaderPointer
- xor a
- call ReadTrainerHeaderInfo ; read flag's bit
- ld a, $2
- call ReadTrainerHeaderInfo ; read flag's byte ptr
- ld a, [wTrainerHeaderFlagBit]
- ld c, a
- ld b, FLAG_TEST
- call TrainerFlagAction ; read trainer's flag
- ld a, c
- and a
- jr z, .trainerNotYetFought ; test trainer's flag
- ld a, $6
- call ReadTrainerHeaderInfo ; print after battle text
- jp PrintText
-.trainerNotYetFought
- ld a, $4
- call ReadTrainerHeaderInfo ; print before battle text
- call PrintText
- ld a, $a
- call ReadTrainerHeaderInfo ; (?) does nothing apparently (maybe bug in ReadTrainerHeaderInfo)
- push de
- ld a, $8
- call ReadTrainerHeaderInfo ; read end battle text
- pop de
- call SaveEndBattleTextPointers
- 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, wCurMapScript
- inc [hl] ; increment map script index before StartTrainerBattle increments it again (next script function is usually EndTrainerBattle)
- jp StartTrainerBattle
-
-; checks if any trainers are seeing the player and wanting to fight
-CheckFightingMapTrainers::
- call CheckForEngagingTrainers
- ld a, [wSpriteIndex]
- cp $ff
- jr nz, .trainerEngaging
- xor a
- ld [wSpriteIndex], a
- ld [wTrainerHeaderFlagBit], a
- ret
-.trainerEngaging
- ld hl, wFlags_D733
- set 3, [hl]
- ld [wEmotionBubbleSpriteIndex], a
- xor a ; EXCLAMATION_BUBBLE
- ld [wWhichEmotionBubble], a
- predef EmotionBubble
- ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
- ld [wJoyIgnore], a
- xor a
- ld [hJoyHeld], a
- call TrainerWalkUpToPlayer_Bank0
- ld hl, wCurMapScript
- inc [hl] ; increment map script index (next script function is usually DisplayEnemyTrainerTextAndStartBattle)
- ret
-
-; display the before battle text after the enemy trainer has walked up to the player's sprite
-DisplayEnemyTrainerTextAndStartBattle::
- ld a, [wd730]
- and $1
- ret nz ; return if the enemy trainer hasn't finished walking to the player's sprite
- ld [wJoyIgnore], a
- ld a, [wSpriteIndex]
- ld [hSpriteIndexOrTextID], a
- call DisplayTextID
- ; fall through
-
-StartTrainerBattle::
- xor a
- ld [wJoyIgnore], a
- call InitBattleEnemyParameters
- ld hl, wd72d
- set 6, [hl]
- set 7, [hl]
- ld hl, wd72e
- set 1, [hl]
- ld hl, wCurMapScript
- inc [hl] ; increment map script index (next script function is usually EndTrainerBattle)
- ret
-
-EndTrainerBattle::
- 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, [wIsInBattle]
- cp $ff
- jp z, ResetButtonPressedAndMapScript
- ld a, $2
- call ReadTrainerHeaderInfo
- ld a, [wTrainerHeaderFlagBit]
- ld c, a
- ld b, FLAG_SET
- call TrainerFlagAction ; flag trainer as fought
- ld a, [wEnemyMonOrTrainerClass]
- cp OPP_ID_OFFSET
- jr nc, .skipRemoveSprite ; test if trainer was fought (in that case skip removing the corresponding sprite)
- ld hl, wMissableObjectList
- ld de, $2
- ld a, [wSpriteIndex]
- call IsInArray ; search for sprite ID
- inc hl
- ld a, [hl]
- ld [wMissableObjectIndex], a ; load corresponding missable object index and remove it
- predef HideObject
-.skipRemoveSprite
- ld hl, wd730
- bit 4, [hl]
- res 4, [hl]
- ret nz
-
-ResetButtonPressedAndMapScript::
- xor a
- ld [wJoyIgnore], a
- ld [hJoyHeld], a
- ld [hJoyPressed], a
- ld [hJoyReleased], a
- ld [wCurMapScript], a ; reset battle status
- ret
-
-; calls TrainerWalkUpToPlayer
-TrainerWalkUpToPlayer_Bank0::
- jpba TrainerWalkUpToPlayer
-
-; sets opponent type and mon set/lvl based on the engaging trainer data
-InitBattleEnemyParameters::
- ld a, [wEngagedTrainerClass]
- ld [wCurOpponent], a
- ld [wEnemyMonOrTrainerClass], a
- cp OPP_ID_OFFSET
- ld a, [wEngagedTrainerSet]
- jr c, .noTrainer
- ld [wTrainerNo], a
- ret
-.noTrainer
- ld [wCurEnemyLVL], a
- ret
-
-GetSpritePosition1::
- ld hl, _GetSpritePosition1
- jr SpritePositionBankswitch
-
-GetSpritePosition2::
- ld hl, _GetSpritePosition2
- jr SpritePositionBankswitch
-
-SetSpritePosition1::
- ld hl, _SetSpritePosition1
- jr SpritePositionBankswitch
-
-SetSpritePosition2::
- ld hl, _SetSpritePosition2
-SpritePositionBankswitch::
- ld b, BANK(_GetSpritePosition1) ; BANK(_GetSpritePosition2), BANK(_SetSpritePosition1), BANK(_SetSpritePosition2)
- jp Bankswitch ; indirect jump to one of the four functions
-
-CheckForEngagingTrainers::
- xor a
- call ReadTrainerHeaderInfo ; read trainer flag's bit (unused)
- ld d, h ; store trainer header address in de
- ld e, l
-.trainerLoop
- call StoreTrainerHeaderPointer ; set trainer header pointer to current trainer
- ld a, [de]
- ld [wSpriteIndex], a ; store trainer flag's bit
- ld [wTrainerHeaderFlagBit], a
- cp $ff
- ret z
- ld a, $2
- call ReadTrainerHeaderInfo ; read trainer flag's byte ptr
- ld b, FLAG_TEST
- ld a, [wTrainerHeaderFlagBit]
- ld c, a
- call TrainerFlagAction ; read trainer flag
- ld a, c
- and a ; has the trainer already been defeated?
- jr nz, .continue
- push hl
- push de
- push hl
- xor a
- call ReadTrainerHeaderInfo ; get trainer header pointer
- inc hl
- ld a, [hl] ; read trainer engage distance
- pop hl
- ld [wTrainerEngageDistance], a
- ld a, [wSpriteIndex]
- swap a
- ld [wTrainerSpriteOffset], a
- predef TrainerEngage
- pop de
- pop hl
- ld a, [wTrainerSpriteOffset]
- and a
- ret nz ; break if the trainer is engaging
-.continue
- ld hl, $c
- add hl, de
- ld d, h
- ld e, l
- jr .trainerLoop
-
-; hl = text if the player wins
-; de = text if the player loses
-SaveEndBattleTextPointers::
- ld a, [H_LOADEDROMBANK]
- ld [wEndBattleTextRomBank], a
- ld a, h
- ld [wEndBattleWinTextPointer], a
- ld a, l
- ld [wEndBattleWinTextPointer + 1], a
- ld a, d
- ld [wEndBattleLoseTextPointer], a
- ld a, e
- ld [wEndBattleLoseTextPointer + 1], a
- ret
-
-; loads data of some trainer on the current map and plays pre-battle music
-; [wSpriteIndex]: sprite ID of trainer who is engaged
-EngageMapTrainer::
- ld hl, wMapSpriteExtraData
- ld d, $0
- ld a, [wSpriteIndex]
- dec a
- add a
- ld e, a
- add hl, de ; seek to engaged trainer data
- ld a, [hli] ; load trainer class
- ld [wEngagedTrainerClass], a
- ld a, [hl] ; load trainer mon set
- ld [wEngagedTrainerSet], a
- jp PlayTrainerMusic
-
-PrintEndBattleText::
- push hl
- ld hl, wd72d
- bit 7, [hl]
- res 7, [hl]
- pop hl
- ret z
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, [wEndBattleTextRomBank]
- ld [H_LOADEDROMBANK], a
- ld [MBC1RomBank], a
- push hl
- callba SaveTrainerName
- ld hl, TrainerEndBattleText
- call PrintText
- pop hl
- pop af
- ld [H_LOADEDROMBANK], a
- ld [MBC1RomBank], a
- callba FreezeEnemyTrainerSprite
- jp WaitForSoundToFinish
-
-GetSavedEndBattleTextPointer::
- ld a, [wBattleResult]
- and a
-; won battle
- jr nz, .lostBattle
- ld a, [wEndBattleWinTextPointer]
- ld h, a
- ld a, [wEndBattleWinTextPointer + 1]
- ld l, a
- ret
-.lostBattle
- ld a, [wEndBattleLoseTextPointer]
- ld h, a
- ld a, [wEndBattleLoseTextPointer + 1]
- ld l, a
- ret
-
-TrainerEndBattleText::
- TX_FAR _TrainerNameText
- TX_ASM
- call GetSavedEndBattleTextPointer
- call TextCommandProcessor
- jp TextScriptEnd
-
-PlayTrainerMusic::
- ld a, [wEngagedTrainerClass]
- cp OPP_SONY1
- ret z
- cp OPP_SONY2
- ret z
- cp OPP_SONY3
- ret z
- ld a, [wGymLeaderNo]
- and a
- ret nz
- xor a
- ld [wAudioFadeOutControl], a
- call StopAllMusic ; stop music
- ld a, BANK(Music_MeetEvilTrainer)
- ld [wAudioROMBank], a
- ld [wAudioSavedROMBank], a
- ld a, [wEngagedTrainerClass]
- ld b, a
- ld hl, EvilTrainerList
-.evilTrainerListLoop
- ld a, [hli]
- cp $ff
- jr z, .noEvilTrainer
- cp b
- jr nz, .evilTrainerListLoop
- ld a, MUSIC_MEET_EVIL_TRAINER
- jr .PlaySound
-.noEvilTrainer
- ld hl, FemaleTrainerList
-.femaleTrainerListLoop
- ld a, [hli]
- cp $ff
- jr z, .maleTrainer
- cp b
- jr nz, .femaleTrainerListLoop
- ld a, MUSIC_MEET_FEMALE_TRAINER
- jr .PlaySound
-.maleTrainer
- ld a, MUSIC_MEET_MALE_TRAINER
-.PlaySound
- ld [wNewSoundID], a
- jp PlaySound
-
-INCLUDE "data/trainer_types.asm"
-
-; checks if the player's coordinates match an arrow movement tile's coordinates
-; and if so, decodes the RLE movement data
-; b = player Y
-; c = player X
-DecodeArrowMovementRLE::
- ld a, [hli]
- cp $ff
- ret z ; no match in the list
- cp b
- jr nz, .nextArrowMovementTileEntry1
- ld a, [hli]
- cp c
- jr nz, .nextArrowMovementTileEntry2
- ld a, [hli]
- ld d, [hl]
- ld e, a
- ld hl, wSimulatedJoypadStatesEnd
- call DecodeRLEList
- dec a
- ld [wSimulatedJoypadStatesIndex], a
- ret
-.nextArrowMovementTileEntry1
- inc hl
-.nextArrowMovementTileEntry2
- inc hl
- inc hl
- jr DecodeArrowMovementRLE
-
-FuncTX_ItemStoragePC::
- call SaveScreenTilesToBuffer2
- ld b, BANK(PlayerPC)
- ld hl, PlayerPC
- jr bankswitchAndContinue
-
-FuncTX_BillsPC::
- call SaveScreenTilesToBuffer2
- ld b, BANK(BillsPC_)
- ld hl, BillsPC_
- jr bankswitchAndContinue
-
-FuncTX_GameCornerPrizeMenu::
-; XXX find a better name for this function
-; special_F7
- ld b, BANK(CeladonPrizeMenu)
- ld hl, CeladonPrizeMenu
-bankswitchAndContinue::
- call Bankswitch
- jp HoldTextDisplayOpen ; continue to main text-engine function
-
-FuncTX_PokemonCenterPC::
- ld b, BANK(ActivatePC)
- ld hl, ActivatePC
- jr bankswitchAndContinue
-
-StartSimulatingJoypadStates::
- xor a
- ld [wOverrideSimulatedJoypadStatesMask], a
- ld [wSpriteStateData2 + $06], a ; player's sprite movement byte 1
- ld hl, wd730
- set 7, [hl]
- ret
-
-IsItemInBag::
-; given an item_id in b
-; set zero flag if item isn't in player's bag
-; else reset zero flag
-; related to Pokémon Tower and ghosts
- predef GetQuantityOfItemInBag
- ld a, b
- and a
- ret
-
-IsSurfingPikachuInParty::
-; set bit 6 of wd472 if true
-; also calls Func_3467, which is a bankswitch to IsStarterPikachuInOurParty
- ld a, [wd472]
- and $3f
- ld [wd472], a
- ld hl, wPartyMon1
- ld c, PARTY_LENGTH
- ld b, SURF
-.loop
- ld a, [hl]
- cp PIKACHU
- jr nz, .notPikachu
- push hl
- ld de, $8
- add hl, de
- ld a, [hli]
- cp b ; does pikachu have surf as one of its moves
- jr z, .hasSurf
- ld a, [hli]
- cp b
- jr z, .hasSurf
- ld a, [hli]
- cp b
- jr z, .hasSurf
- ld a, [hli]
- cp b
- jr nz, .noSurf
-.hasSurf
- ld a, [wd472]
- set 6, a
- ld [wd472], a
-.noSurf
- pop hl
-.notPikachu
- ld de, wPartyMon2 - wPartyMon1
- add hl, de
- dec c
- jr nz, .loop
- call Func_3467
- ret
-
-Func_3467::
- push hl
- push bc
- callab IsStarterPikachuInOurParty
- pop bc
- pop hl
- ret nc
- ld a, [wd472]
- set 7, a
- ld [wd472], a
- ret
-
-DisplayPokedex::
- ld [wd11e], a
- jpba _DisplayPokedex
-
-SetSpriteFacingDirectionAndDelay::
- call SetSpriteFacingDirection
- ld c, 6
- jp DelayFrames
-
-SetSpriteFacingDirection::
- ld a, $9
- ld [H_SPRITEDATAOFFSET], a
- call GetPointerWithinSpriteStateData1
- ld a, [hSpriteFacingDirection]
- ld [hl], a
- ret
-
-SetSpriteImageIndexAfterSettingFacingDirection::
- ld de, -7
- add hl, de
- ld [hl], a
- ret
-
-SpriteFunc_34a1::
- ld a, [H_SPRITEINDEX]
- swap a
- add $e
- ld l, a
- ld h, $c2
- ld c, [hl]
- dec c
- swap c
- ld a, [$ff8d]
- add c
- ld c, a
- ld a, [$ff8c]
- swap a
- add $2
- ld l, a
- dec h
- ld [hl], c
- ret
-
-; tests if the player's coordinates are in a specified array
-; INPUT:
-; hl = address of array
-; OUTPUT:
-; [wCoordIndex] = if there is match, the matching array index
-; sets carry if the coordinates are in the array, clears carry if not
-ArePlayerCoordsInArray::
- ld a, [wYCoord]
- ld b, a
- ld a, [wXCoord]
- ld c, a
- ; fallthrough
-
-CheckCoords::
- xor a
- ld [wCoordIndex], a
-.loop
- ld a, [hli]
- cp $ff ; reached terminator?
- jr z, .notInArray
- push hl
- ld hl, wCoordIndex
- inc [hl]
- pop hl
-.compareYCoord
- cp b
- jr z, .compareXCoord
- inc hl
- jr .loop
-.compareXCoord
- ld a, [hli]
- cp c
- jr nz, .loop
-.inArray
- scf
- ret
-.notInArray
- and a
- ret
-
-; tests if a boulder's coordinates are in a specified array
-; INPUT:
-; hl = address of array
-; [H_SPRITEINDEX] = index of boulder sprite
-; OUTPUT:
-; [wCoordIndex] = if there is match, the matching array index
-; sets carry if the coordinates are in the array, clears carry if not
-CheckBoulderCoords::
- push hl
- ld hl, wSpriteStateData2 + $04
- ld a, [H_SPRITEINDEX]
- swap a
- ld d, $0
- ld e, a
- add hl, de
- ld a, [hli]
- sub $4 ; because sprite coordinates are offset by 4
- ld b, a
- ld a, [hl]
- sub $4 ; because sprite coordinates are offset by 4
- ld c, a
- pop hl
- jp CheckCoords
-
-GetPointerWithinSpriteStateData1::
- ld h, $c1
- jr _GetPointerWithinSpriteStateData
-
-GetPointerWithinSpriteStateData2::
- ld h, $c2
-
-_GetPointerWithinSpriteStateData:
- ld a, [H_SPRITEDATAOFFSET]
- ld b, a
- ld a, [H_SPRITEINDEX]
- swap a
- add b
- ld l, a
- ret
-
-; decodes a $ff-terminated RLEncoded list
-; each entry is a pair of bytes <byte value> <repetitions>
-; the final $ff will be replicated in the output list and a contains the number of bytes written
-; de: input list
-; hl: output list
-DecodeRLEList::
- xor a
- ld [wRLEByteCount], a ; count written bytes here
-.listLoop
- ld a, [de]
- cp $ff
- jr z, .endOfList
- ld [hRLEByteValue], a ; store byte value to be written
- inc de
- ld a, [de]
- ld b, $0
- ld c, a ; number of bytes to be written
- ld a, [wRLEByteCount]
- add c
- ld [wRLEByteCount], a ; update total number of written bytes
- ld a, [hRLEByteValue]
- call FillMemory ; write a c-times to output
- inc de
- jr .listLoop
-.endOfList
- ld a, $ff
- ld [hl], a ; write final $ff
- ld a, [wRLEByteCount]
- inc a ; include sentinel in counting
- ret
-
-; sets movement byte 1 for sprite [H_SPRITEINDEX] to $FE and byte 2 to [hSpriteMovementByte2]
-SetSpriteMovementBytesToFE::
- push hl
- call GetSpriteMovementByte1Pointer
- ld [hl], $fe
- call GetSpriteMovementByte2Pointer
- ld a, [hSpriteMovementByte2]
- ld [hl], a
- pop hl
- ret
-
-; sets both movement bytes for sprite [H_SPRITEINDEX] to $FF
-SetSpriteMovementBytesToFF::
- push hl
- call GetSpriteMovementByte1Pointer
- ld [hl], $FF
- call GetSpriteMovementByte2Pointer
- ld [hl], $FF ; prevent person from walking?
- pop hl
- ret
-
-; returns the sprite movement byte 1 pointer for sprite [H_SPRITEINDEX] in hl
-GetSpriteMovementByte1Pointer::
- ld h, $C2
- ld a, [H_SPRITEINDEX]
- swap a
- add 6
- ld l, a
- ret
-
-; returns the sprite movement byte 2 pointer for sprite [H_SPRITEINDEX] in hl
-GetSpriteMovementByte2Pointer::
- push de
- ld hl, wMapSpriteData
- ld a, [H_SPRITEINDEX]
- dec a
- add a
- ld e, a
- ld d, 0
- add hl, de
- pop de
- ret
-
-GetTrainerInformation::
- call GetTrainerName
- ld a, [wLinkState]
- and a
- jr nz, .linkBattle
- ld a, BANK(TrainerPicAndMoneyPointers)
- call BankswitchHome
- ld a, [wTrainerClass]
- dec a
- ld hl, TrainerPicAndMoneyPointers
- ld bc, $5
- call AddNTimes
- ld de, wTrainerPicPointer
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- ld de, wTrainerBaseMoney
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- call IsFightingJessieJames
- jp BankswitchBack
-.linkBattle
- ld hl, wTrainerPicPointer
- ld de, RedPicFront
- ld [hl], e
- inc hl
- ld [hl], d
- ret
-
-IsFightingJessieJames::
- ld a, [wTrainerClass]
- cp ROCKET
- ret nz
- ld a, [wTrainerNo]
- cp $2a
- ret c
- ld de, JessieJamesPic
- cp $2e
- jr c, .dummy
- ld de, JessieJamesPic ; possibly meant to add another pic
-.dummy
- ld hl, wTrainerPicPointer
- ld a, e
- ld [hli], a
- ld [hl], d
- ret
-
-GetTrainerName::
- jpba GetTrainerName_
-
-HasEnoughMoney::
-; Check if the player has at least as much
-; money as the 3-byte BCD value at hMoney.
- ld de, wPlayerMoney
- ld hl, hMoney
- ld c, 3
- jp StringCmp
-
-HasEnoughCoins::
-; Check if the player has at least as many
-; coins as the 2-byte BCD value at hCoins.
- ld de, wPlayerCoins
- ld hl, hCoins
- ld c, 2
- jp StringCmp
-
-
-BankswitchHome::
-; switches to bank # in a
-; Only use this when in the home bank!
- ld [wBankswitchHomeTemp], a
- ld a, [H_LOADEDROMBANK]
- ld [wBankswitchHomeSavedROMBank], a
- ld a, [wBankswitchHomeTemp]
- call BankswitchCommon
- ret
-
-BankswitchBack::
-; returns from BankswitchHome
- ld a, [wBankswitchHomeSavedROMBank]
- call BankswitchCommon
- ret
-
-; displays yes/no choice
-; yes -> set carry
-YesNoChoice::
- call SaveScreenTilesToBuffer1
- call InitYesNoTextBoxParameters
- jr DisplayYesNoChoice
-
-Func_35f7::
- ld a, TWO_OPTION_MENU
- ld [wTextBoxID], a
- call InitYesNoTextBoxParameters
- jp DisplayTextBoxID
-
-InitYesNoTextBoxParameters::
- xor a ; YES_NO_MENU
- ld [wTwoOptionMenuID], a
- coord hl, 14, 7
- ld bc, $80f
- ret
-
-YesNoChoicePokeCenter::
- call SaveScreenTilesToBuffer1
- ld a, HEAL_CANCEL_MENU
- ld [wTwoOptionMenuID], a
- coord hl, 11, 6
- lb bc, 8, 12
- jr DisplayYesNoChoice
-
-WideYesNoChoice:: ; unused
- call SaveScreenTilesToBuffer1
- ld a, WIDE_YES_NO_MENU
- ld [wTwoOptionMenuID], a
- coord hl, 12, 7
- lb bc, 8, 13
-
-DisplayYesNoChoice::
- ld a, TWO_OPTION_MENU
- ld [wTextBoxID], a
- call DisplayTextBoxID
- jp LoadScreenTilesFromBuffer1
-
-; calculates the difference |a-b|, setting carry flag if a<b
-CalcDifference::
- sub b
- ret nc
- cpl
- add $1
- scf
- ret
-
-MoveSprite::
-; move the sprite [H_SPRITEINDEX] with the movement pointed to by de
-; actually only copies the movement data to wNPCMovementDirections for later
- call SetSpriteMovementBytesToFF
-MoveSprite_::
- push hl
- push bc
- call GetSpriteMovementByte1Pointer
- xor a
- ld [hl], a
- ld hl, wNPCMovementDirections
- ld c, 0
-
-.loop
- ld a, [de]
- ld [hli], a
- inc de
- inc c
- cp $FF ; have we reached the end of the movement data?
- jr nz, .loop
-
- ld a, c
- ld [wNPCNumScriptedSteps], a ; number of steps taken
-
- pop bc
- ld hl, wd730
- set 0, [hl]
- pop hl
- xor a
- ld [wOverrideSimulatedJoypadStatesMask], a
- ld [wSimulatedJoypadStatesEnd], a
- dec a
- ld [wJoyIgnore], a
- ld [wWastedByteCD3A], a
- ret
-
-; divides [hDividend2] by [hDivisor2] and stores the quotient in [hQuotient2]
-DivideBytes::
- push hl
- ld hl, hQuotient2
- xor a
- ld [hld], a
- ld a, [hld]
- and a
- jr z, .done
- ld a, [hli]
-.loop
- sub [hl]
- jr c, .done
- inc hl
- inc [hl]
- dec hl
- jr .loop
-.done
- pop hl
- ret
-
-
-LoadFontTilePatterns::
- ld a, [rLCDC]
- bit 7, a ; is the LCD enabled?
- jr nz, .on
-.off
- ld hl, FontGraphics
- ld de, vFont
- 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), (FontGraphicsEnd - FontGraphics) / $8
- jp CopyVideoDataDouble ; if LCD is on, transfer during V-blank
-
-LoadTextBoxTilePatterns::
- ld a, [rLCDC]
- bit 7, a ; is the LCD enabled?
- jr nz, .on
-.off
- ld hl, TextBoxGraphics
- ld de, vChars2 + $600
- ld bc, TextBoxGraphicsEnd - TextBoxGraphics
- ld a, BANK(TextBoxGraphics)
- jp FarCopyData ; if LCD is off, transfer all at once
-.on
- ld de, TextBoxGraphics
- ld hl, vChars2 + $600
- lb bc, BANK(TextBoxGraphics), (TextBoxGraphicsEnd - TextBoxGraphics) / $10
- jp CopyVideoData ; if LCD is on, transfer during V-blank
-
-LoadHpBarAndStatusTilePatterns::
- ld a, [rLCDC]
- bit 7, a ; is the LCD enabled?
- jr nz, .on
-.off
- ld hl, HpBarAndStatusGraphics
- ld de, vChars2 + $620
- ld bc, HpBarAndStatusGraphicsEnd - HpBarAndStatusGraphics
- ld a, BANK(HpBarAndStatusGraphics)
- jp FarCopyData ; if LCD is off, transfer all at once
-.on
- ld de, HpBarAndStatusGraphics
- ld hl, vChars2 + $620
- lb bc, BANK(HpBarAndStatusGraphics), (HpBarAndStatusGraphicsEnd - HpBarAndStatusGraphics) / $10
- jp CopyVideoData ; if LCD is on, transfer during V-blank
-
-UncompressSpriteFromDE::
-; Decompress pic at a:de.
- ld hl, wSpriteInputPtr
- ld [hl], e
- inc hl
- ld [hl], d
- jp UncompressSpriteData
-
-SaveScreenTilesToBuffer2::
- coord hl, 0, 0
- ld de, wTileMapBackup2
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- jp CopyData
-
-LoadScreenTilesFromBuffer2::
- call LoadScreenTilesFromBuffer2DisableBGTransfer
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- ret
-
-; loads screen tiles stored in wTileMapBackup2 but leaves H_AUTOBGTRANSFERENABLED disabled
-LoadScreenTilesFromBuffer2DisableBGTransfer::
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld hl, wTileMapBackup2
- coord de, 0, 0
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- jp CopyData
-
-SaveScreenTilesToBuffer1::
- coord hl, 0, 0
- ld de, wTileMapBackup
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- jp CopyData
-
-LoadScreenTilesFromBuffer1::
- xor a
- ld [H_AUTOBGTRANSFERENABLED], a
- ld hl, wTileMapBackup
- coord de, 0, 0
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- call CopyData
- ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
- ret
-
-DelayFrames::
-; wait c frames
- call DelayFrame
- dec c
- jr nz, DelayFrames
- ret
-
-PlaySoundWaitForCurrent::
- push af
- call WaitForSoundToFinish
- pop af
- jp PlaySound
-
-; Wait for sound to finish playing
-WaitForSoundToFinish::
- ld a, [wLowHealthAlarm]
- and $80
- ret nz
- push hl
-.waitLoop
- ld hl, wChannelSoundIDs + Ch5
- xor a
- or [hl]
- inc hl
- or [hl]
- inc hl
- inc hl
- or [hl]
- and a
- jr nz, .waitLoop
- pop hl
- ret
-
-NamePointers::
- dw MonsterNames
- dw MoveNames
- dw UnusedNames
- dw ItemNames
- dw wPartyMonOT ; player's OT names list
- dw wEnemyMonOT ; enemy's OT names list
- dw TrainerNames
-
-GetName::
-; arguments:
-; [wd0b5] = which name
-; [wNameListType] = which list
-; [wPredefBank] = bank of list
-;
-; returns pointer to name in de
- ld a, [wd0b5]
- ld [wd11e], a
-
- ; TM names are separate from item names.
- ; BUG: This applies to all names instead of just items.
- cp HM_01
- jp nc, GetMachineName
-
- ld a, [H_LOADEDROMBANK]
- push af
- push hl
- push bc
- push de
- ld a, [wNameListType] ;List3759_entrySelector
- dec a
- jr nz, .otherEntries
- ;1 = MON_NAMES
- call GetMonName
- ld hl, NAME_LENGTH
- add hl, de
- ld e, l
- ld d, h
- jr .gotPtr
-.otherEntries
- ;2-7 = OTHER ENTRIES
- ld a, [wPredefBank]
- call BankswitchCommon
- ld a, [wNameListType] ;VariousNames' entryID
- dec a
- add a
- ld d, 0
- ld e, a
- jr nc, .skip
- inc d
-.skip
- ld hl, NamePointers
- add hl, de
- ld a, [hli]
- ld [$ff96], a
- ld a, [hl]
- ld [$ff95], a
- ld a, [$ff95]
- ld h, a
- ld a, [$ff96]
- ld l, a
- ld a, [wd0b5]
- ld b, a
- ld c, 0
-.nextName
- ld d, h
- ld e, l
-.nextChar
- ld a, [hli]
- cp "@"
- jr nz, .nextChar
- inc c ;entry counter
- ld a, b ;wanted entry
- cp c
- jr nz, .nextName
- ld h, d
- ld l, e
- ld de, wcd6d
- ld bc, $0014
- call CopyData
-.gotPtr
- ld a, e
- ld [wUnusedCF8D], a
- ld a, d
- ld [wUnusedCF8D + 1], a
- pop de
- pop bc
- pop hl
- pop af
- call BankswitchCommon
- ret
-
-GetItemPrice::
-; Stores item's price as BCD at hItemPrice (3 bytes)
-; Input: [wcf91] = item id
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, [wListMenuID]
- cp MOVESLISTMENU
- ld a, BANK(ItemPrices)
- jr nz, .ok
- ld a, $f ; hardcoded Bank
-.ok
- call BankswitchCommon
- ld hl, wItemPrices
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [wcf91] ; a contains item id
- cp HM_01
- jr nc, .getTMPrice
- ld bc, $3
-.loop
- add hl, bc
- dec a
- jr nz, .loop
- dec hl
- ld a, [hld]
- ld [hItemPrice + 2], a
- ld a, [hld]
- ld [hItemPrice + 1], a
- ld a, [hl]
- ld [hItemPrice], a
- jr .done
-.getTMPrice
- callbs GetMachinePrice
-.done
- ld de, hItemPrice
- pop af
- call BankswitchCommon
- ret
-
-; copies a string from [de] to [wcf4b]
-CopyStringToCF4B::
- ld hl, wcf4b
- ; fall through
-
-; copies a string from [de] to [hl]
-CopyString::
- ld a, [de]
- inc de
- ld [hli], a
- cp "@"
- jr nz, CopyString
- ret
-
-; this function is used when lower button sensitivity is wanted (e.g. menus)
-; OUTPUT: [hJoy5] = pressed buttons in usual format
-; there are two flags that control its functionality, [hJoy6] and [hJoy7]
-; there are essentially three modes of operation
-; 1. Get newly pressed buttons only
-; ([hJoy7] == 0, [hJoy6] == any)
-; Just copies [hJoyPressed] to [hJoy5].
-; 2. Get currently pressed buttons at low sample rate with delay
-; ([hJoy7] == 1, [hJoy6] != 0)
-; If the user holds down buttons for more than half a second,
-; report buttons as being pressed up to 12 times per second thereafter.
-; If the user holds down buttons for less than half a second,
-; report only one button press.
-; 3. Same as 2, but report no buttons as pressed if A or B is held down.
-; ([hJoy7] == 1, [hJoy6] == 0)
-JoypadLowSensitivity::
- call Joypad
- ld a, [hJoy7] ; flag
- and a ; get all currently pressed buttons or only newly pressed buttons?
- ld a, [hJoyPressed] ; newly pressed buttons
- jr z, .storeButtonState
- ld a, [hJoyHeld] ; all currently pressed buttons
-.storeButtonState
- ld [hJoy5], a
- ld a, [hJoyPressed] ; newly pressed buttons
- and a ; have any buttons been newly pressed since last check?
- jr z, .noNewlyPressedButtons
-.newlyPressedButtons
- ld a, 30 ; half a second delay
- ld [H_FRAMECOUNTER], a
- ret
-.noNewlyPressedButtons
- ld a, [H_FRAMECOUNTER]
- and a ; is the delay over?
- jr z, .delayOver
-.delayNotOver
- xor a
- ld [hJoy5], a ; report no buttons as pressed
- ret
-.delayOver
-; if [hJoy6] = 0 and A or B is pressed, report no buttons as pressed
- ld a, [hJoyHeld]
- and A_BUTTON | B_BUTTON
- jr z, .setShortDelay
- ld a, [hJoy6] ; flag
- and a
- jr nz, .setShortDelay
- xor a
- ld [hJoy5], a
-.setShortDelay
- ld a, 5 ; 1/12 of a second delay
- ld [H_FRAMECOUNTER], a
- ret
-
-WaitForTextScrollButtonPress::
- ld a, [H_DOWNARROWBLINKCNT1]
- push af
- ld a, [H_DOWNARROWBLINKCNT2]
- push af
- xor a
- ld [H_DOWNARROWBLINKCNT1], a
- ld a, $6
- ld [H_DOWNARROWBLINKCNT2], a
-.loop
- push hl
- ld a, [wTownMapSpriteBlinkingEnabled]
- and a
- jr z, .skipAnimation
- push de
- push bc
- callab TownMapSpriteBlinkingAnimation
- pop bc
- pop de
-.skipAnimation
- coord hl, 18, 16
- call HandleDownArrowBlinkTiming
- pop hl
- call JoypadLowSensitivity
- predef CableClub_Run
- ld a, [hJoy5]
- and A_BUTTON | B_BUTTON
- jr z, .loop
- pop af
- ld [H_DOWNARROWBLINKCNT2], a
- pop af
- ld [H_DOWNARROWBLINKCNT1], a
- ret
-
-; (unless in link battle) waits for A or B being pressed and outputs the scrolling sound effect
-ManualTextScroll::
- ld a, [wLinkState]
- cp LINK_STATE_BATTLING
- jr z, .inLinkBattle
- call WaitForTextScrollButtonPress
- call WaitForSoundToFinish
- ld a, SFX_PRESS_AB
- jp PlaySound
-.inLinkBattle
- ld c, 65
- jp DelayFrames
-
-; function to do multiplication
-; all values are big endian
-; INPUT
-; FF96-FF98 = multiplicand
-; FF99 = multiplier
-; OUTPUT
-; FF95-FF98 = product
-Multiply::
- push hl
- push bc
- callab _Multiply
- pop bc
- pop hl
- ret
-
-; function to do division
-; all values are big endian
-; INPUT
-; FF95-FF98 = dividend
-; FF99 = divisor
-; b = number of bytes in the dividend (starting from FF95)
-; OUTPUT
-; FF95-FF98 = quotient
-; FF99 = remainder
-Divide::
- push hl
- push de
- push bc
- homecall _Divide
- pop bc
- pop de
- pop hl
- ret
-
-; This function is used to wait a short period after printing a letter to the
-; screen unless the player presses the A/B button or the delay is turned off
-; through the [wd730] or [wLetterPrintingDelayFlags] flags.
-PrintLetterDelay::
- ld a, [wd730]
- bit 6, a
- ret nz
- ld a, [wLetterPrintingDelayFlags]
- bit 1, a
- ret z
- push hl
- push de
- push bc
- ld a, [wLetterPrintingDelayFlags]
- bit 0, a
- jr z, .waitOneFrame
- ld a, [wOptions]
- and $f
- ld [H_FRAMECOUNTER], a
- jr .checkButtons
-.waitOneFrame
- ld a, 1
- ld [H_FRAMECOUNTER], a
-.checkButtons
- call Joypad
- ld a, [hJoyHeld]
-.checkAButton
- bit 0, a ; is the A button pressed?
- jr z, .checkBButton
- jr .endWait
-.checkBButton
- bit 1, a ; is the B button pressed?
- jr z, .buttonsNotPressed
-.endWait
- call DelayFrame
- jr .done
-.buttonsNotPressed ; if neither A nor B is pressed
- ld a, [H_FRAMECOUNTER]
- and a
- jr nz, .checkButtons
-.done
- pop bc
- pop de
- pop hl
- ret
-
-; Copies [hl, bc) to [de, bc - hl).
-; In other words, the source data is from hl up to but not including bc,
-; and the destination is de.
-CopyDataUntil::
- ld a, [hli]
- ld [de], a
- inc de
- ld a, h
- cp b
- jr nz, CopyDataUntil
- ld a, l
- cp c
- jr nz, CopyDataUntil
- ret
-
-; Function to remove a pokemon from the party or the current box.
-; wWhichPokemon determines the pokemon.
-; [wRemoveMonFromBox] == 0 specifies the party.
-; [wRemoveMonFromBox] != 0 specifies the current box.
-RemovePokemon::
- jpab _RemovePokemon
-
-AddPartyMon::
- push hl
- push de
- push bc
- callba _AddPartyMon
- pop bc
- pop de
- pop hl
- ret
-
-; calculates all 5 stats of current mon and writes them to [de]
-CalcStats::
- ld c, $0
-.statsLoop
- inc c
- call CalcStat
- ld a, [H_MULTIPLICAND + 1]
- ld [de], a
- inc de
- ld a, [H_MULTIPLICAND + 2]
- ld [de], a
- inc de
- ld a, c
- cp NUM_STATS
- jr nz, .statsLoop
- ret
-
-; calculates stat c of current mon
-; c: stat to calc (HP=1, Atk=2, Def=3, Spd=4, Spc=5)
-; b: consider stat exp?
-; hl: base ptr to stat exp values ([hl + 2*c - 1] and [hl + 2*c])
-CalcStat::
- push hl
- push de
- push bc
- ld a, b
- ld d, a
- push hl
- ld hl, wMonHeader
- ld b, $0
- add hl, bc
- ld a, [hl] ; read base value of stat
- ld e, a
- pop hl
- push hl
- sla c
- ld a, d
- and a
- jr z, .statExpDone ; consider stat exp?
- add hl, bc ; skip to corresponding stat exp value
-.statExpLoop ; calculates ceil(Sqrt(stat exp)) in b
- xor a
- ld [H_MULTIPLICAND], a
- ld [H_MULTIPLICAND + 1], a
- inc b ; increment current stat exp bonus
- ld a, b
- cp $ff
- jr z, .statExpDone
- ld [H_MULTIPLICAND + 2], a
- ld [H_MULTIPLIER], a
- call Multiply
- ld a, [hld]
- ld d, a
- ld a, [$ff98]
- sub d
- ld a, [hli]
- ld d, a
- ld a, [$ff97]
- sbc d ; test if (current stat exp bonus)^2 < stat exp
- jr c, .statExpLoop
-.statExpDone
- srl c
- pop hl
- push bc
- ld bc, wPartyMon1DVs - (wPartyMon1HPExp - 1) ; also wEnemyMonDVs - wEnemyMonHP
- add hl, bc
- pop bc
- ld a, c
- cp $2
- jr z, .getAttackIV
- cp $3
- jr z, .getDefenseIV
- cp $4
- jr z, .getSpeedIV
- cp $5
- jr z, .getSpecialIV
-.getHpIV
- push bc
- ld a, [hl] ; Atk IV
- swap a
- and $1
- sla a
- sla a
- sla a
- ld b, a
- ld a, [hli] ; Def IV
- and $1
- sla a
- sla a
- add b
- ld b, a
- ld a, [hl] ; Spd IV
- swap a
- and $1
- sla a
- add b
- ld b, a
- ld a, [hl] ; Spc IV
- and $1
- add b ; HP IV: LSB of the other 4 IVs
- pop bc
- jr .calcStatFromIV
-.getAttackIV
- ld a, [hl]
- swap a
- and $f
- jr .calcStatFromIV
-.getDefenseIV
- ld a, [hl]
- and $f
- jr .calcStatFromIV
-.getSpeedIV
- inc hl
- ld a, [hl]
- swap a
- and $f
- jr .calcStatFromIV
-.getSpecialIV
- inc hl
- ld a, [hl]
- and $f
-.calcStatFromIV
- ld d, $0
- add e
- ld e, a
- jr nc, .noCarry
- inc d ; de = Base + IV
-.noCarry
- sla e
- rl d ; de = (Base + IV) * 2
- srl b
- srl b ; b = ceil(Sqrt(stat exp)) / 4
- ld a, b
- add e
- jr nc, .noCarry2
- inc d ; de = (Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4
-.noCarry2
- ld [H_MULTIPLICAND + 2], a
- ld a, d
- ld [H_MULTIPLICAND + 1], a
- xor a
- ld [H_MULTIPLICAND], a
- ld a, [wCurEnemyLVL]
- ld [H_MULTIPLIER], a
- call Multiply ; ((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level
- ld a, [H_MULTIPLICAND]
- ld [H_DIVIDEND], a
- ld a, [H_MULTIPLICAND + 1]
- ld [H_DIVIDEND + 1], a
- ld a, [H_MULTIPLICAND + 2]
- ld [H_DIVIDEND + 2], a
- ld a, $64
- ld [H_DIVISOR], a
- ld a, $3
- ld b, a
- call Divide ; (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100
- ld a, c
- cp $1
- ld a, 5 ; + 5 for non-HP stat
- jr nz, .notHPStat
- ld a, [wCurEnemyLVL]
- ld b, a
- ld a, [H_MULTIPLICAND + 2]
- add b
- ld [H_MULTIPLICAND + 2], a
- jr nc, .noCarry3
- ld a, [H_MULTIPLICAND + 1]
- inc a
- ld [H_MULTIPLICAND + 1], a ; HP: (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 + Level
-.noCarry3
- ld a, 10 ; + 10 for HP stat
-.notHPStat
- ld b, a
- ld a, [H_MULTIPLICAND + 2]
- add b
- ld [H_MULTIPLICAND + 2], a
- jr nc, .noCarry4
- ld a, [H_MULTIPLICAND + 1]
- inc a ; non-HP: (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 + 5
- ld [H_MULTIPLICAND + 1], a ; HP: (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 + Level + 10
-.noCarry4
- ld a, [H_MULTIPLICAND + 1] ; check for overflow (>999)
- cp 999 / $100 + 1
- jr nc, .overflow
- cp 999 / $100
- jr c, .noOverflow
- ld a, [H_MULTIPLICAND + 2]
- cp 999 % $100 + 1
- jr c, .noOverflow
-.overflow
- ld a, 999 / $100 ; overflow: cap at 999
- ld [H_MULTIPLICAND + 1], a
- ld a, 999 % $100
- ld [H_MULTIPLICAND + 2], a
-.noOverflow
- pop bc
- pop de
- pop hl
- ret
-
-AddEnemyMonToPlayerParty::
- homecall_sf _AddEnemyMonToPlayerParty
- ret
-
-MoveMon::
- homecall_sf _MoveMon
- ret
-
-; 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::
- and a
- ret z
- ld bc, NAME_LENGTH
-.skipLoop
- add hl, bc
- dec a
- jr nz, .skipLoop
- ret
-
-AddNTimes::
-; add bc to hl a times
- and a
- ret z
-.loop
- add hl, bc
- dec a
- jr nz, .loop
- ret
-
-; Compare strings, c bytes in length, at de and hl.
-; Often used to compare big endian numbers in battle calculations.
-StringCmp::
- ld a, [de]
- cp [hl]
- ret nz
- inc de
- inc hl
- dec c
- jr nz, StringCmp
- ret
-
-; INPUT:
-; a = oam block index (each block is 4 oam entries)
-; b = Y coordinate of upper left corner of sprite
-; c = X coordinate of upper left corner of sprite
-; de = base address of 4 tile number and attribute pairs
-WriteOAMBlock::
- ld h, wOAMBuffer / $100
- swap a ; multiply by 16
- ld l, a
- call .writeOneEntry ; upper left
- push bc
- ld a, 8
- add c
- ld c, a
- call .writeOneEntry ; upper right
- pop bc
- ld a, 8
- add b
- ld b, a
- call .writeOneEntry ; lower left
- ld a, 8
- add c
- ld c, a
- ; lower right
-.writeOneEntry
- ld [hl], b ; Y coordinate
- inc hl
- ld [hl], c ; X coordinate
- inc hl
- ld a, [de] ; tile number
- inc de
- ld [hli], a
- ld a, [de] ; attribute
- inc de
- ld [hli], a
- ret
-
-HandleMenuInput::
- xor a
- ld [wPartyMenuAnimMonEnabled], a
-
-HandleMenuInputPokemonSelection::
- ld a, [H_DOWNARROWBLINKCNT1]
- push af
- ld a, [H_DOWNARROWBLINKCNT2]
- push af ; save existing values on stack
- xor a
- ld [H_DOWNARROWBLINKCNT1], a ; blinking down arrow timing value 1
- ld a, 6
- ld [H_DOWNARROWBLINKCNT2], a ; blinking down arrow timing value 2
-.loop1
- xor a
- ld [wAnimCounter], a ; counter for pokemon shaking animation
- call PlaceMenuCursor
- call Delay3
-.loop2
- push hl
- ld a, [wPartyMenuAnimMonEnabled]
- and a ; is it a pokemon selection menu?
- jr z, .getJoypadState
- callba AnimatePartyMon ; shake mini sprite of selected pokemon
-.getJoypadState
- pop hl
- call JoypadLowSensitivity
- ld a, [hJoy5]
- and a ; was a key pressed?
- jr nz, .keyPressed
- push hl
- coord hl, 18, 11 ; coordinates of blinking down arrow in some menus
- call HandleDownArrowBlinkTiming ; blink down arrow (if any)
- pop hl
- ld a, [wMenuJoypadPollCount]
- dec a
- jr z, .giveUpWaiting
- jr .loop2
-.giveUpWaiting
-; if a key wasn't pressed within the specified number of checks
- pop af
- ld [H_DOWNARROWBLINKCNT2], a
- pop af
- ld [H_DOWNARROWBLINKCNT1], a ; restore previous values
- xor a
- ld [wMenuWrappingEnabled], a ; disable menu wrapping
- ret
-.keyPressed
- xor a
- ld [wCheckFor180DegreeTurn], a
- ld a, [hJoy5]
- ld b, a
- bit 0, a ; pressed A key?
- jr nz, .checkOtherKeys
- bit 6, a ; pressed Up key?
- jr z, .checkIfDownPressed
-.upPressed
- ld a, [wCurrentMenuItem] ; selected menu item
- and a ; already at the top of the menu?
- jr z, .alreadyAtTop
-.notAtTop
- dec a
- ld [wCurrentMenuItem], a ; move selected menu item up one space
- jr .checkOtherKeys
-.alreadyAtTop
- ld a, [wMenuWrappingEnabled]
- and a ; is wrapping around enabled?
- jr z, .noWrappingAround
- ld a, [wMaxMenuItem]
- ld [wCurrentMenuItem], a ; wrap to the bottom of the menu
- jr .checkOtherKeys
-.checkIfDownPressed
- bit 7, a
- jr z, .checkOtherKeys
-.downPressed
- ld a, [wCurrentMenuItem]
- inc a
- ld c, a
- ld a, [wMaxMenuItem]
- cp c
- jr nc, .notAtBottom
-.alreadyAtBottom
- ld a, [wMenuWrappingEnabled]
- and a ; is wrapping around enabled?
- jr z, .noWrappingAround
- ld c, $00 ; wrap from bottom to top
-.notAtBottom
- ld a, c
- ld [wCurrentMenuItem], a
-.checkOtherKeys
- ld a, [wMenuWatchedKeys]
- and b ; does the menu care about any of the pressed keys?
- jp z, .loop1
-.checkIfAButtonOrBButtonPressed
- ld a, [hJoy5]
- and A_BUTTON | B_BUTTON
- jr z, .skipPlayingSound
-.AButtonOrBButtonPressed
- push hl
- ld hl, wFlags_0xcd60
- bit 5, [hl]
- pop hl
- jr nz, .skipPlayingSound
- ld a, SFX_PRESS_AB
- call PlaySound
-.skipPlayingSound
- pop af
- ld [H_DOWNARROWBLINKCNT2], a
- pop af
- ld [H_DOWNARROWBLINKCNT1], a ; restore previous values
- xor a
- ld [wMenuWrappingEnabled], a ; disable menu wrapping
- ld a, [hJoy5]
- ret
-.noWrappingAround
- ld a, [wMenuWatchMovingOutOfBounds]
- and a ; should we return if the user tried to go past the top or bottom?
- jr z, .checkOtherKeys
- jr .checkIfAButtonOrBButtonPressed
-
-PlaceMenuCursor::
- ld a, [wTopMenuItemY]
- and a ; is the y coordinate 0?
- jr z, .adjustForXCoord
- coord hl, 0, 0
- ld bc, SCREEN_WIDTH
-.topMenuItemLoop
- add hl, bc
- dec a
- jr nz, .topMenuItemLoop
-.adjustForXCoord
- ld a, [wTopMenuItemX]
- ld b, 0
- ld c, a
- add hl, bc
- push hl
- ld a, [wLastMenuItem]
- and a ; was the previous menu id 0?
- jr z, .checkForArrow1
- ld bc, 40
- push af
- ld a, [hFlags_0xFFFA]
- bit 1, a ; is the menu double spaced?
- jr z, .doubleSpaced1
- ld bc, 20
-.doubleSpaced1
- pop af
-.oldMenuItemLoop
- add hl, bc
- dec a
- jr nz, .oldMenuItemLoop
-.checkForArrow1
- ld a, [hl]
- cp "▶" ; was an arrow next to the previously selected menu item?
- jr nz, .skipClearingArrow
-.clearArrow
- ld a, [wTileBehindCursor]
- ld [hl], a
-.skipClearingArrow
- pop hl
- ld a, [wCurrentMenuItem]
- and a
- jr z, .checkForArrow2
- ld bc, 40
- push af
- ld a, [hFlags_0xFFFA]
- bit 1, a ; is the menu double spaced?
- jr z, .doubleSpaced2
- ld bc, 20
-.doubleSpaced2
- pop af
-.currentMenuItemLoop
- add hl, bc
- dec a
- jr nz, .currentMenuItemLoop
-.checkForArrow2
- ld a, [hl]
- cp "▶" ; has the right arrow already been placed?
- jr z, .skipSavingTile ; if so, don't lose the saved tile
- ld [wTileBehindCursor], a ; save tile before overwriting with right arrow
-.skipSavingTile
- ld a, "▶" ; place right arrow
- ld [hl], a
- ld a, l
- ld [wMenuCursorLocation], a
- ld a, h
- ld [wMenuCursorLocation + 1], a
- ld a, [wCurrentMenuItem]
- ld [wLastMenuItem], a
- ret
-
-; This is used to mark a menu cursor other than the one currently being
-; manipulated. In the case of submenus, this is used to show the location of
-; the menu cursor in the parent menu. In the case of swapping items in list,
-; this is used to mark the item that was first chosen to be swapped.
-PlaceUnfilledArrowMenuCursor::
- ld b, a
- ld a, [wMenuCursorLocation]
- ld l, a
- ld a, [wMenuCursorLocation + 1]
- ld h, a
- ld [hl], $ec ; outline of right arrow
- ld a, b
- ret
-
-; Replaces the menu cursor with a blank space.
-EraseMenuCursor::
- ld a, [wMenuCursorLocation]
- ld l, a
- ld a, [wMenuCursorLocation + 1]
- ld h, a
- ld [hl], " "
- ret
-
-; This toggles a blinking down arrow at hl on and off after a delay has passed.
-; This is often called even when no blinking is occurring.
-; The reason is that most functions that call this initialize H_DOWNARROWBLINKCNT1 to 0.
-; The effect is that if the tile at hl is initialized with a down arrow,
-; this function will toggle that down arrow on and off, but if the tile isn't
-; initialized with a down arrow, this function does nothing.
-; That allows this to be called without worrying about if a down arrow should
-; be blinking.
-HandleDownArrowBlinkTiming::
- ld a, [hl]
- ld b, a
- ld a, "▼"
- cp b
- jr nz, .downArrowOff
-.downArrowOn
- ld a, [H_DOWNARROWBLINKCNT1]
- dec a
- ld [H_DOWNARROWBLINKCNT1], a
- ret nz
- ld a, [H_DOWNARROWBLINKCNT2]
- dec a
- ld [H_DOWNARROWBLINKCNT2], a
- ret nz
- ld a, " "
- ld [hl], a
- ld a, $ff
- ld [H_DOWNARROWBLINKCNT1], a
- ld a, $06
- ld [H_DOWNARROWBLINKCNT2], a
- ret
-.downArrowOff
- ld a, [H_DOWNARROWBLINKCNT1]
- and a
- ret z
- dec a
- ld [H_DOWNARROWBLINKCNT1], a
- ret nz
- dec a
- ld [H_DOWNARROWBLINKCNT1], a
- ld a, [H_DOWNARROWBLINKCNT2]
- dec a
- ld [H_DOWNARROWBLINKCNT2], a
- ret nz
- ld a, $06
- ld [H_DOWNARROWBLINKCNT2], a
- ld a, "▼"
- ld [hl], a
- ret
-
-; The following code either enables or disables the automatic drawing of
-; text boxes by DisplayTextID. Both functions cause DisplayTextID to wait
-; for a button press after displaying text (unless [wEnteringCableClub] is set).
-
-EnableAutoTextBoxDrawing::
- xor a
- jr AutoTextBoxDrawingCommon
-
-DisableAutoTextBoxDrawing::
- ld a, $01
-
-AutoTextBoxDrawingCommon::
- ld [wAutoTextBoxDrawingControl], a
- xor a
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a ; make DisplayTextID wait for button press
- ret
-
-PrintText::
-; Print text hl at (1, 14).
- push hl
- ld a, MESSAGE_BOX
- ld [wTextBoxID], a
- call DisplayTextBoxID
- call UpdateSprites
- call Delay3
- pop hl
-PrintText_NoCreatingTextBox::
- coord bc, 1, 14
- jp TextCommandProcessor
+INCLUDE "home/npc_movement.asm"
+INCLUDE "home/trainers.asm"
+INCLUDE "home/map_objects.asm"
+INCLUDE "home/trainers2.asm"
+INCLUDE "home/money.asm"
+INCLUDE "home/bankswitch.asm"
+INCLUDE "home/yes_no.asm"
+INCLUDE "home/pathfinding.asm"
+INCLUDE "home/load_font.asm"
+INCLUDE "home/tilemap.asm"
+INCLUDE "home/delay.asm"
+INCLUDE "home/names2.asm"
+INCLUDE "home/item_price.asm"
+INCLUDE "home/copy_string.asm"
+INCLUDE "home/joypad2.asm"
+INCLUDE "home/math.asm"
+INCLUDE "home/print_text.asm"
+INCLUDE "home/move_mon.asm"
+INCLUDE "home/array.asm"
+INCLUDE "home/compare.asm"
+INCLUDE "home/oam.asm"
+INCLUDE "home/window.asm"
FarPrintText::
; print text b:hl at (1, 14)
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, b
call BankswitchCommon
@@ -4355,421 +229,34 @@ FarPrintText::
call BankswitchCommon
ret
-PrintNumber::
-; Print the c-digit, b-byte value at de.
-; Allows 2 to 7 digits. For 1-digit numbers, add
-; the value to char "0" instead of calling PrintNumber.
-; Flags LEADING_ZEROES and LEFT_ALIGN can be given
-; in bits 7 and 6 of b respectively.
- push bc
- xor a
- ld [H_PASTLEADINGZEROES], a
- ld [H_NUMTOPRINT], a
- ld [H_NUMTOPRINT + 1], a
- ld a, b
- and $f
- cp 1
- jr z, .byte
- cp 2
- jr z, .word
-.long
- ld a, [de]
- ld [H_NUMTOPRINT], a
- inc de
- ld a, [de]
- ld [H_NUMTOPRINT + 1], a
- inc de
- ld a, [de]
- ld [H_NUMTOPRINT + 2], a
- jr .start
-
-.word
- ld a, [de]
- ld [H_NUMTOPRINT + 1], a
- inc de
- ld a, [de]
- ld [H_NUMTOPRINT + 2], a
- jr .start
-
-.byte
- ld a, [de]
- ld [H_NUMTOPRINT + 2], a
-
-.start
- push de
-
- ld d, b
- ld a, c
- ld b, a
- xor a
- ld c, a
- ld a, b
-
- cp 2
- jr z, .tens
- cp 3
- jr z, .hundreds
- cp 4
- jr z, .thousands
- cp 5
- jr z, .ten_thousands
- cp 6
- jr z, .hundred_thousands
-
-print_digit: macro
-
-if (\1) / $10000
- ld a, \1 / $10000 % $100
-else xor a
-endc
- ld [H_POWEROFTEN + 0], a
-
-if (\1) / $100
- ld a, \1 / $100 % $100
-else xor a
-endc
- ld [H_POWEROFTEN + 1], a
-
- ld a, \1 / $1 % $100
- ld [H_POWEROFTEN + 2], a
-
- call .PrintDigit
- call .NextDigit
-endm
-
-.millions print_digit 1000000
-.hundred_thousands print_digit 100000
-.ten_thousands print_digit 10000
-.thousands print_digit 1000
-.hundreds print_digit 100
-
-.tens
- ld c, 0
- ld a, [H_NUMTOPRINT + 2]
-.mod
- cp 10
- jr c, .ok
- sub 10
- inc c
- jr .mod
-.ok
-
- ld b, a
- ld a, [H_PASTLEADINGZEROES]
- or c
- ld [H_PASTLEADINGZEROES], a
- jr nz, .past
- call .PrintLeadingZero
- jr .next
-.past
- ld a, "0"
- add c
- ld [hl], a
-.next
-
- call .NextDigit
-.ones
- ld a, "0"
- add b
- ld [hli], a
- pop de
- dec de
- pop bc
- ret
-
-.PrintDigit:
-; Divide by the current decimal place.
-; Print the quotient, and keep the modulus.
- ld c, 0
-.loop
- ld a, [H_POWEROFTEN]
- ld b, a
- ld a, [H_NUMTOPRINT]
- ld [H_SAVEDNUMTOPRINT], a
- cp b
- jr c, .underflow0
- sub b
- ld [H_NUMTOPRINT], a
- ld a, [H_POWEROFTEN + 1]
- ld b, a
- ld a, [H_NUMTOPRINT + 1]
- ld [H_SAVEDNUMTOPRINT + 1], a
- cp b
- jr nc, .noborrow1
-
- ld a, [H_NUMTOPRINT]
- or 0
- jr z, .underflow1
- dec a
- ld [H_NUMTOPRINT], a
- ld a, [H_NUMTOPRINT + 1]
-.noborrow1
-
- sub b
- ld [H_NUMTOPRINT + 1], a
- ld a, [H_POWEROFTEN + 2]
- ld b, a
- ld a, [H_NUMTOPRINT + 2]
- ld [H_SAVEDNUMTOPRINT + 2], a
- cp b
- jr nc, .noborrow2
-
- ld a, [H_NUMTOPRINT + 1]
- and a
- jr nz, .borrowed
-
- ld a, [H_NUMTOPRINT]
- and a
- jr z, .underflow2
- dec a
- ld [H_NUMTOPRINT], a
- xor a
-.borrowed
-
- dec a
- ld [H_NUMTOPRINT + 1], a
- ld a, [H_NUMTOPRINT + 2]
-.noborrow2
- sub b
- ld [H_NUMTOPRINT + 2], a
- inc c
- jr .loop
-
-.underflow2
- ld a, [H_SAVEDNUMTOPRINT + 1]
- ld [H_NUMTOPRINT + 1], a
-.underflow1
- ld a, [H_SAVEDNUMTOPRINT]
- ld [H_NUMTOPRINT], a
-.underflow0
- ld a, [H_PASTLEADINGZEROES]
- or c
- jr z, .PrintLeadingZero
-
- ld a, "0"
- add c
- ld [hl], a
- ld [H_PASTLEADINGZEROES], a
- ret
-
-.PrintLeadingZero:
- bit BIT_LEADING_ZEROES, d
- ret z
- ld [hl], "0"
- ret
-
-.NextDigit:
-; Increment unless the number is left-aligned,
-; leading zeroes are not printed, and no digits
-; have been printed yet.
- bit BIT_LEADING_ZEROES, d
- jr nz, .inc
- bit BIT_LEFT_ALIGN, d
- jr z, .inc
- ld a, [H_PASTLEADINGZEROES]
- and a
- ret z
-.inc
- inc hl
- ret
-
-
-CallFunctionInTable::
-; Call function a in jumptable hl.
-; de is not preserved.
- push hl
- push de
- push bc
- add a
- ld d, 0
- ld e, a
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, .returnAddress
- push de
- jp hl
-.returnAddress
- pop bc
- pop de
- pop hl
- ret
-
-
-IsInArray::
-; Search an array at hl for the value in a.
-; Entry size is de bytes.
-; Return count b and carry if found.
- ld b, 0
-
-IsInRestOfArray::
- ld c, a
-.loop
- ld a, [hl]
- cp -1
- jr z, .notfound
- cp c
- jr z, .found
- inc b
- add hl, de
- jr .loop
-
-.notfound
- and a
- ret
-
-.found
- scf
- ret
+INCLUDE "home/print_num.asm"
+INCLUDE "home/array2.asm"
InitMapSprites::
- jpab _InitMapSprites
-
-RestoreScreenTilesAndReloadTilePatterns::
- call ClearSprites
- ld a, $1
- ld [wUpdateSpritesEnabled], a
- call ReloadMapSpriteTilePatterns
- call LoadScreenTilesFromBuffer2
- call LoadTextBoxTilePatterns
- call RunDefaultPaletteCommand
- jr Delay3
-
-
-GBPalWhiteOutWithDelay3::
- call GBPalWhiteOut
-
-Delay3::
-; The bg map is updated each frame in thirds.
-; Wait three frames to let the bg map fully update.
- ld c, 3
- jp DelayFrames
-
-GBPalNormal::
-; Reset BGP and OBP0.
- ld a, %11100100 ; 3210
- ld [rBGP], a
- ld a, %11010000 ; 3100
- ld [rOBP0], a
- call UpdateGBCPal_BGP
- call UpdateGBCPal_OBP0
- call UpdateGBCPal_OBP1
- ret
-
-GBPalWhiteOut::
-; White out all palettes.
- xor a
- ld [rBGP], a
- ld [rOBP0], a
- ld [rOBP1], a
- call UpdateGBCPal_BGP
- call UpdateGBCPal_OBP0
- call UpdateGBCPal_OBP1
- ret
-
-
-RunDefaultPaletteCommand::
- ld b, $ff
-RunPaletteCommand::
- ld a, [wOnSGB]
- and a
- ret z
- predef_jump _RunPaletteCommand
-
-GetHealthBarColor::
-; Return at hl the palette of
-; an HP bar e pixels long.
- ld a, e
- cp 27
- ld d, 0 ; green
- jr nc, .gotColor
- cp 10
- inc d ; yellow
- jr nc, .gotColor
- inc d ; red
-.gotColor
- ld [hl], d
- ret
-
-; Copy the current map's sprites' tile patterns to VRAM again after they have
-; been overwritten by other tile patterns.
-ReloadMapSpriteTilePatterns::
- ld hl, wFontLoaded
- ld a, [hl]
- push af
- res 0, [hl]
- push hl
- xor a
- ld [wSpriteSetID], a
- call DisableLCD
- call InitMapSprites
- call EnableLCD
- pop hl
- pop af
- ld [hl], a
- call LoadPlayerSpriteGraphics
- call LoadFontTilePatterns
- jp UpdateSprites
+ jpfar _InitMapSprites
-
-GiveItem::
-; Give player quantity c of item b,
-; and copy the item's name to wcf4b.
-; Return carry on success.
- ld a, b
- ld [wd11e], a
- ld [wcf91], a
- ld a, c
- ld [wItemQuantity], a
- ld hl, wNumBagItems
- call AddItemToInventory
- ret nc
- call GetItemName
- call CopyStringToCF4B
- scf
- ret
-
-GivePokemon::
-; Give the player monster b at level c.
- ld a, b
- ld [wcf91], a
- ld a, c
- ld [wCurEnemyLVL], a
- xor a ; PLAYER_PARTY_DATA
- ld [wMonDataLocation], a
- jpba _GivePokemon
-
-Random::
-; Return a random number in a.
-; For battles, use BattleRandom.
- push hl
- push de
- push bc
- callba Random_
- ld a, [hRandomAdd]
- pop bc
- pop de
- pop hl
- ret
+INCLUDE "home/palettes.asm"
+INCLUDE "home/reload_sprites.asm"
+INCLUDE "home/give.asm"
+INCLUDE "home/random.asm"
BankswitchCommon::
- ld [H_LOADEDROMBANK], a
+ ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
ret
Bankswitch::
; self-contained bankswitch, use this when not in the home bank
; switches to the bank in b
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, b
- ld [H_LOADEDROMBANK], a
+ ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
call JumpToAddress
pop bc
ld a, b
- ld [H_LOADEDROMBANK], a
+ ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
ret
JumpToAddress::
@@ -4794,139 +281,5 @@ PrepareRTCDataAndDisableSRAM::
ret
INCLUDE "home/predef.asm"
-
-UpdateCinnabarGymGateTileBlocks::
- callba UpdateCinnabarGymGateTileBlocks_
- ret ; again?
- ;jp Bankswitch
-
-CheckForHiddenObjectOrBookshelfOrCardKeyDoor::
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, [hJoyHeld]
- bit 0, a ; A button
- jr z, .nothingFound
-; A button is pressed
- callbs CheckForHiddenObject
- ld a, [$ffee]
- and a
- jr nz, .hiddenObjectNotFound
- xor a
- ld [$ffeb], a
- ld a, [wHiddenObjectFunctionRomBank]
- call BankswitchCommon
- call JumpToAddress
- ld a, [$ffeb]
- jr .done
-.hiddenObjectNotFound
- predef GetTileAndCoordsInFrontOfPlayer
- callba PrintBookshelfText
- ld a, [$ffdb]
- and a
- jr z, .done
-.nothingFound
- ld a, $ff
-.done
- ld [$ffeb], a
- pop af
- call BankswitchCommon
- ret
-
-PrintPredefTextID::
- ld [hSpriteIndexOrTextID], a
- ld hl, TextPredefs
- call SetMapTextPointer
- ld hl, wTextPredefFlag
- set 0, [hl]
- call DisplayTextID
-
-RestoreMapTextPointer::
- ld hl, wMapTextPtr
- ld a, [$ffec]
- ld [hli], a
- ld a, [$ffec + 1]
- ld [hl], a
- ret
-
-SetMapTextPointer::
- ld a, [wMapTextPtr]
- ld [$ffec], a
- ld a, [wMapTextPtr + 1]
- ld [$ffec + 1], a
- ld a, l
- ld [wMapTextPtr], a
- ld a, h
- ld [wMapTextPtr + 1], a
- ret
-
-TextPredefs::
-const_value = 1
-
- add_tx_pre CardKeySuccessText ; 01
- add_tx_pre CardKeyFailText ; 02
- add_tx_pre RedBedroomPCText ; 03
- add_tx_pre RedBedroomSNESText ; 04
- add_tx_pre PushStartText ; 05
- add_tx_pre SaveOptionText ; 06
- add_tx_pre StrengthsAndWeaknessesText ; 07
- add_tx_pre OakLabEmailText ; 08
- add_tx_pre AerodactylFossilText ; 09
- add_tx_pre Route15UpstairsBinocularsText ; 0A
- add_tx_pre KabutopsFossilText ; 0B
- add_tx_pre FanClubPicture1Text ; 0C
- add_tx_pre FanClubPicture2Text ; 0D
- add_tx_pre GymStatueText1 ; 0E
- add_tx_pre GymStatueText2 ; 0F
- add_tx_pre BookcaseText ; 10
- add_tx_pre ViridianCityPokecenterBenchGuyText ; 11
- add_tx_pre PewterCityPokecenterBenchGuyText ; 12
- add_tx_pre CeruleanCityPokecenterBenchGuyText ; 13
- add_tx_pre LavenderCityPokecenterBenchGuyText ; 14
- add_tx_pre VermilionCityPokecenterBenchGuyText ; 15
- add_tx_pre CeladonCityPokecenterBenchGuyText ; 16
- add_tx_pre CeladonCityHotelText ; 17
- add_tx_pre FuchsiaCityPokecenterBenchGuyText ; 18
- add_tx_pre CinnabarIslandPokecenterBenchGuyText ; 19
- add_tx_pre SaffronCityPokecenterBenchGuyText ; 1A
- add_tx_pre MtMoonPokecenterBenchGuyText ; 1B
- add_tx_pre RockTunnelPokecenterBenchGuyText ; 1C
- add_tx_pre UnusedBenchGuyText1 ; 1D
- add_tx_pre UnusedBenchGuyText2 ; 1E
- add_tx_pre UnusedBenchGuyText3 ; 1F
- add_tx_pre UnusedPredefText ; 20
- add_tx_pre PokemonCenterPCText ; 21
- add_tx_pre ViridianSchoolNotebook ; 22
- add_tx_pre ViridianSchoolBlackboard ; 23
- add_tx_pre JustAMomentText ; 24
- add_tx_pre OpenBillsPCText ; 25
- add_tx_pre FoundHiddenItemText ; 26
- add_tx_pre HiddenItemBagFullText ; 27
- add_tx_pre VermilionGymTrashText ; 28
- add_tx_pre IndigoPlateauHQText ; 29
- add_tx_pre GameCornerOutOfOrderText ; 2A
- add_tx_pre GameCornerOutToLunchText ; 2B
- add_tx_pre GameCornerSomeonesKeysText ; 2C
- add_tx_pre FoundHiddenCoinsText ; 2D
- add_tx_pre DroppedHiddenCoinsText ; 2E
- add_tx_pre BillsHouseMonitorText ; 2F
- add_tx_pre BillsHouseInitiatedText ; 30
- add_tx_pre BillsHousePokemonList ; 31
- add_tx_pre MagazinesText ; 32
- add_tx_pre CinnabarGymQuiz ; 33
- add_tx_pre GameCornerNoCoinsText ; 34
- add_tx_pre GameCornerCoinCaseText ; 35
- add_tx_pre LinkCableHelp ; 36
- add_tx_pre TMNotebook ; 37
- add_tx_pre FightingDojoText ; 38
- add_tx_pre EnemiesOnEverySideText ; 39
- add_tx_pre WhatGoesAroundComesAroundText ; 3A
- add_tx_pre NewBicycleText ; 3B
- add_tx_pre IndigoPlateauStatues ; 3C XXX unused
- add_tx_pre VermilionGymTrashSuccessText1 ; 3D
- add_tx_pre VermilionGymTrashSuccessText2 ; 3E
- add_tx_pre VermilionGymTrashSuccessText3 ; 3F
- add_tx_pre VermilionGymTrashFailText ; 40
- add_tx_pre TownMapText ; 41
- add_tx_pre BookOrSculptureText ; 42
- add_tx_pre ElevatorText ; 43
- add_tx_pre PokemonStuffText ; 44
+INCLUDE "home/hidden_objects.asm"
+INCLUDE "home/predef_text.asm"
diff --git a/home/array.asm b/home/array.asm
new file mode 100644
index 00000000..256c58e1
--- /dev/null
+++ b/home/array.asm
@@ -0,0 +1,21 @@
+; 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::
+ and a
+ ret z
+ ld bc, NAME_LENGTH
+.skipLoop
+ add hl, bc
+ dec a
+ jr nz, .skipLoop
+ ret
+
+AddNTimes::
+; add bc to hl a times
+ and a
+ ret z
+.loop
+ add hl, bc
+ dec a
+ jr nz, .loop
+ ret
diff --git a/home/array2.asm b/home/array2.asm
new file mode 100644
index 00000000..f4ed8389
--- /dev/null
+++ b/home/array2.asm
@@ -0,0 +1,47 @@
+CallFunctionInTable::
+; Call function a in jumptable hl.
+; de is not preserved.
+ push hl
+ push de
+ push bc
+ add a
+ ld d, 0
+ ld e, a
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, .returnAddress
+ push de
+ jp hl
+.returnAddress
+ pop bc
+ pop de
+ pop hl
+ ret
+
+IsInArray::
+; Search an array at hl for the value in a.
+; Entry size is de bytes.
+; Return count b and carry if found.
+ ld b, 0
+
+IsInRestOfArray::
+ ld c, a
+.loop
+ ld a, [hl]
+ cp -1
+ jr z, .notfound
+ cp c
+ jr z, .found
+ inc b
+ add hl, de
+ jr .loop
+
+.notfound
+ and a
+ ret
+
+.found
+ scf
+ ret
diff --git a/home/audio.asm b/home/audio.asm
index fa7020ee..bf2537a7 100644
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -93,7 +93,7 @@ UpdateMusicCTimes::
.loop
push bc
push hl
- callba Audio1_UpdateMusic
+ farcall Audio1_UpdateMusic
pop hl
pop bc
dec c
@@ -144,11 +144,11 @@ Func_2223::
ld [wChannelSoundIDs + Ch6], a
ld [wChannelSoundIDs + Ch7], a
ld [wChannelSoundIDs + Ch8], a
- ld [rNR10], a
+ ldh [rNR10], a
ret
StopAllMusic::
- ld a, $FF
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
; plays music specified by a. If value is $ff, music is stopped
PlaySound::
@@ -200,7 +200,7 @@ PlaySound::
ret
GetNextMusicByte::
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, [wAudioROMBank]
call BankswitchCommon
@@ -256,7 +256,7 @@ StopAllAudio::
ret
DetermineAudioFunction::
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, [wAudioROMBank]
call BankswitchCommon
diff --git a/home/bankswitch.asm b/home/bankswitch.asm
new file mode 100644
index 00000000..3e85e955
--- /dev/null
+++ b/home/bankswitch.asm
@@ -0,0 +1,15 @@
+BankswitchHome::
+; switches to bank # in a
+; Only use this when in the home bank!
+ ld [wBankswitchHomeTemp], a
+ ldh a, [hLoadedROMBank]
+ ld [wBankswitchHomeSavedROMBank], a
+ ld a, [wBankswitchHomeTemp]
+ call BankswitchCommon
+ ret
+
+BankswitchBack::
+; returns from BankswitchHome
+ ld a, [wBankswitchHomeSavedROMBank]
+ call BankswitchCommon
+ ret
diff --git a/home/clear_sprites.asm b/home/clear_sprites.asm
new file mode 100644
index 00000000..34f4b4ec
--- /dev/null
+++ b/home/clear_sprites.asm
@@ -0,0 +1,21 @@
+ClearSprites::
+ xor a
+ ld hl, wOAMBuffer
+ ld b, 40 * 4
+.loop
+ ld [hli], a
+ dec b
+ jr nz, .loop
+ ret
+
+HideSprites::
+ ld a, 160
+ ld hl, wOAMBuffer
+ ld de, 4
+ ld b, 40
+.loop
+ ld [hl], a
+ add hl, de
+ dec b
+ jr nz, .loop
+ ret
diff --git a/home/compare.asm b/home/compare.asm
new file mode 100644
index 00000000..e2da7857
--- /dev/null
+++ b/home/compare.asm
@@ -0,0 +1,11 @@
+; Compare strings, c bytes in length, at de and hl.
+; Often used to compare big endian numbers in battle calculations.
+StringCmp::
+ ld a, [de]
+ cp [hl]
+ ret nz
+ inc de
+ inc hl
+ dec c
+ jr nz, StringCmp
+ ret
diff --git a/home/copy.asm b/home/copy.asm
index d2228405..b239d951 100644
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -1,7 +1,7 @@
FarCopyData::
; Copy bc bytes from a:hl to de.
ld [wFarCopyDataSavedROMBank], a
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, [wFarCopyDataSavedROMBank]
call BankswitchCommon
@@ -12,17 +12,17 @@ FarCopyData::
CopyData::
; Copy bc bytes from hl to de.
- ld a,b
+ ld a, b
and a
jr z, .copybytes
- ld a,c
+ ld a, c
and a ; is lower byte 0
jr z, .loop
inc b ; if not, increment b as there are <$100 bytes to copy
.loop
call .copybytes
dec b
- jr nz,.loop
+ jr nz, .loop
ret
.copybytes
@@ -34,41 +34,41 @@ CopyData::
ret
CopyVideoDataAlternate::
- ld a, [rLCDC]
- bit 7,a ; LCD enabled?
+ ldh a, [rLCDC]
+ bit 7, a ; LCD enabled?
jp nz, CopyVideoData ; if yes, then copy video data
push hl
- ld h,d
- ld l,e
+ ld h, d
+ ld l, e
pop de
- ld a,b ; save bank
+ ld a, b ; save bank
push af
swap c
- ld a,$f
+ ld a, $f
and c
- ld b,a
- ld a,$f0
+ ld b, a
+ ld a, $f0
and c
- ld c,a
+ ld c, a
pop af
jp FarCopyData
CopyVideoDataDoubleAlternate::
- ld a, [rLCDC]
- bit 7,a ; LCD enabled?
+ ldh a, [rLCDC]
+ bit 7, a ; LCD enabled?
jp nz, CopyVideoDataDouble ; if yes, then copy video data
push de
- ld d,h
- ld e,l
- ld a,b
+ ld d, h
+ ld e, l
+ ld a, b
push af ; save bank to switch to
- ld h,$0
- ld l,c
- add hl,hl ; get raw length of bytes to copy
- add hl,hl
- add hl,hl
- ld b,h
- ld c,l
+ ld h, $0
+ ld l, c
+ add hl, hl ; get raw length of bytes to copy
+ add hl, hl
+ add hl, hl
+ ld b, h
+ ld c, l
pop af
pop hl
jp FarCopyDataDouble
diff --git a/home/copy2.asm b/home/copy2.asm
index c14112bb..bff26570 100644
--- a/home/copy2.asm
+++ b/home/copy2.asm
@@ -2,7 +2,7 @@ FarCopyDataDouble::
; Expand bc bytes of 1bpp image data
; from a:de to 2bpp data at hl.
ld [wFarCopyDataSavedROMBank], a
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, [wFarCopyDataSavedROMBank]
call BankswitchCommon
@@ -38,26 +38,26 @@ CopyVideoData::
; tiles from b:de to hl, 8 tiles at a time.
; This takes c/8 frames.
- ld a, [H_AUTOBGTRANSFERENABLED]
+ ldh a, [hAutoBGTransferEnabled]
push af
xor a ; disable auto-transfer while copying
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, b
call BankswitchCommon
ld a, e
- ld [H_VBCOPYSRC], a
+ ldh [hVBlankCopySource], a
ld a, d
- ld [H_VBCOPYSRC + 1], a
+ ldh [hVBlankCopySource + 1], a
ld a, l
- ld [H_VBCOPYDEST], a
+ ldh [hVBlankCopyDest], a
ld a, h
- ld [H_VBCOPYDEST + 1], a
+ ldh [hVBlankCopyDest + 1], a
.loop
ld a, c
@@ -65,17 +65,17 @@ CopyVideoData::
jr nc, .keepgoing
.done
- ld [H_VBCOPYSIZE], a
+ ldh [hVBlankCopySize], a
call DelayFrame
pop af
call BankswitchCommon
pop af
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ret
.keepgoing
ld a, 8
- ld [H_VBCOPYSIZE], a
+ ldh [hVBlankCopySize], a
call DelayFrame
ld a, c
sub 8
@@ -86,25 +86,25 @@ CopyVideoDataDouble::
; Wait for the next VBlank, then copy c 1bpp
; tiles from b:de to hl, 8 tiles at a time.
; This takes c/8 frames.
- ld a, [H_AUTOBGTRANSFERENABLED]
+ ldh a, [hAutoBGTransferEnabled]
push af
xor a ; disable auto-transfer while copying
- ld [H_AUTOBGTRANSFERENABLED], a
- ld a, [H_LOADEDROMBANK]
+ ldh [hAutoBGTransferEnabled], a
+ ldh a, [hLoadedROMBank]
push af
ld a, b
call BankswitchCommon
ld a, e
- ld [H_VBCOPYDOUBLESRC], a
+ ldh [hVBlankCopyDoubleSource], a
ld a, d
- ld [H_VBCOPYDOUBLESRC + 1], a
+ ldh [hVBlankCopyDoubleSource + 1], a
ld a, l
- ld [H_VBCOPYDOUBLEDEST], a
+ ldh [hVBlankCopyDoubleDest], a
ld a, h
- ld [H_VBCOPYDOUBLEDEST + 1], a
+ ldh [hVBlankCopyDoubleDest + 1], a
.loop
ld a, c
@@ -112,17 +112,17 @@ CopyVideoDataDouble::
jr nc, .keepgoing
.done
- ld [H_VBCOPYDOUBLESIZE], a
+ ldh [hVBlankCopyDoubleSize], a
call DelayFrame
pop af
call BankswitchCommon
pop af
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ret
.keepgoing
ld a, 8
- ld [H_VBCOPYDOUBLESIZE], a
+ ldh [hVBlankCopyDoubleSize], a
call DelayFrame
ld a, c
sub 8
@@ -131,10 +131,10 @@ CopyVideoDataDouble::
FillMemory::
push af
- ld a,b
+ ld a, b
and a
jr z, .eightbitcopyamount
- ld a,c
+ ld a, c
and a
jr z, .mulitpleof0x100
.eightbitcopyamount
@@ -142,7 +142,7 @@ FillMemory::
.mulitpleof0x100
pop af
.loop
- ld [hli],a
+ ld [hli], a
dec c
jr nz, .loop
dec b
@@ -154,7 +154,7 @@ GetFarByte::
; and return it in a
push bc
ld b, a
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, b
call BankswitchCommon
@@ -190,32 +190,32 @@ CopyScreenTileBufferToVRAM::
ld c, 6
ld hl, $600 * 0
- coord de, 0, 6 * 0
+ decoord 0, 6 * 0
call .setup
call DelayFrame
ld hl, $600 * 1
- coord de, 0, 6 * 1
+ decoord 0, 6 * 1
call .setup
call DelayFrame
ld hl, $600 * 2
- coord de, 0, 6 * 2
+ decoord 0, 6 * 2
call .setup
jp DelayFrame
.setup
ld a, d
- ld [H_VBCOPYBGSRC+1], a
+ ldh [hVBlankCopyBGSource+1], a
call GetRowColAddressBgMap
ld a, l
- ld [H_VBCOPYBGDEST], a
+ ldh [hVBlankCopyBGDest], a
ld a, h
- ld [H_VBCOPYBGDEST+1], a
+ ldh [hVBlankCopyBGDest+1], a
ld a, c
- ld [H_VBCOPYBGNUMROWS], a
+ ldh [hVBlankCopyBGNumRows], a
ld a, e
- ld [H_VBCOPYBGSRC], a
+ ldh [hVBlankCopyBGSource], a
ret
ClearScreen::
@@ -223,7 +223,7 @@ ClearScreen::
; for the bg map to update.
ld bc, 20 * 18
inc b
- coord hl, 0, 0
+ hlcoord 0, 0
ld a, " "
.loop
ld [hli], a
diff --git a/home/copy_string.asm b/home/copy_string.asm
new file mode 100644
index 00000000..7f86e501
--- /dev/null
+++ b/home/copy_string.asm
@@ -0,0 +1,13 @@
+; copies a string from [de] to [wcf4b]
+CopyStringToCF4B::
+ ld hl, wcf4b
+ ; fall through
+
+; copies a string from [de] to [hl]
+CopyString::
+ ld a, [de]
+ inc de
+ ld [hli], a
+ cp "@"
+ jr nz, CopyString
+ ret
diff --git a/home/count_set_bits.asm b/home/count_set_bits.asm
new file mode 100644
index 00000000..73f7fa9c
--- /dev/null
+++ b/home/count_set_bits.asm
@@ -0,0 +1,24 @@
+; function to count how many bits are set in a string of bytes
+; INPUT:
+; hl = address of string of bytes
+; b = length of string of bytes
+; OUTPUT:
+; [wNumSetBits] = number of set bits
+CountSetBits::
+ ld c, 0
+.loop
+ ld a, [hli]
+ ld e, a
+ ld d, 8
+.innerLoop ; count how many bits are set in the current byte
+ srl e
+ ld a, 0
+ adc c
+ ld c, a
+ dec d
+ jr nz, .innerLoop
+ dec b
+ jr nz, .loop
+ ld a, c
+ ld [wNumSetBits], a
+ ret
diff --git a/home/delay.asm b/home/delay.asm
new file mode 100644
index 00000000..eba865c2
--- /dev/null
+++ b/home/delay.asm
@@ -0,0 +1,32 @@
+DelayFrames::
+; wait c frames
+ call DelayFrame
+ dec c
+ jr nz, DelayFrames
+ ret
+
+PlaySoundWaitForCurrent::
+ push af
+ call WaitForSoundToFinish
+ pop af
+ jp PlaySound
+
+; Wait for sound to finish playing
+WaitForSoundToFinish::
+ ld a, [wLowHealthAlarm]
+ and $80
+ ret nz
+ push hl
+.waitLoop
+ ld hl, wChannelSoundIDs + Ch5
+ xor a
+ or [hl]
+ inc hl
+ or [hl]
+ inc hl
+ inc hl
+ or [hl]
+ and a
+ jr nz, .waitLoop
+ pop hl
+ ret
diff --git a/home/fade.asm b/home/fade.asm
index 1259f92b..f38878b1 100644
--- a/home/fade.asm
+++ b/home/fade.asm
@@ -11,11 +11,11 @@ LoadGBPal::
dec h
.ok
ld a, [hli]
- ld [rBGP], a
+ ldh [rBGP], a
ld a, [hli]
- ld [rOBP0], a
+ ldh [rOBP0], a
ld a, [hli]
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
@@ -32,11 +32,11 @@ GBFadeOutToWhite::
GBFadeIncCommon:
ld a, [hli]
- ld [rBGP], a
+ ldh [rBGP], a
ld a, [hli]
- ld [rOBP0], a
+ ldh [rOBP0], a
ld a, [hli]
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
@@ -57,11 +57,11 @@ GBFadeInFromWhite::
GBFadeDecCommon:
ld a, [hld]
- ld [rOBP1], a
+ ldh [rOBP1], a
ld a, [hld]
- ld [rOBP0], a
+ ldh [rOBP0], a
ld a, [hld]
- ld [rBGP], a
+ ldh [rBGP], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
diff --git a/home/fade_audio.asm b/home/fade_audio.asm
new file mode 100644
index 00000000..f4e77c3f
--- /dev/null
+++ b/home/fade_audio.asm
@@ -0,0 +1,46 @@
+FadeOutAudio::
+ ld a, [wAudioFadeOutControl]
+ and a ; currently fading out audio?
+ jr nz, .fadingOut
+ ld a, [wd72c]
+ bit 1, a
+ ret nz
+ ld a, $77
+ ldh [rNR50], a
+ ret
+.fadingOut
+ ld a, [wAudioFadeOutCounter]
+ and a
+ jr z, .counterReachedZero
+ dec a
+ ld [wAudioFadeOutCounter], a
+ ret
+.counterReachedZero
+ ld a, [wAudioFadeOutCounterReloadValue]
+ ld [wAudioFadeOutCounter], a
+ ldh a, [rNR50]
+ and a ; has the volume reached 0?
+ jr z, .fadeOutComplete
+ ld b, a
+ and $f
+ dec a
+ ld c, a
+ ld a, b
+ and $f0
+ swap a
+ dec a
+ swap a
+ or c
+ ldh [rNR50], a
+ ret
+.fadeOutComplete
+ ld a, [wAudioFadeOutControl]
+ ld b, a
+ xor a
+ ld [wAudioFadeOutControl], a
+ call StopAllMusic
+ ld a, [wAudioSavedROMBank]
+ ld [wAudioROMBank], a
+ ld a, b
+ ld [wNewSoundID], a
+ jp PlaySound
diff --git a/home/give.asm b/home/give.asm
new file mode 100644
index 00000000..cbfd0310
--- /dev/null
+++ b/home/give.asm
@@ -0,0 +1,26 @@
+GiveItem::
+; Give player quantity c of item b,
+; and copy the item's name to wcf4b.
+; Return carry on success.
+ ld a, b
+ ld [wd11e], a
+ ld [wcf91], a
+ ld a, c
+ ld [wItemQuantity], a
+ ld hl, wNumBagItems
+ call AddItemToInventory
+ ret nc
+ call GetItemName
+ call CopyStringToCF4B
+ scf
+ ret
+
+GivePokemon::
+; Give the player monster b at level c.
+ ld a, b
+ ld [wcf91], a
+ ld a, c
+ ld [wCurEnemyLVL], a
+ xor a ; PLAYER_PARTY_DATA
+ ld [wMonDataLocation], a
+ farjp _GivePokemon
diff --git a/home/header.asm b/home/header.asm
new file mode 100644
index 00000000..671f29b1
--- /dev/null
+++ b/home/header.asm
@@ -0,0 +1,81 @@
+; rst vectors (unused)
+
+SECTION "rst0", ROM0[$0000]
+ rst $38
+
+ ds $08 - @, 0 ; unused
+
+SECTION "rst8", ROM0[$0008]
+ rst $38
+
+ ds $10 - @, 0 ; unused
+
+SECTION "rst10", ROM0[$0010]
+ rst $38
+
+ ds $18 - @, 0 ; unused
+
+SECTION "rst18", ROM0[$0018]
+ rst $38
+
+ ds $20 - @, 0 ; unused
+
+SECTION "rst20", ROM0[$0020]
+ rst $38
+
+ ds $28 - @, 0 ; unused
+
+SECTION "rst28", ROM0[$0028]
+ rst $38
+
+ ds $30 - @, 0 ; unused
+
+SECTION "rst30", ROM0[$0030]
+ rst $38
+
+ ds $38 - @, 0 ; unused
+
+SECTION "rst38", ROM0[$0038]
+ rst $38
+
+ ds $40 - @, 0 ; unused
+
+
+; Game Boy hardware interrupts
+
+SECTION "vblank", ROM0[$0040]
+ jp VBlank
+
+ ds $48 - @, 0 ; unused
+
+SECTION "lcd", ROM0[$0048]
+ jp LCDC
+
+ ds $50 - @, 0 ; unused
+
+SECTION "timer", ROM0[$0050]
+ jp Timer
+
+ ds $58 - @, 0 ; unused
+
+SECTION "serial", ROM0[$0058]
+ jp Serial
+
+ ds $60 - @, 0 ; unused
+
+SECTION "joypad", ROM0[$0060]
+ reti
+
+
+SECTION "Header", ROM0[$0100]
+
+Start::
+; Nintendo requires all Game Boy ROMs to begin with a nop ($00) and a jp ($C3)
+; to the starting address.
+ nop
+ jp _Start
+
+; The Game Boy cartridge header data is patched over by rgbfix.
+; This makes sure it doesn't get used for anything else.
+
+ ds $0150 - @
diff --git a/home/hidden_objects.asm b/home/hidden_objects.asm
new file mode 100644
index 00000000..40c49c3e
--- /dev/null
+++ b/home/hidden_objects.asm
@@ -0,0 +1,35 @@
+UpdateCinnabarGymGateTileBlocks::
+ farcall UpdateCinnabarGymGateTileBlocks_
+ ret
+
+CheckForHiddenObjectOrBookshelfOrCardKeyDoor::
+ ldh a, [hLoadedROMBank]
+ push af
+ ldh a, [hJoyHeld]
+ bit 0, a ; A button
+ jr z, .nothingFound
+; A button is pressed
+ callbs CheckForHiddenObject
+ ldh a, [hDidntFindAnyHiddenObject]
+ and a
+ jr nz, .hiddenObjectNotFound
+ xor a
+ ldh [hItemAlreadyFound], a
+ ld a, [wHiddenObjectFunctionRomBank]
+ call BankswitchCommon
+ call JumpToAddress
+ ldh a, [hItemAlreadyFound]
+ jr .done
+.hiddenObjectNotFound
+ predef GetTileAndCoordsInFrontOfPlayer
+ farcall PrintBookshelfText
+ ldh a, [hFFDB]
+ and a
+ jr z, .done
+.nothingFound
+ ld a, $ff
+.done
+ ldh [hItemAlreadyFound], a
+ pop af
+ call BankswitchCommon
+ ret
diff --git a/home/init.asm b/home/init.asm
index a2f7f786..878f329a 100644
--- a/home/init.asm
+++ b/home/init.asm
@@ -21,28 +21,28 @@ rLCDC_DEFAULT EQU %11100011
di
xor a
- ld [rIF], a
- ld [rIE], a
- ld [rSCX], a
- ld [rSCY], a
- ld [rSB], a
- ld [rSC], a
- ld [rWX], a
- ld [rWY], a
- ld [rTMA], a
- ld [rTAC], a
- ld [rBGP], a
- ld [rOBP0], a
- ld [rOBP1], a
+ ldh [rIF], a
+ ldh [rIE], a
+ ldh [rSCX], a
+ ldh [rSCY], a
+ ldh [rSB], a
+ ldh [rSC], a
+ ldh [rWX], a
+ ldh [rWY], a
+ ldh [rTMA], a
+ ldh [rTAC], a
+ ldh [rBGP], a
+ ldh [rOBP0], a
+ ldh [rOBP1], a
ld a, rLCDC_ENABLE_MASK
- ld [rLCDC], a
+ ldh [rLCDC], a
call DisableLCD
ld sp, wStack
- ld hl, $c000 ; start of WRAM
- ld bc, $2000 ; size of WRAM
+ ld hl, WRAM0_Begin
+ ld bc, WRAM1_End - WRAM0_Begin
.loop
ld [hl], 0
inc hl
@@ -53,46 +53,46 @@ rLCDC_DEFAULT EQU %11100011
call ClearVram
- ld hl, $ff80
- ld bc, $fffe - $ff80
+ ld hl, HRAM_Begin
+ ld bc, HRAM_End - HRAM_Begin - 1
call FillMemory
call ClearSprites
- ld a, Bank(WriteDMACodeToHRAM)
- ld [H_LOADEDROMBANK], a
+ ld a, BANK(WriteDMACodeToHRAM)
+ ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
call WriteDMACodeToHRAM
xor a
- ld [hTilesetType], a
- ld [rSTAT], a
- ld [hSCX], a
- ld [hSCY], a
- ld [rIF], a
+ ldh [hTilesetType], a
+ ldh [rSTAT], a
+ ldh [hSCX], a
+ ldh [hSCY], a
+ ldh [rIF], a
ld [wc0f3], a
ld [wc0f4], a
ld a, 1 << VBLANK + 1 << TIMER + 1 << SERIAL
- ld [rIE], a
+ ldh [rIE], a
ld a, 144 ; move the window off-screen
- ld [hWY], a
- ld [rWY], a
+ ldh [hWY], a
+ ldh [rWY], a
ld a, 7
- ld [rWX], a
+ ldh [rWX], a
ld a, CONNECTION_NOT_ESTABLISHED
- ld [hSerialConnectionStatus], a
+ ldh [hSerialConnectionStatus], a
- ld h, vBGMap0 / $100
+ ld h, HIGH(vBGMap0)
call ClearBgMap
- ld h, vBGMap1 / $100
+ ld h, HIGH(vBGMap1)
call ClearBgMap
ld a, rLCDC_DEFAULT
- ld [rLCDC], a
+ ldh [rLCDC], a
ld a, 16
- ld [hSoftReset], a
+ ldh [hSoftReset], a
call StopAllSounds
ei
@@ -103,9 +103,9 @@ rLCDC_DEFAULT EQU %11100011
ld [wAudioROMBank], a
ld [wAudioSavedROMBank], a
ld a, $9c
- ld [H_AUTOBGTRANSFERDEST + 1], a
+ ldh [hAutoBGTransferDest + 1], a
xor a
- ld [H_AUTOBGTRANSFERDEST], a
+ ldh [hAutoBGTransferDest], a
dec a
ld [wUpdateSpritesEnabled], a
@@ -116,13 +116,13 @@ rLCDC_DEFAULT EQU %11100011
call GBPalNormal
call ClearSprites
ld a, rLCDC_DEFAULT
- ld [rLCDC], a
+ ldh [rLCDC], a
jp SetDefaultNamesBeforeTitlescreen
-ClearVram:
- ld hl, $8000
- ld bc, $2000
+ClearVram::
+ ld hl, VRAM_Begin
+ ld bc, VRAM_End - VRAM_Begin
xor a
jp FillMemory
diff --git a/home/inventory.asm b/home/inventory.asm
new file mode 100644
index 00000000..1100666f
--- /dev/null
+++ b/home/inventory.asm
@@ -0,0 +1,38 @@
+; subtracts the amount the player paid from their money
+; OUTPUT: carry = 0(success) or 1(fail because there is not enough money)
+SubtractAmountPaidFromMoney::
+ farjp SubtractAmountPaidFromMoney_
+
+; adds the amount the player sold to their money
+AddAmountSoldToMoney::
+ ld de, wPlayerMoney + 2
+ ld hl, hMoney + 2 ; total price of items
+ ld c, 3 ; length of money in bytes
+ predef AddBCDPredef ; add total price to money
+ ld a, MONEY_BOX
+ ld [wTextBoxID], a
+ call DisplayTextBoxID ; redraw money text box
+ ld a, SFX_PURCHASE
+ call PlaySoundWaitForCurrent
+ jp WaitForSoundToFinish
+
+; function to remove an item (in varying quantities) from the player's bag or PC box
+; INPUT:
+; HL = address of inventory (either wNumBagItems or wNumBoxItems)
+; [wWhichPokemon] = index (within the inventory) of the item to remove
+; [wItemQuantity] = quantity to remove
+RemoveItemFromInventory::
+ homecall RemoveItemFromInventory_
+ ret
+
+; function to add an item (in varying quantities) to the player's bag or PC box
+; INPUT:
+; HL = address of inventory (either wNumBagItems or wNumBoxItems)
+; [wcf91] = item ID
+; [wItemQuantity] = item quantity
+; sets carry flag if successful, unsets carry flag if unsuccessful
+AddItemToInventory::
+ push bc
+ homecall_sf AddItemToInventory_
+ pop bc
+ ret
diff --git a/home/item.asm b/home/item.asm
new file mode 100644
index 00000000..f27d46f4
--- /dev/null
+++ b/home/item.asm
@@ -0,0 +1,49 @@
+; uses an item
+; UseItem is used with dummy items to perform certain other functions as well
+; INPUT:
+; [wcf91] = item ID
+; OUTPUT:
+; [wActionResultOrTookBattleTurn] = success
+; 00: unsuccessful
+; 01: successful
+; 02: not able to be used right now, no extra menu displayed (only certain items use this)
+UseItem::
+ farjp UseItem_
+
+; confirms the item toss and then tosses the item
+; INPUT:
+; hl = address of inventory (either wNumBagItems or wNumBoxItems)
+; [wcf91] = item ID
+; [wWhichPokemon] = index of item within inventory
+; [wItemQuantity] = quantity to toss
+; OUTPUT:
+; clears carry flag if the item is tossed, sets carry flag if not
+TossItem::
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, BANK(TossItem_)
+ ldh [hLoadedROMBank], a
+ ld [MBC1RomBank], a
+ call TossItem_
+ pop de
+ ld a, d
+ ldh [hLoadedROMBank], a
+ ld [MBC1RomBank], a
+ ret
+
+; checks if an item is a key item
+; INPUT:
+; [wcf91] = item ID
+; OUTPUT:
+; [wIsKeyItem] = result
+; 00: item is not key item
+; 01: item is key item
+IsKeyItem::
+ push hl
+ push de
+ push bc
+ farcall IsKeyItem_
+ pop bc
+ pop de
+ pop hl
+ ret
diff --git a/home/item_price.asm b/home/item_price.asm
new file mode 100644
index 00000000..d8c2068e
--- /dev/null
+++ b/home/item_price.asm
@@ -0,0 +1,39 @@
+GetItemPrice::
+; Stores item's price as BCD at hItemPrice (3 bytes)
+; Input: [wcf91] = item id
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, [wListMenuID]
+ cp MOVESLISTMENU
+ ld a, BANK(ItemPrices)
+ jr nz, .ok
+ ld a, $f ; hardcoded Bank
+.ok
+ call BankswitchCommon
+ ld hl, wItemPrices
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [wcf91] ; a contains item id
+ cp HM01
+ jr nc, .getTMPrice
+ ld bc, $3
+.loop
+ add hl, bc
+ dec a
+ jr nz, .loop
+ dec hl
+ ld a, [hld]
+ ldh [hItemPrice + 2], a
+ ld a, [hld]
+ ldh [hItemPrice + 1], a
+ ld a, [hl]
+ ldh [hItemPrice], a
+ jr .done
+.getTMPrice
+ callbs GetMachinePrice
+.done
+ ld de, hItemPrice
+ pop af
+ call BankswitchCommon
+ ret
diff --git a/home/joypad.asm b/home/joypad.asm
new file mode 100644
index 00000000..15f10fe2
--- /dev/null
+++ b/home/joypad.asm
@@ -0,0 +1,5 @@
+Joypad::
+ homecall_jump _Joypad
+
+ReadJoypad::
+ homecall_jump ReadJoypad_
diff --git a/home/joypad2.asm b/home/joypad2.asm
new file mode 100644
index 00000000..30f9f788
--- /dev/null
+++ b/home/joypad2.asm
@@ -0,0 +1,100 @@
+; this function is used when lower button sensitivity is wanted (e.g. menus)
+; OUTPUT: [hJoy5] = pressed buttons in usual format
+; there are two flags that control its functionality, [hJoy6] and [hJoy7]
+; there are essentially three modes of operation
+; 1. Get newly pressed buttons only
+; ([hJoy7] == 0, [hJoy6] == any)
+; Just copies [hJoyPressed] to [hJoy5].
+; 2. Get currently pressed buttons at low sample rate with delay
+; ([hJoy7] == 1, [hJoy6] != 0)
+; If the user holds down buttons for more than half a second,
+; report buttons as being pressed up to 12 times per second thereafter.
+; If the user holds down buttons for less than half a second,
+; report only one button press.
+; 3. Same as 2, but report no buttons as pressed if A or B is held down.
+; ([hJoy7] == 1, [hJoy6] == 0)
+JoypadLowSensitivity::
+ call Joypad
+ ldh a, [hJoy7] ; flag
+ and a ; get all currently pressed buttons or only newly pressed buttons?
+ ldh a, [hJoyPressed] ; newly pressed buttons
+ jr z, .storeButtonState
+ ldh a, [hJoyHeld] ; all currently pressed buttons
+.storeButtonState
+ ldh [hJoy5], a
+ ldh a, [hJoyPressed] ; newly pressed buttons
+ and a ; have any buttons been newly pressed since last check?
+ jr z, .noNewlyPressedButtons
+.newlyPressedButtons
+ ld a, 30 ; half a second delay
+ ldh [hFrameCounter], a
+ ret
+.noNewlyPressedButtons
+ ldh a, [hFrameCounter]
+ and a ; is the delay over?
+ jr z, .delayOver
+.delayNotOver
+ xor a
+ ldh [hJoy5], a ; report no buttons as pressed
+ ret
+.delayOver
+; if [hJoy6] = 0 and A or B is pressed, report no buttons as pressed
+ ldh a, [hJoyHeld]
+ and A_BUTTON | B_BUTTON
+ jr z, .setShortDelay
+ ldh a, [hJoy6] ; flag
+ and a
+ jr nz, .setShortDelay
+ xor a
+ ldh [hJoy5], a
+.setShortDelay
+ ld a, 5 ; 1/12 of a second delay
+ ldh [hFrameCounter], a
+ ret
+
+WaitForTextScrollButtonPress::
+ ldh a, [hDownArrowBlinkCount1]
+ push af
+ ldh a, [hDownArrowBlinkCount2]
+ push af
+ xor a
+ ldh [hDownArrowBlinkCount1], a
+ ld a, $6
+ ldh [hDownArrowBlinkCount2], a
+.loop
+ push hl
+ ld a, [wTownMapSpriteBlinkingEnabled]
+ and a
+ jr z, .skipAnimation
+ push de
+ push bc
+ callfar TownMapSpriteBlinkingAnimation
+ pop bc
+ pop de
+.skipAnimation
+ hlcoord 18, 16
+ call HandleDownArrowBlinkTiming
+ pop hl
+ call JoypadLowSensitivity
+ predef CableClub_Run
+ ldh a, [hJoy5]
+ and A_BUTTON | B_BUTTON
+ jr z, .loop
+ pop af
+ ldh [hDownArrowBlinkCount2], a
+ pop af
+ ldh [hDownArrowBlinkCount1], a
+ ret
+
+; (unless in link battle) waits for A or B being pressed and outputs the scrolling sound effect
+ManualTextScroll::
+ ld a, [wLinkState]
+ cp LINK_STATE_BATTLING
+ jr z, .inLinkBattle
+ call WaitForTextScrollButtonPress
+ call WaitForSoundToFinish
+ ld a, SFX_PRESS_AB
+ jp PlaySound
+.inLinkBattle
+ ld c, 65
+ jp DelayFrames
diff --git a/home/lcd.asm b/home/lcd.asm
new file mode 100644
index 00000000..72fc70ed
--- /dev/null
+++ b/home/lcd.asm
@@ -0,0 +1,25 @@
+DisableLCD::
+ xor a
+ ldh [rIF], a
+ ldh a, [rIE]
+ ld b, a
+ res 0, a
+ ldh [rIE], a
+
+.wait
+ ldh a, [rLY]
+ cp LY_VBLANK
+ jr nz, .wait
+
+ ldh a, [rLCDC]
+ and $ff ^ rLCDC_ENABLE_MASK
+ ldh [rLCDC], a
+ ld a, b
+ ldh [rIE], a
+ ret
+
+EnableLCD::
+ ldh a, [rLCDC]
+ set rLCDC_ENABLE, a
+ ldh [rLCDC], a
+ ret
diff --git a/home/lcdc.asm b/home/lcdc.asm
index 6172dd0d..dd3fb2fb 100644
--- a/home/lcdc.asm
+++ b/home/lcdc.asm
@@ -1,15 +1,15 @@
LCDC::
push af
- ld a, [hLCDCPointer] ; doubles as enabling byte
+ ldh a, [hLCDCPointer] ; doubles as enabling byte
and a
jr z, .noLCDCInterrupt
push hl
; [C700 + [rLY]] --> [FF00 + [hLCDCPointer]]
- ld a, [rLY]
+ ldh a, [rLY]
ld l, a
ld h, wLYOverrides / $100
ld h, [hl] ; h != not part of pointer
- ld a, [hLCDCPointer]
+ ldh a, [hLCDCPointer]
ld l, a
ld a, h
ld h, $ff
diff --git a/home/list_menu.asm b/home/list_menu.asm
new file mode 100644
index 00000000..f0480460
--- /dev/null
+++ b/home/list_menu.asm
@@ -0,0 +1,523 @@
+; INPUT:
+; [wListMenuID] = list menu ID
+; [wListPointer] = address of the list (2 bytes)
+DisplayListMenuID::
+ xor a
+ ldh [hAutoBGTransferEnabled], a ; disable auto-transfer
+ ld a, 1
+ ldh [hJoy7], a ; joypad state update flag
+ ld a, [wBattleType]
+ and a ; is it the Old Man battle?
+ jr nz, .specialBattleType
+ ld a, $01 ; hardcoded bank
+ jr .bankswitch
+.specialBattleType ; Old Man battle
+ ld a, BANK(DisplayBattleMenu)
+.bankswitch
+ call BankswitchHome
+ ld hl, wd730
+ set 6, [hl] ; turn off letter printing delay
+ xor a
+ ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped
+ ld [wListCount], a
+ ld a, [wListPointer]
+ ld l, a
+ ld a, [wListPointer + 1]
+ ld h, a ; hl = address of the list
+ ld a, [hl] ; the first byte is the number of entries in the list
+ ld [wListCount], a
+ ld a, LIST_MENU_BOX
+ ld [wTextBoxID], a
+ call DisplayTextBoxID ; draw the menu text box
+ call UpdateSprites ; disable sprites behind the text box
+; the code up to .skipMovingSprites appears to be useless
+ hlcoord 4, 2 ; coordinates of upper left corner of menu text box
+ lb de, 9, 14 ; height and width of menu text box
+ ld a, [wListMenuID]
+ and a ; PCPOKEMONLISTMENU?
+ jr nz, .skipMovingSprites
+ call UpdateSprites
+.skipMovingSprites
+ ld a, 1 ; max menu item ID is 1 if the list has less than 2 entries
+ ld [wMenuWatchMovingOutOfBounds], a
+ ld a, [wListCount]
+ cp 2 ; does the list have less than 2 entries?
+ jr c, .setMenuVariables
+ ld a, 2 ; max menu item ID is 2 if the list has at least 2 entries
+.setMenuVariables
+ ld [wMaxMenuItem], a
+ ld a, 4
+ ld [wTopMenuItemY], a
+ ld a, 5
+ ld [wTopMenuItemX], a
+ ld a, A_BUTTON | B_BUTTON | SELECT
+ ld [wMenuWatchedKeys], a
+ ld c, 10
+ call DelayFrames
+
+DisplayListMenuIDLoop::
+ xor a
+ ldh [hAutoBGTransferEnabled], a ; disable transfer
+ call PrintListMenuEntries
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a ; enable transfer
+ call Delay3
+ ld a, [wBattleType]
+ and a ; is it the Old Man battle?
+ jr z, .notOldManBattle
+.oldManBattle
+ ld a, "▶"
+ ldcoord_a 5, 4 ; place menu cursor in front of first menu entry
+ ld c, 20
+ call DelayFrames
+ xor a
+ ld [wCurrentMenuItem], a
+ hlcoord 5, 4
+ ld a, l
+ ld [wMenuCursorLocation], a
+ ld a, h
+ ld [wMenuCursorLocation + 1], a
+ jr .buttonAPressed
+.notOldManBattle
+ call LoadGBPal
+ call HandleMenuInput
+ push af
+ call PlaceMenuCursor
+ pop af
+ bit 0, a ; was the A button pressed?
+ jp z, .checkOtherKeys
+.buttonAPressed
+ ld a, [wCurrentMenuItem]
+ call PlaceUnfilledArrowMenuCursor
+
+; pointless because both values are overwritten before they are read
+ ld a, $01
+ ld [wMenuExitMethod], a
+ ld [wChosenMenuItem], a
+
+ xor a
+ ld [wMenuWatchMovingOutOfBounds], a
+ ld a, [wCurrentMenuItem]
+ ld c, a
+ ld a, [wListScrollOffset]
+ add c
+ ld c, a
+ ld a, [wListCount]
+ and a ; is the list empty?
+ jp z, ExitListMenu ; if so, exit the menu
+ dec a
+ cp c ; did the player select Cancel?
+ jp c, ExitListMenu ; if so, exit the menu
+ ld a, c
+ ld [wWhichPokemon], a
+ ld a, [wListMenuID]
+ cp ITEMLISTMENU
+ jr nz, .skipMultiplying
+; if it's an item menu
+ sla c ; item entries are 2 bytes long, so multiply by 2
+.skipMultiplying
+ ld a, [wListPointer]
+ ld l, a
+ ld a, [wListPointer + 1]
+ ld h, a
+ inc hl ; hl = beginning of list entries
+ ld b, 0
+ add hl, bc
+ ld a, [hl]
+ ld [wcf91], a
+ ld a, [wListMenuID]
+ and a ; PCPOKEMONLISTMENU?
+ jr z, .pokemonList
+ push hl
+ call GetItemPrice
+ pop hl
+ ld a, [wListMenuID]
+ cp ITEMLISTMENU
+ jr nz, .skipGettingQuantity
+; if it's an item menu
+ inc hl
+ ld a, [hl] ; a = item quantity
+ ld [wMaxItemQuantity], a
+.skipGettingQuantity
+ ld a, [wcf91]
+ ld [wd0b5], a
+ ld a, BANK(ItemNames)
+ ld [wPredefBank], a
+ call GetName
+ jr .storeChosenEntry
+.pokemonList
+ ld hl, wPartyCount
+ ld a, [wListPointer]
+ cp l ; is it a list of party pokemon or box pokemon?
+ ld hl, wPartyMonNicks
+ jr z, .getPokemonName
+ ld hl, wBoxMonNicks ; box pokemon names
+.getPokemonName
+ ld a, [wWhichPokemon]
+ call GetPartyMonName
+.storeChosenEntry ; store the menu entry that the player chose and return
+ ld de, wcd6d
+ call CopyStringToCF4B ; copy name to wcf4b
+ ld a, CHOSE_MENU_ITEM
+ ld [wMenuExitMethod], a
+ ld a, [wCurrentMenuItem]
+ ld [wChosenMenuItem], a
+ xor a
+ ldh [hJoy7], a ; joypad state update flag
+ ld hl, wd730
+ res 6, [hl] ; turn on letter printing delay
+ jp BankswitchBack
+.checkOtherKeys ; check B, SELECT, Up, and Down keys
+ bit 1, a ; was the B button pressed?
+ jp nz, ExitListMenu ; if so, exit the menu
+ bit 2, a ; was the select button pressed?
+ jp nz, HandleItemListSwapping ; if so, allow the player to swap menu entries
+ ld b, a
+ bit 7, b ; was Down pressed?
+ ld hl, wListScrollOffset
+ jr z, .upPressed
+.downPressed
+ ld a, [hl]
+ add 3
+ ld b, a
+ ld a, [wListCount]
+ cp b ; will going down scroll past the Cancel button?
+ jp c, DisplayListMenuIDLoop
+ inc [hl] ; if not, go down
+ jp DisplayListMenuIDLoop
+.upPressed
+ ld a, [hl]
+ and a
+ jp z, DisplayListMenuIDLoop
+ dec [hl]
+ jp DisplayListMenuIDLoop
+
+DisplayChooseQuantityMenu::
+; text box dimensions/coordinates for just quantity
+ hlcoord 15, 9
+ lb bc, 1, 3 ; height and width
+ ld a, [wListMenuID]
+ cp PRICEDITEMLISTMENU
+ jr nz, .drawTextBox
+; text box dimensions/coordinates for quantity and price
+ hlcoord 7, 9
+ lb bc, 1, 11 ; height and width
+.drawTextBox
+ call TextBoxBorder
+ hlcoord 16, 10
+ ld a, [wListMenuID]
+ cp PRICEDITEMLISTMENU
+ jr nz, .printInitialQuantity
+ hlcoord 8, 10
+.printInitialQuantity
+ ld de, InitialQuantityText
+ call PlaceString
+ xor a
+ ld [wItemQuantity], a ; initialize current quantity to 0
+ jp .incrementQuantity
+.waitForKeyPressLoop
+ call JoypadLowSensitivity
+ ldh a, [hJoyPressed] ; newly pressed buttons
+ bit 0, a ; was the A button pressed?
+ jp nz, .buttonAPressed
+ bit 1, a ; was the B button pressed?
+ jp nz, .buttonBPressed
+ bit 6, a ; was Up pressed?
+ jr nz, .incrementQuantity
+ bit 7, a ; was Down pressed?
+ jr nz, .decrementQuantity
+ jr .waitForKeyPressLoop
+.incrementQuantity
+ ld a, [wMaxItemQuantity]
+ inc a
+ ld b, a
+ ld hl, wItemQuantity ; current quantity
+ inc [hl]
+ ld a, [hl]
+ cp b
+ jr nz, .handleNewQuantity
+; wrap to 1 if the player goes above the max quantity
+ ld a, 1
+ ld [hl], a
+ jr .handleNewQuantity
+.decrementQuantity
+ ld hl, wItemQuantity ; current quantity
+ dec [hl]
+ jr nz, .handleNewQuantity
+; wrap to the max quantity if the player goes below 1
+ ld a, [wMaxItemQuantity]
+ ld [hl], a
+.handleNewQuantity
+ hlcoord 17, 10
+ ld a, [wListMenuID]
+ cp PRICEDITEMLISTMENU
+ jr nz, .printQuantity
+.printPrice
+ ld c, $03
+ ld a, [wItemQuantity]
+ ld b, a
+ ld hl, hMoney ; total price
+; initialize total price to 0
+ xor a
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+.addLoop ; loop to multiply the individual price by the quantity to get the total price
+ ld de, hMoney + 2
+ ld hl, hItemPrice + 2
+ push bc
+ predef AddBCDPredef ; add the individual price to the current sum
+ pop bc
+ dec b
+ jr nz, .addLoop
+ ldh a, [hHalveItemPrices]
+ and a ; should the price be halved (for selling items)?
+ jr z, .skipHalvingPrice
+ xor a
+ ldh [hDivideBCDDivisor], a
+ ldh [hDivideBCDDivisor + 1], a
+ ld a, $02
+ ldh [hDivideBCDDivisor + 2], a
+ predef DivideBCDPredef3 ; halves the price
+; store the halved price
+ ldh a, [hDivideBCDQuotient]
+ ldh [hMoney], a
+ ldh a, [hDivideBCDQuotient + 1]
+ ldh [hMoney + 1], a
+ ldh a, [hDivideBCDQuotient + 2]
+ ldh [hMoney + 2], a
+.skipHalvingPrice
+ hlcoord 12, 10
+ ld de, SpacesBetweenQuantityAndPriceText
+ call PlaceString
+ ld de, hMoney ; total price
+ ld c, $a3
+ call PrintBCDNumber
+ hlcoord 9, 10
+.printQuantity
+ ld de, wItemQuantity ; current quantity
+ lb bc, LEADING_ZEROES | 1, 2 ; 1 byte, 2 digits
+ call PrintNumber
+ jp .waitForKeyPressLoop
+.buttonAPressed ; the player chose to make the transaction
+ xor a
+ ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped
+ ret
+.buttonBPressed ; the player chose to cancel the transaction
+ xor a
+ ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped
+ ld a, $ff
+ ret
+
+InitialQuantityText::
+ db "×01@"
+
+SpacesBetweenQuantityAndPriceText::
+ db " @"
+
+ExitListMenu::
+ ld a, [wCurrentMenuItem]
+ ld [wChosenMenuItem], a
+ ld a, CANCELLED_MENU
+ ld [wMenuExitMethod], a
+ ld [wMenuWatchMovingOutOfBounds], a
+ xor a
+ ldh [hJoy7], a
+ ld hl, wd730
+ res 6, [hl]
+ call BankswitchBack
+ xor a
+ ld [wMenuItemToSwap], a ; 0 means no item is currently being swapped
+ scf
+ ret
+
+PrintListMenuEntries::
+ hlcoord 5, 3
+ lb bc, 9, 14
+ call ClearScreenArea
+ ld a, [wListPointer]
+ ld e, a
+ ld a, [wListPointer + 1]
+ ld d, a
+ inc de ; de = beginning of list entries
+ ld a, [wListScrollOffset]
+ ld c, a
+ ld a, [wListMenuID]
+ cp ITEMLISTMENU
+ ld a, c
+ jr nz, .skipMultiplying
+; if it's an item menu
+; item entries are 2 bytes long, so multiply by 2
+ add a
+ sla c
+.skipMultiplying
+ add e
+ ld e, a
+ jr nc, .noCarry
+ inc d
+.noCarry
+ hlcoord 6, 4 ; coordinates of first list entry name
+ ld b, 4 ; print 4 names
+.loop
+ ld a, b
+ ld [wWhichPokemon], a
+ ld a, [de]
+ ld [wd11e], a
+ cp $ff
+ jp z, .printCancelMenuItem
+ push bc
+ push de
+ push hl
+ push hl
+ push de
+ ld a, [wListMenuID]
+ and a ; PCPOKEMONLISTMENU?
+ jr z, .pokemonPCMenu
+ cp MOVESLISTMENU
+ jr z, .movesMenu
+.itemMenu
+ call GetItemName
+ jr .placeNameString
+.pokemonPCMenu
+ push hl
+ ld hl, wPartyCount
+ ld a, [wListPointer]
+ cp l ; is it a list of party pokemon or box pokemon?
+ ld hl, wPartyMonNicks
+ jr z, .getPokemonName
+ ld hl, wBoxMonNicks ; box pokemon names
+.getPokemonName
+ ld a, [wWhichPokemon]
+ ld b, a
+ ld a, 4
+ sub b
+ ld b, a
+ ld a, [wListScrollOffset]
+ add b
+ call GetPartyMonName
+ pop hl
+ jr .placeNameString
+.movesMenu
+ call GetMoveName
+.placeNameString
+ call PlaceString
+ pop de
+ pop hl
+ ld a, [wPrintItemPrices]
+ and a ; should prices be printed?
+ jr z, .skipPrintingItemPrice
+.printItemPrice
+ push hl
+ ld a, [de]
+ ld de, ItemPrices
+ ld [wcf91], a
+ call GetItemPrice ; get price
+ pop hl
+ ld bc, SCREEN_WIDTH + 5 ; 1 row down and 5 columns right
+ add hl, bc
+ ld c, $a3 ; no leading zeroes, right-aligned, print currency symbol, 3 bytes
+ call PrintBCDNumber
+.skipPrintingItemPrice
+ ld a, [wListMenuID]
+ and a ; PCPOKEMONLISTMENU?
+ jr nz, .skipPrintingPokemonLevel
+.printPokemonLevel
+ ld a, [wd11e]
+ push af
+ push hl
+ ld hl, wPartyCount
+ ld a, [wListPointer]
+ cp l ; is it a list of party pokemon or box pokemon?
+ ld a, PLAYER_PARTY_DATA
+ jr z, .next
+ ld a, BOX_DATA
+.next
+ ld [wMonDataLocation], a
+ ld hl, wWhichPokemon
+ ld a, [hl]
+ ld b, a
+ ld a, $04
+ sub b
+ ld b, a
+ ld a, [wListScrollOffset]
+ add b
+ ld [hl], a
+ call LoadMonData
+ ld a, [wMonDataLocation]
+ and a ; is it a list of party pokemon or box pokemon?
+ jr z, .skipCopyingLevel
+.copyLevel
+ ld a, [wLoadedMonBoxLevel]
+ ld [wLoadedMonLevel], a
+.skipCopyingLevel
+ pop hl
+ ld bc, $1c
+ add hl, bc
+ call PrintLevel
+ pop af
+ ld [wd11e], a
+.skipPrintingPokemonLevel
+ pop hl
+ pop de
+ inc de
+ ld a, [wListMenuID]
+ cp ITEMLISTMENU
+ jr nz, .nextListEntry
+.printItemQuantity
+ ld a, [wd11e]
+ ld [wcf91], a
+ call IsKeyItem ; check if item is unsellable
+ ld a, [wIsKeyItem]
+ and a ; is the item unsellable?
+ jr nz, .skipPrintingItemQuantity ; if so, don't print the quantity
+ push hl
+ ld bc, SCREEN_WIDTH + 8 ; 1 row down and 8 columns right
+ add hl, bc
+ ld a, "×"
+ ld [hli], a
+ ld a, [wd11e]
+ push af
+ ld a, [de]
+ ld [wMaxItemQuantity], a
+ push de
+ ld de, wd11e
+ ld [de], a
+ lb bc, 1, 2
+ call PrintNumber
+ pop de
+ pop af
+ ld [wd11e], a
+ pop hl
+.skipPrintingItemQuantity
+ inc de
+ pop bc
+ inc c
+ push bc
+ inc c
+ ld a, [wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1)
+ and a ; is an item being swapped?
+ jr z, .nextListEntry
+ add a
+ cp c ; is it this item?
+ jr nz, .nextListEntry
+ dec hl
+ ld a, "▷"
+ ld [hli], a
+.nextListEntry
+ ld bc, 2 * SCREEN_WIDTH ; 2 rows
+ add hl, bc
+ pop bc
+ inc c
+ dec b
+ jp nz, .loop
+ ld bc, -8
+ add hl, bc
+ ld a, "▼"
+ ld [hl], a
+ ret
+.printCancelMenuItem
+ ld de, ListMenuCancelText
+ jp PlaceString
+
+ListMenuCancelText::
+ db "CANCEL@"
diff --git a/home/load_font.asm b/home/load_font.asm
new file mode 100644
index 00000000..8ed0f0a7
--- /dev/null
+++ b/home/load_font.asm
@@ -0,0 +1,47 @@
+LoadFontTilePatterns::
+ ldh a, [rLCDC]
+ bit 7, a ; is the LCD enabled?
+ jr nz, .on
+.off
+ ld hl, FontGraphics
+ ld de, vFont
+ 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), (FontGraphicsEnd - FontGraphics) / $8
+ jp CopyVideoDataDouble ; if LCD is on, transfer during V-blank
+
+LoadTextBoxTilePatterns::
+ ldh a, [rLCDC]
+ bit 7, a ; is the LCD enabled?
+ jr nz, .on
+.off
+ ld hl, TextBoxGraphics
+ ld de, vChars2 tile $60
+ ld bc, TextBoxGraphicsEnd - TextBoxGraphics
+ ld a, BANK(TextBoxGraphics)
+ jp FarCopyData ; if LCD is off, transfer all at once
+.on
+ ld de, TextBoxGraphics
+ ld hl, vChars2 tile $60
+ lb bc, BANK(TextBoxGraphics), (TextBoxGraphicsEnd - TextBoxGraphics) / $10
+ jp CopyVideoData ; if LCD is on, transfer during V-blank
+
+LoadHpBarAndStatusTilePatterns::
+ ldh a, [rLCDC]
+ bit 7, a ; is the LCD enabled?
+ jr nz, .on
+.off
+ ld hl, HpBarAndStatusGraphics
+ ld de, vChars2 tile $62
+ ld bc, HpBarAndStatusGraphicsEnd - HpBarAndStatusGraphics
+ ld a, BANK(HpBarAndStatusGraphics)
+ jp FarCopyData ; if LCD is off, transfer all at once
+.on
+ ld de, HpBarAndStatusGraphics
+ ld hl, vChars2 tile $62
+ lb bc, BANK(HpBarAndStatusGraphics), (HpBarAndStatusGraphicsEnd - HpBarAndStatusGraphics) / $10
+ jp CopyVideoData ; if LCD is on, transfer during V-blank
diff --git a/home/map_objects.asm b/home/map_objects.asm
new file mode 100644
index 00000000..51206cc5
--- /dev/null
+++ b/home/map_objects.asm
@@ -0,0 +1,322 @@
+; checks if the player's coordinates match an arrow movement tile's coordinates
+; and if so, decodes the RLE movement data
+; b = player Y
+; c = player X
+DecodeArrowMovementRLE::
+ ld a, [hli]
+ cp $ff
+ ret z ; no match in the list
+ cp b
+ jr nz, .nextArrowMovementTileEntry1
+ ld a, [hli]
+ cp c
+ jr nz, .nextArrowMovementTileEntry2
+ ld a, [hli]
+ ld d, [hl]
+ ld e, a
+ ld hl, wSimulatedJoypadStatesEnd
+ call DecodeRLEList
+ dec a
+ ld [wSimulatedJoypadStatesIndex], a
+ ret
+.nextArrowMovementTileEntry1
+ inc hl
+.nextArrowMovementTileEntry2
+ inc hl
+ inc hl
+ jr DecodeArrowMovementRLE
+
+TextScript_ItemStoragePC::
+ call SaveScreenTilesToBuffer2
+ ld b, BANK(PlayerPC)
+ ld hl, PlayerPC
+ jr bankswitchAndContinue
+
+TextScript_BillsPC::
+ call SaveScreenTilesToBuffer2
+ ld b, BANK(BillsPC_)
+ ld hl, BillsPC_
+ jr bankswitchAndContinue
+
+TextScript_GameCornerPrizeMenu::
+; XXX find a better name for this function
+; special_F7
+ ld b, BANK(CeladonPrizeMenu)
+ ld hl, CeladonPrizeMenu
+bankswitchAndContinue::
+ call Bankswitch
+ jp HoldTextDisplayOpen ; continue to main text-engine function
+
+TextScript_PokemonCenterPC::
+ ld b, BANK(ActivatePC)
+ ld hl, ActivatePC
+ jr bankswitchAndContinue
+
+StartSimulatingJoypadStates::
+ xor a
+ ld [wOverrideSimulatedJoypadStatesMask], a
+ ld [wSpritePlayerStateData2MovementByte1], a
+ ld hl, wd730
+ set 7, [hl]
+ ret
+
+IsItemInBag::
+; given an item_id in b
+; set zero flag if item isn't in player's bag
+; else reset zero flag
+; related to Pokémon Tower and ghosts
+ predef GetQuantityOfItemInBag
+ ld a, b
+ and a
+ ret
+
+IsSurfingPikachuInParty::
+; set bit 6 of wd472 if true
+; also calls Func_3467, which is a bankswitch to IsStarterPikachuInOurParty
+ ld a, [wd472]
+ and $3f
+ ld [wd472], a
+ ld hl, wPartyMon1
+ ld c, PARTY_LENGTH
+ ld b, SURF
+.loop
+ ld a, [hl]
+ cp PIKACHU
+ jr nz, .notPikachu
+ push hl
+ ld de, $8
+ add hl, de
+ ld a, [hli]
+ cp b ; does pikachu have surf as one of its moves
+ jr z, .hasSurf
+ ld a, [hli]
+ cp b
+ jr z, .hasSurf
+ ld a, [hli]
+ cp b
+ jr z, .hasSurf
+ ld a, [hli]
+ cp b
+ jr nz, .noSurf
+.hasSurf
+ ld a, [wd472]
+ set 6, a
+ ld [wd472], a
+.noSurf
+ pop hl
+.notPikachu
+ ld de, wPartyMon2 - wPartyMon1
+ add hl, de
+ dec c
+ jr nz, .loop
+ call Func_3467
+ ret
+
+Func_3467::
+ push hl
+ push bc
+ callfar IsStarterPikachuInOurParty
+ pop bc
+ pop hl
+ ret nc
+ ld a, [wd472]
+ set 7, a
+ ld [wd472], a
+ ret
+
+DisplayPokedex::
+ ld [wd11e], a
+ farjp _DisplayPokedex
+
+SetSpriteFacingDirectionAndDelay::
+ call SetSpriteFacingDirection
+ ld c, 6
+ jp DelayFrames
+
+SetSpriteFacingDirection::
+ ld a, SPRITESTATEDATA1_FACINGDIRECTION
+ ldh [hSpriteDataOffset], a
+ call GetPointerWithinSpriteStateData1
+ ldh a, [hSpriteFacingDirection]
+ ld [hl], a
+ ret
+
+SetSpriteImageIndexAfterSettingFacingDirection::
+ ld de, SPRITESTATEDATA1_IMAGEINDEX - SPRITESTATEDATA1_FACINGDIRECTION
+ add hl, de
+ ld [hl], a
+ ret
+
+SpriteFunc_34a1::
+ ldh a, [hSpriteIndex]
+ swap a
+ add $e
+ ld l, a
+ ld h, $c2
+ ld c, [hl]
+ dec c
+ swap c
+ ldh a, [hSpriteOffset]
+ add c
+ ld c, a
+ ldh a, [hSpriteHeight]
+ swap a
+ add $2
+ ld l, a
+ dec h
+ ld [hl], c
+ ret
+
+; tests if the player's coordinates are in a specified array
+; INPUT:
+; hl = address of array
+; OUTPUT:
+; [wCoordIndex] = if there is match, the matching array index
+; sets carry if the coordinates are in the array, clears carry if not
+ArePlayerCoordsInArray::
+ ld a, [wYCoord]
+ ld b, a
+ ld a, [wXCoord]
+ ld c, a
+ ; fallthrough
+
+CheckCoords::
+ xor a
+ ld [wCoordIndex], a
+.loop
+ ld a, [hli]
+ cp $ff ; reached terminator?
+ jr z, .notInArray
+ push hl
+ ld hl, wCoordIndex
+ inc [hl]
+ pop hl
+.compareYCoord
+ cp b
+ jr z, .compareXCoord
+ inc hl
+ jr .loop
+.compareXCoord
+ ld a, [hli]
+ cp c
+ jr nz, .loop
+.inArray
+ scf
+ ret
+.notInArray
+ and a
+ ret
+
+; tests if a boulder's coordinates are in a specified array
+; INPUT:
+; hl = address of array
+; [hSpriteIndex] = index of boulder sprite
+; OUTPUT:
+; [wCoordIndex] = if there is match, the matching array index
+; sets carry if the coordinates are in the array, clears carry if not
+CheckBoulderCoords::
+ push hl
+ ld hl, wSpritePlayerStateData2MapY
+ ldh a, [hSpriteIndex]
+ swap a
+ ld d, $0
+ ld e, a
+ add hl, de
+ ld a, [hli]
+ sub $4 ; because sprite coordinates are offset by 4
+ ld b, a
+ ld a, [hl]
+ sub $4 ; because sprite coordinates are offset by 4
+ ld c, a
+ pop hl
+ jp CheckCoords
+
+GetPointerWithinSpriteStateData1::
+ ld h, HIGH(wSpriteStateData1)
+ jr _GetPointerWithinSpriteStateData
+
+GetPointerWithinSpriteStateData2::
+ ld h, HIGH(wSpriteStateData2)
+
+_GetPointerWithinSpriteStateData:
+ ldh a, [hSpriteDataOffset]
+ ld b, a
+ ldh a, [hSpriteIndex]
+ swap a
+ add b
+ ld l, a
+ ret
+
+; decodes a $ff-terminated RLEncoded list
+; each entry is a pair of bytes <byte value> <repetitions>
+; the final $ff will be replicated in the output list and a contains the number of bytes written
+; de: input list
+; hl: output list
+DecodeRLEList::
+ xor a
+ ld [wRLEByteCount], a ; count written bytes here
+.listLoop
+ ld a, [de]
+ cp $ff
+ jr z, .endOfList
+ ldh [hRLEByteValue], a ; store byte value to be written
+ inc de
+ ld a, [de]
+ ld b, $0
+ ld c, a ; number of bytes to be written
+ ld a, [wRLEByteCount]
+ add c
+ ld [wRLEByteCount], a ; update total number of written bytes
+ ldh a, [hRLEByteValue]
+ call FillMemory ; write a c-times to output
+ inc de
+ jr .listLoop
+.endOfList
+ ld a, $ff
+ ld [hl], a ; write final $ff
+ ld a, [wRLEByteCount]
+ inc a ; include sentinel in counting
+ ret
+
+; sets movement byte 1 for sprite [hSpriteIndex] to $FE and byte 2 to [hSpriteMovementByte2]
+SetSpriteMovementBytesToFE::
+ push hl
+ call GetSpriteMovementByte1Pointer
+ ld [hl], $fe
+ call GetSpriteMovementByte2Pointer
+ ldh a, [hSpriteMovementByte2]
+ ld [hl], a
+ pop hl
+ ret
+
+; sets both movement bytes for sprite [hSpriteIndex] to $FF
+SetSpriteMovementBytesToFF::
+ push hl
+ call GetSpriteMovementByte1Pointer
+ ld [hl], $FF
+ call GetSpriteMovementByte2Pointer
+ ld [hl], $FF ; prevent person from walking?
+ pop hl
+ ret
+
+; returns the sprite movement byte 1 pointer for sprite [hSpriteIndex] in hl
+GetSpriteMovementByte1Pointer::
+ ld h, $C2
+ ldh a, [hSpriteIndex]
+ swap a
+ add 6
+ ld l, a
+ ret
+
+; returns the sprite movement byte 2 pointer for sprite [hSpriteIndex] in hl
+GetSpriteMovementByte2Pointer::
+ push de
+ ld hl, wMapSpriteData
+ ldh a, [hSpriteIndex]
+ dec a
+ add a
+ ld e, a
+ ld d, 0
+ add hl, de
+ pop de
+ ret
diff --git a/home/math.asm b/home/math.asm
new file mode 100644
index 00000000..59eda606
--- /dev/null
+++ b/home/math.asm
@@ -0,0 +1,33 @@
+; function to do multiplication
+; all values are big endian
+; INPUT
+; FF96-FF98 = multiplicand
+; FF99 = multiplier
+; OUTPUT
+; FF95-FF98 = product
+Multiply::
+ push hl
+ push bc
+ callfar _Multiply
+ pop bc
+ pop hl
+ ret
+
+; function to do division
+; all values are big endian
+; INPUT
+; FF95-FF98 = dividend
+; FF99 = divisor
+; b = number of bytes in the dividend (starting from FF95)
+; OUTPUT
+; FF95-FF98 = quotient
+; FF99 = remainder
+Divide::
+ push hl
+ push de
+ push bc
+ homecall _Divide
+ pop bc
+ pop de
+ pop hl
+ ret
diff --git a/home/money.asm b/home/money.asm
new file mode 100644
index 00000000..a62835ea
--- /dev/null
+++ b/home/money.asm
@@ -0,0 +1,15 @@
+HasEnoughMoney::
+; Check if the player has at least as much
+; money as the 3-byte BCD value at hMoney.
+ ld de, wPlayerMoney
+ ld hl, hMoney
+ ld c, 3
+ jp StringCmp
+
+HasEnoughCoins::
+; Check if the player has at least as many
+; coins as the 2-byte BCD value at hCoins.
+ ld de, wPlayerCoins
+ ld hl, hCoins
+ ld c, 2
+ jp StringCmp
diff --git a/home/move_mon.asm b/home/move_mon.asm
new file mode 100644
index 00000000..c766fbd5
--- /dev/null
+++ b/home/move_mon.asm
@@ -0,0 +1,239 @@
+; Copies [hl, bc) to [de, de + bc - hl).
+; In other words, the source data is from hl up to but not including bc,
+; and the destination is de.
+CopyDataUntil::
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, h
+ cp b
+ jr nz, CopyDataUntil
+ ld a, l
+ cp c
+ jr nz, CopyDataUntil
+ ret
+
+; Function to remove a pokemon from the party or the current box.
+; wWhichPokemon determines the pokemon.
+; [wRemoveMonFromBox] == 0 specifies the party.
+; [wRemoveMonFromBox] != 0 specifies the current box.
+RemovePokemon::
+ jpfar _RemovePokemon
+
+AddPartyMon::
+ push hl
+ push de
+ push bc
+ farcall _AddPartyMon
+ pop bc
+ pop de
+ pop hl
+ ret
+
+; calculates all 5 stats of current mon and writes them to [de]
+CalcStats::
+ ld c, $0
+.statsLoop
+ inc c
+ call CalcStat
+ ldh a, [hMultiplicand+1]
+ ld [de], a
+ inc de
+ ldh a, [hMultiplicand+2]
+ ld [de], a
+ inc de
+ ld a, c
+ cp NUM_STATS
+ jr nz, .statsLoop
+ ret
+
+; calculates stat c of current mon
+; c: stat to calc (HP=1,Atk=2,Def=3,Spd=4,Spc=5)
+; b: consider stat exp?
+; hl: base ptr to stat exp values ([hl + 2*c - 1] and [hl + 2*c])
+CalcStat::
+ push hl
+ push de
+ push bc
+ ld a, b
+ ld d, a
+ push hl
+ ld hl, wMonHeader
+ ld b, $0
+ add hl, bc
+ ld a, [hl] ; read base value of stat
+ ld e, a
+ pop hl
+ push hl
+ sla c
+ ld a, d
+ and a
+ jr z, .statExpDone ; consider stat exp?
+ add hl, bc ; skip to corresponding stat exp value
+.statExpLoop ; calculates ceil(Sqrt(stat exp)) in b
+ xor a
+ ldh [hMultiplicand], a
+ ldh [hMultiplicand+1], a
+ inc b ; increment current stat exp bonus
+ ld a, b
+ cp $ff
+ jr z, .statExpDone
+ ldh [hMultiplicand+2], a
+ ldh [hMultiplier], a
+ call Multiply
+ ld a, [hld]
+ ld d, a
+ ldh a, [hProduct + 3]
+ sub d
+ ld a, [hli]
+ ld d, a
+ ldh a, [hProduct + 2]
+ sbc d ; test if (current stat exp bonus)^2 < stat exp
+ jr c, .statExpLoop
+.statExpDone
+ srl c
+ pop hl
+ push bc
+ ld bc, wPartyMon1DVs - (wPartyMon1HPExp - 1) ; also wEnemyMonDVs - wEnemyMonHP
+ add hl, bc
+ pop bc
+ ld a, c
+ cp $2
+ jr z, .getAttackIV
+ cp $3
+ jr z, .getDefenseIV
+ cp $4
+ jr z, .getSpeedIV
+ cp $5
+ jr z, .getSpecialIV
+.getHpIV
+ push bc
+ ld a, [hl] ; Atk IV
+ swap a
+ and $1
+ sla a
+ sla a
+ sla a
+ ld b, a
+ ld a, [hli] ; Def IV
+ and $1
+ sla a
+ sla a
+ add b
+ ld b, a
+ ld a, [hl] ; Spd IV
+ swap a
+ and $1
+ sla a
+ add b
+ ld b, a
+ ld a, [hl] ; Spc IV
+ and $1
+ add b ; HP IV: LSB of the other 4 IVs
+ pop bc
+ jr .calcStatFromIV
+.getAttackIV
+ ld a, [hl]
+ swap a
+ and $f
+ jr .calcStatFromIV
+.getDefenseIV
+ ld a, [hl]
+ and $f
+ jr .calcStatFromIV
+.getSpeedIV
+ inc hl
+ ld a, [hl]
+ swap a
+ and $f
+ jr .calcStatFromIV
+.getSpecialIV
+ inc hl
+ ld a, [hl]
+ and $f
+.calcStatFromIV
+ ld d, $0
+ add e
+ ld e, a
+ jr nc, .noCarry
+ inc d ; de = Base + IV
+.noCarry
+ sla e
+ rl d ; de = (Base + IV) * 2
+ srl b
+ srl b ; b = ceil(Sqrt(stat exp)) / 4
+ ld a, b
+ add e
+ jr nc, .noCarry2
+ inc d ; de = (Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4
+.noCarry2
+ ldh [hMultiplicand+2], a
+ ld a, d
+ ldh [hMultiplicand+1], a
+ xor a
+ ldh [hMultiplicand], a
+ ld a, [wCurEnemyLVL]
+ ldh [hMultiplier], a
+ call Multiply ; ((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level
+ ldh a, [hMultiplicand]
+ ldh [hDividend], a
+ ldh a, [hMultiplicand+1]
+ ldh [hDividend+1], a
+ ldh a, [hMultiplicand+2]
+ ldh [hDividend+2], a
+ ld a, $64
+ ldh [hDivisor], a
+ ld a, $3
+ ld b, a
+ call Divide ; (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100
+ ld a, c
+ cp $1
+ ld a, 5 ; + 5 for non-HP stat
+ jr nz, .notHPStat
+ ld a, [wCurEnemyLVL]
+ ld b, a
+ ldh a, [hMultiplicand+2]
+ add b
+ ldh [hMultiplicand+2], a
+ jr nc, .noCarry3
+ ldh a, [hMultiplicand+1]
+ inc a
+ ldh [hMultiplicand+1], a ; HP: (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 + Level
+.noCarry3
+ ld a, 10 ; +10 for HP stat
+.notHPStat
+ ld b, a
+ ldh a, [hMultiplicand+2]
+ add b
+ ldh [hMultiplicand+2], a
+ jr nc, .noCarry4
+ ldh a, [hMultiplicand+1]
+ inc a ; non-HP: (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 + 5
+ ldh [hMultiplicand+1], a ; HP: (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 + Level + 10
+.noCarry4
+ ldh a, [hMultiplicand+1] ; check for overflow (>999)
+ cp HIGH(MAX_STAT_VALUE) + 1
+ jr nc, .overflow
+ cp HIGH(MAX_STAT_VALUE)
+ jr c, .noOverflow
+ ldh a, [hMultiplicand+2]
+ cp LOW(MAX_STAT_VALUE) + 1
+ jr c, .noOverflow
+.overflow
+ ld a, HIGH(MAX_STAT_VALUE) ; overflow: cap at 999
+ ldh [hMultiplicand+1], a
+ ld a, LOW(MAX_STAT_VALUE)
+ ldh [hMultiplicand+2], a
+.noOverflow
+ pop bc
+ pop de
+ pop hl
+ ret
+
+AddEnemyMonToPlayerParty::
+ homecall_sf _AddEnemyMonToPlayerParty
+ ret
+
+MoveMon::
+ homecall_sf _MoveMon
+ ret
diff --git a/home/names.asm b/home/names.asm
new file mode 100644
index 00000000..f7751fa0
--- /dev/null
+++ b/home/names.asm
@@ -0,0 +1,141 @@
+GetMonName::
+ push hl
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, BANK(MonsterNames)
+ ldh [hLoadedROMBank], a
+ ld [MBC1RomBank], a
+ ld a, [wd11e]
+ dec a
+ ld hl, MonsterNames
+ ld c, 10
+ ld b, 0
+ call AddNTimes
+ ld de, wcd6d
+ push de
+ ld bc, 10
+ call CopyData
+ ld hl, wcd6d + 10
+ ld [hl], "@"
+ pop de
+ pop af
+ ldh [hLoadedROMBank], a
+ ld [MBC1RomBank], a
+ pop hl
+ ret
+
+GetItemName::
+; given an item ID at [wd11e], store the name of the item into a string
+; starting at wcd6d
+ push hl
+ push bc
+ ld a, [wd11e]
+ cp HM01 ; is this a TM/HM?
+ jr nc, .Machine
+
+ ld [wd0b5], a
+ ld a, ITEM_NAME
+ ld [wNameListType], a
+ ld a, BANK(ItemNames)
+ ld [wPredefBank], a
+ call GetName
+ jr .Finish
+
+.Machine
+ call GetMachineName
+.Finish
+ ld de, wcd6d ; pointer to where item name is stored in RAM
+ pop bc
+ pop hl
+ ret
+
+GetMachineName::
+; copies the name of the TM/HM in [wd11e] to wcd6d
+ push hl
+ push de
+ push bc
+ ld a, [wd11e]
+ push af
+ cp TM01 ; is this a TM? [not HM]
+ jr nc, .WriteTM
+; if HM, then write "HM" and add NUM_HMS to the item ID, so we can reuse the
+; TM printing code
+ add NUM_HMS
+ ld [wd11e], a
+ ld hl, HiddenPrefix ; points to "HM"
+ ld bc, 2
+ jr .WriteMachinePrefix
+.WriteTM
+ ld hl, TechnicalPrefix ; points to "TM"
+ ld bc, 2
+.WriteMachinePrefix
+ ld de, wcd6d
+ call CopyData
+
+; now get the machine number and convert it to text
+ ld a, [wd11e]
+ sub TM01 - 1
+ ld b, "0"
+.FirstDigit
+ sub 10
+ jr c, .SecondDigit
+ inc b
+ jr .FirstDigit
+.SecondDigit
+ add 10
+ push af
+ ld a, b
+ ld [de], a
+ inc de
+ pop af
+ ld b, "0"
+ add b
+ ld [de], a
+ inc de
+ ld a, "@"
+ ld [de], a
+ pop af
+ ld [wd11e], a
+ pop bc
+ pop de
+ pop hl
+ ret
+
+TechnicalPrefix::
+ db "TM"
+HiddenPrefix::
+ db "HM"
+
+; sets carry if item is HM, clears carry if item is not HM
+; Input: a = item ID
+IsItemHM::
+ cp HM01
+ jr c, .notHM
+ cp TM01
+ ret
+.notHM
+ and a
+ ret
+
+; sets carry if move is an HM, clears carry if move is not an HM
+; Input: a = move ID
+IsMoveHM::
+ ld hl, HMMoves
+ ld de, 1
+ jp IsInArray
+
+HMMoves::
+INCLUDE "data/moves/hm_moves.asm"
+
+GetMoveName::
+ push hl
+ ld a, MOVE_NAME
+ ld [wNameListType], a
+ ld a, [wd11e]
+ ld [wd0b5], a
+ ld a, BANK(MoveNames)
+ ld [wPredefBank], a
+ call GetName
+ ld de, wcd6d ; pointer to where move name is stored in RAM
+ pop hl
+ ret
diff --git a/home/names2.asm b/home/names2.asm
new file mode 100644
index 00000000..9c8ca00c
--- /dev/null
+++ b/home/names2.asm
@@ -0,0 +1,92 @@
+NamePointers::
+; entries correspond to *_NAME constants
+ dw MonsterNames
+ dw MoveNames
+ dw UnusedBadgeNames
+ dw ItemNames
+ dw wPartyMonOT ; player's OT names list
+ dw wEnemyMonOT ; enemy's OT names list
+ dw TrainerNames
+
+GetName::
+; arguments:
+; [wd0b5] = which name
+; [wNameListType] = which list
+; [wPredefBank] = bank of list
+;
+; returns pointer to name in de
+ ld a, [wd0b5]
+ ld [wd11e], a
+
+ ; TM names are separate from item names.
+ ; BUG: This applies to all names instead of just items.
+ cp HM01
+ jp nc, GetMachineName
+
+ ldh a, [hLoadedROMBank]
+ push af
+ push hl
+ push bc
+ push de
+ ld a, [wNameListType] ;List3759_entrySelector
+ dec a
+ jr nz, .otherEntries
+ ;1 = MON_NAMES
+ call GetMonName
+ ld hl, NAME_LENGTH
+ add hl, de
+ ld e, l
+ ld d, h
+ jr .gotPtr
+.otherEntries
+ ;2-7 = OTHER ENTRIES
+ ld a, [wPredefBank]
+ call BankswitchCommon
+ ld a, [wNameListType] ;VariousNames' entryID
+ dec a
+ add a
+ ld d, 0
+ ld e, a
+ jr nc, .skip
+ inc d
+.skip
+ ld hl, NamePointers
+ add hl, de
+ ld a, [hli]
+ ldh [hSwapTemp + 1], a
+ ld a, [hl]
+ ldh [hSwapTemp], a
+ ldh a, [hSwapTemp]
+ ld h, a
+ ldh a, [hSwapTemp + 1]
+ ld l, a
+ ld a, [wd0b5]
+ ld b, a
+ ld c, 0
+.nextName
+ ld d, h
+ ld e, l
+.nextChar
+ ld a, [hli]
+ cp "@"
+ jr nz, .nextChar
+ inc c ;entry counter
+ ld a, b ;wanted entry
+ cp c
+ jr nz, .nextName
+ ld h, d
+ ld l, e
+ ld de, wcd6d
+ ld bc, $14
+ call CopyData
+.gotPtr
+ ld a, e
+ ld [wUnusedCF8D], a
+ ld a, d
+ ld [wUnusedCF8D + 1], a
+ pop de
+ pop bc
+ pop hl
+ pop af
+ call BankswitchCommon
+ ret
diff --git a/home/npc_movement.asm b/home/npc_movement.asm
new file mode 100644
index 00000000..200d3983
--- /dev/null
+++ b/home/npc_movement.asm
@@ -0,0 +1,52 @@
+; not zero if an NPC movement script is running, the player character is
+; automatically stepping down from a door, or joypad states are being simulated
+IsPlayerCharacterBeingControlledByGame::
+ ld a, [wNPCMovementScriptPointerTableNum]
+ and a
+ ret nz
+ ld a, [wd736]
+ bit 1, a ; currently stepping down from door bit
+ ret nz
+ ld a, [wd730]
+ and $80
+ ret
+
+RunNPCMovementScript::
+ ld hl, wd736
+ bit 0, [hl]
+ res 0, [hl]
+ jr nz, .playerStepOutFromDoor
+ ld a, [wNPCMovementScriptPointerTableNum]
+ and a
+ ret z
+ dec a
+ add a
+ ld d, 0
+ ld e, a
+ ld hl, .NPCMovementScriptPointerTables
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, [wNPCMovementScriptBank]
+ call BankswitchCommon
+ ld a, [wNPCMovementScriptFunctionNum]
+ call CallFunctionInTable
+ pop af
+ call BankswitchCommon
+ ret
+
+.NPCMovementScriptPointerTables
+ dw PalletMovementScriptPointerTable
+ dw PewterMuseumGuyMovementScriptPointerTable
+ dw PewterGymGuyMovementScriptPointerTable
+.playerStepOutFromDoor
+ farjp PlayerStepOutFromDoor
+
+EndNPCMovementScript::
+ farjp _EndNPCMovementScript
+
+DebugPressedOrHeldB::
+ ret
diff --git a/home/oam.asm b/home/oam.asm
new file mode 100644
index 00000000..8a940d97
--- /dev/null
+++ b/home/oam.asm
@@ -0,0 +1,36 @@
+; INPUT:
+; a = oam block index (each block is 4 oam entries)
+; b = Y coordinate of upper left corner of sprite
+; c = X coordinate of upper left corner of sprite
+; de = base address of 4 tile number and attribute pairs
+WriteOAMBlock::
+ ld h, HIGH(wOAMBuffer)
+ swap a ; multiply by 16
+ ld l, a
+ call .writeOneEntry ; upper left
+ push bc
+ ld a, 8
+ add c
+ ld c, a
+ call .writeOneEntry ; upper right
+ pop bc
+ ld a, 8
+ add b
+ ld b, a
+ call .writeOneEntry ; lower left
+ ld a, 8
+ add c
+ ld c, a
+ ; lower right
+.writeOneEntry
+ ld [hl], b ; Y coordinate
+ inc hl
+ ld [hl], c ; X coordinate
+ inc hl
+ ld a, [de] ; tile number
+ inc de
+ ld [hli], a
+ ld a, [de] ; attribute
+ inc de
+ ld [hli], a
+ ret
diff --git a/home/overworld.asm b/home/overworld.asm
index 8608cbfe..0cd63cf7 100644
--- a/home/overworld.asm
+++ b/home/overworld.asm
@@ -3,7 +3,7 @@ EnterMap::
ld a, $ff
ld [wJoyIgnore], a
call LoadMapData
- callba ClearVariablesOnEnterMap
+ farcall ClearVariablesOnEnterMap
ld hl, wd72c
bit 0, [hl] ; has the player already made 3 steps since the last battle?
jr z, .skipGivingThreeStepsOfNoRandomBattles
@@ -19,7 +19,7 @@ EnterMap::
ld a, [hl]
and 1 << 4 | 1 << 3 ; fly warp or dungeon warp
jr z, .didNotEnterUsingFlyWarpOrDungeonWarp
- callba EnterMapAnim
+ farcall EnterMapAnim
call UpdateSprites
ld hl, wd732
res 3, [hl]
@@ -27,7 +27,7 @@ EnterMap::
res 4, [hl]
.didNotEnterUsingFlyWarpOrDungeonWarp
call IsSurfingPikachuInParty
- callba CheckForceBikeOrSurf ; handle currents in SF islands and forced bike riding in cycling road
+ farcall CheckForceBikeOrSurf ; handle currents in SF islands and forced bike riding in cycling road
ld hl, wd732
bit 4, [hl]
res 4, [hl]
@@ -51,7 +51,7 @@ OverworldLoopLessDelay::
and a
jp nz, .moveAhead ; if the player sprite has not yet completed the walking animation
call JoypadOverworld ; get joypad state (which is possibly simulated)
- callba SafariZoneCheck
+ farcall SafariZoneCheck
ld a, [wSafariZoneGameOver]
and a
jp nz, WarpFound2
@@ -68,16 +68,16 @@ OverworldLoopLessDelay::
ld a, [wd730]
bit 7, a ; are we simulating button presses?
jr z, .notSimulating
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
jr .checkIfStartIsPressed
.notSimulating
- ld a, [hJoyPressed]
+ ldh a, [hJoyPressed]
.checkIfStartIsPressed
bit 3, a ; start button
jr z, .startButtonNotPressed
; if START is pressed
- xor a
- ld [hSpriteIndexOrTextID], a ; start menu text ID
+ xor a ; TEXT_START_MENU
+ ldh [hSpriteIndexOrTextID], a
jp .displayDialogue
.startButtonNotPressed
bit 0, a ; A button
@@ -89,14 +89,14 @@ OverworldLoopLessDelay::
call IsPlayerCharacterBeingControlledByGame
jr nz, .checkForOpponent
call CheckForHiddenObjectOrBookshelfOrCardKeyDoor
- ld a, [$ffeb]
+ ldh a, [hItemAlreadyFound]
and a
jp z, OverworldLoop ; jump if a hidden object or bookshelf was found, but not if a card key door was found
xor a
ld [wd436], a ; new yellow address
call IsSpriteOrSignInFrontOfPlayer
call Func_0ffe
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
and a
jp z, OverworldLoop
.displayDialogue
@@ -107,7 +107,7 @@ OverworldLoopLessDelay::
jr nz, .checkForOpponent
bit 0, a
jr nz, .checkForOpponent
- aCoord 8, 9
+ lda_coord 8, 9
ld [wTilePlayerStandingOn], a ; unused?
call DisplayTextID ; display either the start menu or the NPC/sign text
ld a, [wEnteringCableClub]
@@ -141,11 +141,11 @@ OverworldLoopLessDelay::
jp OverworldLoop
.checkIfDownButtonIsPressed
- ld a, [hJoyHeld] ; current joypad state
+ ldh a, [hJoyHeld] ; current joypad state
bit 7, a ; down button
jr z, .checkIfUpButtonIsPressed
ld a, 1
- ld [wSpriteStateData1 + 3], a ; delta Y
+ ld [wSpritePlayerStateData1YStepVector], a
ld a, PLAYER_DIR_DOWN
jr .handleDirectionButtonPress
@@ -153,7 +153,7 @@ OverworldLoopLessDelay::
bit 6, a ; up button
jr z, .checkIfLeftButtonIsPressed
ld a, -1
- ld [wSpriteStateData1 + 3], a ; delta Y
+ ld [wSpritePlayerStateData1YStepVector], a
ld a, PLAYER_DIR_UP
jr .handleDirectionButtonPress
@@ -161,7 +161,7 @@ OverworldLoopLessDelay::
bit 5, a ; left button
jr z, .checkIfRightButtonIsPressed
ld a, -1
- ld [wSpriteStateData1 + 5], a ; delta X
+ ld [wSpritePlayerStateData1XStepVector], a
ld a, PLAYER_DIR_LEFT
jr .handleDirectionButtonPress
@@ -169,7 +169,7 @@ OverworldLoopLessDelay::
bit 4, a ; right button
jr z, .noDirectionButtonsPressed
ld a, 1
- ld [wSpriteStateData1 + 5], a ; delta X
+ ld [wSpritePlayerStateData1XStepVector], a
ld a, 1
.handleDirectionButtonPress
@@ -228,7 +228,7 @@ OverworldLoopLessDelay::
.noCollision
ld a, $08
ld [wWalkCounter], a
- callab Func_fcc08
+ callfar Func_fcc08
jr .moveAhead2
.moveAhead
@@ -249,7 +249,7 @@ OverworldLoopLessDelay::
call StepCountCheck
CheckEvent EVENT_IN_SAFARI_ZONE ; in the safari zone?
jr z, .notSafariZone
- callba SafariZoneCheckSteps
+ farcall SafariZoneCheckSteps
ld a, [wSafariZoneGameOver]
and a
jp nz, WarpFound2
@@ -275,7 +275,7 @@ OverworldLoopLessDelay::
set 5, [hl]
set 6, [hl]
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, [wCurMap]
cp CINNABAR_GYM
jr nz, .notCinnabarGym
@@ -286,7 +286,7 @@ OverworldLoopLessDelay::
ld a, [wCurMap]
cp OAKS_LAB
jp z, .noFaintCheck ; no blacking out if the player lost to the rival in Oak's lab
- callab AnyPartyAlive
+ callfar AnyPartyAlive
ld a, d
and a
jr z, AllPokemonFainted
@@ -330,7 +330,7 @@ NewBattle::
ld a, [wd72e]
bit 4, a
jr nz, .noBattle
- jpba InitBattle
+ farjp InitBattle
.noBattle
and a
ret
@@ -349,7 +349,7 @@ DoBikeSpeedup::
ld a, [wCurMap]
cp ROUTE_17 ; Cycling Road
jr nz, .goFaster
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
and D_UP | D_LEFT | D_RIGHT
ret nz
.goFaster
@@ -381,7 +381,7 @@ CheckWarpsNoCollisionLoop::
push bc
ld hl, wd736
set 2, [hl] ; standing on warp flag
- callba IsPlayerStandingOnDoorTileOrWarpTile
+ farcall IsPlayerStandingOnDoorTileOrWarpTile
pop bc
pop hl
jr c, WarpFound1 ; jump if standing on door or warp
@@ -400,7 +400,7 @@ CheckWarpsNoCollisionLoop::
call Joypad
pop bc
pop de
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
and D_DOWN | D_UP | D_LEFT | D_RIGHT
jr z, CheckWarpsNoCollisionRetry2 ; if directional buttons aren't being pressed, do not pass through the warp
jr WarpFound1
@@ -435,7 +435,7 @@ CheckWarpsCollision::
ld a, [hli]
ld [wDestinationWarpID], a
ld a, [hl]
- ld [hWarpDestinationMap], a
+ ldh [hWarpDestinationMap], a
jr WarpFound2
.retry1
inc hl
@@ -450,7 +450,7 @@ WarpFound1::
ld a, [hli]
ld [wDestinationWarpID], a
ld a, [hli]
- ld [hWarpDestinationMap], a
+ ldh [hWarpDestinationMap], a
WarpFound2::
ld a, [wNumberOfWarps]
@@ -465,7 +465,7 @@ WarpFound2::
ld [wLastMap], a
ld a, [wCurMapWidth]
ld [wUnusedD366], a ; not read
- ld a, [hWarpDestinationMap]
+ ldh a, [hWarpDestinationMap]
ld [wCurMap], a
cp ROCK_TUNNEL_1F
jr nz, .notRockTunnel
@@ -473,19 +473,19 @@ WarpFound2::
ld [wMapPalOffset], a
call GBFadeOutToBlack
.notRockTunnel
- callab SetPikachuSpawnOutside
+ callfar SetPikachuSpawnOutside
call PlayMapChangeSound
jr .done
; for maps that can have the 0xFF destination map, which means to return to the outside map
; not all these maps are necessarily indoors, though
.indoorMaps
- ld a, [hWarpDestinationMap] ; destination map
- cp $ff
+ ldh a, [hWarpDestinationMap] ; destination map
+ cp LAST_MAP
jr z, .goBackOutside
; if not going back to the previous map
ld [wCurMap], a
- callba IsPlayerStandingOnWarpPadOrHole
+ farcall IsPlayerStandingOnWarpPadOrHole
ld a, [wStandingOnWarpPadOrHole]
dec a ; is the player on a warp pad?
jr nz, .notWarpPad
@@ -500,11 +500,11 @@ WarpFound2::
ld hl, wd736
res 0, [hl]
res 1, [hl]
- callab SetPikachuSpawnWarpPad
+ callfar SetPikachuSpawnWarpPad
jr .done
.goBackOutside
- callab SetPikachuSpawnBackOutside
+ callfar SetPikachuSpawnBackOutside
ld a, [wLastMap]
ld [wCurMap], a
call PlayMapChangeSound
@@ -654,7 +654,7 @@ CheckMapConnections::
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.
+; x#SPRITESTATEDATA2_IMAGEBASEOFFSET without loading any tile patterns.
call InitMapSprites
call LoadTileBlockMap
jp OverworldLoopLessDelay
@@ -669,7 +669,7 @@ PlayMapChangeSound::
jr z, .didNotGoThroughDoor
cp CEMETERY
jr z, .didNotGoThroughDoor
- aCoord 8, 8 ; upper left tile of the 4x4 square the player's sprite is standing on
+ lda_coord 8, 8 ; upper left tile of the 4x4 square the player's sprite is standing on
cp $0b ; door tile in tileset 0
jr nz, .didNotGoThroughDoor
ld a, SFX_GO_INSIDE
@@ -728,7 +728,7 @@ ExtraWarpCheck::
jp Bankswitch
MapEntryAfterBattle::
- callba IsPlayerStandingOnWarp ; for enabling warp testing after collisions
+ farcall IsPlayerStandingOnWarp ; for enabling warp testing after collisions
ld a, [wMapPalOffset]
and a
jp z, GBFadeInFromWhite
@@ -744,7 +744,7 @@ HandleBlackOut::
ld hl, wd72e
res 5, [hl]
switchbank SpecialWarpIn ; also Bank(SpecialEnterMap)
- callab ResetStatusAndHalveMoneyOnBlackout
+ callfar ResetStatusAndHalveMoneyOnBlackout
call SpecialWarpIn
call PlayDefaultMusicFadeOutCurrent
jp SpecialEnterMap
@@ -774,7 +774,7 @@ HandleFlyWarpOrDungeonWarp::
jp SpecialEnterMap
LeaveMapAnim::
- jpba _LeaveMapAnim
+ farjp _LeaveMapAnim
Func_07c4::
ld a, [wWalkBikeSurfState]
@@ -799,7 +799,7 @@ LoadPlayerSpriteGraphics::
dec a
jr z, .ridingBike
- ld a, [hTilesetType]
+ ldh a, [hTilesetType]
and a
jr nz, .determineGraphics
jr .startWalking
@@ -853,7 +853,7 @@ IsBikeRidingAllowed::
scf
ret
-INCLUDE "data/bike_riding_tilesets.asm"
+INCLUDE "data/tilesets/bike_riding_tilesets.asm"
; load the tile pattern data of the current tileset into VRAM
LoadTilesetTilePatternData::
@@ -878,9 +878,9 @@ LoadTileBlockMap::
; 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, [wCurMapWidth]
- ld [hMapWidth], a
+ ldh [hMapWidth], a
add MAP_BORDER * 2 ; east and west
- ld [hMapStride], a ; map width + border
+ ldh [hMapStride], a ; map width + border
ld b, 0
ld c, a
; make space for north border (next 3 lines)
@@ -897,7 +897,7 @@ LoadTileBlockMap::
ld b, a
.rowLoop ; copy one row each iteration
push hl
- ld a, [hMapWidth] ; map width (without border)
+ ldh a, [hMapWidth] ; map width (without border)
ld c, a
.rowInnerLoop
ld a, [de]
@@ -907,7 +907,7 @@ LoadTileBlockMap::
jr nz, .rowInnerLoop
; add the map width plus the border to the base address of the current row to get the next row's address
pop hl
- ld a, [hMapStride] ; map width + border
+ ldh a, [hMapStride] ; map width + border
add l
ld l, a
jr nc, .noCarry
@@ -929,9 +929,9 @@ LoadTileBlockMap::
ld a, [wNorthConnectionStripDest + 1]
ld d, a
ld a, [wNorthConnectionStripWidth]
- ld [hNorthSouthConnectionStripWidth], a
+ ldh [hNorthSouthConnectionStripWidth], a
ld a, [wNorthConnectedMapWidth]
- ld [hNorthSouthConnectedMapWidth], a
+ ldh [hNorthSouthConnectedMapWidth], a
call LoadNorthSouthConnectionsTileMap
.southConnection
ld a, [wMapConn2Ptr]
@@ -947,9 +947,9 @@ LoadTileBlockMap::
ld a, [wSouthConnectionStripDest + 1]
ld d, a
ld a, [wSouthConnectionStripWidth]
- ld [hNorthSouthConnectionStripWidth], a
+ ldh [hNorthSouthConnectionStripWidth], a
ld a, [wSouthConnectedMapWidth]
- ld [hNorthSouthConnectedMapWidth], a
+ ldh [hNorthSouthConnectedMapWidth], a
call LoadNorthSouthConnectionsTileMap
.westConnection
ld a, [wMapConn3Ptr]
@@ -967,7 +967,7 @@ LoadTileBlockMap::
ld a, [wWestConnectionStripHeight]
ld b, a
ld a, [wWestConnectedMapWidth]
- ld [hEastWestConnectedMapWidth], a
+ ldh [hEastWestConnectedMapWidth], a
call LoadEastWestConnectionsTileMap
.eastConnection
ld a, [wMapConn4Ptr]
@@ -985,7 +985,7 @@ LoadTileBlockMap::
ld a, [wEastConnectionStripHeight]
ld b, a
ld a, [wEastConnectedMapWidth]
- ld [hEastWestConnectedMapWidth], a
+ ldh [hEastWestConnectedMapWidth], a
call LoadEastWestConnectionsTileMap
.done
ret
@@ -995,7 +995,7 @@ LoadNorthSouthConnectionsTileMap::
.loop
push de
push hl
- ld a, [hNorthSouthConnectionStripWidth]
+ ldh a, [hNorthSouthConnectionStripWidth]
ld b, a
.innerLoop
ld a, [hli]
@@ -1005,7 +1005,7 @@ LoadNorthSouthConnectionsTileMap::
jr nz, .innerLoop
pop hl
pop de
- ld a, [hNorthSouthConnectedMapWidth]
+ ldh a, [hNorthSouthConnectedMapWidth]
add l
ld l, a
jr nc, .noCarry1
@@ -1034,7 +1034,7 @@ LoadEastWestConnectionsTileMap::
jr nz, .innerLoop
pop de
pop hl
- ld a, [hEastWestConnectedMapWidth]
+ ldh a, [hEastWestConnectedMapWidth]
add l
ld l, a
jr nc, .noCarry1
@@ -1055,7 +1055,7 @@ LoadEastWestConnectionsTileMap::
; if so, carry is set. otherwise, carry is cleared
IsSpriteOrSignInFrontOfPlayer::
xor a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
ld a, [wNumSigns]
and a
jr z, .extendRangeOverCounter
@@ -1081,7 +1081,7 @@ IsSpriteInFrontOfPlayer::
ld d, $10 ; talking range in pixels (normal range)
IsSpriteInFrontOfPlayer2::
lb bc, $3c, $40 ; Y and X position of player sprite
- ld a, [wSpritePlayerStateData1FacingDirection] ; direction the player is facing
+ ld a, [wSpritePlayerStateData1FacingDirection]
.checkIfPlayerFacingUp
cp SPRITE_FACING_UP
jr nz, .checkIfPlayerFacingDown
@@ -1120,7 +1120,7 @@ IsSpriteInFrontOfPlayer2::
ld a, PLAYER_DIR_LEFT
.doneCheckingDirection
ld [wPlayerDirection], a
- ld hl, wSpriteStateData1 + $10
+ ld hl, wSprite01StateData1
; yellow does not have the "if sprites are existant" check
ld e, $01
ld d, $f
@@ -1157,11 +1157,11 @@ IsSpriteInFrontOfPlayer2::
ld a, l
and $f0
inc a
- ld l, a ; hl = $c1x1
+ ld l, a ; hl = x#SPRITESTATEDATA1_MOVEMENTSTATUS
set 7, [hl] ; set flag to make the sprite face the player
ld a, e
- ld [hSpriteIndexOrTextID], a
- ld a, [hSpriteIndexOrTextID] ; possible useless read because a already has the value of the read address
+ ldh [hSpriteIndexOrTextID], a
+ ldh a, [hSpriteIndexOrTextID] ; possible useless read because a already has the value of the read address
cp $f
jr nz, .dontwritetowd436
ld a, $FF
@@ -1197,7 +1197,7 @@ SignLoop::
dec c
add hl, bc
ld a, [hl]
- ld [hSpriteIndexOrTextID], a ; store sign text ID
+ ldh [hSpriteIndexOrTextID], a ; store sign text ID
pop bc
pop hl
scf
@@ -1221,16 +1221,16 @@ CollisionCheckOnLand::
jr nz, .noCollision ; no collisions when the player's movements are being controlled by the game
ld a, [wPlayerDirection] ; the direction that the player is trying to go in
ld d, a
- ld a, [wSpriteStateData1 + 12] ; the player sprite's collision data (bit field) (set in the sprite movement code)
+ ld a, [wSpritePlayerStateData1CollisionData]
and d ; check if a sprite is in the direction the player is trying to go
nop ; ??? why is this in the code
jr nz, .collision
xor a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call IsSpriteInFrontOfPlayer ; check for sprite collisions again? when does the above check fail to detect a sprite collision?
jr nc, .asm_0a5c
res 7, [hl]
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
and a ; was there a sprite collision?
jr z, .asm_0a5c
; if no sprite collision
@@ -1238,7 +1238,7 @@ CollisionCheckOnLand::
jr nz, .collision
call CheckPikachuFollowingPlayer
jr nz, .collision
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
and $2
jr nz, .asm_0a5c
ld hl, wd435
@@ -1284,7 +1284,7 @@ CheckForJumpingAndTilePairCollisions::
predef GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player
push de
push bc
- callba HandleLedges ; check if the player is trying to jump a ledge
+ farcall HandleLedges ; check if the player is trying to jump a ledge
pop bc
pop de
pop hl
@@ -1295,7 +1295,7 @@ CheckForJumpingAndTilePairCollisions::
; if not jumping
CheckForTilePairCollisions2::
- aCoord 8, 9 ; tile the player is on
+ lda_coord 8, 9 ; tile the player is on
ld [wTilePlayerStandingOn], a
CheckForTilePairCollisions::
@@ -1343,34 +1343,11 @@ CheckForTilePairCollisions::
and a
ret
-; FORMAT: tileset number, tile 1, tile 2
-; terminated by 0xFF
-; these entries indicate that the player may not cross between tile 1 and tile 2
-; it's mainly used to simulate differences in elevation
-
-TilePairCollisionsLand::
- db CAVERN, $20, $05
- db CAVERN, $41, $05
- db FOREST, $30, $2E
- db CAVERN, $2A, $05
- db CAVERN, $05, $21
- db FOREST, $52, $2E
- db FOREST, $55, $2E
- db FOREST, $56, $2E
- db FOREST, $20, $2E
- db FOREST, $5E, $2E
- db FOREST, $5F, $2E
- db $FF
-
-TilePairCollisionsWater::
- db FOREST, $14, $2E
- db FOREST, $48, $2E
- db CAVERN, $14, $05
- db $FF
+INCLUDE "data/tilesets/pair_collision_tile_ids.asm"
; this builds a tile map from the tile block map based on the current X/Y coordinates of the player's character
LoadCurrentMapView::
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, [wTilesetBank] ; tile data ROM bank
call BankswitchCommon ; switch to ROM bank that contains tile data
@@ -1421,21 +1398,21 @@ LoadCurrentMapView::
dec b
jr nz, .rowLoop
ld hl, wTileMapBackup
- ld bc, $0000
+ ld bc, $0
.adjustForYCoordWithinTileBlock
ld a, [wYBlockCoord]
and a
jr z, .adjustForXCoordWithinTileBlock
- ld bc, $0030
+ ld bc, $30
add hl, bc
.adjustForXCoordWithinTileBlock
ld a, [wXBlockCoord]
and a
jr z, .copyToVisibleAreaBuffer
- ld bc, $0002
+ ld bc, $2
add hl, bc
.copyToVisibleAreaBuffer
- coord de, 0, 0 ; base address for the tiles that are directly transferred to VRAM during V-blank
+ decoord 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
@@ -1473,14 +1450,14 @@ AdvancePlayerSprite::
; the portion of the map that was newly exposed due to the player's movement
ScheduleNorthRowRedraw::
- coord hl, 0, 0
+ hlcoord 0, 0
call CopyToRedrawRowOrColumnSrcTiles
ld a, [wMapViewVRAMPointer]
- ld [hRedrawRowOrColumnDest], a
+ ldh [hRedrawRowOrColumnDest], a
ld a, [wMapViewVRAMPointer + 1]
- ld [hRedrawRowOrColumnDest + 1], a
+ ldh [hRedrawRowOrColumnDest + 1], a
ld a, REDRAW_ROW
- ld [hRedrawRowOrColumnMode], a
+ ldh [hRedrawRowOrColumnMode], a
ret
CopyToRedrawRowOrColumnSrcTiles::
@@ -1495,26 +1472,26 @@ CopyToRedrawRowOrColumnSrcTiles::
ret
ScheduleSouthRowRedraw::
- coord hl, 0, 16
+ hlcoord 0, 16
call CopyToRedrawRowOrColumnSrcTiles
ld a, [wMapViewVRAMPointer]
ld l, a
ld a, [wMapViewVRAMPointer + 1]
ld h, a
- ld bc, $0200
+ ld bc, $200
add hl, bc
ld a, h
and $03
or $98
- ld [hRedrawRowOrColumnDest + 1], a
+ ldh [hRedrawRowOrColumnDest + 1], a
ld a, l
- ld [hRedrawRowOrColumnDest], a
+ ldh [hRedrawRowOrColumnDest], a
ld a, REDRAW_ROW
- ld [hRedrawRowOrColumnMode], a
+ ldh [hRedrawRowOrColumnMode], a
ret
ScheduleEastColumnRedraw::
- coord hl, 18, 0
+ hlcoord 18, 0
call ScheduleColumnRedrawHelper
ld a, [wMapViewVRAMPointer]
ld c, a
@@ -1524,11 +1501,11 @@ ScheduleEastColumnRedraw::
add 18
and $1f
or b
- ld [hRedrawRowOrColumnDest], a
+ ldh [hRedrawRowOrColumnDest], a
ld a, [wMapViewVRAMPointer + 1]
- ld [hRedrawRowOrColumnDest + 1], a
+ ldh [hRedrawRowOrColumnDest + 1], a
ld a, REDRAW_COL
- ld [hRedrawRowOrColumnMode], a
+ ldh [hRedrawRowOrColumnMode], a
ret
ScheduleColumnRedrawHelper::
@@ -1552,14 +1529,14 @@ ScheduleColumnRedrawHelper::
ret
ScheduleWestColumnRedraw::
- coord hl, 0, 0
+ hlcoord 0, 0
call ScheduleColumnRedrawHelper
ld a, [wMapViewVRAMPointer]
- ld [hRedrawRowOrColumnDest], a
+ ldh [hRedrawRowOrColumnDest], a
ld a, [wMapViewVRAMPointer + 1]
- ld [hRedrawRowOrColumnDest + 1], a
+ ldh [hRedrawRowOrColumnDest + 1], a
ld a, REDRAW_COL
- ld [hRedrawRowOrColumnMode], a
+ ldh [hRedrawRowOrColumnMode], a
ret
; function to write the tiles that make up a tile block to memory
@@ -1597,7 +1574,7 @@ DrawTileBlock::
ld a, [de]
ld [hl], a
inc de
- ld bc, $0015
+ ld bc, $15
add hl, bc
pop bc
dec c
@@ -1607,8 +1584,8 @@ DrawTileBlock::
; function to update joypad state and simulate button presses
JoypadOverworld::
xor a
- ld [wSpriteStateData1 + 3], a
- ld [wSpriteStateData1 + 5], a
+ ld [wSpritePlayerStateData1YStepVector], a
+ ld [wSpritePlayerStateData1XStepVector], a
call RunMapScript
call Joypad
call ForceBikeDown
@@ -1622,11 +1599,11 @@ ForceBikeDown::
ld a, [wCurMap]
cp ROUTE_17 ; Cycling Road
ret nz
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
and D_DOWN | D_UP | D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON
ret nz
ld a, D_DOWN
- ld [hJoyHeld], a ; on the cycling road, if there isn't a trainer and the player isn't pressing buttons, simulate a down press
+ ldh [hJoyHeld], a ; on the cycling road, if there isn't a trainer and the player isn't pressing buttons, simulate a down press
ret
AreInputsSimulated::
@@ -1634,18 +1611,18 @@ AreInputsSimulated::
bit 7, a
ret z
; if simulating button presses
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
ld b, a
ld a, [wOverrideSimulatedJoypadStatesMask] ; bit mask for button presses that override simulated ones
and b
ret nz ; return if the simulated button presses are overridden
call GetSimulatedInput
jr nc, .doneSimulating
- ld [hJoyHeld], a ; store simulated button press in joypad state
+ ldh [hJoyHeld], a ; store simulated button press in joypad state
and a
ret nz
- ld [hJoyPressed], a
- ld [hJoyReleased], a
+ ldh [hJoyPressed], a
+ ldh [hJoyReleased], a
ret
; if done simulating button presses
@@ -1655,7 +1632,7 @@ AreInputsSimulated::
ld [wSimulatedJoypadStatesIndex], a
ld [wSimulatedJoypadStatesEnd], a
ld [wJoyIgnore], a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld hl, wd736
ld a, [hl]
and $f8
@@ -1694,14 +1671,14 @@ CollisionCheckOnWater::
jp nz, .noCollision ; return and clear carry if button presses are being simulated
ld a, [wPlayerDirection] ; the direction that the player is trying to go in
ld d, a
- ld a, [wSpriteStateData1 + 12] ; the player sprite's collision data (bit field) (set in the sprite movement code)
+ ld a, [wSpritePlayerStateData1CollisionData]
and d ; check if a sprite is in the direction the player is trying to go
jr nz, .collision
ld hl, TilePairCollisionsWater
call CheckForJumpingAndTilePairCollisions
jr c, .collision
predef GetTileAndCoordsInFrontOfPlayer ; get tile in front of player (puts it in c and [wTileInFrontOfPlayer])
- callab IsNextTileShoreOrWater
+ callfar IsNextTileShoreOrWater
jr c, .noCollision
ld a, [wTileInFrontOfPlayer] ; tile in front of player
ld c, a
@@ -1742,11 +1719,11 @@ RunMapScript::
push hl
push de
push bc
- callba TryPushingBoulder
+ farcall TryPushingBoulder
ld a, [wFlags_0xcd60]
bit 1, a ; play boulder dust animation
jr z, .afterBoulderEffect
- callba DoBoulderDustAnimation
+ farcall DoBoulderDustAnimation
.afterBoulderEffect
pop bc
pop de
@@ -1795,8 +1772,9 @@ LoadSurfingPlayerSpriteGraphics::
jr LoadPlayerSpriteGraphicsCommon
LoadBikePlayerSpriteGraphics::
- ld b, BANK(RedCyclingSprite)
- ld de, RedCyclingSprite
+ ld b, BANK(RedBikeSprite)
+ ld de, RedBikeSprite
+
LoadPlayerSpriteGraphicsCommon::
ld hl, vNPCSprites
push de
@@ -1819,12 +1797,12 @@ LoadPlayerSpriteGraphicsCommon::
; function to load data from the map header
LoadMapHeader::
- callba MarkTownVisitedAndLoadMissableObjects
+ farcall MarkTownVisitedAndLoadMissableObjects
jr asm_0dbd
Func_0db5:: ; XXX
- callba LoadUnusedBluesHouseMissableObjectData
-asm_0dbd
+ farcall LoadUnusedBluesHouseMissableObjectData
+asm_0dbd:
ld a, [wCurMapTileset]
ld [wUnusedD119], a
ld a, [wCurMap]
@@ -1833,7 +1811,7 @@ asm_0dbd
ld b, a
res 7, a
ld [wCurMapTileset], a
- ld [hPreviousTileset], a
+ ldh [hPreviousTileset], a
bit 7, b
ret nz
call GetMapHeaderPointer
@@ -1921,9 +1899,9 @@ asm_0dbd
ld a, [wd72e]
bit 5, a ; did a battle happen immediately before this?
jr nz, .skip_pika_spawn
- callab SchedulePikachuSpawnForAfterText
+ callfar SchedulePikachuSpawnForAfterText
.skip_pika_spawn
- callab LoadWildData
+ callfar LoadWildData
pop hl ; restore hl from before going to the warp/sign/sprite data (this value was saved for seemingly no purpose)
ld a, [wCurMapHeight] ; map height in 4x4 tile blocks
add a ; double it
@@ -1934,7 +1912,7 @@ asm_0dbd
ld a, [wCurMap]
ld c, a
ld b, $00
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
switchbank MapSongBanks
ld hl, MapSongBanks
@@ -1982,7 +1960,7 @@ CopySignData::
; function to load map data
LoadMapData::
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
call DisableLCD
call ResetMapVariables
@@ -2017,7 +1995,7 @@ LoadScreenRelatedData::
ret
ReloadMapAfterSurfingMinigame::
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
call DisableLCD
call ResetMapVariables
@@ -2034,7 +2012,7 @@ ReloadMapAfterSurfingMinigame::
jr asm_0f4d
ReloadMapAfterPrinter::
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, [wCurMap]
call SwitchToMapRomBank
@@ -2042,7 +2020,7 @@ ReloadMapAfterPrinter::
pop af
call BankswitchCommon
asm_0f4d:
- jpab SetMapSpecificScriptFlagsOnMapReload
+ jpfar SetMapSpecificScriptFlagsOnMapReload
ret ; useless?
ResetMapVariables::
@@ -2050,8 +2028,8 @@ ResetMapVariables::
ld [wMapViewVRAMPointer + 1], a
xor a
ld [wMapViewVRAMPointer], a
- ld [hSCY], a
- ld [hSCX], a
+ ldh [hSCY], a
+ ldh [hSCX], a
ld [wWalkCounter], a
ld [wUnusedD119], a
ld [wSpriteSetID], a
@@ -2094,16 +2072,16 @@ SwitchToMapRomBank::
ld hl, MapHeaderBanks
add hl, bc
ld a, [hl]
- ld [$ffe8], a ; save map ROM bank
+ ldh [hMapROMBank], a ; save map ROM bank
call BankswitchBack
- ld a, [$ffe8]
+ ldh a, [hMapROMBank]
call BankswitchCommon
pop bc
pop hl
ret
GetMapHeaderPointer::
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
switchbank MapHeaderPointers
push de
@@ -2146,17 +2124,17 @@ HandleMidJump::
ld a, [wd736]
bit 6, a ; jumping down a ledge?
ret z
- callba _HandleMidJump
+ farcall _HandleMidJump
ret
IsSpinning::
ld a, [wd736]
bit 7, a
ret z ; no spinning
- jpba LoadSpinnerArrowTiles ; spin while moving
+ farjp LoadSpinnerArrowTiles ; spin while moving
Func_0ffe::
- jpab IsPlayerTalkingToPikachu
+ jpfar IsPlayerTalkingToPikachu
InitSprites::
ld a, [hli]
@@ -2178,27 +2156,27 @@ InitSprites::
ret z ; don't copy sprite data if not
ld b, a
ld c, $0
- ld de, wSpriteStateData1 + $10
+ ld de, wSprite01StateData1
; copy sprite stuff?
.loadSpriteLoop
ld a, [hli]
- ld [de], a ; store picture ID at C1X0
+ ld [de], a ; x#SPRITESTATEDATA1_PICTUREID
inc d
ld a, e
add $4
ld e, a
ld a, [hli]
- ld [de], a ; store Y position at C2X4
+ ld [de], a ; x#SPRITESTATEDATA2_MAPY
inc e
ld a, [hli]
- ld [de], a ; store X position at C2X5
+ ld [de], a ; x#SPRITESTATEDATA2_MAPX
inc e
ld a, [hli]
- ld [de], a ; store movement byte 1 at C2X6
+ ld [de], a ; x#SPRITESTATEDATA2_MOVEMENTBYTE1
ld a, [hli]
- ld [$ff8d], a ; save movement byte 2
+ ldh [hLoadSpriteTemp1], a ; save movement byte 2
ld a, [hli]
- ld [$ff8e], a ; save text ID and flags byte
+ ldh [hLoadSpriteTemp2], a ; save text ID and flags byte
push bc
call LoadSprite
pop bc
@@ -2213,10 +2191,10 @@ InitSprites::
ret
ZeroSpriteStateData::
-; zero C110-C1EF and C210-C2EF
-; C1F0-C1FF and C2F0-C2FF is used for Pikachu
- ld hl, wSpriteStateData1 + $10
- ld de, wSpriteStateData2 + $10
+; zero out sprite state data for sprites 01-14
+; sprite 15 is used for Pikachu
+ ld hl, wSprite01StateData1
+ ld de, wSprite01StateData2
xor a
ld b, 14 * $10
.loop
@@ -2228,8 +2206,8 @@ ZeroSpriteStateData::
ret
DisableRegularSprites::
-; initialize all C100-C1FF sprite entries to disabled (other than player's and pikachu)
- ld hl, wSpriteStateData1 + 1 * $10 + 2
+; disable SPRITESTATEDATA1_IMAGEINDEX (set to $ff) for sprites 01-14
+ ld hl, wSprite01StateData1ImageIndex
ld de, $10
ld c, $e
.loop
@@ -2244,16 +2222,16 @@ LoadSprite::
ld b, $0
ld hl, wMapSpriteData
add hl, bc
- ld a, [$ff8d]
+ ldh a, [hLoadSpriteTemp1]
ld [hli], a ; store movement byte 2 in byte 0 of sprite entry
- ld a, [$ff8e]
+ ldh a, [hLoadSpriteTemp2]
ld [hl], a ; this appears pointless, since the value is overwritten immediately after
- ld a, [$ff8e]
- ld [$ff8d], a
+ ldh a, [hLoadSpriteTemp2]
+ ldh [hLoadSpriteTemp1], a
and $3f
ld [hl], a ; store text ID in byte 1 of sprite entry
pop hl
- ld a, [$ff8d]
+ ldh a, [hLoadSpriteTemp1]
bit 6, a
jr nz, .trainerSprite
bit 7, a
@@ -2271,28 +2249,79 @@ LoadSprite::
.trainerSprite
ld a, [hli]
- ld [$ff8d], a ; save trainer class
+ ldh [hLoadSpriteTemp1], a ; save trainer class
ld a, [hli]
- ld [$ff8e], a ; save trainer number (within class)
+ ldh [hLoadSpriteTemp2], a ; save trainer number (within class)
push hl
ld hl, wMapSpriteExtraData
add hl, bc
- ld a, [$ff8d]
+ ldh a, [hLoadSpriteTemp1]
ld [hli], a ; store trainer class in byte 0 of the entry
- ld a, [$ff8e]
+ ldh a, [hLoadSpriteTemp2]
ld [hl], a ; store trainer number in byte 1 of the entry
pop hl
ret
.itemBallSprite
ld a, [hli]
- ld [$ff8d], a ; save item number
+ ldh [hLoadSpriteTemp1], a ; save item number
push hl
ld hl, wMapSpriteExtraData
add hl, bc
- ld a, [$ff8d]
+ ldh a, [hLoadSpriteTemp1]
ld [hli], a ; store item number in byte 0 of the entry
xor a
ld [hl], a ; zero byte 1, since it is not used
pop hl
ret
+
+CheckForUserInterruption::
+; Return carry if Up+Select+B, Start or A are pressed in c frames.
+; Used only in the intro and title screen.
+ call DelayFrame
+
+ push bc
+ call JoypadLowSensitivity
+ pop bc
+
+ ldh a, [hJoyHeld]
+ cp D_UP + SELECT + B_BUTTON
+ jr z, .input
+
+ ldh a, [hJoy5]
+ and START | A_BUTTON
+ jr nz, .input
+
+ dec c
+ jr nz, CheckForUserInterruption
+
+ and a
+ ret
+
+.input
+ scf
+ ret
+
+; function to load position data for destination warp when switching maps
+; INPUT:
+; a = ID of destination warp within destination map
+LoadDestinationWarpPosition::
+ ld b, a
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, [wPredefParentBank]
+ ldh [hLoadedROMBank], a
+ ld [MBC1RomBank], a
+ ld a, b
+ add a
+ add a
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld bc, 4
+ ld de, wCurrentTileBlockMapViewPointer
+ call CopyData
+ pop af
+ ldh [hLoadedROMBank], a
+ ld [MBC1RomBank], a
+ ret
diff --git a/home/overworld_text.asm b/home/overworld_text.asm
new file mode 100644
index 00000000..7ea23fe4
--- /dev/null
+++ b/home/overworld_text.asm
@@ -0,0 +1,31 @@
+TextScriptEndingText::
+ text_end
+
+TextScriptEnd::
+ ld hl, TextScriptEndingText
+ ret
+
+ExclamationText::
+ text_far _ExclamationText
+ text_end
+
+GroundRoseText::
+ text_far _GroundRoseText
+ text_end
+
+BoulderText::
+ text_far _BoulderText
+ text_end
+
+MartSignText::
+ text_far _MartSignText
+ text_end
+
+PokeCenterSignText::
+ text_far _PokeCenterSignText
+ text_end
+
+PickUpItemText::
+ text_asm
+ predef PickUpItem
+ jp TextScriptEnd
diff --git a/home/palettes.asm b/home/palettes.asm
new file mode 100644
index 00000000..3b944a03
--- /dev/null
+++ b/home/palettes.asm
@@ -0,0 +1,63 @@
+RestoreScreenTilesAndReloadTilePatterns::
+ call ClearSprites
+ ld a, $1
+ ld [wUpdateSpritesEnabled], a
+ call ReloadMapSpriteTilePatterns
+ call LoadScreenTilesFromBuffer2
+ call LoadTextBoxTilePatterns
+ call RunDefaultPaletteCommand
+ jr Delay3
+
+GBPalWhiteOutWithDelay3::
+ call GBPalWhiteOut
+
+Delay3::
+; The bg map is updated each frame in thirds.
+; Wait three frames to let the bg map fully update.
+ ld c, 3
+ jp DelayFrames
+
+GBPalNormal::
+; Reset BGP and OBP0.
+ ld a, %11100100 ; 3210
+ ldh [rBGP], a
+ ld a, %11010000 ; 3100
+ ldh [rOBP0], a
+ call UpdateGBCPal_BGP
+ call UpdateGBCPal_OBP0
+ call UpdateGBCPal_OBP1
+ ret
+
+GBPalWhiteOut::
+; White out all palettes.
+ xor a
+ ldh [rBGP], a
+ ldh [rOBP0], a
+ ldh [rOBP1], a
+ call UpdateGBCPal_BGP
+ call UpdateGBCPal_OBP0
+ call UpdateGBCPal_OBP1
+ ret
+
+RunDefaultPaletteCommand::
+ ld b, SET_PAL_DEFAULT
+RunPaletteCommand::
+ ld a, [wOnSGB]
+ and a
+ ret z
+ predef_jump _RunPaletteCommand
+
+GetHealthBarColor::
+; Return at hl the palette of
+; an HP bar e pixels long.
+ ld a, e
+ cp 27
+ ld d, 0 ; green
+ jr nc, .gotColor
+ cp 10
+ inc d ; yellow
+ jr nc, .gotColor
+ inc d ; red
+.gotColor
+ ld [hl], d
+ ret
diff --git a/home/pathfinding.asm b/home/pathfinding.asm
new file mode 100644
index 00000000..53f98847
--- /dev/null
+++ b/home/pathfinding.asm
@@ -0,0 +1,65 @@
+; calculates the difference |a-b|, setting carry flag if a<b
+CalcDifference::
+ sub b
+ ret nc
+ cpl
+ add $1
+ scf
+ ret
+
+MoveSprite::
+; move the sprite [hSpriteIndex] with the movement pointed to by de
+; actually only copies the movement data to wNPCMovementDirections for later
+ call SetSpriteMovementBytesToFF
+MoveSprite_::
+ push hl
+ push bc
+ call GetSpriteMovementByte1Pointer
+ xor a
+ ld [hl], a
+ ld hl, wNPCMovementDirections
+ ld c, 0
+
+.loop
+ ld a, [de]
+ ld [hli], a
+ inc de
+ inc c
+ cp -1 ; have we reached the end of the movement data?
+ jr nz, .loop
+
+ ld a, c
+ ld [wNPCNumScriptedSteps], a ; number of steps taken
+
+ pop bc
+ ld hl, wd730
+ set 0, [hl]
+ pop hl
+ xor a
+ ld [wOverrideSimulatedJoypadStatesMask], a
+ ld [wSimulatedJoypadStatesEnd], a
+ dec a
+ ld [wJoyIgnore], a
+ ld [wWastedByteCD3A], a
+ ret
+
+; divides [hDividend2] by [hDivisor2] and stores the quotient in [hQuotient2]
+DivideBytes::
+ push hl
+ ld hl, hQuotient2
+ xor a
+ ld [hld], a
+ ld a, [hld]
+ and a
+ jr z, .done
+ ld a, [hli]
+.loop
+ sub [hl]
+ jr c, .done
+ inc hl
+ inc [hl]
+ dec hl
+ jr .loop
+.done
+ pop hl
+ ret
diff --git a/home/pic.asm b/home/pic.asm
deleted file mode 100644
index 236efe9d..00000000
--- a/home/pic.asm
+++ /dev/null
@@ -1,588 +0,0 @@
-; bankswitches and runs _UncompressSpriteData
-; bank is given in a, sprite input stream is pointed to in wSpriteInputPtr
-UncompressSpriteData::
- ld b, a
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, b
- call BankswitchCommon
- ld a,$0
- call SwitchSRAMBankAndLatchClockData
- call _UncompressSpriteData
- call PrepareRTCDataAndDisableSRAM
- pop af
- call BankswitchCommon
- ret
-
-; initializes necessary data to load a sprite and runs UncompressSpriteDataLoop
-_UncompressSpriteData::
- 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 [wSpriteInputBitCounter], a
- ld a, $3
- ld [wSpriteOutputBitOffset], a
- xor 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 [wSpriteHeight], a
- ld a, b
- swap a
- and $f
- add a
- add a
- add a
- ld [wSpriteWidth], a
- call ReadNextInputBit
- 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 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::
- ld hl, sSpriteBuffer1
- ld a, [wSpriteLoadFlags]
- bit 0, a
- jr z, .useSpriteBuffer1 ; check which buffer to use
- ld hl, sSpriteBuffer2
-.useSpriteBuffer1
- call StoreSpriteOutputPointer
- ld a, [wSpriteLoadFlags]
- bit 1, a
- jr z, .startDecompression ; check if last iteration
- call ReadNextInputBit ; if last chunk, read 1-2 bit unpacking mode
- and a
- jr z, .unpackingMode0 ; 0 -> mode 0
- call ReadNextInputBit ; 1 0 -> mode 1
- inc a ; 1 1 -> mode 2
-.unpackingMode0
- ld [wSpriteUnpackMode], a
-.startDecompression
- call ReadNextInputBit
- and a
- jr z, .readRLEncodedZeros ; if first bit is 0, the input starts with zeroes, otherwise with (non-zero) input
-.readNextInput
- call ReadNextInputBit
- ld c, a
- call ReadNextInputBit
- sla c
- or c ; read next two bits into c
- and a
- jr z, .readRLEncodedZeros ; 00 -> RLEncoded zeroes following
- call WriteSpriteBitsToBuffer ; otherwise write input to output and repeat
- call MoveToNextBufferPosition
- jr .readNextInput
-.readRLEncodedZeros
- ld c, $0 ; number of zeroes it length encoded, the number
-.countConsecutiveOnesLoop ; of consecutive ones determines the number of bits the number has
- call ReadNextInputBit
- and a
- jr z, .countConsecutiveOnesFinished
- inc c
- jr .countConsecutiveOnesLoop
-.countConsecutiveOnesFinished
- ld a, c
- add a
- ld hl, LengthEncodingOffsetList
- add l
- ld l, a
- jr nc, .noCarry
- inc h
-.noCarry
- ld a, [hli] ; read offset that is added to the number later on
- ld e, a ; adding an offset of 2^length - 1 makes every integer uniquely
- ld d, [hl] ; representable in the length encoding and saves bits
- push de
- inc c
- ld e, $0
- ld d, e
-.readNumberOfZerosLoop ; reads the next c+1 bits of input
- call ReadNextInputBit
- or e
- ld e, a
- dec c
- jr z, .readNumberOfZerosDone
- sla e
- rl d
- jr .readNumberOfZerosLoop
-.readNumberOfZerosDone
- pop hl ; add the offset
- add hl, de
- ld e, l
- ld d, h
-.writeZerosLoop
- ld b, e
- xor a ; write 00 to buffer
- call WriteSpriteBitsToBuffer
- ld e, b
- call MoveToNextBufferPosition
- dec de
- ld a, d
- and a
- jr nz, .continueLoop
- ld a, e
- and a
-.continueLoop
- jr nz, .writeZerosLoop
- jr .readNextInput
-
-; moves output pointer to next position
-; 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::
- ld a, [wSpriteHeight]
- ld b, a
- ld a, [wSpriteCurPosY]
- inc a
- cp b
- jr z, .curColumnDone
- ld [wSpriteCurPosY], a
- ld a, [wSpriteOutputPtr]
- inc a
- ld [wSpriteOutputPtr], a
- ret nz
- ld a, [wSpriteOutputPtr+1]
- inc a
- ld [wSpriteOutputPtr+1], a
- ret
-.curColumnDone
- xor a
- ld [wSpriteCurPosY], a
- ld a, [wSpriteOutputBitOffset]
- and a
- jr z, .bitOffsetsDone
- dec a
- ld [wSpriteOutputBitOffset], a
- ld hl, wSpriteOutputPtrCached
- ld a, [hli]
- ld [wSpriteOutputPtr], a
- ld a, [hl]
- ld [wSpriteOutputPtr+1], a
- ret
-.bitOffsetsDone
- ld a, $3
- ld [wSpriteOutputBitOffset], a
- ld a, [wSpriteCurPosX]
- add $8
- ld [wSpriteCurPosX], a
- ld b, a
- ld a, [wSpriteWidth]
- cp b
- jr z, .allColumnsDone
- ld a, [wSpriteOutputPtr]
- ld l, a
- ld a, [wSpriteOutputPtr+1]
- ld h, a
- inc hl
- jp StoreSpriteOutputPointer
-.allColumnsDone
- pop hl
- xor a
- 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 [wSpriteLoadFlags], a
- jp UncompressSpriteDataLoop
-.done
- jp UnpackSprite
-
-; writes 2 bits (from a) to the output buffer (pointed to from wSpriteOutputPtr)
-WriteSpriteBitsToBuffer::
- ld e, a
- ld a, [wSpriteOutputBitOffset]
- and a
- jr z, .offset0
- cp $2
- jr c, .offset1
- jr z, .offset2
- rrc e ; offset 3
- rrc e
- jr .offset0
-.offset1
- sla e
- sla e
- jr .offset0
-.offset2
- swap e
-.offset0
- ld a, [wSpriteOutputPtr]
- ld l, a
- ld a, [wSpriteOutputPtr+1]
- ld h, a
- ld a, [hl]
- or e
- ld [hl], a
- ret
-
-; reads next bit from input stream and returns it in a
-ReadNextInputBit::
- ld a, [wSpriteInputBitCounter]
- dec a
- jr nz, .curByteHasMoreBitsToRead
- call ReadNextInputByte
- ld [wSpriteInputCurByte], a
- ld a, $8
-.curByteHasMoreBitsToRead
- ld [wSpriteInputBitCounter], a
- ld a, [wSpriteInputCurByte]
- rlca
- ld [wSpriteInputCurByte], a
- and $1
- ret
-
-; reads next byte from input stream and returns it in a
-ReadNextInputByte::
- ld a, [wSpriteInputPtr]
- ld l, a
- ld a, [wSpriteInputPtr+1]
- ld h, a
- ld a, [hli]
- ld b, a
- ld a, l
- ld [wSpriteInputPtr], a
- ld a, h
- ld [wSpriteInputPtr+1], a
- ld a, b
- ret
-
-; the nth item is 2^n - 1
-LengthEncodingOffsetList::
- dw %0000000000000001
- dw %0000000000000011
- dw %0000000000000111
- dw %0000000000001111
- dw %0000000000011111
- dw %0000000000111111
- dw %0000000001111111
- dw %0000000011111111
- dw %0000000111111111
- dw %0000001111111111
- dw %0000011111111111
- dw %0000111111111111
- dw %0001111111111111
- dw %0011111111111111
- dw %0111111111111111
- dw %1111111111111111
-
-; unpacks the sprite data depending on the unpack mode
-UnpackSprite::
- ld a, [wSpriteUnpackMode]
- cp $2
- jp z, UnpackSpriteMode2
- and a
- jp nz, XorSpriteChunks
- ld hl, sSpriteBuffer1
- call SpriteDifferentialDecode
- 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::
- xor a
- ld [wSpriteCurPosX], a
- ld [wSpriteCurPosY], a
- call StoreSpriteOutputPointer
- ld a, [wSpriteFlipped]
- and a
- jr z, .notFlipped
- ld hl, DecodeNybble0TableFlipped
- ld de, DecodeNybble1TableFlipped
- jr .storeDecodeTablesPointers
-.notFlipped
- ld hl, DecodeNybble0Table
- ld de, DecodeNybble1Table
-.storeDecodeTablesPointers
- ld a, l
- ld [wSpriteDecodeTable0Ptr], a
- ld a, h
- ld [wSpriteDecodeTable0Ptr+1], a
- ld a, e
- ld [wSpriteDecodeTable1Ptr], a
- ld a, d
- ld [wSpriteDecodeTable1Ptr+1], a
- ld e, $0 ; last decoded nybble, initialized to 0
-.decodeNextByteLoop
- ld a, [wSpriteOutputPtr]
- ld l, a
- ld a, [wSpriteOutputPtr+1]
- ld h, a
- ld a, [hl]
- ld b, a
- swap a
- and $f
- call DifferentialDecodeNybble ; decode high nybble
- swap a
- ld d, a
- ld a, b
- and $f
- call DifferentialDecodeNybble ; decode low nybble
- or d
- ld b, a
- ld a, [wSpriteOutputPtr]
- ld l, a
- ld a, [wSpriteOutputPtr+1]
- ld h, a
- ld a, b
- ld [hl], a ; write back decoded data
- ld a, [wSpriteHeight]
- add l ; move on to next column
- jr nc, .noCarry
- inc h
-.noCarry
- ld [wSpriteOutputPtr], a
- ld a, h
- ld [wSpriteOutputPtr+1], a
- ld a, [wSpriteCurPosX]
- add $8
- ld [wSpriteCurPosX], a
- ld b, a
- ld a, [wSpriteWidth]
- cp b
- jr nz, .decodeNextByteLoop ; test if current row is done
- xor a
- ld e, a
- ld [wSpriteCurPosX], a
- ld a, [wSpriteCurPosY] ; move on to next row
- inc a
- ld [wSpriteCurPosY], a
- ld b, a
- ld a, [wSpriteHeight]
- cp b
- jr z, .done ; test if all rows finished
- ld a, [wSpriteOutputPtrCached]
- ld l, a
- ld a, [wSpriteOutputPtrCached+1]
- ld h, a
- inc hl
- call StoreSpriteOutputPointer
- jr .decodeNextByteLoop
-.done
- xor 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)
-DifferentialDecodeNybble::
- srl a ; c=a%2, a/=2
- ld c, $0
- jr nc, .evenNumber
- ld c, $1
-.evenNumber
- ld l, a
- 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
- jr .selectLookupTable
-.notFlipped
- bit 0, e ; else consider LSB
-.selectLookupTable
- ld e, l
- jr nz, .initialValue1 ; load the appropriate table
- ld a, [wSpriteDecodeTable0Ptr]
- ld l, a
- ld a, [wSpriteDecodeTable0Ptr+1]
- jr .tableLookup
-.initialValue1
- ld a, [wSpriteDecodeTable1Ptr]
- ld l, a
- ld a, [wSpriteDecodeTable1Ptr+1]
-.tableLookup
- ld h, a
- ld a, e
- add l
- ld l, a
- jr nc, .noCarry
- inc h
-.noCarry
- ld a, [hl]
- bit 0, c
- jr nz, .selectLowNybble
- swap a ; select high nybble
-.selectLowNybble
- and $f
- ld e, a ; update last decoded data
- ret
-
-DecodeNybble0Table::
- dn $0, $1
- dn $3, $2
- dn $7, $6
- dn $4, $5
- dn $f, $e
- dn $c, $d
- dn $8, $9
- dn $b, $a
-DecodeNybble1Table::
- dn $f, $e
- dn $c, $d
- dn $8, $9
- dn $b, $a
- dn $0, $1
- dn $3, $2
- dn $7, $6
- dn $4, $5
-DecodeNybble0TableFlipped::
- dn $0, $8
- dn $c, $4
- dn $e, $6
- dn $2, $a
- dn $f, $7
- dn $3, $b
- dn $1, $9
- dn $d, $5
-DecodeNybble1TableFlipped::
- dn $f, $7
- dn $3, $b
- dn $1, $9
- dn $d, $5
- dn $0, $8
- dn $c, $4
- dn $e, $6
- dn $2, $a
-
-; combines the two loaded chunks with xor (the chunk loaded second is the destination). The source chunk is differeintial decoded beforehand.
-XorSpriteChunks::
- xor a
- ld [wSpriteCurPosX], a
- ld [wSpriteCurPosY], a
- call ResetSpriteBufferPointers
- ld a, [wSpriteOutputPtr] ; points to buffer 1 or 2, depending on flags
- ld l, a
- ld a, [wSpriteOutputPtr+1]
- ld h, a
- call SpriteDifferentialDecode ; decode buffer 1 or 2, depending on flags
- call ResetSpriteBufferPointers
- ld a, [wSpriteOutputPtr] ; source buffer, points to buffer 1 or 2, depending on flags
- ld l, a
- ld a, [wSpriteOutputPtr+1]
- ld h, a
- ld a, [wSpriteOutputPtrCached] ; destination buffer, points to buffer 2 or 1, depending on flags
- ld e, a
- ld a, [wSpriteOutputPtrCached+1]
- ld d, a
-.xorChunksLoop
- ld a, [wSpriteFlipped]
- and a
- jr z, .notFlipped
- push de
- ld a, [de]
- ld b, a
- swap a
- and $f
- call ReverseNybble ; if flipped reverse the nybbles in the destination buffer
- swap a
- ld c, a
- ld a, b
- and $f
- call ReverseNybble
- or c
- pop de
- ld [de], a
-.notFlipped
- ld a, [hli]
- ld b, a
- ld a, [de]
- xor b
- ld [de], a
- inc de
- ld a, [wSpriteCurPosY]
- inc a
- ld [wSpriteCurPosY], a ; go to next row
- ld b, a
- ld a, [wSpriteHeight]
- cp b
- jr nz, .xorChunksLoop ; test if column finished
- xor a
- ld [wSpriteCurPosY], a
- ld a, [wSpriteCurPosX]
- add $8
- ld [wSpriteCurPosX], a ; go to next column
- ld b, a
- ld a, [wSpriteWidth]
- cp b
- jr nz, .xorChunksLoop ; test if all columns finished
- xor a
- ld [wSpriteCurPosX], a
- ret
-
-; reverses the bits in the nybble given in register a
-ReverseNybble::
- ld de, NybbleReverseTable
- add e
- ld e, a
- jr nc, .noCarry
- inc d
-.noCarry
- ld a, [de]
- ret
-
-; resets sprite buffer pointers to buffer 1 and 2, depending on wSpriteLoadFlags
-ResetSpriteBufferPointers::
- ld a, [wSpriteLoadFlags]
- bit 0, a
- jr nz, .buffer2Selected
- ld de, sSpriteBuffer1
- ld hl, sSpriteBuffer2
- jr .storeBufferPointers
-.buffer2Selected
- ld de, sSpriteBuffer2
- ld hl, sSpriteBuffer1
-.storeBufferPointers
- ld a, l
- ld [wSpriteOutputPtr], a
- ld a, h
- ld [wSpriteOutputPtr+1], a
- ld a, e
- ld [wSpriteOutputPtrCached], a
- ld a, d
- ld [wSpriteOutputPtrCached+1], a
- ret
-
-; maps each nybble to its reverse
-NybbleReverseTable::
- db $0, $8, $4, $c, $2, $a, $6 ,$e, $1, $9, $5, $d, $3, $b, $7 ,$f
-
-; combines the two loaded chunks with xor (the chunk loaded second is the destination). Both chunks are differeintial decoded beforehand.
-UnpackSpriteMode2::
- call ResetSpriteBufferPointers
- ld a, [wSpriteFlipped]
- push af
- xor a
- ld [wSpriteFlipped], a ; temporarily clear flipped flag for decoding the destination chunk
- ld a, [wSpriteOutputPtrCached]
- ld l, a
- ld a, [wSpriteOutputPtrCached+1]
- ld h, a
- call SpriteDifferentialDecode
- call ResetSpriteBufferPointers
- pop af
- ld [wSpriteFlipped], a
- jp XorSpriteChunks
-
-; stores hl into the output pointers
-StoreSpriteOutputPointer::
- ld a, l
- ld [wSpriteOutputPtr], a
- ld [wSpriteOutputPtrCached], a
- ld a, h
- ld [wSpriteOutputPtr+1], a
- ld [wSpriteOutputPtrCached+1], a
- ret
diff --git a/home/pics.asm b/home/pics.asm
new file mode 100644
index 00000000..f3b3f1b5
--- /dev/null
+++ b/home/pics.asm
@@ -0,0 +1,198 @@
+; uncompresses the front or back sprite of the specified mon
+; assumes the corresponding mon header is already loaded
+; hl contains offset to sprite pointer ($b for front or $d for back)
+UncompressMonSprite::
+ ld bc, wMonHeader
+ add hl, bc
+ ld a, [hli]
+ ld [wSpriteInputPtr], a ; fetch sprite input pointer
+ ld a, [hl]
+ 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
+; index < $1F, bank 9
+; $1F ≤ index < $4A, bank $A
+; $4A ≤ index < $74, bank $B
+; $74 ≤ index < $99, bank $C
+; $99 ≤ index, bank $D
+ ld a, [wcf91] ; XXX name for this ram location
+ ld b, a
+ ;cp MEW
+ ;ld a, BANK(MewPicFront)
+ ;jr z, .GotBank
+ ;ld a, b
+ cp FOSSIL_KABUTOPS
+ ld a, BANK(FossilKabutopsPic)
+ jr z, .GotBank
+ ld a, b
+ cp TANGELA + 1
+ ld a, BANK(TangelaPicFront)
+ jr c, .GotBank
+ ld a, b
+ cp MOLTRES + 1
+ ld a, BANK(MoltresPicFront)
+ jr c, .GotBank
+ ld a, b
+ cp BEEDRILL + 2
+ ld a, BANK(BeedrillPicFront)
+ jr c, .GotBank
+ ld a, b
+ cp STARMIE + 1
+ ld a, BANK(StarmiePicFront)
+ jr c, .GotBank
+ ld a, BANK(VictreebelPicFront)
+.GotBank
+ jp UncompressSpriteData
+
+; de: destination location
+LoadMonFrontSprite::
+ push de
+ ld hl, wMonHFrontSprite - wMonHeader
+ call UncompressMonSprite
+ ld hl, wMonHSpriteDim
+ ld a, [hli]
+ ld c, a
+ pop de
+ ; fall through
+
+; postprocesses uncompressed sprite chunks to a 2bpp sprite and loads it into video ram
+; calculates alignment parameters to place both sprite chunks in the center of the 7*7 tile sprite buffers
+; de: destination location
+; a,c: sprite dimensions (in tiles of 8x8 each)
+LoadUncompressedSpriteData::
+ push de
+ and $f
+ ldh [hSpriteWidth], a ; each byte contains 8 pixels (in 1bpp), so tiles=bytes for width
+ ld b, a
+ ld a, $7
+ sub b ; 7-w
+ inc a ; 8-w
+ srl a ; (8-w)/2 ; horizontal center (in tiles, rounded up)
+ ld b, a
+ add a
+ add a
+ add a
+ sub b ; 7*((8-w)/2) ; skip for horizontal center (in tiles)
+ ldh [hSpriteOffset], a
+ ld a, c
+ swap a
+ and $f
+ ld b, a
+ add a
+ add a
+ add a ; 8*tiles is height in bytes
+ ldh [hSpriteHeight], a
+ ld a, $7
+ sub b ; 7-h ; skip for vertical center (in tiles, relative to current column)
+ ld b, a
+ ldh a, [hSpriteOffset]
+ add b ; 7*((8-w)/2) + 7-h ; combined overall offset (in tiles)
+ add a
+ add a
+ add a ; 8*(7*((8-w)/2) + 7-h) ; combined overall offset (in bytes)
+ ldh [hSpriteOffset], a
+ ld a, $0
+ call SwitchSRAMBankAndLatchClockData
+ ld hl, sSpriteBuffer0
+ call ZeroSpriteBuffer ; zero buffer 0
+ ld de, sSpriteBuffer1
+ ld hl, sSpriteBuffer0
+ call AlignSpriteDataCentered ; copy and align buffer 1 to 0 (containing the MSB of the 2bpp sprite)
+ ld hl, sSpriteBuffer1
+ call ZeroSpriteBuffer ; zero buffer 1
+ ld de, sSpriteBuffer2
+ ld hl, sSpriteBuffer1
+ call AlignSpriteDataCentered ; copy and align buffer 2 to 1 (containing the LSB of the 2bpp sprite)
+ call PrepareRTCDataAndDisableSRAM
+ pop de
+ jp InterlaceMergeSpriteBuffers
+
+; copies and aligns the sprite data properly inside the sprite buffer
+; sprite buffers are 7*7 tiles in size, the loaded sprite is centered within this area
+AlignSpriteDataCentered::
+ ldh a, [hSpriteOffset]
+ ld b, $0
+ ld c, a
+ add hl, bc
+ ldh a, [hSpriteWidth]
+.columnLoop
+ push af
+ push hl
+ ldh a, [hSpriteHeight]
+ ld c, a
+.columnInnerLoop
+ ld a, [de]
+ inc de
+ ld [hli], a
+ dec c
+ jr nz, .columnInnerLoop
+ pop hl
+ ld bc, 7*8 ; 7 tiles
+ add hl, bc ; advance one full column
+ pop af
+ dec a
+ jr nz, .columnLoop
+ ret
+
+; fills the sprite buffer (pointed to in hl) with zeros
+ZeroSpriteBuffer::
+ ld bc, SPRITEBUFFERSIZE
+.nextByteLoop
+ xor a
+ ld [hli], a
+ dec bc
+ ld a, b
+ or c
+ jr nz, .nextByteLoop
+ ret
+
+; combines the (7*7 tiles, 1bpp) sprite chunks in buffer 0 and 1 into a 2bpp sprite located in buffer 1 through 2
+; in the resulting sprite, the rows of the two source sprites are interlaced
+; de: output address
+InterlaceMergeSpriteBuffers::
+ ld a, $0
+ call SwitchSRAMBankAndLatchClockData
+ push de
+ 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
+ ldh [hSpriteInterlaceCounter], a
+.interlaceLoop
+ ld a, [de]
+ dec de
+ ld [hld], a ; write byte of source 2
+ ld a, [bc]
+ dec bc
+ ld [hld], a ; write byte of source 1
+ ld a, [de]
+ dec de
+ ld [hld], a ; write byte of source 2
+ ld a, [bc]
+ dec bc
+ ld [hld], a ; write byte of source 1
+ ldh a, [hSpriteInterlaceCounter]
+ dec a
+ ldh [hSpriteInterlaceCounter], a
+ jr nz, .interlaceLoop
+ ld a, [wSpriteFlipped]
+ and a
+ jr z, .notFlipped
+ ld bc, 2*SPRITEBUFFERSIZE
+ ld hl, sSpriteBuffer1
+.swapLoop
+ swap [hl] ; if flipped swap nybbles in all bytes
+ inc hl
+ dec bc
+ ld a, b
+ or c
+ jr nz, .swapLoop
+.notFlipped
+ pop hl
+ ld de, sSpriteBuffer1
+ ld c, (2*SPRITEBUFFERSIZE)/16 ; $31, number of 16 byte chunks to be copied
+ ldh a, [hLoadedROMBank]
+ ld b, a
+ call CopyVideoData
+ jp PrepareRTCDataAndDisableSRAM
diff --git a/home/pikachu.asm b/home/pikachu.asm
index 336c80b3..c276b3d4 100755
--- a/home/pikachu.asm
+++ b/home/pikachu.asm
@@ -55,7 +55,7 @@ SpawnPikachu::
ld a, [hl]
dec a
swap a
- ld [hTilePlayerStandingOn], a
+ ldh [hTilePlayerStandingOn], a
homecall SpawnPikachu_ ; 3f:46d5
ret
@@ -83,7 +83,7 @@ Pikachu_IsInArray::
GetPikachuMovementScriptByte::
push hl
push bc
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, [wPikachuMovementScriptBank]
call BankswitchCommon
@@ -105,7 +105,7 @@ GetPikachuMovementScriptByte::
ret
ApplyPikachuMovementData::
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
ld b, a
push af
callbs ApplyPikachuMovementData_
diff --git a/home/play_time.asm b/home/play_time.asm
index 47b2a690..d6c95fbd 100644
--- a/home/play_time.asm
+++ b/home/play_time.asm
@@ -1,10 +1,10 @@
-TrackPlayTime:
+TrackPlayTime::
call CountDownIgnoreInputBitReset
ld hl, wd47a
bit 0, [hl]
jr nz, .maxIGT
- ld a,[wd732]
- bit 0,a
+ ld a, [wd732]
+ bit 0, a
ret z
ld a, [wPlayTimeMaxed]
and a
@@ -66,6 +66,6 @@ CountDownIgnoreInputBitReset:
ld [wd730], a
ret z
xor a
- ld [hJoyPressed], a
- ld [hJoyHeld], a
+ ldh [hJoyPressed], a
+ ldh [hJoyHeld], a
ret
diff --git a/home/pokemon.asm b/home/pokemon.asm
new file mode 100644
index 00000000..3e08906f
--- /dev/null
+++ b/home/pokemon.asm
@@ -0,0 +1,474 @@
+DrawHPBar::
+; Draw an HP bar d tiles long, and fill it to e pixels.
+; If c is nonzero, show at least a sliver regardless.
+; The right end of the bar changes with [wHPBarType].
+
+ push hl
+ push de
+ ;push bc
+
+ ; Left
+ ld a, $71 ; "HP:"
+ ld [hli], a
+ ld a, $62
+ ld [hli], a
+
+ push hl
+
+ ; Middle
+ ld a, $63 ; empty
+.draw
+ ld [hli], a
+ dec d
+ jr nz, .draw
+
+ ; Right
+ ld a, [wHPBarType]
+ dec a
+ ld a, $6d ; status screen and battle
+ jr z, .ok
+ dec a ; pokemon menu
+.ok
+ ld [hl], a
+
+ pop hl
+
+ ld a, e
+ and a
+ jr nz, .fill
+
+ ; If c is nonzero, draw a pixel anyway.
+ ld a, c
+ and a
+ jr z, .done
+ ld e, 1
+
+.fill
+ ld a, e
+ sub 8
+ jr c, .partial
+ ld e, a
+ ld a, $6b ; full
+ ld [hli], a
+ ld a, e
+ and a
+ jr z, .done
+ jr .fill
+
+.partial
+ ; Fill remaining pixels at the end if necessary.
+ ld a, $63 ; empty
+ add e
+ ld [hl], a
+.done
+ ;pop bc
+ pop de
+ pop hl
+ ret
+
+
+; loads pokemon data from one of multiple sources to wLoadedMon
+; loads base stats to wMonHeader
+; INPUT:
+; [wWhichPokemon] = index of pokemon within party/box
+; [wMonDataLocation] = source
+; 00: player's party
+; 01: enemy's party
+; 02: current box
+; 03: daycare
+; OUTPUT:
+; [wcf91] = pokemon ID
+; wLoadedMon = base address of pokemon data
+; wMonHeader = base address of base stats
+LoadMonData::
+ jpfar LoadMonData_
+
+OverwritewMoves::
+; Write c to [wMoves + b]. Unused.
+ ld hl, wMoves
+ ld e, b
+ ld d, 0
+ add hl, de
+ ld a, c
+ ld [hl], a
+ ret
+
+LoadFlippedFrontSpriteByMonIndex::
+ ld a, 1
+ ld [wSpriteFlipped], a
+
+LoadFrontSpriteByMonIndex::
+ push hl
+ ld a, [wd11e]
+ push af
+ ld a, [wcf91]
+ ld [wd11e], a
+ predef IndexToPokedex
+ ld hl, wd11e
+ ld a, [hl]
+ pop bc
+ ld [hl], b
+ and a
+ pop hl
+ jr z, .invalidDexNumber ; dex #0 invalid
+ cp NUM_POKEMON + 1
+ jr c, .validDexNumber ; dex >#151 invalid
+.invalidDexNumber
+ ld a, RHYDON ; $1
+ ld [wcf91], a
+ ret
+.validDexNumber
+ push hl
+ ld de, vFrontPic
+ call LoadMonFrontSprite
+ pop hl
+ ldh a, [hLoadedROMBank]
+ push af
+ switchbank CopyUncompressedPicToHL
+ xor a
+ ldh [hStartTileID], a
+ call CopyUncompressedPicToHL
+ xor a
+ ld [wSpriteFlipped], a
+ pop af
+ jp BankswitchCommon
+
+
+PlayCry::
+; Play monster a's cry.
+ push bc
+ ld b, a
+ ld a, [wLowHealthAlarm]
+ push af
+ xor a
+ ld [wLowHealthAlarm], a
+ ld a, b
+ call GetCryData
+ call PlaySound
+ call WaitForSoundToFinish
+ pop af
+ ld [wLowHealthAlarm], a
+ pop bc
+ ret
+
+GetCryData::
+; Load cry data for monster a.
+ dec a
+ ld c, a
+ ld b, 0
+ ld hl, CryData
+ add hl, bc
+ add hl, bc
+ add hl, bc
+
+ ld a, BANK(CryData)
+ call BankswitchHome
+ ld a, [hli]
+ ld b, a ; cry id
+ ld a, [hli]
+ ld [wFrequencyModifier], a
+ ld a, [hl]
+ ld [wTempoModifier], a
+ call BankswitchBack
+
+ ; Cry headers have 3 channels,
+ ; and start from index CRY_SFX_START,
+ ; so add 3 times the cry id.
+ ld a, b
+ ld c, CRY_SFX_START
+ rlca ; * 2
+ add b
+ add c
+ ret
+
+DisplayPartyMenu::
+ ldh a, [hTilesetType]
+ push af
+ xor a
+ ldh [hTilesetType], a
+ call GBPalWhiteOutWithDelay3
+ call ClearSprites
+ call PartyMenuInit
+ call DrawPartyMenu
+ jp HandlePartyMenuInput
+
+GoBackToPartyMenu::
+ ldh a, [hTilesetType]
+ push af
+ xor a
+ ldh [hTilesetType], a
+ call PartyMenuInit
+ call RedrawPartyMenu
+ jp HandlePartyMenuInput
+
+PartyMenuInit::
+ ld a, 1 ; hardcoded bank
+ call BankswitchHome
+ call LoadHpBarAndStatusTilePatterns
+ ld hl, wd730
+ set 6, [hl] ; turn off letter printing delay
+ xor a ; PLAYER_PARTY_DATA
+ ld [wMonDataLocation], a
+ ld [wMenuWatchMovingOutOfBounds], a
+ ld hl, wTopMenuItemY
+ inc a
+ ld [hli], a ; top menu item Y
+ xor a
+ ld [hli], a ; top menu item X
+ ld a, [wPartyAndBillsPCSavedMenuItem]
+ push af
+ ld [hli], a ; current menu item ID
+ inc hl
+ ld a, [wPartyCount]
+ and a ; are there more than 0 pokemon in the party?
+ jr z, .storeMaxMenuItemID
+ dec a
+; if party is not empty, the max menu item ID is ([wPartyCount] - 1)
+; otherwise, it is 0
+.storeMaxMenuItemID
+ ld [hli], a ; max menu item ID
+ ld a, [wForcePlayerToChooseMon]
+ and a
+ ld a, A_BUTTON | B_BUTTON
+ jr z, .next
+ xor a
+ ld [wForcePlayerToChooseMon], a
+ inc a ; a = A_BUTTON
+.next
+ ld [hli], a ; menu watched keys
+ pop af
+ ld [hl], a ; old menu item ID
+ ret
+
+HandlePartyMenuInput::
+ ld a, 1
+ ld [wMenuWrappingEnabled], a
+ ld a, $40
+ ld [wPartyMenuAnimMonEnabled], a
+ call HandleMenuInput_
+ push af ; save hJoy5 OR wMenuWrapping enabled, if no inputs were selected within a certain period of time
+ bit 1, a ; was B button pressed?
+ ld a, $0
+ ld [wPartyMenuAnimMonEnabled], a
+ ld a, [wCurrentMenuItem]
+ ld [wPartyAndBillsPCSavedMenuItem], a
+ jr nz, .asm_1258
+ ld a, [wCurrentMenuItem]
+ ld [wWhichPokemon], a
+ callfar IsThisPartymonStarterPikachu_Party
+ jr nc, .asm_1258
+ call CheckPikachuFollowingPlayer
+ jr nz, .asm_128f
+.asm_1258
+ pop af
+ call PlaceUnfilledArrowMenuCursor
+ ld b, a
+ ld hl, wd730
+ res 6, [hl] ; turn on letter printing delay
+ ld a, [wMenuItemToSwap]
+ and a
+ jp nz, .swappingPokemon
+ pop af
+ ldh [hTilesetType], a
+ bit 1, b
+ jr nz, .noPokemonChosen
+ ld a, [wPartyCount]
+ and a
+ jr z, .noPokemonChosen
+ ld a, [wCurrentMenuItem]
+ ld [wWhichPokemon], a
+ ld hl, wPartySpecies
+ ld b, 0
+ ld c, a
+ add hl, bc
+ ld a, [hl]
+ ld [wcf91], a
+ ld [wBattleMonSpecies2], a
+ call BankswitchBack
+ and a
+ ret
+.asm_128f
+ pop af
+ ld hl, PartyMenuText_12cc
+ call PrintText
+ xor a
+ ld [wMenuItemToSwap], a
+ pop af
+ ldh [hTilesetType], a
+.noPokemonChosen
+ call BankswitchBack
+ scf
+ ret
+.swappingPokemon
+ bit 1, b ; was the B button pressed?
+ jr z, .handleSwap ; if not, handle swapping the pokemon
+.cancelSwap ; if the B button was pressed
+ farcall ErasePartyMenuCursors
+ xor a
+ ld [wMenuItemToSwap], a
+ ld [wPartyMenuTypeOrMessageID], a
+ call RedrawPartyMenu
+ jp HandlePartyMenuInput
+.handleSwap
+ ld a, [wCurrentMenuItem]
+ ld [wWhichPokemon], a
+ farcall SwitchPartyMon
+ jp HandlePartyMenuInput
+
+PartyMenuText_12cc::
+ text_far _SleepingPikachuText1
+ text_end
+
+DrawPartyMenu::
+ ld hl, DrawPartyMenu_
+ jr DrawPartyMenuCommon
+
+RedrawPartyMenu::
+ ld hl, RedrawPartyMenu_
+
+DrawPartyMenuCommon::
+ ld b, BANK(RedrawPartyMenu_)
+ jp Bankswitch
+
+; prints a pokemon's status condition
+; INPUT:
+; de = address of status condition
+; hl = destination address
+PrintStatusCondition::
+ push de
+ dec de
+ dec de ; de = address of current HP
+ ld a, [de]
+ ld b, a
+ dec de
+ ld a, [de]
+ or b ; is the pokemon's HP zero?
+ pop de
+ jr nz, PrintStatusConditionNotFainted
+; if the pokemon's HP is 0, print "FNT"
+ ld a, "F"
+ ld [hli], a
+ ld a, "N"
+ ld [hli], a
+ ld [hl], "T"
+ and a
+ ret
+
+PrintStatusConditionNotFainted::
+ homecall_jump_sf PrintStatusAilment
+
+; function to print pokemon level, leaving off the ":L" if the level is at least 100
+; INPUT:
+; hl = destination address
+; [wLoadedMonLevel] = level
+PrintLevel::
+ ld a, "<LV>" ; ":L" tile ID
+ ld [hli], a
+ ld c, 2 ; number of digits
+ ld a, [wLoadedMonLevel] ; level
+ cp 100
+ jr c, PrintLevelCommon
+; if level at least 100, write over the ":L" tile
+ dec hl
+ inc c ; increment number of digits to 3
+ jr PrintLevelCommon
+
+; prints the level without leaving off ":L" regardless of level
+; INPUT:
+; hl = destination address
+; [wLoadedMonLevel] = level
+PrintLevelFull::
+ ld a, "<LV>" ; ":L" tile ID
+ ld [hli], a
+ ld c, 3 ; number of digits
+ ld a, [wLoadedMonLevel] ; level
+
+PrintLevelCommon::
+ ld [wd11e], a
+ ld de, wd11e
+ ld b, LEFT_ALIGN | 1 ; 1 byte
+ jp PrintNumber
+
+GetwMoves::
+; Unused. Returns the move at index a from wMoves in a
+ ld hl, wMoves
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hl]
+ ret
+
+; copies the base stat data of a pokemon to wMonHeader
+; INPUT:
+; [wd0b5] = pokemon ID
+GetMonHeader::
+ ldh a, [hLoadedROMBank]
+ push af
+ switchbank BaseStats
+ push bc
+ push de
+ push hl
+ ld a, [wd11e]
+ push af
+ ld a, [wd0b5]
+ ld [wd11e], a
+ ld de, FossilKabutopsPic
+ ld b, $66 ; size of Kabutops fossil and Ghost sprites
+ cp FOSSIL_KABUTOPS ; Kabutops fossil
+ jr z, .specialID
+ ld de, GhostPic
+ cp MON_GHOST ; Ghost
+ jr z, .specialID
+ ld de, FossilAerodactylPic
+ ld b, $77 ; size of Aerodactyl fossil sprite
+ cp FOSSIL_AERODACTYL ; Aerodactyl fossil
+ jr z, .specialID
+ ;cp MEW
+ ;jr z, .mew
+ predef IndexToPokedex ; convert pokemon ID in [wd11e] to pokedex number
+ ld a, [wd11e]
+ dec a
+ ld bc, MonBaseStatsEnd - MonBaseStats
+ ld hl, BaseStats
+ call AddNTimes
+ ld de, wMonHeader
+ ld bc, MonBaseStatsEnd - MonBaseStats
+ call CopyData
+ jr .done
+.specialID
+ ld hl, wMonHSpriteDim
+ ld [hl], b ; write sprite dimensions
+ inc hl
+ ld [hl], e ; write front sprite pointer
+ inc hl
+ ld [hl], d
+.done
+ ld a, [wd0b5]
+ ld [wMonHIndex], a
+ pop af
+ ld [wd11e], a
+ pop hl
+ pop de
+ pop bc
+ pop af
+ call BankswitchCommon
+ ret
+
+; copy party pokemon's name to wcd6d
+GetPartyMonName2::
+ ld a, [wWhichPokemon] ; index within party
+ ld hl, wPartyMonNicks
+
+; this is called more often
+GetPartyMonName::
+ push hl
+ push bc
+ call SkipFixedLengthTextEntries ; add NAME_LENGTH to hl, a times
+ ld de, wcd6d
+ push de
+ ld bc, NAME_LENGTH
+ call CopyData
+ pop de
+ pop bc
+ pop hl
+ ret
diff --git a/home/predef.asm b/home/predef.asm
index dfa10772..a0889e0e 100644
--- a/home/predef.asm
+++ b/home/predef.asm
@@ -8,12 +8,12 @@ Predef::
; A hack for LoadDestinationWarpPosition.
; See LoadTilesetHeader (predef $19).
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
ld [wPredefParentBank], a
push af
ld a, BANK(GetPredefPointer)
- ld [H_LOADEDROMBANK], a
+ ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
call GetPredefPointer
diff --git a/home/predef_text.asm b/home/predef_text.asm
new file mode 100644
index 00000000..b494a2c8
--- /dev/null
+++ b/home/predef_text.asm
@@ -0,0 +1,28 @@
+PrintPredefTextID::
+ ldh [hSpriteIndexOrTextID], a
+ ld hl, TextPredefs
+ call SetMapTextPointer
+ ld hl, wTextPredefFlag
+ set 0, [hl]
+ call DisplayTextID
+
+RestoreMapTextPointer::
+ ld hl, wMapTextPtr
+ ldh a, [hSavedMapTextPtr]
+ ld [hli], a
+ ldh a, [hSavedMapTextPtr + 1]
+ ld [hl], a
+ ret
+
+SetMapTextPointer::
+ ld a, [wMapTextPtr]
+ ldh [hSavedMapTextPtr], a
+ ld a, [wMapTextPtr + 1]
+ ldh [hSavedMapTextPtr + 1], a
+ ld a, l
+ ld [wMapTextPtr], a
+ ld a, h
+ ld [wMapTextPtr + 1], a
+ ret
+
+INCLUDE "data/text_predef_pointers.asm"
diff --git a/home/print_bcd.asm b/home/print_bcd.asm
new file mode 100644
index 00000000..38aedd3c
--- /dev/null
+++ b/home/print_bcd.asm
@@ -0,0 +1,77 @@
+; function to print a BCD (Binary-coded decimal) number
+; de = address of BCD number
+; hl = destination address
+; c = flags and length
+; bit 7: if set, do not print leading zeroes
+; if unset, print leading zeroes
+; bit 6: if set, left-align the string (do not pad empty digits with spaces)
+; if unset, right-align the string
+; bit 5: if set, print currency symbol at the beginning of the string
+; if unset, do not print the currency symbol
+; bits 0-4: length of BCD number in bytes
+; Note that bits 5 and 7 are modified during execution. The above reflects
+; their meaning at the beginning of the functions's execution.
+PrintBCDNumber::
+ ld b, c ; save flags in b
+ res 7, c
+ res 6, c
+ res 5, c ; c now holds the length
+ bit 5, b
+ jr z, .loop
+ bit 7, b
+ jr nz, .loop
+ ld [hl], "¥"
+ inc hl
+.loop
+ ld a, [de]
+ swap a
+ call PrintBCDDigit ; print upper digit
+ ld a, [de]
+ call PrintBCDDigit ; print lower digit
+ inc de
+ dec c
+ jr nz, .loop
+ bit 7, b ; were any non-zero digits printed?
+ jr z, .done ; if so, we are done
+.numberEqualsZero ; if every digit of the BCD number is zero
+ bit 6, b ; left or right alignment?
+ jr nz, .skipRightAlignmentAdjustment
+ dec hl ; if the string is right-aligned, it needs to be moved back one space
+.skipRightAlignmentAdjustment
+ bit 5, b
+ jr z, .skipCurrencySymbol
+ ld [hl], "¥"
+ inc hl
+.skipCurrencySymbol
+ ld [hl], "0"
+ call PrintLetterDelay
+ inc hl
+.done
+ ret
+
+PrintBCDDigit::
+ and $f
+ and a
+ jr z, .zeroDigit
+.nonzeroDigit
+ bit 7, b ; have any non-space characters been printed?
+ jr z, .outputDigit
+; if bit 7 is set, then no numbers have been printed yet
+ bit 5, b ; print the currency symbol?
+ jr z, .skipCurrencySymbol
+ ld [hl], "¥"
+ inc hl
+ res 5, b
+.skipCurrencySymbol
+ res 7, b ; unset 7 to indicate that a nonzero digit has been reached
+.outputDigit
+ add "0"
+ ld [hli], a
+ jp PrintLetterDelay
+.zeroDigit
+ bit 7, b ; either printing leading zeroes or already reached a nonzero digit?
+ jr z, .outputDigit ; if so, print a zero digit
+ bit 6, b ; left or right alignment?
+ ret nz
+ inc hl ; if right-aligned, "print" a space by advancing the pointer
+ ret
diff --git a/home/print_num.asm b/home/print_num.asm
new file mode 100644
index 00000000..e2628b1f
--- /dev/null
+++ b/home/print_num.asm
@@ -0,0 +1,219 @@
+PrintNumber::
+; Print the c-digit, b-byte value at de.
+; Allows 2 to 7 digits. For 1-digit numbers, add
+; the value to char "0" instead of calling PrintNumber.
+; Flags LEADING_ZEROES and LEFT_ALIGN can be given
+; in bits 7 and 6 of b respectively.
+ push bc
+ xor a
+ ldh [hPastLeadingZeros], a
+ ldh [hNumToPrint], a
+ ldh [hNumToPrint + 1], a
+ ld a, b
+ and $f
+ cp 1
+ jr z, .byte
+ cp 2
+ jr z, .word
+.long
+ ld a, [de]
+ ldh [hNumToPrint], a
+ inc de
+ ld a, [de]
+ ldh [hNumToPrint + 1], a
+ inc de
+ ld a, [de]
+ ldh [hNumToPrint + 2], a
+ jr .start
+
+.word
+ ld a, [de]
+ ldh [hNumToPrint + 1], a
+ inc de
+ ld a, [de]
+ ldh [hNumToPrint + 2], a
+ jr .start
+
+.byte
+ ld a, [de]
+ ldh [hNumToPrint + 2], a
+
+.start
+ push de
+
+ ld d, b
+ ld a, c
+ ld b, a
+ xor a
+ ld c, a
+ ld a, b
+
+ cp 2
+ jr z, .tens
+ cp 3
+ jr z, .hundreds
+ cp 4
+ jr z, .thousands
+ cp 5
+ jr z, .ten_thousands
+ cp 6
+ jr z, .hundred_thousands
+
+print_digit: MACRO
+
+IF (\1) / $10000
+ ld a, \1 / $10000 % $100
+ELSE
+ xor a
+ENDC
+ ldh [hPowerOf10 + 0], a
+
+IF (\1) / $100
+ ld a, \1 / $100 % $100
+ELSE
+ xor a
+ENDC
+ ldh [hPowerOf10 + 1], a
+
+ ld a, \1 / $1 % $100
+ ldh [hPowerOf10 + 2], a
+
+ call .PrintDigit
+ call .NextDigit
+ENDM
+
+.millions print_digit 1000000
+.hundred_thousands print_digit 100000
+.ten_thousands print_digit 10000
+.thousands print_digit 1000
+.hundreds print_digit 100
+
+.tens
+ ld c, 0
+ ldh a, [hNumToPrint + 2]
+.mod
+ cp 10
+ jr c, .ok
+ sub 10
+ inc c
+ jr .mod
+.ok
+
+ ld b, a
+ ldh a, [hPastLeadingZeros]
+ or c
+ ldh [hPastLeadingZeros], a
+ jr nz, .past
+ call .PrintLeadingZero
+ jr .next
+.past
+ ld a, "0"
+ add c
+ ld [hl], a
+.next
+
+ call .NextDigit
+.ones
+ ld a, "0"
+ add b
+ ld [hli], a
+ pop de
+ dec de
+ pop bc
+ ret
+
+.PrintDigit:
+; Divide by the current decimal place.
+; Print the quotient, and keep the modulus.
+ ld c, 0
+.loop
+ ldh a, [hPowerOf10]
+ ld b, a
+ ldh a, [hNumToPrint]
+ ldh [hSavedNumToPrint], a
+ cp b
+ jr c, .underflow0
+ sub b
+ ldh [hNumToPrint], a
+ ldh a, [hPowerOf10 + 1]
+ ld b, a
+ ldh a, [hNumToPrint + 1]
+ ldh [hSavedNumToPrint + 1], a
+ cp b
+ jr nc, .noborrow1
+
+ ldh a, [hNumToPrint]
+ or 0
+ jr z, .underflow1
+ dec a
+ ldh [hNumToPrint], a
+ ldh a, [hNumToPrint + 1]
+.noborrow1
+
+ sub b
+ ldh [hNumToPrint + 1], a
+ ldh a, [hPowerOf10 + 2]
+ ld b, a
+ ldh a, [hNumToPrint + 2]
+ ldh [hSavedNumToPrint + 2], a
+ cp b
+ jr nc, .noborrow2
+
+ ldh a, [hNumToPrint + 1]
+ and a
+ jr nz, .borrowed
+
+ ldh a, [hNumToPrint]
+ and a
+ jr z, .underflow2
+ dec a
+ ldh [hNumToPrint], a
+ xor a
+.borrowed
+
+ dec a
+ ldh [hNumToPrint + 1], a
+ ldh a, [hNumToPrint + 2]
+.noborrow2
+ sub b
+ ldh [hNumToPrint + 2], a
+ inc c
+ jr .loop
+
+.underflow2
+ ldh a, [hSavedNumToPrint + 1]
+ ldh [hNumToPrint + 1], a
+.underflow1
+ ldh a, [hSavedNumToPrint]
+ ldh [hNumToPrint], a
+.underflow0
+ ldh a, [hPastLeadingZeros]
+ or c
+ jr z, .PrintLeadingZero
+
+ ld a, "0"
+ add c
+ ld [hl], a
+ ldh [hPastLeadingZeros], a
+ ret
+
+.PrintLeadingZero:
+ bit BIT_LEADING_ZEROES, d
+ ret z
+ ld [hl], "0"
+ ret
+
+.NextDigit:
+; Increment unless the number is left-aligned,
+; leading zeroes are not printed, and no digits
+; have been printed yet.
+ bit BIT_LEADING_ZEROES, d
+ jr nz, .inc
+ bit BIT_LEFT_ALIGN, d
+ jr z, .inc
+ ldh a, [hPastLeadingZeros]
+ and a
+ ret z
+.inc
+ inc hl
+ ret
diff --git a/home/print_text.asm b/home/print_text.asm
new file mode 100644
index 00000000..049ddfb4
--- /dev/null
+++ b/home/print_text.asm
@@ -0,0 +1,45 @@
+; This function is used to wait a short period after printing a letter to the
+; screen unless the player presses the A/B button or the delay is turned off
+; through the [wd730] or [wLetterPrintingDelayFlags] flags.
+PrintLetterDelay::
+ ld a, [wd730]
+ bit 6, a
+ ret nz
+ ld a, [wLetterPrintingDelayFlags]
+ bit 1, a
+ ret z
+ push hl
+ push de
+ push bc
+ ld a, [wLetterPrintingDelayFlags]
+ bit 0, a
+ jr z, .waitOneFrame
+ ld a, [wOptions]
+ and $f
+ ldh [hFrameCounter], a
+ jr .checkButtons
+.waitOneFrame
+ ld a, 1
+ ldh [hFrameCounter], a
+.checkButtons
+ call Joypad
+ ldh a, [hJoyHeld]
+.checkAButton
+ bit 0, a ; is the A button pressed?
+ jr z, .checkBButton
+ jr .endWait
+.checkBButton
+ bit 1, a ; is the B button pressed?
+ jr z, .buttonsNotPressed
+.endWait
+ call DelayFrame
+ jr .done
+.buttonsNotPressed ; if neither A nor B is pressed
+ ldh a, [hFrameCounter]
+ and a
+ jr nz, .checkButtons
+.done
+ pop bc
+ pop de
+ pop hl
+ ret
diff --git a/home/random.asm b/home/random.asm
new file mode 100644
index 00000000..33a24425
--- /dev/null
+++ b/home/random.asm
@@ -0,0 +1,12 @@
+Random::
+; Return a random number in a.
+; For battles, use BattleRandom.
+ push hl
+ push de
+ push bc
+ farcall Random_
+ ldh a, [hRandomAdd]
+ pop bc
+ pop de
+ pop hl
+ ret
diff --git a/home/reload_sprites.asm b/home/reload_sprites.asm
new file mode 100644
index 00000000..63a71d26
--- /dev/null
+++ b/home/reload_sprites.asm
@@ -0,0 +1,19 @@
+; Copy the current map's sprites' tile patterns to VRAM again after they have
+; been overwritten by other tile patterns.
+ReloadMapSpriteTilePatterns::
+ ld hl, wFontLoaded
+ ld a, [hl]
+ push af
+ res 0, [hl]
+ push hl
+ xor a
+ ld [wSpriteSetID], a
+ call DisableLCD
+ call InitMapSprites
+ call EnableLCD
+ pop hl
+ pop af
+ ld [hl], a
+ call LoadPlayerSpriteGraphics
+ call LoadFontTilePatterns
+ jp UpdateSprites
diff --git a/home/reload_tiles.asm b/home/reload_tiles.asm
new file mode 100644
index 00000000..ae9f6544
--- /dev/null
+++ b/home/reload_tiles.asm
@@ -0,0 +1,67 @@
+; reloads text box tile patterns, current map view, and tileset tile patterns
+ReloadMapData::
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, [wCurMap]
+ call SwitchToMapRomBank
+ call DisableLCD
+ call LoadTextBoxTilePatterns
+ call LoadCurrentMapView
+ call LoadTilesetTilePatternData
+ call EnableLCD
+ pop af
+ call BankswitchCommon
+ ret
+
+; reloads tileset tile patterns
+ReloadTilesetTilePatterns::
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, [wCurMap]
+ call SwitchToMapRomBank
+ call DisableLCD
+ call LoadTilesetTilePatternData
+ call EnableLCD
+ pop af
+ call BankswitchCommon
+ ret
+
+; shows the town map and lets the player choose a destination to fly to
+ChooseFlyDestination::
+ ld hl, wd72e
+ res 4, [hl]
+ farjp LoadTownMap_Fly
+
+PrinterSerial::
+ homecall PrinterSerial_
+ ret
+
+SerialFunction::
+ ld a, [wPrinterConnectionOpen]
+ bit 0, a
+ ret z
+ ld a, [wPrinterOpcode]
+ and a
+ ret nz
+ ld hl, wOverworldMap + 650
+ inc [hl]
+ ld a, [hl]
+ cp $6
+ ret c
+ xor a
+ ld [hl], a
+ ld a, $0c
+ ld [wPrinterOpcode], a
+ ld a, $88
+ ldh [rSB], a
+ ld a, $1
+ ldh [rSC], a
+ ld a, START_TRANSFER_INTERNAL_CLOCK
+ ldh [rSC], a
+ ret
+
+; causes the text box to close without waiting for a button press after displaying text
+DisableWaitingAfterTextDisplay::
+ ld a, $01
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ ret
diff --git a/home/reset_player_sprite.asm b/home/reset_player_sprite.asm
new file mode 100644
index 00000000..2765d613
--- /dev/null
+++ b/home/reset_player_sprite.asm
@@ -0,0 +1,21 @@
+ResetPlayerSpriteData::
+ ld hl, wSpriteStateData1
+ call ResetPlayerSpriteData_ClearSpriteData
+ ld hl, wSpriteStateData2
+ call ResetPlayerSpriteData_ClearSpriteData
+ ld a, $1
+ ld [wSpritePlayerStateData1PictureID], a
+ ld [wSpritePlayerStateData2ImageBaseOffset], a
+ ld hl, wSpritePlayerStateData1YPixels
+ ld [hl], $3c ; set Y screen pos
+ inc hl
+ inc hl
+ ld [hl], $40 ; set X screen pos
+ ret
+
+; overwrites sprite data with zeroes
+ResetPlayerSpriteData_ClearSpriteData::
+ ld bc, $10
+ xor a
+ call FillMemory
+ ret
diff --git a/home/serial.asm b/home/serial.asm
index 5fe7fb81..ef914933 100644
--- a/home/serial.asm
+++ b/home/serial.asm
@@ -6,46 +6,46 @@ Serial::
ld a, [wPrinterConnectionOpen]
bit 0, a
jp nz, PrinterSerial__
- ld a, [hSerialConnectionStatus]
+ ldh a, [hSerialConnectionStatus]
inc a
jr z, .connectionNotYetEstablished
- ld a, [rSB]
- ld [hSerialReceiveData], a
- ld a, [hSerialSendData]
- ld [rSB], a
- ld a, [hSerialConnectionStatus]
+ ldh a, [rSB]
+ ldh [hSerialReceiveData], a
+ ldh a, [hSerialSendData]
+ ldh [rSB], a
+ ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
jr z, .done
; using external clock
ld a, START_TRANSFER_EXTERNAL_CLOCK
- ld [rSC], a
+ ldh [rSC], a
jr .done
.connectionNotYetEstablished
- ld a, [rSB]
- ld [hSerialReceiveData], a
- ld [hSerialConnectionStatus], a
+ ldh a, [rSB]
+ ldh [hSerialReceiveData], a
+ ldh [hSerialConnectionStatus], a
cp USING_INTERNAL_CLOCK
jr z, .usingInternalClock
; using external clock
xor a
- ld [rSB], a
+ ldh [rSB], a
ld a, $3
- ld [rDIV], a
+ ldh [rDIV], a
.waitLoop
- ld a, [rDIV]
+ ldh a, [rDIV]
bit 7, a
jr nz, .waitLoop
ld a, START_TRANSFER_EXTERNAL_CLOCK
- ld [rSC], a
+ ldh [rSC], a
jr .done
.usingInternalClock
xor a
- ld [rSB], a
+ ldh [rSB], a
.done
ld a, $1
- ld [hSerialReceivedNewData], a
+ ldh [hSerialReceivedNewData], a
ld a, SERIAL_NO_DATA_BYTE
- ld [hSerialSendData], a
+ ldh [hSerialSendData], a
pop hl
pop de
pop bc
@@ -57,10 +57,10 @@ Serial::
; bc = length of data
Serial_ExchangeBytes::
ld a, 1
- ld [hSerialIgnoringInitialData], a
+ ldh [hSerialIgnoringInitialData], a
.loop
ld a, [hl]
- ld [hSerialSendData], a
+ ldh [hSerialSendData], a
call Serial_ExchangeByte
push bc
ld b, a
@@ -69,7 +69,7 @@ Serial_ExchangeBytes::
.waitLoop
dec a
jr nz, .waitLoop
- ld a, [hSerialIgnoringInitialData]
+ ldh a, [hSerialIgnoringInitialData]
and a
ld a, b
pop bc
@@ -78,7 +78,7 @@ Serial_ExchangeBytes::
cp SERIAL_PREAMBLE_BYTE
jr nz, .loop
xor a
- ld [hSerialIgnoringInitialData], a
+ ldh [hSerialIgnoringInitialData], a
jr .loop
.storeReceivedByte
ld [de], a
@@ -91,17 +91,17 @@ Serial_ExchangeBytes::
Serial_ExchangeByte::
xor a
- ld [hSerialReceivedNewData], a
- ld a, [hSerialConnectionStatus]
+ ldh [hSerialReceivedNewData], a
+ ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
jr nz, .loop
ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
+ ldh [rSC], a
.loop
- ld a, [hSerialReceivedNewData]
+ ldh a, [hSerialReceivedNewData]
and a
jr nz, .ok
- ld a, [hSerialConnectionStatus]
+ ldh a, [hSerialConnectionStatus]
cp USING_EXTERNAL_CLOCK
jr nz, .doNotIncrementUnknownCounter
call IsUnknownCounterZero
@@ -119,7 +119,7 @@ Serial_ExchangeByte::
jr nz, .loop
jp SetUnknownCounterToFFFF
.doNotIncrementUnknownCounter
- ld a, [rIE]
+ ldh a, [rIE]
and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK)
cp (1 << SERIAL)
jr nz, .loop
@@ -131,7 +131,7 @@ Serial_ExchangeByte::
dec a
ld [wUnknownSerialCounter2 + 1], a
jr nz, .loop
- ld a, [hSerialConnectionStatus]
+ ldh a, [hSerialConnectionStatus]
cp USING_EXTERNAL_CLOCK
jr z, .ok
ld a, 255
@@ -140,8 +140,8 @@ Serial_ExchangeByte::
jr nz, .waitLoop
.ok
xor a
- ld [hSerialReceivedNewData], a
- ld a, [rIE]
+ ldh [hSerialReceivedNewData], a
+ ldh a, [rIE]
and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK)
sub (1 << SERIAL)
jr nz, .skipReloadingUnknownCounter2
@@ -149,7 +149,7 @@ Serial_ExchangeByte::
ld a, $50
ld [wUnknownSerialCounter2 + 1], a
.skipReloadingUnknownCounter2
- ld a, [hSerialReceiveData]
+ ldh a, [hSerialReceiveData]
cp SERIAL_NO_DATA_BYTE
ret nz
call IsUnknownCounterZero
@@ -167,13 +167,13 @@ Serial_ExchangeByte::
call IsUnknownCounterZero
jr z, SetUnknownCounterToFFFF
.done
- ld a, [rIE]
+ ldh a, [rIE]
and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK)
cp (1 << SERIAL)
ld a, SERIAL_NO_DATA_BYTE
ret z
ld a, [hl]
- ld [hSerialSendData], a
+ ldh [hSerialSendData], a
call DelayFrame
jp Serial_ExchangeByte
@@ -206,18 +206,18 @@ Serial_ExchangeLinkMenuSelection::
ld de, wLinkMenuSelectionReceiveBuffer
ld c, 2 ; number of bytes to save
ld a, 1
- ld [hSerialIgnoringInitialData], a
+ ldh [hSerialIgnoringInitialData], a
.loop
call DelayFrame
ld a, [hl]
- ld [hSerialSendData], a
+ ldh [hSerialSendData], a
call Serial_ExchangeByte
ld b, a
inc hl
- ld a, [hSerialIgnoringInitialData]
+ ldh a, [hSerialIgnoringInitialData]
and a
ld a, 0
- ld [hSerialIgnoringInitialData], a
+ ldh [hSerialIgnoringInitialData], a
jr nz, .loop
ld a, b
ld [de], a
@@ -228,7 +228,7 @@ Serial_ExchangeLinkMenuSelection::
Serial_PrintWaitingTextAndSyncAndExchangeNybble::
call SaveScreenTilesToBuffer1
- callab PrintWaitingText
+ callfar PrintWaitingText
call Serial_SyncAndExchangeNybble
jp LoadScreenTilesFromBuffer1
@@ -276,20 +276,20 @@ Serial_ExchangeNybble::
call .doExchange
ld a, [wSerialExchangeNybbleSendData]
add $60
- ld [hSerialSendData], a
- ld a, [hSerialConnectionStatus]
+ ldh [hSerialSendData], a
+ ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
jr nz, .doExchange
ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
+ ldh [rSC], a
.doExchange
- ld a, [hSerialReceiveData]
+ ldh a, [hSerialReceiveData]
ld [wSerialExchangeNybbleTempReceiveData], a
and $f0
cp $60
ret nz
xor a
- ld [hSerialReceiveData], a
+ ldh [hSerialReceiveData], a
ld a, [wSerialExchangeNybbleTempReceiveData]
and $f
ld [wSerialExchangeNybbleReceiveData], a
@@ -297,21 +297,21 @@ Serial_ExchangeNybble::
Serial_SendZeroByte::
xor a
- ld [hSerialSendData], a
- ld a, [hSerialConnectionStatus]
+ ldh [hSerialSendData], a
+ ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
ret nz
ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
+ ldh [rSC], a
ret
Serial_TryEstablishingExternallyClockedConnection::
ld a, ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK
- ld [rSB], a
+ ldh [rSB], a
xor a
- ld [hSerialReceiveData], a
+ ldh [hSerialReceiveData], a
ld a, START_TRANSFER_EXTERNAL_CLOCK
- ld [rSC], a
+ ldh [rSC], a
ret
PrinterSerial__::
diff --git a/home/start.asm b/home/start.asm
new file mode 100644
index 00000000..379436ae
--- /dev/null
+++ b/home/start.asm
@@ -0,0 +1,10 @@
+_Start::
+ cp GBC
+ jr z, .gbc
+ xor a
+ jr .ok
+.gbc
+ ld a, 1
+.ok
+ ldh [hGBC], a
+ jp Init
diff --git a/home/start_menu.asm b/home/start_menu.asm
new file mode 100755
index 00000000..bd1b24bf
--- /dev/null
+++ b/home/start_menu.asm
@@ -0,0 +1,84 @@
+DisplayStartMenu::
+ switchbank StartMenu_Pokedex ; also bank for other functions
+ ld a, [wWalkBikeSurfState] ; walking/biking/surfing
+ ld [wWalkBikeSurfStateCopy], a
+ ld a, SFX_START_MENU
+ call PlaySound
+
+RedisplayStartMenu::
+ farcall DrawStartMenu
+RedisplayStartMenu_DoNotDrawStartMenu::
+ farcall PrintSafariZoneSteps ; print Safari Zone info, if in Safari Zone
+ call UpdateSprites
+.loop
+ call HandleMenuInput
+ ld b, a
+.checkIfUpPressed
+ bit 6, a ; was Up pressed?
+ jr z, .checkIfDownPressed
+ ld a, [wCurrentMenuItem] ; menu selection
+ and a
+ jr nz, .loop
+ ld a, [wLastMenuItem]
+ and a
+ jr nz, .loop
+; if the player pressed tried to go past the top item, wrap around to the bottom
+ CheckEvent EVENT_GOT_POKEDEX
+ ld a, 6 ; there are 7 menu items with the pokedex, so the max index is 6
+ jr nz, .wrapMenuItemId
+ dec a ; there are only 6 menu items without the pokedex
+.wrapMenuItemId
+ ld [wCurrentMenuItem], a
+ call EraseMenuCursor
+ jr .loop
+.checkIfDownPressed
+ bit 7, a
+ jr z, .buttonPressed
+; if the player pressed tried to go past the bottom item, wrap around to the top
+ CheckEvent EVENT_GOT_POKEDEX
+ ld a, [wCurrentMenuItem]
+ ld c, 7 ; there are 7 menu items with the pokedex
+ jr nz, .checkIfPastBottom
+ dec c ; there are only 6 menu items without the pokedex
+.checkIfPastBottom
+ cp c
+ jr nz, .loop
+; the player went past the bottom, so wrap to the top
+ xor a
+ ld [wCurrentMenuItem], a
+ call EraseMenuCursor
+ jr .loop
+.buttonPressed ; A, B, or Start button pressed
+ call PlaceUnfilledArrowMenuCursor
+ ld a, [wCurrentMenuItem]
+ ld [wBattleAndStartSavedMenuItem], a ; save current menu selection
+ ld a, b
+ and %00001010 ; was the Start button or B button pressed?
+ jp nz, CloseStartMenu
+ call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2
+ CheckEvent EVENT_GOT_POKEDEX
+ ld a, [wCurrentMenuItem]
+ jr nz, .displayMenuItem
+ inc a ; adjust position to account for missing pokedex menu item
+.displayMenuItem
+ cp 0
+ jp z, StartMenu_Pokedex
+ cp 1
+ jp z, StartMenu_Pokemon
+ cp 2
+ jp z, StartMenu_Item
+ cp 3
+ jp z, StartMenu_TrainerInfo
+ cp 4
+ jp z, StartMenu_SaveReset
+ cp 5
+ jp z, StartMenu_Option
+
+; EXIT falls through to here
+CloseStartMenu::
+ call Joypad
+ ldh a, [hJoyPressed]
+ bit 0, a ; was A button newly pressed?
+ jr nz, CloseStartMenu
+ call LoadTextBoxTilePatterns
+ jp CloseTextDisplay
diff --git a/home/text.asm b/home/text.asm
index f78227eb..78d69138 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -5,9 +5,9 @@ TextBoxBorder::
push hl
ld a, "┌"
ld [hli], a
- inc a ; ─
- call NPlaceChar
- inc a ; ┐
+ inc a ; "─"
+ call .PlaceChars
+ inc a ; "┐"
ld [hl], a
pop hl
@@ -20,7 +20,7 @@ TextBoxBorder::
ld a, "│"
ld [hli], a
ld a, " "
- call NPlaceChar
+ call .PlaceChars
ld [hl], "│"
pop hl
@@ -33,11 +33,11 @@ TextBoxBorder::
ld a, "└"
ld [hli], a
ld a, "─"
- call NPlaceChar
+ call .PlaceChars
ld [hl], "┘"
ret
-NPlaceChar::
+.PlaceChars::
; Place char a c times.
ld d, c
.loop
@@ -48,21 +48,21 @@ NPlaceChar::
PlaceString::
push hl
+
PlaceNextChar::
ld a, [de]
-
cp "@"
- jr nz, Char4ETest
+ jr nz, .NotTerminator
ld b, h
ld c, l
pop hl
ret
-Char4ETest::
- cp $4E ; next
- jr nz, .char4FTest
+.NotTerminator
+ cp "<NEXT>"
+ jr nz, .NotNext
ld bc, 2 * SCREEN_WIDTH
- ld a, [hFlags_0xFFFA]
+ ldh a, [hFlagsFFFA]
bit 2, a
jr z, .ok
ld bc, SCREEN_WIDTH
@@ -70,142 +70,101 @@ Char4ETest::
pop hl
add hl, bc
push hl
- jp PlaceNextChar_inc
+ jp NextChar
-.char4FTest
- cp $4F ; line
- jr nz, .next3
+.NotNext
+ cp "<LINE>"
+ jr nz, .NotLine
pop hl
- coord hl, 1, 16
+ hlcoord 1, 16
push hl
- jp PlaceNextChar_inc
-
-.next3 ; Check against a dictionary
-dict: macro
-if \1 == 0
- and a
-else
- cp \1
-endc
- jp z, \2
-endm
-
- dict $00, Char00 ; error
- dict $4C, Char4C ; autocont
- dict $4B, Char4B ; cont_
- dict $51, Char51 ; para
- dict $49, Char49 ; page
- dict $52, Char52 ; player
- dict $53, Char53 ; rival
- dict $54, Char54 ; POKé
- dict $5B, Char5B ; PC
- dict $5E, Char5E ; ROCKET
- dict $5C, Char5C ; TM
- dict $5D, Char5D ; TRAINER
- dict $55, Char55 ; cont
- dict $56, Char56 ; 6 dots
- dict $57, Char57 ; done
- dict $58, Char58 ; prompt
- dict $4A, Char4A ; PKMN
- dict $5F, Char5F ; dex
- dict $59, Char59 ; TARGET
- dict $5A, Char5A ; USER
+ jp NextChar
+
+.NotLine
+
+; Check against a dictionary
+ dict "<NULL>", NullChar
+ dict "<SCROLL>", _ContTextNoPause
+ dict "<_CONT>", _ContText
+ dict "<PARA>", Paragraph
+ dict "<PAGE>", PageChar
+ dict "<PLAYER>", PrintPlayerName
+ dict "<RIVAL>", PrintRivalName
+ dict "#", PlacePOKe
+ dict "<PC>", PCChar
+ dict "<ROCKET>", RocketChar
+ dict "<TM>", TMChar
+ dict "<TRAINER>", TrainerChar
+ dict "<CONT>", ContText
+ dict "<……>", SixDotsChar
+ dict "<DONE>", DoneText
+ dict "<PROMPT>", PromptText
+ dict "<PKMN>", PlacePKMN
+ dict "<DEXEND>", PlaceDexEnd
+ dict "<TARGET>", PlaceMoveTargetsName
+ dict "<USER>", PlaceMoveUsersName
ld [hli], a
call PrintLetterDelay
-PlaceNextChar_inc::
+
+NextChar::
inc de
jp PlaceNextChar
-Char00::
+NullChar::
ld b, h
ld c, l
pop hl
- ld de, Char00Text
+ ld de, TextIDErrorText
dec de
ret
-Char00Text:: ; “%d ERROR.”
- TX_FAR _Char00Text
- db "@"
-
-Char52:: ; player’s name
- push de
- ld de, wPlayerName
- jr FinishDTE
-
-Char53:: ; rival’s name
- push de
- ld de, wRivalName
- jr FinishDTE
-
-Char5D:: ; TRAINER
- push de
- ld de, Char5DText
- jr FinishDTE
+TextIDErrorText:: ; "[hSpriteIndexOrTextID] ERROR."
+ text_far _TextIDErrorText
+ text_end
-Char5C:: ; TM
+print_name: MACRO
push de
- ld de, Char5CText
- jr FinishDTE
-
-Char5B:: ; PC
- push de
- ld de, Char5BText
- jr FinishDTE
-
-Char5E:: ; ROCKET
- push de
- ld de, Char5EText
- jr FinishDTE
-
-Char54:: ; POKé
- push de
- ld de, Char54Text
- jr FinishDTE
+ ld de, \1
+ jr PlaceCommandCharacter
+ENDM
+
+PrintPlayerName:: print_name wPlayerName
+PrintRivalName:: print_name wRivalName
+
+TrainerChar:: print_name TrainerCharText
+TMChar:: print_name TMCharText
+PCChar:: print_name PCCharText
+RocketChar:: print_name RocketCharText
+PlacePOKe:: print_name PlacePOKeText
+SixDotsChar:: print_name SixDotsCharText
+PlacePKMN:: print_name PlacePKMNText
+
+PlaceMoveTargetsName::
+ ldh a, [hWhoseTurn]
+ xor 1
+ jr PlaceMoveUsersName.place
-Char56:: ; ……
- push de
- ld de, Char56Text
- jr FinishDTE
+PlaceMoveUsersName::
+ ldh a, [hWhoseTurn]
-Char4A:: ; PKMN
- push de
- ld de, Char4AText
- jr FinishDTE
-
-Char59::
-; depending on whose turn it is, print
-; enemy active monster’s name, prefixed with “Enemy ”
-; or
-; player active monster’s name
-; (like Char5A but flipped)
- ld a, [H_WHOSETURN]
- xor 1
- jr MonsterNameCharsCommon
-
-Char5A::
-; depending on whose turn it is, print
-; player active monster’s name
-; or
-; enemy active monster’s name, prefixed with “Enemy ”
- ld a, [H_WHOSETURN]
-MonsterNameCharsCommon::
+.place:
push de
and a
- jr nz, .Enemy
- ld de, wBattleMonNick ; player active monster name
- jr FinishDTE
+ jr nz, .enemy
-.Enemy
- ; print “Enemy ”
- ld de, Char5AText
+ ld de, wBattleMonNick
+ jr PlaceCommandCharacter
+
+.enemy
+ ld de, EnemyText
call PlaceString
ld h, b
ld l, c
- ld de, wEnemyMonNick ; enemy active monster name
+ ld de, wEnemyMonNick
+ ; fallthrough
-FinishDTE::
+PlaceCommandCharacter::
call PlaceString
ld h, b
ld l, c
@@ -213,28 +172,20 @@ FinishDTE::
inc de
jp PlaceNextChar
-Char5CText::
- db "TM@"
-Char5DText::
- db "TRAINER@"
-Char5BText::
- db "PC@"
-Char5EText::
- db "ROCKET@"
-Char54Text::
- db "POKé@"
-Char56Text::
- db "……@"
-Char5AText::
- db "Enemy @"
-Char4AText::
- db $E1, $E2, "@" ; PKMN
-
-Char55::
+TMCharText:: db "TM@"
+TrainerCharText:: db "TRAINER@"
+PCCharText:: db "PC@"
+RocketCharText:: db "ROCKET@"
+PlacePOKeText:: db "POKé@"
+SixDotsCharText:: db "……@"
+EnemyText:: db "Enemy @"
+PlacePKMNText:: db "<PK><MN>@"
+
+ContText::
push de
ld b, h
ld c, l
- ld hl, Char55Text
+ ld hl, ContCharText
call TextCommandProcessor
ld h, b
ld l, c
@@ -242,101 +193,99 @@ Char55::
inc de
jp PlaceNextChar
-Char55Text::
-; equivalent to Char4B
- TX_FAR _Char55Text
- db "@"
+ContCharText::
+ text_far _ContCharText
+ text_end
-Char5F::
-; ends a Pokédex entry
+PlaceDexEnd::
ld [hl], "."
pop hl
ret
-Char58:: ; prompt
+PromptText::
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jp z, .ok
ld a, "▼"
- Coorda 18, 16
+ ldcoord_a 18, 16
.ok
call ProtectedDelay3
call ManualTextScroll
ld a, " "
- Coorda 18, 16
-Char57:: ; done
+ ldcoord_a 18, 16
+
+DoneText::
pop hl
- ld de, Char58Text
+ ld de, .stop
dec de
ret
-Char58Text::
- db "@"
+.stop:
+ text_end
-Char51:: ; para
+Paragraph::
push de
ld a, "▼"
- Coorda 18, 16
+ ldcoord_a 18, 16
call ProtectedDelay3
call ManualTextScroll
- coord hl, 1, 13
+ hlcoord 1, 13
lb bc, 4, 18
call ClearScreenArea
ld c, 20
call DelayFrames
pop de
- coord hl, 1, 14
- jp PlaceNextChar_inc
+ hlcoord 1, 14
+ jp NextChar
-Char49::
- ld a, [hFlags_0xFFFA]
+PageChar::
+ ldh a, [hFlagsFFFA]
bit 3, a
- jr z, .Char49
- ld a, $4e
- jp Char4ETest
+ jr z, .pageChar
+ ld a, "<NEXT>"
+ jp PlaceNextChar.NotTerminator
-.Char49
+.pageChar
push de
ld a, "▼"
- Coorda 18, 16
+ ldcoord_a 18, 16
call ProtectedDelay3
call ManualTextScroll
- coord hl, 1, 10
+ hlcoord 1, 10
lb bc, 7, 18
call ClearScreenArea
ld c, 20
call DelayFrames
pop de
pop hl
- coord hl, 1, 11
+ hlcoord 1, 11
push hl
- jp PlaceNextChar_inc
+ jp NextChar
-Char4B::
+_ContText::
ld a, "▼"
- Coorda 18, 16
+ ldcoord_a 18, 16
call ProtectedDelay3
push de
call ManualTextScroll
pop de
ld a, " "
- Coorda 18, 16
- ;fall through
-Char4C::
+ ldcoord_a 18, 16
+_ContTextNoPause::
push de
call ScrollTextUpOneLine
call ScrollTextUpOneLine
- coord hl, 1, 16
+ hlcoord 1, 16
pop de
- jp PlaceNextChar_inc
+ jp NextChar
; move both rows of text in the normal text box up one row
; always called twice in a row
; first time, copy the two rows of text to the "in between" rows that are usually emtpy
; second time, copy the bottom row of text into the top row of text
ScrollTextUpOneLine::
- coord hl, 0, 14 ; top row of text
- coord de, 0, 13 ; empty line above text
+ hlcoord 0, 14 ; top row of text
+ decoord 0, 13 ; empty line above text
ld b, SCREEN_WIDTH * 3
.copyText
ld a, [hli]
@@ -344,7 +293,7 @@ ScrollTextUpOneLine::
inc de
dec b
jr nz, .copyText
- coord hl, 1, 16
+ hlcoord 1, 16
ld a, " "
ld b, SCREEN_WIDTH - 2
.clearText
@@ -352,7 +301,6 @@ ScrollTextUpOneLine::
dec b
jr nz, .clearText
- ; wait five frames
ld b, 5
.WaitFrame
call DelayFrame
@@ -372,7 +320,7 @@ TextCommandProcessor::
push af
set 1, a
ld e, a
- ld a, [$fff9]
+ ldh a, [hClearLetterPrintingDelayFlags]
xor e
ld [wLetterPrintingDelayFlags], a
ld a, c
@@ -382,18 +330,18 @@ TextCommandProcessor::
NextTextCommand::
ld a, [hli]
- cp "@" ; terminator
- jr nz, .doTextCommand
+ cp TX_END
+ jr nz, .TextCommand
pop af
ld [wLetterPrintingDelayFlags], a
ret
-.doTextCommand
+
+.TextCommand:
push hl
- cp $17
- jp z, TextCommand17
- cp $0e
- jp nc, TextCommand0B ; if a != 0x17 and a >= 0xE, go to command 0xB
-; if a < 0xE, use a jump table
+ cp TX_FAR
+ jp z, TextCommand_FAR
+ cp TX_SOUND_POKEDEX_RATING
+ jp nc, TextCommand_SOUND
ld hl, TextCommandJumpTable
push bc
add a
@@ -406,12 +354,8 @@ NextTextCommand::
ld l, a
jp hl
-; draw box
-; 04AAAABBCC
-; AAAA = address of upper left corner
-; BB = height
-; CC = width
-TextCommand04::
+TextCommand_BOX::
+; draw a box (height, width)
pop hl
ld a, [hli]
ld e, a
@@ -428,9 +372,8 @@ TextCommand04::
pop hl
jr NextTextCommand
-; place string inline
-; 00{string}
-TextCommand00::
+TextCommand_START::
+; write text until "@"
pop hl
ld d, h
ld e, l
@@ -442,10 +385,8 @@ TextCommand00::
inc hl
jr NextTextCommand
-; place string from RAM
-; 01AAAA
-; AAAA = address of string
-TextCommand01::
+TextCommand_RAM::
+; write text from a ram address (little endian)
pop hl
ld a, [hli]
ld e, a
@@ -458,13 +399,8 @@ TextCommand01::
pop hl
jr NextTextCommand
-; print BCD number
-; 02AAAABB
-; AAAA = address of BCD number
-; BB
-; bits 0-4 = length in bytes
-; bits 5-7 = unknown flags
-TextCommand02::
+TextCommand_BCD::
+; write bcd from address, typically ram
pop hl
ld a, [hli]
ld e, a
@@ -481,10 +417,8 @@ TextCommand02::
pop hl
jr NextTextCommand
-; repoint destination address
-; 03AAAA
-; AAAA = new destination address
-TextCommand03::
+TextCommand_MOVE::
+; move to a new tile
pop hl
ld a, [hli]
ld [wTextDest], a
@@ -494,58 +428,47 @@ TextCommand03::
ld b, a
jp NextTextCommand
-; repoint destination to second line of dialogue text box
-; 05
-; (no arguments)
-TextCommand05::
+TextCommand_LOW::
+; write text at (1,16)
pop hl
- coord bc, 1, 16 ; address of second line of dialogue text box
+ bccoord 1, 16 ; second line of dialogue text box
jp NextTextCommand
-; blink arrow and wait for A or B to be pressed
-; 06
-; (no arguments)
-TextCommand06::
+TextCommand_PROMPT_BUTTON::
+; wait for button press; show arrow
ld a, [wLinkState]
cp LINK_STATE_BATTLING
- jp z, TextCommand0D
+ jp z, TextCommand_WAIT_BUTTON
ld a, "▼"
- Coorda 18, 16 ; place down arrow in lower right corner of dialogue text box
+ ldcoord_a 18, 16 ; place down arrow in lower right corner of dialogue text box
push bc
call ManualTextScroll ; blink arrow and wait for A or B to be pressed
pop bc
ld a, " "
- Coorda 18, 16 ; overwrite down arrow with blank space
+ ldcoord_a 18, 16 ; overwrite down arrow with blank space
pop hl
jp NextTextCommand
-; scroll text up one line
-; 07
-; (no arguments)
-TextCommand07::
+TextCommand_SCROLL::
+; pushes text up two lines and sets the BC cursor to the border tile
+; below the first character column of the text box.
ld a, " "
- Coorda 18, 16 ; place blank space in lower right corner of dialogue text box
+ ldcoord_a 18, 16 ; place blank space in lower right corner of dialogue text box
call ScrollTextUpOneLine
call ScrollTextUpOneLine
pop hl
- coord bc, 1, 16 ; address of second line of dialogue text box
+ bccoord 1, 16 ; second line of dialogue text box
jp NextTextCommand
-; execute asm inline
-; 08{code}
-TextCommand08::
+TextCommand_START_ASM::
+; run assembly code
pop hl
ld de, NextTextCommand
- push de ; return address
+ push de
jp hl
-; print decimal number (converted from binary number)
-; 09AAAABB
-; AAAA = address of number
-; BB
-; bits 0-3 = how many digits to display
-; bits 4-7 = how long the number is in bytes
-TextCommand09::
+TextCommand_NUM::
+; print a number
pop hl
ld a, [hli]
ld e, a
@@ -569,45 +492,42 @@ TextCommand09::
pop hl
jp NextTextCommand
-; wait half a second if the user doesn't hold A or B
-; 0A
-; (no arguments)
-TextCommand0A::
+TextCommand_PAUSE::
+; wait for button press or 30 frames
push bc
call Joypad
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
and A_BUTTON | B_BUTTON
- jr nz, .skipDelay
- ld c, 30
+ jr nz, .done
+ ld c, 30 ; half a second
call DelayFrames
-.skipDelay
+.done
pop bc
pop hl
jp NextTextCommand
-; plays sounds
-; this actually handles various command ID's, not just 0B
-; (no arguments)
-TextCommand0B::
+TextCommand_SOUND::
+; play a sound effect from TextCommandSounds
pop hl
push bc
dec hl
ld a, [hli]
- ld b, a ; b = command number that got us here
+ ld b, a ; b = text command number that got us here
push hl
ld hl, TextCommandSounds
.loop
ld a, [hli]
cp b
- jr z, .matchFound
+ jr z, .play
inc hl
jr .loop
-.matchFound
- cp $14
+
+.play
+ cp TX_SOUND_CRY_PIKACHU
jr z, .pokemonCry
- cp $15
+ cp TX_SOUND_CRY_PIDGEOT
jr z, .pokemonCry
- cp $16
+ cp TX_SOUND_CRY_DEWGONG
jr z, .pokemonCry
ld a, [hl]
call PlaySound
@@ -615,6 +535,7 @@ TextCommand0B::
pop hl
pop bc
jp NextTextCommand
+
.pokemonCry
push de
ld a, [hl]
@@ -624,95 +545,95 @@ TextCommand0B::
pop bc
jp NextTextCommand
-; format: text command ID, sound ID or cry ID
TextCommandSounds::
- db $0B, SFX_GET_ITEM_1
- db $12, SFX_TURN_OFF_PC
- db $0E, SFX_POKEDEX_RATING
- db $0F, SFX_GET_ITEM_1
- db $10, SFX_GET_ITEM_2
- db $11, SFX_GET_KEY_ITEM
- db $13, SFX_TRADE_MACHINE
- db $14, PIKACHU ; used in OakSpeech
- db $15, PIDGEOT ; used in SaffronCityText12
- db $16, DEWGONG ; unused?
-
-; draw ellipses
-; 0CAA
-; AA = number of ellipses to draw
-TextCommand0C::
+ db TX_SOUND_GET_ITEM_1, SFX_GET_ITEM_1 ; actually plays SFX_LEVEL_UP when the battle music engine is loaded
+ db TX_SOUND_CAUGHT_MON, SFX_CAUGHT_MON
+ db TX_SOUND_POKEDEX_RATING, SFX_POKEDEX_RATING ; unused
+ db TX_SOUND_GET_ITEM_1_DUPLICATE, SFX_GET_ITEM_1 ; unused
+ db TX_SOUND_GET_ITEM_2, SFX_GET_ITEM_2
+ db TX_SOUND_GET_KEY_ITEM, SFX_GET_KEY_ITEM
+ db TX_SOUND_DEX_PAGE_ADDED, SFX_DEX_PAGE_ADDED
+ db TX_SOUND_CRY_PIKACHU, PIKACHU ; used in OakSpeech
+ db TX_SOUND_CRY_PIDGEOT, PIDGEOT ; used in SaffronCityText12
+ db TX_SOUND_CRY_DEWGONG, DEWGONG ; unused
+
+TextCommand_DOTS::
+; wait for button press or 30 frames while printing "…"s
pop hl
ld a, [hli]
ld d, a
push hl
ld h, b
ld l, c
+
.loop
ld a, "…"
ld [hli], a
push de
call Joypad
pop de
- ld a, [hJoyHeld] ; joypad state
+ ldh a, [hJoyHeld] ; joypad state
and A_BUTTON | B_BUTTON
- jr nz, .skipDelay ; if so, skip the delay
+ jr nz, .next ; if so, skip the delay
ld c, 10
call DelayFrames
-.skipDelay
+.next
dec d
jr nz, .loop
+
ld b, h
ld c, l
pop hl
jp NextTextCommand
-; wait for A or B to be pressed
-; 0D
-; (no arguments)
-TextCommand0D::
+TextCommand_WAIT_BUTTON::
+; wait for button press; don't show arrow
push bc
- call ManualTextScroll ; wait for A or B to be pressed
+ call ManualTextScroll
pop bc
pop hl
jp NextTextCommand
-; process text commands in another ROM bank
-; 17AAAABB
-; AAAA = address of text commands
-; BB = bank
-TextCommand17::
+TextCommand_FAR::
+; write text from a different bank (little endian)
pop hl
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
+
ld a, [hli]
ld e, a
ld a, [hli]
ld d, a
ld a, [hli]
- ld [H_LOADEDROMBANK], a
+
+ ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
+
push hl
ld l, e
ld h, d
call TextCommandProcessor
pop hl
+
pop af
- ld [H_LOADEDROMBANK], a
+ ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
jp NextTextCommand
TextCommandJumpTable::
- dw TextCommand00
- dw TextCommand01
- dw TextCommand02
- dw TextCommand03
- dw TextCommand04
- dw TextCommand05
- dw TextCommand06
- dw TextCommand07
- dw TextCommand08
- dw TextCommand09
- dw TextCommand0A
- dw TextCommand0B
- dw TextCommand0C
- dw TextCommand0D
+; entries correspond to TX_* constants (see macros/scripts/text.asm)
+ dw TextCommand_START ; TX_START
+ dw TextCommand_RAM ; TX_RAM
+ dw TextCommand_BCD ; TX_BCD
+ dw TextCommand_MOVE ; TX_MOVE
+ dw TextCommand_BOX ; TX_BOX
+ dw TextCommand_LOW ; TX_LOW
+ dw TextCommand_PROMPT_BUTTON ; TX_PROMPT_BUTTON
+ dw TextCommand_SCROLL ; TX_SCROLL
+ dw TextCommand_START_ASM ; TX_START_ASM
+ dw TextCommand_NUM ; TX_NUM
+ dw TextCommand_PAUSE ; TX_PAUSE
+ dw TextCommand_SOUND ; TX_SOUND_GET_ITEM_1 (also handles other TX_SOUND_* commands)
+ dw TextCommand_DOTS ; TX_DOTS
+ dw TextCommand_WAIT_BUTTON ; TX_WAIT_BUTTON
+ ; greater TX_* constants are handled directly by NextTextCommand
diff --git a/home/text_script.asm b/home/text_script.asm
new file mode 100644
index 00000000..1847e23b
--- /dev/null
+++ b/home/text_script.asm
@@ -0,0 +1,225 @@
+; this function is used to display sign messages, sprite dialog, etc.
+; INPUT: [hSpriteIndexOrTextID] = sprite ID or text ID
+DisplayTextID::
+ ldh a, [hLoadedROMBank]
+ push af
+ farcall DisplayTextIDInit ; initialization
+ ld hl, wTextPredefFlag
+ bit 0, [hl]
+ res 0, [hl]
+ jr nz, .skipSwitchToMapBank
+ ld a, [wCurMap]
+ call SwitchToMapRomBank
+.skipSwitchToMapBank
+ ld a, 30 ; half a second
+ ldh [hFrameCounter], a ; used as joypad poll timer
+ ld hl, wMapTextPtr
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a ; hl = map text pointer
+ ld d, $00
+ ldh a, [hSpriteIndexOrTextID] ; text ID
+ ld [wSpriteIndex], a
+
+ dict TEXT_START_MENU, DisplayStartMenu
+ dict TEXT_PIKACHU_ANIM, DisplayPikachuEmotion
+ dict TEXT_SAFARI_GAME_OVER, DisplaySafariGameOverText
+ dict TEXT_MON_FAINTED, DisplayPokemonFaintedText
+ dict TEXT_BLACKED_OUT, DisplayPlayerBlackedOutText
+ dict TEXT_REPEL_WORE_OFF, DisplayRepelWoreOffText
+
+ ld a, [wNumSprites]
+ ld e, a
+ ldh a, [hSpriteIndexOrTextID] ; sprite ID
+ cp e
+ jr z, .spriteHandling
+ jr nc, .skipSpriteHandling
+.spriteHandling
+; get the text ID of the sprite
+ push hl
+ ;push de
+ ;push bc
+ ;farcall UpdateSpriteFacingOffsetAndDelayMovement ; update the graphics of the sprite the player is talking to (to face the right direction)
+ ;pop bc
+ ;pop de
+ ld hl, wMapSpriteData ; NPC text entries
+ ldh a, [hSpriteIndexOrTextID]
+ dec a
+ add a
+ ld e, a
+ ld d, $0
+ add hl, de
+ inc hl
+ ld a, [hl] ; a = text ID of the sprite
+ pop hl
+.skipSpriteHandling
+; look up the address of the text in the map's text entries
+ dec a
+ ld e, a
+ ld d, $0
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a ; hl = address of the text
+ ld a, [hl] ; a = first byte of text
+
+; check first byte of text for special cases
+
+dict2: MACRO
+ cp \1
+ jr nz, .not\@
+ \2
+ jr AfterDisplayingTextID
+.not\@
+ENDM
+
+ dict TX_SCRIPT_MART, DisplayPokemartDialogue
+ dict TX_SCRIPT_POKECENTER_NURSE, DisplayPokemonCenterDialogue
+ dict TX_SCRIPT_PLAYERS_PC, TextScript_ItemStoragePC
+ dict TX_SCRIPT_BILLS_PC, TextScript_BillsPC
+ dict TX_SCRIPT_POKECENTER_PC, TextScript_PokemonCenterPC
+ dict2 TX_SCRIPT_VENDING_MACHINE, farcall VendingMachineMenu
+ dict TX_SCRIPT_PRIZE_VENDOR, TextScript_GameCornerPrizeMenu
+ dict2 TX_SCRIPT_CABLE_CLUB_RECEPTIONIST, callfar CableClubNPC
+
+ call PrintText_NoCreatingTextBox ; display the text
+ ld a, [wDoNotWaitForButtonPressAfterDisplayingText]
+ and a
+ jr nz, HoldTextDisplayOpen
+
+AfterDisplayingTextID::
+ ld a, [wEnteringCableClub]
+ and a
+ jr nz, HoldTextDisplayOpen
+ call WaitForTextScrollButtonPress ; wait for a button press after displaying all the text
+
+; loop to hold the dialogue box open as long as the player keeps holding down the A button
+HoldTextDisplayOpen::
+ call Joypad
+ ldh a, [hJoyHeld]
+ bit 0, a ; is the A button being pressed?
+ jr nz, HoldTextDisplayOpen
+
+CloseTextDisplay::
+ ld a, [wCurMap]
+ call SwitchToMapRomBank
+ ld a, $90
+ ldh [hWY], a ; move the window off the screen
+ call DelayFrame
+ call LoadGBPal
+ xor a
+ ldh [hAutoBGTransferEnabled], a ; disable continuous WRAM to VRAM transfer each V-blank
+; loop to make sprites face the directions they originally faced before the dialogue
+ ld hl, wSprite01StateData2OrigFacingDirection
+ ld c, $0f
+ ld de, $10
+.restoreSpriteFacingDirectionLoop
+ ld a, [hl] ; x#SPRITESTATEDATA2_ORIGFACINGDIRECTION
+ dec h
+ ld [hl], a ; [x#SPRITESTATEDATA1_FACINGDIRECTION]
+ inc h
+ add hl, de
+ dec c
+ jr nz, .restoreSpriteFacingDirectionLoop
+ call InitMapSprites ; reload sprite tile pattern data (since it was partially overwritten by text tile patterns)
+ ld hl, wFontLoaded
+ res 0, [hl]
+ ld a, [wd732]
+ bit 3, a ; used fly warp
+ call z, LoadPlayerSpriteGraphics
+ call LoadCurrentMapView
+ pop af
+ call BankswitchCommon
+ jp UpdateSprites
+
+DisplayPokemartDialogue::
+ push hl
+ ld hl, PokemartGreetingText
+ call PrintText
+ pop hl
+ inc hl
+ call LoadItemList
+ ld a, PRICEDITEMLISTMENU
+ ld [wListMenuID], a
+ homecall DisplayPokemartDialogue_
+ jp AfterDisplayingTextID
+
+PokemartGreetingText::
+ text_far _PokemartGreetingText
+ text_end
+
+LoadItemList::
+ ld a, 1
+ ld [wUpdateSpritesEnabled], a
+ ld a, h
+ ld [wItemListPointer], a
+ ld a, l
+ ld [wItemListPointer + 1], a
+ ld de, wItemList
+.loop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ cp $ff
+ jr nz, .loop
+ ret
+
+DisplayPokemonCenterDialogue::
+; zeroing these doesn't appear to serve any purpose
+ xor a
+ ldh [hItemPrice], a
+ ldh [hItemPrice + 1], a
+ ldh [hItemPrice + 2], a
+
+ inc hl
+ homecall DisplayPokemonCenterDialogue_
+ jp AfterDisplayingTextID
+
+DisplaySafariGameOverText::
+ callfar PrintSafariGameOverText
+ jp AfterDisplayingTextID
+
+DisplayPokemonFaintedText::
+ ld hl, PokemonFaintedText
+ call PrintText
+ jp AfterDisplayingTextID
+
+PokemonFaintedText::
+ text_far _PokemonFaintedText
+ text_end
+
+DisplayPlayerBlackedOutText::
+ ld hl, PlayerBlackedOutText
+ call PrintText
+ ld a, [wd732]
+ res 5, a ; reset forced to use bike bit
+ ld [wd732], a
+ CheckEvent EVENT_IN_SAFARI_ZONE
+ jr z, .didnotblackoutinsafari
+ xor a
+ ld [wNumSafariBalls], a
+ ld [wSafariSteps], a
+ ld [wSafariSteps + 1], a
+ EventFlagAddressa EVENT_IN_SAFARI_ZONE
+ ld [wcf0d], a
+ ld [wSafariZoneGateCurScript], a
+.didnotblackoutinsafari
+ jp HoldTextDisplayOpen
+
+PlayerBlackedOutText::
+ text_far _PlayerBlackedOutText
+ text_end
+
+DisplayRepelWoreOffText::
+ ld hl, RepelWoreOffText
+ call PrintText
+ jp AfterDisplayingTextID
+
+RepelWoreOffText::
+ text_far _RepelWoreOffText
+ text_end
+
+DisplayPikachuEmotion::
+ callfar TalkToPikachu
+ jp CloseTextDisplay
diff --git a/home/textbox.asm b/home/textbox.asm
new file mode 100644
index 00000000..f95c72c7
--- /dev/null
+++ b/home/textbox.asm
@@ -0,0 +1,7 @@
+; function to draw various text boxes
+; INPUT:
+; [wTextBoxID] = text box ID
+; b, c = y, x cursor position (TWO_OPTION_MENU only)
+DisplayTextBoxID::
+ homecall_sf DisplayTextBoxID_
+ ret
diff --git a/home/tilemap.asm b/home/tilemap.asm
new file mode 100644
index 00000000..ea247763
--- /dev/null
+++ b/home/tilemap.asm
@@ -0,0 +1,45 @@
+UncompressSpriteFromDE::
+; Decompress pic at a:de.
+ ld hl, wSpriteInputPtr
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ jp UncompressSpriteData
+
+SaveScreenTilesToBuffer2::
+ hlcoord 0, 0
+ ld de, wTileMapBackup2
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ jp CopyData
+
+LoadScreenTilesFromBuffer2::
+ call LoadScreenTilesFromBuffer2DisableBGTransfer
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ ret
+
+; loads screen tiles stored in wTileMapBackup2 but leaves hAutoBGTransferEnabled disabled
+LoadScreenTilesFromBuffer2DisableBGTransfer::
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ ld hl, wTileMapBackup2
+ decoord 0, 0
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ jp CopyData
+
+SaveScreenTilesToBuffer1::
+ hlcoord 0, 0
+ ld de, wTileMapBackup
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ jp CopyData
+
+LoadScreenTilesFromBuffer1::
+ xor a
+ ldh [hAutoBGTransferEnabled], a
+ ld hl, wTileMapBackup
+ decoord 0, 0
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ call CopyData
+ ld a, 1
+ ldh [hAutoBGTransferEnabled], a
+ ret
diff --git a/home/trainers.asm b/home/trainers.asm
new file mode 100644
index 00000000..f407652a
--- /dev/null
+++ b/home/trainers.asm
@@ -0,0 +1,426 @@
+; stores hl in [wTrainerHeaderPtr]
+StoreTrainerHeaderPointer::
+ ld a, h
+ ld [wTrainerHeaderPtr], a
+ ld a, l
+ ld [wTrainerHeaderPtr+1], a
+ ret
+
+; executes the current map script from the function pointer array provided in de.
+; a: map script index to execute (unless overridden by [wd733] bit 4)
+; hl: trainer header pointer
+ExecuteCurMapScriptInTable::
+ push af
+ push de
+ call StoreTrainerHeaderPointer
+ pop hl
+ pop af
+ push hl
+ ld hl, wFlags_D733
+ bit 4, [hl]
+ res 4, [hl]
+ jr z, .useProvidedIndex ; test if map script index was overridden manually
+ ld a, [wCurMapScript]
+.useProvidedIndex
+ pop hl
+ ld [wCurMapScript], a
+ call CallFunctionInTable
+ ld a, [wCurMapScript]
+ ret
+
+LoadGymLeaderAndCityName::
+ push de
+ ld de, wGymCityName
+ ld bc, $11
+ call CopyData ; load city name
+ pop hl
+ ld de, wGymLeaderName
+ ld bc, NAME_LENGTH
+ jp CopyData ; load gym leader name
+
+; 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)
+; 4 -> before battle text (into hl)
+; 6 -> after battle text (into hl)
+; 8 -> end battle text (into hl)
+ReadTrainerHeaderInfo::
+ push de
+ push af
+ ld d, $0
+ ld e, a
+ ld hl, wTrainerHeaderPtr
+ ld a, [hli]
+ ld l, [hl]
+ ld h, a
+ add hl, de
+ pop af
+ and a
+ jr nz, .nonZeroOffset
+ ld a, [hl]
+ ld [wTrainerHeaderFlagBit], a ; store flag's bit
+ jr .done
+.nonZeroOffset
+ cp $2
+ jr z, .readPointer ; read flag's byte ptr
+ cp $4
+ jr z, .readPointer ; read before battle text
+ cp $6
+ jr z, .readPointer ; read after battle text
+ cp $8
+ jr z, .readPointer ; read end battle text
+ cp $a
+ jr nz, .done
+ ld a, [hli] ; read end battle text (2) but override the result afterwards (XXX why, bug?)
+ ld d, [hl]
+ ld e, a
+ jr .done
+.readPointer
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+.done
+ pop de
+ ret
+
+TrainerFlagAction::
+ predef_jump FlagActionPredef
+
+TalkToTrainer::
+ call StoreTrainerHeaderPointer
+ xor a
+ call ReadTrainerHeaderInfo ; read flag's bit
+ ld a, $2
+ call ReadTrainerHeaderInfo ; read flag's byte ptr
+ ld a, [wTrainerHeaderFlagBit]
+ ld c, a
+ ld b, FLAG_TEST
+ call TrainerFlagAction ; read trainer's flag
+ ld a, c
+ and a
+ jr z, .trainerNotYetFought ; test trainer's flag
+ ld a, $6
+ call ReadTrainerHeaderInfo ; print after battle text
+ jp PrintText
+.trainerNotYetFought
+ ld a, $4
+ call ReadTrainerHeaderInfo ; print before battle text
+ call PrintText
+ ld a, $a
+ call ReadTrainerHeaderInfo ; (?) does nothing apparently (maybe bug in ReadTrainerHeaderInfo)
+ push de
+ ld a, $8
+ call ReadTrainerHeaderInfo ; read end battle text
+ pop de
+ call SaveEndBattleTextPointers
+ 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, wCurMapScript
+ inc [hl] ; increment map script index before StartTrainerBattle increments it again (next script function is usually EndTrainerBattle)
+ jp StartTrainerBattle
+
+; checks if any trainers are seeing the player and wanting to fight
+CheckFightingMapTrainers::
+ call CheckForEngagingTrainers
+ ld a, [wSpriteIndex]
+ cp $ff
+ jr nz, .trainerEngaging
+.trainerNotEngaging
+ xor a
+ ld [wSpriteIndex], a
+ ld [wTrainerHeaderFlagBit], a
+ ret
+.trainerEngaging
+ ld hl, wFlags_D733
+ set 3, [hl]
+ ld [wEmotionBubbleSpriteIndex], a
+ xor a ; EXCLAMATION_BUBBLE
+ ld [wWhichEmotionBubble], a
+ predef EmotionBubble
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
+ ld [wJoyIgnore], a
+ xor a
+ ldh [hJoyHeld], a
+ call TrainerWalkUpToPlayer_Bank0
+ ld hl, wCurMapScript
+ inc [hl] ; increment map script index (next script function is usually DisplayEnemyTrainerTextAndStartBattle)
+ ret
+
+; display the before battle text after the enemy trainer has walked up to the player's sprite
+DisplayEnemyTrainerTextAndStartBattle::
+ ld a, [wd730]
+ and $1
+ ret nz ; return if the enemy trainer hasn't finished walking to the player's sprite
+ ld [wJoyIgnore], a
+ ld a, [wSpriteIndex]
+ ldh [hSpriteIndexOrTextID], a
+ call DisplayTextID
+ ; fall through
+
+StartTrainerBattle::
+ xor a
+ ld [wJoyIgnore], a
+ call InitBattleEnemyParameters
+ ld hl, wd72d
+ set 6, [hl]
+ set 7, [hl]
+ ld hl, wd72e
+ set 1, [hl]
+ ld hl, wCurMapScript
+ inc [hl] ; increment map script index (next script function is usually EndTrainerBattle)
+ ret
+
+EndTrainerBattle::
+ 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, [wIsInBattle]
+ cp $ff
+ jp z, ResetButtonPressedAndMapScript
+ ld a, $2
+ call ReadTrainerHeaderInfo
+ ld a, [wTrainerHeaderFlagBit]
+ ld c, a
+ ld b, FLAG_SET
+ call TrainerFlagAction ; flag trainer as fought
+ ld a, [wEnemyMonOrTrainerClass]
+ cp OPP_ID_OFFSET
+ jr nc, .skipRemoveSprite ; test if trainer was fought (in that case skip removing the corresponding sprite)
+ ld hl, wMissableObjectList
+ ld de, $2
+ ld a, [wSpriteIndex]
+ call IsInArray ; search for sprite ID
+ inc hl
+ ld a, [hl]
+ ld [wMissableObjectIndex], a ; load corresponding missable object index and remove it
+ predef HideObject
+.skipRemoveSprite
+ ld hl, wd730
+ bit 4, [hl]
+ res 4, [hl]
+ ret nz
+
+ResetButtonPressedAndMapScript::
+ xor a
+ ld [wJoyIgnore], a
+ ldh [hJoyHeld], a
+ ldh [hJoyPressed], a
+ ldh [hJoyReleased], a
+ ld [wCurMapScript], a ; reset battle status
+ ret
+
+; calls TrainerWalkUpToPlayer
+TrainerWalkUpToPlayer_Bank0::
+ farjp TrainerWalkUpToPlayer
+
+; sets opponent type and mon set/lvl based on the engaging trainer data
+InitBattleEnemyParameters::
+ ld a, [wEngagedTrainerClass]
+ ld [wCurOpponent], a
+ ld [wEnemyMonOrTrainerClass], a
+ cp OPP_ID_OFFSET
+ ld a, [wEngagedTrainerSet]
+ jr c, .noTrainer
+ ld [wTrainerNo], a
+ ret
+.noTrainer
+ ld [wCurEnemyLVL], a
+ ret
+
+GetSpritePosition1::
+ ld hl, _GetSpritePosition1
+ jr SpritePositionBankswitch
+
+GetSpritePosition2::
+ ld hl, _GetSpritePosition2
+ jr SpritePositionBankswitch
+
+SetSpritePosition1::
+ ld hl, _SetSpritePosition1
+ jr SpritePositionBankswitch
+
+SetSpritePosition2::
+ ld hl, _SetSpritePosition2
+SpritePositionBankswitch::
+ ld b, BANK(_GetSpritePosition1) ; BANK(_GetSpritePosition2), BANK(_SetSpritePosition1), BANK(_SetSpritePosition2)
+ jp Bankswitch ; indirect jump to one of the four functions
+
+CheckForEngagingTrainers::
+ xor a
+ call ReadTrainerHeaderInfo ; read trainer flag's bit (unused)
+ ld d, h ; store trainer header address in de
+ ld e, l
+.trainerLoop
+ call StoreTrainerHeaderPointer ; set trainer header pointer to current trainer
+ ld a, [de]
+ ld [wSpriteIndex], a ; store trainer flag's bit
+ ld [wTrainerHeaderFlagBit], a
+ cp -1
+ ret z
+ ld a, $2
+ call ReadTrainerHeaderInfo ; read trainer flag's byte ptr
+ ld b, FLAG_TEST
+ ld a, [wTrainerHeaderFlagBit]
+ ld c, a
+ call TrainerFlagAction ; read trainer flag
+ ld a, c
+ and a ; has the trainer already been defeated?
+ jr nz, .continue
+ push hl
+ push de
+ push hl
+ xor a
+ call ReadTrainerHeaderInfo ; get trainer header pointer
+ inc hl
+ ld a, [hl] ; read trainer engage distance
+ pop hl
+ ld [wTrainerEngageDistance], a
+ ld a, [wSpriteIndex]
+ swap a
+ ld [wTrainerSpriteOffset], a
+ predef TrainerEngage
+ pop de
+ pop hl
+ ld a, [wTrainerSpriteOffset]
+ and a
+ ret nz ; break if the trainer is engaging
+.continue
+ ld hl, $c
+ add hl, de
+ ld d, h
+ ld e, l
+ jr .trainerLoop
+
+; hl = text if the player wins
+; de = text if the player loses
+SaveEndBattleTextPointers::
+ ldh a, [hLoadedROMBank]
+ ld [wEndBattleTextRomBank], a
+ ld a, h
+ ld [wEndBattleWinTextPointer], a
+ ld a, l
+ ld [wEndBattleWinTextPointer + 1], a
+ ld a, d
+ ld [wEndBattleLoseTextPointer], a
+ ld a, e
+ ld [wEndBattleLoseTextPointer + 1], a
+ ret
+
+; loads data of some trainer on the current map and plays pre-battle music
+; [wSpriteIndex]: sprite ID of trainer who is engaged
+EngageMapTrainer::
+ ld hl, wMapSpriteExtraData
+ ld d, $0
+ ld a, [wSpriteIndex]
+ dec a
+ add a
+ ld e, a
+ add hl, de ; seek to engaged trainer data
+ ld a, [hli] ; load trainer class
+ ld [wEngagedTrainerClass], a
+ ld a, [hl] ; load trainer mon set
+ ld [wEngagedTrainerSet], a
+ jp PlayTrainerMusic
+
+PrintEndBattleText::
+ push hl
+ ld hl, wd72d
+ bit 7, [hl]
+ res 7, [hl]
+ pop hl
+ ret z
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, [wEndBattleTextRomBank]
+ ldh [hLoadedROMBank], a
+ ld [MBC1RomBank], a
+ push hl
+ farcall SaveTrainerName
+ ld hl, TrainerEndBattleText
+ call PrintText
+ pop hl
+ pop af
+ ldh [hLoadedROMBank], a
+ ld [MBC1RomBank], a
+ farcall FreezeEnemyTrainerSprite
+ jp WaitForSoundToFinish
+
+GetSavedEndBattleTextPointer::
+ ld a, [wBattleResult]
+ and a
+; won battle
+ jr nz, .lostBattle
+ ld a, [wEndBattleWinTextPointer]
+ ld h, a
+ ld a, [wEndBattleWinTextPointer + 1]
+ ld l, a
+ ret
+.lostBattle
+ ld a, [wEndBattleLoseTextPointer]
+ ld h, a
+ ld a, [wEndBattleLoseTextPointer + 1]
+ ld l, a
+ ret
+
+TrainerEndBattleText::
+ text_far _TrainerNameText
+ text_asm
+ call GetSavedEndBattleTextPointer
+ call TextCommandProcessor
+ jp TextScriptEnd
+
+PlayTrainerMusic::
+ ld a, [wEngagedTrainerClass]
+ cp OPP_RIVAL1
+ ret z
+ cp OPP_RIVAL2
+ ret z
+ cp OPP_RIVAL3
+ ret z
+ ld a, [wGymLeaderNo]
+ and a
+ ret nz
+ xor a
+ ld [wAudioFadeOutControl], a
+ call StopAllMusic
+ ld a, BANK(Music_MeetEvilTrainer)
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
+ ld a, [wEngagedTrainerClass]
+ ld b, a
+ ld hl, EvilTrainerList
+.evilTrainerListLoop
+ ld a, [hli]
+ cp $ff
+ jr z, .noEvilTrainer
+ cp b
+ jr nz, .evilTrainerListLoop
+ ld a, MUSIC_MEET_EVIL_TRAINER
+ jr .PlaySound
+.noEvilTrainer
+ ld hl, FemaleTrainerList
+.femaleTrainerListLoop
+ ld a, [hli]
+ cp $ff
+ jr z, .maleTrainer
+ cp b
+ jr nz, .femaleTrainerListLoop
+ ld a, MUSIC_MEET_FEMALE_TRAINER
+ jr .PlaySound
+.maleTrainer
+ ld a, MUSIC_MEET_MALE_TRAINER
+.PlaySound
+ ld [wNewSoundID], a
+ jp PlaySound
+
+INCLUDE "data/trainers/encounter_types.asm"
diff --git a/home/trainers2.asm b/home/trainers2.asm
new file mode 100644
index 00000000..78fb6463
--- /dev/null
+++ b/home/trainers2.asm
@@ -0,0 +1,54 @@
+GetTrainerInformation::
+ call GetTrainerName
+ ld a, [wLinkState]
+ and a
+ jr nz, .linkBattle
+ ld a, BANK(TrainerPicAndMoneyPointers)
+ call BankswitchHome
+ ld a, [wTrainerClass]
+ dec a
+ ld hl, TrainerPicAndMoneyPointers
+ ld bc, $5
+ call AddNTimes
+ ld de, wTrainerPicPointer
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ ld de, wTrainerBaseMoney
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ call IsFightingJessieJames
+ jp BankswitchBack
+.linkBattle
+ ld hl, wTrainerPicPointer
+ ld de, RedPicFront
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ ret
+
+IsFightingJessieJames::
+ ld a, [wTrainerClass]
+ cp ROCKET
+ ret nz
+ ld a, [wTrainerNo]
+ cp $2a
+ ret c
+ ld de, JessieJamesPic
+ cp $2e
+ jr c, .dummy
+ ld de, JessieJamesPic ; possibly meant to add another pic
+.dummy
+ ld hl, wTrainerPicPointer
+ ld a, e
+ ld [hli], a
+ ld [hl], d
+ ret
+
+GetTrainerName::
+ farjp GetTrainerName_
diff --git a/home/uncompress.asm b/home/uncompress.asm
new file mode 100644
index 00000000..182821aa
--- /dev/null
+++ b/home/uncompress.asm
@@ -0,0 +1,588 @@
+; bankswitches and runs _UncompressSpriteData
+; bank is given in a, sprite input stream is pointed to in wSpriteInputPtr
+UncompressSpriteData::
+ ld b, a
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, b
+ call BankswitchCommon
+ ld a, $0
+ call SwitchSRAMBankAndLatchClockData
+ call _UncompressSpriteData
+ call PrepareRTCDataAndDisableSRAM
+ pop af
+ call BankswitchCommon
+ ret
+
+; initializes necessary data to load a sprite and runs UncompressSpriteDataLoop
+_UncompressSpriteData::
+ ld hl, sSpriteBuffer1
+ ld c, LOW(2 * SPRITEBUFFERSIZE)
+ ld b, HIGH(2 * SPRITEBUFFERSIZE)
+ xor a
+ call FillMemory ; clear sprite buffer 1 and 2
+ ld a, $1
+ ld [wSpriteInputBitCounter], a
+ ld a, $3
+ ld [wSpriteOutputBitOffset], a
+ xor 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 [wSpriteHeight], a
+ ld a, b
+ swap a
+ and $f
+ add a
+ add a
+ add a
+ ld [wSpriteWidth], a
+ call ReadNextInputBit
+ 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 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::
+ ld hl, sSpriteBuffer1
+ ld a, [wSpriteLoadFlags]
+ bit 0, a
+ jr z, .useSpriteBuffer1 ; check which buffer to use
+ ld hl, sSpriteBuffer2
+.useSpriteBuffer1
+ call StoreSpriteOutputPointer
+ ld a, [wSpriteLoadFlags]
+ bit 1, a
+ jr z, .startDecompression ; check if last iteration
+ call ReadNextInputBit ; if last chunk, read 1-2 bit unpacking mode
+ and a
+ jr z, .unpackingMode0 ; 0 -> mode 0
+ call ReadNextInputBit ; 1 0 -> mode 1
+ inc a ; 1 1 -> mode 2
+.unpackingMode0
+ ld [wSpriteUnpackMode], a
+.startDecompression
+ call ReadNextInputBit
+ and a
+ jr z, .readRLEncodedZeros ; if first bit is 0, the input starts with zeroes, otherwise with (non-zero) input
+.readNextInput
+ call ReadNextInputBit
+ ld c, a
+ call ReadNextInputBit
+ sla c
+ or c ; read next two bits into c
+ and a
+ jr z, .readRLEncodedZeros ; 00 -> RLEncoded zeroes following
+ call WriteSpriteBitsToBuffer ; otherwise write input to output and repeat
+ call MoveToNextBufferPosition
+ jr .readNextInput
+.readRLEncodedZeros
+ ld c, $0 ; number of zeroes it length encoded, the number
+.countConsecutiveOnesLoop ; of consecutive ones determines the number of bits the number has
+ call ReadNextInputBit
+ and a
+ jr z, .countConsecutiveOnesFinished
+ inc c
+ jr .countConsecutiveOnesLoop
+.countConsecutiveOnesFinished
+ ld a, c
+ add a
+ ld hl, LengthEncodingOffsetList
+ add l
+ ld l, a
+ jr nc, .noCarry
+ inc h
+.noCarry
+ ld a, [hli] ; read offset that is added to the number later on
+ ld e, a ; adding an offset of 2^length - 1 makes every integer uniquely
+ ld d, [hl] ; representable in the length encoding and saves bits
+ push de
+ inc c
+ ld e, $0
+ ld d, e
+.readNumberOfZerosLoop ; reads the next c+1 bits of input
+ call ReadNextInputBit
+ or e
+ ld e, a
+ dec c
+ jr z, .readNumberOfZerosDone
+ sla e
+ rl d
+ jr .readNumberOfZerosLoop
+.readNumberOfZerosDone
+ pop hl ; add the offset
+ add hl, de
+ ld e, l
+ ld d, h
+.writeZerosLoop
+ ld b, e
+ xor a ; write 00 to buffer
+ call WriteSpriteBitsToBuffer
+ ld e, b
+ call MoveToNextBufferPosition
+ dec de
+ ld a, d
+ and a
+ jr nz, .continueLoop
+ ld a, e
+ and a
+.continueLoop
+ jr nz, .writeZerosLoop
+ jr .readNextInput
+
+; moves output pointer to next position
+; 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::
+ ld a, [wSpriteHeight]
+ ld b, a
+ ld a, [wSpriteCurPosY]
+ inc a
+ cp b
+ jr z, .curColumnDone
+ ld [wSpriteCurPosY], a
+ ld a, [wSpriteOutputPtr]
+ inc a
+ ld [wSpriteOutputPtr], a
+ ret nz
+ ld a, [wSpriteOutputPtr+1]
+ inc a
+ ld [wSpriteOutputPtr+1], a
+ ret
+.curColumnDone
+ xor a
+ ld [wSpriteCurPosY], a
+ ld a, [wSpriteOutputBitOffset]
+ and a
+ jr z, .bitOffsetsDone
+ dec a
+ ld [wSpriteOutputBitOffset], a
+ ld hl, wSpriteOutputPtrCached
+ ld a, [hli]
+ ld [wSpriteOutputPtr], a
+ ld a, [hl]
+ ld [wSpriteOutputPtr+1], a
+ ret
+.bitOffsetsDone
+ ld a, $3
+ ld [wSpriteOutputBitOffset], a
+ ld a, [wSpriteCurPosX]
+ add $8
+ ld [wSpriteCurPosX], a
+ ld b, a
+ ld a, [wSpriteWidth]
+ cp b
+ jr z, .allColumnsDone
+ ld a, [wSpriteOutputPtr]
+ ld l, a
+ ld a, [wSpriteOutputPtr+1]
+ ld h, a
+ inc hl
+ jp StoreSpriteOutputPointer
+.allColumnsDone
+ pop hl
+ xor a
+ 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 [wSpriteLoadFlags], a
+ jp UncompressSpriteDataLoop
+.done
+ jp UnpackSprite
+
+; writes 2 bits (from a) to the output buffer (pointed to from wSpriteOutputPtr)
+WriteSpriteBitsToBuffer::
+ ld e, a
+ ld a, [wSpriteOutputBitOffset]
+ and a
+ jr z, .offset0
+ cp $2
+ jr c, .offset1
+ jr z, .offset2
+ rrc e ; offset 3
+ rrc e
+ jr .offset0
+.offset1
+ sla e
+ sla e
+ jr .offset0
+.offset2
+ swap e
+.offset0
+ ld a, [wSpriteOutputPtr]
+ ld l, a
+ ld a, [wSpriteOutputPtr+1]
+ ld h, a
+ ld a, [hl]
+ or e
+ ld [hl], a
+ ret
+
+; reads next bit from input stream and returns it in a
+ReadNextInputBit::
+ ld a, [wSpriteInputBitCounter]
+ dec a
+ jr nz, .curByteHasMoreBitsToRead
+ call ReadNextInputByte
+ ld [wSpriteInputCurByte], a
+ ld a, $8
+.curByteHasMoreBitsToRead
+ ld [wSpriteInputBitCounter], a
+ ld a, [wSpriteInputCurByte]
+ rlca
+ ld [wSpriteInputCurByte], a
+ and $1
+ ret
+
+; reads next byte from input stream and returns it in a
+ReadNextInputByte::
+ ld a, [wSpriteInputPtr]
+ ld l, a
+ ld a, [wSpriteInputPtr+1]
+ ld h, a
+ ld a, [hli]
+ ld b, a
+ ld a, l
+ ld [wSpriteInputPtr], a
+ ld a, h
+ ld [wSpriteInputPtr+1], a
+ ld a, b
+ ret
+
+; the nth item is 2^n - 1
+LengthEncodingOffsetList::
+ dw %0000000000000001
+ dw %0000000000000011
+ dw %0000000000000111
+ dw %0000000000001111
+ dw %0000000000011111
+ dw %0000000000111111
+ dw %0000000001111111
+ dw %0000000011111111
+ dw %0000000111111111
+ dw %0000001111111111
+ dw %0000011111111111
+ dw %0000111111111111
+ dw %0001111111111111
+ dw %0011111111111111
+ dw %0111111111111111
+ dw %1111111111111111
+
+; unpacks the sprite data depending on the unpack mode
+UnpackSprite::
+ ld a, [wSpriteUnpackMode]
+ cp $2
+ jp z, UnpackSpriteMode2
+ and a
+ jp nz, XorSpriteChunks
+ ld hl, sSpriteBuffer1
+ call SpriteDifferentialDecode
+ 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::
+ xor a
+ ld [wSpriteCurPosX], a
+ ld [wSpriteCurPosY], a
+ call StoreSpriteOutputPointer
+ ld a, [wSpriteFlipped]
+ and a
+ jr z, .notFlipped
+ ld hl, DecodeNybble0TableFlipped
+ ld de, DecodeNybble1TableFlipped
+ jr .storeDecodeTablesPointers
+.notFlipped
+ ld hl, DecodeNybble0Table
+ ld de, DecodeNybble1Table
+.storeDecodeTablesPointers
+ ld a, l
+ ld [wSpriteDecodeTable0Ptr], a
+ ld a, h
+ ld [wSpriteDecodeTable0Ptr+1], a
+ ld a, e
+ ld [wSpriteDecodeTable1Ptr], a
+ ld a, d
+ ld [wSpriteDecodeTable1Ptr+1], a
+ ld e, $0 ; last decoded nybble, initialized to 0
+.decodeNextByteLoop
+ ld a, [wSpriteOutputPtr]
+ ld l, a
+ ld a, [wSpriteOutputPtr+1]
+ ld h, a
+ ld a, [hl]
+ ld b, a
+ swap a
+ and $f
+ call DifferentialDecodeNybble ; decode high nybble
+ swap a
+ ld d, a
+ ld a, b
+ and $f
+ call DifferentialDecodeNybble ; decode low nybble
+ or d
+ ld b, a
+ ld a, [wSpriteOutputPtr]
+ ld l, a
+ ld a, [wSpriteOutputPtr+1]
+ ld h, a
+ ld a, b
+ ld [hl], a ; write back decoded data
+ ld a, [wSpriteHeight]
+ add l ; move on to next column
+ jr nc, .noCarry
+ inc h
+.noCarry
+ ld [wSpriteOutputPtr], a
+ ld a, h
+ ld [wSpriteOutputPtr+1], a
+ ld a, [wSpriteCurPosX]
+ add $8
+ ld [wSpriteCurPosX], a
+ ld b, a
+ ld a, [wSpriteWidth]
+ cp b
+ jr nz, .decodeNextByteLoop ; test if current row is done
+ xor a
+ ld e, a
+ ld [wSpriteCurPosX], a
+ ld a, [wSpriteCurPosY] ; move on to next row
+ inc a
+ ld [wSpriteCurPosY], a
+ ld b, a
+ ld a, [wSpriteHeight]
+ cp b
+ jr z, .done ; test if all rows finished
+ ld a, [wSpriteOutputPtrCached]
+ ld l, a
+ ld a, [wSpriteOutputPtrCached+1]
+ ld h, a
+ inc hl
+ call StoreSpriteOutputPointer
+ jr .decodeNextByteLoop
+.done
+ xor 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)
+DifferentialDecodeNybble::
+ srl a ; c=a%2, a/=2
+ ld c, $0
+ jr nc, .evenNumber
+ ld c, $1
+.evenNumber
+ ld l, a
+ 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
+ jr .selectLookupTable
+.notFlipped
+ bit 0, e ; else consider LSB
+.selectLookupTable
+ ld e, l
+ jr nz, .initialValue1 ; load the appropriate table
+ ld a, [wSpriteDecodeTable0Ptr]
+ ld l, a
+ ld a, [wSpriteDecodeTable0Ptr+1]
+ jr .tableLookup
+.initialValue1
+ ld a, [wSpriteDecodeTable1Ptr]
+ ld l, a
+ ld a, [wSpriteDecodeTable1Ptr+1]
+.tableLookup
+ ld h, a
+ ld a, e
+ add l
+ ld l, a
+ jr nc, .noCarry
+ inc h
+.noCarry
+ ld a, [hl]
+ bit 0, c
+ jr nz, .selectLowNybble
+ swap a ; select high nybble
+.selectLowNybble
+ and $f
+ ld e, a ; update last decoded data
+ ret
+
+DecodeNybble0Table::
+ dn $0, $1
+ dn $3, $2
+ dn $7, $6
+ dn $4, $5
+ dn $f, $e
+ dn $c, $d
+ dn $8, $9
+ dn $b, $a
+DecodeNybble1Table::
+ dn $f, $e
+ dn $c, $d
+ dn $8, $9
+ dn $b, $a
+ dn $0, $1
+ dn $3, $2
+ dn $7, $6
+ dn $4, $5
+DecodeNybble0TableFlipped::
+ dn $0, $8
+ dn $c, $4
+ dn $e, $6
+ dn $2, $a
+ dn $f, $7
+ dn $3, $b
+ dn $1, $9
+ dn $d, $5
+DecodeNybble1TableFlipped::
+ dn $f, $7
+ dn $3, $b
+ dn $1, $9
+ dn $d, $5
+ dn $0, $8
+ dn $c, $4
+ dn $e, $6
+ dn $2, $a
+
+; combines the two loaded chunks with xor (the chunk loaded second is the destination). The source chunk is differeintial decoded beforehand.
+XorSpriteChunks::
+ xor a
+ ld [wSpriteCurPosX], a
+ ld [wSpriteCurPosY], a
+ call ResetSpriteBufferPointers
+ ld a, [wSpriteOutputPtr] ; points to buffer 1 or 2, depending on flags
+ ld l, a
+ ld a, [wSpriteOutputPtr+1]
+ ld h, a
+ call SpriteDifferentialDecode ; decode buffer 1 or 2, depending on flags
+ call ResetSpriteBufferPointers
+ ld a, [wSpriteOutputPtr] ; source buffer, points to buffer 1 or 2, depending on flags
+ ld l, a
+ ld a, [wSpriteOutputPtr+1]
+ ld h, a
+ ld a, [wSpriteOutputPtrCached] ; destination buffer, points to buffer 2 or 1, depending on flags
+ ld e, a
+ ld a, [wSpriteOutputPtrCached+1]
+ ld d, a
+.xorChunksLoop
+ ld a, [wSpriteFlipped]
+ and a
+ jr z, .notFlipped
+ push de
+ ld a, [de]
+ ld b, a
+ swap a
+ and $f
+ call ReverseNybble ; if flipped reverse the nybbles in the destination buffer
+ swap a
+ ld c, a
+ ld a, b
+ and $f
+ call ReverseNybble
+ or c
+ pop de
+ ld [de], a
+.notFlipped
+ ld a, [hli]
+ ld b, a
+ ld a, [de]
+ xor b
+ ld [de], a
+ inc de
+ ld a, [wSpriteCurPosY]
+ inc a
+ ld [wSpriteCurPosY], a ; go to next row
+ ld b, a
+ ld a, [wSpriteHeight]
+ cp b
+ jr nz, .xorChunksLoop ; test if column finished
+ xor a
+ ld [wSpriteCurPosY], a
+ ld a, [wSpriteCurPosX]
+ add $8
+ ld [wSpriteCurPosX], a ; go to next column
+ ld b, a
+ ld a, [wSpriteWidth]
+ cp b
+ jr nz, .xorChunksLoop ; test if all columns finished
+ xor a
+ ld [wSpriteCurPosX], a
+ ret
+
+; reverses the bits in the nybble given in register a
+ReverseNybble::
+ ld de, NybbleReverseTable
+ add e
+ ld e, a
+ jr nc, .noCarry
+ inc d
+.noCarry
+ ld a, [de]
+ ret
+
+; resets sprite buffer pointers to buffer 1 and 2, depending on wSpriteLoadFlags
+ResetSpriteBufferPointers::
+ ld a, [wSpriteLoadFlags]
+ bit 0, a
+ jr nz, .buffer2Selected
+ ld de, sSpriteBuffer1
+ ld hl, sSpriteBuffer2
+ jr .storeBufferPointers
+.buffer2Selected
+ ld de, sSpriteBuffer2
+ ld hl, sSpriteBuffer1
+.storeBufferPointers
+ ld a, l
+ ld [wSpriteOutputPtr], a
+ ld a, h
+ ld [wSpriteOutputPtr+1], a
+ ld a, e
+ ld [wSpriteOutputPtrCached], a
+ ld a, d
+ ld [wSpriteOutputPtrCached+1], a
+ ret
+
+; maps each nybble to its reverse
+NybbleReverseTable::
+ db $0, $8, $4, $c, $2, $a, $6 ,$e, $1, $9, $5, $d, $3, $b, $7 ,$f
+
+; combines the two loaded chunks with xor (the chunk loaded second is the destination). Both chunks are differeintial decoded beforehand.
+UnpackSpriteMode2::
+ call ResetSpriteBufferPointers
+ ld a, [wSpriteFlipped]
+ push af
+ xor a
+ ld [wSpriteFlipped], a ; temporarily clear flipped flag for decoding the destination chunk
+ ld a, [wSpriteOutputPtrCached]
+ ld l, a
+ ld a, [wSpriteOutputPtrCached+1]
+ ld h, a
+ call SpriteDifferentialDecode
+ call ResetSpriteBufferPointers
+ pop af
+ ld [wSpriteFlipped], a
+ jp XorSpriteChunks
+
+; stores hl into the output pointers
+StoreSpriteOutputPointer::
+ ld a, l
+ ld [wSpriteOutputPtr], a
+ ld [wSpriteOutputPtrCached], a
+ ld a, h
+ ld [wSpriteOutputPtr+1], a
+ ld [wSpriteOutputPtrCached+1], a
+ ret
diff --git a/home/update_sprites.asm b/home/update_sprites.asm
new file mode 100644
index 00000000..0c32dad8
--- /dev/null
+++ b/home/update_sprites.asm
@@ -0,0 +1,15 @@
+UpdateSprites::
+ ld a, [wUpdateSpritesEnabled]
+ dec a
+ ret nz
+ ldh a, [hLoadedROMBank]
+ push af
+ switchbank _UpdateSprites
+ ld a, $ff
+ ld [wUpdateSpritesEnabled], a
+ call _UpdateSprites
+ ld a, $1
+ ld [wUpdateSpritesEnabled], a
+ pop af
+ call BankswitchCommon
+ ret
diff --git a/home/vblank.asm b/home/vblank.asm
index 764e5277..ed39714f 100644
--- a/home/vblank.asm
+++ b/home/vblank.asm
@@ -5,24 +5,24 @@ VBlank::
push de
push hl
- ld a, [rVBK] ; vram bank
+ ldh a, [rVBK] ; vram bank
push af
xor a
- ld [rVBK], a ; reset vram bank to 0
+ ldh [rVBK], a ; reset vram bank to 0
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
ld [wVBlankSavedROMBank], a
- ld a, [hSCX]
- ld [rSCX], a
- ld a, [hSCY]
- ld [rSCY], a
+ ldh a, [hSCX]
+ ldh [rSCX], a
+ ldh a, [hSCY]
+ ldh [rSCY], a
ld a, [wDisableVBlankWYUpdate]
and a
jr nz, .ok
- ld a, [hWY]
- ld [rWY], a
+ ldh a, [hWY]
+ ldh [rWY], a
.ok
call AutoBgMapTransfer
@@ -31,9 +31,9 @@ VBlank::
call VBlankCopy
call VBlankCopyDouble
call UpdateMovingBgTiles
- call $ff80 ; hOAMDMA
+ call hDMARoutine
ld a, BANK(PrepareOAMData)
- ld [H_LOADEDROMBANK], a
+ ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
call PrepareOAMData
@@ -43,18 +43,18 @@ VBlank::
call Random
call ReadJoypad
- ld a, [H_VBLANKOCCURRED]
+ ldh a, [hVBlankOccurred]
and a
jr z, .skipZeroing
xor a
- ld [H_VBLANKOCCURRED], a
+ ldh [hVBlankOccurred], a
.skipZeroing
- ld a, [H_FRAMECOUNTER]
+ ldh a, [hFrameCounter]
and a
jr z, .skipDec
dec a
- ld [H_FRAMECOUNTER], a
+ ldh [hFrameCounter], a
.skipDec
call FadeOutAudio
@@ -65,11 +65,11 @@ VBlank::
call SerialFunction
ld a, [wVBlankSavedROMBank]
- ld [H_LOADEDROMBANK], a
+ ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
pop af
- ld [rVBK],a
+ ldh [rVBK], a
pop hl
pop de
@@ -85,10 +85,10 @@ DelayFrame::
NOT_VBLANKED EQU 1
ld a, NOT_VBLANKED
- ld [H_VBLANKOCCURRED], a
+ ldh [hVBlankOccurred], a
.halt
halt
- ld a, [H_VBLANKOCCURRED]
+ ldh a, [hVBlankOccurred]
and a
jr nz, .halt
ret
diff --git a/home/vcopy.asm b/home/vcopy.asm
index bec679c4..9b6efb3a 100644
--- a/home/vcopy.asm
+++ b/home/vcopy.asm
@@ -40,19 +40,19 @@ ClearBgMap::
; However, this function is also called repeatedly to redraw the whole screen
; when necessary. It is also used in trade animation and elevator code.
RedrawRowOrColumn::
- ld a, [hRedrawRowOrColumnMode]
+ ldh a, [hRedrawRowOrColumnMode]
and a
ret z
ld b, a
xor a
- ld [hRedrawRowOrColumnMode], a
+ ldh [hRedrawRowOrColumnMode], a
dec b
jr nz, .redrawRow
.redrawColumn
ld hl, wRedrawRowOrColumnSrcTiles
- ld a, [hRedrawRowOrColumnDest]
+ ldh a, [hRedrawRowOrColumnDest]
ld e, a
- ld a, [hRedrawRowOrColumnDest + 1]
+ ldh a, [hRedrawRowOrColumnDest + 1]
ld d, a
ld c, SCREEN_HEIGHT
.loop1
@@ -75,13 +75,13 @@ RedrawRowOrColumn::
dec c
jr nz, .loop1
xor a
- ld [hRedrawRowOrColumnMode], a
+ ldh [hRedrawRowOrColumnMode], a
ret
.redrawRow
ld hl, wRedrawRowOrColumnSrcTiles
- ld a, [hRedrawRowOrColumnDest]
+ ldh a, [hRedrawRowOrColumnDest]
ld e, a
- ld a, [hRedrawRowOrColumnDest + 1]
+ ldh a, [hRedrawRowOrColumnDest + 1]
ld d, a
push de
call .DrawHalf ; draw upper half
@@ -120,59 +120,59 @@ RedrawRowOrColumn::
; the above function, RedrawRowOrColumn, is used when walking to
; improve efficiency.
AutoBgMapTransfer::
- ld a, [H_AUTOBGTRANSFERENABLED]
+ ldh a, [hAutoBGTransferEnabled]
and a
ret z
- ld [H_SPTEMP], sp ; save stack pointer
- ld a, [H_AUTOBGTRANSFERPORTION]
+ ld [hSPTemp], sp ; save stack pointer
+ ldh a, [hAutoBGTransferPortion]
and a
jr z, .transferTopThird
dec a
jr z, .transferMiddleThird
.transferBottomThird
- coord hl, 0, 12
+ hlcoord 0, 12
ld sp, hl
- ld a, [H_AUTOBGTRANSFERDEST + 1]
+ ldh a, [hAutoBGTransferDest + 1]
ld h, a
- ld a, [H_AUTOBGTRANSFERDEST]
+ ldh a, [hAutoBGTransferDest]
ld l, a
ld de, (12 * 32)
add hl, de
xor a ; TRANSFERTOP
jr .doTransfer
.transferTopThird
- coord hl, 0, 0
+ hlcoord 0, 0
ld sp, hl
- ld a, [H_AUTOBGTRANSFERDEST + 1]
+ ldh a, [hAutoBGTransferDest + 1]
ld h, a
- ld a, [H_AUTOBGTRANSFERDEST]
+ ldh a, [hAutoBGTransferDest]
ld l, a
ld a, TRANSFERMIDDLE
jr .doTransfer
.transferMiddleThird
- coord hl, 0, 6
+ hlcoord 0, 6
ld sp, hl
- ld a, [H_AUTOBGTRANSFERDEST + 1]
+ ldh a, [hAutoBGTransferDest + 1]
ld h, a
- ld a, [H_AUTOBGTRANSFERDEST]
+ ldh a, [hAutoBGTransferDest]
ld l, a
ld de, (6 * 32)
add hl, de
ld a, TRANSFERBOTTOM
.doTransfer
- ld [H_AUTOBGTRANSFERPORTION], a ; store next portion
+ ldh [hAutoBGTransferPortion], a ; store next portion
ld b, 6
TransferBgRows::
; unrolled loop and using pop for speed
- rept 20 / 2 - 1
+ REPT 20 / 2 - 1
pop de
ld [hl], e
inc l
ld [hl], d
inc l
- endr
+ ENDR
pop de
ld [hl], e
@@ -188,68 +188,68 @@ TransferBgRows::
dec b
jr nz, TransferBgRows
- ld a, [H_SPTEMP]
+ ldh a, [hSPTemp]
ld l, a
- ld a, [H_SPTEMP + 1]
+ ldh a, [hSPTemp + 1]
ld h, a
ld sp, hl
ret
-; Copies [H_VBCOPYBGNUMROWS] rows from H_VBCOPYBGSRC to H_VBCOPYBGDEST.
-; If H_VBCOPYBGSRC is XX00, the transfer is disabled.
+; Copies [hVBlankCopyBGNumRows] rows from hVBlankCopyBGSource to hVBlankCopyBGDest.
+; If hVBlankCopyBGSource is XX00, the transfer is disabled.
VBlankCopyBgMap::
- ld a, [H_VBCOPYBGSRC] ; doubles as enabling byte
+ ldh a, [hVBlankCopyBGSource] ; doubles as enabling byte
and a
ret z
- ld [H_SPTEMP], sp ; save stack pointer
- ld a, [H_VBCOPYBGSRC]
+ ld [hSPTemp], sp ; save stack pointer
+ ldh a, [hVBlankCopyBGSource]
ld l, a
- ld a, [H_VBCOPYBGSRC + 1]
+ ldh a, [hVBlankCopyBGSource + 1]
ld h, a
ld sp, hl
- ld a, [H_VBCOPYBGDEST]
+ ldh a, [hVBlankCopyBGDest]
ld l, a
- ld a, [H_VBCOPYBGDEST + 1]
+ ldh a, [hVBlankCopyBGDest + 1]
ld h, a
- ld a, [H_VBCOPYBGNUMROWS]
+ ldh a, [hVBlankCopyBGNumRows]
ld b, a
xor a
- ld [H_VBCOPYBGSRC], a ; disable transfer so it doesn't continue next V-blank
+ ldh [hVBlankCopyBGSource], a ; disable transfer so it doesn't continue next V-blank
jr TransferBgRows
VBlankCopyDouble::
-; Copy [H_VBCOPYDOUBLESIZE] 1bpp tiles
-; from H_VBCOPYDOUBLESRC to H_VBCOPYDOUBLEDEST.
+; Copy [hVBlankCopyDoubleSize] 1bpp tiles
+; from hVBlankCopyDoubleSource to hVBlankCopyDoubleDest.
; While we're here, convert to 2bpp.
; The process is straightforward:
; copy each byte twice.
- ld a, [H_VBCOPYDOUBLESIZE]
+ ldh a, [hVBlankCopyDoubleSize]
and a
ret z
- ld [H_SPTEMP], sp ; save stack pointer
+ ld [hSPTemp], sp ; save stack pointer
- ld a, [H_VBCOPYDOUBLESRC]
+ ldh a, [hVBlankCopyDoubleSource]
ld l, a
- ld a, [H_VBCOPYDOUBLESRC + 1]
+ ldh a, [hVBlankCopyDoubleSource + 1]
ld h, a
ld sp, hl
- ld a, [H_VBCOPYDOUBLEDEST]
+ ldh a, [hVBlankCopyDoubleDest]
ld l, a
- ld a, [H_VBCOPYDOUBLEDEST + 1]
+ ldh a, [hVBlankCopyDoubleDest + 1]
ld h, a
- ld a, [H_VBCOPYDOUBLESIZE]
+ ldh a, [hVBlankCopyDoubleSize]
ld b, a
xor a ; transferred
- ld [H_VBCOPYDOUBLESIZE], a
+ ldh [hVBlankCopyDoubleSize], a
.loop
- rept 3
+ REPT 3
pop de
ld [hl], e
inc l
@@ -259,7 +259,7 @@ VBlankCopyDouble::
inc l
ld [hl], d
inc l
- endr
+ ENDR
pop de
ld [hl], e
@@ -273,13 +273,13 @@ VBlankCopyDouble::
dec b
jr nz, .loop
- ld [H_VBCOPYDOUBLESRC], sp
+ ld [hVBlankCopyDoubleSource], sp
ld sp, hl ; load destination into sp to save time with ld [$xxxx], sp
- ld [H_VBCOPYDOUBLEDEST], sp
+ ld [hVBlankCopyDoubleDest], sp
- ld a, [H_SPTEMP]
+ ldh a, [hSPTemp]
ld l, a
- ld a, [H_SPTEMP + 1]
+ ldh a, [hSPTemp + 1]
ld h, a
ld sp, hl
@@ -287,42 +287,42 @@ VBlankCopyDouble::
VBlankCopy::
-; Copy [H_VBCOPYSIZE] 2bpp tiles (or 16 * [H_VBCOPYSIZE] tile map entries)
-; from H_VBCOPYSRC to H_VBCOPYDEST.
+; Copy [hVBlankCopySize] 2bpp tiles (or 16 * [hVBlankCopySize] tile map entries)
+; from hVBlankCopySource to hVBlankCopyDest.
; Source and destination addresses are updated,
; so transfer can continue in subsequent calls.
- ld a, [H_VBCOPYSIZE]
+ ldh a, [hVBlankCopySize]
and a
ret z
- ld [H_SPTEMP], sp
+ ld [hSPTemp], sp
- ld a, [H_VBCOPYSRC]
+ ldh a, [hVBlankCopySource]
ld l, a
- ld a, [H_VBCOPYSRC + 1]
+ ldh a, [hVBlankCopySource + 1]
ld h, a
ld sp, hl
- ld a, [H_VBCOPYDEST]
+ ldh a, [hVBlankCopyDest]
ld l, a
- ld a, [H_VBCOPYDEST + 1]
+ ldh a, [hVBlankCopyDest + 1]
ld h, a
- ld a, [H_VBCOPYSIZE]
+ ldh a, [hVBlankCopySize]
ld b, a
xor a ; transferred
- ld [H_VBCOPYSIZE], a
+ ldh [hVBlankCopySize], a
.loop
- rept 7
+ REPT 7
pop de
ld [hl], e
inc l
ld [hl], d
inc l
- endr
+ ENDR
pop de
ld [hl], e
@@ -332,13 +332,13 @@ VBlankCopy::
dec b
jr nz, .loop
- ld [H_VBCOPYSRC], sp
+ ld [hVBlankCopySource], sp
ld sp, hl
- ld [H_VBCOPYDEST], sp
+ ld [hVBlankCopyDest], sp
- ld a, [H_SPTEMP]
+ ldh a, [hSPTemp]
ld l, a
- ld a, [H_SPTEMP + 1]
+ ldh a, [hSPTemp + 1]
ld h, a
ld sp, hl
@@ -349,17 +349,17 @@ UpdateMovingBgTiles::
; Animate water and flower
; tiles in the overworld.
- ld a, [hTilesetType]
+ ldh a, [hTilesetType]
and a
ret z ; no animations if indoors (or if a menu set this to 0)
- ld a,[rLY]
+ ldh a, [rLY]
cp $90 ; check if not in vblank period??? (maybe if vblank is too long)
ret c
- ld a, [hMovingBGTilesCounter1]
+ ldh a, [hMovingBGTilesCounter1]
inc a
- ld [hMovingBGTilesCounter1], a
+ ldh [hMovingBGTilesCounter1], a
cp 20
ret c
cp 21
@@ -367,7 +367,7 @@ UpdateMovingBgTiles::
; water
- ld hl, vTileset + $14 * $10
+ ld hl, vTileset tile $14
ld c, $10
ld a, [wMovingBGTilesCounter2]
@@ -391,17 +391,17 @@ UpdateMovingBgTiles::
dec c
jr nz, .left
.done
- ld a, [hTilesetType]
+ ldh a, [hTilesetType]
rrca
ret nc
; if in a cave, no flower animations
xor a
- ld [hMovingBGTilesCounter1], a
+ ldh [hMovingBGTilesCounter1], a
ret
.flower
xor a
- ld [hMovingBGTilesCounter1], a
+ ldh [hMovingBGTilesCounter1], a
ld a, [wMovingBGTilesCounter2]
and 3
@@ -412,7 +412,7 @@ UpdateMovingBgTiles::
jr z, .copy
ld hl, FlowerTile3
.copy
- ld de, vTileset + $3 * $10
+ ld de, vTileset tile $03
ld c, $10
.loop
ld a, [hli]
diff --git a/home/window.asm b/home/window.asm
new file mode 100644
index 00000000..8ccb9de9
--- /dev/null
+++ b/home/window.asm
@@ -0,0 +1,292 @@
+HandleMenuInput::
+ xor a
+ ld [wPartyMenuAnimMonEnabled], a
+
+HandleMenuInput_::
+ ldh a, [hDownArrowBlinkCount1]
+ push af
+ ldh a, [hDownArrowBlinkCount2]
+ push af ; save existing values on stack
+ xor a
+ ldh [hDownArrowBlinkCount1], a ; blinking down arrow timing value 1
+ ld a, 6
+ ldh [hDownArrowBlinkCount2], a ; blinking down arrow timing value 2
+.loop1
+ xor a
+ ld [wAnimCounter], a ; counter for pokemon shaking animation
+ call PlaceMenuCursor
+ call Delay3
+.loop2
+ push hl
+ ld a, [wPartyMenuAnimMonEnabled]
+ and a ; is it a pokemon selection menu?
+ jr z, .getJoypadState
+ farcall AnimatePartyMon ; shake mini sprite of selected pokemon
+.getJoypadState
+ pop hl
+ call JoypadLowSensitivity
+ ldh a, [hJoy5]
+ and a ; was a key pressed?
+ jr nz, .keyPressed
+ push hl
+ hlcoord 18, 11 ; coordinates of blinking down arrow in some menus
+ call HandleDownArrowBlinkTiming ; blink down arrow (if any)
+ pop hl
+ ld a, [wMenuJoypadPollCount]
+ dec a
+ jr z, .giveUpWaiting
+ jr .loop2
+.giveUpWaiting
+; if a key wasn't pressed within the specified number of checks
+ pop af
+ ldh [hDownArrowBlinkCount2], a
+ pop af
+ ldh [hDownArrowBlinkCount1], a ; restore previous values
+ xor a
+ ld [wMenuWrappingEnabled], a ; disable menu wrapping
+ ret
+.keyPressed
+ xor a
+ ld [wCheckFor180DegreeTurn], a
+ ldh a, [hJoy5]
+ ld b, a
+ bit 0, a ; pressed A key?
+ jr nz, .checkOtherKeys
+ bit 6, a ; pressed Up key?
+ jr z, .checkIfDownPressed
+.upPressed
+ ld a, [wCurrentMenuItem] ; selected menu item
+ and a ; already at the top of the menu?
+ jr z, .alreadyAtTop
+.notAtTop
+ dec a
+ ld [wCurrentMenuItem], a ; move selected menu item up one space
+ jr .checkOtherKeys
+.alreadyAtTop
+ ld a, [wMenuWrappingEnabled]
+ and a ; is wrapping around enabled?
+ jr z, .noWrappingAround
+ ld a, [wMaxMenuItem]
+ ld [wCurrentMenuItem], a ; wrap to the bottom of the menu
+ jr .checkOtherKeys
+.checkIfDownPressed
+ bit 7, a
+ jr z, .checkOtherKeys
+.downPressed
+ ld a, [wCurrentMenuItem]
+ inc a
+ ld c, a
+ ld a, [wMaxMenuItem]
+ cp c
+ jr nc, .notAtBottom
+.alreadyAtBottom
+ ld a, [wMenuWrappingEnabled]
+ and a ; is wrapping around enabled?
+ jr z, .noWrappingAround
+ ld c, $00 ; wrap from bottom to top
+.notAtBottom
+ ld a, c
+ ld [wCurrentMenuItem], a
+.checkOtherKeys
+ ld a, [wMenuWatchedKeys]
+ and b ; does the menu care about any of the pressed keys?
+ jp z, .loop1
+.checkIfAButtonOrBButtonPressed
+ ldh a, [hJoy5]
+ and A_BUTTON | B_BUTTON
+ jr z, .skipPlayingSound
+.AButtonOrBButtonPressed
+ push hl
+ ld hl, wFlags_0xcd60
+ bit 5, [hl]
+ pop hl
+ jr nz, .skipPlayingSound
+ ld a, SFX_PRESS_AB
+ call PlaySound
+.skipPlayingSound
+ pop af
+ ldh [hDownArrowBlinkCount2], a
+ pop af
+ ldh [hDownArrowBlinkCount1], a ; restore previous values
+ xor a
+ ld [wMenuWrappingEnabled], a ; disable menu wrapping
+ ldh a, [hJoy5]
+ ret
+.noWrappingAround
+ ld a, [wMenuWatchMovingOutOfBounds]
+ and a ; should we return if the user tried to go past the top or bottom?
+ jr z, .checkOtherKeys
+ jr .checkIfAButtonOrBButtonPressed
+
+PlaceMenuCursor::
+ ld a, [wTopMenuItemY]
+ and a ; is the y coordinate 0?
+ jr z, .adjustForXCoord
+ hlcoord 0, 0
+ ld bc, SCREEN_WIDTH
+.topMenuItemLoop
+ add hl, bc
+ dec a
+ jr nz, .topMenuItemLoop
+.adjustForXCoord
+ ld a, [wTopMenuItemX]
+ ld b, 0
+ ld c, a
+ add hl, bc
+ push hl
+ ld a, [wLastMenuItem]
+ and a ; was the previous menu id 0?
+ jr z, .checkForArrow1
+ ld bc, 40
+ push af
+ ldh a, [hFlagsFFFA]
+ bit 1, a ; is the menu double spaced?
+ jr z, .doubleSpaced1
+ ld bc, 20
+.doubleSpaced1
+ pop af
+.oldMenuItemLoop
+ add hl, bc
+ dec a
+ jr nz, .oldMenuItemLoop
+.checkForArrow1
+ ld a, [hl]
+ cp "▶" ; was an arrow next to the previously selected menu item?
+ jr nz, .skipClearingArrow
+.clearArrow
+ ld a, [wTileBehindCursor]
+ ld [hl], a
+.skipClearingArrow
+ pop hl
+ ld a, [wCurrentMenuItem]
+ and a
+ jr z, .checkForArrow2
+ ld bc, 40
+ push af
+ ldh a, [hFlagsFFFA]
+ bit 1, a ; is the menu double spaced?
+ jr z, .doubleSpaced2
+ ld bc, 20
+.doubleSpaced2
+ pop af
+.currentMenuItemLoop
+ add hl, bc
+ dec a
+ jr nz, .currentMenuItemLoop
+.checkForArrow2
+ ld a, [hl]
+ cp "▶" ; has the right arrow already been placed?
+ jr z, .skipSavingTile ; if so, don't lose the saved tile
+ ld [wTileBehindCursor], a ; save tile before overwriting with right arrow
+.skipSavingTile
+ ld a, "▶" ; place right arrow
+ ld [hl], a
+ ld a, l
+ ld [wMenuCursorLocation], a
+ ld a, h
+ ld [wMenuCursorLocation + 1], a
+ ld a, [wCurrentMenuItem]
+ ld [wLastMenuItem], a
+ ret
+
+; This is used to mark a menu cursor other than the one currently being
+; manipulated. In the case of submenus, this is used to show the location of
+; the menu cursor in the parent menu. In the case of swapping items in list,
+; this is used to mark the item that was first chosen to be swapped.
+PlaceUnfilledArrowMenuCursor::
+ ld b, a
+ ld a, [wMenuCursorLocation]
+ ld l, a
+ ld a, [wMenuCursorLocation + 1]
+ ld h, a
+ ld [hl], "▷"
+ ld a, b
+ ret
+
+; Replaces the menu cursor with a blank space.
+EraseMenuCursor::
+ ld a, [wMenuCursorLocation]
+ ld l, a
+ ld a, [wMenuCursorLocation + 1]
+ ld h, a
+ ld [hl], " "
+ ret
+
+; This toggles a blinking down arrow at hl on and off after a delay has passed.
+; This is often called even when no blinking is occurring.
+; The reason is that most functions that call this initialize hDownArrowBlinkCount1 to 0.
+; The effect is that if the tile at hl is initialized with a down arrow,
+; this function will toggle that down arrow on and off, but if the tile isn't
+; initialized with a down arrow, this function does nothing.
+; That allows this to be called without worrying about if a down arrow should
+; be blinking.
+HandleDownArrowBlinkTiming::
+ ld a, [hl]
+ ld b, a
+ ld a, "▼"
+ cp b
+ jr nz, .downArrowOff
+.downArrowOn
+ ldh a, [hDownArrowBlinkCount1]
+ dec a
+ ldh [hDownArrowBlinkCount1], a
+ ret nz
+ ldh a, [hDownArrowBlinkCount2]
+ dec a
+ ldh [hDownArrowBlinkCount2], a
+ ret nz
+ ld a, " "
+ ld [hl], a
+ ld a, $ff
+ ldh [hDownArrowBlinkCount1], a
+ ld a, $06
+ ldh [hDownArrowBlinkCount2], a
+ ret
+.downArrowOff
+ ldh a, [hDownArrowBlinkCount1]
+ and a
+ ret z
+ dec a
+ ldh [hDownArrowBlinkCount1], a
+ ret nz
+ dec a
+ ldh [hDownArrowBlinkCount1], a
+ ldh a, [hDownArrowBlinkCount2]
+ dec a
+ ldh [hDownArrowBlinkCount2], a
+ ret nz
+ ld a, $06
+ ldh [hDownArrowBlinkCount2], a
+ ld a, "▼"
+ ld [hl], a
+ ret
+
+; The following code either enables or disables the automatic drawing of
+; text boxes by DisplayTextID. Both functions cause DisplayTextID to wait
+; for a button press after displaying text (unless [wEnteringCableClub] is set).
+
+EnableAutoTextBoxDrawing::
+ xor a
+ jr AutoTextBoxDrawingCommon
+
+DisableAutoTextBoxDrawing::
+ ld a, TRUE
+
+AutoTextBoxDrawingCommon::
+ ld [wAutoTextBoxDrawingControl], a
+ xor a
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a ; make DisplayTextID wait for button press
+ ret
+
+PrintText::
+; Print text hl at (1, 14).
+ push hl
+ ld a, MESSAGE_BOX
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ call UpdateSprites
+ call Delay3
+ pop hl
+PrintText_NoCreatingTextBox::
+ bccoord 1, 14
+ jp TextCommandProcessor
diff --git a/home/yes_no.asm b/home/yes_no.asm
new file mode 100644
index 00000000..28d6c7aa
--- /dev/null
+++ b/home/yes_no.asm
@@ -0,0 +1,40 @@
+; displays yes/no choice
+; yes -> set carry
+YesNoChoice::
+ call SaveScreenTilesToBuffer1
+ call InitYesNoTextBoxParameters
+ jr DisplayYesNoChoice
+
+Func_35f7::
+ ld a, TWO_OPTION_MENU
+ ld [wTextBoxID], a
+ call InitYesNoTextBoxParameters
+ jp DisplayTextBoxID
+
+InitYesNoTextBoxParameters::
+ xor a ; YES_NO_MENU
+ ld [wTwoOptionMenuID], a
+ hlcoord 14, 7
+ lb bc, 8, 15
+ ret
+
+YesNoChoicePokeCenter::
+ call SaveScreenTilesToBuffer1
+ ld a, HEAL_CANCEL_MENU
+ ld [wTwoOptionMenuID], a
+ hlcoord 11, 6
+ lb bc, 8, 12
+ jr DisplayYesNoChoice
+
+WideYesNoChoice:: ; unused
+ call SaveScreenTilesToBuffer1
+ ld a, WIDE_YES_NO_MENU
+ ld [wTwoOptionMenuID], a
+ hlcoord 12, 7
+ lb bc, 8, 13
+
+DisplayYesNoChoice::
+ ld a, TWO_OPTION_MENU
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ jp LoadScreenTilesFromBuffer1
diff --git a/hram.asm b/hram.asm
index 0e1fae7e..f3ffc564 100644
--- a/hram.asm
+++ b/hram.asm
@@ -1,333 +1,412 @@
-hSoftReset EQU $FF8A
+SECTION "HRAM", HRAM
+
; Initialized to 16.
; Decremented each input iteration if the player
; presses the reset sequence (A+B+SEL+START).
; Soft reset when 0 is reached.
+hSoftReset:: db
-; base tile ID to which offsets are added
-hBaseTileID EQU $FF8B
-
-; 3-byte BCD number
-hItemPrice EQU $FF8B
-
-hDexWeight EQU $FF8B
-
-hWarpDestinationMap EQU $FF8B
-
-hOAMTile EQU $FF8B
-
-hPreviousTileset EQU $FF8B
-
-hEastWestConnectedMapWidth EQU $FF8B
-
-hSlideAmount EQU $FF8B
-
-hRLEByteValue EQU $FF8B
+UNION
+hBaseTileID:: ; base tile ID to which offsets are added
+hDexWeight::
+hWarpDestinationMap::
+hOAMTile::
+hROMBankTemp::
+hPreviousTileset::
+hRLEByteValue::
+ db
-H_SPRITEWIDTH EQU $FF8B ; in tiles
-H_SPRITEINTERLACECOUNTER EQU $FF8B
-H_SPRITEHEIGHT EQU $FF8C ; in tiles
-H_SPRITEOFFSET EQU $FF8D
+hSpriteIndexOrTextID:: ; DisplayTextID's argument
+hPartyMonIndex::
+ db
-; counters for blinking down arrow
-H_DOWNARROWBLINKCNT1 EQU $FF8B
-H_DOWNARROWBLINKCNT2 EQU $FF8C
-
-H_SPRITEDATAOFFSET EQU $FF8B
-H_SPRITEINDEX EQU $FF8C
-
-hMapStride EQU $FF8B
-hMapWidth EQU $FF8C
+hVRAMSlot::
+ db
-hNorthSouthConnectionStripWidth EQU $FF8B
-hNorthSouthConnectedMapWidth EQU $FF8C
+hFourTileSpriteCount::
+hHalveItemPrices::
+ db
-; DisplayTextID's argument
-hSpriteIndexOrTextID EQU $FF8C
+NEXTU
+hItemPrice:: ds 3 ; BCD number
-hPartyMonIndex EQU $FF8C
+NEXTU
+hSlideAmount:: db
; the total number of tiles being shifted each time the pic slides by one tile
-hSlidingRegionSize EQU $FF8C
-
-; 2 bytes
-hEnemySpeed EQU $FF8D
-
-hVRAMSlot EQU $FF8D
-
-hFourTileSpriteCount EQU $FF8E
+hSlidingRegionSize:: db
; -1 = left
; 0 = right
-hSlideDirection EQU $FF8D
-
-hSpriteFacingDirection EQU $FF8D
-
-hSpriteMovementByte2 EQU $FF8D
-
-hSpriteImageIndex EQU $FF8D
+hSlideDirection:: db
-hLoadSpriteTemp1 EQU $FF8D
-hLoadSpriteTemp2 EQU $FF8E
-
-hHalveItemPrices EQU $FF8E
-
-hSpriteOffset2 EQU $FF8F
-
-hOAMBufferOffset EQU $FF90
-
-hSpriteScreenX EQU $FF91
-hSpriteScreenY EQU $FF92
-
-hTilePlayerStandingOn EQU $FF93
-
-hSpritePriority EQU $FF94
-
-; 2 bytes
-hSignCoordPointer EQU $FF95
-
-hNPCMovementDirections2Index EQU $FF95
-
-; CalcPositionOfPlayerRelativeToNPC
-hNPCSpriteOffset EQU $FF95
-
-; temp value used when swapping bytes
-hSwapTemp EQU $FF95
-
-hExperience EQU $FF96 ; 3 bytes, big endian
-
-; Multiplication and division variables are meant
-; to overlap for back-to-back usage. Big endian.
-
-H_MULTIPLICAND EQU $FF96 ; 3 bytes
-H_MULTIPLIER EQU $FF99 ; 1 byte
-H_PRODUCT EQU $FF95 ; 4 bytes
-
-H_DIVIDEND EQU $FF95 ; 4 bytes
-H_DIVISOR EQU $FF99 ; 1 byte
-H_QUOTIENT EQU $FF95 ; 4 bytes
-H_REMAINDER EQU $FF99 ; 1 byte
-
-H_DIVIDEBUFFER EQU $FF9A
-
-H_MULTIPLYBUFFER EQU $FF9B
+NEXTU
+hSpriteInterlaceCounter::
+hSpriteWidth:: db ; in tiles
+hSpriteHeight:: db ; in tiles
+hSpriteOffset:: db
+NEXTU
+; counters for blinking down arrow
+hDownArrowBlinkCount1:: db
+hDownArrowBlinkCount2:: db
+
+NEXTU
+hMapStride::
+hEastWestConnectedMapWidth::
+hNorthSouthConnectionStripWidth::
+ db
+hMapWidth::
+hNorthSouthConnectedMapWidth::
+ db
+
+NEXTU
+hSpriteDataOffset:: db
+hSpriteIndex:: db
+hSpriteImageIndex::
+hSpriteFacingDirection::
+hSpriteMovementByte2::
+ db
+
+NEXTU
+ ds 2
+hLoadSpriteTemp1:: db
+hLoadSpriteTemp2:: db
+
+NEXTU
+ ds 2
+hEnemySpeed:: dw
+ENDU
+
+UNION
+hSpriteOffset2:: db
+hOAMBufferOffset:: db
+hSpriteScreenX:: db
+hSpriteScreenY:: db
+
+NEXTU
+hFF8F:: db
+hFF90:: db
+hFF91:: db
+hFF92:: db
+ENDU
+
+hTilePlayerStandingOn:: db
+
+hSpritePriority:: db
+
+UNION
+;; Multiplication and division variables are meant
+;; to overlap for back-to-back usage. Big endian.
+UNION
+ ds 1
+hMultiplicand:: ds 3
+hMultiplier:: db
+ ds 1
+hMultiplyBuffer:: ds 4
+NEXTU
+hProduct:: ds 4
+NEXTU
+hDividend:: ds 4
+hDivisor:: db
+hDivideBuffer:: ds 5
+NEXTU
+hQuotient:: ds 4
+hRemainder:: db
+ENDU
+
+NEXTU
; PrintNumber (big endian).
-H_PASTLEADINGZEROES EQU $FF95 ; last char printed
-H_NUMTOPRINT EQU $FF96 ; 3 bytes
-H_POWEROFTEN EQU $FF99 ; 3 bytes
-H_SAVEDNUMTOPRINT EQU $FF9C ; 3 bytes
-
+hPastLeadingZeros:: db ; last char printed
+hNumToPrint:: ds 3
+hPowerOf10:: ds 3
+hSavedNumToPrint:: ds 3
+
+NEXTU
+hNPCMovementDirections2Index::
+hNPCSpriteOffset::
; distance in steps between NPC and player
-hNPCPlayerYDistance EQU $FF95
-hNPCPlayerXDistance EQU $FF96
-
-hFindPathNumSteps EQU $FF97
-
+hNPCPlayerYDistance::
+ db
+hNPCPlayerXDistance::
+ db
+hFindPathNumSteps:: db
; bit 0: set when the end of the path's Y coordinate matches the target's
; bit 1: set when the end of the path's X coordinate matches the target's
; When both bits are set, the end of the path is at the target's position
; (i.e. the path has been found).
-hFindPathFlags EQU $FF98
-
-hFindPathYProgress EQU $FF99
-hFindPathXProgress EQU $FF9A
-
+hFindPathFlags:: db
+hFindPathYProgress:: db
+hFindPathXProgress:: db
; 0 = from player to NPC
; 1 = from NPC to player
-hNPCPlayerRelativePosPerspective EQU $FF9B
-
+hNPCPlayerRelativePosPerspective:: db
+ ds 1
; bit 0:
; 0 = target is to the south or aligned
; 1 = target is to the north
; bit 1:
; 0 = target is to the east or aligned
; 1 = target is to the west
-hNPCPlayerRelativePosFlags EQU $FF9D
-
-; some code zeroes this for no reason when writing a coin amount
-hUnusedCoinsByte EQU $FF9F
-
-hMoney EQU $FF9F ; 3-byte BCD number
-hCoins EQU $FFA0 ; 2-byte BCD number
-
-hDivideBCDDivisor EQU $FFA2 ; 3-byte BCD number
-hDivideBCDQuotient EQU $FFA2 ; 3-byte BCD number
-hDivideBCDBuffer EQU $FFA5 ; 3-byte BCD number
+hNPCPlayerRelativePosFlags:: db
-hSerialReceivedNewData EQU $FFA9
+NEXTU
+hSwapItemID:: db
+hSwapItemQuantity:: db
-; $01 = using external clock
-; $02 = using internal clock
-; $ff = establishing connection
-hSerialConnectionStatus EQU $FFAA
+NEXTU
+hSignCoordPointer:: dw
-hSerialIgnoringInitialData EQU $FFAB
+NEXTU
+ ds 1
+hMutateWY:: db
+hMutateWX:: db
-hSerialSendData EQU $FFAC
+NEXTU
+; temp value used when swapping bytes or words
+hSwapTemp:: db
+hExperience:: ds 3 ; big endian
+ENDU
-hSerialReceiveData EQU $FFAD
-
-; these values are copied to SCX, SCY, and WY during V-blank
-hSCX EQU $FFAE
-hSCY EQU $FFAF
-hWY EQU $FFB0
+UNION
+hMoney:: ds 3 ; BCD number
+NEXTU
+; some code zeroes this for no reason when writing a coin amount
+hUnusedCoinsByte:: db
+hCoins:: ds 2 ; BCD number
+ENDU
-hJoyLast EQU $FFB1
-hJoyReleased EQU $FFB2
-hJoyPressed EQU $FFB3
-hJoyHeld EQU $FFB4
-hJoy5 EQU $FFB5
-hJoy6 EQU $FFB6
-hJoy7 EQU $FFB7
+hDivideBCDDivisor::
+hDivideBCDQuotient::
+ ds 3 ; BCD number
+hDivideBCDBuffer::
+ ds 3 ; BCD number
-H_LOADEDROMBANK EQU $FFB8
+ ds 1
-hSavedROMBank EQU $FFB9
+hSerialReceivedNewData:: db
+; $01 = using external clock
+; $02 = using internal clock
+; $ff = establishing connection
+hSerialConnectionStatus:: db
+hSerialIgnoringInitialData:: db
+hSerialSendData:: db
+hSerialReceiveData:: db
+
+; these values are copied to rSCX, rSCY, and rWY during V-blank
+hSCX:: db
+hSCY:: db
+hWY:: db
+
+hJoyLast:: db
+hJoyReleased:: db
+hJoyPressed:: db
+hJoyHeld:: db
+hJoy5:: db
+hJoy6:: db
+hJoy7:: db
+
+hLoadedROMBank:: db
+hSavedROMBank:: db
; is automatic background transfer during V-blank enabled?
; if nonzero, yes
; if zero, no
-H_AUTOBGTRANSFERENABLED EQU $FFBA
-
-TRANSFERTOP EQU 0
-TRANSFERMIDDLE EQU 1
-TRANSFERBOTTOM EQU 2
+hAutoBGTransferEnabled:: db
; 00 = top third of background
; 01 = middle third of background
; 02 = bottom third of background
-H_AUTOBGTRANSFERPORTION EQU $FFBB
+hAutoBGTransferPortion:: db
; the destination address of the automatic background transfer
-H_AUTOBGTRANSFERDEST EQU $FFBC ; 2 bytes
+hAutoBGTransferDest:: dw
+
+hRedrawMapViewRowOffset:: db
; temporary storage for stack pointer during memory transfers that use pop
; to increase speed
-H_SPTEMP EQU $FFBF ; 2 bytes
+hSPTemp:: dw
; source address for VBlankCopyBgMap function
; the first byte doubles as the byte that enabled the transfer.
; if it is 0, the transfer is disabled
; if it is not 0, the transfer is enabled
; this means that XX00 is not a valid source address
-H_VBCOPYBGSRC EQU $FFC1 ; 2 bytes
+hVBlankCopyBGSource:: dw
; destination address for VBlankCopyBgMap function
-H_VBCOPYBGDEST EQU $FFC3 ; 2 bytes
+hVBlankCopyBGDest:: dw
; number of rows for VBlankCopyBgMap to copy
-H_VBCOPYBGNUMROWS EQU $FFC5
+hVBlankCopyBGNumRows:: db
; size of VBlankCopy transfer in 16-byte units
-H_VBCOPYSIZE EQU $FFC6
+hVBlankCopySize:: db
; source address for VBlankCopy function
-H_VBCOPYSRC EQU $FFC7
+hVBlankCopySource:: dw
; destination address for VBlankCopy function
-H_VBCOPYDEST EQU $FFC9
+hVBlankCopyDest:: dw
; size of source data for VBlankCopyDouble in 8-byte units
-H_VBCOPYDOUBLESIZE EQU $FFCB
+hVBlankCopyDoubleSize:: db
; source address for VBlankCopyDouble function
-H_VBCOPYDOUBLESRC EQU $FFCC
+hVBlankCopyDoubleSource:: dw
; destination address for VBlankCopyDouble function
-H_VBCOPYDOUBLEDEST EQU $FFCE
+hVBlankCopyDoubleDest:: dw
; controls whether a row or column of 2x2 tile blocks is redrawn in V-blank
; 00 = no redraw
; 01 = redraw column
; 02 = redraw row
-hRedrawRowOrColumnMode EQU $FFD0
-
-REDRAW_COL EQU 1
-REDRAW_ROW EQU 2
+hRedrawRowOrColumnMode:: db
-hRedrawRowOrColumnDest EQU $FFD1
+hRedrawRowOrColumnDest:: dw
-hRandomAdd EQU $FFD3
-hRandomSub EQU $FFD4
+hRandomAdd:: db
+hRandomSub:: db
-H_FRAMECOUNTER EQU $FFD5 ; decremented every V-blank (used for delays)
+hFrameCounter:: db ; decremented every V-blank (used for delays)
; V-blank sets this to 0 each time it runs.
; So, by setting it to a nonzero value and waiting for it to become 0 again,
; you can detect that the V-blank handler has run since then.
-H_VBLANKOCCURRED EQU $FFD6
+hVBlankOccurred:: db
; 00 = indoor
; 01 = cave
; 02 = outdoor
; this is often set to 00 in order to turn off water and flower BG tile animations
-hTilesetType EQU $FFD7
-
-hMovingBGTilesCounter1 EQU $FFD8
+hTilesetType:: db
-H_CURRENTSPRITEOFFSET EQU $FFDA ; multiple of $10
+hMovingBGTilesCounter1:: db
-hItemCounter EQU $FFDB
+ ds 1
-hCanceledPrinting EQU $FFDB
+hCurrentSpriteOffset:: db ; multiple of $10
-hGymGateIndex EQU $FFDB
+UNION
+hPlayerFacing:: db
+hPlayerYCoord:: db
+hPlayerXCoord:: db
-hGymTrashCanRandNumMask EQU $FFDB
-
-hDexRatingNumMonsSeen EQU $FFDB
-hDexRatingNumMonsOwned EQU $FFDC
+NEXTU
; $00 = bag full
; $01 = got item
; $80 = didn't meet required number of owned mons
; $FF = player cancelled
-hOaksAideResult EQU $FFDB
+hOaksAideResult::
+hOaksAideRequirement:: ; required number of owned mons
+ db
+hOaksAideRewardItem:: db
+hOaksAideNumMonsOwned:: db
+
+NEXTU
+hVendingMachineItem:: db
+hVendingMachinePrice:: ds 3 ; BCD number
+
+NEXTU
+hGymGateIndex:: db
+hGymGateAnswer:: db
+
+NEXTU
+hDexRatingNumMonsSeen:: db
+hDexRatingNumMonsOwned:: db
+
+NEXTU
+hItemToRemoveID:: db
+hItemToRemoveIndex:: db
+
+NEXTU
+hItemCounter::
+hSavedCoordIndex::
+hMissableObjectIndex::
+hGymTrashCanRandNumMask::
+ db
-hOaksAideRequirement EQU $FFDB ; required number of owned mons
-hOaksAideRewardItem EQU $FFDC
-hOaksAideNumMonsOwned EQU $FFDD
+NEXTU
+hFFDB:: db
+hFFDC:: db
-hItemToRemoveID EQU $FFDB
-hItemToRemoveIndex EQU $FFDC
+NEXTU
+hCanceledPrinting:: db
+ENDU
-hVendingMachineItem EQU $FFDB
-hVendingMachinePrice EQU $FFDC ; 3-byte BCD number
+ ds 1
+
+hBackupGymGateIndex::
+hUnlockedSilphCoDoors::
+ db
; the first tile ID in a sequence of tile IDs that increase by 1 each step
-hStartTileID EQU $FFE1
+hStartTileID:: db
+
+ ds 2
+
+hNewPartyLength:: db
+
+UNION
+hDividend2:: db
+hDivisor2:: db
+hQuotient2:: db
-hNewPartyLength EQU $FFE4
+NEXTU
+hIsHiddenMissableObject:: db
+ENDU
-hDividend2 EQU $FFE5
-hDivisor2 EQU $FFE6
-hQuotient2 EQU $FFE7
+hMapROMBank:: db
-hSpriteVRAMSlotAndFacing EQU $FFE9
+hSpriteVRAMSlotAndFacing:: db
-hCoordsInFrontOfPlayerMatch EQU $FFEA
+hCoordsInFrontOfPlayerMatch::
+hSpriteAnimFrameCounter::
+ db
-hSpriteAnimFrameCounter EQU $FFEA
+UNION
+hSpriteScreenYCoord:: db
+hSpriteScreenXCoord:: db
+hSpriteMapYCoord:: db
+hSpriteMapXCoord:: db
-hItemAlreadyFound EQU $FFEB
+NEXTU
+hItemAlreadyFound:: db
+ ds 2
+hDidntFindAnyHiddenObject:: db
-hDidntFindAnyHiddenObject EQU $FFEE
+NEXTU
+ ds 1
+hSavedMapTextPtr:: dw
+ ds 1
+ENDU
-H_WHOSETURN EQU $FFF3 ; 0 on player’s turn, 1 on enemy’s turn
+ ds 4
-hLCDCPointer EQU $FFF4
+hWhoseTurn:: db ; 0 on player's turn, 1 on enemy's turn
-hJoyInput EQU $FFF5
+hLCDCPointer:: db
-hDisableJoypadPolling EQU $FFF8 ; non-zero value disables polling of joypad
+hJoyInput:: db
+
+ ds 2
+
+hDisableJoypadPolling:: db
+
+hClearLetterPrintingDelayFlags:: db
; bit 0: draw HP fraction to the right of bar instead of below (for party menu)
; bit 1: menu is double spaced
-hFlags_0xFFFA EQU $FFFA
+hFlagsFFFA:: db
+
+hFieldMoveMonMenuTopMenuItemX:: db
-hFieldMoveMonMenuTopMenuItemX EQU $FFFB
+hFFFC:: db
-h_0xFFFC EQU $FFFC
+ ds 1
-hGBC EQU $FFFE ; 0 if DMG, != 0 if GBC
+; 0 if DMG, != 0 if GBC
+hGBC:: db
diff --git a/layout.link b/layout.link
new file mode 100644
index 00000000..1e1b7085
--- /dev/null
+++ b/layout.link
@@ -0,0 +1,241 @@
+ROM0
+ org $0000
+ "NULL"
+ org $0000
+ "rst0"
+ org $0008
+ "rst8"
+ org $0010
+ "rst10"
+ org $0018
+ "rst18"
+ org $0020
+ "rst20"
+ org $0028
+ "rst28"
+ org $0030
+ "rst30"
+ org $0038
+ "rst38"
+ org $0040
+ "vblank"
+ org $0048
+ "lcd"
+ org $0050
+ "timer"
+ org $0058
+ "serial"
+ org $0060
+ "joypad"
+ ; $0061
+ "High Home"
+ org $100
+ "Header"
+ org $150
+ "Home"
+ROMX $1
+ "bank1"
+ROMX $2
+ "Sound Effect Headers 1"
+ "Music Headers 1"
+ "Sound Effects 1"
+ "Audio Engine 1"
+ "Music 1"
+ROMX $3
+ "bank3"
+ROMX $4
+ "Font Graphics"
+ "NPC Sprites 1"
+ "Battle Engine 1"
+ROMX $5
+ "bank5"
+ "NPC Sprites 2"
+ "Battle Engine 2"
+ROMX $6
+ "Maps 1"
+ "Maps 2"
+ "Doors and Ledges"
+ROMX $7
+ "Maps 3"
+ "Pokémon Names"
+ "Maps 4"
+ "Hidden Objects 1"
+ROMX $8
+ "Sound Effect Headers 2"
+ "Music Headers 2"
+ "Sound Effects 2"
+ "Low Health Alarm (Audio Engine 2)"
+ "Bill's PC"
+ "Audio Engine 2"
+ "Music 2"
+ROMX $9
+ "Pics 1"
+ "Battle Engine 3"
+ROMX $A
+ "Pics 2"
+ "Battle Engine 4"
+ROMX $B
+ "Pics 3"
+ "Battle Engine 5"
+ROMX $C
+ "Pics 4"
+ROMX $D
+ "Pics 5"
+ "Slot Machines"
+ROMX $E
+ "Battle Engine 7"
+ROMX $F
+ "Battle Core"
+ROMX $10
+ "bank10"
+ROMX $11
+ "Maps 5"
+ "Pokédex Rating"
+ "Maps 6"
+ "Dungeon Warps"
+ROMX $12
+ "Maps 7"
+ "Maps 8"
+ROMX $13
+ "Pics 6"
+ "Maps 9"
+ROMX $14
+ "Maps 10"
+ "Hidden Objects 2"
+ROMX $15
+ "Maps 11"
+ "Battle Engine 9"
+ "Maps 12"
+ "Diploma"
+ "Trainer Sight"
+ROMX $16
+ "Maps 13"
+ "Battle Engine 10"
+ "Maps 14"
+ "Saffron Guards"
+ROMX $17
+ "Maps 15"
+ "Starter Dex"
+ "Maps 16"
+ "Hidden Objects 3"
+ROMX $18
+ "Maps 17"
+ "Cinnabar Lab Fossils"
+ "Maps 18"
+ "Hidden Objects 4"
+ROMX $19
+ "Tilesets 1"
+ROMX $1A
+ "Battle Engine 11"
+ "Tilesets 2"
+ROMX $1B
+ "Tilesets 3"
+ROMX $1C
+ "bank1C"
+ROMX $1D
+ "Maps 19"
+ "Itemfinder 1"
+ "Maps 20"
+ "Vending Machine"
+ "Maps 21"
+ "Itemfinder 2"
+ROMX $1E
+ "bank1E"
+ROMX $1F
+ "Sound Effect Headers 3"
+ "Music Headers 3"
+ "Sound Effects 3"
+ "Audio Engine 3"
+ "Music 3"
+ROMX $20
+ "Sound Effect Headers 4"
+ "Music Headers 4"
+ "Sound Effects 4"
+ "Audio Engine 4"
+ "Music 4"
+ROMX $21
+ "Pikachu Cries 1"
+ROMX $22
+ "Pikachu Cries 2"
+ROMX $23
+ "Pikachu Cries 3"
+ROMX $24
+ "Pikachu Cries 4"
+ROMX $25
+ "Pikachu Cries 5"
+ROMX $26
+ "Text 1"
+ROMX $27
+ "Text 2"
+ROMX $28
+ "Text 3"
+ROMX $29
+ "Text 4"
+ROMX $2A
+ "Text 5"
+ROMX $2B
+ "Text 6"
+ROMX $2C
+ "Text 7"
+ROMX $2D
+ "Text 8"
+ROMX $2E
+ "Pokédex Text"
+ROMX $2f
+ "Move Names"
+ org $5000
+ "bank2f"
+ROMX $30
+ "bank30"
+ROMX $31
+ "Pikachu Cries 6"
+ROMX $32
+ "Pikachu Cries 7"
+ROMX $33
+ "Pikachu Cries 8"
+ROMX $34
+ "Pikachu Cries 9"
+ROMX $35
+ "Pikachu Cries 10"
+ROMX $36
+ "Pikachu Cries 11"
+ROMX $37
+ "Pikachu Cries 12"
+ROMX $38
+ "Pikachu Cries 13"
+ROMX $39
+ "bank39"
+ROMX $3A
+ "bank3A"
+; bank $3b is empty
+ROMX $3C
+ "bank3C"
+ROMX $3D
+ "bank3D"
+ROMX $3E
+ "bank3E"
+ROMX $3F
+ "bank3F"
+WRAM0
+ "WRAM"
+ org $c100
+ "Sprite State Data"
+ org $c300
+ "OAM Buffer"
+WRAMX $1
+ "WRAM Bank 1"
+ org $dfff
+ "Stack"
+VRAM $0
+ "VRAM"
+SRAM $0
+ "Sprite Buffers"
+SRAM $1
+ "Save Data"
+SRAM $2
+ "Saved Boxes 1"
+SRAM $3
+ "Saved Boxes 2"
+HRAM
+ "OAM DMA"
+ "HRAM"
diff --git a/macros.asm b/macros.asm
index db13fec6..3da4a691 100644
--- a/macros.asm
+++ b/macros.asm
@@ -1,8 +1,15 @@
-INCLUDE "macros/asm_macros.asm"
-INCLUDE "macros/data_macros.asm"
-INCLUDE "macros/text_macros.asm"
-INCLUDE "macros/audio_macros.asm"
-INCLUDE "macros/event_macros.asm"
+INCLUDE "macros/const.asm"
+INCLUDE "macros/predef.asm"
+INCLUDE "macros/farcall.asm"
+INCLUDE "macros/data.asm"
+INCLUDE "macros/code.asm"
+INCLUDE "macros/gfx.asm"
+INCLUDE "macros/coords.asm"
+
+INCLUDE "macros/scripts/audio.asm"
+INCLUDE "macros/scripts/maps.asm"
+INCLUDE "macros/scripts/events.asm"
+INCLUDE "macros/scripts/text.asm"
SHADE_BLACK EQU %11
SHADE_DARK EQU %10
@@ -22,61 +29,61 @@ setpalOBP: MACRO
ENDM
homecall_jump: MACRO
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, BANK(\1)
call BankswitchCommon
call \1
pop af
jp BankswitchCommon
- ENDM
+ENDM
homecall_jump_sf: MACRO
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, BANK(\1)
call BankswitchCommon
call \1
pop bc
- ld a,b
+ ld a, b
jp BankswitchCommon
- ENDM
+ENDM
homecall_sf: MACRO ; homecall but save flags by popping into bc instead of af
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
push af
ld a, BANK(\1)
call BankswitchCommon
call \1
pop bc
- ld a,b
+ ld a, b
call BankswitchCommon
- ENDM
+ENDM
switchbank: MACRO
ld a, BANK(\1)
call BankswitchCommon
- ENDM
+ENDM
callbs: MACRO
ld a, BANK(\1)
call BankswitchCommon
call \1
- ENDM
+ENDM
calladb_ModifyPikachuHappiness: MACRO
ld hl, ModifyPikachuHappiness
ld d, \1
ld b, BANK(ModifyPikachuHappiness)
call Bankswitch
- ENDM
+ENDM
callabd_ModifyPikachuHappiness: MACRO
ld hl, ModifyPikachuHappiness
ld b, BANK(ModifyPikachuHappiness)
ld d, \1
call Bankswitch
- ENDM
+ENDM
sine_wave: MACRO
; \1: amplitude
diff --git a/macros/asm_macros.asm b/macros/asm_macros.asm
deleted file mode 100755
index 7012d7e1..00000000
--- a/macros/asm_macros.asm
+++ /dev/null
@@ -1,190 +0,0 @@
-
-lb: MACRO ; r, hi, lo
- ld \1, ((\2) & $ff) << 8 + ((\3) & $ff)
-ENDM
-
-homecall: MACRO
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, BANK(\1)
- call BankswitchCommon
- call \1
- pop af
- call BankswitchCommon
-ENDM
-
-farcall EQUS "callba"
-
-callba: MACRO
- ld b, BANK(\1)
- ld hl, \1
- call Bankswitch
-ENDM
-
-callab: MACRO
- ld hl, \1
- ld b, BANK(\1)
- call Bankswitch
-ENDM
-
-jpba: MACRO
- ld b, BANK(\1)
- ld hl, \1
- jp Bankswitch
-ENDM
-
-jpab: MACRO
- ld hl, \1
- ld b, BANK(\1)
- jp Bankswitch
-ENDM
-
-validateCoords: MACRO
- IF \1 >= SCREEN_WIDTH
- fail "x coord out of range"
- ENDC
- IF \2 >= SCREEN_HEIGHT
- fail "y coord out of range"
- ENDC
-ENDM
-
-;\1 = r
-;\2 = X
-;\3 = Y
-;\4 = which tilemap (optional)
-coord: MACRO
- validateCoords \2, \3
- IF _NARG >= 4
- ld \1, \4 + SCREEN_WIDTH * \3 + \2
- ELSE
- ld \1, wTileMap + SCREEN_WIDTH * \3 + \2
- ENDC
-ENDM
-
-;\1 = X
-;\2 = Y
-;\3 = which tilemap (optional)
-aCoord: MACRO
- validateCoords \1, \2
- IF _NARG >= 3
- ld a, [\3 + SCREEN_WIDTH * \2 + \1]
- ELSE
- ld a, [wTileMap + SCREEN_WIDTH * \2 + \1]
- ENDC
-ENDM
-
-;\1 = X
-;\2 = Y
-;\3 = which tilemap (optional)
-Coorda: MACRO
- validateCoords \1, \2
- IF _NARG >= 3
- ld [\3 + SCREEN_WIDTH * \2 + \1], a
- ELSE
- ld [wTileMap + SCREEN_WIDTH * \2 + \1], a
- ENDC
-ENDM
-
-;\1 = X
-;\2 = Y
-;\3 = which tilemap (optional)
-dwCoord: MACRO
- validateCoords \1, \2
- IF _NARG >= 3
- dw \3 + SCREEN_WIDTH * \2 + \1
- ELSE
- dw wTileMap + SCREEN_WIDTH * \2 + \1
- ENDC
-ENDM
-
-;\1 = r
-;\2 = X
-;\3 = Y
-;\4 = map width
-overworldMapCoord: MACRO
- ld \1, wOverworldMap + ((\2) + 3) + (((\3) + 3) * ((\4) + (3 * 2)))
-ENDM
-
-; macro for two nibbles
-dn: MACRO
- db (\1 << 4 | \2)
-ENDM
-
-; macro for putting a byte then a word
-dbw: MACRO
- db \1
- dw \2
-ENDM
-
-dba: MACRO
- dbw BANK(\1), \1
-ENDM
-
-dwb: MACRO
- dw \1
- db \2
-ENDM
-
-dab: MACRO
- dwb \1, BANK(\1)
-ENDM
-
-dbbw: MACRO
- db \1, \2
- dw \3
-ENDM
-
-; Predef macro.
-predef_const: MACRO
- const \1PredefID
-ENDM
-
-add_predef: MACRO
-\1Predef::
- db BANK(\1)
- dw \1
-ENDM
-
-predef_id: MACRO
- ld a, (\1Predef - PredefPointers) / 3
-ENDM
-
-predef: MACRO
- predef_id \1
- call Predef
-ENDM
-
-predef_jump: MACRO
- predef_id \1
- jp Predef
-ENDM
-
-tx_pre_const: MACRO
- const \1_id
-ENDM
-
-add_tx_pre: MACRO
-\1_id:: dw \1
-ENDM
-
-db_tx_pre: MACRO
- db (\1_id - TextPredefs) / 2 + 1
-ENDM
-
-tx_pre_id: MACRO
- ld a, (\1_id - TextPredefs) / 2 + 1
-ENDM
-
-tx_pre: MACRO
- tx_pre_id \1
- call PrintPredefTextID
-ENDM
-
-tx_pre_jump: MACRO
- tx_pre_id \1
- jp PrintPredefTextID
-ENDM
-
-ldPal: MACRO
- ld \1, \2 << 6 | \3 << 4 | \4 << 2 | \5
-ENDM
diff --git a/macros/audio_macros.asm b/macros/audio_macros.asm
deleted file mode 100755
index 6daadbc6..00000000
--- a/macros/audio_macros.asm
+++ /dev/null
@@ -1,214 +0,0 @@
-
-;StopAllMusic: MACRO
-; ld a, $ff
-; call PlaySound
-;ENDM
-
-Ch1 EQU 0
-Ch2 EQU 1
-Ch3 EQU 2
-Ch4 EQU 3
-Ch5 EQU 4
-Ch6 EQU 5
-Ch7 EQU 6
-Ch8 EQU 7
-
-audio_header: MACRO
- db (_NARG - 2) << 6 | \2
- dw \1_\2
- IF _NARG > 2
- db \3
- dw \1_\3
- ENDC
- IF _NARG > 3
- db \4
- dw \1_\4
- ENDC
- IF _NARG > 4
- db \5
- dw \1_\5
- ENDC
-ENDM
-
-; arguments: length [0, 7], pitch change [-7, 7]
-; length: length of time between pitch shifts
-; sometimes used with a value >7 in which case the MSB is ignored
-; pitch change: positive value means increase in pitch, negative value means decrease in pitch
-; small magnitude means quick change, large magnitude means slow change
-; in signed magnitude representation, so a value of 8 is the same as (negative) 0
-pitch_sweep: MACRO
- db $10
- IF \2 < 0
- db (\1 << 4) | (%1000 | (\2 * -1))
- ELSE
- db (\1 << 4) | \2
- ENDC
-ENDM
-
-; arguments: length [0, 15], volume [0, 15], fade [-7, 7], frequency
-; fade: positive value means decrease in volume, negative value means increase in volume
-; small magnitude means quick change, large magnitude means slow change
-; in signed magnitude representation, so a value of 8 is the same as (negative) 0
-square_note: MACRO
- db $20 | \1
- IF \3 < 0
- db (\2 << 4) | (%1000 | (\3 * -1))
- ELSE
- db (\2 << 4) | \3
- ENDC
- dw \4
-ENDM
-
-; arguments: length [0, 15], volume [0, 15], fade [-7, 7], frequency
-; fade: positive value means decrease in volume, negative value means increase in volume
-; small magnitude means quick change, large magnitude means slow change
-; in signed magnitude representation, so a value of 8 is the same as (negative) 0
-noise_note: MACRO
- db $20 | \1
- IF \3 < 0
- db (\2 << 4) | (%1000 | (\3 * -1))
- ELSE
- db (\2 << 4) | \3
- ENDC
- db \4
-ENDM
-
-C_ EQU $0
-C# EQU $1
-D_ EQU $2
-D# EQU $3
-E_ EQU $4
-F_ EQU $5
-F# EQU $6
-G_ EQU $7
-G# EQU $8
-A_ EQU $9
-A# EQU $A
-B_ EQU $B
-
-; arguments: pitch, length [1, 16]
-note: MACRO
- db (\1 << 4) | (\2 - 1)
-ENDM
-
-; arguments: instrument [1, 19], length [1, 16]
-drum_note: MACRO
- db $B0 | (\2 - 1)
- db \1
-ENDM
-
-; arguments: instrument, length [1, 16]
-; like drum_note but one 1 byte instead of 2
-; can only be used with instruments 1-10, excluding 2
-; unused
-drum_note_short: MACRO
- db (\1 << 4) | (\2 - 1)
-ENDM
-
-; arguments: length [1, 16]
-rest: MACRO
- db $C0 | (\1 - 1)
-ENDM
-
-; arguments: speed [0, 15], volume [0, 15], fade [-7, 7]
-; fade: positive value means decrease in volume, negative value means increase in volume
-; small magnitude means quick change, large magnitude means slow change
-; in signed magnitude representation, so a value of 8 is the same as (negative) 0
-note_type: MACRO
- db $D0 | \1
- IF \3 < 0
- db (\2 << 4) | (%1000 | (\3 * -1))
- ELSE
- db (\2 << 4) | \3
- ENDC
-ENDM
-
-; arguments: speed [0, 15]
-drum_speed: MACRO
- db $D0 | \1
-ENDM
-
-; arguments: octave [1, 8]
-octave: MACRO
- db $E8 - \1
-ENDM
-
-; when enabled, effective frequency used is incremented by 1
-toggle_perfect_pitch: MACRO
- db $E8
-ENDM
-
-; arguments: delay [0, 255], depth [0, 15], rate [0, 15]
-; delay: time delay until vibrato effect begins
-; depth: amplitude of vibrato wave
-; rate: frequency of vibrato wave
-vibrato: MACRO
- db $EA
- db \1
- db (\2 << 4) | \3
-ENDM
-
-; arguments: length [1, 256], octave [1, 8], pitch
-pitch_slide: MACRO
- db $EB
- db \1 - 1
- db ((8 - \2) << 4) | \3
-ENDM
-
-; arguments: duty cycle [0, 3] (12.5%, 25%, 50%, 75%)
-duty_cycle: MACRO
- db $EC
- db \1
-ENDM
-
-; arguments: tempo [0, $ffff]
-; used to calculate note delay counters
-; so a smaller value means music plays faster
-; ideally should be set to $100 or less to guarantee no overflow
-; if larger than $100, large note speed or note length values might cause overflow
-; stored in big endian
-tempo: MACRO
- db $ED
- db \1 / $100
- db \1 % $100
-ENDM
-
-; arguments: left output enable mask, right output enable mask
-stereo_panning: MACRO
- db $EE
- db (\1 << 4) | \2
-ENDM
-
-; arguments: left master volume [0, 7], right master volume [0, 7]
-volume: MACRO
- db $F0
- db (\1 << 4) | \2
-ENDM
-
-; when enabled, the sfx data is interpreted as music data
-execute_music: MACRO
- db $F8
-ENDM
-
-; arguments: duty cycle 1, duty cycle 2, duty cycle 3, duty cycle 4
-duty_cycle_pattern: MACRO
- db $FC
- db \1 << 6 | \2 << 4 | \3 << 2 | \4
-ENDM
-
-; arguments: address
-sound_call: MACRO
- db $FD
- dw \1
-ENDM
-
-; arguments: count, address
-sound_loop: MACRO
- db $FE
- db \1
- dw \2
-ENDM
-
-sound_ret: MACRO
- db $FF
-ENDM
diff --git a/macros/code.asm b/macros/code.asm
new file mode 100755
index 00000000..8507b1ad
--- /dev/null
+++ b/macros/code.asm
@@ -0,0 +1,20 @@
+; Syntactic sugar macros
+
+lb: MACRO ; r, hi, lo
+ ld \1, ((\2) & $ff) << 8 + ((\3) & $ff)
+ENDM
+
+ldPal: MACRO
+ ld \1, \2 << 6 | \3 << 4 | \4 << 2 | \5
+ENDM
+
+; Design patterns
+
+dict: MACRO
+IF \1 == 0
+ and a
+ELSE
+ cp \1
+ENDC
+ jp z, \2
+ENDM
diff --git a/macros/const.asm b/macros/const.asm
new file mode 100644
index 00000000..57380e97
--- /dev/null
+++ b/macros/const.asm
@@ -0,0 +1,40 @@
+; Enumerate constants
+
+const_def: MACRO
+IF _NARG >= 1
+const_value = \1
+ELSE
+const_value = 0
+ENDC
+IF _NARG >= 2
+const_inc = \2
+ELSE
+const_inc = 1
+ENDC
+ENDM
+
+const: MACRO
+\1 EQU const_value
+const_value = const_value + const_inc
+ENDM
+
+shift_const: MACRO
+\1 EQU (1 << const_value)
+const_value = const_value + const_inc
+ENDM
+
+const_skip: MACRO
+if _NARG >= 1
+const_value = const_value + const_inc * (\1)
+else
+const_value = const_value + const_inc
+endc
+ENDM
+
+const_next: MACRO
+if (const_value > 0 && \1 < const_value) || (const_value < 0 && \1 > const_value)
+fail "const_next cannot go backwards from {const_value} to \1"
+else
+const_value = \1
+endc
+ENDM
diff --git a/macros/coords.asm b/macros/coords.asm
new file mode 100644
index 00000000..6b16e7f7
--- /dev/null
+++ b/macros/coords.asm
@@ -0,0 +1,90 @@
+validate_coords: MACRO
+ IF _NARG >= 4
+ IF \1 >= \3
+ fail "x coord out of range"
+ ENDC
+ IF \2 >= \4
+ fail "y coord out of range"
+ ENDC
+ ELSE
+ validate_coords \1, \2, SCREEN_WIDTH, SCREEN_HEIGHT
+ ENDC
+ENDM
+
+hlcoord EQUS "coord hl,"
+bccoord EQUS "coord bc,"
+decoord EQUS "coord de,"
+
+coord: MACRO
+; register, x, y[, origin]
+ validate_coords \2, \3
+ IF _NARG >= 4
+ ld \1, (\3) * SCREEN_WIDTH + (\2) + \4
+ ELSE
+ ld \1, (\3) * SCREEN_WIDTH + (\2) + wTileMap
+ ENDC
+ENDM
+
+hlbgcoord EQUS "bgcoord hl,"
+bcbgcoord EQUS "bgcoord bc,"
+debgcoord EQUS "bgcoord de,"
+
+bgcoord: MACRO
+; register, x, y[, origin]
+ validate_coords \2, \3, BG_MAP_WIDTH, BG_MAP_HEIGHT
+ IF _NARG >= 4
+ ld \1, (\3) * BG_MAP_WIDTH + (\2) + \4
+ ELSE
+ ld \1, (\3) * BG_MAP_WIDTH + (\2) + vBGMap0
+ ENDC
+ENDM
+
+hlowcoord EQUS "owcoord hl,"
+bcowcoord EQUS "owcoord bc,"
+deowcoord EQUS "owcoord de,"
+
+owcoord: MACRO
+; register, x, y, map width
+ ld \1, wOverworldMap + ((\2) + 3) + (((\3) + 3) * ((\4) + (3 * 2)))
+ENDM
+
+event_displacement: MACRO
+; map width, x blocks, y blocks
+ dw (wOverworldMap + 7 + (\1) + ((\1) + 6) * ((\3) >> 1) + ((\2) >> 1))
+ db \3, \2
+ENDM
+
+dwcoord: MACRO
+; x, y
+ validate_coords \1, \2
+ IF _NARG >= 3
+ dw (\2) * SCREEN_WIDTH + (\1) + \3
+ ELSE
+ dw (\2) * SCREEN_WIDTH + (\1) + wTileMap
+ ENDC
+ENDM
+
+ldcoord_a: MACRO
+; x, y[, origin]
+ validate_coords \1, \2
+ IF _NARG >= 3
+ ld [(\2) * SCREEN_WIDTH + (\1) + \3], a
+ ELSE
+ ld [(\2) * SCREEN_WIDTH + (\1) + wTileMap], a
+ ENDC
+ENDM
+
+lda_coord: MACRO
+; x, y[, origin]
+ validate_coords \1, \2
+ IF _NARG >= 3
+ ld a, [(\2) * SCREEN_WIDTH + (\1) + \3]
+ ELSE
+ ld a, [(\2) * SCREEN_WIDTH + (\1) + wTileMap]
+ ENDC
+ENDM
+
+dbmapcoord: MACRO
+; x, y
+ db \2, \1
+ENDM
diff --git a/macros/data.asm b/macros/data.asm
new file mode 100755
index 00000000..16742d53
--- /dev/null
+++ b/macros/data.asm
@@ -0,0 +1,80 @@
+; Value macros
+
+percent EQUS "* $ff / 100"
+
+bcd2: MACRO
+ dn ((\1) / 1000) % 10, ((\1) / 100) % 10
+ dn ((\1) / 10) % 10, (\1) % 10
+ENDM
+
+bcd3: MACRO
+ dn ((\1) / 100000) % 10, ((\1) / 10000) % 10
+ dn ((\1) / 1000) % 10, ((\1) / 100) % 10
+ dn ((\1) / 10) % 10, (\1) % 10
+ENDM
+
+coins EQUS "bcd2"
+money EQUS "bcd3"
+
+tmhm: MACRO
+; used in data/pokemon/base_stats/*.asm
+_tms1 = 0 ; TM01-TM24 (24)
+_tms2 = 0 ; TM25-TM48 (24)
+_tms3 = 0 ; TM49-TM50 + HM01-HM05 (7/24)
+REPT _NARG
+ if DEF(\1_TMNUM)
+ if \1_TMNUM < 24 + 1
+_tms1 = _tms1 | (1 << ((\1_TMNUM) - 1))
+ ELIF \1_TMNUM < 48 + 1
+_tms2 = _tms2 | (1 << ((\1_TMNUM) - 1 - 24))
+ else
+_tms3 = _tms3 | (1 << ((\1_TMNUM) - 1 - 48))
+ ENDC
+ else
+ fail "\1 is not a TM or HM move"
+ ENDC
+ SHIFT
+ENDR
+REPT 3 ; TM01-TM24 (24/24)
+ db _tms1 & $ff
+_tms1 = _tms1 >> 8
+ENDR
+REPT 3 ; TM25-TM48 (24/24)
+ db _tms2 & $ff
+_tms2 = _tms2 >> 8
+ENDR
+REPT 1 ; TM49-TM50 + HM01-HM05 (7/8)
+ db _tms3 & $ff
+_tms3 = _tms3 >> 8
+ENDR
+ENDM
+
+
+; Constant data (db, dw, dl) macros
+
+dn: MACRO ; nybbles
+ db (\1 << 4 | \2)
+ENDM
+
+dbw: MACRO
+ db \1
+ dw \2
+ENDM
+
+dba: MACRO
+ dbw BANK(\1), \1
+ENDM
+
+dwb: MACRO
+ dw \1
+ db \2
+ENDM
+
+dab: MACRO
+ dwb \1, BANK(\1)
+ENDM
+
+dbbw: MACRO
+ db \1, \2
+ dw \3
+ENDM
diff --git a/macros/data_macros.asm b/macros/data_macros.asm
deleted file mode 100755
index ee5cb8f0..00000000
--- a/macros/data_macros.asm
+++ /dev/null
@@ -1,242 +0,0 @@
-
-; Constant enumeration is useful for monsters, items, moves, etc.
-const_def: MACRO
-const_value = 0
-ENDM
-
-const: MACRO
-\1 EQU const_value
-const_value = const_value + 1
-ENDM
-
-; data format macros
-
-percent EQUS "* $ff / 100"
-
-bcd2: MACRO
- dn ((\1) / 1000) % 10, ((\1) / 100) % 10
- dn ((\1) / 10) % 10, (\1) % 10
-ENDM
-
-bcd3: MACRO
- dn ((\1) / 100000) % 10, ((\1) / 10000) % 10
- dn ((\1) / 1000) % 10, ((\1) / 100) % 10
- dn ((\1) / 10) % 10, (\1) % 10
-ENDM
-
-coins equs "bcd2"
-money equs "bcd3"
-
-;\1 = Map Width
-;\2 = Rows above (Y-blocks)
-;\3 = X movement (X-blocks)
-EVENT_DISP: MACRO
- dw (wOverworldMap + 7 + (\1) + ((\1) + 6) * ((\2) >> 1) + ((\3) >> 1)) ; Ev.Disp
- db \2,\3 ;Y,X
-ENDM
-
-FLYWARP_DATA: MACRO
- EVENT_DISP \1,\2,\3
- db ((\2) & $01) ;sub-block Y
- db ((\3) & $01) ;sub-block X
-ENDM
-
-; external map entry macro
-EMAP: MACRO ; emap x-coordinate,y-coordinate,textpointer
-; the appearance of towns and routes in the town map, indexed by map id
- ; nybble: y-coordinate
- ; nybble: x-coordinate
- ; word : pointer to map name
- dn \2, \1
- dw \3
-ENDM
-
-; internal map entry macro
-IMAP: MACRO ; imap mapid_less_than,x-coordinate,y-coordinate,textpointer
-; the appearance of buildings and dungeons in the town map
- ; byte : maximum map id subject to this rule
- ; nybble: y-coordinate
- ; nybble: x-coordinate
- ; word : pointer to map name
- db \1 + 1
- dn \3, \2
- dw \4
-ENDM
-
-; tilesets' headers macro
-tileset: MACRO
- db BANK(\2) ; BANK(GFX)
- dw \1, \2, \3 ; Block, GFX, Coll
- db \4, \5, \6 ; counter tiles
- db \7 ; grass tile
- db \8 ; permission (indoor, cave, outdoor)
-ENDM
-
-INDOOR EQU 0
-CAVE EQU 1
-OUTDOOR EQU 2
-
-RGB: MACRO
- dw (\3 << 10 | \2 << 5 | \1)
-ENDM
-
-WALK EQU $FE
-STAY EQU $FF
-
-DOWN EQU $D0
-UP EQU $D1
-LEFT EQU $D2
-RIGHT EQU $D3
-NONE EQU $FF
-
-;\1 sprite id
-;\2 x position
-;\3 y position
-;\4 movement (WALK/STAY)
-;\5 range or direction
-;\6 text id
-;\7 items only: item id
-;\7 trainers only: trainer class/pokemon id
-;\8 trainers only: trainer number/pokemon level
-object: MACRO
- db \1
- db \3 + 4
- db \2 + 4
- db \4
- db \5
- IF (_NARG > 7)
- db TRAINER | \6
- db \7
- db \8
- ELSE
- IF (_NARG > 6)
- db ITEM | \6
- db \7
- ELSE
- db \6
- ENDC
- ENDC
-ENDM
-
-;\1 x position
-;\2 y position
-;\3 destination warp id
-;\4 destination map (-1 = wLastMap)
-warp: MACRO
- db \2, \1, \3, \4
-ENDM
-
-;\1 x position
-;\2 y position
-;\3 sign id
-sign: MACRO
- db \2, \1, \3
-ENDM
-
-;\1 x position
-;\2 y position
-;\3 map width
-warp_to: MACRO
- EVENT_DISP \3, \2, \1
-ENDM
-
-;\1 (byte) = current map id
-;\2 (byte) = connected map id
-;\3 (byte) = x movement of connection strip
-;\4 (byte) = connection strip offset
-;\5 (word) = connected map blocks pointer
-NORTH_MAP_CONNECTION: MACRO
- db \2 ; map id
- dw \5 + (\2_WIDTH * (\2_HEIGHT - 3)) + \4; "Connection Strip" location
- dw wOverworldMap + 3 + \3 ; current map position
- IF (\1_WIDTH < \2_WIDTH)
- db \1_WIDTH - \3 + 3 ; width of connection strip
- ELSE
- db \2_WIDTH - \4 ; width of connection strip
- ENDC
- db \2_WIDTH ; map width
- db (\2_HEIGHT * 2) - 1 ; y alignment (y coordinate of player when entering map)
- db (\3 - \4) * -2 ; x alignment (x coordinate of player when entering map)
- dw wOverworldMap + 1 + (\2_HEIGHT * (\2_WIDTH + 6)) ; window (position of the upper left block after entering the map)
-ENDM
-
-;\1 (byte) = current map id
-;\2 (byte) = connected map id
-;\3 (byte) = x movement of connection strip
-;\4 (byte) = connection strip offset
-;\5 (word) = connected map blocks pointer
-;\6 (flag) = add 3 to width of connection strip (why?)
-SOUTH_MAP_CONNECTION: MACRO
- db \2 ; map id
- dw \5 + \4 ; "Connection Strip" location
- dw wOverworldMap + 3 + (\1_HEIGHT + 3) * (\1_WIDTH + 6) + \3 ; current map position
- IF (\1_WIDTH < \2_WIDTH)
- IF (_NARG > 5)
- db \1_WIDTH - \3 + 3 ; width of connection strip
- ELSE
- db \1_WIDTH - \3 ; width of connection strip
- ENDC
- ELSE
- db \2_WIDTH - \4 ; width of connection strip
- ENDC
- db \2_WIDTH ; map width
- db 0 ; y alignment (y coordinate of player when entering map)
- db (\3 - \4) * -2 ; x alignment (x coordinate of player when entering map)
- dw wOverworldMap + 7 + \2_WIDTH ; window (position of the upper left block after entering the map)
-ENDM
-
-;\1 (byte) = current map id
-;\2 (byte) = connected map id
-;\3 (byte) = y movement of connection strip
-;\4 (byte) = connection strip offset
-;\5 (word) = connected map blocks pointer
-WEST_MAP_CONNECTION: MACRO
- db \2 ; map id
- dw \5 + (\2_WIDTH * \4) + \2_WIDTH - 3 ; "Connection Strip" location
- dw wOverworldMap + (\1_WIDTH + 6) * (\3 + 3) ; current map position
- IF (\1_HEIGHT < \2_HEIGHT)
- db \1_HEIGHT - \3 + 3 ; height of connection strip
- ELSE
- db \2_HEIGHT - \4 ; height of connection strip
- ENDC
- db \2_WIDTH ; map width
- db (\3 - \4) * -2 ; y alignment
- db (\2_WIDTH * 2) - 1 ; x alignment
- dw wOverworldMap + 6 + (2 * \2_WIDTH) ; window (position of the upper left block after entering the map)
-ENDM
-
-;\1 (byte) = current map id
-;\2 (byte) = connected map id
-;\3 (byte) = y movement of connection strip
-;\4 (byte) = connection strip offset
-;\5 (word) = connected map blocks pointer
-;\6 (flag) = add 3 to height of connection strip (why?)
-EAST_MAP_CONNECTION: MACRO
- db \2 ; map id
- dw \5 + (\2_WIDTH * \4) ; "Connection Strip" location
- dw wOverworldMap - 3 + (\1_WIDTH + 6) * (\3 + 4) ; current map position
- IF (\1_HEIGHT < \2_HEIGHT)
- IF (_NARG > 5)
- db \1_HEIGHT - \3 + 3 ; height of connection strip
- ELSE
- db \1_HEIGHT - \3 ; height of connection strip
- ENDC
- ELSE
- db \2_HEIGHT - \4 ; height of connection strip
- ENDC
- db \2_WIDTH ; map width
- db (\3 - \4) * -2 ; y alignment
- db 0 ; x alignment
- dw wOverworldMap + 7 + \2_WIDTH ; window (position of the upper left block after entering the map)
-ENDM
-
-tmlearn: MACRO
-x = 0
- REPT _NARG
-IF \1 != 0
-x = x | (1 << ((\1 - 1) % 8))
-ENDC
- SHIFT
- ENDR
- db x
-ENDM
diff --git a/macros/event_macros.asm b/macros/event_macros.asm
deleted file mode 100644
index a3ce9746..00000000
--- a/macros/event_macros.asm
+++ /dev/null
@@ -1,502 +0,0 @@
-;\1 = event index
-;\2 = return result in carry instead of zero flag
-CheckEvent: MACRO
-event_byte = ((\1) / 8)
- ld a, [wEventFlags + event_byte]
-
- IF _NARG > 1
- IF ((\1) % 8) == 7
- add a
- ELSE
- REPT ((\1) % 8) + 1
- rrca
- ENDR
- ENDC
- ELSE
- bit (\1) % 8, a
- ENDC
- ENDM
-
-;\1 = event index
-CheckEventReuseA: MACRO
- IF event_byte != ((\1) / 8)
-event_byte = ((\1) / 8)
- ld a, [wEventFlags + event_byte]
- ENDC
-
- bit (\1) % 8, a
- ENDM
-
-;\1 = event index
-;\2 = event index of the last event used before the branch
-CheckEventAfterBranchReuseA: MACRO
-event_byte = ((\2) / 8)
- IF event_byte != ((\1) / 8)
-event_byte = ((\1) / 8)
- ld a, [wEventFlags + event_byte]
- ENDC
-
- bit (\1) % 8, a
- ENDM
-
-;\1 = reg
-;\2 = event index
-;\3 = event index this event is relative to (optional, this is needed when there is a fixed flag address)
-EventFlagBit: MACRO
- IF _NARG > 2
- ld \1, ((\3) % 8) + ((\2) - (\3))
- ELSE
- ld \1, (\2) % 8
- ENDC
- ENDM
-
-;\1 = reg
-;\2 = event index
-EventFlagAddress: MACRO
-event_byte = ((\2) / 8)
- ld \1, wEventFlags + event_byte
- ENDM
-
-EventFlagAddressa: MACRO
-event_byte = ((\1) / 8)
- ld [wEventFlags + event_byte], a
- ENDM
-
-aEventFlagAddress: MACRO
-event_byte = ((\1) / 8)
- ld a, [wEventFlags + event_byte]
- ENDM
-
-;\1 = event index
-CheckEventHL: MACRO
-event_byte = ((\1) / 8)
- ld hl, wEventFlags + event_byte
- bit (\1) % 8, [hl]
- ENDM
-
-;\1 = event index
-CheckEventReuseHL: MACRO
-IF event_byte != ((\1) / 8)
-event_byte = ((\1) / 8)
- ld hl, wEventFlags + event_byte
- ENDC
-
- bit (\1) % 8, [hl]
- ENDM
-
-; dangerous, only use when HL is guaranteed to be the desired value
-;\1 = event index
-CheckEventForceReuseHL: MACRO
-event_byte = ((\1) / 8)
- bit (\1) % 8, [hl]
- ENDM
-
-;\1 = event index
-;\2 = event index of the last event used before the branch
-CheckEventAfterBranchReuseHL: MACRO
-event_byte = ((\2) / 8)
-IF event_byte != ((\1) / 8)
-event_byte = ((\1) / 8)
- ld hl, wEventFlags + event_byte
- ENDC
-
- bit (\1) % 8, [hl]
- ENDM
-
-;\1 = event index
-CheckAndSetEvent: MACRO
-event_byte = ((\1) / 8)
- ld hl, wEventFlags + event_byte
- bit (\1) % 8, [hl]
- set (\1) % 8, [hl]
- ENDM
-
-;\1 = event index
-CheckAndResetEvent: MACRO
-event_byte = ((\1) / 8)
- ld hl, wEventFlags + event_byte
- bit (\1) % 8, [hl]
- res (\1) % 8, [hl]
- ENDM
-
-;\1 = event index
-CheckAndSetEventA: MACRO
- ld a, [wEventFlags + ((\1) / 8)]
- bit (\1) % 8, a
- set (\1) % 8, a
- ld [wEventFlags + ((\1) / 8)], a
- ENDM
-
-;\1 = event index
-CheckAndResetEventA: MACRO
- ld a, [wEventFlags + ((\1) / 8)]
- bit (\1) % 8, a
- res (\1) % 8, a
- ld [wEventFlags + ((\1) / 8)], a
- ENDM
-
-CheckAndSetEventReuseHL: MACRO
- IF event_byte != ((\1) / 8)
-event_byte = ((\1) / 8)
- ld hl, wEventFlags + event_byte
- ENDC
-
- bit (\1) % 8, [hl]
- set (\1) % 8, [hl]
- ENDM
-
-CheckAndResetEventReuseHL: MACRO
- IF event_byte != ((\1) / 8)
-event_byte = ((\1) / 8)
- ld hl, wEventFlags + event_byte
- ENDC
-
- bit (\1) % 8, [hl]
- res (\1) % 8, [hl]
- ENDM
-
-
-;\1 = event index
-SetEvent: MACRO
-event_byte = ((\1) / 8)
- ld hl, wEventFlags + event_byte
- set (\1) % 8, [hl]
- ENDM
-
-;\1 = event index
-SetEventReuseHL: MACRO
- IF event_byte != ((\1) / 8)
-event_byte = ((\1) / 8)
- ld hl, wEventFlags + event_byte
- ENDC
-
- set (\1) % 8, [hl]
- ENDM
-
-;\1 = event index
-;\2 = event index of the last event used before the branch
-SetEventAfterBranchReuseHL: MACRO
-event_byte = ((\2) / 8)
-IF event_byte != ((\1) / 8)
-event_byte = ((\1) / 8)
- ld hl, wEventFlags + event_byte
- ENDC
-
- set (\1) % 8, [hl]
- ENDM
-
-; dangerous, only use when HL is guaranteed to be the desired value
-;\1 = event index
-SetEventForceReuseHL: MACRO
-event_byte = ((\1) / 8)
- set (\1) % 8, [hl]
- ENDM
-
-;\1 = event index
-;\2 = event index
-;\3, \4, ... = additional (optional) event indices
-SetEvents: MACRO
- SetEvent \1
- rept (_NARG + -1)
- SetEventReuseHL \2
- shift
- endr
- ENDM
-
-;\1 = event index
-ResetEvent: MACRO
-event_byte = ((\1) / 8)
- ld hl, wEventFlags + event_byte
- res (\1) % 8, [hl]
- ENDM
-
-;\1 = event index
-ResetEventReuseHL: MACRO
- IF event_byte != ((\1) / 8)
-event_byte = ((\1) / 8)
- ld hl, wEventFlags + event_byte
- ENDC
-
- res (\1) % 8, [hl]
- ENDM
-
-;\1 = event index
-;\2 = event index of the last event used before the branch
-ResetEventAfterBranchReuseHL: MACRO
-event_byte = ((\2) / 8)
-IF event_byte != ((\1) / 8)
-event_byte = ((\1) / 8)
- ld hl, wEventFlags + event_byte
- ENDC
-
- res (\1) % 8, [hl]
- ENDM
-
-; dangerous, only use when HL is guaranteed to be the desired value
-;\1 = event index
-ResetEventForceReuseHL: MACRO
-event_byte = ((\1) / 8)
- res (\1) % 8, [hl]
- ENDM
-
-;\1 = event index
-;\2 = event index
-;\3 = event index (optional)
-ResetEvents: MACRO
- ResetEvent \1
- rept (_NARG + -1)
- ResetEventReuseHL \2
- shift
- endr
- ENDM
-
-;\1 = event index
-;\2 = number of bytes away from the base address (optional, for matching the ROM)
-dbEventFlagBit: MACRO
- IF _NARG > 1
- db ((\1) % 8) + ((\2) * 8)
- ELSE
- db ((\1) % 8)
- ENDC
- ENDM
-
-;\1 = event index
-;\2 = number of bytes away from the base address (optional, for matching the ROM)
-dwEventFlagAddress: MACRO
- IF _NARG > 1
- dw wEventFlags + ((\1) / 8) - (\2)
- ELSE
- dw wEventFlags + ((\1) / 8)
- ENDC
- ENDM
-
-;\1 = start
-;\2 = end
-SetEventRange: MACRO
-event_start_byte = ((\1) / 8)
-event_end_byte = ((\2) / 8)
-
- IF event_end_byte < event_start_byte
- FAIL "Incorrect argument order in SetEventRange."
- ENDC
-
- IF event_start_byte == event_end_byte
- ld a, [wEventFlags + event_start_byte]
- or (1 << (((\2) % 8) + 1)) - (1 << ((\1) % 8))
- ld [wEventFlags + event_start_byte], a
- ELSE
-event_fill_start = event_start_byte + 1
-event_fill_count = event_end_byte - event_start_byte - 1
-
- IF ((\1) % 8) == 0
-event_fill_start = event_fill_start + -1
-event_fill_count = event_fill_count + 1
- ELSE
- ld a, [wEventFlags + event_start_byte]
- or $ff - ((1 << ((\1) % 8)) - 1)
- ld [wEventFlags + event_start_byte], a
- ENDC
-
- IF ((\2) % 8) == 7
-event_fill_count = event_fill_count + 1
- ENDC
-
- IF event_fill_count == 1
- ld hl, wEventFlags + event_fill_start
- ld [hl], $ff
- ENDC
-
- IF event_fill_count > 1
- ld a, $ff
- ld hl, wEventFlags + event_fill_start
-
- REPT event_fill_count + -1
- ld [hli], a
- ENDR
-
- ld [hl], a
- ENDC
-
- IF ((\2) % 8) == 0
- ld hl, wEventFlags + event_end_byte
- set 0, [hl]
- ELSE
- IF ((\2) % 8) != 7
- ld a, [wEventFlags + event_end_byte]
- or (1 << (((\2) % 8) + 1)) - 1
- ld [wEventFlags + event_end_byte], a
- ENDC
- ENDC
- ENDC
- ENDM
-
-;\1 = start
-;\2 = end
-;\3 = assume a is 0 if present
-ResetEventRange: MACRO
-event_start_byte = ((\1) / 8)
-event_end_byte = ((\2) / 8)
-
- IF event_end_byte < event_start_byte
- FAIL "Incorrect argument order in ResetEventRange."
- ENDC
-
- IF event_start_byte == event_end_byte
- ld a, [wEventFlags + event_start_byte]
- and ~((1 << (((\2) % 8) + 1)) - (1 << ((\1) % 8))) & $ff
- ld [wEventFlags + event_start_byte], a
- ELSE
-event_fill_start = event_start_byte + 1
-event_fill_count = event_end_byte - event_start_byte - 1
-
- IF ((\1) % 8) == 0
-event_fill_start = event_fill_start + -1
-event_fill_count = event_fill_count + 1
- ELSE
- ld a, [wEventFlags + event_start_byte]
- and ~($ff - ((1 << ((\1) % 8)) - 1)) & $ff
- ld [wEventFlags + event_start_byte], a
- ENDC
-
- IF ((\2) % 8) == 7
-event_fill_count = event_fill_count + 1
- ENDC
-
- IF event_fill_count == 1
- ld hl, wEventFlags + event_fill_start
- ld [hl], 0
- ENDC
-
- IF event_fill_count > 1
- ld hl, wEventFlags + event_fill_start
-
- ; force xor a if we just to wrote to it above
- IF (_NARG < 3) || (((\1) % 8) != 0)
- xor a
- ENDC
-
- REPT event_fill_count + -1
- ld [hli], a
- ENDR
-
- ld [hl], a
- ENDC
-
- IF ((\2) % 8) == 0
- ld hl, wEventFlags + event_end_byte
- res 0, [hl]
- ELSE
- IF ((\2) % 8) != 7
- ld a, [wEventFlags + event_end_byte]
- and ~((1 << (((\2) % 8) + 1)) - 1) & $ff
- ld [wEventFlags + event_end_byte], a
- ENDC
- ENDC
- ENDC
- ENDM
-
-; returns whether both events are set in Z flag
-; This is counter-intuitive because the other event checks set the Z flag when
-; the event is not set, but this sets the Z flag when the event is set.
-;\1 = event index 1
-;\2 = event index 2
-;\3 = try to reuse a (optional)
-CheckBothEventsSet: MACRO
- IF ((\1) / 8) == ((\2) / 8)
- IF (_NARG < 3) || (((\1) / 8) != event_byte)
-event_byte = ((\1) / 8)
- ld a, [wEventFlags + ((\1) / 8)]
- ENDC
- and (1 << ((\1) % 8)) | (1 << ((\2) % 8))
- cp (1 << ((\1) % 8)) | (1 << ((\2) % 8))
- ELSE
- ; This case doesn't happen in the original ROM.
- IF ((\1) % 8) == ((\2) % 8)
- push hl
- ld a, [wEventFlags + ((\1) / 8)]
- ld hl, wEventFlags + ((\2) / 8)
- and [hl]
- cpl
- bit ((\1) % 8), a
- pop hl
- ELSE
- push bc
- ld a, [wEventFlags + ((\1) / 8)]
- and (1 << ((\1) % 8))
- ld b, a
- ld a, [wEventFlags + ((\2) / 8)]
- and (1 << ((\2) % 8))
- or b
- cp (1 << ((\1) % 8)) | (1 << ((\2) % 8))
- pop bc
- ENDC
- ENDC
- ENDM
-
-; returns the complement of whether either event is set in Z flag
-;\1 = event index 1
-;\2 = event index 2
-CheckEitherEventSet: MACRO
- IF ((\1) / 8) == ((\2) / 8)
- ld a, [wEventFlags + ((\1) / 8)]
- and (1 << ((\1) % 8)) | (1 << ((\2) % 8))
- ELSE
- ; This case doesn't happen in the original ROM.
- IF ((\1) % 8) == ((\2) % 8)
- push hl
- ld a, [wEventFlags + ((\1) / 8)]
- ld hl, wEventFlags + ((\2) / 8)
- or [hl]
- bit ((\1) % 8), a
- pop hl
- ELSE
- push bc
- ld a, [wEventFlags + ((\1) / 8)]
- and (1 << ((\1) % 8))
- ld b, a
- ld a, [wEventFlags + ((\2) / 8)]
- and (1 << ((\2) % 8))
- or b
- pop bc
- ENDC
- ENDC
- ENDM
-
-CheckEitherEventSetReuseA: MACRO
- IF event_byte != ((\1) / 8)
-event_byte = ((\1) / 8)
- ld a, [wEventFlags + event_byte]
- ENDC
- IF ((\1) / 8) == ((\2) / 8)
- ld a, [wEventFlags + ((\1) / 8)]
- and (1 << ((\1) % 8)) | (1 << ((\2) % 8))
- ELSE
- ; This case doesn't happen in the original ROM.
- IF ((\1) % 8) == ((\2) % 8)
- push hl
- ld a, [wEventFlags + ((\1) / 8)]
- ld hl, wEventFlags + ((\2) / 8)
- or [hl]
- bit ((\1) % 8), a
- pop hl
- ELSE
- push bc
- ld a, [wEventFlags + ((\1) / 8)]
- and (1 << ((\1) % 8))
- ld b, a
- ld a, [wEventFlags + ((\2) / 8)]
- and (1 << ((\2) % 8))
- or b
- pop bc
- ENDC
- ENDC
- ENDM
-
-; for handling fixed event bits when events are inserted/removed
-;\1 = event index
-;\2 = fixed flag bit
-AdjustEventBit: MACRO
- IF ((\1) % 8) != (\2)
- add ((\1) % 8) - (\2)
- ENDC
- ENDM
diff --git a/macros/farcall.asm b/macros/farcall.asm
new file mode 100644
index 00000000..b4af8b2d
--- /dev/null
+++ b/macros/farcall.asm
@@ -0,0 +1,33 @@
+farcall: MACRO
+ ld b, BANK(\1)
+ ld hl, \1
+ call Bankswitch
+ENDM
+
+callfar: MACRO
+ ld hl, \1
+ ld b, BANK(\1)
+ call Bankswitch
+ENDM
+
+farjp: MACRO
+ ld b, BANK(\1)
+ ld hl, \1
+ jp Bankswitch
+ENDM
+
+jpfar: MACRO
+ ld hl, \1
+ ld b, BANK(\1)
+ jp Bankswitch
+ENDM
+
+homecall: MACRO
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, BANK(\1)
+ call BankswitchCommon
+ call \1
+ pop af
+ call BankswitchCommon
+ENDM
diff --git a/macros/gfx.asm b/macros/gfx.asm
new file mode 100644
index 00000000..98eabec4
--- /dev/null
+++ b/macros/gfx.asm
@@ -0,0 +1,22 @@
+RGB: MACRO
+REPT _NARG / 3
+ dw palred (\1) + palgreen (\2) + palblue (\3)
+ SHIFT 3
+ENDR
+ENDM
+
+palred EQUS "(1 << 0) *"
+palgreen EQUS "(1 << 5) *"
+palblue EQUS "(1 << 10) *"
+
+palettes EQUS "* PALETTE_SIZE"
+palette EQUS "+ PALETTE_SIZE *"
+color EQUS "+ PAL_COLOR_SIZE *"
+
+tiles EQUS "* LEN_2BPP_TILE"
+tile EQUS "+ LEN_2BPP_TILE *"
+
+dbsprite: MACRO
+; x tile, y tile, x pixel, y pixel, vtile offset, attributes
+ db (\2 * TILE_WIDTH) % $100 + \4, (\1 * TILE_WIDTH) % $100 + \3, \5, \6
+ENDM
diff --git a/macros/predef.asm b/macros/predef.asm
new file mode 100644
index 00000000..f4e7f609
--- /dev/null
+++ b/macros/predef.asm
@@ -0,0 +1,36 @@
+predef_id: MACRO
+ ld a, (\1Predef - PredefPointers) / 3
+ENDM
+
+predef: MACRO
+ predef_id \1
+ call Predef
+ENDM
+
+predef_jump: MACRO
+ predef_id \1
+ jp Predef
+ENDM
+
+
+tx_pre_id: MACRO
+ ld a, (\1_id - TextPredefs) / 2 + 1
+ENDM
+
+tx_pre: MACRO
+ tx_pre_id \1
+ call PrintPredefTextID
+ENDM
+
+tx_pre_jump: MACRO
+ tx_pre_id \1
+ jp PrintPredefTextID
+ENDM
+
+db_tx_pre: MACRO
+ db (\1_id - TextPredefs) / 2 + 1
+ENDM
+
+predef_const: MACRO
+ const \1PredefID
+ENDM
diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm
new file mode 100755
index 00000000..b12a2adc
--- /dev/null
+++ b/macros/scripts/audio.asm
@@ -0,0 +1,233 @@
+audio_header: MACRO
+ db (_NARG - 2) << 6 | \2
+ dw \1_\2
+ IF _NARG > 2
+ db \3
+ dw \1_\3
+ ENDC
+ IF _NARG > 3
+ db \4
+ dw \1_\4
+ ENDC
+ IF _NARG > 4
+ db \5
+ dw \1_\5
+ ENDC
+ENDM
+
+ const_def $10
+
+; arguments: length [0, 7], pitch change [-7, 7]
+; length: length of time between pitch shifts
+; sometimes used with a value >7 in which case the MSB is ignored
+; pitch change: positive value means increase in pitch, negative value means decrease in pitch
+; small magnitude means quick change, large magnitude means slow change
+; in signed magnitude representation, so a value of 8 is the same as (negative) 0
+ const pitch_sweep_cmd ; $10
+pitch_sweep: MACRO
+ db pitch_sweep_cmd
+ IF \2 < 0
+ db (\1 << 4) | (%1000 | (\2 * -1))
+ ELSE
+ db (\1 << 4) | \2
+ ENDC
+ENDM
+
+ const_next $20
+
+ const sfx_note_cmd ; $20
+
+; arguments: length [0, 15], volume [0, 15], fade [-7, 7], frequency
+; fade: positive value means decrease in volume, negative value means increase in volume
+; small magnitude means quick change, large magnitude means slow change
+; in signed magnitude representation, so a value of 8 is the same as (negative) 0
+square_note_cmd EQU sfx_note_cmd ; $20
+square_note: MACRO
+ db square_note_cmd | \1
+ IF \3 < 0
+ db (\2 << 4) | (%1000 | (\3 * -1))
+ ELSE
+ db (\2 << 4) | \3
+ ENDC
+ dw \4
+ENDM
+
+; arguments: length [0, 15], volume [0, 15], fade [-7, 7], frequency
+; fade: positive value means decrease in volume, negative value means increase in volume
+; small magnitude means quick change, large magnitude means slow change
+; in signed magnitude representation, so a value of 8 is the same as (negative) 0
+noise_note_cmd EQU sfx_note_cmd ; $20
+noise_note: MACRO
+ db noise_note_cmd | \1
+ IF \3 < 0
+ db (\2 << 4) | (%1000 | (\3 * -1))
+ ELSE
+ db (\2 << 4) | \3
+ ENDC
+ db \4
+ENDM
+
+; arguments: pitch, length [1, 16]
+note: MACRO
+ db (\1 << 4) | (\2 - 1)
+ENDM
+
+ const_next $b0
+
+; arguments: instrument [1, 19], length [1, 16]
+ const drum_note_cmd ; $b0
+drum_note: MACRO
+ db drum_note_cmd | (\2 - 1)
+ db \1
+ENDM
+
+; arguments: instrument, length [1, 16]
+; like drum_note but one 1 byte instead of 2
+; can only be used with instruments 1-10, excluding 2
+; unused
+drum_note_short: MACRO
+ db (\1 << 4) | (\2 - 1)
+ENDM
+
+ const_next $c0
+
+; arguments: length [1, 16]
+ const rest_cmd ; $c0
+rest: MACRO
+ db rest_cmd | (\1 - 1)
+ENDM
+
+ const_next $d0
+
+; arguments: speed [0, 15], volume [0, 15], fade [-7, 7]
+; fade: positive value means decrease in volume, negative value means increase in volume
+; small magnitude means quick change, large magnitude means slow change
+; in signed magnitude representation, so a value of 8 is the same as (negative) 0
+ const note_type_cmd ; $d0
+note_type: MACRO
+ db note_type_cmd | \1
+ IF \3 < 0
+ db (\2 << 4) | (%1000 | (\3 * -1))
+ ELSE
+ db (\2 << 4) | \3
+ ENDC
+ENDM
+
+; arguments: speed [0, 15]
+drum_speed_cmd EQU note_type_cmd ; $d0
+drum_speed: MACRO
+ db drum_speed_cmd | \1
+ENDM
+
+ const_next $e0
+
+; arguments: octave [1, 8]
+ const octave_cmd ; $e0
+octave: MACRO
+ db octave_cmd | (8 - \1)
+ENDM
+
+ const_next $e8
+
+; when enabled, effective frequency used is incremented by 1
+ const toggle_perfect_pitch_cmd ; $e8
+toggle_perfect_pitch: MACRO
+ db toggle_perfect_pitch_cmd
+ENDM
+
+ const_skip ; $e9
+
+; arguments: delay [0, 255], depth [0, 15], rate [0, 15]
+; delay: time delay until vibrato effect begins
+; depth: amplitude of vibrato wave
+; rate: frequency of vibrato wave
+ const vibrato_cmd ; $ea
+vibrato: MACRO
+ db vibrato_cmd
+ db \1
+ db (\2 << 4) | \3
+ENDM
+
+; arguments: length [1, 256], octave [1, 8], pitch
+ const pitch_slide_cmd ; $eb
+pitch_slide: MACRO
+ db pitch_slide_cmd
+ db \1 - 1
+ db ((8 - \2) << 4) | \3
+ENDM
+
+; arguments: duty cycle [0, 3] (12.5%, 25%, 50%, 75%)
+ const duty_cycle_cmd ; $ec
+duty_cycle: MACRO
+ db duty_cycle_cmd
+ db \1
+ENDM
+
+; arguments: tempo [0, $ffff]
+; used to calculate note delay counters
+; so a smaller value means music plays faster
+; ideally should be set to $100 or less to guarantee no overflow
+; if larger than $100, large note speed or note length values might cause overflow
+; stored in big endian
+ const tempo_cmd ; $ed
+tempo: MACRO
+ db tempo_cmd
+ db HIGH(\1), LOW(\1)
+ENDM
+
+; arguments: left output enable mask, right output enable mask
+ const stereo_panning_cmd ; $ee
+stereo_panning: MACRO
+ db stereo_panning_cmd
+ db (\1 << 4) | \2
+ENDM
+
+ const unknownmusic0xef_cmd ; $ef
+unknownmusic0xef: MACRO
+ db unknownmusic0xef_cmd
+ db \1
+ENDM
+
+; arguments: left master volume [0, 7], right master volume [0, 7]
+ const volume_cmd ; $f0
+volume: MACRO
+ db volume_cmd
+ db (\1 << 4) | \2
+ENDM
+
+ const_next $f8
+
+; when enabled, the sfx data is interpreted as music data
+ const execute_music_cmd ; $f8
+execute_music: MACRO
+ db execute_music_cmd
+ENDM
+
+ const_next $fc
+
+; arguments: duty cycle 1, duty cycle 2, duty cycle 3, duty cycle 4
+ const duty_cycle_pattern_cmd ; $fc
+duty_cycle_pattern: MACRO
+ db duty_cycle_pattern_cmd
+ db \1 << 6 | \2 << 4 | \3 << 2 | \4
+ENDM
+
+; arguments: address
+ const sound_call_cmd ; $fd
+sound_call: MACRO
+ db sound_call_cmd
+ dw \1
+ENDM
+
+; arguments: count, address
+ const sound_loop_cmd ; $fe
+sound_loop: MACRO
+ db sound_loop_cmd
+ db \1
+ dw \2
+ENDM
+
+ const sound_ret_cmd ; $ff
+sound_ret: MACRO
+ db sound_ret_cmd
+ENDM
diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm
new file mode 100644
index 00000000..266ffdd1
--- /dev/null
+++ b/macros/scripts/events.asm
@@ -0,0 +1,532 @@
+;\1 = event index
+;\2 = return result in carry instead of zero flag
+CheckEvent: MACRO
+event_byte = ((\1) / 8)
+ ld a, [wEventFlags + event_byte]
+
+ IF _NARG > 1
+ IF ((\1) % 8) == 7
+ add a
+ ELSE
+ REPT ((\1) % 8) + 1
+ rrca
+ ENDR
+ ENDC
+ ELSE
+ bit (\1) % 8, a
+ ENDC
+ENDM
+
+
+;\1 = event index
+CheckEventReuseA: MACRO
+ IF event_byte != ((\1) / 8)
+event_byte = ((\1) / 8)
+ ld a, [wEventFlags + event_byte]
+ ENDC
+
+ bit (\1) % 8, a
+ENDM
+
+
+;\1 = event index
+;\2 = event index of the last event used before the branch
+CheckEventAfterBranchReuseA: MACRO
+event_byte = ((\2) / 8)
+ IF event_byte != ((\1) / 8)
+event_byte = ((\1) / 8)
+ ld a, [wEventFlags + event_byte]
+ ENDC
+
+ bit (\1) % 8, a
+ENDM
+
+
+;\1 = reg
+;\2 = event index
+;\3 = event index this event is relative to (optional, this is needed when there is a fixed flag address)
+EventFlagBit: MACRO
+ IF _NARG > 2
+ ld \1, ((\3) % 8) + ((\2) - (\3))
+ ELSE
+ ld \1, (\2) % 8
+ ENDC
+ENDM
+
+
+;\1 = reg
+;\2 = event index
+EventFlagAddress: MACRO
+event_byte = ((\2) / 8)
+ ld \1, wEventFlags + event_byte
+ENDM
+
+
+EventFlagAddressa: MACRO
+event_byte = ((\1) / 8)
+ ld [wEventFlags + event_byte], a
+ ENDM
+
+aEventFlagAddress: MACRO
+event_byte = ((\1) / 8)
+ ld a, [wEventFlags + event_byte]
+ ENDM
+
+;\1 = event index
+CheckEventHL: MACRO
+event_byte = ((\1) / 8)
+ ld hl, wEventFlags + event_byte
+ bit (\1) % 8, [hl]
+ENDM
+
+
+;\1 = event index
+CheckEventReuseHL: MACRO
+IF event_byte != ((\1) / 8)
+event_byte = ((\1) / 8)
+ ld hl, wEventFlags + event_byte
+ ENDC
+
+ bit (\1) % 8, [hl]
+ENDM
+
+
+; dangerous, only use when HL is guaranteed to be the desired value
+;\1 = event index
+CheckEventForceReuseHL: MACRO
+event_byte = ((\1) / 8)
+ bit (\1) % 8, [hl]
+ENDM
+
+
+;\1 = event index
+;\2 = event index of the last event used before the branch
+CheckEventAfterBranchReuseHL: MACRO
+event_byte = ((\2) / 8)
+IF event_byte != ((\1) / 8)
+event_byte = ((\1) / 8)
+ ld hl, wEventFlags + event_byte
+ ENDC
+
+ bit (\1) % 8, [hl]
+ENDM
+
+
+;\1 = event index
+CheckAndSetEvent: MACRO
+event_byte = ((\1) / 8)
+ ld hl, wEventFlags + event_byte
+ bit (\1) % 8, [hl]
+ set (\1) % 8, [hl]
+ENDM
+
+
+;\1 = event index
+CheckAndResetEvent: MACRO
+event_byte = ((\1) / 8)
+ ld hl, wEventFlags + event_byte
+ bit (\1) % 8, [hl]
+ res (\1) % 8, [hl]
+ENDM
+
+
+;\1 = event index
+CheckAndSetEventA: MACRO
+ ld a, [wEventFlags + ((\1) / 8)]
+ bit (\1) % 8, a
+ set (\1) % 8, a
+ ld [wEventFlags + ((\1) / 8)], a
+ENDM
+
+
+;\1 = event index
+CheckAndResetEventA: MACRO
+ ld a, [wEventFlags + ((\1) / 8)]
+ bit (\1) % 8, a
+ res (\1) % 8, a
+ ld [wEventFlags + ((\1) / 8)], a
+ENDM
+
+
+CheckAndSetEventReuseHL: MACRO
+ IF event_byte != ((\1) / 8)
+event_byte = ((\1) / 8)
+ ld hl, wEventFlags + event_byte
+ ENDC
+
+ bit (\1) % 8, [hl]
+ set (\1) % 8, [hl]
+ ENDM
+
+CheckAndResetEventReuseHL: MACRO
+ IF event_byte != ((\1) / 8)
+event_byte = ((\1) / 8)
+ ld hl, wEventFlags + event_byte
+ ENDC
+
+ bit (\1) % 8, [hl]
+ res (\1) % 8, [hl]
+ ENDM
+
+
+;\1 = event index
+SetEvent: MACRO
+event_byte = ((\1) / 8)
+ ld hl, wEventFlags + event_byte
+ set (\1) % 8, [hl]
+ENDM
+
+
+;\1 = event index
+SetEventReuseHL: MACRO
+ IF event_byte != ((\1) / 8)
+event_byte = ((\1) / 8)
+ ld hl, wEventFlags + event_byte
+ ENDC
+
+ set (\1) % 8, [hl]
+ENDM
+
+
+;\1 = event index
+;\2 = event index of the last event used before the branch
+SetEventAfterBranchReuseHL: MACRO
+event_byte = ((\2) / 8)
+IF event_byte != ((\1) / 8)
+event_byte = ((\1) / 8)
+ ld hl, wEventFlags + event_byte
+ ENDC
+
+ set (\1) % 8, [hl]
+ENDM
+
+
+; dangerous, only use when HL is guaranteed to be the desired value
+;\1 = event index
+SetEventForceReuseHL: MACRO
+event_byte = ((\1) / 8)
+ set (\1) % 8, [hl]
+ENDM
+
+
+;\1 = event index
+;\2 = event index
+;\3, \4, ... = additional (optional) event indices
+SetEvents: MACRO
+ SetEvent \1
+ REPT _NARG - 1
+ SetEventReuseHL \2
+ SHIFT
+ ENDR
+ENDM
+
+
+;\1 = event index
+ResetEvent: MACRO
+event_byte = ((\1) / 8)
+ ld hl, wEventFlags + event_byte
+ res (\1) % 8, [hl]
+ENDM
+
+
+;\1 = event index
+ResetEventReuseHL: MACRO
+ IF event_byte != ((\1) / 8)
+event_byte = ((\1) / 8)
+ ld hl, wEventFlags + event_byte
+ ENDC
+
+ res (\1) % 8, [hl]
+ENDM
+
+
+;\1 = event index
+;\2 = event index of the last event used before the branch
+ResetEventAfterBranchReuseHL: MACRO
+event_byte = ((\2) / 8)
+IF event_byte != ((\1) / 8)
+event_byte = ((\1) / 8)
+ ld hl, wEventFlags + event_byte
+ ENDC
+
+ res (\1) % 8, [hl]
+ENDM
+
+
+; dangerous, only use when HL is guaranteed to be the desired value
+;\1 = event index
+ResetEventForceReuseHL: MACRO
+event_byte = ((\1) / 8)
+ res (\1) % 8, [hl]
+ENDM
+
+
+;\1 = event index
+;\2 = event index
+;\3 = event index (optional)
+ResetEvents: MACRO
+ ResetEvent \1
+ REPT _NARG - 1
+ ResetEventReuseHL \2
+ SHIFT
+ ENDR
+ENDM
+
+
+;\1 = event index
+;\2 = number of bytes away from the base address (optional, for matching the ROM)
+dbEventFlagBit: MACRO
+ IF _NARG > 1
+ db ((\1) % 8) + ((\2) * 8)
+ ELSE
+ db ((\1) % 8)
+ ENDC
+ENDM
+
+
+;\1 = event index
+;\2 = number of bytes away from the base address (optional, for matching the ROM)
+dwEventFlagAddress: MACRO
+ IF _NARG > 1
+ dw wEventFlags + ((\1) / 8) - (\2)
+ ELSE
+ dw wEventFlags + ((\1) / 8)
+ ENDC
+ENDM
+
+
+;\1 = start
+;\2 = end
+SetEventRange: MACRO
+event_start_byte = ((\1) / 8)
+event_end_byte = ((\2) / 8)
+
+ IF event_end_byte < event_start_byte
+ FAIL "Incorrect argument order in SetEventRange."
+ ENDC
+
+ IF event_start_byte == event_end_byte
+ ld a, [wEventFlags + event_start_byte]
+ or (1 << (((\2) % 8) + 1)) - (1 << ((\1) % 8))
+ ld [wEventFlags + event_start_byte], a
+ ELSE
+event_fill_start = event_start_byte + 1
+event_fill_count = event_end_byte - event_start_byte - 1
+
+ IF ((\1) % 8) == 0
+event_fill_start = event_fill_start - 1
+event_fill_count = event_fill_count + 1
+ ELSE
+ ld a, [wEventFlags + event_start_byte]
+ or $ff - ((1 << ((\1) % 8)) - 1)
+ ld [wEventFlags + event_start_byte], a
+ ENDC
+
+ IF ((\2) % 8) == 7
+event_fill_count = event_fill_count + 1
+ ENDC
+
+ IF event_fill_count == 1
+ ld hl, wEventFlags + event_fill_start
+ ld [hl], $ff
+ ENDC
+
+ IF event_fill_count > 1
+ ld a, $ff
+ ld hl, wEventFlags + event_fill_start
+
+ REPT event_fill_count - 1
+ ld [hli], a
+ ENDR
+
+ ld [hl], a
+ ENDC
+
+ IF ((\2) % 8) == 0
+ ld hl, wEventFlags + event_end_byte
+ set 0, [hl]
+ ELSE
+ IF ((\2) % 8) != 7
+ ld a, [wEventFlags + event_end_byte]
+ or (1 << (((\2) % 8) + 1)) - 1
+ ld [wEventFlags + event_end_byte], a
+ ENDC
+ ENDC
+ ENDC
+ENDM
+
+
+;\1 = start
+;\2 = end
+;\3 = assume a is 0 if present
+ResetEventRange: MACRO
+event_start_byte = ((\1) / 8)
+event_end_byte = ((\2) / 8)
+
+ IF event_end_byte < event_start_byte
+ FAIL "Incorrect argument order in ResetEventRange."
+ ENDC
+
+ IF event_start_byte == event_end_byte
+ ld a, [wEventFlags + event_start_byte]
+ and ~((1 << (((\2) % 8) + 1)) - (1 << ((\1) % 8))) & $ff
+ ld [wEventFlags + event_start_byte], a
+ ELSE
+event_fill_start = event_start_byte + 1
+event_fill_count = event_end_byte - event_start_byte - 1
+
+ IF ((\1) % 8) == 0
+event_fill_start = event_fill_start - 1
+event_fill_count = event_fill_count + 1
+ ELSE
+ ld a, [wEventFlags + event_start_byte]
+ and ~($ff - ((1 << ((\1) % 8)) - 1)) & $ff
+ ld [wEventFlags + event_start_byte], a
+ ENDC
+
+ IF ((\2) % 8) == 7
+event_fill_count = event_fill_count + 1
+ ENDC
+
+ IF event_fill_count == 1
+ ld hl, wEventFlags + event_fill_start
+ ld [hl], 0
+ ENDC
+
+ IF event_fill_count > 1
+ ld hl, wEventFlags + event_fill_start
+
+ ; force xor a if we just to wrote to it above
+ IF (_NARG < 3) || (((\1) % 8) != 0)
+ xor a
+ ENDC
+
+ REPT event_fill_count - 1
+ ld [hli], a
+ ENDR
+
+ ld [hl], a
+ ENDC
+
+ IF ((\2) % 8) == 0
+ ld hl, wEventFlags + event_end_byte
+ res 0, [hl]
+ ELSE
+ IF ((\2) % 8) != 7
+ ld a, [wEventFlags + event_end_byte]
+ and ~((1 << (((\2) % 8) + 1)) - 1) & $ff
+ ld [wEventFlags + event_end_byte], a
+ ENDC
+ ENDC
+ ENDC
+ENDM
+
+
+; returns whether both events are set in Z flag
+; This is counter-intuitive because the other event checks set the Z flag when
+; the event is not set, but this sets the Z flag when the event is set.
+;\1 = event index 1
+;\2 = event index 2
+;\3 = try to reuse a (optional)
+CheckBothEventsSet: MACRO
+ IF ((\1) / 8) == ((\2) / 8)
+ IF (_NARG < 3) || (((\1) / 8) != event_byte)
+event_byte = ((\1) / 8)
+ ld a, [wEventFlags + ((\1) / 8)]
+ ENDC
+ and (1 << ((\1) % 8)) | (1 << ((\2) % 8))
+ cp (1 << ((\1) % 8)) | (1 << ((\2) % 8))
+ ELSE
+ ; This case doesn't happen in the original ROM.
+ IF ((\1) % 8) == ((\2) % 8)
+ push hl
+ ld a, [wEventFlags + ((\1) / 8)]
+ ld hl, wEventFlags + ((\2) / 8)
+ and [hl]
+ cpl
+ bit ((\1) % 8), a
+ pop hl
+ ELSE
+ push bc
+ ld a, [wEventFlags + ((\1) / 8)]
+ and (1 << ((\1) % 8))
+ ld b, a
+ ld a, [wEventFlags + ((\2) / 8)]
+ and (1 << ((\2) % 8))
+ or b
+ cp (1 << ((\1) % 8)) | (1 << ((\2) % 8))
+ pop bc
+ ENDC
+ ENDC
+ENDM
+
+
+; returns the complement of whether either event is set in Z flag
+;\1 = event index 1
+;\2 = event index 2
+CheckEitherEventSet: MACRO
+ IF ((\1) / 8) == ((\2) / 8)
+ ld a, [wEventFlags + ((\1) / 8)]
+ and (1 << ((\1) % 8)) | (1 << ((\2) % 8))
+ ELSE
+ ; This case doesn't happen in the original ROM.
+ IF ((\1) % 8) == ((\2) % 8)
+ push hl
+ ld a, [wEventFlags + ((\1) / 8)]
+ ld hl, wEventFlags + ((\2) / 8)
+ or [hl]
+ bit ((\1) % 8), a
+ pop hl
+ ELSE
+ push bc
+ ld a, [wEventFlags + ((\1) / 8)]
+ and (1 << ((\1) % 8))
+ ld b, a
+ ld a, [wEventFlags + ((\2) / 8)]
+ and (1 << ((\2) % 8))
+ or b
+ pop bc
+ ENDC
+ ENDC
+ENDM
+
+
+CheckEitherEventSetReuseA: MACRO
+ IF event_byte != ((\1) / 8)
+event_byte = ((\1) / 8)
+ ld a, [wEventFlags + event_byte]
+ ENDC
+ IF ((\1) / 8) == ((\2) / 8)
+ ld a, [wEventFlags + ((\1) / 8)]
+ and (1 << ((\1) % 8)) | (1 << ((\2) % 8))
+ ELSE
+ ; This case doesn't happen in the original ROM.
+ IF ((\1) % 8) == ((\2) % 8)
+ push hl
+ ld a, [wEventFlags + ((\1) / 8)]
+ ld hl, wEventFlags + ((\2) / 8)
+ or [hl]
+ bit ((\1) % 8), a
+ pop hl
+ ELSE
+ push bc
+ ld a, [wEventFlags + ((\1) / 8)]
+ and (1 << ((\1) % 8))
+ ld b, a
+ ld a, [wEventFlags + ((\2) / 8)]
+ and (1 << ((\2) % 8))
+ or b
+ pop bc
+ ENDC
+ ENDC
+ ENDM
+
+; for handling fixed event bits when events are inserted/removed
+;\1 = event index
+;\2 = fixed flag bit
+AdjustEventBit: MACRO
+ IF ((\1) % 8) != (\2)
+ add ((\1) % 8) - (\2)
+ ENDC
+ENDM
+
diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm
new file mode 100644
index 00000000..2032629b
--- /dev/null
+++ b/macros/scripts/maps.asm
@@ -0,0 +1,225 @@
+def_objects: MACRO
+ IF DEF(_NUM_OBJECTS)
+ PURGE _NUM_OBJECTS
+ ENDC
+_NUM_OBJECTS EQUS "_NUM_OBJECTS_\@"
+ db _NUM_OBJECTS
+_NUM_OBJECTS = 0
+ENDM
+
+;\1 sprite id
+;\2 x position
+;\3 y position
+;\4 movement (WALK/STAY)
+;\5 range or direction
+;\6 text id
+;\7 items only: item id
+;\7 trainers only: trainer class/pokemon id
+;\8 trainers only: trainer number/pokemon level
+object: MACRO
+ db \1
+ db \3 + 4
+ db \2 + 4
+ db \4
+ db \5
+ IF _NARG > 7
+ db TRAINER | \6
+ db \7
+ db \8
+ ELIF _NARG > 6
+ db ITEM | \6
+ db \7
+ ELSE
+ db \6
+ ENDC
+_NUM_OBJECTS = _NUM_OBJECTS + 1
+ENDM
+
+def_warps: MACRO
+ IF DEF(_NUM_WARPS)
+ PURGE _NUM_WARPS
+ ENDC
+_NUM_WARPS EQUS "_NUM_WARPS_\@"
+ db _NUM_WARPS
+_NUM_WARPS = 0
+ENDM
+
+;\1 x position
+;\2 y position
+;\3 destination warp id
+;\4 destination map (-1 = wLastMap)
+warp: MACRO
+ db \2, \1, \3, \4
+_NUM_WARPS = _NUM_WARPS + 1
+; the Nth warp defines a corresponding Nth warp_to, stored in _WARP_TO_NUM_<N>
+_WARP_TO_NAME EQUS "_WARP_TO_NUM_{d:{_NUM_WARPS}}"
+_WARP_TO_NAME EQUS "warp_to \1, \2, _WARP_TO_WIDTH"
+ PURGE _WARP_TO_NAME
+ENDM
+
+def_signs: MACRO
+ IF DEF(_NUM_SIGNS)
+ PURGE _NUM_SIGNS
+ ENDC
+_NUM_SIGNS EQUS "_NUM_SIGNS_\@"
+ db _NUM_SIGNS
+_NUM_SIGNS = 0
+ENDM
+
+;\1 x position
+;\2 y position
+;\3 sign id
+sign: MACRO
+ db \2, \1, \3
+_NUM_SIGNS = _NUM_SIGNS + 1
+ENDM
+
+;\1 source map
+def_warps_to: MACRO
+; output and purge each _WARP_TO_NUM_<N> warp_to, from N=1 to _NUM_WARPS
+_WARP_TO_WIDTH = \1_WIDTH
+_WARP_TO_N = 1
+ REPT _NUM_WARPS
+_WARP_TO_NAME EQUS "_WARP_TO_NUM_{d:_WARP_TO_N}"
+ _WARP_TO_NAME
+_WARP_TO_N = _WARP_TO_N + 1
+_PURGE_WARP_TO_NUM EQUS "PURGE {_WARP_TO_NAME}"
+ _PURGE_WARP_TO_NUM
+ PURGE _PURGE_WARP_TO_NUM
+ PURGE _WARP_TO_NAME
+ ENDR
+ENDM
+
+;\1 x position
+;\2 y position
+;\3 map width
+warp_to: MACRO
+ event_displacement \3, \1, \2
+ENDM
+
+
+;\1 event flag
+;\2 view range
+;\3 TextBeforeBattle
+;\4 TextAfterBattle
+;\5 TextEndBattle
+trainer: MACRO
+ IF _NARG > 5
+ dbEventFlagBit \1, \2
+ db (\3 << 4)
+ dwEventFlagAddress \1, \2
+ SHIFT
+ ELSE
+ dbEventFlagBit \1
+ db (\2 << 4)
+ dwEventFlagAddress \1
+ ENDC
+ dw \3, \5, \4, \4
+ENDM
+
+;\1 x position
+;\2 y position
+;\3 movement data
+map_coord_movement: MACRO
+ dbmapcoord \1, \2
+ dw \3
+ENDM
+
+
+;\1 map name
+;\2 map id
+;\3 tileset
+;\4 connections: combo of NORTH, SOUTH, WEST, and/or EAST, or 0 for none
+map_header: MACRO
+CURRENT_MAP_WIDTH = \2_WIDTH
+CURRENT_MAP_HEIGHT = \2_HEIGHT
+CURRENT_MAP_OBJECT EQUS "\1_Object"
+\1_h::
+ db \3
+ db CURRENT_MAP_HEIGHT, CURRENT_MAP_WIDTH
+ dw \1_Blocks
+ dw \1_TextPointers
+ dw \1_Script
+ db \4
+ENDM
+
+; Comes after map_header and connection macros
+end_map_header: MACRO
+ dw CURRENT_MAP_OBJECT
+ PURGE CURRENT_MAP_WIDTH
+ PURGE CURRENT_MAP_HEIGHT
+ PURGE CURRENT_MAP_OBJECT
+ENDM
+
+; Connections go in order: north, south, west, east
+;\1 direction
+;\2 map name
+;\3 map id
+;\4 offset of the target map relative to the current map
+; (x offset for east/west, y offset for north/south)
+connection: MACRO
+
+; Calculate tile offsets for source (current) and target maps
+_src = 0
+_tgt = (\4) + 3
+IF _tgt < 2
+_src = -_tgt
+_tgt = 0
+ENDC
+
+IF !STRCMP("\1", "north")
+_blk = \3_WIDTH * (\3_HEIGHT - 3) + _src
+_map = _tgt
+_win = (\3_WIDTH + 6) * \3_HEIGHT + 1
+_y = \3_HEIGHT * 2 - 1
+_x = (\4) * -2
+_len = CURRENT_MAP_WIDTH + 3 - (\4)
+IF _len > \3_WIDTH
+_len = \3_WIDTH
+ENDC
+
+ELIF !STRCMP("\1", "south")
+_blk = _src
+_map = (CURRENT_MAP_WIDTH + 6) * (CURRENT_MAP_HEIGHT + 3) + _tgt
+_win = \3_WIDTH + 7
+_y = 0
+_x = (\4) * -2
+_len = CURRENT_MAP_WIDTH + 3 - (\4)
+IF _len > \3_WIDTH
+_len = \3_WIDTH
+ENDC
+
+ELIF !STRCMP("\1", "west")
+_blk = (\3_WIDTH * _src) + \3_WIDTH - 3
+_map = (CURRENT_MAP_WIDTH + 6) * _tgt
+_win = (\3_WIDTH + 6) * 2 - 6
+_y = (\4) * -2
+_x = \3_WIDTH * 2 - 1
+_len = CURRENT_MAP_HEIGHT + 3 - (\4)
+IF _len > \3_HEIGHT
+_len = \3_HEIGHT
+ENDC
+
+ELIF !STRCMP("\1", "east")
+_blk = (\3_WIDTH * _src)
+_map = (CURRENT_MAP_WIDTH + 6) * _tgt + CURRENT_MAP_WIDTH + 3
+_win = \3_WIDTH + 7
+_y = (\4) * -2
+_x = 0
+_len = CURRENT_MAP_HEIGHT + 3 - (\4)
+IF _len > \3_HEIGHT
+_len = \3_HEIGHT
+ENDC
+
+ELSE
+fail "Invalid direction for 'connection'."
+ENDC
+
+ db \3
+ dw \2_Blocks + _blk
+ dw wOverworldMap + _map
+ db _len - _src
+ db \3_WIDTH
+ db _y, _x
+ dw wOverworldMap + _win
+ENDM
diff --git a/macros/scripts/text.asm b/macros/scripts/text.asm
new file mode 100755
index 00000000..2ec1de43
--- /dev/null
+++ b/macros/scripts/text.asm
@@ -0,0 +1,213 @@
+text EQUS "db TX_START," ; Start writing text.
+next EQUS "db \"<NEXT>\"," ; Move a line down.
+line EQUS "db \"<LINE>\"," ; Start writing at the bottom line.
+para EQUS "db \"<PARA>\"," ; Start a new paragraph.
+cont EQUS "db \"<CONT>\"," ; Scroll to the next line.
+done EQUS "db \"<DONE>\"" ; End a text box.
+prompt EQUS "db \"<PROMPT>\"" ; Prompt the player to end a text box (initiating some other event).
+
+page EQUS "db \"<PAGE>\"," ; Start a new Pokédex page.
+dex EQUS "db \"<DEXEND>\", \"@\"" ; End a Pokédex entry.
+
+
+; TextCommandJumpTable indexes (see home/text.asm)
+ const_def
+
+ const TX_START ; $00
+text_start: MACRO
+ db TX_START
+ENDM
+
+ const TX_RAM ; $01
+text_ram: MACRO
+ db TX_RAM
+ dw \1 ; address to read from
+ENDM
+
+ const TX_BCD ; $02
+text_bcd: MACRO
+ db TX_BCD
+ dw \1 ; address to read from
+ db \2 ; number of bytes + print flags
+ENDM
+
+ const TX_MOVE ; $03
+text_move: MACRO
+ db TX_MOVE
+ dw \1 ; address of the new location
+ENDM
+
+ const TX_BOX ; $04
+text_box: MACRO
+; draw box
+ db TX_BOX
+ dw \1 ; address of upper left corner
+ db \2, \3 ; height, width
+ENDM
+
+ const TX_LOW ; $05
+text_low: MACRO
+ db TX_LOW
+ENDM
+
+ const TX_PROMPT_BUTTON ; $06
+text_promptbutton: MACRO
+ db TX_PROMPT_BUTTON
+ENDM
+
+ const TX_SCROLL ; $07
+text_scroll: MACRO
+ db TX_SCROLL
+ENDM
+
+ const TX_START_ASM ; $08
+text_asm: MACRO
+ db TX_START_ASM
+ENDM
+
+ const TX_NUM ; $09
+text_decimal: MACRO
+; print a big-endian decimal number.
+ db TX_NUM
+ dw \1 ; address to read from
+ dn \2, \3 ; number of bytes to read, number of digits to display
+ENDM
+
+ const TX_PAUSE ; $0a
+text_pause: MACRO
+ db TX_PAUSE
+ENDM
+
+ const TX_SOUND_GET_ITEM_1 ; $0b
+sound_get_item_1: MACRO
+ db TX_SOUND_GET_ITEM_1
+ENDM
+
+TX_SOUND_LEVEL_UP EQU TX_SOUND_GET_ITEM_1
+sound_level_up EQUS "sound_get_item_1"
+
+ const TX_DOTS ; $0c
+text_dots: MACRO
+ db TX_DOTS
+ db \1 ; number of ellipses to draw
+ENDM
+
+ const TX_WAIT_BUTTON ; $0d
+text_waitbutton: MACRO
+ db TX_WAIT_BUTTON
+ENDM
+
+ const TX_SOUND_POKEDEX_RATING ; $0e
+sound_pokedex_rating: MACRO
+ db TX_SOUND_POKEDEX_RATING
+ENDM
+
+ const TX_SOUND_GET_ITEM_1_DUPLICATE ; $0f
+sound_get_item_1_duplicate: MACRO
+ db TX_SOUND_GET_ITEM_1_DUPLICATE
+ENDM
+
+ const TX_SOUND_GET_ITEM_2 ; $10
+sound_get_item_2: MACRO
+ db TX_SOUND_GET_ITEM_2
+ENDM
+
+ const TX_SOUND_GET_KEY_ITEM ; $11
+sound_get_key_item: MACRO
+ db TX_SOUND_GET_KEY_ITEM
+ENDM
+
+ const TX_SOUND_CAUGHT_MON ; $12
+sound_caught_mon: MACRO
+ db TX_SOUND_CAUGHT_MON
+ENDM
+
+ const TX_SOUND_DEX_PAGE_ADDED ; $13
+sound_dex_page_added: MACRO
+ db TX_SOUND_DEX_PAGE_ADDED
+ENDM
+
+ const TX_SOUND_CRY_PIKACHU ; $14
+sound_cry_pikachu: MACRO
+ db TX_SOUND_CRY_PIKACHU
+ENDM
+
+ const TX_SOUND_CRY_PIDGEOT ; $15
+sound_cry_pidgeot: MACRO
+ db TX_SOUND_CRY_PIDGEOT
+ENDM
+
+ const TX_SOUND_CRY_DEWGONG ; $16
+sound_cry_dewgong: MACRO
+ db TX_SOUND_CRY_DEWGONG
+ENDM
+
+ const TX_FAR ; $17
+text_far: MACRO
+ db TX_FAR
+ dab \1 ; address of text commands
+ENDM
+
+
+ const_next $50
+
+ const TX_END ; $50
+text_end: MACRO
+ db TX_END
+ENDM
+
+
+; Text script IDs (see home/text_script.asm)
+ const_def -1, -1
+
+ const TX_SCRIPT_POKECENTER_NURSE ; $ff
+script_pokecenter_nurse: MACRO
+ db TX_SCRIPT_POKECENTER_NURSE
+ENDM
+
+ const TX_SCRIPT_MART ; $fe
+script_mart: MACRO
+ db TX_SCRIPT_MART
+ db _NARG ; number of items
+REPT _NARG
+ db \1 ; item id
+ SHIFT
+ENDR
+ db -1 ; end
+ENDM
+
+ const TX_SCRIPT_BILLS_PC ; $fd
+script_bills_pc: MACRO
+ db TX_SCRIPT_BILLS_PC
+ENDM
+
+ const TX_SCRIPT_PLAYERS_PC ; $fc
+script_players_pc: MACRO
+ db TX_SCRIPT_PLAYERS_PC
+ENDM
+
+ const_skip ; $fb
+
+ const_skip ; $fa
+
+ const TX_SCRIPT_POKECENTER_PC ; $f9
+script_pokecenter_pc: MACRO
+ db TX_SCRIPT_POKECENTER_PC
+ENDM
+
+ const_skip ; $f8
+
+ const TX_SCRIPT_PRIZE_VENDOR ; $f7
+script_prize_vendor: MACRO
+ db TX_SCRIPT_PRIZE_VENDOR
+ENDM
+
+ const TX_SCRIPT_CABLE_CLUB_RECEPTIONIST ; $f6
+script_cable_club_receptionist: MACRO
+ db TX_SCRIPT_CABLE_CLUB_RECEPTIONIST
+ENDM
+
+ const TX_SCRIPT_VENDING_MACHINE ; $f5
+script_vending_machine: MACRO
+ db TX_SCRIPT_VENDING_MACHINE
+ENDM
diff --git a/macros/text_macros.asm b/macros/text_macros.asm
deleted file mode 100755
index 21e02634..00000000
--- a/macros/text_macros.asm
+++ /dev/null
@@ -1,80 +0,0 @@
-
-; text macros
-text EQUS "db $00," ; Start writing text.
-next EQUS "db $4e," ; Move a line down.
-line EQUS "db $4f," ; Start writing at the bottom line.
-para EQUS "db $51," ; Start a new paragraph.
-cont EQUS "db $55," ; Scroll to the next line.
-done EQUS "db $57" ; End a text box.
-prompt EQUS "db $58" ; Prompt the player to end a text box (initiating some other event).
-
-page EQUS "db $49," ; Start a new Pokedex page.
-dex EQUS "db $5f, $50" ; End a Pokedex entry.
-
-TX_RAM: MACRO
-; prints text to screen
-; \1: RAM address to read from
- db $1
- dw \1
-ENDM
-
-TX_BCD: MACRO
-; \1: RAM address to read from
-; \2: number of bytes + print flags
- db $2
- dw \1
- db \2
-ENDM
-
-TX_LINE EQUS "db $05"
-TX_BLINK EQUS "db $06"
-;TX_SCROLL EQUS "db $07"
-TX_ASM EQUS "db $08"
-
-TX_NUM: MACRO
-; print a big-endian decimal number.
-; \1: address to read from
-; \2: number of bytes to read
-; \3: number of digits to display
- db $09
- dw \1
- db \2 << 4 | \3
-ENDM
-
-TX_DELAY EQUS "db $0a"
-TX_SFX_ITEM_1 EQUS "db $0b"
-TX_SFX_LEVEL_UP EQUS "db $0b"
-;TX_ELLIPSES EQUS "db $0c"
-TX_WAIT EQUS "db $0d"
-;TX_SFX_DEX_RATING EQUS "db $0e"
-TX_SFX_ITEM_2 EQUS "db $10"
-TX_SFX_KEY_ITEM EQUS "db $11"
-TX_SFX_CAUGHT_MON EQUS "db $12"
-TX_SFX_DEX_PAGE_ADDED EQUS "db $13"
-TX_CRY_NIDORINA EQUS "db $14"
-TX_CRY_PIDGEOT EQUS "db $15"
-;TX_CRY_DEWGONG EQUS "db $16"
-
-TX_FAR: MACRO
- db $17
- dw \1
- db BANK(\1)
-ENDM
-
-TX_VENDING_MACHINE EQUS "db $f5"
-TX_CABLE_CLUB_RECEPTIONIST EQUS "db $f6"
-TX_PRIZE_VENDOR EQUS "db $f7"
-TX_POKECENTER_PC EQUS "db $f9"
-TX_PLAYERS_PC EQUS "db $fc"
-TX_BILLS_PC EQUS "db $fd"
-
-TX_MART: MACRO
- db $FE, _NARG
- REPT _NARG
- db \1
- SHIFT
- ENDR
- db $FF
-ENDM
-
-TX_POKECENTER_NURSE EQUS "db $ff"
diff --git a/macros/wram.asm b/macros/wram.asm
new file mode 100644
index 00000000..41fd1dad
--- /dev/null
+++ b/macros/wram.asm
@@ -0,0 +1,97 @@
+; Used in wram.asm
+
+flag_array: MACRO
+ ds ((\1) + 7) / 8
+ENDM
+
+BOX_STRUCT_LENGTH EQU 25 + NUM_MOVES * 2
+
+box_struct: MACRO
+\1Species:: db
+\1HP:: dw
+\1BoxLevel:: db
+\1Status:: db
+\1Type::
+\1Type1:: db
+\1Type2:: db
+\1CatchRate:: db
+\1Moves:: ds NUM_MOVES
+\1OTID:: dw
+\1Exp:: ds 3
+\1HPExp:: dw
+\1AttackExp:: dw
+\1DefenseExp:: dw
+\1SpeedExp:: dw
+\1SpecialExp:: dw
+\1DVs:: ds 2
+\1PP:: ds NUM_MOVES
+ENDM
+
+party_struct: MACRO
+ box_struct \1
+\1Level:: db
+\1Stats::
+\1MaxHP:: dw
+\1Attack:: dw
+\1Defense:: dw
+\1Speed:: dw
+\1Special:: dw
+ENDM
+
+battle_struct: MACRO
+\1Species:: db
+\1HP:: dw
+\1PartyPos::
+\1BoxLevel:: db
+\1Status:: db
+\1Type::
+\1Type1:: db
+\1Type2:: db
+\1CatchRate:: db
+\1Moves:: ds NUM_MOVES
+\1DVs:: ds 2
+\1Level:: db
+\1Stats::
+\1MaxHP:: dw
+\1Attack:: dw
+\1Defense:: dw
+\1Speed:: dw
+\1Special:: dw
+\1PP:: ds NUM_MOVES
+ENDM
+
+spritestatedata1: MACRO
+\1PictureID:: db
+\1MovementStatus:: db
+\1ImageIndex:: db
+\1YStepVector:: db
+\1YPixels:: db
+\1XStepVector:: db
+\1XPixels:: db
+\1IntraAnimFrameCounter:: db
+\1AnimFrameCounter:: db
+\1FacingDirection:: db
+\1YAdjusted:: db
+\1XAdjusted:: db
+\1CollisionData:: db
+ ds 3
+\1End::
+ENDM
+
+spritestatedata2: MACRO
+\1WalkAnimationCounter:: db
+ ds 1
+\1YDisplacement:: db
+\1XDisplacement:: db
+\1MapY:: db
+\1MapX:: db
+\1MovementByte1:: db
+\1GrassPriority:: db
+\1MovementDelay:: db
+\1OrigFacingDirection:: db
+ ds 3
+\1PictureID:: db
+\1ImageBaseOffset:: db
+ ds 1
+\1End::
+ENDM
diff --git a/main.asm b/main.asm
index 1c8efc31..e94dc292 100755
--- a/main.asm
+++ b/main.asm
@@ -1,2014 +1,322 @@
INCLUDE "constants.asm"
-INCLUDE "home.asm"
-
SECTION "bank1", ROMX
-INCLUDE "data/facing.asm"
-
+INCLUDE "data/sprites/facings.asm"
INCLUDE "engine/battle/safari_zone.asm"
-
-INCLUDE "engine/titlescreen.asm"
-INCLUDE "engine/load_mon_data.asm"
-
-INCLUDE "data/item_prices.asm"
-INCLUDE "text/item_names.asm"
-INCLUDE "text/unused_names.asm"
-
-INCLUDE "engine/overworld/oam.asm"
-
-INCLUDE "engine/print_waiting_text.asm"
-
-INCLUDE "engine/overworld/map_sprite_functions1.asm"
-
-INCLUDE "engine/overworld/item.asm"
+INCLUDE "engine/movie/title.asm"
+INCLUDE "engine/pokemon/load_mon_data.asm"
+INCLUDE "data/items/prices.asm"
+INCLUDE "data/items/names.asm"
+INCLUDE "data/text/unused_names.asm"
+INCLUDE "engine/gfx/sprite_oam.asm"
+INCLUDE "engine/link/print_waiting_text.asm"
+INCLUDE "engine/overworld/sprite_collisions.asm"
+INCLUDE "engine/events/pick_up_item.asm"
INCLUDE "engine/overworld/movement.asm"
-
-INCLUDE "engine/cable_club.asm"
-
-INCLUDE "engine/menu/main_menu.asm"
-
-INCLUDE "engine/oak_speech.asm"
-
-INCLUDE "engine/special_warps.asm"
-
-INCLUDE "engine/debug1.asm"
-
-INCLUDE "engine/menu/naming_screen.asm"
-
-INCLUDE "engine/oak_speech2.asm"
-
-INCLUDE "engine/subtract_paid_money.asm"
-
-INCLUDE "engine/menu/swap_items.asm"
-
-INCLUDE "engine/overworld/pokemart.asm"
-
-INCLUDE "engine/learn_move.asm"
-
-INCLUDE "engine/overworld/pokecenter.asm"
-
-INCLUDE "engine/overworld/set_blackout_map.asm"
-
-INCLUDE "engine/display_text_id_init.asm"
-INCLUDE "engine/menu/draw_start_menu.asm"
-
-INCLUDE "engine/overworld/cable_club_npc.asm"
-
-INCLUDE "engine/menu/text_box.asm"
-
-INCLUDE "engine/battle/moveEffects/drain_hp_effect.asm"
-
-INCLUDE "engine/menu/players_pc.asm"
-
-INCLUDE "engine/remove_pokemon.asm"
-
-INCLUDE "engine/display_pokedex.asm"
+INCLUDE "engine/link/cable_club.asm"
+INCLUDE "engine/menus/main_menu.asm"
+INCLUDE "engine/movie/oak_speech/oak_speech.asm"
+INCLUDE "engine/overworld/special_warps.asm"
+INCLUDE "engine/debug/debug_party.asm"
+INCLUDE "engine/menus/naming_screen.asm"
+INCLUDE "engine/movie/oak_speech/oak_speech2.asm"
+INCLUDE "engine/items/subtract_paid_money.asm"
+INCLUDE "engine/menus/swap_items.asm"
+INCLUDE "engine/events/pokemart.asm"
+INCLUDE "engine/pokemon/learn_move.asm"
+INCLUDE "engine/events/pokecenter.asm"
+INCLUDE "engine/events/set_blackout_map.asm"
+INCLUDE "engine/menus/display_text_id_init.asm"
+INCLUDE "engine/menus/draw_start_menu.asm"
+INCLUDE "engine/link/cable_club_npc.asm"
+INCLUDE "engine/menus/text_box.asm"
+INCLUDE "engine/battle/move_effects/drain_hp.asm"
+INCLUDE "engine/menus/players_pc.asm"
+INCLUDE "engine/pokemon/remove_mon.asm"
+INCLUDE "engine/events/display_pokedex.asm"
SECTION "bank3", ROMX
INCLUDE "engine/joypad.asm"
-
INCLUDE "engine/overworld/clear_variables.asm"
INCLUDE "engine/overworld/player_state.asm"
-INCLUDE "engine/overworld/poison.asm"
-INCLUDE "engine/overworld/tileset_header.asm"
+INCLUDE "engine/events/poison.asm"
+INCLUDE "engine/overworld/tilesets.asm"
INCLUDE "engine/overworld/daycare_exp.asm"
-
-INCLUDE "data/hide_show_data.asm"
-
+INCLUDE "data/maps/hide_show_data.asm"
INCLUDE "engine/overworld/wild_mons.asm"
-
-INCLUDE "engine/items/items.asm"
-
-INCLUDE "engine/menu/draw_badges.asm"
-
+INCLUDE "engine/items/item_effects.asm"
+INCLUDE "engine/menus/draw_badges.asm"
INCLUDE "engine/overworld/update_map.asm"
INCLUDE "engine/overworld/cut.asm"
INCLUDE "engine/overworld/missable_objects.asm"
INCLUDE "engine/overworld/push_boulder.asm"
-
-INCLUDE "engine/add_mon.asm"
+INCLUDE "engine/pokemon/add_mon.asm"
INCLUDE "engine/flag_action.asm"
-INCLUDE "engine/heal_party.asm"
-INCLUDE "engine/bcd.asm"
-INCLUDE "engine/init_player_data.asm"
-INCLUDE "engine/get_bag_item_quantity.asm"
-INCLUDE "engine/pathfinding.asm"
-INCLUDE "engine/hp_bar.asm"
-INCLUDE "engine/hidden_object_functions3.asm"
-
-
-SECTION "Graphics (BANK 4)", ROMX
-
-PokemonLogoJapanGraphics: INCBIN "gfx/pokemon_logo_japan.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:
-NineTile: INCBIN "gfx/9_tile.2bpp"
-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"
-
-INCLUDE "engine/menu/status_screen.asm"
-INCLUDE "engine/menu/party_menu.asm"
-
-RedPicFront: INCBIN "pic/ytrainer/red.pic"
-ShrinkPic1: INCBIN "pic/trainer/shrink1.pic"
-ShrinkPic2: INCBIN "pic/trainer/shrink2.pic"
-
-INCLUDE "engine/menu/start_sub_menus.asm"
+INCLUDE "engine/events/heal_party.asm"
+INCLUDE "engine/math/bcd.asm"
+INCLUDE "engine/movie/oak_speech/init_player_data.asm"
+INCLUDE "engine/items/get_bag_item_quantity.asm"
+INCLUDE "engine/overworld/pathfinding.asm"
+INCLUDE "engine/gfx/hp_bar.asm"
+INCLUDE "engine/events/hidden_objects/bookshelves.asm"
+INCLUDE "engine/events/hidden_objects/indigo_plateau_statues.asm"
+INCLUDE "engine/events/hidden_objects/book_or_sculpture.asm"
+INCLUDE "engine/events/hidden_objects/elevator.asm"
+INCLUDE "engine/events/hidden_objects/town_map.asm"
+INCLUDE "engine/events/hidden_objects/pokemon_stuff.asm"
+
+
+SECTION "Font Graphics", ROMX
+
+INCLUDE "gfx/font.asm"
+
+INCLUDE "engine/pokemon/status_screen.asm"
+INCLUDE "engine/menus/party_menu.asm"
+INCLUDE "gfx/player.asm"
+INCLUDE "engine/menus/start_sub_menus.asm"
INCLUDE "engine/items/tms.asm"
-SECTION "NPC Sprites 1", ROMX ; BANK $04
-
-OakAideSprite: INCBIN "gfx/sprites/oak_aide.2bpp"
-RockerSprite: INCBIN "gfx/sprites/rocker.2bpp"
-SwimmerSprite: INCBIN "gfx/sprites/swimmer.2bpp"
-WhitePlayerSprite: INCBIN "gfx/sprites/white_player.2bpp"
-GymHelperSprite: INCBIN "gfx/sprites/gym_helper.2bpp"
-OldPersonSprite: INCBIN "gfx/sprites/old_person.2bpp"
-MartGuySprite: INCBIN "gfx/sprites/mart_guy.2bpp"
-FisherSprite: INCBIN "gfx/sprites/fisher.2bpp"
-OldMediumWomanSprite: INCBIN "gfx/sprites/old_medium_woman.2bpp"
-NurseSprite: INCBIN "gfx/sprites/nurse.2bpp"
-CableClubWomanSprite: INCBIN "gfx/sprites/cable_club_woman.2bpp"
-MrMasterballSprite: INCBIN "gfx/sprites/mr_masterball.2bpp"
-LaprasGiverSprite: INCBIN "gfx/sprites/lapras_giver.2bpp"
-WardenSprite: INCBIN "gfx/sprites/warden.2bpp"
-SsCaptainSprite: INCBIN "gfx/sprites/ss_captain.2bpp"
-Fisher2Sprite: INCBIN "gfx/sprites/fisher2.2bpp"
-BlackbeltSprite: INCBIN "gfx/sprites/blackbelt.2bpp"
-GuardSprite: INCBIN "gfx/sprites/guard.2bpp"
-BallSprite: INCBIN "gfx/sprites/ball.2bpp"
-OmanyteSprite: INCBIN "gfx/sprites/omanyte.2bpp"
-BoulderSprite: INCBIN "gfx/sprites/boulder.2bpp"
-PaperSheetSprite: INCBIN "gfx/sprites/paper_sheet.2bpp"
-BookMapDexSprite: INCBIN "gfx/sprites/book_map_dex.2bpp"
-ClipboardSprite: INCBIN "gfx/sprites/clipboard.2bpp"
-SnorlaxSprite: INCBIN "gfx/sprites/snorlax.2bpp"
-OldAmberSprite: INCBIN "gfx/sprites/old_amber.2bpp"
-LyingOldManSprite: INCBIN "gfx/sprites/lying_old_man.2bpp"
-QuestionMarkSprite: INCBIN "gfx/sprites/question_mark.2bpp"
+SECTION "Battle Engine 1", ROMX
INCLUDE "engine/battle/end_of_battle.asm"
INCLUDE "engine/battle/wild_encounters.asm"
-INCLUDE "engine/battle/moveEffects/recoil_effect.asm"
-INCLUDE "engine/battle/moveEffects/conversion_effect.asm"
-INCLUDE "engine/battle/moveEffects/haze_effect.asm"
+INCLUDE "engine/battle/move_effects/recoil.asm"
+INCLUDE "engine/battle/move_effects/conversion.asm"
+INCLUDE "engine/battle/move_effects/haze.asm"
-SECTION "NPC Sprites 2", ROMX ; BANK $05
+SECTION "bank5", ROMX
-INCLUDE "engine/load_pokedex_tiles.asm"
+INCLUDE "engine/gfx/load_pokedex_tiles.asm"
INCLUDE "engine/overworld/map_sprites.asm"
-RedCyclingSprite: INCBIN "gfx/sprites/cycling.2bpp"
-RedSprite: INCBIN "gfx/sprites/red.2bpp"
-BlueSprite: INCBIN "gfx/sprites/blue.2bpp"
-OakSprite: INCBIN "gfx/sprites/oak.2bpp"
-BugCatcherSprite: INCBIN "gfx/sprites/bug_catcher.2bpp"
-SlowbroSprite: INCBIN "gfx/sprites/slowbro.2bpp"
-LassSprite: INCBIN "gfx/sprites/lass.2bpp"
-BlackHairBoy1Sprite: INCBIN "gfx/sprites/black_hair_boy_1.2bpp"
-LittleGirlSprite: INCBIN "gfx/sprites/little_girl.2bpp"
-BirdSprite: INCBIN "gfx/sprites/bird.2bpp"
-FatBaldGuySprite: INCBIN "gfx/sprites/fat_bald_guy.2bpp"
-GamblerSprite: INCBIN "gfx/sprites/gambler.2bpp"
-BlackHairBoy2Sprite: INCBIN "gfx/sprites/black_hair_boy_2.2bpp"
-GirlSprite: INCBIN "gfx/sprites/girl.2bpp"
-HikerSprite: INCBIN "gfx/sprites/hiker.2bpp"
-FoulardWomanSprite: INCBIN "gfx/sprites/foulard_woman.2bpp"
-GentlemanSprite: INCBIN "gfx/sprites/gentleman.2bpp"
-DaisySprite: INCBIN "gfx/sprites/daisy.2bpp"
-BikerSprite: INCBIN "gfx/sprites/biker.2bpp"
-SailorSprite: INCBIN "gfx/sprites/sailor.2bpp"
-CookSprite: INCBIN "gfx/sprites/cook.2bpp"
-BikeShopGuySprite: INCBIN "gfx/sprites/bike_shop_guy.2bpp"
-MrFujiSprite: INCBIN "gfx/sprites/mr_fuji.2bpp"
-GiovanniSprite: INCBIN "gfx/sprites/giovanni.2bpp"
-RocketSprite: INCBIN "gfx/sprites/rocket.2bpp"
-MediumSprite: INCBIN "gfx/sprites/medium.2bpp"
-WaiterSprite: INCBIN "gfx/sprites/waiter.2bpp"
-ErikaSprite: INCBIN "gfx/sprites/erika.2bpp"
-MomGeishaSprite: INCBIN "gfx/sprites/mom_geisha.2bpp"
-BrunetteGirlSprite: INCBIN "gfx/sprites/brunette_girl.2bpp"
-LanceSprite: INCBIN "gfx/sprites/lance.2bpp"
-MomSprite: INCBIN "gfx/sprites/mom.2bpp"
-BaldingGuySprite: INCBIN "gfx/sprites/balding_guy.2bpp"
-YoungBoySprite: INCBIN "gfx/sprites/young_boy.2bpp"
-GameboyKidSprite: INCBIN "gfx/sprites/gameboy_kid.2bpp"
-ClefairySprite: INCBIN "gfx/sprites/clefairy.2bpp"
-AgathaSprite: INCBIN "gfx/sprites/agatha.2bpp"
-BrunoSprite: INCBIN "gfx/sprites/bruno.2bpp"
-LoreleiSprite: INCBIN "gfx/sprites/lorelei.2bpp"
-SeelSprite: INCBIN "gfx/sprites/seel.2bpp"
-
-INCLUDE "engine/battle/moveEffects/substitute_effect.asm"
-INCLUDE "engine/menu/pc.asm"
-
-
-SECTION "bank6", ROMX
-
-INCLUDE "data/mapHeaders/CeladonCity.asm"
-INCLUDE "data/mapObjects/CeladonCity.asm"
-CeladonCity_Blocks: INCBIN "maps/CeladonCity.blk"
-
-INCLUDE "data/mapHeaders/PalletTown.asm"
-INCLUDE "data/mapObjects/PalletTown.asm"
-PalletTown_Blocks: INCBIN "maps/PalletTown.blk"
-
-INCLUDE "data/mapHeaders/ViridianCity.asm"
-INCLUDE "data/mapObjects/ViridianCity.asm"
-ViridianCity_Blocks: INCBIN "maps/ViridianCity.blk"
-
-INCLUDE "data/mapHeaders/PewterCity.asm"
- ds 1
-INCLUDE "data/mapObjects/PewterCity.asm"
-PewterCity_Blocks: INCBIN "maps/PewterCity.blk"
-
-INCLUDE "data/mapHeaders/CeruleanCity.asm"
-INCLUDE "data/mapObjects/CeruleanCity.asm"
-CeruleanCity_Blocks: INCBIN "maps/CeruleanCity.blk"
-
-INCLUDE "data/mapHeaders/VermilionCity.asm"
-INCLUDE "data/mapObjects/VermilionCity.asm"
-VermilionCity_Blocks: INCBIN "maps/VermilionCity.blk"
-
-INCLUDE "data/mapHeaders/FuchsiaCity.asm"
-INCLUDE "data/mapObjects/FuchsiaCity.asm"
-FuchsiaCity_Blocks: INCBIN "maps/FuchsiaCity.blk"
-
-INCLUDE "scripts/PalletTown.asm"
-INCLUDE "scripts/ViridianCity.asm"
-INCLUDE "scripts/PewterCity.asm"
-INCLUDE "scripts/CeruleanCity.asm"
-INCLUDE "scripts/VermilionCity.asm"
-INCLUDE "scripts/CeladonCity.asm"
-INCLUDE "scripts/FuchsiaCity.asm"
-
-INCLUDE "data/mapHeaders/BluesHouse.asm"
-INCLUDE "scripts/BluesHouse.asm"
-INCLUDE "data/mapObjects/BluesHouse.asm"
-BluesHouse_Blocks: INCBIN "maps/BluesHouse.blk"
-
-INCLUDE "data/mapHeaders/VermilionTradeHouse.asm"
-INCLUDE "scripts/VermilionTradeHouse.asm"
-INCLUDE "data/mapObjects/VermilionTradeHouse.asm"
-VermilionTradeHouse_Blocks: INCBIN "maps/VermilionTradeHouse.blk"
-
-INCLUDE "data/mapHeaders/IndigoPlateauLobby.asm"
-INCLUDE "scripts/IndigoPlateauLobby.asm"
-INCLUDE "data/mapObjects/IndigoPlateauLobby.asm"
-IndigoPlateauLobby_Blocks: INCBIN "maps/IndigoPlateauLobby.blk"
-
-INCLUDE "data/mapHeaders/SilphCo4F.asm"
-INCLUDE "scripts/SilphCo4F.asm"
-INCLUDE "data/mapObjects/SilphCo4F.asm"
-SilphCo4F_Blocks: INCBIN "maps/SilphCo4F.blk"
-
-INCLUDE "data/mapHeaders/SilphCo5F.asm"
-INCLUDE "scripts/SilphCo5F.asm"
-INCLUDE "data/mapObjects/SilphCo5F.asm"
-SilphCo5F_Blocks: INCBIN "maps/SilphCo5F.blk"
-
-INCLUDE "data/mapHeaders/SilphCo6F.asm"
-INCLUDE "scripts/SilphCo6F.asm"
-INCLUDE "data/mapObjects/SilphCo6F.asm"
-SilphCo6F_Blocks: INCBIN "maps/SilphCo6F.blk"
-
-INCLUDE "engine/overworld/npc_movement.asm"
-INCLUDE "engine/overworld/doors.asm"
-INCLUDE "engine/overworld/ledges.asm"
-
-
-SECTION "bank7", ROMX
-
-INCLUDE "data/mapHeaders/CinnabarIsland.asm"
-INCLUDE "data/mapObjects/CinnabarIsland.asm"
-CinnabarIsland_Blocks: INCBIN "maps/CinnabarIsland.blk"
-
-INCLUDE "data/mapHeaders/Route1.asm"
-INCLUDE "data/mapObjects/Route1.asm"
-Route1_Blocks: INCBIN "maps/Route1.blk"
-
-UndergroundPathRoute8_Blocks: INCBIN "maps/UndergroundPathRoute8.blk"
-
-OaksLab_Blocks: INCBIN "maps/OaksLab.blk"
-
-MrPsychicsHouse_Blocks:
-NameRatersHouse_Blocks:
-MrFujisHouse_Blocks:
-Route16FlyHouse_Blocks:
-Route2TradeHouse_Blocks:
-SaffronPidgeyHouse_Blocks:
-VermilionPidgeyHouse_Blocks:
-LavenderCuboneHouse_Blocks:
-CeruleanTradeHouse_Blocks:
-PewterNidoranHouse_Blocks:
-PewterSpeechHouse_Blocks:
-ViridianNicknameHouse_Blocks: INCBIN "maps/ViridianNicknameHouse.blk"
-CeladonMansionRoofHouse_Blocks:
-ViridianSchoolHouse_Blocks: INCBIN "maps/ViridianSchoolHouse.blk"
+SECTION "Battle Engine 2", ROMX
+INCLUDE "engine/battle/move_effects/substitute.asm"
+INCLUDE "engine/menus/pc.asm"
-CeruleanTrashedHouse_Blocks: INCBIN "maps/CeruleanTrashedHouse.blk"
-DiglettsCaveRoute11_Blocks:
-DiglettsCaveRoute2_Blocks: INCBIN "maps/DiglettsCaveRoute2.blk"
+SECTION "Doors and Ledges", ROMX
-INCLUDE "engine/clear_save.asm"
-
-INCLUDE "engine/predefs7.asm"
-
-INCLUDE "scripts/CinnabarIsland.asm"
+INCLUDE "engine/overworld/auto_movement.asm"
+INCLUDE "engine/overworld/doors.asm"
+INCLUDE "engine/overworld/ledges.asm"
-INCLUDE "scripts/Route1.asm"
-INCLUDE "data/mapHeaders/OaksLab.asm"
-INCLUDE "scripts/OaksLab.asm"
-INCLUDE "data/mapObjects/OaksLab.asm"
+SECTION "Pokémon Names", ROMX
-INCLUDE "data/mapHeaders/ViridianMart.asm"
-INCLUDE "scripts/ViridianMart.asm"
-INCLUDE "data/mapObjects/ViridianMart.asm"
-ViridianMart_Blocks: INCBIN "maps/ViridianMart.blk"
+INCLUDE "engine/movie/oak_speech/clear_save.asm"
+INCLUDE "engine/events/elevator.asm"
-INCLUDE "data/mapHeaders/ViridianSchoolHouse.asm"
-INCLUDE "scripts/ViridianSchoolHouse.asm"
-INCLUDE "data/mapObjects/ViridianSchoolHouse.asm"
-INCLUDE "data/mapHeaders/ViridianNicknameHouse.asm"
- ds 1
-INCLUDE "scripts/ViridianNicknameHouse.asm"
-INCLUDE "data/mapObjects/ViridianNicknameHouse.asm"
+SECTION "Hidden Objects 1", ROMX
-INCLUDE "data/mapHeaders/PewterNidoranHouse.asm"
-INCLUDE "scripts/PewterNidoranHouse.asm"
-INCLUDE "data/mapObjects/PewterNidoranHouse.asm"
+INCLUDE "engine/menus/oaks_pc.asm"
+INCLUDE "engine/events/hidden_objects/new_bike.asm"
+INCLUDE "engine/events/hidden_objects/oaks_lab_posters.asm"
+INCLUDE "engine/events/hidden_objects/safari_game.asm"
+INCLUDE "engine/events/hidden_objects/cinnabar_gym_quiz.asm"
+INCLUDE "engine/events/hidden_objects/magazines.asm"
+INCLUDE "engine/events/hidden_objects/bills_house_pc.asm"
+INCLUDE "engine/events/hidden_objects/oaks_lab_email.asm"
-INCLUDE "data/mapHeaders/PewterSpeechHouse.asm"
-INCLUDE "scripts/PewterSpeechHouse.asm"
-INCLUDE "data/mapObjects/PewterSpeechHouse.asm"
-INCLUDE "data/mapHeaders/CeruleanTrashedHouse.asm"
-INCLUDE "scripts/CeruleanTrashedHouse.asm"
-INCLUDE "data/mapObjects/CeruleanTrashedHouse.asm"
+SECTION "Bill's PC", ROMX
-INCLUDE "data/mapHeaders/CeruleanTradeHouse.asm"
-INCLUDE "scripts/CeruleanTradeHouse.asm"
-INCLUDE "data/mapObjects/CeruleanTradeHouse.asm"
+INCLUDE "engine/pokemon/bills_pc.asm"
-INCLUDE "data/mapHeaders/BikeShop.asm"
-INCLUDE "scripts/BikeShop.asm"
-INCLUDE "data/mapObjects/BikeShop.asm"
-BikeShop_Blocks: INCBIN "maps/BikeShop.blk"
-INCLUDE "data/mapHeaders/MrFujisHouse.asm"
-INCLUDE "scripts/MrFujisHouse.asm"
-INCLUDE "data/mapObjects/MrFujisHouse.asm"
+SECTION "Battle Engine 3", ROMX
-INCLUDE "data/mapHeaders/LavenderCuboneHouse.asm"
-INCLUDE "scripts/LavenderCuboneHouse.asm"
-INCLUDE "data/mapObjects/LavenderCuboneHouse.asm"
+INCLUDE "engine/battle/print_type.asm"
+INCLUDE "engine/battle/save_trainer_name.asm"
-INCLUDE "data/mapHeaders/NameRatersHouse.asm"
-INCLUDE "scripts/NameRatersHouse.asm"
-INCLUDE "data/mapObjects/NameRatersHouse.asm"
-INCLUDE "data/mapHeaders/VermilionPidgeyHouse.asm"
-INCLUDE "scripts/VermilionPidgeyHouse.asm"
-INCLUDE "data/mapObjects/VermilionPidgeyHouse.asm"
-
-INCLUDE "data/mapHeaders/VermilionDock.asm"
-INCLUDE "scripts/VermilionDock.asm"
-INCLUDE "data/mapObjects/VermilionDock.asm"
-VermilionDock_Blocks: INCBIN "maps/VermilionDock.blk"
-
-INCLUDE "data/mapHeaders/CeladonMansionRoofHouse.asm"
-INCLUDE "scripts/CeladonMansionRoofHouse.asm"
-INCLUDE "data/mapObjects/CeladonMansionRoofHouse.asm"
-
-INCLUDE "data/mapHeaders/FuchsiaMart.asm"
-INCLUDE "scripts/FuchsiaMart.asm"
-INCLUDE "data/mapObjects/FuchsiaMart.asm"
-FuchsiaMart_Blocks: INCBIN "maps/FuchsiaMart.blk"
-
-INCLUDE "data/mapHeaders/SaffronPidgeyHouse.asm"
-INCLUDE "scripts/SaffronPidgeyHouse.asm"
-INCLUDE "data/mapObjects/SaffronPidgeyHouse.asm"
-
-INCLUDE "data/mapHeaders/MrPsychicsHouse.asm"
-INCLUDE "scripts/MrPsychicsHouse.asm"
-INCLUDE "data/mapObjects/MrPsychicsHouse.asm"
-
-INCLUDE "data/mapHeaders/DiglettsCaveRoute2.asm"
-INCLUDE "scripts/DiglettsCaveRoute2.asm"
-INCLUDE "data/mapObjects/DiglettsCaveRoute2.asm"
-
-INCLUDE "data/mapHeaders/Route2TradeHouse.asm"
-INCLUDE "scripts/Route2TradeHouse.asm"
-INCLUDE "data/mapObjects/Route2TradeHouse.asm"
-
-INCLUDE "data/mapHeaders/Route5Gate.asm"
-INCLUDE "scripts/Route5Gate.asm"
-INCLUDE "data/mapObjects/Route5Gate.asm"
-Route5Gate_Blocks: INCBIN "maps/Route5Gate.blk"
-
-INCLUDE "data/mapHeaders/Route6Gate.asm"
-INCLUDE "scripts/Route6Gate.asm"
-INCLUDE "data/mapObjects/Route6Gate.asm"
-Route6Gate_Blocks: INCBIN "maps/Route6Gate.blk"
-
-INCLUDE "data/mapHeaders/Route7Gate.asm"
-INCLUDE "scripts/Route7Gate.asm"
-INCLUDE "data/mapObjects/Route7Gate.asm"
-Route7Gate_Blocks: INCBIN "maps/Route7Gate.blk"
-
-INCLUDE "data/mapHeaders/Route8Gate.asm"
-INCLUDE "scripts/Route8Gate.asm"
-INCLUDE "data/mapObjects/Route8Gate.asm"
-Route8Gate_Blocks: INCBIN "maps/Route8Gate.blk"
-
-INCLUDE "data/mapHeaders/UndergroundPathRoute8.asm"
-INCLUDE "scripts/UndergroundPathRoute8.asm"
-INCLUDE "data/mapObjects/UndergroundPathRoute8.asm"
-
-INCLUDE "data/mapHeaders/PowerPlant.asm"
-INCLUDE "scripts/PowerPlant.asm"
-INCLUDE "data/mapObjects/PowerPlant.asm"
-PowerPlant_Blocks: INCBIN "maps/PowerPlant.blk"
-
-INCLUDE "data/mapHeaders/DiglettsCaveRoute11.asm"
-INCLUDE "scripts/DiglettsCaveRoute11.asm"
-INCLUDE "data/mapObjects/DiglettsCaveRoute11.asm"
-
-INCLUDE "data/mapHeaders/Route16FlyHouse.asm"
-INCLUDE "scripts/Route16FlyHouse.asm"
-INCLUDE "data/mapObjects/Route16FlyHouse.asm"
-
-INCLUDE "data/mapHeaders/Route22Gate.asm"
-INCLUDE "scripts/Route22Gate.asm"
-INCLUDE "data/mapObjects/Route22Gate.asm"
-Route22Gate_Blocks: INCBIN "maps/Route22Gate.blk"
-
-INCLUDE "data/mapHeaders/BillsHouse.asm"
-INCLUDE "scripts/BillsHouse.asm"
-INCLUDE "data/mapObjects/BillsHouse.asm"
-BillsHouse_Blocks: INCBIN "maps/BillsHouse.blk"
-
-INCLUDE "engine/menu/oaks_pc.asm"
-
-INCLUDE "engine/hidden_object_functions7.asm"
-
-
-SECTION "Pics 1", ROMX ; BANK $09
-
-RhydonPicFront:: INCBIN "pic/ymon/rhydon.pic"
-RhydonPicBack:: INCBIN "pic/monback/rhydonb.pic"
-KangaskhanPicFront:: INCBIN "pic/ymon/kangaskhan.pic"
-KangaskhanPicBack:: INCBIN "pic/monback/kangaskhanb.pic"
-NidoranMPicFront:: INCBIN "pic/ymon/nidoranm.pic"
-NidoranMPicBack:: INCBIN "pic/monback/nidoranmb.pic"
-ClefairyPicFront:: INCBIN "pic/ymon/clefairy.pic"
-ClefairyPicBack:: INCBIN "pic/monback/clefairyb.pic"
-SpearowPicFront:: INCBIN "pic/ymon/spearow.pic"
-SpearowPicBack:: INCBIN "pic/monback/spearowb.pic"
-VoltorbPicFront:: INCBIN "pic/ymon/voltorb.pic"
-VoltorbPicBack:: INCBIN "pic/monback/voltorbb.pic"
-NidokingPicFront:: INCBIN "pic/ymon/nidoking.pic"
-NidokingPicBack:: INCBIN "pic/monback/nidokingb.pic"
-SlowbroPicFront:: INCBIN "pic/ymon/slowbro.pic"
-SlowbroPicBack:: INCBIN "pic/monback/slowbrob.pic"
-IvysaurPicFront:: INCBIN "pic/ymon/ivysaur.pic"
-IvysaurPicBack:: INCBIN "pic/monback/ivysaurb.pic"
-ExeggutorPicFront:: INCBIN "pic/ymon/exeggutor.pic"
-ExeggutorPicBack:: INCBIN "pic/monback/exeggutorb.pic"
-LickitungPicFront:: INCBIN "pic/ymon/lickitung.pic"
-LickitungPicBack:: INCBIN "pic/monback/lickitungb.pic"
-ExeggcutePicFront:: INCBIN "pic/ymon/exeggcute.pic"
-ExeggcutePicBack:: INCBIN "pic/monback/exeggcuteb.pic"
-GrimerPicFront:: INCBIN "pic/ymon/grimer.pic"
-GrimerPicBack:: INCBIN "pic/monback/grimerb.pic"
-GengarPicFront:: INCBIN "pic/ymon/gengar.pic"
-GengarPicBack:: INCBIN "pic/monback/gengarb.pic"
-NidoranFPicFront:: INCBIN "pic/ymon/nidoranf.pic"
-NidoranFPicBack:: INCBIN "pic/monback/nidoranfb.pic"
-NidoqueenPicFront:: INCBIN "pic/ymon/nidoqueen.pic"
-NidoqueenPicBack:: INCBIN "pic/monback/nidoqueenb.pic"
-CubonePicFront:: INCBIN "pic/ymon/cubone.pic"
-CubonePicBack:: INCBIN "pic/monback/cuboneb.pic"
-RhyhornPicFront:: INCBIN "pic/ymon/rhyhorn.pic"
-RhyhornPicBack:: INCBIN "pic/monback/rhyhornb.pic"
-LaprasPicFront:: INCBIN "pic/ymon/lapras.pic"
-LaprasPicBack:: INCBIN "pic/monback/laprasb.pic"
-ArcaninePicFront:: INCBIN "pic/ymon/arcanine.pic"
-ArcaninePicBack:: INCBIN "pic/monback/arcanineb.pic"
-MewPicFront:: INCBIN "pic/ymon/mew.pic"
-MewPicBack:: INCBIN "pic/monback/mewb.pic"
-GyaradosPicFront:: INCBIN "pic/ymon/gyarados.pic"
-GyaradosPicBack:: INCBIN "pic/monback/gyaradosb.pic"
-ShellderPicFront:: INCBIN "pic/ymon/shellder.pic"
-ShellderPicBack:: INCBIN "pic/monback/shellderb.pic"
-TentacoolPicFront:: INCBIN "pic/ymon/tentacool.pic"
-TentacoolPicBack:: INCBIN "pic/monback/tentacoolb.pic"
-GastlyPicFront:: INCBIN "pic/ymon/gastly.pic"
-GastlyPicBack:: INCBIN "pic/monback/gastlyb.pic"
-ScytherPicFront:: INCBIN "pic/ymon/scyther.pic"
-ScytherPicBack:: INCBIN "pic/monback/scytherb.pic"
-StaryuPicFront:: INCBIN "pic/ymon/staryu.pic"
-StaryuPicBack:: INCBIN "pic/monback/staryub.pic"
-BlastoisePicFront:: INCBIN "pic/ymon/blastoise.pic"
-BlastoisePicBack:: INCBIN "pic/monback/blastoiseb.pic"
-PinsirPicFront:: INCBIN "pic/ymon/pinsir.pic"
-PinsirPicBack:: INCBIN "pic/monback/pinsirb.pic"
-TangelaPicFront:: INCBIN "pic/ymon/tangela.pic"
-TangelaPicBack:: INCBIN "pic/monback/tangelab.pic"
+SECTION "Battle Engine 4", ROMX
-INCLUDE "engine/battle/print_type.asm"
-INCLUDE "engine/battle/save_trainer_name.asm"
+INCLUDE "engine/gfx/screen_effects.asm"
+INCLUDE "engine/battle/move_effects/leech_seed.asm"
-SECTION "Pics 2", ROMX ; BANK $0A
-
-GrowlithePicFront:: INCBIN "pic/ymon/growlithe.pic"
-GrowlithePicBack:: INCBIN "pic/monback/growlitheb.pic"
-OnixPicFront:: INCBIN "pic/ymon/onix.pic"
-OnixPicBack:: INCBIN "pic/monback/onixb.pic"
-FearowPicFront:: INCBIN "pic/ymon/fearow.pic"
-FearowPicBack:: INCBIN "pic/monback/fearowb.pic"
-PidgeyPicFront:: INCBIN "pic/ymon/pidgey.pic"
-PidgeyPicBack:: INCBIN "pic/monback/pidgeyb.pic"
-SlowpokePicFront:: INCBIN "pic/ymon/slowpoke.pic"
-SlowpokePicBack:: INCBIN "pic/monback/slowpokeb.pic"
-KadabraPicFront:: INCBIN "pic/ymon/kadabra.pic"
-KadabraPicBack:: INCBIN "pic/monback/kadabrab.pic"
-GravelerPicFront:: INCBIN "pic/ymon/graveler.pic"
-GravelerPicBack:: INCBIN "pic/monback/gravelerb.pic"
-ChanseyPicFront:: INCBIN "pic/ymon/chansey.pic"
-ChanseyPicBack:: INCBIN "pic/monback/chanseyb.pic"
-MachokePicFront:: INCBIN "pic/ymon/machoke.pic"
-MachokePicBack:: INCBIN "pic/monback/machokeb.pic"
-MrMimePicFront:: INCBIN "pic/ymon/mr.mime.pic"
-MrMimePicBack:: INCBIN "pic/monback/mr.mimeb.pic"
-HitmonleePicFront:: INCBIN "pic/ymon/hitmonlee.pic"
-HitmonleePicBack:: INCBIN "pic/monback/hitmonleeb.pic"
-HitmonchanPicFront:: INCBIN "pic/ymon/hitmonchan.pic"
-HitmonchanPicBack:: INCBIN "pic/monback/hitmonchanb.pic"
-ArbokPicFront:: INCBIN "pic/ymon/arbok.pic"
-ArbokPicBack:: INCBIN "pic/monback/arbokb.pic"
-ParasectPicFront:: INCBIN "pic/ymon/parasect.pic"
-ParasectPicBack:: INCBIN "pic/monback/parasectb.pic"
-PsyduckPicFront:: INCBIN "pic/ymon/psyduck.pic"
-PsyduckPicBack:: INCBIN "pic/monback/psyduckb.pic"
-DrowzeePicFront:: INCBIN "pic/ymon/drowzee.pic"
-DrowzeePicBack:: INCBIN "pic/monback/drowzeeb.pic"
-GolemPicFront:: INCBIN "pic/ymon/golem.pic"
-GolemPicBack:: INCBIN "pic/monback/golemb.pic"
-MagmarPicFront:: INCBIN "pic/ymon/magmar.pic"
-MagmarPicBack:: INCBIN "pic/monback/magmarb.pic"
-ElectabuzzPicFront:: INCBIN "pic/ymon/electabuzz.pic"
-ElectabuzzPicBack:: INCBIN "pic/monback/electabuzzb.pic"
-MagnetonPicFront:: INCBIN "pic/ymon/magneton.pic"
-MagnetonPicBack:: INCBIN "pic/monback/magnetonb.pic"
-KoffingPicFront:: INCBIN "pic/ymon/koffing.pic"
-KoffingPicBack:: INCBIN "pic/monback/koffingb.pic"
-MankeyPicFront:: INCBIN "pic/ymon/mankey.pic"
-MankeyPicBack:: INCBIN "pic/monback/mankeyb.pic"
-SeelPicFront:: INCBIN "pic/ymon/seel.pic"
-SeelPicBack:: INCBIN "pic/monback/seelb.pic"
-DiglettPicFront:: INCBIN "pic/ymon/diglett.pic"
-DiglettPicBack:: INCBIN "pic/monback/diglettb.pic"
-TaurosPicFront:: INCBIN "pic/ymon/tauros.pic"
-TaurosPicBack:: INCBIN "pic/monback/taurosb.pic"
-FarfetchdPicFront:: INCBIN "pic/ymon/farfetchd.pic"
-FarfetchdPicBack:: INCBIN "pic/monback/farfetchdb.pic"
-VenonatPicFront:: INCBIN "pic/ymon/venonat.pic"
-VenonatPicBack:: INCBIN "pic/monback/venonatb.pic"
-DragonitePicFront:: INCBIN "pic/ymon/dragonite.pic"
-DragonitePicBack:: INCBIN "pic/monback/dragoniteb.pic"
-DoduoPicFront:: INCBIN "pic/ymon/doduo.pic"
-DoduoPicBack:: INCBIN "pic/monback/doduob.pic"
-PoliwagPicFront:: INCBIN "pic/ymon/poliwag.pic"
-PoliwagPicBack:: INCBIN "pic/monback/poliwagb.pic"
-JynxPicFront:: INCBIN "pic/ymon/jynx.pic"
-JynxPicBack:: INCBIN "pic/monback/jynxb.pic"
-MoltresPicFront:: INCBIN "pic/ymon/moltres.pic"
-MoltresPicBack:: INCBIN "pic/monback/moltresb.pic"
-
-INCLUDE "engine/predefsA.asm"
-INCLUDE "engine/battle/moveEffects/leech_seed_effect.asm"
-
-
-SECTION "Pics 3", ROMX ; BANK $0B
-
-ArticunoPicFront:: INCBIN "pic/ymon/articuno.pic"
-ArticunoPicBack:: INCBIN "pic/monback/articunob.pic"
-ZapdosPicFront:: INCBIN "pic/ymon/zapdos.pic"
-ZapdosPicBack:: INCBIN "pic/monback/zapdosb.pic"
-DittoPicFront:: INCBIN "pic/ymon/ditto.pic"
-DittoPicBack:: INCBIN "pic/monback/dittob.pic"
-MeowthPicFront:: INCBIN "pic/ymon/meowth.pic"
-MeowthPicBack:: INCBIN "pic/monback/meowthb.pic"
-KrabbyPicFront:: INCBIN "pic/ymon/krabby.pic"
-KrabbyPicBack:: INCBIN "pic/monback/krabbyb.pic"
-VulpixPicFront:: INCBIN "pic/ymon/vulpix.pic"
-VulpixPicBack:: INCBIN "pic/monback/vulpixb.pic"
-NinetalesPicFront:: INCBIN "pic/ymon/ninetales.pic"
-NinetalesPicBack:: INCBIN "pic/monback/ninetalesb.pic"
-PikachuPicFront:: INCBIN "pic/ymon/pikachu.pic"
-PikachuPicBack:: INCBIN "pic/monback/pikachub.pic"
-RaichuPicFront:: INCBIN "pic/ymon/raichu.pic"
-RaichuPicBack:: INCBIN "pic/monback/raichub.pic"
-DratiniPicFront:: INCBIN "pic/ymon/dratini.pic"
-DratiniPicBack:: INCBIN "pic/monback/dratinib.pic"
-DragonairPicFront:: INCBIN "pic/ymon/dragonair.pic"
-DragonairPicBack:: INCBIN "pic/monback/dragonairb.pic"
-KabutoPicFront:: INCBIN "pic/ymon/kabuto.pic"
-KabutoPicBack:: INCBIN "pic/monback/kabutob.pic"
-KabutopsPicFront:: INCBIN "pic/ymon/kabutops.pic"
-KabutopsPicBack:: INCBIN "pic/monback/kabutopsb.pic"
-HorseaPicFront:: INCBIN "pic/ymon/horsea.pic"
-HorseaPicBack:: INCBIN "pic/monback/horseab.pic"
-SeadraPicFront:: INCBIN "pic/ymon/seadra.pic"
-SeadraPicBack:: INCBIN "pic/monback/seadrab.pic"
-SandshrewPicFront:: INCBIN "pic/ymon/sandshrew.pic"
-SandshrewPicBack:: INCBIN "pic/monback/sandshrewb.pic"
-SandslashPicFront:: INCBIN "pic/ymon/sandslash.pic"
-SandslashPicBack:: INCBIN "pic/monback/sandslashb.pic"
-OmanytePicFront:: INCBIN "pic/ymon/omanyte.pic"
-OmanytePicBack:: INCBIN "pic/monback/omanyteb.pic"
-OmastarPicFront:: INCBIN "pic/ymon/omastar.pic"
-OmastarPicBack:: INCBIN "pic/monback/omastarb.pic"
-JigglypuffPicFront:: INCBIN "pic/ymon/jigglypuff.pic"
-JigglypuffPicBack:: INCBIN "pic/monback/jigglypuffb.pic"
-WigglytuffPicFront:: INCBIN "pic/ymon/wigglytuff.pic"
-WigglytuffPicBack:: INCBIN "pic/monback/wigglytuffb.pic"
-EeveePicFront:: INCBIN "pic/ymon/eevee.pic"
-EeveePicBack:: INCBIN "pic/monback/eeveeb.pic"
-FlareonPicFront:: INCBIN "pic/ymon/flareon.pic"
-FlareonPicBack:: INCBIN "pic/monback/flareonb.pic"
-JolteonPicFront:: INCBIN "pic/ymon/jolteon.pic"
-JolteonPicBack:: INCBIN "pic/monback/jolteonb.pic"
-VaporeonPicFront:: INCBIN "pic/ymon/vaporeon.pic"
-VaporeonPicBack:: INCBIN "pic/monback/vaporeonb.pic"
-MachopPicFront:: INCBIN "pic/ymon/machop.pic"
-MachopPicBack:: INCBIN "pic/monback/machopb.pic"
-ZubatPicFront:: INCBIN "pic/ymon/zubat.pic"
-ZubatPicBack:: INCBIN "pic/monback/zubatb.pic"
-EkansPicFront:: INCBIN "pic/ymon/ekans.pic"
-EkansPicBack:: INCBIN "pic/monback/ekansb.pic"
-ParasPicFront:: INCBIN "pic/ymon/paras.pic"
-ParasPicBack:: INCBIN "pic/monback/parasb.pic"
-PoliwhirlPicFront:: INCBIN "pic/ymon/poliwhirl.pic"
-PoliwhirlPicBack:: INCBIN "pic/monback/poliwhirlb.pic"
-PoliwrathPicFront:: INCBIN "pic/ymon/poliwrath.pic"
-PoliwrathPicBack:: INCBIN "pic/monback/poliwrathb.pic"
-WeedlePicFront:: INCBIN "pic/ymon/weedle.pic"
-WeedlePicBack:: INCBIN "pic/monback/weedleb.pic"
-KakunaPicFront:: INCBIN "pic/ymon/kakuna.pic"
-KakunaPicBack:: INCBIN "pic/monback/kakunab.pic"
-BeedrillPicFront:: INCBIN "pic/ymon/beedrill.pic"
-BeedrillPicBack:: INCBIN "pic/monback/beedrillb.pic"
-
-FossilKabutopsPic:: INCBIN "pic/ymon/fossilkabutops.pic"
+SECTION "Battle Engine 5", ROMX
INCLUDE "engine/battle/display_effectiveness.asm"
INCLUDE "engine/items/tmhm.asm"
Func_2fd6a:
- callab IsThisPartymonStarterPikachu_Party
+ callfar IsThisPartymonStarterPikachu_Party
ret nc
ld a, $3
ld [wPikachuSpawnState], a
ret
INCLUDE "engine/battle/scale_sprites.asm"
-INCLUDE "engine/game_corner_slots2.asm"
-
-
-SECTION "Pics 4", ROMX ; BANK $0C
-
-DodrioPicFront:: INCBIN "pic/ymon/dodrio.pic"
-DodrioPicBack:: INCBIN "pic/monback/dodriob.pic"
-PrimeapePicFront:: INCBIN "pic/ymon/primeape.pic"
-PrimeapePicBack:: INCBIN "pic/monback/primeapeb.pic"
-DugtrioPicFront:: INCBIN "pic/ymon/dugtrio.pic"
-DugtrioPicBack:: INCBIN "pic/monback/dugtriob.pic"
-VenomothPicFront:: INCBIN "pic/ymon/venomoth.pic"
-VenomothPicBack:: INCBIN "pic/monback/venomothb.pic"
-DewgongPicFront:: INCBIN "pic/ymon/dewgong.pic"
-DewgongPicBack:: INCBIN "pic/monback/dewgongb.pic"
-CaterpiePicFront:: INCBIN "pic/ymon/caterpie.pic"
-CaterpiePicBack:: INCBIN "pic/monback/caterpieb.pic"
-MetapodPicFront:: INCBIN "pic/ymon/metapod.pic"
-MetapodPicBack:: INCBIN "pic/monback/metapodb.pic"
-ButterfreePicFront:: INCBIN "pic/ymon/butterfree.pic"
-ButterfreePicBack:: INCBIN "pic/monback/butterfreeb.pic"
-MachampPicFront:: INCBIN "pic/ymon/machamp.pic"
-MachampPicBack:: INCBIN "pic/monback/machampb.pic"
-GolduckPicFront:: INCBIN "pic/ymon/golduck.pic"
-GolduckPicBack:: INCBIN "pic/monback/golduckb.pic"
-HypnoPicFront:: INCBIN "pic/ymon/hypno.pic"
-HypnoPicBack:: INCBIN "pic/monback/hypnob.pic"
-GolbatPicFront:: INCBIN "pic/ymon/golbat.pic"
-GolbatPicBack:: INCBIN "pic/monback/golbatb.pic"
-MewtwoPicFront:: INCBIN "pic/ymon/mewtwo.pic"
-MewtwoPicBack:: INCBIN "pic/monback/mewtwob.pic"
-SnorlaxPicFront:: INCBIN "pic/ymon/snorlax.pic"
-SnorlaxPicBack:: INCBIN "pic/monback/snorlaxb.pic"
-MagikarpPicFront:: INCBIN "pic/ymon/magikarp.pic"
-MagikarpPicBack:: INCBIN "pic/monback/magikarpb.pic"
-MukPicFront:: INCBIN "pic/ymon/muk.pic"
-MukPicBack:: INCBIN "pic/monback/mukb.pic"
-KinglerPicFront:: INCBIN "pic/ymon/kingler.pic"
-KinglerPicBack:: INCBIN "pic/monback/kinglerb.pic"
-CloysterPicFront:: INCBIN "pic/ymon/cloyster.pic"
-CloysterPicBack:: INCBIN "pic/monback/cloysterb.pic"
-ElectrodePicFront:: INCBIN "pic/ymon/electrode.pic"
-ElectrodePicBack:: INCBIN "pic/monback/electrodeb.pic"
-ClefablePicFront:: INCBIN "pic/ymon/clefable.pic"
-ClefablePicBack:: INCBIN "pic/monback/clefableb.pic"
-WeezingPicFront:: INCBIN "pic/ymon/weezing.pic"
-WeezingPicBack:: INCBIN "pic/monback/weezingb.pic"
-PersianPicFront:: INCBIN "pic/ymon/persian.pic"
-PersianPicBack:: INCBIN "pic/monback/persianb.pic"
-MarowakPicFront:: INCBIN "pic/ymon/marowak.pic"
-MarowakPicBack:: INCBIN "pic/monback/marowakb.pic"
-HaunterPicFront:: INCBIN "pic/ymon/haunter.pic"
-HaunterPicBack:: INCBIN "pic/monback/haunterb.pic"
-AbraPicFront:: INCBIN "pic/ymon/abra.pic"
-AbraPicBack:: INCBIN "pic/monback/abrab.pic"
-AlakazamPicFront:: INCBIN "pic/ymon/alakazam.pic"
-AlakazamPicBack:: INCBIN "pic/monback/alakazamb.pic"
-PidgeottoPicFront:: INCBIN "pic/ymon/pidgeotto.pic"
-PidgeottoPicBack:: INCBIN "pic/monback/pidgeottob.pic"
-PidgeotPicFront:: INCBIN "pic/ymon/pidgeot.pic"
-PidgeotPicBack:: INCBIN "pic/monback/pidgeotb.pic"
-StarmiePicFront:: INCBIN "pic/ymon/starmie.pic"
-StarmiePicBack:: INCBIN "pic/monback/starmieb.pic"
-
-
-SECTION "Pics 5", ROMX ; BANK $0D
-
-BulbasaurPicFront:: INCBIN "pic/ymon/bulbasaur.pic"
-BulbasaurPicBack:: INCBIN "pic/monback/bulbasaurb.pic"
-VenusaurPicFront:: INCBIN "pic/ymon/venusaur.pic"
-VenusaurPicBack:: INCBIN "pic/monback/venusaurb.pic"
-TentacruelPicFront:: INCBIN "pic/ymon/tentacruel.pic"
-TentacruelPicBack:: INCBIN "pic/monback/tentacruelb.pic"
-GoldeenPicFront:: INCBIN "pic/ymon/goldeen.pic"
-GoldeenPicBack:: INCBIN "pic/monback/goldeenb.pic"
-SeakingPicFront:: INCBIN "pic/ymon/seaking.pic"
-SeakingPicBack:: INCBIN "pic/monback/seakingb.pic"
-PonytaPicFront:: INCBIN "pic/ymon/ponyta.pic"
-RapidashPicFront:: INCBIN "pic/ymon/rapidash.pic"
-PonytaPicBack:: INCBIN "pic/monback/ponytab.pic"
-RapidashPicBack:: INCBIN "pic/monback/rapidashb.pic"
-RattataPicFront:: INCBIN "pic/ymon/rattata.pic"
-RattataPicBack:: INCBIN "pic/monback/rattatab.pic"
-RaticatePicFront:: INCBIN "pic/ymon/raticate.pic"
-RaticatePicBack:: INCBIN "pic/monback/raticateb.pic"
-NidorinoPicFront:: INCBIN "pic/ymon/nidorino.pic"
-NidorinoPicBack:: INCBIN "pic/monback/nidorinob.pic"
-NidorinaPicFront:: INCBIN "pic/ymon/nidorina.pic"
-NidorinaPicBack:: INCBIN "pic/monback/nidorinab.pic"
-GeodudePicFront:: INCBIN "pic/ymon/geodude.pic"
-GeodudePicBack:: INCBIN "pic/monback/geodudeb.pic"
-PorygonPicFront:: INCBIN "pic/ymon/porygon.pic"
-PorygonPicBack:: INCBIN "pic/monback/porygonb.pic"
-AerodactylPicFront:: INCBIN "pic/ymon/aerodactyl.pic"
-AerodactylPicBack:: INCBIN "pic/monback/aerodactylb.pic"
-MagnemitePicFront:: INCBIN "pic/ymon/magnemite.pic"
-MagnemitePicBack:: INCBIN "pic/monback/magnemiteb.pic"
-CharmanderPicFront:: INCBIN "pic/ymon/charmander.pic"
-CharmanderPicBack:: INCBIN "pic/monback/charmanderb.pic"
-SquirtlePicFront:: INCBIN "pic/ymon/squirtle.pic"
-SquirtlePicBack:: INCBIN "pic/monback/squirtleb.pic"
-CharmeleonPicFront:: INCBIN "pic/ymon/charmeleon.pic"
-CharmeleonPicBack:: INCBIN "pic/monback/charmeleonb.pic"
-WartortlePicFront:: INCBIN "pic/ymon/wartortle.pic"
-WartortlePicBack:: INCBIN "pic/monback/wartortleb.pic"
-CharizardPicFront:: INCBIN "pic/ymon/charizard.pic"
-CharizardPicBack:: INCBIN "pic/monback/charizardb.pic"
-FossilAerodactylPic:: INCBIN "pic/ymon/fossilaerodactyl.pic"
-GhostPic:: INCBIN "pic/other/ghost.pic"
-OddishPicFront:: INCBIN "pic/ymon/oddish.pic"
-OddishPicBack:: INCBIN "pic/monback/oddishb.pic"
-GloomPicFront:: INCBIN "pic/ymon/gloom.pic"
-GloomPicBack:: INCBIN "pic/monback/gloomb.pic"
-VileplumePicFront:: INCBIN "pic/ymon/vileplume.pic"
-VileplumePicBack:: INCBIN "pic/monback/vileplumeb.pic"
-BellsproutPicFront:: INCBIN "pic/ymon/bellsprout.pic"
-BellsproutPicBack:: INCBIN "pic/monback/bellsproutb.pic"
-WeepinbellPicFront:: INCBIN "pic/ymon/weepinbell.pic"
-WeepinbellPicBack:: INCBIN "pic/monback/weepinbellb.pic"
-VictreebelPicFront:: INCBIN "pic/ymon/victreebel.pic"
-VictreebelPicBack:: INCBIN "pic/monback/victreebelb.pic"
-
-INCLUDE "engine/titlescreen2.asm"
-INCLUDE "engine/slot_machine.asm"
-INCLUDE "engine/game_corner_slots.asm"
-
-
-SECTION "bankE", ROMX
-
-INCLUDE "data/moves.asm"
-BaseStats: INCLUDE "data/base_stats.asm"
-INCLUDE "data/cries.asm"
-INCLUDE "engine/battle/trainer_ai.asm"
-INCLUDE "engine/battle/draw_hud_pokeball_gfx.asm"
+INCLUDE "engine/slots/game_corner_slots2.asm"
-TradingAnimationGraphics:
-INCBIN "gfx/game_boy.2bpp"
-INCBIN "gfx/link_cable.2bpp"
-TradingAnimationGraphicsEnd:
-; Pokeball traveling through the link cable.
-TradingAnimationGraphics2: INCBIN "gfx/trade2.2bpp"
-TradingAnimationGraphics2End:
+SECTION "Slot Machines", ROMX
-INCLUDE "engine/evos_moves.asm"
+INCLUDE "engine/movie/title2.asm"
+INCLUDE "engine/slots/slot_machine.asm"
+INCLUDE "engine/slots/game_corner_slots.asm"
-SECTION "bankF", ROMX
-
-INCLUDE "engine/battle/core.asm"
+SECTION "Battle Engine 7", ROMX
+INCLUDE "data/moves/moves.asm"
+INCLUDE "data/pokemon/base_stats.asm"
+INCLUDE "data/pokemon/cries.asm"
+INCLUDE "engine/battle/trainer_ai.asm"
+INCLUDE "engine/battle/draw_hud_pokeball_gfx.asm"
+INCLUDE "gfx/trade.asm"
+INCLUDE "engine/pokemon/evos_moves.asm"
-SECTION "bank10", ROMX
-INCLUDE "engine/menu/pokedex.asm"
-INCLUDE "engine/overworld/emotion_bubbles.asm"
-INCLUDE "engine/trade.asm"
-INCLUDE "engine/intro.asm"
-INCLUDE "engine/trade2.asm"
-INCLUDE "engine/menu/options.asm"
-
-
-SECTION "bank11", ROMX
-
-INCLUDE "data/mapHeaders/LavenderTown.asm"
-INCLUDE "data/mapObjects/LavenderTown.asm"
-LavenderTown_Blocks: INCBIN "maps/LavenderTown.blk"
-
-ViridianPokecenter_Blocks: INCBIN "maps/ViridianPokecenter.blk"
-
-SafariZoneCenterRestHouse_Blocks:
-SafariZoneWestRestHouse_Blocks:
-SafariZoneEastRestHouse_Blocks:
-SafariZoneNorthRestHouse_Blocks: INCBIN "maps/SafariZoneCenterRestHouse.blk"
-
-INCLUDE "scripts/LavenderTown.asm"
-
-INCLUDE "engine/pokedex_rating.asm"
-
-INCLUDE "data/mapHeaders/ViridianPokecenter.asm"
-INCLUDE "scripts/ViridianPokecenter.asm"
-INCLUDE "data/mapObjects/ViridianPokecenter.asm"
-
-INCLUDE "data/mapHeaders/CeladonMart1F.asm"
-INCLUDE "scripts/CeladonMart1F.asm"
-INCLUDE "data/mapObjects/CeladonMart1F.asm"
-CeladonMart1F_Blocks: INCBIN "maps/CeladonMart1F.blk"
-
-INCLUDE "data/mapHeaders/PokemonMansion1F.asm"
-INCLUDE "scripts/PokemonMansion1F.asm"
-INCLUDE "data/mapObjects/PokemonMansion1F.asm"
-PokemonMansion1F_Blocks: INCBIN "maps/PokemonMansion1F.blk"
-
-INCLUDE "data/mapHeaders/RockTunnel1F.asm"
-INCLUDE "scripts/RockTunnel1F.asm"
-INCLUDE "data/mapObjects/RockTunnel1F.asm"
-RockTunnel1F_Blocks: INCBIN "maps/RockTunnel1F.blk"
-
-INCLUDE "data/mapHeaders/SeafoamIslands1F.asm"
-INCLUDE "scripts/SeafoamIslands1F.asm"
-INCLUDE "data/mapObjects/SeafoamIslands1F.asm"
-SeafoamIslands1F_Blocks: INCBIN "maps/SeafoamIslands1F.blk"
-
-INCLUDE "data/mapHeaders/SSAnne3F.asm"
-INCLUDE "scripts/SSAnne3F.asm"
-INCLUDE "data/mapObjects/SSAnne3F.asm"
-SSAnne3F_Blocks: INCBIN "maps/SSAnne3F.blk"
-
-INCLUDE "data/mapHeaders/VictoryRoad3F.asm"
-INCLUDE "scripts/VictoryRoad3F.asm"
-INCLUDE "data/mapObjects/VictoryRoad3F.asm"
-VictoryRoad3F_Blocks: INCBIN "maps/VictoryRoad3F.blk"
-
-INCLUDE "data/mapHeaders/RocketHideoutB1F.asm"
-INCLUDE "scripts/RocketHideoutB1F.asm"
-INCLUDE "data/mapObjects/RocketHideoutB1F.asm"
-RocketHideoutB1F_Blocks: INCBIN "maps/RocketHideoutB1F.blk"
-
-INCLUDE "data/mapHeaders/RocketHideoutB2F.asm"
-INCLUDE "scripts/RocketHideoutB2F.asm"
-INCLUDE "data/mapObjects/RocketHideoutB2F.asm"
-RocketHideoutB2F_Blocks: INCBIN "maps/RocketHideoutB2F.blk"
-
-INCLUDE "data/mapHeaders/RocketHideoutB3F.asm"
-INCLUDE "scripts/RocketHideoutB3F.asm"
-INCLUDE "data/mapObjects/RocketHideoutB3F.asm"
-RocketHideoutB3F_Blocks: INCBIN "maps/RocketHideoutB3F.blk"
-
-INCLUDE "data/mapHeaders/RocketHideoutB4F.asm"
-INCLUDE "scripts/RocketHideoutB4F.asm"
-INCLUDE "data/mapObjects/RocketHideoutB4F.asm"
-RocketHideoutB4F_Blocks: INCBIN "maps/RocketHideoutB4F.blk"
-
-INCLUDE "data/mapHeaders/RocketHideoutElevator.asm"
-INCLUDE "scripts/RocketHideoutElevator.asm"
-INCLUDE "data/mapObjects/RocketHideoutElevator.asm"
-RocketHideoutElevator_Blocks: INCBIN "maps/RocketHideoutElevator.blk"
-
-INCLUDE "data/mapHeaders/SilphCoElevator.asm"
-INCLUDE "scripts/SilphCoElevator.asm"
-INCLUDE "data/mapObjects/SilphCoElevator.asm"
-SilphCoElevator_Blocks: INCBIN "maps/SilphCoElevator.blk"
-
-INCLUDE "data/mapHeaders/SafariZoneEast.asm"
-INCLUDE "scripts/SafariZoneEast.asm"
-INCLUDE "data/mapObjects/SafariZoneEast.asm"
-SafariZoneEast_Blocks: INCBIN "maps/SafariZoneEast.blk"
-
-INCLUDE "data/mapHeaders/SafariZoneNorth.asm"
-INCLUDE "scripts/SafariZoneNorth.asm"
-INCLUDE "data/mapObjects/SafariZoneNorth.asm"
-SafariZoneNorth_Blocks: INCBIN "maps/SafariZoneNorth.blk"
-
-INCLUDE "data/mapHeaders/SafariZoneCenter.asm"
-INCLUDE "scripts/SafariZoneCenter.asm"
-INCLUDE "data/mapObjects/SafariZoneCenter.asm"
-SafariZoneCenter_Blocks: INCBIN "maps/SafariZoneCenter.blk"
-
-INCLUDE "data/mapHeaders/SafariZoneCenterRestHouse.asm"
-INCLUDE "scripts/SafariZoneCenterRestHouse.asm"
-INCLUDE "data/mapObjects/SafariZoneCenterRestHouse.asm"
-
-INCLUDE "data/mapHeaders/SafariZoneWestRestHouse.asm"
-INCLUDE "scripts/SafariZoneWestRestHouse.asm"
-INCLUDE "data/mapObjects/SafariZoneWestRestHouse.asm"
-
-INCLUDE "data/mapHeaders/SafariZoneEastRestHouse.asm"
-INCLUDE "scripts/SafariZoneEastRestHouse.asm"
-INCLUDE "data/mapObjects/SafariZoneEastRestHouse.asm"
-
-INCLUDE "data/mapHeaders/SafariZoneNorthRestHouse.asm"
-INCLUDE "scripts/SafariZoneNorthRestHouse.asm"
-INCLUDE "data/mapObjects/SafariZoneNorthRestHouse.asm"
-
-INCLUDE "data/mapHeaders/CeruleanCave2F.asm"
-INCLUDE "scripts/CeruleanCave2F.asm"
-INCLUDE "data/mapObjects/CeruleanCave2F.asm"
-CeruleanCave2F_Blocks: INCBIN "maps/CeruleanCave2F.blk"
-
-INCLUDE "data/mapHeaders/CeruleanCaveB1F.asm"
-INCLUDE "scripts/CeruleanCaveB1F.asm"
-INCLUDE "data/mapObjects/CeruleanCaveB1F.asm"
-CeruleanCaveB1F_Blocks: INCBIN "maps/CeruleanCaveB1F.blk"
-
-INCLUDE "data/mapHeaders/RockTunnelB1F.asm"
-INCLUDE "scripts/RockTunnelB1F.asm"
-INCLUDE "data/mapObjects/RockTunnelB1F.asm"
-RockTunnelB1F_Blocks: INCBIN "maps/RockTunnelB1F.blk"
-
-INCLUDE "data/mapHeaders/SeafoamIslandsB1F.asm"
-INCLUDE "scripts/SeafoamIslandsB1F.asm"
-INCLUDE "data/mapObjects/SeafoamIslandsB1F.asm"
-SeafoamIslandsB1F_Blocks: INCBIN "maps/SeafoamIslandsB1F.blk"
-
-INCLUDE "data/mapHeaders/SeafoamIslandsB2F.asm"
-INCLUDE "scripts/SeafoamIslandsB2F.asm"
-INCLUDE "data/mapObjects/SeafoamIslandsB2F.asm"
-SeafoamIslandsB2F_Blocks: INCBIN "maps/SeafoamIslandsB2F.blk"
-
-INCLUDE "data/mapHeaders/SeafoamIslandsB3F.asm"
-INCLUDE "scripts/SeafoamIslandsB3F.asm"
-INCLUDE "data/mapObjects/SeafoamIslandsB3F.asm"
-SeafoamIslandsB3F_Blocks: INCBIN "maps/SeafoamIslandsB3F.blk"
-
-INCLUDE "data/mapHeaders/SeafoamIslandsB4F.asm"
-INCLUDE "scripts/SeafoamIslandsB4F.asm"
-INCLUDE "data/mapObjects/SeafoamIslandsB4F.asm"
-SeafoamIslandsB4F_Blocks: INCBIN "maps/SeafoamIslandsB4F.blk"
+SECTION "Battle Core", ROMX
-INCLUDE "engine/overworld/dungeon_warps.asm"
+INCLUDE "engine/battle/core.asm"
+INCLUDE "engine/battle/effects.asm"
-SECTION "bank12", ROMX
-
-INCLUDE "data/mapHeaders/Route7.asm"
-INCLUDE "data/mapObjects/Route7.asm"
-Route7_Blocks: INCBIN "maps/Route7.blk"
-
-CeladonPokecenter_Blocks:
-RockTunnelPokecenter_Blocks:
-MtMoonPokecenter_Blocks: INCBIN "maps/MtMoonPokecenter.blk"
-
-Route18Gate1F_Blocks:
-Route15Gate1F_Blocks:
-Route11Gate1F_Blocks: INCBIN "maps/Route11Gate1F.blk"
-
-Route18Gate2F_Blocks:
-Route16Gate2F_Blocks:
-Route15Gate2F_Blocks:
-Route12Gate2F_Blocks:
-Route11Gate2F_Blocks: INCBIN "maps/Route11Gate2F.blk"
-
-INCLUDE "scripts/Route7.asm"
-
-INCLUDE "data/mapHeaders/RedsHouse1F.asm"
-INCLUDE "scripts/RedsHouse1F.asm"
-INCLUDE "data/mapObjects/RedsHouse1F.asm"
-RedsHouse1F_Blocks: INCBIN "maps/RedsHouse1F.blk"
-
-INCLUDE "data/mapHeaders/CeladonMart3F.asm"
-INCLUDE "scripts/CeladonMart3F.asm"
-INCLUDE "data/mapObjects/CeladonMart3F.asm"
-CeladonMart3F_Blocks: INCBIN "maps/CeladonMart3F.blk"
-
-INCLUDE "data/mapHeaders/CeladonMart4F.asm"
-INCLUDE "scripts/CeladonMart4F.asm"
-INCLUDE "data/mapObjects/CeladonMart4F.asm"
-CeladonMart4F_Blocks: INCBIN "maps/CeladonMart4F.blk"
-
-INCLUDE "data/mapHeaders/CeladonMartRoof.asm"
-INCLUDE "scripts/CeladonMartRoof.asm"
-INCLUDE "data/mapObjects/CeladonMartRoof.asm"
-CeladonMartRoof_Blocks: INCBIN "maps/CeladonMartRoof.blk"
-
-INCLUDE "data/mapHeaders/CeladonMartElevator.asm"
-INCLUDE "scripts/CeladonMartElevator.asm"
-INCLUDE "data/mapObjects/CeladonMartElevator.asm"
-CeladonMartElevator_Blocks: INCBIN "maps/CeladonMartElevator.blk"
-
-INCLUDE "data/mapHeaders/CeladonMansion1F.asm"
-INCLUDE "scripts/CeladonMansion1F.asm"
-INCLUDE "data/mapObjects/CeladonMansion1F.asm"
-CeladonMansion1F_Blocks: INCBIN "maps/CeladonMansion1F.blk"
-
-INCLUDE "data/mapHeaders/CeladonMansion2F.asm"
-INCLUDE "scripts/CeladonMansion2F.asm"
-INCLUDE "data/mapObjects/CeladonMansion2F.asm"
-CeladonMansion2F_Blocks: INCBIN "maps/CeladonMansion2F.blk"
-
-INCLUDE "data/mapHeaders/CeladonMansion3F.asm"
-INCLUDE "scripts/CeladonMansion3F.asm"
-INCLUDE "data/mapObjects/CeladonMansion3F.asm"
-CeladonMansion3F_Blocks: INCBIN "maps/CeladonMansion3F.blk"
-
-INCLUDE "data/mapHeaders/CeladonMansionRoof.asm"
-INCLUDE "scripts/CeladonMansionRoof.asm"
-INCLUDE "data/mapObjects/CeladonMansionRoof.asm"
-CeladonMansionRoof_Blocks: INCBIN "maps/CeladonMansionRoof.blk"
-
-INCLUDE "data/mapHeaders/CeladonPokecenter.asm"
-INCLUDE "scripts/CeladonPokecenter.asm"
-INCLUDE "data/mapObjects/CeladonPokecenter.asm"
-
-INCLUDE "data/mapHeaders/CeladonGym.asm"
-INCLUDE "scripts/CeladonGym.asm"
-INCLUDE "data/mapObjects/CeladonGym.asm"
-CeladonGym_Blocks: INCBIN "maps/CeladonGym.blk"
-
-INCLUDE "data/mapHeaders/GameCorner.asm"
-INCLUDE "scripts/GameCorner.asm"
-INCLUDE "data/mapObjects/GameCorner.asm"
-GameCorner_Blocks: INCBIN "maps/GameCorner.blk"
-
-INCLUDE "data/mapHeaders/CeladonMart5F.asm"
-INCLUDE "scripts/CeladonMart5F.asm"
-INCLUDE "data/mapObjects/CeladonMart5F.asm"
-CeladonMart5F_Blocks: INCBIN "maps/CeladonMart5F.blk"
-
-INCLUDE "data/mapHeaders/GameCornerPrizeRoom.asm"
-INCLUDE "scripts/GameCornerPrizeRoom.asm"
-INCLUDE "data/mapObjects/GameCornerPrizeRoom.asm"
-GameCornerPrizeRoom_Blocks: INCBIN "maps/GameCornerPrizeRoom.blk"
-
-INCLUDE "data/mapHeaders/CeladonDiner.asm"
-INCLUDE "scripts/CeladonDiner.asm"
-INCLUDE "data/mapObjects/CeladonDiner.asm"
-CeladonDiner_Blocks: INCBIN "maps/CeladonDiner.blk"
-
-INCLUDE "data/mapHeaders/CeladonChiefHouse.asm"
-INCLUDE "scripts/CeladonChiefHouse.asm"
-INCLUDE "data/mapObjects/CeladonChiefHouse.asm"
-CeladonChiefHouse_Blocks: INCBIN "maps/CeladonChiefHouse.blk"
-
-INCLUDE "data/mapHeaders/CeladonHotel.asm"
-INCLUDE "scripts/CeladonHotel.asm"
-INCLUDE "data/mapObjects/CeladonHotel.asm"
-CeladonHotel_Blocks: INCBIN "maps/CeladonHotel.blk"
-
-INCLUDE "data/mapHeaders/MtMoonPokecenter.asm"
-INCLUDE "scripts/MtMoonPokecenter.asm"
-INCLUDE "data/mapObjects/MtMoonPokecenter.asm"
-
-INCLUDE "data/mapHeaders/RockTunnelPokecenter.asm"
-INCLUDE "scripts/RockTunnelPokecenter.asm"
-INCLUDE "data/mapObjects/RockTunnelPokecenter.asm"
-
-INCLUDE "data/mapHeaders/Route11Gate1F.asm"
-INCLUDE "scripts/Route11Gate1F.asm"
-INCLUDE "data/mapObjects/Route11Gate1F.asm"
-
-INCLUDE "data/mapHeaders/Route11Gate2F.asm"
-INCLUDE "scripts/Route11Gate2F.asm"
-INCLUDE "data/mapObjects/Route11Gate2F.asm"
-
-INCLUDE "data/mapHeaders/Route12Gate1F.asm"
-INCLUDE "scripts/Route12Gate1F.asm"
-INCLUDE "data/mapObjects/Route12Gate1F.asm"
-Route12Gate1F_Blocks: INCBIN "maps/Route12Gate1F.blk"
-
-INCLUDE "data/mapHeaders/Route12Gate2F.asm"
-INCLUDE "scripts/Route12Gate2F.asm"
-INCLUDE "data/mapObjects/Route12Gate2F.asm"
-
-INCLUDE "data/mapHeaders/Route15Gate1F.asm"
-INCLUDE "scripts/Route15Gate1F.asm"
-INCLUDE "data/mapObjects/Route15Gate1F.asm"
-
-INCLUDE "data/mapHeaders/Route15Gate2F.asm"
-INCLUDE "scripts/Route15Gate2F.asm"
-INCLUDE "data/mapObjects/Route15Gate2F.asm"
-
-INCLUDE "data/mapHeaders/Route16Gate1F.asm"
-INCLUDE "scripts/Route16Gate1F.asm"
-INCLUDE "data/mapObjects/Route16Gate1F.asm"
-Route16Gate1F_Blocks: INCBIN "maps/Route16Gate1F.blk"
-
-INCLUDE "data/mapHeaders/Route16Gate2F.asm"
-INCLUDE "scripts/Route16Gate2F.asm"
-INCLUDE "data/mapObjects/Route16Gate2F.asm"
-
-INCLUDE "data/mapHeaders/Route18Gate1F.asm"
-INCLUDE "scripts/Route18Gate1F.asm"
-INCLUDE "data/mapObjects/Route18Gate1F.asm"
-
-INCLUDE "data/mapHeaders/Route18Gate2F.asm"
-INCLUDE "scripts/Route18Gate2F.asm"
-INCLUDE "data/mapObjects/Route18Gate2F.asm"
-
-INCLUDE "data/mapHeaders/MtMoon1F.asm"
-INCLUDE "scripts/MtMoon1F.asm"
-INCLUDE "data/mapObjects/MtMoon1F.asm"
-MtMoon1F_Blocks: INCBIN "maps/MtMoon1F.blk"
-
-INCLUDE "data/mapHeaders/MtMoonB2F.asm"
-INCLUDE "scripts/MtMoonB2F.asm"
-INCLUDE "data/mapObjects/MtMoonB2F.asm"
-MtMoonB2F_Blocks: INCBIN "maps/MtMoonB2F.blk"
-INCLUDE "scripts/MtMoonB2F_2.asm"
-
-INCLUDE "data/mapHeaders/SafariZoneWest.asm"
-INCLUDE "scripts/SafariZoneWest.asm"
-INCLUDE "data/mapObjects/SafariZoneWest.asm"
-SafariZoneWest_Blocks: INCBIN "maps/SafariZoneWest.blk"
-
-INCLUDE "data/mapHeaders/SafariZoneSecretHouse.asm"
-INCLUDE "scripts/SafariZoneSecretHouse.asm"
-INCLUDE "data/mapObjects/SafariZoneSecretHouse.asm"
-SafariZoneSecretHouse_Blocks: INCBIN "maps/SafariZoneSecretHouse.blk"
-
-
-SECTION "bank13", ROMX
-
-TrainerPics::
-YoungsterPic:: INCBIN "pic/trainer/youngster.pic"
-BugCatcherPic:: INCBIN "pic/trainer/bugcatcher.pic"
-LassPic:: INCBIN "pic/trainer/lass.pic"
-SailorPic:: INCBIN "pic/trainer/sailor.pic"
-JrTrainerMPic:: INCBIN "pic/trainer/jr.trainerm.pic"
-JrTrainerFPic:: INCBIN "pic/trainer/jr.trainerf.pic"
-PokemaniacPic:: INCBIN "pic/trainer/pokemaniac.pic"
-SuperNerdPic:: INCBIN "pic/trainer/supernerd.pic"
-HikerPic:: INCBIN "pic/trainer/hiker.pic"
-BikerPic:: INCBIN "pic/trainer/biker.pic"
-BurglarPic:: INCBIN "pic/trainer/burglar.pic"
-EngineerPic:: INCBIN "pic/trainer/engineer.pic"
-FisherPic:: INCBIN "pic/trainer/fisher.pic"
-SwimmerPic:: INCBIN "pic/trainer/swimmer.pic"
-CueBallPic:: INCBIN "pic/trainer/cueball.pic"
-GamblerPic:: INCBIN "pic/trainer/gambler.pic"
-BeautyPic:: INCBIN "pic/trainer/beauty.pic"
-PsychicPic:: INCBIN "pic/trainer/psychic.pic"
-RockerPic:: INCBIN "pic/trainer/rocker.pic"
-JugglerPic:: INCBIN "pic/trainer/juggler.pic"
-TamerPic:: INCBIN "pic/trainer/tamer.pic"
-BirdKeeperPic:: INCBIN "pic/trainer/birdkeeper.pic"
-BlackbeltPic:: INCBIN "pic/trainer/blackbelt.pic"
-Rival1Pic:: INCBIN "pic/ytrainer/rival1.pic"
-ProfOakPic:: INCBIN "pic/trainer/prof.oak.pic"
-ChiefPic::
-ScientistPic:: INCBIN "pic/trainer/scientist.pic"
-GiovanniPic:: INCBIN "pic/trainer/giovanni.pic"
-RocketPic:: INCBIN "pic/trainer/rocket.pic"
-CooltrainerMPic:: INCBIN "pic/trainer/cooltrainerm.pic"
-CooltrainerFPic:: INCBIN "pic/trainer/cooltrainerf.pic"
-BrunoPic:: INCBIN "pic/trainer/bruno.pic"
-BrockPic:: INCBIN "pic/ytrainer/brock.pic"
-MistyPic:: INCBIN "pic/ytrainer/misty.pic"
-LtSurgePic:: INCBIN "pic/trainer/lt.surge.pic"
-ErikaPic:: INCBIN "pic/ytrainer/erika.pic"
-KogaPic:: INCBIN "pic/trainer/koga.pic"
-BlainePic:: INCBIN "pic/trainer/blaine.pic"
-SabrinaPic:: INCBIN "pic/trainer/sabrina.pic"
-GentlemanPic:: INCBIN "pic/trainer/gentleman.pic"
-Rival2Pic:: INCBIN "pic/ytrainer/rival2.pic"
-Rival3Pic:: INCBIN "pic/ytrainer/rival3.pic"
-LoreleiPic:: INCBIN "pic/trainer/lorelei.pic"
-ChannelerPic:: INCBIN "pic/trainer/channeler.pic"
-AgathaPic:: INCBIN "pic/trainer/agatha.pic"
-LancePic:: INCBIN "pic/trainer/lance.pic"
-JessieJamesPic:: INCBIN "pic/ytrainer/jessiejames.pic"
-
-INCLUDE "data/mapHeaders/TradeCenter.asm"
-INCLUDE "scripts/TradeCenter.asm"
-INCLUDE "data/mapObjects/TradeCenter.asm"
-TradeCenter_Blocks: INCBIN "maps/TradeCenter.blk"
-
-INCLUDE "data/mapHeaders/Colosseum.asm"
-INCLUDE "scripts/Colosseum.asm"
-INCLUDE "data/mapObjects/Colosseum.asm"
-Colosseum_Blocks: INCBIN "maps/Colosseum.blk"
-
-
-SECTION "bank14", ROMX
-
-INCLUDE "data/mapHeaders/Route22.asm"
-INCLUDE "data/mapObjects/Route22.asm"
-Route22_Blocks: INCBIN "maps/Route22.blk"
-
-INCLUDE "data/mapHeaders/Route20.asm"
-INCLUDE "data/mapObjects/Route20.asm"
-Route20_Blocks: INCBIN "maps/Route20.blk"
-
-INCLUDE "data/mapHeaders/Route23.asm"
-INCLUDE "data/mapObjects/Route23.asm"
-Route23_Blocks: INCBIN "maps/Route23.blk"
-
-INCLUDE "data/mapHeaders/Route24.asm"
-INCLUDE "data/mapObjects/Route24.asm"
-Route24_Blocks: INCBIN "maps/Route24.blk"
-
-INCLUDE "data/mapHeaders/Route25.asm"
-INCLUDE "data/mapObjects/Route25.asm"
-Route25_Blocks: INCBIN "maps/Route25.blk"
-
-INCLUDE "data/mapHeaders/IndigoPlateau.asm"
-INCLUDE "scripts/IndigoPlateau.asm"
-INCLUDE "data/mapObjects/IndigoPlateau.asm"
-IndigoPlateau_Blocks: INCBIN "maps/IndigoPlateau.blk"
-
-INCLUDE "data/mapHeaders/SaffronCity.asm"
-INCLUDE "data/mapObjects/SaffronCity.asm"
-SaffronCity_Blocks: INCBIN "maps/SaffronCity.blk"
-INCLUDE "scripts/SaffronCity.asm"
-
-INCLUDE "scripts/Route20.asm"
-INCLUDE "scripts/Route22.asm"
-INCLUDE "scripts/Route23.asm"
-INCLUDE "scripts/Route24.asm"
-INCLUDE "scripts/Route25.asm"
-
-INCLUDE "data/mapHeaders/VictoryRoad2F.asm"
-INCLUDE "scripts/VictoryRoad2F.asm"
-INCLUDE "data/mapObjects/VictoryRoad2F.asm"
-VictoryRoad2F_Blocks: INCBIN "maps/VictoryRoad2F.blk"
-
-INCLUDE "data/mapHeaders/MtMoonB1F.asm"
-INCLUDE "scripts/MtMoonB1F.asm"
-INCLUDE "data/mapObjects/MtMoonB1F.asm"
-MtMoonB1F_Blocks: INCBIN "maps/MtMoonB1F.blk"
-
-INCLUDE "data/mapHeaders/SilphCo7F.asm"
-INCLUDE "scripts/SilphCo7F.asm"
-INCLUDE "data/mapObjects/SilphCo7F.asm"
-SilphCo7F_Blocks: INCBIN "maps/SilphCo7F.blk"
-
-INCLUDE "data/mapHeaders/PokemonMansion2F.asm"
-INCLUDE "scripts/PokemonMansion2F.asm"
-INCLUDE "data/mapObjects/PokemonMansion2F.asm"
-PokemonMansion2F_Blocks: INCBIN "maps/PokemonMansion2F.blk"
-
-INCLUDE "data/mapHeaders/PokemonMansion3F.asm"
-INCLUDE "scripts/PokemonMansion3F.asm"
-INCLUDE "data/mapObjects/PokemonMansion3F.asm"
-PokemonMansion3F_Blocks: INCBIN "maps/PokemonMansion3F.blk"
-
-INCLUDE "data/mapHeaders/PokemonMansionB1F.asm"
-INCLUDE "scripts/PokemonMansionB1F.asm"
-INCLUDE "data/mapObjects/PokemonMansionB1F.asm"
-PokemonMansionB1F_Blocks: INCBIN "maps/PokemonMansionB1F.blk"
-
-INCLUDE "engine/overworld/card_key.asm"
-
-INCLUDE "engine/menu/prize_menu.asm"
-
-INCLUDE "engine/hidden_object_functions14.asm"
-
-
-SECTION "bank15", ROMX
+SECTION "bank10", ROMX
-INCLUDE "data/mapHeaders/Route2.asm"
-INCLUDE "data/mapObjects/Route2.asm"
-Route2_Blocks: INCBIN "maps/Route2.blk"
+INCLUDE "engine/menus/pokedex.asm"
+INCLUDE "engine/overworld/emotion_bubbles.asm"
+INCLUDE "engine/movie/trade.asm"
+INCLUDE "engine/movie/intro.asm"
+INCLUDE "engine/movie/trade2.asm"
+INCLUDE "engine/menus/options.asm"
-INCLUDE "data/mapHeaders/Route3.asm"
-INCLUDE "data/mapObjects/Route3.asm"
-Route3_Blocks: INCBIN "maps/Route3.blk"
-INCLUDE "data/mapHeaders/Route4.asm"
-INCLUDE "data/mapObjects/Route4.asm"
-Route4_Blocks: INCBIN "maps/Route4.blk"
+SECTION "Pokédex Rating", ROMX
-INCLUDE "data/mapHeaders/Route5.asm"
-INCLUDE "data/mapObjects/Route5.asm"
-Route5_Blocks: INCBIN "maps/Route5.blk"
+INCLUDE "engine/events/pokedex_rating.asm"
-INCLUDE "data/mapHeaders/Route9.asm"
-INCLUDE "data/mapObjects/Route9.asm"
-Route9_Blocks: INCBIN "maps/Route9.blk"
-INCLUDE "data/mapHeaders/Route13.asm"
-INCLUDE "data/mapObjects/Route13.asm"
-Route13_Blocks: INCBIN "maps/Route13.blk"
+SECTION "Dungeon Warps", ROMX
-INCLUDE "data/mapHeaders/Route14.asm"
-INCLUDE "data/mapObjects/Route14.asm"
-Route14_Blocks: INCBIN "maps/Route14.blk"
+INCLUDE "engine/overworld/dungeon_warps.asm"
-INCLUDE "data/mapHeaders/Route17.asm"
-INCLUDE "data/mapObjects/Route17.asm"
-Route17_Blocks: INCBIN "maps/Route17.blk"
-INCLUDE "data/mapHeaders/Route19.asm"
-INCLUDE "data/mapObjects/Route19.asm"
-Route19_Blocks: INCBIN "maps/Route19.blk"
+SECTION "Hidden Objects 2", ROMX
-INCLUDE "data/mapHeaders/Route21.asm"
-INCLUDE "data/mapObjects/Route21.asm"
-Route21_Blocks: INCBIN "maps/Route21.blk"
+INCLUDE "engine/events/card_key.asm"
+INCLUDE "engine/events/prize_menu.asm"
+INCLUDE "engine/events/hidden_objects/school_notebooks.asm"
+INCLUDE "engine/events/hidden_objects/fighting_dojo.asm"
+INCLUDE "engine/events/hidden_objects/indigo_plateau_hq.asm"
-VermilionOldRodHouse_Blocks:
-Route12SuperRodHouse_Blocks:
-Daycare_Blocks: INCBIN "maps/Daycare.blk"
-FuchsiaGoodRodHouse_Blocks: INCBIN "maps/FuchsiaGoodRodHouse.blk"
+SECTION "Battle Engine 9", ROMX
INCLUDE "engine/battle/experience.asm"
-INCLUDE "scripts/Route2.asm"
-INCLUDE "scripts/Route3.asm"
-INCLUDE "scripts/Route4.asm"
-INCLUDE "scripts/Route5.asm"
-INCLUDE "scripts/Route9.asm"
-INCLUDE "scripts/Route13.asm"
-INCLUDE "scripts/Route14.asm"
-INCLUDE "scripts/Route17.asm"
-INCLUDE "scripts/Route19.asm"
-INCLUDE "scripts/Route21.asm"
-
-INCLUDE "data/mapHeaders/VermilionOldRodHouse.asm"
-INCLUDE "scripts/VermilionOldRodHouse.asm"
-INCLUDE "data/mapObjects/VermilionOldRodHouse.asm"
-
-INCLUDE "data/mapHeaders/CeladonMart2F.asm"
-INCLUDE "scripts/CeladonMart2F.asm"
-INCLUDE "data/mapObjects/CeladonMart2F.asm"
-CeladonMart2F_Blocks: INCBIN "maps/CeladonMart2F.blk"
-
-INCLUDE "data/mapHeaders/FuchsiaGoodRodHouse.asm"
-INCLUDE "scripts/FuchsiaGoodRodHouse.asm"
-INCLUDE "data/mapObjects/FuchsiaGoodRodHouse.asm"
-
-INCLUDE "data/mapHeaders/Daycare.asm"
-INCLUDE "scripts/Daycare.asm"
-INCLUDE "data/mapObjects/Daycare.asm"
-INCLUDE "data/mapHeaders/Route12SuperRodHouse.asm"
-INCLUDE "scripts/Route12SuperRodHouse.asm"
-INCLUDE "data/mapObjects/Route12SuperRodHouse.asm"
+SECTION "Diploma", ROMX
-INCLUDE "data/mapHeaders/SilphCo8F.asm"
-INCLUDE "scripts/SilphCo8F.asm"
-INCLUDE "data/mapObjects/SilphCo8F.asm"
-SilphCo8F_Blocks: INCBIN "maps/SilphCo8F.blk"
+INCLUDE "engine/events/diploma.asm"
-INCLUDE "engine/menu/diploma.asm"
-INCLUDE "engine/overworld/trainers.asm"
+SECTION "Trainer Sight", ROMX
+INCLUDE "engine/overworld/trainer_sight.asm"
-SECTION "bank16", ROMX
-INCLUDE "data/mapHeaders/Route6.asm"
-INCLUDE "data/mapObjects/Route6.asm"
-Route6_Blocks: INCBIN "maps/Route6.blk"
+SECTION "Battle Engine 10", ROMX
-INCLUDE "data/mapHeaders/Route8.asm"
-INCLUDE "data/mapObjects/Route8.asm"
-Route8_Blocks: INCBIN "maps/Route8.blk"
+INCLUDE "engine/pokemon/experience.asm"
+INCLUDE "engine/pokemon/status_ailments.asm"
+INCLUDE "engine/events/oaks_aide.asm"
-INCLUDE "data/mapHeaders/Route10.asm"
-INCLUDE "data/mapObjects/Route10.asm"
-Route10_Blocks: INCBIN "maps/Route10.blk"
-INCLUDE "data/mapHeaders/Route11.asm"
-INCLUDE "data/mapObjects/Route11.asm"
-Route11_Blocks: INCBIN "maps/Route11.blk"
+SECTION "Saffron Guards", ROMX
-INCLUDE "data/mapHeaders/Route12.asm"
-INCLUDE "data/mapObjects/Route12.asm"
-Route12_Blocks: INCBIN "maps/Route12.blk"
+INCLUDE "engine/events/saffron_guards.asm"
-INCLUDE "data/mapHeaders/Route15.asm"
-INCLUDE "data/mapObjects/Route15.asm"
-Route15_Blocks: INCBIN "maps/Route15.blk"
-INCLUDE "data/mapHeaders/Route16.asm"
-INCLUDE "data/mapObjects/Route16.asm"
-Route16_Blocks: INCBIN "maps/Route16.blk"
+SECTION "Starter Dex", ROMX
-INCLUDE "data/mapHeaders/Route18.asm"
-INCLUDE "data/mapObjects/Route18.asm"
-Route18_Blocks: INCBIN "maps/Route18.blk"
+INCLUDE "engine/events/starter_dex.asm"
- INCBIN "maps/UnusedPokecenterCopy.blk"
-INCLUDE "engine/experience.asm"
+SECTION "Hidden Objects 3", ROMX
-INCLUDE "engine/status_ailments.asm"
+INCLUDE "engine/movie/evolution.asm"
+INCLUDE "engine/pokemon/set_types.asm"
+INCLUDE "engine/events/hidden_objects/reds_room.asm"
+INCLUDE "engine/events/hidden_objects/route_15_binoculars.asm"
+INCLUDE "engine/events/hidden_objects/museum_fossils.asm"
+INCLUDE "engine/events/hidden_objects/fanclub_pictures.asm"
+INCLUDE "engine/events/hidden_objects/museum_fossils2.asm"
+INCLUDE "engine/events/hidden_objects/school_blackboard.asm"
+INCLUDE "engine/events/hidden_objects/vermilion_gym_trash.asm"
-INCLUDE "engine/overworld/oaks_aide.asm"
-INCLUDE "scripts/Route6.asm"
-INCLUDE "scripts/Route8.asm"
-INCLUDE "scripts/Route10.asm"
-INCLUDE "scripts/Route11.asm"
-INCLUDE "scripts/Route12.asm"
-INCLUDE "scripts/Route15.asm"
-INCLUDE "scripts/Route16.asm"
-INCLUDE "scripts/Route18.asm"
+SECTION "Cinnabar Lab Fossils", ROMX
-INCLUDE "data/mapHeaders/PokemonFanClub.asm"
-INCLUDE "scripts/PokemonFanClub.asm"
-INCLUDE "data/mapObjects/PokemonFanClub.asm"
-PokemonFanClub_Blocks: INCBIN "maps/PokemonFanClub.blk"
+INCLUDE "engine/events/cinnabar_lab.asm"
-INCLUDE "data/mapHeaders/SilphCo2F.asm"
-INCLUDE "scripts/SilphCo2F.asm"
-INCLUDE "data/mapObjects/SilphCo2F.asm"
-SilphCo2F_Blocks: INCBIN "maps/SilphCo2F.blk"
-INCLUDE "data/mapHeaders/SilphCo3F.asm"
-INCLUDE "scripts/SilphCo3F.asm"
-INCLUDE "data/mapObjects/SilphCo3F.asm"
-SilphCo3F_Blocks: INCBIN "maps/SilphCo3F.blk"
+SECTION "Hidden Objects 4", ROMX
-INCLUDE "data/mapHeaders/SilphCo10F.asm"
-INCLUDE "scripts/SilphCo10F.asm"
-INCLUDE "data/mapObjects/SilphCo10F.asm"
-SilphCo10F_Blocks: INCBIN "maps/SilphCo10F.blk"
+INCLUDE "engine/events/hidden_objects/gym_statues.asm"
+INCLUDE "engine/events/hidden_objects/bench_guys.asm"
+INCLUDE "engine/events/hidden_objects/blues_room.asm"
+INCLUDE "engine/events/hidden_objects/pokecenter_pc.asm"
-INCLUDE "data/mapHeaders/LancesRoom.asm"
-INCLUDE "scripts/LancesRoom.asm"
-INCLUDE "data/mapObjects/LancesRoom.asm"
-LancesRoom_Blocks: INCBIN "maps/LancesRoom.blk"
-INCLUDE "data/mapHeaders/HallOfFame.asm"
-INCLUDE "scripts/HallOfFame.asm"
-INCLUDE "data/mapObjects/HallOfFame.asm"
-HallOfFame_Blocks: INCBIN "maps/HallOfFame.blk"
+SECTION "Battle Engine 11", ROMX
-INCLUDE "engine/overworld/saffron_guards.asm"
-
-
-SECTION "bank17", ROMX
-
-SaffronMart_Blocks:
-LavenderMart_Blocks:
-CeruleanMart_Blocks:
-VermilionMart_Blocks: INCBIN "maps/VermilionMart.blk"
-
-CopycatsHouse2F_Blocks:
-RedsHouse2F_Blocks: INCBIN "maps/RedsHouse2F.blk"
-
-Museum1F_Blocks: INCBIN "maps/Museum1F.blk"
-
-Museum2F_Blocks: INCBIN "maps/Museum2F.blk"
-
-SaffronPokecenter_Blocks:
-VermilionPokecenter_Blocks:
-LavenderPokecenter_Blocks:
-PewterPokecenter_Blocks: INCBIN "maps/PewterPokecenter.blk"
-
-UndergroundPathRoute7_Blocks:
-UndergroundPathRoute7Copy_Blocks:
-UndergroundPathRoute6_Blocks:
-UndergroundPathRoute5_Blocks: INCBIN "maps/UndergroundPathRoute5.blk"
-
-Route2Gate_Blocks:
-ViridianForestSouthGate_Blocks:
-ViridianForestNorthGate_Blocks: INCBIN "maps/ViridianForestNorthGate.blk"
-
-INCLUDE "data/mapHeaders/RedsHouse2F.asm"
-INCLUDE "scripts/RedsHouse2F.asm"
-INCLUDE "data/mapObjects/RedsHouse2F.asm"
-
-INCLUDE "engine/predefs17.asm"
-
-INCLUDE "data/mapHeaders/Museum1F.asm"
-INCLUDE "scripts/Museum1F.asm"
-INCLUDE "data/mapObjects/Museum1F.asm"
-
-INCLUDE "data/mapHeaders/Museum2F.asm"
-INCLUDE "scripts/Museum2F.asm"
-INCLUDE "data/mapObjects/Museum2F.asm"
-
-INCLUDE "data/mapHeaders/PewterGym.asm"
-INCLUDE "scripts/PewterGym.asm"
-INCLUDE "data/mapObjects/PewterGym.asm"
-PewterGym_Blocks: INCBIN "maps/PewterGym.blk"
-
-INCLUDE "data/mapHeaders/PewterPokecenter.asm"
-INCLUDE "scripts/PewterPokecenter.asm"
-INCLUDE "data/mapObjects/PewterPokecenter.asm"
-
-INCLUDE "data/mapHeaders/CeruleanPokecenter.asm"
-INCLUDE "scripts/CeruleanPokecenter.asm"
-INCLUDE "data/mapObjects/CeruleanPokecenter.asm"
-CeruleanPokecenter_Blocks: INCBIN "maps/CeruleanPokecenter.blk"
-
-INCLUDE "data/mapHeaders/CeruleanGym.asm"
-INCLUDE "scripts/CeruleanGym.asm"
-INCLUDE "data/mapObjects/CeruleanGym.asm"
-CeruleanGym_Blocks: INCBIN "maps/CeruleanGym.blk"
-
-INCLUDE "data/mapHeaders/CeruleanMart.asm"
-INCLUDE "scripts/CeruleanMart.asm"
-INCLUDE "data/mapObjects/CeruleanMart.asm"
-
-INCLUDE "data/mapHeaders/LavenderPokecenter.asm"
-INCLUDE "scripts/LavenderPokecenter.asm"
-INCLUDE "data/mapObjects/LavenderPokecenter.asm"
-
-INCLUDE "data/mapHeaders/LavenderMart.asm"
-INCLUDE "scripts/LavenderMart.asm"
-INCLUDE "data/mapObjects/LavenderMart.asm"
-
-INCLUDE "data/mapHeaders/VermilionPokecenter.asm"
-INCLUDE "scripts/VermilionPokecenter.asm"
-INCLUDE "data/mapObjects/VermilionPokecenter.asm"
-
-INCLUDE "data/mapHeaders/VermilionMart.asm"
-INCLUDE "scripts/VermilionMart.asm"
-INCLUDE "data/mapObjects/VermilionMart.asm"
-
-INCLUDE "data/mapHeaders/VermilionGym.asm"
-INCLUDE "scripts/VermilionGym.asm"
-INCLUDE "data/mapObjects/VermilionGym.asm"
-VermilionGym_Blocks: INCBIN "maps/VermilionGym.blk"
-
-INCLUDE "data/mapHeaders/CopycatsHouse2F.asm"
-INCLUDE "scripts/CopycatsHouse2F.asm"
-INCLUDE "data/mapObjects/CopycatsHouse2F.asm"
-
-INCLUDE "data/mapHeaders/FightingDojo.asm"
-INCLUDE "scripts/FightingDojo.asm"
-INCLUDE "data/mapObjects/FightingDojo.asm"
-FightingDojo_Blocks: INCBIN "maps/FightingDojo.blk"
-
-INCLUDE "data/mapHeaders/SaffronGym.asm"
-INCLUDE "scripts/SaffronGym.asm"
-INCLUDE "data/mapObjects/SaffronGym.asm"
-SaffronGym_Blocks: INCBIN "maps/SaffronGym.blk"
-
-INCLUDE "data/mapHeaders/SaffronMart.asm"
-INCLUDE "scripts/SaffronMart.asm"
-INCLUDE "data/mapObjects/SaffronMart.asm"
-
-INCLUDE "data/mapHeaders/SilphCo1F.asm"
-INCLUDE "scripts/SilphCo1F.asm"
-INCLUDE "data/mapObjects/SilphCo1F.asm"
-SilphCo1F_Blocks: INCBIN "maps/SilphCo1F.blk"
-
-INCLUDE "data/mapHeaders/SaffronPokecenter.asm"
-INCLUDE "scripts/SaffronPokecenter.asm"
-INCLUDE "data/mapObjects/SaffronPokecenter.asm"
-
-INCLUDE "data/mapHeaders/ViridianForestNorthGate.asm"
-INCLUDE "scripts/ViridianForestNorthGate.asm"
-INCLUDE "data/mapObjects/ViridianForestNorthGate.asm"
-
-INCLUDE "data/mapHeaders/Route2Gate.asm"
-INCLUDE "scripts/Route2Gate.asm"
-INCLUDE "data/mapObjects/Route2Gate.asm"
-
-INCLUDE "data/mapHeaders/ViridianForestSouthGate.asm"
-INCLUDE "scripts/ViridianForestSouthGate.asm"
-INCLUDE "data/mapObjects/ViridianForestSouthGate.asm"
-
-INCLUDE "data/mapHeaders/UndergroundPathRoute5.asm"
-INCLUDE "scripts/UndergroundPathRoute5.asm"
-INCLUDE "data/mapObjects/UndergroundPathRoute5.asm"
-
-INCLUDE "data/mapHeaders/UndergroundPathRoute6.asm"
-INCLUDE "scripts/UndergroundPathRoute6.asm"
-INCLUDE "data/mapObjects/UndergroundPathRoute6.asm"
-
-INCLUDE "data/mapHeaders/UndergroundPathRoute7.asm"
-INCLUDE "scripts/UndergroundPathRoute7.asm"
-INCLUDE "data/mapObjects/UndergroundPathRoute7.asm"
-
-INCLUDE "data/mapHeaders/UndergroundPathRoute7Copy.asm"
-INCLUDE "scripts/UndergroundPathRoute7Copy.asm"
-INCLUDE "data/mapObjects/UndergroundPathRoute7Copy.asm"
-
-INCLUDE "data/mapHeaders/SilphCo9F.asm"
-INCLUDE "scripts/SilphCo9F.asm"
-INCLUDE "data/mapObjects/SilphCo9F.asm"
-SilphCo9F_Blocks: INCBIN "maps/SilphCo9F.blk"
-
-INCLUDE "data/mapHeaders/VictoryRoad1F.asm"
-INCLUDE "scripts/VictoryRoad1F.asm"
-INCLUDE "data/mapObjects/VictoryRoad1F.asm"
-VictoryRoad1F_Blocks: INCBIN "maps/VictoryRoad1F.blk"
-
-INCLUDE "engine/evolution.asm"
-
-INCLUDE "engine/predefs17_2.asm"
-
-INCLUDE "engine/hidden_object_functions17.asm"
-
-
-SECTION "bank18", ROMX
-
-ViridianForest_Blocks: INCBIN "maps/ViridianForest.blk"
-UndergroundPathNorthSouth_Blocks: INCBIN "maps/UndergroundPathNorthSouth.blk"
-UndergroundPathWestEast_Blocks: INCBIN "maps/UndergroundPathWestEast.blk"
-
- INCBIN "maps/UnusedDiglettsCaveCopy.blk"
-
-SSAnneB1FRooms_Blocks:
-SSAnne2FRooms_Blocks: INCBIN "maps/SSAnne2FRooms.blk"
-
-INCLUDE "data/mapHeaders/PokemonTower1F.asm"
-INCLUDE "scripts/PokemonTower1F.asm"
-INCLUDE "data/mapObjects/PokemonTower1F.asm"
-PokemonTower1F_Blocks: INCBIN "maps/PokemonTower1F.blk"
-
-INCLUDE "data/mapHeaders/PokemonTower2F.asm"
-INCLUDE "scripts/PokemonTower2F.asm"
-INCLUDE "data/mapObjects/PokemonTower2F.asm"
-PokemonTower2F_Blocks: INCBIN "maps/PokemonTower2F.blk"
-
-INCLUDE "data/mapHeaders/PokemonTower3F.asm"
-INCLUDE "scripts/PokemonTower3F.asm"
-INCLUDE "data/mapObjects/PokemonTower3F.asm"
-PokemonTower3F_Blocks: INCBIN "maps/PokemonTower3F.blk"
-
-INCLUDE "data/mapHeaders/PokemonTower4F.asm"
-INCLUDE "scripts/PokemonTower4F.asm"
-INCLUDE "data/mapObjects/PokemonTower4F.asm"
-PokemonTower4F_Blocks: INCBIN "maps/PokemonTower4F.blk"
-
-INCLUDE "data/mapHeaders/PokemonTower5F.asm"
-INCLUDE "scripts/PokemonTower5F.asm"
-INCLUDE "data/mapObjects/PokemonTower5F.asm"
-PokemonTower5F_Blocks: INCBIN "maps/PokemonTower5F.blk"
-
-INCLUDE "data/mapHeaders/PokemonTower6F.asm"
-INCLUDE "scripts/PokemonTower6F.asm"
-INCLUDE "data/mapObjects/PokemonTower6F.asm"
-PokemonTower6F_Blocks: INCBIN "maps/PokemonTower6F.blk"
-
- INCBIN "maps/UnusedEmptyMap.blk"
-
-INCLUDE "data/mapHeaders/PokemonTower7F.asm"
-INCLUDE "scripts/PokemonTower7F.asm"
-INCLUDE "data/mapObjects/PokemonTower7F.asm"
-PokemonTower7F_Blocks: INCBIN "maps/PokemonTower7F.blk"
-
-INCLUDE "engine/overworld/cinnabar_lab.asm"
-
-INCLUDE "data/mapHeaders/ViridianForest.asm"
-INCLUDE "scripts/ViridianForest.asm"
-INCLUDE "data/mapObjects/ViridianForest.asm"
-
-INCLUDE "data/mapHeaders/SSAnne1F.asm"
-INCLUDE "scripts/SSAnne1F.asm"
-INCLUDE "data/mapObjects/SSAnne1F.asm"
-SSAnne1F_Blocks: INCBIN "maps/SSAnne1F.blk"
-
-INCLUDE "data/mapHeaders/SSAnne2F.asm"
-INCLUDE "scripts/SSAnne2F.asm"
-INCLUDE "data/mapObjects/SSAnne2F.asm"
-SSAnne2F_Blocks: INCBIN "maps/SSAnne2F.blk"
-
-INCLUDE "data/mapHeaders/SSAnneB1F.asm"
-INCLUDE "scripts/SSAnneB1F.asm"
-INCLUDE "data/mapObjects/SSAnneB1F.asm"
-SSAnneB1F_Blocks: INCBIN "maps/SSAnneB1F.blk"
-
-INCLUDE "data/mapHeaders/SSAnneBow.asm"
-INCLUDE "scripts/SSAnneBow.asm"
-INCLUDE "data/mapObjects/SSAnneBow.asm"
-SSAnneBow_Blocks: INCBIN "maps/SSAnneBow.blk"
-
-INCLUDE "data/mapHeaders/SSAnneKitchen.asm"
-INCLUDE "scripts/SSAnneKitchen.asm"
-INCLUDE "data/mapObjects/SSAnneKitchen.asm"
-SSAnneKitchen_Blocks: INCBIN "maps/SSAnneKitchen.blk"
-
-INCLUDE "data/mapHeaders/SSAnneCaptainsRoom.asm"
-INCLUDE "scripts/SSAnneCaptainsRoom.asm"
-INCLUDE "data/mapObjects/SSAnneCaptainsRoom.asm"
-SSAnneCaptainsRoom_Blocks: INCBIN "maps/SSAnneCaptainsRoom.blk"
-
-INCLUDE "data/mapHeaders/SSAnne1FRooms.asm"
-INCLUDE "scripts/SSAnne1FRooms.asm"
-INCLUDE "data/mapObjects/SSAnne1FRooms.asm"
-SSAnne1FRooms_Blocks: INCBIN "maps/SSAnne1FRooms.blk"
-
-INCLUDE "data/mapHeaders/SSAnne2FRooms.asm"
-INCLUDE "scripts/SSAnne2FRooms.asm"
-INCLUDE "data/mapObjects/SSAnne2FRooms.asm"
-
-INCLUDE "data/mapHeaders/SSAnneB1FRooms.asm"
-INCLUDE "scripts/SSAnneB1FRooms.asm"
-INCLUDE "data/mapObjects/SSAnneB1FRooms.asm"
-
-INCLUDE "data/mapHeaders/UndergroundPathNorthSouth.asm"
-INCLUDE "scripts/UndergroundPathNorthSouth.asm"
-INCLUDE "data/mapObjects/UndergroundPathNorthSouth.asm"
-
-INCLUDE "data/mapHeaders/UndergroundPathWestEast.asm"
-INCLUDE "scripts/UndergroundPathWestEast.asm"
-INCLUDE "data/mapObjects/UndergroundPathWestEast.asm"
-
-INCLUDE "data/mapHeaders/DiglettsCave.asm"
-INCLUDE "scripts/DiglettsCave.asm"
-INCLUDE "data/mapObjects/DiglettsCave.asm"
-DiglettsCave_Blocks: INCBIN "maps/DiglettsCave.blk"
-
-INCLUDE "data/mapHeaders/SilphCo11F.asm"
-INCLUDE "scripts/SilphCo11F.asm"
-INCLUDE "data/mapObjects/SilphCo11F.asm"
-SilphCo11F_Blocks: INCBIN "maps/SilphCo11F.blk"
-
-INCLUDE "engine/hidden_object_functions18.asm"
-
-
-SECTION "bank19", ROMX
-
-Overworld_GFX: INCBIN "gfx/tilesets/overworld.2bpp"
- ds 32
-Overworld_Block: INCBIN "gfx/blocksets/overworld.bst"
-
-RedsHouse1_GFX:
-RedsHouse2_GFX: INCBIN "gfx/tilesets/reds_house.2bpp"
- ds 16
-RedsHouse1_Block:
-RedsHouse2_Block: INCBIN "gfx/blocksets/reds_house.bst"
-
-House_GFX: INCBIN "gfx/tilesets/house.2bpp"
-House_Block: INCBIN "gfx/blocksets/house.bst"
-Mansion_GFX: INCBIN "gfx/tilesets/mansion.2bpp"
-Mansion_Block: INCBIN "gfx/blocksets/mansion.bst"
-ShipPort_GFX: INCBIN "gfx/tilesets/ship_port.2bpp"
-ShipPort_Block: INCBIN "gfx/blocksets/ship_port.bst"
-Interior_GFX: INCBIN "gfx/tilesets/interior.2bpp"
-Interior_Block: INCBIN "gfx/blocksets/interior.bst"
-Plateau_GFX: INCBIN "gfx/tilesets/plateau.2bpp"
-Plateau_Block: INCBIN "gfx/blocksets/plateau.bst"
-
-
-SECTION "bank1A", ROMX
-
-INCBIN "gfx/blueversion.1bpp" ; unused
-
-Dojo_GFX:
-Gym_GFX: INCBIN "gfx/tilesets/gym.2bpp"
-Dojo_Block:
-Gym_Block: INCBIN "gfx/blocksets/gym.bst"
-
-Mart_GFX:
-Pokecenter_GFX: INCBIN "gfx/tilesets/pokecenter.2bpp"
-Mart_Block:
-Pokecenter_Block: INCBIN "gfx/blocksets/pokecenter.bst"
-
-ForestGate_GFX:
-Museum_GFX:
-Gate_GFX: INCBIN "gfx/tilesets/gate.2bpp"
-ForestGate_Block:
-Museum_Block:
-Gate_Block: INCBIN "gfx/blocksets/gate.bst"
-
-Forest_GFX: INCBIN "gfx/tilesets/forest.2bpp"
-Forest_Block: INCBIN "gfx/blocksets/forest.bst"
-Facility_GFX: INCBIN "gfx/tilesets/facility.2bpp"
-Facility_Block: INCBIN "gfx/blocksets/facility.bst"
-
-
-SECTION "bank1B", ROMX
-
-Cemetery_GFX: INCBIN "gfx/tilesets/cemetery.2bpp"
-Cemetery_Block: INCBIN "gfx/blocksets/cemetery.bst"
-Cavern_GFX: INCBIN "gfx/tilesets/cavern.2bpp"
-Cavern_Block: INCBIN "gfx/blocksets/cavern.bst"
-Lobby_GFX: INCBIN "gfx/tilesets/lobby.2bpp"
-Lobby_Block: INCBIN "gfx/blocksets/lobby.bst"
-Ship_GFX: INCBIN "gfx/tilesets/ship.2bpp"
-Ship_Block: INCBIN "gfx/blocksets/ship.bst"
-Lab_GFX: INCBIN "gfx/tilesets/lab.2bpp"
-Lab_Block: INCBIN "gfx/blocksets/lab.bst"
-Club_GFX: INCBIN "gfx/tilesets/club.2bpp"
-Club_Block: INCBIN "gfx/blocksets/club.bst"
-Underground_GFX: INCBIN "gfx/tilesets/underground.2bpp"
-Underground_Block: INCBIN "gfx/blocksets/underground.bst"
+INCLUDE "gfx/version.asm"
SECTION "bank1C", ROMX
-INCLUDE "engine/gamefreak.asm"
-INCLUDE "engine/hall_of_fame.asm"
+INCLUDE "engine/movie/splash.asm"
+INCLUDE "engine/movie/hall_of_fame.asm"
INCLUDE "engine/overworld/healing_machine.asm"
INCLUDE "engine/overworld/player_animations.asm"
INCLUDE "engine/battle/ghost_marowak_anim.asm"
INCLUDE "engine/battle/battle_transitions.asm"
-INCLUDE "engine/town_map.asm"
-INCLUDE "engine/mon_party_sprites.asm"
-INCLUDE "engine/in_game_trades.asm"
-INCLUDE "engine/palettes.asm"
-INCLUDE "engine/save.asm"
+INCLUDE "engine/items/town_map.asm"
+INCLUDE "engine/gfx/mon_icons.asm"
+INCLUDE "engine/events/in_game_trades.asm"
+INCLUDE "engine/gfx/palettes.asm"
+INCLUDE "engine/menus/save.asm"
-SECTION "bank1D", ROMX
+SECTION "Itemfinder 1", ROMX
-CopycatsHouse1F_Blocks: INCBIN "maps/CopycatsHouse1F.blk"
+INCLUDE "engine/items/itemfinder.asm"
-CinnabarMart_Blocks:
-PewterMart_Blocks: INCBIN "maps/PewterMart.blk"
-FuchsiaBillsGrandpasHouse_Blocks: INCBIN "maps/FuchsiaBillsGrandpasHouse.blk"
+SECTION "Vending Machine", ROMX
-CinnabarPokecenter_Blocks:
-FuchsiaPokecenter_Blocks: INCBIN "maps/FuchsiaPokecenter.blk"
+INCLUDE "engine/events/vending_machine.asm"
-CeruleanBadgeHouse_Blocks: INCBIN "maps/CeruleanBadgeHouse.blk"
-INCLUDE "engine/items/itemfinder.asm"
-
-INCLUDE "scripts/CeruleanCity_2.asm"
-
-INCLUDE "data/mapHeaders/ViridianGym.asm"
-INCLUDE "scripts/ViridianGym.asm"
-INCLUDE "data/mapObjects/ViridianGym.asm"
-ViridianGym_Blocks: INCBIN "maps/ViridianGym.blk"
-
-INCLUDE "data/mapHeaders/PewterMart.asm"
-INCLUDE "scripts/PewterMart.asm"
-INCLUDE "data/mapObjects/PewterMart.asm"
-
-INCLUDE "data/mapHeaders/CeruleanCave1F.asm"
-INCLUDE "scripts/CeruleanCave1F.asm"
-INCLUDE "data/mapObjects/CeruleanCave1F.asm"
-CeruleanCave1F_Blocks: INCBIN "maps/CeruleanCave1F.blk"
-
-INCLUDE "data/mapHeaders/CeruleanBadgeHouse.asm"
-INCLUDE "scripts/CeruleanBadgeHouse.asm"
-INCLUDE "data/mapObjects/CeruleanBadgeHouse.asm"
-
-INCLUDE "engine/menu/vending_machine.asm"
-
-INCLUDE "data/mapHeaders/FuchsiaBillsGrandpasHouse.asm"
-INCLUDE "scripts/FuchsiaBillsGrandpasHouse.asm"
-INCLUDE "data/mapObjects/FuchsiaBillsGrandpasHouse.asm"
-
-INCLUDE "data/mapHeaders/FuchsiaPokecenter.asm"
-INCLUDE "scripts/FuchsiaPokecenter.asm"
-INCLUDE "data/mapObjects/FuchsiaPokecenter.asm"
-
-INCLUDE "data/mapHeaders/WardensHouse.asm"
-INCLUDE "scripts/WardensHouse.asm"
-INCLUDE "data/mapObjects/WardensHouse.asm"
-WardensHouse_Blocks: INCBIN "maps/WardensHouse.blk"
-
-INCLUDE "data/mapHeaders/SafariZoneGate.asm"
-INCLUDE "data/mapObjects/SafariZoneGate.asm"
-SafariZoneGate_Blocks: INCBIN "maps/SafariZoneGate.blk"
-INCLUDE "scripts/SafariZoneGate.asm"
-
-INCLUDE "data/mapHeaders/FuchsiaGym.asm"
-INCLUDE "scripts/FuchsiaGym.asm"
-INCLUDE "data/mapObjects/FuchsiaGym.asm"
-FuchsiaGym_Blocks: INCBIN "maps/FuchsiaGym.blk"
-
-INCLUDE "data/mapHeaders/FuchsiaMeetingRoom.asm"
-INCLUDE "scripts/FuchsiaMeetingRoom.asm"
-INCLUDE "data/mapObjects/FuchsiaMeetingRoom.asm"
-FuchsiaMeetingRoom_Blocks: INCBIN "maps/FuchsiaMeetingRoom.blk"
-
-INCLUDE "data/mapHeaders/CinnabarGym.asm"
-INCLUDE "scripts/CinnabarGym.asm"
-INCLUDE "data/mapObjects/CinnabarGym.asm"
-CinnabarGym_Blocks: INCBIN "maps/CinnabarGym.blk"
-INCLUDE "scripts/CinnabarGym_2.asm"
-
-INCLUDE "data/mapHeaders/CinnabarLab.asm"
-INCLUDE "scripts/CinnabarLab.asm"
-INCLUDE "data/mapObjects/CinnabarLab.asm"
-CinnabarLab_Blocks: INCBIN "maps/CinnabarLab.blk"
-
-INCLUDE "data/mapHeaders/CinnabarLabTradeRoom.asm"
-INCLUDE "scripts/CinnabarLabTradeRoom.asm"
-INCLUDE "data/mapObjects/CinnabarLabTradeRoom.asm"
-CinnabarLabTradeRoom_Blocks: INCBIN "maps/CinnabarLabTradeRoom.blk"
-
-INCLUDE "data/mapHeaders/CinnabarLabMetronomeRoom.asm"
-INCLUDE "scripts/CinnabarLabMetronomeRoom.asm"
-INCLUDE "data/mapObjects/CinnabarLabMetronomeRoom.asm"
-CinnabarLabMetronomeRoom_Blocks: INCBIN "maps/CinnabarLabMetronomeRoom.blk"
-
-INCLUDE "data/mapHeaders/CinnabarLabFossilRoom.asm"
-INCLUDE "scripts/CinnabarLabFossilRoom.asm"
-INCLUDE "data/mapObjects/CinnabarLabFossilRoom.asm"
-CinnabarLabFossilRoom_Blocks: INCBIN "maps/CinnabarLabFossilRoom.blk"
-
-INCLUDE "data/mapHeaders/CinnabarPokecenter.asm"
-INCLUDE "scripts/CinnabarPokecenter.asm"
-INCLUDE "data/mapObjects/CinnabarPokecenter.asm"
-
-INCLUDE "data/mapHeaders/CinnabarMart.asm"
-INCLUDE "scripts/CinnabarMart.asm"
-INCLUDE "data/mapObjects/CinnabarMart.asm"
-
-INCLUDE "data/mapHeaders/CopycatsHouse1F.asm"
-INCLUDE "scripts/CopycatsHouse1F.asm"
-INCLUDE "data/mapObjects/CopycatsHouse1F.asm"
-
-INCLUDE "data/mapHeaders/ChampionsRoom.asm"
-INCLUDE "scripts/ChampionsRoom.asm"
-INCLUDE "data/mapObjects/ChampionsRoom.asm"
-ChampionsRoom_Blocks: INCBIN "maps/ChampionsRoom.blk"
-
-INCLUDE "data/mapHeaders/LoreleisRoom.asm"
-INCLUDE "scripts/LoreleisRoom.asm"
-INCLUDE "data/mapObjects/LoreleisRoom.asm"
-LoreleisRoom_Blocks: INCBIN "maps/LoreleisRoom.blk"
-
-INCLUDE "data/mapHeaders/BrunosRoom.asm"
-INCLUDE "scripts/BrunosRoom.asm"
-INCLUDE "data/mapObjects/BrunosRoom.asm"
-BrunosRoom_Blocks: INCBIN "maps/BrunosRoom.blk"
-
-INCLUDE "data/mapHeaders/AgathasRoom.asm"
-INCLUDE "scripts/AgathasRoom.asm"
-INCLUDE "data/mapObjects/AgathasRoom.asm"
-AgathasRoom_Blocks: INCBIN "maps/AgathasRoom.blk"
-
-INCLUDE "engine/menu/league_pc.asm"
+SECTION "Itemfinder 2", ROMX
+INCLUDE "engine/menus/league_pc.asm"
INCLUDE "engine/overworld/elevator.asm"
-
-INCLUDE "engine/overworld/hidden_items.asm"
+INCLUDE "engine/events/hidden_items.asm"
SECTION "bank1E", ROMX
INCLUDE "engine/battle/animations.asm"
-
INCLUDE "engine/overworld/cut2.asm"
+INCLUDE "engine/overworld/dust_smoke.asm"
-INCLUDE "engine/overworld/ssanne.asm"
-
-RedFishingTilesFront: INCBIN "gfx/red_fishing_tile_front.2bpp"
-RedFishingTilesBack: INCBIN "gfx/red_fishing_tile_back.2bpp"
-RedFishingTilesSide: INCBIN "gfx/red_fishing_tile_side.2bpp"
-RedFishingRodTiles: INCBIN "gfx/red_fishingrod_tiles.2bpp"
-
-INCLUDE "data/animations.asm"
+INCLUDE "gfx/fishing.asm"
+INCLUDE "data/moves/animations.asm"
+INCLUDE "data/battle_anims/subanimations.asm"
+INCLUDE "data/battle_anims/frame_blocks.asm"
SECTION "bank2f", ROMX
@@ -2142,10 +450,8 @@ INCBIN "gfx/pikachu/unknown_e7d13.2bpp"
SECTION "bank3A", ROMX
-INCLUDE "text/monster_names.asm"
-
+INCLUDE "data/pokemon/names.asm"
INCLUDE "engine/overworld/is_player_just_outside_map.asm"
-
INCLUDE "engine/printer.asm"
INCLUDE "engine/diploma_3a.asm"
@@ -2153,7 +459,6 @@ SurfingPikachu3Graphics: INCBIN "gfx/surfing_pikachu_3.2bpp"
SurfingPikachu3GraphicsEnd:
INCLUDE "engine/unknown_ea3ea.asm"
-
INCLUDE "engine/overworld/npc_movement_2.asm"
; bank $3b is empty
diff --git a/maps.asm b/maps.asm
new file mode 100644
index 00000000..2a7e3392
--- /dev/null
+++ b/maps.asm
@@ -0,0 +1,1226 @@
+INCLUDE "constants.asm"
+
+
+SECTION "Maps 1", ROMX
+
+INCLUDE "data/maps/headers/CeladonCity.asm"
+INCLUDE "data/maps/objects/CeladonCity.asm"
+CeladonCity_Blocks: INCBIN "maps/CeladonCity.blk"
+
+INCLUDE "data/maps/headers/PalletTown.asm"
+INCLUDE "data/maps/objects/PalletTown.asm"
+PalletTown_Blocks: INCBIN "maps/PalletTown.blk"
+
+INCLUDE "data/maps/headers/ViridianCity.asm"
+INCLUDE "data/maps/objects/ViridianCity.asm"
+ViridianCity_Blocks: INCBIN "maps/ViridianCity.blk"
+
+INCLUDE "data/maps/headers/PewterCity.asm"
+ ds 1
+INCLUDE "data/maps/objects/PewterCity.asm"
+PewterCity_Blocks: INCBIN "maps/PewterCity.blk"
+
+INCLUDE "data/maps/headers/CeruleanCity.asm"
+INCLUDE "data/maps/objects/CeruleanCity.asm"
+CeruleanCity_Blocks: INCBIN "maps/CeruleanCity.blk"
+
+INCLUDE "data/maps/headers/VermilionCity.asm"
+INCLUDE "data/maps/objects/VermilionCity.asm"
+VermilionCity_Blocks: INCBIN "maps/VermilionCity.blk"
+
+INCLUDE "data/maps/headers/FuchsiaCity.asm"
+INCLUDE "data/maps/objects/FuchsiaCity.asm"
+FuchsiaCity_Blocks: INCBIN "maps/FuchsiaCity.blk"
+
+
+SECTION "Maps 2", ROMX
+
+INCLUDE "scripts/PalletTown.asm"
+INCLUDE "scripts/ViridianCity.asm"
+INCLUDE "scripts/PewterCity.asm"
+INCLUDE "scripts/CeruleanCity.asm"
+INCLUDE "scripts/VermilionCity.asm"
+INCLUDE "scripts/CeladonCity.asm"
+INCLUDE "scripts/FuchsiaCity.asm"
+
+INCLUDE "data/maps/headers/BluesHouse.asm"
+INCLUDE "scripts/BluesHouse.asm"
+INCLUDE "data/maps/objects/BluesHouse.asm"
+BluesHouse_Blocks: INCBIN "maps/BluesHouse.blk"
+
+INCLUDE "data/maps/headers/VermilionTradeHouse.asm"
+INCLUDE "scripts/VermilionTradeHouse.asm"
+INCLUDE "data/maps/objects/VermilionTradeHouse.asm"
+VermilionTradeHouse_Blocks: INCBIN "maps/VermilionTradeHouse.blk"
+
+INCLUDE "data/maps/headers/IndigoPlateauLobby.asm"
+INCLUDE "scripts/IndigoPlateauLobby.asm"
+INCLUDE "data/maps/objects/IndigoPlateauLobby.asm"
+IndigoPlateauLobby_Blocks: INCBIN "maps/IndigoPlateauLobby.blk"
+
+INCLUDE "data/maps/headers/SilphCo4F.asm"
+INCLUDE "scripts/SilphCo4F.asm"
+INCLUDE "data/maps/objects/SilphCo4F.asm"
+SilphCo4F_Blocks: INCBIN "maps/SilphCo4F.blk"
+
+INCLUDE "data/maps/headers/SilphCo5F.asm"
+INCLUDE "scripts/SilphCo5F.asm"
+INCLUDE "data/maps/objects/SilphCo5F.asm"
+SilphCo5F_Blocks: INCBIN "maps/SilphCo5F.blk"
+
+INCLUDE "data/maps/headers/SilphCo6F.asm"
+INCLUDE "scripts/SilphCo6F.asm"
+INCLUDE "data/maps/objects/SilphCo6F.asm"
+SilphCo6F_Blocks: INCBIN "maps/SilphCo6F.blk"
+
+
+SECTION "Maps 3", ROMX
+
+INCLUDE "data/maps/headers/CinnabarIsland.asm"
+INCLUDE "data/maps/objects/CinnabarIsland.asm"
+CinnabarIsland_Blocks: INCBIN "maps/CinnabarIsland.blk"
+
+INCLUDE "data/maps/headers/Route1.asm"
+INCLUDE "data/maps/objects/Route1.asm"
+Route1_Blocks: INCBIN "maps/Route1.blk"
+
+UndergroundPathRoute8_Blocks: INCBIN "maps/UndergroundPathRoute8.blk"
+
+OaksLab_Blocks: INCBIN "maps/OaksLab.blk"
+
+MrPsychicsHouse_Blocks:
+NameRatersHouse_Blocks:
+MrFujisHouse_Blocks:
+Route16FlyHouse_Blocks:
+Route2TradeHouse_Blocks:
+SaffronPidgeyHouse_Blocks:
+VermilionPidgeyHouse_Blocks:
+LavenderCuboneHouse_Blocks:
+CeruleanTradeHouse_Blocks:
+PewterNidoranHouse_Blocks:
+PewterSpeechHouse_Blocks:
+ViridianNicknameHouse_Blocks: INCBIN "maps/ViridianNicknameHouse.blk"
+
+CeladonMansionRoofHouse_Blocks:
+ViridianSchoolHouse_Blocks: INCBIN "maps/ViridianSchoolHouse.blk"
+
+CeruleanTrashedHouse_Blocks: INCBIN "maps/CeruleanTrashedHouse.blk"
+
+DiglettsCaveRoute11_Blocks:
+DiglettsCaveRoute2_Blocks: INCBIN "maps/DiglettsCaveRoute2.blk"
+
+
+SECTION "Maps 4", ROMX
+
+INCLUDE "scripts/CinnabarIsland.asm"
+
+INCLUDE "scripts/Route1.asm"
+
+INCLUDE "data/maps/headers/OaksLab.asm"
+INCLUDE "scripts/OaksLab.asm"
+INCLUDE "data/maps/objects/OaksLab.asm"
+
+INCLUDE "data/maps/headers/ViridianMart.asm"
+INCLUDE "scripts/ViridianMart.asm"
+INCLUDE "data/maps/objects/ViridianMart.asm"
+ViridianMart_Blocks: INCBIN "maps/ViridianMart.blk"
+
+INCLUDE "data/maps/headers/ViridianSchoolHouse.asm"
+INCLUDE "scripts/ViridianSchoolHouse.asm"
+INCLUDE "data/maps/objects/ViridianSchoolHouse.asm"
+
+INCLUDE "data/maps/headers/ViridianNicknameHouse.asm"
+ ds 1
+INCLUDE "scripts/ViridianNicknameHouse.asm"
+INCLUDE "data/maps/objects/ViridianNicknameHouse.asm"
+
+INCLUDE "data/maps/headers/PewterNidoranHouse.asm"
+INCLUDE "scripts/PewterNidoranHouse.asm"
+INCLUDE "data/maps/objects/PewterNidoranHouse.asm"
+
+INCLUDE "data/maps/headers/PewterSpeechHouse.asm"
+INCLUDE "scripts/PewterSpeechHouse.asm"
+INCLUDE "data/maps/objects/PewterSpeechHouse.asm"
+
+INCLUDE "data/maps/headers/CeruleanTrashedHouse.asm"
+INCLUDE "scripts/CeruleanTrashedHouse.asm"
+INCLUDE "data/maps/objects/CeruleanTrashedHouse.asm"
+
+INCLUDE "data/maps/headers/CeruleanTradeHouse.asm"
+INCLUDE "scripts/CeruleanTradeHouse.asm"
+INCLUDE "data/maps/objects/CeruleanTradeHouse.asm"
+
+INCLUDE "data/maps/headers/BikeShop.asm"
+INCLUDE "scripts/BikeShop.asm"
+INCLUDE "data/maps/objects/BikeShop.asm"
+BikeShop_Blocks: INCBIN "maps/BikeShop.blk"
+
+INCLUDE "data/maps/headers/MrFujisHouse.asm"
+INCLUDE "scripts/MrFujisHouse.asm"
+INCLUDE "data/maps/objects/MrFujisHouse.asm"
+
+INCLUDE "data/maps/headers/LavenderCuboneHouse.asm"
+INCLUDE "scripts/LavenderCuboneHouse.asm"
+INCLUDE "data/maps/objects/LavenderCuboneHouse.asm"
+
+INCLUDE "data/maps/headers/NameRatersHouse.asm"
+INCLUDE "scripts/NameRatersHouse.asm"
+INCLUDE "data/maps/objects/NameRatersHouse.asm"
+
+INCLUDE "data/maps/headers/VermilionPidgeyHouse.asm"
+INCLUDE "scripts/VermilionPidgeyHouse.asm"
+INCLUDE "data/maps/objects/VermilionPidgeyHouse.asm"
+
+INCLUDE "data/maps/headers/VermilionDock.asm"
+INCLUDE "scripts/VermilionDock.asm"
+INCLUDE "data/maps/objects/VermilionDock.asm"
+VermilionDock_Blocks: INCBIN "maps/VermilionDock.blk"
+
+INCLUDE "data/maps/headers/CeladonMansionRoofHouse.asm"
+INCLUDE "scripts/CeladonMansionRoofHouse.asm"
+INCLUDE "data/maps/objects/CeladonMansionRoofHouse.asm"
+
+INCLUDE "data/maps/headers/FuchsiaMart.asm"
+INCLUDE "scripts/FuchsiaMart.asm"
+INCLUDE "data/maps/objects/FuchsiaMart.asm"
+FuchsiaMart_Blocks: INCBIN "maps/FuchsiaMart.blk"
+
+INCLUDE "data/maps/headers/SaffronPidgeyHouse.asm"
+INCLUDE "scripts/SaffronPidgeyHouse.asm"
+INCLUDE "data/maps/objects/SaffronPidgeyHouse.asm"
+
+INCLUDE "data/maps/headers/MrPsychicsHouse.asm"
+INCLUDE "scripts/MrPsychicsHouse.asm"
+INCLUDE "data/maps/objects/MrPsychicsHouse.asm"
+
+INCLUDE "data/maps/headers/DiglettsCaveRoute2.asm"
+INCLUDE "scripts/DiglettsCaveRoute2.asm"
+INCLUDE "data/maps/objects/DiglettsCaveRoute2.asm"
+
+INCLUDE "data/maps/headers/Route2TradeHouse.asm"
+INCLUDE "scripts/Route2TradeHouse.asm"
+INCLUDE "data/maps/objects/Route2TradeHouse.asm"
+
+INCLUDE "data/maps/headers/Route5Gate.asm"
+INCLUDE "scripts/Route5Gate.asm"
+INCLUDE "data/maps/objects/Route5Gate.asm"
+Route5Gate_Blocks: INCBIN "maps/Route5Gate.blk"
+
+INCLUDE "data/maps/headers/Route6Gate.asm"
+INCLUDE "scripts/Route6Gate.asm"
+INCLUDE "data/maps/objects/Route6Gate.asm"
+Route6Gate_Blocks: INCBIN "maps/Route6Gate.blk"
+
+INCLUDE "data/maps/headers/Route7Gate.asm"
+INCLUDE "scripts/Route7Gate.asm"
+INCLUDE "data/maps/objects/Route7Gate.asm"
+Route7Gate_Blocks: INCBIN "maps/Route7Gate.blk"
+
+INCLUDE "data/maps/headers/Route8Gate.asm"
+INCLUDE "scripts/Route8Gate.asm"
+INCLUDE "data/maps/objects/Route8Gate.asm"
+Route8Gate_Blocks: INCBIN "maps/Route8Gate.blk"
+
+INCLUDE "data/maps/headers/UndergroundPathRoute8.asm"
+INCLUDE "scripts/UndergroundPathRoute8.asm"
+INCLUDE "data/maps/objects/UndergroundPathRoute8.asm"
+
+INCLUDE "data/maps/headers/PowerPlant.asm"
+INCLUDE "scripts/PowerPlant.asm"
+INCLUDE "data/maps/objects/PowerPlant.asm"
+PowerPlant_Blocks: INCBIN "maps/PowerPlant.blk"
+
+INCLUDE "data/maps/headers/DiglettsCaveRoute11.asm"
+INCLUDE "scripts/DiglettsCaveRoute11.asm"
+INCLUDE "data/maps/objects/DiglettsCaveRoute11.asm"
+
+INCLUDE "data/maps/headers/Route16FlyHouse.asm"
+INCLUDE "scripts/Route16FlyHouse.asm"
+INCLUDE "data/maps/objects/Route16FlyHouse.asm"
+
+INCLUDE "data/maps/headers/Route22Gate.asm"
+INCLUDE "scripts/Route22Gate.asm"
+INCLUDE "data/maps/objects/Route22Gate.asm"
+Route22Gate_Blocks: INCBIN "maps/Route22Gate.blk"
+
+INCLUDE "data/maps/headers/BillsHouse.asm"
+INCLUDE "scripts/BillsHouse.asm"
+INCLUDE "data/maps/objects/BillsHouse.asm"
+BillsHouse_Blocks: INCBIN "maps/BillsHouse.blk"
+
+
+SECTION "Maps 5", ROMX
+
+INCLUDE "data/maps/headers/LavenderTown.asm"
+INCLUDE "data/maps/objects/LavenderTown.asm"
+LavenderTown_Blocks: INCBIN "maps/LavenderTown.blk"
+
+ViridianPokecenter_Blocks: INCBIN "maps/ViridianPokecenter.blk"
+
+SafariZoneCenterRestHouse_Blocks:
+SafariZoneWestRestHouse_Blocks:
+SafariZoneEastRestHouse_Blocks:
+SafariZoneNorthRestHouse_Blocks: INCBIN "maps/SafariZoneCenterRestHouse.blk"
+
+INCLUDE "scripts/LavenderTown.asm"
+
+
+SECTION "Maps 6", ROMX
+
+INCLUDE "data/maps/headers/ViridianPokecenter.asm"
+INCLUDE "scripts/ViridianPokecenter.asm"
+INCLUDE "data/maps/objects/ViridianPokecenter.asm"
+
+INCLUDE "data/maps/headers/CeladonMart1F.asm"
+INCLUDE "scripts/CeladonMart1F.asm"
+INCLUDE "data/maps/objects/CeladonMart1F.asm"
+CeladonMart1F_Blocks: INCBIN "maps/CeladonMart1F.blk"
+
+INCLUDE "data/maps/headers/PokemonMansion1F.asm"
+INCLUDE "scripts/PokemonMansion1F.asm"
+INCLUDE "data/maps/objects/PokemonMansion1F.asm"
+PokemonMansion1F_Blocks: INCBIN "maps/PokemonMansion1F.blk"
+
+INCLUDE "data/maps/headers/RockTunnel1F.asm"
+INCLUDE "scripts/RockTunnel1F.asm"
+INCLUDE "data/maps/objects/RockTunnel1F.asm"
+RockTunnel1F_Blocks: INCBIN "maps/RockTunnel1F.blk"
+
+INCLUDE "data/maps/headers/SeafoamIslands1F.asm"
+INCLUDE "scripts/SeafoamIslands1F.asm"
+INCLUDE "data/maps/objects/SeafoamIslands1F.asm"
+SeafoamIslands1F_Blocks: INCBIN "maps/SeafoamIslands1F.blk"
+
+INCLUDE "data/maps/headers/SSAnne3F.asm"
+INCLUDE "scripts/SSAnne3F.asm"
+INCLUDE "data/maps/objects/SSAnne3F.asm"
+SSAnne3F_Blocks: INCBIN "maps/SSAnne3F.blk"
+
+INCLUDE "data/maps/headers/VictoryRoad3F.asm"
+INCLUDE "scripts/VictoryRoad3F.asm"
+INCLUDE "data/maps/objects/VictoryRoad3F.asm"
+VictoryRoad3F_Blocks: INCBIN "maps/VictoryRoad3F.blk"
+
+INCLUDE "data/maps/headers/RocketHideoutB1F.asm"
+INCLUDE "scripts/RocketHideoutB1F.asm"
+INCLUDE "data/maps/objects/RocketHideoutB1F.asm"
+RocketHideoutB1F_Blocks: INCBIN "maps/RocketHideoutB1F.blk"
+
+INCLUDE "data/maps/headers/RocketHideoutB2F.asm"
+INCLUDE "scripts/RocketHideoutB2F.asm"
+INCLUDE "data/maps/objects/RocketHideoutB2F.asm"
+RocketHideoutB2F_Blocks: INCBIN "maps/RocketHideoutB2F.blk"
+
+INCLUDE "data/maps/headers/RocketHideoutB3F.asm"
+INCLUDE "scripts/RocketHideoutB3F.asm"
+INCLUDE "data/maps/objects/RocketHideoutB3F.asm"
+RocketHideoutB3F_Blocks: INCBIN "maps/RocketHideoutB3F.blk"
+
+INCLUDE "data/maps/headers/RocketHideoutB4F.asm"
+INCLUDE "scripts/RocketHideoutB4F.asm"
+INCLUDE "data/maps/objects/RocketHideoutB4F.asm"
+RocketHideoutB4F_Blocks: INCBIN "maps/RocketHideoutB4F.blk"
+
+INCLUDE "data/maps/headers/RocketHideoutElevator.asm"
+INCLUDE "scripts/RocketHideoutElevator.asm"
+INCLUDE "data/maps/objects/RocketHideoutElevator.asm"
+RocketHideoutElevator_Blocks: INCBIN "maps/RocketHideoutElevator.blk"
+
+INCLUDE "data/maps/headers/SilphCoElevator.asm"
+INCLUDE "scripts/SilphCoElevator.asm"
+INCLUDE "data/maps/objects/SilphCoElevator.asm"
+SilphCoElevator_Blocks: INCBIN "maps/SilphCoElevator.blk"
+
+INCLUDE "data/maps/headers/SafariZoneEast.asm"
+INCLUDE "scripts/SafariZoneEast.asm"
+INCLUDE "data/maps/objects/SafariZoneEast.asm"
+SafariZoneEast_Blocks: INCBIN "maps/SafariZoneEast.blk"
+
+INCLUDE "data/maps/headers/SafariZoneNorth.asm"
+INCLUDE "scripts/SafariZoneNorth.asm"
+INCLUDE "data/maps/objects/SafariZoneNorth.asm"
+SafariZoneNorth_Blocks: INCBIN "maps/SafariZoneNorth.blk"
+
+INCLUDE "data/maps/headers/SafariZoneCenter.asm"
+INCLUDE "scripts/SafariZoneCenter.asm"
+INCLUDE "data/maps/objects/SafariZoneCenter.asm"
+SafariZoneCenter_Blocks: INCBIN "maps/SafariZoneCenter.blk"
+
+INCLUDE "data/maps/headers/SafariZoneCenterRestHouse.asm"
+INCLUDE "scripts/SafariZoneCenterRestHouse.asm"
+INCLUDE "data/maps/objects/SafariZoneCenterRestHouse.asm"
+
+INCLUDE "data/maps/headers/SafariZoneWestRestHouse.asm"
+INCLUDE "scripts/SafariZoneWestRestHouse.asm"
+INCLUDE "data/maps/objects/SafariZoneWestRestHouse.asm"
+
+INCLUDE "data/maps/headers/SafariZoneEastRestHouse.asm"
+INCLUDE "scripts/SafariZoneEastRestHouse.asm"
+INCLUDE "data/maps/objects/SafariZoneEastRestHouse.asm"
+
+INCLUDE "data/maps/headers/SafariZoneNorthRestHouse.asm"
+INCLUDE "scripts/SafariZoneNorthRestHouse.asm"
+INCLUDE "data/maps/objects/SafariZoneNorthRestHouse.asm"
+
+INCLUDE "data/maps/headers/CeruleanCave2F.asm"
+INCLUDE "scripts/CeruleanCave2F.asm"
+INCLUDE "data/maps/objects/CeruleanCave2F.asm"
+CeruleanCave2F_Blocks: INCBIN "maps/CeruleanCave2F.blk"
+
+INCLUDE "data/maps/headers/CeruleanCaveB1F.asm"
+INCLUDE "scripts/CeruleanCaveB1F.asm"
+INCLUDE "data/maps/objects/CeruleanCaveB1F.asm"
+CeruleanCaveB1F_Blocks: INCBIN "maps/CeruleanCaveB1F.blk"
+
+INCLUDE "data/maps/headers/RockTunnelB1F.asm"
+INCLUDE "scripts/RockTunnelB1F.asm"
+INCLUDE "data/maps/objects/RockTunnelB1F.asm"
+RockTunnelB1F_Blocks: INCBIN "maps/RockTunnelB1F.blk"
+
+INCLUDE "data/maps/headers/SeafoamIslandsB1F.asm"
+INCLUDE "scripts/SeafoamIslandsB1F.asm"
+INCLUDE "data/maps/objects/SeafoamIslandsB1F.asm"
+SeafoamIslandsB1F_Blocks: INCBIN "maps/SeafoamIslandsB1F.blk"
+
+INCLUDE "data/maps/headers/SeafoamIslandsB2F.asm"
+INCLUDE "scripts/SeafoamIslandsB2F.asm"
+INCLUDE "data/maps/objects/SeafoamIslandsB2F.asm"
+SeafoamIslandsB2F_Blocks: INCBIN "maps/SeafoamIslandsB2F.blk"
+
+INCLUDE "data/maps/headers/SeafoamIslandsB3F.asm"
+INCLUDE "scripts/SeafoamIslandsB3F.asm"
+INCLUDE "data/maps/objects/SeafoamIslandsB3F.asm"
+SeafoamIslandsB3F_Blocks: INCBIN "maps/SeafoamIslandsB3F.blk"
+
+INCLUDE "data/maps/headers/SeafoamIslandsB4F.asm"
+INCLUDE "scripts/SeafoamIslandsB4F.asm"
+INCLUDE "data/maps/objects/SeafoamIslandsB4F.asm"
+SeafoamIslandsB4F_Blocks: INCBIN "maps/SeafoamIslandsB4F.blk"
+
+
+SECTION "Maps 7", ROMX
+
+INCLUDE "data/maps/headers/Route7.asm"
+INCLUDE "data/maps/objects/Route7.asm"
+Route7_Blocks: INCBIN "maps/Route7.blk"
+
+CeladonPokecenter_Blocks:
+RockTunnelPokecenter_Blocks:
+MtMoonPokecenter_Blocks: INCBIN "maps/MtMoonPokecenter.blk"
+
+Route18Gate1F_Blocks:
+Route15Gate1F_Blocks:
+Route11Gate1F_Blocks: INCBIN "maps/Route11Gate1F.blk"
+
+Route18Gate2F_Blocks:
+Route16Gate2F_Blocks:
+Route15Gate2F_Blocks:
+Route12Gate2F_Blocks:
+Route11Gate2F_Blocks: INCBIN "maps/Route11Gate2F.blk"
+
+
+SECTION "Maps 8", ROMX
+
+INCLUDE "scripts/Route7.asm"
+
+INCLUDE "data/maps/headers/RedsHouse1F.asm"
+INCLUDE "scripts/RedsHouse1F.asm"
+INCLUDE "data/maps/objects/RedsHouse1F.asm"
+RedsHouse1F_Blocks: INCBIN "maps/RedsHouse1F.blk"
+
+INCLUDE "data/maps/headers/CeladonMart3F.asm"
+INCLUDE "scripts/CeladonMart3F.asm"
+INCLUDE "data/maps/objects/CeladonMart3F.asm"
+CeladonMart3F_Blocks: INCBIN "maps/CeladonMart3F.blk"
+
+INCLUDE "data/maps/headers/CeladonMart4F.asm"
+INCLUDE "scripts/CeladonMart4F.asm"
+INCLUDE "data/maps/objects/CeladonMart4F.asm"
+CeladonMart4F_Blocks: INCBIN "maps/CeladonMart4F.blk"
+
+INCLUDE "data/maps/headers/CeladonMartRoof.asm"
+INCLUDE "scripts/CeladonMartRoof.asm"
+INCLUDE "data/maps/objects/CeladonMartRoof.asm"
+CeladonMartRoof_Blocks: INCBIN "maps/CeladonMartRoof.blk"
+
+INCLUDE "data/maps/headers/CeladonMartElevator.asm"
+INCLUDE "scripts/CeladonMartElevator.asm"
+INCLUDE "data/maps/objects/CeladonMartElevator.asm"
+CeladonMartElevator_Blocks: INCBIN "maps/CeladonMartElevator.blk"
+
+INCLUDE "data/maps/headers/CeladonMansion1F.asm"
+INCLUDE "scripts/CeladonMansion1F.asm"
+INCLUDE "data/maps/objects/CeladonMansion1F.asm"
+CeladonMansion1F_Blocks: INCBIN "maps/CeladonMansion1F.blk"
+
+INCLUDE "data/maps/headers/CeladonMansion2F.asm"
+INCLUDE "scripts/CeladonMansion2F.asm"
+INCLUDE "data/maps/objects/CeladonMansion2F.asm"
+CeladonMansion2F_Blocks: INCBIN "maps/CeladonMansion2F.blk"
+
+INCLUDE "data/maps/headers/CeladonMansion3F.asm"
+INCLUDE "scripts/CeladonMansion3F.asm"
+INCLUDE "data/maps/objects/CeladonMansion3F.asm"
+CeladonMansion3F_Blocks: INCBIN "maps/CeladonMansion3F.blk"
+
+INCLUDE "data/maps/headers/CeladonMansionRoof.asm"
+INCLUDE "scripts/CeladonMansionRoof.asm"
+INCLUDE "data/maps/objects/CeladonMansionRoof.asm"
+CeladonMansionRoof_Blocks: INCBIN "maps/CeladonMansionRoof.blk"
+
+INCLUDE "data/maps/headers/CeladonPokecenter.asm"
+INCLUDE "scripts/CeladonPokecenter.asm"
+INCLUDE "data/maps/objects/CeladonPokecenter.asm"
+
+INCLUDE "data/maps/headers/CeladonGym.asm"
+INCLUDE "scripts/CeladonGym.asm"
+INCLUDE "data/maps/objects/CeladonGym.asm"
+CeladonGym_Blocks: INCBIN "maps/CeladonGym.blk"
+
+INCLUDE "data/maps/headers/GameCorner.asm"
+INCLUDE "scripts/GameCorner.asm"
+INCLUDE "data/maps/objects/GameCorner.asm"
+GameCorner_Blocks: INCBIN "maps/GameCorner.blk"
+
+INCLUDE "data/maps/headers/CeladonMart5F.asm"
+INCLUDE "scripts/CeladonMart5F.asm"
+INCLUDE "data/maps/objects/CeladonMart5F.asm"
+CeladonMart5F_Blocks: INCBIN "maps/CeladonMart5F.blk"
+
+INCLUDE "data/maps/headers/GameCornerPrizeRoom.asm"
+INCLUDE "scripts/GameCornerPrizeRoom.asm"
+INCLUDE "data/maps/objects/GameCornerPrizeRoom.asm"
+GameCornerPrizeRoom_Blocks: INCBIN "maps/GameCornerPrizeRoom.blk"
+
+INCLUDE "data/maps/headers/CeladonDiner.asm"
+INCLUDE "scripts/CeladonDiner.asm"
+INCLUDE "data/maps/objects/CeladonDiner.asm"
+CeladonDiner_Blocks: INCBIN "maps/CeladonDiner.blk"
+
+INCLUDE "data/maps/headers/CeladonChiefHouse.asm"
+INCLUDE "scripts/CeladonChiefHouse.asm"
+INCLUDE "data/maps/objects/CeladonChiefHouse.asm"
+CeladonChiefHouse_Blocks: INCBIN "maps/CeladonChiefHouse.blk"
+
+INCLUDE "data/maps/headers/CeladonHotel.asm"
+INCLUDE "scripts/CeladonHotel.asm"
+INCLUDE "data/maps/objects/CeladonHotel.asm"
+CeladonHotel_Blocks: INCBIN "maps/CeladonHotel.blk"
+
+INCLUDE "data/maps/headers/MtMoonPokecenter.asm"
+INCLUDE "scripts/MtMoonPokecenter.asm"
+INCLUDE "data/maps/objects/MtMoonPokecenter.asm"
+
+INCLUDE "data/maps/headers/RockTunnelPokecenter.asm"
+INCLUDE "scripts/RockTunnelPokecenter.asm"
+INCLUDE "data/maps/objects/RockTunnelPokecenter.asm"
+
+INCLUDE "data/maps/headers/Route11Gate1F.asm"
+INCLUDE "scripts/Route11Gate1F.asm"
+INCLUDE "data/maps/objects/Route11Gate1F.asm"
+
+INCLUDE "data/maps/headers/Route11Gate2F.asm"
+INCLUDE "scripts/Route11Gate2F.asm"
+INCLUDE "data/maps/objects/Route11Gate2F.asm"
+
+INCLUDE "data/maps/headers/Route12Gate1F.asm"
+INCLUDE "scripts/Route12Gate1F.asm"
+INCLUDE "data/maps/objects/Route12Gate1F.asm"
+Route12Gate1F_Blocks: INCBIN "maps/Route12Gate1F.blk"
+
+INCLUDE "data/maps/headers/Route12Gate2F.asm"
+INCLUDE "scripts/Route12Gate2F.asm"
+INCLUDE "data/maps/objects/Route12Gate2F.asm"
+
+INCLUDE "data/maps/headers/Route15Gate1F.asm"
+INCLUDE "scripts/Route15Gate1F.asm"
+INCLUDE "data/maps/objects/Route15Gate1F.asm"
+
+INCLUDE "data/maps/headers/Route15Gate2F.asm"
+INCLUDE "scripts/Route15Gate2F.asm"
+INCLUDE "data/maps/objects/Route15Gate2F.asm"
+
+INCLUDE "data/maps/headers/Route16Gate1F.asm"
+INCLUDE "scripts/Route16Gate1F.asm"
+INCLUDE "data/maps/objects/Route16Gate1F.asm"
+Route16Gate1F_Blocks: INCBIN "maps/Route16Gate1F.blk"
+
+INCLUDE "data/maps/headers/Route16Gate2F.asm"
+INCLUDE "scripts/Route16Gate2F.asm"
+INCLUDE "data/maps/objects/Route16Gate2F.asm"
+
+INCLUDE "data/maps/headers/Route18Gate1F.asm"
+INCLUDE "scripts/Route18Gate1F.asm"
+INCLUDE "data/maps/objects/Route18Gate1F.asm"
+
+INCLUDE "data/maps/headers/Route18Gate2F.asm"
+INCLUDE "scripts/Route18Gate2F.asm"
+INCLUDE "data/maps/objects/Route18Gate2F.asm"
+
+INCLUDE "data/maps/headers/MtMoon1F.asm"
+INCLUDE "scripts/MtMoon1F.asm"
+INCLUDE "data/maps/objects/MtMoon1F.asm"
+MtMoon1F_Blocks: INCBIN "maps/MtMoon1F.blk"
+
+INCLUDE "data/maps/headers/MtMoonB2F.asm"
+INCLUDE "scripts/MtMoonB2F.asm"
+INCLUDE "data/maps/objects/MtMoonB2F.asm"
+MtMoonB2F_Blocks: INCBIN "maps/MtMoonB2F.blk"
+INCLUDE "scripts/MtMoonB2F_2.asm"
+
+INCLUDE "data/maps/headers/SafariZoneWest.asm"
+INCLUDE "scripts/SafariZoneWest.asm"
+INCLUDE "data/maps/objects/SafariZoneWest.asm"
+SafariZoneWest_Blocks: INCBIN "maps/SafariZoneWest.blk"
+
+INCLUDE "data/maps/headers/SafariZoneSecretHouse.asm"
+INCLUDE "scripts/SafariZoneSecretHouse.asm"
+INCLUDE "data/maps/objects/SafariZoneSecretHouse.asm"
+SafariZoneSecretHouse_Blocks: INCBIN "maps/SafariZoneSecretHouse.blk"
+
+
+SECTION "Maps 9", ROMX
+
+INCLUDE "data/maps/headers/TradeCenter.asm"
+INCLUDE "scripts/TradeCenter.asm"
+INCLUDE "data/maps/objects/TradeCenter.asm"
+TradeCenter_Blocks: INCBIN "maps/TradeCenter.blk"
+
+INCLUDE "data/maps/headers/Colosseum.asm"
+INCLUDE "scripts/Colosseum.asm"
+INCLUDE "data/maps/objects/Colosseum.asm"
+Colosseum_Blocks: INCBIN "maps/Colosseum.blk"
+
+
+SECTION "Maps 10", ROMX
+
+INCLUDE "data/maps/headers/Route22.asm"
+INCLUDE "data/maps/objects/Route22.asm"
+Route22_Blocks: INCBIN "maps/Route22.blk"
+
+INCLUDE "data/maps/headers/Route20.asm"
+INCLUDE "data/maps/objects/Route20.asm"
+Route20_Blocks: INCBIN "maps/Route20.blk"
+
+INCLUDE "data/maps/headers/Route23.asm"
+INCLUDE "data/maps/objects/Route23.asm"
+Route23_Blocks: INCBIN "maps/Route23.blk"
+
+INCLUDE "data/maps/headers/Route24.asm"
+INCLUDE "data/maps/objects/Route24.asm"
+Route24_Blocks: INCBIN "maps/Route24.blk"
+
+INCLUDE "data/maps/headers/Route25.asm"
+INCLUDE "data/maps/objects/Route25.asm"
+Route25_Blocks: INCBIN "maps/Route25.blk"
+
+INCLUDE "data/maps/headers/IndigoPlateau.asm"
+INCLUDE "scripts/IndigoPlateau.asm"
+INCLUDE "data/maps/objects/IndigoPlateau.asm"
+IndigoPlateau_Blocks: INCBIN "maps/IndigoPlateau.blk"
+
+INCLUDE "data/maps/headers/SaffronCity.asm"
+INCLUDE "data/maps/objects/SaffronCity.asm"
+SaffronCity_Blocks: INCBIN "maps/SaffronCity.blk"
+INCLUDE "scripts/SaffronCity.asm"
+
+INCLUDE "scripts/Route20.asm"
+INCLUDE "scripts/Route22.asm"
+INCLUDE "scripts/Route23.asm"
+INCLUDE "scripts/Route24.asm"
+INCLUDE "scripts/Route25.asm"
+
+INCLUDE "data/maps/headers/VictoryRoad2F.asm"
+INCLUDE "scripts/VictoryRoad2F.asm"
+INCLUDE "data/maps/objects/VictoryRoad2F.asm"
+VictoryRoad2F_Blocks: INCBIN "maps/VictoryRoad2F.blk"
+
+INCLUDE "data/maps/headers/MtMoonB1F.asm"
+INCLUDE "scripts/MtMoonB1F.asm"
+INCLUDE "data/maps/objects/MtMoonB1F.asm"
+MtMoonB1F_Blocks: INCBIN "maps/MtMoonB1F.blk"
+
+INCLUDE "data/maps/headers/SilphCo7F.asm"
+INCLUDE "scripts/SilphCo7F.asm"
+INCLUDE "data/maps/objects/SilphCo7F.asm"
+SilphCo7F_Blocks: INCBIN "maps/SilphCo7F.blk"
+
+INCLUDE "data/maps/headers/PokemonMansion2F.asm"
+INCLUDE "scripts/PokemonMansion2F.asm"
+INCLUDE "data/maps/objects/PokemonMansion2F.asm"
+PokemonMansion2F_Blocks: INCBIN "maps/PokemonMansion2F.blk"
+
+INCLUDE "data/maps/headers/PokemonMansion3F.asm"
+INCLUDE "scripts/PokemonMansion3F.asm"
+INCLUDE "data/maps/objects/PokemonMansion3F.asm"
+PokemonMansion3F_Blocks: INCBIN "maps/PokemonMansion3F.blk"
+
+INCLUDE "data/maps/headers/PokemonMansionB1F.asm"
+INCLUDE "scripts/PokemonMansionB1F.asm"
+INCLUDE "data/maps/objects/PokemonMansionB1F.asm"
+PokemonMansionB1F_Blocks: INCBIN "maps/PokemonMansionB1F.blk"
+
+
+SECTION "Maps 11", ROMX
+
+INCLUDE "data/maps/headers/Route2.asm"
+INCLUDE "data/maps/objects/Route2.asm"
+Route2_Blocks: INCBIN "maps/Route2.blk"
+
+INCLUDE "data/maps/headers/Route3.asm"
+INCLUDE "data/maps/objects/Route3.asm"
+Route3_Blocks: INCBIN "maps/Route3.blk"
+
+INCLUDE "data/maps/headers/Route4.asm"
+INCLUDE "data/maps/objects/Route4.asm"
+Route4_Blocks: INCBIN "maps/Route4.blk"
+
+INCLUDE "data/maps/headers/Route5.asm"
+INCLUDE "data/maps/objects/Route5.asm"
+Route5_Blocks: INCBIN "maps/Route5.blk"
+
+INCLUDE "data/maps/headers/Route9.asm"
+INCLUDE "data/maps/objects/Route9.asm"
+Route9_Blocks: INCBIN "maps/Route9.blk"
+
+INCLUDE "data/maps/headers/Route13.asm"
+INCLUDE "data/maps/objects/Route13.asm"
+Route13_Blocks: INCBIN "maps/Route13.blk"
+
+INCLUDE "data/maps/headers/Route14.asm"
+INCLUDE "data/maps/objects/Route14.asm"
+Route14_Blocks: INCBIN "maps/Route14.blk"
+
+INCLUDE "data/maps/headers/Route17.asm"
+INCLUDE "data/maps/objects/Route17.asm"
+Route17_Blocks: INCBIN "maps/Route17.blk"
+
+INCLUDE "data/maps/headers/Route19.asm"
+INCLUDE "data/maps/objects/Route19.asm"
+Route19_Blocks: INCBIN "maps/Route19.blk"
+
+INCLUDE "data/maps/headers/Route21.asm"
+INCLUDE "data/maps/objects/Route21.asm"
+Route21_Blocks: INCBIN "maps/Route21.blk"
+
+VermilionOldRodHouse_Blocks:
+Route12SuperRodHouse_Blocks:
+Daycare_Blocks: INCBIN "maps/Daycare.blk"
+
+FuchsiaGoodRodHouse_Blocks: INCBIN "maps/FuchsiaGoodRodHouse.blk"
+
+
+SECTION "Maps 12", ROMX
+
+INCLUDE "scripts/Route2.asm"
+INCLUDE "scripts/Route3.asm"
+INCLUDE "scripts/Route4.asm"
+INCLUDE "scripts/Route5.asm"
+INCLUDE "scripts/Route9.asm"
+INCLUDE "scripts/Route13.asm"
+INCLUDE "scripts/Route14.asm"
+INCLUDE "scripts/Route17.asm"
+INCLUDE "scripts/Route19.asm"
+INCLUDE "scripts/Route21.asm"
+
+INCLUDE "data/maps/headers/VermilionOldRodHouse.asm"
+INCLUDE "scripts/VermilionOldRodHouse.asm"
+INCLUDE "data/maps/objects/VermilionOldRodHouse.asm"
+
+INCLUDE "data/maps/headers/CeladonMart2F.asm"
+INCLUDE "scripts/CeladonMart2F.asm"
+INCLUDE "data/maps/objects/CeladonMart2F.asm"
+CeladonMart2F_Blocks: INCBIN "maps/CeladonMart2F.blk"
+
+INCLUDE "data/maps/headers/FuchsiaGoodRodHouse.asm"
+INCLUDE "scripts/FuchsiaGoodRodHouse.asm"
+INCLUDE "data/maps/objects/FuchsiaGoodRodHouse.asm"
+
+INCLUDE "data/maps/headers/Daycare.asm"
+INCLUDE "scripts/Daycare.asm"
+INCLUDE "data/maps/objects/Daycare.asm"
+
+INCLUDE "data/maps/headers/Route12SuperRodHouse.asm"
+INCLUDE "scripts/Route12SuperRodHouse.asm"
+INCLUDE "data/maps/objects/Route12SuperRodHouse.asm"
+
+INCLUDE "data/maps/headers/SilphCo8F.asm"
+INCLUDE "scripts/SilphCo8F.asm"
+INCLUDE "data/maps/objects/SilphCo8F.asm"
+SilphCo8F_Blocks: INCBIN "maps/SilphCo8F.blk"
+
+
+SECTION "Maps 13", ROMX
+
+INCLUDE "data/maps/headers/Route6.asm"
+INCLUDE "data/maps/objects/Route6.asm"
+Route6_Blocks: INCBIN "maps/Route6.blk"
+
+INCLUDE "data/maps/headers/Route8.asm"
+INCLUDE "data/maps/objects/Route8.asm"
+Route8_Blocks: INCBIN "maps/Route8.blk"
+
+INCLUDE "data/maps/headers/Route10.asm"
+INCLUDE "data/maps/objects/Route10.asm"
+Route10_Blocks: INCBIN "maps/Route10.blk"
+
+INCLUDE "data/maps/headers/Route11.asm"
+INCLUDE "data/maps/objects/Route11.asm"
+Route11_Blocks: INCBIN "maps/Route11.blk"
+
+INCLUDE "data/maps/headers/Route12.asm"
+INCLUDE "data/maps/objects/Route12.asm"
+Route12_Blocks: INCBIN "maps/Route12.blk"
+
+INCLUDE "data/maps/headers/Route15.asm"
+INCLUDE "data/maps/objects/Route15.asm"
+Route15_Blocks: INCBIN "maps/Route15.blk"
+
+INCLUDE "data/maps/headers/Route16.asm"
+INCLUDE "data/maps/objects/Route16.asm"
+Route16_Blocks: INCBIN "maps/Route16.blk"
+
+INCLUDE "data/maps/headers/Route18.asm"
+INCLUDE "data/maps/objects/Route18.asm"
+Route18_Blocks: INCBIN "maps/Route18.blk"
+
+ INCBIN "maps/UnusedPokecenterCopy.blk"
+
+
+SECTION "Maps 14", ROMX
+
+INCLUDE "scripts/Route6.asm"
+INCLUDE "scripts/Route8.asm"
+INCLUDE "scripts/Route10.asm"
+INCLUDE "scripts/Route11.asm"
+INCLUDE "scripts/Route12.asm"
+INCLUDE "scripts/Route15.asm"
+INCLUDE "scripts/Route16.asm"
+INCLUDE "scripts/Route18.asm"
+
+INCLUDE "data/maps/headers/PokemonFanClub.asm"
+INCLUDE "scripts/PokemonFanClub.asm"
+INCLUDE "data/maps/objects/PokemonFanClub.asm"
+PokemonFanClub_Blocks: INCBIN "maps/PokemonFanClub.blk"
+
+INCLUDE "data/maps/headers/SilphCo2F.asm"
+INCLUDE "scripts/SilphCo2F.asm"
+INCLUDE "data/maps/objects/SilphCo2F.asm"
+SilphCo2F_Blocks: INCBIN "maps/SilphCo2F.blk"
+
+INCLUDE "data/maps/headers/SilphCo3F.asm"
+INCLUDE "scripts/SilphCo3F.asm"
+INCLUDE "data/maps/objects/SilphCo3F.asm"
+SilphCo3F_Blocks: INCBIN "maps/SilphCo3F.blk"
+
+INCLUDE "data/maps/headers/SilphCo10F.asm"
+INCLUDE "scripts/SilphCo10F.asm"
+INCLUDE "data/maps/objects/SilphCo10F.asm"
+SilphCo10F_Blocks: INCBIN "maps/SilphCo10F.blk"
+
+INCLUDE "data/maps/headers/LancesRoom.asm"
+INCLUDE "scripts/LancesRoom.asm"
+INCLUDE "data/maps/objects/LancesRoom.asm"
+LancesRoom_Blocks: INCBIN "maps/LancesRoom.blk"
+
+INCLUDE "data/maps/headers/HallOfFame.asm"
+INCLUDE "scripts/HallOfFame.asm"
+INCLUDE "data/maps/objects/HallOfFame.asm"
+HallOfFame_Blocks: INCBIN "maps/HallOfFame.blk"
+
+
+SECTION "Maps 15", ROMX
+
+SaffronMart_Blocks:
+LavenderMart_Blocks:
+CeruleanMart_Blocks:
+VermilionMart_Blocks: INCBIN "maps/VermilionMart.blk"
+
+CopycatsHouse2F_Blocks:
+RedsHouse2F_Blocks: INCBIN "maps/RedsHouse2F.blk"
+
+Museum1F_Blocks: INCBIN "maps/Museum1F.blk"
+
+Museum2F_Blocks: INCBIN "maps/Museum2F.blk"
+
+SaffronPokecenter_Blocks:
+VermilionPokecenter_Blocks:
+LavenderPokecenter_Blocks:
+PewterPokecenter_Blocks: INCBIN "maps/PewterPokecenter.blk"
+
+UndergroundPathRoute7_Blocks:
+UndergroundPathRoute7Copy_Blocks:
+UndergroundPathRoute6_Blocks:
+UndergroundPathRoute5_Blocks: INCBIN "maps/UndergroundPathRoute5.blk"
+
+Route2Gate_Blocks:
+ViridianForestSouthGate_Blocks:
+ViridianForestNorthGate_Blocks: INCBIN "maps/ViridianForestNorthGate.blk"
+
+INCLUDE "data/maps/headers/RedsHouse2F.asm"
+INCLUDE "scripts/RedsHouse2F.asm"
+INCLUDE "data/maps/objects/RedsHouse2F.asm"
+
+
+SECTION "Maps 16", ROMX
+
+INCLUDE "data/maps/headers/Museum1F.asm"
+INCLUDE "scripts/Museum1F.asm"
+INCLUDE "data/maps/objects/Museum1F.asm"
+
+INCLUDE "data/maps/headers/Museum2F.asm"
+INCLUDE "scripts/Museum2F.asm"
+INCLUDE "data/maps/objects/Museum2F.asm"
+
+INCLUDE "data/maps/headers/PewterGym.asm"
+INCLUDE "scripts/PewterGym.asm"
+INCLUDE "data/maps/objects/PewterGym.asm"
+PewterGym_Blocks: INCBIN "maps/PewterGym.blk"
+
+INCLUDE "data/maps/headers/PewterPokecenter.asm"
+INCLUDE "scripts/PewterPokecenter.asm"
+INCLUDE "data/maps/objects/PewterPokecenter.asm"
+
+INCLUDE "data/maps/headers/CeruleanPokecenter.asm"
+INCLUDE "scripts/CeruleanPokecenter.asm"
+INCLUDE "data/maps/objects/CeruleanPokecenter.asm"
+CeruleanPokecenter_Blocks: INCBIN "maps/CeruleanPokecenter.blk"
+
+INCLUDE "data/maps/headers/CeruleanGym.asm"
+INCLUDE "scripts/CeruleanGym.asm"
+INCLUDE "data/maps/objects/CeruleanGym.asm"
+CeruleanGym_Blocks: INCBIN "maps/CeruleanGym.blk"
+
+INCLUDE "data/maps/headers/CeruleanMart.asm"
+INCLUDE "scripts/CeruleanMart.asm"
+INCLUDE "data/maps/objects/CeruleanMart.asm"
+
+INCLUDE "data/maps/headers/LavenderPokecenter.asm"
+INCLUDE "scripts/LavenderPokecenter.asm"
+INCLUDE "data/maps/objects/LavenderPokecenter.asm"
+
+INCLUDE "data/maps/headers/LavenderMart.asm"
+INCLUDE "scripts/LavenderMart.asm"
+INCLUDE "data/maps/objects/LavenderMart.asm"
+
+INCLUDE "data/maps/headers/VermilionPokecenter.asm"
+INCLUDE "scripts/VermilionPokecenter.asm"
+INCLUDE "data/maps/objects/VermilionPokecenter.asm"
+
+INCLUDE "data/maps/headers/VermilionMart.asm"
+INCLUDE "scripts/VermilionMart.asm"
+INCLUDE "data/maps/objects/VermilionMart.asm"
+
+INCLUDE "data/maps/headers/VermilionGym.asm"
+INCLUDE "scripts/VermilionGym.asm"
+INCLUDE "data/maps/objects/VermilionGym.asm"
+VermilionGym_Blocks: INCBIN "maps/VermilionGym.blk"
+
+INCLUDE "data/maps/headers/CopycatsHouse2F.asm"
+INCLUDE "scripts/CopycatsHouse2F.asm"
+INCLUDE "data/maps/objects/CopycatsHouse2F.asm"
+
+INCLUDE "data/maps/headers/FightingDojo.asm"
+INCLUDE "scripts/FightingDojo.asm"
+INCLUDE "data/maps/objects/FightingDojo.asm"
+FightingDojo_Blocks: INCBIN "maps/FightingDojo.blk"
+
+INCLUDE "data/maps/headers/SaffronGym.asm"
+INCLUDE "scripts/SaffronGym.asm"
+INCLUDE "data/maps/objects/SaffronGym.asm"
+SaffronGym_Blocks: INCBIN "maps/SaffronGym.blk"
+
+INCLUDE "data/maps/headers/SaffronMart.asm"
+INCLUDE "scripts/SaffronMart.asm"
+INCLUDE "data/maps/objects/SaffronMart.asm"
+
+INCLUDE "data/maps/headers/SilphCo1F.asm"
+INCLUDE "scripts/SilphCo1F.asm"
+INCLUDE "data/maps/objects/SilphCo1F.asm"
+SilphCo1F_Blocks: INCBIN "maps/SilphCo1F.blk"
+
+INCLUDE "data/maps/headers/SaffronPokecenter.asm"
+INCLUDE "scripts/SaffronPokecenter.asm"
+INCLUDE "data/maps/objects/SaffronPokecenter.asm"
+
+INCLUDE "data/maps/headers/ViridianForestNorthGate.asm"
+INCLUDE "scripts/ViridianForestNorthGate.asm"
+INCLUDE "data/maps/objects/ViridianForestNorthGate.asm"
+
+INCLUDE "data/maps/headers/Route2Gate.asm"
+INCLUDE "scripts/Route2Gate.asm"
+INCLUDE "data/maps/objects/Route2Gate.asm"
+
+INCLUDE "data/maps/headers/ViridianForestSouthGate.asm"
+INCLUDE "scripts/ViridianForestSouthGate.asm"
+INCLUDE "data/maps/objects/ViridianForestSouthGate.asm"
+
+INCLUDE "data/maps/headers/UndergroundPathRoute5.asm"
+INCLUDE "scripts/UndergroundPathRoute5.asm"
+INCLUDE "data/maps/objects/UndergroundPathRoute5.asm"
+
+INCLUDE "data/maps/headers/UndergroundPathRoute6.asm"
+INCLUDE "scripts/UndergroundPathRoute6.asm"
+INCLUDE "data/maps/objects/UndergroundPathRoute6.asm"
+
+INCLUDE "data/maps/headers/UndergroundPathRoute7.asm"
+INCLUDE "scripts/UndergroundPathRoute7.asm"
+INCLUDE "data/maps/objects/UndergroundPathRoute7.asm"
+
+INCLUDE "data/maps/headers/UndergroundPathRoute7Copy.asm"
+INCLUDE "scripts/UndergroundPathRoute7Copy.asm"
+INCLUDE "data/maps/objects/UndergroundPathRoute7Copy.asm"
+
+INCLUDE "data/maps/headers/SilphCo9F.asm"
+INCLUDE "scripts/SilphCo9F.asm"
+INCLUDE "data/maps/objects/SilphCo9F.asm"
+SilphCo9F_Blocks: INCBIN "maps/SilphCo9F.blk"
+
+INCLUDE "data/maps/headers/VictoryRoad1F.asm"
+INCLUDE "scripts/VictoryRoad1F.asm"
+INCLUDE "data/maps/objects/VictoryRoad1F.asm"
+VictoryRoad1F_Blocks: INCBIN "maps/VictoryRoad1F.blk"
+
+
+SECTION "Maps 17", ROMX
+
+ViridianForest_Blocks: INCBIN "maps/ViridianForest.blk"
+UndergroundPathNorthSouth_Blocks: INCBIN "maps/UndergroundPathNorthSouth.blk"
+UndergroundPathWestEast_Blocks: INCBIN "maps/UndergroundPathWestEast.blk"
+
+ INCBIN "maps/UnusedDiglettsCaveCopy.blk"
+
+SSAnneB1FRooms_Blocks:
+SSAnne2FRooms_Blocks: INCBIN "maps/SSAnne2FRooms.blk"
+
+INCLUDE "data/maps/headers/PokemonTower1F.asm"
+INCLUDE "scripts/PokemonTower1F.asm"
+INCLUDE "data/maps/objects/PokemonTower1F.asm"
+PokemonTower1F_Blocks: INCBIN "maps/PokemonTower1F.blk"
+
+INCLUDE "data/maps/headers/PokemonTower2F.asm"
+INCLUDE "scripts/PokemonTower2F.asm"
+INCLUDE "data/maps/objects/PokemonTower2F.asm"
+PokemonTower2F_Blocks: INCBIN "maps/PokemonTower2F.blk"
+
+INCLUDE "data/maps/headers/PokemonTower3F.asm"
+INCLUDE "scripts/PokemonTower3F.asm"
+INCLUDE "data/maps/objects/PokemonTower3F.asm"
+PokemonTower3F_Blocks: INCBIN "maps/PokemonTower3F.blk"
+
+INCLUDE "data/maps/headers/PokemonTower4F.asm"
+INCLUDE "scripts/PokemonTower4F.asm"
+INCLUDE "data/maps/objects/PokemonTower4F.asm"
+PokemonTower4F_Blocks: INCBIN "maps/PokemonTower4F.blk"
+
+INCLUDE "data/maps/headers/PokemonTower5F.asm"
+INCLUDE "scripts/PokemonTower5F.asm"
+INCLUDE "data/maps/objects/PokemonTower5F.asm"
+PokemonTower5F_Blocks: INCBIN "maps/PokemonTower5F.blk"
+
+INCLUDE "data/maps/headers/PokemonTower6F.asm"
+INCLUDE "scripts/PokemonTower6F.asm"
+INCLUDE "data/maps/objects/PokemonTower6F.asm"
+PokemonTower6F_Blocks: INCBIN "maps/PokemonTower6F.blk"
+
+ INCBIN "maps/UnusedEmptyMap.blk"
+
+INCLUDE "data/maps/headers/PokemonTower7F.asm"
+INCLUDE "scripts/PokemonTower7F.asm"
+INCLUDE "data/maps/objects/PokemonTower7F.asm"
+PokemonTower7F_Blocks: INCBIN "maps/PokemonTower7F.blk"
+
+
+SECTION "Maps 18", ROMX
+
+INCLUDE "data/maps/headers/ViridianForest.asm"
+INCLUDE "scripts/ViridianForest.asm"
+INCLUDE "data/maps/objects/ViridianForest.asm"
+
+INCLUDE "data/maps/headers/SSAnne1F.asm"
+INCLUDE "scripts/SSAnne1F.asm"
+INCLUDE "data/maps/objects/SSAnne1F.asm"
+SSAnne1F_Blocks: INCBIN "maps/SSAnne1F.blk"
+
+INCLUDE "data/maps/headers/SSAnne2F.asm"
+INCLUDE "scripts/SSAnne2F.asm"
+INCLUDE "data/maps/objects/SSAnne2F.asm"
+SSAnne2F_Blocks: INCBIN "maps/SSAnne2F.blk"
+
+INCLUDE "data/maps/headers/SSAnneB1F.asm"
+INCLUDE "scripts/SSAnneB1F.asm"
+INCLUDE "data/maps/objects/SSAnneB1F.asm"
+SSAnneB1F_Blocks: INCBIN "maps/SSAnneB1F.blk"
+
+INCLUDE "data/maps/headers/SSAnneBow.asm"
+INCLUDE "scripts/SSAnneBow.asm"
+INCLUDE "data/maps/objects/SSAnneBow.asm"
+SSAnneBow_Blocks: INCBIN "maps/SSAnneBow.blk"
+
+INCLUDE "data/maps/headers/SSAnneKitchen.asm"
+INCLUDE "scripts/SSAnneKitchen.asm"
+INCLUDE "data/maps/objects/SSAnneKitchen.asm"
+SSAnneKitchen_Blocks: INCBIN "maps/SSAnneKitchen.blk"
+
+INCLUDE "data/maps/headers/SSAnneCaptainsRoom.asm"
+INCLUDE "scripts/SSAnneCaptainsRoom.asm"
+INCLUDE "data/maps/objects/SSAnneCaptainsRoom.asm"
+SSAnneCaptainsRoom_Blocks: INCBIN "maps/SSAnneCaptainsRoom.blk"
+
+INCLUDE "data/maps/headers/SSAnne1FRooms.asm"
+INCLUDE "scripts/SSAnne1FRooms.asm"
+INCLUDE "data/maps/objects/SSAnne1FRooms.asm"
+SSAnne1FRooms_Blocks: INCBIN "maps/SSAnne1FRooms.blk"
+
+INCLUDE "data/maps/headers/SSAnne2FRooms.asm"
+INCLUDE "scripts/SSAnne2FRooms.asm"
+INCLUDE "data/maps/objects/SSAnne2FRooms.asm"
+
+INCLUDE "data/maps/headers/SSAnneB1FRooms.asm"
+INCLUDE "scripts/SSAnneB1FRooms.asm"
+INCLUDE "data/maps/objects/SSAnneB1FRooms.asm"
+
+INCLUDE "data/maps/headers/UndergroundPathNorthSouth.asm"
+INCLUDE "scripts/UndergroundPathNorthSouth.asm"
+INCLUDE "data/maps/objects/UndergroundPathNorthSouth.asm"
+
+INCLUDE "data/maps/headers/UndergroundPathWestEast.asm"
+INCLUDE "scripts/UndergroundPathWestEast.asm"
+INCLUDE "data/maps/objects/UndergroundPathWestEast.asm"
+
+INCLUDE "data/maps/headers/DiglettsCave.asm"
+INCLUDE "scripts/DiglettsCave.asm"
+INCLUDE "data/maps/objects/DiglettsCave.asm"
+DiglettsCave_Blocks: INCBIN "maps/DiglettsCave.blk"
+
+INCLUDE "data/maps/headers/SilphCo11F.asm"
+INCLUDE "scripts/SilphCo11F.asm"
+INCLUDE "data/maps/objects/SilphCo11F.asm"
+SilphCo11F_Blocks: INCBIN "maps/SilphCo11F.blk"
+
+
+SECTION "Maps 19", ROMX
+
+CopycatsHouse1F_Blocks: INCBIN "maps/CopycatsHouse1F.blk"
+
+CinnabarMart_Blocks:
+PewterMart_Blocks: INCBIN "maps/PewterMart.blk"
+
+FuchsiaBillsGrandpasHouse_Blocks: INCBIN "maps/FuchsiaBillsGrandpasHouse.blk"
+
+CinnabarPokecenter_Blocks:
+FuchsiaPokecenter_Blocks: INCBIN "maps/FuchsiaPokecenter.blk"
+
+CeruleanBadgeHouse_Blocks: INCBIN "maps/CeruleanBadgeHouse.blk"
+
+
+SECTION "Maps 20", ROMX
+
+INCLUDE "scripts/CeruleanCity_2.asm"
+
+INCLUDE "data/maps/headers/ViridianGym.asm"
+INCLUDE "scripts/ViridianGym.asm"
+INCLUDE "data/maps/objects/ViridianGym.asm"
+ViridianGym_Blocks: INCBIN "maps/ViridianGym.blk"
+
+INCLUDE "data/maps/headers/PewterMart.asm"
+INCLUDE "scripts/PewterMart.asm"
+INCLUDE "data/maps/objects/PewterMart.asm"
+
+INCLUDE "data/maps/headers/CeruleanCave1F.asm"
+INCLUDE "scripts/CeruleanCave1F.asm"
+INCLUDE "data/maps/objects/CeruleanCave1F.asm"
+CeruleanCave1F_Blocks: INCBIN "maps/CeruleanCave1F.blk"
+
+INCLUDE "data/maps/headers/CeruleanBadgeHouse.asm"
+INCLUDE "scripts/CeruleanBadgeHouse.asm"
+INCLUDE "data/maps/objects/CeruleanBadgeHouse.asm"
+
+
+SECTION "Maps 21", ROMX
+
+INCLUDE "data/maps/headers/FuchsiaBillsGrandpasHouse.asm"
+INCLUDE "scripts/FuchsiaBillsGrandpasHouse.asm"
+INCLUDE "data/maps/objects/FuchsiaBillsGrandpasHouse.asm"
+
+INCLUDE "data/maps/headers/FuchsiaPokecenter.asm"
+INCLUDE "scripts/FuchsiaPokecenter.asm"
+INCLUDE "data/maps/objects/FuchsiaPokecenter.asm"
+
+INCLUDE "data/maps/headers/WardensHouse.asm"
+INCLUDE "scripts/WardensHouse.asm"
+INCLUDE "data/maps/objects/WardensHouse.asm"
+WardensHouse_Blocks: INCBIN "maps/WardensHouse.blk"
+
+INCLUDE "data/maps/headers/SafariZoneGate.asm"
+INCLUDE "data/maps/objects/SafariZoneGate.asm"
+SafariZoneGate_Blocks: INCBIN "maps/SafariZoneGate.blk"
+INCLUDE "scripts/SafariZoneGate.asm"
+
+INCLUDE "data/maps/headers/FuchsiaGym.asm"
+INCLUDE "scripts/FuchsiaGym.asm"
+INCLUDE "data/maps/objects/FuchsiaGym.asm"
+FuchsiaGym_Blocks: INCBIN "maps/FuchsiaGym.blk"
+
+INCLUDE "data/maps/headers/FuchsiaMeetingRoom.asm"
+INCLUDE "scripts/FuchsiaMeetingRoom.asm"
+INCLUDE "data/maps/objects/FuchsiaMeetingRoom.asm"
+FuchsiaMeetingRoom_Blocks: INCBIN "maps/FuchsiaMeetingRoom.blk"
+
+INCLUDE "data/maps/headers/CinnabarGym.asm"
+INCLUDE "scripts/CinnabarGym.asm"
+INCLUDE "data/maps/objects/CinnabarGym.asm"
+CinnabarGym_Blocks: INCBIN "maps/CinnabarGym.blk"
+INCLUDE "scripts/CinnabarGym_2.asm"
+
+INCLUDE "data/maps/headers/CinnabarLab.asm"
+INCLUDE "scripts/CinnabarLab.asm"
+INCLUDE "data/maps/objects/CinnabarLab.asm"
+CinnabarLab_Blocks: INCBIN "maps/CinnabarLab.blk"
+
+INCLUDE "data/maps/headers/CinnabarLabTradeRoom.asm"
+INCLUDE "scripts/CinnabarLabTradeRoom.asm"
+INCLUDE "data/maps/objects/CinnabarLabTradeRoom.asm"
+CinnabarLabTradeRoom_Blocks: INCBIN "maps/CinnabarLabTradeRoom.blk"
+
+INCLUDE "data/maps/headers/CinnabarLabMetronomeRoom.asm"
+INCLUDE "scripts/CinnabarLabMetronomeRoom.asm"
+INCLUDE "data/maps/objects/CinnabarLabMetronomeRoom.asm"
+CinnabarLabMetronomeRoom_Blocks: INCBIN "maps/CinnabarLabMetronomeRoom.blk"
+
+INCLUDE "data/maps/headers/CinnabarLabFossilRoom.asm"
+INCLUDE "scripts/CinnabarLabFossilRoom.asm"
+INCLUDE "data/maps/objects/CinnabarLabFossilRoom.asm"
+CinnabarLabFossilRoom_Blocks: INCBIN "maps/CinnabarLabFossilRoom.blk"
+
+INCLUDE "data/maps/headers/CinnabarPokecenter.asm"
+INCLUDE "scripts/CinnabarPokecenter.asm"
+INCLUDE "data/maps/objects/CinnabarPokecenter.asm"
+
+INCLUDE "data/maps/headers/CinnabarMart.asm"
+INCLUDE "scripts/CinnabarMart.asm"
+INCLUDE "data/maps/objects/CinnabarMart.asm"
+
+INCLUDE "data/maps/headers/CopycatsHouse1F.asm"
+INCLUDE "scripts/CopycatsHouse1F.asm"
+INCLUDE "data/maps/objects/CopycatsHouse1F.asm"
+
+INCLUDE "data/maps/headers/ChampionsRoom.asm"
+INCLUDE "scripts/ChampionsRoom.asm"
+INCLUDE "data/maps/objects/ChampionsRoom.asm"
+ChampionsRoom_Blocks: INCBIN "maps/ChampionsRoom.blk"
+
+INCLUDE "data/maps/headers/LoreleisRoom.asm"
+INCLUDE "scripts/LoreleisRoom.asm"
+INCLUDE "data/maps/objects/LoreleisRoom.asm"
+LoreleisRoom_Blocks: INCBIN "maps/LoreleisRoom.blk"
+
+INCLUDE "data/maps/headers/BrunosRoom.asm"
+INCLUDE "scripts/BrunosRoom.asm"
+INCLUDE "data/maps/objects/BrunosRoom.asm"
+BrunosRoom_Blocks: INCBIN "maps/BrunosRoom.blk"
+
+INCLUDE "data/maps/headers/AgathasRoom.asm"
+INCLUDE "scripts/AgathasRoom.asm"
+INCLUDE "data/maps/objects/AgathasRoom.asm"
+AgathasRoom_Blocks: INCBIN "maps/AgathasRoom.blk"
diff --git a/maps/green/CeruleanCave1F.blk b/maps/green/CeruleanCave1F.blk
new file mode 100644
index 00000000..689593fd
--- /dev/null
+++ b/maps/green/CeruleanCave1F.blk
@@ -0,0 +1,3 @@
+|_vvvv|bRvvvvvfm,+vvvvv'fv,+|vvtvf,v=vvv f S
+ ^-f+
+$ \ No newline at end of file
diff --git a/maps/green/CeruleanCave2F.blk b/maps/green/CeruleanCave2F.blk
new file mode 100644
index 00000000..c62864da
--- /dev/null
+++ b/maps/green/CeruleanCave2F.blk
@@ -0,0 +1 @@
+ (  ((    (#( \ No newline at end of file
diff --git a/maps/green/CeruleanCaveB1F.blk b/maps/green/CeruleanCaveB1F.blk
new file mode 100644
index 00000000..8411849f
--- /dev/null
+++ b/maps/green/CeruleanCaveB1F.blk
@@ -0,0 +1 @@
+n !"n,- " L  "avvv "Q-+tv "vfvvNvvvvvvf--SQvvvvvL  \ No newline at end of file
diff --git a/pokeyellow.link b/pokeyellow.link
deleted file mode 100644
index 60b2beaf..00000000
--- a/pokeyellow.link
+++ /dev/null
@@ -1,345 +0,0 @@
-ROM0
- org $0000
- "rst 00"
-
- org $0008
- "rst 08"
-
- org $0010
- "rst 10"
-
- org $0018
- "rst 18"
-
- org $0020
- "rst 20"
-
- org $0028
- "rst 28"
-
- org $0030
- "rst 30"
-
- org $0038
- "rst 38"
-
- org $0040
- "vblank"
-
- org $0048
- "hblank"
-
- org $0050
- "timer"
-
- org $0058
- "serial"
-
- org $0060
- "joypad"
- ; $0061
- "Home"
-
- org $100
- "Entry"
- ; $0104
- "Header"
-
- org $150
- "Main"
-
-ROMX $1
- org $4000
- "bank1"
-
-ROMX $2
- org $4000
- "Sound Effect Headers 1" ; AUDIO_1
- "Music Headers 1"
- "Sound Effects 1"
- "Audio Engine 1"
- "Music 1"
-
-ROMX $3
- org $4000
- "bank3"
-
-ROMX $4
- org $4000
- "Graphics (BANK 4)"
- "NPC Sprites 1"
-
-ROMX $5
- org $4000
- "NPC Sprites 2"
-
-ROMX $6
- org $4000
- "bank6"
-
-ROMX $7
- org $4000
- "bank7"
-
-ROMX $8
- org $4000
- "Sound Effect Headers 2" ; AUDIO_2
- "Music Headers 2"
- "Sound Effects 2"
- "Audio Engine 2"
- "Music 2"
-
-ROMX $9
- org $4000
- "Pics 1"
-
-ROMX $A
- org $4000
- "Pics 2"
-
-ROMX $B
- org $4000
- "Pics 3"
-
-ROMX $C
- org $4000
- "Pics 4"
-
-ROMX $D
- org $4000
- "Pics 5"
-
-ROMX $E
- org $4000
- "bankE"
-
-ROMX $F
- org $4000
- "bankF"
-
-ROMX $10
- org $4000
- "bank10"
-
-ROMX $11
- org $4000
- "bank11"
-
-ROMX $12
- org $4000
- "bank12"
-
-ROMX $13
- org $4000
- "bank13"
-
-ROMX $14
- org $4000
- "bank14"
-
-ROMX $15
- org $4000
- "bank15"
-
-ROMX $16
- org $4000
- "bank16"
-
-ROMX $17
- org $4000
- "bank17"
-
-ROMX $18
- org $4000
- "bank18"
-
-ROMX $19
- org $4000
- "bank19"
-
-ROMX $1A
- org $4000
- "bank1A"
-
-ROMX $1B
- org $4000
- "bank1B"
-
-ROMX $1C
- org $4000
- "bank1C"
-
-ROMX $1D
- org $4000
- "bank1D"
-
-ROMX $1E
- org $4000
- "bank1E"
-
-ROMX $1F
- org $4000
- "Sound Effect Headers 3" ; AUDIO_3
- "Music Headers 3"
- "Sound Effects 3"
- "Audio Engine 3"
- "Music 3"
-
-ROMX $20
- org $4000
- "Sound Effect Headers 4" ; AUDIO_4
- "Music Headers 4"
- "Sound Effects 4"
- "Audio Engine 4"
- "Music 4"
-
-ROMX $21
- org $4000
- "Pikachu Cries 1"
-
-ROMX $22
- org $4000
- "Pikachu Cries 2"
-
-ROMX $23
- org $4000
- "Pikachu Cries 3"
-
-ROMX $24
- org $4000
- "Pikachu Cries 4"
-
-ROMX $25
- org $4000
- "Pikachu Cries 5"
-
-ROMX $26
- org $4000
- "Text 1"
-
-ROMX $27
- org $4000
- "Text 2"
-
-ROMX $28
- org $4000
- "Text 3"
-
-ROMX $29
- org $4000
- "Text 4"
-
-ROMX $2A
- org $4000
- "Text 5"
-
-ROMX $2B
- org $4000
- "Text 6"
-
-ROMX $2C
- org $4000
- "Text 7"
-
-ROMX $2D
- org $4000
- "Text 8"
-
-ROMX $2E
- org $4000
- "Pokedex Text"
-
-ROMX $2f
- org $4000
- "Move Names"
- org $5000
- "bank2f"
-
-ROMX $30
- org $4000
- "bank30"
-
-ROMX $31
- org $4000
- "Pikachu Cries 6"
-
-ROMX $32
- org $4000
- "Pikachu Cries 7"
-
-ROMX $33
- org $4000
- "Pikachu Cries 8"
-
-ROMX $34
- org $4000
- "Pikachu Cries 9"
-
-ROMX $35
- org $4000
- "Pikachu Cries 10"
-
-ROMX $36
- org $4000
- "Pikachu Cries 11"
-
-ROMX $37
- org $4000
- "Pikachu Cries 12"
-
-ROMX $38
- org $4000
- "Pikachu Cries 13"
-
-ROMX $39
- org $4000
- "bank39"
-
-ROMX $3A
- org $4000
- "bank3A"
-
-; bank $3b is empty
-
-ROMX $3C
- org $4000
- "bank3C"
-
-ROMX $3D
- org $4000
- "bank3D"
-
-ROMX $3E
- org $4000
- "bank3E"
-
-ROMX $3F
- org $4000
- "bank3F"
-
-WRAM0
- org $c000
- "WRAM Bank 0"
- org $c100
- "Sprite State Data"
- org $c300
- "OAM Buffer"
-
-WRAMX 1
- org $d000
- "WRAM Bank 1"
- org $dfff
- "Stack"
-
-SRAM 0
- "Sprite Buffers"
-
-SRAM 1
- "Save Data"
-
-SRAM 2
- "Saved Boxes 1"
-
-SRAM 3
- "Saved Boxes 2"
-
diff --git a/rgbdscheck.asm b/rgbdscheck.asm
new file mode 100644
index 00000000..73a10332
--- /dev/null
+++ b/rgbdscheck.asm
@@ -0,0 +1,12 @@
+; pokered requires rgbds 0.4.1 or newer.
+MAJOR EQU 0
+MINOR EQU 4
+PATCH EQU 1
+
+IF !DEF(__RGBDS_MAJOR__) || !DEF(__RGBDS_MINOR__) || !DEF(__RGBDS_PATCH__)
+ fail "pokered requires rgbds {MAJOR}.{MINOR}.{PATCH} or newer."
+ELIF (__RGBDS_MAJOR__ < MAJOR) || \
+ (__RGBDS_MAJOR__ == MAJOR && __RGBDS_MINOR__ < MINOR) || \
+ (__RGBDS_MAJOR__ == MAJOR && __RGBDS_MINOR__ == MINOR && __RGBDS_PATCH__ < PATCH)
+ fail "pokered requires rgbds {MAJOR}.{MINOR}.{PATCH} or newer."
+ENDC
diff --git a/roms.md5 b/roms.md5
deleted file mode 100644
index 6b047539..00000000
--- a/roms.md5
+++ /dev/null
@@ -1 +0,0 @@
-d9290db87b1f0a23b89f99ee4469e34b pokeyellow.gbc
diff --git a/roms.sha1 b/roms.sha1
new file mode 100644
index 00000000..e61e2279
--- /dev/null
+++ b/roms.sha1
@@ -0,0 +1 @@
+cc7d03262ebfaf2f06772c1a480c7d9d5f4a38e1 *pokeyellow.gbc
diff --git a/scripts/AgathasRoom.asm b/scripts/AgathasRoom.asm
index 20245166..9aa957f5 100755
--- a/scripts/AgathasRoom.asm
+++ b/scripts/AgathasRoom.asm
@@ -64,8 +64,8 @@ AgathaScript0:
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
- ld [hJoyPressed], a
- ld [hJoyHeld], a
+ ldh [hJoyPressed], a
+ ldh [hJoyHeld], a
ld [wSimulatedJoypadStatesEnd], a
ld [wSimulatedJoypadStatesIndex], a
ld a, [wCoordIndex]
@@ -75,7 +75,7 @@ AgathaScript0:
jr z, AgathaScriptWalkIntoRoom
.stopPlayerFromLeaving
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID ; "Don't run away!"
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
@@ -88,11 +88,11 @@ AgathaScript0:
ret
AgathaEntranceCoords:
- db $0A,$04
- db $0A,$05
- db $0B,$04
- db $0B,$05
- db $FF
+ dbmapcoord 4, 10
+ dbmapcoord 5, 10
+ dbmapcoord 4, 11
+ dbmapcoord 5, 11
+ db -1 ; end
AgathaScript3:
ld a, [wSimulatedJoypadStatesIndex]
@@ -111,7 +111,7 @@ AgathaScript2:
cp $ff
jp z, ResetAgathaScript
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $1
ld [wChampionsRoomCurScript], a
@@ -122,34 +122,27 @@ AgathasRoom_TextPointers:
dw AgathaDontRunAwayText
AgathaTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_AGATHAS_ROOM_TRAINER_0
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_AGATHAS_ROOM_TRAINER_0
- dw AgathaBeforeBattleText ; TextBeforeBattle
- dw AgathaAfterBattleText ; TextAfterBattle
- dw AgathaEndBattleText ; TextEndBattle
- dw AgathaEndBattleText ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_AGATHAS_ROOM_TRAINER_0, 0, AgathaBeforeBattleText, AgathaEndBattleText, AgathaAfterBattleText
+ db -1 ; end
AgathaText1:
- TX_ASM
+ text_asm
ld hl, AgathaTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
AgathaBeforeBattleText:
- TX_FAR _AgathaBeforeBattleText
- db "@"
+ text_far _AgathaBeforeBattleText
+ text_end
AgathaEndBattleText:
- TX_FAR _AgathaEndBattleText
- db "@"
+ text_far _AgathaEndBattleText
+ text_end
AgathaAfterBattleText:
- TX_FAR _AgathaAfterBattleText
- db "@"
+ text_far _AgathaAfterBattleText
+ text_end
AgathaDontRunAwayText:
- TX_FAR _AgathaDontRunAwayText
- db "@"
+ text_far _AgathaDontRunAwayText
+ text_end
diff --git a/scripts/BeachHouse.asm b/scripts/BeachHouse.asm
index 6a67c7ab..2059f59d 100644
--- a/scripts/BeachHouse.asm
+++ b/scripts/BeachHouse.asm
@@ -11,7 +11,7 @@ BeachHouse_TextPointers:
dw BeachHouseSign4Text
SurfinDudeText:
- TX_ASM
+ text_asm
ld a, [wd472]
bit 6, a
jr nz, .next
@@ -35,7 +35,7 @@ SurfinDudeText:
jr nz, .asm_f226b
ld a, 1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- callba SurfingPikachuMinigame
+ farcall SurfingPikachuMinigame
ld hl, wd492
set 1, [hl]
jr .done
@@ -46,20 +46,20 @@ SurfinDudeText:
jp TextScriptEnd
.SurfinDudeText1
- TX_FAR _SurfinDudeText1
- db "@"
+ text_far _SurfinDudeText1
+ text_end
.SurfinDudeText2
- TX_FAR _SurfinDudeText2
- db "@"
+ text_far _SurfinDudeText2
+ text_end
.SurfinDudeText3
- TX_FAR _SurfinDudeText3
- db "@"
+ text_far _SurfinDudeText3
+ text_end
.SurfinDudeText4
- TX_FAR _SurfinDudeText4
- db "@"
+ text_far _SurfinDudeText4
+ text_end
BeachHousePikachuText:
- TX_ASM
+ text_asm
ld hl, .BeachHousePikachuText
call PrintText
ld a, PIKACHU
@@ -68,11 +68,11 @@ BeachHousePikachuText:
jp TextScriptEnd
.BeachHousePikachuText
- TX_FAR _BeachHousePikachuText
- db "@"
+ text_far _BeachHousePikachuText
+ text_end
BeachHouseSign1Text:
- TX_ASM
+ text_asm
ld hl, .BeachHouseSign1Text2
ld a, [wd472]
bit 6, a
@@ -83,14 +83,14 @@ BeachHouseSign1Text:
jp TextScriptEnd
.BeachHouseSign1Text1
- TX_FAR _BeachHouseSign1Text1
- db "@"
+ text_far _BeachHouseSign1Text1
+ text_end
.BeachHouseSign1Text2
- TX_FAR _BeachHouseSign1Text2
- db "@"
+ text_far _BeachHouseSign1Text2
+ text_end
BeachHouseSign2Text:
- TX_ASM
+ text_asm
ld hl, .BeachHouseSign2Text2
ld a, [wd472]
bit 6, a
@@ -101,14 +101,14 @@ BeachHouseSign2Text:
jp TextScriptEnd
.BeachHouseSign2Text1
- TX_FAR _BeachHouseSign2Text1
- db "@"
+ text_far _BeachHouseSign2Text1
+ text_end
.BeachHouseSign2Text2
- TX_FAR _BeachHouseSign2Text2
- db "@"
+ text_far _BeachHouseSign2Text2
+ text_end
BeachHouseSign3Text:
- TX_ASM
+ text_asm
ld hl, .BeachHouseSign3Text2
ld a, [wd472]
bit 6, a
@@ -119,14 +119,14 @@ BeachHouseSign3Text:
jp TextScriptEnd
.BeachHouseSign3Text1
- TX_FAR _BeachHouseSign3Text1
- db "@"
+ text_far _BeachHouseSign3Text1
+ text_end
.BeachHouseSign3Text2
- TX_FAR _BeachHouseSign3Text2
- db "@"
+ text_far _BeachHouseSign3Text2
+ text_end
BeachHouseSign4Text:
- TX_ASM
+ text_asm
ld a, 1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, [wd472]
@@ -158,7 +158,7 @@ BeachHouseSign4Text:
set 6, [hl]
xor a
ld [wUpdateSpritesEnabled], a
- callab Printer_PrepareSurfingMinigameHighScoreTileMap
+ callfar Printer_PrepareSurfingMinigameHighScoreTileMap
call WaitForTextScrollButtonPress
ld hl, wd730
res 6, [hl]
@@ -178,14 +178,16 @@ BeachHouseSign4Text:
jp TextScriptEnd
.BeachHousePrinterText1
- TX_FAR _BeachHousePrinterText1
- db $d, "@"
+ text_far _BeachHousePrinterText1
+ text_waitbutton
+ text_end
.BeachHousePrinterText2
- TX_FAR _BeachHousePrinterText2
- db $d, "@"
+ text_far _BeachHousePrinterText2
+ text_waitbutton
+ text_end
.BeachHousePrinterText3
- TX_FAR _BeachHousePrinterText3
- db "@"
+ text_far _BeachHousePrinterText3
+ text_end
.BeachHousePrinterText4
- TX_FAR _BeachHousePrinterText4
- db "@"
+ text_far _BeachHousePrinterText4
+ text_end
diff --git a/scripts/BeachHouse2.asm b/scripts/BeachHouse2.asm
index a5b7e7be..1cf570bc 100755
--- a/scripts/BeachHouse2.asm
+++ b/scripts/BeachHouse2.asm
@@ -4,7 +4,7 @@ Func_f23d0:
ld [wUpdateSpritesEnabled], a
ld hl, wd730
set 6, [hl]
- callab PrintSurfingMinigameHighScore
+ callfar PrintSurfingMinigameHighScore
ld hl, wd730
res 6, [hl]
call GBPalWhiteOutWithDelay3
@@ -14,7 +14,7 @@ Func_f23d0:
call Delay3
call GBPalNormal
ld hl, Text_f2412
- ld a, [hOaksAideResult]
+ ldh a, [hOaksAideResult]
and a
jr nz, .asm_f2406
ld hl, Text_f240c
@@ -23,11 +23,11 @@ Func_f23d0:
jp TextScriptEnd
Text_f240c:
- TX_FAR _BeachHousePrinterText5
- TX_WAIT
- db "@"
+ text_far _BeachHousePrinterText5
+ text_waitbutton
+ text_end
Text_f2412:
- TX_FAR _BeachHousePrinterText6
- TX_WAIT
- db "@"
+ text_far _BeachHousePrinterText6
+ text_waitbutton
+ text_end
diff --git a/scripts/BikeShop.asm b/scripts/BikeShop.asm
index a554cf7c..e4345e8e 100755
--- a/scripts/BikeShop.asm
+++ b/scripts/BikeShop.asm
@@ -8,7 +8,7 @@ BikeShop_TextPointers:
dw BikeShopText3
BikeShopText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_BICYCLE
jr z, .asm_260d4
ld hl, BikeShopText_1d82f
@@ -25,8 +25,8 @@ BikeShopText1:
call GiveItem
jr nc, .BagFull
ld a, BIKE_VOUCHER
- ld [$ffdb], a
- callba RemoveItemByID
+ ldh [hItemToRemoveID], a
+ farcall RemoveItemByID
SetEvent EVENT_GOT_BICYCLE
ld hl, BikeShopText_1d824
call PrintText
@@ -53,14 +53,14 @@ BikeShopText1:
ld [wTopMenuItemX], a
ld hl, wd730
set 6, [hl]
- coord hl, 0, 0
+ hlcoord 0, 0
lb bc, 4, 15
call TextBoxBorder
call UpdateSprites
- coord hl, 2, 2
+ hlcoord 2, 2
ld de, BikeShopMenuText
call PlaceString
- coord hl, 8, 3
+ hlcoord 8, 3
ld de, BikeShopMenuPrice
call PlaceString
ld hl, BikeShopText_1d815
@@ -90,50 +90,50 @@ BikeShopMenuPrice:
db "¥1000000@"
BikeShopText_1d810:
- TX_FAR _BikeShopText_1d810
- db "@"
+ text_far _BikeShopText_1d810
+ text_end
BikeShopText_1d815:
- TX_FAR _BikeShopText_1d815
- db "@"
+ text_far _BikeShopText_1d815
+ text_end
BikeShopCantAffordText:
- TX_FAR _BikeShopCantAffordText
- db "@"
+ text_far _BikeShopCantAffordText
+ text_end
BikeShopText_1d81f:
- TX_FAR _BikeShopText_1d81f
- db "@"
+ text_far _BikeShopText_1d81f
+ text_end
BikeShopText_1d824:
- TX_FAR _BikeShopText_1d824
- TX_SFX_KEY_ITEM
- db "@"
+ text_far _BikeShopText_1d824
+ sound_get_key_item
+ text_end
BikeShopComeAgainText:
- TX_FAR _BikeShopComeAgainText
- db "@"
+ text_far _BikeShopComeAgainText
+ text_end
BikeShopText_1d82f:
- TX_FAR _BikeShopText_1d82f
- db "@"
+ text_far _BikeShopText_1d82f
+ text_end
BikeShopText_1d834:
- TX_FAR _BikeShopText_1d834
- db "@"
+ text_far _BikeShopText_1d834
+ text_end
BikeShopText2:
- TX_ASM
+ text_asm
ld hl, BikeShopText_1d843
call PrintText
jp TextScriptEnd
BikeShopText_1d843:
- TX_FAR _BikeShopText_1d843
- db "@"
+ text_far _BikeShopText_1d843
+ text_end
BikeShopText3:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_BICYCLE
ld hl, BikeShopText_1d861
jr nz, .asm_34d2d
@@ -143,9 +143,9 @@ BikeShopText3:
jp TextScriptEnd
BikeShopText_1d85c:
- TX_FAR _BikeShopText_1d85c
- db "@"
+ text_far _BikeShopText_1d85c
+ text_end
BikeShopText_1d861:
- TX_FAR _BikeShopText_1d861
- db "@"
+ text_far _BikeShopText_1d861
+ text_end
diff --git a/scripts/BillsHouse.asm b/scripts/BillsHouse.asm
index a9e09947..8559c0b1 100755
--- a/scripts/BillsHouse.asm
+++ b/scripts/BillsHouse.asm
@@ -41,9 +41,9 @@ BillsHouseScript0:
ld a, [wd472]
bit 7, a
jr z, .asm_1e0d2
- callab CheckPikachuFaintedOrStatused
+ callfar CheckPikachuFaintedOrStatused
jr c, .asm_1e0d2
- callab Func_f24d5
+ callfar Func_f24d5
.asm_1e0d2
xor a
ld [wJoyIgnore], a
@@ -63,12 +63,12 @@ BillsHouseScript2:
jr nz, .notDown
call CheckPikachuFollowingPlayer
jr nz, .asm_1e0f8
- callab Func_f250b
+ callfar Func_f250b
.asm_1e0f8
ld de, MovementData_1e7a0
.notDown
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call MoveSprite
ld a, $3
ld [wBillsHouseCurScript], a
@@ -78,7 +78,7 @@ MovementData_1e79c:
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
; make Bill walk around the player
MovementData_1e7a0:
@@ -87,7 +87,7 @@ MovementData_1e7a0:
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
BillsHouseScript3:
ld a, [wd730]
@@ -105,7 +105,7 @@ BillsHouseScript3:
ld hl, PikachuMovementData_1e152
.asm_1e133
call ApplyPikachuMovementData
- callab InitializePikachuTextID
+ callfar InitializePikachuTextID
.asm_1e13e
xor a
ld [wJoyIgnore], a
@@ -144,13 +144,13 @@ BillsHouseScript5:
ld a, $2
ld [wSpriteIndex], a
ld a, $c
- ld [$ffeb], a
+ ldh [hSpriteScreenYCoord], a
ld a, $40
- ld [$ffec], a
- ld a, $6
- ld [$ffed], a
- ld a, $5
- ld [$ffee], a
+ ldh [hSpriteScreenXCoord], a
+ ld a, 6
+ ldh [hSpriteMapYCoord], a
+ ld a, 5
+ ldh [hSpriteMapXCoord], a
call SetSpritePosition1
ld a, HS_BILL_1
ld [wMissableObjectIndex], a
@@ -163,9 +163,9 @@ BillsHouseScript5:
call CheckPikachuFollowingPlayer
jr z, .asm_1e1c6
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, SPRITE_FACING_DOWN
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld hl, PikachuMovementData_1e1a9
call ApplyPikachuMovementData
@@ -174,10 +174,10 @@ BillsHouseScript5:
ld a, EXCLAMATION_BUBBLE
ld [wWhichEmotionBubble], a
predef EmotionBubble
- callab InitializePikachuTextID
+ callfar InitializePikachuTextID
.asm_1e1c6
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld de, MovementData_1e807
call MoveSprite
ld a, $6
@@ -190,7 +190,7 @@ MovementData_1e807:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
PikachuMovementData_1e1a9:
db $00
@@ -225,7 +225,7 @@ BillsHouseScript7:
ret
RLE_1e219:
- db D_RIGHT,$3
+ db D_RIGHT, $3
db $FF
BillsHouseScript8:
@@ -237,14 +237,14 @@ BillsHouseScript8:
ld a, SPRITE_FACING_UP
ld [wSpritePlayerStateData1FacingDirection], a
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, SPRITE_FACING_DOWN
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
xor a
ld [wJoyIgnore], a
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $9
ld [wBillsHouseCurScript], a
@@ -260,20 +260,20 @@ BillsHouse_TextPointers:
dw BillsHouseText4
BillsHouseText4:
- TX_FAR _BillsHouseDontLeaveText
- db "@"
+ text_far _BillsHouseDontLeaveText
+ text_end
BillsHouseText1:
- TX_ASM
- callba Func_f2418
+ text_asm
+ farcall Func_f2418
jp TextScriptEnd
BillsHouseText2:
- TX_ASM
- callba Func_f244a
+ text_asm
+ farcall Func_f244a
jp TextScriptEnd
BillsHouseText3:
- TX_ASM
- callba Func_f24a2
+ text_asm
+ farcall Func_f24a2
jp TextScriptEnd
diff --git a/scripts/BillsHouse2.asm b/scripts/BillsHouse2.asm
index ce474004..b1c6e820 100755
--- a/scripts/BillsHouse2.asm
+++ b/scripts/BillsHouse2.asm
@@ -1,4 +1,4 @@
-Func_f2418:
+Func_f2418::
ld hl, BillsHouseText_f243b
call PrintText
call YesNoChoice
@@ -18,18 +18,18 @@ Func_f2418:
jr .asm_f2427
BillsHouseText_f243b:
- TX_FAR _BillsHouseText_1e865
- db "@"
+ text_far _BillsHouseText_1e865
+ text_end
BillsHouseText_f2440:
- TX_FAR _BillsHouseText_1e86a
- db "@"
+ text_far _BillsHouseText_1e86a
+ text_end
BillsHouseText_f2445:
- TX_FAR _BillsHouseText_1e86f
- db "@"
+ text_far _BillsHouseText_1e86f
+ text_end
-Func_f244a:
+Func_f244a::
CheckEvent EVENT_GOT_SS_TICKET
jr nz, .asm_f247e
ld hl, BillsHouseText_f248c
@@ -57,31 +57,31 @@ Func_f244a:
ret
BillsHouseText_f248c:
- TX_FAR _BillThankYouText
- db "@"
+ text_far _BillThankYouText
+ text_end
BillsHouseText_f2491:
- TX_FAR _SSTicketReceivedText
- TX_SFX_KEY_ITEM
- TX_BLINK
- db "@"
+ text_far _SSTicketReceivedText
+ sound_get_key_item
+ text_promptbutton
+ text_end
BillsHouseText_f2498:
- TX_FAR _SSTicketNoRoomText
- db "@"
+ text_far _SSTicketNoRoomText
+ text_end
BillsHouseText_f249d:
- TX_FAR _BillsHouseText_1e8cb
- db "@"
+ text_far _BillsHouseText_1e8cb
+ text_end
-Func_f24a2:
+Func_f24a2::
ld hl, BillsHouseText_f24a9
call PrintText
ret
BillsHouseText_f24a9:
- TX_FAR _BillsHouseText_1e8da
- db "@"
+ text_far _BillsHouseText_1e8da
+ text_end
Func_f24ae:
ld a, [wCurMap]
@@ -106,7 +106,7 @@ Func_f24ae:
ld e, $ff
ret
-Func_f24d5:
+Func_f24d5::
ld a, $ff
ld [wJoyIgnore], a
xor a
@@ -121,7 +121,7 @@ Func_f24d5:
ld [wWhichEmotionBubble], a
predef EmotionBubble
call DisablePikachuFollowingPlayer
- callab InitializePikachuTextID
+ callfar InitializePikachuTextID
ret
Data_f2505:
@@ -132,7 +132,7 @@ Data_f2505:
db $1e
db $3f
-Func_f250b:
+Func_f250b::
ld hl, Data_f251c
ld b, SPRITE_FACING_UP
call TryApplyPikachuMovementData
diff --git a/scripts/BluesHouse.asm b/scripts/BluesHouse.asm
index 471e6989..9d9bf33a 100755
--- a/scripts/BluesHouse.asm
+++ b/scripts/BluesHouse.asm
@@ -11,75 +11,76 @@ BluesHouse_ScriptPointers:
BluesHouseScript0:
SetEvent EVENT_ENTERED_BLUES_HOUSE
-
- ; trigger the next script
- ld a, 1
+ ld a, $1
ld [wBluesHouseCurScript], a
BluesHouseScript1:
ret
BluesHouse_TextPointers:
- dw BluesHouseText1
- dw BluesHouseText2
- dw BluesHouseText3
+ dw BluesHouseDaisySittingText
+ dw BluesHouseDaisyWalkingText
+ dw BluesHouseTownMapText
-BluesHouseText1:
- TX_ASM
+BluesHouseDaisySittingText:
+ text_asm
CheckEvent EVENT_GOT_TOWN_MAP
- jr nz, .GotMap
+ jr nz, .got_town_map
CheckEvent EVENT_GOT_POKEDEX
- jr nz, .GiveMap
+ jr nz, .give_town_map
ld hl, DaisyInitialText
call PrintText
jr .done
-.GiveMap
+
+.give_town_map
ld hl, DaisyOfferMapText
call PrintText
lb bc, TOWN_MAP, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld a, HS_TOWN_MAP
ld [wMissableObjectIndex], a
- predef HideObject ; hide table map object
+ predef HideObject
ld hl, GotMapText
call PrintText
SetEvent EVENT_GOT_TOWN_MAP
jr .done
-.GotMap
+
+.got_town_map
ld hl, DaisyUseMapText
call PrintText
jr .done
-.BagFull
+
+.bag_full
ld hl, DaisyBagFullText
call PrintText
.done
jp TextScriptEnd
DaisyInitialText:
- TX_FAR _DaisyInitialText
- db "@"
+ text_far _DaisyInitialText
+ text_end
DaisyOfferMapText:
- TX_FAR _DaisyOfferMapText
- db "@"
+ text_far _DaisyOfferMapText
+ text_end
GotMapText:
- TX_FAR _GotMapText
- TX_SFX_KEY_ITEM
- db "@"
+ text_far _GotMapText
+ sound_get_key_item
+ text_end
DaisyBagFullText:
- TX_FAR _DaisyBagFullText
- db "@"
+ text_far _DaisyBagFullText
+ text_end
DaisyUseMapText:
- TX_FAR _DaisyUseMapText
- db "@"
+ text_far _DaisyUseMapText
+ text_end
-BluesHouseText2: ; Daisy, walking around
- TX_FAR _BluesHouseText2
- db "@"
+BluesHouseDaisyWalkingText:
+ text_far _BluesHouseDaisyWalkingText
+ text_end
-BluesHouseText3: ; map on table
- TX_FAR _BluesHouseText3
- db "@"
+BluesHouseTownMapText:
+ text_far _BluesHouseTownMapText
+ text_end
diff --git a/scripts/BrunosRoom.asm b/scripts/BrunosRoom.asm
index a525e5bb..e5ecc1af 100755
--- a/scripts/BrunosRoom.asm
+++ b/scripts/BrunosRoom.asm
@@ -64,8 +64,8 @@ BrunoScript0:
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
- ld [hJoyPressed], a
- ld [hJoyHeld], a
+ ldh [hJoyPressed], a
+ ldh [hJoyHeld], a
ld [wSimulatedJoypadStatesEnd], a
ld [wSimulatedJoypadStatesIndex], a
ld a, [wCoordIndex]
@@ -75,7 +75,7 @@ BrunoScript0:
jr z, BrunoScriptWalkIntoRoom
.stopPlayerFromLeaving
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID ; "Don't run away!"
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
@@ -88,11 +88,11 @@ BrunoScript0:
ret
BrunoEntranceCoords:
- db $0A,$04
- db $0A,$05
- db $0B,$04
- db $0B,$05
- db $FF
+ dbmapcoord 4, 10
+ dbmapcoord 5, 10
+ dbmapcoord 4, 11
+ dbmapcoord 5, 11
+ db -1 ; end
BrunoScript3:
ld a, [wSimulatedJoypadStatesIndex]
@@ -111,7 +111,7 @@ BrunoScript2:
cp $ff
jp z, ResetBrunoScript
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
BrunosRoom_TextPointers:
@@ -119,34 +119,27 @@ BrunosRoom_TextPointers:
dw BrunoDontRunAwayText
BrunoTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_BRUNOS_ROOM_TRAINER_0
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_BRUNOS_ROOM_TRAINER_0
- dw BrunoBeforeBattleText ; TextBeforeBattle
- dw BrunoAfterBattleText ; TextAfterBattle
- dw BrunoEndBattleText ; TextEndBattle
- dw BrunoEndBattleText ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_BRUNOS_ROOM_TRAINER_0, 0, BrunoBeforeBattleText, BrunoEndBattleText, BrunoAfterBattleText
+ db -1 ; end
BrunoText1:
- TX_ASM
+ text_asm
ld hl, BrunoTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
BrunoBeforeBattleText:
- TX_FAR _BrunoBeforeBattleText
- db "@"
+ text_far _BrunoBeforeBattleText
+ text_end
BrunoEndBattleText:
- TX_FAR _BrunoEndBattleText
- db "@"
+ text_far _BrunoEndBattleText
+ text_end
BrunoAfterBattleText:
- TX_FAR _BrunoAfterBattleText
- db "@"
+ text_far _BrunoAfterBattleText
+ text_end
BrunoDontRunAwayText:
- TX_FAR _BrunoDontRunAwayText
- db "@"
+ text_far _BrunoDontRunAwayText
+ text_end
diff --git a/scripts/CeladonChiefHouse.asm b/scripts/CeladonChiefHouse.asm
index fc37bd4d..ad604b98 100755
--- a/scripts/CeladonChiefHouse.asm
+++ b/scripts/CeladonChiefHouse.asm
@@ -8,13 +8,13 @@ CeladonChiefHouse_TextPointers:
dw CeladonHouseText3
CeladonHouseText1:
- TX_FAR _CeladonHouseText1
- db "@"
+ text_far _CeladonHouseText1
+ text_end
CeladonHouseText2:
- TX_FAR _CeladonHouseText2
- db "@"
+ text_far _CeladonHouseText2
+ text_end
CeladonHouseText3:
- TX_FAR _CeladonHouseText3
- db "@"
+ text_far _CeladonHouseText3
+ text_end
diff --git a/scripts/CeladonCity.asm b/scripts/CeladonCity.asm
index bd49f5af..b6280980 100755
--- a/scripts/CeladonCity.asm
+++ b/scripts/CeladonCity.asm
@@ -34,28 +34,28 @@ CeladonCity_TextPointers:
dw CeladonCityText18
CeladonCityText1:
- TX_FAR _CeladonCityText1
- db "@"
+ text_far _CeladonCityText1
+ text_end
CeladonCityText2:
- TX_FAR _CeladonCityText2
- db "@"
+ text_far _CeladonCityText2
+ text_end
CeladonCityText3:
- TX_FAR _CeladonCityText3
- db "@"
+ text_far _CeladonCityText3
+ text_end
CeladonCityText4:
- TX_FAR _CeladonCityText4
- db "@"
+ text_far _CeladonCityText4
+ text_end
CeladonCityText5:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_TM41
jr nz, .asm_7053f
ld hl, TM41PreText
call PrintText
- lb bc, TM_41, 1
+ lb bc, TM_SOFTBOILED, 1
call GiveItem
jr c, .Success
ld hl, TM41NoRoomText
@@ -73,70 +73,70 @@ CeladonCityText5:
jp TextScriptEnd
TM41PreText:
- TX_FAR _TM41PreText
- db "@"
+ text_far _TM41PreText
+ text_end
ReceivedTM41Text:
- TX_FAR _ReceivedTM41Text
- TX_SFX_ITEM_1
- db "@"
+ text_far _ReceivedTM41Text
+ sound_get_item_1
+ text_end
TM41ExplanationText:
- TX_FAR _TM41ExplanationText
- db "@"
+ text_far _TM41ExplanationText
+ text_end
TM41NoRoomText:
- TX_FAR _TM41NoRoomText
- db "@"
+ text_far _TM41NoRoomText
+ text_end
CeladonCityText6:
- TX_FAR _CeladonCityText6
- db "@"
+ text_far _CeladonCityText6
+ text_end
CeladonCityText7:
- TX_FAR _CeladonCityText7
- TX_ASM
+ text_far _CeladonCityText7
+ text_asm
ld a, POLIWRATH
call PlayCry
jp TextScriptEnd
CeladonCityText8:
- TX_FAR _CeladonCityText8
- db "@"
+ text_far _CeladonCityText8
+ text_end
CeladonCityText9:
- TX_FAR _CeladonCityText9
- db "@"
+ text_far _CeladonCityText9
+ text_end
CeladonCityText10:
- TX_ASM
- callba Func_f1ac6
+ text_asm
+ farcall Func_f1ac6
jp TextScriptEnd
CeladonCityText11:
- TX_FAR _CeladonCityText11
- db "@"
+ text_far _CeladonCityText11
+ text_end
CeladonCityText13:
- TX_FAR _CeladonCityText13
- db "@"
+ text_far _CeladonCityText13
+ text_end
CeladonCityText14:
- TX_FAR _CeladonCityText14
- db "@"
+ text_far _CeladonCityText14
+ text_end
CeladonCityText15:
- TX_FAR _CeladonCityText15
- db "@"
+ text_far _CeladonCityText15
+ text_end
CeladonCityText16:
- TX_FAR _CeladonCityText16
- db "@"
+ text_far _CeladonCityText16
+ text_end
CeladonCityText17:
- TX_FAR _CeladonCityText17
- db "@"
+ text_far _CeladonCityText17
+ text_end
CeladonCityText18:
- TX_FAR _CeladonCityText18
- db "@"
+ text_far _CeladonCityText18
+ text_end
diff --git a/scripts/CeladonCity2.asm b/scripts/CeladonCity2.asm
index 12f7b366..56824c9a 100755
--- a/scripts/CeladonCity2.asm
+++ b/scripts/CeladonCity2.asm
@@ -1,8 +1,8 @@
-Func_f1ac6:
+Func_f1ac6::
ld hl, Text_f1acd
call PrintText
ret
Text_f1acd:
- TX_FAR _CeladonCityText10
- db "@"
+ text_far _CeladonCityText10
+ text_end
diff --git a/scripts/CeladonDiner.asm b/scripts/CeladonDiner.asm
index f444ec15..b4936e75 100755
--- a/scripts/CeladonDiner.asm
+++ b/scripts/CeladonDiner.asm
@@ -10,22 +10,22 @@ CeladonDiner_TextPointers:
dw CeladonDinerText5
CeladonDinerText1:
- TX_FAR _CeladonDinerText1
- db "@"
+ text_far _CeladonDinerText1
+ text_end
CeladonDinerText2:
- TX_FAR _CeladonDinerText2
- db "@"
+ text_far _CeladonDinerText2
+ text_end
CeladonDinerText3:
- TX_FAR _CeladonDinerText3
- db "@"
+ text_far _CeladonDinerText3
+ text_end
CeladonDinerText4:
- TX_FAR _CeladonDinerText4
- db "@"
+ text_far _CeladonDinerText4
+ text_end
CeladonDinerText5:
- TX_ASM
- callab Func_f1f31
+ text_asm
+ callfar Func_f1f31
jp TextScriptEnd
diff --git a/scripts/CeladonDiner2.asm b/scripts/CeladonDiner2.asm
index 8cd66a19..ceef9f52 100755
--- a/scripts/CeladonDiner2.asm
+++ b/scripts/CeladonDiner2.asm
@@ -1,38 +1,38 @@
-Func_f1f31:
+Func_f1f31::
CheckEvent EVENT_GOT_COIN_CASE
- jr nz, .asm_eb14d
+ jr nz, .got_item
ld hl, CeladonDinerText_491a7
call PrintText
lb bc, COIN_CASE, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
SetEvent EVENT_GOT_COIN_CASE
ld hl, ReceivedCoinCaseText
call PrintText
- jr .asm_68b61
-.BagFull
+ jr .done
+.bag_full
ld hl, CoinCaseNoRoomText
call PrintText
- jr .asm_68b61
-.asm_eb14d
+ jr .done
+.got_item
ld hl, CeladonDinerText_491b7
call PrintText
-.asm_68b61
+.done
ret
CeladonDinerText_491a7:
- TX_FAR _CeladonDinerText_491a7
- db "@"
+ text_far _CeladonDinerText_491a7
+ text_end
ReceivedCoinCaseText:
- TX_FAR _ReceivedCoinCaseText
- TX_SFX_KEY_ITEM
- db "@"
+ text_far _ReceivedCoinCaseText
+ sound_get_key_item
+ text_end
CoinCaseNoRoomText:
- TX_FAR _CoinCaseNoRoomText
- db "@"
+ text_far _CoinCaseNoRoomText
+ text_end
CeladonDinerText_491b7:
- TX_FAR _CeladonDinerText_491b7
- db "@"
+ text_far _CeladonDinerText_491b7
+ text_end
diff --git a/scripts/CeladonGym.asm b/scripts/CeladonGym.asm
index 50c02196..2b695819 100755
--- a/scripts/CeladonGym.asm
+++ b/scripts/CeladonGym.asm
@@ -2,7 +2,7 @@ CeladonGym_Script:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
- call nz, CeladonGymScript_48927
+ call nz, .LoadNames
call EnableAutoTextBoxDrawing
ld hl, CeladonGymTrainerHeader0
ld de, CeladonGym_ScriptPointers
@@ -11,15 +11,15 @@ CeladonGym_Script:
ld [wCeladonGymCurScript], a
ret
-CeladonGymScript_48927:
- ld hl, Gym4CityName
- ld de, Gym4LeaderName
+.LoadNames:
+ ld hl, .CityName
+ ld de, .LeaderName
jp LoadGymLeaderAndCityName
-Gym4CityName:
+.CityName:
db "CELADON CITY@"
-Gym4LeaderName:
+.LeaderName:
db "ERIKA@"
CeladonGymText_48943:
@@ -44,26 +44,26 @@ CeladonGymScript3:
CeladonGymText_48963:
ld a, $9
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_ERIKA
- lb bc, TM_21, 1
+ lb bc, TM_MEGA_DRAIN, 1
call GiveItem
jr nc, .BagFull
ld a, $a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM21
jr .gymVictory
.BagFull
ld a, $b
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
ld hl, wObtainedBadges
- set 3, [hl]
+ set BIT_RAINBOWBADGE, [hl]
ld hl, wBeatGymFlags
- set 3, [hl]
+ set BIT_RAINBOWBADGE, [hl]
; deactivate gym trainers
SetEventRange EVENT_BEAT_CELADON_GYM_TRAINER_0, EVENT_BEAT_CELADON_GYM_TRAINER_6
@@ -84,72 +84,23 @@ CeladonGym_TextPointers:
dw TM21NoRoomText
CeladonGymTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_0
- dw CeladonGymBattleText2 ; TextBeforeBattle
- dw CeladonGymAfterBattleText2 ; TextAfterBattle
- dw CeladonGymEndBattleText2 ; TextEndBattle
- dw CeladonGymEndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_CELADON_GYM_TRAINER_0, 2, CeladonGymBattleText2, CeladonGymEndBattleText2, CeladonGymAfterBattleText2
CeladonGymTrainerHeader1:
- dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_1
- dw CeladonGymBattleText3 ; TextBeforeBattle
- dw CeladonGymAfterBattleText3 ; TextAfterBattle
- dw CeladonGymEndBattleText3 ; TextEndBattle
- dw CeladonGymEndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_CELADON_GYM_TRAINER_1, 2, CeladonGymBattleText3, CeladonGymEndBattleText3, CeladonGymAfterBattleText3
CeladonGymTrainerHeader2:
- dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_2
- dw CeladonGymBattleText4 ; TextBeforeBattle
- dw CeladonGymAfterBattleText4 ; TextAfterBattle
- dw CeladonGymEndBattleText4 ; TextEndBattle
- dw CeladonGymEndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_CELADON_GYM_TRAINER_2, 4, CeladonGymBattleText4, CeladonGymEndBattleText4, CeladonGymAfterBattleText4
CeladonGymTrainerHeader3:
- dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_3
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_3
- dw CeladonGymBattleText5 ; TextBeforeBattle
- dw CeladonGymAfterBattleText5 ; TextAfterBattle
- dw CeladonGymEndBattleText5 ; TextEndBattle
- dw CeladonGymEndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_CELADON_GYM_TRAINER_3, 4, CeladonGymBattleText5, CeladonGymEndBattleText5, CeladonGymAfterBattleText5
CeladonGymTrainerHeader4:
- dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_4
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_4
- dw CeladonGymBattleText6 ; TextBeforeBattle
- dw CeladonGymAfterBattleText6 ; TextAfterBattle
- dw CeladonGymEndBattleText6 ; TextEndBattle
- dw CeladonGymEndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_CELADON_GYM_TRAINER_4, 2, CeladonGymBattleText6, CeladonGymEndBattleText6, CeladonGymAfterBattleText6
CeladonGymTrainerHeader5:
- dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_5
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_5
- dw CeladonGymBattleText7 ; TextBeforeBattle
- dw CeladonGymAfterBattleText7 ; TextAfterBattle
- dw CeladonGymEndBattleText7 ; TextEndBattle
- dw CeladonGymEndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_CELADON_GYM_TRAINER_5, 2, CeladonGymBattleText7, CeladonGymEndBattleText7, CeladonGymAfterBattleText7
CeladonGymTrainerHeader6:
- dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_6, 1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_6, 1
- dw CeladonGymBattleText8 ; TextBeforeBattle
- dw CeladonGymAfterBattleText8 ; TextAfterBattle
- dw CeladonGymEndBattleText8 ; TextEndBattle
- dw CeladonGymEndBattleText8 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_CELADON_GYM_TRAINER_6, 1, 3, CeladonGymBattleText8, CeladonGymEndBattleText8, CeladonGymAfterBattleText8
+ db -1 ; end
CeladonGymText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_ERIKA
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM21
@@ -170,7 +121,7 @@ CeladonGymText1:
ld hl, CeladonGymText_48a63
ld de, CeladonGymText_48a63
call SaveEndBattleTextPointers
- ld a, [H_SPRITEINDEX]
+ ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
@@ -183,153 +134,153 @@ CeladonGymText1:
jp TextScriptEnd
CeladonGymText_48a5e:
- TX_FAR _CeladonGymText_48a5e
- db "@"
+ text_far _CeladonGymText_48a5e
+ text_end
CeladonGymText_48a63:
- TX_FAR _CeladonGymText_48a63
- db "@"
+ text_far _CeladonGymText_48a63
+ text_end
CeladonGymText_48a68:
- TX_FAR _CeladonGymText_48a68
- db "@"
+ text_far _CeladonGymText_48a68
+ text_end
CeladonGymText9:
- TX_FAR _CeladonGymText9
- db "@"
+ text_far _CeladonGymText9
+ text_end
TM21Text:
- TX_FAR _ReceivedTM21Text
- TX_SFX_ITEM_1
- TX_FAR _TM21ExplanationText
- db "@"
+ text_far _ReceivedTM21Text
+ sound_get_item_1
+ text_far _TM21ExplanationText
+ text_end
TM21NoRoomText:
- TX_FAR _TM21NoRoomText
- db "@"
+ text_far _TM21NoRoomText
+ text_end
CeladonGymText2:
- TX_ASM
+ text_asm
ld hl, CeladonGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
CeladonGymBattleText2:
- TX_FAR _CeladonGymBattleText2
- db "@"
+ text_far _CeladonGymBattleText2
+ text_end
CeladonGymEndBattleText2:
- TX_FAR _CeladonGymEndBattleText2
- db "@"
+ text_far _CeladonGymEndBattleText2
+ text_end
CeladonGymAfterBattleText2:
- TX_FAR _CeladonGymAfterBattleText2
- db "@"
+ text_far _CeladonGymAfterBattleText2
+ text_end
CeladonGymText3:
- TX_ASM
+ text_asm
ld hl, CeladonGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
CeladonGymBattleText3:
- TX_FAR _CeladonGymBattleText3
- db "@"
+ text_far _CeladonGymBattleText3
+ text_end
CeladonGymEndBattleText3:
- TX_FAR _CeladonGymEndBattleText3
- db "@"
+ text_far _CeladonGymEndBattleText3
+ text_end
CeladonGymAfterBattleText3:
- TX_FAR _CeladonGymAfterBattleText3
- db "@"
+ text_far _CeladonGymAfterBattleText3
+ text_end
CeladonGymText4:
- TX_ASM
+ text_asm
ld hl, CeladonGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
CeladonGymBattleText4:
- TX_FAR _CeladonGymBattleText4
- db "@"
+ text_far _CeladonGymBattleText4
+ text_end
CeladonGymEndBattleText4:
- TX_FAR _CeladonGymEndBattleText4
- db "@"
+ text_far _CeladonGymEndBattleText4
+ text_end
CeladonGymAfterBattleText4:
- TX_FAR _CeladonGymAfterBattleText4
- db "@"
+ text_far _CeladonGymAfterBattleText4
+ text_end
CeladonGymText5:
- TX_ASM
+ text_asm
ld hl, CeladonGymTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
CeladonGymBattleText5:
- TX_FAR _CeladonGymBattleText5
- db "@"
+ text_far _CeladonGymBattleText5
+ text_end
CeladonGymEndBattleText5:
- TX_FAR _CeladonGymEndBattleText5
- db "@"
+ text_far _CeladonGymEndBattleText5
+ text_end
CeladonGymAfterBattleText5:
- TX_FAR _CeladonGymAfterBattleText5
- db "@"
+ text_far _CeladonGymAfterBattleText5
+ text_end
CeladonGymText6:
- TX_ASM
+ text_asm
ld hl, CeladonGymTrainerHeader4
call TalkToTrainer
jp TextScriptEnd
CeladonGymBattleText6:
- TX_FAR _CeladonGymBattleText6
- db "@"
+ text_far _CeladonGymBattleText6
+ text_end
CeladonGymEndBattleText6:
- TX_FAR _CeladonGymEndBattleText6
- db "@"
+ text_far _CeladonGymEndBattleText6
+ text_end
CeladonGymAfterBattleText6:
- TX_FAR _CeladonGymAfterBattleText6
- db "@"
+ text_far _CeladonGymAfterBattleText6
+ text_end
CeladonGymText7:
- TX_ASM
+ text_asm
ld hl, CeladonGymTrainerHeader5
call TalkToTrainer
jp TextScriptEnd
CeladonGymBattleText7:
- TX_FAR _CeladonGymBattleText7
- db "@"
+ text_far _CeladonGymBattleText7
+ text_end
CeladonGymEndBattleText7:
- TX_FAR _CeladonGymEndBattleText7
- db "@"
+ text_far _CeladonGymEndBattleText7
+ text_end
CeladonGymAfterBattleText7:
- TX_FAR _CeladonGymAfterBattleText7
- db "@"
+ text_far _CeladonGymAfterBattleText7
+ text_end
CeladonGymText8:
- TX_ASM
+ text_asm
ld hl, CeladonGymTrainerHeader6
call TalkToTrainer
jp TextScriptEnd
CeladonGymBattleText8:
- TX_FAR _CeladonGymBattleText8
- db "@"
+ text_far _CeladonGymBattleText8
+ text_end
CeladonGymEndBattleText8:
- TX_FAR _CeladonGymEndBattleText8
- db "@"
+ text_far _CeladonGymEndBattleText8
+ text_end
CeladonGymAfterBattleText8:
- TX_FAR _CeladonGymAfterBattleText8
- db "@"
+ text_far _CeladonGymAfterBattleText8
+ text_end
diff --git a/scripts/CeladonHotel.asm b/scripts/CeladonHotel.asm
index ee4e140c..2cdd95b0 100755
--- a/scripts/CeladonHotel.asm
+++ b/scripts/CeladonHotel.asm
@@ -7,13 +7,13 @@ CeladonHotel_TextPointers:
dw CeladonHotelText3
CeladonHotelText1:
- TX_FAR _CeladonHotelText1
- db "@"
+ text_far _CeladonHotelText1
+ text_end
CeladonHotelText2:
- TX_FAR _CeladonHotelText2
- db "@"
+ text_far _CeladonHotelText2
+ text_end
CeladonHotelText3:
- TX_FAR _CeladonHotelText3
- db "@"
+ text_far _CeladonHotelText3
+ text_end
diff --git a/scripts/CeladonMansion1F.asm b/scripts/CeladonMansion1F.asm
index 1d7c37b4..61d53da7 100755
--- a/scripts/CeladonMansion1F.asm
+++ b/scripts/CeladonMansion1F.asm
@@ -10,39 +10,39 @@ CeladonMansion1F_TextPointers:
dw CeladonMansion1Text5
CeladonMansion1Text1:
- TX_FAR _CeladonMansion1Text1
- TX_ASM
+ text_far _CeladonMansion1Text1
+ text_asm
ld a, MEOWTH
call PlayCry
jp TextScriptEnd
CeladonMansion1Text2:
- TX_ASM
- callba Func_f1e70
+ text_asm
+ farcall Func_f1e70
ld a, [wPikachuHappiness]
cp 251
jr c, .asm_485d9
ld c, 50
call DelayFrames
ldpikacry e, PikachuCry23
- callab PlayPikachuSoundClip
+ callfar PlayPikachuSoundClip
.asm_485d9
jp TextScriptEnd
CeladonMansion1Text3:
- TX_FAR _CeladonMansion1Text3
- TX_ASM
+ text_far _CeladonMansion1Text3
+ text_asm
ld a, CLEFAIRY
call PlayCry
jp TextScriptEnd
CeladonMansion1Text4:
- TX_FAR _CeladonMansion1Text4
- TX_ASM
+ text_far _CeladonMansion1Text4
+ text_asm
ld a, NIDORAN_F
call PlayCry
jp TextScriptEnd
CeladonMansion1Text5:
- TX_FAR _CeladonMansion1Text5
- db "@"
+ text_far _CeladonMansion1Text5
+ text_end
diff --git a/scripts/CeladonMansion1F_2.asm b/scripts/CeladonMansion1F_2.asm
index cdd56ab8..70bf6c88 100755
--- a/scripts/CeladonMansion1F_2.asm
+++ b/scripts/CeladonMansion1F_2.asm
@@ -1,9 +1,9 @@
-Func_f1e70:
+Func_f1e70::
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, CeladonMansion1Text_f1e96
call PrintText
- callab IsStarterPikachuInOurParty
+ callfar IsStarterPikachuInOurParty
ret nc
ld hl, CeladonMansionText_f1e9c
call PrintText
@@ -14,14 +14,14 @@ Func_f1e70:
ret
CeladonMansion1Text_f1e96:
- TX_FAR _CeladonMansion1Text2
- TX_WAIT
- db "@"
+ text_far _CeladonMansion1Text2
+ text_waitbutton
+ text_end
CeladonMansionText_f1e9c:
- TX_FAR _CeladonMansion1Text6
- TX_BLINK
- db "@"
+ text_far _CeladonMansion1Text6
+ text_promptbutton
+ text_end
Func_f1ea2:
ld hl, PikachuHappinessThresholds_f1eb9
@@ -44,7 +44,7 @@ Func_f1ea2:
ld l, a
ret
-PikachuHappinessThresholds_f1eb9
+PikachuHappinessThresholds_f1eb9:
dw 51, CeladonMansion1Text_f1ed5
dw 101, CeladonMansion1Text_f1eda
dw 131, CeladonMansion1Text_f1edf
@@ -54,25 +54,25 @@ PikachuHappinessThresholds_f1eb9
dbbw 0, $ff, CeladonMansion1Text_f1eee
CeladonMansion1Text_f1ed5:
- TX_FAR _CeladonMansion1Text7
- db "@"
+ text_far _CeladonMansion1Text7
+ text_end
CeladonMansion1Text_f1eda:
- TX_FAR _CeladonMansion1Text8
- db "@"
+ text_far _CeladonMansion1Text8
+ text_end
CeladonMansion1Text_f1edf:
- TX_FAR _CeladonMansion1Text9
- db "@"
+ text_far _CeladonMansion1Text9
+ text_end
CeladonMansion1Text_f1ee4:
- TX_FAR _CeladonMansion1Text10
- db "@"
+ text_far _CeladonMansion1Text10
+ text_end
CeladonMansion1Text_f1ee9:
- TX_FAR _CeladonMansion1Text11
- db "@"
+ text_far _CeladonMansion1Text11
+ text_end
CeladonMansion1Text_f1eee:
- TX_FAR _CeladonMansion1Text12
- db "@"
+ text_far _CeladonMansion1Text12
+ text_end
diff --git a/scripts/CeladonMansion2F.asm b/scripts/CeladonMansion2F.asm
index 9deb606d..8f83e86a 100755
--- a/scripts/CeladonMansion2F.asm
+++ b/scripts/CeladonMansion2F.asm
@@ -6,5 +6,5 @@ CeladonMansion2F_TextPointers:
dw CeladonMansion2Text1
CeladonMansion2Text1:
- TX_FAR _CeladonMansion2Text1
- db "@"
+ text_far _CeladonMansion2Text1
+ text_end
diff --git a/scripts/CeladonMansion3F.asm b/scripts/CeladonMansion3F.asm
index 64a8343b..0cea70cc 100755
--- a/scripts/CeladonMansion3F.asm
+++ b/scripts/CeladonMansion3F.asm
@@ -20,7 +20,7 @@ CeladonMansion3F_TextPointers:
dw GameFreakSignText
ProgrammerText:
- TX_ASM
+ text_asm
call CeladonMansion3_PokedexCount
cp 150
ld hl, CeladonMansion3Text_486f5
@@ -31,15 +31,15 @@ ProgrammerText:
jp TextScriptEnd
CeladonMansion3Text_486f0:
- TX_FAR _ProgrammerText
- db "@"
+ text_far _ProgrammerText
+ text_end
CeladonMansion3Text_486f5:
- TX_FAR _ProgrammerText2
- db "@"
+ text_far _ProgrammerText2
+ text_end
GraphicArtistText:
- TX_ASM
+ text_asm
call CeladonMansion3_PokedexCount
cp 150
jr nc, .completed
@@ -58,7 +58,7 @@ GraphicArtistText:
ld [wUpdateSpritesEnabled], a
ld hl, wd730
set 6, [hl]
- callab PrintDiploma
+ callfar PrintDiploma
ld hl, wd730
res 6, [hl]
call GBPalWhiteOutWithDelay3
@@ -68,7 +68,7 @@ GraphicArtistText:
call Delay3
call GBPalNormal
ld hl, CeladonMansion3Text_4876b
- ld a, [$ffdb]
+ ldh a, [hCanceledPrinting]
and a
jr nz, .print
ld hl, CeladonMansion3Text_48766
@@ -81,27 +81,27 @@ GraphicArtistText:
jp TextScriptEnd
CeladonMansion3Text_48757:
- TX_FAR _GraphicArtistText
- db "@"
+ text_far _GraphicArtistText
+ text_end
CeladonMansion3Text_4875c:
- TX_FAR _GraphicArtistText2
- db "@"
+ text_far _GraphicArtistText2
+ text_end
CeladonMansion3Text_48761:
- TX_FAR _GraphicArtistText3
- db "@"
+ text_far _GraphicArtistText3
+ text_end
CeladonMansion3Text_48766:
- TX_FAR _GraphicArtistText4
- db "@"
+ text_far _GraphicArtistText4
+ text_end
CeladonMansion3Text_4876b:
- TX_FAR _GraphicArtistText5
- db "@"
+ text_far _GraphicArtistText5
+ text_end
WriterText:
- TX_ASM
+ text_asm
call CeladonMansion3_PokedexCount
cp 150
ld hl, CeladonMansion3Text_48789
@@ -112,22 +112,22 @@ WriterText:
jp TextScriptEnd
CeladonMansion3Text_48784:
- TX_FAR _WriterText
- db "@"
+ text_far _WriterText
+ text_end
CeladonMansion3Text_48789:
- TX_FAR _WriterText2
- db "@"
+ text_far _WriterText2
+ text_end
DirectorText:
- TX_ASM
+ text_asm
call CeladonMansion3_PokedexCount
; check pokédex
- cp 150
- jr nc, .CompletedDex
- ld hl, .GameDesigner
+ cp NUM_POKEMON - 1 ; discount Mew
+ jr nc, .completed_dex
+ ld hl, .GameDesignerText
jr .done
-.CompletedDex
+.completed_dex
ld hl, .CompletedDexText
call PrintText
call Delay3
@@ -138,39 +138,39 @@ DirectorText:
call PrintText
jp TextScriptEnd
-.GameDesigner
- TX_FAR _GameDesignerText
- db "@"
+.GameDesignerText:
+ text_far _GameDesignerText
+ text_end
-.CompletedDexText
- TX_FAR _CompletedDexText
- TX_BLINK
- TX_ASM
- callab DisplayDiploma
- ld a, $1
+.CompletedDexText:
+ text_far _CompletedDexText
+ text_promptbutton
+ text_asm
+ callfar DisplayDiploma
+ ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
jp TextScriptEnd
.UnlockedDiplomaPrinting
- TX_FAR _CompletedDexText2
- db "@"
+ text_far _CompletedDexText2
+ text_end
GameFreakPCText1:
- TX_ASM
- callba Func_f1ef3
+ text_asm
+ farcall Func_f1ef3
jp TextScriptEnd
GameFreakPCText2:
- TX_ASM
- callba Func_f1eff
+ text_asm
+ farcall Func_f1eff
jp TextScriptEnd
GameFreakPCText3:
- TX_ASM
- callba Func_f1f0b
+ text_asm
+ farcall Func_f1f0b
jp TextScriptEnd
GameFreakSignText:
- TX_ASM
- callba Func_f1f17
+ text_asm
+ farcall Func_f1f17
jp TextScriptEnd
diff --git a/scripts/CeladonMansion3F_2.asm b/scripts/CeladonMansion3F_2.asm
index 3a7035ba..f0b7c395 100755
--- a/scripts/CeladonMansion3F_2.asm
+++ b/scripts/CeladonMansion3F_2.asm
@@ -1,35 +1,35 @@
-Func_f1ef3:
+Func_f1ef3::
ld hl, CeladonMansion3Text_f1efa
call PrintText
ret
CeladonMansion3Text_f1efa:
- TX_FAR _CeladonMansion3Text5
- db "@"
+ text_far _CeladonMansion3Text5
+ text_end
-Func_f1eff:
+Func_f1eff::
ld hl, CeladonMansion3Text_f1f06
call PrintText
ret
CeladonMansion3Text_f1f06:
- TX_FAR _CeladonMansion3Text6
- db "@"
+ text_far _CeladonMansion3Text6
+ text_end
-Func_f1f0b:
+Func_f1f0b::
ld hl, CeladonMansion3Text_f1f12
call PrintText
ret
CeladonMansion3Text_f1f12:
- TX_FAR _CeladonMansion3Text7
- db "@"
+ text_far _CeladonMansion3Text7
+ text_end
-Func_f1f17:
+Func_f1f17::
ld hl, CeladonMansion3Text_f1f1e
call PrintText
ret
CeladonMansion3Text_f1f1e:
- TX_FAR _CeladonMansion3Text8
- db "@"
+ text_far _CeladonMansion3Text8
+ text_end
diff --git a/scripts/CeladonMansionRoof.asm b/scripts/CeladonMansionRoof.asm
index 1813e9ee..47c093dd 100755
--- a/scripts/CeladonMansionRoof.asm
+++ b/scripts/CeladonMansionRoof.asm
@@ -6,5 +6,5 @@ CeladonMansionRoof_TextPointers:
dw CeladonMansion4Text1
CeladonMansion4Text1:
- TX_FAR _CeladonMansion4Text1
- db "@"
+ text_far _CeladonMansion4Text1
+ text_end
diff --git a/scripts/CeladonMansionRoofHouse.asm b/scripts/CeladonMansionRoofHouse.asm
index 8e485352..3b7e3914 100755
--- a/scripts/CeladonMansionRoofHouse.asm
+++ b/scripts/CeladonMansionRoofHouse.asm
@@ -7,16 +7,16 @@ CeladonMansionRoofHouse_TextPointers:
dw CeladonMansion5Text2
CeladonMansion5Text1:
- TX_FAR _CeladonMansion5Text1
- db "@"
+ text_far _CeladonMansion5Text1
+ text_end
CeladonMansion5Text2:
- TX_ASM
+ text_asm
lb bc, EEVEE, 25
call GivePokemon
- jr nc, .asm_24365
+ jr nc, .party_full
ld a, HS_CELADON_MANSION_EEVEE_GIFT
ld [wMissableObjectIndex], a
predef HideObject
-.asm_24365
+.party_full
jp TextScriptEnd
diff --git a/scripts/CeladonMart1F.asm b/scripts/CeladonMart1F.asm
index e84eaae0..54176e01 100755
--- a/scripts/CeladonMart1F.asm
+++ b/scripts/CeladonMart1F.asm
@@ -8,13 +8,13 @@ CeladonMart1F_TextPointers:
dw CeladonMart1Text3
CeladonMart1Text1:
- TX_FAR _CeladonMart1Text1
- db "@"
+ text_far _CeladonMart1Text1
+ text_end
CeladonMart1Text2:
- TX_FAR _CeladonMart1Text2
- db "@"
+ text_far _CeladonMart1Text2
+ text_end
CeladonMart1Text3:
- TX_FAR _CeladonMart1Text3
- db "@"
+ text_far _CeladonMart1Text3
+ text_end
diff --git a/scripts/CeladonMart2F.asm b/scripts/CeladonMart2F.asm
index 787c186e..11827128 100755
--- a/scripts/CeladonMart2F.asm
+++ b/scripts/CeladonMart2F.asm
@@ -9,13 +9,13 @@ CeladonMart2F_TextPointers:
dw CeladonMart2Text5
CeladonMart2Text3:
- TX_FAR _CeladonMart2Text3
- db "@"
+ text_far _CeladonMart2Text3
+ text_end
CeladonMart2Text4:
- TX_FAR _CeladonMart2Text4
- db "@"
+ text_far _CeladonMart2Text4
+ text_end
CeladonMart2Text5:
- TX_FAR _CeladonMart2Text5
- db "@"
+ text_far _CeladonMart2Text5
+ text_end
diff --git a/scripts/CeladonMart3F.asm b/scripts/CeladonMart3F.asm
index c8a108d7..01ab73ce 100755
--- a/scripts/CeladonMart3F.asm
+++ b/scripts/CeladonMart3F.asm
@@ -21,55 +21,55 @@ CeladonMart3F_TextPointers:
dw CeladonMart3Text17
CeladonMart3Text1:
- TX_ASM
- callab Func_f1e30
+ text_asm
+ callfar Func_f1e30
jp TextScriptEnd
CeladonMart3Text2:
- TX_FAR _CeladonMart3Text2
- db "@"
+ text_far _CeladonMart3Text2
+ text_end
CeladonMart3Text3:
- TX_FAR _CeladonMart3Text3
- db "@"
+ text_far _CeladonMart3Text3
+ text_end
CeladonMart3Text4:
- TX_FAR _CeladonMart3Text4
- db "@"
+ text_far _CeladonMart3Text4
+ text_end
CeladonMart3Text5:
- TX_FAR _CeladonMart3Text5
- db "@"
+ text_far _CeladonMart3Text5
+ text_end
-CeladonMart3Text12
+CeladonMart3Text12:
CeladonMart3Text10:
CeladonMart3Text8:
CeladonMart3Text6:
- TX_FAR _CeladonMart3Text6
- db "@"
+ text_far _CeladonMart3Text6
+ text_end
CeladonMart3Text7:
- TX_FAR _CeladonMart3Text7
- db "@"
+ text_far _CeladonMart3Text7
+ text_end
CeladonMart3Text9:
- TX_FAR _CeladonMart3Text9
- db "@"
+ text_far _CeladonMart3Text9
+ text_end
CeladonMart3Text11:
- TX_FAR _CeladonMart3Text11
- db "@"
+ text_far _CeladonMart3Text11
+ text_end
CeladonMart3Text13:
- TX_FAR _CeladonMart3Text13
- db "@"
+ text_far _CeladonMart3Text13
+ text_end
CeladonMart3Text14:
- TX_FAR _CeladonMart3Text14
- db "@"
+ text_far _CeladonMart3Text14
+ text_end
CeladonMart3Text17:
CeladonMart3Text16:
CeladonMart3Text15:
- TX_FAR _CeladonMart3Text15
- db "@"
+ text_far _CeladonMart3Text15
+ text_end
diff --git a/scripts/CeladonMart3F_2.asm b/scripts/CeladonMart3F_2.asm
index 8c99e0e0..239f84d1 100755
--- a/scripts/CeladonMart3F_2.asm
+++ b/scripts/CeladonMart3F_2.asm
@@ -1,38 +1,36 @@
-Func_f1e30
+Func_f1e30::
CheckEvent EVENT_GOT_TM18
- jr nz, .asm_f1e54
- ld hl, CeladonMart3Text_f1e5b
+ jr nz, .got_item
+ ld hl, TM18PreReceiveText
call PrintText
- lb bc, TM_18, 1
+ lb bc, TM_COUNTER, 1
call GiveItem
- jr nc, .asm_f1e4f
+ jr nc, .bag_full
SetEvent EVENT_GOT_TM18
- ld hl, CeladonMart3Text_f1e60
- jr .asm_f1e57
-
-.asm_f1e4f
- ld hl, CeladonMart3Text_f1e6b
- jr .asm_f1e57
-
-.asm_f1e54
- ld hl, CeladonMart3Text_f1e66
-.asm_f1e57
+ ld hl, ReceivedTM18Text
+ jr .done
+.bag_full
+ ld hl, TM18NoRoomText
+ jr .done
+.got_item
+ ld hl, TM18ExplanationText
+.done
call PrintText
ret
-CeladonMart3Text_f1e5b:
- TX_FAR _TM18PreReceiveText
- db "@"
+TM18PreReceiveText:
+ text_far _TM18PreReceiveText
+ text_end
-CeladonMart3Text_f1e60:
- TX_FAR _ReceivedTM18Text
- TX_SFX_ITEM_1
- db "@"
+ReceivedTM18Text:
+ text_far _ReceivedTM18Text
+ sound_get_item_1
+ text_end
-CeladonMart3Text_f1e66:
- TX_FAR _TM18ExplanationText
- db "@"
+TM18ExplanationText:
+ text_far _TM18ExplanationText
+ text_end
-CeladonMart3Text_f1e6b:
- TX_FAR _TM18NoRoomText
- db "@"
+TM18NoRoomText:
+ text_far _TM18NoRoomText
+ text_end
diff --git a/scripts/CeladonMart4F.asm b/scripts/CeladonMart4F.asm
index 20f817e9..1365dd0d 100755
--- a/scripts/CeladonMart4F.asm
+++ b/scripts/CeladonMart4F.asm
@@ -8,13 +8,13 @@ CeladonMart4F_TextPointers:
dw CeladonMart4Text4
CeladonMart4Text2:
- TX_FAR _CeladonMart4Text2
- db "@"
+ text_far _CeladonMart4Text2
+ text_end
CeladonMart4Text3:
- TX_FAR _CeladonMart4Text3
- db "@"
+ text_far _CeladonMart4Text3
+ text_end
CeladonMart4Text4:
- TX_FAR _CeladonMart4Text4
- db "@"
+ text_far _CeladonMart4Text4
+ text_end
diff --git a/scripts/CeladonMart5F.asm b/scripts/CeladonMart5F.asm
index 74c590be..a6e97405 100755
--- a/scripts/CeladonMart5F.asm
+++ b/scripts/CeladonMart5F.asm
@@ -10,13 +10,13 @@ CeladonMart5F_TextPointers:
dw CeladonMart5Text5
CeladonMart5Text1:
- TX_FAR _CeladonMart5Text1
- db "@"
+ text_far _CeladonMart5Text1
+ text_end
CeladonMart5Text2:
- TX_FAR _CeladonMart5Text2
- db "@"
+ text_far _CeladonMart5Text2
+ text_end
CeladonMart5Text5:
- TX_FAR _CeladonMart5Text5
- db "@"
+ text_far _CeladonMart5Text5
+ text_end
diff --git a/scripts/CeladonMartElevator.asm b/scripts/CeladonMartElevator.asm
index 34b923f9..b657b3f9 100755
--- a/scripts/CeladonMartElevator.asm
+++ b/scripts/CeladonMartElevator.asm
@@ -40,33 +40,32 @@ CeladonMartElevatorScript_48631:
jp CopyData
CeladonMartElevatorFloors:
- db 5 ; number of elements in list
+ db 5 ; #
db FLOOR_1F
db FLOOR_2F
db FLOOR_3F
db FLOOR_4F
db FLOOR_5F
- db $FF
+ db -1 ; end
-CeladonMartElevatorWarpMaps:
-; first byte is warp number
-; second byte is map number
; These specify where the player goes after getting out of the elevator.
- db $05, CELADON_MART_1F
- db $02, CELADON_MART_2F
- db $02, CELADON_MART_3F
- db $02, CELADON_MART_4F
- db $02, CELADON_MART_5F
+CeladonMartElevatorWarpMaps:
+ ; warp number, map id
+ db 5, CELADON_MART_1F
+ db 2, CELADON_MART_2F
+ db 2, CELADON_MART_3F
+ db 2, CELADON_MART_4F
+ db 2, CELADON_MART_5F
CeladonMartElevatorWarpMapsEnd:
CeladonMartElevatorScript_48654:
- jpba ShakeElevator
+ farjp ShakeElevator
CeladonMartElevator_TextPointers:
dw CeladonMartElevatorText1
CeladonMartElevatorText1:
- TX_ASM
+ text_asm
call CeladonMartElevatorScript_48631
ld hl, CeladonMartElevatorWarpMaps
predef DisplayElevatorFloorMenu
diff --git a/scripts/CeladonMartRoof.asm b/scripts/CeladonMartRoof.asm
index 64871bdd..1d39670d 100755
--- a/scripts/CeladonMartRoof.asm
+++ b/scripts/CeladonMartRoof.asm
@@ -39,7 +39,7 @@ CeladonMartRoofDrinkList:
db FRESH_WATER
db SODA_POP
db LEMONADE
- db $00
+ db 0 ; end
CeladonMartRoofScript_GiveDrinkToGirl:
ld hl, wd730
@@ -65,7 +65,7 @@ CeladonMartRoofScript_GiveDrinkToGirl:
dec l
ld b, l
ld c, 12
- coord hl, 0, 0
+ hlcoord 0, 0
call TextBoxBorder
call UpdateSprites
call CeladonMartRoofScript_PrintDrinksInBag
@@ -80,7 +80,7 @@ CeladonMartRoofScript_GiveDrinkToGirl:
ld e, a
add hl, de
ld a, [hl]
- ld [hItemToRemoveID], a
+ ldh [hItemToRemoveID], a
cp FRESH_WATER
jr z, .gaveFreshWater
cp SODA_POP
@@ -91,7 +91,7 @@ CeladonMartRoofScript_GiveDrinkToGirl:
ld hl, CeladonMartRoofText_48515
call PrintText
call RemoveItemByIDBank12
- lb bc, TM_49, 1
+ lb bc, TM_TRI_ATTACK, 1
call GiveItem
jr nc, .bagFull
ld hl, ReceivedTM49Text
@@ -104,7 +104,7 @@ CeladonMartRoofScript_GiveDrinkToGirl:
ld hl, CeladonMartRoofText_48504
call PrintText
call RemoveItemByIDBank12
- lb bc, TM_48, 1
+ lb bc, TM_ROCK_SLIDE, 1
call GiveItem
jr nc, .bagFull
ld hl, CeladonMartRoofText_4850a
@@ -117,7 +117,7 @@ CeladonMartRoofScript_GiveDrinkToGirl:
ld hl, CeladonMartRoofText_484f3
call PrintText
call RemoveItemByIDBank12
- lb bc, TM_13, 1
+ lb bc, TM_ICE_BEAM, 1
call GiveItem
jr nc, .bagFull
ld hl, CeladonMartRoofText_484f9
@@ -134,63 +134,63 @@ CeladonMartRoofScript_GiveDrinkToGirl:
ret
RemoveItemByIDBank12:
- callba RemoveItemByID
+ farcall RemoveItemByID
ret
CeladonMartRoofText_484ee:
- TX_FAR _CeladonMartRoofText_484ee
- db "@"
+ text_far _CeladonMartRoofText_484ee
+ text_end
CeladonMartRoofText_484f3:
- TX_FAR _CeladonMartRoofText_484f3
- TX_WAIT
- db "@"
+ text_far _CeladonMartRoofText_484f3
+ text_waitbutton
+ text_end
CeladonMartRoofText_484f9:
- TX_FAR _CeladonMartRoofText_484f9
- TX_SFX_ITEM_1
- TX_FAR _CeladonMartRoofText_484fe
- TX_WAIT
- db "@"
+ text_far _CeladonMartRoofText_484f9
+ sound_get_item_1
+ text_far _CeladonMartRoofText_484fe
+ text_waitbutton
+ text_end
CeladonMartRoofText_48504:
- TX_FAR _CeladonMartRoofText_48504
- TX_WAIT
- db "@"
+ text_far _CeladonMartRoofText_48504
+ text_waitbutton
+ text_end
CeladonMartRoofText_4850a:
- TX_FAR _CeladonMartRoofText_4850a
- TX_SFX_ITEM_1
- TX_FAR _CeladonMartRoofText_4850f
- TX_WAIT
- db "@"
+ text_far _CeladonMartRoofText_4850a
+ sound_get_item_1
+ text_far _CeladonMartRoofText_4850f
+ text_waitbutton
+ text_end
CeladonMartRoofText_48515:
- TX_FAR _CeladonMartRoofText_48515
- TX_WAIT
- db "@"
+ text_far _CeladonMartRoofText_48515
+ text_waitbutton
+ text_end
ReceivedTM49Text:
- TX_FAR _ReceivedTM49Text
- TX_SFX_ITEM_1
- TX_FAR _CeladonMartRoofText_48520
- TX_WAIT
- db "@"
+ text_far _ReceivedTM49Text
+ sound_get_item_1
+ text_far _CeladonMartRoofText_48520
+ text_waitbutton
+ text_end
CeladonMartRoofText_48526:
- TX_FAR _CeladonMartRoofText_48526
- TX_WAIT
- db "@"
+ text_far _CeladonMartRoofText_48526
+ text_waitbutton
+ text_end
CeladonMartRoofText_4852c:
- TX_FAR _CeladonMartRoofText_4852c
- TX_WAIT
- db "@"
+ text_far _CeladonMartRoofText_4852c
+ text_waitbutton
+ text_end
CeladonMartRoofScript_PrintDrinksInBag:
ld hl, wFilteredBagItems
xor a
- ld [hItemCounter], a
+ ldh [hItemCounter], a
.loop
ld a, [hli]
cp $ff
@@ -198,8 +198,8 @@ CeladonMartRoofScript_PrintDrinksInBag:
push hl
ld [wd11e], a
call GetItemName
- coord hl, 2, 2
- ld a, [hItemCounter]
+ hlcoord 2, 2
+ ldh a, [hItemCounter]
ld bc, SCREEN_WIDTH * 2
call AddNTimes
ld de, wcd6d
@@ -218,11 +218,11 @@ CeladonMartRoof_TextPointers:
dw CeladonMartRoofText6
CeladonMartRoofText1:
- TX_FAR _CeladonMartRoofText1
- db "@"
+ text_far _CeladonMartRoofText1
+ text_end
CeladonMartRoofText2:
- TX_ASM
+ text_asm
call CeladonMartRoofScript_GetDrinksInBag
ld a, [wFilteredBagItemsCount]
and a
@@ -244,16 +244,16 @@ CeladonMartRoofText2:
jp TextScriptEnd
CeladonMartRoofText3:
- TX_FAR _CeladonMartRoofText_48598
- db "@"
+ text_far _CeladonMartRoofText_48598
+ text_end
CeladonMartRoofText4:
- TX_FAR _CeladonMartRoofText4
- db "@"
+ text_far _CeladonMartRoofText4
+ text_end
CeladonMartRoofText5:
- TX_VENDING_MACHINE
+ script_vending_machine
CeladonMartRoofText6:
- TX_FAR _CeladonMartRoofText6
- db "@"
+ text_far _CeladonMartRoofText6
+ text_end
diff --git a/scripts/CeladonPokecenter.asm b/scripts/CeladonPokecenter.asm
index 21b9452c..febc21f8 100755
--- a/scripts/CeladonPokecenter.asm
+++ b/scripts/CeladonPokecenter.asm
@@ -10,20 +10,20 @@ CeladonPokecenter_TextPointers:
dw CeladonPokecenterText5
CeladonTradeNurseText:
- TX_CABLE_CLUB_RECEPTIONIST
+ script_cable_club_receptionist
CeladonHealNurseText:
- TX_POKECENTER_NURSE
+ script_pokecenter_nurse
CeladonPokecenterText2:
- TX_FAR _CeladonPokecenterText2
- db "@"
+ text_far _CeladonPokecenterText2
+ text_end
CeladonPokecenterText3:
- TX_FAR _CeladonPokecenterText3
- db "@"
+ text_far _CeladonPokecenterText3
+ text_end
CeladonPokecenterText5:
- TX_ASM
- callab PokecenterChanseyText
+ text_asm
+ callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/CeruleanBadgeHouse.asm b/scripts/CeruleanBadgeHouse.asm
index cab2bf23..5e35b079 100755
--- a/scripts/CeruleanBadgeHouse.asm
+++ b/scripts/CeruleanBadgeHouse.asm
@@ -1,5 +1,5 @@
CeruleanBadgeHouse_Script:
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
dec a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -9,7 +9,7 @@ CeruleanBadgeHouse_TextPointers:
dw CeruleanHouse2Text1
CeruleanHouse2Text1:
- TX_ASM
+ text_asm
ld hl, CeruleanHouse2Text_74e77
call PrintText
xor a
@@ -34,7 +34,7 @@ CeruleanHouse2Text1:
jr c, .asm_74e60
ld hl, TextPointers_74e86
ld a, [wcf91]
- sub $15
+ sub BOULDERBADGE
add a
ld d, $0
ld e, a
@@ -52,19 +52,28 @@ CeruleanHouse2Text1:
jp TextScriptEnd
BadgeItemList:
- db $8,BOULDERBADGE,CASCADEBADGE,THUNDERBADGE,RAINBOWBADGE,SOULBADGE,MARSHBADGE,VOLCANOBADGE,EARTHBADGE,$FF
+ db 8 ; #
+ db BOULDERBADGE
+ db CASCADEBADGE
+ db THUNDERBADGE
+ db RAINBOWBADGE
+ db SOULBADGE
+ db MARSHBADGE
+ db VOLCANOBADGE
+ db EARTHBADGE
+ db -1 ; end
CeruleanHouse2Text_74e77:
- TX_FAR _CeruleanHouse2Text_74e77
- db "@"
+ text_far _CeruleanHouse2Text_74e77
+ text_end
CeruleanHouse2Text_74e7c:
- TX_FAR _CeruleanHouse2Text_74e7c
- db "@"
+ text_far _CeruleanHouse2Text_74e7c
+ text_end
CeruleanHouse2Text_74e81:
- TX_FAR _CeruleanHouse2Text_74e81
- db "@"
+ text_far _CeruleanHouse2Text_74e81
+ text_end
TextPointers_74e86:
dw CeruleanHouse2Text_74e96
@@ -77,33 +86,33 @@ TextPointers_74e86:
dw CeruleanHouse2Text_74eb9
CeruleanHouse2Text_74e96:
- TX_FAR _CeruleanHouse2Text_74e96
- db "@"
+ text_far _CeruleanHouse2Text_74e96
+ text_end
CeruleanHouse2Text_74e9b:
- TX_FAR _CeruleanHouse2Text_74e9b
- db "@"
+ text_far _CeruleanHouse2Text_74e9b
+ text_end
CeruleanHouse2Text_74ea0:
- TX_FAR _CeruleanHouse2Text_74ea0
- db "@"
+ text_far _CeruleanHouse2Text_74ea0
+ text_end
CeruleanHouse2Text_74ea5:
- TX_FAR _CeruleanHouse2Text_74ea5
- db "@"
+ text_far _CeruleanHouse2Text_74ea5
+ text_end
CeruleanHouse2Text_74eaa:
- TX_FAR _CeruleanHouse2Text_74eaa
- db "@"
+ text_far _CeruleanHouse2Text_74eaa
+ text_end
CeruleanHouse2Text_74eaf:
- TX_FAR _CeruleanHouse2Text_74eaf
- db "@"
+ text_far _CeruleanHouse2Text_74eaf
+ text_end
CeruleanHouse2Text_74eb4:
- TX_FAR _CeruleanHouse2Text_74eb4
- db "@"
+ text_far _CeruleanHouse2Text_74eb4
+ text_end
CeruleanHouse2Text_74eb9:
- TX_FAR _CeruleanHouse2Text_74eb9
- db "@"
+ text_far _CeruleanHouse2Text_74eb9
+ text_end
diff --git a/scripts/CeruleanCaveB1F.asm b/scripts/CeruleanCaveB1F.asm
index b98ca4ba..a94a7fe3 100755
--- a/scripts/CeruleanCaveB1F.asm
+++ b/scripts/CeruleanCaveB1F.asm
@@ -20,25 +20,18 @@ CeruleanCaveB1F_TextPointers:
dw PickUpItemText
MewtwoTrainerHeader:
- dbEventFlagBit EVENT_BEAT_MEWTWO
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MEWTWO
- dw MewtwoBattleText ; TextBeforeBattle
- dw MewtwoBattleText ; TextAfterBattle
- dw MewtwoBattleText ; TextEndBattle
- dw MewtwoBattleText ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_MEWTWO, 0, MewtwoBattleText, MewtwoBattleText, MewtwoBattleText
+ db -1 ; end
MewtwoText:
- TX_ASM
+ text_asm
ld hl, MewtwoTrainerHeader
call TalkToTrainer
jp TextScriptEnd
MewtwoBattleText:
- TX_FAR _MewtwoBattleText
- TX_ASM
+ text_far _MewtwoBattleText
+ text_asm
ld a, MEWTWO
call PlayCry
call WaitForSoundToFinish
diff --git a/scripts/CeruleanCity.asm b/scripts/CeruleanCity.asm
index c36b3dd6..5a8ce978 100755
--- a/scripts/CeruleanCity.asm
+++ b/scripts/CeruleanCity.asm
@@ -27,7 +27,7 @@ CeruleanCityScript4:
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
@@ -50,10 +50,10 @@ CeruleanCityScript0:
.asm_194e6
ld [wPlayerMovingDirection], a
ld a, b
- ld [wSpriteStateData1 + 2 * $10 + $9], a
+ ld [wSprite02StateData1FacingDirection], a
call Delay3
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
.asm_194f7
CheckEvent EVENT_BEAT_CERULEAN_RIVAL
@@ -70,51 +70,51 @@ CeruleanCityScript0:
ld a, MUSIC_MEET_RIVAL
call PlayMusic
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $f0
ld [wJoyIgnore], a
ld a, [wXCoord]
- cp $14
+ cp 20
jr z, .asm_19535
ld a, $1
- ld [H_SPRITEINDEX], a
- ld a, $5
- ld [H_SPRITEDATAOFFSET], a
+ ldh [hSpriteIndex], a
+ ld a, SPRITESTATEDATA2_MAPX
+ ldh [hSpriteDataOffset], a
call GetPointerWithinSpriteStateData2
- ld [hl], $19
+ ld [hl], 25
.asm_19535
ld a, HS_CERULEAN_RIVAL
ld [wMissableObjectIndex], a
predef ShowObject
ld de, CeruleanCityMovement1
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call MoveSprite
ld a, $1
ld [wCeruleanCityCurScript], a
ret
CeruleanCityCoords1:
- db $07,$1e
- db $09,$1e
- db $ff
+ dbmapcoord 30, 7
+ dbmapcoord 30, 9
+ db -1 ; end
CeruleanCityCoords2:
- db $06,$14
- db $06,$15
- db $ff
+ dbmapcoord 20, 6
+ dbmapcoord 21, 6
+ db -1 ; end
CeruleanCityMovement1:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
CeruleanCityScript_1955d:
ld a, 1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
xor a ; SPRITE_FACING_DOWN
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
jp SetSpriteFacingDirectionAndDelay ; face object
CeruleanCityScript1:
@@ -124,7 +124,7 @@ CeruleanCityScript1:
xor a
ld [wJoyIgnore], a
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld hl, wd72d
set 6, [hl]
@@ -132,12 +132,12 @@ CeruleanCityScript1:
ld hl, CeruleanCityText_1966d
ld de, CeruleanCityText_19672
call SaveEndBattleTextPointers
- ld a, OPP_SONY1
+ ld a, OPP_RIVAL1
ld [wCurOpponent], a
ld a, 3
ld [wTrainerNo], a
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
call CeruleanCityScript_1955d
ld a, $2
ld [wCeruleanCityCurScript], a
@@ -152,15 +152,15 @@ CeruleanCityScript2:
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_CERULEAN_RIVAL
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call StopAllMusic
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld a, [wXCoord]
- cp $14
+ cp 20
jr nz, .asm_195f0
ld de, CeruleanCityMovement4
jr .asm_195f3
@@ -168,7 +168,7 @@ CeruleanCityScript2:
ld de, CeruleanCityMovement3
.asm_195f3
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call MoveSprite
ld a, $3
ld [wCeruleanCityCurScript], a
@@ -182,7 +182,7 @@ CeruleanCityMovement3:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
CeruleanCityMovement4:
db NPC_MOVEMENT_RIGHT
@@ -192,7 +192,7 @@ CeruleanCityMovement4:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
CeruleanCityScript3:
ld a, [wd730]
@@ -228,7 +228,7 @@ CeruleanCity_TextPointers:
dw CeruleanCityText17
CeruleanCityText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_CERULEAN_RIVAL
; do pre-battle text
jr z, .PreBattleText
@@ -243,23 +243,23 @@ CeruleanCityText1:
jp TextScriptEnd
CeruleanCityText_19668:
- TX_FAR _CeruleanCityText_19668
- db "@"
+ text_far _CeruleanCityText_19668
+ text_end
CeruleanCityText_1966d:
- TX_FAR _CeruleanCityText_1966d
- db "@"
+ text_far _CeruleanCityText_1966d
+ text_end
CeruleanCityText_19672:
- TX_FAR _CeruleanCityText_19672
- db "@"
+ text_far _CeruleanCityText_19672
+ text_end
CeruleanCityText_19677:
- TX_FAR _CeruleanCityText_19677
- db "@"
+ text_far _CeruleanCityText_19677
+ text_end
CeruleanCityText2:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF
jr nz, .asm_4ca20
ld hl, CeruleanCityText_196d9
@@ -270,7 +270,7 @@ CeruleanCityText2:
ld hl, CeruleanCityText_196ee
ld de, CeruleanCityText_196ee
call SaveEndBattleTextPointers
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
@@ -280,7 +280,7 @@ CeruleanCityText2:
.asm_4ca20
ld hl, CeruleanCityText_196f3
call PrintText
- lb bc, TM_28, 1
+ lb bc, TM_DIG, 1
call GiveItem
jr c, .Success
ld hl, TM28NoRoomText
@@ -291,53 +291,53 @@ CeruleanCityText2:
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, ReceivedTM28Text
call PrintText
- callba CeruleanHideRocket
+ farcall CeruleanHideRocket
.Done
jp TextScriptEnd
CeruleanCityText_196d9:
- TX_FAR _CeruleanCityText_196d9
- db "@"
+ text_far _CeruleanCityText_196d9
+ text_end
ReceivedTM28Text:
- TX_FAR _ReceivedTM28Text
- TX_SFX_ITEM_1
- TX_FAR _ReceivedTM28Text2
- TX_WAIT
- db "@"
+ text_far _ReceivedTM28Text
+ sound_get_item_1
+ text_far _ReceivedTM28Text2
+ text_waitbutton
+ text_end
TM28NoRoomText:
- TX_FAR _TM28NoRoomText
- db "@"
+ text_far _TM28NoRoomText
+ text_end
CeruleanCityText_196ee:
- TX_FAR _CeruleanCityText_196ee
- db "@"
+ text_far _CeruleanCityText_196ee
+ text_end
CeruleanCityText_196f3:
- TX_FAR _CeruleanCityText_196f3
- db "@"
+ text_far _CeruleanCityText_196f3
+ text_end
CeruleanCityText3:
- TX_FAR _CeruleanCityText3
- db "@"
+ text_far _CeruleanCityText3
+ text_end
CeruleanCityText4:
- TX_FAR _CeruleanCityText4
- db "@"
+ text_far _CeruleanCityText4
+ text_end
CeruleanCityText5:
- TX_FAR _CeruleanCityText5
- db "@"
+ text_far _CeruleanCityText5
+ text_end
CeruleanCityText11:
CeruleanCityText6:
- TX_FAR _CeruleanCityText6
- db "@"
+ text_far _CeruleanCityText6
+ text_end
CeruleanCityText7:
- TX_ASM
- ld a, [hRandomAdd]
+ text_asm
+ ldh a, [hRandomAdd]
cp 180
jr c, .asm_e9fc9
ld hl, CeruleanCityText_19730
@@ -356,20 +356,20 @@ CeruleanCityText7:
jp TextScriptEnd
CeruleanCityText_19730:
- TX_FAR _CeruleanCityText_19730
- db "@"
+ text_far _CeruleanCityText_19730
+ text_end
CeruleanCityText_19735:
- TX_FAR _CeruleanCityText_19735
- db "@"
+ text_far _CeruleanCityText_19735
+ text_end
CeruleanCityText_1973a:
- TX_FAR _CeruleanCityText_1973a
- db "@"
+ text_far _CeruleanCityText_1973a
+ text_end
CeruleanCityText8:
- TX_ASM
- ld a, [hRandomAdd]
+ text_asm
+ ldh a, [hRandomAdd]
cp 180
jr c, .asm_e28da
ld hl, CeruleanCityText_1976f
@@ -394,41 +394,41 @@ CeruleanCityText8:
jp TextScriptEnd
CeruleanCityText_1976f:
- TX_FAR _CeruleanCityText_1976f
- db "@"
+ text_far _CeruleanCityText_1976f
+ text_end
CeruleanCityText_19774:
- TX_FAR _CeruleanCityText_19774
- db "@"
+ text_far _CeruleanCityText_19774
+ text_end
CeruleanCityText_19779:
- TX_FAR _CeruleanCityText_19779
- db "@"
+ text_far _CeruleanCityText_19779
+ text_end
CeruleanCityText_1977e:
- TX_FAR _CeruleanCityText_1977e
- db "@"
+ text_far _CeruleanCityText_1977e
+ text_end
CeruleanCityText9:
- TX_FAR _CeruleanCityText9
- db "@"
+ text_far _CeruleanCityText9
+ text_end
CeruleanCityText10:
- TX_FAR _CeruleanCityText10
- db "@"
+ text_far _CeruleanCityText10
+ text_end
CeruleanCityText12:
- TX_FAR _CeruleanCityText12
- db "@"
+ text_far _CeruleanCityText12
+ text_end
CeruleanCityText13:
- TX_FAR _CeruleanCityText13
- db "@"
+ text_far _CeruleanCityText13
+ text_end
CeruleanCityText16:
- TX_FAR _CeruleanCityText16
- db "@"
+ text_far _CeruleanCityText16
+ text_end
CeruleanCityText17:
- TX_FAR _CeruleanCityText17
- db "@"
+ text_far _CeruleanCityText17
+ text_end
diff --git a/scripts/CeruleanGym.asm b/scripts/CeruleanGym.asm
index d1dd66e4..13a00da2 100755
--- a/scripts/CeruleanGym.asm
+++ b/scripts/CeruleanGym.asm
@@ -2,7 +2,7 @@ CeruleanGym_Script:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
- call nz, CeruleanGymScript_5c6d0
+ call nz, .LoadNames
call EnableAutoTextBoxDrawing
ld hl, CeruleanGymTrainerHeader0
ld de, CeruleanGym_ScriptPointers
@@ -11,15 +11,15 @@ CeruleanGym_Script:
ld [wCeruleanGymCurScript], a
ret
-CeruleanGymScript_5c6d0:
- ld hl, Gym2CityName
- ld de, Gym2LeaderName
+.LoadNames:
+ ld hl, .CityName
+ ld de, .LeaderName
jp LoadGymLeaderAndCityName
-Gym2CityName:
+.CityName:
db "CERULEAN CITY@"
-Gym2LeaderName:
+.LeaderName:
db "MISTY@"
CeruleanGymScript_5c6ed:
@@ -44,26 +44,26 @@ CeruleanGymScript3:
CeruleanGymScript_5c70d:
ld a, $5
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_MISTY
- lb bc, TM_11, 1
+ lb bc, TM_BUBBLEBEAM, 1
call GiveItem
jr nc, .BagFull
ld a, $6
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM11
jr .gymVictory
.BagFull
ld a, $7
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
ld hl, wObtainedBadges
- set 1, [hl]
+ set BIT_CASCADEBADGE, [hl]
ld hl, wBeatGymFlags
- set 1, [hl]
+ set BIT_CASCADEBADGE, [hl]
; deactivate gym trainers
SetEvents EVENT_BEAT_CERULEAN_GYM_TRAINER_0, EVENT_BEAT_CERULEAN_GYM_TRAINER_1
@@ -80,27 +80,13 @@ CeruleanGym_TextPointers:
dw CeruleanGymText7
CeruleanGymTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_CERULEAN_GYM_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_CERULEAN_GYM_TRAINER_0
- dw CeruleanGymBattleText1 ; TextBeforeBattle
- dw CeruleanGymAfterBattleText1 ; TextAfterBattle
- dw CeruleanGymEndBattleText1 ; TextEndBattle
- dw CeruleanGymEndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_CERULEAN_GYM_TRAINER_0, 3, CeruleanGymBattleText1, CeruleanGymEndBattleText1, CeruleanGymAfterBattleText1
CeruleanGymTrainerHeader1:
- dbEventFlagBit EVENT_BEAT_CERULEAN_GYM_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_CERULEAN_GYM_TRAINER_1
- dw CeruleanGymBattleText2 ; TextBeforeBattle
- dw CeruleanGymAfterBattleText2 ; TextAfterBattle
- dw CeruleanGymEndBattleText2 ; TextEndBattle
- dw CeruleanGymEndBattleText2 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_CERULEAN_GYM_TRAINER_1, 3, CeruleanGymBattleText2, CeruleanGymEndBattleText2, CeruleanGymAfterBattleText2
+ db -1 ; end
CeruleanGymText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_MISTY
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM11
@@ -121,82 +107,82 @@ CeruleanGymText1:
ld hl, CeruleanGymText_5c7d8
ld de, CeruleanGymText_5c7d8
call SaveEndBattleTextPointers
- ld a, [H_SPRITEINDEX]
+ ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $2
ld [wGymLeaderNo], a
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $3
ld [wCeruleanGymCurScript], a
.done
jp TextScriptEnd
CeruleanGymText_5c7be:
- TX_FAR _CeruleanGymText_5c7be
- db "@"
+ text_far _CeruleanGymText_5c7be
+ text_end
CeruleanGymText_5c7c3:
- TX_FAR _CeruleanGymText_5c7c3
- db "@"
+ text_far _CeruleanGymText_5c7c3
+ text_end
CeruleanGymText5:
- TX_FAR _CeruleanGymText_5c7c8
- db "@"
+ text_far _CeruleanGymText_5c7c8
+ text_end
CeruleanGymText6:
- TX_FAR _ReceivedTM11Text
- TX_SFX_ITEM_1
- db "@"
+ text_far _ReceivedTM11Text
+ sound_get_item_1
+ text_end
CeruleanGymText7:
- TX_FAR _CeruleanGymText_5c7d3
- db "@"
+ text_far _CeruleanGymText_5c7d3
+ text_end
CeruleanGymText_5c7d8:
- TX_FAR _CeruleanGymText_5c7d8
- db "@"
+ text_far _CeruleanGymText_5c7d8
+ text_end
CeruleanGymText2:
- TX_ASM
+ text_asm
ld hl, CeruleanGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
CeruleanGymBattleText1:
- TX_FAR _CeruleanGymBattleText1
- db "@"
+ text_far _CeruleanGymBattleText1
+ text_end
CeruleanGymEndBattleText1:
- TX_FAR _CeruleanGymEndBattleText1
- db "@"
+ text_far _CeruleanGymEndBattleText1
+ text_end
CeruleanGymAfterBattleText1:
- TX_FAR _CeruleanGymAfterBattleText1
- db "@"
+ text_far _CeruleanGymAfterBattleText1
+ text_end
CeruleanGymText3:
- TX_ASM
+ text_asm
ld hl, CeruleanGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
CeruleanGymBattleText2:
- TX_FAR _CeruleanGymBattleText2
- db "@"
+ text_far _CeruleanGymBattleText2
+ text_end
CeruleanGymEndBattleText2:
- TX_FAR _CeruleanGymEndBattleText2
- db "@"
+ text_far _CeruleanGymEndBattleText2
+ text_end
CeruleanGymAfterBattleText2:
- TX_FAR _CeruleanGymAfterBattleText2
- db "@"
+ text_far _CeruleanGymAfterBattleText2
+ text_end
CeruleanGymText4:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_MISTY
jr nz, .asm_5c821
ld hl, CeruleanGymText_5c82a
@@ -209,9 +195,9 @@ CeruleanGymText4:
jp TextScriptEnd
CeruleanGymText_5c82a:
- TX_FAR _CeruleanGymText_5c82a
- db "@"
+ text_far _CeruleanGymText_5c82a
+ text_end
CeruleanGymText_5c82f:
- TX_FAR _CeruleanGymText_5c82f
- db "@"
+ text_far _CeruleanGymText_5c82f
+ text_end
diff --git a/scripts/CeruleanMart.asm b/scripts/CeruleanMart.asm
index f812aadd..beb0fa1b 100755
--- a/scripts/CeruleanMart.asm
+++ b/scripts/CeruleanMart.asm
@@ -7,9 +7,9 @@ CeruleanMart_TextPointers:
dw CeruleanMartText3
CeruleanMartText2:
- TX_FAR _CeruleanMartText2
- db "@"
+ text_far _CeruleanMartText2
+ text_end
CeruleanMartText3:
- TX_FAR _CeruleanMartText3
- db "@"
+ text_far _CeruleanMartText3
+ text_end
diff --git a/scripts/CeruleanPokecenter.asm b/scripts/CeruleanPokecenter.asm
index de4fd57d..3aa465ca 100755
--- a/scripts/CeruleanPokecenter.asm
+++ b/scripts/CeruleanPokecenter.asm
@@ -10,20 +10,20 @@ CeruleanPokecenter_TextPointers:
dw CeruleanPokecenterText5
CeruleanTradeNurseText:
- TX_CABLE_CLUB_RECEPTIONIST
+ script_cable_club_receptionist
CeruleanHealNurseText:
- TX_POKECENTER_NURSE
+ script_pokecenter_nurse
CeruleanPokecenterText2:
- TX_FAR _CeruleanPokecenterText2
- db "@"
+ text_far _CeruleanPokecenterText2
+ text_end
CeruleanPokecenterText3:
- TX_FAR _CeruleanPokecenterText3
- db "@"
+ text_far _CeruleanPokecenterText3
+ text_end
CeruleanPokecenterText5:
- TX_ASM
- callab PokecenterChanseyText
+ text_asm
+ callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/CeruleanTradeHouse.asm b/scripts/CeruleanTradeHouse.asm
index 8b5d4495..a6820fdb 100755
--- a/scripts/CeruleanTradeHouse.asm
+++ b/scripts/CeruleanTradeHouse.asm
@@ -9,7 +9,7 @@ CeruleanTradeHouse_TextPointers:
dw CeruleanHouse1Text4
CeruleanHouse1Text1:
- TX_ASM
+ text_asm
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
CheckEvent EVENT_GOT_BULBASAUR_IN_CERULEAN
@@ -61,46 +61,46 @@ CeruleanHouse1Text1:
jp TextScriptEnd
CeruleanHouse1Text_1cfc8:
- TX_FAR MelanieText1
- TX_WAIT
- db "@"
+ text_far MelanieText1
+ text_waitbutton
+ text_end
CeruleanHouse1Text_1cfce:
- TX_FAR MelanieText2
- db "@"
+ text_far MelanieText2
+ text_end
CeruleanHouse1Text_1cfd3:
- TX_FAR MelanieText3
- TX_WAIT
- db "@"
+ text_far MelanieText3
+ text_waitbutton
+ text_end
CeruleanHouse1Text_1cfd9:
- TX_FAR MelanieText4
- TX_WAIT
- db "@"
+ text_far MelanieText4
+ text_waitbutton
+ text_end
CeruleanHouse1Text_1cfdf:
- TX_FAR MelanieText5
- TX_WAIT
- db "@"
+ text_far MelanieText5
+ text_waitbutton
+ text_end
CeruleanHouse1Text2:
- TX_FAR MelanieBulbasaurText
- TX_ASM
+ text_far MelanieBulbasaurText
+ text_asm
ld a, BULBASAUR
call PlayCry
jp TextScriptEnd
CeruleanHouse1Text3:
- TX_FAR MelanieOddishText
- TX_ASM
+ text_far MelanieOddishText
+ text_asm
ld a, ODDISH
call PlayCry
jp TextScriptEnd
CeruleanHouse1Text4:
- TX_FAR MelanieSandshrewText
- TX_ASM
+ text_far MelanieSandshrewText
+ text_asm
ld a, SANDSHREW
call PlayCry
jp TextScriptEnd
diff --git a/scripts/CeruleanTrashedHouse.asm b/scripts/CeruleanTrashedHouse.asm
index f249ef01..d11c7721 100755
--- a/scripts/CeruleanTrashedHouse.asm
+++ b/scripts/CeruleanTrashedHouse.asm
@@ -8,32 +8,32 @@ CeruleanTrashedHouse_TextPointers:
dw CeruleanHouseTrashedText3
CeruleanHouseTrashedText1:
- TX_ASM
- ld b, $e4
+ text_asm
+ ld b, TM_DIG
predef GetQuantityOfItemInBag
and b
- jr z, .asm_f8734
+ jr z, .no_dig_tm
ld hl, CeruleanHouseTrashedText_1d6b0
call PrintText
- jr .asm_8dfe9
-.asm_f8734
+ jr .done
+.no_dig_tm
ld hl, CeruleanHouseTrashedText_1d6ab
call PrintText
-.asm_8dfe9
+.done
jp TextScriptEnd
CeruleanHouseTrashedText_1d6ab:
- TX_FAR _CeruleanTrashedText_1d6ab
- db "@"
+ text_far _CeruleanTrashedText_1d6ab
+ text_end
CeruleanHouseTrashedText_1d6b0:
- TX_FAR _CeruleanTrashedText_1d6b0
- db "@"
+ text_far _CeruleanTrashedText_1d6b0
+ text_end
CeruleanHouseTrashedText2:
- TX_FAR _CeruleanHouseTrashedText2
- db "@"
+ text_far _CeruleanHouseTrashedText2
+ text_end
CeruleanHouseTrashedText3:
- TX_FAR _CeruleanHouseTrashedText3
- db "@"
+ text_far _CeruleanHouseTrashedText3
+ text_end
diff --git a/scripts/ChampionsRoom.asm b/scripts/ChampionsRoom.asm
index b8ce710b..d500e1d2 100755
--- a/scripts/ChampionsRoom.asm
+++ b/scripts/ChampionsRoom.asm
@@ -44,7 +44,7 @@ GaryEntrance_RLEMovement:
db D_UP, 1
db D_RIGHT, 1
db D_UP, 3
- db $ff
+ db -1 ; end
GaryScript2:
ld a, [wSimulatedJoypadStatesIndex]
@@ -56,7 +56,7 @@ GaryScript2:
ld hl, wOptions
res 7, [hl] ; Turn on battle animations to make the battle feel more epic.
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
ld hl, wd72d
@@ -65,7 +65,7 @@ GaryScript2:
ld hl, GaryDefeatedText
ld de, GaryVictoryText
call SaveEndBattleTextPointers
- ld a, OPP_SONY3
+ ld a, OPP_RIVAL3
ld [wCurOpponent], a
; select which team to use during the encounter
@@ -74,7 +74,7 @@ GaryScript2:
ld [wTrainerNo], a
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $3
ld [wChampionsRoomCurScript], a
ret
@@ -88,26 +88,26 @@ GaryScript3:
ld a, $f0
ld [wJoyIgnore], a
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call GaryScript_760c8
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld a, $4
ld [wChampionsRoomCurScript], a
ret
GaryScript4:
- callba Music_Cities1AlternateTempo
+ farcall Music_Cities1AlternateTempo
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call GaryScript_760c8
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld de, OakEntranceAfterVictoryMovement
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call MoveSprite
ld a, HS_CHAMPIONS_ROOM_OAK
ld [wMissableObjectIndex], a
@@ -122,7 +122,7 @@ OakEntranceAfterVictoryMovement:
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
GaryScript5:
ld a, [wd730]
@@ -131,17 +131,17 @@ GaryScript5:
ld a, PLAYER_DIR_LEFT
ld [wPlayerMovingDirection], a
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, SPRITE_FACING_LEFT
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
xor a ; SPRITE_FACING_DOWN
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, $3
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call GaryScript_760c8
ld a, $6
ld [wChampionsRoomCurScript], a
@@ -149,12 +149,12 @@ GaryScript5:
GaryScript6:
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, SPRITE_FACING_RIGHT
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, $4
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call GaryScript_760c8
ld a, $7
ld [wChampionsRoomCurScript], a
@@ -162,16 +162,16 @@ GaryScript6:
GaryScript7:
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
xor a ; SPRITE_FACING_DOWN
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, $5
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call GaryScript_760c8
ld de, OakExitGaryRoomMovement
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call MoveSprite
ld a, $8
ld [wChampionsRoomCurScript], a
@@ -180,7 +180,7 @@ GaryScript7:
OakExitGaryRoomMovement:
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
GaryScript8:
ld a, [wd730]
@@ -209,7 +209,7 @@ GaryScript9:
WalkToHallOfFame_RLEMovment:
db D_UP, 4
db D_LEFT, 1
- db $ff
+ db -1 ; end
GaryScript10:
ld a, [wSimulatedJoypadStatesIndex]
@@ -237,7 +237,7 @@ ChampionsRoom_TextPointers:
dw GaryText5
GaryText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_CHAMPION_RIVAL
ld hl, GaryChampionIntroText
jr z, .printText
@@ -247,27 +247,27 @@ GaryText1:
jp TextScriptEnd
GaryChampionIntroText:
- TX_FAR _GaryChampionIntroText
- db "@"
+ text_far _GaryChampionIntroText
+ text_end
GaryDefeatedText:
- TX_FAR _GaryDefeatedText
- db "@"
+ text_far _GaryDefeatedText
+ text_end
GaryVictoryText:
- TX_FAR _GaryVictoryText
- db "@"
+ text_far _GaryVictoryText
+ text_end
GaryText_76103:
- TX_FAR _GaryText_76103
- db "@"
+ text_far _GaryText_76103
+ text_end
GaryText2:
- TX_FAR _GaryText2
- db "@"
+ text_far _GaryText2
+ text_end
GaryText3:
- TX_ASM
+ text_asm
ld a, [wPlayerStarter]
ld [wd11e], a
call GetMonName
@@ -276,13 +276,13 @@ GaryText3:
jp TextScriptEnd
GaryText_76120:
- TX_FAR _GaryText_76120
- db "@"
+ text_far _GaryText_76120
+ text_end
GaryText4:
- TX_FAR _GaryText_76125
- db "@"
+ text_far _GaryText_76125
+ text_end
GaryText5:
- TX_FAR _GaryText_7612a
- db "@"
+ text_far _GaryText_7612a
+ text_end
diff --git a/scripts/CinnabarGym.asm b/scripts/CinnabarGym.asm
index 2dc07e58..529b3be2 100755
--- a/scripts/CinnabarGym.asm
+++ b/scripts/CinnabarGym.asm
@@ -10,21 +10,23 @@ CinnabarGymScript_75759:
bit 6, [hl]
res 6, [hl]
push hl
- call nz, CinnabarGymScript_75772
+ call nz, .LoadNames
pop hl
bit 5, [hl]
res 5, [hl]
call nz, UpdateCinnabarGymGateTileBlocks
ResetEvent EVENT_2A7
ret
-CinnabarGymScript_75772:
- ld hl, Gym7CityName
- ld de, Gym7LeaderName
+
+.LoadNames:
+ ld hl, .CityName
+ ld de, .LeaderName
jp LoadGymLeaderAndCityName
-Gym7CityName:
+.CityName:
db "CINNABAR ISLAND@"
-Gym7LeaderName:
+
+.LeaderName:
db "BLAINE@"
CinnabarGymScript_75792:
@@ -36,7 +38,7 @@ CinnabarGymScript_75792:
ret
CinnabarGymScript_74f48:
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
ld [wTrainerHeaderFlagBit], a
ret
@@ -53,7 +55,7 @@ CinnabarGymScript0:
ld a, [wOpponentAfterWrongAnswer]
and a
ret z
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
cp $4
jr nz, .asm_757c3
ld a, PLAYER_DIR_DOWN
@@ -80,7 +82,7 @@ CinnabarGymScript0:
MovementData_757d7:
db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
PikachuMovementData_74f97:
db $00
@@ -91,7 +93,7 @@ PikachuMovementData_74f97:
MovementData_757da:
db NPC_MOVEMENT_LEFT
- db $FF
+ db -1 ; end
PikachuMovementData_74f9e:
db $00
@@ -106,7 +108,7 @@ CinnabarGymScript_74fa3:
ret z
push hl
push bc
- callab GetPikachuFacingDirectionAndReturnToE
+ callfar GetPikachuFacingDirectionAndReturnToE
pop bc
pop hl
ld a, b
@@ -123,7 +125,7 @@ CinnabarGymScript1:
ld [wJoyIgnore], a
ld a, [wOpponentAfterWrongAnswer]
ld [wTrainerHeaderFlagBit], a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
CinnabarGymScript2:
@@ -166,7 +168,7 @@ CinnabarGymScript2:
CinnabarGymScript_75023:
ld a, [wTrainerHeaderFlagBit]
- ld [$ffdb], a
+ ldh [hGymGateIndex], a
ld c, a
ld b, FLAG_SET
EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0
@@ -175,7 +177,7 @@ CinnabarGymScript_75023:
CinnabarGymScript_75032:
ld a, [wTrainerHeaderFlagBit]
- ld [$ffdb], a
+ ldh [hGymGateIndex], a
ld c, a
ld b, FLAG_TEST
EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0
@@ -201,26 +203,26 @@ CinnabarGymScript3:
ld [wJoyIgnore], a
CinnabarGymScript3_75857:
ld a, $a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_BLAINE
- lb bc, TM_38, 1
+ lb bc, TM_FIRE_BLAST, 1
call GiveItem
jr nc, .BagFull
ld a, $b
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM38
jr .gymVictory
.BagFull
ld a, $c
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
ld hl, wObtainedBadges
- set 6, [hl]
+ set BIT_VOLCANOBADGE, [hl]
ld hl, wBeatGymFlags
- set 6, [hl]
+ set BIT_VOLCANOBADGE, [hl]
; deactivate gym trainers
SetEventRange EVENT_BEAT_CINNABAR_GYM_TRAINER_0, EVENT_BEAT_CINNABAR_GYM_TRAINER_6
@@ -245,7 +247,7 @@ CinnabarGym_TextPointers:
dw TM38NoRoomText
CinnabarGymScript_750c3:
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
@@ -265,7 +267,7 @@ CinnabarGymScript_750c3:
jp TextScriptEnd
CinnabarGymText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_BLAINE
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM38
@@ -288,35 +290,35 @@ CinnabarGymText1:
jp CinnabarGymScript_750c3
BlaineBattleText:
- TX_FAR _BlaineBattleText
- db "@"
+ text_far _BlaineBattleText
+ text_end
BlaineEndBattleText:
- TX_FAR _BlaineEndBattleText
- TX_SFX_KEY_ITEM ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded
- TX_WAIT
- db "@"
+ text_far _BlaineEndBattleText
+ sound_get_key_item ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded
+ text_waitbutton
+ text_end
BlaineFireBlastText:
- TX_FAR _BlaineFireBlastText
- db "@"
+ text_far _BlaineFireBlastText
+ text_end
BlaineBadgeText:
- TX_FAR _BlaineBadgeText
- db "@"
+ text_far _BlaineBadgeText
+ text_end
ReceivedTM38Text:
- TX_FAR _ReceivedTM38Text
- TX_SFX_ITEM_1
- TX_FAR _TM38ExplanationText
- db "@"
+ text_far _ReceivedTM38Text
+ sound_get_item_1
+ text_far _TM38ExplanationText
+ text_end
TM38NoRoomText:
- TX_FAR _TM38NoRoomText
- db "@"
+ text_far _TM38NoRoomText
+ text_end
CinnabarGymText2:
- TX_ASM
+ text_asm
call CinnabarGymScript_74f48
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_0
jr nz, .asm_46bb4
@@ -332,19 +334,19 @@ CinnabarGymText2:
jp TextScriptEnd
CinnabarGymText_7595f:
- TX_FAR _CinnabarGymText_7595f
- db "@"
+ text_far _CinnabarGymText_7595f
+ text_end
CinnabarGymText_75964:
- TX_FAR _CinnabarGymText_75964
- db "@"
+ text_far _CinnabarGymText_75964
+ text_end
CinnabarGymText_75969:
- TX_FAR _CinnabarGymText_75969
- db "@"
+ text_far _CinnabarGymText_75969
+ text_end
CinnabarGymText3:
- TX_ASM
+ text_asm
call CinnabarGymScript_74f48
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_1
jr nz, .asm_751a8
@@ -369,19 +371,19 @@ CinnabarGymText3:
jp TextScriptEnd
CinnabarGymText_75994:
- TX_FAR _CinnabarGymText_75994
- db "@"
+ text_far _CinnabarGymText_75994
+ text_end
CinnabarGymText_75999:
- TX_FAR _CinnabarGymText_75999
- db "@"
+ text_far _CinnabarGymText_75999
+ text_end
CinnabarGymText_7599e:
- TX_FAR _CinnabarGymText_7599e
- db "@"
+ text_far _CinnabarGymText_7599e
+ text_end
CinnabarGymText4:
- TX_ASM
+ text_asm
call CinnabarGymScript_74f48
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_2
jr nz, .asm_751ee
@@ -405,19 +407,19 @@ CinnabarGymText4:
jp TextScriptEnd
CinnabarGymText_759c9:
- TX_FAR _CinnabarGymText_759c9
- db "@"
+ text_far _CinnabarGymText_759c9
+ text_end
CinnabarGymText_759ce:
- TX_FAR _CinnabarGymText_759ce
- db "@"
+ text_far _CinnabarGymText_759ce
+ text_end
CinnabarGymText_759d3:
- TX_FAR _CinnabarGymText_759d3
- db "@"
+ text_far _CinnabarGymText_759d3
+ text_end
CinnabarGymText5:
- TX_ASM
+ text_asm
call CinnabarGymScript_74f48
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_3
jr nz, .asm_75234
@@ -441,19 +443,19 @@ CinnabarGymText5:
jp TextScriptEnd
CinnabarGymText_759fe:
- TX_FAR _CinnabarGymText_759fe
- db "@"
+ text_far _CinnabarGymText_759fe
+ text_end
CinnabarGymText_75a03:
- TX_FAR _CinnabarGymText_75a03
- db "@"
+ text_far _CinnabarGymText_75a03
+ text_end
CinnabarGymText_75a08:
- TX_FAR _CinnabarGymText_75a08
- db "@"
+ text_far _CinnabarGymText_75a08
+ text_end
CinnabarGymText6:
- TX_ASM
+ text_asm
call CinnabarGymScript_74f48
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_4
jr nz, .asm_776b4
@@ -477,19 +479,19 @@ CinnabarGymText6:
jp TextScriptEnd
CinnabarGymText_75a33:
- TX_FAR _CinnabarGymText_75a33
- db "@"
+ text_far _CinnabarGymText_75a33
+ text_end
CinnabarGymText_75a38:
- TX_FAR _CinnabarGymText_75a38
- db "@"
+ text_far _CinnabarGymText_75a38
+ text_end
CinnabarGymText_75a3d:
- TX_FAR _CinnabarGymText_75a3d
- db "@"
+ text_far _CinnabarGymText_75a3d
+ text_end
CinnabarGymText7:
- TX_ASM
+ text_asm
call CinnabarGymScript_74f48
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_5
jr nz, .asm_2f755
@@ -513,19 +515,19 @@ CinnabarGymText7:
jp TextScriptEnd
CinnabarGymText_75a68:
- TX_FAR _CinnabarGymText_75a68
- db "@"
+ text_far _CinnabarGymText_75a68
+ text_end
CinnabarGymText_75a6d:
- TX_FAR _CinnabarGymText_75a6d
- db "@"
+ text_far _CinnabarGymText_75a6d
+ text_end
CinnabarGymText_75a72:
- TX_FAR _CinnabarGymText_75a72
- db "@"
+ text_far _CinnabarGymText_75a72
+ text_end
CinnabarGymText8:
- TX_ASM
+ text_asm
call CinnabarGymScript_74f48
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_6
jr nz, .asm_d87be
@@ -549,18 +551,18 @@ CinnabarGymText8:
jp TextScriptEnd
CinnabarGymText_75a9d:
- TX_FAR _CinnabarGymText_75a9d
- db "@"
+ text_far _CinnabarGymText_75a9d
+ text_end
CinnabarGymText_75aa2:
- TX_FAR _CinnabarGymText_75aa2
- db "@"
+ text_far _CinnabarGymText_75aa2
+ text_end
CinnabarGymText_75aa7:
- TX_FAR _CinnabarGymText_75aa7
- db "@"
+ text_far _CinnabarGymText_75aa7
+ text_end
CinnabarGymText9:
- TX_ASM
- callab Func_f2133
+ text_asm
+ callfar Func_f2133
jp TextScriptEnd
diff --git a/scripts/CinnabarGym3.asm b/scripts/CinnabarGym3.asm
index 9e8cad74..af3db510 100755
--- a/scripts/CinnabarGym3.asm
+++ b/scripts/CinnabarGym3.asm
@@ -1,4 +1,4 @@
-Func_f2133:
+Func_f2133::
CheckEvent EVENT_BEAT_BLAINE
jr nz, .asm_627d9
ld hl, CinnabarGymText_75ac2
@@ -10,14 +10,14 @@ Func_f2133:
ret
CinnabarGymText_75ac2:
- TX_FAR _CinnabarGymText_75ac2
- db "@"
+ text_far _CinnabarGymText_75ac2
+ text_end
CinnabarGymText_75ac7:
- TX_FAR _CinnabarGymText_75ac7
- db "@"
+ text_far _CinnabarGymText_75ac7
+ text_end
-Func_f2150:
+Func_f2150::
ld hl, TextPointers_f215d
ld d, 0
add hl, de
@@ -36,29 +36,29 @@ TextPointers_f215d:
dw CinnabarGymText_f2182
CinnabarGymText_f2169:
- TX_FAR _CinnabarGymText_1
- db "@"
+ text_far _CinnabarGymText_1
+ text_end
CinnabarGymText_f216e:
- TX_FAR _CinnabarGymText_2
- db "@"
+ text_far _CinnabarGymText_2
+ text_end
CinnabarGymText_f2173:
- TX_FAR _CinnabarGymText_3
- db "@"
+ text_far _CinnabarGymText_3
+ text_end
CinnabarGymText_f2178:
- TX_FAR _CinnabarGymText_4
- db "@"
+ text_far _CinnabarGymText_4
+ text_end
CinnabarGymText_f217d:
- TX_FAR _CinnabarGymText_5
- db "@"
+ text_far _CinnabarGymText_5
+ text_end
CinnabarGymText_f2182:
- TX_FAR _CinnabarGymText_6
- db "@"
+ text_far _CinnabarGymText_6
+ text_end
CinnabarGymText_f2187:
- TX_FAR _CinnabarGymText_7 ; unused
- db "@"
+ text_far _CinnabarGymText_7 ; unused
+ text_end
diff --git a/scripts/CinnabarGym_2.asm b/scripts/CinnabarGym_2.asm
index 00118fb5..4c296cf7 100755
--- a/scripts/CinnabarGym_2.asm
+++ b/scripts/CinnabarGym_2.asm
@@ -1,5 +1,5 @@
CinnabarGymScript_753de:
- callab Func_f2150
+ callfar Func_f2150
jp TextScriptEnd
CinnabarGymScript_753e9:
diff --git a/scripts/CinnabarIsland.asm b/scripts/CinnabarIsland.asm
index 5716428c..a1b20cd3 100755
--- a/scripts/CinnabarIsland.asm
+++ b/scripts/CinnabarIsland.asm
@@ -17,18 +17,18 @@ CinnabarIslandScript0:
call IsItemInBag
ret nz
ld a, [wYCoord]
- cp $4
+ cp 4
ret nz
ld a, [wXCoord]
- cp $12
+ cp 18
ret nz
ld a, PLAYER_DIR_UP
ld [wPlayerMovingDirection], a
ld a, $8
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
ld a, D_DOWN
@@ -61,25 +61,25 @@ CinnabarIsland_TextPointers:
dw CinnabarIslandText8
CinnabarIslandText8:
- TX_FAR _CinnabarIslandText8
- db "@"
+ text_far _CinnabarIslandText8
+ text_end
CinnabarIslandText1:
- TX_FAR _CinnabarIslandText1
- db "@"
+ text_far _CinnabarIslandText1
+ text_end
CinnabarIslandText2:
- TX_FAR _CinnabarIslandText2
- db "@"
+ text_far _CinnabarIslandText2
+ text_end
CinnabarIslandText3:
- TX_FAR _CinnabarIslandText3
- db "@"
+ text_far _CinnabarIslandText3
+ text_end
CinnabarIslandText6:
- TX_FAR _CinnabarIslandText6
- db "@"
+ text_far _CinnabarIslandText6
+ text_end
CinnabarIslandText7:
- TX_FAR _CinnabarIslandText7
- db "@"
+ text_far _CinnabarIslandText7
+ text_end
diff --git a/scripts/CinnabarLab.asm b/scripts/CinnabarLab.asm
index aab3324b..2f4be7f2 100755
--- a/scripts/CinnabarLab.asm
+++ b/scripts/CinnabarLab.asm
@@ -10,21 +10,21 @@ CinnabarLab_TextPointers:
dw Lab1Text5
Lab1Text1:
- TX_FAR _Lab1Text1
- db "@"
+ text_far _Lab1Text1
+ text_end
Lab1Text2:
- TX_FAR _Lab1Text2
- db "@"
+ text_far _Lab1Text2
+ text_end
Lab1Text3:
- TX_FAR _Lab1Text3
- db "@"
+ text_far _Lab1Text3
+ text_end
Lab1Text4:
- TX_FAR _Lab1Text4
- db "@"
+ text_far _Lab1Text4
+ text_end
Lab1Text5:
- TX_FAR _Lab1Text5
- db "@"
+ text_far _Lab1Text5
+ text_end
diff --git a/scripts/CinnabarLabFossilRoom.asm b/scripts/CinnabarLabFossilRoom.asm
index f5f03a19..2c388119 100755
--- a/scripts/CinnabarLabFossilRoom.asm
+++ b/scripts/CinnabarLabFossilRoom.asm
@@ -44,10 +44,10 @@ FossilsList:
db DOME_FOSSIL
db HELIX_FOSSIL
db OLD_AMBER
- db $00
+ db 0 ; end
Lab4Text1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GAVE_FOSSIL_TO_LAB
jr nz, .asm_75d96
ld hl, Lab4Text_75dc6
@@ -56,7 +56,7 @@ Lab4Text1:
ld a, [wFilteredBagItemsCount]
and a
jr z, .asm_75d8d
- callba GiveFossilToCinnabarLab
+ farcall GiveFossilToCinnabarLab
jr .asm_75d93
.asm_75d8d
ld hl, Lab4Text_75dcb
@@ -83,27 +83,27 @@ Lab4Text1:
jr .asm_75d93
Lab4Text_75dc6:
- TX_FAR _Lab4Text_75dc6
- db "@"
+ text_far _Lab4Text_75dc6
+ text_end
Lab4Text_75dcb:
- TX_FAR _Lab4Text_75dcb
- db "@"
+ text_far _Lab4Text_75dcb
+ text_end
Lab4Text_75dd0:
- TX_FAR _Lab4Text_75dd0
- db "@"
+ text_far _Lab4Text_75dd0
+ text_end
Lab4Text_75dd5:
- TX_FAR _Lab4Text_75dd5
- db "@"
+ text_far _Lab4Text_75dd5
+ text_end
Lab4Text2:
- TX_ASM
- ld a, $3
+ text_asm
+ ld a, TRADE_FOR_SAILOR
ld [wWhichTrade], a
predef DoInGameTradeDialogue
jp TextScriptEnd
LoadFossilItemAndMonNameBank1D:
- jpba LoadFossilItemAndMonName
+ farjp LoadFossilItemAndMonName
diff --git a/scripts/CinnabarLabMetronomeRoom.asm b/scripts/CinnabarLabMetronomeRoom.asm
index 6eddceae..b43f98e2 100755
--- a/scripts/CinnabarLabMetronomeRoom.asm
+++ b/scripts/CinnabarLabMetronomeRoom.asm
@@ -9,54 +9,54 @@ CinnabarLabMetronomeRoom_TextPointers:
dw Lab3Text5
Lab3Text1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_TM35
- jr nz, .asm_e551a
+ jr nz, .got_item
ld hl, TM35PreReceiveText
call PrintText
- lb bc, TM_35, 1
+ lb bc, TM_METRONOME, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM35Text
call PrintText
SetEvent EVENT_GOT_TM35
- jr .asm_eb896
-.BagFull
+ jr .done
+.bag_full
ld hl, TM35NoRoomText
call PrintText
- jr .asm_eb896
-.asm_e551a
+ jr .done
+.got_item
ld hl, TM35ExplanationText
call PrintText
-.asm_eb896
+.done
jp TextScriptEnd
TM35PreReceiveText:
- TX_FAR _TM35PreReceiveText
- db "@"
+ text_far _TM35PreReceiveText
+ text_end
ReceivedTM35Text:
- TX_FAR _ReceivedTM35Text
- TX_SFX_ITEM_1
- db "@"
+ text_far _ReceivedTM35Text
+ sound_get_item_1
+ text_end
TM35ExplanationText:
- TX_FAR _TM35ExplanationText
- db "@"
+ text_far _TM35ExplanationText
+ text_end
TM35NoRoomText:
- TX_FAR _TM35NoRoomText
- db "@"
+ text_far _TM35NoRoomText
+ text_end
Lab3Text2:
- TX_FAR _Lab3Text2
- db "@"
+ text_far _Lab3Text2
+ text_end
Lab3Text4:
Lab3Text3:
- TX_FAR _Lab3Text3
- db "@"
+ text_far _Lab3Text3
+ text_end
Lab3Text5:
- TX_FAR _Lab3Text5
- db "@"
+ text_far _Lab3Text5
+ text_end
diff --git a/scripts/CinnabarLabTradeRoom.asm b/scripts/CinnabarLabTradeRoom.asm
index 6093ae14..1f8710be 100755
--- a/scripts/CinnabarLabTradeRoom.asm
+++ b/scripts/CinnabarLabTradeRoom.asm
@@ -7,18 +7,18 @@ CinnabarLabTradeRoom_TextPointers:
dw Lab2Text3
Lab2Text1:
- TX_FAR _Lab2Text1
- db "@"
+ text_far _Lab2Text1
+ text_end
Lab2Text2:
- TX_ASM
- ld a, $7
+ text_asm
+ ld a, TRADE_FOR_DORIS
ld [wWhichTrade], a
jr Lab2DoTrade
Lab2Text3:
- TX_ASM
- ld a, $8
+ text_asm
+ ld a, TRADE_FOR_CRINKLES
ld [wWhichTrade], a
Lab2DoTrade:
predef DoInGameTradeDialogue
diff --git a/scripts/CinnabarMart.asm b/scripts/CinnabarMart.asm
index 898948c7..e614bd29 100755
--- a/scripts/CinnabarMart.asm
+++ b/scripts/CinnabarMart.asm
@@ -7,9 +7,9 @@ CinnabarMart_TextPointers:
dw CinnabarMartText3
CinnabarMartText2:
- TX_FAR _CinnabarMartText2
- db "@"
+ text_far _CinnabarMartText2
+ text_end
CinnabarMartText3:
- TX_FAR _CinnabarMartText3
- db "@"
+ text_far _CinnabarMartText3
+ text_end
diff --git a/scripts/CinnabarPokecenter.asm b/scripts/CinnabarPokecenter.asm
index 53301266..3a229ca3 100755
--- a/scripts/CinnabarPokecenter.asm
+++ b/scripts/CinnabarPokecenter.asm
@@ -10,20 +10,20 @@ CinnabarPokecenter_TextPointers:
dw CinnabarPokecenterText5
CinnabarHealNurseText:
- TX_POKECENTER_NURSE
+ script_pokecenter_nurse
CinnabarPokecenterText2:
- TX_FAR _CinnabarPokecenterText2
- db "@"
+ text_far _CinnabarPokecenterText2
+ text_end
CinnabarPokecenterText3:
- TX_FAR _CinnabarPokecenterText3
- db "@"
+ text_far _CinnabarPokecenterText3
+ text_end
CinnabarTradeNurseText:
- TX_CABLE_CLUB_RECEPTIONIST
+ script_cable_club_receptionist
CinnabarPokecenterText5:
- TX_ASM
- callab PokecenterChanseyText
+ text_asm
+ callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/Colosseum.asm b/scripts/Colosseum.asm
index 8cc6b056..83d41bdc 100644
--- a/scripts/Colosseum.asm
+++ b/scripts/Colosseum.asm
@@ -5,5 +5,5 @@ Colosseum_TextPointers:
dw ColosseumText1
ColosseumText1:
- TX_FAR _ColosseumText1
- db "@"
+ text_far _ColosseumText1
+ text_end
diff --git a/scripts/CopycatsHouse1F.asm b/scripts/CopycatsHouse1F.asm
index a86625fc..fc5ff3cf 100755
--- a/scripts/CopycatsHouse1F.asm
+++ b/scripts/CopycatsHouse1F.asm
@@ -7,16 +7,16 @@ CopycatsHouse1F_TextPointers:
dw CopycatsHouse1FText3
CopycatsHouse1FText1:
- TX_FAR _CopycatsHouse1FText1
- db "@"
+ text_far _CopycatsHouse1FText1
+ text_end
CopycatsHouse1FText2:
- TX_FAR _CopycatsHouse1FText2
- db "@"
+ text_far _CopycatsHouse1FText2
+ text_end
CopycatsHouse1FText3:
- TX_FAR _CopycatsHouse1FText3
- TX_ASM
+ text_far _CopycatsHouse1FText3
+ text_asm
ld a, CHANSEY
call PlayCry
jp TextScriptEnd
diff --git a/scripts/CopycatsHouse2F.asm b/scripts/CopycatsHouse2F.asm
index e0ec5425..ef0742ab 100755
--- a/scripts/CopycatsHouse2F.asm
+++ b/scripts/CopycatsHouse2F.asm
@@ -11,79 +11,79 @@ CopycatsHouse2F_TextPointers:
dw CopycatsHouse2FText7
CopycatsHouse2FText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_TM31
- jr nz, .asm_7ccf3
- ld a, $1
+ jr nz, .got_item
+ ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, CopycatsHouse2FText_5ccd4
call PrintText
ld b, POKE_DOLL
call IsItemInBag
- jr z, .asm_62ecd
+ jr z, .done
ld hl, TM31PreReceiveText
call PrintText
- lb bc, TM_31, 1
+ lb bc, TM_MIMIC, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM31Text
call PrintText
ld a, POKE_DOLL
- ld [$ffdb], a
- callba RemoveItemByID
+ ldh [hItemToRemoveID], a
+ farcall RemoveItemByID
SetEvent EVENT_GOT_TM31
- jr .asm_62ecd
-.BagFull
+ jr .done
+.bag_full
ld hl, TM31NoRoomText
call PrintText
- jr .asm_62ecd
-.asm_7ccf3
+ jr .done
+.got_item
ld hl, TM31ExplanationText2
call PrintText
-.asm_62ecd
+.done
jp TextScriptEnd
CopycatsHouse2FText_5ccd4:
- TX_FAR _CopycatsHouse2FText_5ccd4
- db "@"
+ text_far _CopycatsHouse2FText_5ccd4
+ text_end
TM31PreReceiveText:
- TX_FAR _TM31PreReceiveText
- db "@"
+ text_far _TM31PreReceiveText
+ text_end
ReceivedTM31Text:
- TX_FAR _ReceivedTM31Text
- TX_SFX_ITEM_1
+ text_far _ReceivedTM31Text
+ sound_get_item_1
TM31ExplanationText1:
- TX_FAR _TM31ExplanationText1
- TX_WAIT
- db "@"
+ text_far _TM31ExplanationText1
+ text_waitbutton
+ text_end
TM31ExplanationText2:
- TX_FAR _TM31ExplanationText2
- db "@"
+ text_far _TM31ExplanationText2
+ text_end
TM31NoRoomText:
- TX_FAR _TM31NoRoomText
- TX_WAIT
- db "@"
+ text_far _TM31NoRoomText
+ text_waitbutton
+ text_end
CopycatsHouse2FText2:
- TX_FAR _CopycatsHouse2FText2
- db "@"
+ text_far _CopycatsHouse2FText2
+ text_end
CopycatsHouse2FText5:
CopycatsHouse2FText4:
CopycatsHouse2FText3:
- TX_FAR _CopycatsHouse2FText3
- db "@"
+ text_far _CopycatsHouse2FText3
+ text_end
CopycatsHouse2FText6:
- TX_FAR _CopycatsHouse2FText6
- db "@"
+ text_far _CopycatsHouse2FText6
+ text_end
CopycatsHouse2FText7:
- TX_ASM
+ text_asm
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ld hl, CopycatsHouse2FText_5cd1c
@@ -94,9 +94,9 @@ CopycatsHouse2FText7:
jp TextScriptEnd
CopycatsHouse2FText_5cd17:
- TX_FAR _CopycatsHouse2FText_5cd17
- db "@"
+ text_far _CopycatsHouse2FText_5cd17
+ text_end
CopycatsHouse2FText_5cd1c:
- TX_FAR _CopycatsHouse2FText_5cd1c
- db "@"
+ text_far _CopycatsHouse2FText_5cd1c
+ text_end
diff --git a/scripts/Daycare.asm b/scripts/Daycare.asm
index 5b65307e..164664b4 100755
--- a/scripts/Daycare.asm
+++ b/scripts/Daycare.asm
@@ -5,7 +5,7 @@ Daycare_TextPointers:
dw DayCareMText1
DayCareMText1:
- TX_ASM
+ text_asm
call SaveScreenTilesToBuffer2
ld a, [wDayCareInUse]
and a
@@ -35,7 +35,7 @@ DayCareMText1:
pop af
ld hl, DayCareAllRightThenText
jp c, .done
- callab KnowsHMMove
+ callfar KnowsHMMove
ld hl, DayCareCantAcceptMonWithHMText
jp c, .done
xor a
@@ -50,7 +50,7 @@ DayCareMText1:
ld a, PARTY_TO_DAYCARE
ld [wMoveMonType], a
call MoveMon
- callab IsThisPartymonStarterPikachu
+ callfar IsThisPartymonStarterPikachu
push af
xor a
ld [wRemoveMonFromBox], a
@@ -63,7 +63,7 @@ DayCareMText1:
.depositedPikachuIntoDayCare
ldpikacry e, PikachuCry28
- callab PlayPikachuSoundClip
+ callfar PlayPikachuSoundClip
.asm_562e3
ld hl, DayCareComeSeeMeInAWhileText
jp .done
@@ -75,19 +75,19 @@ DayCareMText1:
ld a, DAYCARE_DATA
ld [wMonDataLocation], a
call LoadMonData
- callab CalcLevelFromExperience
+ callfar CalcLevelFromExperience
ld a, d
cp MAX_LEVEL
jr c, .skipCalcExp
ld d, MAX_LEVEL
- callab CalcExperience
+ callfar CalcExperience
ld hl, wDayCareMonExp
- ld a, [hExperience]
+ ldh a, [hExperience]
ld [hli], a
- ld a, [hExperience + 1]
+ ldh a, [hExperience + 1]
ld [hli], a
- ld a, [hExperience + 2]
+ ldh a, [hExperience + 2]
ld [hl], a
ld d, MAX_LEVEL
@@ -148,11 +148,11 @@ DayCareMText1:
and a
jp nz, .leaveMonInDayCare
ld hl, wDayCareTotalCost
- ld [hMoney], a
+ ldh [hMoney], a
ld a, [hli]
- ld [hMoney + 1], a
+ ldh [hMoney + 1], a
ld a, [hl]
- ld [hMoney + 2], a
+ ldh [hMoney + 2], a
call HasEnoughMoney
jr nc, .enoughMoney
ld hl, DayCareNotEnoughMoneyText
@@ -210,7 +210,7 @@ DayCareMText1:
ld a, [wPartyCount]
dec a
ld [wWhichPokemon], a
- callab IsThisPartymonStarterPikachu
+ callfar IsThisPartymonStarterPikachu
jr c, .withdrewPikachuFromDayCare
ld a, [wcf91]
call PlayCry
@@ -226,7 +226,7 @@ DayCareMText1:
ld hl, Bankswitch
ldpikacry e, PikachuCry35
- callab PlayPikachuSoundClip
+ callfar PlayPikachuSoundClip
.asm_56430
ld hl, DayCareGotMonBackText
jr .done
@@ -240,59 +240,59 @@ DayCareMText1:
jp TextScriptEnd
DayCareIntroText:
- TX_FAR _DayCareIntroText
- db "@"
+ text_far _DayCareIntroText
+ text_end
DayCareWhichMonText:
- TX_FAR _DayCareWhichMonText
- db "@"
+ text_far _DayCareWhichMonText
+ text_end
DayCareWillLookAfterMonText:
- TX_FAR _DayCareWillLookAfterMonText
- db "@"
+ text_far _DayCareWillLookAfterMonText
+ text_end
DayCareComeSeeMeInAWhileText:
- TX_FAR _DayCareComeSeeMeInAWhileText
- db "@"
+ text_far _DayCareComeSeeMeInAWhileText
+ text_end
DayCareMonHasGrownText:
- TX_FAR _DayCareMonHasGrownText
- db "@"
+ text_far _DayCareMonHasGrownText
+ text_end
DayCareOweMoneyText:
- TX_FAR _DayCareOweMoneyText
- db "@"
+ text_far _DayCareOweMoneyText
+ text_end
DayCareGotMonBackText:
- TX_FAR _DayCareGotMonBackText
- db "@"
+ text_far _DayCareGotMonBackText
+ text_end
DayCareMonNeedsMoreTimeText:
- TX_FAR _DayCareMonNeedsMoreTimeText
- db "@"
+ text_far _DayCareMonNeedsMoreTimeText
+ text_end
DayCareAllRightThenText:
- TX_FAR _DayCareAllRightThenText
+ text_far _DayCareAllRightThenText
DayCareComeAgainText:
- TX_FAR _DayCareComeAgainText
- db "@"
+ text_far _DayCareComeAgainText
+ text_end
DayCareNoRoomForMonText:
- TX_FAR _DayCareNoRoomForMonText
- db "@"
+ text_far _DayCareNoRoomForMonText
+ text_end
DayCareOnlyHaveOneMonText:
- TX_FAR _DayCareOnlyHaveOneMonText
- db "@"
+ text_far _DayCareOnlyHaveOneMonText
+ text_end
DayCareCantAcceptMonWithHMText:
- TX_FAR _DayCareCantAcceptMonWithHMText
- db "@"
+ text_far _DayCareCantAcceptMonWithHMText
+ text_end
DayCareHeresYourMonText:
- TX_FAR _DayCareHeresYourMonText
- db "@"
+ text_far _DayCareHeresYourMonText
+ text_end
DayCareNotEnoughMoneyText:
- TX_FAR _DayCareNotEnoughMoneyText
- db "@"
+ text_far _DayCareNotEnoughMoneyText
+ text_end
diff --git a/scripts/DiglettsCave.asm b/scripts/DiglettsCave.asm
index 1d7b23f9..f9f2e590 100755
--- a/scripts/DiglettsCave.asm
+++ b/scripts/DiglettsCave.asm
@@ -2,4 +2,5 @@ DiglettsCave_Script:
jp EnableAutoTextBoxDrawing
DiglettsCave_TextPointers:
- db "@"
+
+ text_end ; unused
diff --git a/scripts/DiglettsCaveRoute11.asm b/scripts/DiglettsCaveRoute11.asm
index 54c3112e..648fe2bc 100755
--- a/scripts/DiglettsCaveRoute11.asm
+++ b/scripts/DiglettsCaveRoute11.asm
@@ -8,5 +8,5 @@ DiglettsCaveRoute11_TextPointers:
dw DiglettsCaveEntranceRoute11Text1
DiglettsCaveEntranceRoute11Text1:
- TX_FAR _DiglettsCaveEntRoute11Text1
- db "@"
+ text_far _DiglettsCaveEntRoute11Text1
+ text_end
diff --git a/scripts/DiglettsCaveRoute2.asm b/scripts/DiglettsCaveRoute2.asm
index 5fe7777c..32f17d65 100755
--- a/scripts/DiglettsCaveRoute2.asm
+++ b/scripts/DiglettsCaveRoute2.asm
@@ -7,5 +7,5 @@ DiglettsCaveRoute2_TextPointers:
dw DiglettsCaveRoute2Text1
DiglettsCaveRoute2Text1:
- TX_FAR _DiglettsCaveRoute2Text1
- db "@"
+ text_far _DiglettsCaveRoute2Text1
+ text_end
diff --git a/scripts/FightingDojo.asm b/scripts/FightingDojo.asm
index fc691dba..e5d0a0a7 100755
--- a/scripts/FightingDojo.asm
+++ b/scripts/FightingDojo.asm
@@ -30,25 +30,25 @@ FightingDojoScript1:
CheckEvent EVENT_BEAT_KARATE_MASTER
ret nz
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld [wcf0d], a
ld a, [wYCoord]
- cp $3
+ cp 3
ret nz
ld a, [wXCoord]
- cp $4
+ cp 4
ret nz
ld a, $1
ld [wcf0d], a
ld a, PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, SPRITE_FACING_LEFT
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ret
@@ -62,9 +62,9 @@ FightingDojoScript3:
ld a, PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, SPRITE_FACING_LEFT
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
.asm_5cde4
@@ -72,7 +72,7 @@ FightingDojoScript3:
ld [wJoyIgnore], a
SetEventRange EVENT_BEAT_KARATE_MASTER, EVENT_BEAT_FIGHTING_DOJO_TRAINER_3
ld a, $8
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
@@ -91,45 +91,17 @@ FightingDojo_TextPointers:
dw FightingDojoText8
FightingDojoTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_0
- dw FightingDojoBattleText1 ; TextBeforeBattle
- dw FightingDojoAfterBattleText1 ; TextAfterBattle
- dw FightingDojoEndBattleText1 ; TextEndBattle
- dw FightingDojoEndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_0, 4, FightingDojoBattleText1, FightingDojoEndBattleText1, FightingDojoAfterBattleText1
FightingDojoTrainerHeader1:
- dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_1
- dw FightingDojoBattleText2 ; TextBeforeBattle
- dw FightingDojoAfterBattleText2 ; TextAfterBattle
- dw FightingDojoEndBattleText2 ; TextEndBattle
- dw FightingDojoEndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_1, 4, FightingDojoBattleText2, FightingDojoEndBattleText2, FightingDojoAfterBattleText2
FightingDojoTrainerHeader2:
- dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_2
- dw FightingDojoBattleText3 ; TextBeforeBattle
- dw FightingDojoAfterBattleText3 ; TextAfterBattle
- dw FightingDojoEndBattleText3 ; TextEndBattle
- dw FightingDojoEndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_2, 3, FightingDojoBattleText3, FightingDojoEndBattleText3, FightingDojoAfterBattleText3
FightingDojoTrainerHeader3:
- dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_3
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_3
- dw FightingDojoBattleText4 ; TextBeforeBattle
- dw FightingDojoAfterBattleText4 ; TextAfterBattle
- dw FightingDojoEndBattleText4 ; TextEndBattle
- dw FightingDojoEndBattleText4 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_3, 3, FightingDojoBattleText4, FightingDojoEndBattleText4, FightingDojoAfterBattleText4
+ db -1 ; end
FightingDojoText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_DEFEATED_FIGHTING_DOJO
jp nz, .continue1
CheckEventReuseA EVENT_BEAT_KARATE_MASTER
@@ -142,7 +114,7 @@ FightingDojoText1:
ld hl, FightingDojoText_5ce93
ld de, FightingDojoText_5ce93
call SaveEndBattleTextPointers
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
@@ -161,96 +133,96 @@ FightingDojoText1:
jp TextScriptEnd
FightingDojoText_5ce8e:
- TX_FAR _FightingDojoText_5ce8e
- db "@"
+ text_far _FightingDojoText_5ce8e
+ text_end
FightingDojoText_5ce93:
- TX_FAR _FightingDojoText_5ce93
- db "@"
+ text_far _FightingDojoText_5ce93
+ text_end
FightingDojoText8:
- TX_FAR _FightingDojoText_5ce98
- db "@"
+ text_far _FightingDojoText_5ce98
+ text_end
FightingDojoText_5ce9d:
- TX_FAR _FightingDojoText_5ce9d
- db "@"
+ text_far _FightingDojoText_5ce9d
+ text_end
FightingDojoText2:
- TX_ASM
+ text_asm
ld hl, FightingDojoTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
FightingDojoBattleText1:
- TX_FAR _FightingDojoBattleText1
- db "@"
+ text_far _FightingDojoBattleText1
+ text_end
FightingDojoEndBattleText1:
- TX_FAR _FightingDojoEndBattleText1
- db "@"
+ text_far _FightingDojoEndBattleText1
+ text_end
FightingDojoAfterBattleText1:
- TX_FAR _FightingDojoAfterBattleText1
- db "@"
+ text_far _FightingDojoAfterBattleText1
+ text_end
FightingDojoText3:
- TX_ASM
+ text_asm
ld hl, FightingDojoTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
FightingDojoBattleText2:
- TX_FAR _FightingDojoBattleText2
- db "@"
+ text_far _FightingDojoBattleText2
+ text_end
FightingDojoEndBattleText2:
- TX_FAR _FightingDojoEndBattleText2
- db "@"
+ text_far _FightingDojoEndBattleText2
+ text_end
FightingDojoAfterBattleText2:
- TX_FAR _FightingDojoAfterBattleText2
- db "@"
+ text_far _FightingDojoAfterBattleText2
+ text_end
FightingDojoText4:
- TX_ASM
+ text_asm
ld hl, FightingDojoTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
FightingDojoBattleText3:
- TX_FAR _FightingDojoBattleText3
- db "@"
+ text_far _FightingDojoBattleText3
+ text_end
FightingDojoEndBattleText3:
- TX_FAR _FightingDojoEndBattleText3
- db "@"
+ text_far _FightingDojoEndBattleText3
+ text_end
FightingDojoAfterBattleText3:
- TX_FAR _FightingDojoAfterBattleText3
- db "@"
+ text_far _FightingDojoAfterBattleText3
+ text_end
FightingDojoText5:
- TX_ASM
+ text_asm
ld hl, FightingDojoTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
FightingDojoBattleText4:
- TX_FAR _FightingDojoBattleText4
- db "@"
+ text_far _FightingDojoBattleText4
+ text_end
FightingDojoEndBattleText4:
- TX_FAR _FightingDojoEndBattleText4
- db "@"
+ text_far _FightingDojoEndBattleText4
+ text_end
FightingDojoAfterBattleText4:
- TX_FAR _FightingDojoAfterBattleText4
- db "@"
+ text_far _FightingDojoAfterBattleText4
+ text_end
FightingDojoText6:
; Hitmonlee Poké Ball
- TX_ASM
+ text_asm
CheckEitherEventSet EVENT_GOT_HITMONLEE, EVENT_GOT_HITMONCHAN
jr z, .GetMon
ld hl, OtherHitmonText
@@ -280,12 +252,12 @@ FightingDojoText6:
jp TextScriptEnd
WantHitmonleeText:
- TX_FAR _WantHitmonleeText
- db "@"
+ text_far _WantHitmonleeText
+ text_end
FightingDojoText7:
; Hitmonchan Poké Ball
- TX_ASM
+ text_asm
CheckEitherEventSet EVENT_GOT_HITMONLEE, EVENT_GOT_HITMONCHAN
jr z, .GetMon
ld hl, OtherHitmonText
@@ -315,9 +287,9 @@ FightingDojoText7:
jp TextScriptEnd
WantHitmonchanText:
- TX_FAR _WantHitmonchanText
- db "@"
+ text_far _WantHitmonchanText
+ text_end
OtherHitmonText:
- TX_FAR _OtherHitmonText
- db "@"
+ text_far _OtherHitmonText
+ text_end
diff --git a/scripts/FuchsiaBillsGrandpasHouse.asm b/scripts/FuchsiaBillsGrandpasHouse.asm
index ca5f2c16..69ce1cf1 100755
--- a/scripts/FuchsiaBillsGrandpasHouse.asm
+++ b/scripts/FuchsiaBillsGrandpasHouse.asm
@@ -8,13 +8,13 @@ FuchsiaBillsGrandpasHouse_TextPointers:
dw FuchsiaHouse1Text3
FuchsiaHouse1Text1:
- TX_FAR _FuchsiaHouse1Text1
- db "@"
+ text_far _FuchsiaHouse1Text1
+ text_end
FuchsiaHouse1Text2:
- TX_FAR _FuchsiaHouse1Text2
- db "@"
+ text_far _FuchsiaHouse1Text2
+ text_end
FuchsiaHouse1Text3:
- TX_FAR _FuchsiaHouse1Text3
- db "@"
+ text_far _FuchsiaHouse1Text3
+ text_end
diff --git a/scripts/FuchsiaCity.asm b/scripts/FuchsiaCity.asm
index d3f0ce32..ac9f273b 100755
--- a/scripts/FuchsiaCity.asm
+++ b/scripts/FuchsiaCity.asm
@@ -28,20 +28,20 @@ FuchsiaCity_TextPointers:
dw FuchsiaCityText24
FuchsiaCityText1:
- TX_FAR _FuchsiaCityText1
- db "@"
+ text_far _FuchsiaCityText1
+ text_end
FuchsiaCityText2:
- TX_FAR _FuchsiaCityText2
- db "@"
+ text_far _FuchsiaCityText2
+ text_end
FuchsiaCityText3:
- TX_FAR _FuchsiaCityText3
- db "@"
+ text_far _FuchsiaCityText3
+ text_end
FuchsiaCityText4:
- TX_FAR _FuchsiaCityText4
- db "@"
+ text_far _FuchsiaCityText4
+ text_end
FuchsiaCityText5:
FuchsiaCityText6:
@@ -49,32 +49,32 @@ FuchsiaCityText7:
FuchsiaCityText8:
FuchsiaCityText9:
FuchsiaCityText10:
- TX_FAR _FuchsiaCityText5
- db "@"
+ text_far _FuchsiaCityText5
+ text_end
FuchsiaCityText12:
FuchsiaCityText11:
- TX_FAR _FuchsiaCityText11
- db "@"
+ text_far _FuchsiaCityText11
+ text_end
FuchsiaCityText13:
- TX_FAR _FuchsiaCityText13
- db "@"
+ text_far _FuchsiaCityText13
+ text_end
FuchsiaCityText16:
- TX_FAR _FuchsiaCityText16
- db "@"
+ text_far _FuchsiaCityText16
+ text_end
FuchsiaCityText17:
- TX_FAR _FuchsiaCityText17
- db "@"
+ text_far _FuchsiaCityText17
+ text_end
FuchsiaCityText18:
- TX_FAR _FuchsiaCityText18
- db "@"
+ text_far _FuchsiaCityText18
+ text_end
FuchsiaCityText19:
- TX_ASM
+ text_asm
ld hl, FuchsiaCityChanseyText
call PrintText
ld a, CHANSEY
@@ -82,11 +82,11 @@ FuchsiaCityText19:
jp TextScriptEnd
FuchsiaCityChanseyText:
- TX_FAR _FuchsiaCityChanseyText
- db "@"
+ text_far _FuchsiaCityChanseyText
+ text_end
FuchsiaCityText20:
- TX_ASM
+ text_asm
ld hl, FuchsiaCityVoltorbText
call PrintText
ld a, VOLTORB
@@ -94,11 +94,11 @@ FuchsiaCityText20:
jp TextScriptEnd
FuchsiaCityVoltorbText:
- TX_FAR _FuchsiaCityVoltorbText
- db "@"
+ text_far _FuchsiaCityVoltorbText
+ text_end
FuchsiaCityText21:
- TX_ASM
+ text_asm
ld hl, FuchsiaCityKangaskhanText
call PrintText
ld a, KANGASKHAN
@@ -106,11 +106,11 @@ FuchsiaCityText21:
jp TextScriptEnd
FuchsiaCityKangaskhanText:
- TX_FAR _FuchsiaCityKangaskhanText
- db "@"
+ text_far _FuchsiaCityKangaskhanText
+ text_end
FuchsiaCityText22:
- TX_ASM
+ text_asm
ld hl, FuchsiaCitySlowpokeText
call PrintText
ld a, SLOWPOKE
@@ -118,11 +118,11 @@ FuchsiaCityText22:
jp TextScriptEnd
FuchsiaCitySlowpokeText:
- TX_FAR _FuchsiaCitySlowpokeText
- db "@"
+ text_far _FuchsiaCitySlowpokeText
+ text_end
FuchsiaCityText23:
- TX_ASM
+ text_asm
ld hl, FuchsiaCityLaprasText
call PrintText
ld a, LAPRAS
@@ -130,11 +130,11 @@ FuchsiaCityText23:
jp TextScriptEnd
FuchsiaCityLaprasText:
- TX_FAR _FuchsiaCityLaprasText
- db "@"
+ text_far _FuchsiaCityLaprasText
+ text_end
FuchsiaCityText24:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_DOME_FOSSIL
jr nz, .asm_3b4e8
CheckEventReuseA EVENT_GOT_HELIX_FOSSIL
@@ -157,13 +157,13 @@ FuchsiaCityText24:
jp TextScriptEnd
FuchsiaCityOmanyteText:
- TX_FAR _FuchsiaCityOmanyteText
- db "@"
+ text_far _FuchsiaCityOmanyteText
+ text_end
FuchsiaCityKabutoText:
- TX_FAR _FuchsiaCityKabutoText
- db "@"
+ text_far _FuchsiaCityKabutoText
+ text_end
FuchsiaCityText_19b2a:
- TX_FAR _FuchsiaCityText_19b2a
- db "@"
+ text_far _FuchsiaCityText_19b2a
+ text_end
diff --git a/scripts/FuchsiaGoodRodHouse.asm b/scripts/FuchsiaGoodRodHouse.asm
index 93a20e80..28f6d056 100755
--- a/scripts/FuchsiaGoodRodHouse.asm
+++ b/scripts/FuchsiaGoodRodHouse.asm
@@ -5,71 +5,62 @@ FuchsiaGoodRodHouse_TextPointers:
dw FuchsiaHouse3Text1
FuchsiaHouse3Text1:
- TX_ASM
+ text_asm
ld a, [wd728]
- bit 4, a
- jr nz, .after
-
+ bit 4, a ; got good rod?
+ jr nz, .got_item
ld hl, FuchsiaHouse3Text_561bd
call PrintText
-
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
jr nz, .refused
-
lb bc, GOOD_ROD, 1
call GiveItem
- jr nc, .full
-
+ jr nc, .bag_full
ld hl, wd728
- set 4, [hl]
-
+ set 4, [hl] ; got good rod
ld hl, FuchsiaHouse3Text_561c2
- jr .talk
-
-.full
+ jr .done
+.bag_full
ld hl, FuchsiaHouse3Text_5621c
- jr .talk
-
+ jr .done
.refused
ld hl, FuchsiaHouse3Text_56212
- jr .talk
-
-.after
+ jr .done
+.got_item
ld hl, FuchsiaHouse3Text_56217
-
-.talk
+.done
call PrintText
jp TextScriptEnd
FuchsiaHouse3Text_561bd:
- TX_FAR _FuchsiaHouse3Text_561bd
- db "@"
+ text_far _FuchsiaHouse3Text_561bd
+ text_end
FuchsiaHouse3Text_561c2:
- TX_FAR _FuchsiaHouse3Text_561c2
- TX_SFX_ITEM_1
- db "@"
+ text_far _FuchsiaHouse3Text_561c2
+ sound_get_item_1
+ text_end
UnusedText_561c8:
- para "つり こそ"
- line "おとこの ロマン だ!"
+ para "つり こそ"
+ line "おとこの ロマン だ!"
para "へぼいつりざおは"
- line "コイキングしか つれ なんだが"
- line "この いいつりざおなら"
- line "もっと いいもんが つれるんじゃ!"
+ line "コイキングしか つれ なんだが"
+ line "この いいつりざおなら"
+ line "もっと いいもんが つれるんじゃ!"
done
FuchsiaHouse3Text_56212:
- TX_FAR _FuchsiaHouse3Text_56212
- db "@"
+ text_far _FuchsiaHouse3Text_56212
+ text_end
FuchsiaHouse3Text_56217:
- TX_FAR _FuchsiaHouse3Text_56217
- db "@"
+ text_far _FuchsiaHouse3Text_56217
+ text_end
FuchsiaHouse3Text_5621c:
- TX_FAR _FuchsiaHouse3Text_5621c
- db "@"
+ text_far _FuchsiaHouse3Text_5621c
+ text_end
diff --git a/scripts/FuchsiaGym.asm b/scripts/FuchsiaGym.asm
index 15f016af..6f4f28fc 100755
--- a/scripts/FuchsiaGym.asm
+++ b/scripts/FuchsiaGym.asm
@@ -1,5 +1,5 @@
FuchsiaGym_Script:
- call FuchsiaGymScript_75453
+ call .LoadNames
call EnableAutoTextBoxDrawing
ld hl, FuchsiaGymTrainerHeader0
ld de, FuchsiaGym_ScriptPointers
@@ -8,19 +8,20 @@ FuchsiaGym_Script:
ld [wFuchsiaGymCurScript], a
ret
-FuchsiaGymScript_75453:
+.LoadNames:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
ret z
- ld hl, Gym5CityName
- ld de, Gym5LeaderName
+ ld hl, .CityName
+ ld de, .LeaderName
call LoadGymLeaderAndCityName
ret
-Gym5CityName:
+.CityName:
db "FUCHSIA CITY@"
-Gym5LeaderName:
+
+.LeaderName:
db "KOGA@"
FuchsiaGymScript_75477:
@@ -44,26 +45,26 @@ FuchsiaGymScript3:
ld [wJoyIgnore], a
FuchsiaGymScript3_75497:
ld a, $9
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_KOGA
- lb bc, TM_06, 1
+ lb bc, TM_TOXIC, 1
call GiveItem
jr nc, .BagFull
ld a, $a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM06
jr .gymVictory
.BagFull
ld a, $b
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
ld hl, wObtainedBadges
- set 4, [hl]
+ set BIT_SOULBADGE, [hl]
ld hl, wBeatGymFlags
- set 4, [hl]
+ set BIT_SOULBADGE, [hl]
; deactivate gym trainers
SetEventRange EVENT_BEAT_FUCHSIA_GYM_TRAINER_0, EVENT_BEAT_FUCHSIA_GYM_TRAINER_5
@@ -84,63 +85,21 @@ FuchsiaGym_TextPointers:
dw FuchsiaGymText11
FuchsiaGymTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_0
- dw FuchsiaGymBattleText1 ; TextBeforeBattle
- dw FuchsiaGymAfterBattleText1 ; TextAfterBattle
- dw FuchsiaGymEndBattleText1 ; TextEndBattle
- dw FuchsiaGymEndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_0, 2, FuchsiaGymBattleText1, FuchsiaGymEndBattleText1, FuchsiaGymAfterBattleText1
FuchsiaGymTrainerHeader1:
- dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_1
- dw FuchsiaGymBattleText2 ; TextBeforeBattle
- dw FuchsiaGymAfterBattleText2 ; TextAfterBattle
- dw FuchsiaGymEndBattleText2 ; TextEndBattle
- dw FuchsiaGymEndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_1, 2, FuchsiaGymBattleText2, FuchsiaGymEndBattleText2, FuchsiaGymAfterBattleText2
FuchsiaGymTrainerHeader2:
- dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_2
- dw FuchsiaGymBattleText3 ; TextBeforeBattle
- dw FuchsiaGymAfterBattleText3 ; TextAfterBattle
- dw FuchsiaGymEndBattleText3 ; TextEndBattle
- dw FuchsiaGymEndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_2, 4, FuchsiaGymBattleText3, FuchsiaGymEndBattleText3, FuchsiaGymAfterBattleText3
FuchsiaGymTrainerHeader3:
- dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_3
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_3
- dw FuchsiaGymBattleText4 ; TextBeforeBattle
- dw FuchsiaGymAfterBattleText4 ; TextAfterBattle
- dw FuchsiaGymEndBattleText4 ; TextEndBattle
- dw FuchsiaGymEndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_3, 2, FuchsiaGymBattleText4, FuchsiaGymEndBattleText4, FuchsiaGymAfterBattleText4
FuchsiaGymTrainerHeader4:
- dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_4
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_4
- dw FuchsiaGymBattleText5 ; TextBeforeBattle
- dw FuchsiaGymAfterBattleText5 ; TextAfterBattle
- dw FuchsiaGymEndBattleText5 ; TextEndBattle
- dw FuchsiaGymEndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_4, 2, FuchsiaGymBattleText5, FuchsiaGymEndBattleText5, FuchsiaGymAfterBattleText5
FuchsiaGymTrainerHeader5:
- dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_5
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_5
- dw FuchsiaGymBattleText6 ; TextBeforeBattle
- dw FuchsiaGymAfterBattleText6 ; TextAfterBattle
- dw FuchsiaGymEndBattleText6 ; TextEndBattle
- dw FuchsiaGymEndBattleText6 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_5, 2, FuchsiaGymBattleText6, FuchsiaGymEndBattleText6, FuchsiaGymAfterBattleText6
+ db -1 ; end
FuchsiaGymText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_KOGA
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM06
@@ -161,157 +120,157 @@ FuchsiaGymText1:
ld hl, KogaAfterBattleText
ld de, KogaAfterBattleText
call SaveEndBattleTextPointers
- ld a, [H_SPRITEINDEX]
+ ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $5
ld [wGymLeaderNo], a
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $3
ld [wFuchsiaGymCurScript], a
.done
jp TextScriptEnd
KogaBeforeBattleText:
- TX_FAR _KogaBeforeBattleText
- db "@"
+ text_far _KogaBeforeBattleText
+ text_end
KogaAfterBattleText:
- TX_FAR _KogaAfterBattleText
- db "@"
+ text_far _KogaAfterBattleText
+ text_end
KogaExplainToxicText:
- TX_FAR _KogaExplainToxicText
- db "@"
+ text_far _KogaExplainToxicText
+ text_end
FuchsiaGymText9:
- TX_FAR _FuchsiaGymText9
- db "@"
+ text_far _FuchsiaGymText9
+ text_end
FuchsiaGymText10:
- TX_FAR _ReceivedTM06Text
- TX_SFX_KEY_ITEM
+ text_far _ReceivedTM06Text
+ sound_get_key_item
TM06ExplanationText:
- TX_FAR _TM06ExplanationText
- db "@"
+ text_far _TM06ExplanationText
+ text_end
FuchsiaGymText11:
- TX_FAR _TM06NoRoomText
- db "@"
+ text_far _TM06NoRoomText
+ text_end
FuchsiaGymText2:
- TX_ASM
+ text_asm
ld hl, FuchsiaGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
FuchsiaGymBattleText1:
- TX_FAR _FuchsiaGymBattleText1
- db "@"
+ text_far _FuchsiaGymBattleText1
+ text_end
FuchsiaGymEndBattleText1:
- TX_FAR _FuchsiaGymEndBattleText1
- db "@"
+ text_far _FuchsiaGymEndBattleText1
+ text_end
FuchsiaGymAfterBattleText1:
- TX_FAR _FuchsiaGymAfterBattleText1
- db "@"
+ text_far _FuchsiaGymAfterBattleText1
+ text_end
FuchsiaGymText3:
- TX_ASM
+ text_asm
ld hl, FuchsiaGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
FuchsiaGymBattleText2:
- TX_FAR _FuchsiaGymBattleText2
- db "@"
+ text_far _FuchsiaGymBattleText2
+ text_end
FuchsiaGymEndBattleText2:
- TX_FAR _FuchsiaGymEndBattleText2
- db "@"
+ text_far _FuchsiaGymEndBattleText2
+ text_end
FuchsiaGymAfterBattleText2:
- TX_FAR _FuchsiaGymAfterBattleText2
- db "@"
+ text_far _FuchsiaGymAfterBattleText2
+ text_end
FuchsiaGymText4:
- TX_ASM
+ text_asm
ld hl, FuchsiaGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
FuchsiaGymBattleText3:
- TX_FAR _FuchsiaGymBattleText3
- db "@"
+ text_far _FuchsiaGymBattleText3
+ text_end
FuchsiaGymEndBattleText3:
- TX_FAR _FuchsiaGymEndBattleText3
- db "@"
+ text_far _FuchsiaGymEndBattleText3
+ text_end
FuchsiaGymAfterBattleText3:
- TX_FAR _FuchsiaGymAfterBattleText3
- db "@"
+ text_far _FuchsiaGymAfterBattleText3
+ text_end
FuchsiaGymText5:
- TX_ASM
+ text_asm
ld hl, FuchsiaGymTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
FuchsiaGymBattleText4:
- TX_FAR _FuchsiaGymBattleText4
- db "@"
+ text_far _FuchsiaGymBattleText4
+ text_end
FuchsiaGymEndBattleText4:
- TX_FAR _FuchsiaGymEndBattleText4
- db "@"
+ text_far _FuchsiaGymEndBattleText4
+ text_end
FuchsiaGymAfterBattleText4:
- TX_FAR _FuchsiaGymAfterBattleText4
- db "@"
+ text_far _FuchsiaGymAfterBattleText4
+ text_end
FuchsiaGymText6:
- TX_ASM
+ text_asm
ld hl, FuchsiaGymTrainerHeader4
call TalkToTrainer
jp TextScriptEnd
FuchsiaGymBattleText5:
- TX_FAR _FuchsiaGymBattleText5
- db "@"
+ text_far _FuchsiaGymBattleText5
+ text_end
FuchsiaGymEndBattleText5:
- TX_FAR _FuchsiaGymEndBattleText5
- db "@"
+ text_far _FuchsiaGymEndBattleText5
+ text_end
FuchsiaGymAfterBattleText5:
- TX_FAR _FuchsiaGymAfterBattleText5
- db "@"
+ text_far _FuchsiaGymAfterBattleText5
+ text_end
FuchsiaGymText7:
- TX_ASM
+ text_asm
ld hl, FuchsiaGymTrainerHeader5
call TalkToTrainer
jp TextScriptEnd
FuchsiaGymBattleText6:
- TX_FAR _FuchsiaGymBattleText6
- db "@"
+ text_far _FuchsiaGymBattleText6
+ text_end
FuchsiaGymEndBattleText6:
- TX_FAR _FuchsiaGymEndBattleText6
- db "@"
+ text_far _FuchsiaGymEndBattleText6
+ text_end
FuchsiaGymAfterBattleText6:
- TX_FAR _FuchsiaGymAfterBattleText6
- db "@"
+ text_far _FuchsiaGymAfterBattleText6
+ text_end
FuchsiaGymText8:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_KOGA
ld hl, FuchsiaGymText_75653
jr nz, .asm_50671
@@ -321,9 +280,9 @@ FuchsiaGymText8:
jp TextScriptEnd
FuchsiaGymText_7564e:
- TX_FAR _FuchsiaGymText_7564e
- db "@"
+ text_far _FuchsiaGymText_7564e
+ text_end
FuchsiaGymText_75653:
- TX_FAR _FuchsiaGymText_75653
- db "@"
+ text_far _FuchsiaGymText_75653
+ text_end
diff --git a/scripts/FuchsiaMart.asm b/scripts/FuchsiaMart.asm
index 50786127..75e9a45d 100755
--- a/scripts/FuchsiaMart.asm
+++ b/scripts/FuchsiaMart.asm
@@ -8,9 +8,9 @@ FuchsiaMart_TextPointers:
dw FuchsiaMartText3
FuchsiaMartText2:
- TX_FAR _FuchsiaMartText2
- db "@"
+ text_far _FuchsiaMartText2
+ text_end
FuchsiaMartText3:
- TX_FAR _FuchsiaMartText3
- db "@"
+ text_far _FuchsiaMartText3
+ text_end
diff --git a/scripts/FuchsiaMeetingRoom.asm b/scripts/FuchsiaMeetingRoom.asm
index 95ac12fa..4fc05b1f 100755
--- a/scripts/FuchsiaMeetingRoom.asm
+++ b/scripts/FuchsiaMeetingRoom.asm
@@ -8,13 +8,13 @@ FuchsiaMeetingRoom_TextPointers:
dw FuchsiaMeetingRoomText3
FuchsiaMeetingRoomText1:
- TX_FAR _FuchsiaMeetingRoomText1
- db "@"
+ text_far _FuchsiaMeetingRoomText1
+ text_end
FuchsiaMeetingRoomText2:
- TX_FAR _FuchsiaMeetingRoomText2
- db "@"
+ text_far _FuchsiaMeetingRoomText2
+ text_end
FuchsiaMeetingRoomText3:
- TX_FAR _FuchsiaMeetingRoomText3
- db "@"
+ text_far _FuchsiaMeetingRoomText3
+ text_end
diff --git a/scripts/FuchsiaPokecenter.asm b/scripts/FuchsiaPokecenter.asm
index 40aa3d45..2d98ca17 100755
--- a/scripts/FuchsiaPokecenter.asm
+++ b/scripts/FuchsiaPokecenter.asm
@@ -10,20 +10,20 @@ FuchsiaPokecenter_TextPointers:
dw FuchsiaPokecenterText5
FuchsiaHealNurseText:
- TX_POKECENTER_NURSE
+ script_pokecenter_nurse
FuchsiaPokecenterText2:
- TX_FAR _FuchsiaPokecenterText1
- db "@"
+ text_far _FuchsiaPokecenterText1
+ text_end
FuchsiaPokecenterText3:
- TX_FAR _FuchsiaPokecenterText3
- db "@"
+ text_far _FuchsiaPokecenterText3
+ text_end
FuchsiaTradeNurseText:
- TX_CABLE_CLUB_RECEPTIONIST
+ script_cable_club_receptionist
FuchsiaPokecenterText5:
- TX_ASM
- callab PokecenterChanseyText
+ text_asm
+ callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/GameCorner.asm b/scripts/GameCorner.asm
index e2b7690c..b2d4d96a 100755
--- a/scripts/GameCorner.asm
+++ b/scripts/GameCorner.asm
@@ -12,7 +12,7 @@ CeladonGameCornerScript_48bcf:
res 6, [hl]
ret z
call Random
- ld a, [hRandomAdd]
+ ldh a, [hRandomAdd]
cp $7
jr nc, .asm_48be2
ld a, $8
@@ -57,29 +57,29 @@ CeladonGameCornerScript1:
ld a, $f0
ld [wJoyIgnore], a
ld a, $d
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $b
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld de, MovementData_48c5a
ld a, [wYCoord]
- cp $6
+ cp 6
jr nz, .asm_48c43
ld de, MovementData_48c63
jr .asm_48c4d
.asm_48c43
ld a, [wXCoord]
- cp $8
+ cp 8
jr nz, .pikachu
ld de, MovementData_48c63
jr .asm_48c4d
.pikachu
- callab Func_f1f23
+ callfar Func_f1f23
ld de, MovementData_48c5a
.asm_48c4d
ld a, $b
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call MoveSprite
ld a, $2
ld [wGameCornerCurScript], a
@@ -94,7 +94,7 @@ MovementData_48c5a:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
MovementData_48c63:
db NPC_MOVEMENT_RIGHT
@@ -102,7 +102,7 @@ MovementData_48c63:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
CeladonGameCornerScript2:
ld a, [wd730]
@@ -136,11 +136,11 @@ GameCorner_TextPointers:
dw CeladonGameCornerText13
CeladonGameCornerText1:
- TX_FAR _CeladonGameCornerText1
- db "@"
+ text_far _CeladonGameCornerText1
+ text_end
CeladonGameCornerText2:
- TX_ASM
+ text_asm
call CeladonGameCornerScript_48f1e
ld hl, CeladonGameCornerText_48d22
call PrintText
@@ -154,29 +154,29 @@ CeladonGameCornerText2:
call Has9990Coins
jr nc, .asm_48d14
xor a
- ld [hMoney], a
- ld [hMoney + 2], a
+ ldh [hMoney], a
+ ldh [hMoney + 2], a
ld a, $10
- ld [hMoney + 1], a
+ ldh [hMoney + 1], a
call HasEnoughMoney
jr nc, .asm_48cdb
ld hl, CeladonGameCornerText_48d31
jr .asm_48d1c
.asm_48cdb
xor a
- ld [hMoney], a
- ld [hMoney + 2], a
+ ldh [hMoney], a
+ ldh [hMoney + 2], a
ld a, $10
- ld [hMoney + 1], a
+ ldh [hMoney + 1], a
ld hl, hMoney + 2
ld de, wPlayerMoney + 2
ld c, $3
predef SubBCDPredef
xor a
- ld [hUnusedCoinsByte], a
- ld [hCoins], a
+ ldh [hUnusedCoinsByte], a
+ ldh [hCoins], a
ld a, $50
- ld [hCoins + 1], a
+ ldh [hCoins + 1], a
ld de, wPlayerCoins + 1
ld hl, hCoins + 1
ld c, $2
@@ -197,39 +197,39 @@ CeladonGameCornerText2:
jp TextScriptEnd
CeladonGameCornerText_48d22:
- TX_FAR _CeladonGameCornerText_48d22
- db "@"
+ text_far _CeladonGameCornerText_48d22
+ text_end
CeladonGameCornerText_48d27:
- TX_FAR _CeladonGameCornerText_48d27
- db "@"
+ text_far _CeladonGameCornerText_48d27
+ text_end
CeladonGameCornerText_48d2c:
- TX_FAR _CeladonGameCornerText_48d2c
- db "@"
+ text_far _CeladonGameCornerText_48d2c
+ text_end
CeladonGameCornerText_48d31:
- TX_FAR _CeladonGameCornerText_48d31
- db "@"
+ text_far _CeladonGameCornerText_48d31
+ text_end
CeladonGameCornerText_48d36:
- TX_FAR _CeladonGameCornerText_48d36
- db "@"
+ text_far _CeladonGameCornerText_48d36
+ text_end
CeladonGameCornerText_48d3b:
- TX_FAR _CeladonGameCornerText_48d3b
- db "@"
+ text_far _CeladonGameCornerText_48d3b
+ text_end
CeladonGameCornerText3:
- TX_FAR _CeladonGameCornerText3
- db "@"
+ text_far _CeladonGameCornerText3
+ text_end
CeladonGameCornerText4:
- TX_FAR _CeladonGameCornerText4
- db "@"
+ text_far _CeladonGameCornerText4
+ text_end
CeladonGameCornerText5:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_10_COINS
jr nz, .asm_48d89
ld hl, CeladonGameCornerText_48d9c
@@ -240,10 +240,10 @@ CeladonGameCornerText5:
call Has9990Coins
jr nc, .asm_48d8e
xor a
- ld [hUnusedCoinsByte], a
- ld [hCoins], a
+ ldh [hUnusedCoinsByte], a
+ ldh [hCoins], a
ld a, $10
- ld [hCoins + 1], a
+ ldh [hCoins + 1], a
ld de, wPlayerCoins + 1
ld hl, hCoins + 1
ld c, $2
@@ -266,28 +266,28 @@ CeladonGameCornerText5:
jp TextScriptEnd
CeladonGameCornerText_48d9c:
- TX_FAR _CeladonGameCornerText_48d9c
- db "@"
+ text_far _CeladonGameCornerText_48d9c
+ text_end
Received10CoinsText:
- TX_FAR _Received10CoinsText
- TX_SFX_ITEM_1
- db "@"
+ text_far _Received10CoinsText
+ sound_get_item_1
+ text_end
CeladonGameCornerText_48da7:
- TX_FAR _CeladonGameCornerText_48da7
- db "@"
+ text_far _CeladonGameCornerText_48da7
+ text_end
CeladonGameCornerText_48dac:
- TX_FAR _CeladonGameCornerText_48dac
- db "@"
+ text_far _CeladonGameCornerText_48dac
+ text_end
CeladonGameCornerText6:
- TX_FAR _CeladonGameCornerText6
- db "@"
+ text_far _CeladonGameCornerText6
+ text_end
CeladonGameCornerText7:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_ERIKA
ld hl, CeladonGameCornerText_48dca
jr z, .asm_48dc4
@@ -297,19 +297,19 @@ CeladonGameCornerText7:
jp TextScriptEnd
CeladonGameCornerText_48dca:
- TX_FAR _CeladonGameCornerText_48dca
- db "@"
+ text_far _CeladonGameCornerText_48dca
+ text_end
CeladonGameCornerText_48dcf:
- TX_FAR _CeladonGameCornerText_48dcf
- db "@"
+ text_far _CeladonGameCornerText_48dcf
+ text_end
CeladonGameCornerText8:
- TX_FAR _CeladonGameCornerText8
- db "@"
+ text_far _CeladonGameCornerText8
+ text_end
CeladonGameCornerText9:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_20_COINS_2
jr nz, .asm_48e13
ld hl, CeladonGameCornerText_48e26
@@ -320,10 +320,10 @@ CeladonGameCornerText9:
call Has9990Coins
jr nc, .asm_48e18
xor a
- ld [hUnusedCoinsByte], a
- ld [hCoins], a
+ ldh [hUnusedCoinsByte], a
+ ldh [hCoins], a
ld a, $20
- ld [hCoins + 1], a
+ ldh [hCoins + 1], a
ld de, wPlayerCoins + 1
ld hl, hCoins + 1
ld c, $2
@@ -344,24 +344,24 @@ CeladonGameCornerText9:
jp TextScriptEnd
CeladonGameCornerText_48e26:
- TX_FAR _CeladonGameCornerText_48e26
- db "@"
+ text_far _CeladonGameCornerText_48e26
+ text_end
Received20CoinsText:
- TX_FAR _Received20CoinsText
- TX_SFX_ITEM_1
- db "@"
+ text_far _Received20CoinsText
+ sound_get_item_1
+ text_end
CeladonGameCornerText_48e31:
- TX_FAR _CeladonGameCornerText_48e31
- db "@"
+ text_far _CeladonGameCornerText_48e31
+ text_end
CeladonGameCornerText_48e36:
- TX_FAR _CeladonGameCornerText_48e36
- db "@"
+ text_far _CeladonGameCornerText_48e36
+ text_end
CeladonGameCornerText10:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_20_COINS
jr nz, .asm_48e75
ld hl, CeladonGameCornerText_48e88
@@ -372,10 +372,10 @@ CeladonGameCornerText10:
call Has9990Coins
jr z, .asm_48e7a
xor a
- ld [hUnusedCoinsByte], a
- ld [hCoins], a
+ ldh [hUnusedCoinsByte], a
+ ldh [hCoins], a
ld a, $20
- ld [hCoins + 1], a
+ ldh [hCoins + 1], a
ld de, wPlayerCoins + 1
ld hl, hCoins + 1
ld c, $2
@@ -396,24 +396,24 @@ CeladonGameCornerText10:
jp TextScriptEnd
CeladonGameCornerText_48e88:
- TX_FAR _CeladonGameCornerText_48e88
- db "@"
+ text_far _CeladonGameCornerText_48e88
+ text_end
CeladonGameCornerText_48e8d:
- TX_FAR _CeladonGameCornerText_48e8d
- TX_SFX_ITEM_1
- db "@"
+ text_far _CeladonGameCornerText_48e8d
+ sound_get_item_1
+ text_end
CeladonGameCornerText_48e93:
- TX_FAR _CeladonGameCornerText_48e93
- db "@"
+ text_far _CeladonGameCornerText_48e93
+ text_end
CeladonGameCornerText_48e98:
- TX_FAR _CeladonGameCornerText_48e98
- db "@"
+ text_far _CeladonGameCornerText_48e98
+ text_end
CeladonGameCornerText11:
- TX_ASM
+ text_asm
ld hl, CeladonGameCornerText_48ece
call PrintText
ld hl, wd72d
@@ -422,32 +422,32 @@ CeladonGameCornerText11:
ld hl, CeladonGameCornerText_48ed3
ld de, CeladonGameCornerText_48ed3
call SaveEndBattleTextPointers
- ld a, [H_SPRITEINDEX]
+ ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
xor a
- ld [hJoyHeld], a
- ld [hJoyPressed], a
- ld [hJoyReleased], a
+ ldh [hJoyHeld], a
+ ldh [hJoyPressed], a
+ ldh [hJoyReleased], a
ld a, $1
ld [wGameCornerCurScript], a
jp TextScriptEnd
CeladonGameCornerText_48ece:
- TX_FAR _CeladonGameCornerText_48ece
- db "@"
+ text_far _CeladonGameCornerText_48ece
+ text_end
CeladonGameCornerText_48ed3:
- TX_FAR _CeladonGameCornerText_48ed3
- db "@"
+ text_far _CeladonGameCornerText_48ed3
+ text_end
CeladonGameCornerText13:
- TX_FAR _CeladonGameCornerText_48ed8
- db "@"
+ text_far _CeladonGameCornerText_48ed8
+ text_end
CeladonGameCornerText12:
- TX_ASM
+ text_asm
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, CeladonGameCornerText_48f09
@@ -464,44 +464,44 @@ CeladonGameCornerText12:
jp TextScriptEnd
CeladonGameCornerText_48f09:
- TX_FAR _CeladonGameCornerText_48f09
- TX_ASM
+ text_far _CeladonGameCornerText_48f09
+ text_asm
ld a, SFX_SWITCH
call PlaySound
call WaitForSoundToFinish
jp TextScriptEnd
CeladonGameCornerText_48f19:
- TX_FAR _CeladonGameCornerText_48f19
- db "@"
+ text_far _CeladonGameCornerText_48f19
+ text_end
CeladonGameCornerScript_48f1e:
ld hl, wd730
set 6, [hl]
- coord hl, 11, 0
+ hlcoord 11, 0
lb bc, 5, 7
call TextBoxBorder
call UpdateSprites
- coord hl, 12, 1
+ hlcoord 12, 1
lb bc, 4, 7
call ClearScreenArea
- coord hl, 12, 2
+ hlcoord 12, 2
ld de, GameCornerMoneyText
call PlaceString
- coord hl, 12, 3
+ hlcoord 12, 3
ld de, GameCornerBlankText1
call PlaceString
- coord hl, 12, 3
+ hlcoord 12, 3
ld de, wPlayerMoney
ld c, 3 | MONEY_SIGN | LEADING_ZEROES
call PrintBCDNumber
- coord hl, 12, 4
+ hlcoord 12, 4
ld de, GameCornerCoinText
call PlaceString
- coord hl, 12, 5
+ hlcoord 12, 5
ld de, GameCornerBlankText2
call PlaceString
- coord hl, 15, 5
+ hlcoord 15, 5
ld de, wPlayerCoins
ld c, $82
call PrintBCDNumber
@@ -523,7 +523,7 @@ GameCornerBlankText2:
Has9990Coins:
ld a, $99
- ld [hCoins], a
+ ldh [hCoins], a
ld a, $90
- ld [hCoins + 1], a
+ ldh [hCoins + 1], a
jp HasEnoughCoins
diff --git a/scripts/GameCorner2.asm b/scripts/GameCorner2.asm
index f8d25905..3571e9d9 100755
--- a/scripts/GameCorner2.asm
+++ b/scripts/GameCorner2.asm
@@ -1,4 +1,4 @@
-Func_f1f23:
+Func_f1f23::
ld hl, PikachuMovementData_f1f2c
ld b, SPRITE_FACING_DOWN
call TryApplyPikachuMovementData
diff --git a/scripts/GameCornerPrizeRoom.asm b/scripts/GameCornerPrizeRoom.asm
index e6cf6f0d..c8dddf71 100755
--- a/scripts/GameCornerPrizeRoom.asm
+++ b/scripts/GameCornerPrizeRoom.asm
@@ -9,12 +9,12 @@ GameCornerPrizeRoom_TextPointers:
dw CeladonPrizeRoomText3
CeladonPrizeRoomText1:
- TX_FAR _CeladonPrizeRoomText1
- db "@"
+ text_far _CeladonPrizeRoomText1
+ text_end
CeladonPrizeRoomText2:
- TX_FAR _CeladonPrizeRoomText2
- db "@"
+ text_far _CeladonPrizeRoomText2
+ text_end
CeladonPrizeRoomText3:
- TX_PRIZE_VENDOR
+ script_prize_vendor
diff --git a/scripts/HallOfFame.asm b/scripts/HallOfFame.asm
index af424089..fd13719b 100755
--- a/scripts/HallOfFame.asm
+++ b/scripts/HallOfFame.asm
@@ -45,7 +45,7 @@ HallofFameRoomScript2:
ld [wHallOfFameCurScript], a
ld a, PALLET_TOWN
ld [wLastBlackoutMap], a
- callba SaveSAVtoSRAM
+ farcall SaveSAVtoSRAM
ld b, 5
.delayLoop
ld c, 600 / 5
@@ -69,8 +69,8 @@ HallofFameRoomScript0:
ret
RLEMovement5a528:
- db D_UP,$5
- db $ff
+ db D_UP, 5
+ db -1 ; end
HallofFameRoomScript1:
ld a, [wSimulatedJoypadStatesIndex]
@@ -79,10 +79,10 @@ HallofFameRoomScript1:
ld a, PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld a, SPRITE_FACING_LEFT
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
call Delay3
xor a
@@ -90,7 +90,7 @@ HallofFameRoomScript1:
inc a ; PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $ff
ld [wJoyIgnore], a
@@ -105,5 +105,5 @@ HallOfFame_TextPointers:
dw HallofFameRoomText1
HallofFameRoomText1:
- TX_FAR _HallofFameRoomText1
- db "@"
+ text_far _HallofFameRoomText1
+ text_end
diff --git a/scripts/IndigoPlateauLobby.asm b/scripts/IndigoPlateauLobby.asm
index d618d155..0a532d9a 100755
--- a/scripts/IndigoPlateauLobby.asm
+++ b/scripts/IndigoPlateauLobby.asm
@@ -23,20 +23,20 @@ IndigoPlateauLobby_TextPointers:
dw IndigoPlateauLobbyText6
IndigoHealNurseText:
- TX_POKECENTER_NURSE
+ script_pokecenter_nurse
IndigoPlateauLobbyText2:
- TX_FAR _IndigoPlateauLobbyText2
- db "@"
+ text_far _IndigoPlateauLobbyText2
+ text_end
IndigoPlateauLobbyText3:
- TX_FAR _IndigoPlateauLobbyText3
- db "@"
+ text_far _IndigoPlateauLobbyText3
+ text_end
IndigoTradeNurseText:
- TX_CABLE_CLUB_RECEPTIONIST
+ script_cable_club_receptionist
IndigoPlateauLobbyText6:
- TX_ASM
- callab PokecenterChanseyText
+ text_asm
+ callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/LancesRoom.asm b/scripts/LancesRoom.asm
index aec555a3..68d2020e 100755
--- a/scripts/LancesRoom.asm
+++ b/scripts/LancesRoom.asm
@@ -58,12 +58,12 @@ LanceScript0:
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, [wCoordIndex]
cp $3 ; Is player standing next to Lance's sprite?
jr nc, .notStandingNextToLance
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
.notStandingNextToLance
cp $5 ; Is player standing on the entrance staircase?
@@ -77,12 +77,12 @@ LanceScript0:
jp LanceShowOrHideEntranceBlocks
LanceTriggerMovementCoords:
- db $01,$05
- db $02,$06
- db $0B,$05
- db $0B,$06
- db $10,$18
- db $FF
+ dbmapcoord 5, 1
+ dbmapcoord 6, 2
+ dbmapcoord 5, 11
+ dbmapcoord 6, 11
+ dbmapcoord 24, 16
+ db -1 ; end
LanceScript2:
call EndTrainerBattle
@@ -90,7 +90,7 @@ LanceScript2:
cp $ff
jp z, ResetLanceScript
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
WalkToLance:
@@ -109,11 +109,11 @@ WalkToLance:
ret
WalkToLance_RLEList:
- db D_UP, $0D
- db D_LEFT, $0C
- db D_DOWN, $07
- db D_LEFT, $06
- db $FF
+ db D_UP, 13
+ db D_LEFT, 12
+ db D_DOWN, 7
+ db D_LEFT, 6
+ db -1 ; end
LanceScript3:
ld a, [wSimulatedJoypadStatesIndex]
@@ -130,32 +130,25 @@ LancesRoom_TextPointers:
dw LanceText1
LanceTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_LANCES_ROOM_TRAINER_0
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_LANCES_ROOM_TRAINER_0
- dw LanceBeforeBattleText ; TextBeforeBattle
- dw LanceAfterBattleText ; TextAfterBattle
- dw LanceEndBattleText ; TextEndBattle
- dw LanceEndBattleText ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_LANCES_ROOM_TRAINER_0, 0, LanceBeforeBattleText, LanceEndBattleText, LanceAfterBattleText
+ db -1 ; end
LanceText1:
- TX_ASM
+ text_asm
ld hl, LanceTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
LanceBeforeBattleText:
- TX_FAR _LanceBeforeBattleText
- db "@"
+ text_far _LanceBeforeBattleText
+ text_end
LanceEndBattleText:
- TX_FAR _LanceEndBattleText
- db "@"
+ text_far _LanceEndBattleText
+ text_end
LanceAfterBattleText:
- TX_FAR _LanceAfterBattleText
- TX_ASM
+ text_far _LanceAfterBattleText
+ text_asm
SetEvent EVENT_BEAT_LANCE
jp TextScriptEnd
diff --git a/scripts/LavenderCuboneHouse.asm b/scripts/LavenderCuboneHouse.asm
index ff5aa732..69d74ede 100755
--- a/scripts/LavenderCuboneHouse.asm
+++ b/scripts/LavenderCuboneHouse.asm
@@ -7,29 +7,29 @@ LavenderCuboneHouse_TextPointers:
dw LavenderHouse2Text2
LavenderHouse2Text1:
- TX_FAR _LavenderHouse2Text1
- TX_ASM
+ text_far _LavenderHouse2Text1
+ text_asm
ld a, CUBONE
call PlayCry
jp TextScriptEnd
LavenderHouse2Text2:
- TX_ASM
+ text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
- jr nz, .asm_65711
+ jr nz, .rescued_mr_fuji
ld hl, LavenderHouse2Text_1d9dc
call PrintText
- jr .asm_64be1
-.asm_65711
+ jr .done
+.rescued_mr_fuji
ld hl, LavenderHouse2Text_1d9e1
call PrintText
-.asm_64be1
+.done
jp TextScriptEnd
LavenderHouse2Text_1d9dc:
- TX_FAR _LavenderHouse2Text_1d9dc
- db "@"
+ text_far _LavenderHouse2Text_1d9dc
+ text_end
LavenderHouse2Text_1d9e1:
- TX_FAR _LavenderHouse2Text_1d9e1
- db "@"
+ text_far _LavenderHouse2Text_1d9e1
+ text_end
diff --git a/scripts/LavenderMart.asm b/scripts/LavenderMart.asm
index 47330e5d..2b67aaa6 100755
--- a/scripts/LavenderMart.asm
+++ b/scripts/LavenderMart.asm
@@ -7,11 +7,11 @@ LavenderMart_TextPointers:
dw LavenderMartText3
LavenderMartText2:
- TX_FAR _LavenderMartText2
- db "@"
+ text_far _LavenderMartText2
+ text_end
LavenderMartText3:
- TX_ASM
+ text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
jr nz, .Nugget
ld hl, .ReviveText
@@ -24,9 +24,9 @@ LavenderMartText3:
jp TextScriptEnd
.ReviveText
- TX_FAR _LavenderMartReviveText
- db "@"
+ text_far _LavenderMartReviveText
+ text_end
.NuggetText
- TX_FAR _LavenderMartNuggetText
- db "@"
+ text_far _LavenderMartNuggetText
+ text_end
diff --git a/scripts/LavenderPokecenter.asm b/scripts/LavenderPokecenter.asm
index 21270313..a15bfcfa 100755
--- a/scripts/LavenderPokecenter.asm
+++ b/scripts/LavenderPokecenter.asm
@@ -10,20 +10,20 @@ LavenderPokecenter_TextPointers:
dw LavenderPokecenterText5
LavenderTradeNurseText:
- TX_CABLE_CLUB_RECEPTIONIST
+ script_cable_club_receptionist
LavenderHealNurseText:
- TX_POKECENTER_NURSE
+ script_pokecenter_nurse
LavenderPokecenterText2:
- TX_FAR _LavenderPokecenterText2
- db "@"
+ text_far _LavenderPokecenterText2
+ text_end
LavenderPokecenterText3:
- TX_FAR _LavenderPokecenterText3
- db "@"
+ text_far _LavenderPokecenterText3
+ text_end
LavenderPokecenterText5:
- TX_ASM
- callab PokecenterChanseyText
+ text_asm
+ callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/LavenderTown.asm b/scripts/LavenderTown.asm
index c23996e9..d0c66208 100755
--- a/scripts/LavenderTown.asm
+++ b/scripts/LavenderTown.asm
@@ -13,51 +13,51 @@ LavenderTown_TextPointers:
dw LavenderTownText9
LavenderTownText1:
- TX_ASM
+ text_asm
ld hl, LavenderTownText_4413c
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
ld hl, LavenderTownText_44146
- jr nz, .asm_40831
+ jr nz, .got_text
ld hl, LavenderTownText_44141
-.asm_40831
+.got_text
call PrintText
jp TextScriptEnd
LavenderTownText_4413c:
- TX_FAR _LavenderTownText_4413c
- db "@"
+ text_far _LavenderTownText_4413c
+ text_end
LavenderTownText_44141:
- TX_FAR _LavenderTownText_44141
- db "@"
+ text_far _LavenderTownText_44141
+ text_end
LavenderTownText_44146:
- TX_FAR _LavenderTownText_44146
- db "@"
+ text_far _LavenderTownText_44146
+ text_end
LavenderTownText2:
- TX_FAR _LavenderTownText2
- db "@"
+ text_far _LavenderTownText2
+ text_end
LavenderTownText3:
- TX_FAR _LavenderTownText3
- db "@"
+ text_far _LavenderTownText3
+ text_end
LavenderTownText4:
- TX_FAR _LavenderTownText4
- db "@"
+ text_far _LavenderTownText4
+ text_end
LavenderTownText5:
- TX_FAR _LavenderTownText5
- db "@"
+ text_far _LavenderTownText5
+ text_end
LavenderTownText8:
- TX_FAR _LavenderTownText8
- db "@"
+ text_far _LavenderTownText8
+ text_end
LavenderTownText9:
- TX_FAR _LavenderTownText9
- db "@"
+ text_far _LavenderTownText9
+ text_end
diff --git a/scripts/LoreleisRoom.asm b/scripts/LoreleisRoom.asm
index 81142377..8e9730ff 100755
--- a/scripts/LoreleisRoom.asm
+++ b/scripts/LoreleisRoom.asm
@@ -65,8 +65,8 @@ LoreleiScript0:
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
- ld [hJoyPressed], a
- ld [hJoyHeld], a
+ ldh [hJoyPressed], a
+ ldh [hJoyHeld], a
ld [wSimulatedJoypadStatesEnd], a
ld [wSimulatedJoypadStatesIndex], a
ld a, [wCoordIndex]
@@ -76,7 +76,7 @@ LoreleiScript0:
jr z, LoreleiScriptWalkIntoRoom
.stopPlayerFromLeaving
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID ; "Don't run away!"
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
@@ -89,11 +89,11 @@ LoreleiScript0:
ret
LoreleiEntranceCoords:
- db $0A,$04
- db $0A,$05
- db $0B,$04
- db $0B,$05
- db $FF
+ dbmapcoord 4, 10
+ dbmapcoord 5, 10
+ dbmapcoord 4, 11
+ dbmapcoord 5, 11
+ db -1 ; end
LoreleiScript3:
ld a, [wSimulatedJoypadStatesIndex]
@@ -112,7 +112,7 @@ LoreleiScript2:
cp $ff
jp z, ResetLoreleiScript
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
LoreleisRoom_TextPointers:
@@ -120,34 +120,27 @@ LoreleisRoom_TextPointers:
dw LoreleiDontRunAwayText
LoreleiTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_LORELEIS_ROOM_TRAINER_0
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_LORELEIS_ROOM_TRAINER_0
- dw LoreleiBeforeBattleText ; TextBeforeBattle
- dw LoreleiAfterBattleText ; TextAfterBattle
- dw LoreleiEndBattleText ; TextEndBattle
- dw LoreleiEndBattleText ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_LORELEIS_ROOM_TRAINER_0, 0, LoreleiBeforeBattleText, LoreleiEndBattleText, LoreleiAfterBattleText
+ db -1 ; end
LoreleiText1:
- TX_ASM
+ text_asm
ld hl, LoreleiTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
LoreleiBeforeBattleText:
- TX_FAR _LoreleiBeforeBattleText
- db "@"
+ text_far _LoreleiBeforeBattleText
+ text_end
LoreleiEndBattleText:
- TX_FAR _LoreleiEndBattleText
- db "@"
+ text_far _LoreleiEndBattleText
+ text_end
LoreleiAfterBattleText:
- TX_FAR _LoreleiAfterBattleText
- db "@"
+ text_far _LoreleiAfterBattleText
+ text_end
LoreleiDontRunAwayText:
- TX_FAR _LoreleiDontRunAwayText
- db "@"
+ text_far _LoreleiDontRunAwayText
+ text_end
diff --git a/scripts/MrFujisHouse.asm b/scripts/MrFujisHouse.asm
index 98190cd8..3ef3017a 100755
--- a/scripts/MrFujisHouse.asm
+++ b/scripts/MrFujisHouse.asm
@@ -11,102 +11,102 @@ MrFujisHouse_TextPointers:
dw LavenderHouse1Text6
LavenderHouse1Text1:
- TX_ASM
+ text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
- jr nz, .asm_72e5d
+ jr nz, .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8d1
call PrintText
- jr .asm_6957f
-.asm_72e5d
+ jr .done
+.rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8d6
call PrintText
-.asm_6957f
+.done
jp TextScriptEnd
LavenderHouse1Text_1d8d1:
- TX_FAR _LavenderHouse1Text_1d8d1
- db "@"
+ text_far _LavenderHouse1Text_1d8d1
+ text_end
LavenderHouse1Text_1d8d6:
- TX_FAR _LavenderHouse1Text_1d8d6
- db "@"
+ text_far _LavenderHouse1Text_1d8d6
+ text_end
LavenderHouse1Text2:
- TX_ASM
+ text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
- jr nz, .asm_06470
+ jr nz, .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8f4
call PrintText
- jr .asm_3d208
-.asm_06470
+ jr .done
+.rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8f9
call PrintText
-.asm_3d208
+.done
jp TextScriptEnd
LavenderHouse1Text_1d8f4:
- TX_FAR _LavenderHouse1Text_1d8f4
- db "@"
+ text_far _LavenderHouse1Text_1d8f4
+ text_end
LavenderHouse1Text_1d8f9:
- TX_FAR _LavenderHouse1Text_1d8f9
- db "@"
+ text_far _LavenderHouse1Text_1d8f9
+ text_end
LavenderHouse1Text3:
- TX_FAR _LavenderHouse1Text3
- TX_ASM
+ text_far _LavenderHouse1Text3
+ text_asm
ld a, PSYDUCK
call PlayCry
jp TextScriptEnd
LavenderHouse1Text4:
- TX_FAR _LavenderHouse1Text4
- TX_ASM
+ text_far _LavenderHouse1Text4
+ text_asm
ld a, NIDORINO
call PlayCry
jp TextScriptEnd
LavenderHouse1Text5:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_POKE_FLUTE
- jr nz, .asm_15ac2
+ jr nz, .got_item
ld hl, LavenderHouse1Text_1d94c
call PrintText
lb bc, POKE_FLUTE, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedFluteText
call PrintText
SetEvent EVENT_GOT_POKE_FLUTE
- jr .asm_da749
-.BagFull
+ jr .done
+.bag_full
ld hl, FluteNoRoomText
call PrintText
- jr .asm_da749
-.asm_15ac2
+ jr .done
+.got_item
ld hl, MrFujiAfterFluteText
call PrintText
-.asm_da749
+.done
jp TextScriptEnd
LavenderHouse1Text_1d94c:
- TX_FAR _LavenderHouse1Text_1d94c
- db "@"
+ text_far _LavenderHouse1Text_1d94c
+ text_end
ReceivedFluteText:
- TX_FAR _ReceivedFluteText
- TX_SFX_KEY_ITEM
- TX_FAR _FluteExplanationText
- db "@"
+ text_far _ReceivedFluteText
+ sound_get_key_item
+ text_far _FluteExplanationText
+ text_end
FluteNoRoomText:
- TX_FAR _FluteNoRoomText
- db "@"
+ text_far _FluteNoRoomText
+ text_end
MrFujiAfterFluteText:
- TX_FAR _MrFujiAfterFluteText
- db "@"
+ text_far _MrFujiAfterFluteText
+ text_end
LavenderHouse1Text6:
- TX_FAR _LavenderHouse1Text6
- db "@"
+ text_far _LavenderHouse1Text6
+ text_end
diff --git a/scripts/MrPsychicsHouse.asm b/scripts/MrPsychicsHouse.asm
index 7d4f54c0..399edfbd 100755
--- a/scripts/MrPsychicsHouse.asm
+++ b/scripts/MrPsychicsHouse.asm
@@ -5,41 +5,41 @@ MrPsychicsHouse_TextPointers:
dw SaffronHouse2Text1
SaffronHouse2Text1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_TM29
- jr nz, .asm_9e72b
+ jr nz, .got_item
ld hl, TM29PreReceiveText
call PrintText
- lb bc, TM_29, 1
+ lb bc, TM_PSYCHIC_M, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM29Text
call PrintText
SetEvent EVENT_GOT_TM29
- jr .asm_fe4e1
-.BagFull
+ jr .done
+.bag_full
ld hl, TM29NoRoomText
call PrintText
- jr .asm_fe4e1
-.asm_9e72b
+ jr .done
+.got_item
ld hl, TM29ExplanationText
call PrintText
-.asm_fe4e1
+.done
jp TextScriptEnd
TM29PreReceiveText:
- TX_FAR _TM29PreReceiveText
- db "@"
+ text_far _TM29PreReceiveText
+ text_end
ReceivedTM29Text:
- TX_FAR _ReceivedTM29Text
- TX_SFX_ITEM_1
- db "@"
+ text_far _ReceivedTM29Text
+ sound_get_item_1
+ text_end
TM29ExplanationText:
- TX_FAR _TM29ExplanationText
- db "@"
+ text_far _TM29ExplanationText
+ text_end
TM29NoRoomText:
- TX_FAR _TM29NoRoomText
- db "@"
+ text_far _TM29NoRoomText
+ text_end
diff --git a/scripts/MtMoon1F.asm b/scripts/MtMoon1F.asm
index cb120420..2653016f 100755
--- a/scripts/MtMoon1F.asm
+++ b/scripts/MtMoon1F.asm
@@ -29,191 +29,142 @@ MtMoon1F_TextPointers:
dw MtMoon1Text14
MtMoon1TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_0
- dw MtMoon1BattleText2 ; TextBeforeBattle
- dw MtMoon1AfterBattleText2 ; TextAfterBattle
- dw MtMoon1EndBattleText2 ; TextEndBattle
- dw MtMoon1EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_0, 2, MtMoon1BattleText2, MtMoon1EndBattleText2, MtMoon1AfterBattleText2
MtMoon1TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_1
- dw MtMoon1BattleText3 ; TextBeforeBattle
- dw MtMoon1AfterBattleText3 ; TextAfterBattle
- dw MtMoon1EndBattleText3 ; TextEndBattle
- dw MtMoon1EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_1, 3, MtMoon1BattleText3, MtMoon1EndBattleText3, MtMoon1AfterBattleText3
MtMoon1TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_2
- dw MtMoon1BattleText4 ; TextBeforeBattle
- dw MtMoon1AfterBattleText4 ; TextAfterBattle
- dw MtMoon1EndBattleText4 ; TextEndBattle
- dw MtMoon1EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_2, 3, MtMoon1BattleText4, MtMoon1EndBattleText4, MtMoon1AfterBattleText4
MtMoon1TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_3
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_3
- dw MtMoon1BattleText5 ; TextBeforeBattle
- dw MtMoon1AfterBattleText5 ; TextAfterBattle
- dw MtMoon1EndBattleText5 ; TextEndBattle
- dw MtMoon1EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_3, 3, MtMoon1BattleText5, MtMoon1EndBattleText5, MtMoon1AfterBattleText5
MtMoon1TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_4
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_4
- dw MtMoon1BattleText6 ; TextBeforeBattle
- dw MtMoon1AfterBattleText6 ; TextAfterBattle
- dw MtMoon1EndBattleText6 ; TextEndBattle
- dw MtMoon1EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_4, 3, MtMoon1BattleText6, MtMoon1EndBattleText6, MtMoon1AfterBattleText6
MtMoon1TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_5
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_5
- dw MtMoon1BattleText7 ; TextBeforeBattle
- dw MtMoon1AfterBattleText7 ; TextAfterBattle
- dw MtMoon1EndBattleText7 ; TextEndBattle
- dw MtMoon1EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_5, 3, MtMoon1BattleText7, MtMoon1EndBattleText7, MtMoon1AfterBattleText7
MtMoon1TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_6
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_6
- dw MtMoon1BattleText8 ; TextBeforeBattle
- dw MtMoon1AfterBattleText8 ; TextAfterBattle
- dw MtMoon1EndBattleText8 ; TextEndBattle
- dw MtMoon1EndBattleText8 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_6, 3, MtMoon1BattleText8, MtMoon1EndBattleText8, MtMoon1AfterBattleText8
+ db -1 ; end
MtMoon1Text1:
- TX_ASM
+ text_asm
ld hl, MtMoon1TrainerHeader0
jr MtMoon1TalkToTrainer
MtMoon1Text2:
- TX_ASM
+ text_asm
ld hl, MtMoon1TrainerHeader1
jr MtMoon1TalkToTrainer
MtMoon1Text3:
- TX_ASM
+ text_asm
ld hl, MtMoon1TrainerHeader2
jr MtMoon1TalkToTrainer
MtMoon1Text4:
- TX_ASM
+ text_asm
ld hl, MtMoon1TrainerHeader3
jr MtMoon1TalkToTrainer
MtMoon1Text5:
- TX_ASM
+ text_asm
ld hl, MtMoon1TrainerHeader4
jr MtMoon1TalkToTrainer
MtMoon1Text6:
- TX_ASM
+ text_asm
ld hl, MtMoon1TrainerHeader5
jr MtMoon1TalkToTrainer
MtMoon1Text7:
- TX_ASM
+ text_asm
ld hl, MtMoon1TrainerHeader6
MtMoon1TalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
MtMoon1BattleText2:
- TX_FAR _MtMoon1BattleText2
- db "@"
+ text_far _MtMoon1BattleText2
+ text_end
MtMoon1EndBattleText2:
- TX_FAR _MtMoon1EndBattleText2
- db "@"
+ text_far _MtMoon1EndBattleText2
+ text_end
MtMoon1AfterBattleText2:
- TX_FAR _MtMoon1AfterBattleText2
- db "@"
+ text_far _MtMoon1AfterBattleText2
+ text_end
MtMoon1BattleText3:
- TX_FAR _MtMoon1BattleText3
- db "@"
+ text_far _MtMoon1BattleText3
+ text_end
MtMoon1EndBattleText3:
- TX_FAR _MtMoon1EndBattleText3
- db "@"
+ text_far _MtMoon1EndBattleText3
+ text_end
MtMoon1AfterBattleText3:
- TX_FAR _MtMoon1AfterBattleText3
- db "@"
+ text_far _MtMoon1AfterBattleText3
+ text_end
MtMoon1BattleText4:
- TX_FAR _MtMoon1BattleText4
- db "@"
+ text_far _MtMoon1BattleText4
+ text_end
MtMoon1EndBattleText4:
- TX_FAR _MtMoon1EndBattleText4
- db "@"
+ text_far _MtMoon1EndBattleText4
+ text_end
MtMoon1AfterBattleText4:
- TX_FAR _MtMoon1AfterBattleText4
- db "@"
+ text_far _MtMoon1AfterBattleText4
+ text_end
MtMoon1BattleText5:
- TX_FAR _MtMoon1BattleText5
- db "@"
+ text_far _MtMoon1BattleText5
+ text_end
MtMoon1EndBattleText5:
- TX_FAR _MtMoon1EndBattleText5
- db "@"
+ text_far _MtMoon1EndBattleText5
+ text_end
MtMoon1AfterBattleText5:
- TX_FAR _MtMoon1AfterBattleText5
- db "@"
+ text_far _MtMoon1AfterBattleText5
+ text_end
MtMoon1BattleText6:
- TX_FAR _MtMoon1BattleText6
- db "@"
+ text_far _MtMoon1BattleText6
+ text_end
MtMoon1EndBattleText6:
- TX_FAR _MtMoon1EndBattleText6
- db "@"
+ text_far _MtMoon1EndBattleText6
+ text_end
MtMoon1AfterBattleText6:
- TX_FAR _MtMoon1AfterBattleText6
- db "@"
+ text_far _MtMoon1AfterBattleText6
+ text_end
MtMoon1BattleText7:
- TX_FAR _MtMoon1BattleText7
- db "@"
+ text_far _MtMoon1BattleText7
+ text_end
MtMoon1EndBattleText7:
- TX_FAR _MtMoon1EndBattleText7
- db "@"
+ text_far _MtMoon1EndBattleText7
+ text_end
MtMoon1AfterBattleText7:
- TX_FAR _MtMoon1AfterBattleText7
- db "@"
+ text_far _MtMoon1AfterBattleText7
+ text_end
MtMoon1BattleText8:
- TX_FAR _MtMoon1BattleText8
- db "@"
+ text_far _MtMoon1BattleText8
+ text_end
MtMoon1EndBattleText8:
- TX_FAR _MtMoon1EndBattleText8
- db "@"
+ text_far _MtMoon1EndBattleText8
+ text_end
MtMoon1AfterBattleText8:
- TX_FAR _MtMoon1AfterBattleText8
- db "@"
+ text_far _MtMoon1AfterBattleText8
+ text_end
MtMoon1Text14:
- TX_FAR _MtMoon1Text14
- db "@"
+ text_far _MtMoon1Text14
+ text_end
diff --git a/scripts/MtMoonB1F.asm b/scripts/MtMoonB1F.asm
index 779812c3..06af2dd3 100755
--- a/scripts/MtMoonB1F.asm
+++ b/scripts/MtMoonB1F.asm
@@ -6,5 +6,5 @@ MtMoonB1F_TextPointers:
dw MtMoonText1
MtMoonText1:
- TX_FAR _MtMoonText1
- db "@"
+ text_far _MtMoonText1
+ text_end
diff --git a/scripts/MtMoonB2F.asm b/scripts/MtMoonB2F.asm
index cf4583d3..a02d7d42 100755
--- a/scripts/MtMoonB2F.asm
+++ b/scripts/MtMoonB2F.asm
@@ -19,23 +19,23 @@ MtMoonB2F_Script:
ret
CoordsData_49d37:
- db $05,$0B
- db $05,$0C
- db $05,$0D
- db $05,$0E
- db $06,$0B
- db $06,$0C
- db $06,$0D
- db $06,$0E
- db $07,$0B
- db $07,$0C
- db $07,$0D
- db $07,$0E
- db $08,$0B
- db $08,$0C
- db $08,$0D
- db $08,$0E
- db $FF
+ dbmapcoord 11, 5
+ dbmapcoord 12, 5
+ dbmapcoord 13, 5
+ dbmapcoord 14, 5
+ dbmapcoord 11, 6
+ dbmapcoord 12, 6
+ dbmapcoord 13, 6
+ dbmapcoord 14, 6
+ dbmapcoord 11, 7
+ dbmapcoord 12, 7
+ dbmapcoord 13, 7
+ dbmapcoord 14, 7
+ dbmapcoord 11, 8
+ dbmapcoord 12, 8
+ dbmapcoord 13, 8
+ dbmapcoord 14, 8
+ db -1 ; end
MtMoon3Script_49cd7:
CheckAndResetEvent EVENT_57E
@@ -83,15 +83,15 @@ MtMoon3Script_49d28:
CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD
jp nz, .asm_49d4b
ld a, [wYCoord]
- cp $8
+ cp 8
jp nz, .asm_49d4b
ld a, [wXCoord]
- cp $d
+ cp 13
jp nz, .asm_49d4b
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ret
@@ -115,7 +115,7 @@ MtMoon3Script3:
MtMoon3Script4:
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld hl, CoordsData_49dc7
call ArePlayerCoordsInArray
@@ -147,21 +147,21 @@ MtMoon3Script4:
ld de, MovementData_49ddc
.asm_49db3
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call MoveSprite
ld a, $5
call MtMoon3Script_49ce5
ret
CoordsData_49dc0:
- db $07,$0C
- db $06,$0B
- db $05,$0C
- db $FF
+ dbmapcoord 12, 7
+ dbmapcoord 11, 6
+ dbmapcoord 12, 5
+ db -1 ; end
CoordsData_49dc7:
- db $07,$0C
- db $FF
+ dbmapcoord 12, 7
+ db -1 ; end
PikachuMovementData_49dca:
db $00
@@ -170,14 +170,14 @@ PikachuMovementData_49dca:
db $3f
CoordsData_49dce:
- db $07,$0D
- db $06,$0E
- db $05,$0E
- db $FF
+ dbmapcoord 13, 7
+ dbmapcoord 14, 6
+ dbmapcoord 14, 5
+ db -1 ; end
CoordsData_49dd5:
- db $07,$0D
- db $FF
+ dbmapcoord 13, 7
+ db -1 ; end
PikachuMovementData_49dd8:
db $00
@@ -189,7 +189,7 @@ MovementData_49ddc:
db NPC_MOVEMENT_RIGHT
MovementData_49ddd:
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
MtMoon3Script5:
ld a, [wd730]
@@ -200,7 +200,7 @@ MtMoon3Script5:
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, $b
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
CheckEvent EVENT_GOT_HELIX_FOSSIL
jr z, .asm_49e1d
@@ -229,7 +229,7 @@ MtMoon3Script_49e15:
ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $FF ^ (A_BUTTON | B_BUTTON)
ld [wJoyIgnore], a
ld a, HS_MT_MOON_B2F_JESSIE
@@ -239,7 +239,7 @@ MtMoon3Script_49e15:
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, $c
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -272,7 +272,7 @@ MtMoon3Script6:
ret nz
call Delay3
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld de, MovementData_f9e65
call MoveSprite
ld a, $ff
@@ -294,7 +294,7 @@ MtMoon3Script8:
ld [wSpriteStateData1 + 2 * $10 + 9], a
MtMoon3Script9:
ld a, $6
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld de, MovementData_f9e66
call MoveSprite
ld a, $ff
@@ -318,7 +318,7 @@ MtMoon3Script11:
ld a, $FF ^ (A_BUTTON | B_BUTTON)
ld [wJoyIgnore], a
ld a, $d
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
MtMoon3Script12:
ld hl, wd72d
@@ -332,7 +332,7 @@ MtMoon3Script12:
ld a, $2a
ld [wTrainerNo], a
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld [wJoyIgnore], a
SetEvent EVENT_57E
ld a, $d
@@ -356,7 +356,7 @@ MtMoon3Script13:
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, $e
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -388,7 +388,7 @@ MtMoon3Script14:
MtMoon3Script15:
call PlayDefaultMusic
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_MT_MOON_3_TRAINER_0
ResetEventReuseHL EVENT_57E
@@ -425,41 +425,20 @@ MtMoonB2F_TextPointers:
dw MtMoon3Text14
MtMoon3TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_1
- db ($4 << 4)
- dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_1
- dw MtMoon3BattleText3
- dw MtMoon3AfterBattleText3
- dw MtMoon3EndBattleText3
- dw MtMoon3EndBattleText3
-
+ trainer EVENT_BEAT_MT_MOON_3_TRAINER_1, 4, MtMoon3BattleText3, MtMoon3EndBattleText3, MtMoon3AfterBattleText3
MtMoon3TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_2
- db ($4 << 4)
- dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_2
- dw MtMoon3BattleText4
- dw MtMoon3AfterBattleText4
- dw MtMoon3EndBattleText4
- dw MtMoon3EndBattleText4
-
+ trainer EVENT_BEAT_MT_MOON_3_TRAINER_2, 4, MtMoon3BattleText4, MtMoon3EndBattleText4, MtMoon3AfterBattleText4
MtMoon3TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_3
- db ($4 << 4)
- dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_3
- dw MtMoon3BattleText5
- dw MtMoon3AfterBattleText5
- dw MtMoon3EndBattleText5
- dw MtMoon3EndBattleText5
-
- db $FF
+ trainer EVENT_BEAT_MT_MOON_3_TRAINER_3, 4, MtMoon3BattleText5, MtMoon3EndBattleText5, MtMoon3AfterBattleText5
+ db -1 ; end
MtMoon3Text2:
MtMoon3Text6:
- db "@"
+ text_end
MtMoon3Text12:
- TX_FAR _MtMoonJessieJamesText1
- TX_ASM
+ text_far _MtMoonJessieJamesText1
+ text_asm
ld c, 10
call DelayFrames
ld a, PLAYER_DIR_UP
@@ -474,22 +453,22 @@ MtMoon3Text12:
jp TextScriptEnd
MtMoon3Text13:
- TX_FAR _MtMoonJessieJamesText2
- db "@"
+ text_far _MtMoonJessieJamesText2
+ text_end
MtMoon3JessieJamesEndBattleText:
- TX_FAR _MtMoonJessieJamesText3
- db "@"
+ text_far _MtMoonJessieJamesText3
+ text_end
MtMoon3Text14:
- TX_FAR _MtMoonJessieJamesText4
- TX_ASM
+ text_far _MtMoonJessieJamesText4
+ text_asm
ld c, 64
call DelayFrames
jp TextScriptEnd
MtMoon3Text1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD
jr z, .asm_4a02f
; CheckEitherEventSetReuseA EVENT_GOT_DOME_FOSSIL, EVENT_GOT_HELIX_FOSSIL
@@ -508,7 +487,7 @@ MtMoon3Text1:
ld hl, MtMoon3SuperNerdEndBattleText
ld de, MtMoon3SuperNerdEndBattleText
call SaveEndBattleTextPointers
- ld a, [H_SPRITEINDEX]
+ ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
@@ -523,25 +502,25 @@ MtMoon3Text1:
jp TextScriptEnd
MtMoon3Text3:
- TX_ASM
+ text_asm
ld hl, MtMoon3TrainerHeader0
jr MtMoon3TalkToTrainer
MtMoon3Text4:
- TX_ASM
+ text_asm
ld hl, MtMoon3TrainerHeader1
jr MtMoon3TalkToTrainer
MtMoon3Text5:
- TX_ASM
+ text_asm
ld hl, MtMoon3TrainerHeader2
MtMoon3TalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
MtMoon3Text7:
- TX_ASM
+ text_asm
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, MtMoon3Text_4a0ae
@@ -564,11 +543,11 @@ MtMoon3Text7:
jp TextScriptEnd
MtMoon3Text_4a0ae:
- TX_FAR _MtMoon3Text_49f24
- db "@"
+ text_far _MtMoon3Text_49f24
+ text_end
MtMoon3Text8:
- TX_ASM
+ text_asm
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, MtMoon3Text_4a0eb
@@ -591,18 +570,18 @@ MtMoon3Text8:
jp TextScriptEnd
MtMoon3Text_4a0eb:
- TX_FAR _MtMoon3Text_49f64
- db "@"
+ text_far _MtMoon3Text_49f64
+ text_end
MtMoon3Script_4a0f0:
ld hl, MtMoon3Text_4a0f6
jp PrintText
MtMoon3Text_4a0f6:
- TX_FAR _MtMoon3Text_49f6f
- TX_SFX_KEY_ITEM
- TX_WAIT
- db "@"
+ text_far _MtMoon3Text_49f6f
+ sound_get_key_item
+ text_waitbutton
+ text_end
MtMoon3Script_4a0fd:
ld hl, MtMoon3Text_4a106
@@ -610,64 +589,64 @@ MtMoon3Script_4a0fd:
jp TextScriptEnd
MtMoon3Text_4a106:
- TX_FAR _MtMoon3Text_49f7f
- TX_WAIT
- db "@"
+ text_far _MtMoon3Text_49f7f
+ text_waitbutton
+ text_end
MtMoon3Text_4a10c:
- TX_FAR _MtMoon3Text_49f85
- db "@"
+ text_far _MtMoon3Text_49f85
+ text_end
MtMoon3SuperNerdEndBattleText:
- TX_FAR _MtMoon3Text_49f8a
- db "@"
+ text_far _MtMoon3Text_49f8a
+ text_end
MtMoon3Text_4a116:
- TX_FAR _MtMoon3Text_49f8f
- db "@"
+ text_far _MtMoon3Text_49f8f
+ text_end
MtMoon3Text_4a11b:
- TX_FAR _MtMoon3Text_49f94
- db "@"
+ text_far _MtMoon3Text_49f94
+ text_end
MtMoon3Text11:
- TX_FAR _MtMoon3Text_49f99
- TX_SFX_KEY_ITEM
- db "@"
+ text_far _MtMoon3Text_49f99
+ sound_get_key_item
+ text_end
MtMoon3BattleText3:
- TX_FAR _MtMoon3BattleText3
- db "@"
+ text_far _MtMoon3BattleText3
+ text_end
MtMoon3EndBattleText3:
- TX_FAR _MtMoon3EndBattleText3
- db "@"
+ text_far _MtMoon3EndBattleText3
+ text_end
MtMoon3AfterBattleText3:
- TX_FAR _MtMoon3AfterBattleText3
- db "@"
+ text_far _MtMoon3AfterBattleText3
+ text_end
MtMoon3BattleText4:
- TX_FAR _MtMoon3BattleText4
- db "@"
+ text_far _MtMoon3BattleText4
+ text_end
MtMoon3EndBattleText4:
- TX_FAR _MtMoon3EndBattleText4
- db "@"
+ text_far _MtMoon3EndBattleText4
+ text_end
MtMoon3AfterBattleText4:
- TX_FAR _MtMoon3AfterBattleText4
- db "@"
+ text_far _MtMoon3AfterBattleText4
+ text_end
MtMoon3BattleText5:
- TX_FAR _MtMoon3BattleText5
- db "@"
+ text_far _MtMoon3BattleText5
+ text_end
MtMoon3EndBattleText5:
- TX_FAR _MtMoon3EndBattleText5
- db "@"
+ text_far _MtMoon3EndBattleText5
+ text_end
MtMoon3AfterBattleText5:
- TX_FAR _MtMoon3AfterBattleText5
- db "@"
+ text_far _MtMoon3AfterBattleText5
+ text_end
diff --git a/scripts/MtMoonB2F_2.asm b/scripts/MtMoonB2F_2.asm
index c6ec92b4..c983bb0d 100755
--- a/scripts/MtMoonB2F_2.asm
+++ b/scripts/MtMoonB2F_2.asm
@@ -8,7 +8,7 @@ MtMoon3Script_4a325: ; pikachu-related function?
push hl
push bc
- callab GetPikachuFacingDirectionAndReturnToE
+ callfar GetPikachuFacingDirectionAndReturnToE
pop bc
pop hl
ld a, b
@@ -20,7 +20,7 @@ MtMoon3Script_4a325: ; pikachu-related function?
push af
ld a, $ff
ld [wUpdateSpritesEnabled], a
- callab LoadPikachuShadowIntoVRAM
+ callfar LoadPikachuShadowIntoVRAM
pop af
ld [wUpdateSpritesEnabled], a
pop hl
diff --git a/scripts/MtMoonPokecenter.asm b/scripts/MtMoonPokecenter.asm
index 77386109..302c5f19 100755
--- a/scripts/MtMoonPokecenter.asm
+++ b/scripts/MtMoonPokecenter.asm
@@ -12,29 +12,29 @@ MtMoonPokecenter_TextPointers:
dw MtMoonPokecenterText7
MtMoonHealNurseText:
- TX_POKECENTER_NURSE
+ script_pokecenter_nurse
MtMoonPokecenterText2:
- TX_FAR _MtMoonPokecenterText1
- db "@"
+ text_far _MtMoonPokecenterText1
+ text_end
MtMoonPokecenterText3:
- TX_FAR _MtMoonPokecenterText3
- db "@"
+ text_far _MtMoonPokecenterText3
+ text_end
MagikarpSalesmanText:
- TX_ASM
- callab MagikarpSalesman
+ text_asm
+ callfar MagikarpSalesman
jp TextScriptEnd
MtMoonPokecenterText5:
- TX_FAR _MtMoonPokecenterText5
- db "@"
+ text_far _MtMoonPokecenterText5
+ text_end
MtMoonTradeNurseText:
- TX_CABLE_CLUB_RECEPTIONIST
+ script_cable_club_receptionist
MtMoonPokecenterText7:
- TX_ASM
- callab PokecenterChanseyText
+ text_asm
+ callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/MtMoonPokecenter2.asm b/scripts/MtMoonPokecenter2.asm
index 6097342b..9abc0286 100755
--- a/scripts/MtMoonPokecenter2.asm
+++ b/scripts/MtMoonPokecenter2.asm
@@ -1,4 +1,4 @@
-MagikarpSalesman:
+MagikarpSalesman::
CheckEvent EVENT_BOUGHT_MAGIKARP, 1
jp c, .alreadyBoughtMagikarp
ld hl, .Text1
@@ -12,10 +12,10 @@ MagikarpSalesman:
jp nz, .choseNo
; $000500
xor a
- ld [hMoney], a
- ld [hMoney + 2], a
+ ldh [hMoney], a
+ ldh [hMoney + 2], a
ld a, $5
- ld [hMoney + 1], a
+ ldh [hMoney + 1], a
call HasEnoughMoney
jr nc, .enoughMoney
ld hl, .NoMoneyText
@@ -50,17 +50,17 @@ MagikarpSalesman:
ret
.Text1
- TX_FAR _MagikarpSalesmanText1
- db "@"
+ text_far _MagikarpSalesmanText1
+ text_end
.RefuseText
- TX_FAR _MagikarpSalesmanNoText
- db "@"
+ text_far _MagikarpSalesmanNoText
+ text_end
.NoMoneyText
- TX_FAR _MagikarpSalesmanNoMoneyText
- db "@"
+ text_far _MagikarpSalesmanNoMoneyText
+ text_end
.Text2
- TX_FAR _MagikarpSalesmanText2
- db "@"
+ text_far _MagikarpSalesmanText2
+ text_end
diff --git a/scripts/Museum1F.asm b/scripts/Museum1F.asm
index fdae9293..c89eacda 100755
--- a/scripts/Museum1F.asm
+++ b/scripts/Museum1F.asm
@@ -1,5 +1,5 @@
Museum1F_Script:
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -14,19 +14,19 @@ Museum1F_ScriptPointers:
Museum1FScript0:
ld a, [wYCoord]
- cp $4
+ cp 4
ret nz
ld a, [wXCoord]
- cp $9
+ cp 9
jr z, .asm_5c120
ld a, [wXCoord]
- cp $a
+ cp 10
ret nz
.asm_5c120
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
Museum1FScript1:
@@ -40,26 +40,26 @@ Museum1F_TextPointers:
dw Museum1FText5
Museum1FText1:
- TX_ASM
- callba Func_f1c1b
+ text_asm
+ farcall Func_f1c1b
jp TextScriptEnd
Museum1FText2:
- TX_ASM
- callba Func_f1d2a
+ text_asm
+ farcall Func_f1d2a
jp TextScriptEnd
Museum1FText3:
- TX_ASM
- callba Func_f1d36
+ text_asm
+ farcall Func_f1d36
jp TextScriptEnd
Museum1FText4:
- TX_ASM
- callba Func_f1d80
+ text_asm
+ farcall Func_f1d80
jp TextScriptEnd
Museum1FText5:
- TX_ASM
- callba Func_f1d8c
+ text_asm
+ farcall Func_f1d8c
jp TextScriptEnd
diff --git a/scripts/Museum1F2.asm b/scripts/Museum1F2.asm
index 9b3df420..512a3295 100755
--- a/scripts/Museum1F2.asm
+++ b/scripts/Museum1F2.asm
@@ -1,9 +1,9 @@
-Func_f1c1b:
+Func_f1c1b::
ld a, [wYCoord]
- cp $4
+ cp 4
jr nz, .asm_f1c2c
ld a, [wXCoord]
- cp $d
+ cp 13
jp z, .asm_f1cde
jr .asm_f1c48
@@ -11,7 +11,7 @@ Func_f1c1b:
cp $3
jr nz, .asm_f1c38
ld a, [wXCoord]
- cp a, $c
+ cp 12
jp z, .asm_f1cde
.asm_f1c38
CheckEvent EVENT_BOUGHT_MUSEUM_TICKET
@@ -33,7 +33,7 @@ Func_f1c1b:
ld [wTextBoxID], a
call DisplayTextBoxID
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld hl, Museum1FText_f1d02
call PrintText
call YesNoChoice
@@ -41,10 +41,10 @@ Func_f1c1b:
and a
jr nz, .asm_f1cbf
xor a
- ld [hMoney], a
- ld [hMoney + 1], a
+ ldh [hMoney], a
+ ldh [hMoney + 1], a
ld a, $50
- ld [hMoney + 2], a
+ ldh [hMoney + 2], a
call HasEnoughMoney
jr nc, .asm_f1c89
ld hl, Museum1FText_f1d0c
@@ -106,106 +106,104 @@ Func_f1c1b:
ret
Museum1FText_f1cfd:
- TX_FAR _Museum1FText_5c21a
- db "@"
+ text_far _Museum1FText_5c21a
+ text_end
Museum1FText_f1d02:
- TX_FAR _Museum1FText_5c21f
- db "@"
+ text_far _Museum1FText_5c21f
+ text_end
Museum1FText_f1d07:
- TX_FAR _Museum1FText_5c224
- db "@"
+ text_far _Museum1FText_5c224
+ text_end
Museum1FText_f1d0c:
- TX_FAR _Museum1FText_5c229
- db "@"
+ text_far _Museum1FText_5c229
+ text_end
Museum1FText_f1d11:
- TX_FAR _Museum1FText_5c22e
- db "@"
+ text_far _Museum1FText_5c22e
+ text_end
Museum1FText_f1d16:
- TX_FAR _Museum1FText_5c233
- db "@"
+ text_far _Museum1FText_5c233
+ text_end
Museum1FText_f1d1b:
- TX_FAR _Museum1FText_5c238
- db "@"
+ text_far _Museum1FText_5c238
+ text_end
Museum1FText_f1d20:
- TX_FAR _Museum1FText_5c23d
- db "@"
+ text_far _Museum1FText_5c23d
+ text_end
Museum1FText_f1d25:
- TX_FAR _Museum1FText_5c242
- db "@"
+ text_far _Museum1FText_5c242
+ text_end
-Func_f1d2a:
+Func_f1d2a::
ld hl, Museum1FText_f1d31
call PrintText
ret
Museum1FText_f1d31:
- TX_FAR _Museum1FText_5c251
- db "@"
+ text_far _Museum1FText_5c251
+ text_end
-Func_f1d36:
+Func_f1d36::
CheckEvent EVENT_GOT_OLD_AMBER
- jr nz, .asm_f1d64
- ld hl, Museum1FText_f1d6b
+ jr nz, .got_item
+ ld hl, Museum1FText_5c28e
call PrintText
lb bc, OLD_AMBER, 1
call GiveItem
- jr nc, .asm_f1d5f
+ jr nc, .bag_full
SetEvent EVENT_GOT_OLD_AMBER
ld a, HS_OLD_AMBER
ld [wMissableObjectIndex], a
predef HideObject
- ld hl, Museum1FText_f1d70
- jr .asm_f1d67
-
-.asm_f1d5f
- ld hl, Museum1FText_f1d7b
- jr .asm_f1d67
-
-.asm_f1d64
- ld hl, Museum1FText_f1d76
-.asm_f1d67
+ ld hl, ReceivedOldAmberText
+ jr .done
+.bag_full
+ ld hl, Museum1FText_5c29e
+ jr .done
+.got_item
+ ld hl, Museum1FText_5c299
+.done
call PrintText
ret
-Museum1FText_f1d6b:
- TX_FAR _Museum1FText_5c28e
- db "@"
+Museum1FText_5c28e:
+ text_far _Museum1FText_5c28e
+ text_end
-Museum1FText_f1d70:
- TX_FAR _ReceivedOldAmberText
- TX_SFX_ITEM_1
- db "@"
+ReceivedOldAmberText:
+ text_far _ReceivedOldAmberText
+ sound_get_item_1
+ text_end
-Museum1FText_f1d76:
- TX_FAR _Museum1FText_5c299
- db "@"
+Museum1FText_5c299:
+ text_far _Museum1FText_5c299
+ text_end
-Museum1FText_f1d7b:
- TX_FAR _Museum1FText_5c29e
- db "@"
+Museum1FText_5c29e:
+ text_far _Museum1FText_5c29e
+ text_end
-Func_f1d80:
+Func_f1d80::
ld hl, Museum1FText_f1d87
call PrintText
ret
Museum1FText_f1d87:
- TX_FAR _Museum1FText_5c2ad
- db "@"
+ text_far _Museum1FText_5c2ad
+ text_end
-Func_f1d8c:
+Func_f1d8c::
ld hl, Museum1FText_f1d93
call PrintText
ret
Museum1FText_f1d93:
- TX_FAR _Museum1FText_5c2bc
- db "@"
+ text_far _Museum1FText_5c2bc
+ text_end
diff --git a/scripts/Museum2F.asm b/scripts/Museum2F.asm
index e97b8ded..fe02f544 100755
--- a/scripts/Museum2F.asm
+++ b/scripts/Museum2F.asm
@@ -12,23 +12,23 @@ Museum2F_TextPointers:
dw Museum2FText7
Museum2FText1:
- TX_FAR _Museum2FText1
- db "@"
+ text_far _Museum2FText1
+ text_end
Museum2FText2:
- TX_FAR _Museum2FText2
- db "@"
+ text_far _Museum2FText2
+ text_end
Museum2FText3:
- TX_FAR _Museum2FText3
- db "@"
+ text_far _Museum2FText3
+ text_end
Museum2FText4:
- TX_FAR _Museum2FText4
- db "@"
+ text_far _Museum2FText4
+ text_end
Museum2FText5:
- TX_ASM
+ text_asm
ld a, [wd472]
bit 7, a
jr nz, .asm_5c1f6
@@ -51,21 +51,21 @@ Museum2FText5:
jp TextScriptEnd
Museum2FText_5c20e:
- TX_FAR _Museum2FText5
- db "@"
+ text_far _Museum2FText5
+ text_end
Museum2FText_5c213:
- TX_FAR _Museum2FPikachuText1
- db "@"
+ text_far _Museum2FPikachuText1
+ text_end
Museum2FText_5c218:
- TX_FAR _Museum2FPikachuText2
- db "@"
+ text_far _Museum2FPikachuText2
+ text_end
Museum2FText6:
- TX_FAR _Museum2FText6
- db "@"
+ text_far _Museum2FText6
+ text_end
Museum2FText7:
- TX_FAR _Museum2FText7
- db "@"
+ text_far _Museum2FText7
+ text_end
diff --git a/scripts/NameRatersHouse.asm b/scripts/NameRatersHouse.asm
index 323cb360..cecf97e7 100755
--- a/scripts/NameRatersHouse.asm
+++ b/scripts/NameRatersHouse.asm
@@ -41,7 +41,7 @@ NameRatersHouse_TextPointers:
dw NameRaterText1
NameRaterText1:
- TX_ASM
+ text_asm
call SaveScreenTilesToBuffer2
ld hl, NameRaterText_1dab3
call NameRaterScript_1da15
@@ -68,7 +68,7 @@ NameRaterText1:
jr nz, .asm_1daae
ld hl, NameRaterText_1dac2
call PrintText
- callba DisplayNameRaterScreen
+ farcall DisplayNameRaterScreen
jr c, .asm_1daae
ld hl, NameRaterText_1dac7
.asm_1daa8
@@ -79,29 +79,29 @@ NameRaterText1:
jr .asm_1daa8
NameRaterText_1dab3:
- TX_FAR _NameRaterText_1dab3
- db "@"
+ text_far _NameRaterText_1dab3
+ text_end
NameRaterText_1dab8:
- TX_FAR _NameRaterText_1dab8
- db "@"
+ text_far _NameRaterText_1dab8
+ text_end
NameRaterText_1dabd:
- TX_FAR _NameRaterText_1dabd
- db "@"
+ text_far _NameRaterText_1dabd
+ text_end
NameRaterText_1dac2:
- TX_FAR _NameRaterText_1dac2
- db "@"
+ text_far _NameRaterText_1dac2
+ text_end
NameRaterText_1dac7:
- TX_FAR _NameRaterText_1dac7
- db "@"
+ text_far _NameRaterText_1dac7
+ text_end
NameRaterText_1dacc:
- TX_FAR _NameRaterText_1dacc
- db "@"
+ text_far _NameRaterText_1dacc
+ text_end
NameRaterText_1dad1:
- TX_FAR _NameRaterText_1dad1
- db "@"
+ text_far _NameRaterText_1dad1
+ text_end
diff --git a/scripts/OaksLab.asm b/scripts/OaksLab.asm
index 04f31d2a..e8ef4cbe 100755
--- a/scripts/OaksLab.asm
+++ b/scripts/OaksLab.asm
@@ -1,7 +1,7 @@
OaksLab_Script:
CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2
call nz, OaksLabScript_1d076
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -53,7 +53,7 @@ OaksLabScript0:
OaksLabScript1:
ld a, $6
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld de, OakEntryMovement
call MoveSprite
@@ -65,7 +65,7 @@ OakEntryMovement:
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
OaksLabScript2:
ld a, [wd730]
@@ -91,14 +91,14 @@ OaksLabScript3:
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
xor a
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, $3
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
xor a
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, $4
@@ -106,8 +106,8 @@ OaksLabScript3:
ret
PlayerEntryMovementRLE:
- db D_UP,$8
- db $ff
+ db D_UP, 8
+ db -1 ; end
OaksLabScript4:
ld a, [wSimulatedJoypadStatesIndex]
@@ -116,9 +116,9 @@ OaksLabScript4:
SetEvent EVENT_FOLLOWED_OAK_INTO_LAB
SetEvent EVENT_FOLLOWED_OAK_INTO_LAB_2
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, SPRITE_FACING_UP
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld hl, wFlags_D733
res 1, [hl]
@@ -133,11 +133,11 @@ OaksLabScript5:
ld a, $fc
ld [wJoyIgnore], a
ld a, $d
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
ld a, $e
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
ld a, $2
@@ -145,11 +145,11 @@ OaksLabScript5:
ld a, SPRITE_FACING_UP
ld [wSpriteStateData1 + 1 * $10 + 9], a
ld a, $f
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
ld a, $10
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
@@ -160,21 +160,21 @@ OaksLabScript5:
OaksLabScript6:
ld a, [wYCoord]
- cp $6
+ cp 6
ret nz
ld a, $3
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
xor a ; SPRITE_FACING_DOWN
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
xor a
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
call UpdateSprites
ld a, $a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
@@ -200,7 +200,7 @@ OaksLabScript7:
OaksLabScript8:
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
ld de, .SonyPushesPlayerAwayFromEeveeBall
call MoveSprite
ld a, $9
@@ -222,9 +222,9 @@ OaksLabScript9:
ld [wMissableObjectIndex], a
predef HideObject
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, SPRITE_FACING_UP
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, 1
ld [wRivalStarter], a
@@ -234,7 +234,7 @@ OaksLabScript9:
ld a, $FF ^ (A_BUTTON | B_BUTTON)
ld [wJoyIgnore], a
ld a, $11
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $a
@@ -243,7 +243,7 @@ OaksLabScript9:
.asm_1c564
ld a, [wYCoord]
- cp $4
+ cp 4
ret nz
ld a, [wNPCNumScriptedSteps]
cp 1
@@ -260,7 +260,7 @@ OaksLabScript9:
OaksLabScript10:
ld a, [wYCoord]
- cp $4
+ cp 4
jr z, .asm_1c599
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
@@ -292,7 +292,7 @@ OaksLabScript11:
and a
ret nz
ld a, $12
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
@@ -303,34 +303,34 @@ OaksLabScript11:
OaksLabScript12:
ld a, [wYCoord]
- cp $6
+ cp 6
ret nz
ld a, PLAYER_DIR_UP
ld [wPlayerMovingDirection], a
ld a, $1
- ld [hSpriteIndexOrTextID], a
- xor a
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteIndex], a
+ xor a ; SPRITE_FACING_DOWN
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld c, BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL
call PlayMusic
ld a, $b
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $1
- ld [hNPCPlayerRelativePosPerspective], a
+ ldh [hNPCPlayerRelativePosPerspective], a
ld a, $1
swap a
- ld [hNPCPlayerYDistance], a
+ ldh [hNPCPlayerYDistance], a
predef CalcPositionOfPlayerRelativeToNPC
- ld a, [hNPCPlayerYDistance]
+ ldh a, [hNPCPlayerYDistance]
dec a
- ld [hNPCPlayerYDistance], a
+ ldh [hNPCPlayerYDistance], a
predef FindPathToPlayer
ld de, wNPCMovementDirections2
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndex], a
call MoveSprite
ld a, $d
ld [wOaksLabCurScript], a
@@ -343,7 +343,7 @@ OaksLabScript13:
ld a, $1
ld [wSpriteIndex], a
call GetSpritePosition1
- ld a, OPP_SONY1
+ ld a, OPP_RIVAL1
ld [wCurOpponent], a
ld a, $1
ld [wTrainerNo], a
@@ -400,15 +400,15 @@ OaksLabScript15:
ld c, 20
call DelayFrames
ld a, $c
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndex], a
ld de, .OaksLabMovement_RivalWalksOut1
call MoveSprite
ld a, [wXCoord]
- cp $4
+ cp 4
jr nz, .asm_1c6bb
ld a, NPC_MOVEMENT_RIGHT
jr .asm_1c6bd
@@ -422,14 +422,14 @@ OaksLabScript15:
ret
.OaksLabMovement_RivalWalksOut1
- db $e0
- db $00
+ db NPC_CHANGE_FACING
+ db NPC_MOVEMENT_DOWN
db $04
db $04
db $04
db $04
db $04
- db $ff
+ db -1 ; end
OaksLabScript16:
ld a, [wd730]
@@ -450,7 +450,7 @@ OaksLabScript16:
cp $5
jr nz, .turnPlayerDown
ld a, [wXCoord]
- cp $4
+ cp 4
jr nz, .turnPlayerLeft
ld a, SPRITE_FACING_RIGHT
jr .done
@@ -460,7 +460,7 @@ OaksLabScript16:
.turnPlayerDown
cp $4
ret nz
- xor a
+ xor a ; ld a, SPRITE_FACING_DOWN
.done
ld [wSpritePlayerStateData1FacingDirection], a
ret
@@ -471,10 +471,10 @@ OaksLabScript17:
ld [wSpritePlayerStateData1FacingDirection], a
ld a, $2
ld [wPikachuSpawnState], a
- callba SchedulePikachuSpawnForAfterText
+ farcall SchedulePikachuSpawnForAfterText
call EnablePikachuOverworldSpriteDrawing
ld a, $1a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $12
ld [wOaksLabCurScript], a
@@ -482,7 +482,7 @@ OaksLabScript17:
OaksLabScript18:
ld a, $1b
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
@@ -492,14 +492,14 @@ OaksLabScript18:
OaksLabScript19:
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
call EnableAutoTextBoxDrawing
call StopAllMusic
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, $13
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- callab Func_f1be0
+ callfar Func_f1be0
call OaksLabScript_1c8b9
ld a, HS_OAKS_LAB_RIVAL
ld [wMissableObjectIndex], a
@@ -513,7 +513,7 @@ OaksLabScript19:
call FillMemory
ld [hl], $ff
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndex], a
ld de, wNPCMovementDirections2
call MoveSprite
ld a, $14
@@ -522,14 +522,14 @@ OaksLabScript19:
OaksLabScript_1c78e:
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndex], a
ld a, SPRITE_FACING_UP
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, $6
- ld [hSpriteIndexOrTextID], a
- xor a
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteIndex], a
+ xor a ; SPRITE_FACING_DOWN
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ret
@@ -543,21 +543,21 @@ OaksLabScript20:
ld [wJoyIgnore], a
call OaksLabScript_1c78e
ld a, $14
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call DelayFrame
call OaksLabScript_1c78e
ld a, $15
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call DelayFrame
call OaksLabScript_1c78e
ld a, $16
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call DelayFrame
ld a, $17
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
ld a, HS_POKEDEX_1
@@ -568,16 +568,16 @@ OaksLabScript20:
predef HideObject
call OaksLabScript_1c78e
ld a, $18
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndex], a
ld a, SPRITE_FACING_RIGHT
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
call Delay3
ld a, $19
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_POKEDEX
ld a, $1
@@ -597,9 +597,9 @@ OaksLabScript20:
call FillMemory
ld [hl], $ff
call StopAllMusic
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
ld de, wNPCMovementDirections2
call MoveSprite
ld a, $15
@@ -653,33 +653,33 @@ OaksLabScript_RemoveParcel:
OaksLabScript_1c8b9:
ld a, $7c
- ld [$ffeb], a
- ld a, $8
- ld [$ffee], a
+ ldh [hSpriteScreenYCoord], a
+ ld a, 8
+ ldh [hSpriteMapXCoord], a
ld a, [wYCoord]
cp 3
jr nz, .asm_1c8d3
ld a, $4
ld [wNPCMovementDirections2Index], a
ld a, $30
- ld b, $b
+ ld b, 11
jr .asm_1c8f6
.asm_1c8d3
- cp $1
+ cp 1
jr nz, .asm_1c8e2
ld a, $2
ld [wNPCMovementDirections2Index], a
ld a, $30
- ld b, $9
+ ld b, 9
jr .asm_1c8f6
.asm_1c8e2
ld a, $3
ld [wNPCMovementDirections2Index], a
- ld b, $a
+ ld b, 10
ld a, [wXCoord]
- cp $4
+ cp 4
jr nz, .asm_1c8f4
ld a, $40
jr .asm_1c8f6
@@ -687,9 +687,9 @@ OaksLabScript_1c8b9:
.asm_1c8f4
ld a, $20
.asm_1c8f6
- ld [$ffec], a
+ ldh [hSpriteScreenXCoord], a
ld a, b
- ld [$ffed], a
+ ldh [hSpriteMapYCoord], a
ld a, $1
ld [wSpriteIndex], a
call SetSpritePosition1
@@ -744,7 +744,7 @@ OaksLab_TextPointers2:
dw OaksLabText9
OaksLabText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB_2
jr nz, .beforeChooseMon
ld hl, OaksLabGaryText1
@@ -763,19 +763,19 @@ OaksLabText1:
jp TextScriptEnd
OaksLabGaryText1:
- TX_FAR _OaksLabGaryText1
- db "@"
+ text_far _OaksLabGaryText1
+ text_end
OaksLabText40:
- TX_FAR _OaksLabText40
- db "@"
+ text_far _OaksLabText40
+ text_end
OaksLabText41:
- TX_FAR _OaksLabText41
- db "@"
+ text_far _OaksLabText41
+ text_end
OaksLabText2:
- TX_ASM
+ text_asm
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
CheckEvent EVENT_OAK_ASKED_TO_CHOOSE_MON
@@ -787,8 +787,8 @@ OaksLabText2:
jp TextScriptEnd
OaksLabText39:
- TX_FAR _OaksLabText39
- db "@"
+ text_far _OaksLabText39
+ text_end
OaksLabScript_1c9ac:
ld a, $1
@@ -801,7 +801,7 @@ OaksLabScript_1c9ac:
jp TextScriptEnd
OaksLabText3:
- TX_ASM
+ text_asm
CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS
jr nz, .asm_1c9d9
ld hl, wPokedexOwned
@@ -883,108 +883,108 @@ OaksLabText3:
jp TextScriptEnd
OaksLabText_1ca72:
- TX_FAR _OaksLabPikachuText
- db "@"
+ text_far _OaksLabPikachuText
+ text_end
OaksLabText_1ca77:
- TX_FAR _OaksLabText_1d2f5
- db "@"
+ text_far _OaksLabText_1d2f5
+ text_end
OaksLabText_1ca7c:
- TX_FAR _OaksLabText_1d2fa
- db "@"
+ text_far _OaksLabText_1d2fa
+ text_end
OaksLabDeliverParcelText:
- TX_FAR _OaksLabDeliverParcelText1
- TX_SFX_KEY_ITEM
- TX_FAR _OaksLabDeliverParcelText2
- db "@"
+ text_far _OaksLabDeliverParcelText1
+ sound_get_key_item
+ text_far _OaksLabDeliverParcelText2
+ text_end
OaksLabAroundWorldText:
- TX_FAR _OaksLabAroundWorldText
- db "@"
+ text_far _OaksLabAroundWorldText
+ text_end
OaksLabGivePokeballsText:
- TX_FAR _OaksLabGivePokeballsText1
- TX_SFX_KEY_ITEM
- TX_FAR _OaksLabGivePokeballsText2
- db "@"
+ text_far _OaksLabGivePokeballsText1
+ sound_get_key_item
+ text_far _OaksLabGivePokeballsText2
+ text_end
OaksLabPleaseVisitText:
- TX_FAR _OaksLabPleaseVisitText
- db "@"
+ text_far _OaksLabPleaseVisitText
+ text_end
OaksLabText_1ca9f:
- TX_FAR _OaksLabText_1d31d
- db "@"
+ text_far _OaksLabText_1d31d
+ text_end
OaksLabText4:
OaksLabText5:
- TX_ASM
+ text_asm
ld hl, OaksLabText_1caae
call PrintText
jp TextScriptEnd
OaksLabText_1caae:
- TX_FAR _OaksLabText_1d32c
- db "@"
+ text_far _OaksLabText_1d32c
+ text_end
OaksLabText6:
- TX_FAR _OaksLabText8
- db "@"
+ text_far _OaksLabText8
+ text_end
OaksLabText7:
- TX_ASM
+ text_asm
ld hl, OaksLabText_1cac2
call PrintText
jp TextScriptEnd
OaksLabText_1cac2:
- TX_FAR _OaksLabText_1d340
- db "@"
+ text_far _OaksLabText_1d340
+ text_end
OaksLabText13:
- TX_ASM
+ text_asm
ld hl, OaksLabRivalWaitingText
call PrintText
jp TextScriptEnd
OaksLabRivalWaitingText:
- TX_FAR _OaksLabRivalWaitingText
- db "@"
+ text_far _OaksLabRivalWaitingText
+ text_end
OaksLabText14:
- TX_ASM
+ text_asm
ld hl, OaksLabChooseMonText
call PrintText
jp TextScriptEnd
OaksLabChooseMonText:
- TX_FAR _OaksLabChooseMonText
- db "@"
+ text_far _OaksLabChooseMonText
+ text_end
OaksLabText15:
- TX_ASM
+ text_asm
ld hl, OaksLabRivalInterjectionText
call PrintText
jp TextScriptEnd
OaksLabRivalInterjectionText:
- TX_FAR _OaksLabRivalInterjectionText
- db "@"
+ text_far _OaksLabRivalInterjectionText
+ text_end
OaksLabText16:
- TX_ASM
+ text_asm
ld hl, OaksLabBePatientText
call PrintText
jp TextScriptEnd
OaksLabBePatientText:
- TX_FAR _OaksLabBePatientText
- db "@"
+ text_far _OaksLabBePatientText
+ text_end
OaksLabText17:
- TX_ASM
+ text_asm
ld hl, OaksLabRivalTakesText1
call PrintText
ld hl, OaksLabRivalTakesText2
@@ -998,28 +998,28 @@ OaksLabText17:
jp TextScriptEnd
OaksLabRivalTakesText1:
- TX_FAR _OaksLabRivalTakesText1
- db "@"
+ text_far _OaksLabRivalTakesText1
+ text_end
OaksLabRivalTakesText2:
- TX_FAR _OaksLabRivalTakesText2
- TX_SFX_KEY_ITEM
- db "@"
+ text_far _OaksLabRivalTakesText2
+ sound_get_key_item
+ text_end
OaksLabRivalTakesText3:
- TX_FAR _OaksLabRivalTakesText3
- db "@"
+ text_far _OaksLabRivalTakesText3
+ text_end
OaksLabRivalTakesText4:
- TX_FAR _OaksLabRivalTakesText4
- db "@"
+ text_far _OaksLabRivalTakesText4
+ text_end
OaksLabRivalTakesText5:
- TX_FAR _OaksLabRivalTakesText5
- db "@"
+ text_far _OaksLabRivalTakesText5
+ text_end
OaksLabText18:
- TX_ASM
+ text_asm
ld a, PIKACHU
ld [wPlayerStarter], a
ld [wd11e], a
@@ -1047,110 +1047,110 @@ OaksLabText18:
jp TextScriptEnd
OaksLabOakGivesText:
- TX_FAR _OaksLabOakGivesText
- db "@"
+ text_far _OaksLabOakGivesText
+ text_end
OaksLabRecievedText:
- TX_FAR _OaksLabReceivedText
- TX_SFX_KEY_ITEM
- db "@"
+ text_far _OaksLabReceivedText
+ sound_get_key_item
+ text_end
OaksLabText10:
- TX_ASM
+ text_asm
ld hl, OaksLabLeavingText
call PrintText
jp TextScriptEnd
OaksLabLeavingText:
- TX_FAR _OaksLabLeavingText
- db "@"
+ text_far _OaksLabLeavingText
+ text_end
OaksLabText11:
- TX_ASM
+ text_asm
ld hl, OaksLabRivalChallengeText
call PrintText
jp TextScriptEnd
OaksLabRivalChallengeText:
- TX_FAR _OaksLabRivalChallengeText
- db "@"
+ text_far _OaksLabRivalChallengeText
+ text_end
OaksLabRivalDefeatedText:
- TX_FAR _OaksLabText_1d3be
- db "@"
+ text_far _OaksLabText_1d3be
+ text_end
OaksLabRivalBeatYouText:
- TX_FAR _OaksLabText_1d3c3
- db "@"
+ text_far _OaksLabText_1d3c3
+ text_end
OaksLabText12:
- TX_ASM
+ text_asm
ld hl, OaksLabRivalToughenUpText
call PrintText
jp TextScriptEnd
OaksLabRivalToughenUpText:
- TX_FAR _OaksLabRivalToughenUpText
- db "@"
+ text_far _OaksLabRivalToughenUpText
+ text_end
OaksLabText26:
- TX_ASM
+ text_asm
ldpikacry e, PikachuCry2
- callab PlayPikachuSoundClip
+ callfar PlayPikachuSoundClip
ld hl, OaksLabPikachuDislikesPokeballsText1
call PrintText
jp TextScriptEnd
OaksLabPikachuDislikesPokeballsText1:
- TX_FAR _OaksLabPikachuDislikesPokeballsText1
- db "@"
+ text_far _OaksLabPikachuDislikesPokeballsText1
+ text_end
OaksLabText27:
- TX_ASM
+ text_asm
ld hl, OaksLabPikachuDislikesPokeballsText2
call PrintText
jp TextScriptEnd
OaksLabPikachuDislikesPokeballsText2:
- TX_FAR _OaksLabPikachuDislikesPokeballsText2
- db "@"
+ text_far _OaksLabPikachuDislikesPokeballsText2
+ text_end
OaksLabText19:
- TX_FAR _OaksLabText21
- db "@"
+ text_far _OaksLabText21
+ text_end
OaksLabText20:
- TX_FAR _OaksLabText22
- db "@"
+ text_far _OaksLabText22
+ text_end
OaksLabText21:
- TX_FAR _OaksLabText23
- db "@"
+ text_far _OaksLabText23
+ text_end
OaksLabText22:
- TX_FAR _OaksLabText24
- db "@"
+ text_far _OaksLabText24
+ text_end
OaksLabText23:
- TX_FAR _OaksLabText25
- TX_SFX_KEY_ITEM
- db "@"
+ text_far _OaksLabText25
+ sound_get_key_item
+ text_end
OaksLabText24:
- TX_FAR _OaksLabText26
- db "@"
+ text_far _OaksLabText26
+ text_end
OaksLabText25:
- TX_FAR _OaksLabText27
- db "@"
+ text_far _OaksLabText27
+ text_end
OaksLabText8:
OaksLabText9:
- TX_ASM
+ text_asm
ld hl, OaksLabText_1c31d
call PrintText
jp TextScriptEnd
OaksLabText_1c31d:
- TX_FAR _OaksLabText_1d405
- db "@"
+ text_far _OaksLabText_1d405
+ text_end
diff --git a/scripts/OaksLab2.asm b/scripts/OaksLab2.asm
index 5e4e98a4..b0519827 100755
--- a/scripts/OaksLab2.asm
+++ b/scripts/OaksLab2.asm
@@ -1,4 +1,4 @@
-Func_f1be0:
+Func_f1be0::
ld a, [wYCoord]
cp 3
jr z, .asm_f1bf0
diff --git a/scripts/PalletTown.asm b/scripts/PalletTown.asm
index fbdee4bc..28f93411 100755
--- a/scripts/PalletTown.asm
+++ b/scripts/PalletTown.asm
@@ -33,7 +33,7 @@ PalletTownScript0:
SetEventReuseHL EVENT_PLAYER_AT_RIGHT_EXIT_TO_PALLET_TOWN
.asm_18e40
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $ff
ld [wJoyIgnore], a
ld a, PLAYER_DIR_UP
@@ -41,7 +41,7 @@ PalletTownScript0:
call StopAllMusic
ld a, BANK(Music_MeetProfOak)
ld c, a
- ld a, MUSIC_MEET_PROF_OAK
+ ld a, MUSIC_MEET_PROF_OAK ; "oak appears" music
call PlayMusic
SetEvent EVENT_OAK_APPEARED_IN_PALLET
@@ -56,7 +56,7 @@ PalletTownScript1:
xor a
ld [wcf0d], a
ld a, 1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $FF
ld [wJoyIgnore], a
@@ -83,17 +83,17 @@ PalletTownScript2:
ld a, 0
ld [wYCoord], a
ld a, 1
- ld [hNPCPlayerRelativePosPerspective], a
+ ldh [hNPCPlayerRelativePosPerspective], a
ld a, 1
swap a
- ld [hNPCSpriteOffset], a
+ ldh [hNPCSpriteOffset], a
predef CalcPositionOfPlayerRelativeToNPC
ld hl, hNPCPlayerYDistance
dec [hl]
- predef FindPathToPlayer ; load Oak’s movement into wNPCMovementDirections2
+ predef FindPathToPlayer ; load Oak's movement into wNPCMovementDirections2
ld de, wNPCMovementDirections2
ld a, 1 ; oak
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call MoveSprite
; trigger the next script
@@ -114,7 +114,7 @@ PalletTownScript3:
ld a, SPRITE_FACING_UP
ld [wSpriteStateData1 + 1 * $10 + 9], a
ld a, 1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
; oak faces the horizontally adjacent patch of grass to face pikachu
ld a, $FF
@@ -155,14 +155,14 @@ PalletTownScript5:
ld a, $2
ld [wcf0d], a
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $2
ld [wSpriteStateData1 + 1 * $10 + 1], a
ld a, SPRITE_FACING_UP
ld [wSpriteStateData1 + 1 * $10 + 9], a
ld a, $8
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $ff
ld [wJoyIgnore], a
@@ -181,7 +181,7 @@ PalletTownScript6:
ld [wNPCMovementScriptFunctionNum], a
ld a, $1
ld [wNPCMovementScriptPointerTableNum], a
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
ld [wNPCMovementScriptBank], a
; trigger the next script
@@ -231,7 +231,7 @@ PalletTown_TextPointers:
dw PalletTownText8
PalletTownText1:
- TX_ASM
+ text_asm
ld a, [wcf0d]
and a
jr nz, .next
@@ -252,8 +252,8 @@ PalletTownText1:
jp TextScriptEnd
OakAppearsText:
- TX_FAR _OakAppearsText
- TX_ASM
+ text_far _OakAppearsText
+ text_asm
ld c, 10
call DelayFrames
ld a, PLAYER_DIR_DOWN
@@ -266,37 +266,37 @@ OakAppearsText:
jp TextScriptEnd
OakWalksUpText:
- TX_FAR _OakWalksUpText
- db "@"
+ text_far _OakWalksUpText
+ text_end
PalletTownText_19002:
- TX_FAR _OakWhewText
- db "@"
+ text_far _OakWhewText
+ text_end
PalletTownText8: ; girl
- TX_FAR _OakGrassText
- db "@"
+ text_far _OakGrassText
+ text_end
PalletTownText2: ; fat man
- TX_FAR _PalletTownText2
- db "@"
+ text_far _PalletTownText2
+ text_end
PalletTownText3: ; sign by lab
- TX_FAR _PalletTownText3
- db "@"
+ text_far _PalletTownText3
+ text_end
PalletTownText4: ; sign by fence
- TX_FAR _PalletTownText4
- db "@"
+ text_far _PalletTownText4
+ text_end
-PalletTownText5: ; sign by Red’s house
- TX_FAR _PalletTownText5
- db "@"
+PalletTownText5: ; sign by Red's house
+ text_far _PalletTownText5
+ text_end
-PalletTownText6: ; sign by Blue’s house
- TX_FAR _PalletTownText6
- db "@"
+PalletTownText6: ; sign by Blue's house
+ text_far _PalletTownText6
+ text_end
PalletTownText7:
- TX_FAR _PalletTownText7
- db "@"
+ text_far _PalletTownText7
+ text_end
diff --git a/scripts/PewterCity.asm b/scripts/PewterCity.asm
index 63d0fe71..26827bef 100755
--- a/scripts/PewterCity.asm
+++ b/scripts/PewterCity.asm
@@ -32,47 +32,47 @@ PewterCityScript_1925e:
ld a, $fc
ld [wJoyIgnore], a
ld a, $5
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
CoordsData_19277:
- db $11,$23
- db $11,$24
- db $12,$25
- db $13,$25
- db $ff
+ dbmapcoord 35, 17
+ dbmapcoord 36, 17
+ dbmapcoord 37, 18
+ dbmapcoord 37, 19
+ db -1 ; end
PewterCityScript1:
ld a, [wNPCMovementScriptPointerTableNum]
and a
ret nz
ld a, $3
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, SPRITE_FACING_UP
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, SPRITE_FACING_UP
- ld [hSpriteImageIndex], a
+ ldh [hSpriteImageIndex], a
call SpriteFunc_34a1
call PlayDefaultMusic
ld hl, wFlags_0xcd60
set 4, [hl]
ld a, $d
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $3c
- ld [$ffeb], a
+ ldh [hSpriteScreenYCoord], a
ld a, $30
- ld [$ffec], a
- ld a, $c
- ld [$ffed], a
- ld a, $11
- ld [$ffee], a
+ ldh [hSpriteScreenXCoord], a
+ ld a, 12
+ ldh [hSpriteMapYCoord], a
+ ld a, 17
+ ldh [hSpriteMapXCoord], a
ld a, $3
ld [wSpriteIndex], a
call SetSpritePosition1
ld a, $3
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld de, MovementData_PewterMuseumGuyExit
call MoveSprite
ld a, $2
@@ -84,7 +84,7 @@ MovementData_PewterMuseumGuyExit:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
PewterCityScript2:
ld a, [wd730]
@@ -115,29 +115,29 @@ PewterCityScript4:
and a
ret nz
ld a, $5
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, SPRITE_FACING_LEFT
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SpriteFunc_34a1
call PlayDefaultMusic
ld hl, wFlags_0xcd60
set 4, [hl]
ld a, $e
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $3c
- ld [$ffeb], a
+ ldh [hSpriteScreenYCoord], a
ld a, $40
- ld [$ffec], a
- ld a, $16
- ld [$ffed], a
- ld a, $10
- ld [$ffee], a
+ ldh [hSpriteScreenXCoord], a
+ ld a, 22
+ ldh [hSpriteMapYCoord], a
+ ld a, 16
+ ldh [hSpriteMapXCoord], a
ld a, $5
ld [wSpriteIndex], a
call SetSpritePosition1
ld a, $5
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld de, MovementData_PewterGymGuyExit
call MoveSprite
ld a, $5
@@ -150,7 +150,7 @@ MovementData_PewterGymGuyExit:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
PewterCityScript5:
ld a, [wd730]
@@ -193,15 +193,15 @@ PewterCity_TextPointers:
dw PewterCityText14
PewterCityText1:
- TX_FAR _PewterCityText1
- db "@"
+ text_far _PewterCityText1
+ text_end
PewterCityText2:
- TX_FAR _PewterCityText2
- db "@"
+ text_far _PewterCityText2
+ text_end
PewterCityText3:
- TX_ASM
+ text_asm
ld hl, PewterCityText_193f1
call PrintText
call YesNoChoice
@@ -215,12 +215,12 @@ PewterCityText3:
ld hl, PewterCityText_193fb
call PrintText
xor a
- ld [hJoyPressed], a
- ld [hJoyHeld], a
+ ldh [hJoyPressed], a
+ ldh [hJoyHeld], a
ld [wNPCMovementScriptFunctionNum], a
ld a, $2
ld [wNPCMovementScriptPointerTableNum], a
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
ld [wNPCMovementScriptBank], a
ld a, $3
ld [wSpriteIndex], a
@@ -231,23 +231,23 @@ PewterCityText3:
jp TextScriptEnd
PewterCityText_193f1:
- TX_FAR _PewterCityText_193f1
- db "@"
+ text_far _PewterCityText_193f1
+ text_end
PewterCityText_193f6:
- TX_FAR _PewterCityText_193f6
- db "@"
+ text_far _PewterCityText_193f6
+ text_end
PewterCityText_193fb:
- TX_FAR _PewterCityText_193fb
- db "@"
+ text_far _PewterCityText_193fb
+ text_end
PewterCityText13:
- TX_FAR _PewterCityText13
- db "@"
+ text_far _PewterCityText13
+ text_end
PewterCityText4:
- TX_ASM
+ text_asm
ld hl, PewterCityText_19427
call PrintText
call YesNoChoice
@@ -264,27 +264,27 @@ PewterCityText4:
jp TextScriptEnd
PewterCityText_19427:
- TX_FAR _PewterCityText_19427
- db "@"
+ text_far _PewterCityText_19427
+ text_end
PewterCityText_1942c:
- TX_FAR _PewterCityText_1942c
- db "@"
+ text_far _PewterCityText_1942c
+ text_end
PewterCityText_19431:
- TX_FAR _PewterCityText_19431
- db "@"
+ text_far _PewterCityText_19431
+ text_end
PewterCityText5:
- TX_ASM
+ text_asm
ld hl, PewterCityText_1945d
call PrintText
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld [wNPCMovementScriptFunctionNum], a
ld a, $3
ld [wNPCMovementScriptPointerTableNum], a
- ld a, [H_LOADEDROMBANK]
+ ldh a, [hLoadedROMBank]
ld [wNPCMovementScriptBank], a
ld a, $5
ld [wSpriteIndex], a
@@ -294,29 +294,29 @@ PewterCityText5:
jp TextScriptEnd
PewterCityText_1945d:
- TX_FAR _PewterCityText_1945d
- db "@"
+ text_far _PewterCityText_1945d
+ text_end
PewterCityText14:
- TX_FAR _PewterCityText14
- db "@"
+ text_far _PewterCityText14
+ text_end
PewterCityText6:
- TX_FAR _PewterCityText6
- db "@"
+ text_far _PewterCityText6
+ text_end
PewterCityText7:
- TX_FAR _PewterCityText7
- db "@"
+ text_far _PewterCityText7
+ text_end
PewterCityText10:
- TX_FAR _PewterCityText10
- db "@"
+ text_far _PewterCityText10
+ text_end
PewterCityText11:
- TX_FAR _PewterCityText11
- db "@"
+ text_far _PewterCityText11
+ text_end
PewterCityText12:
- TX_FAR _PewterCityText12
- db "@"
+ text_far _PewterCityText12
+ text_end
diff --git a/scripts/PewterGym.asm b/scripts/PewterGym.asm
index 4ddec77e..76a58b71 100755
--- a/scripts/PewterGym.asm
+++ b/scripts/PewterGym.asm
@@ -2,7 +2,7 @@ PewterGym_Script:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
- call nz, PewterGymScript_5c3a4
+ call nz, .LoadNames
call EnableAutoTextBoxDrawing
ld hl, PewterGymTrainerHeader0
ld de, PewterGym_ScriptPointers
@@ -11,16 +11,16 @@ PewterGym_Script:
ld [wPewterGymCurScript], a
ret
-PewterGymScript_5c3a4:
- ld hl, Gym1CityName
- ld de, Gym1LeaderName
+.LoadNames:
+ ld hl, .CityName
+ ld de, .LeaderName
call LoadGymLeaderAndCityName
ret
-Gym1CityName:
+.CityName:
db "PEWTER CITY@"
-Gym1LeaderName:
+.LeaderName:
db "BROCK@"
PewterGymScript_5c3bf:
@@ -44,26 +44,26 @@ PewterGymScript3:
ld [wJoyIgnore], a
PewterGymScript_5c3df:
ld a, $4
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_BROCK
- lb bc, TM_34, 1
+ lb bc, TM_BIDE, 1
call GiveItem
jr nc, .BagFull
ld a, $5
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM34
jr .gymVictory
.BagFull
ld a, $6
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
ld hl, wObtainedBadges
- set 0, [hl]
+ set BIT_BOULDERBADGE, [hl]
ld hl, wBeatGymFlags
- set 0, [hl]
+ set BIT_BOULDERBADGE, [hl]
ld a, HS_GYM_GUY
ld [wMissableObjectIndex], a
@@ -88,18 +88,11 @@ PewterGym_TextPointers:
dw PewterGymText6
PewterGymTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_PEWTER_GYM_TRAINER_0
- db ($5 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_PEWTER_GYM_TRAINER_0
- dw PewterGymBattleText1 ; TextBeforeBattle
- dw PewterGymAfterBattleText1 ; TextAfterBattle
- dw PewterGymEndBattleText1 ; TextEndBattle
- dw PewterGymEndBattleText1 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_PEWTER_GYM_TRAINER_0, 5, PewterGymBattleText1, PewterGymEndBattleText1, PewterGymAfterBattleText1
+ db -1 ; end
PewterGymText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_BROCK
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM34
@@ -120,14 +113,14 @@ PewterGymText1:
ld hl, PewterGymText_5c4bc
ld de, PewterGymText_5c4bc
call SaveEndBattleTextPointers
- ld a, [H_SPRITEINDEX]
+ ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $1
ld [wGymLeaderNo], a
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $3
ld [wPewterGymCurScript], a
ld [wCurMapScript], a
@@ -135,55 +128,55 @@ PewterGymText1:
jp TextScriptEnd
PewterGymText_5c49e:
- TX_FAR _PewterGymText_5c49e
- db "@"
+ text_far _PewterGymText_5c49e
+ text_end
PewterGymText_5c4a3:
- TX_FAR _PewterGymText_5c4a3
- db "@"
+ text_far _PewterGymText_5c4a3
+ text_end
PewterGymText4:
- TX_FAR _TM34PreReceiveText
- db "@"
+ text_far _TM34PreReceiveText
+ text_end
PewterGymText5:
- TX_FAR _ReceivedTM34Text
- TX_SFX_ITEM_1
- TX_FAR _TM34ExplanationText
- db "@"
+ text_far _ReceivedTM34Text
+ sound_get_item_1
+ text_far _TM34ExplanationText
+ text_end
PewterGymText6:
- TX_FAR _TM34NoRoomText
- db "@"
+ text_far _TM34NoRoomText
+ text_end
PewterGymText_5c4bc:
- TX_FAR _PewterGymText_5c4bc
- TX_SFX_ITEM_1
- TX_FAR _PewterGymText_5c4c1
- db "@"
+ text_far _PewterGymText_5c4bc
+ sound_get_item_1
+ text_far _PewterGymText_5c4c1
+ text_end
PewterGymText2:
- TX_ASM
+ text_asm
ld hl, PewterGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
PewterGymBattleText1:
- TX_FAR _PewterGymBattleText1
- db "@"
+ text_far _PewterGymBattleText1
+ text_end
PewterGymEndBattleText1:
- TX_FAR _PewterGymEndBattleText1
- db "@"
+ text_far _PewterGymEndBattleText1
+ text_end
PewterGymAfterBattleText1:
- TX_FAR _PewterGymAfterBattleText1
- db "@"
+ text_far _PewterGymAfterBattleText1
+ text_end
PewterGymText3:
- TX_ASM
+ text_asm
ld a, [wBeatGymFlags]
- bit 0, a
+ bit BIT_BOULDERBADGE, a
jr nz, .asm_5c50c
ld hl, PewterGymText_5c515
call PrintText
@@ -216,26 +209,26 @@ PewterGymText3:
jp TextScriptEnd
PewterGymText_5c515:
- TX_FAR _PewterGymText_5c515
- db "@"
+ text_far _PewterGymText_5c515
+ text_end
PewterGymText_5c51a:
- TX_FAR _PewterGymText_5c51a
- db "@"
+ text_far _PewterGymText_5c51a
+ text_end
PewterGymText_5c51f:
- TX_FAR _PewterGymText_5c51f
- db "@"
+ text_far _PewterGymText_5c51f
+ text_end
PewterGymText_5c524:
- TX_FAR _PewterGymText_5c524
- db "@"
+ text_far _PewterGymText_5c524
+ text_end
PewterGymText_5c529:
- TX_FAR _PewterGymText_5c529
- db "@"
+ text_far _PewterGymText_5c529
+ text_end
PewterGymText_5c41c:
- TX_FAR _PewterGymGuyText
- db "@"
+ text_far _PewterGymGuyText
+ text_end
diff --git a/scripts/PewterMart.asm b/scripts/PewterMart.asm
index 5b3e7617..a0e9e63e 100755
--- a/scripts/PewterMart.asm
+++ b/scripts/PewterMart.asm
@@ -1,6 +1,6 @@
PewterMart_Script:
call EnableAutoTextBoxDrawing
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
ret
@@ -10,21 +10,21 @@ PewterMart_TextPointers:
dw PewterMartText3
PewterMartText2:
- TX_ASM
+ text_asm
ld hl, .Text
call PrintText
jp TextScriptEnd
.Text
- TX_FAR _PewterMartText2
- db "@"
+ text_far _PewterMartText2
+ text_end
PewterMartText3:
- TX_ASM
+ text_asm
ld hl, .Text
call PrintText
jp TextScriptEnd
.Text
- TX_FAR _PewterMartText3
- db "@"
+ text_far _PewterMartText3
+ text_end
diff --git a/scripts/PewterNidoranHouse.asm b/scripts/PewterNidoranHouse.asm
index 2f3f4145..77fb12c0 100755
--- a/scripts/PewterNidoranHouse.asm
+++ b/scripts/PewterNidoranHouse.asm
@@ -8,17 +8,17 @@ PewterNidoranHouse_TextPointers:
dw PewterHouse1Text3
PewterHouse1Text1:
- TX_FAR _PewterHouse1Text1
- TX_ASM
+ text_far _PewterHouse1Text1
+ text_asm
ld a, NIDORAN_M
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
PewterHouse1Text2:
- TX_FAR _PewterHouse1Text2
- db "@"
+ text_far _PewterHouse1Text2
+ text_end
PewterHouse1Text3:
- TX_FAR _PewterHouse1Text3
- db "@"
+ text_far _PewterHouse1Text3
+ text_end
diff --git a/scripts/PewterPokecenter.asm b/scripts/PewterPokecenter.asm
index add001bc..247ecb03 100755
--- a/scripts/PewterPokecenter.asm
+++ b/scripts/PewterPokecenter.asm
@@ -14,26 +14,26 @@ PewterPokecenter_TextPointers:
dw PewterPokecenterText6
PewterHealNurseText:
- TX_POKECENTER_NURSE
+ script_pokecenter_nurse
PewterPokecenterText2:
- TX_FAR _PewterPokecenterText2
- db "@"
+ text_far _PewterPokecenterText2
+ text_end
PewterJigglypuffText:
- TX_ASM
- callba PewterJigglypuff
+ text_asm
+ farcall PewterJigglypuff
jp TextScriptEnd
PewterTradeNurseText:
- TX_CABLE_CLUB_RECEPTIONIST
+ script_cable_club_receptionist
PewterPokecenterText5:
- TX_ASM
- callba Func_f1d98
+ text_asm
+ farcall Func_f1d98
jp TextScriptEnd
PewterPokecenterText6:
- TX_ASM
- callab PokecenterChanseyText
+ text_asm
+ callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/PewterPokecenter2.asm b/scripts/PewterPokecenter2.asm
index 3d4de3f7..79d22b2f 100755
--- a/scripts/PewterPokecenter2.asm
+++ b/scripts/PewterPokecenter2.asm
@@ -1,20 +1,22 @@
-Func_f1d98:
+Func_f1d98::
ld hl, PewterPokecenterText_f1d9f
call PrintText
ret
PewterPokecenterText_f1d9f:
- TX_FAR _PewterPokecenterText3
- db "@"
+ text_far _PewterPokecenterText3
+ text_end
-PewterJigglypuff:
- ld a, $1
+PewterJigglypuff::
+ ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, .Text
+ ld hl, .JigglypuffText
call PrintText
+
call StopAllMusic
ld c, 32
call DelayFrames
+
ld hl, JigglypuffFacingDirections
ld de, wJigglypuffFacingDirections
ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
@@ -27,15 +29,16 @@ PewterJigglypuff:
inc hl
jr nz, .findMatchingFacingDirectionLoop
dec hl
+
push hl
ld c, BANK(Music_JigglypuffSong)
ld a, MUSIC_JIGGLYPUFF_SONG
call PlayMusic
pop hl
-.loop
+
+.spinMovementLoop
ld a, [hl]
ld [wSprite03StateData1ImageIndex], a
-
; rotate the array
push hl
ld hl, wJigglypuffFacingDirections
@@ -45,15 +48,13 @@ PewterJigglypuff:
ld a, [wJigglypuffFacingDirections - 1]
ld [wJigglypuffFacingDirections + 3], a
pop hl
-
ld c, 24
call DelayFrames
-
ld a, [wChannelSoundIDs]
ld b, a
ld a, [wChannelSoundIDs + Ch2]
or b
- jr nz, .loop
+ jr nz, .spinMovementLoop
ld c, 48
call DelayFrames
@@ -61,14 +62,14 @@ PewterJigglypuff:
ld a, [wd472]
bit 7, a
ret z
- callab CheckPikachuFaintedOrStatused
+ callfar CheckPikachuFaintedOrStatused
ret c
call DisablePikachuFollowingPlayer
ret
-.Text
- TX_FAR _PewterJigglypuffText
- db "@"
+.JigglypuffText:
+ text_far _PewterJigglypuffText
+ text_end
JigglypuffFacingDirections:
db $40 | SPRITE_FACING_DOWN
diff --git a/scripts/PewterSpeechHouse.asm b/scripts/PewterSpeechHouse.asm
index 943e1759..5d3d9249 100755
--- a/scripts/PewterSpeechHouse.asm
+++ b/scripts/PewterSpeechHouse.asm
@@ -6,9 +6,9 @@ PewterSpeechHouse_TextPointers:
dw PewterHouse2Text2
PewterHouse2Text1:
- TX_FAR _PewterHouse2Text1
- db "@"
+ text_far _PewterHouse2Text1
+ text_end
PewterHouse2Text2:
- TX_FAR _PewterHouse2Text2
- db "@"
+ text_far _PewterHouse2Text2
+ text_end
diff --git a/scripts/PokemonFanClub.asm b/scripts/PokemonFanClub.asm
index 3434f871..c7990f19 100755
--- a/scripts/PokemonFanClub.asm
+++ b/scripts/PokemonFanClub.asm
@@ -27,7 +27,7 @@ FanClubScript2:
FanClubScript_59a39:
call Random
- ld a, [hRandomAdd]
+ ldh a, [hRandomAdd]
cp 25
call c, FanClubScript_59a44
ret
@@ -36,7 +36,7 @@ FanClubScript_59a44:
ld a, [wd472]
bit 7, a
ret z
- callab CheckPikachuFaintedOrStatused
+ callfar CheckPikachuFaintedOrStatused
ret c
ld a, $1
ld [wFanClubCurScript], a
@@ -55,7 +55,7 @@ FanClubScript_59a44:
ld [wSpriteStateData1 + 3 * $10 + 1], a ; Seel
xor a ; SPRITE_FACING_DOWN
ld [wSpriteStateData1 + 3 * $10 + 9], a
- callab InitializePikachuTextID
+ callfar InitializePikachuTextID
call DisablePikachuFollowingPlayer
ret
@@ -78,7 +78,7 @@ PokemonFanClub_TextPointers:
FanClubText1:
; clefairy fan
- TX_ASM
+ text_asm
CheckEventHL EVENT_152
jr z, .asm_59aaf
ld hl, .yellowtext
@@ -101,20 +101,20 @@ FanClubText1:
jp TextScriptEnd
.normaltext
- TX_FAR PikachuFanText
- db "@"
+ text_far PikachuFanText
+ text_end
.bettertext
- TX_FAR PikachuFanBetterText
- db "@"
+ text_far PikachuFanBetterText
+ text_end
.yellowtext
- TX_FAR PikachuFanPrintText
- db "@"
+ text_far PikachuFanPrintText
+ text_end
FanClubText2:
; seel fan
- TX_ASM
+ text_asm
CheckEventHL EVENT_152
jr z, .asm_59ae7
ld hl, .yellowtext
@@ -135,20 +135,20 @@ FanClubText2:
jp TextScriptEnd
.normaltext
- TX_FAR SeelFanText
- db "@"
+ text_far SeelFanText
+ text_end
.bettertext
- TX_FAR SeelFanBetterText
- db "@"
+ text_far SeelFanBetterText
+ text_end
.yellowtext
- TX_FAR SeelFanPrintText
- db "@"
+ text_far SeelFanPrintText
+ text_end
FanClubText3:
; pikachu
- TX_ASM
+ text_asm
ld hl, .text
call PrintText
ld a, CLEFAIRY
@@ -157,12 +157,12 @@ FanClubText3:
jp TextScriptEnd
.text
- TX_FAR FanClubPikachuText
- db "@"
+ text_far FanClubPikachuText
+ text_end
FanClubText4:
; seel
- TX_ASM
+ text_asm
ld hl, .text
call PrintText
ld a, SEEL
@@ -171,12 +171,12 @@ FanClubText4:
jp TextScriptEnd
.text
- TX_FAR FanClubSeelText
- db "@"
+ text_far FanClubSeelText
+ text_end
FanClubText5:
; chair
- TX_ASM
+ text_asm
CheckEventHL EVENT_152
jr z, .check_bike_voucher
ld hl, Text_59c1f
@@ -190,33 +190,32 @@ FanClubText5:
.check_bike_voucher
CheckEvent EVENT_GOT_BIKE_VOUCHER
- jr nz, .got_bike_voucher_already
- ld hl, Text_59bfc
+ jr nz, .nothingleft
+ ld hl, .meetchairtext
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .declined_story
- ld hl, Text_59c01
+ jr nz, .nothanks
+
+ ; tell the story
+ ld hl, .storytext
call PrintText
lb bc, BIKE_VOUCHER, 1
call GiveItem
- jr nc, .no_room_for_voucher
- ld hl, Text_59c06
+ jr nc, .bag_full
+ ld hl, .receivedvouchertext
call PrintText
SetEvent EVENT_GOT_BIKE_VOUCHER
jp TextScriptEnd
-
-.no_room_for_voucher
- ld hl, Text_59c1a
+.bag_full
+ ld hl, .bagfulltext
jr .gbpals_print_text
-
-.declined_story
- ld hl, Text_59c10
+.nothanks
+ ld hl, .nostorytext
jr .gbpals_print_text
-
-.got_bike_voucher_already
- ld hl, Text_59c15
+.nothingleft
+ ld hl, .finaltext
.gbpals_print_text
push hl
call LoadGBPal
@@ -244,7 +243,7 @@ FanClubText5:
ld [wUpdateSpritesEnabled], a
ld hl, wd730
set 6, [hl]
- callab PrintFanClubPortrait
+ callfar PrintFanClubPortrait
ld hl, wd730
res 6, [hl]
call GBPalWhiteOutWithDelay3
@@ -254,54 +253,54 @@ FanClubText5:
call Delay3
call GBPalNormal
ld hl, Text_59c2e
- ld a, [hOaksAideResult]
+ ldh a, [hOaksAideResult]
and a
jr nz, .gbpals_print_text
ld hl, Text_59c29
jr .gbpals_print_text
-Text_59bfc:
- TX_FAR FanClubMeetChairText
- db "@"
+.meetchairtext
+ text_far FanClubMeetChairText
+ text_end
-Text_59c01:
- TX_FAR FanClubChairStoryText
- db "@"
+.storytext
+ text_far FanClubChairStoryText
+ text_end
-Text_59c06:
- TX_FAR ReceivedBikeVoucherText
- TX_SFX_KEY_ITEM
- TX_FAR ExplainBikeVoucherText
- db "@"
+.receivedvouchertext
+ text_far ReceivedBikeVoucherText
+ sound_get_key_item
+ text_far ExplainBikeVoucherText
+ text_end
-Text_59c10:
- TX_FAR FanClubNoStoryText
- db "@"
+.nostorytext
+ text_far FanClubNoStoryText
+ text_end
-Text_59c15:
- TX_FAR FanClubChairFinalText
- db "@"
+.finaltext
+ text_far FanClubChairFinalText
+ text_end
-Text_59c1a:
- TX_FAR FanClubBagFullText
- db "@"
+.bagfulltext
+ text_far FanClubBagFullText
+ text_end
Text_59c1f:
- TX_FAR FanClubChairPrintText1
- db "@"
+ text_far FanClubChairPrintText1
+ text_end
Text_59c24:
- TX_FAR FanClubChairPrintText2
- db "@"
+ text_far FanClubChairPrintText2
+ text_end
Text_59c29:
- TX_FAR FanClubChairPrintText3
- db "@"
+ text_far FanClubChairPrintText3
+ text_end
Text_59c2e:
- TX_FAR FanClubChairPrintText4
- db "@"
+ text_far FanClubChairPrintText4
+ text_end
FanClubText6:
- TX_FAR _FanClubText6
- db "@"
+ text_far _FanClubText6
+ text_end
diff --git a/scripts/PokemonMansion1F.asm b/scripts/PokemonMansion1F.asm
index 639a4acf..ac86d626 100755
--- a/scripts/PokemonMansion1F.asm
+++ b/scripts/PokemonMansion1F.asm
@@ -45,14 +45,14 @@ Mansion1ReplaceBlock:
predef ReplaceTileBlock
ret
-Mansion1Script_Switches:
+Mansion1Script_Switches::
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ret nz
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $4
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
PokemonMansion1F_ScriptPointers:
@@ -67,36 +67,29 @@ PokemonMansion1F_TextPointers:
dw Mansion1Text4
Mansion1TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_MANSION_1_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MANSION_1_TRAINER_0
- dw Mansion1BattleText2 ; TextBeforeBattle
- dw Mansion1AfterBattleText2 ; TextAfterBattle
- dw Mansion1EndBattleText2 ; TextEndBattle
- dw Mansion1EndBattleText2 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_MANSION_1_TRAINER_0, 3, Mansion1BattleText2, Mansion1EndBattleText2, Mansion1AfterBattleText2
+ db -1 ; end
Mansion1Text1:
- TX_ASM
+ text_asm
ld hl, Mansion1TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Mansion1BattleText2:
- TX_FAR _Mansion1BattleText2
- db "@"
+ text_far _Mansion1BattleText2
+ text_end
Mansion1EndBattleText2:
- TX_FAR _Mansion1EndBattleText2
- db "@"
+ text_far _Mansion1EndBattleText2
+ text_end
Mansion1AfterBattleText2:
- TX_FAR _Mansion1AfterBattleText2
- db "@"
+ text_far _Mansion1AfterBattleText2
+ text_end
Mansion1Text4:
- TX_ASM
+ text_asm
ld hl, MansionSwitchText
call PrintText
call YesNoChoice
@@ -122,13 +115,13 @@ Mansion1Text4:
jp TextScriptEnd
MansionSwitchText:
- TX_FAR _MansionSwitchText
- db "@"
+ text_far _MansionSwitchText
+ text_end
MansionSwitchPressedText:
- TX_FAR _MansionSwitchPressedText
- db "@"
+ text_far _MansionSwitchPressedText
+ text_end
MansionSwitchNotPressedText:
- TX_FAR _MansionSwitchNotPressedText
- db "@"
+ text_far _MansionSwitchNotPressedText
+ text_end
diff --git a/scripts/PokemonMansion2F.asm b/scripts/PokemonMansion2F.asm
index 8d05cdc9..2edd0fb6 100755
--- a/scripts/PokemonMansion2F.asm
+++ b/scripts/PokemonMansion2F.asm
@@ -41,14 +41,14 @@ Mansion2Script_5202f:
ld [wNewTileBlockID], a
predef_jump ReplaceTileBlock
-Mansion2Script_Switches:
+Mansion2Script_Switches::
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ret nz
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $5
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
PokemonMansion2F_ScriptPointers:
@@ -64,45 +64,38 @@ PokemonMansion2F_TextPointers:
dw Mansion2Text5
Mansion2TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_MANSION_2_TRAINER_0
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MANSION_2_TRAINER_0
- dw Mansion2BattleText1 ; TextBeforeBattle
- dw Mansion2AfterBattleText1 ; TextAfterBattle
- dw Mansion2EndBattleText1 ; TextEndBattle
- dw Mansion2EndBattleText1 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_MANSION_2_TRAINER_0, 0, Mansion2BattleText1, Mansion2EndBattleText1, Mansion2AfterBattleText1
+ db -1 ; end
Mansion2Text1:
- TX_ASM
+ text_asm
ld hl, Mansion2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Mansion2BattleText1:
- TX_FAR _Mansion2BattleText1
- db "@"
+ text_far _Mansion2BattleText1
+ text_end
Mansion2EndBattleText1:
- TX_FAR _Mansion2EndBattleText1
- db "@"
+ text_far _Mansion2EndBattleText1
+ text_end
Mansion2AfterBattleText1:
- TX_FAR _Mansion2AfterBattleText1
- db "@"
+ text_far _Mansion2AfterBattleText1
+ text_end
Mansion2Text3:
- TX_FAR _Mansion2Text3
- db "@"
+ text_far _Mansion2Text3
+ text_end
Mansion2Text4:
- TX_FAR _Mansion2Text4
- db "@"
+ text_far _Mansion2Text4
+ text_end
Mansion3Text6:
Mansion2Text5:
- TX_ASM
+ text_asm
ld hl, Mansion2Text_520c2
call PrintText
call YesNoChoice
@@ -128,13 +121,13 @@ Mansion2Text5:
jp TextScriptEnd
Mansion2Text_520c2:
- TX_FAR _Mansion2Text_520c2
- db "@"
+ text_far _Mansion2Text_520c2
+ text_end
Mansion2Text_520c7:
- TX_FAR _Mansion2Text_520c7
- db "@"
+ text_far _Mansion2Text_520c7
+ text_end
Mansion2Text_520cc:
- TX_FAR _Mansion2Text_520cc
- db "@"
+ text_far _Mansion2Text_520cc
+ text_end
diff --git a/scripts/PokemonMansion3F.asm b/scripts/PokemonMansion3F.asm
index e19fec72..0f62d6e0 100755
--- a/scripts/PokemonMansion3F.asm
+++ b/scripts/PokemonMansion3F.asm
@@ -51,10 +51,10 @@ Mansion3Script0:
ret
CoordsData_52254:
- db $0E,$10
- db $0E,$11
- db $0E,$13
- db $FF
+ dbmapcoord 16, 14
+ dbmapcoord 17, 14
+ dbmapcoord 19, 14
+ db -1 ; end
Mansion3Script_5225b:
xor a
@@ -72,14 +72,14 @@ Mansion3Script_5225b:
set 4, [hl]
ret
-Mansion3Script_Switches:
+Mansion3Script_Switches::
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ret nz
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $6
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
PokemonMansion3F_TextPointers:
@@ -91,61 +91,47 @@ PokemonMansion3F_TextPointers:
dw Mansion3Text6
Mansion3TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_MANSION_3_TRAINER_0
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MANSION_3_TRAINER_0
- dw Mansion3BattleText1 ; TextBeforeBattle
- dw Mansion3AfterBattleText1 ; TextAfterBattle
- dw Mansion3EndBattleText1 ; TextEndBattle
- dw Mansion3EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_MANSION_3_TRAINER_0, 0, Mansion3BattleText1, Mansion3EndBattleText1, Mansion3AfterBattleText1
Mansion3TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_MANSION_3_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MANSION_3_TRAINER_1
- dw Mansion3BattleText2 ; TextBeforeBattle
- dw Mansion3AfterBattleText2 ; TextAfterBattle
- dw Mansion3EndBattleText2 ; TextEndBattle
- dw Mansion3EndBattleText2 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_MANSION_3_TRAINER_1, 2, Mansion3BattleText2, Mansion3EndBattleText2, Mansion3AfterBattleText2
+ db -1 ; end
Mansion3Text1:
- TX_ASM
+ text_asm
ld hl, Mansion3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Mansion3Text2:
- TX_ASM
+ text_asm
ld hl, Mansion3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Mansion3BattleText1:
- TX_FAR _Mansion3BattleText1
- db "@"
+ text_far _Mansion3BattleText1
+ text_end
Mansion3EndBattleText1:
- TX_FAR _Mansion3EndBattleText1
- db "@"
+ text_far _Mansion3EndBattleText1
+ text_end
Mansion3AfterBattleText1:
- TX_FAR _Mansion3AfterBattleText1
- db "@"
+ text_far _Mansion3AfterBattleText1
+ text_end
Mansion3BattleText2:
- TX_FAR _Mansion3BattleText2
- db "@"
+ text_far _Mansion3BattleText2
+ text_end
Mansion3EndBattleText2:
- TX_FAR _Mansion3EndBattleText2
- db "@"
+ text_far _Mansion3EndBattleText2
+ text_end
Mansion3AfterBattleText2:
- TX_FAR _Mansion3AfterBattleText2
- db "@"
+ text_far _Mansion3AfterBattleText2
+ text_end
Mansion3Text5:
- TX_FAR _Mansion3Text5
- db "@"
+ text_far _Mansion3Text5
+ text_end
diff --git a/scripts/PokemonMansionB1F.asm b/scripts/PokemonMansionB1F.asm
index 0a668c09..f3b62793 100755
--- a/scripts/PokemonMansionB1F.asm
+++ b/scripts/PokemonMansionB1F.asm
@@ -43,14 +43,14 @@ Mansion4Script_523cf:
call Mansion2Script_5202f
ret
-Mansion4Script_Switches:
+Mansion4Script_Switches::
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ret nz
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $9
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
PokemonMansionB1F_ScriptPointers:
@@ -70,61 +70,47 @@ PokemonMansionB1F_TextPointers:
dw Mansion3Text6
Mansion4TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_MANSION_4_TRAINER_0
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MANSION_4_TRAINER_0
- dw Mansion4BattleText1 ; TextBeforeBattle
- dw Mansion4AfterBattleText1 ; TextAfterBattle
- dw Mansion4EndBattleText1 ; TextEndBattle
- dw Mansion4EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_MANSION_4_TRAINER_0, 0, Mansion4BattleText1, Mansion4EndBattleText1, Mansion4AfterBattleText1
Mansion4TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_MANSION_4_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MANSION_4_TRAINER_1
- dw Mansion4BattleText2 ; TextBeforeBattle
- dw Mansion4AfterBattleText2 ; TextAfterBattle
- dw Mansion4EndBattleText2 ; TextEndBattle
- dw Mansion4EndBattleText2 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_MANSION_4_TRAINER_1, 3, Mansion4BattleText2, Mansion4EndBattleText2, Mansion4AfterBattleText2
+ db -1 ; end
Mansion4Text1:
- TX_ASM
+ text_asm
ld hl, Mansion4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Mansion4Text2:
- TX_ASM
+ text_asm
ld hl, Mansion4TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Mansion4BattleText1:
- TX_FAR _Mansion4BattleText1
- db "@"
+ text_far _Mansion4BattleText1
+ text_end
Mansion4EndBattleText1:
- TX_FAR _Mansion4EndBattleText1
- db "@"
+ text_far _Mansion4EndBattleText1
+ text_end
Mansion4AfterBattleText1:
- TX_FAR _Mansion4AfterBattleText1
- db "@"
+ text_far _Mansion4AfterBattleText1
+ text_end
Mansion4BattleText2:
- TX_FAR _Mansion4BattleText2
- db "@"
+ text_far _Mansion4BattleText2
+ text_end
Mansion4EndBattleText2:
- TX_FAR _Mansion4EndBattleText2
- db "@"
+ text_far _Mansion4EndBattleText2
+ text_end
Mansion4AfterBattleText2:
- TX_FAR _Mansion4AfterBattleText2
- db "@"
+ text_far _Mansion4AfterBattleText2
+ text_end
Mansion4Text7:
- TX_FAR _Mansion4Text7
- db "@"
+ text_far _Mansion4Text7
+ text_end
diff --git a/scripts/PokemonTower1F.asm b/scripts/PokemonTower1F.asm
index b383c647..0870364c 100755
--- a/scripts/PokemonTower1F.asm
+++ b/scripts/PokemonTower1F.asm
@@ -10,21 +10,21 @@ PokemonTower1F_TextPointers:
dw PokemonTower1Text5
PokemonTower1Text1:
- TX_FAR _PokemonTower1Text1
- db "@"
+ text_far _PokemonTower1Text1
+ text_end
PokemonTower1Text2:
- TX_FAR _PokemonTower1Text2
- db "@"
+ text_far _PokemonTower1Text2
+ text_end
PokemonTower1Text3:
- TX_FAR _PokemonTower1Text3
- db "@"
+ text_far _PokemonTower1Text3
+ text_end
PokemonTower1Text4:
- TX_FAR _PokemonTower1Text4
- db "@"
+ text_far _PokemonTower1Text4
+ text_end
PokemonTower1Text5:
- TX_FAR _PokemonTower1Text5
- db "@"
+ text_far _PokemonTower1Text5
+ text_end
diff --git a/scripts/PokemonTower2F.asm b/scripts/PokemonTower2F.asm
index 54f49cae..5065e559 100755
--- a/scripts/PokemonTower2F.asm
+++ b/scripts/PokemonTower2F.asm
@@ -39,22 +39,22 @@ PokemonTower2Script0:
.asm_60544
ld [wPlayerMovingDirection], a
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, b
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
- ld [hJoyHeld], a
- ld [hJoyPressed], a
+ ldh [hJoyHeld], a
+ ldh [hJoyPressed], a
ret
CoordsData_6055e:
- db $05,$0F
- db $06,$0E
- db $0F ; isn't this supposed to end in $ff?
+ dbmapcoord 15, 5
+ dbmapcoord 14, 6
+ db $0F ; end? (should be $ff?)
PokemonTower2Script1:
ld a, [wIsInBattle]
@@ -64,19 +64,19 @@ PokemonTower2Script1:
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_POKEMON_TOWER_RIVAL
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld de, MovementData_605b2
CheckEvent EVENT_POKEMON_TOWER_RIVAL_ON_LEFT
jr nz, .asm_60589
- callab Func_f1e22
+ callfar Func_f1e22
ld de, MovementData_605a9
.asm_60589
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call MoveSprite
call StopAllMusic
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, $2
ld [wPokemonTower2FCurScript], a
ld [wCurMapScript], a
@@ -91,7 +91,7 @@ MovementData_605a9:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
MovementData_605b2:
db NPC_MOVEMENT_DOWN
@@ -102,7 +102,7 @@ MovementData_605b2:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
PokemonTower2Script2:
ld a, [wd730]
@@ -124,7 +124,7 @@ PokemonTower2F_TextPointers:
dw PokemonTower2Text2
PokemonTower2Text1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_POKEMON_TOWER_RIVAL
jr z, .asm_16f24
ld hl, PokemonTower2Text_6063c
@@ -139,7 +139,7 @@ PokemonTower2Text1:
ld hl, PokemonTower2Text_60632
ld de, PokemonTower2Text_60637
call SaveEndBattleTextPointers
- ld a, OPP_SONY2
+ ld a, OPP_RIVAL2
ld [wCurOpponent], a
ld a, [wRivalStarter]
add $1
@@ -152,21 +152,21 @@ PokemonTower2Text1:
jp TextScriptEnd
PokemonTower2Text_6062d:
- TX_FAR _PokemonTower2Text_6062d
- db "@"
+ text_far _PokemonTower2Text_6062d
+ text_end
PokemonTower2Text_60632:
- TX_FAR _PokemonTower2Text_60632
- db "@"
+ text_far _PokemonTower2Text_60632
+ text_end
PokemonTower2Text_60637:
- TX_FAR _PokemonTower2Text_60637
- db "@"
+ text_far _PokemonTower2Text_60637
+ text_end
PokemonTower2Text_6063c:
- TX_FAR _PokemonTower2Text_6063c
- db "@"
+ text_far _PokemonTower2Text_6063c
+ text_end
PokemonTower2Text2:
- TX_FAR _PokemonTower2Text2
- db "@"
+ text_far _PokemonTower2Text2
+ text_end
diff --git a/scripts/PokemonTower2F_2.asm b/scripts/PokemonTower2F_2.asm
index 42659da3..0dfbb965 100755
--- a/scripts/PokemonTower2F_2.asm
+++ b/scripts/PokemonTower2F_2.asm
@@ -1,4 +1,4 @@
-Func_f1e22:
+Func_f1e22::
ld hl, PikachuMovementData_f1e2b
ld b, SPRITE_FACING_RIGHT
call TryApplyPikachuMovementData
diff --git a/scripts/PokemonTower3F.asm b/scripts/PokemonTower3F.asm
index 7d8f63e9..cf56904f 100755
--- a/scripts/PokemonTower3F.asm
+++ b/scripts/PokemonTower3F.asm
@@ -19,83 +19,63 @@ PokemonTower3F_TextPointers:
dw PickUpItemText
PokemonTower3TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_POKEMONTOWER_3_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_3_TRAINER_0
- dw PokemonTower3BattleText1 ; TextBeforeBattle
- dw PokemonTower3AfterBattleText1 ; TextAfterBattle
- dw PokemonTower3EndBattleText1 ; TextEndBattle
- dw PokemonTower3EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_POKEMONTOWER_3_TRAINER_0, 2, PokemonTower3BattleText1, PokemonTower3EndBattleText1, PokemonTower3AfterBattleText1
PokemonTower3TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_POKEMONTOWER_3_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_3_TRAINER_1
- dw PokemonTower3BattleText2 ; TextBeforeBattle
- dw PokemonTower3AfterBattleText2 ; TextAfterBattle
- dw PokemonTower3EndBattleText2 ; TextEndBattle
- dw PokemonTower3EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_POKEMONTOWER_3_TRAINER_1, 3, PokemonTower3BattleText2, PokemonTower3EndBattleText2, PokemonTower3AfterBattleText2
PokemonTower3TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_POKEMONTOWER_3_TRAINER_2
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_3_TRAINER_2
- dw PokemonTower3BattleText3 ; TextBeforeBattle
- dw PokemonTower3AfterBattleText3 ; TextAfterBattle
- dw PokemonTower3EndBattleText3 ; TextEndBattle
- dw PokemonTower3EndBattleText3 ; TextEndBattle
- db $ff
+ trainer EVENT_BEAT_POKEMONTOWER_3_TRAINER_2, 2, PokemonTower3BattleText3, PokemonTower3EndBattleText3, PokemonTower3AfterBattleText3
+ db -1 ; end
PokemonTower3Text1:
- TX_ASM
+ text_asm
ld hl, PokemonTower3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
PokemonTower3Text2:
- TX_ASM
+ text_asm
ld hl, PokemonTower3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
PokemonTower3Text3:
- TX_ASM
+ text_asm
ld hl, PokemonTower3TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
PokemonTower3BattleText1:
- TX_FAR _PokemonTower3BattleText1
- db "@"
+ text_far _PokemonTower3BattleText1
+ text_end
PokemonTower3EndBattleText1:
- TX_FAR _PokemonTower3EndBattleText1
- db "@"
+ text_far _PokemonTower3EndBattleText1
+ text_end
PokemonTower3AfterBattleText1:
- TX_FAR _PokemonTower3AfterBattleText1
- db "@"
+ text_far _PokemonTower3AfterBattleText1
+ text_end
PokemonTower3BattleText2:
- TX_FAR _PokemonTower3BattleText2
- db "@"
+ text_far _PokemonTower3BattleText2
+ text_end
PokemonTower3EndBattleText2:
- TX_FAR _PokemonTower3EndBattleText2
- db "@"
+ text_far _PokemonTower3EndBattleText2
+ text_end
PokemonTower3AfterBattleText2:
- TX_FAR _PokemonTower3AfterBattleText2
- db "@"
+ text_far _PokemonTower3AfterBattleText2
+ text_end
PokemonTower3BattleText3:
- TX_FAR _PokemonTower3BattleText3
- db "@"
+ text_far _PokemonTower3BattleText3
+ text_end
PokemonTower3EndBattleText3:
- TX_FAR _PokemonTower3EndBattleText3
- db "@"
+ text_far _PokemonTower3EndBattleText3
+ text_end
PokemonTower3AfterBattleText3:
- TX_FAR _PokemonTower3AfterBattleText3
- db "@"
+ text_far _PokemonTower3AfterBattleText3
+ text_end
diff --git a/scripts/PokemonTower4F.asm b/scripts/PokemonTower4F.asm
index b8e0d772..e3431644 100755
--- a/scripts/PokemonTower4F.asm
+++ b/scripts/PokemonTower4F.asm
@@ -21,84 +21,63 @@ PokemonTower4F_TextPointers:
dw PickUpItemText
PokemonTower4TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_POKEMONTOWER_4_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_4_TRAINER_0
- dw PokemonTower4BattleText1 ; TextBeforeBattle
- dw PokemonTower4AfterBattleText1 ; TextAfterBattle
- dw PokemonTower4EndBattleText1 ; TextEndBattle
- dw PokemonTower4EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_POKEMONTOWER_4_TRAINER_0, 2, PokemonTower4BattleText1, PokemonTower4EndBattleText1, PokemonTower4AfterBattleText1
PokemonTower4TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_POKEMONTOWER_4_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_4_TRAINER_1
- dw PokemonTower4BattleText2 ; TextBeforeBattle
- dw PokemonTower4AfterBattleText2 ; TextAfterBattle
- dw PokemonTower4EndBattleText2 ; TextEndBattle
- dw PokemonTower4EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_POKEMONTOWER_4_TRAINER_1, 2, PokemonTower4BattleText2, PokemonTower4EndBattleText2, PokemonTower4AfterBattleText2
PokemonTower4TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_POKEMONTOWER_4_TRAINER_2
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_4_TRAINER_2
- dw PokemonTower4BattleText3 ; TextBeforeBattle
- dw PokemonTower4AfterBattleText3 ; TextAfterBattle
- dw PokemonTower4EndBattleText3 ; TextEndBattle
- dw PokemonTower4EndBattleText3 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_POKEMONTOWER_4_TRAINER_2, 2, PokemonTower4BattleText3, PokemonTower4EndBattleText3, PokemonTower4AfterBattleText3
+ db -1 ; end
PokemonTower4Text1:
- TX_ASM
+ text_asm
ld hl, PokemonTower4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
PokemonTower4Text2:
- TX_ASM
+ text_asm
ld hl, PokemonTower4TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
PokemonTower4Text3:
- TX_ASM
+ text_asm
ld hl, PokemonTower4TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
PokemonTower4BattleText1:
- TX_FAR _PokemonTower4BattleText1
- db "@"
+ text_far _PokemonTower4BattleText1
+ text_end
PokemonTower4EndBattleText1:
- TX_FAR _PokemonTower4EndBattleText1
- db "@"
+ text_far _PokemonTower4EndBattleText1
+ text_end
PokemonTower4AfterBattleText1:
- TX_FAR _PokemonTower4AfterBattleText1
- db "@"
+ text_far _PokemonTower4AfterBattleText1
+ text_end
PokemonTower4BattleText2:
- TX_FAR _PokemonTower4BattleText2
- db "@"
+ text_far _PokemonTower4BattleText2
+ text_end
PokemonTower4EndBattleText2:
- TX_FAR _PokemonTower4EndBattleText2
- db "@"
+ text_far _PokemonTower4EndBattleText2
+ text_end
PokemonTower4AfterBattleText2:
- TX_FAR _PokemonTower4AfterBattleText2
- db "@"
+ text_far _PokemonTower4AfterBattleText2
+ text_end
PokemonTower4BattleText3:
- TX_FAR _PokemonTower4BattleText3
- db "@"
+ text_far _PokemonTower4BattleText3
+ text_end
PokemonTower4EndBattleText3:
- TX_FAR _PokemonTower4EndBattleText3
- db "@"
+ text_far _PokemonTower4EndBattleText3
+ text_end
PokemonTower4AfterBattleText3:
- TX_FAR _PokemonTower4AfterBattleText3
- db "@"
+ text_far _PokemonTower4AfterBattleText3
+ text_end
diff --git a/scripts/PokemonTower5F.asm b/scripts/PokemonTower5F.asm
index 299261e9..10189a8e 100755
--- a/scripts/PokemonTower5F.asm
+++ b/scripts/PokemonTower5F.asm
@@ -24,7 +24,7 @@ PokemonTower5Script0:
CheckAndSetEvent EVENT_IN_PURIFIED_ZONE
ret nz
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $f0
ld [wJoyIgnore], a
ld hl, wd72e
@@ -35,18 +35,18 @@ PokemonTower5Script0:
call Delay3
call GBFadeInFromWhite
ld a, $7
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
ret
CoordsData_60992:
- db $08,$0A
- db $08,$0B
- db $09,$0A
- db $09,$0B
- db $FF
+ dbmapcoord 10, 8
+ dbmapcoord 11, 8
+ dbmapcoord 10, 9
+ dbmapcoord 11, 9
+ db -1 ; end
PokemonTower5F_TextPointers:
dw PokemonTower5Text1
@@ -58,119 +58,91 @@ PokemonTower5F_TextPointers:
dw PokemonTower5Text7
PokemonTower5TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_0
- dw PokemonTower5BattleText1 ; TextBeforeBattle
- dw PokemonTower5AfterBattleText1 ; TextAfterBattle
- dw PokemonTower5EndBattleText1 ; TextEndBattle
- dw PokemonTower5EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_0, 2, PokemonTower5BattleText1, PokemonTower5EndBattleText1, PokemonTower5AfterBattleText1
PokemonTower5TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_1
- dw PokemonTower5BattleText2 ; TextBeforeBattle
- dw PokemonTower5AfterBattleText2 ; TextAfterBattle
- dw PokemonTower5EndBattleText2 ; TextEndBattle
- dw PokemonTower5EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_1, 3, PokemonTower5BattleText2, PokemonTower5EndBattleText2, PokemonTower5AfterBattleText2
PokemonTower5TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_2
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_2
- dw PokemonTower5BattleText3 ; TextBeforeBattle
- dw PokemonTower5AfterBattleText3 ; TextAfterBattle
- dw PokemonTower5EndBattleText3 ; TextEndBattle
- dw PokemonTower5EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_2, 2, PokemonTower5BattleText3, PokemonTower5EndBattleText3, PokemonTower5AfterBattleText3
PokemonTower5TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_3
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_3
- dw PokemonTower5BattleText4 ; TextBeforeBattle
- dw PokemonTower5AfterBattleText4 ; TextAfterBattle
- dw PokemonTower5EndBattleText4 ; TextEndBattle
- dw PokemonTower5EndBattleText4 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_3, 2, PokemonTower5BattleText4, PokemonTower5EndBattleText4, PokemonTower5AfterBattleText4
+ db -1 ; end
PokemonTower5Text1:
- TX_FAR _PokemonTower5Text1
- db "@"
+ text_far _PokemonTower5Text1
+ text_end
PokemonTower5Text2:
- TX_ASM
+ text_asm
ld hl, PokemonTower5TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
PokemonTower5BattleText1:
- TX_FAR _PokemonTower5BattleText1
- db "@"
+ text_far _PokemonTower5BattleText1
+ text_end
PokemonTower5EndBattleText1:
- TX_FAR _PokemonTower5EndBattleText1
- db "@"
+ text_far _PokemonTower5EndBattleText1
+ text_end
PokemonTower5AfterBattleText1:
- TX_FAR _PokemonTower5AfterBattleText1
- db "@"
+ text_far _PokemonTower5AfterBattleText1
+ text_end
PokemonTower5Text3:
- TX_ASM
+ text_asm
ld hl, PokemonTower5TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
PokemonTower5BattleText2:
- TX_FAR _PokemonTower5BattleText2
- db "@"
+ text_far _PokemonTower5BattleText2
+ text_end
PokemonTower5EndBattleText2:
- TX_FAR _PokemonTower5EndBattleText2
- db "@"
+ text_far _PokemonTower5EndBattleText2
+ text_end
PokemonTower5AfterBattleText2:
- TX_FAR _PokemonTower5AfterBattleText2
- db "@"
+ text_far _PokemonTower5AfterBattleText2
+ text_end
PokemonTower5Text4:
- TX_ASM
+ text_asm
ld hl, PokemonTower5TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
PokemonTower5BattleText3:
- TX_FAR _PokemonTower5BattleText3
- db "@"
+ text_far _PokemonTower5BattleText3
+ text_end
PokemonTower5EndBattleText3:
- TX_FAR _PokemonTower5EndBattleText3
- db "@"
+ text_far _PokemonTower5EndBattleText3
+ text_end
PokemonTower5AfterBattleText3:
- TX_FAR _PokemonTower5AfterBattleText3
- db "@"
+ text_far _PokemonTower5AfterBattleText3
+ text_end
PokemonTower5Text5:
- TX_ASM
+ text_asm
ld hl, PokemonTower5TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
PokemonTower5BattleText4:
- TX_FAR _PokemonTower5BattleText4
- db "@"
+ text_far _PokemonTower5BattleText4
+ text_end
PokemonTower5EndBattleText4:
- TX_FAR _PokemonTower5EndBattleText4
- db "@"
+ text_far _PokemonTower5EndBattleText4
+ text_end
PokemonTower5AfterBattleText4:
- TX_FAR _PokemonTower5AfterBattleText4
- db "@"
+ text_far _PokemonTower5AfterBattleText4
+ text_end
PokemonTower5Text7:
- TX_FAR _PokemonTower5Text7
- db "@"
+ text_far _PokemonTower5Text7
+ text_end
diff --git a/scripts/PokemonTower6F.asm b/scripts/PokemonTower6F.asm
index 962d33eb..e236488e 100755
--- a/scripts/PokemonTower6F.asm
+++ b/scripts/PokemonTower6F.asm
@@ -28,9 +28,9 @@ PokemonTower6Script0:
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $6
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, RESTLESS_SOUL
ld [wCurOpponent], a
@@ -42,7 +42,8 @@ PokemonTower6Script0:
ret
CoordsData_60b45:
- db $10,$0A,$FF
+ dbmapcoord 10, 16
+ db -1 ; end
PokemonTower6Script4:
ld a, [wIsInBattle]
@@ -61,7 +62,7 @@ PokemonTower6Script4:
jr nz, .asm_60b82
SetEvent EVENT_BEAT_GHOST_MAROWAK
ld a, $7
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
@@ -75,7 +76,7 @@ PokemonTower6Script4:
ld a, $10
ld [wSimulatedJoypadStatesEnd], a
xor a
- ld [wSpriteStateData2 + $06], a
+ ld [wSpritePlayerStateData2MovementByte1], a
ld [wOverrideSimulatedJoypadStatesMask], a
ld hl, wd730
set 7, [hl]
@@ -104,54 +105,33 @@ PokemonTower6F_TextPointers:
dw PokemonTower6Text7
PokemonTower6TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_0
- dw PokemonTower6BattleText1 ; TextBeforeBattle
- dw PokemonTower6AfterBattleText1 ; TextAfterBattle
- dw PokemonTower6EndBattleText1 ; TextEndBattle
- dw PokemonTower6EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_POKEMONTOWER_6_TRAINER_0, 3, PokemonTower6BattleText1, PokemonTower6EndBattleText1, PokemonTower6AfterBattleText1
PokemonTower6TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_1
- dw PokemonTower6BattleText2 ; TextBeforeBattle
- dw PokemonTower6AfterBattleText2 ; TextAfterBattle
- dw PokemonTower6EndBattleText2 ; TextEndBattle
- dw PokemonTower6EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_POKEMONTOWER_6_TRAINER_1, 3, PokemonTower6BattleText2, PokemonTower6EndBattleText2, PokemonTower6AfterBattleText2
PokemonTower6TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_2
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_2
- dw PokemonTower6BattleText3 ; TextBeforeBattle
- dw PokemonTower6AfterBattleText3 ; TextAfterBattle
- dw PokemonTower6EndBattleText3 ; TextEndBattle
- dw PokemonTower6EndBattleText3 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_POKEMONTOWER_6_TRAINER_2, 2, PokemonTower6BattleText3, PokemonTower6EndBattleText3, PokemonTower6AfterBattleText3
+ db -1 ; end
PokemonTower6Text1:
- TX_ASM
+ text_asm
ld hl, PokemonTower6TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
PokemonTower6Text2:
- TX_ASM
+ text_asm
ld hl, PokemonTower6TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
PokemonTower6Text3:
- TX_ASM
+ text_asm
ld hl, PokemonTower6TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
PokemonTower6Text7:
- TX_ASM
+ text_asm
ld hl, PokemonTower2Text_60c1f
call PrintText
ld a, RESTLESS_SOUL
@@ -164,49 +144,49 @@ PokemonTower6Text7:
jp TextScriptEnd
PokemonTower2Text_60c1f:
- TX_FAR _PokemonTower2Text_60c1f
- db "@"
+ text_far _PokemonTower2Text_60c1f
+ text_end
PokemonTower2Text_60c24:
- TX_FAR _PokemonTower2Text_60c24
- db "@"
+ text_far _PokemonTower2Text_60c24
+ text_end
PokemonTower6BattleText1:
- TX_FAR _PokemonTower6BattleText1
- db "@"
+ text_far _PokemonTower6BattleText1
+ text_end
PokemonTower6EndBattleText1:
- TX_FAR _PokemonTower6EndBattleText1
- db "@"
+ text_far _PokemonTower6EndBattleText1
+ text_end
PokemonTower6AfterBattleText1:
- TX_FAR _PokemonTower6AfterBattleText1
- db "@"
+ text_far _PokemonTower6AfterBattleText1
+ text_end
PokemonTower6BattleText2:
- TX_FAR _PokemonTower6BattleText2
- db "@"
+ text_far _PokemonTower6BattleText2
+ text_end
PokemonTower6EndBattleText2:
- TX_FAR _PokemonTower6EndBattleText2
- db "@"
+ text_far _PokemonTower6EndBattleText2
+ text_end
PokemonTower6AfterBattleText2:
- TX_FAR _PokemonTower6AfterBattleText2
- db "@"
+ text_far _PokemonTower6AfterBattleText2
+ text_end
PokemonTower6BattleText3:
- TX_FAR _PokemonTower6BattleText3
- db "@"
+ text_far _PokemonTower6BattleText3
+ text_end
PokemonTower6EndBattleText3:
- TX_FAR _PokemonTower6EndBattleText3
- db "@"
+ text_far _PokemonTower6EndBattleText3
+ text_end
PokemonTower6AfterBattleText3:
- TX_FAR _PokemonTower6AfterBattleText3
- db "@"
+ text_far _PokemonTower6AfterBattleText3
+ text_end
PokemonTower6Text6:
- TX_FAR _PokemonTower6Text6
- db "@"
+ text_far _PokemonTower6Text6
+ text_end
diff --git a/scripts/PokemonTower7F.asm b/scripts/PokemonTower7F.asm
index e34edf66..75e67a72 100755
--- a/scripts/PokemonTower7F.asm
+++ b/scripts/PokemonTower7F.asm
@@ -49,7 +49,7 @@ PokemonTower7Script_60d2a:
ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $FF ^ (A_BUTTON | B_BUTTON)
ld [wJoyIgnore], a
ld a, HS_POKEMON_TOWER_7F_JESSIE
@@ -59,7 +59,7 @@ PokemonTower7Script_60d2a:
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, $4
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $ff
ld [wJoyIgnore], a
@@ -82,7 +82,7 @@ PokemonTower7Script1:
ld de, PokemonTower7MovementData_60d7a
.asm_60d8c
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call MoveSprite
ld a, $ff
ld [wJoyIgnore], a
@@ -113,7 +113,7 @@ PokemonTower7Script4:
ld de, PokemonTower7MovementData_60d7b
.asm_60dcc
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call MoveSprite
ld a, $ff
ld [wJoyIgnore], a
@@ -140,7 +140,7 @@ PokemonTower7Script6:
ld a, $FF ^ (A_BUTTON | B_BUTTON)
ld [wJoyIgnore], a
ld a, $5
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
PokemonTower7Script7:
ld hl, wd72d
@@ -154,7 +154,7 @@ PokemonTower7Script7:
ld a, $2c
ld [wTrainerNo], a
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld [wJoyIgnore], a
ld a, $8
call PokemonTower7Script_60d05
@@ -177,7 +177,7 @@ PokemonTower7Script8:
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, $6
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -209,7 +209,7 @@ PokemonTower7Script9:
PokemonTower7Script10:
call PlayDefaultMusic
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_0
ld a, $0
@@ -223,7 +223,7 @@ PokemonTower7Script_60eaf:
call Delay3
ret
-PokemonTower7Script_60ebe
+PokemonTower7Script_60ebe:
ld [wMissableObjectIndex], a
predef HideObject
ret
@@ -237,7 +237,7 @@ PokemonTower7Script11:
ld a, SPRITE_FACING_UP
ld [wSpritePlayerStateData1FacingDirection], a
ld a, MR_FUJIS_HOUSE
- ld [hWarpDestinationMap], a
+ ldh [hWarpDestinationMap], a
ld a, $1
ld [wDestinationWarpID], a
ld a, LAVENDER_TOWN
@@ -258,11 +258,11 @@ PokemonTower7F_TextPointers:
PokemonTower7Text1:
PokemonTower7Text2:
- db "@"
+ text_end
PokemonTower7Text4:
- TX_FAR _PokemonTowerJessieJamesText1
- TX_ASM
+ text_far _PokemonTowerJessieJamesText1
+ text_asm
ld c, 10
call DelayFrames
ld a, PLAYER_DIR_UP
@@ -277,22 +277,22 @@ PokemonTower7Text4:
jp TextScriptEnd
PokemonTower7Text5:
- TX_FAR _PokemonTowerJessieJamesText2
- db "@"
+ text_far _PokemonTowerJessieJamesText2
+ text_end
PokemonTower7JessieJamesEndBattleText:
- TX_FAR _PokemonTowerJessieJamesText3
- db "@"
+ text_far _PokemonTowerJessieJamesText3
+ text_end
PokemonTower7Text6:
- TX_FAR _PokemonTowerJessieJamesText4
- TX_ASM
+ text_far _PokemonTowerJessieJamesText4
+ text_asm
ld c, 64
call DelayFrames
jp TextScriptEnd
PokemonTower7Text3:
- TX_ASM
+ text_asm
ld hl, PokemonTower7Text_60f75
call PrintText
SetEvent EVENT_RESCUED_MR_FUJI
@@ -311,5 +311,5 @@ PokemonTower7Text3:
jp TextScriptEnd
PokemonTower7Text_60f75:
- TX_FAR _TowerRescueFujiText
- db "@"
+ text_far _TowerRescueFujiText
+ text_end
diff --git a/scripts/PowerPlant.asm b/scripts/PowerPlant.asm
index f720b6f8..76859218 100755
--- a/scripts/PowerPlant.asm
+++ b/scripts/PowerPlant.asm
@@ -29,87 +29,24 @@ PowerPlant_TextPointers:
dw PickUpItemText
Voltorb0TrainerHeader:
- dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_0
- db 0 ; view range
- dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_0
- dw VoltorbBattleText ; TextBeforeBattle
- dw VoltorbBattleText ; TextAfterBattle
- dw VoltorbBattleText ; TextEndBattle
- dw VoltorbBattleText ; TextEndBattle
-
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_0, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
Voltorb1TrainerHeader:
- dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_1
- db 0 ; view range
- dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_1
- dw VoltorbBattleText ; TextBeforeBattle
- dw VoltorbBattleText ; TextAfterBattle
- dw VoltorbBattleText ; TextEndBattle
- dw VoltorbBattleText ; TextEndBattle
-
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_1, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
Voltorb2TrainerHeader:
- dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_2
- db 0 ; view range
- dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_2
- dw VoltorbBattleText ; TextBeforeBattle
- dw VoltorbBattleText ; TextAfterBattle
- dw VoltorbBattleText ; TextEndBattle
- dw VoltorbBattleText ; TextEndBattle
-
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_2, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
Voltorb3TrainerHeader:
- dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_3
- db 0 ; view range
- dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_3
- dw VoltorbBattleText ; TextBeforeBattle
- dw VoltorbBattleText ; TextAfterBattle
- dw VoltorbBattleText ; TextEndBattle
- dw VoltorbBattleText ; TextEndBattle
-
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_3, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
Voltorb4TrainerHeader:
- dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_4
- db 0 ; view range
- dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_4
- dw VoltorbBattleText ; TextBeforeBattle
- dw VoltorbBattleText ; TextAfterBattle
- dw VoltorbBattleText ; TextEndBattle
- dw VoltorbBattleText ; TextEndBattle
-
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_4, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
Voltorb5TrainerHeader:
- dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_5
- db 0 ; view range
- dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_5
- dw VoltorbBattleText ; TextBeforeBattle
- dw VoltorbBattleText ; TextAfterBattle
- dw VoltorbBattleText ; TextEndBattle
- dw VoltorbBattleText ; TextEndBattle
-
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_5, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
Voltorb6TrainerHeader:
- dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_6
- db 0 ; view range
- dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_6
- dw VoltorbBattleText ; TextBeforeBattle
- dw VoltorbBattleText ; TextAfterBattle
- dw VoltorbBattleText ; TextEndBattle
- dw VoltorbBattleText ; TextEndBattle
-
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_6, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
Voltorb7TrainerHeader:
- dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_7, 1
- db 0 ; view range
- dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_7, 1
- dw VoltorbBattleText ; TextBeforeBattle
- dw VoltorbBattleText ; TextAfterBattle
- dw VoltorbBattleText ; TextEndBattle
- dw VoltorbBattleText ; TextEndBattle
-
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_7, 1, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
ZapdosTrainerHeader:
- dbEventFlagBit EVENT_BEAT_ZAPDOS, 1
- db 0 ; view range
- dwEventFlagAddress EVENT_BEAT_ZAPDOS, 1
- dw ZapdosBattleText ; TextBeforeBattle
- dw ZapdosBattleText ; TextAfterBattle
- dw ZapdosBattleText ; TextEndBattle
- dw ZapdosBattleText ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ZAPDOS, 1, 0, ZapdosBattleText, ZapdosBattleText, ZapdosBattleText
+ db -1 ; end
InitVoltorbBattle:
call TalkToTrainer
@@ -118,57 +55,57 @@ InitVoltorbBattle:
jp TextScriptEnd
Voltorb0Text:
- TX_ASM
+ text_asm
ld hl, Voltorb0TrainerHeader
jr InitVoltorbBattle
Voltorb1Text:
- TX_ASM
+ text_asm
ld hl, Voltorb1TrainerHeader
jr InitVoltorbBattle
Voltorb2Text:
- TX_ASM
+ text_asm
ld hl, Voltorb2TrainerHeader
jr InitVoltorbBattle
Voltorb3Text:
- TX_ASM
+ text_asm
ld hl, Voltorb3TrainerHeader
jr InitVoltorbBattle
Voltorb4Text:
- TX_ASM
+ text_asm
ld hl, Voltorb4TrainerHeader
jr InitVoltorbBattle
Voltorb5Text:
- TX_ASM
+ text_asm
ld hl, Voltorb5TrainerHeader
jr InitVoltorbBattle
Voltorb6Text:
- TX_ASM
+ text_asm
ld hl, Voltorb6TrainerHeader
jr InitVoltorbBattle
Voltorb7Text:
- TX_ASM
+ text_asm
ld hl, Voltorb7TrainerHeader
jr InitVoltorbBattle
ZapdosText:
- TX_ASM
+ text_asm
ld hl, ZapdosTrainerHeader
jr InitVoltorbBattle
VoltorbBattleText:
- TX_FAR _VoltorbBattleText
- db "@"
+ text_far _VoltorbBattleText
+ text_end
ZapdosBattleText:
- TX_FAR _ZapdosBattleText
- TX_ASM
+ text_far _ZapdosBattleText
+ text_asm
ld a, ZAPDOS
call PlayCry
call WaitForSoundToFinish
diff --git a/scripts/RedsHouse1F.asm b/scripts/RedsHouse1F.asm
index e4fa2094..4af4a2e6 100755
--- a/scripts/RedsHouse1F.asm
+++ b/scripts/RedsHouse1F.asm
@@ -3,15 +3,15 @@ RedsHouse1F_Script:
ret
RedsHouse1F_TextPointers:
- dw RedsHouse1FText1
- dw RedsHouse1FText2
+ dw RedsHouse1FMomText
+ dw RedsHouse1FTVText
-RedsHouse1FText1: ; Mom
- TX_ASM
- callab Func_f1b73
+RedsHouse1FMomText:
+ text_asm
+ callfar Func_f1b73
jp TextScriptEnd
-RedsHouse1FText2: ; TV
- TX_ASM
- callab Func_f1bc4
+RedsHouse1FTVText:
+ text_asm
+ callfar Func_f1bc4
jp TextScriptEnd
diff --git a/scripts/RedsHouse1F2.asm b/scripts/RedsHouse1F2.asm
index 8f44d30d..e1b2145b 100755
--- a/scripts/RedsHouse1F2.asm
+++ b/scripts/RedsHouse1F2.asm
@@ -1,14 +1,14 @@
-Func_f1b73:
+Func_f1b73::
ld a, [wd72e]
- bit 3, a
- jp nz, MomHealPokemon ; if player has received a Pokémon from Oak, heal team
+ bit 3, a ; received a Pokémon from Oak?
+ jp nz, MomHealPokemon
ld hl, MomWakeUpText
call PrintText
ret
MomWakeUpText:
- TX_FAR _MomWakeUpText
- db "@"
+ text_far _MomWakeUpText
+ text_end
MomHealPokemon:
ld hl, MomHealText1
@@ -19,10 +19,10 @@ MomHealPokemon:
ld a, MUSIC_PKMN_HEALED
ld [wNewSoundID], a
call PlaySound
-.loop
+.next
ld a, [wChannelSoundIDs]
cp MUSIC_PKMN_HEALED
- jr z, .loop
+ jr z, .next
ld a, [wMapMusicSoundID]
ld [wNewSoundID], a
call PlaySound
@@ -32,27 +32,27 @@ MomHealPokemon:
ret
MomHealText1:
- TX_FAR _MomHealText1
- db "@"
+ text_far _MomHealText1
+ text_end
MomHealText2:
- TX_FAR _MomHealText2
- db "@"
+ text_far _MomHealText2
+ text_end
-Func_f1bc4:
+Func_f1bc4::
ld hl, TVWrongSideText
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
- jp nz, .notUp
+ jp nz, .got_text
ld hl, StandByMeText
-.notUp
+.got_text
call PrintText
ret
StandByMeText:
- TX_FAR _StandByMeText
- db "@"
+ text_far _StandByMeText
+ text_end
TVWrongSideText:
- TX_FAR _TVWrongSideText
- db "@"
+ text_far _TVWrongSideText
+ text_end
diff --git a/scripts/RedsHouse2F.asm b/scripts/RedsHouse2F.asm
index e692a0fa..4eb465c4 100755
--- a/scripts/RedsHouse2F.asm
+++ b/scripts/RedsHouse2F.asm
@@ -20,4 +20,5 @@ RedsHouse2FScript4:
ret
RedsHouse2F_TextPointers:
- db "@"
+
+ text_end ; unused
diff --git a/scripts/RockTunnel1F.asm b/scripts/RockTunnel1F.asm
index 94620d96..606e0317 100755
--- a/scripts/RockTunnel1F.asm
+++ b/scripts/RockTunnel1F.asm
@@ -23,191 +23,142 @@ RockTunnel1F_TextPointers:
dw RockTunnel1Text8
RockTunnel1TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0
- dw RockTunnel1BattleText1 ; TextBeforeBattle
- dw RockTunnel1AfterBattleText1 ; TextAfterBattle
- dw RockTunnel1EndBattleText1 ; TextEndBattle
- dw RockTunnel1EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0, 4, RockTunnel1BattleText1, RockTunnel1EndBattleText1, RockTunnel1AfterBattleText1
RockTunnel1TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1
- dw RockTunnel1BattleText2 ; TextBeforeBattle
- dw RockTunnel1AfterBattleText2 ; TextAfterBattle
- dw RockTunnel1EndBattleText2 ; TextEndBattle
- dw RockTunnel1EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1, 4, RockTunnel1BattleText2, RockTunnel1EndBattleText2, RockTunnel1AfterBattleText2
RockTunnel1TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2
- dw RockTunnel1BattleText3 ; TextBeforeBattle
- dw RockTunnel1AfterBattleText3 ; TextAfterBattle
- dw RockTunnel1EndBattleText3 ; TextEndBattle
- dw RockTunnel1EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2, 3, RockTunnel1BattleText3, RockTunnel1EndBattleText3, RockTunnel1AfterBattleText3
RockTunnel1TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3
- dw RockTunnel1BattleText4 ; TextBeforeBattle
- dw RockTunnel1AfterBattleText4 ; TextAfterBattle
- dw RockTunnel1EndBattleText4 ; TextEndBattle
- dw RockTunnel1EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3, 3, RockTunnel1BattleText4, RockTunnel1EndBattleText4, RockTunnel1AfterBattleText4
RockTunnel1TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4
- dw RockTunnel1BattleText5 ; TextBeforeBattle
- dw RockTunnel1AfterBattleText5 ; TextAfterBattle
- dw RockTunnel1EndBattleText5 ; TextEndBattle
- dw RockTunnel1EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4, 4, RockTunnel1BattleText5, RockTunnel1EndBattleText5, RockTunnel1AfterBattleText5
RockTunnel1TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5
- dw RockTunnel1BattleText6 ; TextBeforeBattle
- dw RockTunnel1AfterBattleText6 ; TextAfterBattle
- dw RockTunnel1EndBattleText6 ; TextEndBattle
- dw RockTunnel1EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5, 4, RockTunnel1BattleText6, RockTunnel1EndBattleText6, RockTunnel1AfterBattleText6
RockTunnel1TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6
- dw RockTunnel1BattleText7 ; TextBeforeBattle
- dw RockTunnel1AfterBattleText7 ; TextAfterBattle
- dw RockTunnel1EndBattleText7 ; TextEndBattle
- dw RockTunnel1EndBattleText7 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6, 4, RockTunnel1BattleText7, RockTunnel1EndBattleText7, RockTunnel1AfterBattleText7
+ db -1 ; end
RockTunnel1Text1:
- TX_ASM
+ text_asm
ld hl, RockTunnel1TrainerHeader0
jr RockTunnel1TalkToTrainer
RockTunnel1Text2:
- TX_ASM
+ text_asm
ld hl, RockTunnel1TrainerHeader1
jr RockTunnel1TalkToTrainer
RockTunnel1Text3:
- TX_ASM
+ text_asm
ld hl, RockTunnel1TrainerHeader2
jr RockTunnel1TalkToTrainer
RockTunnel1Text4:
- TX_ASM
+ text_asm
ld hl, RockTunnel1TrainerHeader3
jr RockTunnel1TalkToTrainer
RockTunnel1Text5:
- TX_ASM
+ text_asm
ld hl, RockTunnel1TrainerHeader4
jr RockTunnel1TalkToTrainer
RockTunnel1Text6:
- TX_ASM
+ text_asm
ld hl, RockTunnel1TrainerHeader5
jr RockTunnel1TalkToTrainer
RockTunnel1Text7:
- TX_ASM
+ text_asm
ld hl, RockTunnel1TrainerHeader6
RockTunnel1TalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
RockTunnel1BattleText1:
- TX_FAR _RockTunnel1BattleText1
- db "@"
+ text_far _RockTunnel1BattleText1
+ text_end
RockTunnel1EndBattleText1:
- TX_FAR _RockTunnel1EndBattleText1
- db "@"
+ text_far _RockTunnel1EndBattleText1
+ text_end
RockTunnel1AfterBattleText1:
- TX_FAR _RockTunnel1AfterBattleText1
- db "@"
+ text_far _RockTunnel1AfterBattleText1
+ text_end
RockTunnel1BattleText2:
- TX_FAR _RockTunnel1BattleText2
- db "@"
+ text_far _RockTunnel1BattleText2
+ text_end
RockTunnel1EndBattleText2:
- TX_FAR _RockTunnel1EndBattleText2
- db "@"
+ text_far _RockTunnel1EndBattleText2
+ text_end
RockTunnel1AfterBattleText2:
- TX_FAR _RockTunnel1AfterBattleText2
- db "@"
+ text_far _RockTunnel1AfterBattleText2
+ text_end
RockTunnel1BattleText3:
- TX_FAR _RockTunnel1BattleText3
- db "@"
+ text_far _RockTunnel1BattleText3
+ text_end
RockTunnel1EndBattleText3:
- TX_FAR _RockTunnel1EndBattleText3
- db "@"
+ text_far _RockTunnel1EndBattleText3
+ text_end
RockTunnel1AfterBattleText3:
- TX_FAR _RockTunnel1AfterBattleText3
- db "@"
+ text_far _RockTunnel1AfterBattleText3
+ text_end
RockTunnel1BattleText4:
- TX_FAR _RockTunnel1BattleText4
- db "@"
+ text_far _RockTunnel1BattleText4
+ text_end
RockTunnel1EndBattleText4:
- TX_FAR _RockTunnel1EndBattleText4
- db "@"
+ text_far _RockTunnel1EndBattleText4
+ text_end
RockTunnel1AfterBattleText4:
- TX_FAR _RockTunnel1AfterBattleText4
- db "@"
+ text_far _RockTunnel1AfterBattleText4
+ text_end
RockTunnel1BattleText5:
- TX_FAR _RockTunnel1BattleText5
- db "@"
+ text_far _RockTunnel1BattleText5
+ text_end
RockTunnel1EndBattleText5:
- TX_FAR _RockTunnel1EndBattleText5
- db "@"
+ text_far _RockTunnel1EndBattleText5
+ text_end
RockTunnel1AfterBattleText5:
- TX_FAR _RockTunnel1AfterBattleText5
- db "@"
+ text_far _RockTunnel1AfterBattleText5
+ text_end
RockTunnel1BattleText6:
- TX_FAR _RockTunnel1BattleText6
- db "@"
+ text_far _RockTunnel1BattleText6
+ text_end
RockTunnel1EndBattleText6:
- TX_FAR _RockTunnel1EndBattleText6
- db "@"
+ text_far _RockTunnel1EndBattleText6
+ text_end
RockTunnel1AfterBattleText6:
- TX_FAR _RockTunnel1AfterBattleText6
- db "@"
+ text_far _RockTunnel1AfterBattleText6
+ text_end
RockTunnel1BattleText7:
- TX_FAR _RockTunnel1BattleText7
- db "@"
+ text_far _RockTunnel1BattleText7
+ text_end
RockTunnel1EndBattleText7:
- TX_FAR _RockTunnel1EndBattleText7
- db "@"
+ text_far _RockTunnel1EndBattleText7
+ text_end
RockTunnel1AfterBattleText7:
- TX_FAR _RockTunnel1AfterBattleText7
- db "@"
+ text_far _RockTunnel1AfterBattleText7
+ text_end
RockTunnel1Text8:
- TX_FAR _RockTunnel1Text8
- db "@"
+ text_far _RockTunnel1Text8
+ text_end
diff --git a/scripts/RockTunnelB1F.asm b/scripts/RockTunnelB1F.asm
index 7e6fcc8b..9cba9c3e 100755
--- a/scripts/RockTunnelB1F.asm
+++ b/scripts/RockTunnelB1F.asm
@@ -23,219 +23,163 @@ RockTunnelB1F_TextPointers:
dw RockTunnel2Text8
RockTunnel2TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0
- dw RockTunnel2BattleText2 ; TextBeforeBattle
- dw RockTunnel2AfterBattleText2 ; TextAfterBattle
- dw RockTunnel2EndBattleText2 ; TextEndBattle
- dw RockTunnel2EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0, 4, RockTunnel2BattleText2, RockTunnel2EndBattleText2, RockTunnel2AfterBattleText2
RockTunnel2TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1
- dw RockTunnel2BattleText3 ; TextBeforeBattle
- dw RockTunnel2AfterBattleText3 ; TextAfterBattle
- dw RockTunnel2EndBattleText3 ; TextEndBattle
- dw RockTunnel2EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1, 3, RockTunnel2BattleText3, RockTunnel2EndBattleText3, RockTunnel2AfterBattleText3
RockTunnel2TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2
- dw RockTunnel2BattleText4 ; TextBeforeBattle
- dw RockTunnel2AfterBattleText4 ; TextAfterBattle
- dw RockTunnel2EndBattleText4 ; TextEndBattle
- dw RockTunnel2EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2, 3, RockTunnel2BattleText4, RockTunnel2EndBattleText4, RockTunnel2AfterBattleText4
RockTunnel2TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3
- dw RockTunnel2BattleText5 ; TextBeforeBattle
- dw RockTunnel2AfterBattleText5 ; TextAfterBattle
- dw RockTunnel2EndBattleText5 ; TextEndBattle
- dw RockTunnel2EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3, 4, RockTunnel2BattleText5, RockTunnel2EndBattleText5, RockTunnel2AfterBattleText5
RockTunnel2TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4
- dw RockTunnel2BattleText6 ; TextBeforeBattle
- dw RockTunnel2AfterBattleText6 ; TextAfterBattle
- dw RockTunnel2EndBattleText6 ; TextEndBattle
- dw RockTunnel2EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4, 3, RockTunnel2BattleText6, RockTunnel2EndBattleText6, RockTunnel2AfterBattleText6
RockTunnel2TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5
- dw RockTunnel2BattleText7 ; TextBeforeBattle
- dw RockTunnel2AfterBattleText7 ; TextAfterBattle
- dw RockTunnel2EndBattleText7 ; TextEndBattle
- dw RockTunnel2EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5, 4, RockTunnel2BattleText7, RockTunnel2EndBattleText7, RockTunnel2AfterBattleText7
RockTunnel2TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6
- dw RockTunnel2BattleText8 ; TextBeforeBattle
- dw RockTunnel2AfterBattleText8 ; TextAfterBattle
- dw RockTunnel2EndBattleText8 ; TextEndBattle
- dw RockTunnel2EndBattleText8 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6, 3, RockTunnel2BattleText8, RockTunnel2EndBattleText8, RockTunnel2AfterBattleText8
RockTunnel2TrainerHeader7:
- dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7, 1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7, 1
- dw RockTunnel2BattleText9 ; TextBeforeBattle
- dw RockTunnel2AfterBattleText9 ; TextAfterBattle
- dw RockTunnel2EndBattleText9 ; TextEndBattle
- dw RockTunnel2EndBattleText9 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7, 1, 3, RockTunnel2BattleText9, RockTunnel2EndBattleText9, RockTunnel2AfterBattleText9
+ db -1 ; end
RockTunnel2Text1:
- TX_ASM
+ text_asm
ld hl, RockTunnel2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text2:
- TX_ASM
+ text_asm
ld hl, RockTunnel2TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text3:
- TX_ASM
+ text_asm
ld hl, RockTunnel2TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text4:
- TX_ASM
+ text_asm
ld hl, RockTunnel2TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text5:
- TX_ASM
+ text_asm
ld hl, RockTunnel2TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text6:
- TX_ASM
+ text_asm
ld hl, RockTunnel2TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text7:
- TX_ASM
+ text_asm
ld hl, RockTunnel2TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text8:
- TX_ASM
+ text_asm
ld hl, RockTunnel2TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
RockTunnel2BattleText2:
- TX_FAR _RockTunnel2BattleText2
- db "@"
+ text_far _RockTunnel2BattleText2
+ text_end
RockTunnel2EndBattleText2:
- TX_FAR _RockTunnel2EndBattleText2
- db "@"
+ text_far _RockTunnel2EndBattleText2
+ text_end
RockTunnel2AfterBattleText2:
- TX_FAR _RockTunnel2AfterBattleText2
- db "@"
+ text_far _RockTunnel2AfterBattleText2
+ text_end
RockTunnel2BattleText3:
- TX_FAR _RockTunnel2BattleText3
- db "@"
+ text_far _RockTunnel2BattleText3
+ text_end
RockTunnel2EndBattleText3:
- TX_FAR _RockTunnel2EndBattleText3
- db "@"
+ text_far _RockTunnel2EndBattleText3
+ text_end
RockTunnel2AfterBattleText3:
- TX_FAR _RockTunnel2AfterBattleText3
- db "@"
+ text_far _RockTunnel2AfterBattleText3
+ text_end
RockTunnel2BattleText4:
- TX_FAR _RockTunnel2BattleText4
- db "@"
+ text_far _RockTunnel2BattleText4
+ text_end
RockTunnel2EndBattleText4:
- TX_FAR _RockTunnel2EndBattleText4
- db "@"
+ text_far _RockTunnel2EndBattleText4
+ text_end
RockTunnel2AfterBattleText4:
- TX_FAR _RockTunnel2AfterBattleText4
- db "@"
+ text_far _RockTunnel2AfterBattleText4
+ text_end
RockTunnel2BattleText5:
- TX_FAR _RockTunnel2BattleText5
- db "@"
+ text_far _RockTunnel2BattleText5
+ text_end
RockTunnel2EndBattleText5:
- TX_FAR _RockTunnel2EndBattleText5
- db "@"
+ text_far _RockTunnel2EndBattleText5
+ text_end
RockTunnel2AfterBattleText5:
- TX_FAR _RockTunnel2AfterBattleText5
- db "@"
+ text_far _RockTunnel2AfterBattleText5
+ text_end
RockTunnel2BattleText6:
- TX_FAR _RockTunnel2BattleText6
- db "@"
+ text_far _RockTunnel2BattleText6
+ text_end
RockTunnel2EndBattleText6:
- TX_FAR _RockTunnel2EndBattleText6
- db "@"
+ text_far _RockTunnel2EndBattleText6
+ text_end
RockTunnel2AfterBattleText6:
- TX_FAR _RockTunnel2AfterBattleText6
- db "@"
+ text_far _RockTunnel2AfterBattleText6
+ text_end
RockTunnel2BattleText7:
- TX_FAR _RockTunnel2BattleText7
- db "@"
+ text_far _RockTunnel2BattleText7
+ text_end
RockTunnel2EndBattleText7:
- TX_FAR _RockTunnel2EndBattleText7
- db "@"
+ text_far _RockTunnel2EndBattleText7
+ text_end
RockTunnel2AfterBattleText7:
- TX_FAR _RockTunnel2AfterBattleText7
- db "@"
+ text_far _RockTunnel2AfterBattleText7
+ text_end
RockTunnel2BattleText8:
- TX_FAR _RockTunnel2BattleText8
- db "@"
+ text_far _RockTunnel2BattleText8
+ text_end
RockTunnel2EndBattleText8:
- TX_FAR _RockTunnel2EndBattleText8
- db "@"
+ text_far _RockTunnel2EndBattleText8
+ text_end
RockTunnel2AfterBattleText8:
- TX_FAR _RockTunnel2AfterBattleText8
- db "@"
+ text_far _RockTunnel2AfterBattleText8
+ text_end
RockTunnel2BattleText9:
- TX_FAR _RockTunnel2BattleText9
- db "@"
+ text_far _RockTunnel2BattleText9
+ text_end
RockTunnel2EndBattleText9:
- TX_FAR _RockTunnel2EndBattleText9
- db "@"
+ text_far _RockTunnel2EndBattleText9
+ text_end
RockTunnel2AfterBattleText9:
- TX_FAR _RockTunnel2AfterBattleText9
- db "@"
+ text_far _RockTunnel2AfterBattleText9
+ text_end
diff --git a/scripts/RockTunnelPokecenter.asm b/scripts/RockTunnelPokecenter.asm
index 2fcace67..3b3da387 100755
--- a/scripts/RockTunnelPokecenter.asm
+++ b/scripts/RockTunnelPokecenter.asm
@@ -10,20 +10,20 @@ RockTunnelPokecenter_TextPointers:
dw RockTunnelPokecenterText5
RockTunnelHealNurseText:
- TX_POKECENTER_NURSE
+ script_pokecenter_nurse
RockTunnelPokecenterText2:
- TX_FAR _RockTunnelPokecenterText2
- db "@"
+ text_far _RockTunnelPokecenterText2
+ text_end
RockTunnelPokecenterText3:
- TX_FAR _RockTunnelPokecenterText3
- db "@"
+ text_far _RockTunnelPokecenterText3
+ text_end
RockTunnelTradeNurseText:
- TX_CABLE_CLUB_RECEPTIONIST
+ script_cable_club_receptionist
RockTunnelPokecenterText5:
- TX_ASM
- callab PokecenterChanseyText
+ text_asm
+ callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/RocketHideoutB1F.asm b/scripts/RocketHideoutB1F.asm
index 0cbddb49..f20c0892 100755
--- a/scripts/RocketHideoutB1F.asm
+++ b/scripts/RocketHideoutB1F.asm
@@ -45,145 +45,110 @@ RocketHideoutB1F_TextPointers:
dw PickUpItemText
RocketHideout1TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0
- dw RocketHideout1BattleText2 ; TextBeforeBattle
- dw RocketHideout1AfterBattleTxt2 ; TextAfterBattle
- dw RocketHideout1EndBattleText2 ; TextEndBattle
- dw RocketHideout1EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0, 3, RocketHideout1BattleText2, RocketHideout1EndBattleText2, RocketHideout1AfterBattleTxt2
RocketHideout1TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1
- dw RocketHideout1BattleText3 ; TextBeforeBattle
- dw RocketHideout1AfterBattleTxt3 ; TextAfterBattle
- dw RocketHideout1EndBattleText3 ; TextEndBattle
- dw RocketHideout1EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1, 2, RocketHideout1BattleText3, RocketHideout1EndBattleText3, RocketHideout1AfterBattleTxt3
RocketHideout1TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2
- dw RocketHideout1BattleText4 ; TextBeforeBattle
- dw RocketHideout1AfterBattleTxt4 ; TextAfterBattle
- dw RocketHideout1EndBattleText4 ; TextEndBattle
- dw RocketHideout1EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2, 2, RocketHideout1BattleText4, RocketHideout1EndBattleText4, RocketHideout1AfterBattleTxt4
RocketHideout1TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3
- dw RocketHideout1BattleText5 ; TextBeforeBattle
- dw RocketHideout1AfterBattleTxt5 ; TextAfterBattle
- dw RocketHideout1EndBattleText5 ; TextEndBattle
- dw RocketHideout1EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3, 3, RocketHideout1BattleText5, RocketHideout1EndBattleText5, RocketHideout1AfterBattleTxt5
RocketHideout1TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
- dw RocketHideout1BattleText6 ; TextBeforeBattle
- dw RocketHideout1AfterBattleTxt6 ; TextAfterBattle
- dw RocketHideout1EndBattleText6 ; TextEndBattle
- dw RocketHideout1EndBattleText6 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4, 3, RocketHideout1BattleText6, RocketHideout1EndBattleText6, RocketHideout1AfterBattleTxt6
+ db -1 ; end
RocketHideout1Text1:
- TX_ASM
+ text_asm
ld hl, RocketHideout1TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
RocketHideout1Text2:
- TX_ASM
+ text_asm
ld hl, RocketHideout1TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
RocketHideout1Text3:
- TX_ASM
+ text_asm
ld hl, RocketHideout1TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
RocketHideout1Text4:
- TX_ASM
+ text_asm
ld hl, RocketHideout1TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
RocketHideout1Text5:
- TX_ASM
+ text_asm
ld hl, RocketHideout1TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
RocketHideout1EndBattleText6:
- TX_FAR _RocketHideout1EndBattleText6
- TX_ASM
+ text_far _RocketHideout1EndBattleText6
+ text_asm
SetEvent EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
ld hl, RocketHideout1Text_44c9f
ret
RocketHideout1Text_44c9f:
- TX_BLINK
- db "@"
+ text_promptbutton
+ text_end
RocketHideout1BattleText2:
- TX_FAR _RocketHideout1BattleText2
- db "@"
+ text_far _RocketHideout1BattleText2
+ text_end
RocketHideout1EndBattleText2:
- TX_FAR _RocketHideout1EndBattleText2
- db "@"
+ text_far _RocketHideout1EndBattleText2
+ text_end
RocketHideout1AfterBattleTxt2:
- TX_FAR _RocketHideout1AfterBattleTxt2
- db "@"
+ text_far _RocketHideout1AfterBattleTxt2
+ text_end
RocketHideout1BattleText3:
- TX_FAR _RocketHideout1BattleText3
- db "@"
+ text_far _RocketHideout1BattleText3
+ text_end
RocketHideout1EndBattleText3:
- TX_FAR _RocketHideout1EndBattleText3
- db "@"
+ text_far _RocketHideout1EndBattleText3
+ text_end
RocketHideout1AfterBattleTxt3:
- TX_FAR _RocketHideout1AfterBattleTxt3
- db "@"
+ text_far _RocketHideout1AfterBattleTxt3
+ text_end
RocketHideout1BattleText4:
- TX_FAR _RocketHideout1BattleText4
- db "@"
+ text_far _RocketHideout1BattleText4
+ text_end
RocketHideout1EndBattleText4:
- TX_FAR _RocketHideout1EndBattleText4
- db "@"
+ text_far _RocketHideout1EndBattleText4
+ text_end
RocketHideout1AfterBattleTxt4:
- TX_FAR _RocketHideout1AfterBattleTxt4
- db "@"
+ text_far _RocketHideout1AfterBattleTxt4
+ text_end
RocketHideout1BattleText5:
- TX_FAR _RocketHideout1BattleText5
- db "@"
+ text_far _RocketHideout1BattleText5
+ text_end
RocketHideout1EndBattleText5:
- TX_FAR _RocketHideout1EndBattleText5
- db "@"
+ text_far _RocketHideout1EndBattleText5
+ text_end
RocketHideout1AfterBattleTxt5:
- TX_FAR _RocketHideout1AfterBattleTxt5
- db "@"
+ text_far _RocketHideout1AfterBattleTxt5
+ text_end
RocketHideout1BattleText6:
- TX_FAR _RocketHideout1BattleText6
- db "@"
+ text_far _RocketHideout1BattleText6
+ text_end
RocketHideout1AfterBattleTxt6:
- TX_FAR _RocketHideout1AfterBattleTxt6
- db "@"
+ text_far _RocketHideout1AfterBattleTxt6
+ text_end
diff --git a/scripts/RocketHideoutB2F.asm b/scripts/RocketHideoutB2F.asm
index 1b487df2..d6fae24f 100755
--- a/scripts/RocketHideoutB2F.asm
+++ b/scripts/RocketHideoutB2F.asm
@@ -33,273 +33,227 @@ RocketHideout2Script0:
ld [wCurMapScript], a
ret
-;format:
-;db y,x
-;dw pointer to movement
RocketHideout2ArrowTilePlayerMovement:
- db $9,$4
- dw RocketHideout2ArrowMovement1
- db $b,$4
- dw RocketHideout2ArrowMovement2
- db $f,$4
- dw RocketHideout2ArrowMovement3
- db $10,$4
- dw RocketHideout2ArrowMovement4
- db $13,$4
- dw RocketHideout2ArrowMovement1
- db $16,$4
- dw RocketHideout2ArrowMovement5
- db $e,$5
- dw RocketHideout2ArrowMovement6
- db $16,$6
- dw RocketHideout2ArrowMovement7
- db $18,$6
- dw RocketHideout2ArrowMovement8
- db $9,$8
- dw RocketHideout2ArrowMovement9
- db $c,$8
- dw RocketHideout2ArrowMovement10
- db $f,$8
- dw RocketHideout2ArrowMovement8
- db $13,$8
- dw RocketHideout2ArrowMovement9
- db $17,$8
- dw RocketHideout2ArrowMovement11
- db $e,$9
- dw RocketHideout2ArrowMovement12
- db $16,$9
- dw RocketHideout2ArrowMovement12
- db $9,$a
- dw RocketHideout2ArrowMovement13
- db $a,$a
- dw RocketHideout2ArrowMovement14
- db $f,$a
- dw RocketHideout2ArrowMovement15
- db $11,$a
- dw RocketHideout2ArrowMovement16
- db $13,$a
- dw RocketHideout2ArrowMovement17
- db $19,$a
- dw RocketHideout2ArrowMovement2
- db $e,$b
- dw RocketHideout2ArrowMovement18
- db $10,$b
- dw RocketHideout2ArrowMovement19
- db $12,$b
- dw RocketHideout2ArrowMovement12
- db $9,$c
- dw RocketHideout2ArrowMovement20
- db $b,$c
- dw RocketHideout2ArrowMovement21
- db $d,$c
- dw RocketHideout2ArrowMovement22
- db $11,$c
- dw RocketHideout2ArrowMovement23
- db $a,$d
- dw RocketHideout2ArrowMovement24
- db $c,$d
- dw RocketHideout2ArrowMovement25
- db $10,$d
- dw RocketHideout2ArrowMovement26
- db $12,$d
- dw RocketHideout2ArrowMovement27
- db $13,$d
- dw RocketHideout2ArrowMovement28
- db $16,$d
- dw RocketHideout2ArrowMovement29
- db $17,$d
- dw RocketHideout2ArrowMovement30
- db $11,$e
- dw RocketHideout2ArrowMovement31
- db $10,$f
- dw RocketHideout2ArrowMovement12
- db $e,$10
- dw RocketHideout2ArrowMovement32
- db $10,$10
- dw RocketHideout2ArrowMovement33
- db $12,$10
- dw RocketHideout2ArrowMovement34
- db $a,$11
- dw RocketHideout2ArrowMovement35
- db $b,$11
- dw RocketHideout2ArrowMovement36
- db $FF
+ map_coord_movement 4, 9, RocketHideout2ArrowMovement1
+ map_coord_movement 4, 11, RocketHideout2ArrowMovement2
+ map_coord_movement 4, 15, RocketHideout2ArrowMovement3
+ map_coord_movement 4, 16, RocketHideout2ArrowMovement4
+ map_coord_movement 4, 19, RocketHideout2ArrowMovement1
+ map_coord_movement 4, 22, RocketHideout2ArrowMovement5
+ map_coord_movement 5, 14, RocketHideout2ArrowMovement6
+ map_coord_movement 6, 22, RocketHideout2ArrowMovement7
+ map_coord_movement 6, 24, RocketHideout2ArrowMovement8
+ map_coord_movement 8, 9, RocketHideout2ArrowMovement9
+ map_coord_movement 8, 12, RocketHideout2ArrowMovement10
+ map_coord_movement 8, 15, RocketHideout2ArrowMovement8
+ map_coord_movement 8, 19, RocketHideout2ArrowMovement9
+ map_coord_movement 8, 23, RocketHideout2ArrowMovement11
+ map_coord_movement 9, 14, RocketHideout2ArrowMovement12
+ map_coord_movement 9, 22, RocketHideout2ArrowMovement12
+ map_coord_movement 10, 9, RocketHideout2ArrowMovement13
+ map_coord_movement 10, 10, RocketHideout2ArrowMovement14
+ map_coord_movement 10, 15, RocketHideout2ArrowMovement15
+ map_coord_movement 10, 17, RocketHideout2ArrowMovement16
+ map_coord_movement 10, 19, RocketHideout2ArrowMovement17
+ map_coord_movement 10, 25, RocketHideout2ArrowMovement2
+ map_coord_movement 11, 14, RocketHideout2ArrowMovement18
+ map_coord_movement 11, 16, RocketHideout2ArrowMovement19
+ map_coord_movement 11, 18, RocketHideout2ArrowMovement12
+ map_coord_movement 12, 9, RocketHideout2ArrowMovement20
+ map_coord_movement 12, 11, RocketHideout2ArrowMovement21
+ map_coord_movement 12, 13, RocketHideout2ArrowMovement22
+ map_coord_movement 12, 17, RocketHideout2ArrowMovement23
+ map_coord_movement 13, 10, RocketHideout2ArrowMovement24
+ map_coord_movement 13, 12, RocketHideout2ArrowMovement25
+ map_coord_movement 13, 16, RocketHideout2ArrowMovement26
+ map_coord_movement 13, 18, RocketHideout2ArrowMovement27
+ map_coord_movement 13, 19, RocketHideout2ArrowMovement28
+ map_coord_movement 13, 22, RocketHideout2ArrowMovement29
+ map_coord_movement 13, 23, RocketHideout2ArrowMovement30
+ map_coord_movement 14, 17, RocketHideout2ArrowMovement31
+ map_coord_movement 15, 16, RocketHideout2ArrowMovement12
+ map_coord_movement 16, 14, RocketHideout2ArrowMovement32
+ map_coord_movement 16, 16, RocketHideout2ArrowMovement33
+ map_coord_movement 16, 18, RocketHideout2ArrowMovement34
+ map_coord_movement 17, 10, RocketHideout2ArrowMovement35
+ map_coord_movement 17, 11, RocketHideout2ArrowMovement36
+ db -1 ; end
;format: direction, count
;each list is read starting from the $FF and working backwards
RocketHideout2ArrowMovement1:
- db D_LEFT,$02
- db $FF
+ db D_LEFT, 2
+ db -1 ; end
RocketHideout2ArrowMovement2:
- db D_RIGHT,$04
- db $FF
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout2ArrowMovement3:
- db D_UP,$04
- db D_RIGHT,$04
- db $FF
+ db D_UP, 4
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout2ArrowMovement4:
- db D_UP,$04
- db D_RIGHT,$04
- db D_UP,$01
- db $FF
+ db D_UP, 4
+ db D_RIGHT, 4
+ db D_UP, 1
+ db -1 ; end
RocketHideout2ArrowMovement5:
- db D_LEFT,$02
- db D_UP,$03
- db $FF
+ db D_LEFT, 2
+ db D_UP, 3
+ db -1 ; end
RocketHideout2ArrowMovement6:
- db D_DOWN,$02
- db D_RIGHT,$04
- db $FF
+ db D_DOWN, 2
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout2ArrowMovement7:
- db D_UP,$02
- db $FF
+ db D_UP, 2
+ db -1 ; end
RocketHideout2ArrowMovement8:
- db D_UP,$04
- db $FF
+ db D_UP, 4
+ db -1 ; end
RocketHideout2ArrowMovement9:
- db D_LEFT,$06
- db $FF
+ db D_LEFT, 6
+ db -1 ; end
RocketHideout2ArrowMovement10:
- db D_UP,$01
- db $FF
+ db D_UP, 1
+ db -1 ; end
RocketHideout2ArrowMovement11:
- db D_LEFT,$06
- db D_UP,$04
- db $FF
+ db D_LEFT, 6
+ db D_UP, 4
+ db -1 ; end
RocketHideout2ArrowMovement12:
- db D_DOWN,$02
- db $FF
+ db D_DOWN, 2
+ db -1 ; end
RocketHideout2ArrowMovement13:
- db D_LEFT,$08
- db $FF
+ db D_LEFT, 8
+ db -1 ; end
RocketHideout2ArrowMovement14:
- db D_LEFT,$08
- db D_UP,$01
- db $FF
+ db D_LEFT, 8
+ db D_UP, 1
+ db -1 ; end
RocketHideout2ArrowMovement15:
- db D_LEFT,$08
- db D_UP,$06
- db $FF
+ db D_LEFT, 8
+ db D_UP, 6
+ db -1 ; end
RocketHideout2ArrowMovement16:
- db D_UP,$02
- db D_RIGHT,$04
- db $FF
+ db D_UP, 2
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout2ArrowMovement17:
- db D_UP,$02
- db D_RIGHT,$04
- db D_UP,$02
- db $FF
+ db D_UP, 2
+ db D_RIGHT, 4
+ db D_UP, 2
+ db -1 ; end
RocketHideout2ArrowMovement18:
- db D_DOWN,$02
- db D_RIGHT,$04
- db D_DOWN,$02
- db $FF
+ db D_DOWN, 2
+ db D_RIGHT, 4
+ db D_DOWN, 2
+ db -1 ; end
RocketHideout2ArrowMovement19:
- db D_DOWN,$02
- db D_RIGHT,$04
- db $FF
+ db D_DOWN, 2
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout2ArrowMovement20:
- db D_LEFT,$0A
- db $FF
+ db D_LEFT, 10
+ db -1 ; end
RocketHideout2ArrowMovement21:
- db D_LEFT,$0A
- db D_UP,$02
- db $FF
+ db D_LEFT, 10
+ db D_UP, 2
+ db -1 ; end
RocketHideout2ArrowMovement22:
- db D_LEFT,$0A
- db D_UP,$04
- db $FF
+ db D_LEFT, 10
+ db D_UP, 4
+ db -1 ; end
RocketHideout2ArrowMovement23:
- db D_UP,$02
- db D_RIGHT,$02
- db $FF
+ db D_UP, 2
+ db D_RIGHT, 2
+ db -1 ; end
RocketHideout2ArrowMovement24:
- db D_RIGHT,$01
- db D_DOWN,$02
- db $FF
+ db D_RIGHT, 1
+ db D_DOWN, 2
+ db -1 ; end
RocketHideout2ArrowMovement25:
- db D_RIGHT,$01
- db $FF
+ db D_RIGHT, 1
+ db -1 ; end
RocketHideout2ArrowMovement26:
- db D_DOWN,$02
- db D_RIGHT,$02
- db $FF
+ db D_DOWN, 2
+ db D_RIGHT, 2
+ db -1 ; end
RocketHideout2ArrowMovement27:
- db D_DOWN,$02
- db D_LEFT,$02
- db $FF
+ db D_DOWN, 2
+ db D_LEFT, 2
+ db -1 ; end
RocketHideout2ArrowMovement28:
- db D_UP,$02
- db D_RIGHT,$04
- db D_UP,$02
- db D_LEFT,$03
- db $FF
+ db D_UP, 2
+ db D_RIGHT, 4
+ db D_UP, 2
+ db D_LEFT, 3
+ db -1 ; end
RocketHideout2ArrowMovement29:
- db D_DOWN,$02
- db D_LEFT,$04
- db $FF
+ db D_DOWN, 2
+ db D_LEFT, 4
+ db -1 ; end
RocketHideout2ArrowMovement30:
- db D_LEFT,$06
- db D_UP,$04
- db D_LEFT,$05
- db $FF
+ db D_LEFT, 6
+ db D_UP, 4
+ db D_LEFT, 5
+ db -1 ; end
RocketHideout2ArrowMovement31:
- db D_UP,$02
- db $FF
+ db D_UP, 2
+ db -1 ; end
RocketHideout2ArrowMovement32:
- db D_UP,$01
- db $FF
+ db D_UP, 1
+ db -1 ; end
RocketHideout2ArrowMovement33:
- db D_UP,$03
- db $FF
+ db D_UP, 3
+ db -1 ; end
RocketHideout2ArrowMovement34:
- db D_UP,$05
- db $FF
+ db D_UP, 5
+ db -1 ; end
RocketHideout2ArrowMovement35:
- db D_RIGHT,$01
- db D_DOWN,$02
- db D_LEFT,$04
- db $FF
+ db D_RIGHT, 1
+ db D_DOWN, 2
+ db D_LEFT, 4
+ db -1 ; end
RocketHideout2ArrowMovement36:
- db D_LEFT,$0A
- db D_UP,$02
- db D_LEFT,$05
- db $FF
+ db D_LEFT, 10
+ db D_UP, 2
+ db D_LEFT, 5
+ db -1 ; end
RocketHideout2Script3:
ld a, [wSimulatedJoypadStatesIndex]
@@ -313,105 +267,7 @@ RocketHideout2Script3:
ld [wCurMapScript], a
ret
-LoadSpinnerArrowTiles:
- ld a, [wSpriteStateData1 + 2]
- srl a
- srl a
- ld hl, SpinnerPlayerFacingDirections
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [hl]
- ld [wSpriteStateData1 + 2], a
- ld a, [wCurMapTileset]
- cp FACILITY
- ld hl, FacilitySpinnerArrows
- jr z, .asm_44ff6
- ld hl, GymSpinnerArrows
-.asm_44ff6
- ld a, [wSimulatedJoypadStatesIndex]
- bit 0, a
- jr nz, .asm_45001
- ld de, $18
- add hl, de
-.asm_45001
- ld a, $4
- ld bc, $0
-.asm_45006
- push af
- push hl
- push bc
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call CopyVideoData
- pop bc
- ld a, $6
- add c
- ld c, a
- pop hl
- pop af
- dec a
- jr nz, .asm_45006
- ret
-
-spinner: MACRO
-; \1: source
-; \2: offset (BANK() chokes on literals)
-; \3: length
-; \4: dest
- dw \1 + \2
- db \3, BANK(\1)
- dw \4
-ENDM
-
-FacilitySpinnerArrows:
-FACILITY_SPINNER EQU $20 * $10
-vFacilitySpinner EQU vTileset + FACILITY_SPINNER
-
- spinner SpinnerArrowAnimTiles, $00, 1, vFacilitySpinner
- spinner SpinnerArrowAnimTiles, $10, 1, vFacilitySpinner + $10
- spinner SpinnerArrowAnimTiles, $20, 1, vFacilitySpinner + $100
- spinner SpinnerArrowAnimTiles, $30, 1, vFacilitySpinner + $110
- spinner Facility_GFX, FACILITY_SPINNER + $000, 1, vFacilitySpinner
- spinner Facility_GFX, FACILITY_SPINNER + $010, 1, vFacilitySpinner + $10
- spinner Facility_GFX, FACILITY_SPINNER + $100, 1, vFacilitySpinner + $100
- spinner Facility_GFX, FACILITY_SPINNER + $110, 1, vFacilitySpinner + $110
-
-GymSpinnerArrows:
-GYM_SPINNER EQU $3c * $10
-vGymSpinner EQU vTileset + GYM_SPINNER
-
- spinner SpinnerArrowAnimTiles, $10, 1, vGymSpinner
- spinner SpinnerArrowAnimTiles, $30, 1, vGymSpinner + $10
- spinner SpinnerArrowAnimTiles, $00, 1, vGymSpinner + $100
- spinner SpinnerArrowAnimTiles, $20, 1, vGymSpinner + $110
- spinner Gym_GFX, GYM_SPINNER + $000, 1, vGymSpinner
- spinner Gym_GFX, GYM_SPINNER + $010, 1, vGymSpinner + $10
- spinner Gym_GFX, GYM_SPINNER + $100, 1, vGymSpinner + $100
- spinner Gym_GFX, GYM_SPINNER + $110, 1, vGymSpinner + $110
-
-SpinnerPlayerFacingDirections:
-; This isn't the order of the facing directions. Rather, it's a list of
-; the facing directions that come next. For example, when the player is
-; facing down (00), the next facing direction is left (08).
- db $08 ; down -> left
- db $0C ; up -> right
- db $04 ; left -> up
- db $00 ; right -> down
-
-; these tiles are the animation for the tiles that push the player in dungeons like Rocket HQ
-SpinnerArrowAnimTiles:
- INCBIN "gfx/spinner_arrow.2bpp"
+INCLUDE "engine/overworld/spinners.asm"
RocketHideoutB2F_TextPointers:
dw RocketHideout2Text1
@@ -421,30 +277,23 @@ RocketHideoutB2F_TextPointers:
dw PickUpItemText
RocketHideout2TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0
- dw RocketHideout2BattleText2 ; TextBeforeBattle
- dw RocketHideout2AfterBattleTxt2 ; TextAfterBattle
- dw RocketHideout2EndBattleText2 ; TextEndBattle
- dw RocketHideout2EndBattleText2 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0, 4, RocketHideout2BattleText2, RocketHideout2EndBattleText2, RocketHideout2AfterBattleTxt2
+ db -1 ; end
RocketHideout2Text1:
- TX_ASM
+ text_asm
ld hl, RocketHideout2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
RocketHideout2BattleText2:
- TX_FAR _RocketHideout2BattleText2
- db "@"
+ text_far _RocketHideout2BattleText2
+ text_end
RocketHideout2EndBattleText2:
- TX_FAR _RocketHideout2EndBattleText2
- db "@"
+ text_far _RocketHideout2EndBattleText2
+ text_end
RocketHideout2AfterBattleTxt2:
- TX_FAR _RocketHideout2AfterBattleTxt2
- db "@"
+ text_far _RocketHideout2AfterBattleTxt2
+ text_end
diff --git a/scripts/RocketHideoutB3F.asm b/scripts/RocketHideoutB3F.asm
index 4dd537b3..88876f04 100755
--- a/scripts/RocketHideoutB3F.asm
+++ b/scripts/RocketHideoutB3F.asm
@@ -33,103 +33,84 @@ RocketHideout3Script0:
ld [wCurMapScript], a
ret
-;format:
-;db y,x
-;dw pointer to movement
RocketHideout3ArrowTilePlayerMovement:
- db $d,$a
- dw RocketHideout3ArrowMovement6
- db $13,$a
- dw RocketHideout3ArrowMovement1
- db $12,$b
- dw RocketHideout3ArrowMovement2
- db $b,$c
- dw RocketHideout3ArrowMovement3
- db $11,$c
- dw RocketHideout3ArrowMovement4
- db $14,$c
- dw RocketHideout3ArrowMovement5
- db $10,$d
- dw RocketHideout3ArrowMovement6
- db $b,$e
- dw RocketHideout3ArrowMovement7
- db $f,$e
- dw RocketHideout3ArrowMovement6
- db $11,$e
- dw RocketHideout3ArrowMovement8
- db $13,$e
- dw RocketHideout3ArrowMovement9
- db $10,$f
- dw RocketHideout3ArrowMovement7
- db $12,$f
- dw RocketHideout3ArrowMovement10
- db $d,$10
- dw RocketHideout3ArrowMovement11
- db $c,$11
- dw RocketHideout3ArrowMovement10
- db $10,$12
- dw RocketHideout3ArrowMovement12
- db $FF
+ map_coord_movement 10, 13, RocketHideout3ArrowMovement6
+ map_coord_movement 10, 19, RocketHideout3ArrowMovement1
+ map_coord_movement 11, 18, RocketHideout3ArrowMovement2
+ map_coord_movement 12, 11, RocketHideout3ArrowMovement3
+ map_coord_movement 12, 17, RocketHideout3ArrowMovement4
+ map_coord_movement 12, 20, RocketHideout3ArrowMovement5
+ map_coord_movement 13, 16, RocketHideout3ArrowMovement6
+ map_coord_movement 14, 11, RocketHideout3ArrowMovement7
+ map_coord_movement 14, 15, RocketHideout3ArrowMovement6
+ map_coord_movement 14, 17, RocketHideout3ArrowMovement8
+ map_coord_movement 14, 19, RocketHideout3ArrowMovement9
+ map_coord_movement 15, 16, RocketHideout3ArrowMovement7
+ map_coord_movement 15, 18, RocketHideout3ArrowMovement10
+ map_coord_movement 16, 13, RocketHideout3ArrowMovement11
+ map_coord_movement 17, 12, RocketHideout3ArrowMovement10
+ map_coord_movement 18, 16, RocketHideout3ArrowMovement12
+ db -1 ; end
;format: direction, count
;each list is read starting from the $FF and working backwards
RocketHideout3ArrowMovement1:
- db D_RIGHT,$04
- db D_UP,$04
- db D_RIGHT,$04
- db $FF
+ db D_RIGHT, 4
+ db D_UP, 4
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout3ArrowMovement2:
- db D_DOWN,$04
- db D_RIGHT,$04
- db $FF
+ db D_DOWN, 4
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout3ArrowMovement3:
- db D_LEFT,$02
- db $FF
+ db D_LEFT, 2
+ db -1 ; end
RocketHideout3ArrowMovement4:
- db D_RIGHT,$04
- db D_UP,$02
- db D_RIGHT,$02
- db $FF
+ db D_RIGHT, 4
+ db D_UP, 2
+ db D_RIGHT, 2
+ db -1 ; end
RocketHideout3ArrowMovement5:
- db D_RIGHT,$04
- db D_UP,$02
- db D_RIGHT,$02
- db D_UP,$03
- db $FF
+ db D_RIGHT, 4
+ db D_UP, 2
+ db D_RIGHT, 2
+ db D_UP, 3
+ db -1 ; end
RocketHideout3ArrowMovement6:
- db D_RIGHT,$04
- db $FF
+ db D_RIGHT, 4
+ db -1 ; end
RocketHideout3ArrowMovement7:
- db D_RIGHT,$02
- db $FF
+ db D_RIGHT, 2
+ db -1 ; end
RocketHideout3ArrowMovement8:
- db D_RIGHT,$04
- db D_UP,$02
- db $FF
+ db D_RIGHT, 4
+ db D_UP, 2
+ db -1 ; end
RocketHideout3ArrowMovement9:
- db D_RIGHT,$04
- db D_UP,$04
- db $FF
+ db D_RIGHT, 4
+ db D_UP, 4
+ db -1 ; end
RocketHideout3ArrowMovement10:
- db D_DOWN,$04
- db $FF
+ db D_DOWN, 4
+ db -1 ; end
RocketHideout3ArrowMovement11:
- db D_UP,$02
- db $FF
+ db D_UP, 2
+ db -1 ; end
RocketHideout3ArrowMovement12:
- db D_UP,$01
- db $FF
+ db D_UP, 1
+ db -1 ; end
RocketHideout3Script3:
ld a, [wSimulatedJoypadStatesIndex]
@@ -150,57 +131,43 @@ RocketHideoutB3F_TextPointers:
dw PickUpItemText
RocketHideout3TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0
- dw RocketHideout3BattleText2 ; TextBeforeBattle
- dw RocketHideout3AfterBattleTxt2 ; TextAfterBattle
- dw RocketHideout3EndBattleText2 ; TextEndBattle
- dw RocketHideout3EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0, 2, RocketHideout3BattleText2, RocketHideout3EndBattleText2, RocketHideout3AfterBattleTxt2
RocketHideout3TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1
- dw RocketHideout3BattleTxt ; TextBeforeBattle
- dw RocketHideout3AfterBattleText3 ; TextAfterBattle
- dw RocketHideout3EndBattleText3 ; TextEndBattle
- dw RocketHideout3EndBattleText3 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1, 4, RocketHideout3BattleTxt, RocketHideout3EndBattleText3, RocketHideout3AfterBattleText3
+ db -1 ; end
RocketHideout3Text1:
- TX_ASM
+ text_asm
ld hl, RocketHideout3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
RocketHideout3BattleText2:
- TX_FAR _RocketHideout3BattleText2
- db "@"
+ text_far _RocketHideout3BattleText2
+ text_end
RocketHideout3EndBattleText2:
- TX_FAR _RocketHideout3EndBattleText2
- db "@"
+ text_far _RocketHideout3EndBattleText2
+ text_end
RocketHideout3AfterBattleTxt2:
- TX_FAR _RocketHideout3AfterBattleTxt2
- db "@"
+ text_far _RocketHideout3AfterBattleTxt2
+ text_end
RocketHideout3Text2:
- TX_ASM
+ text_asm
ld hl, RocketHideout3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
RocketHideout3BattleTxt:
- TX_FAR _RocketHideout3BattleTxt
- db "@"
+ text_far _RocketHideout3BattleTxt
+ text_end
RocketHideout3EndBattleText3:
- TX_FAR _RocketHideout3EndBattleText3
- db "@"
+ text_far _RocketHideout3EndBattleText3
+ text_end
RocketHideout3AfterBattleText3:
- TX_FAR _RocketHide3AfterBattleText3
- db "@"
+ text_far _RocketHide3AfterBattleText3
+ text_end
diff --git a/scripts/RocketHideoutB4F.asm b/scripts/RocketHideoutB4F.asm
index 89fd37e1..564adc2a 100755
--- a/scripts/RocketHideoutB4F.asm
+++ b/scripts/RocketHideoutB4F.asm
@@ -48,7 +48,7 @@ RocketHideout4Script3:
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI
ld a, $a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call GBFadeOutToBlack
ld a, HS_ROCKET_HIDEOUT_B4F_GIOVANNI
@@ -89,7 +89,7 @@ RocketHideout4Script_455a5:
SetEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1
.asm_455c2
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $fc
ld [wJoyIgnore], a
call StopAllMusic
@@ -103,7 +103,7 @@ RocketHideout4Script_455a5:
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, $b
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -132,7 +132,7 @@ RocketHideout4Script4:
ld de, RocketHideout4JessieJamesMovementData_45606
.asm_45617
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call MoveSprite
ld a, $ff
ld [wJoyIgnore], a
@@ -166,7 +166,7 @@ RocketHideout4Script7:
ld de, RocketHideout4JessieJamesMovementData_45605
.asm_4565f
ld a, $3
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call MoveSprite
ld a, $ff
ld [wJoyIgnore], a
@@ -194,7 +194,7 @@ RocketHideout4Script9:
.asm_45697
call Delay3
ld a, $c
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
RocketHideout4Script10:
ld hl, wd72d
@@ -208,7 +208,7 @@ RocketHideout4Script10:
ld a, $2b
ld [wTrainerNo], a
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld [wJoyIgnore], a
SetEvent EVENT_6A0
ld a, $b
@@ -232,7 +232,7 @@ RocketHideout4Script11:
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, $d
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -264,7 +264,7 @@ RocketHideout4Script12:
RocketHideout4Script13:
call PlayDefaultMusic
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0
ld a, $0
@@ -299,22 +299,16 @@ RocketHideoutB4F_TextPointers:
dw RocketHideout4Text12
RocketHideout4TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2
- db ($1 << 4)
- dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2
- dw RocketHideout4Trainer0BeforeText
- dw RocketHideout4Trainer0AfterText
- dw RocketHideout4Trainer0EndBattleText
- dw RocketHideout4Trainer0EndBattleText
- db $ff
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2, 1, RocketHideout4Trainer0BeforeText, RocketHideout4Trainer0EndBattleText, RocketHideout4Trainer0AfterText
+ db -1 ; end
RocketHideout4Text1:
RocketHideout4Text2:
- db "@"
+ text_end
RocketHideout4Text10:
- TX_FAR _RocketHideoutJessieJamesText1
- TX_ASM
+ text_far _RocketHideoutJessieJamesText1
+ text_asm
ld c, 10
call DelayFrames
ld a, $8
@@ -329,22 +323,22 @@ RocketHideout4Text10:
jp TextScriptEnd
RocketHideout4Text11:
- TX_FAR _RocketHideoutJessieJamesText2
- db "@"
+ text_far _RocketHideoutJessieJamesText2
+ text_end
RocketHideout4JessieJamesEndBattleText:
- TX_FAR _RocketHideoutJessieJamesText3
- db "@"
+ text_far _RocketHideoutJessieJamesText3
+ text_end
RocketHideout4Text12:
- TX_FAR _RocketHideoutJessieJamesText4
- TX_ASM
+ text_far _RocketHideoutJessieJamesText4
+ text_asm
ld c, 64
call DelayFrames
jp TextScriptEnd
RocketHideout4Text0:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI
jp nz, .asm_457fb
ld hl, RocketHideout4Text_45804
@@ -355,12 +349,12 @@ RocketHideout4Text0:
ld hl, RocketHideout4Text_45809
ld de, RocketHideout4Text_45809
call SaveEndBattleTextPointers
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $3
ld [wRocketHideoutB4FCurScript], a
ld [wCurMapScript], a
@@ -373,31 +367,31 @@ RocketHideout4Text0:
jp TextScriptEnd
RocketHideout4Text_45804:
- TX_FAR _RocketHideout4Text_4557a
- db "@"
+ text_far _RocketHideout4Text_4557a
+ text_end
RocketHideout4Text_45809:
- TX_FAR _RocketHideout4Text_4557f
- db "@"
+ text_far _RocketHideout4Text_4557f
+ text_end
RocketHideout4Text9:
- TX_FAR _RocketHideout4Text_45584
- db "@"
+ text_far _RocketHideout4Text_45584
+ text_end
RocketHideout4Text3:
- TX_ASM
+ text_asm
ld hl, RocketHideout4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
RocketHideout4Trainer0BeforeText:
- TX_FAR _RocketHideout4BattleText4
- db "@"
+ text_far _RocketHideout4BattleText4
+ text_end
RocketHideout4Trainer0EndBattleText:
- TX_FAR _RocketHideout4EndBattleText4
- TX_BLINK
- TX_ASM
+ text_far _RocketHideout4EndBattleText4
+ text_promptbutton
+ text_asm
SetEvent EVENT_ROCKET_DROPPED_LIFT_KEY
ld a, HS_ROCKET_HIDEOUT_B4F_ITEM_5
ld [wMissableObjectIndex], a
@@ -405,11 +399,11 @@ RocketHideout4Trainer0EndBattleText:
jp TextScriptEnd
RocketHideout4Trainer0AfterText:
- TX_ASM
+ text_asm
ld hl, RocketHideout4Text_45844
call PrintText
jp TextScriptEnd
RocketHideout4Text_45844:
- TX_FAR _RocketHideout4Text_455ec
- db "@"
+ text_far _RocketHideout4Text_455ec
+ text_end
diff --git a/scripts/RocketHideoutElevator.asm b/scripts/RocketHideoutElevator.asm
index 9525db3a..8c51294e 100755
--- a/scripts/RocketHideoutElevator.asm
+++ b/scripts/RocketHideoutElevator.asm
@@ -41,31 +41,30 @@ RocketHideoutElevatorScript_45741:
ret
RocketHideoutElavatorFloors:
- db $03 ; num elements in list
+ db 3 ; #
db FLOOR_B1F
db FLOOR_B2F
db FLOOR_B4F
- db $FF ; terminator
+ db -1 ; end
-RocketHideoutElevatorWarpMaps:
-; first byte is warp number
-; second byte is map number
; These specify where the player goes after getting out of the elevator.
- db $04, ROCKET_HIDEOUT_B1F
- db $04, ROCKET_HIDEOUT_B2F
- db $02, ROCKET_HIDEOUT_B4F
+RocketHideoutElevatorWarpMaps:
+ ; warp number, map id
+ db 4, ROCKET_HIDEOUT_B1F
+ db 4, ROCKET_HIDEOUT_B2F
+ db 2, ROCKET_HIDEOUT_B4F
RocketHideoutElevatorWarpMapsEnd:
RocketHideoutElevatorScript_4575f:
call Delay3
- callba ShakeElevator
+ farcall ShakeElevator
ret
RocketHideoutElevator_TextPointers:
dw RocketHideoutElevatorText1
RocketHideoutElevatorText1:
- TX_ASM
+ text_asm
ld b, LIFT_KEY
call IsItemInBag
jr z, .asm_45782
@@ -80,6 +79,6 @@ RocketHideoutElevatorText1:
jp TextScriptEnd
RocketHideoutElevatorText_4578b:
- TX_FAR _RocketElevatorText_4578b
- TX_WAIT
- db "@"
+ text_far _RocketElevatorText_4578b
+ text_waitbutton
+ text_end
diff --git a/scripts/Route1.asm b/scripts/Route1.asm
index d41360b2..d2f0b766 100755
--- a/scripts/Route1.asm
+++ b/scripts/Route1.asm
@@ -8,16 +8,16 @@ Route1_TextPointers:
dw Route1Text3
Route1Text1:
- TX_ASM
- callba Func_f1ad2
+ text_asm
+ farcall Func_f1ad2
jp TextScriptEnd
Route1Text2:
- TX_ASM
- callba Func_f1b0f
+ text_asm
+ farcall Func_f1b0f
jp TextScriptEnd
Route1Text3:
- TX_ASM
- callba Func_f1b1b
+ text_asm
+ farcall Func_f1b1b
jp TextScriptEnd
diff --git a/scripts/Route10.asm b/scripts/Route10.asm
index 3fffa2c0..93012b9a 100755
--- a/scripts/Route10.asm
+++ b/scripts/Route10.asm
@@ -25,174 +25,132 @@ Route10_TextPointers:
dw Route10Text10
Route10TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_0
- dw Route10BattleText1 ; TextBeforeBattle
- dw Route10AfterBattleText1 ; TextAfterBattle
- dw Route10EndBattleText1 ; TextEndBattle
- dw Route10EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_10_TRAINER_0, 4, Route10BattleText1, Route10EndBattleText1, Route10AfterBattleText1
Route10TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_1
- dw Route10BattleText2 ; TextBeforeBattle
- dw Route10AfterBattleText2 ; TextAfterBattle
- dw Route10EndBattleText2 ; TextEndBattle
- dw Route10EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_10_TRAINER_1, 3, Route10BattleText2, Route10EndBattleText2, Route10AfterBattleText2
Route10TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_2
- dw Route10BattleText3 ; TextBeforeBattle
- dw Route10AfterBattleText3 ; TextAfterBattle
- dw Route10EndBattleText3 ; TextEndBattle
- dw Route10EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_10_TRAINER_2, 4, Route10BattleText3, Route10EndBattleText3, Route10AfterBattleText3
Route10TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_3
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_3
- dw Route10BattleText4 ; TextBeforeBattle
- dw Route10AfterBattleText4 ; TextAfterBattle
- dw Route10EndBattleText4 ; TextEndBattle
- dw Route10EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_10_TRAINER_3, 3, Route10BattleText4, Route10EndBattleText4, Route10AfterBattleText4
Route10TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_4
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_4
- dw Route10BattleText5 ; TextBeforeBattle
- dw Route10AfterBattleText5 ; TextAfterBattle
- dw Route10EndBattleText5 ; TextEndBattle
- dw Route10EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_10_TRAINER_4, 2, Route10BattleText5, Route10EndBattleText5, Route10AfterBattleText5
Route10TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_5
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_5
- dw Route10BattleText6 ; TextBeforeBattle
- dw Route10AfterBattleText6 ; TextAfterBattle
- dw Route10EndBattleText6 ; TextEndBattle
- dw Route10EndBattleText6 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_10_TRAINER_5, 2, Route10BattleText6, Route10EndBattleText6, Route10AfterBattleText6
+ db -1 ; end
Route10Text1:
- TX_ASM
+ text_asm
ld hl, Route10TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route10BattleText1:
- TX_FAR _Route10BattleText1
- db "@"
+ text_far _Route10BattleText1
+ text_end
Route10EndBattleText1:
- TX_FAR _Route10EndBattleText1
- db "@"
+ text_far _Route10EndBattleText1
+ text_end
Route10AfterBattleText1:
- TX_FAR _Route10AfterBattleText1
- db "@"
+ text_far _Route10AfterBattleText1
+ text_end
Route10Text2:
- TX_ASM
+ text_asm
ld hl, Route10TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route10BattleText2:
- TX_FAR _Route10BattleText2
- db "@"
+ text_far _Route10BattleText2
+ text_end
Route10EndBattleText2:
- TX_FAR _Route10EndBattleText2
- db "@"
+ text_far _Route10EndBattleText2
+ text_end
Route10AfterBattleText2:
- TX_FAR _Route10AfterBattleText2
- db "@"
+ text_far _Route10AfterBattleText2
+ text_end
Route10Text3:
- TX_ASM
+ text_asm
ld hl, Route10TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route10BattleText3:
- TX_FAR _Route10BattleText3
- db "@"
+ text_far _Route10BattleText3
+ text_end
Route10EndBattleText3:
- TX_FAR _Route10EndBattleText3
- db "@"
+ text_far _Route10EndBattleText3
+ text_end
Route10AfterBattleText3:
- TX_FAR _Route10AfterBattleText3
- db "@"
+ text_far _Route10AfterBattleText3
+ text_end
Route10Text4:
- TX_ASM
+ text_asm
ld hl, Route10TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route10BattleText4:
- TX_FAR _Route10BattleText4
- db "@"
+ text_far _Route10BattleText4
+ text_end
Route10EndBattleText4:
- TX_FAR _Route10EndBattleText4
- db "@"
+ text_far _Route10EndBattleText4
+ text_end
Route10AfterBattleText4:
- TX_FAR _Route10AfterBattleText4
- db "@"
+ text_far _Route10AfterBattleText4
+ text_end
Route10Text5:
- TX_ASM
+ text_asm
ld hl, Route10TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route10BattleText5:
- TX_FAR _Route10BattleText5
- db "@"
+ text_far _Route10BattleText5
+ text_end
Route10EndBattleText5:
- TX_FAR _Route10EndBattleText5
- db "@"
+ text_far _Route10EndBattleText5
+ text_end
Route10AfterBattleText5:
- TX_FAR _Route10AfterBattleText5
- db "@"
+ text_far _Route10AfterBattleText5
+ text_end
Route10Text6:
- TX_ASM
+ text_asm
ld hl, Route10TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route10BattleText6:
- TX_FAR _Route10BattleText6
- db "@"
+ text_far _Route10BattleText6
+ text_end
Route10EndBattleText6:
- TX_FAR _Route10EndBattleText6
- db "@"
+ text_far _Route10EndBattleText6
+ text_end
Route10AfterBattleText6:
- TX_FAR _Route10AfterBattleText6
- db "@"
+ text_far _Route10AfterBattleText6
+ text_end
Route10Text9:
Route10Text7:
- TX_FAR _Route10Text7 ; _Route10Text9
- db "@"
+ text_far _Route10Text7 ; _Route10Text9
+ text_end
Route10Text10:
- TX_FAR _Route10Text10
- db "@"
+ text_far _Route10Text10
+ text_end
diff --git a/scripts/Route11.asm b/scripts/Route11.asm
index 891237cc..924c0276 100755
--- a/scripts/Route11.asm
+++ b/scripts/Route11.asm
@@ -26,277 +26,207 @@ Route11_TextPointers:
dw Route11Text11
Route11TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_0
- dw Route11BattleText1 ; TextBeforeBattle
- dw Route11AfterBattleText1 ; TextAfterBattle
- dw Route11EndBattleText1 ; TextEndBattle
- dw Route11EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_0, 3, Route11BattleText1, Route11EndBattleText1, Route11AfterBattleText1
Route11TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_1
- dw Route11BattleText2 ; TextBeforeBattle
- dw Route11AfterBattleText2 ; TextAfterBattle
- dw Route11EndBattleText2 ; TextEndBattle
- dw Route11EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_1, 2, Route11BattleText2, Route11EndBattleText2, Route11AfterBattleText2
Route11TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_2
- dw Route11BattleText3 ; TextBeforeBattle
- dw Route11AfterBattleText3 ; TextAfterBattle
- dw Route11EndBattleText3 ; TextEndBattle
- dw Route11EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_2, 3, Route11BattleText3, Route11EndBattleText3, Route11AfterBattleText3
Route11TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_3
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_3
- dw Route11BattleText4 ; TextBeforeBattle
- dw Route11AfterBattleText4 ; TextAfterBattle
- dw Route11EndBattleText4 ; TextEndBattle
- dw Route11EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_3, 3, Route11BattleText4, Route11EndBattleText4, Route11AfterBattleText4
Route11TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_4
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_4
- dw Route11BattleText5 ; TextBeforeBattle
- dw Route11AfterBattleText5 ; TextAfterBattle
- dw Route11EndBattleText5 ; TextEndBattle
- dw Route11EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_4, 4, Route11BattleText5, Route11EndBattleText5, Route11AfterBattleText5
Route11TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_5
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_5
- dw Route11BattleText6 ; TextBeforeBattle
- dw Route11AfterBattleText6 ; TextAfterBattle
- dw Route11EndBattleText6 ; TextEndBattle
- dw Route11EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_5, 3, Route11BattleText6, Route11EndBattleText6, Route11AfterBattleText6
Route11TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_6
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_6
- dw Route11BattleText7 ; TextBeforeBattle
- dw Route11AfterBattleText7 ; TextAfterBattle
- dw Route11EndBattleText7 ; TextEndBattle
- dw Route11EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_6, 3, Route11BattleText7, Route11EndBattleText7, Route11AfterBattleText7
Route11TrainerHeader7:
- dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_7, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_7, 1
- dw Route11BattleText8 ; TextBeforeBattle
- dw Route11AfterBattleText8 ; TextAfterBattle
- dw Route11EndBattleText8 ; TextEndBattle
- dw Route11EndBattleText8 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_7, 1, 4, Route11BattleText8, Route11EndBattleText8, Route11AfterBattleText8
Route11TrainerHeader8:
- dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_8, 1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_8, 1
- dw Route11BattleText9 ; TextBeforeBattle
- dw Route11AfterBattleText9 ; TextAfterBattle
- dw Route11EndBattleText9 ; TextEndBattle
- dw Route11EndBattleText9 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_8, 1, 3, Route11BattleText9, Route11EndBattleText9, Route11AfterBattleText9
Route11TrainerHeader9:
- dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_9, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_9, 1
- dw Route11BattleText10 ; TextBeforeBattle
- dw Route11AfterBattleText10 ; TextAfterBattle
- dw Route11EndBattleText10 ; TextEndBattle
- dw Route11EndBattleText10 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_9, 1, 4, Route11BattleText10, Route11EndBattleText10, Route11AfterBattleText10
+ db -1 ; end
Route11Text1:
- TX_ASM
+ text_asm
ld hl, Route11TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route11BattleText1:
- TX_FAR _Route11BattleText1
- db "@"
+ text_far _Route11BattleText1
+ text_end
Route11EndBattleText1:
- TX_FAR _Route11EndBattleText1
- db "@"
+ text_far _Route11EndBattleText1
+ text_end
Route11AfterBattleText1:
- TX_FAR _Route11AfterBattleText1
- db "@"
+ text_far _Route11AfterBattleText1
+ text_end
Route11Text2:
- TX_ASM
+ text_asm
ld hl, Route11TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route11BattleText2:
- TX_FAR _Route11BattleText2
- db "@"
+ text_far _Route11BattleText2
+ text_end
Route11EndBattleText2:
- TX_FAR _Route11EndBattleText2
- db "@"
+ text_far _Route11EndBattleText2
+ text_end
Route11AfterBattleText2:
- TX_FAR _Route11AfterBattleText2
- db "@"
+ text_far _Route11AfterBattleText2
+ text_end
Route11Text3:
- TX_ASM
+ text_asm
ld hl, Route11TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route11BattleText3:
- TX_FAR _Route11BattleText3
- db "@"
+ text_far _Route11BattleText3
+ text_end
Route11EndBattleText3:
- TX_FAR _Route11EndBattleText3
- db "@"
+ text_far _Route11EndBattleText3
+ text_end
Route11AfterBattleText3:
- TX_FAR _Route11AfterBattleText3
- db "@"
+ text_far _Route11AfterBattleText3
+ text_end
Route11Text4:
- TX_ASM
+ text_asm
ld hl, Route11TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route11BattleText4:
- TX_FAR _Route11BattleText4
- db "@"
+ text_far _Route11BattleText4
+ text_end
Route11EndBattleText4:
- TX_FAR _Route11EndBattleText4
- db "@"
+ text_far _Route11EndBattleText4
+ text_end
Route11AfterBattleText4:
- TX_FAR _Route11AfterBattleText4
- db "@"
+ text_far _Route11AfterBattleText4
+ text_end
Route11Text5:
- TX_ASM
+ text_asm
ld hl, Route11TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route11BattleText5:
- TX_FAR _Route11BattleText5
- db "@"
+ text_far _Route11BattleText5
+ text_end
Route11EndBattleText5:
- TX_FAR _Route11EndBattleText5
- db "@"
+ text_far _Route11EndBattleText5
+ text_end
Route11AfterBattleText5:
- TX_FAR _Route11AfterBattleText5
- db "@"
+ text_far _Route11AfterBattleText5
+ text_end
Route11Text6:
- TX_ASM
+ text_asm
ld hl, Route11TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route11BattleText6:
- TX_FAR _Route11BattleText6
- db "@"
+ text_far _Route11BattleText6
+ text_end
Route11EndBattleText6:
- TX_FAR _Route11EndBattleText6
- db "@"
+ text_far _Route11EndBattleText6
+ text_end
Route11AfterBattleText6:
- TX_FAR _Route11AfterBattleText6
- db "@"
+ text_far _Route11AfterBattleText6
+ text_end
Route11Text7:
- TX_ASM
+ text_asm
ld hl, Route11TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route11BattleText7:
- TX_FAR _Route11BattleText7
- db "@"
+ text_far _Route11BattleText7
+ text_end
Route11EndBattleText7:
- TX_FAR _Route11EndBattleText7
- db "@"
+ text_far _Route11EndBattleText7
+ text_end
Route11AfterBattleText7:
- TX_FAR _Route11AfterBattleText7
- db "@"
+ text_far _Route11AfterBattleText7
+ text_end
Route11Text8:
- TX_ASM
+ text_asm
ld hl, Route11TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
Route11BattleText8:
- TX_FAR _Route11BattleText8
- db "@"
+ text_far _Route11BattleText8
+ text_end
Route11EndBattleText8:
- TX_FAR _Route11EndBattleText8
- db "@"
+ text_far _Route11EndBattleText8
+ text_end
Route11AfterBattleText8:
- TX_FAR _Route11AfterBattleText8
- db "@"
+ text_far _Route11AfterBattleText8
+ text_end
Route11Text9:
- TX_ASM
+ text_asm
ld hl, Route11TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
Route11BattleText9:
- TX_FAR _Route11BattleText9
- db "@"
+ text_far _Route11BattleText9
+ text_end
Route11EndBattleText9:
- TX_FAR _Route11EndBattleText9
- db "@"
+ text_far _Route11EndBattleText9
+ text_end
Route11AfterBattleText9:
- TX_FAR _Route11AfterBattleText9
- db "@"
+ text_far _Route11AfterBattleText9
+ text_end
Route11Text10:
- TX_ASM
+ text_asm
ld hl, Route11TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
Route11BattleText10:
- TX_FAR _Route11BattleText10
- db "@"
+ text_far _Route11BattleText10
+ text_end
Route11EndBattleText10:
- TX_FAR _Route11EndBattleText10
- db "@"
+ text_far _Route11EndBattleText10
+ text_end
Route11AfterBattleText10:
- TX_FAR _Route11AfterBattleText10
- db "@"
+ text_far _Route11AfterBattleText10
+ text_end
Route11Text11:
- TX_FAR _Route11Text11
- db "@"
+ text_far _Route11Text11
+ text_end
diff --git a/scripts/Route11Gate1F.asm b/scripts/Route11Gate1F.asm
index 8e5f6c03..d1ebe6ea 100755
--- a/scripts/Route11Gate1F.asm
+++ b/scripts/Route11Gate1F.asm
@@ -5,5 +5,5 @@ Route11Gate1F_TextPointers:
dw Route11GateText1
Route11GateText1:
- TX_FAR _Route11GateText1
- db "@"
+ text_far _Route11GateText1
+ text_end
diff --git a/scripts/Route11Gate2F.asm b/scripts/Route11Gate2F.asm
index fde7fdd6..65352cd9 100755
--- a/scripts/Route11Gate2F.asm
+++ b/scripts/Route11Gate2F.asm
@@ -8,21 +8,21 @@ Route11Gate2F_TextPointers:
dw Route11GateUpstairsText4
Route11GateUpstairsText1:
- TX_ASM
- ld a, $0
+ text_asm
+ ld a, TRADE_FOR_TERRY
ld [wWhichTrade], a
predef DoInGameTradeDialogue
Route11GateUpstairsScriptEnd:
jp TextScriptEnd
Route11GateUpstairsText2:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_ITEMFINDER, 1
- jr c, .asm_4949b
- ld a, 30 ; pokemon needed
- ld [hOaksAideRequirement], a
- ld a, ITEMFINDER ; oak's aide reward
- ld [hOaksAideRewardItem], a
+ jr c, .got_item
+ ld a, 30
+ ldh [hOaksAideRequirement], a
+ ld a, ITEMFINDER
+ ldh [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
ld h, d
@@ -31,22 +31,22 @@ Route11GateUpstairsText2:
ld bc, ITEM_NAME_LENGTH
call CopyData
predef OaksAideScript
- ld a, [hOaksAideResult]
- dec a
- jr nz, .asm_494a1
+ ldh a, [hOaksAideResult]
+ dec a ; OAKS_AIDE_GOT_ITEM?
+ jr nz, .no_item
SetEvent EVENT_GOT_ITEMFINDER
-.asm_4949b
+.got_item
ld hl, Route11GateUpstairsText_494a3
call PrintText
-.asm_494a1
+.no_item
jr Route11GateUpstairsScriptEnd
Route11GateUpstairsText_494a3:
- TX_FAR _Route11GateUpstairsText_494a3
- db "@"
+ text_far _Route11GateUpstairsText_494a3
+ text_end
Route11GateUpstairsText3:
- TX_ASM
+ text_asm
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
jp nz, GateUpstairsScript_PrintIfFacingUp
@@ -59,18 +59,18 @@ Route11GateUpstairsText3:
jp TextScriptEnd
BinocularsSnorlaxText:
- TX_FAR _BinocularsSnorlaxText
- db "@"
+ text_far _BinocularsSnorlaxText
+ text_end
BinocularsNoSnorlaxText:
- TX_FAR _BinocularsNoSnorlaxText
- db "@"
+ text_far _BinocularsNoSnorlaxText
+ text_end
Route11GateUpstairsText4:
- TX_ASM
+ text_asm
ld hl, Route11GateUpstairsText_494d5
jp GateUpstairsScript_PrintIfFacingUp
Route11GateUpstairsText_494d5:
- TX_FAR _Route11GateUpstairsText_494d5
- db "@"
+ text_far _Route11GateUpstairsText_494d5
+ text_end
diff --git a/scripts/Route12.asm b/scripts/Route12.asm
index 510e7727..3c0d77e1 100755
--- a/scripts/Route12.asm
+++ b/scripts/Route12.asm
@@ -27,7 +27,7 @@ Route12Script0:
ResetEventReuseHL EVENT_FIGHT_ROUTE12_SNORLAX
jp z, CheckFightingMapTrainers
ld a, $d
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, SNORLAX
ld [wCurOpponent], a
@@ -50,7 +50,7 @@ Route12Script3:
cp $2
jr z, .asm_59664
ld a, $e
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_59664
SetEvent EVENT_BEAT_ROUTE12_SNORLAX
@@ -77,212 +77,163 @@ Route12_TextPointers:
dw Route12Text14
Route12TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_0
- dw Route12BattleText1 ; TextBeforeBattle
- dw Route12AfterBattleText1 ; TextAfterBattle
- dw Route12EndBattleText1 ; TextEndBattle
- dw Route12EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_0, 4, Route12BattleText1, Route12EndBattleText1, Route12AfterBattleText1
Route12TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_1
- dw Route12BattleText2 ; TextBeforeBattle
- dw Route12AfterBattleText2 ; TextAfterBattle
- dw Route12EndBattleText2 ; TextEndBattle
- dw Route12EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_1, 4, Route12BattleText2, Route12EndBattleText2, Route12AfterBattleText2
Route12TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_2
- dw Route12BattleText3 ; TextBeforeBattle
- dw Route12AfterBattleText3 ; TextAfterBattle
- dw Route12EndBattleText3 ; TextEndBattle
- dw Route12EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_2, 4, Route12BattleText3, Route12EndBattleText3, Route12AfterBattleText3
Route12TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_3
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_3
- dw Route12BattleText4 ; TextBeforeBattle
- dw Route12AfterBattleText4 ; TextAfterBattle
- dw Route12EndBattleText4 ; TextEndBattle
- dw Route12EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_3, 4, Route12BattleText4, Route12EndBattleText4, Route12AfterBattleText4
Route12TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_4
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_4
- dw Route12BattleText5 ; TextBeforeBattle
- dw Route12AfterBattleText5 ; TextAfterBattle
- dw Route12EndBattleText5 ; TextEndBattle
- dw Route12EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_4, 4, Route12BattleText5, Route12EndBattleText5, Route12AfterBattleText5
Route12TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_5
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_5
- dw Route12BattleText6 ; TextBeforeBattle
- dw Route12AfterBattleText6 ; TextAfterBattle
- dw Route12EndBattleText6 ; TextEndBattle
- dw Route12EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_5, 4, Route12BattleText6, Route12EndBattleText6, Route12AfterBattleText6
Route12TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_6, 1
- db ($1 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_6, 1
- dw Route12BattleText7 ; TextBeforeBattle
- dw Route12AfterBattleText7 ; TextAfterBattle
- dw Route12EndBattleText7 ; TextEndBattle
- dw Route12EndBattleText7 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_6, 1, 1, Route12BattleText7, Route12EndBattleText7, Route12AfterBattleText7
+ db -1 ; end
Route12Text1:
- TX_FAR _Route12Text1
- db "@"
+ text_far _Route12Text1
+ text_end
Route12Text13:
- TX_FAR _Route12Text13
- db "@"
+ text_far _Route12Text13
+ text_end
Route12Text14:
- TX_FAR _Route12Text14
- db "@"
+ text_far _Route12Text14
+ text_end
Route12Text2:
- TX_ASM
+ text_asm
ld hl, Route12TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route12BattleText1:
- TX_FAR _Route12BattleText1
- db "@"
+ text_far _Route12BattleText1
+ text_end
Route12EndBattleText1:
- TX_FAR _Route12EndBattleText1
- db "@"
+ text_far _Route12EndBattleText1
+ text_end
Route12AfterBattleText1:
- TX_FAR _Route12AfterBattleText1
- db "@"
+ text_far _Route12AfterBattleText1
+ text_end
Route12Text3:
- TX_ASM
+ text_asm
ld hl, Route12TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route12BattleText2:
- TX_FAR _Route12BattleText2
- db "@"
+ text_far _Route12BattleText2
+ text_end
Route12EndBattleText2:
- TX_FAR _Route12EndBattleText2
- db "@"
+ text_far _Route12EndBattleText2
+ text_end
Route12AfterBattleText2:
- TX_FAR _Route12AfterBattleText2
- db "@"
+ text_far _Route12AfterBattleText2
+ text_end
Route12Text4:
- TX_ASM
+ text_asm
ld hl, Route12TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route12BattleText3:
- TX_FAR _Route12BattleText3
- db "@"
+ text_far _Route12BattleText3
+ text_end
Route12EndBattleText3:
- TX_FAR _Route12EndBattleText3
- db "@"
+ text_far _Route12EndBattleText3
+ text_end
Route12AfterBattleText3:
- TX_FAR _Route12AfterBattleText3
- db "@"
+ text_far _Route12AfterBattleText3
+ text_end
Route12Text5:
- TX_ASM
+ text_asm
ld hl, Route12TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route12BattleText4:
- TX_FAR _Route12BattleText4
- db "@"
+ text_far _Route12BattleText4
+ text_end
Route12EndBattleText4:
- TX_FAR _Route12EndBattleText4
- db "@"
+ text_far _Route12EndBattleText4
+ text_end
Route12AfterBattleText4:
- TX_FAR _Route12AfterBattleText4
- db "@"
+ text_far _Route12AfterBattleText4
+ text_end
Route12Text6:
- TX_ASM
+ text_asm
ld hl, Route12TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route12BattleText5:
- TX_FAR _Route12BattleText5
- db "@"
+ text_far _Route12BattleText5
+ text_end
Route12EndBattleText5:
- TX_FAR _Route12EndBattleText5
- db "@"
+ text_far _Route12EndBattleText5
+ text_end
Route12AfterBattleText5:
- TX_FAR _Route12AfterBattleText5
- db "@"
+ text_far _Route12AfterBattleText5
+ text_end
Route12Text7:
- TX_ASM
+ text_asm
ld hl, Route12TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route12BattleText6:
- TX_FAR _Route12BattleText6
- db "@"
+ text_far _Route12BattleText6
+ text_end
Route12EndBattleText6:
- TX_FAR _Route12EndBattleText6
- db "@"
+ text_far _Route12EndBattleText6
+ text_end
Route12AfterBattleText6:
- TX_FAR _Route12AfterBattleText6
- db "@"
+ text_far _Route12AfterBattleText6
+ text_end
Route12Text8:
- TX_ASM
+ text_asm
ld hl, Route12TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route12BattleText7:
- TX_FAR _Route12BattleText7
- db "@"
+ text_far _Route12BattleText7
+ text_end
Route12EndBattleText7:
- TX_FAR _Route12EndBattleText7
- db "@"
+ text_far _Route12EndBattleText7
+ text_end
Route12AfterBattleText7:
- TX_FAR _Route12AfterBattleText7
- db "@"
+ text_far _Route12AfterBattleText7
+ text_end
Route12Text11:
- TX_FAR _Route12Text11
- db "@"
+ text_far _Route12Text11
+ text_end
Route12Text12:
- TX_FAR _Route12Text12
- db "@"
+ text_far _Route12Text12
+ text_end
diff --git a/scripts/Route12Gate1F.asm b/scripts/Route12Gate1F.asm
index 52d427ee..72f2dfbf 100755
--- a/scripts/Route12Gate1F.asm
+++ b/scripts/Route12Gate1F.asm
@@ -5,5 +5,5 @@ Route12Gate1F_TextPointers:
dw Route12GateText1
Route12GateText1:
- TX_FAR _Route12GateText1
- db "@"
+ text_far _Route12GateText1
+ text_end
diff --git a/scripts/Route12Gate2F.asm b/scripts/Route12Gate2F.asm
index 4fe120e8..2174fba8 100755
--- a/scripts/Route12Gate2F.asm
+++ b/scripts/Route12Gate2F.asm
@@ -7,68 +7,68 @@ Route12Gate2F_TextPointers:
dw Route12GateUpstairsText3
Route12GateUpstairsText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_TM39, 1
- jr c, .asm_0ad3c
+ jr c, .got_item
ld hl, TM39PreReceiveText
call PrintText
- lb bc, TM_39, 1
+ lb bc, TM_SWIFT, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM39Text
call PrintText
SetEvent EVENT_GOT_TM39
- jr .asm_4ba56
-.BagFull
+ jr .done
+.bag_full
ld hl, TM39NoRoomText
call PrintText
- jr .asm_4ba56
-.asm_0ad3c
+ jr .done
+.got_item
ld hl, TM39ExplanationText
call PrintText
-.asm_4ba56
+.done
jp TextScriptEnd
TM39PreReceiveText:
- TX_FAR _TM39PreReceiveText
- db "@"
+ text_far _TM39PreReceiveText
+ text_end
ReceivedTM39Text:
- TX_FAR _ReceivedTM39Text
- TX_SFX_ITEM_1
- db "@"
+ text_far _ReceivedTM39Text
+ sound_get_item_1
+ text_end
TM39ExplanationText:
- TX_FAR _TM39ExplanationText
- db "@"
+ text_far _TM39ExplanationText
+ text_end
TM39NoRoomText:
- TX_FAR _TM39NoRoomText
- db "@"
+ text_far _TM39NoRoomText
+ text_end
Route12GateUpstairsText2:
- TX_ASM
+ text_asm
ld hl, Route12GateUpstairsText_495b8
jp GateUpstairsScript_PrintIfFacingUp
Route12GateUpstairsText_495b8:
- TX_FAR _Route12GateUpstairsText_495b8
- db "@"
+ text_far _Route12GateUpstairsText_495b8
+ text_end
Route12GateUpstairsText3:
- TX_ASM
+ text_asm
ld hl, Route12GateUpstairsText_495c4
jp GateUpstairsScript_PrintIfFacingUp
Route12GateUpstairsText_495c4:
- TX_FAR _Route12GateUpstairsText_495c4
- db "@"
+ text_far _Route12GateUpstairsText_495c4
+ text_end
GateUpstairsScript_PrintIfFacingUp:
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
jr z, .up
- ld a, $1
+ ld a, TRUE
jr .done
.up
call PrintText
diff --git a/scripts/Route12SuperRodHouse.asm b/scripts/Route12SuperRodHouse.asm
index de8ed8f0..fba5426e 100755
--- a/scripts/Route12SuperRodHouse.asm
+++ b/scripts/Route12SuperRodHouse.asm
@@ -5,53 +5,53 @@ Route12SuperRodHouse_TextPointers:
dw Route12HouseText1
Route12HouseText1:
- TX_ASM
+ text_asm
ld a, [wd728]
- bit 5, a
- jr nz, .asm_b4cad
+ bit 5, a ; received super rod?
+ jr nz, .got_item
ld hl, Route12HouseText_564c0
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_a2d76
+ jr nz, .refused
lb bc, SUPER_ROD, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, wd728
- set 5, [hl]
+ set 5, [hl] ; received super rod
ld hl, Route12HouseText_564c5
- jr .asm_df984
-.BagFull
+ jr .done
+.bag_full
ld hl, Route12HouseText_564d9
- jr .asm_df984
-.asm_a2d76
+ jr .done
+.refused
ld hl, Route12HouseText_564cf
- jr .asm_df984
-.asm_b4cad
+ jr .done
+.got_item
ld hl, Route12HouseText_564d4
-.asm_df984
+.done
call PrintText
jp TextScriptEnd
Route12HouseText_564c0:
- TX_FAR _Route12HouseText_564c0
- db "@"
+ text_far _Route12HouseText_564c0
+ text_end
Route12HouseText_564c5:
- TX_FAR _Route12HouseText_564c5
- TX_SFX_ITEM_1
- TX_FAR _Route12HouseText_564ca
- db "@"
+ text_far _Route12HouseText_564c5
+ sound_get_item_1
+ text_far _Route12HouseText_564ca
+ text_end
Route12HouseText_564cf:
- TX_FAR _Route12HouseText_564cf
- db "@"
+ text_far _Route12HouseText_564cf
+ text_end
Route12HouseText_564d4:
- TX_FAR _Route12HouseText_564d4
- db "@"
+ text_far _Route12HouseText_564d4
+ text_end
Route12HouseText_564d9:
- TX_FAR _Route12HouseText_564d9
- db "@"
+ text_far _Route12HouseText_564d9
+ text_end
diff --git a/scripts/Route13.asm b/scripts/Route13.asm
index 8f92147e..c01ed514 100755
--- a/scripts/Route13.asm
+++ b/scripts/Route13.asm
@@ -28,285 +28,215 @@ Route13_TextPointers:
dw Route13Text13
Route13TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_0
- dw Route13BattleText2 ; TextBeforeBattle
- dw Route13AfterBattleText2 ; TextAfterBattle
- dw Route13EndBattleText2 ; TextEndBattle
- dw Route13EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_0, 2, Route13BattleText2, Route13EndBattleText2, Route13AfterBattleText2
Route13TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_1
- dw Route13BattleText3 ; TextBeforeBattle
- dw Route13AfterBattleText3 ; TextAfterBattle
- dw Route13EndBattleText3 ; TextEndBattle
- dw Route13EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_1, 2, Route13BattleText3, Route13EndBattleText3, Route13AfterBattleText3
Route13TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_2
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_2
- dw Route13BattleText4 ; TextBeforeBattle
- dw Route13AfterBattleText4 ; TextAfterBattle
- dw Route13EndBattleText4 ; TextEndBattle
- dw Route13EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_2, 2, Route13BattleText4, Route13EndBattleText4, Route13AfterBattleText4
Route13TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_3
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_3
- dw Route13BattleText5 ; TextBeforeBattle
- dw Route13AfterBattleText5 ; TextAfterBattle
- dw Route13EndBattleText5 ; TextEndBattle
- dw Route13EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_3, 2, Route13BattleText5, Route13EndBattleText5, Route13AfterBattleText5
Route13TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_4
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_4
- dw Route13BattleText6 ; TextBeforeBattle
- dw Route13AfterBattleText6 ; TextAfterBattle
- dw Route13EndBattleText6 ; TextEndBattle
- dw Route13EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_4, 4, Route13BattleText6, Route13EndBattleText6, Route13AfterBattleText6
Route13TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_5
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_5
- dw Route13BattleText7 ; TextBeforeBattle
- dw Route13AfterBattleText7 ; TextAfterBattle
- dw Route13EndBattleText7 ; TextEndBattle
- dw Route13EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_5, 2, Route13BattleText7, Route13EndBattleText7, Route13AfterBattleText7
Route13TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_6
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_6
- dw Route13BattleText8 ; TextBeforeBattle
- dw Route13AfterBattleText8 ; TextAfterBattle
- dw Route13EndBattleText8 ; TextEndBattle
- dw Route13EndBattleText8 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_6, 4, Route13BattleText8, Route13EndBattleText8, Route13AfterBattleText8
Route13TrainerHeader7:
- dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_7, 1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_7, 1
- dw Route13BattleText9 ; TextBeforeBattle
- dw Route13AfterBattleText9 ; TextAfterBattle
- dw Route13EndBattleText9 ; TextEndBattle
- dw Route13EndBattleText9 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_7, 1, 2, Route13BattleText9, Route13EndBattleText9, Route13AfterBattleText9
Route13TrainerHeader8:
- dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_8, 1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_8, 1
- dw Route13BattleText10 ; TextBeforeBattle
- dw Route13AfterBattleText10 ; TextAfterBattle
- dw Route13EndBattleText10 ; TextEndBattle
- dw Route13EndBattleText10 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_8, 1, 2, Route13BattleText10, Route13EndBattleText10, Route13AfterBattleText10
Route13TrainerHeader9:
- dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_9, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_9, 1
- dw Route13BattleText11 ; TextBeforeBattle
- dw Route13AfterBattleText11 ; TextAfterBattle
- dw Route13EndBattleText11 ; TextEndBattle
- dw Route13EndBattleText11 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_9, 1, 4, Route13BattleText11, Route13EndBattleText11, Route13AfterBattleText11
+ db -1 ; end
Route13Text1:
- TX_ASM
+ text_asm
ld hl, Route13TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route13BattleText2:
- TX_FAR _Route13BattleText2
- db "@"
+ text_far _Route13BattleText2
+ text_end
Route13EndBattleText2:
- TX_FAR _Route13EndBattleText2
- db "@"
+ text_far _Route13EndBattleText2
+ text_end
Route13AfterBattleText2:
- TX_FAR _Route13AfterBattleText2
- db "@"
+ text_far _Route13AfterBattleText2
+ text_end
Route13Text2:
- TX_ASM
+ text_asm
ld hl, Route13TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route13BattleText3:
- TX_FAR _Route13BattleText3
- db "@"
+ text_far _Route13BattleText3
+ text_end
Route13EndBattleText3:
- TX_FAR _Route13EndBattleText3
- db "@"
+ text_far _Route13EndBattleText3
+ text_end
Route13AfterBattleText3:
- TX_FAR _Route13AfterBattleText3
- db "@"
+ text_far _Route13AfterBattleText3
+ text_end
Route13Text3:
- TX_ASM
+ text_asm
ld hl, Route13TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route13BattleText4:
- TX_FAR _Route13BattleText4
- db "@"
+ text_far _Route13BattleText4
+ text_end
Route13EndBattleText4:
- TX_FAR _Route13EndBattleText4
- db "@"
+ text_far _Route13EndBattleText4
+ text_end
Route13AfterBattleText4:
- TX_FAR _Route13AfterBattleText4
- db "@"
+ text_far _Route13AfterBattleText4
+ text_end
Route13Text4:
- TX_ASM
+ text_asm
ld hl, Route13TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route13BattleText5:
- TX_FAR _Route13BattleText5
- db "@"
+ text_far _Route13BattleText5
+ text_end
Route13EndBattleText5:
- TX_FAR _Route13EndBattleText5
- db "@"
+ text_far _Route13EndBattleText5
+ text_end
Route13AfterBattleText5:
- TX_FAR _Route13AfterBattleText5
- db "@"
+ text_far _Route13AfterBattleText5
+ text_end
Route13Text5:
- TX_ASM
+ text_asm
ld hl, Route13TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route13BattleText6:
- TX_FAR _Route13BattleText6
- db "@"
+ text_far _Route13BattleText6
+ text_end
Route13EndBattleText6:
- TX_FAR _Route13EndBattleText6
- db "@"
+ text_far _Route13EndBattleText6
+ text_end
Route13AfterBattleText6:
- TX_FAR _Route13AfterBattleText6
- db "@"
+ text_far _Route13AfterBattleText6
+ text_end
Route13Text6:
- TX_ASM
+ text_asm
ld hl, Route13TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route13BattleText7:
- TX_FAR _Route13BattleText7
- db "@"
+ text_far _Route13BattleText7
+ text_end
Route13EndBattleText7:
- TX_FAR _Route13EndBattleText7
- db "@"
+ text_far _Route13EndBattleText7
+ text_end
Route13AfterBattleText7:
- TX_FAR _Route13AfterBattleText7
- db "@"
+ text_far _Route13AfterBattleText7
+ text_end
Route13Text7:
- TX_ASM
+ text_asm
ld hl, Route13TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route13BattleText8:
- TX_FAR _Route13BattleText8
- db "@"
+ text_far _Route13BattleText8
+ text_end
Route13EndBattleText8:
- TX_FAR _Route13EndBattleText8
- db "@"
+ text_far _Route13EndBattleText8
+ text_end
Route13AfterBattleText8:
- TX_FAR _Route13AfterBattleText8
- db "@"
+ text_far _Route13AfterBattleText8
+ text_end
Route13Text8:
- TX_ASM
+ text_asm
ld hl, Route13TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
Route13BattleText9:
- TX_FAR _Route13BattleText9
- db "@"
+ text_far _Route13BattleText9
+ text_end
Route13EndBattleText9:
- TX_FAR _Route13EndBattleText9
- db "@"
+ text_far _Route13EndBattleText9
+ text_end
Route13AfterBattleText9:
- TX_FAR _Route13AfterBattleText9
- db "@"
+ text_far _Route13AfterBattleText9
+ text_end
Route13Text9:
- TX_ASM
+ text_asm
ld hl, Route13TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
Route13BattleText10:
- TX_FAR _Route13BattleText10
- db "@"
+ text_far _Route13BattleText10
+ text_end
Route13EndBattleText10:
- TX_FAR _Route13EndBattleText10
- db "@"
+ text_far _Route13EndBattleText10
+ text_end
Route13AfterBattleText10:
- TX_FAR _Route13AfterBattleText10
- db "@"
+ text_far _Route13AfterBattleText10
+ text_end
Route13Text10:
- TX_ASM
+ text_asm
ld hl, Route13TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
Route13BattleText11:
- TX_FAR _Route13BattleText11
- db "@"
+ text_far _Route13BattleText11
+ text_end
Route13EndBattleText11:
- TX_FAR _Route13EndBattleText11
- db "@"
+ text_far _Route13EndBattleText11
+ text_end
Route13AfterBattleText11:
- TX_FAR _Route13AfterBattleText11
- db "@"
+ text_far _Route13AfterBattleText11
+ text_end
Route13Text11:
- TX_FAR _Route13Text11
- db "@"
+ text_far _Route13Text11
+ text_end
Route13Text12:
- TX_FAR _Route13Text12
- db "@"
+ text_far _Route13Text12
+ text_end
Route13Text13:
- TX_FAR _Route13Text13
- db "@"
+ text_far _Route13Text13
+ text_end
diff --git a/scripts/Route14.asm b/scripts/Route14.asm
index fdc84d74..988fbe32 100755
--- a/scripts/Route14.asm
+++ b/scripts/Route14.asm
@@ -26,277 +26,207 @@ Route14_TextPointers:
dw Route14Text11
Route14TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_0
- dw Route14BattleText1 ; TextBeforeBattle
- dw Route14AfterBattleText1 ; TextAfterBattle
- dw Route14EndBattleText1 ; TextEndBattle
- dw Route14EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_0, 2, Route14BattleText1, Route14EndBattleText1, Route14AfterBattleText1
Route14TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_1
- dw Route14BattleText2 ; TextBeforeBattle
- dw Route14AfterBattleText2 ; TextAfterBattle
- dw Route14EndBattleText2 ; TextEndBattle
- dw Route14EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_1, 2, Route14BattleText2, Route14EndBattleText2, Route14AfterBattleText2
Route14TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_2
- dw Route14BattleText3 ; TextBeforeBattle
- dw Route14AfterBattleText3 ; TextAfterBattle
- dw Route14EndBattleText3 ; TextEndBattle
- dw Route14EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_2, 4, Route14BattleText3, Route14EndBattleText3, Route14AfterBattleText3
Route14TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_3
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_3
- dw Route14BattleText4 ; TextBeforeBattle
- dw Route14AfterBattleText4 ; TextAfterBattle
- dw Route14EndBattleText4 ; TextEndBattle
- dw Route14EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_3, 3, Route14BattleText4, Route14EndBattleText4, Route14AfterBattleText4
Route14TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_4
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_4
- dw Route14BattleText5 ; TextBeforeBattle
- dw Route14AfterBattleText5 ; TextAfterBattle
- dw Route14EndBattleText5 ; TextEndBattle
- dw Route14EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_4, 3, Route14BattleText5, Route14EndBattleText5, Route14AfterBattleText5
Route14TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_5
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_5
- dw Route14BattleText6 ; TextBeforeBattle
- dw Route14AfterBattleText6 ; TextAfterBattle
- dw Route14EndBattleText6 ; TextEndBattle
- dw Route14EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_5, 4, Route14BattleText6, Route14EndBattleText6, Route14AfterBattleText6
Route14TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_6
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_6
- dw Route14BattleText7 ; TextBeforeBattle
- dw Route14AfterBattleText7 ; TextAfterBattle
- dw Route14EndBattleText7 ; TextEndBattle
- dw Route14EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_6, 4, Route14BattleText7, Route14EndBattleText7, Route14AfterBattleText7
Route14TrainerHeader7:
- dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_7, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_7, 1
- dw Route14BattleText8 ; TextBeforeBattle
- dw Route14AfterBattleText8 ; TextAfterBattle
- dw Route14EndBattleText8 ; TextEndBattle
- dw Route14EndBattleText8 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_7, 1, 4, Route14BattleText8, Route14EndBattleText8, Route14AfterBattleText8
Route14TrainerHeader8:
- dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_8, 1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_8, 1
- dw Route14BattleText9 ; TextBeforeBattle
- dw Route14AfterBattleText9 ; TextAfterBattle
- dw Route14EndBattleText9 ; TextEndBattle
- dw Route14EndBattleText9 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_8, 1, 3, Route14BattleText9, Route14EndBattleText9, Route14AfterBattleText9
Route14TrainerHeader9:
- dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_9, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_9, 1
- dw Route14BattleText10 ; TextBeforeBattle
- dw Route14AfterBattleText10 ; TextAfterBattle
- dw Route14EndBattleText10 ; TextEndBattle
- dw Route14EndBattleText10 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_9, 1, 4, Route14BattleText10, Route14EndBattleText10, Route14AfterBattleText10
+ db -1 ; end
Route14Text1:
- TX_ASM
+ text_asm
ld hl, Route14TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route14BattleText1:
- TX_FAR _Route14BattleText1
- db "@"
+ text_far _Route14BattleText1
+ text_end
Route14EndBattleText1:
- TX_FAR _Route14EndBattleText1
- db "@"
+ text_far _Route14EndBattleText1
+ text_end
Route14AfterBattleText1:
- TX_FAR _Route14AfterBattleText1
- db "@"
+ text_far _Route14AfterBattleText1
+ text_end
Route14Text2:
- TX_ASM
+ text_asm
ld hl, Route14TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route14BattleText2:
- TX_FAR _Route14BattleText2
- db "@"
+ text_far _Route14BattleText2
+ text_end
Route14EndBattleText2:
- TX_FAR _Route14EndBattleText2
- db "@"
+ text_far _Route14EndBattleText2
+ text_end
Route14AfterBattleText2:
- TX_FAR _Route14AfterBattleText2
- db "@"
+ text_far _Route14AfterBattleText2
+ text_end
Route14Text3:
- TX_ASM
+ text_asm
ld hl, Route14TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route14BattleText3:
- TX_FAR _Route14BattleText3
- db "@"
+ text_far _Route14BattleText3
+ text_end
Route14EndBattleText3:
- TX_FAR _Route14EndBattleText3
- db "@"
+ text_far _Route14EndBattleText3
+ text_end
Route14AfterBattleText3:
- TX_FAR _Route14AfterBattleText3
- db "@"
+ text_far _Route14AfterBattleText3
+ text_end
Route14Text4:
- TX_ASM
+ text_asm
ld hl, Route14TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route14BattleText4:
- TX_FAR _Route14BattleText4
- db "@"
+ text_far _Route14BattleText4
+ text_end
Route14EndBattleText4:
- TX_FAR _Route14EndBattleText4
- db "@"
+ text_far _Route14EndBattleText4
+ text_end
Route14AfterBattleText4:
- TX_FAR _Route14AfterBattleText4
- db "@"
+ text_far _Route14AfterBattleText4
+ text_end
Route14Text5:
- TX_ASM
+ text_asm
ld hl, Route14TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route14BattleText5:
- TX_FAR _Route14BattleText5
- db "@"
+ text_far _Route14BattleText5
+ text_end
Route14EndBattleText5:
- TX_FAR _Route14EndBattleText5
- db "@"
+ text_far _Route14EndBattleText5
+ text_end
Route14AfterBattleText5:
- TX_FAR _Route14AfterBattleText5
- db "@"
+ text_far _Route14AfterBattleText5
+ text_end
Route14Text6:
- TX_ASM
+ text_asm
ld hl, Route14TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route14BattleText6:
- TX_FAR _Route14BattleText6
- db "@"
+ text_far _Route14BattleText6
+ text_end
Route14EndBattleText6:
- TX_FAR _Route14EndBattleText6
- db "@"
+ text_far _Route14EndBattleText6
+ text_end
Route14AfterBattleText6:
- TX_FAR _Route14AfterBattleText6
- db "@"
+ text_far _Route14AfterBattleText6
+ text_end
Route14Text7:
- TX_ASM
+ text_asm
ld hl, Route14TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route14BattleText7:
- TX_FAR _Route14BattleText7
- db "@"
+ text_far _Route14BattleText7
+ text_end
Route14EndBattleText7:
- TX_FAR _Route14EndBattleText7
- db "@"
+ text_far _Route14EndBattleText7
+ text_end
Route14AfterBattleText7:
- TX_FAR _Route14AfterBattleText7
- db "@"
+ text_far _Route14AfterBattleText7
+ text_end
Route14Text8:
- TX_ASM
+ text_asm
ld hl, Route14TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
Route14BattleText8:
- TX_FAR _Route14BattleText8
- db "@"
+ text_far _Route14BattleText8
+ text_end
Route14EndBattleText8:
- TX_FAR _Route14EndBattleText8
- db "@"
+ text_far _Route14EndBattleText8
+ text_end
Route14AfterBattleText8:
- TX_FAR _Route14AfterBattleText8
- db "@"
+ text_far _Route14AfterBattleText8
+ text_end
Route14Text9:
- TX_ASM
+ text_asm
ld hl, Route14TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
Route14BattleText9:
- TX_FAR _Route14BattleText9
- db "@"
+ text_far _Route14BattleText9
+ text_end
Route14EndBattleText9:
- TX_FAR _Route14EndBattleText9
- db "@"
+ text_far _Route14EndBattleText9
+ text_end
Route14AfterBattleText9:
- TX_FAR _Route14AfterBattleText9
- db "@"
+ text_far _Route14AfterBattleText9
+ text_end
Route14Text10:
- TX_ASM
+ text_asm
ld hl, Route14TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
Route14BattleText10:
- TX_FAR _Route14BattleText10
- db "@"
+ text_far _Route14BattleText10
+ text_end
Route14EndBattleText10:
- TX_FAR _Route14EndBattleText10
- db "@"
+ text_far _Route14EndBattleText10
+ text_end
Route14AfterBattleText10:
- TX_FAR _Route14AfterBattleText10
- db "@"
+ text_far _Route14AfterBattleText10
+ text_end
Route14Text11:
- TX_FAR _Route14Text11
- db "@"
+ text_far _Route14Text11
+ text_end
diff --git a/scripts/Route15.asm b/scripts/Route15.asm
index d973eb9c..3eed25d5 100755
--- a/scripts/Route15.asm
+++ b/scripts/Route15.asm
@@ -27,269 +27,199 @@ Route15_TextPointers:
dw Route15Text12
Route15TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_0
- dw Route15BattleText1 ; TextBeforeBattle
- dw Route15AfterBattleText1 ; TextAfterBattle
- dw Route15EndBattleText1 ; TextEndBattle
- dw Route15EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_0, 2, Route15BattleText1, Route15EndBattleText1, Route15AfterBattleText1
Route15TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_1
- dw Route15BattleText2 ; TextBeforeBattle
- dw Route15AfterBattleText2 ; TextAfterBattle
- dw Route15EndBattleText2 ; TextEndBattle
- dw Route15EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_1, 3, Route15BattleText2, Route15EndBattleText2, Route15AfterBattleText2
Route15TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_2
- dw Route15BattleText3 ; TextBeforeBattle
- dw Route15AfterBattleText3 ; TextAfterBattle
- dw Route15EndBattleText3 ; TextEndBattle
- dw Route15EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_2, 3, Route15BattleText3, Route15EndBattleText3, Route15AfterBattleText3
Route15TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_3
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_3
- dw Route15BattleText4 ; TextBeforeBattle
- dw Route15AfterBattleText4 ; TextAfterBattle
- dw Route15EndBattleText4 ; TextEndBattle
- dw Route15EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_3, 3, Route15BattleText4, Route15EndBattleText4, Route15AfterBattleText4
Route15TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_4
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_4
- dw Route15BattleText5 ; TextBeforeBattle
- dw Route15AfterBattleText5 ; TextAfterBattle
- dw Route15EndBattleText5 ; TextEndBattle
- dw Route15EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_4, 2, Route15BattleText5, Route15EndBattleText5, Route15AfterBattleText5
Route15TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_5
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_5
- dw Route15BattleText6 ; TextBeforeBattle
- dw Route15AfterBattleText6 ; TextAfterBattle
- dw Route15EndBattleText6 ; TextEndBattle
- dw Route15EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_5, 3, Route15BattleText6, Route15EndBattleText6, Route15AfterBattleText6
Route15TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_6
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_6
- dw Route15BattleText7 ; TextBeforeBattle
- dw Route15AfterBattleText7 ; TextAfterBattle
- dw Route15EndBattleText7 ; TextEndBattle
- dw Route15EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_6, 3, Route15BattleText7, Route15EndBattleText7, Route15AfterBattleText7
Route15TrainerHeader7:
- dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_7, 1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_7, 1
- dw Route15BattleText8 ; TextBeforeBattle
- dw Route15AfterBattleText8 ; TextAfterBattle
- dw Route15EndBattleText8 ; TextEndBattle
- dw Route15EndBattleText8 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_7, 1, 3, Route15BattleText8, Route15EndBattleText8, Route15AfterBattleText8
Route15TrainerHeader8:
- dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_8, 1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_8, 1
- dw Route15BattleText9 ; TextBeforeBattle
- dw Route15AfterBattleText9 ; TextAfterBattle
- dw Route15EndBattleText9 ; TextEndBattle
- dw Route15EndBattleText9 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_8, 1, 3, Route15BattleText9, Route15EndBattleText9, Route15AfterBattleText9
Route15TrainerHeader9:
- dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_9, 1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_9, 1
- dw Route15BattleText10 ; TextBeforeBattle
- dw Route15AfterBattleText10 ; TextAfterBattle
- dw Route15EndBattleText10 ; TextEndBattle
- dw Route15EndBattleText10 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_9, 1, 3, Route15BattleText10, Route15EndBattleText10, Route15AfterBattleText10
+ db -1 ; end
Route15Text1:
- TX_ASM
+ text_asm
ld hl, Route15TrainerHeader0
jr Route15TalkToTrainer
Route15Text2:
- TX_ASM
+ text_asm
ld hl, Route15TrainerHeader1
jr Route15TalkToTrainer
Route15Text3:
- TX_ASM
+ text_asm
ld hl, Route15TrainerHeader2
jr Route15TalkToTrainer
Route15Text4:
- TX_ASM
+ text_asm
ld hl, Route15TrainerHeader3
jr Route15TalkToTrainer
Route15Text5:
- TX_ASM
+ text_asm
ld hl, Route15TrainerHeader4
jr Route15TalkToTrainer
Route15Text6:
- TX_ASM
+ text_asm
ld hl, Route15TrainerHeader5
jr Route15TalkToTrainer
Route15Text7:
- TX_ASM
+ text_asm
ld hl, Route15TrainerHeader6
jr Route15TalkToTrainer
Route15Text8:
- TX_ASM
+ text_asm
ld hl, Route15TrainerHeader7
jr Route15TalkToTrainer
Route15Text9:
- TX_ASM
+ text_asm
ld hl, Route15TrainerHeader8
jr Route15TalkToTrainer
Route15Text10:
- TX_ASM
+ text_asm
ld hl, Route15TrainerHeader9
Route15TalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
Route15BattleText1:
- TX_FAR _Route15BattleText1
- db "@"
+ text_far _Route15BattleText1
+ text_end
Route15EndBattleText1:
- TX_FAR _Route15EndBattleText1
- db "@"
+ text_far _Route15EndBattleText1
+ text_end
Route15AfterBattleText1:
- TX_FAR _Route15AfterBattleText1
- db "@"
+ text_far _Route15AfterBattleText1
+ text_end
Route15BattleText2:
- TX_FAR _Route15BattleText2
- db "@"
+ text_far _Route15BattleText2
+ text_end
Route15EndBattleText2:
- TX_FAR _Route15EndBattleText2
- db "@"
+ text_far _Route15EndBattleText2
+ text_end
Route15AfterBattleText2:
- TX_FAR _Route15AfterBattleText2
- db "@"
+ text_far _Route15AfterBattleText2
+ text_end
Route15BattleText3:
- TX_FAR _Route15BattleText3
- db "@"
+ text_far _Route15BattleText3
+ text_end
Route15EndBattleText3:
- TX_FAR _Route15EndBattleText3
- db "@"
+ text_far _Route15EndBattleText3
+ text_end
Route15AfterBattleText3:
- TX_FAR _Route15AfterBattleText3
- db "@"
+ text_far _Route15AfterBattleText3
+ text_end
Route15BattleText4:
- TX_FAR _Route15BattleText4
- db "@"
+ text_far _Route15BattleText4
+ text_end
Route15EndBattleText4:
- TX_FAR _Route15EndBattleText4
- db "@"
+ text_far _Route15EndBattleText4
+ text_end
Route15AfterBattleText4:
- TX_FAR _Route15AfterBattleText4
- db "@"
+ text_far _Route15AfterBattleText4
+ text_end
Route15BattleText5:
- TX_FAR _Route15BattleText5
- db "@"
+ text_far _Route15BattleText5
+ text_end
Route15EndBattleText5:
- TX_FAR _Route15EndBattleText5
- db "@"
+ text_far _Route15EndBattleText5
+ text_end
Route15AfterBattleText5:
- TX_FAR _Route15AfterBattleText5
- db "@"
+ text_far _Route15AfterBattleText5
+ text_end
Route15BattleText6:
- TX_FAR _Route15BattleText6
- db "@"
+ text_far _Route15BattleText6
+ text_end
Route15EndBattleText6:
- TX_FAR _Route15EndBattleText6
- db "@"
+ text_far _Route15EndBattleText6
+ text_end
Route15AfterBattleText6:
- TX_FAR _Route15AfterBattleText6
- db "@"
+ text_far _Route15AfterBattleText6
+ text_end
Route15BattleText7:
- TX_FAR _Route15BattleText7
- db "@"
+ text_far _Route15BattleText7
+ text_end
Route15EndBattleText7:
- TX_FAR _Route15EndBattleText7
- db "@"
+ text_far _Route15EndBattleText7
+ text_end
Route15AfterBattleText7:
- TX_FAR _Route15AfterBattleText7
- db "@"
+ text_far _Route15AfterBattleText7
+ text_end
Route15BattleText8:
- TX_FAR _Route15BattleText8
- db "@"
+ text_far _Route15BattleText8
+ text_end
Route15EndBattleText8:
- TX_FAR _Route15EndBattleText8
- db "@"
+ text_far _Route15EndBattleText8
+ text_end
Route15AfterBattleText8:
- TX_FAR _Route15AfterBattleText8
- db "@"
+ text_far _Route15AfterBattleText8
+ text_end
Route15BattleText9:
- TX_FAR _Route15BattleText9
- db "@"
+ text_far _Route15BattleText9
+ text_end
Route15EndBattleText9:
- TX_FAR _Route15EndBattleText9
- db "@"
+ text_far _Route15EndBattleText9
+ text_end
Route15AfterBattleText9:
- TX_FAR _Route15AfterBattleText9
- db "@"
+ text_far _Route15AfterBattleText9
+ text_end
Route15BattleText10:
- TX_FAR _Route15BattleText10
- db "@"
+ text_far _Route15BattleText10
+ text_end
Route15EndBattleText10:
- TX_FAR _Route15EndBattleText10
- db "@"
+ text_far _Route15EndBattleText10
+ text_end
Route15AfterBattleText10:
- TX_FAR _Route15AfterBattleText10
- db "@"
+ text_far _Route15AfterBattleText10
+ text_end
Route15Text12:
- TX_FAR _Route15Text12
- db "@"
+ text_far _Route15Text12
+ text_end
diff --git a/scripts/Route15Gate1F.asm b/scripts/Route15Gate1F.asm
index 910eb2a5..dfbce9d4 100755
--- a/scripts/Route15Gate1F.asm
+++ b/scripts/Route15Gate1F.asm
@@ -5,5 +5,5 @@ Route15Gate1F_TextPointers:
dw Route15GateText1
Route15GateText1:
- TX_FAR _Route15GateText1
- db "@"
+ text_far _Route15GateText1
+ text_end
diff --git a/scripts/Route15Gate2F.asm b/scripts/Route15Gate2F.asm
index 83763762..1b85e34e 100755
--- a/scripts/Route15Gate2F.asm
+++ b/scripts/Route15Gate2F.asm
@@ -6,13 +6,13 @@ Route15Gate2F_TextPointers:
dw Route15GateUpstairsText2
Route15GateUpstairsText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_EXP_ALL
- jr nz, .asm_49683
- ld a, 50 ; pokemon needed
- ld [hOaksAideRequirement], a
- ld a, EXP_ALL ; oak's aide reward
- ld [hOaksAideRewardItem], a
+ jr nz, .got_item
+ ld a, 50
+ ldh [hOaksAideRequirement], a
+ ld a, EXP_ALL
+ ldh [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
ld hl, wcd6d
@@ -20,25 +20,25 @@ Route15GateUpstairsText1:
ld bc, ITEM_NAME_LENGTH
call CopyData
predef OaksAideScript
- ld a, [hOaksAideResult]
- cp $1
- jr nz, .asm_49689
+ ldh a, [hOaksAideResult]
+ cp OAKS_AIDE_GOT_ITEM
+ jr nz, .no_item
SetEvent EVENT_GOT_EXP_ALL
-.asm_49683
+.got_item
ld hl, Route15GateUpstairsText_4968c
call PrintText
-.asm_49689
+.no_item
jp TextScriptEnd
Route15GateUpstairsText_4968c:
- TX_FAR _Route15GateUpstairsText_4968c
- db "@"
+ text_far _Route15GateUpstairsText_4968c
+ text_end
Route15GateUpstairsText2:
- TX_ASM
+ text_asm
ld hl, Route15GateUpstairsText_49698
jp GateUpstairsScript_PrintIfFacingUp
Route15GateUpstairsText_49698:
- TX_FAR _Route15GateUpstairsText_49698
- db "@"
+ text_far _Route15GateUpstairsText_49698
+ text_end
diff --git a/scripts/Route16.asm b/scripts/Route16.asm
index 54f83380..e7b1eb9a 100755
--- a/scripts/Route16.asm
+++ b/scripts/Route16.asm
@@ -27,7 +27,7 @@ Route16Script0:
ResetEventReuseHL EVENT_FIGHT_ROUTE16_SNORLAX
jp z, CheckFightingMapTrainers
ld a, $a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, SNORLAX
ld [wCurOpponent], a
@@ -51,7 +51,7 @@ Route16Script3:
cp $2
jr z, .asm_599a8
ld a, $b
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_599a8
SetEvent EVENT_BEAT_ROUTE16_SNORLAX
@@ -75,185 +75,143 @@ Route16_TextPointers:
dw Route16Text11
Route16TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_0
- dw Route16BattleText1 ; TextBeforeBattle
- dw Route16AfterBattleText1 ; TextAfterBattle
- dw Route16EndBattleText1 ; TextEndBattle
- dw Route16EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_16_TRAINER_0, 3, Route16BattleText1, Route16EndBattleText1, Route16AfterBattleText1
Route16TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_1
- dw Route16BattleText2 ; TextBeforeBattle
- dw Route16AfterBattleText2 ; TextAfterBattle
- dw Route16EndBattleText2 ; TextEndBattle
- dw Route16EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_16_TRAINER_1, 2, Route16BattleText2, Route16EndBattleText2, Route16AfterBattleText2
Route16TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_2
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_2
- dw Route16BattleText3 ; TextBeforeBattle
- dw Route16AfterBattleText3 ; TextAfterBattle
- dw Route16EndBattleText3 ; TextEndBattle
- dw Route16EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_16_TRAINER_2, 2, Route16BattleText3, Route16EndBattleText3, Route16AfterBattleText3
Route16TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_3
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_3
- dw Route16BattleText4 ; TextBeforeBattle
- dw Route16AfterBattleText4 ; TextAfterBattle
- dw Route16EndBattleText4 ; TextEndBattle
- dw Route16EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_16_TRAINER_3, 2, Route16BattleText4, Route16EndBattleText4, Route16AfterBattleText4
Route16TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_4
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_4
- dw Route16BattleText5 ; TextBeforeBattle
- dw Route16AfterBattleText5 ; TextAfterBattle
- dw Route16EndBattleText5 ; TextEndBattle
- dw Route16EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_16_TRAINER_4, 2, Route16BattleText5, Route16EndBattleText5, Route16AfterBattleText5
Route16TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_5
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_5
- dw Route16BattleText6 ; TextBeforeBattle
- dw Route16AfterBattleText6 ; TextAfterBattle
- dw Route16EndBattleText6 ; TextEndBattle
- dw Route16EndBattleText6 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_16_TRAINER_5, 4, Route16BattleText6, Route16EndBattleText6, Route16AfterBattleText6
+ db -1 ; end
Route16Text1:
- TX_ASM
+ text_asm
ld hl, Route16TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route16BattleText1:
- TX_FAR _Route16BattleText1
- db "@"
+ text_far _Route16BattleText1
+ text_end
Route16EndBattleText1:
- TX_FAR _Route16EndBattleText1
- db "@"
+ text_far _Route16EndBattleText1
+ text_end
Route16AfterBattleText1:
- TX_FAR _Route16AfterBattleText1
- db "@"
+ text_far _Route16AfterBattleText1
+ text_end
Route16Text2:
- TX_ASM
+ text_asm
ld hl, Route16TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route16BattleText2:
- TX_FAR _Route16BattleText2
- db "@"
+ text_far _Route16BattleText2
+ text_end
Route16EndBattleText2:
- TX_FAR _Route16EndBattleText2
- db "@"
+ text_far _Route16EndBattleText2
+ text_end
Route16AfterBattleText2:
- TX_FAR _Route16AfterBattleText2
- db "@"
+ text_far _Route16AfterBattleText2
+ text_end
Route16Text3:
- TX_ASM
+ text_asm
ld hl, Route16TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route16BattleText3:
- TX_FAR _Route16BattleText3
- db "@"
+ text_far _Route16BattleText3
+ text_end
Route16EndBattleText3:
- TX_FAR _Route16EndBattleText3
- db "@"
+ text_far _Route16EndBattleText3
+ text_end
Route16AfterBattleText3:
- TX_FAR _Route16AfterBattleText3
- db "@"
+ text_far _Route16AfterBattleText3
+ text_end
Route16Text4:
- TX_ASM
+ text_asm
ld hl, Route16TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route16BattleText4:
- TX_FAR _Route16BattleText4
- db "@"
+ text_far _Route16BattleText4
+ text_end
Route16EndBattleText4:
- TX_FAR _Route16EndBattleText4
- db "@"
+ text_far _Route16EndBattleText4
+ text_end
Route16AfterBattleText4:
- TX_FAR _Route16AfterBattleText4
- db "@"
+ text_far _Route16AfterBattleText4
+ text_end
Route16Text5:
- TX_ASM
+ text_asm
ld hl, Route16TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route16BattleText5:
- TX_FAR _Route16BattleText5
- db "@"
+ text_far _Route16BattleText5
+ text_end
Route16EndBattleText5:
- TX_FAR _Route16EndBattleText5
- db "@"
+ text_far _Route16EndBattleText5
+ text_end
Route16AfterBattleText5:
- TX_FAR _Route16AfterBattleText5
- db "@"
+ text_far _Route16AfterBattleText5
+ text_end
Route16Text6:
- TX_ASM
+ text_asm
ld hl, Route16TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route16BattleText6:
- TX_FAR _Route16BattleText6
- db "@"
+ text_far _Route16BattleText6
+ text_end
Route16EndBattleText6:
- TX_FAR _Route16EndBattleText6
- db "@"
+ text_far _Route16EndBattleText6
+ text_end
Route16AfterBattleText6:
- TX_FAR _Route16AfterBattleText6
- db "@"
+ text_far _Route16AfterBattleText6
+ text_end
Route16Text7:
- TX_FAR _Route16Text7
- db "@"
+ text_far _Route16Text7
+ text_end
Route16Text10:
- TX_FAR _Route16Text10
- db "@"
+ text_far _Route16Text10
+ text_end
Route16Text11:
- TX_FAR _Route16Text11
- db "@"
+ text_far _Route16Text11
+ text_end
Route16Text8:
- TX_FAR _Route16Text8
- db "@"
+ text_far _Route16Text8
+ text_end
Route16Text9:
- TX_FAR _Route16Text9
- db "@"
+ text_far _Route16Text9
+ text_end
diff --git a/scripts/Route16FlyHouse.asm b/scripts/Route16FlyHouse.asm
index 1d74ac80..3bb34b75 100755
--- a/scripts/Route16FlyHouse.asm
+++ b/scripts/Route16FlyHouse.asm
@@ -6,43 +6,43 @@ Route16FlyHouse_TextPointers:
dw Route16HouseText2
Route16HouseText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_HM02
ld hl, HM02ExplanationText
- jr nz, .asm_13616
+ jr nz, .got_item
ld hl, Route16HouseText3
call PrintText
- lb bc, HM_02, 1
+ lb bc, HM_FLY, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
SetEvent EVENT_GOT_HM02
ld hl, ReceivedHM02Text
- jr .asm_13616
-.BagFull
+ jr .got_item
+.bag_full
ld hl, HM02NoRoomText
-.asm_13616
+.got_item
call PrintText
jp TextScriptEnd
Route16HouseText3:
- TX_FAR _Route16HouseText3
- db "@"
+ text_far _Route16HouseText3
+ text_end
ReceivedHM02Text:
- TX_FAR _ReceivedHM02Text
- TX_SFX_KEY_ITEM
- db "@"
+ text_far _ReceivedHM02Text
+ sound_get_key_item
+ text_end
HM02ExplanationText:
- TX_FAR _HM02ExplanationText
- db "@"
+ text_far _HM02ExplanationText
+ text_end
HM02NoRoomText:
- TX_FAR _HM02NoRoomText
- db "@"
+ text_far _HM02NoRoomText
+ text_end
Route16HouseText2:
- TX_ASM
+ text_asm
ld hl, Route16HouseText_1e652
call PrintText
ld a, FEAROW
@@ -51,5 +51,5 @@ Route16HouseText2:
jp TextScriptEnd
Route16HouseText_1e652:
- TX_FAR _Route16HouseText_1e652
- db "@"
+ text_far _Route16HouseText_1e652
+ text_end
diff --git a/scripts/Route16Gate1F.asm b/scripts/Route16Gate1F.asm
index f814d209..e992fa44 100755
--- a/scripts/Route16Gate1F.asm
+++ b/scripts/Route16Gate1F.asm
@@ -19,10 +19,10 @@ Route16GateScript0:
call ArePlayerCoordsInArray
ret nc
ld a, $3
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, [wCoordIndex]
cp $1
jr z, .asm_4970e
@@ -44,11 +44,11 @@ Route16GateScript0:
ret
CoordsData_49714:
- db $07,$04
- db $08,$04
- db $09,$04
- db $0A,$04
- db $FF
+ dbmapcoord 4, 7
+ dbmapcoord 4, 8
+ dbmapcoord 4, 9
+ dbmapcoord 4, 10
+ db -1 ; end
Route16GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
@@ -59,7 +59,7 @@ Route16GateScript1:
Route16GateScript2:
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
@@ -92,7 +92,7 @@ Route16Gate1F_TextPointers:
dw Route16GateText3
Route16GateText1:
- TX_ASM
+ text_asm
call Route16GateScript_49755
jr z, .asm_0bdf3
ld hl, Route16GateText_4977c
@@ -105,17 +105,17 @@ Route16GateText1:
jp TextScriptEnd
Route16GateText_49777:
- TX_FAR _Route16GateText_49777
- db "@"
+ text_far _Route16GateText_49777
+ text_end
Route16GateText_4977c:
- TX_FAR _Route16GateText_4977c
- db "@"
+ text_far _Route16GateText_4977c
+ text_end
Route16GateText3:
- TX_FAR _Route16GateText_49781
- db "@"
+ text_far _Route16GateText_49781
+ text_end
Route16GateText2:
- TX_FAR _Route16GateText2
- db "@"
+ text_far _Route16GateText2
+ text_end
diff --git a/scripts/Route16Gate2F.asm b/scripts/Route16Gate2F.asm
index 643a5ec7..27e147a1 100755
--- a/scripts/Route16Gate2F.asm
+++ b/scripts/Route16Gate2F.asm
@@ -8,39 +8,39 @@ Route16Gate2F_TextPointers:
dw Route16GateUpstairsText4
Route16GateUpstairsText1:
- TX_ASM
+ text_asm
ld hl, Route16GateUpstairsText_49820
call PrintText
jp TextScriptEnd
Route16GateUpstairsText_49820:
- TX_FAR _Route16GateUpstairsText_49820
- db "@"
+ text_far _Route16GateUpstairsText_49820
+ text_end
Route16GateUpstairsText2:
- TX_ASM
+ text_asm
ld hl, Route16GateUpstairsText_4982f
call PrintText
jp TextScriptEnd
Route16GateUpstairsText_4982f:
- TX_FAR _Route16GateUpstairsText_4982f
- db "@"
+ text_far _Route16GateUpstairsText_4982f
+ text_end
Route16GateUpstairsText3:
- TX_ASM
+ text_asm
ld hl, Route16GateUpstairsText_4983b
jp GateUpstairsScript_PrintIfFacingUp
Route16GateUpstairsText_4983b:
- TX_FAR _Route16GateUpstairsText_4983b
- db "@"
+ text_far _Route16GateUpstairsText_4983b
+ text_end
Route16GateUpstairsText4:
- TX_ASM
+ text_asm
ld hl, Route16GateUpstairsText_49847
jp GateUpstairsScript_PrintIfFacingUp
Route16GateUpstairsText_49847:
- TX_FAR _Route16GateUpstairsText_49847
- db "@"
+ text_far _Route16GateUpstairsText_49847
+ text_end
diff --git a/scripts/Route17.asm b/scripts/Route17.asm
index dd92ac44..27693f9f 100755
--- a/scripts/Route17.asm
+++ b/scripts/Route17.asm
@@ -31,297 +31,227 @@ Route17_TextPointers:
dw Route17Text16
Route17TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_0
- dw Route17BattleText1 ; TextBeforeBattle
- dw Route17AfterBattleText1 ; TextAfterBattle
- dw Route17EndBattleText1 ; TextEndBattle
- dw Route17EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_0, 3, Route17BattleText1, Route17EndBattleText1, Route17AfterBattleText1
Route17TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_1
- dw Route17BattleText2 ; TextBeforeBattle
- dw Route17AfterBattleText2 ; TextAfterBattle
- dw Route17EndBattleText2 ; TextEndBattle
- dw Route17EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_1, 4, Route17BattleText2, Route17EndBattleText2, Route17AfterBattleText2
Route17TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_2
- dw Route17BattleText3 ; TextBeforeBattle
- dw Route17AfterBattleText3 ; TextAfterBattle
- dw Route17EndBattleText3 ; TextEndBattle
- dw Route17EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_2, 4, Route17BattleText3, Route17EndBattleText3, Route17AfterBattleText3
Route17TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_3
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_3
- dw Route17BattleText4 ; TextBeforeBattle
- dw Route17AfterBattleText4 ; TextAfterBattle
- dw Route17EndBattleText4 ; TextEndBattle
- dw Route17EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_3, 4, Route17BattleText4, Route17EndBattleText4, Route17AfterBattleText4
Route17TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_4
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_4
- dw Route17BattleText5 ; TextBeforeBattle
- dw Route17AfterBattleText5 ; TextAfterBattle
- dw Route17EndBattleText5 ; TextEndBattle
- dw Route17EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_4, 3, Route17BattleText5, Route17EndBattleText5, Route17AfterBattleText5
Route17TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_5
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_5
- dw Route17BattleText6 ; TextBeforeBattle
- dw Route17AfterBattleText6 ; TextAfterBattle
- dw Route17EndBattleText6 ; TextEndBattle
- dw Route17EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_5, 2, Route17BattleText6, Route17EndBattleText6, Route17AfterBattleText6
Route17TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_6
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_6
- dw Route17BattleText7 ; TextBeforeBattle
- dw Route17AfterBattleText7 ; TextAfterBattle
- dw Route17EndBattleText7 ; TextEndBattle
- dw Route17EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_6, 4, Route17BattleText7, Route17EndBattleText7, Route17AfterBattleText7
Route17TrainerHeader7:
- dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_7, 1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_7, 1
- dw Route17BattleText8 ; TextBeforeBattle
- dw Route17AfterBattleText8 ; TextAfterBattle
- dw Route17EndBattleText8 ; TextEndBattle
- dw Route17EndBattleText8 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_7, 1, 2, Route17BattleText8, Route17EndBattleText8, Route17AfterBattleText8
Route17TrainerHeader8:
- dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_8, 1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_8, 1
- dw Route17BattleText9 ; TextBeforeBattle
- dw Route17AfterBattleText9 ; TextAfterBattle
- dw Route17EndBattleText9 ; TextEndBattle
- dw Route17EndBattleText9 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_8, 1, 3, Route17BattleText9, Route17EndBattleText9, Route17AfterBattleText9
Route17TrainerHeader9:
- dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_9, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_9, 1
- dw Route17BattleText10 ; TextBeforeBattle
- dw Route17AfterBattleText10 ; TextAfterBattle
- dw Route17EndBattleText10 ; TextEndBattle
- dw Route17EndBattleText10 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_9, 1, 4, Route17BattleText10, Route17EndBattleText10, Route17AfterBattleText10
+ db -1 ; end
Route17Text1:
- TX_ASM
+ text_asm
ld hl, Route17TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route17BattleText1:
- TX_FAR _Route17BattleText1
- db "@"
+ text_far _Route17BattleText1
+ text_end
Route17EndBattleText1:
- TX_FAR _Route17EndBattleText1
- db "@"
+ text_far _Route17EndBattleText1
+ text_end
Route17AfterBattleText1:
- TX_FAR _Route17AfterBattleText1
- db "@"
+ text_far _Route17AfterBattleText1
+ text_end
Route17Text2:
- TX_ASM
+ text_asm
ld hl, Route17TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route17BattleText2:
- TX_FAR _Route17BattleText2
- db "@"
+ text_far _Route17BattleText2
+ text_end
Route17EndBattleText2:
- TX_FAR _Route17EndBattleText2
- db "@"
+ text_far _Route17EndBattleText2
+ text_end
Route17AfterBattleText2:
- TX_FAR _Route17AfterBattleText2
- db "@"
+ text_far _Route17AfterBattleText2
+ text_end
Route17Text3:
- TX_ASM
+ text_asm
ld hl, Route17TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route17BattleText3:
- TX_FAR _Route17BattleText3
- db "@"
+ text_far _Route17BattleText3
+ text_end
Route17EndBattleText3:
- TX_FAR _Route17EndBattleText3
- db "@"
+ text_far _Route17EndBattleText3
+ text_end
Route17AfterBattleText3:
- TX_FAR _Route17AfterBattleText3
- db "@"
+ text_far _Route17AfterBattleText3
+ text_end
Route17Text4:
- TX_ASM
+ text_asm
ld hl, Route17TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route17BattleText4:
- TX_FAR _Route17BattleText4
- db "@"
+ text_far _Route17BattleText4
+ text_end
Route17EndBattleText4:
- TX_FAR _Route17EndBattleText4
- db "@"
+ text_far _Route17EndBattleText4
+ text_end
Route17AfterBattleText4:
- TX_FAR _Route17AfterBattleText4
- db "@"
+ text_far _Route17AfterBattleText4
+ text_end
Route17Text5:
- TX_ASM
+ text_asm
ld hl, Route17TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route17BattleText5:
- TX_FAR _Route17BattleText5
- db "@"
+ text_far _Route17BattleText5
+ text_end
Route17EndBattleText5:
- TX_FAR _Route17EndBattleText5
- db "@"
+ text_far _Route17EndBattleText5
+ text_end
Route17AfterBattleText5:
- TX_FAR _Route17AfterBattleText5
- db "@"
+ text_far _Route17AfterBattleText5
+ text_end
Route17Text6:
- TX_ASM
+ text_asm
ld hl, Route17TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route17BattleText6:
- TX_FAR _Route17BattleText6
- db "@"
+ text_far _Route17BattleText6
+ text_end
Route17EndBattleText6:
- TX_FAR _Route17EndBattleText6
- db "@"
+ text_far _Route17EndBattleText6
+ text_end
Route17AfterBattleText6:
- TX_FAR _Route17AfterBattleText6
- db "@"
+ text_far _Route17AfterBattleText6
+ text_end
Route17Text7:
- TX_ASM
+ text_asm
ld hl, Route17TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route17BattleText7:
- TX_FAR _Route17BattleText7
- db "@"
+ text_far _Route17BattleText7
+ text_end
Route17EndBattleText7:
- TX_FAR _Route17EndBattleText7
- db "@"
+ text_far _Route17EndBattleText7
+ text_end
Route17AfterBattleText7:
- TX_FAR _Route17AfterBattleText7
- db "@"
+ text_far _Route17AfterBattleText7
+ text_end
Route17Text8:
- TX_ASM
+ text_asm
ld hl, Route17TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
Route17BattleText8:
- TX_FAR _Route17BattleText8
- db "@"
+ text_far _Route17BattleText8
+ text_end
Route17EndBattleText8:
- TX_FAR _Route17EndBattleText8
- db "@"
+ text_far _Route17EndBattleText8
+ text_end
Route17AfterBattleText8:
- TX_FAR _Route17AfterBattleText8
- db "@"
+ text_far _Route17AfterBattleText8
+ text_end
Route17Text9:
- TX_ASM
+ text_asm
ld hl, Route17TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
Route17BattleText9:
- TX_FAR _Route17BattleText9
- db "@"
+ text_far _Route17BattleText9
+ text_end
Route17EndBattleText9:
- TX_FAR _Route17EndBattleText9
- db "@"
+ text_far _Route17EndBattleText9
+ text_end
Route17AfterBattleText9:
- TX_FAR _Route17AfterBattleText9
- db "@"
+ text_far _Route17AfterBattleText9
+ text_end
Route17Text10:
- TX_ASM
+ text_asm
ld hl, Route17TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
Route17BattleText10:
- TX_FAR _Route17BattleText10
- db "@"
+ text_far _Route17BattleText10
+ text_end
Route17EndBattleText10:
- TX_FAR _Route17EndBattleText10
- db "@"
+ text_far _Route17EndBattleText10
+ text_end
Route17AfterBattleText10:
- TX_FAR _Route17AfterBattleText10
- db "@"
+ text_far _Route17AfterBattleText10
+ text_end
Route17Text11:
- TX_FAR _Route17Text11
- db "@"
+ text_far _Route17Text11
+ text_end
Route17Text12:
- TX_FAR _Route17Text12
- db "@"
+ text_far _Route17Text12
+ text_end
Route17Text13:
- TX_FAR _Route17Text13
- db "@"
+ text_far _Route17Text13
+ text_end
Route17Text14:
- TX_FAR _Route17Text14
- db "@"
+ text_far _Route17Text14
+ text_end
Route17Text15:
- TX_FAR _Route17Text15
- db "@"
+ text_far _Route17Text15
+ text_end
Route17Text16:
- TX_FAR _Route17Text16
- db "@"
+ text_far _Route17Text16
+ text_end
diff --git a/scripts/Route18.asm b/scripts/Route18.asm
index 022d41be..f6738fc6 100755
--- a/scripts/Route18.asm
+++ b/scripts/Route18.asm
@@ -20,92 +20,71 @@ Route18_TextPointers:
dw Route18Text5
Route18TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_18_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_18_TRAINER_0
- dw Route18BattleText1 ; TextBeforeBattle
- dw Route18AfterBattleText1 ; TextAfterBattle
- dw Route18EndBattleText1 ; TextEndBattle
- dw Route18EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_18_TRAINER_0, 3, Route18BattleText1, Route18EndBattleText1, Route18AfterBattleText1
Route18TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_18_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_18_TRAINER_1
- dw Route18BattleText2 ; TextBeforeBattle
- dw Route18AfterBattleText2 ; TextAfterBattle
- dw Route18EndBattleText2 ; TextEndBattle
- dw Route18EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_18_TRAINER_1, 3, Route18BattleText2, Route18EndBattleText2, Route18AfterBattleText2
Route18TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_18_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_18_TRAINER_2
- dw Route18BattleText3 ; TextBeforeBattle
- dw Route18AfterBattleText3 ; TextAfterBattle
- dw Route18EndBattleText3 ; TextEndBattle
- dw Route18EndBattleText3 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_18_TRAINER_2, 4, Route18BattleText3, Route18EndBattleText3, Route18AfterBattleText3
+ db -1 ; end
Route18Text1:
- TX_ASM
+ text_asm
ld hl, Route18TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route18BattleText1:
- TX_FAR _Route18BattleText1
- db "@"
+ text_far _Route18BattleText1
+ text_end
Route18EndBattleText1:
- TX_FAR _Route18EndBattleText1
- db "@"
+ text_far _Route18EndBattleText1
+ text_end
Route18AfterBattleText1:
- TX_FAR _Route18AfterBattleText1
- db "@"
+ text_far _Route18AfterBattleText1
+ text_end
Route18Text2:
- TX_ASM
+ text_asm
ld hl, Route18TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route18BattleText2:
- TX_FAR _Route18BattleText2
- db "@"
+ text_far _Route18BattleText2
+ text_end
Route18EndBattleText2:
- TX_FAR _Route18EndBattleText2
- db "@"
+ text_far _Route18EndBattleText2
+ text_end
Route18AfterBattleText2:
- TX_FAR _Route18AfterBattleText2
- db "@"
+ text_far _Route18AfterBattleText2
+ text_end
Route18Text3:
- TX_ASM
+ text_asm
ld hl, Route18TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route18BattleText3:
- TX_FAR _Route18BattleText3
- db "@"
+ text_far _Route18BattleText3
+ text_end
Route18EndBattleText3:
- TX_FAR _Route18EndBattleText3
- db "@"
+ text_far _Route18EndBattleText3
+ text_end
Route18AfterBattleText3:
- TX_FAR _Route18AfterBattleText3
- db "@"
+ text_far _Route18AfterBattleText3
+ text_end
Route18Text4:
- TX_FAR _Route18Text4
- db "@"
+ text_far _Route18Text4
+ text_end
Route18Text5:
- TX_FAR _Route18Text5
- db "@"
+ text_far _Route18Text5
+ text_end
diff --git a/scripts/Route18Gate1F.asm b/scripts/Route18Gate1F.asm
index 812cb3e0..2caeaedd 100755
--- a/scripts/Route18Gate1F.asm
+++ b/scripts/Route18Gate1F.asm
@@ -19,10 +19,10 @@ Route18GateScript0:
call ArePlayerCoordsInArray
ret nc
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, [wCoordIndex]
cp $1
jr z, .asm_498c6
@@ -44,11 +44,11 @@ Route18GateScript0:
ret
CoordsData_498cc:
- db $03,$04
- db $04,$04
- db $05,$04
- db $06,$04
- db $FF
+ dbmapcoord 4, 3
+ dbmapcoord 4, 4
+ dbmapcoord 4, 5
+ dbmapcoord 4, 6
+ db -1 ; end
Route18GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
@@ -59,7 +59,7 @@ Route18GateScript1:
Route18GateScript2:
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
@@ -87,7 +87,7 @@ Route18Gate1F_TextPointers:
dw Route18GateText2
Route18GateText1:
- TX_ASM
+ text_asm
call Route16GateScript_49755
jr z, .asm_3c84d
ld hl, Route18GateText_4992d
@@ -100,13 +100,13 @@ Route18GateText1:
jp TextScriptEnd
Route18GateText_49928:
- TX_FAR _Route18GateText_49928
- db "@"
+ text_far _Route18GateText_49928
+ text_end
Route18GateText_4992d:
- TX_FAR _Route18GateText_4992d
- db "@"
+ text_far _Route18GateText_4992d
+ text_end
Route18GateText2:
- TX_FAR _Route18GateText_49932
- db "@"
+ text_far _Route18GateText_49932
+ text_end
diff --git a/scripts/Route18Gate2F.asm b/scripts/Route18Gate2F.asm
index 6987a099..efb6d70a 100755
--- a/scripts/Route18Gate2F.asm
+++ b/scripts/Route18Gate2F.asm
@@ -7,26 +7,26 @@ Route18Gate2F_TextPointers:
dw Route18GateUpstairsText3
Route18GateUpstairsText1:
- TX_ASM
- ld a, $5
+ text_asm
+ ld a, TRADE_FOR_MARC
ld [wWhichTrade], a
predef DoInGameTradeDialogue
jp TextScriptEnd
Route18GateUpstairsText2:
- TX_ASM
+ text_asm
ld hl, Route18GateUpstairsText_49993
jp GateUpstairsScript_PrintIfFacingUp
Route18GateUpstairsText_49993:
- TX_FAR _Route18GateUpstairsText_49993
- db "@"
+ text_far _Route18GateUpstairsText_49993
+ text_end
Route18GateUpstairsText3:
- TX_ASM
+ text_asm
ld hl, Route18GateUpstairsText_4999f
jp GateUpstairsScript_PrintIfFacingUp
Route18GateUpstairsText_4999f:
- TX_FAR _Route18GateUpstairsText_4999f
- db "@"
+ text_far _Route18GateUpstairsText_4999f
+ text_end
diff --git a/scripts/Route19.asm b/scripts/Route19.asm
index febeb9a4..7e09c5e3 100755
--- a/scripts/Route19.asm
+++ b/scripts/Route19.asm
@@ -26,269 +26,199 @@ Route19_TextPointers:
dw Route19Text11
Route19TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_0
- dw Route19BattleText1 ; TextBeforeBattle
- dw Route19AfterBattleText1 ; TextAfterBattle
- dw Route19EndBattleText1 ; TextEndBattle
- dw Route19EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_0, 4, Route19BattleText1, Route19EndBattleText1, Route19AfterBattleText1
Route19TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_1
- dw Route19BattleText2 ; TextBeforeBattle
- dw Route19AfterBattleText2 ; TextAfterBattle
- dw Route19EndBattleText2 ; TextEndBattle
- dw Route19EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_1, 4, Route19BattleText2, Route19EndBattleText2, Route19AfterBattleText2
Route19TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_2
- dw Route19BattleText3 ; TextBeforeBattle
- dw Route19AfterBattleText3 ; TextAfterBattle
- dw Route19EndBattleText3 ; TextEndBattle
- dw Route19EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_2, 3, Route19BattleText3, Route19EndBattleText3, Route19AfterBattleText3
Route19TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_3
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_3
- dw Route19BattleText4 ; TextBeforeBattle
- dw Route19AfterBattleText4 ; TextAfterBattle
- dw Route19EndBattleText4 ; TextEndBattle
- dw Route19EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_3, 4, Route19BattleText4, Route19EndBattleText4, Route19AfterBattleText4
Route19TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_4
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_4
- dw Route19BattleText5 ; TextBeforeBattle
- dw Route19AfterBattleText5 ; TextAfterBattle
- dw Route19EndBattleText5 ; TextEndBattle
- dw Route19EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_4, 4, Route19BattleText5, Route19EndBattleText5, Route19AfterBattleText5
Route19TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_5
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_5
- dw Route19BattleText6 ; TextBeforeBattle
- dw Route19AfterBattleText6 ; TextAfterBattle
- dw Route19EndBattleText6 ; TextEndBattle
- dw Route19EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_5, 4, Route19BattleText6, Route19EndBattleText6, Route19AfterBattleText6
Route19TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_6
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_6
- dw Route19BattleText7 ; TextBeforeBattle
- dw Route19AfterBattleText7 ; TextAfterBattle
- dw Route19EndBattleText7 ; TextEndBattle
- dw Route19EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_6, 3, Route19BattleText7, Route19EndBattleText7, Route19AfterBattleText7
Route19TrainerHeader7:
- dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_7, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_7, 1
- dw Route19BattleText8 ; TextBeforeBattle
- dw Route19AfterBattleText8 ; TextAfterBattle
- dw Route19EndBattleText8 ; TextEndBattle
- dw Route19EndBattleText8 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_7, 1, 4, Route19BattleText8, Route19EndBattleText8, Route19AfterBattleText8
Route19TrainerHeader8:
- dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_8, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_8, 1
- dw Route19BattleText9 ; TextBeforeBattle
- dw Route19AfterBattleText9 ; TextAfterBattle
- dw Route19EndBattleText9 ; TextEndBattle
- dw Route19EndBattleText9 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_8, 1, 4, Route19BattleText9, Route19EndBattleText9, Route19AfterBattleText9
Route19TrainerHeader9:
- dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_9, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_9, 1
- dw Route19BattleText10 ; TextBeforeBattle
- dw Route19AfterBattleText10 ; TextAfterBattle
- dw Route19EndBattleText10 ; TextEndBattle
- dw Route19EndBattleText10 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_9, 1, 4, Route19BattleText10, Route19EndBattleText10, Route19AfterBattleText10
+ db -1 ; end
Route19Text1:
- TX_ASM
+ text_asm
ld hl, Route19TrainerHeader0
jr Route19_TalkToTrainer
Route19Text2:
- TX_ASM
+ text_asm
ld hl, Route19TrainerHeader1
jr Route19_TalkToTrainer
Route19Text3:
- TX_ASM
+ text_asm
ld hl, Route19TrainerHeader2
jr Route19_TalkToTrainer
Route19Text4:
- TX_ASM
+ text_asm
ld hl, Route19TrainerHeader3
jr Route19_TalkToTrainer
Route19Text5:
- TX_ASM
+ text_asm
ld hl, Route19TrainerHeader4
jr Route19_TalkToTrainer
Route19Text6:
- TX_ASM
+ text_asm
ld hl, Route19TrainerHeader5
jr Route19_TalkToTrainer
Route19Text7:
- TX_ASM
+ text_asm
ld hl, Route19TrainerHeader6
jr Route19_TalkToTrainer
Route19Text8:
- TX_ASM
+ text_asm
ld hl, Route19TrainerHeader7
jr Route19_TalkToTrainer
Route19Text9:
- TX_ASM
+ text_asm
ld hl, Route19TrainerHeader8
jr Route19_TalkToTrainer
Route19Text10:
- TX_ASM
+ text_asm
ld hl, Route19TrainerHeader9
Route19_TalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
Route19BattleText1:
- TX_FAR _Route19BattleText1
- db "@"
+ text_far _Route19BattleText1
+ text_end
Route19EndBattleText1:
- TX_FAR _Route19EndBattleText1
- db "@"
+ text_far _Route19EndBattleText1
+ text_end
Route19AfterBattleText1:
- TX_FAR _Route19AfterBattleText1
- db "@"
+ text_far _Route19AfterBattleText1
+ text_end
Route19BattleText2:
- TX_FAR _Route19BattleText2
- db "@"
+ text_far _Route19BattleText2
+ text_end
Route19EndBattleText2:
- TX_FAR _Route19EndBattleText2
- db "@"
+ text_far _Route19EndBattleText2
+ text_end
Route19AfterBattleText2:
- TX_FAR _Route19AfterBattleText2
- db "@"
+ text_far _Route19AfterBattleText2
+ text_end
Route19BattleText3:
- TX_FAR _Route19BattleText3
- db "@"
+ text_far _Route19BattleText3
+ text_end
Route19EndBattleText3:
- TX_FAR _Route19EndBattleText3
- db "@"
+ text_far _Route19EndBattleText3
+ text_end
Route19AfterBattleText3:
- TX_FAR _Route19AfterBattleText3
- db "@"
+ text_far _Route19AfterBattleText3
+ text_end
Route19BattleText4:
- TX_FAR _Route19BattleText4
- db "@"
+ text_far _Route19BattleText4
+ text_end
Route19EndBattleText4:
- TX_FAR _Route19EndBattleText4
- db "@"
+ text_far _Route19EndBattleText4
+ text_end
Route19AfterBattleText4:
- TX_FAR _Route19AfterBattleText4
- db "@"
+ text_far _Route19AfterBattleText4
+ text_end
Route19BattleText5:
- TX_FAR _Route19BattleText5
- db "@"
+ text_far _Route19BattleText5
+ text_end
Route19EndBattleText5:
- TX_FAR _Route19EndBattleText5
- db "@"
+ text_far _Route19EndBattleText5
+ text_end
Route19AfterBattleText5:
- TX_FAR _Route19AfterBattleText5
- db "@"
+ text_far _Route19AfterBattleText5
+ text_end
Route19BattleText6:
- TX_FAR _Route19BattleText6
- db "@"
+ text_far _Route19BattleText6
+ text_end
Route19EndBattleText6:
- TX_FAR _Route19EndBattleText6
- db "@"
+ text_far _Route19EndBattleText6
+ text_end
Route19AfterBattleText6:
- TX_FAR _Route19AfterBattleText6
- db "@"
+ text_far _Route19AfterBattleText6
+ text_end
Route19BattleText7:
- TX_FAR _Route19BattleText7
- db "@"
+ text_far _Route19BattleText7
+ text_end
Route19EndBattleText7:
- TX_FAR _Route19EndBattleText7
- db "@"
+ text_far _Route19EndBattleText7
+ text_end
Route19AfterBattleText7:
- TX_FAR _Route19AfterBattleText7
- db "@"
+ text_far _Route19AfterBattleText7
+ text_end
Route19BattleText8:
- TX_FAR _Route19BattleText8
- db "@"
+ text_far _Route19BattleText8
+ text_end
Route19EndBattleText8:
- TX_FAR _Route19EndBattleText8
- db "@"
+ text_far _Route19EndBattleText8
+ text_end
Route19AfterBattleText8:
- TX_FAR _Route19AfterBattleText8
- db "@"
+ text_far _Route19AfterBattleText8
+ text_end
Route19BattleText9:
- TX_FAR _Route19BattleText9
- db "@"
+ text_far _Route19BattleText9
+ text_end
Route19EndBattleText9:
- TX_FAR _Route19EndBattleText9
- db "@"
+ text_far _Route19EndBattleText9
+ text_end
Route19AfterBattleText9:
- TX_FAR _Route19AfterBattleText9
- db "@"
+ text_far _Route19AfterBattleText9
+ text_end
Route19BattleText10:
- TX_FAR _Route19BattleText10
- db "@"
+ text_far _Route19BattleText10
+ text_end
Route19EndBattleText10:
- TX_FAR _Route19EndBattleText10
- db "@"
+ text_far _Route19EndBattleText10
+ text_end
Route19AfterBattleText10:
- TX_FAR _Route19AfterBattleText10
- db "@"
+ text_far _Route19AfterBattleText10
+ text_end
Route19Text11:
- TX_FAR _Route19Text11
- db "@"
+ text_far _Route19Text11
+ text_end
diff --git a/scripts/Route1_2.asm b/scripts/Route1_2.asm
index ee34ce55..94748252 100755
--- a/scripts/Route1_2.asm
+++ b/scripts/Route1_2.asm
@@ -1,53 +1,53 @@
-Func_f1ad2:
+Func_f1ad2::
CheckAndSetEvent EVENT_GOT_POTION_SAMPLE
- jr nz, .asm_1cada
+ jr nz, .got_item
ld hl, Route1ViridianMartSampleText
call PrintText
lb bc, POTION, 1
call GiveItem
- jr nc, .BagFull
- ld hl, Route1Text_f1aff
- jr .asm_1cadd
-.BagFull
- ld hl, Route1Text_f1b0a
- jr .asm_1cadd
-.asm_1cada
- ld hl, Route1Text_f1b05
-.asm_1cadd
+ jr nc, .bag_full
+ ld hl, Route1Text_1cae8
+ jr .done
+.bag_full
+ ld hl, Route1Text_1caf3
+ jr .done
+.got_item
+ ld hl, Route1Text_1caee
+.done
call PrintText
ret
Route1ViridianMartSampleText:
- TX_FAR _Route1ViridianMartSampleText
- db "@"
+ text_far _Route1ViridianMartSampleText
+ text_end
-Route1Text_f1aff:
- TX_FAR _Route1Text_1cae8
- TX_SFX_ITEM_1
- db "@"
+Route1Text_1cae8:
+ text_far _Route1Text_1cae8
+ sound_get_item_1
+ text_end
-Route1Text_f1b05:
- TX_FAR _Route1Text_1caee
- db "@"
+Route1Text_1caee:
+ text_far _Route1Text_1caee
+ text_end
-Route1Text_f1b0a:
- TX_FAR _Route1Text_1caf3
- db "@"
+Route1Text_1caf3:
+ text_far _Route1Text_1caf3
+ text_end
-Func_f1b0f:
+Func_f1b0f::
ld hl, Route1Text_f1b16
call PrintText
ret
Route1Text_f1b16:
- TX_FAR _Route1Text2
- db "@"
+ text_far _Route1Text2
+ text_end
-Func_f1b1b:
+Func_f1b1b::
ld hl, Route1Text_f1b22
call PrintText
ret
Route1Text_f1b22:
- TX_FAR _Route1Text3
- db "@"
+ text_far _Route1Text3
+ text_end
diff --git a/scripts/Route2.asm b/scripts/Route2.asm
index f4b1c8c4..c6886ce4 100755
--- a/scripts/Route2.asm
+++ b/scripts/Route2.asm
@@ -8,9 +8,9 @@ Route2_TextPointers:
dw Route2Text4
Route2Text3:
- TX_FAR _Route2Text3
- db "@"
+ text_far _Route2Text3
+ text_end
Route2Text4:
- TX_FAR _Route2Text4
- db "@"
+ text_far _Route2Text4
+ text_end
diff --git a/scripts/Route20.asm b/scripts/Route20.asm
index 081a723e..f9904d4e 100755
--- a/scripts/Route20.asm
+++ b/scripts/Route20.asm
@@ -33,7 +33,7 @@ Route20Script_50cc6:
db HS_SEAFOAM_ISLANDS_B2F_BOULDER_2
db HS_SEAFOAM_ISLANDS_B3F_BOULDER_3
db HS_SEAFOAM_ISLANDS_B3F_BOULDER_4
- db $FF
+ db -1 ; end
.asm_50cef
CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE
@@ -76,278 +76,208 @@ Route20_TextPointers:
dw Route20Text12
Route20TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_0
- dw Route20BattleText1 ; TextBeforeBattle
- dw Route20AfterBattleText1 ; TextAfterBattle
- dw Route20EndBattleText1 ; TextEndBattle
- dw Route20EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_0, 4, Route20BattleText1, Route20EndBattleText1, Route20AfterBattleText1
Route20TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_1
- dw Route20BattleText2 ; TextBeforeBattle
- dw Route20AfterBattleText2 ; TextAfterBattle
- dw Route20EndBattleText2 ; TextEndBattle
- dw Route20EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_1, 4, Route20BattleText2, Route20EndBattleText2, Route20AfterBattleText2
Route20TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_2
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_2
- dw Route20BattleText3 ; TextBeforeBattle
- dw Route20AfterBattleText3 ; TextAfterBattle
- dw Route20EndBattleText3 ; TextEndBattle
- dw Route20EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_2, 2, Route20BattleText3, Route20EndBattleText3, Route20AfterBattleText3
Route20TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_3
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_3
- dw Route20BattleText4 ; TextBeforeBattle
- dw Route20AfterBattleText4 ; TextAfterBattle
- dw Route20EndBattleText4 ; TextEndBattle
- dw Route20EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_3, 4, Route20BattleText4, Route20EndBattleText4, Route20AfterBattleText4
Route20TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_4
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_4
- dw Route20BattleText5 ; TextBeforeBattle
- dw Route20AfterBattleText5 ; TextAfterBattle
- dw Route20EndBattleText5 ; TextEndBattle
- dw Route20EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_4, 3, Route20BattleText5, Route20EndBattleText5, Route20AfterBattleText5
Route20TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_5
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_5
- dw Route20BattleText6 ; TextBeforeBattle
- dw Route20AfterBattleText6 ; TextAfterBattle
- dw Route20EndBattleText6 ; TextEndBattle
- dw Route20EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_5, 4, Route20BattleText6, Route20EndBattleText6, Route20AfterBattleText6
Route20TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_6
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_6
- dw Route20BattleText7 ; TextBeforeBattle
- dw Route20AfterBattleText7 ; TextAfterBattle
- dw Route20EndBattleText7 ; TextEndBattle
- dw Route20EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_6, 2, Route20BattleText7, Route20EndBattleText7, Route20AfterBattleText7
Route20TrainerHeader7:
- dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_7, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_7, 1
- dw Route20BattleText8 ; TextBeforeBattle
- dw Route20AfterBattleText8 ; TextAfterBattle
- dw Route20EndBattleText8 ; TextEndBattle
- dw Route20EndBattleText8 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_7, 1, 4, Route20BattleText8, Route20EndBattleText8, Route20AfterBattleText8
Route20TrainerHeader8:
- dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_8, 1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_8, 1
- dw Route20BattleText9 ; TextBeforeBattle
- dw Route20AfterBattleText9 ; TextAfterBattle
- dw Route20EndBattleText9 ; TextEndBattle
- dw Route20EndBattleText9 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_8, 1, 3, Route20BattleText9, Route20EndBattleText9, Route20AfterBattleText9
Route20TrainerHeader9:
- dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_9, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_9, 1
- dw Route20BattleText10 ; TextBeforeBattle
- dw Route20AfterBattleText10 ; TextAfterBattle
- dw Route20EndBattleText10 ; TextEndBattle
- dw Route20EndBattleText10 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_9, 1, 4, Route20BattleText10, Route20EndBattleText10, Route20AfterBattleText10
+ db -1 ; end
Route20Text1:
- TX_ASM
+ text_asm
ld hl, Route20TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route20Text2:
- TX_ASM
+ text_asm
ld hl, Route20TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route20Text3:
- TX_ASM
+ text_asm
ld hl, Route20TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route20Text4:
- TX_ASM
+ text_asm
ld hl, Route20TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route20Text5:
- TX_ASM
+ text_asm
ld hl, Route20TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route20Text6:
- TX_ASM
+ text_asm
ld hl, Route20TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route20Text7:
- TX_ASM
+ text_asm
ld hl, Route20TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route20Text8:
- TX_ASM
+ text_asm
ld hl, Route20TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
Route20Text9:
- TX_ASM
+ text_asm
ld hl, Route20TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
Route20Text10:
- TX_ASM
+ text_asm
ld hl, Route20TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
Route20BattleText1:
- TX_FAR _Route20BattleText1
- db "@"
+ text_far _Route20BattleText1
+ text_end
Route20EndBattleText1:
- TX_FAR _Route20EndBattleText1
- db "@"
+ text_far _Route20EndBattleText1
+ text_end
Route20AfterBattleText1:
- TX_FAR _Route20AfterBattleText1
- db "@"
+ text_far _Route20AfterBattleText1
+ text_end
Route20BattleText2:
- TX_FAR _Route20BattleText2
- db "@"
+ text_far _Route20BattleText2
+ text_end
Route20EndBattleText2:
- TX_FAR _Route20EndBattleText2
- db "@"
+ text_far _Route20EndBattleText2
+ text_end
Route20AfterBattleText2:
- TX_FAR _Route20AfterBattleText2
- db "@"
+ text_far _Route20AfterBattleText2
+ text_end
Route20BattleText3:
- TX_FAR _Route20BattleText3
- db "@"
+ text_far _Route20BattleText3
+ text_end
Route20EndBattleText3:
- TX_FAR _Route20EndBattleText3
- db "@"
+ text_far _Route20EndBattleText3
+ text_end
Route20AfterBattleText3:
- TX_FAR _Route20AfterBattleText3
- db "@"
+ text_far _Route20AfterBattleText3
+ text_end
Route20BattleText4:
- TX_FAR _Route20BattleText4
- db "@"
+ text_far _Route20BattleText4
+ text_end
Route20EndBattleText4:
- TX_FAR _Route20EndBattleText4
- db "@"
+ text_far _Route20EndBattleText4
+ text_end
Route20AfterBattleText4:
- TX_FAR _Route20AfterBattleText4
- db "@"
+ text_far _Route20AfterBattleText4
+ text_end
Route20BattleText5:
- TX_FAR _Route20BattleText5
- db "@"
+ text_far _Route20BattleText5
+ text_end
Route20EndBattleText5:
- TX_FAR _Route20EndBattleText5
- db "@"
+ text_far _Route20EndBattleText5
+ text_end
Route20AfterBattleText5:
- TX_FAR _Route20AfterBattleText5
- db "@"
+ text_far _Route20AfterBattleText5
+ text_end
Route20BattleText6:
- TX_FAR _Route20BattleText6
- db "@"
+ text_far _Route20BattleText6
+ text_end
Route20EndBattleText6:
- TX_FAR _Route20EndBattleText6
- db "@"
+ text_far _Route20EndBattleText6
+ text_end
Route20AfterBattleText6:
- TX_FAR _Route20AfterBattleText6
- db "@"
+ text_far _Route20AfterBattleText6
+ text_end
Route20BattleText7:
- TX_FAR _Route20BattleText7
- db "@"
+ text_far _Route20BattleText7
+ text_end
Route20EndBattleText7:
- TX_FAR _Route20EndBattleText7
- db "@"
+ text_far _Route20EndBattleText7
+ text_end
Route20AfterBattleText7:
- TX_FAR _Route20AfterBattleText7
- db "@"
+ text_far _Route20AfterBattleText7
+ text_end
Route20BattleText8:
- TX_FAR _Route20BattleText8
- db "@"
+ text_far _Route20BattleText8
+ text_end
Route20EndBattleText8:
- TX_FAR _Route20EndBattleText8
- db "@"
+ text_far _Route20EndBattleText8
+ text_end
Route20AfterBattleText8:
- TX_FAR _Route20AfterBattleText8
- db "@"
+ text_far _Route20AfterBattleText8
+ text_end
Route20BattleText9:
- TX_FAR _Route20BattleText9
- db "@"
+ text_far _Route20BattleText9
+ text_end
Route20EndBattleText9:
- TX_FAR _Route20EndBattleText9
- db "@"
+ text_far _Route20EndBattleText9
+ text_end
Route20AfterBattleText9:
- TX_FAR _Route20AfterBattleText9
- db "@"
+ text_far _Route20AfterBattleText9
+ text_end
Route20BattleText10:
- TX_FAR _Route20BattleText10
- db "@"
+ text_far _Route20BattleText10
+ text_end
Route20EndBattleText10:
- TX_FAR _Route20EndBattleText10
- db "@"
+ text_far _Route20EndBattleText10
+ text_end
Route20AfterBattleText10:
- TX_FAR _Route20AfterBattleText10
- db "@"
+ text_far _Route20AfterBattleText10
+ text_end
Route20Text12:
Route20Text11:
- TX_FAR _Route20Text11
- db "@"
+ text_far _Route20Text11
+ text_end
diff --git a/scripts/Route21.asm b/scripts/Route21.asm
index 15dacd5d..7afe350f 100755
--- a/scripts/Route21.asm
+++ b/scripts/Route21.asm
@@ -24,246 +24,183 @@ Route21_TextPointers:
dw Route21Text9
Route21TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_0
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_0
- dw Route21BattleText1 ; TextBeforeBattle
- dw Route21AfterBattleText1 ; TextAfterBattle
- dw Route21EndBattleText1 ; TextEndBattle
- dw Route21EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_0, 0, Route21BattleText1, Route21EndBattleText1, Route21AfterBattleText1
Route21TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_1
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_1
- dw Route21BattleText2 ; TextBeforeBattle
- dw Route21AfterBattleText2 ; TextAfterBattle
- dw Route21EndBattleText2 ; TextEndBattle
- dw Route21EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_1, 0, Route21BattleText2, Route21EndBattleText2, Route21AfterBattleText2
Route21TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_2
- dw Route21BattleText3 ; TextBeforeBattle
- dw Route21AfterBattleText3 ; TextAfterBattle
- dw Route21EndBattleText3 ; TextEndBattle
- dw Route21EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_2, 4, Route21BattleText3, Route21EndBattleText3, Route21AfterBattleText3
Route21TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_3
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_3
- dw Route21BattleText4 ; TextBeforeBattle
- dw Route21AfterBattleText4 ; TextAfterBattle
- dw Route21EndBattleText4 ; TextEndBattle
- dw Route21EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_3, 4, Route21BattleText4, Route21EndBattleText4, Route21AfterBattleText4
Route21TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_4
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_4
- dw Route21BattleText5 ; TextBeforeBattle
- dw Route21AfterBattleText5 ; TextAfterBattle
- dw Route21EndBattleText5 ; TextEndBattle
- dw Route21EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_4, 4, Route21BattleText5, Route21EndBattleText5, Route21AfterBattleText5
Route21TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_5
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_5
- dw Route21BattleText6 ; TextBeforeBattle
- dw Route21AfterBattleText6 ; TextAfterBattle
- dw Route21EndBattleText6 ; TextEndBattle
- dw Route21EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_5, 4, Route21BattleText6, Route21EndBattleText6, Route21AfterBattleText6
Route21TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_6
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_6
- dw Route21BattleText7 ; TextBeforeBattle
- dw Route21AfterBattleText7 ; TextAfterBattle
- dw Route21EndBattleText7 ; TextEndBattle
- dw Route21EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_6, 3, Route21BattleText7, Route21EndBattleText7, Route21AfterBattleText7
Route21TrainerHeader7:
- dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_7, 1
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_7, 1
- dw Route21BattleText8 ; TextBeforeBattle
- dw Route21AfterBattleText8 ; TextAfterBattle
- dw Route21EndBattleText8 ; TextEndBattle
- dw Route21EndBattleText8 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_7, 1, 0, Route21BattleText8, Route21EndBattleText8, Route21AfterBattleText8
Route21TrainerHeader8:
- dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_8, 1
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_8, 1
- dw Route21BattleText9 ; TextBeforeBattle
- dw Route21AfterBattleText9 ; TextAfterBattle
- dw Route21EndBattleText9 ; TextEndBattle
- dw Route21EndBattleText9 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_8, 1, 0, Route21BattleText9, Route21EndBattleText9, Route21AfterBattleText9
+ db -1 ; end
Route21Text1:
- TX_ASM
+ text_asm
ld hl, Route21TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route21Text2:
- TX_ASM
+ text_asm
ld hl, Route21TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route21Text3:
- TX_ASM
+ text_asm
ld hl, Route21TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route21Text4:
- TX_ASM
+ text_asm
ld hl, Route21TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route21Text5:
- TX_ASM
+ text_asm
ld hl, Route21TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route21Text6:
- TX_ASM
+ text_asm
ld hl, Route21TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route21Text7:
- TX_ASM
+ text_asm
ld hl, Route21TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route21Text8:
- TX_ASM
+ text_asm
ld hl, Route21TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
Route21Text9:
- TX_ASM
+ text_asm
ld hl, Route21TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
Route21BattleText1:
- TX_FAR _Route21BattleText1
- db "@"
+ text_far _Route21BattleText1
+ text_end
Route21EndBattleText1:
- TX_FAR _Route21EndBattleText1
- db "@"
+ text_far _Route21EndBattleText1
+ text_end
Route21AfterBattleText1:
- TX_FAR _Route21AfterBattleText1
- db "@"
+ text_far _Route21AfterBattleText1
+ text_end
Route21BattleText2:
- TX_FAR _Route21BattleText2
- db "@"
+ text_far _Route21BattleText2
+ text_end
Route21EndBattleText2:
- TX_FAR _Route21EndBattleText2
- db "@"
+ text_far _Route21EndBattleText2
+ text_end
Route21AfterBattleText2:
- TX_FAR _Route21AfterBattleText2
- db "@"
+ text_far _Route21AfterBattleText2
+ text_end
Route21BattleText3:
- TX_FAR _Route21BattleText3
- db "@"
+ text_far _Route21BattleText3
+ text_end
Route21EndBattleText3:
- TX_FAR _Route21EndBattleText3
- db "@"
+ text_far _Route21EndBattleText3
+ text_end
Route21AfterBattleText3:
- TX_FAR _Route21AfterBattleText3
- db "@"
+ text_far _Route21AfterBattleText3
+ text_end
Route21BattleText4:
- TX_FAR _Route21BattleText4
- db "@"
+ text_far _Route21BattleText4
+ text_end
Route21EndBattleText4:
- TX_FAR _Route21EndBattleText4
- db "@"
+ text_far _Route21EndBattleText4
+ text_end
Route21AfterBattleText4:
- TX_FAR _Route21AfterBattleText4
- db "@"
+ text_far _Route21AfterBattleText4
+ text_end
Route21BattleText5:
- TX_FAR _Route21BattleText5
- db "@"
+ text_far _Route21BattleText5
+ text_end
Route21EndBattleText5:
- TX_FAR _Route21EndBattleText5
- db "@"
+ text_far _Route21EndBattleText5
+ text_end
Route21AfterBattleText5:
- TX_FAR _Route21AfterBattleText5
- db "@"
+ text_far _Route21AfterBattleText5
+ text_end
Route21BattleText6:
- TX_FAR _Route21BattleText6
- db "@"
+ text_far _Route21BattleText6
+ text_end
Route21EndBattleText6:
- TX_FAR _Route21EndBattleText6
- db "@"
+ text_far _Route21EndBattleText6
+ text_end
Route21AfterBattleText6:
- TX_FAR _Route21AfterBattleText6
- db "@"
+ text_far _Route21AfterBattleText6
+ text_end
Route21BattleText7:
- TX_FAR _Route21BattleText7
- db "@"
+ text_far _Route21BattleText7
+ text_end
Route21EndBattleText7:
- TX_FAR _Route21EndBattleText7
- db "@"
+ text_far _Route21EndBattleText7
+ text_end
Route21AfterBattleText7:
- TX_FAR _Route21AfterBattleText7
- db "@"
+ text_far _Route21AfterBattleText7
+ text_end
Route21BattleText8:
- TX_FAR _Route21BattleText8
- db "@"
+ text_far _Route21BattleText8
+ text_end
Route21EndBattleText8:
- TX_FAR _Route21EndBattleText8
- db "@"
+ text_far _Route21EndBattleText8
+ text_end
Route21AfterBattleText8:
- TX_FAR _Route21AfterBattleText8
- db "@"
+ text_far _Route21AfterBattleText8
+ text_end
Route21BattleText9:
- TX_FAR _Route21BattleText9
- db "@"
+ text_far _Route21BattleText9
+ text_end
Route21EndBattleText9:
- TX_FAR _Route21EndBattleText9
- db "@"
+ text_far _Route21EndBattleText9
+ text_end
Route21AfterBattleText9:
- TX_FAR _Route21AfterBattleText9
- db "@"
+ text_far _Route21AfterBattleText9
+ text_end
diff --git a/scripts/Route22.asm b/scripts/Route22.asm
index ff57f902..5dfdc67e 100755
--- a/scripts/Route22.asm
+++ b/scripts/Route22.asm
@@ -22,14 +22,14 @@ Route22Script7:
ret
Route22Script_50ed6:
- ld a, OPP_SONY1
+ ld a, OPP_RIVAL1
ld [wCurOpponent], a
ld a, $2
ld [wTrainerNo], a
ret
Route22Script_50ee1:
- ld a, OPP_SONY2
+ ld a, OPP_RIVAL2
ld [wCurOpponent], a
ld a, [wRivalStarter]
add 7
@@ -45,7 +45,7 @@ Route22MoveRivalSprite:
.asm_50ef1
call MoveSprite
ld a, SPRITE_FACING_RIGHT
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
jp SetSpriteFacingDirectionAndDelay
Route22RivalMovementData:
@@ -53,7 +53,7 @@ Route22RivalMovementData:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
Route22Script0:
CheckEvent EVENT_ROUTE22_RIVAL_WANTS_BATTLE
@@ -64,7 +64,7 @@ Route22Script0:
ld a, [wCoordIndex]
ld [wcf0d], a
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $f0
ld [wJoyIgnore], a
ld a, PLAYER_DIR_LEFT
@@ -76,9 +76,9 @@ Route22Script0:
ret
.Route22RivalBattleCoords
- db $04, $1D
- db $05, $1D
- db $FF
+ dbmapcoord 29, 4
+ dbmapcoord 29, 5
+ db -1 ; end
.firstRivalBattle
ld a, $1
@@ -95,7 +95,7 @@ Route22Script0:
ld a, MUSIC_MEET_RIVAL
call PlayMusic
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call Route22MoveRivalSprite
ld a, $1
ld [wRoute22CurScript], a
@@ -115,14 +115,14 @@ Route22Script1:
.asm_50f78
ld a, SPRITE_FACING_RIGHT
.asm_50f7a
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteFacingDirectionAndDelay
xor a
ld [wJoyIgnore], a
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld hl, wd72d
set 6, [hl]
@@ -136,12 +136,12 @@ Route22Script1:
ret
Route22RivalDefeatedText1:
- TX_FAR _Route22RivalDefeatedText1
- db "@"
+ text_far _Route22RivalDefeatedText1
+ text_end
Route22Text_511bc:
- TX_FAR _Route22Text_511bc
- db "@"
+ text_far _Route22Text_511bc
+ text_end
Route22Script2:
ld a, [wIsInBattle]
@@ -161,18 +161,18 @@ Route22Script2:
.notDown
ld a, SPRITE_FACING_RIGHT
.done
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteFacingDirectionAndDelay
ld a, $f0
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call StopAllMusic
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, [wcf0d]
cp $1
jr nz, .asm_50fff
@@ -193,7 +193,7 @@ Route22Script_5100d:
ld de, Route22RivalExitMovementData2
Route22MoveRival1:
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
jp MoveSprite
Route22RivalExitMovementData1:
@@ -204,7 +204,7 @@ Route22RivalExitMovementData1:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
Route22RivalExitMovementData2:
db NPC_MOVEMENT_UP
@@ -217,7 +217,7 @@ Route22RivalExitMovementData2:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
Route22Script3:
ld a, [wd730]
@@ -246,9 +246,9 @@ Route22Script_5104e:
call StopAllMusic
.skipYVisibilityTesta
call StopAllMusic
- callba Music_RivalAlternateTempo
+ farcall Music_RivalAlternateTempo
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call Route22MoveRivalSprite
ld a, $4
ld [wRoute22CurScript], a
@@ -259,7 +259,7 @@ Route22Script4:
bit 0, a
ret nz
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, [wcf0d]
cp $1
jr nz, .asm_510a1
@@ -272,12 +272,12 @@ Route22Script4:
ld [wPlayerMovingDirection], a
ld a, SPRITE_FACING_RIGHT
.asm_510a8
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
xor a
ld [wJoyIgnore], a
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld hl, wd72d
set 6, [hl]
@@ -291,19 +291,19 @@ Route22Script4:
ret
Route22RivalDefeatedText2:
- TX_FAR _Route22RivalDefeatedText2
- db "@"
+ text_far _Route22RivalDefeatedText2
+ text_end
Route22Text_511d0:
- TX_FAR _Route22Text_511d0
- db "@"
+ text_far _Route22Text_511d0
+ text_end
Route22Script5:
ld a, [wIsInBattle]
cp $ff
jp z, Route22Script_50ece
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, [wcf0d]
cp $1
jr nz, .asm_510fb
@@ -316,16 +316,16 @@ Route22Script5:
ld [wPlayerMovingDirection], a
ld a, SPRITE_FACING_RIGHT
.asm_51102
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, $f0
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call StopAllMusic
- callba Music_RivalAlternateStartAndTempo
+ farcall Music_RivalAlternateStartAndTempo
ld a, [wcf0d]
cp $1
jr nz, .asm_51134
@@ -346,17 +346,16 @@ Route22Script_51142:
ld de, MovementData_5114d
Route22MoveRival2:
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
jp MoveSprite
MovementData_5114c:
db NPC_MOVEMENT_LEFT
-
MovementData_5114d:
db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_LEFT
- db $FF
+ db -1 ; end
Route22Script6:
ld a, [wd730]
@@ -379,16 +378,16 @@ Route22_TextPointers:
dw Route22FrontGateText
Route22Text1:
- TX_ASM
- callba Func_f1b27
+ text_asm
+ farcall Func_f1b27
jp TextScriptEnd
Route22Text2:
- TX_ASM
- callba Func_f1b47
+ text_asm
+ farcall Func_f1b47
jp TextScriptEnd
Route22FrontGateText:
- TX_ASM
- callba Func_f1b67
+ text_asm
+ farcall Func_f1b67
jp TextScriptEnd
diff --git a/scripts/Route22Gate.asm b/scripts/Route22Gate.asm
index 946366b5..adbefe8a 100755
--- a/scripts/Route22Gate.asm
+++ b/scripts/Route22Gate.asm
@@ -4,7 +4,7 @@ Route22Gate_Script:
ld a, [wRoute22GateCurScript]
call CallFunctionInTable
ld a, [wYCoord]
- cp $4
+ cp 4
ld a, ROUTE_23
jr c, .asm_1e69a
ld a, ROUTE_22
@@ -22,18 +22,18 @@ Route22GateScript0:
call ArePlayerCoordsInArray
ret nc
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, SPRITE_FACING_LEFT
ld [wSpriteStateData1 + 1 * $10 + 9], a
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ret
Route22GateScriptCoords:
- db 2,4
- db 2,5
- db $ff
+ dbmapcoord 4, 2
+ dbmapcoord 5, 2
+ db -1 ; end
Route22GateScript_1e6ba:
ld a, $1
@@ -60,7 +60,7 @@ Route22Gate_TextPointers:
dw Route22GateText1
Route22GateText1:
- TX_ASM
+ text_asm
ld a, [wObtainedBadges]
bit 0, a ; BOULDERBADGE
jr nz, .asm_1e6f6
@@ -78,8 +78,8 @@ Route22GateText1:
jp TextScriptEnd
Route22GateText_1e704:
- TX_FAR _Route22GateText_1e704
- TX_ASM
+ text_far _Route22GateText_1e704
+ text_asm
ld a, SFX_DENIED
call PlaySoundWaitForCurrent
call WaitForSoundToFinish
@@ -87,10 +87,10 @@ Route22GateText_1e704:
ret
Route22GateText_1e715:
- TX_FAR _Route22GateText_1e715
- db "@"
+ text_far _Route22GateText_1e715
+ text_end
Route22GateText_1e71a:
- TX_FAR _Route22GateText_1e71a
- TX_SFX_ITEM_1
- db "@"
+ text_far _Route22GateText_1e71a
+ sound_get_item_1
+ text_end
diff --git a/scripts/Route22_2.asm b/scripts/Route22_2.asm
index 1cd23ed2..7f3fa54d 100755
--- a/scripts/Route22_2.asm
+++ b/scripts/Route22_2.asm
@@ -1,4 +1,4 @@
-Func_f1b27:
+Func_f1b27::
CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE
jr z, .asm_5118b
ld hl, Route22RivalAfterBattleText1
@@ -12,14 +12,14 @@ Func_f1b27:
ret
Route22RivalBeforeBattleText1:
- TX_FAR _Route22RivalBeforeBattleText1
- db "@"
+ text_far _Route22RivalBeforeBattleText1
+ text_end
Route22RivalAfterBattleText1:
- TX_FAR _Route22RivalAfterBattleText1
- db "@"
+ text_far _Route22RivalAfterBattleText1
+ text_end
-Func_f1b47:
+Func_f1b47::
CheckEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE
jr z, .asm_511a4
ld hl, Route22RivalAfterBattleText2
@@ -33,18 +33,18 @@ Func_f1b47:
ret
Route22RivalBeforeBattleText2:
- TX_FAR _Route22RivalBeforeBattleText2
- db "@"
+ text_far _Route22RivalBeforeBattleText2
+ text_end
Route22RivalAfterBattleText2:
- TX_FAR _Route22RivalAfterBattleText2
- db "@"
+ text_far _Route22RivalAfterBattleText2
+ text_end
-Func_f1b67:
+Func_f1b67::
ld hl, Route22FrontGateText_3c
call PrintText
ret
Route22FrontGateText_3c:
- TX_FAR _Route22FrontGateText
- db "@"
+ text_far _Route22FrontGateText
+ text_end
diff --git a/scripts/Route23.asm b/scripts/Route23.asm
index 34d95b84..e5318862 100755
--- a/scripts/Route23.asm
+++ b/scripts/Route23.asm
@@ -32,20 +32,20 @@ Route23Script0:
EventFlagBit c, EVENT_PASSED_EARTHBADGE_CHECK + 1, EVENT_PASSED_CASCADEBADGE_CHECK
.asm_51224
ld a, [hli]
- cp $ff
+ cp -1
ret z
inc e
dec c
cp b
jr nz, .asm_51224
- cp $23
+ cp 35
jr nz, .asm_51237
ld a, [wXCoord]
- cp $e
+ cp 14
ret nc
.asm_51237
ld a, e
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
ld a, c
ld [wWhichBadge], a
ld b, FLAG_TEST
@@ -57,11 +57,18 @@ Route23Script0:
call Route23Script_5125d
call DisplayTextID
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ret
YCoordsData_51255:
- db $23,$38,$55,$60,$69,$77,$88,$FF
+ db 35
+ db 56
+ db 85
+ db 96
+ db 105
+ db 119
+ db 136
+ db -1 ; end
Route23Script_5125d:
ld hl, BadgeTextPointers
@@ -142,43 +149,43 @@ Route23_TextPointers:
dw Route23Text8
Route23Text1:
- TX_ASM
+ text_asm
EventFlagBit a, EVENT_PASSED_EARTHBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK
call Route23Script_51346
jp TextScriptEnd
Route23Text2:
- TX_ASM
+ text_asm
EventFlagBit a, EVENT_PASSED_VOLCANOBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK
call Route23Script_51346
jp TextScriptEnd
Route23Text3:
- TX_ASM
+ text_asm
EventFlagBit a, EVENT_PASSED_MARSHBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK
call Route23Script_51346
jp TextScriptEnd
Route23Text4:
- TX_ASM
+ text_asm
EventFlagBit a, EVENT_PASSED_SOULBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK
call Route23Script_51346
jp TextScriptEnd
Route23Text5:
- TX_ASM
+ text_asm
EventFlagBit a, EVENT_PASSED_RAINBOWBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK
call Route23Script_51346
jp TextScriptEnd
Route23Text6:
- TX_ASM
+ text_asm
EventFlagBit a, EVENT_PASSED_THUNDERBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK
call Route23Script_51346
jp TextScriptEnd
Route23Text7:
- TX_ASM
+ text_asm
EventFlagBit a, EVENT_PASSED_CASCADEBADGE_CHECK
call Route23Script_51346
jp TextScriptEnd
@@ -218,19 +225,19 @@ Route23Script_51388:
jp PrintText
VictoryRoadGuardText1:
- TX_FAR _VictoryRoadGuardText1
- TX_ASM
+ text_far _VictoryRoadGuardText1
+ text_asm
ld a, SFX_DENIED
call PlaySoundWaitForCurrent
call WaitForSoundToFinish
jp TextScriptEnd
VictoryRoadGuardText2:
- TX_FAR _VictoryRoadGuardText2
- TX_SFX_ITEM_1
- TX_FAR _VictoryRoadGuardText_513a3
- db "@"
+ text_far _VictoryRoadGuardText2
+ sound_get_item_1
+ text_far _VictoryRoadGuardText_513a3
+ text_end
Route23Text8:
- TX_FAR _Route23Text8
- db "@"
+ text_far _Route23Text8
+ text_end
diff --git a/scripts/Route24.asm b/scripts/Route24.asm
index 58f71981..fc4633e7 100755
--- a/scripts/Route24.asm
+++ b/scripts/Route24.asm
@@ -28,9 +28,9 @@ Route24Script0:
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
CheckAndResetEvent EVENT_NUGGET_REWARD_AVAILABLE
ret z
@@ -45,7 +45,8 @@ Route24Script0:
ret
CoordsData_5140e:
- db $0F,$0A,$FF
+ dbmapcoord 10, 15
+ db -1 ; end
Route24Script4:
ld a, [wSimulatedJoypadStatesIndex]
@@ -66,7 +67,7 @@ Route24Script3:
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_ROUTE24_ROCKET
ld a, $1
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
@@ -87,71 +88,29 @@ Route24_TextPointers:
dw Route24Text8
Route24TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_0
- dw Route24BattleText1 ; TextBeforeBattle
- dw Route24AfterBattleText1 ; TextAfterBattle
- dw Route24EndBattleText1 ; TextEndBattle
- dw Route24EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_24_TRAINER_0, 4, Route24BattleText1, Route24EndBattleText1, Route24AfterBattleText1
Route24TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_1
- db ($1 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_1
- dw Route24BattleText2 ; TextBeforeBattle
- dw Route24AfterBattleText2 ; TextAfterBattle
- dw Route24EndBattleText2 ; TextEndBattle
- dw Route24EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_24_TRAINER_1, 1, Route24BattleText2, Route24EndBattleText2, Route24AfterBattleText2
Route24TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_2
- db ($1 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_2
- dw Route24BattleText3 ; TextBeforeBattle
- dw Route24AfterBattleText3 ; TextAfterBattle
- dw Route24EndBattleText3 ; TextEndBattle
- dw Route24EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_24_TRAINER_2, 1, Route24BattleText3, Route24EndBattleText3, Route24AfterBattleText3
Route24TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_3
- db ($1 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_3
- dw Route24BattleText4 ; TextBeforeBattle
- dw Route24AfterBattleText4 ; TextAfterBattle
- dw Route24EndBattleText4 ; TextEndBattle
- dw Route24EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_24_TRAINER_3, 1, Route24BattleText4, Route24EndBattleText4, Route24AfterBattleText4
Route24TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_4
- db ($1 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_4
- dw Route24BattleText5 ; TextBeforeBattle
- dw Route24AfterBattleText5 ; TextAfterBattle
- dw Route24EndBattleText5 ; TextEndBattle
- dw Route24EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_24_TRAINER_4, 1, Route24BattleText5, Route24EndBattleText5, Route24AfterBattleText5
Route24TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_5
- db ($1 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_5
- dw Route24BattleText6 ; TextBeforeBattle
- dw Route24AfterBattleText6 ; TextAfterBattle
- dw Route24EndBattleText6 ; TextEndBattle
- dw Route24EndBattleText6 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_24_TRAINER_5, 1, Route24BattleText6, Route24EndBattleText6, Route24AfterBattleText6
+ db -1 ; end
Route24Text1:
- TX_ASM
+ text_asm
ResetEvent EVENT_NUGGET_REWARD_AVAILABLE
CheckEvent EVENT_GOT_NUGGET
- jr nz, .asm_514f9
+ jr nz, .got_item
ld hl, Route24Text_51510
call PrintText
lb bc, NUGGET, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
SetEvent EVENT_GOT_NUGGET
ld hl, Route24Text_5151a
call PrintText
@@ -163,164 +122,164 @@ Route24Text1:
ld hl, Route24Text_5152b
ld de, Route24Text_5152b
call SaveEndBattleTextPointers
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $3
ld [wRoute24CurScript], a
ld [wCurMapScript], a
jp TextScriptEnd
-.asm_514f9
+.got_item
ld hl, Route24Text_51530
call PrintText
jp TextScriptEnd
-.BagFull
+.bag_full
ld hl, Route24Text_51521
call PrintText
SetEvent EVENT_NUGGET_REWARD_AVAILABLE
jp TextScriptEnd
Route24Text_51510:
- TX_FAR _Route24Text_51510
- TX_SFX_ITEM_1
- TX_FAR _Route24Text_51515
- db "@"
+ text_far _Route24Text_51510
+ sound_get_item_1
+ text_far _Route24Text_51515
+ text_end
Route24Text_5151a:
- TX_FAR _Route24Text_5151a
- TX_SFX_KEY_ITEM
- TX_BLINK
- db "@"
+ text_far _Route24Text_5151a
+ sound_get_key_item
+ text_promptbutton
+ text_end
Route24Text_51521:
- TX_FAR _Route24Text_51521
- db "@"
+ text_far _Route24Text_51521
+ text_end
Route24Text_51526:
- TX_FAR _Route24Text_51526
- db "@"
+ text_far _Route24Text_51526
+ text_end
Route24Text_5152b:
- TX_FAR _Route24Text_5152b
- db "@"
+ text_far _Route24Text_5152b
+ text_end
Route24Text_51530:
- TX_FAR _Route24Text_51530
- db "@"
+ text_far _Route24Text_51530
+ text_end
Route24Text2:
- TX_ASM
+ text_asm
ld hl, Route24TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route24Text3:
- TX_ASM
+ text_asm
ld hl, Route24TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route24Text4:
- TX_ASM
+ text_asm
ld hl, Route24TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route24Text5:
- TX_ASM
+ text_asm
ld hl, Route24TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route24Text6:
- TX_ASM
+ text_asm
ld hl, Route24TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route24Text7:
- TX_ASM
+ text_asm
ld hl, Route24TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route24BattleText1:
- TX_FAR _Route24BattleText1
- db "@"
+ text_far _Route24BattleText1
+ text_end
Route24EndBattleText1:
- TX_FAR _Route24EndBattleText1
- db "@"
+ text_far _Route24EndBattleText1
+ text_end
Route24AfterBattleText1:
- TX_FAR _Route24AfterBattleText1
- db "@"
+ text_far _Route24AfterBattleText1
+ text_end
Route24BattleText2:
- TX_FAR _Route24BattleText2
- db "@"
+ text_far _Route24BattleText2
+ text_end
Route24EndBattleText2:
- TX_FAR _Route24EndBattleText2
- db "@"
+ text_far _Route24EndBattleText2
+ text_end
Route24AfterBattleText2:
- TX_FAR _Route24AfterBattleText2
- db "@"
+ text_far _Route24AfterBattleText2
+ text_end
Route24BattleText3:
- TX_FAR _Route24BattleText3
- db "@"
+ text_far _Route24BattleText3
+ text_end
Route24EndBattleText3:
- TX_FAR _Route24EndBattleText3
- db "@"
+ text_far _Route24EndBattleText3
+ text_end
Route24AfterBattleText3:
- TX_FAR _Route24AfterBattleText3
- db "@"
+ text_far _Route24AfterBattleText3
+ text_end
Route24BattleText4:
- TX_FAR _Route24BattleText4
- db "@"
+ text_far _Route24BattleText4
+ text_end
Route24EndBattleText4:
- TX_FAR _Route24EndBattleText4
- db "@"
+ text_far _Route24EndBattleText4
+ text_end
Route24AfterBattleText4:
- TX_FAR _Route24AfterBattleText4
- db "@"
+ text_far _Route24AfterBattleText4
+ text_end
Route24BattleText5:
- TX_FAR _Route24BattleText5
- db "@"
+ text_far _Route24BattleText5
+ text_end
Route24EndBattleText5:
- TX_FAR _Route24EndBattleText5
- db "@"
+ text_far _Route24EndBattleText5
+ text_end
Route24AfterBattleText5:
- TX_FAR _Route24AfterBattleText5
- db "@"
+ text_far _Route24AfterBattleText5
+ text_end
Route24BattleText6:
- TX_FAR _Route24BattleText6
- db "@"
+ text_far _Route24BattleText6
+ text_end
Route24EndBattleText6:
- TX_FAR _Route24EndBattleText6
- db "@"
+ text_far _Route24EndBattleText6
+ text_end
Route24AfterBattleText6:
- TX_FAR _Route24AfterBattleText6
- db "@"
+ text_far _Route24AfterBattleText6
+ text_end
Route24Text8:
- TX_ASM
+ text_asm
CheckEvent EVENT_54F
jr nz, .asm_515d5
ld hl, Route24Text_515de
@@ -359,19 +318,18 @@ Route24Text8:
jp TextScriptEnd
Route24Text_515de:
- TX_FAR _Route24DamianText1
- db "@"
+ text_far _Route24DamianText1
+ text_end
Route24Text_515e3:
- TX_FAR _Route24DamianText2
- db $d
- db "@"
+ text_far _Route24DamianText2
+ text_waitbutton
+ text_end
Route24Text_515e9:
- TX_FAR _Route24DamianText3
- db "@"
+ text_far _Route24DamianText3
+ text_end
Route24Text_515ee:
- TX_FAR _Route24DamianText4
- db "@"
-
+ text_far _Route24DamianText4
+ text_end
diff --git a/scripts/Route25.asm b/scripts/Route25.asm
index c3c11ed5..400ac9ed 100755
--- a/scripts/Route25.asm
+++ b/scripts/Route25.asm
@@ -65,250 +65,187 @@ Route25_TextPointers:
dw Route25Text11
Route25TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_0
- dw Route25BattleText1 ; TextBeforeBattle
- dw Route25AfterBattleText1 ; TextAfterBattle
- dw Route25EndBattleText1 ; TextEndBattle
- dw Route25EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_0, 2, Route25BattleText1, Route25EndBattleText1, Route25AfterBattleText1
Route25TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_1
- dw Route25BattleText2 ; TextBeforeBattle
- dw Route25AfterBattleText2 ; TextAfterBattle
- dw Route25EndBattleText2 ; TextEndBattle
- dw Route25EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_1, 3, Route25BattleText2, Route25EndBattleText2, Route25AfterBattleText2
Route25TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_2
- dw Route25BattleText3 ; TextBeforeBattle
- dw Route25AfterBattleText3 ; TextAfterBattle
- dw Route25EndBattleText3 ; TextEndBattle
- dw Route25EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_2, 3, Route25BattleText3, Route25EndBattleText3, Route25AfterBattleText3
Route25TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_3
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_3
- dw Route25BattleText4 ; TextBeforeBattle
- dw Route25AfterBattleText4 ; TextAfterBattle
- dw Route25EndBattleText4 ; TextEndBattle
- dw Route25EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_3, 2, Route25BattleText4, Route25EndBattleText4, Route25AfterBattleText4
Route25TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_4
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_4
- dw Route25BattleText5 ; TextBeforeBattle
- dw Route25AfterBattleText5 ; TextAfterBattle
- dw Route25EndBattleText5 ; TextEndBattle
- dw Route25EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_4, 4, Route25BattleText5, Route25EndBattleText5, Route25AfterBattleText5
Route25TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_5
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_5
- dw Route25BattleText6 ; TextBeforeBattle
- dw Route25AfterBattleText6 ; TextAfterBattle
- dw Route25EndBattleText6 ; TextEndBattle
- dw Route25EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_5, 4, Route25BattleText6, Route25EndBattleText6, Route25AfterBattleText6
Route25TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_6
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_6
- dw Route25BattleText7 ; TextBeforeBattle
- dw Route25AfterBattleText7 ; TextAfterBattle
- dw Route25EndBattleText7 ; TextEndBattle
- dw Route25EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_6, 3, Route25BattleText7, Route25EndBattleText7, Route25AfterBattleText7
Route25TrainerHeader7:
- dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_7, 1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_7, 1
- dw Route25BattleText8 ; TextBeforeBattle
- dw Route25AfterBattleText8 ; TextAfterBattle
- dw Route25EndBattleText8 ; TextEndBattle
- dw Route25EndBattleText8 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_7, 1, 2, Route25BattleText8, Route25EndBattleText8, Route25AfterBattleText8
Route25TrainerHeader8:
- dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_8, 1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_8, 1
- dw Route25BattleText9 ; TextBeforeBattle
- dw Route25AfterBattleText9 ; TextAfterBattle
- dw Route25EndBattleText9 ; TextEndBattle
- dw Route25EndBattleText9 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_8, 1, 2, Route25BattleText9, Route25EndBattleText9, Route25AfterBattleText9
+ db -1 ; end
Route25Text1:
- TX_ASM
+ text_asm
ld hl, Route25TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route25Text2:
- TX_ASM
+ text_asm
ld hl, Route25TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route25Text3:
- TX_ASM
+ text_asm
ld hl, Route25TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route25Text4:
- TX_ASM
+ text_asm
ld hl, Route25TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route25Text5:
- TX_ASM
+ text_asm
ld hl, Route25TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route25Text6:
- TX_ASM
+ text_asm
ld hl, Route25TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route25Text7:
- TX_ASM
+ text_asm
ld hl, Route25TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route25Text8:
- TX_ASM
+ text_asm
ld hl, Route25TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
Route25Text9:
- TX_ASM
+ text_asm
ld hl, Route25TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
Route25BattleText1:
- TX_FAR _Route25BattleText1
- db "@"
+ text_far _Route25BattleText1
+ text_end
Route25EndBattleText1:
- TX_FAR _Route25EndBattleText1
- db "@"
+ text_far _Route25EndBattleText1
+ text_end
Route25AfterBattleText1:
- TX_FAR _Route25AfterBattleText1
- db "@"
+ text_far _Route25AfterBattleText1
+ text_end
Route25BattleText2:
- TX_FAR _Route25BattleText2
- db "@"
+ text_far _Route25BattleText2
+ text_end
Route25EndBattleText2:
- TX_FAR _Route25EndBattleText2
- db "@"
+ text_far _Route25EndBattleText2
+ text_end
Route25AfterBattleText2:
- TX_FAR _Route25AfterBattleText2
- db "@"
+ text_far _Route25AfterBattleText2
+ text_end
Route25BattleText3:
- TX_FAR _Route25BattleText3
- db "@"
+ text_far _Route25BattleText3
+ text_end
Route25EndBattleText3:
- TX_FAR _Route25EndBattleText3
- db "@"
+ text_far _Route25EndBattleText3
+ text_end
Route25AfterBattleText3:
- TX_FAR _Route25AfterBattleText3
- db "@"
+ text_far _Route25AfterBattleText3
+ text_end
Route25BattleText4:
- TX_FAR _Route25BattleText4
- db "@"
+ text_far _Route25BattleText4
+ text_end
Route25EndBattleText4:
- TX_FAR _Route25EndBattleText4
- db "@"
+ text_far _Route25EndBattleText4
+ text_end
Route25AfterBattleText4:
- TX_FAR _Route25AfterBattleText4
- db "@"
+ text_far _Route25AfterBattleText4
+ text_end
Route25BattleText5:
- TX_FAR _Route25BattleText5
- db "@"
+ text_far _Route25BattleText5
+ text_end
Route25EndBattleText5:
- TX_FAR _Route25EndBattleText5
- db "@"
+ text_far _Route25EndBattleText5
+ text_end
Route25AfterBattleText5:
- TX_FAR _Route25AfterBattleText5
- db "@"
+ text_far _Route25AfterBattleText5
+ text_end
Route25BattleText6:
- TX_FAR _Route25BattleText6
- db "@"
+ text_far _Route25BattleText6
+ text_end
Route25EndBattleText6:
- TX_FAR _Route25EndBattleText6
- db "@"
+ text_far _Route25EndBattleText6
+ text_end
Route25AfterBattleText6:
- TX_FAR _Route25AfterBattleText6
- db "@"
+ text_far _Route25AfterBattleText6
+ text_end
Route25BattleText7:
- TX_FAR _Route25BattleText7
- db "@"
+ text_far _Route25BattleText7
+ text_end
Route25EndBattleText7:
- TX_FAR _Route25EndBattleText7
- db "@"
+ text_far _Route25EndBattleText7
+ text_end
Route25AfterBattleText7:
- TX_FAR _Route25AfterBattleText7
- db "@"
+ text_far _Route25AfterBattleText7
+ text_end
Route25BattleText8:
- TX_FAR _Route25BattleText8
- db "@"
+ text_far _Route25BattleText8
+ text_end
Route25EndBattleText8:
- TX_FAR _Route25EndBattleText8
- db "@"
+ text_far _Route25EndBattleText8
+ text_end
Route25AfterBattleText8:
- TX_FAR _Route25AfterBattleText8
- db "@"
+ text_far _Route25AfterBattleText8
+ text_end
Route25BattleText9:
- TX_FAR _Route25BattleText9
- db "@"
+ text_far _Route25BattleText9
+ text_end
Route25EndBattleText9:
- TX_FAR _Route25EndBattleText9
- db "@"
+ text_far _Route25EndBattleText9
+ text_end
Route25AfterBattleText9:
- TX_FAR _Route25AfterBattleText9
- db "@"
+ text_far _Route25AfterBattleText9
+ text_end
Route25Text11:
- TX_FAR _Route25Text11
- db "@"
+ text_far _Route25Text11
+ text_end
diff --git a/scripts/Route2Gate.asm b/scripts/Route2Gate.asm
index 70d93814..60f6ffe1 100755
--- a/scripts/Route2Gate.asm
+++ b/scripts/Route2Gate.asm
@@ -6,13 +6,13 @@ Route2Gate_TextPointers:
dw Route2GateText2
Route2GateText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_HM05
- jr nz, .asm_5d60d
- ld a, 10 ; pokemon needed
- ld [hOaksAideRequirement], a
- ld a, HM_05 ; oak's aide reward
- ld [hOaksAideRewardItem], a
+ jr nz, .got_item
+ ld a, 10
+ ldh [hOaksAideRequirement], a
+ ld a, HM_FLASH
+ ldh [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
ld hl, wcd6d
@@ -20,20 +20,20 @@ Route2GateText1:
ld bc, ITEM_NAME_LENGTH
call CopyData
predef OaksAideScript
- ld a, [hOaksAideResult]
- cp $1
- jr nz, .asm_5d613
+ ldh a, [hOaksAideResult]
+ cp OAKS_AIDE_GOT_ITEM
+ jr nz, .no_item
SetEvent EVENT_GOT_HM05
-.asm_5d60d
+.got_item
ld hl, Route2GateText_5d616
call PrintText
-.asm_5d613
+.no_item
jp TextScriptEnd
Route2GateText_5d616:
- TX_FAR _Route2GateText_5d616
- db "@"
+ text_far _Route2GateText_5d616
+ text_end
Route2GateText2:
- TX_FAR _Route2GateText2
- db "@"
+ text_far _Route2GateText2
+ text_end
diff --git a/scripts/Route2TradeHouse.asm b/scripts/Route2TradeHouse.asm
index a89e2fe9..85ed2d34 100755
--- a/scripts/Route2TradeHouse.asm
+++ b/scripts/Route2TradeHouse.asm
@@ -6,12 +6,12 @@ Route2TradeHouse_TextPointers:
dw Route2HouseText2
Route2HouseText1:
- TX_FAR _Route2HouseText1
- db "@"
+ text_far _Route2HouseText1
+ text_end
Route2HouseText2:
- TX_ASM
- ld a, $1
+ text_asm
+ ld a, TRADE_FOR_MARCEL
ld [wWhichTrade], a
predef DoInGameTradeDialogue
jp TextScriptEnd
diff --git a/scripts/Route3.asm b/scripts/Route3.asm
index d55831bf..74140b40 100755
--- a/scripts/Route3.asm
+++ b/scripts/Route3.asm
@@ -25,227 +25,171 @@ Route3_TextPointers:
dw Route3Text10
Route3TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_0
- dw Route3BattleText1 ; TextBeforeBattle
- dw Route3AfterBattleText1 ; TextAfterBattle
- dw Route3EndBattleText1 ; TextEndBattle
- dw Route3EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_0, 2, Route3BattleText1, Route3EndBattleText1, Route3AfterBattleText1
Route3TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_1
- dw Route3BattleText2 ; TextBeforeBattle
- dw Route3AfterBattleText2 ; TextAfterBattle
- dw Route3EndBattleText2 ; TextEndBattle
- dw Route3EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_1, 3, Route3BattleText2, Route3EndBattleText2, Route3AfterBattleText2
Route3TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_2
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_2
- dw Route3BattleText3 ; TextBeforeBattle
- dw Route3AfterBattleText3 ; TextAfterBattle
- dw Route3EndBattleText3 ; TextEndBattle
- dw Route3EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_2, 2, Route3BattleText3, Route3EndBattleText3, Route3AfterBattleText3
Route3TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_3
- db ($1 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_3
- dw Route3BattleText4 ; TextBeforeBattle
- dw Route3AfterBattleText4 ; TextAfterBattle
- dw Route3EndBattleText4 ; TextEndBattle
- dw Route3EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_3, 1, Route3BattleText4, Route3EndBattleText4, Route3AfterBattleText4
Route3TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_4
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_4
- dw Route3BattleText5 ; TextBeforeBattle
- dw Route3AfterBattleText5 ; TextAfterBattle
- dw Route3EndBattleText5 ; TextEndBattle
- dw Route3EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_4, 4, Route3BattleText5, Route3EndBattleText5, Route3AfterBattleText5
Route3TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_5
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_5
- dw Route3BattleText6 ; TextBeforeBattle
- dw Route3AfterBattleText6 ; TextAfterBattle
- dw Route3EndBattleText6 ; TextEndBattle
- dw Route3EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_5, 3, Route3BattleText6, Route3EndBattleText6, Route3AfterBattleText6
Route3TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_6, 1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_6, 1
- dw Route3BattleText7 ; TextBeforeBattle
- dw Route3AfterBattleText7 ; TextAfterBattle
- dw Route3EndBattleText7 ; TextEndBattle
- dw Route3EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_6, 1, 3, Route3BattleText7, Route3EndBattleText7, Route3AfterBattleText7
Route3TrainerHeader7:
- dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_7, 1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_7, 1
- dw Route3BattleText8 ; TextBeforeBattle
- dw Route3AfterBattleText8 ; TextAfterBattle
- dw Route3EndBattleText8 ; TextEndBattle
- dw Route3EndBattleText8 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_7, 1, 2, Route3BattleText8, Route3EndBattleText8, Route3AfterBattleText8
+ db -1 ; end
Route3Text1:
- TX_FAR _Route3Text1
- db "@"
+ text_far _Route3Text1
+ text_end
Route3Text2:
- TX_ASM
+ text_asm
ld hl, Route3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route3BattleText1:
- TX_FAR _Route3BattleText1
- db "@"
+ text_far _Route3BattleText1
+ text_end
Route3EndBattleText1:
- TX_FAR _Route3EndBattleText1
- db "@"
+ text_far _Route3EndBattleText1
+ text_end
Route3AfterBattleText1:
- TX_FAR _Route3AfterBattleText1
- db "@"
+ text_far _Route3AfterBattleText1
+ text_end
Route3Text3:
- TX_ASM
+ text_asm
ld hl, Route3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route3BattleText2:
- TX_FAR _Route3BattleText2
- db "@"
+ text_far _Route3BattleText2
+ text_end
Route3EndBattleText2:
- TX_FAR _Route3EndBattleText2
- db "@"
+ text_far _Route3EndBattleText2
+ text_end
Route3AfterBattleText2:
- TX_FAR _Route3AfterBattleText2
- db "@"
+ text_far _Route3AfterBattleText2
+ text_end
Route3Text4:
- TX_ASM
+ text_asm
ld hl, Route3TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route3BattleText3:
- TX_FAR _Route3BattleText3
- db "@"
+ text_far _Route3BattleText3
+ text_end
Route3EndBattleText3:
- TX_FAR _Route3EndBattleText3
- db "@"
+ text_far _Route3EndBattleText3
+ text_end
Route3AfterBattleText3:
- TX_FAR _Route3AfterBattleText3
- db "@"
+ text_far _Route3AfterBattleText3
+ text_end
Route3Text5:
- TX_ASM
+ text_asm
ld hl, Route3TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route3BattleText4:
- TX_FAR _Route3BattleText4
- db "@"
+ text_far _Route3BattleText4
+ text_end
Route3EndBattleText4:
- TX_FAR _Route3EndBattleText4
- db "@"
+ text_far _Route3EndBattleText4
+ text_end
Route3AfterBattleText4:
- TX_FAR _Route3AfterBattleText4
- db "@"
+ text_far _Route3AfterBattleText4
+ text_end
Route3Text6:
- TX_ASM
+ text_asm
ld hl, Route3TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route3BattleText5:
- TX_FAR _Route3BattleText5
- db "@"
+ text_far _Route3BattleText5
+ text_end
Route3EndBattleText5:
- TX_FAR _Route3EndBattleText5
- db "@"
+ text_far _Route3EndBattleText5
+ text_end
Route3AfterBattleText5:
- TX_FAR _Route3AfterBattleText5
- db "@"
+ text_far _Route3AfterBattleText5
+ text_end
Route3Text7:
- TX_ASM
+ text_asm
ld hl, Route3TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route3BattleText6:
- TX_FAR _Route3BattleText6
- db "@"
+ text_far _Route3BattleText6
+ text_end
Route3EndBattleText6:
- TX_FAR _Route3EndBattleText6
- db "@"
+ text_far _Route3EndBattleText6
+ text_end
Route3AfterBattleText6:
- TX_FAR _Route3AfterBattleText6
- db "@"
+ text_far _Route3AfterBattleText6
+ text_end
Route3Text8:
- TX_ASM
+ text_asm
ld hl, Route3TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route3BattleText7:
- TX_FAR _Route3BattleText7
- db "@"
+ text_far _Route3BattleText7
+ text_end
Route3EndBattleText7:
- TX_FAR _Route3EndBattleText7
- db "@"
+ text_far _Route3EndBattleText7
+ text_end
Route3AfterBattleText7:
- TX_FAR _Route3AfterBattleText7
- db "@"
+ text_far _Route3AfterBattleText7
+ text_end
Route3Text9:
- TX_ASM
+ text_asm
ld hl, Route3TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
Route3BattleText8:
- TX_FAR _Route3BattleText8
- db "@"
+ text_far _Route3BattleText8
+ text_end
Route3EndBattleText8:
- TX_FAR _Route3EndBattleText8
- db "@"
+ text_far _Route3EndBattleText8
+ text_end
Route3AfterBattleText8:
- TX_FAR _Route3AfterBattleText8
- db "@"
+ text_far _Route3AfterBattleText8
+ text_end
Route3Text10:
- TX_FAR _Route3Text10
- db "@"
+ text_far _Route3Text10
+ text_end
diff --git a/scripts/Route4.asm b/scripts/Route4.asm
index 9b04a47a..b69a88c7 100755
--- a/scripts/Route4.asm
+++ b/scripts/Route4.asm
@@ -21,42 +21,35 @@ Route4_TextPointers:
dw Route4Text6
Route4TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_4_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_4_TRAINER_0
- dw Route4BattleText1 ; TextBeforeBattle
- dw Route4AfterBattleText1 ; TextAfterBattle
- dw Route4EndBattleText1 ; TextEndBattle
- dw Route4EndBattleText1 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_4_TRAINER_0, 3, Route4BattleText1, Route4EndBattleText1, Route4AfterBattleText1
+ db -1 ; end
Route4Text1:
- TX_FAR _Route4Text1
- db "@"
+ text_far _Route4Text1
+ text_end
Route4Text2:
- TX_ASM
+ text_asm
ld hl, Route4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route4BattleText1:
- TX_FAR _Route4BattleText1
- db "@"
+ text_far _Route4BattleText1
+ text_end
Route4EndBattleText1:
- TX_FAR _Route4EndBattleText1
- db "@"
+ text_far _Route4EndBattleText1
+ text_end
Route4AfterBattleText1:
- TX_FAR _Route4AfterBattleText1
- db "@"
+ text_far _Route4AfterBattleText1
+ text_end
Route4Text5:
- TX_FAR _Route4Text5
- db "@"
+ text_far _Route4Text5
+ text_end
Route4Text6:
- TX_FAR _Route4Text6
- db "@"
+ text_far _Route4Text6
+ text_end
diff --git a/scripts/Route5.asm b/scripts/Route5.asm
index 1b2bd242..33f3c345 100755
--- a/scripts/Route5.asm
+++ b/scripts/Route5.asm
@@ -5,5 +5,5 @@ Route5_TextPointers:
dw Route5Text1
Route5Text1:
- TX_FAR _Route5Text1
- db "@"
+ text_far _Route5Text1
+ text_end
diff --git a/scripts/Route5Gate.asm b/scripts/Route5Gate.asm
index bc763dfd..e155694a 100755
--- a/scripts/Route5Gate.asm
+++ b/scripts/Route5Gate.asm
@@ -25,13 +25,13 @@ Route5GateScript0:
ld a, PLAYER_DIR_LEFT
ld [wPlayerMovingDirection], a
xor a
- ld [hJoyHeld], a
- callba RemoveGuardDrink
- ld a, [$ffdb]
+ ldh [hJoyHeld], a
+ farcall RemoveGuardDrink
+ ldh a, [hItemToRemoveID]
and a
jr nz, .asm_1df82
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Route5GateScript_1df43
ld a, $1
@@ -39,16 +39,16 @@ Route5GateScript0:
ret
.asm_1df82
ld a, $3
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld hl, wd728
set 6, [hl]
ret
CoordsData_1df8f:
- db 3,3
- db 3,4
- db $ff
+ dbmapcoord 3, 3
+ dbmapcoord 4, 3
+ db -1 ; end
Route5GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
@@ -69,12 +69,12 @@ Route8GateText1:
Route7GateText1:
Route6GateText1:
Route5GateText1:
- TX_ASM
+ text_asm
ld a, [wd728]
bit 6, a
jr nz, .asm_88856
- callba RemoveGuardDrink
- ld a, [$ffdb]
+ farcall RemoveGuardDrink
+ ldh a, [hItemToRemoveID]
and a
jr nz, .asm_768a2
ld hl, Route5GateText2
@@ -98,20 +98,20 @@ Route8GateText2:
Route7GateText2:
Route6GateText2:
Route5GateText2:
- TX_FAR _SaffronGateText_1dfe7
- db "@"
+ text_far _SaffronGateText_1dfe7
+ text_end
Route8GateText3:
Route7GateText3:
Route6GateText3:
Route5GateText3:
- TX_FAR _SaffronGateText_8aaa9
- TX_SFX_KEY_ITEM
- TX_FAR _SaffronGateText_1dff1
- db "@"
+ text_far _SaffronGateText_8aaa9
+ sound_get_key_item
+ text_far _SaffronGateText_1dff1
+ text_end
SaffronGateText_1dff6:
- TX_FAR _SaffronGateText_1dff6
- db "@"
+ text_far _SaffronGateText_1dff6
+ text_end
diff --git a/scripts/Route6.asm b/scripts/Route6.asm
index 6ee3f317..01d5414d 100755
--- a/scripts/Route6.asm
+++ b/scripts/Route6.asm
@@ -22,169 +22,127 @@ Route6_TextPointers:
dw Route6Text7
Route6TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_0
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_0
- dw Route6BattleText1 ; TextBeforeBattle
- dw Route6AfterBattleText1 ; TextAfterBattle
- dw Route6EndBattleText1 ; TextEndBattle
- dw Route6EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_6_TRAINER_0, 0, Route6BattleText1, Route6EndBattleText1, Route6AfterBattleText1
Route6TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_1
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_1
- dw Route6BattleText2 ; TextBeforeBattle
- dw Route6AfterBattleText2 ; TextAfterBattle
- dw Route6EndBattleText2 ; TextEndBattle
- dw Route6EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_6_TRAINER_1, 0, Route6BattleText2, Route6EndBattleText2, Route6AfterBattleText2
Route6TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_2
- dw Route6BattleText3 ; TextBeforeBattle
- dw Route6AfterBattleText3 ; TextAfterBattle
- dw Route6EndBattleText3 ; TextEndBattle
- dw Route6EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_6_TRAINER_2, 4, Route6BattleText3, Route6EndBattleText3, Route6AfterBattleText3
Route6TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_3
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_3
- dw Route6BattleText4 ; TextBeforeBattle
- dw Route6AfterBattleText4 ; TextAfterBattle
- dw Route6EndBattleText4 ; TextEndBattle
- dw Route6EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_6_TRAINER_3, 3, Route6BattleText4, Route6EndBattleText4, Route6AfterBattleText4
Route6TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_4
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_4
- dw Route6BattleText5 ; TextBeforeBattle
- dw Route6AfterBattleText5 ; TextAfterBattle
- dw Route6EndBattleText5 ; TextEndBattle
- dw Route6EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_6_TRAINER_4, 3, Route6BattleText5, Route6EndBattleText5, Route6AfterBattleText5
Route6TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_5
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_5
- dw Route6BattleText6 ; TextBeforeBattle
- dw Route6AfterBattleText6 ; TextAfterBattle
- dw Route6EndBattleText6 ; TextEndBattle
- dw Route6EndBattleText6 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_6_TRAINER_5, 3, Route6BattleText6, Route6EndBattleText6, Route6AfterBattleText6
+ db -1 ; end
Route6Text1:
- TX_ASM
+ text_asm
ld hl, Route6TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route6BattleText1:
- TX_FAR _Route6BattleText1
- db "@"
+ text_far _Route6BattleText1
+ text_end
Route6EndBattleText1:
- TX_FAR _Route6EndBattleText1
- db "@"
+ text_far _Route6EndBattleText1
+ text_end
Route6AfterBattleText1:
- TX_FAR _Route6AfterBattleText1
- db "@"
+ text_far _Route6AfterBattleText1
+ text_end
Route6Text2:
- TX_ASM
+ text_asm
ld hl, Route6TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route6BattleText2:
- TX_FAR _Route6BattleText2
- db "@"
+ text_far _Route6BattleText2
+ text_end
Route6EndBattleText2:
- TX_FAR _Route6EndBattleText2
- db "@"
+ text_far _Route6EndBattleText2
+ text_end
Route6AfterBattleText2:
- TX_FAR _Route6AfterBattleText2
- db "@"
+ text_far _Route6AfterBattleText2
+ text_end
Route6Text3:
- TX_ASM
+ text_asm
ld hl, Route6TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route6BattleText3:
- TX_FAR _Route6BattleText3
- db "@"
+ text_far _Route6BattleText3
+ text_end
Route6EndBattleText3:
- TX_FAR _Route6EndBattleText3
- db "@"
+ text_far _Route6EndBattleText3
+ text_end
Route6AfterBattleText3:
- TX_FAR _Route6AfterBattleText3
- db "@"
+ text_far _Route6AfterBattleText3
+ text_end
Route6Text4:
- TX_ASM
+ text_asm
ld hl, Route6TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route6BattleText4:
- TX_FAR _Route6BattleText4
- db "@"
+ text_far _Route6BattleText4
+ text_end
Route6EndBattleText4:
- TX_FAR _Route6EndBattleText4
- db "@"
+ text_far _Route6EndBattleText4
+ text_end
Route6AfterBattleText4:
- TX_FAR _Route6AfterBattleText4
- db "@"
+ text_far _Route6AfterBattleText4
+ text_end
Route6Text5:
- TX_ASM
+ text_asm
ld hl, Route6TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route6BattleText5:
- TX_FAR _Route6BattleText5
- db "@"
+ text_far _Route6BattleText5
+ text_end
Route6EndBattleText5:
- TX_FAR _Route6EndBattleText5
- db "@"
+ text_far _Route6EndBattleText5
+ text_end
Route6AfterBattleText5:
- TX_FAR _Route6AfterBattleText5
- db "@"
+ text_far _Route6AfterBattleText5
+ text_end
Route6Text6:
- TX_ASM
+ text_asm
ld hl, Route6TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route6BattleText6:
- TX_FAR _Route6BattleText6
- db "@"
+ text_far _Route6BattleText6
+ text_end
Route6EndBattleText6:
- TX_FAR _Route6EndBattleText6
- db "@"
+ text_far _Route6EndBattleText6
+ text_end
Route6AfterBattleText6:
- TX_FAR _Route6AfterBattleText6
- db "@"
+ text_far _Route6AfterBattleText6
+ text_end
Route6Text7:
- TX_FAR _Route6Text7
- db "@"
+ text_far _Route6Text7
+ text_end
diff --git a/scripts/Route6Gate.asm b/scripts/Route6Gate.asm
index 348f61ac..143f60ae 100755
--- a/scripts/Route6Gate.asm
+++ b/scripts/Route6Gate.asm
@@ -19,13 +19,13 @@ Route6GateScript0:
ld a, PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a
xor a
- ld [hJoyHeld], a
- callba RemoveGuardDrink
- ld a, [$ffdb]
+ ldh [hJoyHeld], a
+ farcall RemoveGuardDrink
+ ldh a, [hItemToRemoveID]
and a
jr nz, .asm_1e080
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Route6GateScript_1e0a1
ld a, $1
@@ -35,12 +35,13 @@ Route6GateScript0:
ld hl, wd728
set 6, [hl]
ld a, $3
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
CoordsData_1e08c:
- db $02,$03
- db $02,$04,$FF
+ dbmapcoord 3, 2
+ dbmapcoord 4, 2
+ db -1 ; end
Route6GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
@@ -60,7 +61,7 @@ Route6GateScript_1e0a1:
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
xor a
- ld [wSpriteStateData2 + $06], a
+ ld [wSpritePlayerStateData2MovementByte1], a
ld [wOverrideSimulatedJoypadStatesMask], a
ret
diff --git a/scripts/Route7.asm b/scripts/Route7.asm
index 27d07a7a..648cbb58 100755
--- a/scripts/Route7.asm
+++ b/scripts/Route7.asm
@@ -6,5 +6,5 @@ Route7_TextPointers:
dw Route7Text1
Route7Text1:
- TX_FAR _Route7Text1
- db "@"
+ text_far _Route7Text1
+ text_end
diff --git a/scripts/Route7Gate.asm b/scripts/Route7Gate.asm
index 724172c5..9a647965 100755
--- a/scripts/Route7Gate.asm
+++ b/scripts/Route7Gate.asm
@@ -17,7 +17,7 @@ Route7GateScript_1e111:
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
xor a
- ld [wSpriteStateData2 + $06], a
+ ld [wSpritePlayerStateData2MovementByte1], a
ld [wOverrideSimulatedJoypadStatesMask], a
ret
@@ -31,13 +31,13 @@ Route7GateScript0:
ld a, PLAYER_DIR_UP
ld [wPlayerMovingDirection], a
xor a
- ld [hJoyHeld], a
- callba RemoveGuardDrink
- ld a, [$ffdb]
+ ldh [hJoyHeld], a
+ farcall RemoveGuardDrink
+ ldh a, [hItemToRemoveID]
and a
jr nz, .asm_1e15a
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Route7GateScript_1e111
ld a, $1
@@ -45,16 +45,16 @@ Route7GateScript0:
ret
.asm_1e15a
ld a, $3
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld hl, wd728
set 6, [hl]
ret
CoordsData_1e167:
- db 3,3
- db 4,3
- db $ff
+ dbmapcoord 3, 3
+ dbmapcoord 3, 4
+ db -1 ; end
Route7GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
diff --git a/scripts/Route8.asm b/scripts/Route8.asm
index f3388505..f50167c0 100755
--- a/scripts/Route8.asm
+++ b/scripts/Route8.asm
@@ -25,250 +25,187 @@ Route8_TextPointers:
dw Route8Text10
Route8TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_0
- dw Route8BattleText1 ; TextBeforeBattle
- dw Route8AfterBattleText1 ; TextAfterBattle
- dw Route8EndBattleText1 ; TextEndBattle
- dw Route8EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_0, 4, Route8BattleText1, Route8EndBattleText1, Route8AfterBattleText1
Route8TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_1
- dw Route8BattleText2 ; TextBeforeBattle
- dw Route8AfterBattleText2 ; TextAfterBattle
- dw Route8EndBattleText2 ; TextEndBattle
- dw Route8EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_1, 4, Route8BattleText2, Route8EndBattleText2, Route8AfterBattleText2
Route8TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_2
- dw Route8BattleText3 ; TextBeforeBattle
- dw Route8AfterBattleText3 ; TextAfterBattle
- dw Route8EndBattleText3 ; TextEndBattle
- dw Route8EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_2, 4, Route8BattleText3, Route8EndBattleText3, Route8AfterBattleText3
Route8TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_3
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_3
- dw Route8BattleText4 ; TextBeforeBattle
- dw Route8AfterBattleText4 ; TextAfterBattle
- dw Route8EndBattleText4 ; TextEndBattle
- dw Route8EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_3, 2, Route8BattleText4, Route8EndBattleText4, Route8AfterBattleText4
Route8TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_4
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_4
- dw Route8BattleText5 ; TextBeforeBattle
- dw Route8AfterBattleText5 ; TextAfterBattle
- dw Route8EndBattleText5 ; TextEndBattle
- dw Route8EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_4, 3, Route8BattleText5, Route8EndBattleText5, Route8AfterBattleText5
Route8TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_5
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_5
- dw Route8BattleText6 ; TextBeforeBattle
- dw Route8AfterBattleText6 ; TextAfterBattle
- dw Route8EndBattleText6 ; TextEndBattle
- dw Route8EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_5, 3, Route8BattleText6, Route8EndBattleText6, Route8AfterBattleText6
Route8TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_6
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_6
- dw Route8BattleText7 ; TextBeforeBattle
- dw Route8AfterBattleText7 ; TextAfterBattle
- dw Route8EndBattleText7 ; TextEndBattle
- dw Route8EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_6, 2, Route8BattleText7, Route8EndBattleText7, Route8AfterBattleText7
Route8TrainerHeader7:
- dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_7, 1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_7, 1
- dw Route8BattleText8 ; TextBeforeBattle
- dw Route8AfterBattleText8 ; TextAfterBattle
- dw Route8EndBattleText8 ; TextEndBattle
- dw Route8EndBattleText8 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_7, 1, 2, Route8BattleText8, Route8EndBattleText8, Route8AfterBattleText8
Route8TrainerHeader8:
- dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_8, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_8, 1
- dw Route8BattleText9 ; TextBeforeBattle
- dw Route8AfterBattleText9 ; TextAfterBattle
- dw Route8EndBattleText9 ; TextEndBattle
- dw Route8EndBattleText9 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_8, 1, 4, Route8BattleText9, Route8EndBattleText9, Route8AfterBattleText9
+ db -1 ; end
Route8Text1:
- TX_ASM
+ text_asm
ld hl, Route8TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route8BattleText1:
- TX_FAR _Route8BattleText1
- db "@"
+ text_far _Route8BattleText1
+ text_end
Route8EndBattleText1:
- TX_FAR _Route8EndBattleText1
- db "@"
+ text_far _Route8EndBattleText1
+ text_end
Route8AfterBattleText1:
- TX_FAR _Route8AfterBattleText1
- db "@"
+ text_far _Route8AfterBattleText1
+ text_end
Route8Text2:
- TX_ASM
+ text_asm
ld hl, Route8TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route8BattleText2:
- TX_FAR _Route8BattleText2
- db "@"
+ text_far _Route8BattleText2
+ text_end
Route8EndBattleText2:
- TX_FAR _Route8EndBattleText2
- db "@"
+ text_far _Route8EndBattleText2
+ text_end
Route8AfterBattleText2:
- TX_FAR _Route8AfterBattleText2
- db "@"
+ text_far _Route8AfterBattleText2
+ text_end
Route8Text3:
- TX_ASM
+ text_asm
ld hl, Route8TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route8BattleText3:
- TX_FAR _Route8BattleText3
- db "@"
+ text_far _Route8BattleText3
+ text_end
Route8EndBattleText3:
- TX_FAR _Route8EndBattleText3
- db "@"
+ text_far _Route8EndBattleText3
+ text_end
Route8AfterBattleText3:
- TX_FAR _Route8AfterBattleText3
- db "@"
+ text_far _Route8AfterBattleText3
+ text_end
Route8Text4:
- TX_ASM
+ text_asm
ld hl, Route8TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route8BattleText4:
- TX_FAR _Route8BattleText4
- db "@"
+ text_far _Route8BattleText4
+ text_end
Route8EndBattleText4:
- TX_FAR _Route8EndBattleText4
- db "@"
+ text_far _Route8EndBattleText4
+ text_end
Route8AfterBattleText4:
- TX_FAR _Route8AfterBattleText4
- db "@"
+ text_far _Route8AfterBattleText4
+ text_end
Route8Text5:
- TX_ASM
+ text_asm
ld hl, Route8TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route8BattleText5:
- TX_FAR _Route8BattleText5
- db "@"
+ text_far _Route8BattleText5
+ text_end
Route8EndBattleText5:
- TX_FAR _Route8EndBattleText5
- db "@"
+ text_far _Route8EndBattleText5
+ text_end
Route8AfterBattleText5:
- TX_FAR _Route8AfterBattleText5
- db "@"
+ text_far _Route8AfterBattleText5
+ text_end
Route8Text6:
- TX_ASM
+ text_asm
ld hl, Route8TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route8BattleText6:
- TX_FAR _Route8BattleText6
- db "@"
+ text_far _Route8BattleText6
+ text_end
Route8EndBattleText6:
- TX_FAR _Route8EndBattleText6
- db "@"
+ text_far _Route8EndBattleText6
+ text_end
Route8AfterBattleText6:
- TX_FAR _Route8AfterBattleText6
- db "@"
+ text_far _Route8AfterBattleText6
+ text_end
Route8Text7:
- TX_ASM
+ text_asm
ld hl, Route8TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route8BattleText7:
- TX_FAR _Route8BattleText7
- db "@"
+ text_far _Route8BattleText7
+ text_end
Route8EndBattleText7:
- TX_FAR _Route8EndBattleText7
- db "@"
+ text_far _Route8EndBattleText7
+ text_end
Route8AfterBattleText7:
- TX_FAR _Route8AfterBattleText7
- db "@"
+ text_far _Route8AfterBattleText7
+ text_end
Route8Text8:
- TX_ASM
+ text_asm
ld hl, Route8TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
Route8BattleText8:
- TX_FAR _Route8BattleText8
- db "@"
+ text_far _Route8BattleText8
+ text_end
Route8EndBattleText8:
- TX_FAR _Route8EndBattleText8
- db "@"
+ text_far _Route8EndBattleText8
+ text_end
Route8AfterBattleText8:
- TX_FAR _Route8AfterBattleText8
- db "@"
+ text_far _Route8AfterBattleText8
+ text_end
Route8Text9:
- TX_ASM
+ text_asm
ld hl, Route8TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
Route8BattleText9:
- TX_FAR _Route8BattleText9
- db "@"
+ text_far _Route8BattleText9
+ text_end
Route8EndBattleText9:
- TX_FAR _Route8EndBattleText9
- db "@"
+ text_far _Route8EndBattleText9
+ text_end
Route8AfterBattleText9:
- TX_FAR _Route8AfterBattleText9
- db "@"
+ text_far _Route8AfterBattleText9
+ text_end
Route8Text10:
- TX_FAR _Route8Text10
- db "@"
+ text_far _Route8Text10
+ text_end
diff --git a/scripts/Route8Gate.asm b/scripts/Route8Gate.asm
index 49f605a2..55443931 100755
--- a/scripts/Route8Gate.asm
+++ b/scripts/Route8Gate.asm
@@ -16,7 +16,7 @@ Route8GateScript_1e1d7:
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
xor a
- ld [wSpriteStateData2 + $06], a
+ ld [wSpritePlayerStateData2MovementByte1], a
ld [wOverrideSimulatedJoypadStatesMask], a
ret
@@ -30,13 +30,13 @@ Route8GateScript0:
ld a, PLAYER_DIR_UP
ld [wPlayerMovingDirection], a
xor a
- ld [hJoyHeld], a
- callba RemoveGuardDrink
- ld a, [$ffdb]
+ ldh [hJoyHeld], a
+ farcall RemoveGuardDrink
+ ldh a, [hItemToRemoveID]
and a
jr nz, .asm_1e220
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Route8GateScript_1e1d7
ld a, $1
@@ -46,13 +46,13 @@ Route8GateScript0:
ld hl, wd728
set 6, [hl]
ld a, $3
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
CoordsData_1e22c:
- db 3,2
- db 4,2
- db $ff
+ dbmapcoord 2, 3
+ dbmapcoord 2, 4
+ db -1 ; end
Route8GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
diff --git a/scripts/Route9.asm b/scripts/Route9.asm
index 8b346ee8..e69d4d35 100755
--- a/scripts/Route9.asm
+++ b/scripts/Route9.asm
@@ -26,243 +26,180 @@ Route9_TextPointers:
dw Route9Text11
Route9TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_0
- dw Route9BattleText1 ; TextBeforeBattle
- dw Route9AfterBattleText1 ; TextAfterBattle
- dw Route9EndBattleText1 ; TextEndBattle
- dw Route9EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_0, 3, Route9BattleText1, Route9EndBattleText1, Route9AfterBattleText1
Route9TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_1
- dw Route9BattleTextAJ ; TextBeforeBattle
- dw Route9AfterBattleTextAJ ; TextAfterBattle
- dw Route9EndBattleTextAJ ; TextEndBattle
- dw Route9EndBattleTextAJ ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_1, 2, Route9BattleTextAJ, Route9EndBattleTextAJ, Route9AfterBattleTextAJ
Route9TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_2
- dw Route9BattleText3 ; TextBeforeBattle
- dw Route9AfterBattleText3 ; TextAfterBattle
- dw Route9EndBattleText3 ; TextEndBattle
- dw Route9EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_2, 4, Route9BattleText3, Route9EndBattleText3, Route9AfterBattleText3
Route9TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_3
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_3
- dw Route9BattleText4 ; TextBeforeBattle
- dw Route9AfterBattleText4 ; TextAfterBattle
- dw Route9EndBattleText4 ; TextEndBattle
- dw Route9EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_3, 2, Route9BattleText4, Route9EndBattleText4, Route9AfterBattleText4
Route9TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_4
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_4
- dw Route9BattleText5 ; TextBeforeBattle
- dw Route9AfterBattleText5 ; TextAfterBattle
- dw Route9EndBattleText5 ; TextEndBattle
- dw Route9EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_4, 2, Route9BattleText5, Route9EndBattleText5, Route9AfterBattleText5
Route9TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_5
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_5
- dw Route9BattleText6 ; TextBeforeBattle
- dw Route9AfterBattleText6 ; TextAfterBattle
- dw Route9EndBattleText6 ; TextEndBattle
- dw Route9EndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_5, 3, Route9BattleText6, Route9EndBattleText6, Route9AfterBattleText6
Route9TrainerHeader6:
- dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_6
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_6
- dw Route9BattleText7 ; TextBeforeBattle
- dw Route9AfterBattleText7 ; TextAfterBattle
- dw Route9EndBattleText7 ; TextEndBattle
- dw Route9EndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_6, 4, Route9BattleText7, Route9EndBattleText7, Route9AfterBattleText7
Route9TrainerHeader7:
- dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_7, 1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_7, 1
- dw Route9BattleText8 ; TextBeforeBattle
- dw Route9AfterBattleText8 ; TextAfterBattle
- dw Route9EndBattleText8 ; TextEndBattle
- dw Route9EndBattleText8 ; TextEndBattle
-
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_7, 1, 2, Route9BattleText8, Route9EndBattleText8, Route9AfterBattleText8
Route9TrainerHeader8:
- dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_8, 1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_8, 1
- dw Route9BattleText9 ; TextBeforeBattle
- dw Route9AfterBattleText9 ; TextAfterBattle
- dw Route9EndBattleText9 ; TextEndBattle
- dw Route9EndBattleText9 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_8, 1, 2, Route9BattleText9, Route9EndBattleText9, Route9AfterBattleText9
+ db -1 ; end
Route9Text1:
- TX_ASM
+ text_asm
ld hl, Route9TrainerHeader0
jr Route9TalkToTrainer
Route9TextAJ:
- TX_ASM
+ text_asm
ld hl, Route9TrainerHeader1
jr Route9TalkToTrainer
Route9Text3:
- TX_ASM
+ text_asm
ld hl, Route9TrainerHeader2
jr Route9TalkToTrainer
Route9Text4:
- TX_ASM
+ text_asm
ld hl, Route9TrainerHeader3
jr Route9TalkToTrainer
Route9Text5:
- TX_ASM
+ text_asm
ld hl, Route9TrainerHeader4
jr Route9TalkToTrainer
Route9Text6:
- TX_ASM
+ text_asm
ld hl, Route9TrainerHeader5
jr Route9TalkToTrainer
Route9Text7:
- TX_ASM
+ text_asm
ld hl, Route9TrainerHeader6
jr Route9TalkToTrainer
Route9Text8:
- TX_ASM
+ text_asm
ld hl, Route9TrainerHeader7
jr Route9TalkToTrainer
Route9Text9:
- TX_ASM
+ text_asm
ld hl, Route9TrainerHeader8
Route9TalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
Route9BattleText1:
- TX_FAR _Route9BattleText1
- db "@"
+ text_far _Route9BattleText1
+ text_end
Route9EndBattleText1:
- TX_FAR _Route9EndBattleText1
- db "@"
+ text_far _Route9EndBattleText1
+ text_end
Route9AfterBattleText1:
- TX_FAR _Route9AfterBattleText1
- db "@"
+ text_far _Route9AfterBattleText1
+ text_end
Route9BattleTextAJ:
- TX_FAR _Route9BattleTextAJ
- db "@"
+ text_far _Route9BattleTextAJ
+ text_end
Route9EndBattleTextAJ:
- TX_FAR _Route9EndBattleTextAJ
- db "@"
+ text_far _Route9EndBattleTextAJ
+ text_end
Route9AfterBattleTextAJ:
- TX_FAR _Route9AfterBattleTextAJ
- db "@"
+ text_far _Route9AfterBattleTextAJ
+ text_end
Route9BattleText3:
- TX_FAR _Route9BattleText3
- db "@"
+ text_far _Route9BattleText3
+ text_end
Route9EndBattleText3:
- TX_FAR _Route9EndBattleText3
- db "@"
+ text_far _Route9EndBattleText3
+ text_end
Route9AfterBattleText3:
- TX_FAR _Route9AfterBattleText3
- db "@"
+ text_far _Route9AfterBattleText3
+ text_end
Route9BattleText4:
- TX_FAR _Route9BattleText4
- db "@"
+ text_far _Route9BattleText4
+ text_end
Route9EndBattleText4:
- TX_FAR _Route9EndBattleText4
- db "@"
+ text_far _Route9EndBattleText4
+ text_end
Route9AfterBattleText4:
- TX_FAR _Route9AfterBattleText4
- db "@"
+ text_far _Route9AfterBattleText4
+ text_end
Route9BattleText5:
- TX_FAR _Route9BattleText5
- db "@"
+ text_far _Route9BattleText5
+ text_end
Route9EndBattleText5:
- TX_FAR _Route9EndBattleText5
- db "@"
+ text_far _Route9EndBattleText5
+ text_end
Route9AfterBattleText5:
- TX_FAR _Route9AfterBattleText5
- db "@"
+ text_far _Route9AfterBattleText5
+ text_end
Route9BattleText6:
- TX_FAR _Route9BattleText6
- db "@"
+ text_far _Route9BattleText6
+ text_end
Route9EndBattleText6:
- TX_FAR _Route9EndBattleText6
- db "@"
+ text_far _Route9EndBattleText6
+ text_end
Route9AfterBattleText6:
- TX_FAR _Route9AfterBattleText6
- db "@"
+ text_far _Route9AfterBattleText6
+ text_end
Route9BattleText7:
- TX_FAR _Route9BattleText7
- db "@"
+ text_far _Route9BattleText7
+ text_end
Route9EndBattleText7:
- TX_FAR _Route9EndBattleText7
- db "@"
+ text_far _Route9EndBattleText7
+ text_end
Route9AfterBattleText7:
- TX_FAR _Route9AfterBattleText7
- db "@"
+ text_far _Route9AfterBattleText7
+ text_end
Route9BattleText8:
- TX_FAR _Route9BattleText8
- db "@"
+ text_far _Route9BattleText8
+ text_end
Route9EndBattleText8:
- TX_FAR _Route9EndBattleText8
- db "@"
+ text_far _Route9EndBattleText8
+ text_end
Route9AfterBattleText8:
- TX_FAR _Route9AfterBattleText8
- db "@"
+ text_far _Route9AfterBattleText8
+ text_end
Route9BattleText9:
- TX_FAR _Route9BattleText9
- db "@"
+ text_far _Route9BattleText9
+ text_end
Route9EndBattleText9:
- TX_FAR _Route9EndBattleText9
- db "@"
+ text_far _Route9EndBattleText9
+ text_end
Route9AfterBattleText9:
- TX_FAR _Route9AfterBattleText9
- db "@"
+ text_far _Route9AfterBattleText9
+ text_end
Route9Text11:
- TX_FAR _Route9Text11
- db "@"
+ text_far _Route9Text11
+ text_end
diff --git a/scripts/SSAnne1F.asm b/scripts/SSAnne1F.asm
index 5cace6ee..c819f470 100755
--- a/scripts/SSAnne1F.asm
+++ b/scripts/SSAnne1F.asm
@@ -7,9 +7,9 @@ SSAnne1F_TextPointers:
dw SSAnne1Text2
SSAnne1Text1:
- TX_FAR _SSAnne1Text1
- db "@"
+ text_far _SSAnne1Text1
+ text_end
SSAnne1Text2:
- TX_FAR _SSAnne1Text2
- db "@"
+ text_far _SSAnne1Text2
+ text_end
diff --git a/scripts/SSAnne1FRooms.asm b/scripts/SSAnne1FRooms.asm
index 2371f286..e4e4813d 100755
--- a/scripts/SSAnne1FRooms.asm
+++ b/scripts/SSAnne1FRooms.asm
@@ -26,138 +26,110 @@ SSAnne1FRooms_TextPointers:
dw SSAnne8Text11
SSAnne8TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_0
- dw SSAnne8BattleText1 ; TextBeforeBattle
- dw SSAnne8AfterBattleText1 ; TextAfterBattle
- dw SSAnne8EndBattleText1 ; TextEndBattle
- dw SSAnne8EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_SS_ANNE_8_TRAINER_0, 2, SSAnne8BattleText1, SSAnne8EndBattleText1, SSAnne8AfterBattleText1
SSAnne8TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_1
- dw SSAnne8BattleText2 ; TextBeforeBattle
- dw SSAnne8AfterBattleText2 ; TextAfterBattle
- dw SSAnne8EndBattleText2 ; TextEndBattle
- dw SSAnne8EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_SS_ANNE_8_TRAINER_1, 3, SSAnne8BattleText2, SSAnne8EndBattleText2, SSAnne8AfterBattleText2
SSAnne8TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_2
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_2
- dw SSAnne8BattleText3 ; TextBeforeBattle
- dw SSAnne8AfterBattleText3 ; TextAfterBattle
- dw SSAnne8EndBattleText3 ; TextEndBattle
- dw SSAnne8EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_SS_ANNE_8_TRAINER_2, 2, SSAnne8BattleText3, SSAnne8EndBattleText3, SSAnne8AfterBattleText3
SSAnne8TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_3
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_3
- dw SSAnne8BattleText4 ; TextBeforeBattle
- dw SSAnne8AfterBattleText4 ; TextAfterBattle
- dw SSAnne8EndBattleText4 ; TextEndBattle
- dw SSAnne8EndBattleText4 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SS_ANNE_8_TRAINER_3, 2, SSAnne8BattleText4, SSAnne8EndBattleText4, SSAnne8AfterBattleText4
+ db -1 ; end
SSAnne8Text1:
- TX_ASM
+ text_asm
ld hl, SSAnne8TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SSAnne8Text2:
- TX_ASM
+ text_asm
ld hl, SSAnne8TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SSAnne8Text3:
- TX_ASM
+ text_asm
ld hl, SSAnne8TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SSAnne8Text4:
- TX_ASM
+ text_asm
ld hl, SSAnne8TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
SSAnne8Text8:
- TX_FAR _SSAnne8Text8
- TX_ASM
+ text_far _SSAnne8Text8
+ text_asm
ld a, WIGGLYTUFF
call PlayCry
jp TextScriptEnd
SSAnne8BattleText1:
- TX_FAR _SSAnne8BattleText1
- db "@"
+ text_far _SSAnne8BattleText1
+ text_end
SSAnne8EndBattleText1:
- TX_FAR _SSAnne8EndBattleText1
- db "@"
+ text_far _SSAnne8EndBattleText1
+ text_end
SSAnne8AfterBattleText1:
- TX_FAR _SSAnne8AfterBattleText1
- db "@"
+ text_far _SSAnne8AfterBattleText1
+ text_end
SSAnne8BattleText2:
- TX_FAR _SSAnne8BattleText2
- db "@"
+ text_far _SSAnne8BattleText2
+ text_end
SSAnne8EndBattleText2:
- TX_FAR _SSAnne8EndBattleText2
- db "@"
+ text_far _SSAnne8EndBattleText2
+ text_end
SSAnne8AfterBattleText2:
- TX_FAR _SSAnne8AfterBattleText2
- db "@"
+ text_far _SSAnne8AfterBattleText2
+ text_end
SSAnne8BattleText3:
- TX_FAR _SSAnne8BattleText3
- db "@"
+ text_far _SSAnne8BattleText3
+ text_end
SSAnne8EndBattleText3:
- TX_FAR _SSAnne8EndBattleText3
- db "@"
+ text_far _SSAnne8EndBattleText3
+ text_end
SSAnne8AfterBattleText3:
- TX_FAR _SSAnne8AfterBattleText3
- db "@"
+ text_far _SSAnne8AfterBattleText3
+ text_end
SSAnne8BattleText4:
- TX_FAR _SSAnne8BattleText4
- db "@"
+ text_far _SSAnne8BattleText4
+ text_end
SSAnne8EndBattleText4:
- TX_FAR _SSAnne8EndBattleText4
- db "@"
+ text_far _SSAnne8EndBattleText4
+ text_end
SSAnne8AfterBattleText4:
- TX_FAR _SSAnne8AfterBattleText4
- db "@"
+ text_far _SSAnne8AfterBattleText4
+ text_end
SSAnne8Text5:
- TX_FAR _SSAnne8Text5
- db "@"
+ text_far _SSAnne8Text5
+ text_end
SSAnne8Text6:
- TX_FAR _SSAnne8Text6
- db "@"
+ text_far _SSAnne8Text6
+ text_end
SSAnne8Text7:
- TX_FAR _SSAnne8Text7
- db "@"
+ text_far _SSAnne8Text7
+ text_end
SSAnne8Text9:
- TX_FAR _SSAnne8Text9
- db "@"
+ text_far _SSAnne8Text9
+ text_end
SSAnne8Text11:
- TX_FAR _SSAnne8Text11
- db "@"
+ text_far _SSAnne8Text11
+ text_end
diff --git a/scripts/SSAnne2F.asm b/scripts/SSAnne2F.asm
index 77b283d2..d00917fe 100755
--- a/scripts/SSAnne2F.asm
+++ b/scripts/SSAnne2F.asm
@@ -29,19 +29,19 @@ SSAnne2Script0:
ld a, MUSIC_MEET_RIVAL
call PlayMusic
ld a, [wCoordIndex]
- ld [$ffdb], a
+ ldh [hSavedCoordIndex], a
ld a, HS_SS_ANNE_2F_RIVAL
ld [wMissableObjectIndex], a
predef ShowObject
call Delay3
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $f0
ld [wJoyIgnore], a
- ld a, [$ffdb]
+ ldh a, [hSavedCoordIndex]
cp $2
jr nz, .asm_61400
ld de, MovementData_6140c
@@ -56,21 +56,20 @@ SSAnne2Script0:
MovementData_6140c:
db NPC_MOVEMENT_DOWN
-
MovementData_6140d:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
CoordsData_61411:
- db $08,$24
- db $08,$25
- db $FF
+ dbmapcoord 36, 8
+ dbmapcoord 37, 8
+ db -1 ; end
SSAnne2Script_61416:
ld a, [wXCoord]
- cp $25
+ cp 37
jr nz, .asm_61426
ld a, PLAYER_DIR_LEFT
ld [wPlayerMovingDirection], a
@@ -79,9 +78,9 @@ SSAnne2Script_61416:
.asm_61426
xor a ; SPRITE_FACING_DOWN
.asm_61427
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
jp SetSpriteFacingDirectionAndDelay
SSAnne2Script1:
@@ -92,10 +91,10 @@ SSAnne2Script1:
xor a
ld [wJoyIgnore], a
ld a, $2
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
- ld a, OPP_SONY2
+ ld a, OPP_RIVAL2
ld [wCurOpponent], a
ld a, $1
ld [wTrainerNo], a
@@ -112,13 +111,13 @@ SSAnne2Script2:
ld a, $f0
ld [wJoyIgnore], a
ld a, $3
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld a, [wXCoord]
- cp $25
+ cp 37
jr nz, .asm_61497
ld de, MovementData_614b9
jr .asm_6149a
@@ -126,10 +125,10 @@ SSAnne2Script2:
ld de, MovementData_614b7
.asm_6149a
ld a, $2
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call MoveSprite
call StopAllMusic
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, $3
ld [wSSAnne2FCurScript], a
ret
@@ -137,13 +136,12 @@ SSAnne2Script2:
MovementData_614b7:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN
-
MovementData_614b9:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
SSAnne2Script3:
ld a, [wd730]
@@ -165,11 +163,11 @@ SSAnne2F_TextPointers:
dw SSAnne2Text3
SSAnne2Text1:
- TX_FAR _SSAnne2Text1
- db "@"
+ text_far _SSAnne2Text1
+ text_end
SSAnne2Text2:
- TX_ASM
+ text_asm
ld hl, SSAnneRivalBeforeBattleText
call PrintText
ld hl, wd72d
@@ -181,17 +179,17 @@ SSAnne2Text2:
jp TextScriptEnd
SSAnneRivalBeforeBattleText:
- TX_FAR _SSAnneRivalBeforeBattleText
- db "@"
+ text_far _SSAnneRivalBeforeBattleText
+ text_end
SSAnneRivalDefeatedText:
- TX_FAR _SSAnneRivalDefeatedText
- db "@"
+ text_far _SSAnneRivalDefeatedText
+ text_end
SSAnneRivalWonText:
- TX_FAR _SSAnneRivalWonText
- db "@"
+ text_far _SSAnneRivalWonText
+ text_end
SSAnne2Text3:
- TX_FAR _SSAnneRivalCaptainText
- db "@"
+ text_far _SSAnneRivalCaptainText
+ text_end
diff --git a/scripts/SSAnne2FRooms.asm b/scripts/SSAnne2FRooms.asm
index fb57cf37..ff1dcfaf 100755
--- a/scripts/SSAnne2FRooms.asm
+++ b/scripts/SSAnne2FRooms.asm
@@ -28,69 +28,41 @@ SSAnne2FRooms_TextPointers:
dw SSAnne9Text13
SSAnne9TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_9_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_9_TRAINER_0
- dw SSAnne9BattleText1 ; TextBeforeBattle
- dw SSAnne9AfterBattleText1 ; TextAfterBattle
- dw SSAnne9EndBattleText1 ; TextEndBattle
- dw SSAnne9EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_SS_ANNE_9_TRAINER_0, 2, SSAnne9BattleText1, SSAnne9EndBattleText1, SSAnne9AfterBattleText1
SSAnne9TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_9_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_9_TRAINER_1
- dw SSAnne9BattleText2 ; TextBeforeBattle
- dw SSAnne9AfterBattleText2 ; TextAfterBattle
- dw SSAnne9EndBattleText2 ; TextEndBattle
- dw SSAnne9EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_SS_ANNE_9_TRAINER_1, 3, SSAnne9BattleText2, SSAnne9EndBattleText2, SSAnne9AfterBattleText2
SSAnne9TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_9_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_9_TRAINER_2
- dw SSAnne9BattleText3 ; TextBeforeBattle
- dw SSAnne9AfterBattleText3 ; TextAfterBattle
- dw SSAnne9EndBattleText3 ; TextEndBattle
- dw SSAnne9EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_SS_ANNE_9_TRAINER_2, 3, SSAnne9BattleText3, SSAnne9EndBattleText3, SSAnne9AfterBattleText3
SSAnne9TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_9_TRAINER_3
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_9_TRAINER_3
- dw SSAnne9BattleText4 ; TextBeforeBattle
- dw SSAnne9AfterBattleText4 ; TextAfterBattle
- dw SSAnne9EndBattleText4 ; TextEndBattle
- dw SSAnne9EndBattleText4 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SS_ANNE_9_TRAINER_3, 2, SSAnne9BattleText4, SSAnne9EndBattleText4, SSAnne9AfterBattleText4
+ db -1 ; end
SSAnne9Text1:
- TX_ASM
+ text_asm
ld hl, SSAnne9TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SSAnne9Text2:
- TX_ASM
+ text_asm
ld hl, SSAnne9TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SSAnne9Text3:
- TX_ASM
+ text_asm
ld hl, SSAnne9TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SSAnne9Text4:
- TX_ASM
+ text_asm
ld hl, SSAnne9TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
SSAnne9Text5:
- TX_ASM
+ text_asm
call SaveScreenTilesToBuffer1
ld hl, SSAnne9Text_61bf2
call PrintText
@@ -100,93 +72,93 @@ SSAnne9Text5:
jp TextScriptEnd
SSAnne9Text_61bf2:
- TX_FAR _SSAnne9Text_61bf2
- db "@"
+ text_far _SSAnne9Text_61bf2
+ text_end
SSAnne9Text7:
- TX_ASM
+ text_asm
ld hl, SSAnne9Text_61c01
call PrintText
jp TextScriptEnd
SSAnne9Text_61c01:
- TX_FAR _SSAnne9Text_61c01
- db "@"
+ text_far _SSAnne9Text_61c01
+ text_end
SSAnne9Text8:
- TX_ASM
+ text_asm
ld hl, SSAnne9Text_61c10
call PrintText
jp TextScriptEnd
SSAnne9Text_61c10:
- TX_FAR _SSAnne9Text_61c10
- db "@"
+ text_far _SSAnne9Text_61c10
+ text_end
SSAnne9Text10:
- TX_ASM
- callba Func_f2570
+ text_asm
+ farcall Func_f2570
jp TextScriptEnd
SSAnne9Text11:
- TX_ASM
- callba Func_f257c
+ text_asm
+ farcall Func_f257c
jp TextScriptEnd
SSAnne9Text12:
- TX_ASM
- callba Func_f2588
+ text_asm
+ farcall Func_f2588
jp TextScriptEnd
SSAnne9Text13:
- TX_ASM
- callba Func_f2594
+ text_asm
+ farcall Func_f2594
jp TextScriptEnd
SSAnne9BattleText1:
- TX_FAR _SSAnne9BattleText1
- db "@"
+ text_far _SSAnne9BattleText1
+ text_end
SSAnne9EndBattleText1:
- TX_FAR _SSAnne9EndBattleText1
- db "@"
+ text_far _SSAnne9EndBattleText1
+ text_end
SSAnne9AfterBattleText1:
- TX_FAR _SSAnne9AfterBattleText1
- db "@"
+ text_far _SSAnne9AfterBattleText1
+ text_end
SSAnne9BattleText2:
- TX_FAR _SSAnne9BattleText2
- db "@"
+ text_far _SSAnne9BattleText2
+ text_end
SSAnne9EndBattleText2:
- TX_FAR _SSAnne9EndBattleText2
- db "@"
+ text_far _SSAnne9EndBattleText2
+ text_end
SSAnne9AfterBattleText2:
- TX_FAR _SSAnne9AfterBattleText2
- db "@"
+ text_far _SSAnne9AfterBattleText2
+ text_end
SSAnne9BattleText3:
- TX_FAR _SSAnne9BattleText3
- db "@"
+ text_far _SSAnne9BattleText3
+ text_end
SSAnne9EndBattleText3:
- TX_FAR _SSAnne9EndBattleText3
- db "@"
+ text_far _SSAnne9EndBattleText3
+ text_end
SSAnne9AfterBattleText3:
- TX_FAR _SSAnne9AfterBattleText3
- db "@"
+ text_far _SSAnne9AfterBattleText3
+ text_end
SSAnne9BattleText4:
- TX_FAR _SSAnne9BattleText4
- db "@"
+ text_far _SSAnne9BattleText4
+ text_end
SSAnne9EndBattleText4:
- TX_FAR _SSAnne9EndBattleText4
- db "@"
+ text_far _SSAnne9EndBattleText4
+ text_end
SSAnne9AfterBattleText4:
- TX_FAR _SSAnne9AfterBattleText4
- db "@"
+ text_far _SSAnne9AfterBattleText4
+ text_end
diff --git a/scripts/SSAnne2FRooms_2.asm b/scripts/SSAnne2FRooms_2.asm
index f856221c..2271e83d 100755
--- a/scripts/SSAnne2FRooms_2.asm
+++ b/scripts/SSAnne2FRooms_2.asm
@@ -1,35 +1,35 @@
-Func_f2570:
+Func_f2570::
ld hl, SSAnne9Text_f2577
call PrintText
ret
SSAnne9Text_f2577:
- TX_FAR _SSAnne9Text_61c1f
- db "@"
+ text_far _SSAnne9Text_61c1f
+ text_end
-Func_f257c:
+Func_f257c::
ld hl, SSAnne9Text_f2583
call PrintText
ret
SSAnne9Text_f2583:
- TX_FAR _SSAnne9Text_61c2e
- db "@"
+ text_far _SSAnne9Text_61c2e
+ text_end
-Func_f2588:
+Func_f2588::
ld hl, SSAnne9Text_f258f
call PrintText
ret
SSAnne9Text_f258f:
- TX_FAR _SSAnne9Text_61c3d
- db "@"
+ text_far _SSAnne9Text_61c3d
+ text_end
-Func_f2594:
+Func_f2594::
ld hl, SSAnne9Text_f259b
call PrintText
ret
SSAnne9Text_f259b:
- TX_FAR _SSAnne9Text_61c4c
- db "@"
+ text_far _SSAnne9Text_61c4c
+ text_end
diff --git a/scripts/SSAnne3F.asm b/scripts/SSAnne3F.asm
index 5da0e0c7..e3e7a1d3 100755
--- a/scripts/SSAnne3F.asm
+++ b/scripts/SSAnne3F.asm
@@ -5,5 +5,5 @@ SSAnne3F_TextPointers:
dw SSAnne3Text1
SSAnne3Text1:
- TX_FAR _SSAnne3Text1
- db "@"
+ text_far _SSAnne3Text1
+ text_end
diff --git a/scripts/SSAnneB1F.asm b/scripts/SSAnneB1F.asm
index 25df076f..f66fdfaa 100755
--- a/scripts/SSAnneB1F.asm
+++ b/scripts/SSAnneB1F.asm
@@ -2,4 +2,5 @@ SSAnneB1F_Script:
jp EnableAutoTextBoxDrawing
SSAnneB1F_TextPointers:
- db "@"
+
+ text_end ; unused
diff --git a/scripts/SSAnneB1FRooms.asm b/scripts/SSAnneB1FRooms.asm
index 3777852c..2a077c33 100755
--- a/scripts/SSAnneB1FRooms.asm
+++ b/scripts/SSAnneB1FRooms.asm
@@ -26,176 +26,134 @@ SSAnneB1FRooms_TextPointers:
dw PickUpItemText
SSAnne10TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_0
- dw SSAnne10BattleText1 ; TextBeforeBattle
- dw SSAnne10AfterBattleText1 ; TextAfterBattle
- dw SSAnne10EndBattleText1 ; TextEndBattle
- dw SSAnne10EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_SS_ANNE_10_TRAINER_0, 2, SSAnne10BattleText1, SSAnne10EndBattleText1, SSAnne10AfterBattleText1
SSAnne10TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_1
- dw SSAnne10BattleText2 ; TextBeforeBattle
- dw SSAnne10AfterBattleText2 ; TextAfterBattle
- dw SSAnne10EndBattleText2 ; TextEndBattle
- dw SSAnne10EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_SS_ANNE_10_TRAINER_1, 3, SSAnne10BattleText2, SSAnne10EndBattleText2, SSAnne10AfterBattleText2
SSAnne10TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_2
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_2
- dw SSAnne10BattleText3 ; TextBeforeBattle
- dw SSAnne10AfterBattleText3 ; TextAfterBattle
- dw SSAnne10EndBattleText3 ; TextEndBattle
- dw SSAnne10EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_SS_ANNE_10_TRAINER_2, 2, SSAnne10BattleText3, SSAnne10EndBattleText3, SSAnne10AfterBattleText3
SSAnne10TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_3
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_3
- dw SSAnne10BattleText4 ; TextBeforeBattle
- dw SSAnne10AfterBattleText4 ; TextAfterBattle
- dw SSAnne10EndBattleText4 ; TextEndBattle
- dw SSAnne10EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_SS_ANNE_10_TRAINER_3, 2, SSAnne10BattleText4, SSAnne10EndBattleText4, SSAnne10AfterBattleText4
SSAnne10TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_4
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_4
- dw SSAnne10BattleText5 ; TextBeforeBattle
- dw SSAnne10AfterBattleText5 ; TextAfterBattle
- dw SSAnne10EndBattleText5 ; TextEndBattle
- dw SSAnne10EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_SS_ANNE_10_TRAINER_4, 2, SSAnne10BattleText5, SSAnne10EndBattleText5, SSAnne10AfterBattleText5
SSAnne10TrainerHeader5:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_5
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_5
- dw SSAnne10BattleText6 ; TextBeforeBattle
- dw SSAnne10AfterBattleText6 ; TextAfterBattle
- dw SSAnne10EndBattleText6 ; TextEndBattle
- dw SSAnne10EndBattleText6 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SS_ANNE_10_TRAINER_5, 3, SSAnne10BattleText6, SSAnne10EndBattleText6, SSAnne10AfterBattleText6
+ db -1 ; end
SSAnne10Text1:
- TX_ASM
+ text_asm
ld hl, SSAnne10TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SSAnne10Text2:
- TX_ASM
+ text_asm
ld hl, SSAnne10TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SSAnne10Text3:
- TX_ASM
+ text_asm
ld hl, SSAnne10TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SSAnne10Text4:
- TX_ASM
+ text_asm
ld hl, SSAnne10TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
SSAnne10Text5:
- TX_ASM
+ text_asm
ld hl, SSAnne10TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
SSAnne10Text6:
- TX_ASM
+ text_asm
ld hl, SSAnne10TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
SSAnne10Text8:
- TX_FAR _SSAnne10Text8
- TX_ASM
+ text_far _SSAnne10Text8
+ text_asm
ld a, MACHOKE
call PlayCry
jp TextScriptEnd
SSAnne10BattleText1:
- TX_FAR _SSAnne10BattleText1
- db "@"
+ text_far _SSAnne10BattleText1
+ text_end
SSAnne10EndBattleText1:
- TX_FAR _SSAnne10EndBattleText1
- db "@"
+ text_far _SSAnne10EndBattleText1
+ text_end
SSAnne10AfterBattleText1:
- TX_FAR _SSAnne10AfterBattleText1
- db "@"
+ text_far _SSAnne10AfterBattleText1
+ text_end
SSAnne10BattleText2:
- TX_FAR _SSAnne10BattleText2
- db "@"
+ text_far _SSAnne10BattleText2
+ text_end
SSAnne10EndBattleText2:
- TX_FAR _SSAnne10EndBattleText2
- db "@"
+ text_far _SSAnne10EndBattleText2
+ text_end
SSAnne10AfterBattleText2:
- TX_FAR _SSAnne10AfterBattleText2
- db "@"
+ text_far _SSAnne10AfterBattleText2
+ text_end
SSAnne10BattleText3:
- TX_FAR _SSAnne10BattleText3
- db "@"
+ text_far _SSAnne10BattleText3
+ text_end
SSAnne10EndBattleText3:
- TX_FAR _SSAnne10EndBattleText3
- db "@"
+ text_far _SSAnne10EndBattleText3
+ text_end
SSAnne10AfterBattleText3:
- TX_FAR _SSAnne10AfterBattleText3
- db "@"
+ text_far _SSAnne10AfterBattleText3
+ text_end
SSAnne10BattleText4:
- TX_FAR _SSAnne10BattleText4
- db "@"
+ text_far _SSAnne10BattleText4
+ text_end
SSAnne10EndBattleText4:
- TX_FAR _SSAnne10EndBattleText4
- db "@"
+ text_far _SSAnne10EndBattleText4
+ text_end
SSAnne10AfterBattleText4:
- TX_FAR _SSAnne10AfterBattleText4
- db "@"
+ text_far _SSAnne10AfterBattleText4
+ text_end
SSAnne10BattleText5:
- TX_FAR _SSAnne10BattleText5
- db "@"
+ text_far _SSAnne10BattleText5
+ text_end
SSAnne10EndBattleText5:
- TX_FAR _SSAnne10EndBattleText5
- db "@"
+ text_far _SSAnne10EndBattleText5
+ text_end
SSAnne10AfterBattleText5:
- TX_FAR _SSAnne10AfterBattleText5
- db "@"
+ text_far _SSAnne10AfterBattleText5
+ text_end
SSAnne10BattleText6:
- TX_FAR _SSAnne10BattleText6
- db "@"
+ text_far _SSAnne10BattleText6
+ text_end
SSAnne10EndBattleText6:
- TX_FAR _SSAnne10EndBattleText6
- db "@"
+ text_far _SSAnne10EndBattleText6
+ text_end
SSAnne10AfterBattleText6:
- TX_FAR _SSAnne10AfterBattleText6
- db "@"
+ text_far _SSAnne10AfterBattleText6
+ text_end
SSAnne10Text7:
- TX_FAR _SSAnne10Text7
- db "@"
+ text_far _SSAnne10Text7
+ text_end
diff --git a/scripts/SSAnneBow.asm b/scripts/SSAnneBow.asm
index 4569f0f8..0621785d 100755
--- a/scripts/SSAnneBow.asm
+++ b/scripts/SSAnneBow.asm
@@ -20,69 +20,55 @@ SSAnneBow_TextPointers:
dw SSAnne5Text5
SSAnne5TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_5_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_5_TRAINER_0
- dw SSAnne5BattleText1 ; TextBeforeBattle
- dw SSAnne5AfterBattleText1 ; TextAfterBattle
- dw SSAnne5EndBattleText1 ; TextEndBattle
- dw SSAnne5EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_SS_ANNE_5_TRAINER_0, 3, SSAnne5BattleText1, SSAnne5EndBattleText1, SSAnne5AfterBattleText1
SSAnne5TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SS_ANNE_5_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SS_ANNE_5_TRAINER_1
- dw SSAnne5BattleText2 ; TextBeforeBattle
- dw SSAnne5AfterBattleText2 ; TextAfterBattle
- dw SSAnne5EndBattleText2 ; TextEndBattle
- dw SSAnne5EndBattleText2 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SS_ANNE_5_TRAINER_1, 3, SSAnne5BattleText2, SSAnne5EndBattleText2, SSAnne5AfterBattleText2
+ db -1 ; end
SSAnne5Text1:
- TX_FAR _SSAnne5Text1
- db "@"
+ text_far _SSAnne5Text1
+ text_end
SSAnne5Text2:
- TX_FAR _SSAnne5Text2
- db "@"
+ text_far _SSAnne5Text2
+ text_end
SSAnne5Text3:
- TX_FAR _SSAnne5Text3
- db "@"
+ text_far _SSAnne5Text3
+ text_end
SSAnne5Text4:
- TX_ASM
+ text_asm
ld hl, SSAnne5TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SSAnne5BattleText1:
- TX_FAR _SSAnne5BattleText1
- db "@"
+ text_far _SSAnne5BattleText1
+ text_end
SSAnne5EndBattleText1:
- TX_FAR _SSAnne5EndBattleText1
- db "@"
+ text_far _SSAnne5EndBattleText1
+ text_end
SSAnne5AfterBattleText1:
- TX_FAR _SSAnne5AfterBattleText1
- db "@"
+ text_far _SSAnne5AfterBattleText1
+ text_end
SSAnne5Text5:
- TX_ASM
+ text_asm
ld hl, SSAnne5TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SSAnne5BattleText2:
- TX_FAR _SSAnne5BattleText2
- db "@"
+ text_far _SSAnne5BattleText2
+ text_end
SSAnne5EndBattleText2:
- TX_FAR _SSAnne5EndBattleText2
- db "@"
+ text_far _SSAnne5EndBattleText2
+ text_end
SSAnne5AfterBattleText2:
- TX_FAR _SSAnne5AfterBattleText2
- db "@"
+ text_far _SSAnne5AfterBattleText2
+ text_end
diff --git a/scripts/SSAnneCaptainsRoom.asm b/scripts/SSAnneCaptainsRoom.asm
index 94918118..593cd872 100755
--- a/scripts/SSAnneCaptainsRoom.asm
+++ b/scripts/SSAnneCaptainsRoom.asm
@@ -15,35 +15,35 @@ SSAnneCaptainsRoom_TextPointers:
dw SSAnne7Text3
SSAnne7Text1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_HM01
- jr nz, .asm_797c4
+ jr nz, .got_item
ld hl, SSAnne7RubText
call PrintText
ld hl, ReceivingHM01Text
call PrintText
- lb bc, HM_01, 1
+ lb bc, HM_CUT, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedHM01Text
call PrintText
SetEvent EVENT_GOT_HM01
ld hl, wd72d
res 5, [hl]
- jr .asm_0faf5
-.BagFull
+ jr .done
+.bag_full
ld hl, HM01NoRoomText
call PrintText
- jr .asm_0faf5
-.asm_797c4
+ jr .done
+.got_item
ld hl, SSAnne7Text_61932
call PrintText
-.asm_0faf5
+.done
jp TextScriptEnd
SSAnne7RubText:
- TX_FAR _SSAnne7RubText
- TX_ASM
+ text_far _SSAnne7RubText
+ text_asm
ld a, [wAudioROMBank]
cp BANK(AudioEngine3)
ld [wAudioSavedROMBank], a
@@ -66,26 +66,26 @@ SSAnne7RubText:
jp TextScriptEnd
ReceivingHM01Text:
- TX_FAR _ReceivingHM01Text
- db "@"
+ text_far _ReceivingHM01Text
+ text_end
ReceivedHM01Text:
- TX_FAR _ReceivedHM01Text
- TX_SFX_KEY_ITEM
- db "@"
+ text_far _ReceivedHM01Text
+ sound_get_key_item
+ text_end
SSAnne7Text_61932:
- TX_FAR _SSAnne7Text_61932
- db "@"
+ text_far _SSAnne7Text_61932
+ text_end
HM01NoRoomText:
- TX_FAR _HM01NoRoomText
- db "@"
+ text_far _HM01NoRoomText
+ text_end
SSAnne7Text2:
- TX_FAR _SSAnne7Text2
- db "@"
+ text_far _SSAnne7Text2
+ text_end
SSAnne7Text3:
- TX_FAR _SSAnne7Text3
- db "@"
+ text_far _SSAnne7Text3
+ text_end
diff --git a/scripts/SSAnneKitchen.asm b/scripts/SSAnneKitchen.asm
index 137706a0..30a9830f 100755
--- a/scripts/SSAnneKitchen.asm
+++ b/scripts/SSAnneKitchen.asm
@@ -12,61 +12,61 @@ SSAnneKitchen_TextPointers:
dw SSAnne6Text7
SSAnne6Text1:
- TX_FAR _SSAnne6Text1
- db "@"
+ text_far _SSAnne6Text1
+ text_end
SSAnne6Text2:
- TX_FAR _SSAnne6Text2
- db "@"
+ text_far _SSAnne6Text2
+ text_end
SSAnne6Text3:
- TX_FAR _SSAnne6Text3
- db "@"
+ text_far _SSAnne6Text3
+ text_end
SSAnne6Text4:
- TX_FAR _SSAnne6Text4
- db "@"
+ text_far _SSAnne6Text4
+ text_end
SSAnne6Text5:
- TX_FAR _SSAnne6Text5
- db "@"
+ text_far _SSAnne6Text5
+ text_end
SSAnne6Text6:
- TX_FAR _SSAnne6Text6
- db "@"
+ text_far _SSAnne6Text6
+ text_end
SSAnne6Text7:
- TX_ASM
+ text_asm
ld hl, SSAnne6Text_61807
call PrintText
- ld a, [hRandomAdd]
+ ldh a, [hRandomAdd]
bit 7, a
- jr z, .asm_93eb1
+ jr z, .not_dialog_1
ld hl, SSAnne6Text_6180c
- jr .asm_63292
-.asm_93eb1
+ jr .done
+.not_dialog_1
bit 4, a
- jr z, .asm_7436c
+ jr z, .not_dialog_2
ld hl, SSAnne6Text_61811
- jr .asm_63292
-.asm_7436c
+ jr .done
+.not_dialog_2
ld hl, SSAnne6Text_61816
-.asm_63292
+.done
call PrintText
jp TextScriptEnd
SSAnne6Text_61807:
- TX_FAR _SSAnne6Text_61807
- db "@"
+ text_far _SSAnne6Text_61807
+ text_end
SSAnne6Text_6180c:
- TX_FAR _SSAnne6Text_6180c
- db "@"
+ text_far _SSAnne6Text_6180c
+ text_end
SSAnne6Text_61811:
- TX_FAR _SSAnne6Text_61811
- db "@"
+ text_far _SSAnne6Text_61811
+ text_end
SSAnne6Text_61816:
- TX_FAR _SSAnne6Text_61816
- db "@"
+ text_far _SSAnne6Text_61816
+ text_end
diff --git a/scripts/SafariZoneCenter.asm b/scripts/SafariZoneCenter.asm
index 0a266887..1e7db243 100755
--- a/scripts/SafariZoneCenter.asm
+++ b/scripts/SafariZoneCenter.asm
@@ -7,9 +7,9 @@ SafariZoneCenter_TextPointers:
dw SafariZoneCenterText3
SafariZoneCenterText2:
- TX_FAR _SafariZoneCenterText2
- db "@"
+ text_far _SafariZoneCenterText2
+ text_end
SafariZoneCenterText3:
- TX_FAR _SafariZoneCenterText3
- db "@"
+ text_far _SafariZoneCenterText3
+ text_end
diff --git a/scripts/SafariZoneCenterRestHouse.asm b/scripts/SafariZoneCenterRestHouse.asm
index a652644b..a03823cc 100755
--- a/scripts/SafariZoneCenterRestHouse.asm
+++ b/scripts/SafariZoneCenterRestHouse.asm
@@ -6,9 +6,9 @@ SafariZoneCenterRestHouse_TextPointers:
dw SafariZoneRestHouse1Text2
SafariZoneRestHouse1Text1:
- TX_FAR _SafariZoneRestHouse1Text1
- db "@"
+ text_far _SafariZoneRestHouse1Text1
+ text_end
SafariZoneRestHouse1Text2:
- TX_FAR _SafariZoneRestHouse1Text2
- db "@"
+ text_far _SafariZoneRestHouse1Text2
+ text_end
diff --git a/scripts/SafariZoneEast.asm b/scripts/SafariZoneEast.asm
index 7f4a5543..062eeab1 100755
--- a/scripts/SafariZoneEast.asm
+++ b/scripts/SafariZoneEast.asm
@@ -11,13 +11,13 @@ SafariZoneEast_TextPointers:
dw SafariZoneEastText7
SafariZoneEastText5:
- TX_FAR _SafariZoneEastText5
- db "@"
+ text_far _SafariZoneEastText5
+ text_end
SafariZoneEastText6:
- TX_FAR _SafariZoneEastText6
- db "@"
+ text_far _SafariZoneEastText6
+ text_end
SafariZoneEastText7:
- TX_FAR _SafariZoneEastText7
- db "@"
+ text_far _SafariZoneEastText7
+ text_end
diff --git a/scripts/SafariZoneEastRestHouse.asm b/scripts/SafariZoneEastRestHouse.asm
index 24141459..03655d69 100755
--- a/scripts/SafariZoneEastRestHouse.asm
+++ b/scripts/SafariZoneEastRestHouse.asm
@@ -8,13 +8,13 @@ SafariZoneEastRestHouse_TextPointers:
dw SafariZoneRestHouse3Text3
SafariZoneRestHouse3Text1:
- TX_FAR _SafariZoneRestHouse3Text1
- db "@"
+ text_far _SafariZoneRestHouse3Text1
+ text_end
SafariZoneRestHouse3Text2:
- TX_FAR _SafariZoneRestHouse3Text2
- db "@"
+ text_far _SafariZoneRestHouse3Text2
+ text_end
SafariZoneRestHouse3Text3:
- TX_FAR _SafariZoneRestHouse3Text3
- db "@"
+ text_far _SafariZoneRestHouse3Text3
+ text_end
diff --git a/scripts/SafariZoneGate.asm b/scripts/SafariZoneGate.asm
index 217001dd..9e4cc5dd 100755
--- a/scripts/SafariZoneGate.asm
+++ b/scripts/SafariZoneGate.asm
@@ -19,12 +19,12 @@ SafariZoneGate_ScriptPointers:
call ArePlayerCoordsInArray
ret nc
ld a, $3
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $ff
ld [wJoyIgnore], a
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, SPRITE_FACING_RIGHT
ld [wSpritePlayerStateData1FacingDirection], a
ld a, [wCoordIndex]
@@ -44,20 +44,20 @@ SafariZoneGate_ScriptPointers:
ret
.CoordsData_75221:
- db $02, $03
- db $02, $04
- db $FF
+ dbmapcoord 3, 2
+ dbmapcoord 4, 2
+ db -1 ; end
.SafariZoneEntranceScript1
call SafariZoneEntranceScript_752b4
ret nz
.SafariZoneEntranceScript2
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld [wJoyIgnore], a
call UpdateSprites
ld a, $4
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $ff
ld [wJoyIgnore], a
@@ -82,7 +82,7 @@ SafariZoneGate_ScriptPointers:
ld a, $f0
ld [wJoyIgnore], a
ld a, $6
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wNumSafariBalls], a
@@ -96,7 +96,7 @@ SafariZoneGate_ScriptPointers:
jr .asm_75286
.asm_7527f
ld a, $5
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_75286
ret
@@ -142,17 +142,17 @@ SafariZoneGate_TextPointers:
dw .SafariZoneEntranceText6
.SafariZoneEntranceText1
- TX_FAR _SafariZoneEntranceText1
- db "@"
+ text_far _SafariZoneEntranceText1
+ text_end
.SafariZoneEntranceText4
- TX_ASM
- callab Func_f1f77
+ text_asm
+ callfar Func_f1f77
jp TextScriptEnd
.SafariZoneEntranceText5
- TX_FAR SafariZoneEntranceText_9e814
- TX_ASM
+ text_far SafariZoneEntranceText_9e814
+ text_asm
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
@@ -184,18 +184,18 @@ SafariZoneGate_TextPointers:
jp TextScriptEnd
.SafariZoneEntranceText_753bb
- TX_FAR _SafariZoneEntranceText_753bb
- db "@"
+ text_far _SafariZoneEntranceText_753bb
+ text_end
.SafariZoneEntranceText_753c0
- TX_FAR _SafariZoneEntranceText_753c0
- db "@"
+ text_far _SafariZoneEntranceText_753c0
+ text_end
.SafariZoneEntranceText6
- TX_FAR _SafariZoneEntranceText_753c5
- db "@"
+ text_far _SafariZoneEntranceText_753c5
+ text_end
.SafariZoneEntranceText2
- TX_ASM
- callab Func_f203e
+ text_asm
+ callfar Func_f203e
jp TextScriptEnd
diff --git a/scripts/SafariZoneGate2.asm b/scripts/SafariZoneGate2.asm
index a99bad6a..6187b2c6 100755
--- a/scripts/SafariZoneGate2.asm
+++ b/scripts/SafariZoneGate2.asm
@@ -1,4 +1,4 @@
-Func_f1f77:
+Func_f1f77::
ld hl, .WelcomeText
call PrintText
ld a, MONEY_BOX
@@ -20,11 +20,11 @@ Func_f1f77:
.has_positive_balance
xor a
- ld [hMoney], a
+ ldh [hMoney], a
ld a, $5
- ld [hMoney + 1], a
+ ldh [hMoney + 1], a
ld a, $0
- ld [hMoney + 2], a
+ ldh [hMoney + 2], a
call HasEnoughMoney
jr nc, .has_enough_money
ld hl, .NotEnoughMoneyText
@@ -81,24 +81,24 @@ Func_f1f77:
ret
.WelcomeText
- TX_FAR SafariZoneEntranceText_9e6e4
- db "@"
+ text_far SafariZoneEntranceText_9e6e4
+ text_end
.MakePaymentText
- TX_FAR SafariZoneEntranceText_9e747
- TX_SFX_ITEM_1
- TX_FAR _SafariZoneEntranceText_75360
- db "@"
+ text_far SafariZoneEntranceText_9e747
+ sound_get_item_1
+ text_far _SafariZoneEntranceText_75360
+ text_end
.PleaseComeAgainText
- TX_FAR _SafariZoneEntranceText_75365
- db "@"
+ text_far _SafariZoneEntranceText_75365
+ text_end
.NotEnoughMoneyText
- TX_FAR _SafariZoneEntranceText_7536a
- db "@"
+ text_far _SafariZoneEntranceText_7536a
+ text_end
-Func_f203e:
+Func_f203e::
ld hl, .FirstTimeQuestionText
call PrintText
call YesNoChoice
@@ -112,16 +112,16 @@ Func_f203e:
ret
.FirstTimeQuestionText
- TX_FAR _SafariZoneEntranceText_753e6
- db "@"
+ text_far _SafariZoneEntranceText_753e6
+ text_end
.ExplanationText
- TX_FAR _SafariZoneEntranceText_753eb
- db "@"
+ text_far _SafariZoneEntranceText_753eb
+ text_end
.RegularText
- TX_FAR _SafariZoneEntranceText_753f0
- db "@"
+ text_far _SafariZoneEntranceText_753f0
+ text_end
SafariZoneEntranceStartSimulatingJoypadStates:
push af
@@ -139,12 +139,12 @@ SafariZoneEntranceCalculateLowCostAdmission:
ld bc, $3
call CopyData
xor a
- ld [hDivideBCDDivisor], a
- ld [hDivideBCDDivisor + 1], a
+ ldh [hDivideBCDDivisor], a
+ ldh [hDivideBCDDivisor + 1], a
ld a, 23
- ld [hDivideBCDDivisor + 2], a
+ ldh [hDivideBCDDivisor + 2], a
predef DivideBCDPredef3
- ld a, [hDivideBCDQuotient + 2]
+ ldh a, [hDivideBCDQuotient + 2]
call SafariZoneEntranceConvertBCDtoNumber
push af
ld hl, wPlayerMoney
@@ -171,12 +171,12 @@ SafariZoneEntranceCalculateLowCostAdmission:
ret
SafariZoneEntranceText_f20c4:
- TX_FAR _SafariZoneLowCostText1
- db "@"
+ text_far _SafariZoneLowCostText1
+ text_end
SafariZoneEntranceText_f20c9:
- TX_FAR _SafariZoneLowCostText2
- db "@"
+ text_far _SafariZoneLowCostText2
+ text_end
SafariZoneEntranceGetLowCostAdmissionText:
ld hl, wSafariSteps
@@ -207,10 +207,10 @@ SafariZoneEntranceGetLowCostAdmissionText:
ret
SafariZoneEntranceText_f20f6:
- TX_FAR _SafariZoneLowCostText3
- TX_SFX_ITEM_1
- TX_FAR _SafariZoneLowCostText4
- db "@"
+ text_far _SafariZoneLowCostText3
+ sound_get_item_1
+ text_far _SafariZoneLowCostText4
+ text_end
Pointers_f2100:
dw SafariZoneEntranceText_f210a
@@ -220,20 +220,20 @@ Pointers_f2100:
dw SafariZoneEntranceText_f2119
SafariZoneEntranceText_f210a:
- TX_FAR _SafariZoneLowCostText5
- db "@"
+ text_far _SafariZoneLowCostText5
+ text_end
SafariZoneEntranceText_f210f:
- TX_FAR _SafariZoneLowCostText6
- db "@"
+ text_far _SafariZoneLowCostText6
+ text_end
SafariZoneEntranceText_f2114:
- TX_FAR _SafariZoneLowCostText7
- db "@"
+ text_far _SafariZoneLowCostText7
+ text_end
SafariZoneEntranceText_f2119:
- TX_FAR _SafariZoneLowCostText8
- db "@"
+ text_far _SafariZoneLowCostText8
+ text_end
SafariZoneEntranceConvertBCDtoNumber:
push hl
diff --git a/scripts/SafariZoneNorth.asm b/scripts/SafariZoneNorth.asm
index 734328b4..aaf39ea2 100755
--- a/scripts/SafariZoneNorth.asm
+++ b/scripts/SafariZoneNorth.asm
@@ -11,21 +11,21 @@ SafariZoneNorth_TextPointers:
dw SafariZoneNorthText7
SafariZoneNorthText3:
- TX_FAR _SafariZoneNorthText3
- db "@"
+ text_far _SafariZoneNorthText3
+ text_end
SafariZoneNorthText4:
- TX_FAR _SafariZoneNorthText4
- db "@"
+ text_far _SafariZoneNorthText4
+ text_end
SafariZoneNorthText5:
- TX_FAR _SafariZoneNorthText5
- db "@"
+ text_far _SafariZoneNorthText5
+ text_end
SafariZoneNorthText6:
- TX_FAR _SafariZoneNorthText6
- db "@"
+ text_far _SafariZoneNorthText6
+ text_end
SafariZoneNorthText7:
- TX_FAR _SafariZoneNorthText7
- db "@"
+ text_far _SafariZoneNorthText7
+ text_end
diff --git a/scripts/SafariZoneNorthRestHouse.asm b/scripts/SafariZoneNorthRestHouse.asm
index fdc438f4..b7a690a1 100755
--- a/scripts/SafariZoneNorthRestHouse.asm
+++ b/scripts/SafariZoneNorthRestHouse.asm
@@ -8,13 +8,13 @@ SafariZoneNorthRestHouse_TextPointers:
dw SafariZoneRestHouse4Text3
SafariZoneRestHouse4Text1:
- TX_FAR _SafariZoneRestHouse4Text1
- db "@"
+ text_far _SafariZoneRestHouse4Text1
+ text_end
SafariZoneRestHouse4Text2:
- TX_FAR _SafariZoneRestHouse4Text2
- db "@"
+ text_far _SafariZoneRestHouse4Text2
+ text_end
SafariZoneRestHouse4Text3:
- TX_FAR _SafariZoneRestHouse4Text3
- db "@"
+ text_far _SafariZoneRestHouse4Text3
+ text_end
diff --git a/scripts/SafariZoneSecretHouse.asm b/scripts/SafariZoneSecretHouse.asm
index 2d9b2305..6eeff8ad 100755
--- a/scripts/SafariZoneSecretHouse.asm
+++ b/scripts/SafariZoneSecretHouse.asm
@@ -5,41 +5,41 @@ SafariZoneSecretHouse_TextPointers:
dw SafariZoneSecretHouseText1
SafariZoneSecretHouseText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_HM03
- jr nz, .asm_20a9b
+ jr nz, .got_item
ld hl, SafariZoneSecretHouseText_4a350
call PrintText
- lb bc, HM_03, 1
+ lb bc, HM_SURF, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedHM03Text
call PrintText
SetEvent EVENT_GOT_HM03
- jr .asm_8f1fc
-.BagFull
+ jr .done
+.bag_full
ld hl, HM03NoRoomText
call PrintText
- jr .asm_8f1fc
-.asm_20a9b
+ jr .done
+.got_item
ld hl, HM03ExplanationText
call PrintText
-.asm_8f1fc
+.done
jp TextScriptEnd
SafariZoneSecretHouseText_4a350:
- TX_FAR _SecretHouseText_4a350
- db "@"
+ text_far _SecretHouseText_4a350
+ text_end
ReceivedHM03Text:
- TX_FAR _ReceivedHM03Text
- TX_SFX_ITEM_1
- db "@"
+ text_far _ReceivedHM03Text
+ sound_get_item_1
+ text_end
HM03ExplanationText:
- TX_FAR _HM03ExplanationText
- db "@"
+ text_far _HM03ExplanationText
+ text_end
HM03NoRoomText:
- TX_FAR _HM03NoRoomText
- db "@"
+ text_far _HM03NoRoomText
+ text_end
diff --git a/scripts/SafariZoneWest.asm b/scripts/SafariZoneWest.asm
index 483a92ee..7ae0807d 100755
--- a/scripts/SafariZoneWest.asm
+++ b/scripts/SafariZoneWest.asm
@@ -12,17 +12,17 @@ SafariZoneWest_TextPointers:
dw SafariZoneWestText8
SafariZoneWestText5:
- TX_FAR _SafariZoneWestText5
- db "@"
+ text_far _SafariZoneWestText5
+ text_end
SafariZoneWestText6:
- TX_FAR _SafariZoneWestText6
- db "@"
+ text_far _SafariZoneWestText6
+ text_end
SafariZoneWestText7:
- TX_FAR _SafariZoneWestText7
- db "@"
+ text_far _SafariZoneWestText7
+ text_end
SafariZoneWestText8:
- TX_FAR _SafariZoneWestText8
- db "@"
+ text_far _SafariZoneWestText8
+ text_end
diff --git a/scripts/SafariZoneWestRestHouse.asm b/scripts/SafariZoneWestRestHouse.asm
index 371bd56c..74ad98fe 100755
--- a/scripts/SafariZoneWestRestHouse.asm
+++ b/scripts/SafariZoneWestRestHouse.asm
@@ -8,13 +8,13 @@ SafariZoneWestRestHouse_TextPointers:
dw SafariZoneRestHouse2Text3
SafariZoneRestHouse2Text1:
- TX_FAR _SafariZoneRestHouse2Text1
- db "@"
+ text_far _SafariZoneRestHouse2Text1
+ text_end
SafariZoneRestHouse2Text2:
- TX_FAR _SafariZoneRestHouse2Text2
- db "@"
+ text_far _SafariZoneRestHouse2Text2
+ text_end
SafariZoneRestHouse2Text3:
- TX_FAR _SafariZoneRestHouse2Text3
- db "@"
+ text_far _SafariZoneRestHouse2Text3
+ text_end
diff --git a/scripts/SaffronCity.asm b/scripts/SaffronCity.asm
index 02e6e2bb..84982534 100755
--- a/scripts/SaffronCity.asm
+++ b/scripts/SaffronCity.asm
@@ -29,94 +29,94 @@ SaffronCity_TextPointers:
dw SaffronCityText25
SaffronCityText1:
- TX_FAR _SaffronCityText1
- db "@"
+ text_far _SaffronCityText1
+ text_end
SaffronCityText2:
- TX_FAR _SaffronCityText2
- db "@"
+ text_far _SaffronCityText2
+ text_end
SaffronCityText3:
- TX_FAR _SaffronCityText3
- db "@"
+ text_far _SaffronCityText3
+ text_end
SaffronCityText4:
- TX_FAR _SaffronCityText4
- db "@"
+ text_far _SaffronCityText4
+ text_end
SaffronCityText5:
- TX_FAR _SaffronCityText5
- db "@"
+ text_far _SaffronCityText5
+ text_end
SaffronCityText6:
- TX_FAR _SaffronCityText6
- db "@"
+ text_far _SaffronCityText6
+ text_end
SaffronCityText7:
- TX_FAR _SaffronCityText7
- db "@"
+ text_far _SaffronCityText7
+ text_end
SaffronCityText8:
- TX_FAR _SaffronCityText8
- db "@"
+ text_far _SaffronCityText8
+ text_end
SaffronCityText9:
- TX_FAR _SaffronCityText9
- db "@"
+ text_far _SaffronCityText9
+ text_end
SaffronCityText10:
- TX_FAR _SaffronCityText10
- db "@"
+ text_far _SaffronCityText10
+ text_end
SaffronCityText11:
- TX_FAR _SaffronCityText11
- db "@"
+ text_far _SaffronCityText11
+ text_end
SaffronCityText12:
- TX_FAR _SaffronCityText12
- TX_CRY_PIDGEOT
- db "@"
+ text_far _SaffronCityText12
+ sound_cry_pidgeot
+ text_end
SaffronCityText13:
- TX_FAR _SaffronCityText13
- db "@"
+ text_far _SaffronCityText13
+ text_end
SaffronCityText14:
- TX_FAR _SaffronCityText14
- db "@"
+ text_far _SaffronCityText14
+ text_end
SaffronCityText15:
- TX_FAR _SaffronCityText15
- db "@"
+ text_far _SaffronCityText15
+ text_end
SaffronCityText16:
- TX_FAR _SaffronCityText16
- db "@"
+ text_far _SaffronCityText16
+ text_end
SaffronCityText17:
- TX_FAR _SaffronCityText17
- db "@"
+ text_far _SaffronCityText17
+ text_end
SaffronCityText18:
- TX_FAR _SaffronCityText18
- db "@"
+ text_far _SaffronCityText18
+ text_end
SaffronCityText20:
- TX_FAR _SaffronCityText20
- db "@"
+ text_far _SaffronCityText20
+ text_end
SaffronCityText21:
- TX_FAR _SaffronCityText21
- db "@"
+ text_far _SaffronCityText21
+ text_end
SaffronCityText22:
- TX_FAR _SaffronCityText22
- db "@"
+ text_far _SaffronCityText22
+ text_end
SaffronCityText24:
- TX_FAR _SaffronCityText24
- db "@"
+ text_far _SaffronCityText24
+ text_end
SaffronCityText25:
- TX_FAR _SaffronCityText25
- db "@"
+ text_far _SaffronCityText25
+ text_end
diff --git a/scripts/SaffronGym.asm b/scripts/SaffronGym.asm
index 0539d613..f90bba65 100755
--- a/scripts/SaffronGym.asm
+++ b/scripts/SaffronGym.asm
@@ -2,7 +2,7 @@ SaffronGym_Script:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
- call nz, .extra
+ call nz, .LoadNames
call EnableAutoTextBoxDrawing
ld hl, SaffronGymTrainerHeader0
ld de, SaffronGym_ScriptPointers
@@ -11,15 +11,15 @@ SaffronGym_Script:
ld [wSaffronGymCurScript], a
ret
-.extra
- ld hl, Gym6CityName
- ld de, Gym6LeaderName
+.LoadNames:
+ ld hl, .CityName
+ ld de, .LeaderName
jp LoadGymLeaderAndCityName
-Gym6CityName:
+.CityName:
db "SAFFRON CITY@"
-Gym6LeaderName:
+.LeaderName:
db "SABRINA@"
SaffronGymText_5d048:
@@ -44,26 +44,26 @@ SaffronGymScript3:
SaffronGymText_5d068:
ld a, $a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_SABRINA
- lb bc, TM_46, 1
+ lb bc, TM_PSYWAVE, 1
call GiveItem
jr nc, .BagFull
ld a, $b
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM46
jr .gymVictory
.BagFull
ld a, $c
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
ld hl, wObtainedBadges
- set 5, [hl]
+ set BIT_MARSHBADGE, [hl]
ld hl, wBeatGymFlags
- set 5, [hl]
+ set BIT_MARSHBADGE, [hl]
; deactivate gym trainers
SetEventRange EVENT_BEAT_SAFFRON_GYM_TRAINER_0, EVENT_BEAT_SAFFRON_GYM_TRAINER_6
@@ -85,72 +85,23 @@ SaffronGym_TextPointers:
dw SaffronGymText12
SaffronGymTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_0
- dw SaffronGymBattleText1 ; TextBeforeBattle
- dw SaffronGymAfterBattleText1 ; TextAfterBattle
- dw SaffronGymEndBattleText1 ; TextEndBattle
- dw SaffronGymEndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_0, 3, SaffronGymBattleText1, SaffronGymEndBattleText1, SaffronGymAfterBattleText1
SaffronGymTrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_1
- dw SaffronGymBattleText2 ; TextBeforeBattle
- dw SaffronGymAfterBattleText2 ; TextAfterBattle
- dw SaffronGymEndBattleText2 ; TextEndBattle
- dw SaffronGymEndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_1, 3, SaffronGymBattleText2, SaffronGymEndBattleText2, SaffronGymAfterBattleText2
SaffronGymTrainerHeader2:
- dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_2
- dw SaffronGymBattleText3 ; TextBeforeBattle
- dw SaffronGymAfterBattleText3 ; TextAfterBattle
- dw SaffronGymEndBattleText3 ; TextEndBattle
- dw SaffronGymEndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_2, 3, SaffronGymBattleText3, SaffronGymEndBattleText3, SaffronGymAfterBattleText3
SaffronGymTrainerHeader3:
- dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_3
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_3
- dw SaffronGymBattleText4 ; TextBeforeBattle
- dw SaffronGymAfterBattleText4 ; TextAfterBattle
- dw SaffronGymEndBattleText4 ; TextEndBattle
- dw SaffronGymEndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_3, 3, SaffronGymBattleText4, SaffronGymEndBattleText4, SaffronGymAfterBattleText4
SaffronGymTrainerHeader4:
- dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_4
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_4
- dw SaffronGymBattleText5 ; TextBeforeBattle
- dw SaffronGymAfterBattleText5 ; TextAfterBattle
- dw SaffronGymEndBattleText5 ; TextEndBattle
- dw SaffronGymEndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_4, 3, SaffronGymBattleText5, SaffronGymEndBattleText5, SaffronGymAfterBattleText5
SaffronGymTrainerHeader5:
- dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_5
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_5
- dw SaffronGymBattleText6 ; TextBeforeBattle
- dw SaffronGymAfterBattleText6 ; TextAfterBattle
- dw SaffronGymEndBattleText6 ; TextEndBattle
- dw SaffronGymEndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_5, 3, SaffronGymBattleText6, SaffronGymEndBattleText6, SaffronGymAfterBattleText6
SaffronGymTrainerHeader6:
- dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_6, 1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_6, 1
- dw SaffronGymBattleText7 ; TextBeforeBattle
- dw SaffronGymAfterBattleText7 ; TextAfterBattle
- dw SaffronGymEndBattleText7 ; TextEndBattle
- dw SaffronGymEndBattleText7 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_6, 1, 3, SaffronGymBattleText7, SaffronGymEndBattleText7, SaffronGymAfterBattleText7
+ db -1 ; end
SaffronGymText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_SABRINA
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM46
@@ -171,7 +122,7 @@ SaffronGymText1:
ld hl, SaffronGymText_5d167
ld de, SaffronGymText_5d167
call SaveEndBattleTextPointers
- ld a, [H_SPRITEINDEX]
+ ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
@@ -183,77 +134,77 @@ SaffronGymText1:
jp TextScriptEnd
SaffronGymText_5d162:
- TX_FAR _SaffronGymText_5d162
- db "@"
+ text_far _SaffronGymText_5d162
+ text_end
SaffronGymText_5d167:
- TX_FAR _SaffronGymText_5d167
- TX_SFX_KEY_ITEM ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded
- TX_BLINK
- db "@"
+ text_far _SaffronGymText_5d167
+ sound_get_key_item ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded
+ text_promptbutton
+ text_end
SaffronGymText_5d16e:
- TX_FAR _SaffronGymText_5d16e
- db "@"
+ text_far _SaffronGymText_5d16e
+ text_end
SaffronGymText10:
- TX_FAR _SaffronGymText_5d173
- db "@"
+ text_far _SaffronGymText_5d173
+ text_end
SaffronGymText11:
- TX_FAR ReceivedTM46Text
- TX_SFX_ITEM_1
- TX_FAR _TM46ExplanationText
- db "@"
+ text_far ReceivedTM46Text
+ sound_get_item_1
+ text_far _TM46ExplanationText
+ text_end
SaffronGymText12:
- TX_FAR _TM46NoRoomText
- db "@"
+ text_far _TM46NoRoomText
+ text_end
SaffronGymText2:
- TX_ASM
+ text_asm
ld hl, SaffronGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SaffronGymText3:
- TX_ASM
+ text_asm
ld hl, SaffronGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SaffronGymText4:
- TX_ASM
+ text_asm
ld hl, SaffronGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SaffronGymText5:
- TX_ASM
+ text_asm
ld hl, SaffronGymTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
SaffronGymText6:
- TX_ASM
+ text_asm
ld hl, SaffronGymTrainerHeader4
call TalkToTrainer
jp TextScriptEnd
SaffronGymText7:
- TX_ASM
+ text_asm
ld hl, SaffronGymTrainerHeader5
call TalkToTrainer
jp TextScriptEnd
SaffronGymText8:
- TX_ASM
+ text_asm
ld hl, SaffronGymTrainerHeader6
call TalkToTrainer
jp TextScriptEnd
SaffronGymText9:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_SABRINA
jr nz, .asm_5d1dd
ld hl, SaffronGymText_5d1e6
@@ -266,93 +217,93 @@ SaffronGymText9:
jp TextScriptEnd
SaffronGymText_5d1e6:
- TX_FAR _SaffronGymText_5d1e6
- db "@"
+ text_far _SaffronGymText_5d1e6
+ text_end
SaffronGymText_5d1eb:
- TX_FAR _SaffronGymText_5d1eb
- db "@"
+ text_far _SaffronGymText_5d1eb
+ text_end
SaffronGymBattleText1:
- TX_FAR _SaffronGymBattleText1
- db "@"
+ text_far _SaffronGymBattleText1
+ text_end
SaffronGymEndBattleText1:
- TX_FAR _SaffronGymEndBattleText1
- db "@"
+ text_far _SaffronGymEndBattleText1
+ text_end
SaffronGymAfterBattleText1:
- TX_FAR _SaffronGymAfterBattleText1
- db "@"
+ text_far _SaffronGymAfterBattleText1
+ text_end
SaffronGymBattleText2:
- TX_FAR _SaffronGymBattleText2
- db "@"
+ text_far _SaffronGymBattleText2
+ text_end
SaffronGymEndBattleText2:
- TX_FAR _SaffronGymEndBattleText2
- db "@"
+ text_far _SaffronGymEndBattleText2
+ text_end
SaffronGymAfterBattleText2:
- TX_FAR _SaffronGymAfterBattleText2
- db "@"
+ text_far _SaffronGymAfterBattleText2
+ text_end
SaffronGymBattleText3:
- TX_FAR _SaffronGymBattleText3
- db "@"
+ text_far _SaffronGymBattleText3
+ text_end
SaffronGymEndBattleText3:
- TX_FAR _SaffronGymEndBattleText3
- db "@"
+ text_far _SaffronGymEndBattleText3
+ text_end
SaffronGymAfterBattleText3:
- TX_FAR _SaffronGymAfterBattleText3
- db "@"
+ text_far _SaffronGymAfterBattleText3
+ text_end
SaffronGymBattleText4:
- TX_FAR _SaffronGymBattleText4
- db "@"
+ text_far _SaffronGymBattleText4
+ text_end
SaffronGymEndBattleText4:
- TX_FAR _SaffronGymEndBattleText4
- db "@"
+ text_far _SaffronGymEndBattleText4
+ text_end
SaffronGymAfterBattleText4:
- TX_FAR _SaffronGymAfterBattleText4
- db "@"
+ text_far _SaffronGymAfterBattleText4
+ text_end
SaffronGymBattleText5:
- TX_FAR _SaffronGymBattleText5
- db "@"
+ text_far _SaffronGymBattleText5
+ text_end
SaffronGymEndBattleText5:
- TX_FAR _SaffronGymEndBattleText5
- db "@"
+ text_far _SaffronGymEndBattleText5
+ text_end
SaffronGymAfterBattleText5:
- TX_FAR _SaffronGymAfterBattleText5
- db "@"
+ text_far _SaffronGymAfterBattleText5
+ text_end
SaffronGymBattleText6:
- TX_FAR _SaffronGymBattleText6
- db "@"
+ text_far _SaffronGymBattleText6
+ text_end
SaffronGymEndBattleText6:
- TX_FAR _SaffronGymEndBattleText6
- db "@"
+ text_far _SaffronGymEndBattleText6
+ text_end
SaffronGymAfterBattleText6:
- TX_FAR _SaffronGymAfterBattleText6
- db "@"
+ text_far _SaffronGymAfterBattleText6
+ text_end
SaffronGymBattleText7:
- TX_FAR _SaffronGymBattleText7
- db "@"
+ text_far _SaffronGymBattleText7
+ text_end
SaffronGymEndBattleText7:
- TX_FAR _SaffronGymEndBattleText7
- db "@"
+ text_far _SaffronGymEndBattleText7
+ text_end
SaffronGymAfterBattleText7:
- TX_FAR _SaffronGymAfterBattleText7
- db "@"
+ text_far _SaffronGymAfterBattleText7
+ text_end
diff --git a/scripts/SaffronMart.asm b/scripts/SaffronMart.asm
index ebb3cddf..bfa47eb1 100755
--- a/scripts/SaffronMart.asm
+++ b/scripts/SaffronMart.asm
@@ -7,9 +7,9 @@ SaffronMart_TextPointers:
dw SaffronMartText3
SaffronMartText2:
- TX_FAR _SaffronMartText2
- db "@"
+ text_far _SaffronMartText2
+ text_end
SaffronMartText3:
- TX_FAR _SaffronMartText3
- db "@"
+ text_far _SaffronMartText3
+ text_end
diff --git a/scripts/SaffronPidgeyHouse.asm b/scripts/SaffronPidgeyHouse.asm
index f38fbfdb..90078e81 100755
--- a/scripts/SaffronPidgeyHouse.asm
+++ b/scripts/SaffronPidgeyHouse.asm
@@ -8,20 +8,20 @@ SaffronPidgeyHouse_TextPointers:
dw SaffronHouse1Text4
SaffronHouse1Text1:
- TX_FAR _SaffronHouse1Text1
- db "@"
+ text_far _SaffronHouse1Text1
+ text_end
SaffronHouse1Text2:
- TX_FAR _SaffronHouse1Text2
- TX_ASM
+ text_far _SaffronHouse1Text2
+ text_asm
ld a, PIDGEY
call PlayCry
jp TextScriptEnd
SaffronHouse1Text3:
- TX_FAR _SaffronHouse1Text3
- db "@"
+ text_far _SaffronHouse1Text3
+ text_end
SaffronHouse1Text4:
- TX_FAR _SaffronHouse1Text4
- db "@"
+ text_far _SaffronHouse1Text4
+ text_end
diff --git a/scripts/SaffronPokecenter.asm b/scripts/SaffronPokecenter.asm
index 435367ea..f4d9f192 100755
--- a/scripts/SaffronPokecenter.asm
+++ b/scripts/SaffronPokecenter.asm
@@ -10,20 +10,20 @@ SaffronPokecenter_TextPointers:
dw SaffronPokecenterText5
SaffronHealNurseText:
- TX_POKECENTER_NURSE
+ script_pokecenter_nurse
SaffronPokecenterText2:
- TX_FAR _SaffronPokecenterText2
- db "@"
+ text_far _SaffronPokecenterText2
+ text_end
SaffronPokecenterText3:
- TX_FAR _SaffronPokecenterText3
- db "@"
+ text_far _SaffronPokecenterText3
+ text_end
SaffronTradeNurseText:
- TX_CABLE_CLUB_RECEPTIONIST
+ script_cable_club_receptionist
SaffronPokecenterText5:
- TX_ASM
- callab PokecenterChanseyText
+ text_asm
+ callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/SeafoamIslands1F.asm b/scripts/SeafoamIslands1F.asm
index b024a6bd..ceb2a2fb 100755
--- a/scripts/SeafoamIslands1F.asm
+++ b/scripts/SeafoamIslands1F.asm
@@ -38,9 +38,9 @@ SeafoamIslands1F_Script:
jp IsPlayerOnDungeonWarp
Seafoam1HolesCoords:
- db $06,$11
- db $06,$18
- db $ff
+ dbmapcoord 17, 6
+ dbmapcoord 24, 6
+ db -1 ; end
SeafoamIslands1F_TextPointers:
dw BoulderText
diff --git a/scripts/SeafoamIslandsB1F.asm b/scripts/SeafoamIslandsB1F.asm
index a4c5767b..ac667513 100755
--- a/scripts/SeafoamIslandsB1F.asm
+++ b/scripts/SeafoamIslandsB1F.asm
@@ -37,9 +37,9 @@ SeafoamIslandsB1F_Script:
jp IsPlayerOnDungeonWarp
Seafoam2HolesCoords:
- db $06,$12
- db $06,$17
- db $ff
+ dbmapcoord 18, 6
+ dbmapcoord 23, 6
+ db -1 ; end
SeafoamIslandsB1F_TextPointers:
dw BoulderText
diff --git a/scripts/SeafoamIslandsB2F.asm b/scripts/SeafoamIslandsB2F.asm
index eb6d2437..fe4b3ead 100755
--- a/scripts/SeafoamIslandsB2F.asm
+++ b/scripts/SeafoamIslandsB2F.asm
@@ -37,9 +37,9 @@ SeafoamIslandsB2F_Script:
jp IsPlayerOnDungeonWarp
Seafoam3HolesCoords:
- db $06,$13
- db $06,$16
- db $ff
+ dbmapcoord 19, 6
+ dbmapcoord 22, 6
+ db -1 ; end
SeafoamIslandsB2F_TextPointers:
dw BoulderText
diff --git a/scripts/SeafoamIslandsB3F.asm b/scripts/SeafoamIslandsB3F.asm
index c8fec338..9d1093e5 100755
--- a/scripts/SeafoamIslandsB3F.asm
+++ b/scripts/SeafoamIslandsB3F.asm
@@ -45,9 +45,9 @@ SeafoamIslandsB3F_Script:
jp CallFunctionInTable
Seafoam4HolesCoords:
- db $10,$03
- db $10,$06
- db $ff
+ dbmapcoord 3, 16
+ dbmapcoord 6, 16
+ db -1 ; end
SeafoamIslandsB3F_ScriptPointers:
dw SeafoamIslands4Script0
@@ -59,10 +59,10 @@ SeafoamIslands4Script0:
CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE
ret z
ld a, [wYCoord]
- cp $8
+ cp 8
ret nz
ld a, [wXCoord]
- cp $f
+ cp 15
ret nz
ld hl, wSimulatedJoypadStatesEnd
ld de, RLEMovement46632
@@ -77,10 +77,10 @@ SeafoamIslands4Script0:
ret
RLEMovement46632:
- db D_DOWN,6
- db D_RIGHT,5
- db D_DOWN,3
- db $ff
+ db D_DOWN, 6
+ db D_RIGHT, 5
+ db D_DOWN, 3
+ db -1 ; end
SeafoamIslands4Script1:
ld a, [wSimulatedJoypadStatesIndex]
@@ -94,9 +94,9 @@ SeafoamIslands4Script2:
CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE
ret z
ld a, [wXCoord]
- cp $12
+ cp 18
jr z, .asm_4665e
- cp $13
+ cp 19
ld a, $0
jr nz, .asm_4667b
ld de, RLEData_4667f
@@ -109,7 +109,7 @@ SeafoamIslands4Script2:
dec a
ld [wSimulatedJoypadStatesIndex], a
xor a
- ld [wSpriteStateData2 + $06], a
+ ld [wSpritePlayerStateData2MovementByte1], a
ld hl, wd730
set 7, [hl]
ld hl, wFlags_D733
@@ -120,17 +120,17 @@ SeafoamIslands4Script2:
ret
RLEData_4667f:
- db D_DOWN,$06
- db D_RIGHT,$02
- db D_DOWN,$04
- db D_LEFT,$01
- db $FF
+ db D_DOWN, 6
+ db D_RIGHT, 2
+ db D_DOWN, 4
+ db D_LEFT, 1
+ db -1 ; end
RLEData_46688:
- db D_DOWN,$06
- db D_RIGHT,$02
- db D_DOWN,$04
- db $FF
+ db D_DOWN, 6
+ db D_RIGHT, 2
+ db D_DOWN, 4
+ db -1 ; end
SeafoamIslands4Script3:
ld a, [wSimulatedJoypadStatesIndex]
diff --git a/scripts/SeafoamIslandsB4F.asm b/scripts/SeafoamIslandsB4F.asm
index 1383a561..1dd0b7f9 100755
--- a/scripts/SeafoamIslandsB4F.asm
+++ b/scripts/SeafoamIslandsB4F.asm
@@ -54,11 +54,11 @@ SeafoamIslands5Script0:
ret
.Coords
- db $11,$14
- db $11,$15
- db $10,$14
- db $10,$15
- db $FF
+ dbmapcoord 20, 17
+ dbmapcoord 21, 17
+ dbmapcoord 20, 16
+ dbmapcoord 21, 16
+ db -1 ; end
SeafoamIslands5Script1:
ld a, [wSimulatedJoypadStatesIndex]
@@ -97,21 +97,21 @@ SeafoamIslands5Script2:
ret
.Coords
- db $0E,$04
- db $0E,$05
- db $FF
+ dbmapcoord 4, 14
+ dbmapcoord 5, 14
+ db -1 ; end
RLEMovementData_46852:
- db D_UP,$03
- db D_RIGHT,$02
- db D_UP,$01
- db $FF
+ db D_UP, 3
+ db D_RIGHT, 2
+ db D_UP, 1
+ db -1 ; end
RLEMovementData_46859:
- db D_UP,$03
- db D_RIGHT,$03
- db D_UP,$01
- db $FF
+ db D_UP, 3
+ db D_RIGHT, 3
+ db D_UP, 1
+ db -1 ; end
SeafoamIslands5Script3:
ld a, [wSimulatedJoypadStatesIndex]
@@ -139,18 +139,11 @@ SeafoamIslandsB4F_TextPointers:
dw SeafoamIslands5Text5
ArticunoTrainerHeader:
- dbEventFlagBit EVENT_BEAT_ARTICUNO
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_ARTICUNO
- dw ArticunoBattleText ; TextBeforeBattle
- dw ArticunoBattleText ; TextAfterBattle
- dw ArticunoBattleText ; TextEndBattle
- dw ArticunoBattleText ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_ARTICUNO, 0, ArticunoBattleText, ArticunoBattleText, ArticunoBattleText
+ db -1 ; end
ArticunoText:
- TX_ASM
+ text_asm
ld hl, ArticunoTrainerHeader
call TalkToTrainer
ld a, $4
@@ -158,17 +151,17 @@ ArticunoText:
jp TextScriptEnd
ArticunoBattleText:
- TX_FAR _ArticunoBattleText
- TX_ASM
+ text_far _ArticunoBattleText
+ text_asm
ld a, ARTICUNO
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
SeafoamIslands5Text4:
- TX_FAR _SeafoamIslands5Text4
- db "@"
+ text_far _SeafoamIslands5Text4
+ text_end
SeafoamIslands5Text5:
- TX_FAR _SeafoamIslands5Text5
- db "@"
+ text_far _SeafoamIslands5Text5
+ text_end
diff --git a/scripts/SilphCo10F.asm b/scripts/SilphCo10F.asm
index 40506682..29b640fd 100755
--- a/scripts/SilphCo10F.asm
+++ b/scripts/SilphCo10F.asm
@@ -24,11 +24,11 @@ SilphCo10Script_5a14f:
predef_jump ReplaceTileBlock
SilphCo10GateCoords:
- db $04,$05
- db $FF
+ dbmapcoord 5, 4
+ db -1 ; end
SilphCo10Text_5a176:
- ld a, [$ffe0]
+ ldh a, [hUnlockedSilphCoDoors]
and a
ret z
SetEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR
@@ -48,39 +48,25 @@ SilphCo10F_TextPointers:
dw PickUpItemText
SilphCo10TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_10F_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_10F_TRAINER_0
- dw SilphCo10BattleText1 ; TextBeforeBattle
- dw SilphCo10AfterBattleText1 ; TextAfterBattle
- dw SilphCo10EndBattleText1 ; TextEndBattle
- dw SilphCo10EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_10F_TRAINER_0, 3, SilphCo10BattleText1, SilphCo10EndBattleText1, SilphCo10AfterBattleText1
SilphCo10TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_10F_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_10F_TRAINER_1
- dw SilphCo10BattleText2 ; TextBeforeBattle
- dw SilphCo10AfterBattleText2 ; TextAfterBattle
- dw SilphCo10EndBattleText2 ; TextEndBattle
- dw SilphCo10EndBattleText2 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SILPH_CO_10F_TRAINER_1, 4, SilphCo10BattleText2, SilphCo10EndBattleText2, SilphCo10AfterBattleText2
+ db -1 ; end
SilphCo10Text1:
- TX_ASM
+ text_asm
ld hl, SilphCo10TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo10Text2:
- TX_ASM
+ text_asm
ld hl, SilphCo10TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo10Text3:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
ld hl, SilphCo10Text_5a1d8
jr nz, .asm_cf85f
@@ -90,33 +76,33 @@ SilphCo10Text3:
jp TextScriptEnd
SilphCo10Text_5a1d3:
- TX_FAR _SilphCo10Text_5a1d3
- db "@"
+ text_far _SilphCo10Text_5a1d3
+ text_end
SilphCo10Text_5a1d8:
- TX_FAR _SilphCo10Text_5a1d8
- db "@"
+ text_far _SilphCo10Text_5a1d8
+ text_end
SilphCo10BattleText1:
- TX_FAR _SilphCo10BattleText1
- db "@"
+ text_far _SilphCo10BattleText1
+ text_end
SilphCo10EndBattleText1:
- TX_FAR _SilphCo10EndBattleText1
- db "@"
+ text_far _SilphCo10EndBattleText1
+ text_end
SilphCo10AfterBattleText1:
- TX_FAR _SilphCo10AfterBattleText1
- db "@"
+ text_far _SilphCo10AfterBattleText1
+ text_end
SilphCo10BattleText2:
- TX_FAR _SilphCo10BattleText2
- db "@"
+ text_far _SilphCo10BattleText2
+ text_end
SilphCo10EndBattleText2:
- TX_FAR _SilphCo10EndBattleText2
- db "@"
+ text_far _SilphCo10EndBattleText2
+ text_end
SilphCo10AfterBattleText2:
- TX_FAR _SilphCo10AfterBattleText2
- db "@"
+ text_far _SilphCo10AfterBattleText2
+ text_end
diff --git a/scripts/SilphCo11F.asm b/scripts/SilphCo11F.asm
index e58dbebe..113ceecc 100755
--- a/scripts/SilphCo11F.asm
+++ b/scripts/SilphCo11F.asm
@@ -25,8 +25,8 @@ SilphCo11Script_62127:
ret
SilphCo11GateCoords:
- db $06,$03
- db $FF
+ dbmapcoord 3, 6
+ db -1 ; end
SilphCo11Script_6214f:
push hl
@@ -36,14 +36,14 @@ SilphCo11Script_6214f:
ld a, [hl]
ld c, a
xor a
- ld [$ffe0], a
+ ldh [hUnlockedSilphCoDoors], a
pop hl
.asm_62143
ld a, [hli]
cp $ff
jr z, .asm_6215f
push hl
- ld hl, $ffe0
+ ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
@@ -61,11 +61,11 @@ SilphCo11Script_6214f:
ret
.asm_6215f
xor a
- ld [$ffe0], a
+ ldh [hUnlockedSilphCoDoors], a
ret
SilphCo11Script_6217b:
- ld a, [$ffe0]
+ ldh a, [hUnlockedSilphCoDoors]
and a
ret z
SetEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR
@@ -112,14 +112,14 @@ SilphCo11Script_621c5:
ld a, [wCoordIndex]
ld [wcf0d], a
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $f0
ld [wJoyIgnore], a
ld a, $3
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $3
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld de, MovementData_62216
call MoveSprite
@@ -128,15 +128,15 @@ SilphCo11Script_621c5:
ret
CoordsData_62211:
- db $0D,$06
- db $0C,$07
- db $FF
+ dbmapcoord 6, 13
+ dbmapcoord 7, 12
+ db -1 ; end
MovementData_62216:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
SilphCo11Script_621ff:
ld [wPlayerMovingDirection], a
@@ -164,10 +164,10 @@ SilphCo11Script3:
ld a, $f0
ld [wJoyIgnore], a
ld a, $7
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call GBFadeOutToBlack
- callba Func_f25a0
+ farcall Func_f25a0
call UpdateSprites
call Delay3
call GBFadeInFromBlack
@@ -181,7 +181,7 @@ SilphCo11Script4:
bit 0, a
ret nz
ld a, $3
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld a, [wcf0d]
cp $1
@@ -203,7 +203,7 @@ SilphCo11Script4:
ld hl, SilphCo10Text_62528
ld de, SilphCo10Text_62528
call SaveEndBattleTextPointers
- ld a, [H_SPRITEINDEX]
+ ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
@@ -233,13 +233,13 @@ SilphCo11Script_6229c:
ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $fc
ld [wJoyIgnore], a
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, $8
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -308,7 +308,7 @@ SilphCo11Script5:
ld de, SilphCo11MovementData_6230b
.asm_6232d
ld a, $4
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call MoveSprite
ld a, $ff
ld [wJoyIgnore], a
@@ -346,7 +346,7 @@ SilphCo11Script8:
ld de, SilphCo11MovementData_62311
.asm_6237b
ld a, $6
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call MoveSprite
ld a, $ff
ld [wJoyIgnore], a
@@ -374,7 +374,7 @@ SilphCo11Script10:
.asm_623b1
call Delay3
ld a, $9
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SilphCo11Script11:
ld hl, wd72d
@@ -388,7 +388,7 @@ SilphCo11Script11:
ld a, $2d
ld [wTrainerNo], a
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld [wJoyIgnore], a
ld a, $c
call SilphCo11Script_62189
@@ -411,7 +411,7 @@ SilphCo11Script12:
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, $a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -443,7 +443,7 @@ SilphCo11Script13:
SilphCo11Script14:
call PlayDefaultMusic
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld [wJoyIgnore], a
ResetEvent EVENT_782
SetEventReuseHL EVENT_BEAT_SILPH_CO_11F_TRAINER_0
@@ -476,21 +476,14 @@ SilphCo11F_TextPointers:
dw SilphCo11Text10
SilphCo11TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_11F_TRAINER_1
- db ($3 << 4)
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_11F_TRAINER_1
- dw SilphCo11Trainer1BattleText
- dw SilphCo11Trainer1AfterBattleText
- dw SilphCo11Trainer1EndBattleText
- dw SilphCo11Trainer1EndBattleText
-
- db $ff ; no more trainers
+ trainer EVENT_BEAT_SILPH_CO_11F_TRAINER_1, 3, SilphCo11Trainer1BattleText, SilphCo11Trainer1EndBattleText, SilphCo11Trainer1AfterBattleText
+ db -1 ; end
SilphCo11Text4:
SilphCo11Text6:
SilphCo11Text8:
- TX_FAR _SilphCoJessieJamesText1
- TX_ASM
+ text_far _SilphCoJessieJamesText1
+ text_asm
ld c, 10
call DelayFrames
ld a, $4
@@ -505,91 +498,90 @@ SilphCo11Text8:
jp TextScriptEnd
SilphCo11Text9:
- TX_FAR _SilphCoJessieJamesText2
- db "@"
+ text_far _SilphCoJessieJamesText2
+ text_end
SilphCo11Text_624c2:
- TX_FAR _SilphCoJessieJamesText3
- db "@"
+ text_far _SilphCoJessieJamesText3
+ text_end
SilphCo11Text10:
- TX_FAR _SilphCoJessieJamesText4
- TX_ASM
+ text_far _SilphCoJessieJamesText4
+ text_asm
ld c, 64
call DelayFrames
jp TextScriptEnd
SilphCo11Text1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_MASTER_BALL
- jp nz, .asm_62500
- ld hl, SilphCo11Text_62509
+ jp nz, .got_item
+ ld hl, SilphCoPresidentText
call PrintText
lb bc, MASTER_BALL, 1
call GiveItem
- jr nc, .asm_624f8
- ld hl, SilphCo11Text_6250e
+ jr nc, .bag_full
+ ld hl, ReceivedSilphCoMasterBallText
call PrintText
SetEvent EVENT_GOT_MASTER_BALL
- jr .asm_62506
-.asm_624f8
- ld hl, SilphCo11Text_62519
+ jr .done
+.bag_full
+ ld hl, SilphCoMasterBallNoRoomText
call PrintText
- jr .asm_62506
-
-.asm_62500
- ld hl, SilphCo11Text_62514
+ jr .done
+.got_item
+ ld hl, SilphCo10Text_6231c
call PrintText
-.asm_62506
+.done
jp TextScriptEnd
-SilphCo11Text_62509:
- TX_FAR _SilphCoPresidentText
- db "@"
+SilphCoPresidentText:
+ text_far _SilphCoPresidentText
+ text_end
-SilphCo11Text_6250e:
- TX_FAR _ReceivedSilphCoMasterBallText
- TX_SFX_KEY_ITEM
- db "@"
+ReceivedSilphCoMasterBallText:
+ text_far _ReceivedSilphCoMasterBallText
+ sound_get_key_item
+ text_end
-SilphCo11Text_62514:
- TX_FAR _SilphCo10Text_6231c
- db "@"
+SilphCo10Text_6231c:
+ text_far _SilphCo10Text_6231c
+ text_end
-SilphCo11Text_62519:
- TX_FAR _SilphCoMasterBallNoRoomText
- db "@"
+SilphCoMasterBallNoRoomText:
+ text_far _SilphCoMasterBallNoRoomText
+ text_end
SilphCo11Text2:
- TX_FAR _SilphCo11Text2
- db "@"
+ text_far _SilphCo11Text2
+ text_end
SilphCo11Text3:
- TX_FAR _SilphCo11Text3
- db "@"
+ text_far _SilphCo11Text3
+ text_end
SilphCo10Text_62528:
- TX_FAR _SilphCo10Text_62330
- db "@"
+ text_far _SilphCo10Text_62330
+ text_end
SilphCo11Text7:
- TX_FAR _SilphCo10Text_62335
- db "@"
+ text_far _SilphCo10Text_62335
+ text_end
SilphCo11Text5:
- TX_ASM
+ text_asm
ld hl, SilphCo11TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo11Trainer1BattleText:
- TX_FAR _SilphCo11BattleText2
- db "@"
+ text_far _SilphCo11BattleText2
+ text_end
SilphCo11Trainer1EndBattleText:
- TX_FAR _SilphCo11EndBattleText2
- db "@"
+ text_far _SilphCo11EndBattleText2
+ text_end
SilphCo11Trainer1AfterBattleText:
- TX_FAR _SilphCo11AfterBattleText2
- db "@"
+ text_far _SilphCo11AfterBattleText2
+ text_end
diff --git a/scripts/SilphCo11F_2.asm b/scripts/SilphCo11F_2.asm
index bf575de5..c8fd9c3e 100755
--- a/scripts/SilphCo11F_2.asm
+++ b/scripts/SilphCo11F_2.asm
@@ -1,4 +1,4 @@
-Func_f25a0:
+Func_f25a0::
ld hl, MissableObjects_f25ce
.asm_f25a3
ld a, [hli]
@@ -31,7 +31,7 @@ MissableObjects_f25c7:
db HS_SAFFRON_CITY_D
db $FF
-MissableObjects_f25ce
+MissableObjects_f25ce:
db HS_SAFFRON_CITY_1
db HS_SAFFRON_CITY_2
db HS_SAFFRON_CITY_3
diff --git a/scripts/SilphCo1F.asm b/scripts/SilphCo1F.asm
index 6ccaa29c..bc484b7c 100755
--- a/scripts/SilphCo1F.asm
+++ b/scripts/SilphCo1F.asm
@@ -12,5 +12,5 @@ SilphCo1F_TextPointers:
dw SilphCo1Text1
SilphCo1Text1:
- TX_FAR _SilphCo1Text1
- db "@"
+ text_far _SilphCo1Text1
+ text_end
diff --git a/scripts/SilphCo2F.asm b/scripts/SilphCo2F.asm
index 5fd542cb..4b96c314 100755
--- a/scripts/SilphCo2F.asm
+++ b/scripts/SilphCo2F.asm
@@ -33,9 +33,9 @@ SilphCo2Script_59d07:
predef_jump ReplaceTileBlock
SilphCo2GateCoords:
- db $02,$02
- db $05,$02
- db $FF
+ dbmapcoord 2, 2
+ dbmapcoord 2, 5
+ db -1 ; end
SilphCo2Script_59d43:
push hl
@@ -45,14 +45,14 @@ SilphCo2Script_59d43:
ld a, [hl]
ld c, a
xor a
- ld [$ffe0], a
+ ldh [hUnlockedSilphCoDoors], a
pop hl
.asm_59d4f
ld a, [hli]
cp $ff
jr z, .asm_59d6b
push hl
- ld hl, $ffe0
+ ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
@@ -70,12 +70,12 @@ SilphCo2Script_59d43:
ret
.asm_59d6b
xor a
- ld [$ffe0], a
+ ldh [hUnlockedSilphCoDoors], a
ret
SilphCo2Script_59d6f:
EventFlagAddress hl, EVENT_SILPH_CO_2_UNLOCKED_DOOR1
- ld a, [$ffe0]
+ ldh a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
@@ -99,50 +99,22 @@ SilphCo2F_TextPointers:
dw SilphCo2Text5
SilphCo2TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_2F_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_2F_TRAINER_0
- dw SilphCo2BattleText1 ; TextBeforeBattle
- dw SilphCo2AfterBattleText1 ; TextAfterBattle
- dw SilphCo2EndBattleText1 ; TextEndBattle
- dw SilphCo2EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_0, 3, SilphCo2BattleText1, SilphCo2EndBattleText1, SilphCo2AfterBattleText1
SilphCo2TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_2F_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_2F_TRAINER_1
- dw SilphCo2BattleText2 ; TextBeforeBattle
- dw SilphCo2AfterBattleText2 ; TextAfterBattle
- dw SilphCo2EndBattleText2 ; TextEndBattle
- dw SilphCo2EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_1, 4, SilphCo2BattleText2, SilphCo2EndBattleText2, SilphCo2AfterBattleText2
SilphCo2TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_2F_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_2F_TRAINER_2
- dw SilphCo2BattleText3 ; TextBeforeBattle
- dw SilphCo2AfterBattleText3 ; TextAfterBattle
- dw SilphCo2EndBattleText3 ; TextEndBattle
- dw SilphCo2EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_2, 3, SilphCo2BattleText3, SilphCo2EndBattleText3, SilphCo2AfterBattleText3
SilphCo2TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_2F_TRAINER_3
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_2F_TRAINER_3
- dw SilphCo2BattleText4 ; TextBeforeBattle
- dw SilphCo2AfterBattleText4 ; TextAfterBattle
- dw SilphCo2EndBattleText4 ; TextEndBattle
- dw SilphCo2EndBattleText4 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_3, 3, SilphCo2BattleText4, SilphCo2EndBattleText4, SilphCo2AfterBattleText4
+ db -1 ; end
SilphCo2Text1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_TM36
jr nz, .asm_59de4
ld hl, SilphCo2Text_59ded
call PrintText
- lb bc, TM_36, 1
+ lb bc, TM_SELFDESTRUCT, 1
call GiveItem
ld hl, TM36NoRoomText
jr nc, .asm_59de7
@@ -156,90 +128,90 @@ SilphCo2Text1:
jp TextScriptEnd
SilphCo2Text_59ded:
- TX_FAR _SilphCo2Text_59ded
- db "@"
+ text_far _SilphCo2Text_59ded
+ text_end
ReceivedTM36Text:
- TX_FAR _ReceivedTM36Text
- TX_SFX_ITEM_1
- db "@"
+ text_far _ReceivedTM36Text
+ sound_get_item_1
+ text_end
TM36ExplanationText:
- TX_FAR _TM36ExplanationText
- db "@"
+ text_far _TM36ExplanationText
+ text_end
TM36NoRoomText:
- TX_FAR _TM36NoRoomText
- db "@"
+ text_far _TM36NoRoomText
+ text_end
SilphCo2Text2:
- TX_ASM
+ text_asm
ld hl, SilphCo2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo2Text3:
- TX_ASM
+ text_asm
ld hl, SilphCo2TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo2Text4:
- TX_ASM
+ text_asm
ld hl, SilphCo2TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SilphCo2Text5:
- TX_ASM
+ text_asm
ld hl, SilphCo2TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
SilphCo2BattleText1:
- TX_FAR _SilphCo2BattleText1
- db "@"
+ text_far _SilphCo2BattleText1
+ text_end
SilphCo2EndBattleText1:
- TX_FAR _SilphCo2EndBattleText1
- db "@"
+ text_far _SilphCo2EndBattleText1
+ text_end
SilphCo2AfterBattleText1:
- TX_FAR _SilphCo2AfterBattleText1
- db "@"
+ text_far _SilphCo2AfterBattleText1
+ text_end
SilphCo2BattleText2:
- TX_FAR _SilphCo2BattleText2
- db "@"
+ text_far _SilphCo2BattleText2
+ text_end
SilphCo2EndBattleText2:
- TX_FAR _SilphCo2EndBattleText2
- db "@"
+ text_far _SilphCo2EndBattleText2
+ text_end
SilphCo2AfterBattleText2:
- TX_FAR _SilphCo2AfterBattleText2
- db "@"
+ text_far _SilphCo2AfterBattleText2
+ text_end
SilphCo2BattleText3:
- TX_FAR _SilphCo2BattleText3
- db "@"
+ text_far _SilphCo2BattleText3
+ text_end
SilphCo2EndBattleText3:
- TX_FAR _SilphCo2EndBattleText3
- db "@"
+ text_far _SilphCo2EndBattleText3
+ text_end
SilphCo2AfterBattleText3:
- TX_FAR _SilphCo2AfterBattleText3
- db "@"
+ text_far _SilphCo2AfterBattleText3
+ text_end
SilphCo2BattleText4:
- TX_FAR _SilphCo2BattleText4
- db "@"
+ text_far _SilphCo2BattleText4
+ text_end
SilphCo2EndBattleText4:
- TX_FAR _SilphCo2EndBattleText4
- db "@"
+ text_far _SilphCo2EndBattleText4
+ text_end
SilphCo2AfterBattleText4:
- TX_FAR _SilphCo2AfterBattleText4
- db "@"
+ text_far _SilphCo2AfterBattleText4
+ text_end
diff --git a/scripts/SilphCo3F.asm b/scripts/SilphCo3F.asm
index 42b5d611..69dfdad9 100755
--- a/scripts/SilphCo3F.asm
+++ b/scripts/SilphCo3F.asm
@@ -33,13 +33,13 @@ SilphCo3Script_59f71:
predef_jump ReplaceTileBlock
SilphCo3GateCoords:
- db $04,$04
- db $04,$08
- db $FF
+ dbmapcoord 4, 4
+ dbmapcoord 8, 4
+ db -1 ; end
SilphCo3Script_59fad:
EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1
- ld a, [$ffe0]
+ ldh a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
@@ -62,27 +62,13 @@ SilphCo3F_TextPointers:
dw PickUpItemText
SilphCo3TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_3F_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_3F_TRAINER_0
- dw SilphCo3BattleText1 ; TextBeforeBattle
- dw SilphCo3AfterBattleText1 ; TextAfterBattle
- dw SilphCo3EndBattleText1 ; TextEndBattle
- dw SilphCo3EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_0, 2, SilphCo3BattleText1, SilphCo3EndBattleText1, SilphCo3AfterBattleText1
SilphCo3TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_3F_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_3F_TRAINER_1
- dw SilphCo3BattleText2 ; TextBeforeBattle
- dw SilphCo3AfterBattleText2 ; TextAfterBattle
- dw SilphCo3EndBattleText2 ; TextEndBattle
- dw SilphCo3EndBattleText2 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_1, 3, SilphCo3BattleText2, SilphCo3EndBattleText2, SilphCo3AfterBattleText2
+ db -1 ; end
SilphCo3Text1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
ld hl, SilphCo3Text_59ffe
jr nz, .asm_59fee
@@ -92,45 +78,45 @@ SilphCo3Text1:
jp TextScriptEnd
SilphCo3Text_59ff9:
- TX_FAR _SilphCo3Text_59ff9
- db "@"
+ text_far _SilphCo3Text_59ff9
+ text_end
SilphCo3Text_59ffe:
- TX_FAR _SilphCo3Text_59ffe
- db "@"
+ text_far _SilphCo3Text_59ffe
+ text_end
SilphCo3Text2:
- TX_ASM
+ text_asm
ld hl, SilphCo3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo3BattleText1:
- TX_FAR _SilphCo3BattleText1
- db "@"
+ text_far _SilphCo3BattleText1
+ text_end
SilphCo3EndBattleText1:
- TX_FAR _SilphCo3EndBattleText1
- db "@"
+ text_far _SilphCo3EndBattleText1
+ text_end
SilphCo3AfterBattleText1:
- TX_FAR _SilphCo3AfterBattleText1
- db "@"
+ text_far _SilphCo3AfterBattleText1
+ text_end
SilphCo3Text3:
- TX_ASM
+ text_asm
ld hl, SilphCo3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo3BattleText2:
- TX_FAR _SilphCo3BattleText2
- db "@"
+ text_far _SilphCo3BattleText2
+ text_end
SilphCo3EndBattleText2:
- TX_FAR _SilphCo3EndBattleText2
- db "@"
+ text_far _SilphCo3EndBattleText2
+ text_end
SilphCo3AfterBattleText2:
- TX_FAR _SilphCo3AfterBattleText2
- db "@"
+ text_far _SilphCo3AfterBattleText2
+ text_end
diff --git a/scripts/SilphCo4F.asm b/scripts/SilphCo4F.asm
index 7d5072f6..8d5d696a 100755
--- a/scripts/SilphCo4F.asm
+++ b/scripts/SilphCo4F.asm
@@ -33,9 +33,9 @@ SilphCo4Script_19d21:
predef_jump ReplaceTileBlock
SilphCo4GateCoords:
- db $06,$02
- db $04,$06
- db $FF
+ dbmapcoord 2, 6
+ dbmapcoord 6, 4
+ db -1 ; end
SilphCo4Script_19d5d:
push hl
@@ -45,14 +45,14 @@ SilphCo4Script_19d5d:
ld a, [hl]
ld c, a
xor a
- ld [$ffe0], a
+ ldh [hUnlockedSilphCoDoors], a
pop hl
.asm_19d69
ld a, [hli]
cp $ff
jr z, .asm_19d85
push hl
- ld hl, $ffe0
+ ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
@@ -70,12 +70,12 @@ SilphCo4Script_19d5d:
ret
.asm_19d85
xor a
- ld [$ffe0], a
+ ldh [hUnlockedSilphCoDoors], a
ret
SilphCo4Script_19d89:
EventFlagAddress hl, EVENT_SILPH_CO_4_UNLOCKED_DOOR1
- ld a, [$ffe0]
+ ldh a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
@@ -101,99 +101,78 @@ SilphCo4F_TextPointers:
dw PickUpItemText
SilphCo4TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_4F_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_4F_TRAINER_0
- dw SilphCo4BattleText2 ; TextBeforeBattle
- dw SilphCo4AfterBattleText2 ; TextAfterBattle
- dw SilphCo4EndBattleText2 ; TextEndBattle
- dw SilphCo4EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_4F_TRAINER_0, 4, SilphCo4BattleText2, SilphCo4EndBattleText2, SilphCo4AfterBattleText2
SilphCo4TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_4F_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_4F_TRAINER_1
- dw SilphCo4BattleText3 ; TextBeforeBattle
- dw SilphCo4AfterBattleText3 ; TextAfterBattle
- dw SilphCo4EndBattleText3 ; TextEndBattle
- dw SilphCo4EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_4F_TRAINER_1, 3, SilphCo4BattleText3, SilphCo4EndBattleText3, SilphCo4AfterBattleText3
SilphCo4TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_4F_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_4F_TRAINER_2
- dw SilphCo4BattleText4 ; TextBeforeBattle
- dw SilphCo4AfterBattleText4 ; TextAfterBattle
- dw SilphCo4EndBattleText4 ; TextEndBattle
- dw SilphCo4EndBattleText4 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SILPH_CO_4F_TRAINER_2, 4, SilphCo4BattleText4, SilphCo4EndBattleText4, SilphCo4AfterBattleText4
+ db -1 ; end
SilphCo4Text1:
- TX_ASM
+ text_asm
ld hl, SilphCo4Text_19de0
ld de, SilphCo4Text_19de5
call SilphCo6Script_1a22f
jp TextScriptEnd
SilphCo4Text_19de0:
- TX_FAR _SilphCo4Text_19de0
- db "@"
+ text_far _SilphCo4Text_19de0
+ text_end
SilphCo4Text_19de5:
- TX_FAR _SilphCo4Text_19de5
- db "@"
+ text_far _SilphCo4Text_19de5
+ text_end
SilphCo4Text2:
- TX_ASM
+ text_asm
ld hl, SilphCo4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo4BattleText2:
- TX_FAR _SilphCo4BattleText2
- db "@"
+ text_far _SilphCo4BattleText2
+ text_end
SilphCo4EndBattleText2:
- TX_FAR _SilphCo4EndBattleText2
- db "@"
+ text_far _SilphCo4EndBattleText2
+ text_end
SilphCo4AfterBattleText2:
- TX_FAR _SilphCo4AfterBattleText2
- db "@"
+ text_far _SilphCo4AfterBattleText2
+ text_end
SilphCo4Text3:
- TX_ASM
+ text_asm
ld hl, SilphCo4TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo4BattleText3:
- TX_FAR _SilphCo4BattleText3
- db "@"
+ text_far _SilphCo4BattleText3
+ text_end
SilphCo4EndBattleText3:
- TX_FAR _SilphCo4EndBattleText3
- db "@"
+ text_far _SilphCo4EndBattleText3
+ text_end
SilphCo4AfterBattleText3:
- TX_FAR _SilphCo4AfterBattleText3
- db "@"
+ text_far _SilphCo4AfterBattleText3
+ text_end
SilphCo4Text4:
- TX_ASM
+ text_asm
ld hl, SilphCo4TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SilphCo4BattleText4:
- TX_FAR _SilphCo4BattleText4
- db "@"
+ text_far _SilphCo4BattleText4
+ text_end
SilphCo4EndBattleText4:
- TX_FAR _SilphCo4EndBattleText4
- db "@"
+ text_far _SilphCo4EndBattleText4
+ text_end
SilphCo4AfterBattleText4:
- TX_FAR _SilphCo4AfterBattleText4
- db "@"
+ text_far _SilphCo4AfterBattleText4
+ text_end
diff --git a/scripts/SilphCo5F.asm b/scripts/SilphCo5F.asm
index d9deda5b..975dacac 100755
--- a/scripts/SilphCo5F.asm
+++ b/scripts/SilphCo5F.asm
@@ -42,14 +42,14 @@ SilphCo5Script_19f4d:
predef_jump ReplaceTileBlock
SilphCo5GateCoords:
- db $02,$03
- db $06,$03
- db $05,$07
- db $FF
+ dbmapcoord 3, 2
+ dbmapcoord 3, 6
+ dbmapcoord 7, 5
+ db -1 ; end
SilphCo5Script_19f9e:
EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1
- ld a, [$ffe0]
+ ldh a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
@@ -84,138 +84,110 @@ SilphCo5F_TextPointers:
dw SilphCo5Text11
SilphCo5TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_0
- db ($1 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_0
- dw SilphCo5BattleText2 ; TextBeforeBattle
- dw SilphCo5AfterBattleText2 ; TextAfterBattle
- dw SilphCo5EndBattleText2 ; TextEndBattle
- dw SilphCo5EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_0, 1, SilphCo5BattleText2, SilphCo5EndBattleText2, SilphCo5AfterBattleText2
SilphCo5TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_1
- dw SilphCo5BattleText3 ; TextBeforeBattle
- dw SilphCo5AfterBattleText3 ; TextAfterBattle
- dw SilphCo5EndBattleText3 ; TextEndBattle
- dw SilphCo5EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_1, 2, SilphCo5BattleText3, SilphCo5EndBattleText3, SilphCo5AfterBattleText3
SilphCo5TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_2
- dw SilphCo5BattleText4 ; TextBeforeBattle
- dw SilphCo5AfterBattleText4 ; TextAfterBattle
- dw SilphCo5EndBattleText4 ; TextEndBattle
- dw SilphCo5EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_2, 4, SilphCo5BattleText4, SilphCo5EndBattleText4, SilphCo5AfterBattleText4
SilphCo5TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_3
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_3
- dw SilphCo5BattleText5 ; TextBeforeBattle
- dw SilphCo5AfterBattleText5 ; TextAfterBattle
- dw SilphCo5EndBattleText5 ; TextEndBattle
- dw SilphCo5EndBattleText5 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_3, 3, SilphCo5BattleText5, SilphCo5EndBattleText5, SilphCo5AfterBattleText5
+ db -1 ; end
SilphCo5Text1:
- TX_ASM
+ text_asm
ld hl, SilphCo5Text_1a010
ld de, SilphCo5Text_1a015
call SilphCo6Script_1a22f
jp TextScriptEnd
SilphCo5Text_1a010:
- TX_FAR _SilphCo5Text_1a010
- db "@"
+ text_far _SilphCo5Text_1a010
+ text_end
SilphCo5Text_1a015:
- TX_FAR _SilphCo5Text_1a015
- db "@"
+ text_far _SilphCo5Text_1a015
+ text_end
SilphCo5Text2:
- TX_ASM
+ text_asm
ld hl, SilphCo5TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo5BattleText2:
- TX_FAR _SilphCo5BattleText2
- db "@"
+ text_far _SilphCo5BattleText2
+ text_end
SilphCo5EndBattleText2:
- TX_FAR _SilphCo5EndBattleText2
- db "@"
+ text_far _SilphCo5EndBattleText2
+ text_end
SilphCo5AfterBattleText2:
- TX_FAR _SilphCo5AfterBattleText2
- db "@"
+ text_far _SilphCo5AfterBattleText2
+ text_end
SilphCo5Text3:
- TX_ASM
+ text_asm
ld hl, SilphCo5TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo5BattleText3:
- TX_FAR _SilphCo5BattleText3
- db "@"
+ text_far _SilphCo5BattleText3
+ text_end
SilphCo5EndBattleText3:
- TX_FAR _SilphCo5EndBattleText3
- db "@"
+ text_far _SilphCo5EndBattleText3
+ text_end
SilphCo5AfterBattleText3:
- TX_FAR _SilphCo5AfterBattleText3
- db "@"
+ text_far _SilphCo5AfterBattleText3
+ text_end
SilphCo5Text4:
- TX_ASM
+ text_asm
ld hl, SilphCo5TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SilphCo5BattleText4:
- TX_FAR _SilphCo5BattleText4
- db "@"
+ text_far _SilphCo5BattleText4
+ text_end
SilphCo5EndBattleText4:
- TX_FAR _SilphCo5EndBattleText4
- db "@"
+ text_far _SilphCo5EndBattleText4
+ text_end
SilphCo5AfterBattleText4:
- TX_FAR _SilphCo5AfterBattleText4
- db "@"
+ text_far _SilphCo5AfterBattleText4
+ text_end
SilphCo5Text5:
- TX_ASM
+ text_asm
ld hl, SilphCo5TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
SilphCo5BattleText5:
- TX_FAR _SilphCo5BattleText5
- db "@"
+ text_far _SilphCo5BattleText5
+ text_end
SilphCo5EndBattleText5:
- TX_FAR _SilphCo5EndBattleText5
- db "@"
+ text_far _SilphCo5EndBattleText5
+ text_end
SilphCo5AfterBattleText5:
- TX_FAR _SilphCo5AfterBattleText5
- db "@"
+ text_far _SilphCo5AfterBattleText5
+ text_end
SilphCo5Text9:
- TX_FAR _SilphCo5Text9
- db "@"
+ text_far _SilphCo5Text9
+ text_end
SilphCo5Text10:
- TX_FAR _SilphCo5Text10
- db "@"
+ text_far _SilphCo5Text10
+ text_end
SilphCo5Text11:
- TX_FAR _SilphCo5Text11
- db "@"
+ text_far _SilphCo5Text11
+ text_end
diff --git a/scripts/SilphCo6F.asm b/scripts/SilphCo6F.asm
index ddbcba79..ea8c20c2 100755
--- a/scripts/SilphCo6F.asm
+++ b/scripts/SilphCo6F.asm
@@ -24,11 +24,11 @@ SilphCo6Script_1a1bf:
predef_jump ReplaceTileBlock
SilphCo6GateCoords:
- db $06,$02
- db $FF
+ dbmapcoord 2, 6
+ db -1 ; end
SilphCo6Script_1a1e6:
- ld a, [$ffe0]
+ ldh a, [hUnlockedSilphCoDoors]
and a
ret z
SetEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR
@@ -52,33 +52,12 @@ SilphCo6F_TextPointers:
dw PickUpItemText
SilphCo6TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_6F_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_6F_TRAINER_0
- dw SilphCo6BattleText2 ; TextBeforeBattle
- dw SilphCo6AfterBattleText2 ; TextAfterBattle
- dw SilphCo6EndBattleText2 ; TextEndBattle
- dw SilphCo6EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_6F_TRAINER_0, 2, SilphCo6BattleText2, SilphCo6EndBattleText2, SilphCo6AfterBattleText2
SilphCo6TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_6F_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_6F_TRAINER_1
- dw SilphCo6BattleText3 ; TextBeforeBattle
- dw SilphCo6AfterBattleText3 ; TextAfterBattle
- dw SilphCo6EndBattleText3 ; TextEndBattle
- dw SilphCo6EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_6F_TRAINER_1, 3, SilphCo6BattleText3, SilphCo6EndBattleText3, SilphCo6AfterBattleText3
SilphCo6TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_6F_TRAINER_2, 1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_6F_TRAINER_2, 1
- dw SilphCo6BattleText4 ; TextBeforeBattle
- dw SilphCo6AfterBattleText4 ; TextAfterBattle
- dw SilphCo6EndBattleText4 ; TextEndBattle
- dw SilphCo6EndBattleText4 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SILPH_CO_6F_TRAINER_2, 1, 2, SilphCo6BattleText4, SilphCo6EndBattleText4, SilphCo6AfterBattleText4
+ db -1 ; end
SilphCo6Script_1a22f:
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
@@ -91,130 +70,130 @@ SilphCo6Script_1a22f:
jp PrintText
SilphCo6Text1:
- TX_ASM
+ text_asm
ld hl, SilphCo6Text_1a24a
ld de, SilphCo6Text_1a24f
call SilphCo6Script_1a22f
jp TextScriptEnd
SilphCo6Text_1a24a:
- TX_FAR _SilphCo6Text_1a24a
- db "@"
+ text_far _SilphCo6Text_1a24a
+ text_end
SilphCo6Text_1a24f:
- TX_FAR _SilphCo6Text_1a24f
- db "@"
+ text_far _SilphCo6Text_1a24f
+ text_end
SilphCo6Text2:
- TX_ASM
+ text_asm
ld hl, SilphCo6Text_1a261
ld de, SilphCo6Text_1a266
call SilphCo6Script_1a22f
jp TextScriptEnd
SilphCo6Text_1a261:
- TX_FAR _SilphCo6Text_1a261
- db "@"
+ text_far _SilphCo6Text_1a261
+ text_end
SilphCo6Text_1a266:
- TX_FAR _SilphCo6Text_1a266
- db "@"
+ text_far _SilphCo6Text_1a266
+ text_end
SilphCo6Text3:
- TX_ASM
+ text_asm
ld hl, SilphCo6Text_1a278
ld de, SilphCo6Text_1a27d
call SilphCo6Script_1a22f
jp TextScriptEnd
SilphCo6Text_1a278:
- TX_FAR _SilphCo6Text_1a278
- db "@"
+ text_far _SilphCo6Text_1a278
+ text_end
SilphCo6Text_1a27d:
- TX_FAR _SilphCo6Text_1a27d
- db "@"
+ text_far _SilphCo6Text_1a27d
+ text_end
SilphCo6Text4:
- TX_ASM
+ text_asm
ld hl, SilphCo6Text_1a28f
ld de, SilphCo6Text_1a294
call SilphCo6Script_1a22f
jp TextScriptEnd
SilphCo6Text_1a28f:
- TX_FAR _SilphCo6Text_1a28f
- db "@"
+ text_far _SilphCo6Text_1a28f
+ text_end
SilphCo6Text_1a294:
- TX_FAR _SilphCo6Text_1a294
- db "@"
+ text_far _SilphCo6Text_1a294
+ text_end
SilphCo6Text5:
- TX_ASM
+ text_asm
ld hl, SilphCo6Text_1a2a6
ld de, SilphCo6Text_1a2ab
call SilphCo6Script_1a22f
jp TextScriptEnd
SilphCo6Text_1a2a6:
- TX_FAR _SilphCo6Text_1a2a6
- db "@"
+ text_far _SilphCo6Text_1a2a6
+ text_end
SilphCo6Text_1a2ab:
- TX_FAR _SilphCo6Text_1a2ab
- db "@"
+ text_far _SilphCo6Text_1a2ab
+ text_end
SilphCo6Text6:
- TX_ASM
+ text_asm
ld hl, SilphCo6TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo6BattleText2:
- TX_FAR _SilphCo6BattleText2
- db "@"
+ text_far _SilphCo6BattleText2
+ text_end
SilphCo6EndBattleText2:
- TX_FAR _SilphCo6EndBattleText2
- db "@"
+ text_far _SilphCo6EndBattleText2
+ text_end
SilphCo6AfterBattleText2:
- TX_FAR _SilphCo6AfterBattleText2
- db "@"
+ text_far _SilphCo6AfterBattleText2
+ text_end
SilphCo6Text7:
- TX_ASM
+ text_asm
ld hl, SilphCo6TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo6BattleText3:
- TX_FAR _SilphCo6BattleText3
- db "@"
+ text_far _SilphCo6BattleText3
+ text_end
SilphCo6EndBattleText3:
- TX_FAR _SilphCo6EndBattleText3
- db "@"
+ text_far _SilphCo6EndBattleText3
+ text_end
SilphCo6AfterBattleText3:
- TX_FAR _SilphCo6AfterBattleText3
- db "@"
+ text_far _SilphCo6AfterBattleText3
+ text_end
SilphCo6Text8:
- TX_ASM
+ text_asm
ld hl, SilphCo6TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SilphCo6BattleText4:
- TX_FAR _SilphCo6BattleText4
- db "@"
+ text_far _SilphCo6BattleText4
+ text_end
SilphCo6EndBattleText4:
- TX_FAR _SilphCo6EndBattleText4
- db "@"
+ text_far _SilphCo6EndBattleText4
+ text_end
SilphCo6AfterBattleText4:
- TX_FAR _SilphCo6AfterBattleText4
- db "@"
+ text_far _SilphCo6AfterBattleText4
+ text_end
diff --git a/scripts/SilphCo7F.asm b/scripts/SilphCo7F.asm
index a8dc032d..b32f967b 100755
--- a/scripts/SilphCo7F.asm
+++ b/scripts/SilphCo7F.asm
@@ -42,10 +42,10 @@ SilphCo7Script_51b77:
predef_jump ReplaceTileBlock
SilphCo7GateCoords:
- db $03,$05
- db $02,$0A
- db $06,$0A
- db $FF
+ dbmapcoord 5, 3
+ dbmapcoord 10, 2
+ dbmapcoord 10, 6
+ db -1 ; end
SilphCo7Text_51bc8:
push hl
@@ -55,14 +55,14 @@ SilphCo7Text_51bc8:
ld a, [hl]
ld c, a
xor a
- ld [$ffe0], a
+ ldh [hUnlockedSilphCoDoors], a
pop hl
.asm_51bd4
ld a, [hli]
cp $ff
jr z, .asm_51bf0
push hl
- ld hl, $ffe0
+ ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
@@ -80,12 +80,12 @@ SilphCo7Text_51bc8:
ret
.asm_51bf0
xor a
- ld [$ffe0], a
+ ldh [hUnlockedSilphCoDoors], a
ret
SilphCo7Text_51bf4:
EventFlagAddress hl, EVENT_SILPH_CO_7_UNLOCKED_DOOR1
- ld a, [$ffe0]
+ ldh a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
@@ -125,7 +125,7 @@ SilphCo7Script0:
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $f0
ld [wJoyIgnore], a
ld a, PLAYER_DIR_DOWN
@@ -135,10 +135,10 @@ SilphCo7Script0:
ld a, MUSIC_MEET_RIVAL
call PlayMusic
ld a, $9
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $9
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld de, MovementData_51c7d
ld a, [wCoordIndex]
@@ -148,22 +148,22 @@ SilphCo7Script0:
inc de
.asm_51c6c
ld a, $9
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call MoveSprite
ld a, $3
jp SilphCo7Text_51c10
CoordsData_51c78:
- db $02,$03
- db $03,$03
- db $FF
+ dbmapcoord 3, 2
+ dbmapcoord 3, 3
+ db -1 ; end
MovementData_51c7d:
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
- db $FF
+ db -1 ; end
SilphCo7Script3:
ld a, [wd730]
@@ -172,7 +172,7 @@ SilphCo7Script3:
xor a
ld [wJoyIgnore], a
ld a, $d
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
ld hl, wd72d
@@ -181,7 +181,7 @@ SilphCo7Script3:
ld hl, SilphCo7Text14
ld de, SilphCo7Text_51ecd
call SaveEndBattleTextPointers
- ld a, OPP_SONY2
+ ld a, OPP_RIVAL2
ld [wCurOpponent], a
ld a, [wRivalStarter]
add 4
@@ -200,15 +200,15 @@ SilphCo7Script4:
ld a, PLAYER_DIR_DOWN
ld [wPlayerMovingDirection], a
ld a, $9
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
ld a, SPRITE_FACING_UP
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, $f
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call StopAllMusic
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld de, MovementData_51d1d
ld a, [wcf0d]
cp $1
@@ -216,7 +216,7 @@ SilphCo7Script4:
ld de, MovementData_51d1a
.asm_51d0e
ld a, $9
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call MoveSprite
ld a, $5
jp SilphCo7Text_51c10
@@ -224,7 +224,7 @@ SilphCo7Script4:
MovementData_51d1a:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
- db $FF
+ db -1 ; end
MovementData_51d1d:
db NPC_MOVEMENT_LEFT
@@ -234,7 +234,7 @@ MovementData_51d1d:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN
- db $FF
+ db -1 ; end
SilphCo7Script5:
ld a, [wd730]
@@ -266,46 +266,18 @@ SilphCo7F_TextPointers:
dw SilphCo7Text15
SilphCo7TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_7F_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_7F_TRAINER_0
- dw SilphCo7BattleText1 ; TextBeforeBattle
- dw SilphCo7AfterBattleText1 ; TextAfterBattle
- dw SilphCo7EndBattleText1 ; TextEndBattle
- dw SilphCo7EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_0, 2, SilphCo7BattleText1, SilphCo7EndBattleText1, SilphCo7AfterBattleText1
SilphCo7TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_7F_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_7F_TRAINER_1
- dw SilphCo7BattleText2 ; TextBeforeBattle
- dw SilphCo7AfterBattleText2 ; TextAfterBattle
- dw SilphCo7EndBattleText2 ; TextEndBattle
- dw SilphCo7EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_1, 3, SilphCo7BattleText2, SilphCo7EndBattleText2, SilphCo7AfterBattleText2
SilphCo7TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_7F_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_7F_TRAINER_2
- dw SilphCo7BattleText3 ; TextBeforeBattle
- dw SilphCo7AfterBattleText3 ; TextAfterBattle
- dw SilphCo7EndBattleText3 ; TextEndBattle
- dw SilphCo7EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_2, 3, SilphCo7BattleText3, SilphCo7EndBattleText3, SilphCo7AfterBattleText3
SilphCo7TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_7F_TRAINER_3, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_7F_TRAINER_3, 1
- dw SilphCo7BattleText4 ; TextBeforeBattle
- dw SilphCo7AfterBattleText4 ; TextAfterBattle
- dw SilphCo7EndBattleText4 ; TextEndBattle
- dw SilphCo7EndBattleText4 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_3, 1, 4, SilphCo7BattleText4, SilphCo7EndBattleText4, SilphCo7AfterBattleText4
+ db -1 ; end
SilphCo7Text1:
; lapras guy
- TX_ASM
+ text_asm
ld a, [wd72e]
bit 0, a ; got lapras?
jr z, .givelapras
@@ -336,23 +308,23 @@ SilphCo7Text1:
jp TextScriptEnd
.MeetLaprasGuyText
- TX_FAR _MeetLaprasGuyText
- db "@"
+ text_far _MeetLaprasGuyText
+ text_end
.HeresYourLaprasText
- TX_FAR _HeresYourLaprasText
- db "@"
+ text_far _HeresYourLaprasText
+ text_end
.LaprasGuyText
- TX_FAR _LaprasGuyText
- db "@"
+ text_far _LaprasGuyText
+ text_end
.LaprasGuySavedText
- TX_FAR _LaprasGuySavedText
- db "@"
+ text_far _LaprasGuySavedText
+ text_end
SilphCo7Text2:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
jr nz, .savedsilph
ld hl, .rockettext
@@ -365,15 +337,15 @@ SilphCo7Text2:
jp TextScriptEnd
.rockettext
- TX_FAR _SilphCo7Text_51e00
- db "@"
+ text_far _SilphCo7Text_51e00
+ text_end
.savedtext
- TX_FAR _CanceledMasterBallText
- db "@"
+ text_far _CanceledMasterBallText
+ text_end
SilphCo7Text3:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
jr nz, .savedsilph
ld hl, .rockettext
@@ -386,15 +358,15 @@ SilphCo7Text3:
jp TextScriptEnd
.rockettext
- TX_FAR _SilphCo7Text_51e23
- db "@"
+ text_far _SilphCo7Text_51e23
+ text_end
.savedtext
- TX_FAR _SilphCo7Text_51e28
- db "@"
+ text_far _SilphCo7Text_51e28
+ text_end
SilphCo7Text4:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
jr nz, .savedsilph
ld hl, .rockettext
@@ -407,107 +379,107 @@ SilphCo7Text4:
jp TextScriptEnd
.rockettext
- TX_FAR _SilphCo7Text_51e46
- db "@"
+ text_far _SilphCo7Text_51e46
+ text_end
.savedtext
- TX_FAR _SilphCo7Text_51e4b
- db "@"
+ text_far _SilphCo7Text_51e4b
+ text_end
SilphCo7Text5:
- TX_ASM
+ text_asm
ld hl, SilphCo7TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo7BattleText1:
- TX_FAR _SilphCo7BattleText1
- db "@"
+ text_far _SilphCo7BattleText1
+ text_end
SilphCo7EndBattleText1:
- TX_FAR _SilphCo7EndBattleText1
- db "@"
+ text_far _SilphCo7EndBattleText1
+ text_end
SilphCo7AfterBattleText1:
- TX_FAR _SilphCo7AfterBattleText1
- db "@"
+ text_far _SilphCo7AfterBattleText1
+ text_end
SilphCo7Text6:
- TX_ASM
+ text_asm
ld hl, SilphCo7TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo7BattleText2:
- TX_FAR _SilphCo7BattleText2
- db "@"
+ text_far _SilphCo7BattleText2
+ text_end
SilphCo7EndBattleText2:
- TX_FAR _SilphCo7EndBattleText2
- db "@"
+ text_far _SilphCo7EndBattleText2
+ text_end
SilphCo7AfterBattleText2:
- TX_FAR _SilphCo7AfterBattleText2
- db "@"
+ text_far _SilphCo7AfterBattleText2
+ text_end
SilphCo7Text7:
- TX_ASM
+ text_asm
ld hl, SilphCo7TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SilphCo7BattleText3:
- TX_FAR _SilphCo7BattleText3
- db "@"
+ text_far _SilphCo7BattleText3
+ text_end
SilphCo7EndBattleText3:
- TX_FAR _SilphCo7EndBattleText3
- db "@"
+ text_far _SilphCo7EndBattleText3
+ text_end
SilphCo7AfterBattleText3:
- TX_FAR _SilphCo7AfterBattleText3
- db "@"
+ text_far _SilphCo7AfterBattleText3
+ text_end
SilphCo7Text8:
- TX_ASM
+ text_asm
ld hl, SilphCo7TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
SilphCo7BattleText4:
- TX_FAR _SilphCo7BattleText4
- db "@"
+ text_far _SilphCo7BattleText4
+ text_end
SilphCo7EndBattleText4:
- TX_FAR _SilphCo7EndBattleText4
- db "@"
+ text_far _SilphCo7EndBattleText4
+ text_end
SilphCo7AfterBattleText4:
- TX_FAR _SilphCo7AfterBattleText4
- db "@"
+ text_far _SilphCo7AfterBattleText4
+ text_end
SilphCo7Text9:
- TX_ASM
+ text_asm
ld hl, SilphCo7Text_51ebe
call PrintText
jp TextScriptEnd
SilphCo7Text_51ebe:
- TX_FAR _SilphCo7Text_51ebe
- db "@"
+ text_far _SilphCo7Text_51ebe
+ text_end
SilphCo7Text13:
- TX_FAR _SilphCo7Text_51ec3
- db "@"
+ text_far _SilphCo7Text_51ec3
+ text_end
SilphCo7Text14:
- TX_FAR _SilphCo7Text_51ec8
- db "@"
+ text_far _SilphCo7Text_51ec8
+ text_end
SilphCo7Text_51ecd:
- TX_FAR _SilphCo7Text_51ecd
- db "@"
+ text_far _SilphCo7Text_51ecd
+ text_end
SilphCo7Text15:
- TX_FAR _SilphCo7Text_51ed2
- db "@"
+ text_far _SilphCo7Text_51ed2
+ text_end
diff --git a/scripts/SilphCo8F.asm b/scripts/SilphCo8F.asm
index ce6579f7..c4e022d4 100755
--- a/scripts/SilphCo8F.asm
+++ b/scripts/SilphCo8F.asm
@@ -24,8 +24,8 @@ SilphCo8Script_5651a:
predef_jump ReplaceTileBlock
SilphCo8GateCoords:
- db $04,$03
- db $FF
+ dbmapcoord 3, 4
+ db -1 ; end
SilphCo8Script_56541:
push hl
@@ -35,14 +35,14 @@ SilphCo8Script_56541:
ld a, [hl]
ld c, a
xor a
- ld [$ffe0], a
+ ldh [hUnlockedSilphCoDoors], a
pop hl
.asm_5654d
ld a, [hli]
cp $ff
jr z, .asm_56569
push hl
- ld hl, $ffe0
+ ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
@@ -60,11 +60,11 @@ SilphCo8Script_56541:
ret
.asm_56569
xor a
- ld [$ffe0], a
+ ldh [hUnlockedSilphCoDoors], a
ret
SilphCo8Script_5656d:
- ld a, [$ffe0]
+ ldh a, [hUnlockedSilphCoDoors]
and a
ret z
SetEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR
@@ -82,36 +82,15 @@ SilphCo8F_TextPointers:
dw SilphCo8Text4
SilphCo8TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_8F_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_8F_TRAINER_0
- dw SilphCo8BattleText1 ; TextBeforeBattle
- dw SilphCo8AfterBattleText1 ; TextAfterBattle
- dw SilphCo8EndBattleText1 ; TextEndBattle
- dw SilphCo8EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_8F_TRAINER_0, 4, SilphCo8BattleText1, SilphCo8EndBattleText1, SilphCo8AfterBattleText1
SilphCo8TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_8F_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_8F_TRAINER_1
- dw SilphCo8BattleText2 ; TextBeforeBattle
- dw SilphCo8AfterBattleText2 ; TextAfterBattle
- dw SilphCo8EndBattleText2 ; TextEndBattle
- dw SilphCo8EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_8F_TRAINER_1, 4, SilphCo8BattleText2, SilphCo8EndBattleText2, SilphCo8AfterBattleText2
SilphCo8TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_8F_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_8F_TRAINER_2
- dw SilphCo8BattleText3 ; TextBeforeBattle
- dw SilphCo8AfterBattleText3 ; TextAfterBattle
- dw SilphCo8EndBattleText3 ; TextEndBattle
- dw SilphCo8EndBattleText3 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SILPH_CO_8F_TRAINER_2, 4, SilphCo8BattleText3, SilphCo8EndBattleText3, SilphCo8AfterBattleText3
+ db -1 ; end
SilphCo8Text1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
ld hl, SilphCo8Text_565c3
jr nz, .asm_565b8
@@ -121,63 +100,63 @@ SilphCo8Text1:
jp TextScriptEnd
SilphCo8Text_565be:
- TX_FAR _SilphCo8Text_565be
- db "@"
+ text_far _SilphCo8Text_565be
+ text_end
SilphCo8Text_565c3:
- TX_FAR _SilphCo8Text_565c3
- db "@"
+ text_far _SilphCo8Text_565c3
+ text_end
SilphCo8Text2:
- TX_ASM
+ text_asm
ld hl, SilphCo8TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo8Text3:
- TX_ASM
+ text_asm
ld hl, SilphCo8TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo8Text4:
- TX_ASM
+ text_asm
ld hl, SilphCo8TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SilphCo8BattleText1:
- TX_FAR _SilphCo8BattleText1
- db "@"
+ text_far _SilphCo8BattleText1
+ text_end
SilphCo8EndBattleText1:
- TX_FAR _SilphCo8EndBattleText1
- db "@"
+ text_far _SilphCo8EndBattleText1
+ text_end
SilphCo8AfterBattleText1:
- TX_FAR _SilphCo8AfterBattleText1
- db "@"
+ text_far _SilphCo8AfterBattleText1
+ text_end
SilphCo8BattleText2:
- TX_FAR _SilphCo8BattleText2
- db "@"
+ text_far _SilphCo8BattleText2
+ text_end
SilphCo8EndBattleText2:
- TX_FAR _SilphCo8EndBattleText2
- db "@"
+ text_far _SilphCo8EndBattleText2
+ text_end
SilphCo8AfterBattleText2:
- TX_FAR _SilphCo8AfterBattleText2
- db "@"
+ text_far _SilphCo8AfterBattleText2
+ text_end
SilphCo8BattleText3:
- TX_FAR _SilphCo8BattleText3
- db "@"
+ text_far _SilphCo8BattleText3
+ text_end
SilphCo8EndBattleText3:
- TX_FAR _SilphCo8EndBattleText3
- db "@"
+ text_far _SilphCo8EndBattleText3
+ text_end
SilphCo8AfterBattleText3:
- TX_FAR _SilphCo8AfterBattleText3
- db "@"
+ text_far _SilphCo8AfterBattleText3
+ text_end
diff --git a/scripts/SilphCo9F.asm b/scripts/SilphCo9F.asm
index 66291e98..1efb3d78 100755
--- a/scripts/SilphCo9F.asm
+++ b/scripts/SilphCo9F.asm
@@ -51,11 +51,11 @@ SilphCo9Script_5d7d1:
predef_jump ReplaceTileBlock
SilphCo9GateCoords:
- db $04,$01
- db $02,$09
- db $05,$09
- db $06,$05
- db $FF
+ dbmapcoord 1, 4
+ dbmapcoord 9, 2
+ dbmapcoord 9, 5
+ dbmapcoord 5, 6
+ db -1 ; end
SilphCo9Script_5d837:
push hl
@@ -65,14 +65,14 @@ SilphCo9Script_5d837:
ld a, [hl]
ld c, a
xor a
- ld [$ffe0], a
+ ldh [hUnlockedSilphCoDoors], a
pop hl
.asm_5d843
ld a, [hli]
cp $ff
jr z, .asm_5d85f
push hl
- ld hl, $ffe0
+ ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
@@ -90,12 +90,12 @@ SilphCo9Script_5d837:
ret
.asm_5d85f
xor a
- ld [$ffe0], a
+ ldh [hUnlockedSilphCoDoors], a
ret
SilphCo9Script_5d863:
EventFlagAddress hl, EVENT_SILPH_CO_9_UNLOCKED_DOOR1
- ld a, [$ffe0]
+ ldh a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
@@ -130,36 +130,15 @@ SilphCo9F_TextPointers:
dw SilphCo9Text4
SilphCo9TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_9F_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_9F_TRAINER_0
- dw SilphCo9BattleText1 ; TextBeforeBattle
- dw SilphCo9AfterBattleText1 ; TextAfterBattle
- dw SilphCo9EndBattleText1 ; TextEndBattle
- dw SilphCo9EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_9F_TRAINER_0, 4, SilphCo9BattleText1, SilphCo9EndBattleText1, SilphCo9AfterBattleText1
SilphCo9TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_9F_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_9F_TRAINER_1
- dw SilphCo9BattleText2 ; TextBeforeBattle
- dw SilphCo9AfterBattleText2 ; TextAfterBattle
- dw SilphCo9EndBattleText2 ; TextEndBattle
- dw SilphCo9EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_SILPH_CO_9F_TRAINER_1, 2, SilphCo9BattleText2, SilphCo9EndBattleText2, SilphCo9AfterBattleText2
SilphCo9TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_SILPH_CO_9F_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_SILPH_CO_9F_TRAINER_2
- dw SilphCo9BattleText3 ; TextBeforeBattle
- dw SilphCo9AfterBattleText3 ; TextAfterBattle
- dw SilphCo9EndBattleText3 ; TextEndBattle
- dw SilphCo9EndBattleText3 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_SILPH_CO_9F_TRAINER_2, 4, SilphCo9BattleText3, SilphCo9EndBattleText3, SilphCo9AfterBattleText3
+ db -1 ; end
SilphCo9Text1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
jr nz, .asm_5d8dc
ld hl, SilphCo9Text_5d8e5
@@ -178,67 +157,67 @@ SilphCo9Text1:
jp TextScriptEnd
SilphCo9Text_5d8e5:
- TX_FAR _SilphCo9Text_5d8e5
- db "@"
+ text_far _SilphCo9Text_5d8e5
+ text_end
SilphCo9Text_5d8ea:
- TX_FAR _SilphCo9Text_5d8ea
- db "@"
+ text_far _SilphCo9Text_5d8ea
+ text_end
SilphCo9Text_5d8ef:
- TX_FAR _SilphCo9Text_5d8ef
- db "@"
+ text_far _SilphCo9Text_5d8ef
+ text_end
SilphCo9Text2:
- TX_ASM
+ text_asm
ld hl, SilphCo9TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo9Text3:
- TX_ASM
+ text_asm
ld hl, SilphCo9TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo9Text4:
- TX_ASM
+ text_asm
ld hl, SilphCo9TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SilphCo9BattleText1:
- TX_FAR _SilphCo9BattleText1
- db "@"
+ text_far _SilphCo9BattleText1
+ text_end
SilphCo9EndBattleText1:
- TX_FAR _SilphCo9EndBattleText1
- db "@"
+ text_far _SilphCo9EndBattleText1
+ text_end
SilphCo9AfterBattleText1:
- TX_FAR _SilphCo9AfterBattleText1
- db "@"
+ text_far _SilphCo9AfterBattleText1
+ text_end
SilphCo9BattleText2:
- TX_FAR _SilphCo9BattleText2
- db "@"
+ text_far _SilphCo9BattleText2
+ text_end
SilphCo9EndBattleText2:
- TX_FAR _SilphCo9EndBattleText2
- db "@"
+ text_far _SilphCo9EndBattleText2
+ text_end
SilphCo9AfterBattleText2:
- TX_FAR _SilphCo9AfterBattleText2
- db "@"
+ text_far _SilphCo9AfterBattleText2
+ text_end
SilphCo9BattleText3:
- TX_FAR _SilphCo9BattleText3
- db "@"
+ text_far _SilphCo9BattleText3
+ text_end
SilphCo9EndBattleText3:
- TX_FAR _SilphCo9EndBattleText3
- db "@"
+ text_far _SilphCo9EndBattleText3
+ text_end
SilphCo9AfterBattleText3:
- TX_FAR _SilphCo9AfterBattleText3
- db "@"
+ text_far _SilphCo9AfterBattleText3
+ text_end
diff --git a/scripts/SilphCoElevator.asm b/scripts/SilphCoElevator.asm
index 49de6b27..c898cbd1 100755
--- a/scripts/SilphCoElevator.asm
+++ b/scripts/SilphCoElevator.asm
@@ -41,7 +41,7 @@ SilphCoElevatorScript_457f1:
ret
SilphCoElevatorFloors:
- db $0B ; num elements in list
+ db 11 ; #
db FLOOR_1F
db FLOOR_2F
db FLOOR_3F
@@ -53,35 +53,34 @@ SilphCoElevatorFloors:
db FLOOR_9F
db FLOOR_10F
db FLOOR_11F
- db $FF ; terminator
+ db -1 ; end
-SilphCoElevatorWarpMaps:
-; first byte is warp number
-; second byte is map number
; These specify where the player goes after getting out of the elevator.
- db $03, SILPH_CO_1F
- db $02, SILPH_CO_2F
- db $02, SILPH_CO_3F
- db $02, SILPH_CO_4F
- db $02, SILPH_CO_5F
- db $02, SILPH_CO_6F
- db $02, SILPH_CO_7F
- db $02, SILPH_CO_8F
- db $02, SILPH_CO_9F
- db $02, SILPH_CO_10F
- db $01, SILPH_CO_11F
+SilphCoElevatorWarpMaps:
+ ; warp number, map id
+ db 3, SILPH_CO_1F
+ db 2, SILPH_CO_2F
+ db 2, SILPH_CO_3F
+ db 2, SILPH_CO_4F
+ db 2, SILPH_CO_5F
+ db 2, SILPH_CO_6F
+ db 2, SILPH_CO_7F
+ db 2, SILPH_CO_8F
+ db 2, SILPH_CO_9F
+ db 2, SILPH_CO_10F
+ db 1, SILPH_CO_11F
SilphCoElevatorWarpMapsEnd:
SilphCoElevatorScript_45827:
call Delay3
- callba ShakeElevator
+ farcall ShakeElevator
ret
SilphCoElevator_TextPointers:
dw SilphCoElevatorText1
SilphCoElevatorText1:
- TX_ASM
+ text_asm
call SilphCoElevatorScript_457f1
ld hl, SilphCoElevatorWarpMaps
predef DisplayElevatorFloorMenu
diff --git a/scripts/TradeCenter.asm b/scripts/TradeCenter.asm
index ddb3061e..dbed79c1 100644
--- a/scripts/TradeCenter.asm
+++ b/scripts/TradeCenter.asm
@@ -1,38 +1,38 @@
TradeCenter_Script:
call EnableAutoTextBoxDrawing
- ld a, [hSerialConnectionStatus]
+ ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
ld a, SPRITE_FACING_LEFT
jr z, .next
ld a, SPRITE_FACING_RIGHT
.next
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
ld a, $1
- ld [H_SPRITEINDEX], a
+ ldh [hSpriteIndex], a
call SetSpriteFacingDirection
ld hl, wd72d
bit 0, [hl]
set 0, [hl]
ret nz
- ld hl, wSpriteStateData2 + $14
- ld a, $8
+ ld hl, wSprite01StateData2MapY
+ ld a, 8 ; y
ld [hli], a
- ld a, $a
+ ld a, 10 ; x
ld [hl], a
ld a, SPRITE_FACING_LEFT
- ld [wSpriteStateData1 + $19], a
- ld a, [hSerialConnectionStatus]
+ ld [wSprite01StateData1FacingDirection], a
+ ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
ret z
- ld a, $7
- ld [wSpriteStateData2 + $15], a
+ ld a, 7 ; x
+ ld [wSprite01StateData2MapX], a
ld a, SPRITE_FACING_RIGHT
- ld [wSpriteStateData1 + $19], a
+ ld [wSprite01StateData1FacingDirection], a
ret
TradeCenter_TextPointers:
dw TradeCenterText1
TradeCenterText1:
- TX_FAR _TradeCenterText1
- db "@"
+ text_far _TradeCenterText1
+ text_end
diff --git a/scripts/UndergroundPathNorthSouth.asm b/scripts/UndergroundPathNorthSouth.asm
index 52b3d8bf..00a7ef90 100755
--- a/scripts/UndergroundPathNorthSouth.asm
+++ b/scripts/UndergroundPathNorthSouth.asm
@@ -2,4 +2,5 @@ UndergroundPathNorthSouth_Script:
jp EnableAutoTextBoxDrawing
UndergroundPathNorthSouth_TextPointers:
- db "@"
+
+ text_end ; unused
diff --git a/scripts/UndergroundPathRoute5.asm b/scripts/UndergroundPathRoute5.asm
index 23d72569..5c078050 100755
--- a/scripts/UndergroundPathRoute5.asm
+++ b/scripts/UndergroundPathRoute5.asm
@@ -3,16 +3,16 @@ UndergroundPathRoute5_Script:
ld [wLastMap], a
ret
-UndergroundPathEntranceRoute5_5d6af:
- db "@"
+UndergroundPathEntranceRoute5_TextScriptEndingText:
+ text_end
UndergroundPathRoute5_TextPointers:
dw UndergroundPathEntranceRoute5Text1
UndergroundPathEntranceRoute5Text1:
- TX_ASM
- ld a, $9
+ text_asm
+ ld a, TRADE_FOR_SPOT
ld [wWhichTrade], a
predef DoInGameTradeDialogue
- ld hl, UndergroundPathEntranceRoute5_5d6af
+ ld hl, UndergroundPathEntranceRoute5_TextScriptEndingText
ret
diff --git a/scripts/UndergroundPathRoute6.asm b/scripts/UndergroundPathRoute6.asm
index 0a690518..e3994e33 100755
--- a/scripts/UndergroundPathRoute6.asm
+++ b/scripts/UndergroundPathRoute6.asm
@@ -7,5 +7,5 @@ UndergroundPathRoute6_TextPointers:
dw UndergroundPathEntranceRoute6Text1
UndergroundPathEntranceRoute6Text1:
- TX_FAR _UndergrdTunnelEntRoute6Text1
- db "@"
+ text_far _UndergrdTunnelEntRoute6Text1
+ text_end
diff --git a/scripts/UndergroundPathRoute7.asm b/scripts/UndergroundPathRoute7.asm
index 3a1f14c7..c311b409 100755
--- a/scripts/UndergroundPathRoute7.asm
+++ b/scripts/UndergroundPathRoute7.asm
@@ -7,5 +7,5 @@ UndergroundPathRoute7_TextPointers:
dw UndergroundPathEntranceRoute7Text1
UndergroundPathEntranceRoute7Text1:
- TX_FAR _UndergroundPathEntRoute7Text1
- db "@"
+ text_far _UndergroundPathEntRoute7Text1
+ text_end
diff --git a/scripts/UndergroundPathRoute7Copy.asm b/scripts/UndergroundPathRoute7Copy.asm
index 8a494caf..2eb74fce 100755
--- a/scripts/UndergroundPathRoute7Copy.asm
+++ b/scripts/UndergroundPathRoute7Copy.asm
@@ -8,17 +8,17 @@ UndergroundPathRoute7Copy_TextPointers:
dw UGPathRoute7EntranceUnusedText_5d77d
UGPathRoute7EntranceUnusedText_5d773:
- TX_FAR _UGPathRoute7EntranceUnusedText_5d773
- db "@"
+ text_far _UGPathRoute7EntranceUnusedText_5d773
+ text_end
UGPathRoute7EntranceUnusedText_5d778:
- TX_FAR _UGPathRoute7EntranceUnusedText_5d778
- db "@"
+ text_far _UGPathRoute7EntranceUnusedText_5d778
+ text_end
UGPathRoute7EntranceUnusedText_5d77d:
- TX_FAR _UGPathRoute7EntranceUnusedText_5d77d
- db "@"
+ text_far _UGPathRoute7EntranceUnusedText_5d77d
+ text_end
UGPathRoute7EntranceUnusedText_5d782:
- TX_FAR _UGPathRoute7EntranceUnusedText_5d782
- db "@"
+ text_far _UGPathRoute7EntranceUnusedText_5d782
+ text_end
diff --git a/scripts/UndergroundPathRoute8.asm b/scripts/UndergroundPathRoute8.asm
index ab0a9977..6eab58c2 100755
--- a/scripts/UndergroundPathRoute8.asm
+++ b/scripts/UndergroundPathRoute8.asm
@@ -7,5 +7,5 @@ UndergroundPathRoute8_TextPointers:
dw UndergroundPathEntranceRoute8Text1
UndergroundPathEntranceRoute8Text1:
- TX_FAR _UndergroundPathEntRoute8Text1
- db "@"
+ text_far _UndergroundPathEntRoute8Text1
+ text_end
diff --git a/scripts/UndergroundPathWestEast.asm b/scripts/UndergroundPathWestEast.asm
index cb1a7bd8..98571e17 100755
--- a/scripts/UndergroundPathWestEast.asm
+++ b/scripts/UndergroundPathWestEast.asm
@@ -2,4 +2,5 @@ UndergroundPathWestEast_Script:
jp EnableAutoTextBoxDrawing
UndergroundPathWestEast_TextPointers:
- db "@"
+
+ text_end ; unused
diff --git a/scripts/VermilionCity.asm b/scripts/VermilionCity.asm
index a9336970..8a93b6da 100755
--- a/scripts/VermilionCity.asm
+++ b/scripts/VermilionCity.asm
@@ -27,9 +27,9 @@ VermilionCity_Script:
.setFirstLockTrashCanIndex
call Random
- ld a, [hRandomAdd]
+ ldh a, [hRandomAdd]
ld b, a
- ld a, [hRandomSub]
+ ldh a, [hRandomSub]
adc b
and $e
ld [wFirstLockTrashCanIndex], a
@@ -60,10 +60,10 @@ VermilionCityScript0:
call ArePlayerCoordsInArray
jr nc, .return
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld [wcf0d], a
ld a, $3
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
CheckEvent EVENT_SS_ANNE_LEFT
jr nz, .shipHasDeparted
@@ -86,8 +86,8 @@ VermilionCityScript0:
ret
SSAnneTicketCheckCoords:
- db $1e,$12 ; y, x
- db $ff
+ dbmapcoord 18, 30
+ db -1 ; end
VermilionCityScript4:
ld hl, SSAnneTicketCheckCoords
@@ -116,7 +116,7 @@ VermilionCityScript3:
ret nz
xor a
ld [wJoyIgnore], a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $0
ld [wVermilionCityCurScript], a
ret
@@ -148,11 +148,11 @@ VermilionCity_TextPointers:
dw VermilionCityText14
VermilionCityText1:
- TX_FAR _VermilionCityText1
- db "@"
+ text_far _VermilionCityText1
+ text_end
VermilionCityText2:
- TX_ASM
+ text_asm
CheckEvent EVENT_SS_ANNE_LEFT
jr nz, .shipHasDeparted
ld hl, VermilionCityTextDidYouSee
@@ -165,15 +165,15 @@ VermilionCityText2:
jp TextScriptEnd
VermilionCityTextDidYouSee:
- TX_FAR _VermilionCityTextDidYouSee
- db "@"
+ text_far _VermilionCityTextDidYouSee
+ text_end
VermilionCityTextSSAnneDeparted:
- TX_FAR _VermilionCityTextSSAnneDeparted
- db "@"
+ text_far _VermilionCityTextSSAnneDeparted
+ text_end
VermilionCityText3:
- TX_ASM
+ text_asm
CheckEvent EVENT_SS_ANNE_LEFT
jr nz, .shipHasDeparted
ld a, [wSpritePlayerStateData1FacingDirection]
@@ -210,37 +210,37 @@ VermilionCityText3:
jp TextScriptEnd
.inFrontOfOrBehindGuardCoords
- db $1d,$13 ; y, x of tile in front of guard
- db $1f,$13 ; y, x of tile behind guard
- db $ff
+ dbmapcoord 19, 29 ; in front of guard
+ dbmapcoord 19, 31 ; behind guard
+ db -1 ; end
SSAnneWelcomeText4:
- TX_FAR _SSAnneWelcomeText4
- db "@"
+ text_far _SSAnneWelcomeText4
+ text_end
SSAnneWelcomeText9:
- TX_FAR _SSAnneWelcomeText9
- db "@"
+ text_far _SSAnneWelcomeText9
+ text_end
SSAnneFlashedTicketText:
- TX_FAR _SSAnneFlashedTicketText
- db "@"
+ text_far _SSAnneFlashedTicketText
+ text_end
SSAnneNoTicketText:
- TX_FAR _SSAnneNoTicketText
- db "@"
+ text_far _SSAnneNoTicketText
+ text_end
SSAnneNotHereText:
- TX_FAR _SSAnneNotHereText
- db "@"
+ text_far _SSAnneNotHereText
+ text_end
VermilionCityText4:
- TX_FAR _VermilionCityText4
- db "@"
+ text_far _VermilionCityText4
+ text_end
VermilionCityText5:
- TX_FAR _VermilionCityText5
- TX_ASM
+ text_far _VermilionCityText5
+ text_asm
ld a, MACHOP
call PlayCry
call WaitForSoundToFinish
@@ -248,39 +248,39 @@ VermilionCityText5:
ret
VermilionCityText15:
- TX_FAR _VermilionCityText15
- db "@"
+ text_far _VermilionCityText15
+ text_end
VermilionCityText6:
- TX_FAR _VermilionCityText6
- db "@"
+ text_far _VermilionCityText6
+ text_end
VermilionCityText8:
- TX_ASM
- callba Func_f1a8a
+ text_asm
+ farcall Func_f1a8a
jp TextScriptEnd
VermilionCityText9:
- TX_ASM
- callba Func_f1a96
+ text_asm
+ farcall Func_f1a96
jp TextScriptEnd
VermilionCityText12:
- TX_ASM
- callba Func_f1aa2
+ text_asm
+ farcall Func_f1aa2
jp TextScriptEnd
VermilionCityText13:
- TX_ASM
- callba Func_f1aae
+ text_asm
+ farcall Func_f1aae
jp TextScriptEnd
VermilionCityText14:
- TX_ASM
- callba Func_f1aba
+ text_asm
+ farcall Func_f1aba
jp TextScriptEnd
VermilionCityText7:
- TX_ASM
- callba Func_f1a0f
+ text_asm
+ farcall Func_f1a0f
jp TextScriptEnd
diff --git a/scripts/VermilionCity2.asm b/scripts/VermilionCity2.asm
index eb7ea37a..93aa8df5 100755
--- a/scripts/VermilionCity2.asm
+++ b/scripts/VermilionCity2.asm
@@ -1,4 +1,4 @@
-Func_f1a0f:
+Func_f1a0f::
CheckEvent EVENT_GOT_SQUIRTLE_FROM_OFFICER_JENNY
jr nz, .asm_f1a69
ld a, [wBeatGymFlags]
@@ -45,67 +45,67 @@ Func_f1a0f:
ret
OfficerJennyText1:
- TX_FAR _OfficerJennyText1
- db "@"
+ text_far _OfficerJennyText1
+ text_end
OfficerJennyText2:
- TX_FAR _OfficerJennyText2
- db "@"
+ text_far _OfficerJennyText2
+ text_end
OfficerJennyText3:
- TX_FAR _OfficerJennyText3
- db $d
- db "@"
+ text_far _OfficerJennyText3
+ text_waitbutton
+ text_end
OfficerJennyText4:
- TX_FAR _OfficerJennyText4
- db "@"
+ text_far _OfficerJennyText4
+ text_end
OfficerJennyText5:
- TX_FAR _OfficerJennyText5
- db "@"
+ text_far _OfficerJennyText5
+ text_end
-Func_f1a8a:
+Func_f1a8a::
ld hl, VermilionCityText_f1a91
call PrintText
ret
VermilionCityText_f1a91:
- TX_FAR _VermilionCityText8
- db "@"
+ text_far _VermilionCityText8
+ text_end
-Func_f1a96:
+Func_f1a96::
ld hl, VermilionCityText_f1a9d
call PrintText
ret
VermilionCityText_f1a9d:
- TX_FAR _VermilionCityText9
- db "@"
+ text_far _VermilionCityText9
+ text_end
-Func_f1aa2:
+Func_f1aa2::
ld hl, VermilionCityText_f1aa9
call PrintText
ret
VermilionCityText_f1aa9:
- TX_FAR _VermilionCityText12
- db "@"
+ text_far _VermilionCityText12
+ text_end
-Func_f1aae:
+Func_f1aae::
ld hl, VermilionCityText_f1ab5
call PrintText
ret
VermilionCityText_f1ab5:
- TX_FAR _VermilionCityText13
- db "@"
+ text_far _VermilionCityText13
+ text_end
-Func_f1aba:
+Func_f1aba::
ld hl, VermilionCityText_f1ac1
call PrintText
ret
VermilionCityText_f1ac1:
- TX_FAR _VermilionCityText14
- db "@"
+ text_far _VermilionCityText14
+ text_end
diff --git a/scripts/VermilionDock.asm b/scripts/VermilionDock.asm
index f5807dd4..0263669f 100755
--- a/scripts/VermilionDock.asm
+++ b/scripts/VermilionDock.asm
@@ -21,7 +21,7 @@ VermilionDock_Script:
ld a, $3
ld [wSimulatedJoypadStatesIndex], a
xor a
- ld [wSpriteStateData2 + $06], a
+ ld [wSpritePlayerStateData2MovementByte1], a
ld [wOverrideSimulatedJoypadStatesMask], a
dec a
ld [wJoyIgnore], a
@@ -44,24 +44,24 @@ VermilionDock_1db9b:
ld c, BANK(Music_Surfing)
ld a, MUSIC_SURFING
call PlayMusic
- callba LoadSmokeTileFourTimes
+ farcall LoadSmokeTileFourTimes
xor a
- ld [wSpriteStateData1 + 2], a
+ ld [wSpritePlayerStateData1ImageIndex], a
ld c, 120
call DelayFrames
ld b, $9c
call CopyScreenTileBufferToVRAM
- coord hl, 0, 10
+ hlcoord 0, 10
ld bc, SCREEN_WIDTH * 6
ld a, $14 ; water tile
call FillMemory
ld a, 1
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
call Delay3
xor a
- ld [H_AUTOBGTRANSFERENABLED], a
+ ldh [hAutoBGTransferEnabled], a
ld [wSSAnneSmokeDriftAmount], a
- ld [rOBP1], a
+ ldh [rOBP1], a
call UpdateGBCPal_OBP1
ld a, 88
ld [wSSAnneSmokeX], a
@@ -78,7 +78,7 @@ VermilionDock_1db9b:
ld d, $0
ld e, $8
.asm_1dbfa
- ld hl, $0002
+ ld hl, $2
add hl, bc
ld a, l
ld [wMapViewVRAMPointer], a
@@ -104,11 +104,11 @@ VermilionDock_1db9b:
dec e
jr nz, .asm_1dbfa
xor a
- ld [rWY], a
- ld [hWY], a
+ ldh [rWY], a
+ ldh [hWY], a
call VermilionDock_EraseSSAnne
ld a, $90
- ld [hWY], a
+ ldh [hWY], a
ld a, $1
ld [wUpdateSpritesEnabled], a
pop hl
@@ -155,6 +155,7 @@ VermilionDock_EmitSmokePuff:
ret
VermilionDockOAMBlock:
+ ; tile id, attribute
db $fc, $10
db $fd, $10
db $fe, $10
@@ -167,13 +168,13 @@ VermilionDock_1dc7c:
ld h, $0
ld l, $80
.asm_1dc86
- ld a, [rLY]
+ ldh a, [rLY]
cp l
jr nz, .asm_1dc86
ld a, h
- ld [rSCX], a
+ ldh [rSCX], a
.asm_1dc8e
- ld a, [rLY]
+ ldh a, [rLY]
cp h
jr z, .asm_1dc8e
ret
@@ -184,7 +185,7 @@ VermilionDock_EraseSSAnne:
ld bc, (5 * BG_MAP_WIDTH) + SCREEN_WIDTH
ld a, $14 ; water tile
call FillMemory
- ld hl, vBGMap0 + 10 * BG_MAP_WIDTH
+ hlbgcoord 0, 10
ld de, wVermilionDockTileMapBuffer
ld bc, (6 * BG_MAP_WIDTH) / 16
call CopyVideoData
@@ -194,7 +195,7 @@ VermilionDock_EraseSSAnne:
; 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
+ hlowcoord 5, 2, VERMILION_DOCK_WIDTH
ld a, $d ; water block
ld [hli], a
ld [hli], a
@@ -211,5 +212,5 @@ VermilionDock_TextPointers:
dw VermilionDockText1
VermilionDockText1:
- TX_FAR _VermilionDockText1
- db "@"
+ text_far _VermilionDockText1
+ text_end
diff --git a/scripts/VermilionGym.asm b/scripts/VermilionGym.asm
index 0af37945..7343f37f 100755
--- a/scripts/VermilionGym.asm
+++ b/scripts/VermilionGym.asm
@@ -3,7 +3,7 @@ VermilionGym_Script:
bit 5, [hl]
res 5, [hl]
push hl
- call nz, VermilionGymLoadName
+ call nz, .LoadNames
pop hl
bit 6, [hl]
res 6, [hl]
@@ -16,15 +16,15 @@ VermilionGym_Script:
ld [wVermilionGymCurScript], a
ret
-VermilionGymLoadName:
- ld hl, Gym3CityName
- ld de, Gym3LeaderName
+.LoadNames:
+ ld hl, .CityName
+ ld de, .LeaderName
jp LoadGymLeaderAndCityName
-Gym3CityName:
+.CityName:
db "VERMILION CITY@"
-Gym3LeaderName:
+.LeaderName:
db "LT.SURGE@"
VermilionGymSetDoorTile:
@@ -63,26 +63,26 @@ VermilionGymLTSurgePostBattle:
VermilionGymReceiveTM24:
ld a, $6
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_LT_SURGE
- lb bc, TM_24, 1
+ lb bc, TM_THUNDERBOLT, 1
call GiveItem
jr nc, .BagFull
ld a, $7
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM24
jr .gymVictory
.BagFull
ld a, $8
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
ld hl, wObtainedBadges
- set 2, [hl]
+ set BIT_THUNDERBADGE, [hl]
ld hl, wBeatGymFlags
- set 2, [hl]
+ set BIT_THUNDERBADGE, [hl]
; deactivate gym trainers
SetEventRange EVENT_BEAT_VERMILION_GYM_TRAINER_0, EVENT_BEAT_VERMILION_GYM_TRAINER_2
@@ -100,36 +100,15 @@ VermilionGym_TextPointers:
dw TM24NoRoomText
VermilionGymTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_VERMILION_GYM_TRAINER_0
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VERMILION_GYM_TRAINER_0
- dw VermilionGymBattleText1 ; TextBeforeBattle
- dw VermilionGymAfterBattleText1 ; TextAfterBattle
- dw VermilionGymEndBattleText1 ; TextEndBattle
- dw VermilionGymEndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_VERMILION_GYM_TRAINER_0, 3, VermilionGymBattleText1, VermilionGymEndBattleText1, VermilionGymAfterBattleText1
VermilionGymTrainerHeader1:
- dbEventFlagBit EVENT_BEAT_VERMILION_GYM_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VERMILION_GYM_TRAINER_1
- dw VermilionGymBattleText2 ; TextBeforeBattle
- dw VermilionGymAfterBattleText2 ; TextAfterBattle
- dw VermilionGymEndBattleText2 ; TextEndBattle
- dw VermilionGymEndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_VERMILION_GYM_TRAINER_1, 2, VermilionGymBattleText2, VermilionGymEndBattleText2, VermilionGymAfterBattleText2
VermilionGymTrainerHeader2:
- dbEventFlagBit EVENT_BEAT_VERMILION_GYM_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VERMILION_GYM_TRAINER_2
- dw VermilionGymBattleText3 ; TextBeforeBattle
- dw VermilionGymAfterBattleText3 ; TextAfterBattle
- dw VermilionGymEndBattleText3 ; TextEndBattle
- dw VermilionGymEndBattleText3 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_VERMILION_GYM_TRAINER_2, 3, VermilionGymBattleText3, VermilionGymEndBattleText3, VermilionGymAfterBattleText3
+ db -1 ; end
LTSurgeText:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_LT_SURGE
jr z, .beforeBeat
CheckEventReuseA EVENT_GOT_TM24
@@ -150,14 +129,14 @@ LTSurgeText:
ld hl, ReceivedThunderbadgeText
ld de, ReceivedThunderbadgeText
call SaveEndBattleTextPointers
- ld a, [H_SPRITEINDEX]
+ ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $3
ld [wGymLeaderNo], a
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $3 ; set script index to LT Surge post-battle script
ld [wVermilionGymCurScript], a
ld [wCurMapScript], a
@@ -165,89 +144,89 @@ LTSurgeText:
jp TextScriptEnd
LTSurgePreBattleText:
- TX_FAR _LTSurgePreBattleText
- db "@"
+ text_far _LTSurgePreBattleText
+ text_end
LTSurgePostBattleAdviceText:
- TX_FAR _LTSurgePostBattleAdviceText
- db "@"
+ text_far _LTSurgePostBattleAdviceText
+ text_end
LTSurgeThunderbadgeInfoText:
- TX_FAR _LTSurgeThunderbadgeInfoText
- db "@"
+ text_far _LTSurgeThunderbadgeInfoText
+ text_end
ReceivedTM24Text:
- TX_FAR _ReceivedTM24Text
- TX_SFX_KEY_ITEM
- TX_FAR _TM24ExplanationText
- db "@"
+ text_far _ReceivedTM24Text
+ sound_get_key_item
+ text_far _TM24ExplanationText
+ text_end
TM24NoRoomText:
- TX_FAR _TM24NoRoomText
- db "@"
+ text_far _TM24NoRoomText
+ text_end
ReceivedThunderbadgeText:
- TX_FAR _ReceivedThunderbadgeText
- db "@"
+ text_far _ReceivedThunderbadgeText
+ text_end
VermilionGymTrainerText1:
- TX_ASM
+ text_asm
ld hl, VermilionGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
VermilionGymBattleText1:
- TX_FAR _VermilionGymBattleText1
- db "@"
+ text_far _VermilionGymBattleText1
+ text_end
VermilionGymEndBattleText1:
- TX_FAR _VermilionGymEndBattleText1
- db "@"
+ text_far _VermilionGymEndBattleText1
+ text_end
VermilionGymAfterBattleText1:
- TX_FAR _VermilionGymAfterBattleText1
- db "@"
+ text_far _VermilionGymAfterBattleText1
+ text_end
VermilionGymTrainerText2:
- TX_ASM
+ text_asm
ld hl, VermilionGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
VermilionGymBattleText2:
- TX_FAR _VermilionGymBattleText2
- db "@"
+ text_far _VermilionGymBattleText2
+ text_end
VermilionGymEndBattleText2:
- TX_FAR _VermilionGymEndBattleText2
- db "@"
+ text_far _VermilionGymEndBattleText2
+ text_end
VermilionGymAfterBattleText2:
- TX_FAR _VermilionGymAfterBattleText2
- db "@"
+ text_far _VermilionGymAfterBattleText2
+ text_end
VermilionGymTrainerText3:
- TX_ASM
+ text_asm
ld hl, VermilionGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
VermilionGymBattleText3:
- TX_FAR _VermilionGymBattleText3
- db "@"
+ text_far _VermilionGymBattleText3
+ text_end
VermilionGymEndBattleText3:
- TX_FAR _VermilionGymEndBattleText3
- db "@"
+ text_far _VermilionGymEndBattleText3
+ text_end
VermilionGymAfterBattleText3:
- TX_FAR _VermilionGymAfterBattleText3
- db "@"
+ text_far _VermilionGymAfterBattleText3
+ text_end
VermilionGymFanText:
- TX_ASM
+ text_asm
ld a, [wBeatGymFlags]
- bit 2, a
+ bit BIT_THUNDERBADGE, a
jr nz, .afterBeat
ld hl, VermilionGymFanPreBattleText
call PrintText
@@ -259,9 +238,9 @@ VermilionGymFanText:
jp TextScriptEnd
VermilionGymFanPreBattleText:
- TX_FAR _VermilionGymFanPreBattleText
- db "@"
+ text_far _VermilionGymFanPreBattleText
+ text_end
VermilionGymFanPostBattleText:
- TX_FAR _VermilionGymFanPostBattleText
- db "@"
+ text_far _VermilionGymFanPostBattleText
+ text_end
diff --git a/scripts/VermilionMart.asm b/scripts/VermilionMart.asm
index 00ba0c26..88a632c8 100755
--- a/scripts/VermilionMart.asm
+++ b/scripts/VermilionMart.asm
@@ -7,9 +7,9 @@ VermilionMart_TextPointers:
dw VermilionMartText3
VermilionMartText2:
- TX_FAR _VermilionMartText2
- db "@"
+ text_far _VermilionMartText2
+ text_end
VermilionMartText3:
- TX_FAR _VermilionMartText3
- db "@"
+ text_far _VermilionMartText3
+ text_end
diff --git a/scripts/VermilionOldRodHouse.asm b/scripts/VermilionOldRodHouse.asm
index 772158ff..524395d4 100755
--- a/scripts/VermilionOldRodHouse.asm
+++ b/scripts/VermilionOldRodHouse.asm
@@ -5,53 +5,53 @@ VermilionOldRodHouse_TextPointers:
dw VermilionHouse2Text1
VermilionHouse2Text1:
- TX_ASM
+ text_asm
ld a, [wd728]
- bit 3, a
- jr nz, .asm_03ef5
+ bit 3, a ; got old rod?
+ jr nz, .got_item
ld hl, VermilionHouse2Text_560b1
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_eb1b7
+ jr nz, .refused
lb bc, OLD_ROD, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, wd728
- set 3, [hl]
+ set 3, [hl] ; got old rod
ld hl, VermilionHouse2Text_560b6
- jr .asm_5dd95
-.BagFull
+ jr .done
+.bag_full
ld hl, VermilionHouse2Text_560ca
- jr .asm_5dd95
-.asm_eb1b7
+ jr .done
+.refused
ld hl, VermilionHouse2Text_560c0
- jr .asm_5dd95
-.asm_03ef5
+ jr .done
+.got_item
ld hl, VermilionHouse2Text_560c5
-.asm_5dd95
+.done
call PrintText
jp TextScriptEnd
VermilionHouse2Text_560b1:
- TX_FAR _VermilionHouse2Text_560b1
- db "@"
+ text_far _VermilionHouse2Text_560b1
+ text_end
VermilionHouse2Text_560b6:
- TX_FAR _VermilionHouse2Text_560b6
- TX_SFX_ITEM_1
- TX_FAR _VermilionHouse2Text_560bb
- db "@"
+ text_far _VermilionHouse2Text_560b6
+ sound_get_item_1
+ text_far _VermilionHouse2Text_560bb
+ text_end
VermilionHouse2Text_560c0:
- TX_FAR _VermilionHouse2Text_560c0
- db "@"
+ text_far _VermilionHouse2Text_560c0
+ text_end
VermilionHouse2Text_560c5:
- TX_FAR _VermilionHouse2Text_560c5
- db "@"
+ text_far _VermilionHouse2Text_560c5
+ text_end
VermilionHouse2Text_560ca:
- TX_FAR _VermilionHouse2Text_560ca
- db "@"
+ text_far _VermilionHouse2Text_560ca
+ text_end
diff --git a/scripts/VermilionPidgeyHouse.asm b/scripts/VermilionPidgeyHouse.asm
index 5004d367..fef476d5 100755
--- a/scripts/VermilionPidgeyHouse.asm
+++ b/scripts/VermilionPidgeyHouse.asm
@@ -8,17 +8,17 @@ VermilionPidgeyHouse_TextPointers:
dw VermilionHouse1Text3
VermilionHouse1Text1:
- TX_FAR _VermilionHouse1Text1
- db "@"
+ text_far _VermilionHouse1Text1
+ text_end
VermilionHouse1Text2:
- TX_FAR _VermilionHouse1Text2
- TX_ASM
+ text_far _VermilionHouse1Text2
+ text_asm
ld a, PIDGEY
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
VermilionHouse1Text3:
- TX_FAR _VermilionHouse1Text3
- db "@"
+ text_far _VermilionHouse1Text3
+ text_end
diff --git a/scripts/VermilionPokecenter.asm b/scripts/VermilionPokecenter.asm
index e470b028..dd3b514e 100755
--- a/scripts/VermilionPokecenter.asm
+++ b/scripts/VermilionPokecenter.asm
@@ -10,20 +10,20 @@ VermilionPokecenter_TextPointers:
dw VermilionPokecenterText5
VermilionHealNurseText:
- TX_POKECENTER_NURSE
+ script_pokecenter_nurse
VermilionPokecenterText2:
- TX_FAR _VermilionPokecenterText2
- db "@"
+ text_far _VermilionPokecenterText2
+ text_end
VermilionPokecenterText3:
- TX_FAR _VermilionPokecenterText3
- db "@"
+ text_far _VermilionPokecenterText3
+ text_end
VermilionTradeNurseText:
- TX_CABLE_CLUB_RECEPTIONIST
+ script_cable_club_receptionist
VermilionPokecenterText5:
- TX_ASM
- callab PokecenterChanseyText
+ text_asm
+ callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/VermilionTradeHouse.asm b/scripts/VermilionTradeHouse.asm
index 7f720364..6cdd849a 100755
--- a/scripts/VermilionTradeHouse.asm
+++ b/scripts/VermilionTradeHouse.asm
@@ -5,5 +5,5 @@ VermilionTradeHouse_TextPointers:
dw VermilionHouse3Text1
VermilionHouse3Text1:
- TX_FAR TeachingHMsText
- db "@"
+ text_far TeachingHMsText
+ text_end
diff --git a/scripts/VictoryRoad1F.asm b/scripts/VictoryRoad1F.asm
index 07f203b1..9d566e6f 100755
--- a/scripts/VictoryRoad1F.asm
+++ b/scripts/VictoryRoad1F.asm
@@ -29,7 +29,7 @@ VictoryRoad1Script0:
ld hl, CoordsData_5da5c
call CheckBoulderCoords
jp nc, CheckFightingMapTrainers
- ld a, [H_SPRITEINDEX]
+ ldh a, [hSpriteIndex]
cp $f
jp z, CheckFightingMapTrainers
ld hl, wCurrentMapScriptFlags
@@ -38,7 +38,8 @@ VictoryRoad1Script0:
ret
CoordsData_5da5c:
- db $0D,$11,$FF
+ dbmapcoord 17, 13
+ db -1 ; end
VictoryRoad1F_TextPointers:
dw VictoryRoad1Text1
@@ -50,57 +51,43 @@ VictoryRoad1F_TextPointers:
dw BoulderText
VictoryRoad1TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0
- dw VictoryRoad1BattleText1 ; TextBeforeBattle
- dw VictoryRoad1AfterBattleText1 ; TextAfterBattle
- dw VictoryRoad1EndBattleText1 ; TextEndBattle
- dw VictoryRoad1EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0, 2, VictoryRoad1BattleText1, VictoryRoad1EndBattleText1, VictoryRoad1AfterBattleText1
VictoryRoad1TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1
- dw VictoryRoad1BattleText2 ; TextBeforeBattle
- dw VictoryRoad1AfterBattleText2 ; TextAfterBattle
- dw VictoryRoad1EndBattleText2 ; TextEndBattle
- dw VictoryRoad1EndBattleText2 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1, 2, VictoryRoad1BattleText2, VictoryRoad1EndBattleText2, VictoryRoad1AfterBattleText2
+ db -1 ; end
VictoryRoad1Text1:
- TX_ASM
+ text_asm
ld hl, VictoryRoad1TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
VictoryRoad1Text2:
- TX_ASM
+ text_asm
ld hl, VictoryRoad1TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
VictoryRoad1BattleText1:
- TX_FAR _VictoryRoad1BattleText1
- db "@"
+ text_far _VictoryRoad1BattleText1
+ text_end
VictoryRoad1EndBattleText1:
- TX_FAR _VictoryRoad1EndBattleText1
- db "@"
+ text_far _VictoryRoad1EndBattleText1
+ text_end
VictoryRoad1AfterBattleText1:
- TX_FAR _VictoryRoad1AfterBattleText1
- db "@"
+ text_far _VictoryRoad1AfterBattleText1
+ text_end
VictoryRoad1BattleText2:
- TX_FAR _VictoryRoad1BattleText2
- db "@"
+ text_far _VictoryRoad1BattleText2
+ text_end
VictoryRoad1EndBattleText2:
- TX_FAR _VictoryRoad1EndBattleText2
- db "@"
+ text_far _VictoryRoad1EndBattleText2
+ text_end
VictoryRoad1AfterBattleText2:
- TX_FAR _VictoryRoad1AfterBattleText2
- db "@"
+ text_far _VictoryRoad1AfterBattleText2
+ text_end
diff --git a/scripts/VictoryRoad2F.asm b/scripts/VictoryRoad2F.asm
index a09e6f04..e5255674 100755
--- a/scripts/VictoryRoad2F.asm
+++ b/scripts/VictoryRoad2F.asm
@@ -44,7 +44,7 @@ VictoryRoad2Script0:
ld hl, CoordsData_51816
call CheckBoulderCoords
jp nc, CheckFightingMapTrainers
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
cp $f
jp z, CheckFightingMapTrainers
EventFlagAddress hl, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
@@ -65,9 +65,9 @@ VictoryRoad2Script0:
ret
CoordsData_51816:
- db $10,$01
- db $10,$09
- db $FF
+ dbmapcoord 1, 16
+ dbmapcoord 9, 16
+ db -1 ; end
VictoryRoad2F_TextPointers:
dw VictoryRoad2Text1
@@ -85,161 +85,119 @@ VictoryRoad2F_TextPointers:
dw BoulderText
VictoryRoad2TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0
- dw VictoryRoad2BattleText1 ; TextBeforeBattle
- dw VictoryRoad2AfterBattleText1 ; TextAfterBattle
- dw VictoryRoad2EndBattleText1 ; TextEndBattle
- dw VictoryRoad2EndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0, 4, VictoryRoad2BattleText1, VictoryRoad2EndBattleText1, VictoryRoad2AfterBattleText1
VictoryRoad2TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1
- dw VictoryRoad2BattleText2 ; TextBeforeBattle
- dw VictoryRoad2AfterBattleText2 ; TextAfterBattle
- dw VictoryRoad2EndBattleText2 ; TextEndBattle
- dw VictoryRoad2EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1, 3, VictoryRoad2BattleText2, VictoryRoad2EndBattleText2, VictoryRoad2AfterBattleText2
VictoryRoad2TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2
- dw VictoryRoad2BattleText3 ; TextBeforeBattle
- dw VictoryRoad2AfterBattleText3 ; TextAfterBattle
- dw VictoryRoad2EndBattleText3 ; TextEndBattle
- dw VictoryRoad2EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2, 3, VictoryRoad2BattleText3, VictoryRoad2EndBattleText3, VictoryRoad2AfterBattleText3
VictoryRoad2TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3
- db ($1 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3
- dw VictoryRoad2BattleText4 ; TextBeforeBattle
- dw VictoryRoad2AfterBattleText4 ; TextAfterBattle
- dw VictoryRoad2EndBattleText4 ; TextEndBattle
- dw VictoryRoad2EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3, 1, VictoryRoad2BattleText4, VictoryRoad2EndBattleText4, VictoryRoad2AfterBattleText4
VictoryRoad2TrainerHeader4:
- dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4
- dw VictoryRoad2BattleText5 ; TextBeforeBattle
- dw VictoryRoad2AfterBattleText5 ; TextAfterBattle
- dw VictoryRoad2EndBattleText5 ; TextEndBattle
- dw VictoryRoad2EndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4, 3, VictoryRoad2BattleText5, VictoryRoad2EndBattleText5, VictoryRoad2AfterBattleText5
MoltresTrainerHeader:
- dbEventFlagBit EVENT_BEAT_MOLTRES
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_MOLTRES
- dw MoltresBattleText ; TextBeforeBattle
- dw MoltresBattleText ; TextAfterBattle
- dw MoltresBattleText ; TextEndBattle
- dw MoltresBattleText ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_MOLTRES, 0, MoltresBattleText, MoltresBattleText, MoltresBattleText
+ db -1 ; end
VictoryRoad2Text1:
- TX_ASM
+ text_asm
ld hl, VictoryRoad2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
VictoryRoad2Text2:
- TX_ASM
+ text_asm
ld hl, VictoryRoad2TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
VictoryRoad2Text3:
- TX_ASM
+ text_asm
ld hl, VictoryRoad2TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
VictoryRoad2Text4:
- TX_ASM
+ text_asm
ld hl, VictoryRoad2TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
VictoryRoad2Text5:
- TX_ASM
+ text_asm
ld hl, VictoryRoad2TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
MoltresText:
- TX_ASM
+ text_asm
ld hl, MoltresTrainerHeader
call TalkToTrainer
jp TextScriptEnd
MoltresBattleText:
- TX_FAR _MoltresBattleText
- TX_ASM
+ text_far _MoltresBattleText
+ text_asm
ld a, MOLTRES
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
VictoryRoad2BattleText1:
- TX_FAR _VictoryRoad2BattleText1
- db "@"
+ text_far _VictoryRoad2BattleText1
+ text_end
VictoryRoad2EndBattleText1:
- TX_FAR _VictoryRoad2EndBattleText1
- db "@"
+ text_far _VictoryRoad2EndBattleText1
+ text_end
VictoryRoad2AfterBattleText1:
- TX_FAR _VictoryRoad2AfterBattleText1
- db "@"
+ text_far _VictoryRoad2AfterBattleText1
+ text_end
VictoryRoad2BattleText2:
- TX_FAR _VictoryRoad2BattleText2
- db "@"
+ text_far _VictoryRoad2BattleText2
+ text_end
VictoryRoad2EndBattleText2:
- TX_FAR _VictoryRoad2EndBattleText2
- db "@"
+ text_far _VictoryRoad2EndBattleText2
+ text_end
VictoryRoad2AfterBattleText2:
- TX_FAR _VictoryRoad2AfterBattleText2
- db "@"
+ text_far _VictoryRoad2AfterBattleText2
+ text_end
VictoryRoad2BattleText3:
- TX_FAR _VictoryRoad2BattleText3
- db "@"
+ text_far _VictoryRoad2BattleText3
+ text_end
VictoryRoad2EndBattleText3:
- TX_FAR _VictoryRoad2EndBattleText3
- db "@"
+ text_far _VictoryRoad2EndBattleText3
+ text_end
VictoryRoad2AfterBattleText3:
- TX_FAR _VictoryRoad2AfterBattleText3
- db "@"
+ text_far _VictoryRoad2AfterBattleText3
+ text_end
VictoryRoad2BattleText4:
- TX_FAR _VictoryRoad2BattleText4
- db "@"
+ text_far _VictoryRoad2BattleText4
+ text_end
VictoryRoad2EndBattleText4:
- TX_FAR _VictoryRoad2EndBattleText4
- db "@"
+ text_far _VictoryRoad2EndBattleText4
+ text_end
VictoryRoad2AfterBattleText4:
- TX_FAR _VictoryRoad2AfterBattleText4
- db "@"
+ text_far _VictoryRoad2AfterBattleText4
+ text_end
VictoryRoad2BattleText5:
- TX_FAR _VictoryRoad2BattleText5
- db "@"
+ text_far _VictoryRoad2BattleText5
+ text_end
VictoryRoad2EndBattleText5:
- TX_FAR _VictoryRoad2EndBattleText5
- db "@"
+ text_far _VictoryRoad2EndBattleText5
+ text_end
VictoryRoad2AfterBattleText5:
- TX_FAR _VictoryRoad2AfterBattleText5
- db "@"
+ text_far _VictoryRoad2AfterBattleText5
+ text_end
diff --git a/scripts/VictoryRoad3F.asm b/scripts/VictoryRoad3F.asm
index dc7a2aac..f63a71e5 100755
--- a/scripts/VictoryRoad3F.asm
+++ b/scripts/VictoryRoad3F.asm
@@ -36,7 +36,7 @@ VictoryRoad3Script0:
ld a, [wCoordIndex]
cp $1
jr nz, .asm_449dc
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
cp $f ; Pikachu
jp z, .asm_449fe
ld hl, wCurrentMapScriptFlags
@@ -54,9 +54,9 @@ VictoryRoad3Script0:
predef_jump ShowObject
.coordsData_449f9:
- db $05,$03
- db $0F,$17
- db $FF
+ dbmapcoord 3, 5
+ dbmapcoord 23, 15
+ db -1 ; end
.asm_449fe
ld a, VICTORY_ROAD_2F
@@ -90,111 +90,83 @@ VictoryRoad3F_TextPointers:
dw BoulderText
VictoryRoad3TrainerHeader0:
- dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0
- db ($1 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0
- dw VictoryRoad3BattleText2 ; TextBeforeBattle
- dw VictoryRoad3AfterBattleText2 ; TextAfterBattle
- dw VictoryRoad3EndBattleText2 ; TextEndBattle
- dw VictoryRoad3EndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0, 1, VictoryRoad3BattleText2, VictoryRoad3EndBattleText2, VictoryRoad3AfterBattleText2
VictoryRoad3TrainerHeader1:
- dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1
- dw VictoryRoad3BattleText3 ; TextBeforeBattle
- dw VictoryRoad3AfterBattleText3 ; TextAfterBattle
- dw VictoryRoad3EndBattleText3 ; TextEndBattle
- dw VictoryRoad3EndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1, 4, VictoryRoad3BattleText3, VictoryRoad3EndBattleText3, VictoryRoad3AfterBattleText3
VictoryRoad3TrainerHeader2:
- dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2
- dw VictoryRoad3BattleText4 ; TextBeforeBattle
- dw VictoryRoad3AfterBattleText4 ; TextAfterBattle
- dw VictoryRoad3EndBattleText4 ; TextEndBattle
- dw VictoryRoad3EndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2, 4, VictoryRoad3BattleText4, VictoryRoad3EndBattleText4, VictoryRoad3AfterBattleText4
VictoryRoad3TrainerHeader3:
- dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3
- dw VictoryRoad3BattleText5 ; TextBeforeBattle
- dw VictoryRoad3AfterBattleText5 ; TextAfterBattle
- dw VictoryRoad3EndBattleText5 ; TextEndBattle
- dw VictoryRoad3EndBattleText5 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3, 4, VictoryRoad3BattleText5, VictoryRoad3EndBattleText5, VictoryRoad3AfterBattleText5
+ db -1 ; end
VictoryRoad3Text1:
- TX_ASM
+ text_asm
ld hl, VictoryRoad3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3Text2:
- TX_ASM
+ text_asm
ld hl, VictoryRoad3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3Text3:
- TX_ASM
+ text_asm
ld hl, VictoryRoad3TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3Text4:
- TX_ASM
+ text_asm
ld hl, VictoryRoad3TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3BattleText2:
- TX_FAR _VictoryRoad3BattleText2
- db "@"
+ text_far _VictoryRoad3BattleText2
+ text_end
VictoryRoad3EndBattleText2:
- TX_FAR _VictoryRoad3EndBattleText2
- db "@"
+ text_far _VictoryRoad3EndBattleText2
+ text_end
VictoryRoad3AfterBattleText2:
- TX_FAR _VictoryRoad3AfterBattleText2
- db "@"
+ text_far _VictoryRoad3AfterBattleText2
+ text_end
VictoryRoad3BattleText3:
- TX_FAR _VictoryRoad3BattleText3
- db "@"
+ text_far _VictoryRoad3BattleText3
+ text_end
VictoryRoad3EndBattleText3:
- TX_FAR _VictoryRoad3EndBattleText3
- db "@"
+ text_far _VictoryRoad3EndBattleText3
+ text_end
VictoryRoad3AfterBattleText3:
- TX_FAR _VictoryRoad3AfterBattleText3
- db "@"
+ text_far _VictoryRoad3AfterBattleText3
+ text_end
VictoryRoad3BattleText4:
- TX_FAR _VictoryRoad3BattleText4
- db "@"
+ text_far _VictoryRoad3BattleText4
+ text_end
VictoryRoad3EndBattleText4:
- TX_FAR _VictoryRoad3EndBattleText4
- db "@"
+ text_far _VictoryRoad3EndBattleText4
+ text_end
VictoryRoad3AfterBattleText4:
- TX_FAR _VictoryRoad3AfterBattleText4
- db "@"
+ text_far _VictoryRoad3AfterBattleText4
+ text_end
VictoryRoad3BattleText5:
- TX_FAR _VictoryRoad3BattleText5
- db "@"
+ text_far _VictoryRoad3BattleText5
+ text_end
VictoryRoad3EndBattleText5:
- TX_FAR _VictoryRoad3EndBattleText5
- db "@"
+ text_far _VictoryRoad3EndBattleText5
+ text_end
VictoryRoad3AfterBattleText5:
- TX_FAR _VictoryRoad3AfterBattleText5
- db "@"
+ text_far _VictoryRoad3AfterBattleText5
+ text_end
diff --git a/scripts/ViridianCity.asm b/scripts/ViridianCity.asm
index 6dc68d4f..d960b9cb 100755
--- a/scripts/ViridianCity.asm
+++ b/scripts/ViridianCity.asm
@@ -33,11 +33,11 @@ ViridianCityScript_1905b:
CheckEvent EVENT_VIRIDIAN_GYM_OPEN
ret nz
ld a, [wObtainedBadges]
- cp %01111111
- jr nz, .gymClosed
+ cp $ff ^ (1 << BIT_EARTHBADGE)
+ jr nz, .gym_closed
SetEvent EVENT_VIRIDIAN_GYM_OPEN
ret
-.gymClosed
+.gym_closed
ld a, [wYCoord]
cp 8
ret nz
@@ -45,7 +45,7 @@ ViridianCityScript_1905b:
cp 32
ret nz
ld a, $f
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call StartSimulatingJoypadStates
ld a, $1
@@ -55,7 +55,7 @@ ViridianCityScript_1905b:
xor a
ld [wSpritePlayerStateData1FacingDirection], a
ld [wJoyIgnore], a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
ld a, $6
ld [wViridianCityCurScript], a
ret
@@ -77,10 +77,10 @@ ViridianCityScript_190ab:
cp 19
ret nz
ld a, $5
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
- ld [hJoyHeld], a
+ ldh [hJoyHeld], a
call ViridianCityScript_1914d
ld a, $5
ld [wViridianCityCurScript], a
@@ -106,14 +106,14 @@ ViridianCityScript_190db:
ret
ViridianCityScript_190ef:
- ld a, [wSpriteStateData1 + 3 * $10 + 4]
- ld [$ffeb], a
- ld a, [wSpriteStateData1 + 3 * $10 + 6]
- ld [$ffec], a
- ld a, [wSpriteStateData2 + 3 * $10 + 4]
- ld [$ffed], a
- ld a, [wSpriteStateData2 + 3 * $10 + 5]
- ld [$ffee], a
+ ld a, [wSprite03StateData1YPixels]
+ ldh [hSpriteScreenYCoord], a
+ ld a, [wSprite03StateData1XPixels]
+ ldh [hSpriteScreenXCoord], a
+ ld a, [wSprite03StateData2MapY]
+ ldh [hSpriteMapYCoord], a
+ ld a, [wSprite03StateData2MapX]
+ ldh [hSpriteMapXCoord], a
ret
ViridianCityScript4:
@@ -124,7 +124,7 @@ ViridianCityScript4:
xor a
ld [wJoyIgnore], a
ld a, $10
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wBattleType], a
@@ -134,14 +134,14 @@ ViridianCityScript4:
ret
ViridianCityScript_1912a:
- ld a, [$ffeb]
- ld [wSpriteStateData1 + 3 * $10 + 4], a
- ld a, [$ffec]
- ld [wSpriteStateData1 + 3 * $10 + 6], a
- ld a, [$ffed]
- ld [wSpriteStateData2 + 3 * $10 + 4], a
- ld a, [$ffee]
- ld [wSpriteStateData2 + 3 * $10 + 5], a
+ ldh a, [hSpriteScreenYCoord]
+ ld [wSprite03StateData1YPixels], a
+ ldh a, [hSpriteScreenXCoord]
+ ld [wSprite03StateData1XPixels], a
+ ldh a, [hSpriteMapYCoord]
+ ld [wSprite03StateData2MapY], a
+ ldh a, [hSpriteMapXCoord]
+ ld [wSprite03StateData2MapX], a
ret
ViridianCityScript5:
@@ -174,14 +174,14 @@ ViridianCityScript_19162:
cp 19
ret nz
ld a, $8
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
ld a, SPRITE_FACING_RIGHT
- ld [hSpriteFacingDirection], a
+ ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ld a, $8
ld [wSpritePlayerStateData1FacingDirection], a
ld a, $8
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, D_UP | D_DOWN | D_LEFT | D_RIGHT | START | SELECT
ld [wJoyIgnore], a
@@ -205,7 +205,7 @@ ViridianCityScript8:
ld a, D_UP | D_DOWN | D_LEFT | D_RIGHT | START | SELECT
ld [wJoyIgnore], a
ld a, $8
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wBattleType], a
@@ -220,11 +220,11 @@ ViridianCityScript9:
ld a, [wXCoord]
cp 19
jr z, .asm_191e4
- callab Func_f1a01
+ callfar Func_f1a01
ld de, ViridianCityOldManMovementData1
.asm_191e4
ld a, $8
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call MoveSprite
ld a, $a
ld [wViridianCityCurScript], a
@@ -273,46 +273,46 @@ ViridianCity_TextPointers:
dw ViridianCityText_13
ViridianCityText_0:
- TX_ASM
- callba Func_f18bb
+ text_asm
+ farcall Func_f18bb
jp TextScriptEnd
ViridianCityText_1:
- TX_ASM
- callba Func_f18c7
+ text_asm
+ farcall Func_f18c7
jp TextScriptEnd
ViridianCityText_2:
- TX_ASM
- callba Func_f18e9
+ text_asm
+ farcall Func_f18e9
jp TextScriptEnd
ViridianCityText_3:
- TX_ASM
- callba Func_f1911
+ text_asm
+ farcall Func_f1911
jp TextScriptEnd
ViridianCityText_4:
- TX_ASM
- callba Func_f192c
+ text_asm
+ farcall Func_f192c
jp TextScriptEnd
ViridianCityText_5:
- TX_ASM
- callba Func_f194a
+ text_asm
+ farcall Func_f194a
jp TextScriptEnd
ViridianCityText_6:
- TX_ASM
- callba Func_f198e
+ text_asm
+ farcall Func_f198e
jp TextScriptEnd
ViridianCityText_13:
- TX_FAR _ViridianCityText_19219
- db "@"
+ text_far _ViridianCityText_19219
+ text_end
ViridianCityText_7:
- TX_ASM
+ text_asm
CheckEvent EVENT_02D
jr nz, .asm_192a6
ld hl, ViridianCityText_192af
@@ -330,34 +330,34 @@ ViridianCityText_7:
jp TextScriptEnd
ViridianCityText_192af:
- TX_FAR _ViridianCityText_1920a
- db "@"
+ text_far _ViridianCityText_1920a
+ text_end
ViridianCityText_192b4:
- TX_FAR _OldManTextAfterBattle
- db "@"
+ text_far _OldManTextAfterBattle
+ text_end
ViridianCityText_8:
- TX_ASM
- callba Func_f19c5
+ text_asm
+ farcall Func_f19c5
jp TextScriptEnd
ViridianCityText_9:
- TX_ASM
- callba Func_f19d1
+ text_asm
+ farcall Func_f19d1
jp TextScriptEnd
ViridianCityText_10:
- TX_ASM
- callba Func_f19dd
+ text_asm
+ farcall Func_f19dd
jp TextScriptEnd
ViridianCityText_11:
- TX_ASM
- callba Func_f19e9
+ text_asm
+ farcall Func_f19e9
jp TextScriptEnd
ViridianCityText_12:
- TX_ASM
- callba Func_f19f5
+ text_asm
+ farcall Func_f19f5
jp TextScriptEnd
diff --git a/scripts/ViridianCity2.asm b/scripts/ViridianCity2.asm
index ffaeb4e2..c2e8254e 100755
--- a/scripts/ViridianCity2.asm
+++ b/scripts/ViridianCity2.asm
@@ -1,33 +1,33 @@
-Func_f18bb:
+Func_f18bb::
ld hl, ViridianCityText_f18c2
call PrintText
ret
ViridianCityText_f18c2:
- TX_FAR _ViridianCityText1
- db "@"
+ text_far _ViridianCityText1
+ text_end
-Func_f18c7:
- ld hl, ViridianCityText_f18e4
+Func_f18c7::
+ ld hl, ViridianCityText_19127
ld a, [wObtainedBadges]
- cp %01111111
- jr z, .printAndDone
+ cp $ff ^ (1 << BIT_EARTHBADGE)
+ jr z, .done
CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
- jr nz, .printAndDone
- ld hl, ViridianCityText_f18df
-.printAndDone
+ jr nz, .done
+ ld hl, ViridianCityText_19122
+.done
call PrintText
ret
-ViridianCityText_f18df:
- TX_FAR _ViridianCityText_19122
- db "@"
+ViridianCityText_19122:
+ text_far _ViridianCityText_19122
+ text_end
-ViridianCityText_f18e4:
- TX_FAR _ViridianCityText_19127
- db "@"
+ViridianCityText_19127:
+ text_far _ViridianCityText_19127
+ text_end
-Func_f18e9:
+Func_f18e9::
ld hl, ViridianCityText_f1902
call PrintText
call YesNoChoice
@@ -41,18 +41,18 @@ Func_f18e9:
ret
ViridianCityText_f1902:
- TX_FAR _ViridianCityText_1914d
- db "@"
+ text_far _ViridianCityText_1914d
+ text_end
ViridianCityText_f1907:
- TX_FAR _ViridianCityText_19152
- db "@"
+ text_far _ViridianCityText_19152
+ text_end
ViridianCityText_f190c:
- TX_FAR _ViridianCityText_19157
- db "@"
+ text_far _ViridianCityText_19157
+ text_end
-Func_f1911:
+Func_f1911::
ld hl, ViridianCityText_f1927
CheckEvent EVENT_GOT_POKEDEX
jr nz, .gotPokedex
@@ -62,14 +62,14 @@ Func_f1911:
ret
ViridianCityText_f1922:
- TX_FAR _ViridianCityText_19175
- db "@"
+ text_far _ViridianCityText_19175
+ text_end
ViridianCityText_f1927:
- TX_FAR _ViridianCityText_1917a
- db "@"
+ text_far _ViridianCityText_1917a
+ text_end
-Func_f192c:
+Func_f192c::
ld hl, ViridianCityText_f1945
call PrintText
call StartSimulatingJoypadStates
@@ -82,48 +82,48 @@ Func_f192c:
ret
ViridianCityText_f1945:
- TX_FAR _ViridianCityText_19191
- db "@"
+ text_far _ViridianCityText_19191
+ text_end
-Func_f194a:
+Func_f194a::
CheckEvent EVENT_GOT_TM42
- jr nz, .gotTm42
- ld hl, ViridianCityText_f1979
+ jr nz, .got_item
+ ld hl, ViridianCityText_191ca
call PrintText
- lb bc, TM_42, 1
+ lb bc, TM_DREAM_EATER, 1
call GiveItem
- jr nc, .BagFull
- ld hl, ViridianCityText_f197e
+ jr nc, .bag_full
+ ld hl, ReceivedTM42Text
call PrintText
SetEvent EVENT_GOT_TM42
ret
-.BagFull
- ld hl, ViridianCityText_f1989
+.bag_full
+ ld hl, TM42NoRoomText
call PrintText
ret
-.gotTm42
- ld hl, ViridianCityText_f1984
+.got_item
+ ld hl, TM42Explanation
call PrintText
ret
-ViridianCityText_f1979:
- TX_FAR _ViridianCityText_191ca
- db "@"
+ViridianCityText_191ca:
+ text_far _ViridianCityText_191ca
+ text_end
-ViridianCityText_f197e:
- TX_FAR _ReceivedTM42Text
- TX_SFX_ITEM_2
- db "@"
+ReceivedTM42Text:
+ text_far _ReceivedTM42Text
+ sound_get_item_2
+ text_end
-ViridianCityText_f1984:
- TX_FAR _TM42Explanation
- db "@"
+TM42Explanation:
+ text_far _TM42Explanation
+ text_end
-ViridianCityText_f1989:
- TX_FAR _TM42NoRoomText
- db "@"
+TM42NoRoomText:
+ text_far _TM42NoRoomText
+ text_end
-Func_f198e:
+Func_f198e::
ld hl, ViridianCityText_f19b6
call PrintText
ld c, 2
@@ -131,77 +131,77 @@ Func_f198e:
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .hurry
+ jr nz, .refused
ld hl, ViridianCityText_f19bb
call PrintText
ld a, $3
ld [wViridianCityCurScript], a
jr .done
-.hurry
+.refused
ld hl, ViridianCityText_f19c0
call PrintText
.done
ret
ViridianCityText_f19b6:
- TX_FAR _OldManAgainText1
- db "@"
+ text_far _OldManAgainText1
+ text_end
ViridianCityText_f19bb:
- TX_FAR _OldManAgainText2
- db "@"
+ text_far _OldManAgainText2
+ text_end
ViridianCityText_f19c0:
- TX_FAR _OldManAgainText3
- db "@"
+ text_far _OldManAgainText3
+ text_end
-Func_f19c5:
+Func_f19c5::
ld hl, ViridianCityText_f19cc
call PrintText
ret
ViridianCityText_f19cc:
- TX_FAR _ViridianCityText8
- db "@"
+ text_far _ViridianCityText8
+ text_end
-Func_f19d1:
+Func_f19d1::
ld hl, ViridianCityText_f19d8
call PrintText
ret
ViridianCityText_f19d8:
- TX_FAR _ViridianCityText9
- db "@"
+ text_far _ViridianCityText9
+ text_end
-Func_f19dd:
+Func_f19dd::
ld hl, ViridianCityText_f19e4
call PrintText
ret
ViridianCityText_f19e4:
- TX_FAR _ViridianCityText10
- db "@"
+ text_far _ViridianCityText10
+ text_end
-Func_f19e9:
+Func_f19e9::
ld hl, ViridianCityText_f19f0
call PrintText
ret
ViridianCityText_f19f0:
- TX_FAR _ViridianCityText13
- db "@"
+ text_far _ViridianCityText13
+ text_end
-Func_f19f5:
+Func_f19f5::
ld hl, ViridianCityText_f19fc
call PrintText
ret
ViridianCityText_f19fc:
- TX_FAR _ViridianCityText14
- db "@"
+ text_far _ViridianCityText14
+ text_end
-Func_f1a01:
+Func_f1a01::
ld hl, Data_f1a0a
ld b, SPRITE_FACING_RIGHT
call TryApplyPikachuMovementData
diff --git a/scripts/ViridianForest.asm b/scripts/ViridianForest.asm
index fb9a71e3..ca212d8e 100755
--- a/scripts/ViridianForest.asm
+++ b/scripts/ViridianForest.asm
@@ -31,176 +31,141 @@ ViridianForest_TextPointers:
dw ViridianForestText16
ViridianForestTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0
- dw ViridianForestBattleText1 ; TextBeforeBattle
- dw ViridianForestAfterBattleText1 ; TextAfterBattle
- dw ViridianForestEndBattleText1 ; TextEndBattle
- dw ViridianForestEndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0, 4, ViridianForestBattleText1, ViridianForestEndBattleText1, ViridianForestAfterBattleText1
ViridianForestTrainerHeader1:
- dbEventFlagBit EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1
- dw ViridianForestBattleText2 ; TextBeforeBattle
- dw ViridianForestAfterBattleText2 ; TextAfterBattle
- dw ViridianForestEndBattleText2 ; TextEndBattle
- dw ViridianForestEndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1, 4, ViridianForestBattleText2, ViridianForestEndBattleText2, ViridianForestAfterBattleText2
ViridianForestTrainerHeader2:
- dbEventFlagBit EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2
- db ($1 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2
- dw ViridianForestBattleText3 ; TextBeforeBattle
- dw ViridianForestAfterBattleText3 ; TextAfterBattle
- dw ViridianForestEndBattleText3 ; TextEndBattle
- dw ViridianForestEndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2, 1, ViridianForestBattleText3, ViridianForestEndBattleText3, ViridianForestAfterBattleText3
ViridianForestTrainerHeader3:
- dbEventFlagBit EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_3
- db ($0 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_3
- dw ViridianForestBattleText4 ; TextBeforeBattle
- dw ViridianForestAfterBattleText4 ; TextAfterBattle
- dw ViridianForestEndBattleText4 ; TextEndBattle
- dw ViridianForestEndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_3, 0, ViridianForestBattleText4, ViridianForestEndBattleText4, ViridianForestAfterBattleText4
ViridianForestTrainerHeader4:
- dbEventFlagBit EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_4
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_4
- dw ViridianForestBattleText5 ; TextBeforeBattle
- dw ViridianForestAfterBattleText5 ; TextAfterBattle
- dw ViridianForestEndBattleText5 ; TextEndBattle
- dw ViridianForestEndBattleText5 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_4, 4, ViridianForestBattleText5, ViridianForestEndBattleText5, ViridianForestAfterBattleText5
+ db -1 ; end
ViridianForestText1:
- TX_FAR _ViridianForestText1
- db "@"
+ text_far _ViridianForestText1
+ text_end
ViridianForestText2:
- TX_ASM
+ text_asm
ld hl, ViridianForestTrainerHeader0
jr ViridianForestTalkToTrainer
ViridianForestText3:
- TX_ASM
+ text_asm
ld hl, ViridianForestTrainerHeader1
jr ViridianForestTalkToTrainer
ViridianForestText4:
- TX_ASM
+ text_asm
ld hl, ViridianForestTrainerHeader2
jr ViridianForestTalkToTrainer
ViridianForestText5:
- TX_ASM
+ text_asm
ld hl, ViridianForestTrainerHeader3
jr ViridianForestTalkToTrainer
ViridianForestText6:
- TX_ASM
+ text_asm
ld hl, ViridianForestTrainerHeader4
ViridianForestTalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
ViridianForestBattleText1:
- TX_FAR _ViridianForestBattleText1
- db "@"
+ text_far _ViridianForestBattleText1
+ text_end
ViridianForestEndBattleText1:
- TX_FAR _ViridianForestEndBattleText1
- db "@"
+ text_far _ViridianForestEndBattleText1
+ text_end
ViridianForestAfterBattleText1:
- TX_FAR _ViridianFrstAfterBattleText1
- db "@"
+ text_far _ViridianFrstAfterBattleText1
+ text_end
ViridianForestBattleText2:
- TX_FAR _ViridianForestBattleText2
- db "@"
+ text_far _ViridianForestBattleText2
+ text_end
ViridianForestEndBattleText2:
- TX_FAR _ViridianForestEndBattleText2
- db "@"
+ text_far _ViridianForestEndBattleText2
+ text_end
ViridianForestAfterBattleText2:
- TX_FAR _ViridianFrstAfterBattleText2
- db "@"
+ text_far _ViridianFrstAfterBattleText2
+ text_end
ViridianForestBattleText3:
- TX_FAR _ViridianForestBattleText3
- db "@"
+ text_far _ViridianForestBattleText3
+ text_end
ViridianForestEndBattleText3:
- TX_FAR _ViridianForestEndBattleText3
- db "@"
+ text_far _ViridianForestEndBattleText3
+ text_end
ViridianForestAfterBattleText3:
- TX_FAR _ViridianFrstAfterBattleText3
- db "@"
+ text_far _ViridianFrstAfterBattleText3
+ text_end
ViridianForestBattleText4:
- TX_FAR _ViridianForestBattleTextPikaGirl
- db "@"
+ text_far _ViridianForestBattleTextPikaGirl
+ text_end
ViridianForestEndBattleText4:
- TX_FAR _ViridianForestEndBattleTextPikaGirl
- db "@"
+ text_far _ViridianForestEndBattleTextPikaGirl
+ text_end
ViridianForestAfterBattleText4:
- TX_FAR _ViridianForestAfterBattleTextPikaGirl
- db "@"
+ text_far _ViridianForestAfterBattleTextPikaGirl
+ text_end
ViridianForestBattleText5:
- TX_FAR _ViridianForestBattleTextSamurai
- db "@"
+ text_far _ViridianForestBattleTextSamurai
+ text_end
ViridianForestEndBattleText5:
- TX_FAR _ViridianForestEndBattleTextSamurai
- db "@"
+ text_far _ViridianForestEndBattleTextSamurai
+ text_end
ViridianForestAfterBattleText5:
- TX_FAR _ViridianForestAfterBattleTextSamurai
- db "@"
+ text_far _ViridianForestAfterBattleTextSamurai
+ text_end
ViridianForestText10:
- TX_FAR _ViridianForestText8
- db "@"
+ text_far _ViridianForestText8
+ text_end
ViridianForestText11:
- TX_ASM
+ text_asm
ld hl, Func_f2528
jp ViridianForestScript_6120d
ViridianForestText12:
- TX_ASM
+ text_asm
ld hl, Func_f2534
jp ViridianForestScript_6120d
ViridianForestText13:
- TX_ASM
+ text_asm
ld hl, Func_f2540
jp ViridianForestScript_6120d
ViridianForestText14:
- TX_ASM
+ text_asm
ld hl, Func_f254c
jp ViridianForestScript_6120d
ViridianForestText15:
- TX_ASM
+ text_asm
ld hl, Func_f2558
jp ViridianForestScript_6120d
ViridianForestText16:
- TX_ASM
+ text_asm
ld hl, Func_f2528
-ViridianForestScript_6120d
+ViridianForestScript_6120d:
ld b, BANK(Func_f2528)
call Bankswitch
jp TextScriptEnd
diff --git a/scripts/ViridianForest2.asm b/scripts/ViridianForest2.asm
index 489db39c..e5f03ccb 100755
--- a/scripts/ViridianForest2.asm
+++ b/scripts/ViridianForest2.asm
@@ -1,47 +1,47 @@
-Func_f2528:
+Func_f2528::
ld hl, Text_f252f
call PrintText
ret
Text_f252f:
- TX_FAR _ViridianForestText9
- db "@"
+ text_far _ViridianForestText9
+ text_end
-Func_f2534:
+Func_f2534::
ld hl, Text_f253b
call PrintText
ret
Text_f253b:
- TX_FAR _ViridianForestText10
- db "@"
+ text_far _ViridianForestText10
+ text_end
-Func_f2540:
+Func_f2540::
ld hl, Text_f254a
call PrintText
ret
Text_f254a:
- TX_FAR _ViridianForestText11
- db "@"
+ text_far _ViridianForestText11
+ text_end
-Func_f254c:
+Func_f254c::
ld hl, Text_f2553
call PrintText
ret
Text_f2553:
- TX_FAR _ViridianForestText12
- db "@"
+ text_far _ViridianForestText12
+ text_end
-Func_f2558:
+Func_f2558::
ld hl, Text_f255f
call PrintText
ret
Text_f255f:
- TX_FAR _ViridianForestText13
- db "@"
+ text_far _ViridianForestText13
+ text_end
Func_f2564:
ld hl, ViridianForestText_f256b
@@ -49,5 +49,5 @@ Func_f2564:
ret
ViridianForestText_f256b:
- TX_FAR _ViridianForestText14
- db "@"
+ text_far _ViridianForestText14
+ text_end
diff --git a/scripts/ViridianForestNorthGate.asm b/scripts/ViridianForestNorthGate.asm
index e421bf5b..6aef26d3 100755
--- a/scripts/ViridianForestNorthGate.asm
+++ b/scripts/ViridianForestNorthGate.asm
@@ -6,9 +6,9 @@ ViridianForestNorthGate_TextPointers:
dw ViridianForestExitText2
ViridianForestExitText1:
- TX_FAR _ViridianForestExitText1
- db "@"
+ text_far _ViridianForestExitText1
+ text_end
ViridianForestExitText2:
- TX_FAR _ViridianForestExitText2
- db "@"
+ text_far _ViridianForestExitText2
+ text_end
diff --git a/scripts/ViridianForestSouthGate.asm b/scripts/ViridianForestSouthGate.asm
index 6eaaaace..7ef66b85 100755
--- a/scripts/ViridianForestSouthGate.asm
+++ b/scripts/ViridianForestSouthGate.asm
@@ -7,9 +7,9 @@ ViridianForestSouthGate_TextPointers:
dw ViridianForestEntranceText2
ViridianForestEntranceText1:
- TX_FAR _ViridianForestEntranceText1
- db "@"
+ text_far _ViridianForestEntranceText1
+ text_end
ViridianForestEntranceText2:
- TX_FAR _ViridianForestEntranceText2
- db "@"
+ text_far _ViridianForestEntranceText2
+ text_end
diff --git a/scripts/ViridianGym.asm b/scripts/ViridianGym.asm
index b0f94b9d..68da9301 100755
--- a/scripts/ViridianGym.asm
+++ b/scripts/ViridianGym.asm
@@ -1,6 +1,6 @@
ViridianGym_Script:
- ld hl, Gym8CityName
- ld de, Gym8LeaderName
+ ld hl, .CityName
+ ld de, .LeaderName
call LoadGymLeaderAndCityName
call EnableAutoTextBoxDrawing
ld hl, ViridianGymTrainerHeader0
@@ -10,9 +10,10 @@ ViridianGym_Script:
ld [wViridianGymCurScript], a
ret
-Gym8CityName:
+.CityName:
db "VIRIDIAN CITY@"
-Gym8LeaderName:
+
+.LeaderName:
db "GIOVANNI@"
ViridianGymScript_748d6:
@@ -49,72 +50,68 @@ ViridianGymScript0:
ld [wCurMapScript], a
ret
-;format:
-;db y,x
-;dw pointer to movement
ViridianGymArrowTilePlayerMovement:
- db $b,$13
- dw ViridianGymArrowMovement1
- db $1,$13
- dw ViridianGymArrowMovement2
- db $2,$12
- dw ViridianGymArrowMovement3
- db $2,$b
- dw ViridianGymArrowMovement4
- db $a,$10
- dw ViridianGymArrowMovement5
- db $6,$4
- dw ViridianGymArrowMovement6
- db $d,$5
- dw ViridianGymArrowMovement7
- db $e,$4
- dw ViridianGymArrowMovement8
- db $f,$0
- dw ViridianGymArrowMovement9
- db $f,$1
- dw ViridianGymArrowMovement10
- db $10,$d
- dw ViridianGymArrowMovement11
- db $11,$d
- dw ViridianGymArrowMovement12
- db $FF
-
-;format: direction, count
+ map_coord_movement 19, 11, ViridianGymArrowMovement1
+ map_coord_movement 19, 1, ViridianGymArrowMovement2
+ map_coord_movement 18, 2, ViridianGymArrowMovement3
+ map_coord_movement 11, 2, ViridianGymArrowMovement4
+ map_coord_movement 16, 10, ViridianGymArrowMovement5
+ map_coord_movement 4, 6, ViridianGymArrowMovement6
+ map_coord_movement 5, 13, ViridianGymArrowMovement7
+ map_coord_movement 4, 14, ViridianGymArrowMovement8
+ map_coord_movement 0, 15, ViridianGymArrowMovement9
+ map_coord_movement 1, 15, ViridianGymArrowMovement10
+ map_coord_movement 13, 16, ViridianGymArrowMovement11
+ map_coord_movement 13, 17, ViridianGymArrowMovement12
+ db -1 ; end
+
ViridianGymArrowMovement1:
- db D_UP,$09,$FF
+ db D_UP, 9
+ db -1 ; end
ViridianGymArrowMovement2:
- db D_LEFT,$08,$FF
+ db D_LEFT, 8
+ db -1 ; end
ViridianGymArrowMovement3:
- db D_DOWN,$09,$FF
+ db D_DOWN, 9
+ db -1 ; end
ViridianGymArrowMovement4:
- db D_RIGHT,$06,$FF
+ db D_RIGHT, 6
+ db -1 ; end
ViridianGymArrowMovement5:
- db D_DOWN,$02,$FF
+ db D_DOWN, 2
+ db -1 ; end
ViridianGymArrowMovement6:
- db D_DOWN,$07,$FF
+ db D_DOWN, 7
+ db -1 ; end
ViridianGymArrowMovement7:
- db D_RIGHT,$08,$FF
+ db D_RIGHT, 8
+ db -1 ; end
ViridianGymArrowMovement8:
- db D_RIGHT,$09,$FF
+ db D_RIGHT, 9
+ db -1 ; end
ViridianGymArrowMovement9:
- db D_UP,$08,$FF
+ db D_UP, 8
+ db -1 ; end
ViridianGymArrowMovement10:
- db D_UP,$06,$FF
+ db D_UP, 6
+ db -1 ; end
ViridianGymArrowMovement11:
- db D_LEFT,$06,$FF
+ db D_LEFT, 6
+ db -1 ; end
ViridianGymArrowMovement12:
- db D_LEFT,$0C,$FF
+ db D_LEFT, 12
+ db -1 ; end
ViridianGymScript4:
ld a, [wSimulatedJoypadStatesIndex]
@@ -128,7 +125,7 @@ ViridianGymScript4:
ld [wCurMapScript], a
ret
.asm_74980
- jpba LoadSpinnerArrowTiles
+ farjp LoadSpinnerArrowTiles
ViridianGymScript3:
ld a, [wIsInBattle]
@@ -138,26 +135,26 @@ ViridianGymScript3:
ld [wJoyIgnore], a
ViridianGymScript3_74995:
ld a, $c
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
- lb bc, TM_27, 1
+ lb bc, TM_FISSURE, 1
call GiveItem
jr nc, .BagFull
ld a, $d
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM27
jr .gymVictory
.BagFull
ld a, $e
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
ld hl, wObtainedBadges
- set 7, [hl]
+ set BIT_EARTHBADGE, [hl]
ld hl, wBeatGymFlags
- set 7, [hl]
+ set BIT_EARTHBADGE, [hl]
; deactivate gym trainers
SetEventRange EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0, EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7
@@ -185,81 +182,25 @@ ViridianGym_TextPointers:
dw ViridianGymText14
ViridianGymTrainerHeader0:
- dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0
- dw ViridianGymBattleText1 ; TextBeforeBattle
- dw ViridianGymAfterBattleText1 ; TextAfterBattle
- dw ViridianGymEndBattleText1 ; TextEndBattle
- dw ViridianGymEndBattleText1 ; TextEndBattle
-
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0, 4, ViridianGymBattleText1, ViridianGymEndBattleText1, ViridianGymAfterBattleText1
ViridianGymTrainerHeader1:
- dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1
- dw ViridianGymBattleText2 ; TextBeforeBattle
- dw ViridianGymAfterBattleText2 ; TextAfterBattle
- dw ViridianGymEndBattleText2 ; TextEndBattle
- dw ViridianGymEndBattleText2 ; TextEndBattle
-
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1, 4, ViridianGymBattleText2, ViridianGymEndBattleText2, ViridianGymAfterBattleText2
ViridianGymTrainerHeader2:
- dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2
- dw ViridianGymBattleText3 ; TextBeforeBattle
- dw ViridianGymAfterBattleText3 ; TextAfterBattle
- dw ViridianGymEndBattleText3 ; TextEndBattle
- dw ViridianGymEndBattleText3 ; TextEndBattle
-
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2, 4, ViridianGymBattleText3, ViridianGymEndBattleText3, ViridianGymAfterBattleText3
ViridianGymTrainerHeader3:
- dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3
- db ($2 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3
- dw ViridianGymBattleText4 ; TextBeforeBattle
- dw ViridianGymAfterBattleText4 ; TextAfterBattle
- dw ViridianGymEndBattleText4 ; TextEndBattle
- dw ViridianGymEndBattleText4 ; TextEndBattle
-
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3, 2, ViridianGymBattleText4, ViridianGymEndBattleText4, ViridianGymAfterBattleText4
ViridianGymTrainerHeader4:
- dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4
- dw ViridianGymBattleText5 ; TextBeforeBattle
- dw ViridianGymAfterBattleText5 ; TextAfterBattle
- dw ViridianGymEndBattleText5 ; TextEndBattle
- dw ViridianGymEndBattleText5 ; TextEndBattle
-
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4, 3, ViridianGymBattleText5, ViridianGymEndBattleText5, ViridianGymAfterBattleText5
ViridianGymTrainerHeader5:
- dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5
- dw ViridianGymBattleText6 ; TextBeforeBattle
- dw ViridianGymAfterBattleText6 ; TextAfterBattle
- dw ViridianGymEndBattleText6 ; TextEndBattle
- dw ViridianGymEndBattleText6 ; TextEndBattle
-
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5, 4, ViridianGymBattleText6, ViridianGymEndBattleText6, ViridianGymAfterBattleText6
ViridianGymTrainerHeader6:
- dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6, 1
- db ($3 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6, 1
- dw ViridianGymBattleText7 ; TextBeforeBattle
- dw ViridianGymAfterBattleText7 ; TextAfterBattle
- dw ViridianGymEndBattleText7 ; TextEndBattle
- dw ViridianGymEndBattleText7 ; TextEndBattle
-
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6, 1, 3, ViridianGymBattleText7, ViridianGymEndBattleText7, ViridianGymAfterBattleText7
ViridianGymTrainerHeader7:
- dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7, 1
- db ($4 << 4) ; trainer's view range
- dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7, 1
- dw ViridianGymBattleText8 ; TextBeforeBattle
- dw ViridianGymAfterBattleText8 ; TextAfterBattle
- dw ViridianGymEndBattleText8 ; TextEndBattle
- dw ViridianGymEndBattleText8 ; TextEndBattle
-
- db $ff
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7, 1, 4, ViridianGymBattleText8, ViridianGymEndBattleText8, ViridianGymAfterBattleText8
+ db -1 ; end
ViridianGymText1:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
jr z, .beginBattle
CheckEventReuseA EVENT_GOT_TM27
@@ -289,7 +230,7 @@ ViridianGymText1:
ld hl, ViridianGymText_74ad3
ld de, ViridianGymText_74ad3
call SaveEndBattleTextPointers
- ld a, [H_SPRITEINDEX]
+ ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
@@ -301,181 +242,181 @@ ViridianGymText1:
jp TextScriptEnd
ViridianGymText_74ace:
- TX_FAR _ViridianGymText_74ace
- db "@"
+ text_far _ViridianGymText_74ace
+ text_end
ViridianGymText_74ad3:
- TX_FAR _ViridianGymText_74ad3
- TX_SFX_LEVEL_UP ; probably supposed to play SFX_GET_ITEM_1 but the wrong music bank is loaded
- db "@"
+ text_far _ViridianGymText_74ad3
+ sound_level_up ; probably supposed to play SFX_GET_ITEM_1 but the wrong music bank is loaded
+ text_end
ViridianGymText_74ad9:
- TX_FAR _ViridianGymText_74ad9
- TX_WAIT
- db "@"
+ text_far _ViridianGymText_74ad9
+ text_waitbutton
+ text_end
ViridianGymText12:
- TX_FAR _ViridianGymText12
- db "@"
+ text_far _ViridianGymText12
+ text_end
ViridianGymText13:
- TX_FAR _ReceivedTM27Text
- TX_SFX_ITEM_1
+ text_far _ReceivedTM27Text
+ sound_get_item_1
TM27ExplanationText:
- TX_FAR _TM27ExplanationText
- db "@"
+ text_far _TM27ExplanationText
+ text_end
ViridianGymText14:
- TX_FAR _TM27NoRoomText
- db "@"
+ text_far _TM27NoRoomText
+ text_end
ViridianGymText2:
- TX_ASM
+ text_asm
ld hl, ViridianGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
ViridianGymBattleText1:
- TX_FAR _ViridianGymBattleText1
- db "@"
+ text_far _ViridianGymBattleText1
+ text_end
ViridianGymEndBattleText1:
- TX_FAR _ViridianGymEndBattleText1
- db "@"
+ text_far _ViridianGymEndBattleText1
+ text_end
ViridianGymAfterBattleText1:
- TX_FAR _ViridianGymAfterBattleText1
- db "@"
+ text_far _ViridianGymAfterBattleText1
+ text_end
ViridianGymText3:
- TX_ASM
+ text_asm
ld hl, ViridianGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
ViridianGymBattleText2:
- TX_FAR _ViridianGymBattleText2
- db "@"
+ text_far _ViridianGymBattleText2
+ text_end
ViridianGymEndBattleText2:
- TX_FAR _ViridianGymEndBattleText2
- db "@"
+ text_far _ViridianGymEndBattleText2
+ text_end
ViridianGymAfterBattleText2:
- TX_FAR _ViridianGymAfterBattleText2
- db "@"
+ text_far _ViridianGymAfterBattleText2
+ text_end
ViridianGymText4:
- TX_ASM
+ text_asm
ld hl, ViridianGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
ViridianGymBattleText3:
- TX_FAR _ViridianGymBattleText3
- db "@"
+ text_far _ViridianGymBattleText3
+ text_end
ViridianGymEndBattleText3:
- TX_FAR _ViridianGymEndBattleText3
- db "@"
+ text_far _ViridianGymEndBattleText3
+ text_end
ViridianGymAfterBattleText3:
- TX_FAR _ViridianGymAfterBattleText3
- db "@"
+ text_far _ViridianGymAfterBattleText3
+ text_end
ViridianGymText5:
- TX_ASM
+ text_asm
ld hl, ViridianGymTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
ViridianGymBattleText4:
- TX_FAR _ViridianGymBattleText4
- db "@"
+ text_far _ViridianGymBattleText4
+ text_end
ViridianGymEndBattleText4:
- TX_FAR _ViridianGymEndBattleText4
- db "@"
+ text_far _ViridianGymEndBattleText4
+ text_end
ViridianGymAfterBattleText4:
- TX_FAR _ViridianGymAfterBattleText4
- db "@"
+ text_far _ViridianGymAfterBattleText4
+ text_end
ViridianGymText6:
- TX_ASM
+ text_asm
ld hl, ViridianGymTrainerHeader4
call TalkToTrainer
jp TextScriptEnd
ViridianGymBattleText5:
- TX_FAR _ViridianGymBattleText5
- db "@"
+ text_far _ViridianGymBattleText5
+ text_end
ViridianGymEndBattleText5:
- TX_FAR _ViridianGymEndBattleText5
- db "@"
+ text_far _ViridianGymEndBattleText5
+ text_end
ViridianGymAfterBattleText5:
- TX_FAR _ViridianGymAfterBattleText5
- db "@"
+ text_far _ViridianGymAfterBattleText5
+ text_end
ViridianGymText7:
- TX_ASM
+ text_asm
ld hl, ViridianGymTrainerHeader5
call TalkToTrainer
jp TextScriptEnd
ViridianGymBattleText6:
- TX_FAR _ViridianGymBattleText6
- db "@"
+ text_far _ViridianGymBattleText6
+ text_end
ViridianGymEndBattleText6:
- TX_FAR _ViridianGymEndBattleText6
- db "@"
+ text_far _ViridianGymEndBattleText6
+ text_end
ViridianGymAfterBattleText6:
- TX_FAR _ViridianGymAfterBattleText6
- db "@"
+ text_far _ViridianGymAfterBattleText6
+ text_end
ViridianGymText8:
- TX_ASM
+ text_asm
ld hl, ViridianGymTrainerHeader6
call TalkToTrainer
jp TextScriptEnd
ViridianGymBattleText7:
- TX_FAR _ViridianGymBattleText7
- db "@"
+ text_far _ViridianGymBattleText7
+ text_end
ViridianGymEndBattleText7:
- TX_FAR _ViridianGymEndBattleText7
- db "@"
+ text_far _ViridianGymEndBattleText7
+ text_end
ViridianGymAfterBattleText7:
- TX_FAR _ViridianGymAfterBattleText7
- db "@"
+ text_far _ViridianGymAfterBattleText7
+ text_end
ViridianGymText9:
- TX_ASM
+ text_asm
ld hl, ViridianGymTrainerHeader7
call TalkToTrainer
jp TextScriptEnd
ViridianGymBattleText8:
- TX_FAR _ViridianGymBattleText8
- db "@"
+ text_far _ViridianGymBattleText8
+ text_end
ViridianGymEndBattleText8:
- TX_FAR _ViridianGymEndBattleText8
- db "@"
+ text_far _ViridianGymEndBattleText8
+ text_end
ViridianGymAfterBattleText8:
- TX_FAR _ViridianGymAfterBattleText8
- db "@"
+ text_far _ViridianGymAfterBattleText8
+ text_end
ViridianGymText10:
- TX_ASM
+ text_asm
CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
jr nz, .asm_1abd1
ld hl, ViridianGymText_74bd4
@@ -488,9 +429,9 @@ ViridianGymText10:
jp TextScriptEnd
ViridianGymText_74bd4:
- TX_FAR _ViridianGymText_74bd4
- db "@"
+ text_far _ViridianGymText_74bd4
+ text_end
ViridianGymText_74bd9:
- TX_FAR _ViridianGymText_74bd9
- db "@"
+ text_far _ViridianGymText_74bd9
+ text_end
diff --git a/scripts/ViridianMart.asm b/scripts/ViridianMart.asm
index d1145778..2d837018 100755
--- a/scripts/ViridianMart.asm
+++ b/scripts/ViridianMart.asm
@@ -8,12 +8,12 @@ ViridianMart_Script:
ViridianMartScript_1d47d:
CheckEvent EVENT_OAK_GOT_PARCEL
- jr nz, .asm_1d489
+ jr nz, .delivered_parcel
ld hl, ViridianMart_TextPointers
- jr .asm_1d48c
-.asm_1d489
+ jr .done
+.delivered_parcel
ld hl, ViridianMart_TextPointers2
-.asm_1d48c
+.done
ld a, l
ld [wMapTextPtr], a
ld a, h
@@ -28,7 +28,7 @@ ViridianMart_ScriptPointers:
ViridianMartScript0:
call UpdateSprites
ld a, $4
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld hl, wSimulatedJoypadStatesEnd
ld de, RLEMovement1d4bb
@@ -41,9 +41,9 @@ ViridianMartScript0:
ret
RLEMovement1d4bb:
- db D_LEFT, $01
- db D_UP, $02
- db $ff
+ db D_LEFT, 1
+ db D_UP, 2
+ db -1 ; end
ViridianMartScript1:
ld a, [wSimulatedJoypadStatesIndex]
@@ -51,7 +51,7 @@ ViridianMartScript1:
ret nz
call Delay3
ld a, $5
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call DisplayTextID
lb bc, OAKS_PARCEL, 1
call GiveItem
@@ -79,28 +79,29 @@ ViridianMart_TextPointers:
dw ViridianMartText3
dw ViridianMartText4
dw ViridianMartText5
+
ViridianMart_TextPointers2:
dw ViridianCashierText
dw ViridianMartText2
dw ViridianMartText3
ViridianMartText1:
- TX_FAR _ViridianMartText1
- db "@"
+ text_far _ViridianMartText1
+ text_end
ViridianMartText4:
- TX_FAR _ViridianMartText4
- db "@"
+ text_far _ViridianMartText4
+ text_end
ViridianMartText5:
- TX_FAR ViridianMartParcelQuestText
- TX_SFX_KEY_ITEM
- db "@"
+ text_far ViridianMartParcelQuestText
+ sound_get_key_item
+ text_end
ViridianMartText2:
- TX_FAR _ViridianMartText2
- db "@"
+ text_far _ViridianMartText2
+ text_end
ViridianMartText3:
- TX_FAR _ViridianMartText3
- db "@"
+ text_far _ViridianMartText3
+ text_end
diff --git a/scripts/ViridianNicknameHouse.asm b/scripts/ViridianNicknameHouse.asm
index 000fe82b..df7482c2 100755
--- a/scripts/ViridianNicknameHouse.asm
+++ b/scripts/ViridianNicknameHouse.asm
@@ -8,15 +8,15 @@ ViridianNicknameHouse_TextPointers:
dw ViridianHouseText4
ViridianHouseText1:
- TX_FAR _ViridianHouseText1
- db "@"
+ text_far _ViridianHouseText1
+ text_end
ViridianHouseText2:
- TX_FAR _ViridianHouseText2
- db "@"
+ text_far _ViridianHouseText2
+ text_end
ViridianHouseText3:
- TX_ASM
+ text_asm
ld hl, ViridianHouseText_1d5b1
call PrintText
ld a, SPEAROW
@@ -25,9 +25,9 @@ ViridianHouseText3:
jp TextScriptEnd
ViridianHouseText_1d5b1:
- TX_FAR _ViridianHouseText_1d5b1
- db "@"
+ text_far _ViridianHouseText_1d5b1
+ text_end
ViridianHouseText4:
- TX_FAR _ViridianHouseText4
- db "@"
+ text_far _ViridianHouseText4
+ text_end
diff --git a/scripts/ViridianPokecenter.asm b/scripts/ViridianPokecenter.asm
index 5f324bf7..25f4d637 100755
--- a/scripts/ViridianPokecenter.asm
+++ b/scripts/ViridianPokecenter.asm
@@ -10,20 +10,20 @@ ViridianPokecenter_TextPointers:
dw ViridianPokeCenterText5
ViridianHealNurseText:
- TX_POKECENTER_NURSE
+ script_pokecenter_nurse
ViridianPokeCenterText2:
- TX_FAR _ViridianPokeCenterText2
- db "@"
+ text_far _ViridianPokeCenterText2
+ text_end
ViridianPokeCenterText3:
- TX_FAR _ViridianPokeCenterText3
- db "@"
+ text_far _ViridianPokeCenterText3
+ text_end
ViridianTradeNurseText:
- TX_CABLE_CLUB_RECEPTIONIST
+ script_cable_club_receptionist
ViridianPokeCenterText5:
- TX_ASM
- callab PokecenterChanseyText
+ text_asm
+ callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/ViridianSchoolHouse.asm b/scripts/ViridianSchoolHouse.asm
index ccfda145..77dffa38 100755
--- a/scripts/ViridianSchoolHouse.asm
+++ b/scripts/ViridianSchoolHouse.asm
@@ -8,15 +8,15 @@ ViridianSchoolHouse_TextPointers:
dw SchoolText3
SchoolText1:
- TX_FAR _SchoolText1
- db "@"
+ text_far _SchoolText1
+ text_end
SchoolText2:
- TX_ASM
- callba Func_f1c0f
+ text_asm
+ farcall Func_f1c0f
jp TextScriptEnd
SchoolText3:
- TX_ASM
- callba Func_f1c03
+ text_asm
+ farcall Func_f1c03
jp TextScriptEnd
diff --git a/scripts/ViridianSchoolHouse2.asm b/scripts/ViridianSchoolHouse2.asm
index 677a43ec..e5644830 100755
--- a/scripts/ViridianSchoolHouse2.asm
+++ b/scripts/ViridianSchoolHouse2.asm
@@ -1,17 +1,17 @@
-Func_f1c03:
+Func_f1c03::
ld hl, SchoolText_f1c0a
call PrintText
ret
SchoolText_f1c0a:
- TX_FAR _SchoolText3
- db "@"
+ text_far _SchoolText3
+ text_end
-Func_f1c0f:
+Func_f1c0f::
ld hl, SchoolText_f1c16
call PrintText
ret
SchoolText_f1c16:
- TX_FAR _SchoolText2
- db "@"
+ text_far _SchoolText2
+ text_end
diff --git a/scripts/WardensHouse.asm b/scripts/WardensHouse.asm
index 69e199c9..2dd0410c 100755
--- a/scripts/WardensHouse.asm
+++ b/scripts/WardensHouse.asm
@@ -9,93 +9,93 @@ WardensHouse_TextPointers:
dw FuchsiaHouse2Text5
FuchsiaHouse2Text1:
- TX_ASM
+ text_asm
CheckEvent EVENT_GOT_HM04
- jr nz, .subtract
+ jr nz, .got_item
ld b, GOLD_TEETH
call IsItemInBag
- jr nz, .asm_3f30f
+ jr nz, .have_gold_teeth
CheckEvent EVENT_GAVE_GOLD_TEETH
- jr nz, .asm_60cba
+ jr nz, .gave_gold_teeth
ld hl, WardenGibberishText1
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
ld hl, WardenGibberishText3
- jr nz, .asm_61238
+ jr nz, .refused
ld hl, WardenGibberishText2
-.asm_61238
+.refused
call PrintText
- jr .asm_52039
-.asm_3f30f
+ jr .done
+.have_gold_teeth
ld hl, WardenTeethText1
call PrintText
ld a, GOLD_TEETH
- ld [$ffdb], a
- callba RemoveItemByID
+ ldh [hItemToRemoveID], a
+ farcall RemoveItemByID
SetEvent EVENT_GAVE_GOLD_TEETH
-.asm_60cba
+.gave_gold_teeth
ld hl, WardenThankYouText
call PrintText
- lb bc, HM_04, 1
+ lb bc, HM_STRENGTH, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedHM04Text
call PrintText
SetEvent EVENT_GOT_HM04
- jr .asm_52039
-.subtract
+ jr .done
+.got_item
ld hl, HM04ExplanationText
call PrintText
- jr .asm_52039
-.BagFull
+ jr .done
+.bag_full
ld hl, HM04NoRoomText
call PrintText
-.asm_52039
+.done
jp TextScriptEnd
WardenGibberishText1:
- TX_FAR _WardenGibberishText1
- db "@"
+ text_far _WardenGibberishText1
+ text_end
WardenGibberishText2:
- TX_FAR _WardenGibberishText2
- db "@"
+ text_far _WardenGibberishText2
+ text_end
WardenGibberishText3:
- TX_FAR _WardenGibberishText3
- db "@"
+ text_far _WardenGibberishText3
+ text_end
WardenTeethText1:
- TX_FAR _WardenTeethText1
- TX_SFX_ITEM_1
+ text_far _WardenTeethText1
+ sound_get_item_1
WardenTeethText2:
- TX_FAR _WardenTeethText2
- db "@"
+ text_far _WardenTeethText2
+ text_end
WardenThankYouText:
- TX_FAR _WardenThankYouText
- db "@"
+ text_far _WardenThankYouText
+ text_end
ReceivedHM04Text:
- TX_FAR _ReceivedHM04Text
- TX_SFX_ITEM_1
- db "@"
+ text_far _ReceivedHM04Text
+ sound_get_item_1
+ text_end
HM04ExplanationText:
- TX_FAR _HM04ExplanationText
- db "@"
+ text_far _HM04ExplanationText
+ text_end
HM04NoRoomText:
- TX_FAR _HM04NoRoomText
- db "@"
+ text_far _HM04NoRoomText
+ text_end
FuchsiaHouse2Text5:
FuchsiaHouse2Text4:
- TX_ASM
- ld a, [H_SPRITEINDEX]
+ text_asm
+ ldh a, [hSpriteIndex]
cp $4
ld hl, FuchsiaHouse2Text_7517b
jr nz, .asm_4c9a2
@@ -105,9 +105,9 @@ FuchsiaHouse2Text4:
jp TextScriptEnd
FuchsiaHouse2Text_75176:
- TX_FAR _FuchsiaHouse2Text_75176
- db "@"
+ text_far _FuchsiaHouse2Text_75176
+ text_end
FuchsiaHouse2Text_7517b:
- TX_FAR _FuchsiaHouse2Text_7517b
- db "@"
+ text_far _FuchsiaHouse2Text_7517b
+ text_end
diff --git a/sram.asm b/sram.asm
index 966ccba3..07cfdfba 100644
--- a/sram.asm
+++ b/sram.asm
@@ -1,45 +1,45 @@
SECTION "Sprite Buffers", SRAM ; BANK 0
-sSpriteBuffer0:: ds SPRITEBUFFERSIZE ; a000
-sSpriteBuffer1:: ds SPRITEBUFFERSIZE ; a188
-sSpriteBuffer2:: ds SPRITEBUFFERSIZE ; a310
+sSpriteBuffer0:: ds SPRITEBUFFERSIZE
+sSpriteBuffer1:: ds SPRITEBUFFERSIZE
+sSpriteBuffer2:: ds SPRITEBUFFERSIZE
ds $100
-sHallOfFame:: ds HOF_TEAM * HOF_TEAM_CAPACITY ; a598
+sHallOfFame:: ds HOF_TEAM * HOF_TEAM_CAPACITY
SECTION "Save Data", SRAM ; BANK 1
ds $598
-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
+sPlayerName:: ds NAME_LENGTH
+sMainData:: ds wMainDataEnd - wMainDataStart
+sSpriteData:: ds wSpriteDataEnd - wSpriteDataStart
+sPartyData:: ds wPartyDataEnd - wPartyDataStart
+sCurBoxData:: ds wBoxDataEnd - wBoxDataStart
+sTilesetType:: ds 1
+sMainDataCheckSum:: ds 1
SECTION "Saved Boxes 1", SRAM ; BANK 2
-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
+sBox1:: ds wBoxDataEnd - wBoxDataStart
+sBox2:: ds wBoxDataEnd - wBoxDataStart
+sBox3:: ds wBoxDataEnd - wBoxDataStart
+sBox4:: ds wBoxDataEnd - wBoxDataStart
+sBox5:: ds wBoxDataEnd - wBoxDataStart
+sBox6:: ds wBoxDataEnd - wBoxDataStart
+sBank2AllBoxesChecksum:: ds 1
+sBank2IndividualBoxChecksums:: ds 6
SECTION "Saved Boxes 2", SRAM ; BANK 3
-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
+sBox7:: ds wBoxDataEnd - wBoxDataStart
+sBox8:: ds wBoxDataEnd - wBoxDataStart
+sBox9:: ds wBoxDataEnd - wBoxDataStart
+sBox10:: ds wBoxDataEnd - wBoxDataStart
+sBox11:: ds wBoxDataEnd - wBoxDataStart
+sBox12:: ds wBoxDataEnd - wBoxDataStart
+sBank3AllBoxesChecksum:: ds 1
+sBank3IndividualBoxChecksums:: ds 6
diff --git a/text.asm b/text.asm
index 8a67c231..3f76cc98 100644
--- a/text.asm
+++ b/text.asm
@@ -1,3399 +1,269 @@
-INCLUDE "charmap.asm"
-
-INCLUDE "constants/text_constants.asm"
-
-TEXT_1 EQU $20
-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"
-
-
-SECTION "Text 1", ROMX ; BANK $26
-
-_CardKeySuccessText1::
- text "Bingo!@@"
-
-_CardKeySuccessText2::
- text ""
- line "The CARD KEY"
- cont "opened the door!"
- done
-
-_CardKeyFailText::
- text "Darn! It needs a"
- line "CARD KEY!"
- done
-
-_TrainerNameText::
- TX_RAM wcd6d
- text ": @@"
-
-_NoNibbleText::
- text "Not even a nibble!"
- prompt
-
-_NothingHereText::
- text "Looks like there's"
- line "nothing here."
- prompt
-
-_ItsABiteText::
- text "Oh!"
- line "It's a bite!"
- prompt
-
-_ExclamationText::
- text "!"
- done
-
-_GroundRoseText::
- text "Ground rose up"
- line "somewhere!"
- done
-
-_BoulderText::
- text "This requires"
- line "STRENGTH to move!"
- done
-
-_MartSignText::
- text "All your item"
- line "needs fulfilled!"
- cont "#MON MART"
- done
-
-_PokeCenterSignText::
- text "Heal Your #MON!"
- line "#MON CENTER"
- done
-
-_FoundItemText::
- text "<PLAYER> found"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_NoMoreRoomForItemText::
- text "No more room for"
- line "items!"
- done
-
-_OaksAideHiText::
- text "Hi! Remember me?"
- line "I'm PROF.OAK's"
- cont "AIDE!"
-
- para "If you caught @"
- TX_NUM hOaksAideRequirement, 1, 3
- text ""
- line "kinds of #MON,"
- cont "I'm supposed to"
- cont "give you an"
- cont "@"
- TX_RAM wOaksAideRewardItemName
- text "!"
-
- para "So, <PLAYER>! Have"
- line "you caught at"
- cont "least @"
- TX_NUM hOaksAideRequirement, 1, 3
- text " kinds of"
- cont "#MON?"
- done
-
-_OaksAideUhOhText::
- text "Let's see..."
- line "Uh-oh! You have"
- cont "caught only @"
- TX_NUM hOaksAideNumMonsOwned, 1, 3
- text ""
- cont "kinds of #MON!"
-
- para "You need @"
- TX_NUM hOaksAideRequirement, 1, 3
- text " kinds"
- line "if you want the"
- cont "@"
- TX_RAM wOaksAideRewardItemName
- text "."
- done
-
-_OaksAideComeBackText::
- text "Oh. I see."
-
- para "When you get @"
- TX_NUM hOaksAideRequirement, 1, 3
- text ""
- line "kinds, come back"
- cont "for @"
- TX_RAM wOaksAideRewardItemName
- text "."
- done
-
-_OaksAideHereYouGoText::
- text "Great! You have"
- line "caught @"
- TX_NUM hOaksAideNumMonsOwned, 1, 3
- text " kinds "
- cont "of #MON!"
- cont "Congratulations!"
-
- para "Here you go!"
- prompt
-
-_OaksAideGotItemText::
- text "<PLAYER> got the"
- line "@"
- TX_RAM wOaksAideRewardItemName
- text "!@@"
-
-_OaksAideNoRoomText::
- text "Oh! I see you"
- line "don't have any"
- cont "room for the"
- cont "@"
- TX_RAM wOaksAideRewardItemName
- text "."
- done
-
-_NurseChanseyText::
- text "CHANSEY: Chaaan"
- line "sey!"
- done
-
-INCLUDE "text/maps/ViridianForest.asm"
-INCLUDE "text/maps/MtMoon1F.asm"
-INCLUDE "text/maps/MtMoonB1F.asm"
-INCLUDE "text/maps/MtMoonB2F.asm"
-INCLUDE "text/maps/SSAnne1F.asm"
-INCLUDE "text/maps/SSAnne2F.asm"
-INCLUDE "text/maps/SSAnne3F.asm"
-INCLUDE "text/maps/SSAnneBow.asm"
-INCLUDE "text/maps/SSAnneKitchen.asm"
-INCLUDE "text/maps/SSAnneCaptainsRoom.asm"
-INCLUDE "text/maps/SSAnne1FRooms.asm"
-INCLUDE "text/maps/SSAnne2FRooms.asm"
-INCLUDE "text/maps/SSAnneB1FRooms.asm"
-INCLUDE "text/maps/VictoryRoad3F.asm"
-INCLUDE "text/maps/RocketHideoutB1F.asm"
-INCLUDE "text/maps/RocketHideoutB2F.asm"
-INCLUDE "text/maps/RocketHideoutB3F.asm"
-INCLUDE "text/maps/RocketHideoutB4F.asm"
-INCLUDE "text/maps/RocketHideoutElevator.asm"
-INCLUDE "text/maps/SilphCo2F.asm"
-INCLUDE "text/maps/SilphCo3F.asm"
-INCLUDE "text/maps/SilphCo4F.asm"
-INCLUDE "text/maps/SilphCo5F.asm"
-INCLUDE "text/maps/SilphCo6F.asm"
-INCLUDE "text/maps/SilphCo7F.asm"
-INCLUDE "text/maps/SilphCo8F.asm"
-INCLUDE "text/maps/SilphCo9F.asm"
-INCLUDE "text/maps/SilphCo10F.asm"
-
-
-SECTION "Text 2", ROMX ; BANK $27
-
-INCLUDE "text/maps/SilphCo11F.asm"
-INCLUDE "text/maps/PokemonMansion2F.asm"
-INCLUDE "text/maps/PokemonMansion3F.asm"
-INCLUDE "text/maps/PokemonMansionB1F.asm"
-INCLUDE "text/maps/SafariZoneEast.asm"
-INCLUDE "text/maps/SafariZoneNorth.asm"
-INCLUDE "text/maps/SafariZoneWest.asm"
-INCLUDE "text/maps/SafariZoneCenter.asm"
-INCLUDE "text/maps/SafariZoneCenterRestHouse.asm"
-INCLUDE "text/maps/SafariZoneSecretHouse.asm"
-INCLUDE "text/maps/SafariZoneWestRestHouse.asm"
-INCLUDE "text/maps/SafariZoneEastRestHouse.asm"
-INCLUDE "text/maps/SafariZoneNorthRestHouse.asm"
-INCLUDE "text/maps/CeruleanCaveB1F.asm"
-INCLUDE "text/maps/VictoryRoad1F.asm"
-INCLUDE "text/maps/LancesRoom.asm"
-INCLUDE "text/maps/HallOfFame.asm"
-INCLUDE "text/maps/ChampionsRoom.asm"
-INCLUDE "text/maps/LoreleisRoom.asm"
-INCLUDE "text/maps/BrunosRoom.asm"
-INCLUDE "text/maps/AgathasRoom.asm"
-INCLUDE "text/maps/RockTunnelB1F.asm"
-INCLUDE "text/maps/SeafoamIslandsB4F.asm"
-
-_AIBattleWithdrawText::
- TX_RAM wTrainerName
- text " with-"
- line "drew @"
- TX_RAM wEnemyMonNick
- text "!"
- prompt
-
-_AIBattleUseItemText::
- TX_RAM wTrainerName
- text ""
- line "used @"
- TX_RAM wcd6d
- text ""
- cont "on @"
- TX_RAM wEnemyMonNick
- text "!"
- prompt
-
-_BoxFullTest::
- text "The BOX is full!"
- done
-
-_BoxWillBeClearedText::
- text "The BOX will be"
- line "cleared."
- done
-
-_TradeWentToText::
- TX_RAM wcf4b
- text " went"
- line "to @"
- TX_RAM wGrassRate
- text "."
- done
-
-_TradeForText::
- text "For <PLAYER>'s"
- line "@"
- TX_RAM wcf4b
- text ","
- done
-
-_TradeSendsText::
- TX_RAM wGrassRate
- text " sends"
- line "@"
- TX_RAM wcd6d
- text "."
- done
-
-_TradeWavesFarewellText::
- TX_RAM wGrassRate
- text " waves"
- line "farewell as"
- done
-
-_TradeTransferredText::
- TX_RAM wcd6d
- text " is"
- line "transferred."
- done
-
-_TradeTakeCareText::
- text "Take good care of"
- line "@"
- TX_RAM wcd6d
- text "."
- done
-
-_TradeWillTradeText::
- TX_RAM wGrassRate
- text " will"
- line "trade @"
- TX_RAM wcd6d
- text ""
- done
-
-_TradeforText::
- text "for <PLAYER>'s"
- line "@"
- TX_RAM wcf4b
- text "."
- done
-
-_PlaySlotMachineText::
- text "A slot machine!"
- line "Want to play?"
- done
-
-_OutOfCoinsSlotMachineText::
- text "Darn!"
- line "Ran out of coins!"
- done
-
-_BetHowManySlotMachineText::
- text "Bet how many"
- line "coins?"
- done
-
-_StartSlotMachineText::
- text "Start!"
- done
-
-_NotEnoughCoinsSlotMachineText::
- text "Not enough"
- line "coins!"
- prompt
-
-_OneMoreGoSlotMachineText::
- text "One more "
- line "go?"
- done
-
-_LinedUpText::
- text " lined up!"
- line "Scored @"
- TX_RAM wcf4b
- text " coins!"
- done
-
-_NotThisTimeText::
- text "Not this time!"
- prompt
-
-_YeahText::
- text "Yeah!@@"
-
-_DexSeenOwnedText::
- text "#DEX Seen:@"
- TX_NUM wDexRatingNumMonsSeen, 1, 3
- text ""
- line " Owned:@"
- TX_NUM wDexRatingNumMonsOwned, 1, 3
- db "@"
-
-_DexRatingText::
- text "#DEX Rating", $6d
- done
-
-_GymStatueText1::
- TX_RAM wGymCityName
- text ""
- line "#MON GYM"
- cont "LEADER: @"
- TX_RAM wGymLeaderName
- text ""
-
- para "WINNING TRAINERS:"
- line "<RIVAL>"
- done
-
-_GymStatueText2::
- TX_RAM wGymCityName
- text ""
- line "#MON GYM"
- cont "LEADER: @"
- TX_RAM wGymLeaderName
- text ""
-
- para "WINNING TRAINERS:"
- line "<RIVAL>"
- cont "<PLAYER>"
- done
-
-_ViridianCityPokecenterGuyText::
- text "#MON CENTERs"
- line "heal your tired,"
- cont "hurt or fainted"
- cont "#MON!"
- done
-
-_PewterCityPokecenterGuyText::
- text "Yawn!"
-
- para "When JIGGLYPUFF"
- line "sings, #MON"
- cont "get drowsy..."
-
- para "...Me too..."
- line "Snore..."
- done
-
-_CeruleanPokecenterGuyText::
- text "BILL has lots of"
- line "#MON!"
-
- para "He collects rare"
- line "ones too!"
- done
-
-_LavenderPokecenterGuyText::
- text "CUBONEs wear"
- line "skulls, right?"
-
- para "People will pay a"
- line "lot for one!"
- done
-
-_MtMoonPokecenterBenchGuyText::
- text "If you have too"
- line "many #MON, you"
- cont "should store them"
- cont "via PC!"
- done
-
-_RockTunnelPokecenterGuyText::
- text "I heard that"
- line "GHOSTs haunt"
- cont "LAVENDER TOWN!"
- done
-
-_UnusedBenchGuyText1::
- text "I wish I could"
- line "catch #MON."
- done
-
-_UnusedBenchGuyText2::
- text "I'm tired from"
- line "all the fun..."
- done
-
-_UnusedBenchGuyText3::
- text "SILPH's manager"
- line "is hiding in the"
- cont "SAFARI ZONE."
- done
-
-_VermilionPokecenterGuyText::
- text "It is true that a"
- line "higher level"
- cont "#MON will be"
- cont "more powerful..."
-
- para "But, all #MON"
- line "will have weak"
- cont "points against"
- cont "specific types."
-
- para "So, there is no"
- line "universally"
- cont "strong #MON."
- done
-
-_CeladonCityPokecenterGuyText::
- text "If I had a BIKE,"
- line "I would go to"
- cont "CYCLING ROAD!"
- done
-
-_FuchsiaCityPokecenterGuyText::
- text "If you're studying "
- line "#MON, visit"
- cont "the SAFARI ZONE."
-
- para "It has all sorts"
- line "of rare #MON."
- done
-
-_CinnabarPokecenterGuyText::
- text "#MON can still"
- line "learn techniques"
- cont "after canceling"
- cont "evolution."
-
- para "Evolution can wait"
- line "until new moves"
- cont "have been learned."
- done
-
-_SaffronCityPokecenterGuyText1::
- text "It would be great"
- line "if the ELITE FOUR"
- cont "came and stomped"
- cont "TEAM ROCKET!"
- done
-
-_SaffronCityPokecenterGuyText2::
- text "TEAM ROCKET took"
- line "off! We can go"
- cont "out safely again!"
- cont "That's great!"
- done
-
-_CeladonCityHotelText::
- text "My sis brought me"
- line "on this vacation!"
- done
-
-_BookcaseText::
- text "Crammed full of"
- line "#MON books!"
- done
-
-_NewBicycleText::
- text "A shiny new"
- line "BICYCLE!"
- done
-
-_PushStartText::
- text "Push START to"
- line "open the MENU!"
- done
-
-_SaveOptionText::
- text "The SAVE option is"
- line "on the MENU"
- cont "screen."
- done
-
-_StrengthsAndWeaknessesText::
- text "All #MON types"
- line "have strong and"
- cont "weak points"
- cont "against others."
- done
-
-_TimesUpText::
- text "PA: Ding-dong!"
-
- para "Time's up!"
- prompt
-
-_GameOverText::
- text "PA: Your SAFARI"
- line "GAME is over!"
- done
-
-_CinnabarGymQuizDummyIntroText::
- text "#MON Quiz!"
-
- para "Get it right and"
- line "the door opens to"
- cont "the next room!"
-
- para "Get it wrong and"
- line "face a trainer!"
-
- para "If you want to"
- line "conserve your"
- cont "#MON for the"
- cont "GYM LEADER..."
-
- para "Then get it right!"
- line "Here we go!"
- prompt
-
-_CinnabarGymQuizIntroText::
- text "#MON Quiz!"
-
- para "Get it right and"
- line "the door opens to"
- cont "the next room!"
-
- para "Get it wrong and"
- line "face the trainer"
- cont "blocking the way!"
-
- para "If you want to"
- line "conserve your"
- cont "#MON for the"
- cont "GYM LEADER..."
-
- para "Then get it right!"
- line "Here we go!"
- para ""
- done
-
-_CinnabarGymQuizShortIntroText::
- text "#MON Quiz!"
-
- line "Test your skill!"
- para ""
- done
-
-_CinnabarQuizQuestionsText1::
- text "CATERPIE evolves"
- line "into BUTTERFREE?"
- done
-
-_CinnabarQuizQuestionsText2::
- text "There are 9"
- line "certified #MON"
- cont "LEAGUE BADGEs?"
- done
-
-_CinnabarQuizQuestionsText3::
- text "POLIWAG evolves 3"
- line "times?"
- done
-
-_CinnabarQuizQuestionsText4::
- text "Are thunder moves"
- line "effective against"
- cont "ground element-"
- cont "type #MON?"
- done
-
-_CinnabarQuizQuestionsText5::
- text "#MON of the"
- line "same kind and"
- cont "level are not"
- cont "identical?"
- done
-
-_CinnabarQuizQuestionsText6::
- text "TM28 contains"
- line "TOMBSTONER?"
- done
-
-_CinnabarGymQuizCorrectText::
- text "You're absolutely"
- line "correct!"
-
- para "Go on through!@@"
-
-_CinnabarGymQuizIncorrectText::
- text "Sorry! Bad call!"
- prompt
-
-_MagazinesText::
- text "#MON magazines!"
-
- para "#MON notebooks!"
-
- para "#MON graphs!"
- done
-
-_BillsHouseMonitorText::
- text "TELEPORTER is"
- line "displayed on the"
- cont "PC monitor."
- done
-
-_BillsHouseInitiatedText::
- text "<PLAYER> initiated"
- line "TELEPORTER's Cell"
- cont "Separator!@@"
-
-_BillsHousePokemonListText1::
- text "BILL's favorite"
- line "#MON list!"
- prompt
-
-_BillsHousePokemonListText2::
- text "Which #MON do"
- line "you want to see?"
- done
-
-_OakLabEmailText::
- text "There's an e-mail"
- line "message here!"
-
- para "..."
-
- para "Calling all"
- line "#MON trainers!"
-
- para "The elite trainers"
- line "of #MON LEAGUE"
- cont "are ready to take"
- cont "on all comers!"
-
- para "Bring your best"
- line "#MON and see"
- cont "how you rate as a"
- cont "trainer!"
-
- para "#MON LEAGUE HQ"
- line "INDIGO PLATEAU"
-
- para "PS: PROF.OAK,"
- line "please visit us!"
- cont "..."
- done
-
-_GameCornerCoinCaseText::
- text "A COIN CASE is"
- line "required!"
- done
-
-_GameCornerNoCoinsText::
- text "You don't have"
- line "any coins!"
- done
-
-_GameCornerOutOfOrderText::
- text "OUT OF ORDER"
- line "This is broken."
- done
-
-_GameCornerOutToLunchText::
- text "OUT TO LUNCH"
- line "This is reserved."
- done
-
-_GameCornerSomeonesKeysText::
- text "Someone's keys!"
- line "They'll be back."
- done
-
-_JustAMomentText::
- text "Just a moment."
- done
-
-TMNotebookText::
- text "It's a pamphlet"
- line "on TMs."
-
- para "..."
-
- para "There are 50 TMs"
- line "in all."
-
- para "There are also 5"
- line "HMs that can be"
- cont "used repeatedly."
-
- para "SILPH CO.@@"
-
-_TurnPageText::
- text "Turn the page?"
- done
-
-_ViridianSchoolNotebookText5::
- text "GIRL: Hey! Don't"
- line "look at my notes!@@"
-
-_ViridianSchoolNotebookText1::
- text "Looked at the"
- line "notebook!"
-
- para "First page..."
-
- para "# BALLs are"
- line "used to catch"
- cont "#MON."
-
- para "Up to 6 #MON"
- line "can be carried."
-
- para "People who raise"
- line "and make #MON"
- cont "fight are called"
- cont "#MON trainers."
- prompt
-
-_ViridianSchoolNotebookText2::
- text "Second page..."
-
- para "A healthy #MON"
- line "may be hard to"
- cont "catch, so weaken"
- cont "it first!"
-
- para "Poison, burns and"
- line "other damage are"
- cont "effective!"
- prompt
-
-_ViridianSchoolNotebookText3::
- text "Third page..."
-
- para "#MON trainers"
- line "seek others to"
- cont "engage in #MON"
- cont "fights."
-
- para "Battles are"
- line "constantly fought"
- cont "at #MON GYMs."
- prompt
-
-_ViridianSchoolNotebookText4::
- text "Fourth page..."
-
- para "The goal for"
- line "#MON trainers"
- cont "is to beat the "
- cont "top 8 #MON"
- cont "GYM LEADERs."
-
- para "Do so to earn the"
- line "right to face..."
-
- para "The ELITE FOUR of"
- line "#MON LEAGUE!"
- prompt
-
-_EnemiesOnEverySideText::
- text "Enemies on every"
- line "side!"
- done
-
-_WhatGoesAroundComesAroundText::
- text "What goes around"
- line "comes around!"
- done
-
-_FightingDojoText::
- text "FIGHTING DOJO"
- done
-
-_IndigoPlateauHQText::
- text "INDIGO PLATEAU"
- line "#MON LEAGUE HQ"
- done
-
-_RedBedroomSNESText::
- text "<PLAYER> is"
- line "playing the SNES!"
- cont "...Okay!"
- cont "It's time to go!"
- done
-
-_Route15UpstairsBinocularsText::
- text "Looked into the"
- line "binoculars..."
-
- para "A large, shining"
- line "bird is flying"
- cont "toward the sea."
- done
-
-_AerodactylFossilText::
- text "AERODACTYL Fossil"
- line "A primitive and"
- cont "rare #MON."
- done
-
-_KabutopsFossilText::
- text "KABUTOPS Fossil"
- line "A primitive and"
- cont "rare #MON."
- done
-
-_FanClubPicture1Text::
- text "My cute RAPIDASH."
- done
-
-_FanClubPicture2Text::
- text "My beloved FEAROW."
- done
-
-_LinkCableHelpText1::
- text "TRAINER TIPS"
-
- para "Using a Game Link"
- line "Cable"
- prompt
-
-_LinkCableHelpText2::
- text "Which heading do"
- line "you want to read?"
- done
-
-_LinkCableInfoText1::
- text "When you have"
- line "linked your GAME"
- cont "BOY with another"
- cont "GAME BOY, talk to"
- cont "the attendant on"
- cont "the right in any"
- cont "#MON CENTER."
- prompt
-
-_LinkCableInfoText2::
- text "COLOSSEUM lets"
- line "you play against"
- cont "a friend."
- prompt
-
-_LinkCableInfoText3::
- text "TRADE CENTER is"
- line "used for trading"
- cont "#MON."
- prompt
-
-_ViridianSchoolBlackboardText1::
- text "The blackboard"
- line "describes #MON"
- cont "STATUS changes"
- cont "during battles."
- prompt
-
-_ViridianSchoolBlackboardText2::
- text "Which heading do"
- line "you want to read?"
- done
-
-_ViridianBlackboardSleepText::
- text "A #MON can't"
- line "attack if it's"
- cont "asleep!"
-
- para "#MON will stay"
- line "asleep even after"
- cont "battles."
-
- para "Use AWAKENING to"
- line "wake them up!"
- prompt
-
-_ViridianBlackboardPoisonText::
- text "When poisoned, a"
- line "#MON's health"
- cont "steadily drops."
-
- para "Poison lingers"
- line "after battles."
-
- para "Use an ANTIDOTE"
- line "to cure poison!"
- prompt
-
-_ViridianBlackboardPrlzText::
- text "Paralysis could"
- line "make #MON"
- cont "moves misfire!"
-
- para "Paralysis remains"
- line "after battles."
-
- para "Use PARLYZ HEAL"
- line "for treatment!"
- prompt
-
-_ViridianBlackboardBurnText::
- text "A burn reduces"
- line "power and speed."
- cont "It also causes"
- cont "ongoing damage."
-
- para "Burns remain"
- line "after battles."
-
- para "Use BURN HEAL to"
- line "cure a burn!"
- prompt
-
-_ViridianBlackboardFrozenText::
- text "If frozen, a"
- line "#MON becomes"
- cont "totally immobile!"
-
- para "It stays frozen"
- line "even after the"
- cont "battle ends."
-
- para "Use ICE HEAL to"
- line "thaw out #MON!"
- prompt
-
-_VermilionGymTrashText::
- text "Nope, there's"
- line "only trash here."
- done
-
-_VermilionGymTrashSuccessText1::
- text "Hey! There's a"
- line "switch under the"
- cont "trash!"
- cont "Turn it on!"
-
- para "The 1st electric"
- line "lock opened!@@"
-
-_VermilionGymTrashSuccessText2::
- text "Hey! There's"
- line "another switch"
- cont "under the trash!"
- cont "Turn it on!"
- prompt
-
-_VermilionGymTrashSuccessText3::
- text "The 2nd electric"
- line "lock opened!"
-
- para "The motorized door"
- line "opened!@@"
-
-_VermilionGymTrashFailText::
- text "Nope! There's"
- line "only trash here."
- cont "Hey! The electric"
- cont "locks were reset!@@"
-
-_FoundHiddenItemText::
- text "<PLAYER> found"
- line "@"
- TX_RAM wcd6d
- text "!@@"
-
-_HiddenItemBagFullText::
- text "But, <PLAYER> has"
- line "no more room for"
- cont "other items!"
- done
-
-_FoundHiddenCoinsText::
- text "<PLAYER> found"
- line "@"
- TX_BCD hCoins, 2 | LEADING_ZEROES | LEFT_ALIGN
- text " coins!@@"
-
-_FoundHiddenCoins2Text::
- text "<PLAYER> found"
- line "@"
- TX_BCD hCoins, 2 | LEADING_ZEROES | LEFT_ALIGN
- text " coins!@@"
-
-_DroppedHiddenCoinsText::
- text ""
- para "Oops! Dropped"
- line "some coins!"
- done
-
-_IndigoPlateauStatuesText1::
- text "INDIGO PLATEAU"
- prompt
-
-_IndigoPlateauStatuesText2::
- text "The ultimate goal"
- line "of trainers!"
- cont "#MON LEAGUE HQ"
- done
-
-_IndigoPlateauStatuesText3::
- text "The highest"
- line "#MON authority"
- cont "#MON LEAGUE HQ"
- done
-
-_PokemonBooksText::
- text "Crammed full of"
- line "#MON books!"
- done
-
-_DiglettSculptureText::
- text "It's a sculpture"
- line "of DIGLETT."
- done
-
-_ElevatorText::
- text "This is an"
- line "elevator."
- done
-
-_TownMapText::
- text "A TOWN MAP.@@"
-
-_PokemonStuffText::
- text "Wow! Tons of"
- line "#MON stuff!"
- done
-
-_OutOfSafariBallsText::
- text "PA: Ding-dong!"
-
- para "You are out of"
- line "SAFARI BALLs!"
- prompt
-
-_WildRanText::
- text "Wild @"
- TX_RAM wEnemyMonNick
- text ""
- line "ran!"
- prompt
-
-_EnemyRanText::
- text "Enemy @"
- TX_RAM wEnemyMonNick
- text ""
- line "ran!"
- prompt
-
-_HurtByPoisonText::
- text "<USER>'s"
- line "hurt by poison!"
- prompt
-
-_HurtByBurnText::
- text "<USER>'s"
- line "hurt by the burn!"
- prompt
-
-_HurtByLeechSeedText::
- text "LEECH SEED saps"
- line "<USER>!"
- prompt
-
-_EnemyMonFaintedText::
- text "Enemy @"
- TX_RAM wEnemyMonNick
- text ""
- line "fainted!"
- prompt
-
-_MoneyForWinningText::
- text "<PLAYER> got ¥@"
- TX_BCD wAmountMoneyWon, 3 | LEADING_ZEROES | LEFT_ALIGN
- text ""
- line "for winning!"
- prompt
-
-_TrainerDefeatedText::
- text "<PLAYER> defeated"
- line "@"
- TX_RAM wTrainerName
- text "!"
- prompt
-
-_PlayerMonFaintedText::
- TX_RAM wBattleMonNick
- text ""
- line "fainted!"
- prompt
-
-_UseNextMonText::
- text "Use next #MON?"
- done
-
-_Sony1WinText::
- text "<RIVAL>: Yeah! Am"
- line "I great or what?"
- prompt
-
-_PlayerBlackedOutText2::
- text "<PLAYER> is out of"
- line "useable #MON!"
-
- para "<PLAYER> blacked"
- line "out!"
- prompt
-
-_LinkBattleLostText::
- text "<PLAYER> lost to"
- line "@"
- TX_RAM wTrainerName
- text "!"
- prompt
-
-_TrainerAboutToUseText::
- TX_RAM wTrainerName
- text " is"
- line "about to use"
- cont"@"
- TX_RAM wEnemyMonNick
- text "!"
-
- para "Will <PLAYER>"
- line "change #MON?"
- done
-
-_TrainerSentOutText::
- TX_RAM wTrainerName
- text " sent"
- line "out @"
- TX_RAM wEnemyMonNick
- text "!"
- done
-
-_NoWillText::
- text "There's no will"
- line "to fight!"
- prompt
-
-_CantEscapeText::
- text "Can't escape!"
- prompt
-
-_NoRunningText::
- text "No! There's no"
- line "running from a"
- cont "trainer battle!"
- prompt
-
-_GotAwayText::
- text "Got away safely!"
- prompt
-
-_RunAwayText::
- text "Hurry, get away!"
- prompt
-
-_ItemsCantBeUsedHereText::
- text "Items can't be"
- line "used here."
- prompt
-
-_AlreadyOutText::
- TX_RAM wBattleMonNick
- text " is"
- line "already out!"
- prompt
-
-_MoveNoPPText::
- text "No PP left for"
- line "this move!"
- prompt
-
-_MoveDisabledText::
- text "The move is"
- line "disabled!"
- prompt
-
-_NoMovesLeftText::
- TX_RAM wBattleMonNick
- text " has no"
- line "moves left!"
- done
-
-_MultiHitText::
- text "Hit the enemy"
- line "@"
- TX_NUM wPlayerNumHits, 1, 1
- text " times!"
- prompt
-
-_ScaredText::
- TX_RAM wBattleMonNick
- text " is too"
- line "scared to move!"
- prompt
-
-_GetOutText::
- text "GHOST: Get out..."
- line "Get out..."
- prompt
-
-_FastAsleepText::
- text "<USER>"
- line "is fast asleep!"
- prompt
-
-_WokeUpText::
- text "<USER>"
- line "woke up!"
- prompt
-
-_IsFrozenText::
- text "<USER>"
- line "is frozen solid!"
- prompt
-
-_FullyParalyzedText::
- text "<USER>'s"
- line "fully paralyzed!"
- prompt
-
-_FlinchedText::
- text "<USER>"
- line "flinched!"
- prompt
-
-_MustRechargeText::
- text "<USER>"
- line "must recharge!"
- prompt
-
-_DisabledNoMoreText::
- text "<USER>'s"
- line "disabled no more!"
- prompt
-
-_IsConfusedText::
- text "<USER>"
- line "is confused!"
- prompt
-
-_HurtItselfText::
- text "It hurt itself in"
- line "its confusion!"
- prompt
-
-_ConfusedNoMoreText::
- text "<USER>'s"
- line "confused no more!"
- prompt
-
-_SavingEnergyText::
- text "<USER>"
- line "is saving energy!"
- prompt
-
-_UnleashedEnergyText::
- text "<USER>"
- line "unleashed energy!"
- prompt
-
-_ThrashingAboutText::
- text "<USER>'s"
- line "thrashing about!"
- done
-
-_AttackContinuesText::
- text "<USER>'s"
- line "attack continues!"
- done
-
-_CantMoveText::
- text "<USER>"
- line "can't move!"
- prompt
-
-_MoveIsDisabledText::
- text "<USER>'s"
- line "@"
- TX_RAM wcd6d
- text " is"
- cont "disabled!"
- prompt
-
-_MonName1Text::
- text "<USER>@@"
-
-_Used1Text::
- text ""
- line "used @@"
-
-_Used2Text::
- text ""
- line "used @@"
-
-_InsteadText::
- text "instead,"
- cont "@@"
-
-_CF4BText::
- TX_RAM wcf4b
- text "@"
-
-_ExclamationPoint1Text::
- text "!"
- done
-
-_ExclamationPoint2Text::
- text "!"
- done
-
-_ExclamationPoint3Text::
- text "!"
- done
-
-_ExclamationPoint4Text::
- text "!"
- done
-
-_ExclamationPoint5Text::
- text "!"
- done
-
-_AttackMissedText::
- text "<USER>'s"
- line "attack missed!"
- prompt
-
-_KeptGoingAndCrashedText::
- text "<USER>"
- line "kept going and"
- cont "crashed!"
- prompt
-
-_UnaffectedText::
- text "<TARGET>'s"
- line "unaffected!"
- prompt
-
-_DoesntAffectMonText::
- text "It doesn't affect"
- line "<TARGET>!"
- prompt
-
-_CriticalHitText::
- text "Critical hit!"
- prompt
-
-_OHKOText::
- text "One-hit KO!"
- prompt
-
-_LoafingAroundText::
- TX_RAM wBattleMonNick
- text " is"
- line "loafing around."
- prompt
-
-_BeganToNapText::
- TX_RAM wBattleMonNick
- text " began"
- line "to nap!"
- prompt
-
-_WontObeyText::
- TX_RAM wBattleMonNick
- text " won't"
- line "obey!"
- prompt
-
-_TurnedAwayText::
- TX_RAM wBattleMonNick
- text " turned"
- line "away!"
- prompt
-
-_IgnoredOrdersText::
- TX_RAM wBattleMonNick
- text ""
- line "ignored orders!"
- prompt
-
-_SubstituteTookDamageText::
- text "The SUBSTITUTE"
- line "took damage for"
- cont "<TARGET>!"
- prompt
-
-_SubstituteBrokeText::
- text "<TARGET>'s"
- line "SUBSTITUTE broke!"
- prompt
-
-_BuildingRageText::
- text "<USER>'s"
- line "RAGE is building!"
- prompt
-
-_MirrorMoveFailedText::
- text "The MIRROR MOVE"
- next "failed!"
- prompt
-
-_HitXTimesText::
- text "Hit @"
- TX_NUM wEnemyNumHits, 1, 1
- text " times!"
- prompt
-
-_GainedText::
- TX_RAM wcd6d
- text " gained"
- line "@@"
-
-_WithExpAllText::
- text "with EXP.ALL,"
- cont "@@"
-
-_BoostedText::
- text "a boosted"
- cont "@@"
-
-_ExpPointsText::
- TX_NUM wExpAmountGained, 2, 4
- text " EXP. Points!"
- prompt
-
-_GrewLevelText::
- TX_RAM wcd6d
- text " grew"
- line "to level @"
- TX_NUM wCurEnemyLVL, 1, 3
- text "!@@"
-
-_SuperEffectiveText::
- text "It's super"
- line "effective!"
- prompt
-
-_NotVeryEffectiveText::
- text "It's not very"
- line "effective..."
- prompt
-
-_SafariZoneEatingText::
- text "Wild @"
- TX_RAM wEnemyMonNick
- text ""
- line "is eating!"
- prompt
-
-_SafariZoneAngryText::
- text "Wild @"
- TX_RAM wEnemyMonNick
- text ""
- line "is angry!"
- prompt
-
-_WildMonAppearedText::
- text "Wild @"
- TX_RAM wEnemyMonNick
- text ""
- line "appeared!"
- prompt
-
-_HookedMonAttackedText::
- text "The hooked"
- line "@"
- TX_RAM wEnemyMonNick
- text ""
- cont "attacked!"
- prompt
-
-
-SECTION "Text 3", ROMX ; BANK $28
-
-_EnemyAppearedText::
- TX_RAM wEnemyMonNick
- text ""
- line "appeared!"
- prompt
-
-_TrainerWantsToFightText::
- TX_RAM wTrainerName
- text " wants"
- line "to fight!"
- prompt
-
-_UnveiledGhostText::
- text "SILPH SCOPE"
- line "unveiled the"
- cont "GHOST's identity!"
- prompt
-
-_GhostCantBeIDdText::
- text "Darn! The GHOST"
- line "can't be ID'd!"
- prompt
-
-_GoText::
- text "Go! @@"
-
-_DoItText::
- text "Do it! @@"
-
-_GetmText::
- text "Get'm! @@"
-
-_EnemysWeakText::
- text "The enemy's weak!"
- line "Get'm! @@"
-
-_PlayerMon1Text::
- TX_RAM wBattleMonNick
- text "!"
- done
-
-_PlayerMon2Text::
- TX_RAM wBattleMonNick
- text " @@"
-
-_EnoughText::
- text "enough!@@"
-
-_OKExclamationText::
- text "OK!@@"
-
-_GoodText::
- text "good!@@"
-
-_ComeBackText::
- text ""
- line "Come back!"
- done
-
-; money related
-_PickUpPayDayMoneyText::
- text "<PLAYER> picked up"
- line "¥@"
- TX_BCD wTotalPayDayMoney, 3 | LEADING_ZEROES | LEFT_ALIGN
- text "!"
- prompt
-
-_ClearSaveDataText::
- text "Clear all saved"
- line "data?"
- done
-
-_WhichFloorText::
- text "Which floor do"
- line "you want? "
- done
-
-_SleepingPikachuText1::
- text "There isn't any"
- line "response..."
- prompt
-
-_PartyMenuNormalText::
- text "Choose a #MON."
- done
-
-_PartyMenuItemUseText::
- text "Use item on which"
- line "#MON?"
- done
-
-_PartyMenuBattleText::
- text "Bring out which"
- line "#MON?"
- done
-
-_PartyMenuUseTMText::
- text "Teach to which"
- line "#MON?"
- done
-
-_PartyMenuSwapMonText::
- text "Move #MON"
- line "where?"
- done
-
-_PotionText::
- TX_RAM wcd6d
- text ""
- line "recovered by @"
- TX_NUM wHPBarHPDifference, 2, 3
- text "!"
- done
-
-_AntidoteText::
- TX_RAM wcd6d
- text " was"
- line "cured of poison!"
- done
-
-_ParlyzHealText::
- TX_RAM wcd6d
- text "'s"
- line "rid of paralysis!"
- done
-
-_BurnHealText::
- TX_RAM wcd6d
- text "'s"
- line "burn was healed!"
- done
-
-_IceHealText::
- TX_RAM wcd6d
- text " was"
- line "defrosted!"
- done
-
-_AwakeningText::
- TX_RAM wcd6d
- text ""
- line "woke up!"
- done
-
-_FullHealText::
- TX_RAM wcd6d
- text "'s"
- line "health returned!"
- done
-
-_ReviveText::
- TX_RAM wcd6d
- text ""
- line "is revitalized!"
- done
-
-_RareCandyText::
- TX_RAM wcd6d
- text " grew"
- line "to level @"
- TX_NUM wCurEnemyLVL, 1, 3
- text "!@@"
-
-_TurnedOnPC1Text::
- text "<PLAYER> turned on"
- line "the PC."
- prompt
-
-_AccessedBillsPCText::
- text "Accessed BILL's"
- line "PC."
-
- para "Accessed #MON"
- line "Storage System."
- prompt
-
-_AccessedSomeonesPCText::
- text "Accessed someone's"
- line "PC."
-
- para "Accessed #MON"
- line "Storage System."
- prompt
-
-_AccessedMyPCText::
- text "Accessed my PC."
-
- para "Accessed Item"
- line "Storage System."
- prompt
-
-_TurnedOnPC2Text::
- text "<PLAYER> turned on"
- line "the PC."
- prompt
-
-_WhatDoYouWantText::
- text "What do you want"
- line "to do?"
- done
-
-_WhatToDepositText::
- text "What do you want"
- line "to deposit?"
- done
-
-_DepositHowManyText::
- text "How many?"
- done
-
-_ItemWasStoredText::
- TX_RAM wcd6d
- text " was"
- line "stored via PC."
- prompt
-
-_NothingToDepositText::
- text "You have nothing"
- line "to deposit."
- prompt
-
-_NoRoomToStoreText::
- text "No room left to"
- line "store items."
- prompt
-
-_WhatToWithdrawText::
- text "What do you want"
- line "to withdraw?"
- done
-
-_WithdrawHowManyText::
- text "How many?"
- done
-
-_WithdrewItemText::
- text "Withdrew"
- line "@"
- TX_RAM wcd6d
- text "."
- prompt
-
-_NothingStoredText::
- text "There is nothing"
- line "stored."
- prompt
-
-_CantCarryMoreText::
- text "You can't carry"
- line "any more items."
- prompt
-
-_WhatToTossText::
- text "What do you want"
- line "to toss away?"
- done
-
-_TossHowManyText::
- text "How many?"
- done
-
-_AccessedHoFPCText::
- text "Accessed #MON"
- line "LEAGUE's site."
-
- para "Accessed the HALL"
- line "OF FAME List."
- prompt
-
-_SleepingPikachuText2::
- text "There isn't any"
- line "response..."
- prompt
-
-_SwitchOnText::
- text "Switch on!"
- prompt
-
-_WhatText::
- text "What?"
- done
-
-_DepositWhichMonText::
- text "Deposit which"
- line "#MON?"
- done
-
-_MonWasStoredText::
- TX_RAM wcf4b
- text " was"
- line "stored in Box @"
- TX_RAM wBoxNumString
- text "."
- prompt
-
-_CantDepositLastMonText::
- text "You can't deposit"
- line "the last #MON!"
- prompt
-
-_BoxFullText::
- text "Oops! This Box is"
- line "full of #MON."
- prompt
-
-_MonIsTakenOutText::
- TX_RAM wcf4b
- text " is"
- line "taken out."
- cont "Got @"
- TX_RAM wcf4b
- text "."
- prompt
-
-_NoMonText::
- text "What? There are"
- line "no #MON here!"
- prompt
-
-_CantTakeMonText::
- text "You can't take"
- line "any more #MON."
-
- para "Deposit #MON"
- line "first."
- prompt
-
-_PikachuUnhappyText::
- TX_RAM wcd6d
- text " looks"
- line "unhappy about it!"
- prompt
-
-_ReleaseWhichMonText::
- text "Release which"
- line "#MON?"
- done
-
-_OnceReleasedText::
- text "Once released,"
- line "@"
- TX_RAM wcf4b
- text " is"
- cont "gone forever. OK?"
- done
-
-_MonWasReleasedText::
- TX_RAM wcf4b
- text " was"
- line "released outside."
- cont "Bye @"
-
-_CF4BExclamationText::
- TX_RAM wcf4b
- text "!"
- prompt
-
-_RequireCoinCaseText::
- text "A COIN CASE is"
- line "required!@@"
-
-_ExchangeCoinsForPrizesText::
- text "We exchange your"
- line "coins for prizes."
- prompt
-
-_WhichPrizeText::
- text "Which prize do"
- line "you want?"
- done
-
-_HereYouGoText::
- text "Here you go!@@"
-
-_SoYouWantPrizeText::
- text "So, you want"
- line "@"
- TX_RAM wcd6d
- text "?"
- done
-
-_SorryNeedMoreCoinsText::
- text "Sorry, you need"
- line "more coins.@@"
-
-_OopsYouDontHaveEnoughRoomText::
- text "Oops! You don't"
- line "have enough room.@@"
-
-_OhFineThenText::
- text "Oh, fine then.@@"
-
-_GetDexRatedText::
- text "Want to get your"
- line "#DEX rated?"
- done
-
-_ClosedOaksPCText::
- text "Closed link to"
- line "PROF.OAK's PC.@@"
-
-_AccessedOaksPCText::
- text "Accessed PROF."
- line "OAK's PC."
-
- para "Accessed #DEX"
- line "Rating System."
- prompt
-
-_ExpressionText::
- text "This expression is"
- line "No. @"
- TX_NUM wExpressionNumber, 1, 2
- text "."
- prompt
-
-_NotEnoughMemoryText::
- text "Not enough Yellow"
- line "Version memory."
- done
-
-INCLUDE "text/oakspeech.asm"
-
-_DoYouWantToNicknameText::
- text "Do you want to"
- line "give a nickname"
- cont "to @"
- TX_RAM wcd6d
- text "?"
- done
-
-_YourNameIsText::
- text "Right! So your"
- line "name is <PLAYER>!"
- prompt
-
-_HisNameIsText::
- text "That's right! I"
- line "remember now! His"
- cont "name is <RIVAL>!"
- prompt
-
-_WillBeTradedText::
- TX_RAM wNameOfPlayerMonToBeTraded
- text " and"
- line "@"
- TX_RAM wcd6d
- text " will"
- cont "be traded."
- done
-
-_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 wcd6d
- text " is over"
- line "6′8″ tall!"
- prompt
-
-_ColosseumWeightText::
- TX_RAM wcd6d
- text " weighs"
- line "over 44 pounds!"
- prompt
-
-_ColosseumEvolvedText::
- TX_RAM wcd6d
- text " is an"
- line "evolved #MON!"
- prompt
-
-_ColosseumIneligibleText::
- text "Your opponent is"
- line "ineligible."
- prompt
-
-_ColosseumWhereToText::
- text "Where would you"
- line "like to go?"
- done
-
-_ColosseumPleaseWaitText::
- text "OK, please wait"
- line "just a moment."
- done
-
-_ColosseumCanceledText::
- text "The link was"
- line "canceled."
- done
-
-_ColosseumVersionText::
- text "The game versions"
- line "don't match."
- prompt
-
-_Char00Text::
- TX_NUM hSpriteIndexOrTextID, 1, 2
- text " error."
- done
-
-_Char55Text::
- text $4B, "@@"
-
-_NoPokemonText::
- text "There are no"
- line "#MON here!"
- prompt
-
-INCLUDE "text/maps/DiglettsCaveRoute2.asm"
-INCLUDE "text/maps/ViridianForestNorthGate.asm"
-INCLUDE "text/maps/Route2TradeHouse.asm"
-INCLUDE "text/maps/Route2Gate.asm"
-INCLUDE "text/maps/ViridianForestSouthGate.asm"
-INCLUDE "text/maps/MtMoonPokecenter.asm"
-INCLUDE "text/maps/SaffronGates.asm"
-INCLUDE "text/maps/Daycare.asm"
-INCLUDE "text/maps/UndergroundPathRoute6.asm"
-INCLUDE "text/maps/UndergroundPathRoute7.asm"
-INCLUDE "text/maps/UndergroundPathRoute7Copy.asm"
-INCLUDE "text/maps/UndergroundPathRoute8.asm"
-INCLUDE "text/maps/RockTunnelPokecenter.asm"
-INCLUDE "text/maps/RockTunnel1F.asm"
-INCLUDE "text/maps/PowerPlant.asm"
-INCLUDE "text/maps/Route11Gate1F.asm"
-INCLUDE "text/maps/Route11Gate2F.asm"
-INCLUDE "text/maps/DiglettsCaveRoute11.asm"
-INCLUDE "text/maps/Route12Gate1F.asm"
-INCLUDE "text/maps/Route12Gate2F.asm"
-INCLUDE "text/maps/Route12SuperRodHouse.asm"
-INCLUDE "text/maps/Route15Gate1F.asm"
-INCLUDE "text/maps/Route15Gate2F.asm"
-INCLUDE "text/maps/Route16Gate1F.asm"
-INCLUDE "text/maps/Route16Gate2F.asm"
-INCLUDE "text/maps/Route16FlyHouse.asm"
-INCLUDE "text/maps/Route18Gate1F.asm"
-INCLUDE "text/maps/Route18Gate2F.asm"
-INCLUDE "text/maps/BeachHouse.asm"
-INCLUDE "text/maps/Route22Gate.asm"
-INCLUDE "text/maps/VictoryRoad2F.asm"
-INCLUDE "text/maps/BillsHouse.asm"
-INCLUDE "text/maps/Route1.asm"
-INCLUDE "text/maps/Route2.asm"
-INCLUDE "text/maps/Route3.asm"
-INCLUDE "text/maps/Route4.asm"
-INCLUDE "text/maps/Route5.asm"
-INCLUDE "text/maps/Route6.asm"
-INCLUDE "text/maps/Route7.asm"
-INCLUDE "text/maps/Route8.asm"
-INCLUDE "text/maps/Route9.asm"
-
-
-SECTION "Text 4", ROMX ; BANK $29
-
-INCLUDE "text/maps/Route9_2.asm"
-INCLUDE "text/maps/Route10.asm"
-INCLUDE "text/maps/Route11.asm"
-INCLUDE "text/maps/Route12.asm"
-INCLUDE "text/maps/Route13.asm"
-INCLUDE "text/maps/Route14.asm"
-INCLUDE "text/maps/Route15.asm"
-INCLUDE "text/maps/Route16.asm"
-INCLUDE "text/maps/Route17.asm"
-INCLUDE "text/maps/Route18.asm"
-INCLUDE "text/maps/Route19.asm"
-INCLUDE "text/maps/Route20.asm"
-INCLUDE "text/maps/Route21.asm"
-INCLUDE "text/maps/Route22.asm"
-INCLUDE "text/maps/Route23.asm"
-INCLUDE "text/maps/Route24.asm"
-INCLUDE "text/maps/Route25.asm"
-
-_FileDataDestroyedText::
- text "The file data is"
- line "destroyed!"
- prompt
-
-_WouldYouLikeToSaveText::
- text "Would you like to"
- line "SAVE the game?"
- done
-
-_SavingText::
- text "Saving..."
- done
-
-_GameSavedText::
- text "<PLAYER> saved"
- line "the game!"
- done
-
-_OlderFileWillBeErasedText::
- text "The older file"
- line "will be erased to"
- cont "save. Okay?"
- done
-
-_WhenYouChangeBoxText::
- text "When you change a"
- line "#MON BOX, data"
- cont "will be saved."
-
- para "Is that okay?"
- done
-
-_ChooseABoxText::
- text "Choose a"
- line "<pkmn> BOX.@@"
-
-_EvolvedText::
- TX_RAM wcf4b
- text " evolved"
- done
-
-_IntoText::
- text ""
- line "into @"
- TX_RAM wcd6d
- text "!"
- done
-
-_StoppedEvolvingText::
- text "Huh? @"
- TX_RAM wcf4b
- text ""
- line "stopped evolving!"
- prompt
-
-
-SECTION "Text 5", ROMX ; BANK $2a
-
-_IsEvolvingText::
- text "What? @"
- TX_RAM wcf4b
- text ""
- line "is evolving!"
- done
-
-_FellAsleepText::
- text "<TARGET>"
- line "fell asleep!"
- prompt
-
-_AlreadyAsleepText::
- text "<TARGET>'s"
- line "already asleep!"
- prompt
-
-_PoisonedText::
- text "<TARGET>"
- line "was poisoned!"
- prompt
-
-_BadlyPoisonedText::
- text "<TARGET>'s"
- line "badly poisoned!"
- prompt
-
-_BurnedText::
- text "<TARGET>"
- line "was burned!"
- prompt
-
-_FrozenText::
- text "<TARGET>"
- line "was frozen solid!"
- prompt
-
-_FireDefrostedText::
- text "Fire defrosted"
- line "<TARGET>!"
- prompt
-
-_MonsStatsRoseText::
- text "<USER>'s"
- line "@"
- TX_RAM wcf4b
- text "@@"
-
-_GreatlyRoseText::
- text $4c, "greatly@@"
-
-_RoseText::
- text " rose!"
- prompt
-
-_MonsStatsFellText::
- text "<TARGET>'s"
- line "@"
- TX_RAM wcf4b
- text "@@"
-
-_GreatlyFellText::
- text $4c, "greatly@@"
-
-_FellText::
- text " fell!"
- prompt
-
-_RanFromBattleText::
- text "<USER>"
- line "ran from battle!"
- prompt
-
-_RanAwayScaredText::
- text "<TARGET>"
- line "ran away scared!"
- prompt
-
-_WasBlownAwayText::
- text "<TARGET>"
- line "was blown away!"
- prompt
-
-_ChargeMoveEffectText::
- text "<USER>@@"
-
-_MadeWhirlwindText::
- text ""
- line "made a whirlwind!"
- prompt
-
-_TookInSunlightText::
- text ""
- line "took in sunlight!"
- prompt
-
-_LoweredItsHeadText::
- text ""
- line "lowered its head!"
- prompt
-
-_SkyAttackGlowingText::
- text ""
- line "is glowing!"
- prompt
-
-_FlewUpHighText::
- text ""
- line "flew up high!"
- prompt
-
-_DugAHoleText::
- text ""
- line "dug a hole!"
- prompt
-
-_BecameConfusedText::
- text "<TARGET>"
- line "became confused!"
- prompt
-
-_MimicLearnedMoveText::
- text "<USER>"
- line "learned"
- cont "@"
- TX_RAM wcd6d
- text "!"
- prompt
-
-_MoveWasDisabledText::
- text "<TARGET>'s"
- line "@"
- TX_RAM wcd6d
- text " was"
- cont "disabled!"
- prompt
-
-_NothingHappenedText::
- text "Nothing happened!"
- prompt
-
-_NoEffectText::
- text "No effect!"
- prompt
-
-_ButItFailedText::
- text "But, it failed! "
- prompt
-
-_DidntAffectText::
- text "It didn't affect"
- line "<TARGET>!"
- prompt
-
-_IsUnaffectedText::
- text "<TARGET>"
- line "is unaffected!"
- prompt
-
-_ParalyzedMayNotAttackText::
- text "<TARGET>'s"
- line "paralyzed! It may"
- cont "not attack!"
- prompt
-
-_SubstituteText::
- text "It created a"
- line "SUBSTITUTE!"
- prompt
-
-_HasSubstituteText::
- text "<USER>"
- line "has a SUBSTITUTE!"
- prompt
-
-_TooWeakSubstituteText::
- text "Too weak to make"
- line "a SUBSTITUTE!"
- prompt
-
-_WasSeededText::
- text "<TARGET>"
- line "was seeded!"
- prompt
-
-_EvadedAttackText::
- text "<TARGET>"
- line "evaded attack!"
- prompt
-
-_HitWithRecoilText::
- text "<USER>'s"
- line "hit with recoil!"
- prompt
-
-_ConvertedTypeText::
- text "Converted type to"
- line "<TARGET>'s!"
- prompt
-
-_StatusChangesEliminatedText::
- text "All STATUS changes"
- line "are eliminated!"
- prompt
-
-_GettingPumpedText::
- text "<USER>'s"
- line "getting pumped!"
- prompt
-
-_StartedSleepingEffect::
- text "<USER>"
- line "started sleeping!"
- done
-
-_FellAsleepBecameHealthyText::
- text "<USER>"
- line "fell asleep and"
- cont "became healthy!"
- done
-
-_RegainedHealthText::
- text "<USER>"
- line "regained health!"
- prompt
-
-_TransformedText::
- text "<USER>"
- line "transformed into"
- cont "@"
- TX_RAM wcd6d
- text "!"
- prompt
-
-_LightScreenProtectedText::
- text "<USER>'s"
- line "protected against"
- cont "special attacks!"
- prompt
-
-_ReflectGainedArmorText::
- text "<USER>"
- line "gained armor!"
- prompt
-
-_ShroudedInMistText::
- text "<USER>'s"
- line "shrouded in mist!"
- prompt
-
-_CoinsScatteredText::
- text "Coins scattered"
- line "everywhere!"
- prompt
-
-_SuckedHealthText::
- text "Sucked health from"
- line "<TARGET>!"
- prompt
-
-_DreamWasEatenText::
- text "<TARGET>'s"
- line "dream was eaten!"
- prompt
-
-_TradeCenterText1::
- text "!"
- done
-
-_ColosseumText1::
- text "!"
- done
-
-INCLUDE "text/maps/RedsHouse1F.asm"
-INCLUDE "text/maps/BluesHouse.asm"
-INCLUDE "text/maps/OaksLab.asm"
+INCLUDE "constants.asm"
+
+
+SECTION "Text 1", ROMX
+
+INCLUDE "data/text/text_1.asm"
+
+INCLUDE "text/ViridianForest.asm"
+INCLUDE "text/MtMoon1F.asm"
+INCLUDE "text/MtMoonB1F.asm"
+INCLUDE "text/MtMoonB2F.asm"
+INCLUDE "text/SSAnne1F.asm"
+INCLUDE "text/SSAnne2F.asm"
+INCLUDE "text/SSAnne3F.asm"
+INCLUDE "text/SSAnneBow.asm"
+INCLUDE "text/SSAnneKitchen.asm"
+INCLUDE "text/SSAnneCaptainsRoom.asm"
+INCLUDE "text/SSAnne1FRooms.asm"
+INCLUDE "text/SSAnne2FRooms.asm"
+INCLUDE "text/SSAnneB1FRooms.asm"
+INCLUDE "text/VictoryRoad3F.asm"
+INCLUDE "text/RocketHideoutB1F.asm"
+INCLUDE "text/RocketHideoutB2F.asm"
+INCLUDE "text/RocketHideoutB3F.asm"
+INCLUDE "text/RocketHideoutB4F.asm"
+INCLUDE "text/RocketHideoutElevator.asm"
+INCLUDE "text/SilphCo2F.asm"
+INCLUDE "text/SilphCo3F.asm"
+INCLUDE "text/SilphCo4F.asm"
+INCLUDE "text/SilphCo5F.asm"
+INCLUDE "text/SilphCo6F.asm"
+INCLUDE "text/SilphCo7F.asm"
+INCLUDE "text/SilphCo8F.asm"
+INCLUDE "text/SilphCo9F.asm"
+INCLUDE "text/SilphCo10F.asm"
+
+
+SECTION "Text 2", ROMX
+
+INCLUDE "text/SilphCo11F.asm"
+INCLUDE "text/PokemonMansion2F.asm"
+INCLUDE "text/PokemonMansion3F.asm"
+INCLUDE "text/PokemonMansionB1F.asm"
+INCLUDE "text/SafariZoneEast.asm"
+INCLUDE "text/SafariZoneNorth.asm"
+INCLUDE "text/SafariZoneWest.asm"
+INCLUDE "text/SafariZoneCenter.asm"
+INCLUDE "text/SafariZoneCenterRestHouse.asm"
+INCLUDE "text/SafariZoneSecretHouse.asm"
+INCLUDE "text/SafariZoneWestRestHouse.asm"
+INCLUDE "text/SafariZoneEastRestHouse.asm"
+INCLUDE "text/SafariZoneNorthRestHouse.asm"
+INCLUDE "text/CeruleanCaveB1F.asm"
+INCLUDE "text/VictoryRoad1F.asm"
+INCLUDE "text/LancesRoom.asm"
+INCLUDE "text/HallOfFame.asm"
+INCLUDE "text/ChampionsRoom.asm"
+INCLUDE "text/LoreleisRoom.asm"
+INCLUDE "text/BrunosRoom.asm"
+INCLUDE "text/AgathasRoom.asm"
+INCLUDE "text/RockTunnelB1F.asm"
+INCLUDE "text/SeafoamIslandsB4F.asm"
+
+INCLUDE "data/text/text_2.asm"
+
+
+SECTION "Text 3", ROMX
+
+INCLUDE "data/text/text_3.asm"
+
+INCLUDE "text/DiglettsCaveRoute2.asm"
+INCLUDE "text/ViridianForestNorthGate.asm"
+INCLUDE "text/Route2TradeHouse.asm"
+INCLUDE "text/Route2Gate.asm"
+INCLUDE "text/ViridianForestSouthGate.asm"
+INCLUDE "text/MtMoonPokecenter.asm"
+INCLUDE "text/SaffronGates.asm"
+INCLUDE "text/Daycare.asm"
+INCLUDE "text/UndergroundPathRoute6.asm"
+INCLUDE "text/UndergroundPathRoute7.asm"
+INCLUDE "text/UndergroundPathRoute7Copy.asm"
+INCLUDE "text/UndergroundPathRoute8.asm"
+INCLUDE "text/RockTunnelPokecenter.asm"
+INCLUDE "text/RockTunnel1F.asm"
+INCLUDE "text/PowerPlant.asm"
+INCLUDE "text/Route11Gate1F.asm"
+INCLUDE "text/Route11Gate2F.asm"
+INCLUDE "text/DiglettsCaveRoute11.asm"
+INCLUDE "text/Route12Gate1F.asm"
+INCLUDE "text/Route12Gate2F.asm"
+INCLUDE "text/Route12SuperRodHouse.asm"
+INCLUDE "text/Route15Gate1F.asm"
+INCLUDE "text/Route15Gate2F.asm"
+INCLUDE "text/Route16Gate1F.asm"
+INCLUDE "text/Route16Gate2F.asm"
+INCLUDE "text/Route16FlyHouse.asm"
+INCLUDE "text/Route18Gate1F.asm"
+INCLUDE "text/Route18Gate2F.asm"
+INCLUDE "text/BeachHouse.asm"
+INCLUDE "text/Route22Gate.asm"
+INCLUDE "text/VictoryRoad2F.asm"
+INCLUDE "text/BillsHouse.asm"
+INCLUDE "text/Route1.asm"
+INCLUDE "text/Route2.asm"
+INCLUDE "text/Route3.asm"
+INCLUDE "text/Route4.asm"
+INCLUDE "text/Route5.asm"
+INCLUDE "text/Route6.asm"
+INCLUDE "text/Route7.asm"
+INCLUDE "text/Route8.asm"
+INCLUDE "text/Route9.asm"
+
+
+SECTION "Text 4", ROMX
+
+INCLUDE "text/Route9_2.asm"
+INCLUDE "text/Route10.asm"
+INCLUDE "text/Route11.asm"
+INCLUDE "text/Route12.asm"
+INCLUDE "text/Route13.asm"
+INCLUDE "text/Route14.asm"
+INCLUDE "text/Route15.asm"
+INCLUDE "text/Route16.asm"
+INCLUDE "text/Route17.asm"
+INCLUDE "text/Route18.asm"
+INCLUDE "text/Route19.asm"
+INCLUDE "text/Route20.asm"
+INCLUDE "text/Route21.asm"
+INCLUDE "text/Route22.asm"
+INCLUDE "text/Route23.asm"
+INCLUDE "text/Route24.asm"
+INCLUDE "text/Route25.asm"
+
+INCLUDE "data/text/text_4.asm"
+
+
+SECTION "Text 5", ROMX
+
+INCLUDE "data/text/text_5.asm"
+
+INCLUDE "text/RedsHouse1F.asm"
+INCLUDE "text/BluesHouse.asm"
+INCLUDE "text/OaksLab.asm"
INCLUDE "text/pokedex_ratings.asm"
-INCLUDE "text/maps/ViridianPokecenter.asm"
-INCLUDE "text/maps/ViridianMart.asm"
-INCLUDE "text/maps/ViridianSchoolHouse.asm"
-INCLUDE "text/maps/ViridianNicknameHouse.asm"
-INCLUDE "text/maps/ViridianGym.asm"
-INCLUDE "text/maps/Museum1F.asm"
-INCLUDE "text/maps/Museum2F.asm"
-INCLUDE "text/maps/PewterGym.asm"
-INCLUDE "text/maps/PewterNidoranHouse.asm"
-INCLUDE "text/maps/PewterMart.asm"
-INCLUDE "text/maps/PewterSpeechHouse.asm"
-INCLUDE "text/maps/PewterPokecenter.asm"
-INCLUDE "text/maps/CeruleanTrashedHouse.asm"
-INCLUDE "text/maps/CeruleanTradeHouse.asm"
-INCLUDE "text/maps/CeruleanPokecenter.asm"
-INCLUDE "text/maps/CeruleanGym.asm"
-INCLUDE "text/maps/BikeShop.asm"
-INCLUDE "text/maps/CeruleanMart.asm"
-INCLUDE "text/maps/CeruleanBadgeHouse.asm"
-
-
-SECTION "Text 6", ROMX ; BANK $2b
-
-INCLUDE "text/maps/CeruleanBadgeHouse_2.asm"
-INCLUDE "text/maps/LavenderPokecenter.asm"
-INCLUDE "text/maps/PokemonTower1F.asm"
-INCLUDE "text/maps/PokemonTower2F.asm"
-INCLUDE "text/maps/PokemonTower3F.asm"
-INCLUDE "text/maps/PokemonTower4F.asm"
-INCLUDE "text/maps/PokemonTower5F.asm"
-INCLUDE "text/maps/PokemonTower6F.asm"
-INCLUDE "text/maps/PokemonTower7F.asm"
-INCLUDE "text/maps/MrFujisHouse.asm"
-INCLUDE "text/maps/LavenderMart.asm"
-INCLUDE "text/maps/LavenderCuboneHouse.asm"
-INCLUDE "text/maps/NameRatersHouse.asm"
-INCLUDE "text/maps/VermilionPokecenter.asm"
-INCLUDE "text/maps/PokemonFanClub.asm"
-INCLUDE "text/maps/VermilionMart.asm"
-INCLUDE "text/maps/VermilionGym.asm"
-INCLUDE "text/maps/VermilionPidgeyHouse.asm"
-INCLUDE "text/maps/VermilionDock.asm"
-
-TeachingHMsText::
- text "Once a #MON"
- line "learns an HM, the"
- cont "technique can't"
- cont "be replaced."
-
- para "Better think care-"
- line "fully before you"
- cont "teach HM moves."
- done
-
-INCLUDE "text/maps/VermilionOldRodHouse.asm"
-INCLUDE "text/maps/CeladonMart1F.asm"
-INCLUDE "text/maps/CeladonMart2F.asm"
-INCLUDE "text/maps/CeladonMart3F.asm"
-INCLUDE "text/maps/CeladonMart4F.asm"
-INCLUDE "text/maps/CeladonMartRoof.asm"
-INCLUDE "text/maps/CeladonMansion1F.asm"
-INCLUDE "text/maps/CeladonMansion2F.asm"
-INCLUDE "text/maps/CeladonMansion3F.asm"
-INCLUDE "text/maps/CeladonMansionRoof.asm"
-INCLUDE "text/maps/CeladonMansionRoofHouse.asm"
-INCLUDE "text/maps/CeladonPokecenter.asm"
-INCLUDE "text/maps/CeladonGym.asm"
-INCLUDE "text/maps/GameCorner.asm"
-
-
-SECTION "Text 7", ROMX ; BANK $2c
-
-INCLUDE "text/maps/GameCorner_2.asm"
-INCLUDE "text/maps/CeladonMart5F.asm"
-INCLUDE "text/maps/GameCornerPrizeRoom.asm"
-INCLUDE "text/maps/CeladonDiner.asm"
-INCLUDE "text/maps/CeladonChiefHouse.asm"
-INCLUDE "text/maps/CeladonHotel.asm"
-INCLUDE "text/maps/FuchsiaMart.asm"
-INCLUDE "text/maps/FuchsiaBillsGrandpasHouse.asm"
-INCLUDE "text/maps/FuchsiaPokecenter.asm"
-INCLUDE "text/maps/WardensHouse.asm"
-INCLUDE "text/maps/SafariZoneGate.asm"
-INCLUDE "text/maps/FuchsiaGym.asm"
-INCLUDE "text/maps/FuchsiaMeetingRoom.asm"
-INCLUDE "text/maps/FuchsiaGoodRodHouse.asm"
-INCLUDE "text/maps/PokemonMansion1F.asm"
-INCLUDE "text/maps/CinnabarGym.asm"
-INCLUDE "text/maps/CinnabarLab.asm"
-INCLUDE "text/maps/CinnabarLabTradeRoom.asm"
-INCLUDE "text/maps/CinnabarLabMetronomeRoom.asm"
-INCLUDE "text/maps/CinnabarLabFossilRoom.asm"
-INCLUDE "text/maps/CinnabarPokecenter.asm"
-INCLUDE "text/maps/CinnabarMart.asm"
-INCLUDE "text/maps/IndigoPlateauLobby.asm"
-INCLUDE "text/maps/CopycatsHouse1F.asm"
-INCLUDE "text/maps/CopycatsHouse2F.asm"
-INCLUDE "text/maps/FightingDojo.asm"
-INCLUDE "text/maps/SaffronGym.asm"
-INCLUDE "text/maps/SaffronPidgeyHouse.asm"
-INCLUDE "text/maps/SaffronMart.asm"
-INCLUDE "text/maps/SilphCo1F.asm"
-INCLUDE "text/maps/SaffronPokecenter.asm"
-INCLUDE "text/maps/MrPsychicsHouse.asm"
-
-_PokemonText::
- text "#MON!"
- done
-
-_PokemartGreetingText::
- text "Hi there!"
- next "May I help you?"
- done
-
-_PokemonFaintedText::
- TX_RAM wcd6d
- text ""
- line "fainted!"
- done
-
-_PlayerBlackedOutText::
- text "<PLAYER> is out of"
- line "useable #MON!"
-
- para "<PLAYER> blacked"
- line "out!"
- prompt
-
-_RepelWoreOffText::
- text "REPEL's effect"
- line "wore off."
- done
-
-_PokemartBuyingGreetingText::
- text "Take your time."
- done
-
-_PokemartTellBuyPriceText::
- TX_RAM wcf4b
- text "?"
- line "That will be"
- cont "¥@"
- TX_BCD hMoney, 3 | LEADING_ZEROES | LEFT_ALIGN
- text ". OK?"
- done
-
-_PokemartBoughtItemText::
- text "Here you are!"
- line "Thank you!"
- prompt
-
-_PokemartNotEnoughMoneyText::
- text "You don't have"
- line "enough money."
- prompt
-
-_PokemartItemBagFullText::
- text "You can't carry"
- line "any more items."
- prompt
-
-_PokemonSellingGreetingText::
- text "What would you"
- line "like to sell?"
- done
-
-_PokemartTellSellPriceText::
- text "I can pay you"
- line "¥@"
- TX_BCD hMoney, 3 | LEADING_ZEROES | LEFT_ALIGN
- text " for that."
- done
-
-_PokemartItemBagEmptyText::
- text "You don't have"
- line "anything to sell."
- prompt
-
-_PokemartUnsellableItemText::
- text "I can't put a"
- line "price on that."
- prompt
-
-_PokemartThankYouText::
- text "Thank you!"
- done
-
-_PokemartAnythingElseText::
- text "Is there anything"
- line "else I can do?"
- done
-
-_LearnedMove1Text::
- TX_RAM wLearnMoveMonName
- text " learned"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_WhichMoveToForgetText::
- text "Which move should"
- next "be forgotten?"
- done
-
-_AbandonLearningText::
- text "Abandon learning"
- line "@"
- TX_RAM wcf4b
- text "?"
- done
-
-_DidNotLearnText::
- TX_RAM wLearnMoveMonName
- text ""
- line "did not learn"
- cont "@"
- TX_RAM wcf4b
- text "!"
- prompt
-
-_TryingToLearnText::
- TX_RAM wLearnMoveMonName
- text " is"
- line "trying to learn"
- cont "@"
- TX_RAM wcf4b
- text "!"
-
- para "But, @"
- TX_RAM wLearnMoveMonName
- text ""
- line "can't learn more"
- cont "than 4 moves!"
-
- para "Delete an older"
- line "move to make room"
- cont "for @"
- TX_RAM wcf4b
- text "?"
- done
-
-_OneTwoAndText::
- text "1, 2 and...@@"
-
-_PoofText::
- text " Poof!@@"
-
-_ForgotAndText::
- text ""
- para "@"
- TX_RAM wLearnMoveMonName
- text " forgot"
- line "@"
- TX_RAM wcd6d
- text "!"
-
- para "And..."
- prompt
-
-_HMCantDeleteText::
- text "HM techniques"
- line "can't be deleted!"
- prompt
-
-_PokemonCenterWelcomeText::
- text "Welcome to our"
- line "#MON CENTER!"
-
- para "We heal your"
- line "#MON back to"
- cont "perfect health!"
- prompt
-
-_ShallWeHealYourPokemonText::
- text "Shall we heal your"
- line "#MON?"
- done
-
-_NeedYourPokemonText::
- text "OK. We'll need"
- line "your #MON."
- done
-
-_PokemonFightingFitText::
- text "Thank you!"
- line "Your #MON are"
- cont "fighting fit!"
- prompt
-
-_PokemonCenterFarewellText::
- text "We hope to see"
- line "you again!"
- done
-
-_LooksContentText::
- text "It looks very"
- line "content asleep."
- done
-
-_CableClubNPCAreaReservedFor2FriendsLinkedByCableText::
- text "This area is"
- line "reserved for 2"
- cont "friends who are"
- cont "linked by cable."
- done
-
-_CableClubNPCWelcomeText::
- text "Welcome to the"
- line "Cable Club!"
- done
-
-_CableClubNPCPleaseApplyHereHaveToSaveText::
- text "Please apply here."
-
- para "Before opening"
- line "the link, we have"
- cont "to save the game."
- done
-
-
-SECTION "Text 8", ROMX ; BANK $2d
-
-_CableClubNPCPleaseWaitText::
- text "Please wait.@@"
-
-_CableClubNPCLinkClosedBecauseOfInactivityText::
- text "The link has been"
- line "closed because of"
- cont "inactivity."
-
- para "Please contact"
- line "your friend and"
- cont "come again!"
- done
-
-_CableClubNPCPleaseComeAgainText::
- text "Please come again!"
- done
-
-_CableClubNPCMakingPreparationsText::
- text "We're making"
- line "preparations."
- cont "Please wait."
- done
-
-_FlashLightsAreaText::
- text "A blinding FLASH"
- line "lights the area!"
- prompt
-
-_WarpToLastPokemonCenterText::
- text "Warp to the last"
- line "#MON CENTER."
- done
-
-_CannotUseTeleportNowText::
- TX_RAM wcd6d
- text " can't"
- line "use TELEPORT now."
- prompt
-
-_CannotFlyHereText::
- TX_RAM wcd6d
- text " can't"
- line "FLY here."
- prompt
-
-_NotHealthyEnoughText::
- text "Not healthy"
- line "enough."
- prompt
-
-_NewBadgeRequiredText::
- text "No! A new BADGE"
- line "is required."
- prompt
-
-_CannotUseItemsHereText::
- text "You can't use items"
- line "here."
- prompt
-
-_CannotGetOffHereText::
- text "You can't get off"
- line "here."
- prompt
-
-_UsedStrengthText::
- TX_RAM wcd6d
- text " used"
- line "STRENGTH.@@"
-
-_CanMoveBouldersText::
- TX_RAM wcd6d
- text " can"
- line "move boulders."
- prompt
-
-_CurrentTooFastText::
- text "The current is"
- line "much too fast!"
- prompt
-
-_CyclingIsFunText::
- text "Cycling is fun!"
- line "Forget SURFing!"
- prompt
-
-_GotMonText::
- text "<PLAYER> got"
- line "@"
- TX_RAM wcd6d
- text "!@@"
-
-_SetToBoxText::
- text "There's no more"
- line "room for #MON!"
- cont "@"
- TX_RAM wBoxMonNicks
- text " was"
- cont "sent to #MON"
- cont "BOX @"
- TX_RAM wcf4b
- text " on PC!"
- done
-
-_BoxIsFullText::
- text "There's no more"
- line "room for #MON!"
-
- para "The #MON BOX"
- line "is full and can't"
- cont "accept any more!"
-
- para "Change the BOX at"
- line "a #MON CENTER!"
- done
-
-INCLUDE "text/maps/PalletTown.asm"
-INCLUDE "text/maps/ViridianCity.asm"
-INCLUDE "text/maps/PewterCity.asm"
-INCLUDE "text/maps/CeruleanCity.asm"
-INCLUDE "text/maps/LavenderTown.asm"
-INCLUDE "text/maps/VermilionCity.asm"
-INCLUDE "text/maps/CeladonCity.asm"
-INCLUDE "text/maps/FuchsiaCity.asm"
-INCLUDE "text/maps/CinnabarIsland.asm"
-INCLUDE "text/maps/SaffronCity.asm"
-
-_ItemUseBallText00::
- text "It dodged the"
- line "thrown BALL!"
-
- para "This #MON"
- line "can't be caught!"
- prompt
-
-_ItemUseBallText01::
- text "You missed the"
- line "#MON!"
- prompt
-
-_ItemUseBallText02::
- text "Darn! The #MON"
- line "broke free!"
- prompt
-
-_ItemUseBallText03::
- text "Aww! It appeared"
- line "to be caught! "
- prompt
-
-_ItemUseBallText04::
- text "Shoot! It was so"
- line "close too!"
- prompt
-
-_ItemUseBallText05::
- text "All right!"
- line "@"
- TX_RAM wEnemyMonNick
- text " was"
- cont "caught!@@"
-
-_ItemUseBallText07::
- TX_RAM wBoxMonNicks
- text " was"
- line "transferred to"
- cont "BILL's PC!"
- prompt
-
-_ItemUseBallText08::
- TX_RAM wBoxMonNicks
- text " was"
- line "transferred to"
- cont "someone's PC!"
- prompt
-
-_ItemUseBallText06::
- text "New #DEX data"
- line "will be added for"
- cont "@"
- TX_RAM wEnemyMonNick
- text "!@@"
-
-_SurfingGotOnText::
- text "<PLAYER> got on"
- line "@"
- TX_RAM wcd6d
- text "!"
- prompt
-
-_SurfingNoPlaceToGetOffText::
- text "There's no place"
- line "to get off!"
- prompt
-
-_RefusingText::
- TX_RAM wcd6d
- text ""
- line "is refusing!"
- prompt
-
-_VitaminStatRoseText::
- TX_RAM wcd6d
- text "'s"
- line "@"
- TX_RAM wcf4b
- text " rose."
- prompt
-
-_VitaminNoEffectText::
- text "It won't have any"
- line "effect."
- prompt
-
-_ThrewBaitText::
- text "<PLAYER> threw"
- line "some BAIT."
- done
-
-_ThrewRockText::
- text "<PLAYER> threw a"
- line "ROCK."
- done
-
-_PlayedFluteNoEffectText::
- text "Played the #"
- line "FLUTE."
-
- para "Now, that's a"
- line "catchy tune!"
- prompt
-
-_FluteWokeUpText::
- text "All sleeping"
- line "#MON woke up."
- prompt
-
-_PlayedFluteHadEffectText::
- text "<PLAYER> played the"
- line "# FLUTE.@@"
-
-_CoinCaseNumCoinsText::
- text "Coins"
- line "@"
- TX_BCD wPlayerCoins, 2 | LEADING_ZEROES | LEFT_ALIGN
- text " "
- prompt
-
-_ItemfinderFoundItemText::
- text "Yes! ITEMFINDER"
- line "indicates there's"
- cont "an item nearby."
- prompt
-
-_ItemfinderFoundNothingText::
- text "Nope! ITEMFINDER"
- line "isn't responding."
- prompt
-
-_RaisePPWhichTechniqueText::
- text "Raise PP of which"
- line "technique?"
- done
-
-_RestorePPWhichTechniqueText::
- text "Restore PP of"
- line "which technique?"
- done
-
-_PPMaxedOutText::
- TX_RAM wcf4b
- text "'s PP"
- line "is maxed out."
- prompt
-
-_PPIncreasedText::
- TX_RAM wcf4b
- text "'s PP"
- line "increased."
- prompt
-
-_PPRestoredText::
- text "PP was restored."
- prompt
-
-_BootedUpTMText::
- text "Booted up a TM!"
- prompt
-
-_BootedUpHMText::
- text "Booted up an HM!"
- prompt
-
-_TeachMachineMoveText::
- text "It contained"
- line "@"
- TX_RAM wcf4b
- text "!"
-
- para "Teach @"
- TX_RAM wcf4b
- text ""
- line "to a #MON?"
- done
-
-_MonCannotLearnMachineMoveText::
- TX_RAM wcd6d
- text " is not"
- line "compatible with"
- cont "@"
- TX_RAM wcf4b
- text "."
-
- para "It can't learn"
- line "@"
- TX_RAM wcf4b
- text "."
- prompt
-
-_ItemUseNotTimeText::
- text "OAK: <PLAYER>!"
- line "This isn't the"
- cont "time to use that! "
- prompt
-
-_ItemUseNotYoursToUseText::
- text "This isn't yours"
- line "to use!"
- prompt
-
-_ItemUseNoEffectText::
- text "It won't have any"
- line "effect."
- prompt
-
-_ThrowBallAtTrainerMonText1::
- text "The trainer"
- line "blocked the BALL!"
- prompt
-
-_ThrowBallAtTrainerMonText2::
- text "Don't be a thief!"
- prompt
-
-_NoCyclingAllowedHereText::
- text "No cycling"
- next "allowed here."
- prompt
-
-_NoSurfingHereText::
- text "No SURFing on"
- line "@"
- TX_RAM wcd6d
- text " here!"
- prompt
-
-_BoxFullCannotThrowBallText::
- text "The #MON BOX"
- line "is full! Can't"
- cont "use that item!"
- prompt
-
-_DontHavePokemonText::
- text "You don't have a "
- line "#MON!"
- prompt
-
-_ItemUseText001::
- text "<PLAYER> used@@"
-
-_ItemUseText002::
- TX_RAM wcf4b
- text "!"
- done
-
-_GotOnBicycleText1::
- text "<PLAYER> got on the@@"
-
-_GotOnBicycleText2::
- TX_RAM wcf4b
- text "!"
- prompt
-
-_GotOffBicycleText1::
- text "<PLAYER> got off@@"
-
-_GotOffBicycleText2::
- text "the @"
- TX_RAM wcf4b
- text "."
- prompt
-
-_ThrewAwayItemText::
- text "Threw away"
- line "@"
- TX_RAM wcd6d
- text "."
- prompt
-
-_IsItOKToTossItemText::
- text "Is it OK to toss"
- line "@"
- TX_RAM wcf4b
- text "?"
- prompt
-
-_TooImportantToTossText::
- text "That's too impor-"
- line "tant to toss!"
- prompt
-
-_AlreadyKnowsText::
- TX_RAM wcd6d
- text " knows"
- line "@"
- TX_RAM wcf4b
- text "!"
- prompt
-
-_ConnectCableText::
- text "Okay, connect the"
- line "cable like so!"
- prompt
-
-_TradedForText::
- text "<PLAYER> traded"
- line "@"
- TX_RAM wInGameTradeGiveMonName
- text " for"
- cont "@"
- TX_RAM wInGameTradeReceiveMonName
- text "!@@"
-
-_WannaTrade1Text::
- text "I'm looking for"
- line "@"
- TX_RAM wInGameTradeGiveMonName
- text "! Wanna"
-
- para "trade one for"
- line "@"
- TX_RAM wInGameTradeReceiveMonName
- text "? "
- done
-
-_NoTrade1Text::
- text "Awww!"
- line "Oh well..."
- done
-
-_WrongMon1Text::
- text "What? That's not"
- line "@"
- TX_RAM wInGameTradeGiveMonName
- text "!"
-
- para "If you get one,"
- line "come back here!"
- done
-
-_Thanks1Text::
- text "Hey thanks!"
- done
-
-_AfterTrade1Text::
- text "Isn't my old"
- line "@"
- TX_RAM wInGameTradeReceiveMonName
- text " great?"
- done
-
-_WannaTrade2Text::
- text "Hello there! Do"
- line "you want to trade"
-
- para "your @"
- TX_RAM wInGameTradeGiveMonName
- text ""
- line "for @"
- TX_RAM wInGameTradeReceiveMonName
- text "?"
- done
-
-_NoTrade2Text::
- text "Well, if you"
- line "don't want to..."
- done
-
-_WrongMon2Text::
- text "Hmmm? This isn't"
- line "@"
- TX_RAM wInGameTradeGiveMonName
- text "."
-
- para "Think of me when"
- line "you get one."
- done
-
-_Thanks2Text::
- text "Thanks!"
- done
-
-_AfterTrade2Text::
- text "Hello there! Your"
- line "old @"
- TX_RAM wInGameTradeGiveMonName
- text " is"
- cont "magnificent!"
- done
-
-_WannaTrade3Text::
- text "Hi! Do you have"
- line "@"
- TX_RAM wInGameTradeGiveMonName
- text "?"
-
- para "Want to trade it"
- line "for @"
- TX_RAM wInGameTradeReceiveMonName
- text "?"
- done
-
-_NoTrade3Text::
- text "That's too bad."
- done
-
-_WrongMon3Text::
- text "...This is no"
- line "@"
- TX_RAM wInGameTradeGiveMonName
- text "."
-
- para "If you get one,"
- line "trade it with me!"
- done
-
-_Thanks3Text::
- text "Thanks, pal!"
- done
-
-_AfterTrade3Text::
- text "How is my old"
- line "@"
- TX_RAM wInGameTradeReceiveMonName
- text "?"
-
- para "My @"
- TX_RAM wInGameTradeGiveMonName
- text " is"
- line "doing great!"
- done
-
-_NothingToCutText::
- text "There isn't"
- line "anything to CUT!"
- prompt
-
-_UsedCutText::
- TX_RAM wcd6d
- text " hacked"
- line "away with CUT!"
- prompt
-
-
-SECTION "Pokedex Text", ROMX ; BANK $2e
-
-INCLUDE "text/pokedex.asm"
-
-
-SECTION "Move Names", ROMX ; BANK $2f
-
-INCLUDE "text/move_names.asm"
+INCLUDE "text/ViridianPokecenter.asm"
+INCLUDE "text/ViridianMart.asm"
+INCLUDE "text/ViridianSchoolHouse.asm"
+INCLUDE "text/ViridianNicknameHouse.asm"
+INCLUDE "text/ViridianGym.asm"
+INCLUDE "text/Museum1F.asm"
+INCLUDE "text/Museum2F.asm"
+INCLUDE "text/PewterGym.asm"
+INCLUDE "text/PewterNidoranHouse.asm"
+INCLUDE "text/PewterMart.asm"
+INCLUDE "text/PewterSpeechHouse.asm"
+INCLUDE "text/PewterPokecenter.asm"
+INCLUDE "text/CeruleanTrashedHouse.asm"
+INCLUDE "text/CeruleanTradeHouse.asm"
+INCLUDE "text/CeruleanPokecenter.asm"
+INCLUDE "text/CeruleanGym.asm"
+INCLUDE "text/BikeShop.asm"
+INCLUDE "text/CeruleanMart.asm"
+INCLUDE "text/CeruleanBadgeHouse.asm"
+
+
+SECTION "Text 6", ROMX
+
+INCLUDE "text/CeruleanBadgeHouse_2.asm"
+INCLUDE "text/LavenderPokecenter.asm"
+INCLUDE "text/PokemonTower1F.asm"
+INCLUDE "text/PokemonTower2F.asm"
+INCLUDE "text/PokemonTower3F.asm"
+INCLUDE "text/PokemonTower4F.asm"
+INCLUDE "text/PokemonTower5F.asm"
+INCLUDE "text/PokemonTower6F.asm"
+INCLUDE "text/PokemonTower7F.asm"
+INCLUDE "text/MrFujisHouse.asm"
+INCLUDE "text/LavenderMart.asm"
+INCLUDE "text/LavenderCuboneHouse.asm"
+INCLUDE "text/NameRatersHouse.asm"
+INCLUDE "text/VermilionPokecenter.asm"
+INCLUDE "text/PokemonFanClub.asm"
+INCLUDE "text/VermilionMart.asm"
+INCLUDE "text/VermilionGym.asm"
+INCLUDE "text/VermilionPidgeyHouse.asm"
+INCLUDE "text/VermilionDock.asm"
+
+INCLUDE "data/text/text_6.asm"
+
+INCLUDE "text/VermilionOldRodHouse.asm"
+INCLUDE "text/CeladonMart1F.asm"
+INCLUDE "text/CeladonMart2F.asm"
+INCLUDE "text/CeladonMart3F.asm"
+INCLUDE "text/CeladonMart4F.asm"
+INCLUDE "text/CeladonMartRoof.asm"
+INCLUDE "text/CeladonMansion1F.asm"
+INCLUDE "text/CeladonMansion2F.asm"
+INCLUDE "text/CeladonMansion3F.asm"
+INCLUDE "text/CeladonMansionRoof.asm"
+INCLUDE "text/CeladonMansionRoofHouse.asm"
+INCLUDE "text/CeladonPokecenter.asm"
+INCLUDE "text/CeladonGym.asm"
+INCLUDE "text/GameCorner.asm"
+
+
+SECTION "Text 7", ROMX
+
+INCLUDE "text/GameCorner_2.asm"
+INCLUDE "text/CeladonMart5F.asm"
+INCLUDE "text/GameCornerPrizeRoom.asm"
+INCLUDE "text/CeladonDiner.asm"
+INCLUDE "text/CeladonChiefHouse.asm"
+INCLUDE "text/CeladonHotel.asm"
+INCLUDE "text/FuchsiaMart.asm"
+INCLUDE "text/FuchsiaBillsGrandpasHouse.asm"
+INCLUDE "text/FuchsiaPokecenter.asm"
+INCLUDE "text/WardensHouse.asm"
+INCLUDE "text/SafariZoneGate.asm"
+INCLUDE "text/FuchsiaGym.asm"
+INCLUDE "text/FuchsiaMeetingRoom.asm"
+INCLUDE "text/FuchsiaGoodRodHouse.asm"
+INCLUDE "text/PokemonMansion1F.asm"
+INCLUDE "text/CinnabarGym.asm"
+INCLUDE "text/CinnabarLab.asm"
+INCLUDE "text/CinnabarLabTradeRoom.asm"
+INCLUDE "text/CinnabarLabMetronomeRoom.asm"
+INCLUDE "text/CinnabarLabFossilRoom.asm"
+INCLUDE "text/CinnabarPokecenter.asm"
+INCLUDE "text/CinnabarMart.asm"
+INCLUDE "text/IndigoPlateauLobby.asm"
+INCLUDE "text/CopycatsHouse1F.asm"
+INCLUDE "text/CopycatsHouse2F.asm"
+INCLUDE "text/FightingDojo.asm"
+INCLUDE "text/SaffronGym.asm"
+INCLUDE "text/SaffronPidgeyHouse.asm"
+INCLUDE "text/SaffronMart.asm"
+INCLUDE "text/SilphCo1F.asm"
+INCLUDE "text/SaffronPokecenter.asm"
+INCLUDE "text/MrPsychicsHouse.asm"
+
+INCLUDE "data/text/text_7.asm"
+
+
+SECTION "Text 8", ROMX
+
+INCLUDE "data/text/text_8.asm"
+
+INCLUDE "text/PalletTown.asm"
+INCLUDE "text/ViridianCity.asm"
+INCLUDE "text/PewterCity.asm"
+INCLUDE "text/CeruleanCity.asm"
+INCLUDE "text/LavenderTown.asm"
+INCLUDE "text/VermilionCity.asm"
+INCLUDE "text/CeladonCity.asm"
+INCLUDE "text/FuchsiaCity.asm"
+INCLUDE "text/CinnabarIsland.asm"
+INCLUDE "text/SaffronCity.asm"
+
+INCLUDE "data/text/text_9.asm"
+
+
+SECTION "Pokédex Text", ROMX
+
+INCLUDE "data/pokemon/dex_text.asm"
+
+
+SECTION "Move Names", ROMX
+
+INCLUDE "data/moves/names.asm"
diff --git a/text/maps/AgathasRoom.asm b/text/AgathasRoom.asm
index 82cbcd81..82cbcd81 100644
--- a/text/maps/AgathasRoom.asm
+++ b/text/AgathasRoom.asm
diff --git a/text/BeachHouse.asm b/text/BeachHouse.asm
new file mode 100644
index 00000000..d15e0b9a
--- /dev/null
+++ b/text/BeachHouse.asm
@@ -0,0 +1,107 @@
+_SurfinDudeText1::
+ text "Whoa!"
+
+ para "Your PIKACHU knows"
+ line "how to SURF! So,"
+ cont "I'm not alone..."
+
+ para "Great! You earned"
+ line "the right to SURF"
+ cont "with the DUDE!"
+
+ para "Give it a go?"
+ done
+
+_SurfinDudeText2::
+ text "Come SURF anytime,"
+ line "my friend!"
+ done
+
+_SurfinDudeText3::
+ text "Wanna go SURF?"
+ done
+
+_SurfinDudeText4::
+ text "Dogs and burgers"
+ line "on special today!"
+ done
+
+_BeachHousePikachuText::
+ text "PIKACHU: Pikaa"
+ done
+
+_BeachHouseSign1Text1::
+ text "SURFIN' DUDE's"
+ line "scribbles..."
+
+ para "When I shoot the"
+ line "tube, the tunes"
+ cont "hit the groove!"
+ done
+
+_BeachHouseSign1Text2::
+ text "30 years of waves!"
+ line "SURFIN' DUDE"
+ done
+
+_BeachHouseSign2Text1::
+ text "SURFING TIP 1!"
+
+ para "After flips, line"
+ line "the board up with"
+ cont "a wave for a cool"
+ cont "effect!"
+ done
+
+_BeachHouseSign2Text2::
+ text "SUMMER BEACH HOUSE"
+ line "#MON welcome!"
+ done
+
+_BeachHouseSign3Text1::
+ text "SURFING TIP 2!"
+
+ para "Pulling flips in"
+ line "a jump is totally"
+ cont "rad!"
+ done
+
+_BeachHouseSign3Text2::
+ text "The sea unites"
+ line "all in surfdom!"
+ done
+
+_BeachHousePrinterText1::
+ text "It's some sort of"
+ line "a machine...@"
+ text_end
+
+_BeachHousePrinterText2::
+ text "SUMMER BEACH HOUSE"
+ line "PRINTER, it says.@"
+ text_end
+
+_BeachHousePrinterText3::
+ text "The Hi-Score is"
+ line "shown."
+
+ para "PRINT it out?"
+ done
+
+_BeachHousePrinterText4::
+ text "SUMMER BEACH HOUSE"
+ line "PRINTER, it says."
+
+ para "The Hi-Score is"
+ line "shown."
+
+ para "PRINT it out?"
+ done
+
+_BeachHousePrinterText5::
+ text "PRINT completed.@"
+ text_end
+
+_BeachHousePrinterText6::
+ text "PRINT error!@"
+ text_end
diff --git a/text/BikeShop.asm b/text/BikeShop.asm
new file mode 100644
index 00000000..254da08c
--- /dev/null
+++ b/text/BikeShop.asm
@@ -0,0 +1,71 @@
+_BikeShopText_1d810::
+ text "Hi! Welcome to"
+ line "our BIKE SHOP."
+
+ para "Have we got just"
+ line "the BIKE for you!"
+ prompt
+
+_BikeShopText_1d815::
+ text "It's a cool BIKE!"
+ line "Do you want it?"
+ done
+
+_BikeShopCantAffordText::
+ text "Sorry! You can't"
+ line "afford it!"
+ prompt
+
+_BikeShopText_1d81f::
+ text "Oh, that's..."
+
+ para "A BIKE VOUCHER!"
+
+ para "OK! Here you go!"
+ prompt
+
+_BikeShopText_1d824::
+ text "<PLAYER> exchanged"
+ line "the BIKE VOUCHER"
+ cont "for a BICYCLE.@"
+ text_end
+
+_BikeShopComeAgainText::
+ text "Come back again"
+ line "sometime!"
+ done
+
+_BikeShopText_1d82f::
+ text "How do you like"
+ line "your new BICYCLE?"
+
+ para "You can take it"
+ line "on CYCLING ROAD"
+ cont "and in caves!"
+ done
+
+_BikeShopText_1d834::
+ text "You better make"
+ line "room for this!"
+ done
+
+_BikeShopText_1d843::
+ text "A plain city BIKE"
+ line "is good enough"
+ cont "for me!"
+
+ para "You can't put a"
+ line "shopping basket"
+ cont "on an MTB!"
+ done
+
+_BikeShopText_1d85c::
+ text "These BIKEs are"
+ line "cool, but they're"
+ cont "way expensive!"
+ done
+
+_BikeShopText_1d861::
+ text "Wow. Your BIKE is"
+ line "really cool!"
+ done
diff --git a/text/BillsHouse.asm b/text/BillsHouse.asm
new file mode 100644
index 00000000..2ad5748a
--- /dev/null
+++ b/text/BillsHouse.asm
@@ -0,0 +1,93 @@
+_BillsHouseDontLeaveText::
+ text "Whoa, don't go"
+ line "anywhere, wait!"
+ done
+
+_BillsHouseText_1e865::
+ text "Hiya! I'm a"
+ line "#MON..."
+ cont "...No I'm not!"
+
+ para "Call me BILL!"
+ line "I'm a true blue"
+ cont "#MANIAC! Hey!"
+ cont "What's with that"
+ cont "skeptical look?"
+
+ para "I'm not joshing"
+ line "you, I screwed up"
+ cont "an experiment and"
+ cont "got combined with"
+ cont "a #MON!"
+
+ para "So, how about it?"
+ line "Help me out here!"
+ done
+
+_BillsHouseText_1e86a::
+ text "When I'm in the"
+ line "TELEPORTER, go to"
+ cont "my PC and run the"
+ cont "Cell Separation"
+ cont "System!"
+ done
+
+_BillsHouseText_1e86f::
+ text "No!? Come on, you"
+ line "gotta help a guy"
+ cont "in deep trouble!"
+
+ para "What do you say,"
+ line "chief? Please?"
+ cont "OK? All right!"
+ prompt
+
+_BillThankYouText::
+ text "BILL: Yeehah!"
+ line "Thanks, bud! I"
+ cont "owe you one!"
+
+ para "So, did you come"
+ line "to see my #MON"
+ cont "collection?"
+ cont "You didn't?"
+ cont "That's a bummer."
+
+ para "I've got to thank"
+ line "you... Oh here,"
+ cont "maybe this'll do."
+ prompt
+
+_SSTicketReceivedText::
+ text "<PLAYER> received"
+ line "an @"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_SSTicketNoRoomText::
+ text "You've got too"
+ line "much stuff, bud!"
+ done
+
+_BillsHouseText_1e8cb::
+ text "That cruise ship,"
+ line "S.S.ANNE, is in"
+ cont "VERMILION CITY."
+ cont "Its passengers"
+ cont "are all trainers!"
+
+ para "They invited me"
+ line "to their party,"
+ cont "but I can't stand"
+ cont "fancy do's. Why"
+ cont "don't you go"
+ cont "instead of me?"
+ done
+
+_BillsHouseText_1e8da::
+ text "BILL: Look, bud,"
+ line "just check out"
+ cont "some of my rare"
+ cont "#MON on my PC!"
+ done
diff --git a/text/BluesHouse.asm b/text/BluesHouse.asm
new file mode 100644
index 00000000..d799b9ed
--- /dev/null
+++ b/text/BluesHouse.asm
@@ -0,0 +1,42 @@
+_DaisyInitialText::
+ text "Hi <PLAYER>!"
+ line "<RIVAL> is out at"
+ cont "Grandpa's lab."
+ done
+
+_DaisyOfferMapText::
+ text "Grandpa asked you"
+ line "to run an errand?"
+ cont "Here, this will"
+ cont "help you!"
+ prompt
+
+_GotMapText::
+ text "<PLAYER> got a"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_DaisyBagFullText::
+ text "You have too much"
+ line "stuff with you."
+ done
+
+_DaisyUseMapText::
+ text "Use the TOWN MAP"
+ line "to find out where"
+ cont "you are."
+ done
+
+_BluesHouseDaisyWalkingText::
+ text "Spending time"
+ line "with your #MON"
+ cont "makes them more"
+ cont "friendly to you."
+ done
+
+_BluesHouseTownMapText::
+ text "It's a big map!"
+ line "This is useful!"
+ done
diff --git a/text/maps/BrunosRoom.asm b/text/BrunosRoom.asm
index 9c493c4a..9c493c4a 100644
--- a/text/maps/BrunosRoom.asm
+++ b/text/BrunosRoom.asm
diff --git a/text/maps/CeladonChiefHouse.asm b/text/CeladonChiefHouse.asm
index 19e59bd6..19e59bd6 100644
--- a/text/maps/CeladonChiefHouse.asm
+++ b/text/CeladonChiefHouse.asm
diff --git a/text/CeladonCity.asm b/text/CeladonCity.asm
new file mode 100644
index 00000000..6ec80e66
--- /dev/null
+++ b/text/CeladonCity.asm
@@ -0,0 +1,154 @@
+_CeladonCityText1::
+ text "I got my KOFFING"
+ line "from my friend!"
+
+ para "We get along now,"
+ line "because I was"
+ cont "very nice to it!"
+ done
+
+_CeladonCityText2::
+ text "Heheh! This GYM"
+ line "is great! It's"
+ cont "full of women!"
+ done
+
+_CeladonCityText3::
+ text "The GAME CORNER"
+ line "is bad for our"
+ cont "city's image!"
+ done
+
+_CeladonCityText4::
+ text "Moan! I blew it"
+ line "all at the slots!"
+
+ para "I knew I should"
+ line "have cashed in my"
+ cont "coins for prizes!"
+ done
+
+_TM41PreText::
+ text "Hello, there!"
+
+ para "I've seen you,"
+ line "but I never had a"
+ cont "chance to talk!"
+
+ para "Here's a gift for"
+ line "dropping by!"
+ prompt
+
+_ReceivedTM41Text::
+ text "<PLAYER> received"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_TM41ExplanationText::
+ text "TM41 teaches"
+ line "SOFTBOILED!"
+
+ para "Only one #MON"
+ line "can use it!"
+
+ para "That #MON is"
+ line "CHANSEY!"
+ done
+
+_TM41NoRoomText::
+ text "Oh, your pack is"
+ line "full of items!"
+ done
+
+_CeladonCityText6::
+ text "This is my trusted"
+ line "pal, POLIWRATH!"
+
+ para "It evolved from"
+ line "POLIWHIRL when I"
+ cont "used WATER STONE!"
+ done
+
+_CeladonCityText7::
+ text "POLIWRATH: Ribi"
+ line "ribit!@"
+ text_end
+
+_CeladonCityText8::
+ text "What are you"
+ line "staring at?"
+ done
+
+_CeladonCityText9::
+ text "Keep out of TEAM"
+ line "ROCKET's way!"
+ done
+
+_CeladonCityText11::
+ text "CELADON CITY"
+ line "The City of"
+ cont "Rainbow Dreams"
+ done
+
+_CeladonCityText13::
+ text "CELADON CITY"
+ line "#MON GYM"
+ cont "LEADER: ERIKA"
+
+ para "The Nature-Loving"
+ line "Princess!"
+ done
+
+_CeladonCityText14::
+ text "CELADON MANSION"
+ done
+
+_CeladonCityText15::
+ text "Find what you"
+ line "need at CELADON"
+ cont "DEPT. STORE!"
+ done
+
+_CeladonCityText16::
+ text "TRAINER TIPS"
+
+ para "GUARD SPEC."
+ line "protects #MON"
+ cont "against SPECIAL"
+ cont "attacks such as"
+ cont "fire and water!"
+
+ para "Get your items at"
+ line "CELADON DEPT."
+ cont "STORE!"
+ done
+
+_CeladonCityText17::
+ text "Coins exchanged"
+ line "for prizes!"
+ cont "PRIZE EXCHANGE"
+ done
+
+_CeladonCityText18::
+ text "ROCKET GAME CORNER"
+ line "The playground"
+ cont "for grownups!"
+ done
+
+_CeladonCityText10::
+ text "TRAINER TIPS"
+
+ para "X ACCURACY boosts"
+ line "the accuracy of"
+ cont "techniques!"
+
+ para "DIRE HIT jacks up"
+ line "the likelihood of"
+ cont "critical hits!"
+
+ para "Get your items at"
+ line "CELADON DEPT."
+ cont "STORE!"
+ done
diff --git a/text/CeladonDiner.asm b/text/CeladonDiner.asm
new file mode 100644
index 00000000..dd86a0c1
--- /dev/null
+++ b/text/CeladonDiner.asm
@@ -0,0 +1,60 @@
+_CeladonDinerText1::
+ text "Hi!"
+
+ para "We're taking a"
+ line "break now."
+ done
+
+_CeladonDinerText2::
+ text "My #MON are"
+ line "weak, so I often"
+ cont "have to go to the"
+ cont "DRUG STORE."
+ done
+
+_CeladonDinerText3::
+ text "Psst! There's a"
+ line "basement under"
+ cont "the GAME CORNER."
+ done
+
+_CeladonDinerText4::
+ text "Munch..."
+
+ para "The man at that"
+ line "table lost it all"
+ cont "at the slots."
+ done
+
+_CeladonDinerText_491a7::
+ text "Go ahead! Laugh!"
+
+ para "I'm flat out"
+ line "busted!"
+
+ para "No more slots for"
+ line "me! I'm going"
+ cont "straight!"
+
+ para "Here! I won't be"
+ line "needing this any-"
+ cont "more!"
+ prompt
+
+_ReceivedCoinCaseText::
+ text "<PLAYER> received"
+ line "a @"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_CoinCaseNoRoomText::
+ text "Make room for"
+ line "this!"
+ done
+
+_CeladonDinerText_491b7::
+ text "I always thought"
+ line "I was going to"
+ cont "win it back..."
+ done
diff --git a/text/CeladonGym.asm b/text/CeladonGym.asm
new file mode 100644
index 00000000..5d354bbb
--- /dev/null
+++ b/text/CeladonGym.asm
@@ -0,0 +1,220 @@
+_CeladonGymText_48a5e::
+ text "Hello. Lovely"
+ line "weather isn't it?"
+ cont "It's so pleasant."
+
+ para "...Oh dear..."
+ line "I must have dozed"
+ cont "off. Welcome."
+
+ para "My name is ERIKA."
+ line "I am the LEADER"
+ cont "of CELADON GYM."
+
+ para "I teach the art of"
+ line "flower arranging."
+ cont "My #MON are of"
+ cont "the grass-type."
+
+ para "Oh, I'm sorry, I"
+ line "had no idea that"
+ cont "you wished to"
+ cont "challenge me."
+
+ para "Very well, but I"
+ line "shall not lose."
+ done
+
+_CeladonGymText_48a63::
+ text "Oh!"
+ line "I concede defeat."
+
+ para "You are remarkably"
+ line "strong."
+
+ para "I must confer you"
+ line "the RAINBOWBADGE."
+ prompt
+
+_CeladonGymText_48a68::
+ text "You are cataloging"
+ line "#MON? I must"
+ cont "say I'm impressed."
+
+ para "I would never"
+ line "collect #MON"
+ cont "if they were"
+ cont "unattractive."
+ done
+
+_CeladonGymText9::
+ text "The RAINBOWBADGE"
+ line "will make #MON"
+ cont "up to L50 obey."
+
+ para "It also allows"
+ line "#MON to use"
+ cont "STRENGTH in and"
+ cont "out of battle."
+
+ para "Please also take"
+ line "this with you."
+ done
+
+_ReceivedTM21Text::
+ text "<PLAYER> received"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_TM21ExplanationText::
+ text_start
+
+ para "TM21 contains"
+ line "MEGA DRAIN."
+
+ para "Half the damage"
+ line "it inflicts is"
+ cont "drained to heal"
+ cont "your #MON!"
+ done
+
+_TM21NoRoomText::
+ text "You should make"
+ line "room for this."
+ done
+
+_CeladonGymBattleText2::
+ text "Hey!"
+
+ para "You are not"
+ line "allowed in here!"
+ done
+
+_CeladonGymEndBattleText2::
+ text "You're"
+ line "too rough!"
+ prompt
+
+_CeladonGymAfterBattleText2::
+ text "Bleaah!"
+ line "I hope ERIKA"
+ cont "wipes you out!"
+ done
+
+_CeladonGymBattleText3::
+ text "I was getting"
+ line "bored."
+ done
+
+_CeladonGymEndBattleText3::
+ text "My"
+ line "makeup!"
+ prompt
+
+_CeladonGymAfterBattleText3::
+ text "Grass-type #MON"
+ line "are tough against"
+ cont "the water-type!"
+
+ para "They also have an"
+ line "edge on rock and"
+ cont "ground #MON!"
+ done
+
+_CeladonGymBattleText4::
+ text "Aren't you the"
+ line "peeping Tom?"
+ done
+
+_CeladonGymEndBattleText4::
+ text "I'm"
+ line "in shock!"
+ prompt
+
+_CeladonGymAfterBattleText4::
+ text "Oh, you weren't"
+ line "peeping? We get a"
+ cont "lot of gawkers!"
+ done
+
+_CeladonGymBattleText5::
+ text "Look at my grass"
+ line "#MON!"
+
+ para "They're so easy"
+ line "to raise!"
+ done
+
+_CeladonGymEndBattleText5::
+ text "No!"
+ prompt
+
+_CeladonGymAfterBattleText5::
+ text "We only use grass-"
+ line "type #MON at"
+ cont "our GYM!"
+
+ para "We also use them"
+ line "for making flower"
+ cont "arrangements!"
+ done
+
+_CeladonGymBattleText6::
+ text "Don't bring any"
+ line "bugs or fire"
+ cont "#MON in here!"
+ done
+
+_CeladonGymEndBattleText6::
+ text "Oh!"
+ line "You!"
+ prompt
+
+_CeladonGymAfterBattleText6::
+ text "Our LEADER, ERIKA,"
+ line "might be quiet,"
+ cont "but she's also"
+ cont "very skilled!"
+ done
+
+_CeladonGymBattleText7::
+ text "Pleased to meet"
+ line "you. My hobby is"
+ cont "#MON training."
+ done
+
+_CeladonGymEndBattleText7::
+ text "Oh!"
+ line "Splendid!"
+ prompt
+
+_CeladonGymAfterBattleText7::
+ text "I have a blind"
+ line "date coming up."
+ cont "I have to learn"
+ cont "to be polite."
+ done
+
+_CeladonGymBattleText8::
+ text "Welcome to"
+ line "CELADON GYM!"
+
+ para "You better not"
+ line "underestimate"
+ cont "girl power!"
+ done
+
+_CeladonGymEndBattleText8::
+ text "Oh!"
+ line "Beaten!"
+ prompt
+
+_CeladonGymAfterBattleText8::
+ text "I didn't bring my"
+ line "best #MON!"
+
+ para "Wait 'til next"
+ line "time!"
+ done
diff --git a/text/maps/CeladonHotel.asm b/text/CeladonHotel.asm
index f2eb059e..f2eb059e 100644
--- a/text/maps/CeladonHotel.asm
+++ b/text/CeladonHotel.asm
diff --git a/text/CeladonMansion1F.asm b/text/CeladonMansion1F.asm
new file mode 100644
index 00000000..52946a41
--- /dev/null
+++ b/text/CeladonMansion1F.asm
@@ -0,0 +1,68 @@
+_CeladonMansion1Text1::
+ text "MEOWTH: Meow!@"
+ text_end
+
+_CeladonMansion1Text3::
+ text "CLEFAIRY: Pi"
+ line "pippippi!@"
+ text_end
+
+_CeladonMansion1Text4::
+ text "NIDORAN: Kya"
+ line "kyaoo!@"
+ text_end
+
+_CeladonMansion1Text5::
+ text "CELADON MANSION"
+ line "Manager's Suite"
+ done
+
+_CeladonMansion1Text2::
+ text "My dear #MON"
+ line "keep me company."
+
+ para "MEOWTH even brings"
+ line "money home!"
+ done
+
+_CeladonMansion1Text6::
+ text "Oh, you have an"
+ line "adorable PIKACHU"
+ cont "with you.@"
+ text_end
+
+_CeladonMansion1Text7::
+ text "It seems like it"
+ line "hasn't been tamed"
+ cont "at all."
+ done
+
+_CeladonMansion1Text8::
+ text "Why don't you"
+ line "take more care"
+ cont "with PIKACHU?"
+ done
+
+_CeladonMansion1Text9::
+ text "You must be happy"
+ line "to have a #MON"
+ cont "that cute."
+ done
+
+_CeladonMansion1Text10::
+ text "Your PIKACHU seems"
+ line "tamed."
+ done
+
+_CeladonMansion1Text11::
+ text "Your PIKACHU looks"
+ line "happy with you."
+ done
+
+_CeladonMansion1Text12::
+ text "You look like a"
+ line "fantastic duo."
+
+ para "You're making me"
+ line "jealous!"
+ done
diff --git a/text/maps/CeladonMansion2F.asm b/text/CeladonMansion2F.asm
index b2ecb4fa..b2ecb4fa 100644
--- a/text/maps/CeladonMansion2F.asm
+++ b/text/CeladonMansion2F.asm
diff --git a/text/CeladonMansion3F.asm b/text/CeladonMansion3F.asm
new file mode 100644
index 00000000..4381c60f
--- /dev/null
+++ b/text/CeladonMansion3F.asm
@@ -0,0 +1,118 @@
+_ProgrammerText::
+ text "Me? I'm the"
+ line "programmer!"
+ done
+
+_ProgrammerText2::
+ text "Me? I'm the"
+ line "programmer!"
+
+ para "What a surprise!"
+ line "I never expected"
+ cont "anyone to fill a"
+ cont "#DEX."
+ done
+
+_GraphicArtistText::
+ text "I'm the graphic"
+ line "artist!"
+ cont "I drew you!"
+ done
+
+_GraphicArtistText2::
+ text "I'm the graphic"
+ line "artist!"
+
+ para "Wow, you finished"
+ line "your #DEX!"
+ cont "Want me to PRINT"
+ cont "out a DIPLOMA"
+ cont "as proof?"
+ done
+
+_GraphicArtistText3::
+ text "Just tell me if"
+ line "you want to PRINT"
+ cont "out a DIPLOMA."
+ done
+
+_GraphicArtistText4::
+ text "All done!"
+ done
+
+_GraphicArtistText5::
+ text "OK, let's not"
+ line "PRINT."
+ done
+
+_WriterText::
+ text "I wrote the story!"
+ line "Isn't ERIKA cute?"
+
+ para "I like MISTY a"
+ line "lot too!"
+
+ para "Oh, and SABRINA,"
+ line "I like her!"
+ done
+
+_WriterText2::
+ text "I wrote the story!"
+
+ para "It's great you"
+ line "caught all the"
+ cont "#MON! Thanks!"
+ done
+
+_GameDesignerText::
+ text "Is that right?"
+
+ para "I'm the game"
+ line "designer!"
+
+ para "Filling up your"
+ line "#DEX is tough,"
+ cont "but don't quit!"
+
+ para "When you finish,"
+ line "come tell me!"
+ done
+
+_CompletedDexText::
+ text "Wow! Excellent!"
+ line "You completed"
+ cont "your #DEX!"
+ cont "Congratulations!"
+ cont "...@"
+ text_end
+
+_CompletedDexText2::
+ text "Go show off your"
+ line "DIPLOMA to"
+ cont "the development"
+ cont "crew."
+ done
+
+_CeladonMansion3Text5::
+ text "It's the game"
+ line "program! Messing"
+ cont "with it could bug"
+ cont "out the game!"
+ done
+
+_CeladonMansion3Text6::
+ text "Someone's playing"
+ line "a game instead of"
+ cont "working!"
+ done
+
+_CeladonMansion3Text7::
+ text "It's the script!"
+ line "Better not look"
+ cont "at the ending!"
+ done
+
+_CeladonMansion3Text8::
+ text "GAME FREAK"
+ line "Development Room"
+ done
diff --git a/text/maps/CeladonMansionRoof.asm b/text/CeladonMansionRoof.asm
index c8fd7ec8..c8fd7ec8 100644
--- a/text/maps/CeladonMansionRoof.asm
+++ b/text/CeladonMansionRoof.asm
diff --git a/text/maps/CeladonMansionRoofHouse.asm b/text/CeladonMansionRoofHouse.asm
index dab81a8d..dab81a8d 100644
--- a/text/maps/CeladonMansionRoofHouse.asm
+++ b/text/CeladonMansionRoofHouse.asm
diff --git a/text/maps/CeladonMart1F.asm b/text/CeladonMart1F.asm
index 8d805edc..8d805edc 100644
--- a/text/maps/CeladonMart1F.asm
+++ b/text/CeladonMart1F.asm
diff --git a/text/maps/CeladonMart2F.asm b/text/CeladonMart2F.asm
index 74869902..74869902 100644
--- a/text/maps/CeladonMart2F.asm
+++ b/text/CeladonMart2F.asm
diff --git a/text/CeladonMart3F.asm b/text/CeladonMart3F.asm
new file mode 100644
index 00000000..633f1d3b
--- /dev/null
+++ b/text/CeladonMart3F.asm
@@ -0,0 +1,99 @@
+_CeladonMart3Text2::
+ text "Captured #MON"
+ line "are registered"
+ cont "with an ID No."
+ cont "and OT, the name"
+ cont "of the Original"
+ cont "Trainer that"
+ cont "caught it!"
+ done
+
+_CeladonMart3Text3::
+ text "All right!"
+
+ para "My buddy's going"
+ line "to trade me his"
+ cont "KANGASKHAN for my"
+ cont "GRAVELER!"
+ done
+
+_CeladonMart3Text4::
+ text "Come on GRAVELER!"
+
+ para "I love GRAVELER!"
+ line "I collect them!"
+
+ para "Huh?"
+
+ para "GRAVELER turned"
+ line "into a different"
+ cont "#MON!"
+ done
+
+_CeladonMart3Text5::
+ text "You can identify"
+ line "#MON you got"
+ cont "in trades by"
+ cont "their ID Numbers!"
+ done
+
+_CeladonMart3Text6::
+ text "It's an SNES!"
+ done
+
+_CeladonMart3Text7::
+ text "An RPG! There's"
+ line "no time for that!"
+ done
+
+_CeladonMart3Text9::
+ text "A sports game!"
+ line "Dad'll like that!"
+ done
+
+_CeladonMart3Text11::
+ text "A puzzle game!"
+ line "Looks addictive!"
+ done
+
+_CeladonMart3Text13::
+ text "A fighting game!"
+ line "Looks tough!"
+ done
+
+_CeladonMart3Text14::
+ text "3F: TV GAME SHOP"
+ done
+
+_CeladonMart3Text15::
+ text "Red and Blue!"
+ line "Both are #MON!"
+ done
+
+_TM18PreReceiveText::
+ text "Oh, hi! I finally"
+ line "finished #MON!"
+
+ para "Not done yet?"
+ line "This might be"
+ cont "useful!"
+ prompt
+
+_ReceivedTM18Text::
+ text "<PLAYER> received"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_TM18ExplanationText::
+ text "TM18 is COUNTER!"
+ line "Not like the one"
+ cont "I'm leaning on,"
+ cont "mind you!"
+ done
+
+_TM18NoRoomText::
+ text "Your pack is full"
+ line "of items!"
+ done
diff --git a/text/maps/CeladonMart4F.asm b/text/CeladonMart4F.asm
index c17483c1..c17483c1 100644
--- a/text/maps/CeladonMart4F.asm
+++ b/text/CeladonMart4F.asm
diff --git a/text/maps/CeladonMart5F.asm b/text/CeladonMart5F.asm
index 1871194b..1871194b 100644
--- a/text/maps/CeladonMart5F.asm
+++ b/text/CeladonMart5F.asm
diff --git a/text/CeladonMartRoof.asm b/text/CeladonMartRoof.asm
new file mode 100644
index 00000000..fa6f1f64
--- /dev/null
+++ b/text/CeladonMartRoof.asm
@@ -0,0 +1,149 @@
+_CeladonMartRoofText_484ee::
+ text "Give her which"
+ line "drink?"
+ done
+
+_CeladonMartRoofText_484f3::
+ text "Yay!"
+
+ para "FRESH WATER!"
+
+ para "Thank you!"
+
+ para "You can have this"
+ line "from me!@"
+ text_end
+
+_CeladonMartRoofText_484f9::
+ text "<PLAYER> received"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_CeladonMartRoofText_484fe::
+ text_start
+
+ para "@"
+ text_ram wcf4b
+ text " contains"
+ line "ICE BEAM!"
+
+ para "It can freeze the"
+ line "target sometimes!@"
+ text_end
+
+_CeladonMartRoofText_48504::
+ text "Yay!"
+
+ para "SODA POP!"
+
+ para "Thank you!"
+
+ para "You can have this"
+ line "from me!@"
+ text_end
+
+_CeladonMartRoofText_4850a::
+ text "<PLAYER> received"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_CeladonMartRoofText_4850f::
+ text_start
+
+ para "@"
+ text_ram wcf4b
+ text " contains"
+ line "ROCK SLIDE!@"
+ text_end
+
+_CeladonMartRoofText_48515::
+ text "Yay!"
+
+ para "LEMONADE!"
+
+ para "Thank you!"
+
+ para "You can have this"
+ line "from me!@"
+ text_end
+
+_ReceivedTM49Text::
+ text "<PLAYER> received"
+ line "TM49!@"
+ text_end
+
+_CeladonMartRoofText_48520::
+ text_start
+
+ para "TM49 contains"
+ line "TRI ATTACK!@"
+ text_end
+
+_CeladonMartRoofText_48526::
+ text "You don't have"
+ line "space for this!@"
+ text_end
+
+_CeladonMartRoofText_4852c::
+ text "No thank you!"
+ line "I'm not thirsty"
+ cont "after all!@"
+ text_end
+
+_CeladonMartRoofText1::
+ text "My sister is a"
+ line "trainer, believe"
+ cont "it or not."
+
+ para "But, she's so"
+ line "immature, she"
+ cont "drives me nuts!"
+ done
+
+_CeladonMartRoofText_48598::
+ text "I'm thirsty!"
+ line "I want something"
+ cont "to drink!"
+ done
+
+_CeladonMartRoofText4::
+ text "I'm thirsty!"
+ line "I want something"
+ cont "to drink!"
+
+ para "Give her a drink?"
+ done
+
+_CeladonMartRoofText6::
+ text "ROOFTOP SQUARE:"
+ line "VENDING MACHINES"
+ done
+
+_VendingMachineText1::
+ text "A vending machine!"
+ line "Here's the menu!"
+ prompt
+
+_VendingMachineText4::
+ text "Oops, not enough"
+ line "money!"
+ done
+
+_VendingMachineText5::
+ text_ram wcf4b
+ text_start
+ line "popped out!"
+ done
+
+_VendingMachineText6::
+ text "There's no more"
+ line "room for stuff!"
+ done
+
+_VendingMachineText7::
+ text "Not thirsty!"
+ done
diff --git a/text/maps/CeladonPokecenter.asm b/text/CeladonPokecenter.asm
index a04f51c9..a04f51c9 100644
--- a/text/maps/CeladonPokecenter.asm
+++ b/text/CeladonPokecenter.asm
diff --git a/text/maps/CeruleanBadgeHouse.asm b/text/CeruleanBadgeHouse.asm
index 4bba10cd..4bba10cd 100644
--- a/text/maps/CeruleanBadgeHouse.asm
+++ b/text/CeruleanBadgeHouse.asm
diff --git a/text/maps/CeruleanBadgeHouse_2.asm b/text/CeruleanBadgeHouse_2.asm
index e5da0622..e5da0622 100755..100644
--- a/text/maps/CeruleanBadgeHouse_2.asm
+++ b/text/CeruleanBadgeHouse_2.asm
diff --git a/text/CeruleanCaveB1F.asm b/text/CeruleanCaveB1F.asm
new file mode 100644
index 00000000..cb407c60
--- /dev/null
+++ b/text/CeruleanCaveB1F.asm
@@ -0,0 +1,3 @@
+_MewtwoBattleText::
+ text "Mew!@"
+ text_end
diff --git a/text/CeruleanCity.asm b/text/CeruleanCity.asm
new file mode 100644
index 00000000..955dca89
--- /dev/null
+++ b/text/CeruleanCity.asm
@@ -0,0 +1,235 @@
+_CeruleanCityText_19668::
+ text "<RIVAL>: Yo!"
+ line "<PLAYER>!"
+
+ para "You're still"
+ line "struggling along"
+ cont "back here?"
+
+ para "I'm doing great!"
+ line "I caught a bunch"
+ cont "of strong and"
+ cont "smart #MON!"
+
+ para "Here, let me see"
+ line "what you caught,"
+ cont "<PLAYER>!"
+ done
+
+_CeruleanCityText_1966d::
+ text "Hey!"
+ line "Take it easy!"
+ cont "You won already!"
+ prompt
+
+_CeruleanCityText_19672::
+ text "Heh!"
+ line "You're no match"
+ cont "for my genius!"
+ prompt
+
+_CeruleanCityText_19677::
+ text "<RIVAL>: Hey,"
+ line "guess what?"
+
+ para "I went to BILL's"
+ line "and got him to"
+ cont "show me his rare"
+ cont "#MON!"
+
+ para "That added a lot"
+ line "of pages to my"
+ cont "#DEX!"
+
+ para "After all, BILL's"
+ line "world famous as a"
+ cont "#MANIAC!"
+
+ para "He invented the"
+ line "#MON Storage"
+ cont "System on PC!"
+
+ para "Since you're using"
+ line "his system, go"
+ cont "thank him!"
+
+ para "Well, I better"
+ line "get rolling!"
+ cont "Smell ya later!"
+ done
+
+_CeruleanCityText_196d9::
+ text "Hey! Stay out!"
+ line "It's not your"
+ cont "yard! Huh? Me?"
+
+ para "I'm an innocent"
+ line "bystander! Don't"
+ cont "you believe me?"
+ done
+
+_ReceivedTM28Text::
+ text "<PLAYER> recovered"
+ line "TM28!@"
+ text_end
+
+_ReceivedTM28Text2::
+ text_start
+
+ para "I better get"
+ line "moving! Bye!@"
+ text_end
+
+_TM28NoRoomText::
+ text "Make room for"
+ line "this!"
+
+ para "I can't run until"
+ line "I give it to you!"
+ done
+
+_CeruleanCityText_196ee::
+ text "Stop!"
+ line "I give up! I'll"
+ cont "leave quietly!"
+ prompt
+
+_CeruleanCityText_196f3::
+ text "OK! I'll return"
+ line "the TM I stole!"
+ prompt
+
+_CeruleanCityText3::
+ text "You're a trainer"
+ line "too? Collecting,"
+ cont "fighting, it's a"
+ cont "tough life."
+ done
+
+_CeruleanCityText4::
+ text "That bush in"
+ line "front of the shop"
+ cont "is in the way."
+
+ para "There might be a"
+ line "way around."
+ done
+
+_CeruleanCityText5::
+ text "You're making an"
+ line "encyclopedia on"
+ cont "#MON? That"
+ cont "sounds amusing."
+ done
+
+_CeruleanCityText6::
+ text "These poor people"
+ line "here were robbed."
+
+ para "We're positive"
+ line "that TEAM ROCKET"
+ cont "is behind this"
+ cont "terrible deed."
+
+ para "Even our POLICE"
+ line "FORCE has trouble"
+ cont "with the ROCKETs!"
+ done
+
+_CeruleanCityText_19730::
+ text "OK! ELECTRODE!"
+ line "Use SONICBOOM!"
+ cont "Please ELECTRODE,"
+ cont "pay attention!"
+ done
+
+_CeruleanCityText_19735::
+ text "ELECTRODE, TACKLE!"
+ line "No! You blew it"
+ cont "again!"
+ done
+
+_CeruleanCityText_1973a::
+ text "ELECTRODE, SWIFT!"
+ line "No! That's wrong!"
+
+ para "Training #MON"
+ line "is difficult!"
+
+ para "Your #MON's"
+ line "obedience depends"
+ cont "on your abilities"
+ cont "as a trainer!"
+ done
+
+_CeruleanCityText_1976f::
+ text "ELECTRODE took a"
+ line "snooze..."
+ done
+
+_CeruleanCityText_19774::
+ text "ELECTRODE is"
+ line "loafing around..."
+ done
+
+_CeruleanCityText_19779::
+ text "ELECTRODE turned"
+ line "away..."
+ done
+
+_CeruleanCityText_1977e::
+ text "ELECTRODE"
+ line "ignored orders..."
+ done
+
+_CeruleanCityText9::
+ text "I want a bright"
+ line "red BICYCLE!"
+
+ para "I'll keep it at"
+ line "home, so it won't"
+ cont "get dirty!"
+ done
+
+_CeruleanCityText10::
+ text "This is CERULEAN"
+ line "CAVE! Horribly"
+ cont "strong #MON"
+ cont "live in there!"
+
+ para "The #MON LEAGUE"
+ line "champion is the"
+ cont "only person who"
+ cont "is allowed in!"
+ done
+
+_CeruleanCityText12::
+ text "CERULEAN CITY"
+ line "A Mysterious,"
+ cont "Blue Aura"
+ cont "Surrounds It"
+ done
+
+_CeruleanCityText13::
+ text "TRAINER TIPS"
+
+ para "Pressing B Button"
+ line "during evolution"
+ cont "cancels the whole"
+ cont "process."
+ done
+
+_CeruleanCityText16::
+ text "Grass and caves"
+ line "handled easily!"
+ cont "BIKE SHOP"
+ done
+
+_CeruleanCityText17::
+ text "CERULEAN CITY"
+ line "#MON GYM"
+ cont "LEADER: MISTY"
+
+ para "The Tomboyish"
+ line "Mermaid!"
+ done
diff --git a/text/CeruleanGym.asm b/text/CeruleanGym.asm
new file mode 100644
index 00000000..4f8d5ab2
--- /dev/null
+++ b/text/CeruleanGym.asm
@@ -0,0 +1,135 @@
+_CeruleanGymText_5c7be::
+ text "Hi, you're a new"
+ line "face!"
+
+ para "What's your policy"
+ line "on #MON? What"
+ cont "is your approach?"
+
+ para "My policy is an"
+ line "all-out offensive"
+ cont "with water-type"
+ cont "#MON!"
+
+ para "MISTY, the world-"
+ line "famous beauty, is"
+ cont "your host!"
+
+ para "Are you ready,"
+ line "sweetie?"
+ done
+
+_CeruleanGymText_5c7c3::
+ text "TM11 teaches"
+ line "BUBBLEBEAM!"
+
+ para "Use it on an"
+ line "aquatic #MON!"
+ done
+
+_CeruleanGymText_5c7c8::
+ text "The CASCADEBADGE"
+ line "makes all #MON"
+ cont "up to L30 obey!"
+
+ para "That includes"
+ line "even outsiders!"
+
+ para "There's more, you"
+ line "can now use CUT"
+ cont "anytime!"
+
+ para "You can CUT down"
+ line "small bushes to"
+ cont "open new paths!"
+
+ para "You can also have"
+ line "my favorite TM!"
+ done
+
+_ReceivedTM11Text::
+ text "<PLAYER> received"
+ line "TM11!@"
+ text_end
+
+_CeruleanGymText_5c7d3::
+ text "You better make"
+ line "room for this!"
+ done
+
+_CeruleanGymText_5c7d8::
+ text "I can't"
+ line "believe I lost!"
+
+ para "All right!"
+
+ para "You can have the"
+ line "CASCADEBADGE to"
+ cont "show you beat me!"
+ prompt
+
+_CeruleanGymBattleText1::
+ text "I'm more than good"
+ line "enough for you!"
+
+ para "MISTY can wait!"
+ done
+
+_CeruleanGymEndBattleText1::
+ text "You"
+ line "overwhelmed me!"
+ prompt
+
+_CeruleanGymAfterBattleText1::
+ text "You have to face"
+ line "other trainers to"
+ cont "find out how good"
+ cont "you really are."
+ done
+
+_CeruleanGymBattleText2::
+ text "Splash!"
+
+ para "I'm first up!"
+ line "Let's do it!"
+ done
+
+_CeruleanGymEndBattleText2::
+ text "That"
+ line "can't be!"
+ prompt
+
+_CeruleanGymAfterBattleText2::
+ text "MISTY is going to"
+ line "keep improving!"
+
+ para "She won't lose to"
+ line "someone like you!"
+ done
+
+_CeruleanGymText_5c82a::
+ text "Yo! Champ in"
+ line "making!"
+
+ para "Here's my advice!"
+
+ para "The LEADER, MISTY,"
+ line "is a pro who uses"
+ cont "water #MON!"
+
+ para "You can drain all"
+ line "their water with"
+ cont "plant #MON!"
+
+ para "Or, zap them with"
+ line "electricity!"
+ done
+
+_CeruleanGymText_5c82f::
+ text "You beat MISTY!"
+ line "What'd I tell ya?"
+
+ para "You and me, kid,"
+ line "we make a pretty"
+ cont "darn good team!"
+ done
diff --git a/text/maps/CeruleanMart.asm b/text/CeruleanMart.asm
index 86a74588..86a74588 100644
--- a/text/maps/CeruleanMart.asm
+++ b/text/CeruleanMart.asm
diff --git a/text/maps/CeruleanPokecenter.asm b/text/CeruleanPokecenter.asm
index 497fbce3..497fbce3 100644
--- a/text/maps/CeruleanPokecenter.asm
+++ b/text/CeruleanPokecenter.asm
diff --git a/text/CeruleanTradeHouse.asm b/text/CeruleanTradeHouse.asm
new file mode 100644
index 00000000..d50a4ac4
--- /dev/null
+++ b/text/CeruleanTradeHouse.asm
@@ -0,0 +1,46 @@
+MelanieText1::
+ text "I take care of"
+ line "injured #MON."
+
+ para "I nursed this"
+ line "BULBASAUR back to"
+ cont "health."
+
+ para "It needs a good"
+ line "trainer to take"
+ cont "care of it now.@"
+ text_end
+
+MelanieText2::
+ text "I know! Would you"
+ line "take care of this"
+ cont "BULBASAUR?"
+ done
+
+MelanieText3::
+ text "Please take care"
+ line "of BULBASAUR!@"
+ text_end
+
+MelanieText4::
+ text "Is BULBASAUR"
+ line "doing well?@"
+ text_end
+
+MelanieText5::
+ text "Oh..."
+ line "That's too bad...@"
+ text_end
+
+MelanieBulbasaurText::
+ text "BULBASAUR: Bubba!"
+ line "Zoar!@"
+ text_end
+
+MelanieOddishText::
+ text "ODDISH: Orddissh!@"
+ text_end
+
+MelanieSandshrewText::
+ text "SANDSHREW: Pikii!@"
+ text_end
diff --git a/text/maps/CeruleanTrashedHouse.asm b/text/CeruleanTrashedHouse.asm
index f79540ae..f79540ae 100644
--- a/text/maps/CeruleanTrashedHouse.asm
+++ b/text/CeruleanTrashedHouse.asm
diff --git a/text/ChampionsRoom.asm b/text/ChampionsRoom.asm
new file mode 100644
index 00000000..575b7da4
--- /dev/null
+++ b/text/ChampionsRoom.asm
@@ -0,0 +1,146 @@
+_GaryChampionIntroText::
+ text "<RIVAL>: Hey!"
+
+ para "I was looking"
+ line "forward to seeing"
+ cont "you, <PLAYER>!"
+
+ para "My rival should"
+ line "be strong to keep"
+ cont "me sharp!"
+
+ para "While working on"
+ line "#DEX, I looked"
+ cont "all over for"
+ cont "powerful #MON!"
+
+ para "Not only that, I"
+ line "assembled teams"
+ cont "that would beat"
+ cont "any #MON type!"
+
+ para "And now!"
+
+ para "I'm the #MON"
+ line "LEAGUE champion!"
+
+ para "<PLAYER>! Do you"
+ line "know what that"
+ cont "means?"
+
+ para "I'll tell you!"
+
+ para "I am the most"
+ line "powerful trainer"
+ cont "in the world!"
+ done
+
+_GaryDefeatedText::
+ text "NO!"
+ line "That can't be!"
+ cont "You beat my best!"
+
+ para "After all that"
+ line "work to become"
+ cont "LEAGUE champ?"
+
+ para "My reign is over"
+ line "already?"
+ cont "It's not fair!"
+ prompt
+
+_GaryVictoryText::
+ text "Hahaha!"
+ line "I won, I won!"
+
+ para "I'm too good for"
+ line "you, <PLAYER>!"
+
+ para "You did well to"
+ line "even reach me,"
+ cont "<RIVAL>, the"
+ cont "#MON genius!"
+
+ para "Nice try, loser!"
+ line "Hahaha!"
+ prompt
+
+_GaryText_76103::
+ text "Why?"
+ line "Why did I lose?"
+
+ para "I never made any"
+ line "mistakes raising"
+ cont "my #MON..."
+
+ para "Darn it! You're"
+ line "the new #MON"
+ cont "LEAGUE champion!"
+
+ para "Although I don't"
+ line "like to admit it."
+ done
+
+_GaryText2::
+ text "OAK: <PLAYER>!"
+ done
+
+_GaryText_76120::
+ text "OAK: So, you won!"
+ line "Congratulations!"
+ cont "You're the new"
+ cont "#MON LEAGUE"
+ cont "champion!"
+
+ para "You've grown up so"
+ line "much since you"
+ cont "first left with"
+ cont "@"
+ text_ram wcd6d
+ text "!"
+
+ para "<PLAYER>, you have"
+ line "come of age!"
+ done
+
+_GaryText_76125::
+ text "OAK: <RIVAL>! I'm"
+ line "disappointed!"
+
+ para "I came when I"
+ line "heard you beat"
+ cont "the ELITE FOUR!"
+
+ para "But, when I got"
+ line "here, you had"
+ cont "already lost!"
+
+ para "<RIVAL>! Do you"
+ line "understand why"
+ cont "you lost?"
+
+ para "You have forgotten"
+ line "to treat your"
+ cont "#MON with"
+ cont "trust and love!"
+
+ para "Without them, you"
+ line "will never become"
+ cont "a champ again!"
+ done
+
+_GaryText_7612a::
+ text "OAK: <PLAYER>!"
+
+ para "You understand"
+ line "that your victory"
+ cont "was not just your"
+ cont "own doing!"
+
+ para "The bond you share"
+ line "with your #MON"
+ cont "is marvelous!"
+
+ para "<PLAYER>!"
+ line "Come with me!"
+ done
diff --git a/text/CinnabarGym.asm b/text/CinnabarGym.asm
new file mode 100644
index 00000000..a59dbeaa
--- /dev/null
+++ b/text/CinnabarGym.asm
@@ -0,0 +1,255 @@
+_BlaineBattleText::
+ text "Hah!"
+
+ para "I am BLAINE! I"
+ line "am the LEADER of"
+ cont "CINNABAR GYM!"
+
+ para "My fiery #MON"
+ line "will incinerate"
+ cont "all challengers!"
+
+ para "Hah! You better"
+ line "have BURN HEAL!"
+ done
+
+_BlaineEndBattleText::
+ text "I have"
+ line "burnt out!"
+
+ para "You have earned"
+ line "the VOLCANOBADGE!@"
+ text_end
+
+_BlaineFireBlastText::
+ text "FIRE BLAST is the"
+ line "ultimate fire"
+ cont "technique!"
+
+ para "Don't waste it on"
+ line "water #MON!"
+ done
+
+_BlaineBadgeText::
+ text "Hah!"
+
+ para "The VOLCANOBADGE"
+ line "heightens the"
+ cont "SPECIAL abilities"
+ cont "of your #MON!"
+
+ para "Here, you can"
+ line "have this too!"
+ done
+
+_ReceivedTM38Text::
+ text "<PLAYER> received"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_TM38ExplanationText::
+ text_start
+
+ para "TM38 contains"
+ line "FIRE BLAST!"
+
+ para "Teach it to fire-"
+ line "type #MON!"
+
+ para "CHARMELEON or"
+ line "PONYTA would be"
+ cont "good bets!"
+ done
+
+_TM38NoRoomText::
+ text "Make room for my"
+ line "gift!"
+ done
+
+_CinnabarGymText_7595f::
+ text "Do you know how"
+ line "hot #MON fire"
+ cont "breath can get?"
+ done
+
+_CinnabarGymText_75964::
+ text "Yow!"
+ line "Hot, hot, hot!"
+ prompt
+
+_CinnabarGymText_75969::
+ text "Fire, or to be"
+ line "more precise,"
+ cont "combustion..."
+
+ para "Blah, blah, blah,"
+ line "blah..."
+ done
+
+_CinnabarGymText_75994::
+ text "I was a thief, but"
+ line "I became straight"
+ cont "as a trainer!"
+ done
+
+_CinnabarGymText_75999::
+ text "I"
+ line "surrender!"
+ prompt
+
+_CinnabarGymText_7599e::
+ text "I can't help"
+ line "stealing other"
+ cont "people's #MON!"
+ done
+
+_CinnabarGymText_759c9::
+ text "You can't win!"
+ line "I have studied"
+ cont "#MON totally!"
+ done
+
+_CinnabarGymText_759ce::
+ text "Waah!"
+ line "My studies!"
+ prompt
+
+_CinnabarGymText_759d3::
+ text "My theories are"
+ line "too complicated"
+ cont "for you!"
+ done
+
+_CinnabarGymText_759fe::
+ text "I just like using"
+ line "fire #MON!"
+ done
+
+_CinnabarGymText_75a03::
+ text "Too hot"
+ line "to handle!"
+ prompt
+
+_CinnabarGymText_75a08::
+ text "I wish there was"
+ line "a thief #MON!"
+ cont "I'd use that!"
+ done
+
+_CinnabarGymText_75a33::
+ text "I know why BLAINE"
+ line "became a trainer!"
+ done
+
+_CinnabarGymText_75a38::
+ text "Ow!"
+ prompt
+
+_CinnabarGymText_75a3d::
+ text "BLAINE was lost"
+ line "in the mountains"
+ cont "when a fiery bird"
+ cont "#MON appeared."
+
+ para "Its light enabled"
+ line "BLAINE to find"
+ cont "his way down!"
+ done
+
+_CinnabarGymText_75a68::
+ text "I've been to many"
+ line "GYMs, but this is"
+ cont "my favorite!"
+ done
+
+_CinnabarGymText_75a6d::
+ text "Yowza!"
+ line "Too hot!"
+ prompt
+
+_CinnabarGymText_75a72::
+ text "Us fire #MON"
+ line "fans like PONYTA"
+ cont "and NINETALES!"
+ done
+
+_CinnabarGymText_75a9d::
+ text "Fire is weak"
+ line "against H2O!"
+ done
+
+_CinnabarGymText_75aa2::
+ text "Oh!"
+ line "Snuffed out!"
+ prompt
+
+_CinnabarGymText_75aa7::
+ text "Water beats fire!"
+ line "But, fire melts"
+ cont "ice #MON!"
+ done
+
+_CinnabarGymText_75ac2::
+ text "Yo! Champ in"
+ line "making!"
+
+ para "The hot-headed"
+ line "BLAINE is a fire"
+ cont "#MON pro!"
+
+ para "Douse his spirits"
+ line "with water!"
+
+ para "You better take"
+ line "some BURN HEALs!"
+ done
+
+_CinnabarGymText_75ac7::
+ text "<PLAYER>! You beat"
+ line "that fire brand!"
+ done
+
+_CinnabarGymText_1::
+ text "This GYM is also"
+ line "known as the QUIZ"
+ cont "GYM."
+
+ para "You have to take a"
+ line "quiz if you want"
+ cont "to see BLAINE."
+
+ para "You don't have to"
+ line "fight us if you"
+ cont "get it right."
+ done
+
+_CinnabarGymText_2::
+ text "Think you can do"
+ line "it?"
+ done
+
+_CinnabarGymText_3::
+ text "This one's tricky!"
+ done
+
+_CinnabarGymText_4::
+ text "#MON enjoy"
+ line "quizzes too!"
+ done
+
+_CinnabarGymText_5::
+ text "I like it here at"
+ line "QUIZ GYM."
+ done
+
+_CinnabarGymText_6::
+ text "This is the last"
+ line "question."
+ done
+
+_CinnabarGymText_7::
+ text "Come on, answer"
+ line "the question!"
+ done
diff --git a/text/maps/CinnabarIsland.asm b/text/CinnabarIsland.asm
index 54552a46..54552a46 100644
--- a/text/maps/CinnabarIsland.asm
+++ b/text/CinnabarIsland.asm
diff --git a/text/maps/CinnabarLab.asm b/text/CinnabarLab.asm
index a93a484d..a93a484d 100644
--- a/text/maps/CinnabarLab.asm
+++ b/text/CinnabarLab.asm
diff --git a/text/CinnabarLabFossilRoom.asm b/text/CinnabarLabFossilRoom.asm
new file mode 100644
index 00000000..e7983fe9
--- /dev/null
+++ b/text/CinnabarLabFossilRoom.asm
@@ -0,0 +1,78 @@
+_Lab4Text_75dc6::
+ text "Hiya!"
+
+ para "I am important"
+ line "doctor!"
+
+ para "I study here rare"
+ line "#MON fossils!"
+
+ para "You! Have you a"
+ line "fossil for me?"
+ prompt
+
+_Lab4Text_75dcb::
+ text "No! Is too bad!"
+ done
+
+_Lab4Text_75dd0::
+ text "I take a little"
+ line "time!"
+
+ para "You go for walk a"
+ line "little while!"
+ done
+
+_Lab4Text_75dd5::
+ text "Where were you?"
+
+ para "Your fossil is"
+ line "back to life!"
+
+ para "It was @"
+ text_ram wcf4b
+ text_start
+ line "like I think!"
+ prompt
+
+_Lab4Text_610ae::
+ text "Oh! That is"
+ line "@"
+ text_ram wcd6d
+ text "!"
+
+ para "It is fossil of"
+ line "@"
+ text_ram wcf4b
+ text ", a"
+ cont "#MON that is"
+ cont "already extinct!"
+
+ para "My Resurrection"
+ line "Machine will make"
+ cont "that #MON live"
+ cont "again!"
+ done
+
+_Lab4Text_610b3::
+ text "So! You hurry and"
+ line "give me that!"
+
+ para "<PLAYER> handed"
+ line "over @"
+ text_ram wcd6d
+ text "!"
+ prompt
+
+_Lab4Text_610b8::
+ text "I take a little"
+ line "time!"
+
+ para "You go for walk a"
+ line "little while!"
+ done
+
+_Lab4Text_610bd::
+ text "Aiyah! You come"
+ line "again!"
+ done
diff --git a/text/CinnabarLabMetronomeRoom.asm b/text/CinnabarLabMetronomeRoom.asm
new file mode 100644
index 00000000..f9b2c5d5
--- /dev/null
+++ b/text/CinnabarLabMetronomeRoom.asm
@@ -0,0 +1,64 @@
+_TM35PreReceiveText::
+ text "Tch-tch-tch!"
+ line "I made a cool TM!"
+
+ para "It can cause all"
+ line "kinds of fun!"
+ prompt
+
+_ReceivedTM35Text::
+ text "<PLAYER> received "
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_TM35ExplanationText::
+ text "Tch-tch-tch!"
+ line "That's the sound"
+ cont "of a METRONOME!"
+
+ para "It tweaks your"
+ line "#MON's brain"
+ cont "into using moves"
+ cont "it doesn't know!"
+ done
+
+_TM35NoRoomText::
+ text "Your pack is"
+ line "crammed full!"
+ done
+
+_Lab3Text2::
+ text "EEVEE can evolve"
+ line "into 1 of 3 kinds"
+ cont "of #MON."
+ done
+
+_Lab3Text3::
+ text "There's an e-mail"
+ line "message!"
+
+ para "..."
+
+ para "The 3 legendary"
+ line "bird #MON are"
+ cont "ARTICUNO, ZAPDOS"
+ cont "and MOLTRES."
+
+ para "Their whereabouts"
+ line "are unknown."
+
+ para "We plan to explore"
+ line "the cavern close"
+ cont "to CERULEAN."
+
+ para "From: #MON"
+ line "RESEARCH TEAM"
+
+ para "..."
+ done
+
+_Lab3Text5::
+ text "An amber pipe!"
+ done
diff --git a/text/maps/CinnabarLabTradeRoom.asm b/text/CinnabarLabTradeRoom.asm
index 196124e7..196124e7 100644
--- a/text/maps/CinnabarLabTradeRoom.asm
+++ b/text/CinnabarLabTradeRoom.asm
diff --git a/text/maps/CinnabarMart.asm b/text/CinnabarMart.asm
index 42a41d06..42a41d06 100644
--- a/text/maps/CinnabarMart.asm
+++ b/text/CinnabarMart.asm
diff --git a/text/maps/CinnabarPokecenter.asm b/text/CinnabarPokecenter.asm
index cf481764..cf481764 100644
--- a/text/maps/CinnabarPokecenter.asm
+++ b/text/CinnabarPokecenter.asm
diff --git a/text/CopycatsHouse1F.asm b/text/CopycatsHouse1F.asm
new file mode 100644
index 00000000..d2d1f42a
--- /dev/null
+++ b/text/CopycatsHouse1F.asm
@@ -0,0 +1,21 @@
+_CopycatsHouse1FText1::
+ text "My daughter is so"
+ line "self-centered."
+ cont "She only has a"
+ cont "few friends."
+ done
+
+_CopycatsHouse1FText2::
+ text "My daughter likes"
+ line "to mimic people."
+
+ para "Her mimicry has"
+ line "earned her the"
+ cont "nickname COPYCAT"
+ cont "around here!"
+ done
+
+_CopycatsHouse1FText3::
+ text "CHANSEY: Chaaan"
+ line "sey!@"
+ text_end
diff --git a/text/CopycatsHouse2F.asm b/text/CopycatsHouse2F.asm
new file mode 100644
index 00000000..7d1aa0ad
--- /dev/null
+++ b/text/CopycatsHouse2F.asm
@@ -0,0 +1,100 @@
+_CopycatsHouse2FText_5ccd4::
+ text "<PLAYER>: Hi! Do"
+ line "you like #MON?"
+
+ para "<PLAYER>: Uh no, I"
+ line "just asked you."
+
+ para "<PLAYER>: Huh?"
+ line "You're strange!"
+
+ para "COPYCAT: Hmm?"
+ line "Quit mimicking?"
+
+ para "But, that's my"
+ line "favorite hobby!"
+ prompt
+
+_TM31PreReceiveText::
+ text "Oh wow!"
+ line "A # DOLL!"
+
+ para "For me?"
+ line "Thank you!"
+
+ para "You can have"
+ line "this, then!"
+ prompt
+
+_ReceivedTM31Text::
+ text "<PLAYER> received"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_TM31ExplanationText1::
+ text_start
+
+ para "TM31 contains my"
+ line "favorite, MIMIC!"
+
+ para "Use it on a good"
+ line "#MON!@"
+ text_end
+
+_TM31ExplanationText2::
+ text "<PLAYER>: Hi!"
+ line "Thanks for TM31!"
+
+ para "<PLAYER>: Pardon?"
+
+ para "<PLAYER>: Is it"
+ line "that fun to mimic"
+ cont "my every move?"
+
+ para "COPYCAT: You bet!"
+ line "It's a scream!"
+ done
+
+_TM31NoRoomText::
+ text "Don't you want"
+ line "this?@"
+ text_end
+
+_CopycatsHouse2FText2::
+ text "DODUO: Giiih!"
+
+ para "MIRROR MIRROR ON"
+ line "THE WALL, WHO IS"
+ cont "THE FAIREST ONE"
+ cont "OF ALL?"
+ done
+
+_CopycatsHouse2FText3::
+ text "This is a rare"
+ line "#MON! Huh?"
+ cont "It's only a doll!"
+ done
+
+_CopycatsHouse2FText6::
+ text "A game with MARIO"
+ line "wearing a bucket"
+ cont "on his head!"
+ done
+
+_CopycatsHouse2FText_5cd17::
+ text "..."
+
+ para "My Secrets!"
+
+ para "Skill: Mimicry!"
+ line "Hobby: Collecting"
+ cont "dolls!"
+ cont "Favorite #MON:"
+ cont "CLEFAIRY!"
+ done
+
+_CopycatsHouse2FText_5cd1c::
+ text "Huh? Can't see!"
+ done
diff --git a/text/Daycare.asm b/text/Daycare.asm
new file mode 100644
index 00000000..aa1e5bc5
--- /dev/null
+++ b/text/Daycare.asm
@@ -0,0 +1,97 @@
+_DayCareIntroText::
+ text "I run a DAYCARE."
+ line "Would you like me"
+ cont "to raise one of"
+ cont "your #MON?"
+ done
+
+_DayCareWhichMonText::
+ text "Which #MON"
+ line "should I raise?"
+ prompt
+
+_DayCareWillLookAfterMonText::
+ text "Fine, I'll look"
+ line "after @"
+ text_ram wcd6d
+ text_start
+ cont "for a while."
+ prompt
+
+_DayCareComeSeeMeInAWhileText::
+ text "Come see me in"
+ line "a while."
+ done
+
+_DayCareMonHasGrownText::
+ text "Your @"
+ text_ram wcd6d
+ text_start
+ line "has grown a lot!"
+
+ para "By level, it's"
+ line "grown by @"
+ text_decimal wDayCareNumLevelsGrown, 1, 3
+ text "!"
+
+ para "Aren't I great?"
+ prompt
+
+_DayCareOweMoneyText::
+ text "You owe me ¥@"
+ text_bcd wDayCareTotalCost, 2 | LEADING_ZEROES | LEFT_ALIGN
+ text_start
+ line "for the return"
+ cont "of this #MON."
+ done
+
+_DayCareGotMonBackText::
+ text "<PLAYER> got"
+ line "@"
+ text_ram wDayCareMonName
+ text " back!"
+ done
+
+_DayCareMonNeedsMoreTimeText::
+ text "Back already?"
+ line "Your @"
+ text_ram wcd6d
+ text_start
+ cont "needs some more"
+ cont "time with me."
+ prompt
+
+_DayCareAllRightThenText::
+ text "All right then,"
+ line "@"
+ text_end
+
+_DayCareComeAgainText::
+ text "Come again."
+ done
+
+_DayCareNoRoomForMonText::
+ text "You have no room"
+ line "for this #MON!"
+ done
+
+_DayCareOnlyHaveOneMonText::
+ text "You only have one"
+ line "#MON with you."
+ done
+
+_DayCareCantAcceptMonWithHMText::
+ text "I can't accept a"
+ line "#MON that"
+ cont "knows an HM move."
+ done
+
+_DayCareHeresYourMonText::
+ text "Thank you! Here's"
+ line "your #MON!"
+ prompt
+
+_DayCareNotEnoughMoneyText::
+ text "Hey, you don't"
+ line "have enough ¥!"
+ done
diff --git a/text/maps/DiglettsCaveRoute11.asm b/text/DiglettsCaveRoute11.asm
index ecd3225e..ecd3225e 100644
--- a/text/maps/DiglettsCaveRoute11.asm
+++ b/text/DiglettsCaveRoute11.asm
diff --git a/text/maps/DiglettsCaveRoute2.asm b/text/DiglettsCaveRoute2.asm
index a04bbef7..a04bbef7 100644
--- a/text/maps/DiglettsCaveRoute2.asm
+++ b/text/DiglettsCaveRoute2.asm
diff --git a/text/maps/FightingDojo.asm b/text/FightingDojo.asm
index a6ccc8c3..a6ccc8c3 100644
--- a/text/maps/FightingDojo.asm
+++ b/text/FightingDojo.asm
diff --git a/text/maps/FuchsiaBillsGrandpasHouse.asm b/text/FuchsiaBillsGrandpasHouse.asm
index 7b6556b1..7b6556b1 100644
--- a/text/maps/FuchsiaBillsGrandpasHouse.asm
+++ b/text/FuchsiaBillsGrandpasHouse.asm
diff --git a/text/maps/FuchsiaCity.asm b/text/FuchsiaCity.asm
index 0392a1ed..0392a1ed 100644
--- a/text/maps/FuchsiaCity.asm
+++ b/text/FuchsiaCity.asm
diff --git a/text/FuchsiaGoodRodHouse.asm b/text/FuchsiaGoodRodHouse.asm
new file mode 100644
index 00000000..142c2837
--- /dev/null
+++ b/text/FuchsiaGoodRodHouse.asm
@@ -0,0 +1,44 @@
+_FuchsiaHouse3Text_561bd::
+ text "I'm the FISHING"
+ line "GURU's older"
+ cont "brother!"
+
+ para "I simply Looove"
+ line "fishing!"
+
+ para "Do you like to"
+ line "fish?"
+ done
+
+_FuchsiaHouse3Text_561c2::
+ text "Grand! I like"
+ line "your style!"
+
+ para "Take this and"
+ line "fish, young one!"
+
+ para "<PLAYER> received"
+ line "a @"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_FuchsiaHouse3Text_56212::
+ text "Oh... That's so"
+ line "disappointing..."
+ done
+
+_FuchsiaHouse3Text_56217::
+ text "Hello there,"
+ line "<PLAYER>!"
+
+ para "How are the fish"
+ line "biting?"
+ done
+
+_FuchsiaHouse3Text_5621c::
+ text "Oh no!"
+
+ para "You have no room"
+ line "for my gift!"
+ done
diff --git a/text/FuchsiaGym.asm b/text/FuchsiaGym.asm
new file mode 100644
index 00000000..587af1a1
--- /dev/null
+++ b/text/FuchsiaGym.asm
@@ -0,0 +1,221 @@
+_KogaBeforeBattleText::
+ text "KOGA: Fwahahaha!"
+
+ para "A mere child like"
+ line "you dares to"
+ cont "challenge me?"
+
+ para "Very well, I"
+ line "shall show you"
+ cont "true terror as a"
+ cont "ninja master!"
+
+ para "You shall feel"
+ line "the despair of"
+ cont "poison and sleep"
+ cont "techniques!"
+ done
+
+_KogaAfterBattleText::
+ text "Humph!"
+ line "You have proven"
+ cont "your worth!"
+
+ para "Here! Take the"
+ line "SOULBADGE!"
+ prompt
+
+_KogaExplainToxicText::
+ text "When afflicted by"
+ line "TOXIC, #MON"
+ cont "suffer more and"
+ cont "more as battle"
+ cont "progresses!"
+
+ para "It will surely"
+ line "terrorize foes!"
+ done
+
+_FuchsiaGymText9::
+ text "Now that you have"
+ line "the SOULBADGE,"
+ cont "the DEFENSE of"
+ cont "your #MON"
+ cont "increases!"
+
+ para "It also lets you"
+ line "SURF outside of"
+ cont "battle!"
+
+ para "Ah! Take this"
+ line "too!"
+ done
+
+_ReceivedTM06Text::
+ text "<PLAYER> received"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_TM06ExplanationText::
+ text_start
+ para "TM06 contains"
+ line "TOXIC!"
+
+ para "It is a secret"
+ line "technique over"
+ cont "400 years old!"
+ done
+
+_TM06NoRoomText::
+ text "Make space for"
+ line "this, child!"
+ done
+
+_FuchsiaGymBattleText1::
+ text "Strength isn't"
+ line "the key for"
+ cont "#MON!"
+
+ para "It's strategy!"
+
+ para "I'll show you how"
+ line "strategy can beat"
+ cont "brute strength!"
+ done
+
+_FuchsiaGymEndBattleText1::
+ text "What?"
+ line "Extraordinary!"
+ prompt
+
+_FuchsiaGymAfterBattleText1::
+ text "So, you mix brawn"
+ line "with brains?"
+ cont "Good strategy!"
+ done
+
+_FuchsiaGymBattleText2::
+ text "I wanted to become"
+ line "a ninja, so I"
+ cont "joined this GYM!"
+ done
+
+_FuchsiaGymEndBattleText2::
+ text "I'm done"
+ line "for!"
+ prompt
+
+_FuchsiaGymAfterBattleText2::
+ text "I will keep on"
+ line "training under"
+ cont "KOGA, my ninja"
+ cont "master!"
+ done
+
+_FuchsiaGymBattleText3::
+ text "Let's see you"
+ line "beat my special"
+ cont "techniques!"
+ done
+
+_FuchsiaGymEndBattleText3::
+ text "You"
+ line "had me fooled!"
+ prompt
+
+_FuchsiaGymAfterBattleText3::
+ text "I like poison and"
+ line "sleep techniques,"
+ cont "as they linger"
+ cont "after battle!"
+ done
+
+_FuchsiaGymBattleText4::
+ text "Stop right there!"
+
+ para "Our invisible"
+ line "walls have you"
+ cont "frustrated?"
+ done
+
+_FuchsiaGymEndBattleText4::
+ text "Whoa!"
+ line "He's got it!"
+ prompt
+
+_FuchsiaGymAfterBattleText4::
+ text "You impressed me!"
+ line "Here's a hint!"
+
+ para "Look very closely"
+ line "for gaps in the"
+ cont "invisible walls!"
+ done
+
+_FuchsiaGymBattleText5::
+ text "I also study the"
+ line "way of the ninja"
+ cont "with master KOGA!"
+
+ para "Ninja have a long"
+ line "history of using"
+ cont "animals!"
+ done
+
+_FuchsiaGymEndBattleText5::
+ text "Awoo!"
+ prompt
+
+_FuchsiaGymAfterBattleText5::
+ text "I still have much"
+ line "to learn!"
+ done
+
+_FuchsiaGymBattleText6::
+ text "Master KOGA comes"
+ line "from a long line"
+ cont "of ninjas!"
+
+ para "What did you"
+ line "descend from?"
+ done
+
+_FuchsiaGymEndBattleText6::
+ text "Dropped"
+ line "my balls!"
+ prompt
+
+_FuchsiaGymAfterBattleText6::
+ text "Where there is"
+ line "light, there is"
+ cont "shadow!"
+
+ para "Light and shadow!"
+ line "Which do you"
+ cont "choose?"
+ done
+
+_FuchsiaGymText_7564e::
+ text "Yo! Champ in"
+ line "making!"
+
+ para "FUCHSIA GYM is"
+ line "riddled with"
+ cont "invisible walls!"
+
+ para "KOGA might appear"
+ line "close, but he's"
+ cont "blocked off!"
+
+ para "You have to find"
+ line "gaps in the walls"
+ cont "to reach him!"
+ done
+
+_FuchsiaGymText_75653::
+ text "It's amazing how"
+ line "ninja can terrify"
+ cont "even now!"
+ done
diff --git a/text/maps/FuchsiaMart.asm b/text/FuchsiaMart.asm
index 574898ce..574898ce 100644
--- a/text/maps/FuchsiaMart.asm
+++ b/text/FuchsiaMart.asm
diff --git a/text/maps/FuchsiaMeetingRoom.asm b/text/FuchsiaMeetingRoom.asm
index 10675ead..10675ead 100644
--- a/text/maps/FuchsiaMeetingRoom.asm
+++ b/text/FuchsiaMeetingRoom.asm
diff --git a/text/maps/FuchsiaPokecenter.asm b/text/FuchsiaPokecenter.asm
index a0def7eb..a0def7eb 100644
--- a/text/maps/FuchsiaPokecenter.asm
+++ b/text/FuchsiaPokecenter.asm
diff --git a/text/GameCorner.asm b/text/GameCorner.asm
new file mode 100644
index 00000000..a65043d9
--- /dev/null
+++ b/text/GameCorner.asm
@@ -0,0 +1,185 @@
+_CeladonGameCornerText1::
+ text "Welcome!"
+
+ para "You can exchange"
+ line "your coins for"
+ cont "fabulous prizes"
+ cont "next door."
+ done
+
+_CeladonGameCornerText_48d22::
+ text "Welcome to ROCKET"
+ line "GAME CORNER!"
+
+ para "Do you need some"
+ line "game coins?"
+
+ para "It's ¥1000 for 50"
+ line "coins. Would you"
+ cont "like some?"
+ done
+
+_CeladonGameCornerText_48d27::
+ text "Thanks! Here are"
+ line "your 50 coins!"
+ done
+
+_CeladonGameCornerText_48d2c::
+ text "No? Please come"
+ line "play sometime!"
+ done
+
+_CeladonGameCornerText_48d31::
+ text "You can't afford"
+ line "the coins!"
+ done
+
+_CeladonGameCornerText_48d36::
+ text "Oops! Your COIN"
+ line "CASE is full."
+ done
+
+_CeladonGameCornerText_48d3b::
+ text "You don't have a"
+ line "COIN CASE!"
+ done
+
+_CeladonGameCornerText3::
+ text "Keep this quiet."
+
+ para "It's rumored that"
+ line "this place is run"
+ cont "by TEAM ROCKET."
+ done
+
+_CeladonGameCornerText4::
+ text "I think these"
+ line "machines have"
+ cont "different odds."
+ done
+
+_CeladonGameCornerText_48d9c::
+ text "Kid, do you want"
+ line "to play?"
+ prompt
+
+_Received10CoinsText::
+ text "<PLAYER> received"
+ line "10 coins!@"
+ text_end
+
+_CeladonGameCornerText_48da7::
+ text "You don't need my"
+ line "coins!"
+ done
+
+_CeladonGameCornerText_48dac::
+ text "Wins seem to come"
+ line "and go."
+ done
+
+_CeladonGameCornerText6::
+ text "I'm having a"
+ line "wonderful time!"
+ done
+
+_CeladonGameCornerText_48dca::
+ text "Hey!"
+
+ para "You have better"
+ line "things to do,"
+ cont "champ in making!"
+
+ para "CELADON GYM's"
+ line "LEADER is ERIKA!"
+ cont "She uses grass-"
+ cont "type #MON!"
+
+ para "She might appear"
+ line "docile, but don't"
+ cont "be fooled!"
+ done
+
+_CeladonGameCornerText_48dcf::
+ text "They offer rare"
+ line "#MON that can"
+ cont "be exchanged for"
+ cont "your coins."
+
+ para "But, I just can't"
+ line "seem to win!"
+ done
+
+_CeladonGameCornerText8::
+ text "Games are scary!"
+ line "It's so easy to"
+ cont "get hooked!"
+ done
+
+_CeladonGameCornerText_48e26::
+ text "What's up? Want"
+ line "some coins?"
+ prompt
+
+_Received20CoinsText::
+ text "<PLAYER> received"
+ line "20 coins!@"
+ text_end
+
+_CeladonGameCornerText_48e31::
+ text "You have lots of"
+ line "coins!"
+ done
+
+_CeladonGameCornerText_48e36::
+ text "Darn! I need more"
+ line "coins for the"
+ cont "#MON I want!"
+ done
+
+_CeladonGameCornerText_48e88::
+ text "Hey, what? You're"
+ line "throwing me off!"
+ cont "Here are some"
+ cont "coins, shoo!"
+ prompt
+
+_CeladonGameCornerText_48e8d::
+ text "<PLAYER> received"
+ line "20 coins!@"
+ text_end
+
+_CeladonGameCornerText_48e93::
+ text "You've got your"
+ line "own coins!"
+ done
+
+_CeladonGameCornerText_48e98::
+ text "The trick is to"
+ line "watch the reels"
+ cont "closely!"
+ done
+
+_CeladonGameCornerText_48ece::
+ text "I'm guarding this"
+ line "poster!"
+ cont "Go away, or else!"
+ done
+
+_CeladonGameCornerText_48ed3::
+ text "Dang!"
+ prompt
+
+_CeladonGameCornerText_48ed8::
+ text "Our hideout might"
+ line "be discovered! I"
+ cont "better tell BOSS!"
+ done
+
+_CeladonGameCornerText_48f09::
+ text "Hey!"
+
+ para "A switch behind"
+ line "the poster!?"
+ cont "Let's push it!@"
+ text_end
diff --git a/text/maps/GameCornerPrizeRoom.asm b/text/GameCornerPrizeRoom.asm
index 6b2bb537..6b2bb537 100644
--- a/text/maps/GameCornerPrizeRoom.asm
+++ b/text/GameCornerPrizeRoom.asm
diff --git a/text/maps/GameCorner_2.asm b/text/GameCorner_2.asm
index c288464d..c288464d 100755..100644
--- a/text/maps/GameCorner_2.asm
+++ b/text/GameCorner_2.asm
diff --git a/text/maps/HallOfFame.asm b/text/HallOfFame.asm
index 8faefd3f..8faefd3f 100644
--- a/text/maps/HallOfFame.asm
+++ b/text/HallOfFame.asm
diff --git a/text/maps/IndigoPlateauLobby.asm b/text/IndigoPlateauLobby.asm
index 8487e29a..8487e29a 100644
--- a/text/maps/IndigoPlateauLobby.asm
+++ b/text/IndigoPlateauLobby.asm
diff --git a/text/LancesRoom.asm b/text/LancesRoom.asm
new file mode 100644
index 00000000..224db0b3
--- /dev/null
+++ b/text/LancesRoom.asm
@@ -0,0 +1,64 @@
+_LanceBeforeBattleText::
+ text "Ah! I heard about"
+ line "you, <PLAYER>!"
+
+ para "I lead the ELITE"
+ line "FOUR! You can"
+ cont "call me LANCE the"
+ cont "dragon trainer!"
+
+ para "You know that"
+ line "dragons are"
+ cont "mythical #MON!"
+
+ para "They're hard to"
+ line "catch and raise,"
+ cont "but their powers"
+ cont "are superior!"
+
+ para "They're virtually"
+ line "indestructible!"
+
+ para "Well, are you"
+ line "ready to lose?"
+
+ para "Your LEAGUE"
+ line "challenge ends"
+ cont "with me, <PLAYER>!"
+ done
+
+_LanceEndBattleText::
+ text "That's it!"
+
+ para "I hate to admit"
+ line "it, but you are a"
+ cont "#MON master!"
+ prompt
+
+_LanceAfterBattleText::
+ text "I still can't"
+ line "believe my"
+ cont "dragons lost to"
+ cont "you, <PLAYER>!"
+
+ para "You are now the"
+ line "#MON LEAGUE"
+ cont "champion!"
+
+ para "...Or, you would"
+ line "have been, but"
+ cont "you have one more"
+ cont "challenge ahead."
+
+ para "You have to face"
+ line "another trainer!"
+ cont "His name is..."
+
+ para "<RIVAL>!"
+ line "He beat the ELITE"
+ cont "FOUR before you!"
+
+ para "He is the real"
+ line "#MON LEAGUE"
+ cont "champion!@"
+ text_end
diff --git a/text/LavenderCuboneHouse.asm b/text/LavenderCuboneHouse.asm
new file mode 100644
index 00000000..77b8598d
--- /dev/null
+++ b/text/LavenderCuboneHouse.asm
@@ -0,0 +1,25 @@
+_LavenderHouse2Text1::
+ text "CUBONE: Kyarugoo!@"
+ text_end
+
+_LavenderHouse2Text_1d9dc::
+ text "I hate those"
+ line "horrible ROCKETs!"
+
+ para "That poor CUBONE's"
+ line "mother..."
+
+ para "It was killed"
+ line "trying to escape"
+ cont "from TEAM ROCKET!"
+ done
+
+_LavenderHouse2Text_1d9e1::
+ text "The GHOST of"
+ line "#MON TOWER is"
+ cont "gone!"
+
+ para "Someone must have"
+ line "soothed its"
+ cont "restless soul!"
+ done
diff --git a/text/maps/LavenderMart.asm b/text/LavenderMart.asm
index 222712c6..222712c6 100644
--- a/text/maps/LavenderMart.asm
+++ b/text/LavenderMart.asm
diff --git a/text/maps/LavenderPokecenter.asm b/text/LavenderPokecenter.asm
index 3aa7b67d..3aa7b67d 100644
--- a/text/maps/LavenderPokecenter.asm
+++ b/text/LavenderPokecenter.asm
diff --git a/text/maps/LavenderTown.asm b/text/LavenderTown.asm
index 19b6c8c8..19b6c8c8 100644
--- a/text/maps/LavenderTown.asm
+++ b/text/LavenderTown.asm
diff --git a/text/maps/LoreleisRoom.asm b/text/LoreleisRoom.asm
index fdbb55b4..fdbb55b4 100644
--- a/text/maps/LoreleisRoom.asm
+++ b/text/LoreleisRoom.asm
diff --git a/text/MrFujisHouse.asm b/text/MrFujisHouse.asm
new file mode 100644
index 00000000..2f76ad94
--- /dev/null
+++ b/text/MrFujisHouse.asm
@@ -0,0 +1,89 @@
+_LavenderHouse1Text_1d8d1::
+ text "That's odd, MR.FUJI"
+ line "isn't here."
+ cont "Where'd he go?"
+ done
+
+_LavenderHouse1Text_1d8d6::
+ text "MR.FUJI had been"
+ line "praying alone for"
+ cont "CUBONE's mother."
+ done
+
+_LavenderHouse1Text_1d8f4::
+ text "This is really"
+ line "MR.FUJI's house."
+
+ para "He's really kind!"
+
+ para "He looks after"
+ line "abandoned and"
+ cont "orphaned #MON!"
+ done
+
+_LavenderHouse1Text_1d8f9::
+ text "It's so warm!"
+ line "#MON are so"
+ cont "nice to hug!"
+ done
+
+_LavenderHouse1Text3::
+ text "PSYDUCK: Gwappa!@"
+ text_end
+
+_LavenderHouse1Text4::
+ text "NIDORINO: Gaoo!@"
+ text_end
+
+_LavenderHouse1Text_1d94c::
+ text "MR.FUJI: <PLAYER>."
+
+ para "Your #DEX quest"
+ line "may fail without"
+ cont "love for your"
+ cont "#MON."
+
+ para "I think this may"
+ line "help your quest."
+ prompt
+
+_ReceivedFluteText::
+ text "<PLAYER> received"
+ line "a @"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_FluteExplanationText::
+ text_start
+
+ para "Upon hearing #"
+ line "FLUTE, sleeping"
+ cont "#MON will"
+ cont "spring awake."
+
+ para "It works on all"
+ line "sleeping #MON."
+ done
+
+_FluteNoRoomText::
+ text "You must make"
+ line "room for this!"
+ done
+
+_MrFujiAfterFluteText::
+ text "MR.FUJI: Has my"
+ line "FLUTE helped you?"
+ done
+
+_LavenderHouse1Text6::
+ text "#MON Monthly"
+ line "Grand Prize"
+ cont "Drawing!"
+
+ para "The application"
+ line "form is..."
+
+ para "Gone! It's been"
+ line "clipped out!"
+ done
diff --git a/text/MrPsychicsHouse.asm b/text/MrPsychicsHouse.asm
new file mode 100644
index 00000000..5ac2c9af
--- /dev/null
+++ b/text/MrPsychicsHouse.asm
@@ -0,0 +1,26 @@
+_TM29PreReceiveText::
+ text "...Wait! Don't"
+ line "say a word!"
+
+ para "You wanted this!"
+ prompt
+
+_ReceivedTM29Text::
+ text "<PLAYER> received"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_TM29ExplanationText::
+ text "TM29 is PSYCHIC!"
+
+ para "It can lower the"
+ line "target's SPECIAL"
+ cont "abilities."
+ done
+
+_TM29NoRoomText::
+ text "Where do you plan"
+ line "to put this?"
+ done
diff --git a/text/maps/MtMoon1F.asm b/text/MtMoon1F.asm
index 2e8c960e..2e8c960e 100644
--- a/text/maps/MtMoon1F.asm
+++ b/text/MtMoon1F.asm
diff --git a/text/MtMoonB1F.asm b/text/MtMoonB1F.asm
new file mode 100644
index 00000000..968b845f
--- /dev/null
+++ b/text/MtMoonB1F.asm
@@ -0,0 +1,3 @@
+_MtMoonText1::
+ text_start
+ done
diff --git a/text/MtMoonB2F.asm b/text/MtMoonB2F.asm
new file mode 100644
index 00000000..e0098791
--- /dev/null
+++ b/text/MtMoonB2F.asm
@@ -0,0 +1,130 @@
+_MtMoonJessieJamesText1::
+ text "Stop right there!@"
+ text_end
+
+_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!@"
+ text_end
+
+_MtMoon3Text_49f24::
+ text "You want the"
+ line "DOME FOSSIL?"
+ done
+
+_MtMoon3Text_49f64::
+ text "You want the"
+ line "HELIX FOSSIL?"
+ done
+
+_MtMoon3Text_49f6f::
+ text "<PLAYER> got the"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_MtMoon3Text_49f7f::
+ text "Look, you've got"
+ line "no room for this.@"
+ text_end
+
+_MtMoon3Text_49f85::
+ text "Hey, stop!"
+
+ para "I found these"
+ line "fossils! They're"
+ cont "both mine!"
+ done
+
+_MtMoon3Text_49f8a::
+ text "OK!"
+ line "I'll share!"
+ prompt
+
+_MtMoon3Text_49f8f::
+ text "We'll each take"
+ line "one!"
+ cont "No being greedy!"
+ done
+
+_MtMoon3Text_49f94::
+ text "Far away, on"
+ line "CINNABAR ISLAND,"
+ cont "there's a #MON"
+ cont "LAB."
+
+ para "They do research"
+ line "on regenerating"
+ cont "fossils."
+ done
+
+_MtMoon3Text_49f99::
+ text "All right. Then"
+ line "this is mine!@"
+ text_end
+
+_MtMoon3BattleText3::
+ text "We, TEAM ROCKET,"
+ line "are #MON"
+ cont "gangsters!"
+ done
+
+_MtMoon3EndBattleText3::
+ text "I blew"
+ line "it!"
+ prompt
+
+_MtMoon3AfterBattleText3::
+ text "Darn it all! My"
+ line "associates won't"
+ cont "stand for this!"
+ done
+
+_MtMoon3BattleText4::
+ text "We're pulling a"
+ line "big job here!"
+ cont "Get lost, kid!"
+ done
+
+_MtMoon3EndBattleText4::
+ text "So, you"
+ line "are good."
+ prompt
+
+_MtMoon3AfterBattleText4::
+ text "If you find a"
+ line "fossil, give it"
+ cont "to me and scram!"
+ done
+
+_MtMoon3BattleText5::
+ text "Little kids"
+ line "should leave"
+ cont "grown-ups alone!"
+ done
+
+_MtMoon3EndBattleText5::
+ text "I'm"
+ line "steamed!"
+ prompt
+
+_MtMoon3AfterBattleText5::
+ text "#MON lived"
+ line "here long before"
+ cont "people came."
+ done
diff --git a/text/MtMoonPokecenter.asm b/text/MtMoonPokecenter.asm
new file mode 100644
index 00000000..052dd85b
--- /dev/null
+++ b/text/MtMoonPokecenter.asm
@@ -0,0 +1,48 @@
+_MtMoonPokecenterText1::
+ text "I've 6 # BALLs"
+ line "set in my belt."
+
+ para "At most, you can"
+ line "carry 6 #MON."
+ done
+
+_MtMoonPokecenterText3::
+ text "TEAM ROCKET"
+ line "attacks CERULEAN"
+ cont "citizens..."
+
+ para "TEAM ROCKET is"
+ line "always in the"
+ cont "news!"
+ done
+
+_MtMoonPokecenterText5::
+ text_start
+ done
+
+_MagikarpSalesmanText1::
+ text "MAN: Hello, there!"
+ line "Have I got a deal"
+ cont "just for you!"
+
+ para "I'll let you have"
+ line "a swell MAGIKARP"
+ cont "for just ¥500!"
+ cont "What do you say?"
+ done
+
+_MagikarpSalesmanNoText::
+ text "No? I'm only"
+ line "doing this as a"
+ cont "favor to you!"
+ done
+
+_MagikarpSalesmanNoMoneyText::
+ text "You'll need more"
+ line "money than that!"
+ done
+
+_MagikarpSalesmanText2::
+ text "MAN: Well, I don't"
+ line "give refunds!"
+ done
diff --git a/text/Museum1F.asm b/text/Museum1F.asm
new file mode 100644
index 00000000..e7b6ce53
--- /dev/null
+++ b/text/Museum1F.asm
@@ -0,0 +1,108 @@
+_Museum1FText_5c21a::
+ text "Come again!"
+ done
+
+_Museum1FText_5c21f::
+ text "It's ¥50 for a"
+ line "child's ticket."
+
+ para "Would you like to"
+ line "come in?"
+ done
+
+_Museum1FText_5c224::
+ text "Right, ¥50!"
+ line "Thank you!"
+ done
+
+_Museum1FText_5c229::
+ text "You don't have"
+ line "enough money."
+ prompt
+
+_Museum1FText_5c22e::
+ text "You can't sneak"
+ line "in the back way!"
+
+ para "Oh, whatever!"
+ line "Do you know what"
+ cont "AMBER is?"
+ done
+
+_Museum1FText_5c233::
+ text "There's a lab"
+ line "somewhere trying"
+ cont "to resurrect"
+ cont "ancient #MON"
+ cont "from AMBER."
+ done
+
+_Museum1FText_5c238::
+ text "AMBER is fossil-"
+ line "ized tree sap."
+ done
+
+_Museum1FText_5c23d::
+ text "Please go to the"
+ line "other side!"
+ done
+
+_Museum1FText_5c242::
+ text "Take plenty of"
+ line "time to look!"
+ done
+
+_Museum1FText_5c251::
+ text "That is one"
+ line "magnificent"
+ cont "fossil!"
+ done
+
+_Museum1FText_5c28e::
+ text "Ssh! I think that"
+ line "this chunk of"
+ cont "AMBER contains"
+ cont "#MON DNA!"
+
+ para "It would be great"
+ line "if #MON could"
+ cont "be resurrected"
+ cont "from it!"
+
+ para "But, my colleagues"
+ line "just ignore me!"
+
+ para "So, I have a favor"
+ line "to ask!"
+
+ para "Take this to a"
+ line "#MON LAB and"
+ cont "get it examined!"
+ prompt
+
+_ReceivedOldAmberText::
+ text "<PLAYER> received"
+ line "OLD AMBER!@"
+ text_end
+
+_Museum1FText_5c299::
+ text "Ssh! Get the OLD"
+ line "AMBER checked!"
+ done
+
+_Museum1FText_5c29e::
+ text "You don't have"
+ line "space for this!"
+ done
+
+_Museum1FText_5c2ad::
+ text "We are proud of 2"
+ line "fossils of very"
+ cont "rare, prehistoric"
+ cont "#MON!"
+ done
+
+_Museum1FText_5c2bc::
+ text "The AMBER is"
+ line "clear and gold!"
+ done
diff --git a/text/maps/Museum2F.asm b/text/Museum2F.asm
index 12cfe8b2..12cfe8b2 100644
--- a/text/maps/Museum2F.asm
+++ b/text/Museum2F.asm
diff --git a/text/NameRatersHouse.asm b/text/NameRatersHouse.asm
new file mode 100644
index 00000000..49637b6d
--- /dev/null
+++ b/text/NameRatersHouse.asm
@@ -0,0 +1,60 @@
+_NameRaterText_1dab3::
+ text "Hello, hello!"
+ line "I am the official"
+ cont "NAME RATER!"
+
+ para "Want me to rate"
+ line "the nicknames of"
+ cont "your #MON?"
+ done
+
+_NameRaterText_1dab8::
+ text "Which #MON"
+ line "should I look at?"
+ prompt
+
+_NameRaterText_1dabd::
+ text_ram wcd6d
+ text ", is it?"
+ line "That is a decent"
+ cont "nickname!"
+
+ para "But, would you"
+ line "like me to give"
+ cont "it a nicer name?"
+
+ para "How about it?"
+ done
+
+_NameRaterText_1dac2::
+ text "Fine! What should"
+ line "we name it?"
+ prompt
+
+_NameRaterText_1dac7::
+ text "OK! This #MON"
+ line "has been renamed"
+ cont "@"
+ text_ram wBuffer
+ text "!"
+
+ para "That's a better"
+ line "name than before!"
+ done
+
+_NameRaterText_1dacc::
+ text "Fine! Come any-"
+ line "time you like!"
+ done
+
+_NameRaterText_1dad1::
+ text_ram wcd6d
+ text ", is it?"
+ line "That is a truly"
+ cont "impeccable name!"
+
+ para "Take good care of"
+ line "@"
+ text_ram wcd6d
+ text "!"
+ done
diff --git a/text/OaksLab.asm b/text/OaksLab.asm
new file mode 100644
index 00000000..7e78f8f5
--- /dev/null
+++ b/text/OaksLab.asm
@@ -0,0 +1,401 @@
+_OaksLabGaryText1::
+ text "<RIVAL>: Yo"
+ line "<PLAYER>! Gramps"
+ cont "isn't around!"
+
+ para "I ran here 'cos"
+ line "he said he had a"
+ cont "#MON for me."
+ done
+
+_OaksLabText40::
+ text "<RIVAL>: Humph!"
+ line "I'll get a better"
+ cont "#MON than you!"
+ done
+
+_OaksLabText41::
+ text "<RIVAL>: Heh, my"
+ line "#MON looks a"
+ cont "lot stronger."
+ done
+
+_OaksLabText39::
+ text "That's a #"
+ line "BALL. There's a"
+ cont "#MON inside!"
+ done
+
+_OaksLabPikachuText::
+ text "OAK: Go ahead,"
+ line "it's yours!"
+ done
+
+_OaksLabText_1d2f5::
+ text "OAK: If a wild"
+ line "#MON appears,"
+ cont "your #MON can"
+ cont "fight against it!"
+
+ para "Afterward, go on"
+ line "to the next town."
+ done
+
+_OaksLabText_1d2fa::
+ text "OAK: You should"
+ line "talk to it and"
+ cont "see how it feels."
+ done
+
+_OaksLabDeliverParcelText1::
+ text "OAK: Oh, <PLAYER>!"
+
+ para "How is my old"
+ line "#MON?"
+
+ para "Well, it seems to"
+ line "like you a lot."
+
+ para "You must be"
+ line "talented as a"
+ cont "#MON trainer!"
+
+ para "What? You have"
+ line "something for me?"
+
+ para "<PLAYER> delivered"
+ line "OAK's PARCEL.@"
+ text_end
+
+_OaksLabDeliverParcelText2::
+ text_start
+ para "Ah! This is the"
+ line "custom # BALL"
+ cont "I ordered!"
+ cont "Thanks, <PLAYER>!"
+
+ para "By the way, I must"
+ line "ask you to do"
+ cont "something for me."
+ done
+
+_OaksLabAroundWorldText::
+ text "#MON around the"
+ line "world wait for"
+ cont "you, <PLAYER>!"
+ done
+
+_OaksLabGivePokeballsText1::
+ text "OAK: You can't get"
+ line "detailed data on"
+ cont "#MON by just"
+ cont "seeing them."
+
+ para "You must catch"
+ line "them! Use these"
+ cont "to capture wild"
+ cont "#MON."
+
+ para "<PLAYER> got 5"
+ line "# BALLs!@"
+ text_end
+
+_OaksLabGivePokeballsText2::
+ text_start
+ para "When a wild"
+ line "#MON appears,"
+ cont "it's fair game."
+
+ para "Just like I showed"
+ line "you, throw a #"
+ cont "BALL at it and try"
+ cont "to catch it!"
+
+ para "This won't always"
+ line "work, though."
+
+ para "A healthy #MON"
+ line "could escape. You"
+ cont "have to be lucky!"
+ done
+
+_OaksLabPleaseVisitText::
+ text "OAK: Come see me"
+ line "sometimes."
+
+ para "I want to know how"
+ line "your #DEX is"
+ cont "coming along."
+ done
+
+_OaksLabText_1d31d::
+ text "OAK: Good to see "
+ line "you! How is your "
+ cont "#DEX coming? "
+ cont "Here, let me take"
+ cont "a look!"
+ prompt
+
+_OaksLabText_1d32c::
+ text "It's encyclopedia-"
+ line "like, but the"
+ cont "pages are blank!"
+ done
+
+_OaksLabText8::
+ text "?"
+ done
+
+_OaksLabText_1d340::
+ text "PROF.OAK is the"
+ line "authority on"
+ cont "#MON!"
+
+ para "Many #MON"
+ line "trainers hold him"
+ cont "in high regard!"
+ done
+
+_OaksLabRivalWaitingText::
+ text "<RIVAL>: Gramps!"
+ line "I'm fed up with"
+ cont "waiting!"
+ done
+
+_OaksLabChooseMonText::
+ text "OAK: Hmm? <RIVAL>?"
+ 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, <PLAYER>! 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
+
+_OaksLabRivalInterjectionText::
+ text "<RIVAL>: Hey!"
+ line "Gramps! What"
+ cont "about me?"
+ done
+
+_OaksLabBePatientText::
+ text "OAK: Be patient,"
+ line "<RIVAL>, I'll give"
+ cont "you one later."
+ done
+
+_OaksLabRivalTakesText1::
+ text "<RIVAL>: No way!"
+ line "<PLAYER>, I want"
+ cont "this #MON!"
+ prompt
+
+_OaksLabRivalTakesText2::
+ text "<RIVAL> snatched"
+ line "the #MON!@"
+ text_end
+
+_OaksLabRivalTakesText3::
+ text "OAK: <RIVAL>! What"
+ line "are you doing?"
+ prompt
+
+_OaksLabRivalTakesText4::
+ text "<RIVAL>: 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 "<PLAYER>, come over"
+ line "here."
+ done
+
+_OaksLabOakGivesText::
+ text "OAK: <PLAYER>, 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 "<PLAYER> received"
+ line "a @"
+ text_ram wcd6d
+ text "!@"
+ text_end
+
+_OaksLabLeavingText::
+ text "OAK: Hey! Don't go"
+ line "away yet!"
+ done
+
+_OaksLabRivalChallengeText::
+ text "<RIVAL>: Wait"
+ line "<PLAYER>!"
+ cont "Let's check out"
+ cont "our #MON!"
+
+ para "Come on, I'll take"
+ line "you on!"
+ done
+
+_OaksLabText_1d3be::
+ text "WHAT?"
+ line "Unbelievable!"
+ cont "I picked the"
+ cont "wrong #MON!"
+ prompt
+
+_OaksLabText_1d3c3::
+ text "<RIVAL>: Yeah! Am"
+ line "I great or what?"
+ prompt
+
+_OaksLabRivalToughenUpText::
+ text "<RIVAL>: Okay!"
+ line "I'll make my"
+ cont "#MON fight to"
+ cont "toughen it up!"
+
+ para "<PLAYER>! Gramps!"
+ line "Smell you later!"
+ done
+
+_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
+
+_OaksLabText21::
+ text "<RIVAL>: Gramps!"
+ done
+
+_OaksLabText22::
+ text "<RIVAL>: Gramps,"
+ line "my #MON has"
+ cont "grown stronger!"
+ cont "Check it out!"
+ done
+
+_OaksLabText23::
+ text "OAK: Ah, <RIVAL>,"
+ line "good timing!"
+
+ para "I needed to ask"
+ line "both of you to do"
+ cont "something for me."
+ done
+
+_OaksLabText24::
+ text "On the desk there"
+ line "is my invention,"
+ cont "#DEX!"
+
+ para "It automatically"
+ line "records data on"
+ cont "#MON you've"
+ cont "seen or caught!"
+
+ para "It's a hi-tech"
+ line "encyclopedia!"
+ done
+
+_OaksLabText25::
+ text "OAK: <PLAYER> and"
+ line "<RIVAL>! Take"
+ cont "these with you!"
+
+ para "<PLAYER> got"
+ line "#DEX from OAK!@"
+ text_end
+
+_OaksLabText26::
+ text "To make a complete"
+ line "guide on all the"
+ cont "#MON in the"
+ cont "world..."
+
+ para "That was my dream!"
+
+ para "But, I'm too old!"
+ line "I can't do it!"
+
+ para "So, I want you two"
+ line "to fulfill my"
+ cont "dream for me!"
+
+ para "Get moving, you"
+ line "two!"
+
+ para "This is a great"
+ line "undertaking in"
+ cont "#MON history!"
+ done
+
+_OaksLabText27::
+ text "<RIVAL>: Alright"
+ line "Gramps! Leave it"
+ cont "all to me!"
+
+ para "<PLAYER>, I hate to"
+ line "say it, but I"
+ cont "don't need you!"
+
+ para "I know! I'll"
+ line "borrow a TOWN MAP"
+ cont "from my sis!"
+
+ para "I'll tell her not"
+ line "to lend you one,"
+ cont "<PLAYER>! Hahaha!"
+ done
+
+_OaksLabText_1d405::
+ text "I study #MON as"
+ line "PROF.OAK's AIDE."
+ done
diff --git a/text/PalletTown.asm b/text/PalletTown.asm
new file mode 100644
index 00000000..ec6ec630
--- /dev/null
+++ b/text/PalletTown.asm
@@ -0,0 +1,68 @@
+_OakAppearsText::
+ text "OAK: Hey! Wait!"
+ line "Don't go out!@"
+ text_end
+
+_OakWalksUpText::
+ text "OAK: That was"
+ line "close!"
+
+ para "Wild #MON live"
+ line "in tall grass!"
+ done
+
+_OakWhewText::
+ text "OAK: Whew..."
+ done
+
+_OakGrassText::
+ text "OAK: A #MON can"
+ line "appear anytime in"
+ cont "tall grass."
+
+ para "You need your own"
+ line "#MON for your"
+ cont "protection."
+ cont "I know!"
+
+ para "Here, come with"
+ line "me!"
+ done
+
+_PalletTownText2::
+ text "I'm raising"
+ line "#MON too!"
+
+ para "When they get"
+ line "strong, they can"
+ cont "protect me!"
+ done
+
+_PalletTownText3::
+ text "Technology is"
+ line "incredible!"
+
+ para "You can now store"
+ line "and recall items"
+ cont "and #MON as"
+ cont "data via PC!"
+ done
+
+_PalletTownText4::
+ text "OAK #MON"
+ line "RESEARCH LAB"
+ done
+
+_PalletTownText5::
+ text "PALLET TOWN"
+ line "Shades of your"
+ cont "journey await!"
+ done
+
+_PalletTownText6::
+ text "<PLAYER>'s house "
+ done
+
+_PalletTownText7::
+ text "<RIVAL>'s house "
+ done
diff --git a/text/maps/PewterCity.asm b/text/PewterCity.asm
index 14240c9e..14240c9e 100644
--- a/text/maps/PewterCity.asm
+++ b/text/PewterCity.asm
diff --git a/text/PewterGym.asm b/text/PewterGym.asm
new file mode 100644
index 00000000..03626f7d
--- /dev/null
+++ b/text/PewterGym.asm
@@ -0,0 +1,186 @@
+_PewterGymText_5c49e::
+ text "I'm BROCK!"
+ line "I'm PEWTER's GYM"
+ cont "LEADER!"
+
+ para "I believe in rock"
+ line "hard defense and"
+ cont "determination!"
+
+ para "That's why my"
+ line "#MON are all"
+ cont "the rock-type!"
+
+ para "Do you still want"
+ line "to challenge me?"
+ cont "Fine then! Show"
+ cont "me your best!"
+ done
+
+_PewterGymText_5c4a3::
+ text "There are all"
+ line "kinds of trainers"
+ cont "in the world!"
+
+ 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
+
+_TM34PreReceiveText::
+ text "Wait! Take this"
+ line "with you!"
+ done
+
+_ReceivedTM34Text::
+ text "<PLAYER> received"
+ line "TM34!@"
+ text_end
+
+_TM34ExplanationText::
+ text_start
+
+ para "A TM contains a"
+ line "technique that"
+ cont "can be taught to"
+ cont "#MON!"
+
+ para "A TM is good only"
+ line "once! So when you"
+ cont "use one to teach"
+ cont "a new technique,"
+ cont "pick the #MON"
+ cont "carefully!"
+
+ para "TM34 contains"
+ line "BIDE!"
+
+ para "Your #MON will"
+ line "absorb damage in"
+ cont "battle then pay"
+ cont "it back double!"
+ done
+
+_TM34NoRoomText::
+ text "You don't have"
+ line "room for this!"
+ done
+
+_PewterGymText_5c4bc::
+ text "I took"
+ line "you for granted."
+
+ para "As proof of your"
+ line "victory, here's"
+ cont "the BOULDERBADGE!"
+
+ para "<PLAYER> received"
+ line "the BOULDERBADGE!@"
+ text_end
+
+_PewterGymText_5c4c1::
+ text_start
+
+ para "That's an official"
+ line "#MON LEAGUE"
+ cont "BADGE!"
+
+ para "Its bearer's"
+ line "#MON become"
+ cont "more powerful!"
+
+ para "The technique"
+ line "FLASH can now be"
+ cont "used anytime!"
+ prompt
+
+_PewterGymBattleText1::
+ text "Stop right there,"
+ line "kid!"
+
+ para "You're still light"
+ line "years from facing"
+ cont "BROCK!"
+ done
+
+_PewterGymEndBattleText1::
+ text "Darn!"
+
+ para "Light years isn't"
+ line "time! It measures"
+ cont "distance!"
+ prompt
+
+_PewterGymAfterBattleText1::
+ text "You're pretty hot,"
+ line "but not as hot"
+ cont "as BROCK!"
+ done
+
+_PewterGymText_5c515::
+ text "Hiya! I can tell"
+ line "you have what it"
+ cont "takes to become a"
+ cont "#MON champ!"
+
+ para "I'm no trainer,"
+ line "but I can tell"
+ cont "you how to win!"
+
+ para "Let me take you"
+ line "to the top!"
+ done
+
+_PewterGymText_5c51a::
+ text "All right! Let's"
+ line "get happening!"
+ prompt
+
+_PewterGymText_5c51f::
+ text "The 1st #MON"
+ line "out in a match is"
+ cont "at the top of the"
+ cont "#MON LIST!"
+
+ para "By changing the"
+ line "order of #MON,"
+ cont "matches could be"
+ cont "made easier!"
+ done
+
+_PewterGymText_5c524::
+ text "It's a free"
+ line "service! Let's"
+ cont "get happening!"
+ prompt
+
+_PewterGymText_5c529::
+ text "Just as I thought!"
+ line "You're #MON"
+ cont "champ material!"
+ done
+
+_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
diff --git a/text/maps/PewterMart.asm b/text/PewterMart.asm
index 4dbc3c02..4dbc3c02 100644
--- a/text/maps/PewterMart.asm
+++ b/text/PewterMart.asm
diff --git a/text/PewterNidoranHouse.asm b/text/PewterNidoranHouse.asm
new file mode 100644
index 00000000..d4a092c8
--- /dev/null
+++ b/text/PewterNidoranHouse.asm
@@ -0,0 +1,25 @@
+_PewterHouse1Text1::
+ text "NIDORAN: Bowbow!@"
+ text_end
+
+_PewterHouse1Text2::
+ text "NIDORAN sit!"
+ done
+
+_PewterHouse1Text3::
+ text "Our #MON's an"
+ line "outsider, so it's"
+ cont "hard to handle."
+
+ para "An outsider is a"
+ line "#MON that you"
+ cont "get in a trade."
+
+ para "It grows fast, but"
+ line "it may ignore an"
+ cont "unskilled trainer"
+ cont "in battle!"
+
+ para "If only we had"
+ line "some BADGEs..."
+ done
diff --git a/text/maps/PewterPokecenter.asm b/text/PewterPokecenter.asm
index 968f6af0..968f6af0 100644
--- a/text/maps/PewterPokecenter.asm
+++ b/text/PewterPokecenter.asm
diff --git a/text/maps/PewterSpeechHouse.asm b/text/PewterSpeechHouse.asm
index 615536f7..615536f7 100644
--- a/text/maps/PewterSpeechHouse.asm
+++ b/text/PewterSpeechHouse.asm
diff --git a/text/PokemonFanClub.asm b/text/PokemonFanClub.asm
new file mode 100644
index 00000000..c3858e1c
--- /dev/null
+++ b/text/PokemonFanClub.asm
@@ -0,0 +1,179 @@
+PikachuFanText::
+ text "Won't you admire"
+ line "my CLEFAIRY's"
+ cont "adorable tail?"
+ done
+
+PikachuFanBetterText::
+ text "Humph! My CLEFAIRY"
+ line "is twice as cute"
+ cont "as that one!"
+ done
+
+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
+
+SeelFanText::
+ text "I just love my"
+ line "SEEL!"
+
+ para "It squeals when I"
+ line "hug it!"
+ done
+
+SeelFanBetterText::
+ text "Oh dear!"
+
+ para "My SEEL is far"
+ line "more attractive!"
+ done
+
+SeelFanPrintText::
+ text "I'm going to hook"
+ line "up the cable to"
+ cont "get a photo PRINT"
+ cont "of my SEEL!"
+ done
+
+FanClubPikachuText::
+ text "CLEFAIRY: Pippii!"
+ done
+
+FanClubSeelText::
+ text "SEEL: Kyuoo!"
+ done
+
+FanClubMeetChairText::
+ text "I chair the"
+ line "#MON Fan Club!"
+
+ para "I have more than"
+ line "100 #MON. I"
+ cont "love them all!"
+
+ para "I'm very fussy"
+ line "when it comes to"
+ cont "#MON!"
+
+ para "So..."
+
+ para "Did you come to"
+ line "hear me brag"
+ cont "about my #MON?"
+ done
+
+FanClubChairStoryText::
+ text "Good!"
+ line "Then listen up!"
+
+ para "My favorite"
+ line "RAPIDASH..."
+
+ para "It...cute..."
+ line "lovely...smart..."
+ cont "plus...amazing..."
+ cont "you think so?..."
+ cont "oh yes...it..."
+ cont "stunning..."
+ cont "kindly..."
+ cont "love it!"
+
+ para "Hug it...when..."
+ line "sleeping...warm"
+ cont "and cuddly..."
+ cont "spectacular..."
+ cont "ravishing..."
+ cont "...Oops! Look at"
+ cont "the time! I kept"
+ cont "you too long!"
+
+ para "Thanks for hearing"
+ line "me out! I want"
+ cont "you to have this!"
+ prompt
+
+ReceivedBikeVoucherText::
+ text "<PLAYER> received"
+ line "a @"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+ExplainBikeVoucherText::
+ text_start
+ para "Exchange that for"
+ line "a BICYCLE!"
+
+ para "Don't worry, my"
+ line "FEAROW will FLY"
+ cont "me anywhere!"
+
+ para "So, I don't need a"
+ line "BICYCLE!"
+
+ para "I hope you like"
+ line "cycling!"
+ done
+
+FanClubNoStoryText::
+ text "Oh. Come back"
+ line "when you want to"
+ cont "hear my story!"
+ done
+
+FanClubChairFinalText::
+ text "Hello, <PLAYER>!"
+
+ para "Did you come see"
+ line "me about my"
+ cont "#MON again?"
+
+ para "No? Too bad!"
+ done
+
+FanClubBagFullText::
+ text "Make room for"
+ line "this!"
+ done
+
+FanClubChairPrintText1::
+ text "Hi there, <PLAYER>!"
+ 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
+
+_FanClubText6::
+ text "Our CHAIRMAN is"
+ line "very vocal about"
+ cont "#MON."
+ done
diff --git a/text/maps/PokemonMansion1F.asm b/text/PokemonMansion1F.asm
index a3c517fb..a3c517fb 100644
--- a/text/maps/PokemonMansion1F.asm
+++ b/text/PokemonMansion1F.asm
diff --git a/text/maps/PokemonMansion2F.asm b/text/PokemonMansion2F.asm
index 378efb30..378efb30 100644
--- a/text/maps/PokemonMansion2F.asm
+++ b/text/PokemonMansion2F.asm
diff --git a/text/maps/PokemonMansion3F.asm b/text/PokemonMansion3F.asm
index 70331fdf..70331fdf 100644
--- a/text/maps/PokemonMansion3F.asm
+++ b/text/PokemonMansion3F.asm
diff --git a/text/maps/PokemonMansionB1F.asm b/text/PokemonMansionB1F.asm
index 1bc1ef89..1bc1ef89 100644
--- a/text/maps/PokemonMansionB1F.asm
+++ b/text/PokemonMansionB1F.asm
diff --git a/text/maps/PokemonTower1F.asm b/text/PokemonTower1F.asm
index 50a2cd29..50a2cd29 100644
--- a/text/maps/PokemonTower1F.asm
+++ b/text/PokemonTower1F.asm
diff --git a/text/maps/PokemonTower2F.asm b/text/PokemonTower2F.asm
index 79323001..79323001 100644
--- a/text/maps/PokemonTower2F.asm
+++ b/text/PokemonTower2F.asm
diff --git a/text/maps/PokemonTower3F.asm b/text/PokemonTower3F.asm
index 67098e6b..67098e6b 100644
--- a/text/maps/PokemonTower3F.asm
+++ b/text/PokemonTower3F.asm
diff --git a/text/maps/PokemonTower4F.asm b/text/PokemonTower4F.asm
index 771325a0..771325a0 100644
--- a/text/maps/PokemonTower4F.asm
+++ b/text/PokemonTower4F.asm
diff --git a/text/maps/PokemonTower5F.asm b/text/PokemonTower5F.asm
index b329118d..b329118d 100644
--- a/text/maps/PokemonTower5F.asm
+++ b/text/PokemonTower5F.asm
diff --git a/text/maps/PokemonTower6F.asm b/text/PokemonTower6F.asm
index 7532d56d..7532d56d 100644
--- a/text/maps/PokemonTower6F.asm
+++ b/text/PokemonTower6F.asm
diff --git a/text/PokemonTower7F.asm b/text/PokemonTower7F.asm
new file mode 100644
index 00000000..86f05445
--- /dev/null
+++ b/text/PokemonTower7F.asm
@@ -0,0 +1,51 @@
+_PokemonTowerJessieJamesText1::
+ text "Stop right there!@"
+ text_end
+
+_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!@"
+ text_end
+
+_TowerRescueFujiText::
+ text "MR.FUJI: Heh? You"
+ line "came to save me?"
+
+ para "Thank you. But, I"
+ line "came here of my"
+ cont "own free will."
+
+ para "I came to calm"
+ line "the soul of"
+ cont "CUBONE's mother."
+
+ para "I think MAROWAK's"
+ line "spirit has gone"
+ cont "to the afterlife."
+
+ para "I must thank you"
+ line "for your kind"
+ cont "concern!"
+
+ para "Follow me to my"
+ line "home, #MON"
+ cont "HOUSE at the foot"
+ cont "of this tower."
+ done
diff --git a/text/PowerPlant.asm b/text/PowerPlant.asm
new file mode 100644
index 00000000..dcdcd739
--- /dev/null
+++ b/text/PowerPlant.asm
@@ -0,0 +1,7 @@
+_VoltorbBattleText::
+ text "Bzzzt!"
+ done
+
+_ZapdosBattleText::
+ text "Gyaoo!@"
+ text_end
diff --git a/text/maps/RedsHouse1F.asm b/text/RedsHouse1F.asm
index 633075bb..633075bb 100644
--- a/text/maps/RedsHouse1F.asm
+++ b/text/RedsHouse1F.asm
diff --git a/text/maps/RockTunnel1F.asm b/text/RockTunnel1F.asm
index 472c52f8..472c52f8 100644
--- a/text/maps/RockTunnel1F.asm
+++ b/text/RockTunnel1F.asm
diff --git a/text/maps/RockTunnelB1F.asm b/text/RockTunnelB1F.asm
index d0437de7..d0437de7 100644
--- a/text/maps/RockTunnelB1F.asm
+++ b/text/RockTunnelB1F.asm
diff --git a/text/maps/RockTunnelPokecenter.asm b/text/RockTunnelPokecenter.asm
index 0fc249ff..0fc249ff 100644
--- a/text/maps/RockTunnelPokecenter.asm
+++ b/text/RockTunnelPokecenter.asm
diff --git a/text/RocketHideoutB1F.asm b/text/RocketHideoutB1F.asm
new file mode 100644
index 00000000..c4fcb4b1
--- /dev/null
+++ b/text/RocketHideoutB1F.asm
@@ -0,0 +1,74 @@
+_RocketHideout1EndBattleText6::
+ text "Why...?@"
+ text_end
+
+_RocketHideout1BattleText2::
+ text "Who are you? How"
+ line "did you get here?"
+ done
+
+_RocketHideout1EndBattleText2::
+ text "Oww!"
+ line "Beaten!"
+ prompt
+
+_RocketHideout1AfterBattleTxt2::
+ text "Are you dissing"
+ line "TEAM ROCKET?"
+ done
+
+_RocketHideout1BattleText3::
+ text "You broke into"
+ line "our operation?"
+ done
+
+_RocketHideout1EndBattleText3::
+ text "Burnt!"
+ prompt
+
+_RocketHideout1AfterBattleTxt3::
+ text "You're not going"
+ line "to get away with"
+ cont "this, brat!"
+ done
+
+_RocketHideout1BattleText4::
+ text "Intruder alert!"
+ done
+
+_RocketHideout1EndBattleText4::
+ text "I"
+ line "can't do it!"
+ prompt
+
+_RocketHideout1AfterBattleTxt4::
+ text "SILPH SCOPE?"
+ line "I don't know"
+ cont "where it is!"
+ done
+
+_RocketHideout1BattleText5::
+ text "Why did you come"
+ line "here?"
+ done
+
+_RocketHideout1EndBattleText5::
+ text "This"
+ line "won't do!"
+ prompt
+
+_RocketHideout1AfterBattleTxt5::
+ text "OK, I'll talk!"
+ line "Take the elevator"
+ cont "to see my BOSS!"
+ done
+
+_RocketHideout1BattleText6::
+ text "Are you lost, you"
+ line "little rat?"
+ done
+
+_RocketHideout1AfterBattleTxt6::
+ text "Uh-oh, that fight"
+ line "opened the door!"
+ done
diff --git a/text/maps/RocketHideoutB2F.asm b/text/RocketHideoutB2F.asm
index c13c3593..c13c3593 100644
--- a/text/maps/RocketHideoutB2F.asm
+++ b/text/RocketHideoutB2F.asm
diff --git a/text/maps/RocketHideoutB3F.asm b/text/RocketHideoutB3F.asm
index a146a383..a146a383 100644
--- a/text/maps/RocketHideoutB3F.asm
+++ b/text/RocketHideoutB3F.asm
diff --git a/text/RocketHideoutB4F.asm b/text/RocketHideoutB4F.asm
new file mode 100644
index 00000000..099045bc
--- /dev/null
+++ b/text/RocketHideoutB4F.asm
@@ -0,0 +1,67 @@
+_RocketHideoutJessieJamesText1::
+ text "Not another step,"
+ line "brat!@"
+ text_end
+
+_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!@"
+ text_end
+
+_RocketHideout4Text_4557a::
+ text "So! I must say, I"
+ line "am impressed you"
+ cont "got here!"
+ done
+
+_RocketHideout4Text_4557f::
+ text "WHAT!"
+ line "This cannot be!"
+ prompt
+
+_RocketHideout4Text_45584::
+ text "I see that you"
+ line "raise #MON"
+ cont "with utmost care."
+
+ para "A child like you"
+ line "would never"
+ cont "understand what I"
+ cont "hope to achieve."
+
+ para "I shall step"
+ line "aside this time!"
+
+ para "I hope we meet"
+ line "again..."
+ done
+
+_RocketHideout4BattleText4::
+ text "The elevator"
+ line "doesn't work? Who"
+ cont "has the LIFT KEY?"
+ done
+
+_RocketHideout4EndBattleText4::
+ text "No!"
+ prompt
+
+_RocketHideout4Text_455ec::
+ text "Oh no! I dropped"
+ line "the LIFT KEY!"
+ done
diff --git a/text/RocketHideoutElevator.asm b/text/RocketHideoutElevator.asm
new file mode 100644
index 00000000..1b8ba561
--- /dev/null
+++ b/text/RocketHideoutElevator.asm
@@ -0,0 +1,4 @@
+_RocketElevatorText_4578b::
+ text "It appears to"
+ line "need a key.@"
+ text_end
diff --git a/text/Route1.asm b/text/Route1.asm
new file mode 100644
index 00000000..bf32af26
--- /dev/null
+++ b/text/Route1.asm
@@ -0,0 +1,50 @@
+_Route1ViridianMartSampleText::
+ text "Hi! I work at a"
+ line "#MON MART."
+
+ para "It's a convenient"
+ line "shop, so please"
+ cont "visit us in"
+ cont "VIRIDIAN CITY."
+
+ para "I know, I'll give"
+ line "you a sample!"
+ cont "Here you go!"
+ prompt
+
+_Route1Text_1cae8::
+ text "<PLAYER> got"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_Route1Text_1caee::
+ text "We also carry"
+ line "# BALLs for"
+ cont "catching #MON!"
+ done
+
+_Route1Text_1caf3::
+ text "You have too much"
+ line "stuff with you!"
+ done
+
+_Route1Text2::
+ text "See those ledges"
+ line "along the road?"
+
+ para "It's a bit scary,"
+ line "but you can jump"
+ cont "from them."
+
+ para "You can get back"
+ line "to PALLET TOWN"
+ cont "quicker that way."
+ done
+
+_Route1Text3::
+ text "ROUTE 1"
+ line "PALLET TOWN -"
+ cont "VIRIDIAN CITY"
+ done
diff --git a/text/maps/Route10.asm b/text/Route10.asm
index a56018f0..a56018f0 100644
--- a/text/maps/Route10.asm
+++ b/text/Route10.asm
diff --git a/text/maps/Route11.asm b/text/Route11.asm
index 451d2bec..451d2bec 100644
--- a/text/maps/Route11.asm
+++ b/text/Route11.asm
diff --git a/text/maps/Route11Gate1F.asm b/text/Route11Gate1F.asm
index ef371d06..ef371d06 100644
--- a/text/maps/Route11Gate1F.asm
+++ b/text/Route11Gate1F.asm
diff --git a/text/maps/Route11Gate2F.asm b/text/Route11Gate2F.asm
index 10236081..10236081 100644
--- a/text/maps/Route11Gate2F.asm
+++ b/text/Route11Gate2F.asm
diff --git a/text/maps/Route12.asm b/text/Route12.asm
index 27befda5..27befda5 100644
--- a/text/maps/Route12.asm
+++ b/text/Route12.asm
diff --git a/text/maps/Route12Gate1F.asm b/text/Route12Gate1F.asm
index 51d75539..51d75539 100644
--- a/text/maps/Route12Gate1F.asm
+++ b/text/Route12Gate1F.asm
diff --git a/text/Route12Gate2F.asm b/text/Route12Gate2F.asm
new file mode 100644
index 00000000..adaf22cd
--- /dev/null
+++ b/text/Route12Gate2F.asm
@@ -0,0 +1,43 @@
+_TM39PreReceiveText::
+ text "My #MON's"
+ line "ashes are stored"
+ cont "in #MON TOWER."
+
+ para "You can have this"
+ line "TM. I don't need"
+ cont "it anymore..."
+ prompt
+
+_ReceivedTM39Text::
+ text "<PLAYER> received"
+ line "TM39!@"
+ text_end
+
+_TM39ExplanationText::
+ text "TM39 is a move"
+ line "called SWIFT."
+
+ para "It's very accurate,"
+ line "so use it during"
+ cont "battles you can't"
+ cont "afford to lose."
+ done
+
+_TM39NoRoomText::
+ text "You don't have"
+ line "room for this."
+ done
+
+_Route12GateUpstairsText_495b8::
+ text "Looked into the"
+ line "binoculars."
+
+ para "A man fishing!"
+ done
+
+_Route12GateUpstairsText_495c4::
+ text "Looked into the"
+ line "binoculars."
+
+ para "It's #MON TOWER!"
+ done
diff --git a/text/Route12SuperRodHouse.asm b/text/Route12SuperRodHouse.asm
new file mode 100644
index 00000000..ff633d3a
--- /dev/null
+++ b/text/Route12SuperRodHouse.asm
@@ -0,0 +1,62 @@
+_Route12HouseText_564c0::
+ text "I'm the FISHING"
+ line "GURU's brother!"
+
+ para "I simply Looove"
+ line "fishing!"
+
+ para "Do you like to"
+ line "fish?"
+ done
+
+_Route12HouseText_564c5::
+ text "Grand! I like"
+ line "your style!"
+
+ para "Take this and"
+ line "fish, young one!"
+
+ para "<PLAYER> received"
+ line "a @"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_Route12HouseText_564ca::
+ text_start
+
+ para "Fishing is a way"
+ line "of life!"
+
+ para "From the seas to"
+ line "rivers, go out"
+ cont "and land the big"
+ cont "one!"
+ done
+
+_Route12HouseText_564cf::
+ text "Oh... That's so"
+ line "disappointing..."
+ done
+
+_Route12HouseText_564d4::
+ text "Hello there,"
+ line "<PLAYER>!"
+
+ para "Use the SUPER ROD"
+ line "in any water!"
+ cont "You can catch"
+ cont "different kinds"
+ cont "of #MON."
+
+ para "Try fishing"
+ line "wherever you can!"
+ done
+
+_Route12HouseText_564d9::
+ text "Oh no!"
+
+ para "I had a gift for"
+ line "you, but you have"
+ cont "no room for it!"
+ done
diff --git a/text/maps/Route13.asm b/text/Route13.asm
index e2718919..e2718919 100644
--- a/text/maps/Route13.asm
+++ b/text/Route13.asm
diff --git a/text/maps/Route14.asm b/text/Route14.asm
index 9a9de78c..9a9de78c 100644
--- a/text/maps/Route14.asm
+++ b/text/Route14.asm
diff --git a/text/Route15.asm b/text/Route15.asm
new file mode 100644
index 00000000..9dc0e6ba
--- /dev/null
+++ b/text/Route15.asm
@@ -0,0 +1,172 @@
+_Route15BattleText1::
+ text "Let me try out the"
+ line "#MON I just"
+ cont "got in a trade!"
+ done
+
+_Route15EndBattleText1::
+ text "Not"
+ line "good enough!"
+ prompt
+
+_Route15AfterBattleText1::
+ text "You can't change"
+ line "the nickname of"
+ cont "any #MON you"
+ cont "get in a trade."
+
+ para "Only the Original"
+ line "Trainer can."
+ done
+
+_Route15BattleText2::
+ text "You look gentle,"
+ line "so I think I can"
+ cont "beat you!"
+ done
+
+_Route15EndBattleText2::
+ text "No,"
+ line "wrong!"
+ prompt
+
+_Route15AfterBattleText2::
+ text "I'm afraid of"
+ line "BIKERs, they look"
+ cont "so ugly and mean!"
+ done
+
+_Route15BattleText3::
+ text "When I whistle, I"
+ line "can summon bird"
+ cont "#MON!"
+ done
+
+_Route15EndBattleText3::
+ text "Ow!"
+ line "That's tragic!"
+ prompt
+
+_Route15AfterBattleText3::
+ text "Maybe I'm not cut"
+ line "out for battles."
+ done
+
+_Route15BattleText4::
+ text "Hmm? My birds are"
+ line "shivering! You're"
+ cont "good, aren't you?"
+ done
+
+_Route15EndBattleText4::
+ text "Just"
+ line "as I thought!"
+ prompt
+
+_Route15AfterBattleText4::
+ text "Did you know moves"
+ line "like EARTHQUAKE"
+ cont "don't have any"
+ cont "effect on birds?"
+ done
+
+_Route15BattleText5::
+ text "Oh, you're a"
+ line "little cutie!"
+ done
+
+_Route15EndBattleText5::
+ text "You looked"
+ line "so cute too!"
+ prompt
+
+_Route15AfterBattleText5::
+ text "I forgive you!"
+ line "I can take it!"
+ done
+
+_Route15BattleText6::
+ text "I raise #MON"
+ line "because I live"
+ cont "alone!"
+ done
+
+_Route15EndBattleText6::
+ text "I didn't"
+ line "ask for this!"
+ prompt
+
+_Route15AfterBattleText6::
+ text "I just like going"
+ line "home to be with"
+ cont "my #MON!"
+ done
+
+_Route15BattleText7::
+ text "Hey kid! C'mon!"
+ line "I just got these!"
+ done
+
+_Route15EndBattleText7::
+ text "Why"
+ line "not?"
+ prompt
+
+_Route15AfterBattleText7::
+ text "You only live"
+ line "once, so I live"
+ cont "as an outlaw!"
+ cont "TEAM ROCKET RULES!"
+ done
+
+_Route15BattleText8::
+ text "Fork over all your"
+ line "cash when you"
+ cont "lose to me, kid!"
+ done
+
+_Route15EndBattleText8::
+ text "That"
+ line "can't be true!"
+ prompt
+
+_Route15AfterBattleText8::
+ text "I was just joking"
+ line "about the money!"
+ done
+
+_Route15BattleText9::
+ text "What's cool?"
+ line "Trading #MON!"
+ done
+
+_Route15EndBattleText9::
+ text "I"
+ line "said trade!"
+ prompt
+
+_Route15AfterBattleText9::
+ text "I trade #MON"
+ line "with my friends!"
+ done
+
+_Route15BattleText10::
+ text "Want to play with"
+ line "my #MON?"
+ done
+
+_Route15EndBattleText10::
+ text "I was"
+ line "too impatient!"
+ prompt
+
+_Route15AfterBattleText10::
+ text "I'll go train with"
+ line "weaker people.@"
+ text_end
+
+_Route15Text12::
+ text "ROUTE 15"
+ line "West to FUCHSIA"
+ cont "CITY"
+ done
diff --git a/text/maps/Route15Gate1F.asm b/text/Route15Gate1F.asm
index 0a526142..0a526142 100644
--- a/text/maps/Route15Gate1F.asm
+++ b/text/Route15Gate1F.asm
diff --git a/text/maps/Route15Gate2F.asm b/text/Route15Gate2F.asm
index ade4a358..ade4a358 100644
--- a/text/maps/Route15Gate2F.asm
+++ b/text/Route15Gate2F.asm
diff --git a/text/maps/Route16.asm b/text/Route16.asm
index 2ef6b02a..2ef6b02a 100644
--- a/text/maps/Route16.asm
+++ b/text/Route16.asm
diff --git a/text/Route16FlyHouse.asm b/text/Route16FlyHouse.asm
new file mode 100644
index 00000000..89f76e51
--- /dev/null
+++ b/text/Route16FlyHouse.asm
@@ -0,0 +1,32 @@
+_Route16HouseText3::
+ text "Oh, you found my"
+ line "secret retreat!"
+
+ para "Please don't tell"
+ line "anyone I'm here."
+ cont "I'll make it up"
+ cont "to you with this!"
+ prompt
+
+_ReceivedHM02Text::
+ text "<PLAYER> received"
+ line "HM02!@"
+ text_end
+
+_HM02ExplanationText::
+ text "HM02 is FLY."
+ line "It will take you"
+ cont "back to any town."
+
+ para "Put it to good"
+ line "use!"
+ done
+
+_HM02NoRoomText::
+ text "You don't have any"
+ line "room for this."
+ done
+
+_Route16HouseText_1e652::
+ text "FEAROW: Kyueen!"
+ done
diff --git a/text/maps/Route16Gate1F.asm b/text/Route16Gate1F.asm
index f548977f..f548977f 100644
--- a/text/maps/Route16Gate1F.asm
+++ b/text/Route16Gate1F.asm
diff --git a/text/maps/Route16Gate2F.asm b/text/Route16Gate2F.asm
index d76b70ca..d76b70ca 100644
--- a/text/maps/Route16Gate2F.asm
+++ b/text/Route16Gate2F.asm
diff --git a/text/maps/Route17.asm b/text/Route17.asm
index f7f59683..f7f59683 100644
--- a/text/maps/Route17.asm
+++ b/text/Route17.asm
diff --git a/text/maps/Route18.asm b/text/Route18.asm
index d09caf82..d09caf82 100644
--- a/text/maps/Route18.asm
+++ b/text/Route18.asm
diff --git a/text/maps/Route18Gate1F.asm b/text/Route18Gate1F.asm
index f2f51039..f2f51039 100644
--- a/text/maps/Route18Gate1F.asm
+++ b/text/Route18Gate1F.asm
diff --git a/text/maps/Route18Gate2F.asm b/text/Route18Gate2F.asm
index 0fd2de09..0fd2de09 100644
--- a/text/maps/Route18Gate2F.asm
+++ b/text/Route18Gate2F.asm
diff --git a/text/maps/Route19.asm b/text/Route19.asm
index 244e31d0..244e31d0 100644
--- a/text/maps/Route19.asm
+++ b/text/Route19.asm
diff --git a/text/maps/Route2.asm b/text/Route2.asm
index dd7becc0..dd7becc0 100644
--- a/text/maps/Route2.asm
+++ b/text/Route2.asm
diff --git a/text/maps/Route20.asm b/text/Route20.asm
index 1ccf0b6c..1ccf0b6c 100644
--- a/text/maps/Route20.asm
+++ b/text/Route20.asm
diff --git a/text/maps/Route21.asm b/text/Route21.asm
index 3451953f..3451953f 100644
--- a/text/maps/Route21.asm
+++ b/text/Route21.asm
diff --git a/text/maps/Route22.asm b/text/Route22.asm
index 1754627f..1754627f 100644
--- a/text/maps/Route22.asm
+++ b/text/Route22.asm
diff --git a/text/Route22Gate.asm b/text/Route22Gate.asm
new file mode 100644
index 00000000..33893d6e
--- /dev/null
+++ b/text/Route22Gate.asm
@@ -0,0 +1,22 @@
+_Route22GateText_1e704::
+ text "Only truly skilled"
+ line "trainers are"
+ cont "allowed through."
+
+ para "You don't have the"
+ line "BOULDERBADGE yet!@"
+ text_end
+
+_Route22GateText_1e715::
+ text_start
+
+ para "The rules are"
+ line "rules. I can't"
+ cont "let you pass."
+ done
+
+_Route22GateText_1e71a::
+ text "Oh! That is the"
+ line "BOULDERBADGE!"
+ cont "Go right ahead!@"
+ text_end
diff --git a/text/Route23.asm b/text/Route23.asm
new file mode 100644
index 00000000..f21857b3
--- /dev/null
+++ b/text/Route23.asm
@@ -0,0 +1,41 @@
+_VictoryRoadGuardText1::
+ text "You can pass here"
+ line "only if you have"
+ cont "the @"
+ text_ram wcd6d
+ text "!"
+
+ para "You don't have the"
+ line "@"
+ text_ram wcd6d
+ text " yet!"
+
+ para "You have to have"
+ line "it to get to"
+ cont "#MON LEAGUE!@"
+ text_end
+
+_VictoryRoadGuardText2::
+ text "You can pass here"
+ line "only if you have"
+ cont "the @"
+ text_ram wcd6d
+ text "!"
+
+ para "Oh! That is the"
+ line "@"
+ text_ram wcd6d
+ text "!@"
+ text_end
+
+_VictoryRoadGuardText_513a3::
+ text_start
+
+ para "OK then! Please,"
+ line "go right ahead!"
+ done
+
+_Route23Text8::
+ text "VICTORY ROAD GATE"
+ line "- #MON LEAGUE"
+ done
diff --git a/text/Route24.asm b/text/Route24.asm
new file mode 100644
index 00000000..411a4d91
--- /dev/null
+++ b/text/Route24.asm
@@ -0,0 +1,187 @@
+_Route24Text_51510::
+ text "Congratulations!"
+ line "You beat our 5"
+ cont "contest trainers!@"
+ text_end
+
+_Route24Text_51515::
+ text_start
+
+ para "You just earned a"
+ line "fabulous prize!"
+ prompt
+
+_Route24Text_5151a::
+ text "<PLAYER> received"
+ line "a @"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_Route24Text_51521::
+ text "You don't have"
+ line "any room!"
+ done
+
+_Route24Text_51526::
+ text "By the way, would"
+ line "you like to join"
+ cont "TEAM ROCKET?"
+
+ para "We're a group"
+ line "dedicated to evil"
+ cont "using #MON!"
+
+ para "Want to join?"
+
+ para "Are you sure?"
+
+ para "Come on, join us!"
+
+ para "I'm telling you"
+ line "to join!"
+
+ para "OK, you need"
+ line "convincing!"
+
+ para "I'll make you an"
+ line "offer you can't"
+ cont "refuse!"
+ done
+
+_Route24Text_5152b::
+ text "Arrgh!"
+ line "You are good!"
+ prompt
+
+_Route24Text_51530::
+ text "With your ability,"
+ line "you could become"
+ cont "a top leader in"
+ cont "TEAM ROCKET!"
+ done
+
+_Route24BattleText1::
+ text "I saw your feat"
+ line "from the grass!"
+ done
+
+_Route24EndBattleText1::
+ text "I"
+ line "thought not!"
+ prompt
+
+_Route24AfterBattleText1::
+ text "I hid because the"
+ line "people on the"
+ cont "bridge scared me!"
+ done
+
+_Route24BattleText2::
+ text "OK! I'm No. 5!"
+ line "I'll stomp you!"
+ done
+
+_Route24EndBattleText2::
+ text "Whoa!"
+ line "Too much!"
+ prompt
+
+_Route24AfterBattleText2::
+ text "I did my best, I"
+ line "have no regrets!"
+ done
+
+_Route24BattleText3::
+ text "I'm No. 4!"
+ line "Getting tired?"
+ done
+
+_Route24EndBattleText3::
+ text "I lost"
+ line "too!"
+ prompt
+
+_Route24AfterBattleText3::
+ text "I did my best, so"
+ line "I've no regrets!"
+ done
+
+_Route24BattleText4::
+ text "Here's No. 3!"
+ line "I won't be easy!"
+ done
+
+_Route24EndBattleText4::
+ text "Ow!"
+ line "Stomped flat!"
+ prompt
+
+_Route24AfterBattleText4::
+ text "I did my best, I"
+ line "have no regrets!"
+ done
+
+_Route24BattleText5::
+ text "I'm second!"
+ line "Now it's serious!"
+ done
+
+_Route24EndBattleText5::
+ text "How could I"
+ line "lose?"
+ prompt
+
+_Route24AfterBattleText5::
+ text "I did my best, I"
+ line "have no regrets!"
+ done
+
+_Route24BattleText6::
+ text "This is NUGGET"
+ line "BRIDGE! Beat us 5"
+ cont "trainers and win"
+ cont "a fabulous prize!"
+
+ para "Think you got"
+ line "what it takes?"
+ done
+
+_Route24EndBattleText6::
+ text "Whoo!"
+ line "Good stuff!"
+ prompt
+
+_Route24AfterBattleText6::
+ text "I did my best, I"
+ line "have no regrets!"
+ done
+
+_Route24DamianText1::
+ 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
+
+_Route24DamianText2::
+ text "Take good care of"
+ line "my CHARMANDER!@"
+ text_end
+
+_Route24DamianText3::
+ text "Oh... I'd better"
+ line "release it then."
+ done
+
+_Route24DamianText4::
+ text "How's CHARMANDER"
+ line "doing?"
+ done
diff --git a/text/maps/Route25.asm b/text/Route25.asm
index 4786d830..4786d830 100644
--- a/text/maps/Route25.asm
+++ b/text/Route25.asm
diff --git a/text/maps/Route2Gate.asm b/text/Route2Gate.asm
index 566830f8..566830f8 100644
--- a/text/maps/Route2Gate.asm
+++ b/text/Route2Gate.asm
diff --git a/text/maps/Route2TradeHouse.asm b/text/Route2TradeHouse.asm
index 46fc1062..46fc1062 100644
--- a/text/maps/Route2TradeHouse.asm
+++ b/text/Route2TradeHouse.asm
diff --git a/text/maps/Route3.asm b/text/Route3.asm
index 14d44e64..14d44e64 100644
--- a/text/maps/Route3.asm
+++ b/text/Route3.asm
diff --git a/text/maps/Route4.asm b/text/Route4.asm
index 0a36f4cd..0a36f4cd 100644
--- a/text/maps/Route4.asm
+++ b/text/Route4.asm
diff --git a/text/maps/Route5.asm b/text/Route5.asm
index 54ff0f84..54ff0f84 100644
--- a/text/maps/Route5.asm
+++ b/text/Route5.asm
diff --git a/text/maps/Route6.asm b/text/Route6.asm
index 71760449..71760449 100644
--- a/text/maps/Route6.asm
+++ b/text/Route6.asm
diff --git a/text/maps/Route7.asm b/text/Route7.asm
index 6500be96..6500be96 100644
--- a/text/maps/Route7.asm
+++ b/text/Route7.asm
diff --git a/text/maps/Route8.asm b/text/Route8.asm
index c0988d70..c0988d70 100644
--- a/text/maps/Route8.asm
+++ b/text/Route8.asm
diff --git a/text/maps/Route9.asm b/text/Route9.asm
index 741c990c..741c990c 100644
--- a/text/maps/Route9.asm
+++ b/text/Route9.asm
diff --git a/text/maps/Route9_2.asm b/text/Route9_2.asm
index f3803618..f3803618 100755..100644
--- a/text/maps/Route9_2.asm
+++ b/text/Route9_2.asm
diff --git a/text/maps/SSAnne1F.asm b/text/SSAnne1F.asm
index 2bbdcbac..2bbdcbac 100644
--- a/text/maps/SSAnne1F.asm
+++ b/text/SSAnne1F.asm
diff --git a/text/SSAnne1FRooms.asm b/text/SSAnne1FRooms.asm
new file mode 100644
index 00000000..da672f8d
--- /dev/null
+++ b/text/SSAnne1FRooms.asm
@@ -0,0 +1,105 @@
+_SSAnne8Text8::
+ text "WIGGLYTUFF: Puup"
+ line "pupuu!@"
+ text_end
+
+_SSAnne8BattleText1::
+ text "I travel alone"
+ line "on my journeys!"
+
+ para "My #MON are my"
+ line "only friends!"
+ done
+
+_SSAnne8EndBattleText1::
+ text "My, my"
+ line "friends..."
+ prompt
+
+_SSAnne8AfterBattleText1::
+ text "You should be"
+ line "nice to friends!"
+ done
+
+_SSAnne8BattleText2::
+ text "You pup! How dare"
+ line "you barge in!"
+ done
+
+_SSAnne8EndBattleText2::
+ text "Humph!"
+ line "You rude child!"
+ prompt
+
+_SSAnne8AfterBattleText2::
+ text "I wish to be left"
+ line "alone! Get out!"
+ done
+
+_SSAnne8BattleText3::
+ text "I love #MON!"
+ line "Do you?"
+ done
+
+_SSAnne8EndBattleText3::
+ text "Wow! "
+ line "You're great!"
+ prompt
+
+_SSAnne8AfterBattleText3::
+ text "Let me be your"
+ line "friend, OK?"
+
+ para "Then we can trade"
+ line "#MON!"
+ done
+
+_SSAnne8BattleText4::
+ text "I collected these"
+ line "#MON from all"
+ cont "around the world!"
+ done
+
+_SSAnne8EndBattleText4::
+ text "Oh no!"
+ line "I went around the"
+ cont "world for these!"
+ prompt
+
+_SSAnne8AfterBattleText4::
+ text "You hurt my poor"
+ line "worldly #MON!"
+
+ para "I demand that you"
+ line "heal them at a"
+ cont "#MON CENTER!"
+ done
+
+_SSAnne8Text5::
+ text "Waiter, I would"
+ line "like a cherry pie"
+ cont "please!"
+ done
+
+_SSAnne8Text6::
+ text "A cruise is so"
+ line "elegant yet cozy!"
+ done
+
+_SSAnne8Text7::
+ text "I always travel"
+ line "with WIGGLYTUFF!"
+ done
+
+_SSAnne8Text9::
+ text "We are cruising"
+ line "around the world."
+ done
+
+_SSAnne8Text11::
+ text "Ssh! I'm a GLOBAL"
+ line "POLICE agent!"
+
+ para "I'm on the trail"
+ line "of TEAM ROCKET!"
+ done
diff --git a/text/maps/SSAnne2F.asm b/text/SSAnne2F.asm
index 58d804ba..58d804ba 100644
--- a/text/maps/SSAnne2F.asm
+++ b/text/SSAnne2F.asm
diff --git a/text/maps/SSAnne2FRooms.asm b/text/SSAnne2FRooms.asm
index c9b29119..c9b29119 100644
--- a/text/maps/SSAnne2FRooms.asm
+++ b/text/SSAnne2FRooms.asm
diff --git a/text/maps/SSAnne3F.asm b/text/SSAnne3F.asm
index 76490594..76490594 100644
--- a/text/maps/SSAnne3F.asm
+++ b/text/SSAnne3F.asm
diff --git a/text/SSAnneB1FRooms.asm b/text/SSAnneB1FRooms.asm
new file mode 100644
index 00000000..8072fc85
--- /dev/null
+++ b/text/SSAnneB1FRooms.asm
@@ -0,0 +1,114 @@
+_SSAnne10Text8::
+ text "MACHOKE: Gwoh!"
+ line "Goggoh!@"
+ text_end
+
+_SSAnne10BattleText1::
+ text "You know what they"
+ line "say about sailors"
+ cont "and fighting!"
+ done
+
+_SSAnne10EndBattleText1::
+ text "Right!"
+ line "Good fight, mate!"
+ prompt
+
+_SSAnne10AfterBattleText1::
+ text "Haha! Want to be"
+ line "a sailor, mate?"
+ done
+
+_SSAnne10BattleText2::
+ text "My sailor's pride"
+ line "is at stake!"
+ done
+
+_SSAnne10EndBattleText2::
+ text "Your"
+ line "spirit sank me!"
+ prompt
+
+_SSAnne10AfterBattleText2::
+ text "Did you see the"
+ line "FISHING GURU in"
+ cont "VERMILION CITY?"
+ done
+
+_SSAnne10BattleText3::
+ text "Us sailors have"
+ line "#MON too!"
+ done
+
+_SSAnne10EndBattleText3::
+ text "OK, "
+ line "you're not bad."
+ prompt
+
+_SSAnne10AfterBattleText3::
+ text "We caught all our"
+ line "#MON while"
+ cont "out at sea!"
+ done
+
+_SSAnne10BattleText4::
+ text "I like feisty"
+ line "kids like you!@"
+ text_end
+
+_SSAnne10EndBattleText4::
+ text "Argh!"
+ line "Lost it!"
+ prompt
+
+_SSAnne10AfterBattleText4::
+ text "Sea #MON live"
+ line "in deep water."
+ cont "You'll need a ROD!"
+ done
+
+_SSAnne10BattleText5::
+ text "Matey, you're"
+ line "walking the plank"
+ cont "if you lose!"
+ done
+
+_SSAnne10EndBattleText5::
+ text "Argh!"
+ line "Beaten by a kid!"
+ prompt
+
+_SSAnne10AfterBattleText5::
+ text "Jellyfish some-"
+ line "times drift into"
+ cont "the ship."
+ done
+
+_SSAnne10BattleText6::
+ text "Hello stranger!"
+ line "Stop and chat!"
+
+ para "All my #MON"
+ line "are from the sea!"
+ done
+
+_SSAnne10EndBattleText6::
+ text "Darn!"
+ line "I let that one"
+ cont "get away!"
+ prompt
+
+_SSAnne10AfterBattleText6::
+ text "I was going to"
+ line "make you my"
+ cont "assistant too!"
+ done
+
+_SSAnne10Text7::
+ text "My buddy, MACHOKE,"
+ line "is super strong!"
+
+ para "He has enough"
+ line "STRENGTH to move"
+ cont "big rocks!"
+ done
diff --git a/text/maps/SSAnneBow.asm b/text/SSAnneBow.asm
index 76cd5631..76cd5631 100644
--- a/text/maps/SSAnneBow.asm
+++ b/text/SSAnneBow.asm
diff --git a/text/SSAnneCaptainsRoom.asm b/text/SSAnneCaptainsRoom.asm
new file mode 100644
index 00000000..5bd86e17
--- /dev/null
+++ b/text/SSAnneCaptainsRoom.asm
@@ -0,0 +1,64 @@
+_SSAnne7RubText::
+ text "CAPTAIN: Ooargh..."
+ line "I feel hideous..."
+ cont "Urrp! Seasick..."
+
+ para "<PLAYER> rubbed"
+ line "the CAPTAIN's"
+ cont "back!"
+
+ para "Rub-rub..."
+ line "Rub-rub...@"
+ text_end
+
+_ReceivingHM01Text::
+ text "CAPTAIN: Whew!"
+ line "Thank you! I"
+ cont "feel much better!"
+
+ para "You want to see"
+ line "my CUT technique?"
+
+ para "I could show you"
+ line "if I wasn't ill..."
+
+ para "I know! You can"
+ line "have this!"
+
+ para "Teach it to your"
+ line "#MON and you"
+ cont "can see it CUT"
+ cont "anytime!"
+ prompt
+
+_ReceivedHM01Text::
+ text "<PLAYER> got"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_SSAnne7Text_61932::
+ text "CAPTAIN: Whew!"
+
+ para "Now that I'm not"
+ line "sick anymore, I"
+ cont "guess it's time."
+ done
+
+_HM01NoRoomText::
+ text "Oh no! You have"
+ line "no room for this!"
+ done
+
+_SSAnne7Text2::
+ text "Yuck! Shouldn't"
+ line "have looked!"
+ done
+
+_SSAnne7Text3::
+ text "How to Conquer"
+ line "Seasickness..."
+ cont "The CAPTAIN's"
+ cont "reading this!"
+ done
diff --git a/text/maps/SSAnneKitchen.asm b/text/SSAnneKitchen.asm
index b7784019..b7784019 100644
--- a/text/maps/SSAnneKitchen.asm
+++ b/text/SSAnneKitchen.asm
diff --git a/text/maps/SafariZoneCenter.asm b/text/SafariZoneCenter.asm
index 09918f93..09918f93 100644
--- a/text/maps/SafariZoneCenter.asm
+++ b/text/SafariZoneCenter.asm
diff --git a/text/maps/SafariZoneCenterRestHouse.asm b/text/SafariZoneCenterRestHouse.asm
index b6c87818..b6c87818 100644
--- a/text/maps/SafariZoneCenterRestHouse.asm
+++ b/text/SafariZoneCenterRestHouse.asm
diff --git a/text/maps/SafariZoneEast.asm b/text/SafariZoneEast.asm
index eebe5de7..eebe5de7 100644
--- a/text/maps/SafariZoneEast.asm
+++ b/text/SafariZoneEast.asm
diff --git a/text/maps/SafariZoneEastRestHouse.asm b/text/SafariZoneEastRestHouse.asm
index d5f7abc8..d5f7abc8 100644
--- a/text/maps/SafariZoneEastRestHouse.asm
+++ b/text/SafariZoneEastRestHouse.asm
diff --git a/text/SafariZoneGate.asm b/text/SafariZoneGate.asm
new file mode 100644
index 00000000..bd7e8de4
--- /dev/null
+++ b/text/SafariZoneGate.asm
@@ -0,0 +1,147 @@
+_SafariZoneEntranceText1::
+ text "Welcome to the"
+ line "SAFARI ZONE!"
+ done
+
+SafariZoneEntranceText_9e814::
+ text "Leaving early?@"
+ text_end
+
+_SafariZoneEntranceText_753bb::
+ text "Please return any"
+ line "SAFARI BALLs you"
+ cont "have left."
+ done
+
+_SafariZoneEntranceText_753c0::
+ text "Good Luck!"
+ done
+
+_SafariZoneEntranceText_753c5::
+ text "Did you get a"
+ line "good haul?"
+ cont "Come again!"
+ done
+
+SafariZoneEntranceText_9e6e4::
+ text "For just ¥500,"
+ line "you can catch all"
+ cont "the #MON you"
+ cont "want in the park!"
+
+ para "Would you like to"
+ line "join the hunt?@"
+ text_end
+
+SafariZoneEntranceText_9e747::
+ text "That'll be ¥@"
+ text_bcd wPriceTemp, $c3
+ text ","
+ line "please!"
+
+ para "We only use a"
+ line "special # BALL"
+ cont "here."
+
+ para "<PLAYER> received"
+ line "30 SAFARI BALLs!@"
+ text_end
+
+_SafariZoneEntranceText_75360::
+ text_start
+
+ para "We'll call you on"
+ line "the PA when you"
+ cont "run out of time"
+ cont "or SAFARI BALLs!"
+ done
+
+_SafariZoneEntranceText_75365::
+ text "OK! Please come"
+ line "again!"
+ done
+
+_SafariZoneEntranceText_7536a::
+ text "Oops! Not enough"
+ line "money!"
+ done
+
+_SafariZoneEntranceText_753e6::
+ text "Hi! Is it your"
+ line "first time here?"
+ done
+
+_SafariZoneEntranceText_753eb::
+ text "SAFARI ZONE has 4"
+ line "zones in it."
+
+ para "Each zone has"
+ line "different kinds"
+ cont "of #MON. Use"
+ cont "SAFARI BALLs to"
+ cont "catch them!"
+
+ para "When you run out"
+ line "of time or SAFARI"
+ cont "BALLs, it's game"
+ cont "over for you!"
+
+ para "Before you go,"
+ line "open an unused"
+ cont "#MON BOX so"
+ cont "there's room for"
+ cont "new #MON!"
+ done
+
+_SafariZoneEntranceText_753f0::
+ text "Sorry, you're a"
+ line "regular here!"
+ done
+
+_SafariZoneLowCostText1::
+ text_start
+
+ para "Oh, all right, pay"
+ line "me what you have."
+ prompt
+
+_SafariZoneLowCostText2::
+ text "But, I can't give"
+ line "you all 30 BALLs."
+ done
+
+_SafariZoneLowCostText3::
+ text_start
+
+ para "You're persistent,"
+ line "aren't you?"
+
+ para "OK, you can go in"
+ line "for free, but"
+ cont "just this once!@"
+ text_end
+
+_SafariZoneLowCostText4::
+ text_start
+ done
+
+_SafariZoneLowCostText5::
+ text "I'm sorry, but you"
+ line "have to pay to"
+ cont "enter."
+ done
+
+_SafariZoneLowCostText6::
+ text "You can't enter"
+ line "without paying!"
+ done
+
+_SafariZoneLowCostText7::
+ text "I said, no money,"
+ line "no entry!"
+ done
+
+_SafariZoneLowCostText8::
+ text "Read my lips, NO!"
+ line "Get it?"
+ done
diff --git a/text/maps/SafariZoneNorth.asm b/text/SafariZoneNorth.asm
index 1e148f0b..1e148f0b 100644
--- a/text/maps/SafariZoneNorth.asm
+++ b/text/SafariZoneNorth.asm
diff --git a/text/maps/SafariZoneNorthRestHouse.asm b/text/SafariZoneNorthRestHouse.asm
index 93f02c8f..93f02c8f 100644
--- a/text/maps/SafariZoneNorthRestHouse.asm
+++ b/text/SafariZoneNorthRestHouse.asm
diff --git a/text/SafariZoneSecretHouse.asm b/text/SafariZoneSecretHouse.asm
new file mode 100644
index 00000000..8aff18b7
--- /dev/null
+++ b/text/SafariZoneSecretHouse.asm
@@ -0,0 +1,45 @@
+_SecretHouseText_4a350::
+ text "Ah! Finally!"
+
+ para "You're the first"
+ line "person to reach"
+ cont "the SECRET HOUSE!"
+
+ para "I was getting"
+ line "worried that no"
+ cont "one would win our"
+ cont "campaign prize."
+
+ para "Congratulations!"
+ line "You have won!"
+ prompt
+
+_ReceivedHM03Text::
+ text "<PLAYER> received"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_HM03ExplanationText::
+ text "HM03 is SURF!"
+
+ para "#MON will be"
+ line "able to ferry you"
+ cont "across water!"
+
+ para "And, this HM isn't"
+ line "disposable! You"
+ cont "can use it over"
+ cont "and over!"
+
+ para "You're super lucky"
+ line "for winning this"
+ cont "fabulous prize!"
+ done
+
+_HM03NoRoomText::
+ text "You don't have"
+ line "room for this"
+ cont "fabulous prize!"
+ done
diff --git a/text/maps/SafariZoneWest.asm b/text/SafariZoneWest.asm
index dcb2fe6c..dcb2fe6c 100644
--- a/text/maps/SafariZoneWest.asm
+++ b/text/SafariZoneWest.asm
diff --git a/text/maps/SafariZoneWestRestHouse.asm b/text/SafariZoneWestRestHouse.asm
index 94802b13..94802b13 100644
--- a/text/maps/SafariZoneWestRestHouse.asm
+++ b/text/SafariZoneWestRestHouse.asm
diff --git a/text/SaffronCity.asm b/text/SaffronCity.asm
new file mode 100644
index 00000000..ae9c44f2
--- /dev/null
+++ b/text/SaffronCity.asm
@@ -0,0 +1,152 @@
+_SaffronCityText1::
+ text "What do you want?"
+ line "Get lost!"
+ done
+
+_SaffronCityText2::
+ text "BOSS said he'll"
+ line "take this town!"
+ done
+
+_SaffronCityText3::
+ text "Get out of the"
+ line "way!"
+ done
+
+_SaffronCityText4::
+ text "SAFFRON belongs"
+ line "to TEAM ROCKET!"
+ done
+
+_SaffronCityText5::
+ text "Being evil makes"
+ line "me feel so alive!"
+ done
+
+_SaffronCityText6::
+ text "Ow! Watch where"
+ line "you're walking!"
+ done
+
+_SaffronCityText7::
+ text "With SILPH under"
+ line "control, we can"
+ cont "exploit #MON"
+ cont "around the world!"
+ done
+
+_SaffronCityText8::
+ text "You beat TEAM"
+ line "ROCKET all alone?"
+ cont "That's amazing!"
+ done
+
+_SaffronCityText9::
+ text "Yeah! TEAM ROCKET"
+ line "is gone!"
+ cont "It's safe to go"
+ cont "out again!"
+ done
+
+_SaffronCityText10::
+ text "People should be"
+ line "flocking back to"
+ cont "SAFFRON now."
+ done
+
+_SaffronCityText11::
+ text "I flew here on my"
+ line "PIDGEOT when I"
+ cont "read about SILPH."
+
+ para "It's already over?"
+ line "I missed the"
+ cont "media action."
+ done
+
+_SaffronCityText12::
+ text "PIDGEOT: Bi bibii!@"
+ text_end
+
+_SaffronCityText13::
+ text "I saw ROCKET"
+ line "BOSS escaping"
+ cont "SILPH's building."
+ done
+
+_SaffronCityText14::
+ text "I'm a security"
+ line "guard."
+
+ para "Suspicious kids I"
+ line "don't allow in!"
+ done
+
+_SaffronCityText15::
+ text "..."
+ line "Snore..."
+
+ para "Hah! He's taking"
+ line "a snooze!"
+ done
+
+_SaffronCityText16::
+ text "SAFFRON CITY"
+ line "Shining, Golden"
+ cont "Land of Commerce"
+ done
+
+_SaffronCityText17::
+ text "FIGHTING DOJO"
+ done
+
+_SaffronCityText18::
+ text "SAFFRON CITY"
+ line "#MON GYM"
+ cont "LEADER: SABRINA"
+
+ para "The Master of"
+ line "Psychic #MON!"
+ done
+
+_SaffronCityText20::
+ text "TRAINER TIPS"
+
+ para "FULL HEAL cures"
+ line "all ailments like"
+ cont "sleep and burns."
+
+ para "It costs a bit"
+ line "more, but it's"
+ cont "more convenient."
+ done
+
+_SaffronCityText21::
+ text "TRAINER TIPS"
+
+ para "New GREAT BALL"
+ line "offers improved"
+ cont "capture rates."
+
+ para "Try it on those"
+ line "hard-to-catch"
+ cont "#MON."
+ done
+
+_SaffronCityText22::
+ text "SILPH CO."
+ line "OFFICE BUILDING"
+ done
+
+_SaffronCityText24::
+ text "MR.PSYCHIC's"
+ line "HOUSE"
+ done
+
+_SaffronCityText25::
+ text "SILPH's latest"
+ line "product!"
+
+ para "Release to be"
+ line "determined..."
+ done
diff --git a/text/SaffronGates.asm b/text/SaffronGates.asm
new file mode 100644
index 00000000..50e88a01
--- /dev/null
+++ b/text/SaffronGates.asm
@@ -0,0 +1,38 @@
+_SaffronGateText_1dfe7::
+ text "I'm on guard duty."
+ line "Gee, I'm thirsty,"
+ cont "though!"
+
+ para "Oh, wait there,"
+ line "the road's closed."
+ done
+
+_SaffronGateText_8aaa9::
+ text "Whoa, boy!"
+ line "I'm parched!"
+ cont "..."
+ cont "Huh? I can have"
+ cont "this drink?"
+ cont "Gee, thanks!@"
+ text_end
+
+_SaffronGateText_1dff1::
+ text_start
+
+ para "..."
+ line "Glug, glug..."
+ cont "..."
+ cont "Gulp..."
+ cont "If you want to go"
+ cont "to SAFFRON CITY..."
+ cont "..."
+ cont "You can go on"
+ cont "through. I'll"
+ cont "share this with"
+ cont "the other guards!"
+ done
+
+_SaffronGateText_1dff6::
+ text "Hi, thanks for"
+ line "the cool drinks!"
+ done
diff --git a/text/SaffronGym.asm b/text/SaffronGym.asm
new file mode 100644
index 00000000..a42a6932
--- /dev/null
+++ b/text/SaffronGym.asm
@@ -0,0 +1,238 @@
+_SaffronGymText_5d162::
+ text "I had a vision of"
+ line "your arrival!"
+
+ para "I have had psychic"
+ line "powers since I"
+ cont "was a child."
+
+ para "I first learned"
+ line "to bend spoons"
+ cont "with my mind."
+
+ para "I dislike fight-"
+ line "ing, but if you"
+ cont "wish, I will show"
+ cont "you my powers!"
+ done
+
+_SaffronGymText_5d167::
+ text "I'm"
+ line "shocked!"
+ cont "But, a loss is a"
+ cont "loss."
+
+ para "I admit I didn't"
+ line "work hard enough"
+ cont "to win!"
+
+ para "You earned the"
+ line "MARSHBADGE!@"
+ text_end
+
+_SaffronGymText_5d16e::
+ text "Everyone has"
+ line "psychic power!"
+ cont "People just don't"
+ cont "realize it!"
+ done
+
+_SaffronGymText_5d173::
+ text "The MARSHBADGE"
+ line "makes #MON up"
+ cont "to L70 obey you!"
+
+ para "Stronger #MON"
+ line "will become wild,"
+ cont "ignoring your"
+ cont "orders in battle!"
+
+ para "Just don't raise"
+ line "your #MON too"
+ cont "much!"
+
+ para "Wait, please take"
+ line "this TM with you!"
+ done
+
+ReceivedTM46Text::
+ text "<PLAYER> received"
+ line "TM46!@"
+ text_end
+
+_TM46ExplanationText::
+ text_start
+
+ para "TM46 is PSYWAVE!"
+ line "It uses powerful"
+ cont "psychic waves to"
+ cont "inflict damage!"
+ done
+
+_TM46NoRoomText::
+ text "Your pack is full"
+ line "of other items!"
+ done
+
+_SaffronGymText_5d1e6::
+ text "Yo! Champ in"
+ line "making!"
+
+ para "SABRINA's #MON"
+ line "use psychic power"
+ cont "instead of force!"
+
+ para "Fighting #MON"
+ line "are weak against"
+ cont "psychic #MON!"
+
+ para "They get creamed"
+ line "before they can"
+ cont "even aim a punch!"
+ done
+
+_SaffronGymText_5d1eb::
+ text "Psychic power,"
+ line "huh?"
+
+ para "If I had that,"
+ line "I'd make a bundle"
+ cont "at the slots!"
+ done
+
+_SaffronGymBattleText1::
+ text "SABRINA is younger"
+ line "than I, but I"
+ cont "respect her!"
+ done
+
+_SaffronGymEndBattleText1::
+ text "Not"
+ line "good enough!"
+ prompt
+
+_SaffronGymAfterBattleText1::
+ text "In a battle of"
+ line "equals, the one"
+ cont "with the stronger"
+ cont "will wins!"
+
+ para "If you wish"
+ line "to beat SABRINA,"
+ cont "focus on winning!"
+ done
+
+_SaffronGymBattleText2::
+ text "Does our unseen"
+ line "power scare you?"
+ done
+
+_SaffronGymEndBattleText2::
+ text "I never"
+ line "foresaw this!"
+ prompt
+
+_SaffronGymAfterBattleText2::
+ text "Psychic #MON"
+ line "fear only bugs!"
+ done
+
+_SaffronGymBattleText3::
+ text "#MON take on"
+ line "the appearance of"
+ cont "their trainers."
+
+ para "Your #MON must"
+ line "be tough, then!"
+ done
+
+_SaffronGymEndBattleText3::
+ text "I knew"
+ line "it!"
+ prompt
+
+_SaffronGymAfterBattleText3::
+ text "I must teach"
+ line "better techniques"
+ cont "to my #MON!"
+ done
+
+_SaffronGymBattleText4::
+ text "You know that"
+ line "power alone isn't"
+ cont "enough!"
+ done
+
+_SaffronGymEndBattleText4::
+ text "I don't"
+ line "believe this!"
+ prompt
+
+_SaffronGymAfterBattleText4::
+ text "SABRINA just wiped"
+ line "out the KARATE"
+ cont "MASTER next door!"
+ done
+
+_SaffronGymBattleText5::
+ text "You and I, our"
+ line "#MON shall"
+ cont "fight!"
+ done
+
+_SaffronGymEndBattleText5::
+ text "I lost"
+ line "after all!"
+ prompt
+
+_SaffronGymAfterBattleText5::
+ text "I knew that this"
+ line "was going to take"
+ cont "place."
+ done
+
+_SaffronGymBattleText6::
+ text "SABRINA is young,"
+ line "but she's also"
+ cont "our LEADER!"
+
+ para "You won't reach"
+ line "her easily!"
+ done
+
+_SaffronGymEndBattleText6::
+ text "I lost"
+ line "my concentration!"
+ prompt
+
+_SaffronGymAfterBattleText6::
+ text "There used to be"
+ line "2 #MON GYMs in"
+ cont "SAFFRON."
+
+ para "The FIGHTING DOJO"
+ line "next door lost"
+ cont "its GYM status"
+ cont "when we went and"
+ cont "creamed them!"
+ done
+
+_SaffronGymBattleText7::
+ text "SAFFRON #MON"
+ line "GYM is famous for"
+ cont "its psychics!"
+
+ para "You want to see"
+ line "SABRINA!"
+ cont "I can tell!"
+ done
+
+_SaffronGymEndBattleText7::
+ text "Arrrgh!"
+ prompt
+
+_SaffronGymAfterBattleText7::
+ text "That's right! I"
+ line "used telepathy to"
+ cont "read your mind!"
+ done
diff --git a/text/maps/SaffronMart.asm b/text/SaffronMart.asm
index a43b0d94..a43b0d94 100644
--- a/text/maps/SaffronMart.asm
+++ b/text/SaffronMart.asm
diff --git a/text/SaffronPidgeyHouse.asm b/text/SaffronPidgeyHouse.asm
new file mode 100644
index 00000000..d8666a07
--- /dev/null
+++ b/text/SaffronPidgeyHouse.asm
@@ -0,0 +1,27 @@
+_SaffronHouse1Text1::
+ text "Thank you for"
+ line "writing. I hope"
+ cont "to see you soon!"
+
+ para "Hey! Don't look"
+ line "at my letter!"
+ done
+
+_SaffronHouse1Text2::
+ text "PIDGEY: Kurukkoo!@"
+ text_end
+
+_SaffronHouse1Text3::
+ text "The COPYCAT is"
+ line "cute! I'm getting"
+ cont "her a # DOLL!"
+ done
+
+_SaffronHouse1Text4::
+ text "I was given a PP"
+ line "UP as a gift."
+
+ para "It's used for"
+ line "increasing the PP"
+ cont "of techniques!"
+ done
diff --git a/text/maps/SaffronPokecenter.asm b/text/SaffronPokecenter.asm
index 6548aff8..6548aff8 100644
--- a/text/maps/SaffronPokecenter.asm
+++ b/text/SaffronPokecenter.asm
diff --git a/text/SeafoamIslandsB4F.asm b/text/SeafoamIslandsB4F.asm
new file mode 100644
index 00000000..ea7eeaa2
--- /dev/null
+++ b/text/SeafoamIslandsB4F.asm
@@ -0,0 +1,14 @@
+_ArticunoBattleText::
+ text "Gyaoo!@"
+ text_end
+
+_SeafoamIslands5Text4::
+ text "Boulders might"
+ line "change the flow"
+ cont "of water!"
+ done
+
+_SeafoamIslands5Text5::
+ text "DANGER"
+ line "Fast current!"
+ done
diff --git a/text/SilphCo10F.asm b/text/SilphCo10F.asm
new file mode 100644
index 00000000..fd4d4c7c
--- /dev/null
+++ b/text/SilphCo10F.asm
@@ -0,0 +1,68 @@
+_SilphCo10Text_5a1d3::
+ text "Waaaaa!"
+ line "I'm scared!"
+ done
+
+_SilphCo10Text_5a1d8::
+ text "Please keep quiet"
+ line "about my crying!"
+ done
+
+_SilphCo10BattleText1::
+ text "Welcome to the"
+ line "10F! So good of"
+ cont "you to join me!"
+ done
+
+_SilphCo10EndBattleText1::
+ text "I'm"
+ line "stunned!"
+ prompt
+
+_SilphCo10AfterBattleText1::
+ text "Nice try, but the"
+ line "boardroom is up"
+ cont "one more floor!"
+ done
+
+_SilphCo10BattleText2::
+ text "Enough of your"
+ line "silly games!"
+ done
+
+_SilphCo10EndBattleText2::
+ text "No"
+ line "continues left!"
+ prompt
+
+_SilphCo10AfterBattleText2::
+ text "Are you satisfied"
+ line "with beating me?"
+ cont "Then go on home!"
+ done
+
+_SilphCoJessieJamesText1::
+ text "Hold it right"
+ line "there, brat!@"
+ text_end
+
+_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...@"
+ text_end
diff --git a/text/SilphCo11F.asm b/text/SilphCo11F.asm
new file mode 100644
index 00000000..51033d72
--- /dev/null
+++ b/text/SilphCo11F.asm
@@ -0,0 +1,115 @@
+_SilphCoPresidentText::
+ text "PRESIDENT: Thank"
+ line "you for saving"
+ cont "SILPH!"
+
+ para "I will never"
+ line "forget you saved"
+ cont "us in our moment"
+ cont "of peril!"
+
+ para "I have to thank"
+ line "you in some way!"
+
+ para "Because I am rich,"
+ line "I can give you"
+ cont "anything!"
+
+ para "Here, maybe this"
+ line "will do!"
+ prompt
+
+_ReceivedSilphCoMasterBallText::
+ text "<PLAYER> got a"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_SilphCo10Text_6231c::
+ text "PRESIDENT: You"
+ line "can't buy that"
+ cont "anywhere!"
+
+ para "It's our secret"
+ line "prototype MASTER"
+ cont "BALL!"
+
+ para "It will catch any"
+ line "#MON without"
+ cont "fail!"
+
+ para "You should be"
+ line "quiet about using"
+ cont "it, though."
+ done
+
+_SilphCoMasterBallNoRoomText::
+ text "You have no"
+ line "room for this."
+ done
+
+_SilphCo11Text2::
+ text "SECRETARY: Thank"
+ line "you for rescuing"
+ cont "all of us!"
+
+ para "We admire your"
+ line "courage."
+ done
+
+_SilphCo11Text3::
+ text "Ah, <PLAYER>!"
+ line "So we meet again!"
+
+ para "The PRESIDENT and"
+ line "I are discussing"
+ cont "a vital business"
+ cont "proposition."
+
+ para "Keep your nose"
+ line "out of grown-up"
+ cont "matters..."
+
+ para "or, experience a"
+ line "world of pain!"
+ done
+
+_SilphCo10Text_62330::
+ text "Arrgh!!"
+ line "I lost again!?"
+ prompt
+
+_SilphCo10Text_62335::
+ text "Blast it all!"
+ line "You ruined our"
+ cont "plans for SILPH!"
+
+ para "But, TEAM ROCKET"
+ line "will never fall!"
+
+ para "<PLAYER>! Never"
+ line "forget that all"
+ cont "#MON exist"
+ cont "for TEAM ROCKET!"
+
+ para "I must go, but I"
+ line "shall return!"
+ done
+
+_SilphCo11BattleText2::
+ text "Halt! Do you have"
+ line "an appointment"
+ cont "with my BOSS?"
+ done
+
+_SilphCo11EndBattleText2::
+ text "Gaah!"
+ line "Demolished!"
+ prompt
+
+_SilphCo11AfterBattleText2::
+ text "Watch your step,"
+ line "my BOSS likes his"
+ cont "#MON tough!"
+ done
diff --git a/text/maps/SilphCo1F.asm b/text/SilphCo1F.asm
index 1ef80189..1ef80189 100644
--- a/text/maps/SilphCo1F.asm
+++ b/text/SilphCo1F.asm
diff --git a/text/SilphCo2F.asm b/text/SilphCo2F.asm
new file mode 100644
index 00000000..817b4142
--- /dev/null
+++ b/text/SilphCo2F.asm
@@ -0,0 +1,97 @@
+_SilphCo2Text_59ded::
+ text "Eeek!"
+ line "No! Stop! Help!"
+
+ para "Oh, you're not"
+ line "with TEAM ROCKET."
+ cont "I thought..."
+ cont "I'm sorry. Here,"
+ cont "please take this!"
+ prompt
+
+_ReceivedTM36Text::
+ text "<PLAYER> got"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_TM36ExplanationText::
+ text "TM36 is"
+ line "SELFDESTRUCT!"
+
+ para "It's powerful, but"
+ line "the #MON that"
+ cont "uses it faints!"
+ cont "Be careful."
+ done
+
+_TM36NoRoomText::
+ text "You don't have any"
+ line "room for this."
+ done
+
+_SilphCo2BattleText1::
+ text "Help! I'm a SILPH"
+ line "employee."
+ done
+
+_SilphCo2EndBattleText1::
+ text "How"
+ line "did you know I"
+ cont "was a ROCKET?"
+ prompt
+
+_SilphCo2AfterBattleText1::
+ text "I work for both"
+ line "SILPH and TEAM"
+ cont "ROCKET!"
+ done
+
+_SilphCo2BattleText2::
+ text "It's off limits"
+ line "here! Go home!"
+ done
+
+_SilphCo2EndBattleText2::
+ text "You're"
+ line "good."
+ prompt
+
+_SilphCo2AfterBattleText2::
+ text "Can you solve the"
+ line "maze in here?"
+ done
+
+_SilphCo2BattleText3::
+ text "No kids are"
+ line "allowed in here!"
+ done
+
+_SilphCo2EndBattleText3::
+ text "Tough!"
+ prompt
+
+_SilphCo2AfterBattleText3::
+ text "Diamond-shaped"
+ line "tiles are"
+ cont "teleport blocks!"
+
+ para "They're hi-tech"
+ line "transporters!"
+ done
+
+_SilphCo2BattleText4::
+ text "Hey kid! What are"
+ line "you doing here?"
+ done
+
+_SilphCo2EndBattleText4::
+ text "I goofed!"
+ prompt
+
+_SilphCo2AfterBattleText4::
+ text "SILPH CO. will"
+ line "be merged with"
+ cont "TEAM ROCKET!"
+ done
diff --git a/text/maps/SilphCo3F.asm b/text/SilphCo3F.asm
index b6a023f9..b6a023f9 100644
--- a/text/maps/SilphCo3F.asm
+++ b/text/SilphCo3F.asm
diff --git a/text/maps/SilphCo4F.asm b/text/SilphCo4F.asm
index 5b484ec7..5b484ec7 100644
--- a/text/maps/SilphCo4F.asm
+++ b/text/SilphCo4F.asm
diff --git a/text/maps/SilphCo5F.asm b/text/SilphCo5F.asm
index 9c8bfd41..9c8bfd41 100644
--- a/text/maps/SilphCo5F.asm
+++ b/text/SilphCo5F.asm
diff --git a/text/maps/SilphCo6F.asm b/text/SilphCo6F.asm
index 90456b5c..90456b5c 100644
--- a/text/maps/SilphCo6F.asm
+++ b/text/SilphCo6F.asm
diff --git a/text/maps/SilphCo7F.asm b/text/SilphCo7F.asm
index 8f7b6ca2..8f7b6ca2 100644
--- a/text/maps/SilphCo7F.asm
+++ b/text/SilphCo7F.asm
diff --git a/text/maps/SilphCo8F.asm b/text/SilphCo8F.asm
index fabae5e6..fabae5e6 100644
--- a/text/maps/SilphCo8F.asm
+++ b/text/SilphCo8F.asm
diff --git a/text/maps/SilphCo9F.asm b/text/SilphCo9F.asm
index fd1aa91c..fd1aa91c 100644
--- a/text/maps/SilphCo9F.asm
+++ b/text/SilphCo9F.asm
diff --git a/text/maps/UndergroundPathRoute6.asm b/text/UndergroundPathRoute6.asm
index dacc44f7..dacc44f7 100644
--- a/text/maps/UndergroundPathRoute6.asm
+++ b/text/UndergroundPathRoute6.asm
diff --git a/text/maps/UndergroundPathRoute7.asm b/text/UndergroundPathRoute7.asm
index 5cde3614..5cde3614 100644
--- a/text/maps/UndergroundPathRoute7.asm
+++ b/text/UndergroundPathRoute7.asm
diff --git a/text/maps/UndergroundPathRoute7Copy.asm b/text/UndergroundPathRoute7Copy.asm
index 4e0dc3ca..4e0dc3ca 100644
--- a/text/maps/UndergroundPathRoute7Copy.asm
+++ b/text/UndergroundPathRoute7Copy.asm
diff --git a/text/maps/UndergroundPathRoute8.asm b/text/UndergroundPathRoute8.asm
index da785c8e..da785c8e 100644
--- a/text/maps/UndergroundPathRoute8.asm
+++ b/text/UndergroundPathRoute8.asm
diff --git a/text/VermilionCity.asm b/text/VermilionCity.asm
new file mode 100644
index 00000000..c65063cc
--- /dev/null
+++ b/text/VermilionCity.asm
@@ -0,0 +1,169 @@
+_VermilionCityText1::
+ text "We're careful"
+ line "about pollution!"
+
+ para "We've heard GRIMER"
+ line "multiplies in"
+ cont "toxic sludge!"
+ done
+
+_VermilionCityTextDidYouSee::
+ text "Did you see S.S."
+ line "ANNE moored in"
+ cont "the harbor?"
+ done
+
+_VermilionCityTextSSAnneDeparted::
+ text "So, S.S.ANNE has"
+ line "departed!"
+
+ para "She'll be back in"
+ line "about a year."
+ done
+
+_SSAnneWelcomeText4::
+ text "Welcome to S.S."
+ line "ANNE!"
+ done
+
+_SSAnneWelcomeText9::
+ text "Welcome to S.S."
+ line "ANNE!"
+
+ para "Excuse me, do you"
+ line "have a ticket?"
+ prompt
+
+_SSAnneFlashedTicketText::
+ text "<PLAYER> flashed"
+ line "the S.S.TICKET!"
+
+ para "Great! Welcome to"
+ line "S.S.ANNE!"
+ done
+
+_SSAnneNoTicketText::
+ text "<PLAYER> doesn't"
+ line "have the needed"
+ cont "S.S.TICKET."
+
+ para "Sorry!"
+
+ para "You need a ticket"
+ line "to get aboard."
+ done
+
+_SSAnneNotHereText::
+ text "The ship set sail."
+ done
+
+_VermilionCityText4::
+ text "I'm putting up a"
+ line "building on this"
+ cont "plot of land."
+
+ para "My #MON is"
+ line "tamping the land."
+ done
+
+_VermilionCityText5::
+ text "MACHOP: Guoh!"
+ line "Gogogoh!@"
+ text_end
+
+_VermilionCityText15::
+ text_start
+ para "A MACHOP is"
+ line "stomping the land"
+ cont "flat."
+ done
+
+_VermilionCityText6::
+ text "S.S.ANNE is a"
+ line "famous luxury"
+ cont "cruise ship."
+
+ para "We visit VERMILION"
+ line "once a year."
+ done
+
+_OfficerJennyText1::
+ text "I just caught a"
+ line "SQUIRTLE that was"
+ cont "always getting"
+ cont "into mischief."
+
+ para "I think it needs a"
+ line "good trainer to"
+ cont "set it straight."
+ done
+
+_OfficerJennyText2::
+ text "You have the"
+ line "THUNDERBADGE!?"
+
+ para "You must be a"
+ line "good trainer!"
+
+ para "I just caught a"
+ line "SQUIRTLE that was"
+ cont "always getting"
+ cont "into mischief."
+
+ para "Would you take"
+ line "good care of it?"
+ done
+
+_OfficerJennyText3::
+ text "OK! Please treat"
+ line "SQUIRTLE right!@"
+ text_end
+
+_OfficerJennyText4::
+ text "Oh... What am I"
+ line "to do now?"
+ done
+
+_OfficerJennyText5::
+ text "How is SQUIRTLE"
+ line "doing?"
+ done
+
+_VermilionCityText8::
+ text "VERMILION CITY"
+ line "The Port of"
+ cont "Exquisite Sunsets"
+ done
+
+_VermilionCityText9::
+ text "NOTICE!"
+
+ para "ROUTE 12 may be"
+ line "blocked off by a"
+ cont "sleeping #MON."
+
+ para "Detour through"
+ line "ROCK TUNNEL to"
+ cont "LAVENDER TOWN."
+
+ para "VERMILION POLICE"
+ done
+
+_VermilionCityText12::
+ text "#MON FAN CLUB"
+ line "All #MON fans"
+ cont "welcome!"
+ done
+
+_VermilionCityText13::
+ text "VERMILION CITY"
+ line "#MON GYM"
+ cont "LEADER: LT.SURGE"
+
+ para "The Lightning "
+ line "American!"
+ done
+
+_VermilionCityText14::
+ text "VERMILION HARBOR"
+ done
diff --git a/text/VermilionDock.asm b/text/VermilionDock.asm
new file mode 100644
index 00000000..aaf1ed34
--- /dev/null
+++ b/text/VermilionDock.asm
@@ -0,0 +1,3 @@
+_VermilionDockText1::
+ text_start
+ done
diff --git a/text/VermilionGym.asm b/text/VermilionGym.asm
new file mode 100644
index 00000000..de548eca
--- /dev/null
+++ b/text/VermilionGym.asm
@@ -0,0 +1,167 @@
+_LTSurgePreBattleText::
+ 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!"
+ done
+
+_LTSurgePostBattleAdviceText::
+ text "A little word of"
+ line "advice, kid!"
+
+ para "Electricity is"
+ line "sure powerful!"
+
+ para "But, it's useless"
+ line "against ground-"
+ cont "type #MON!"
+ done
+
+_LTSurgeThunderbadgeInfoText::
+ text "The THUNDERBADGE"
+ line "cranks up your"
+ cont "#MON's SPEED!"
+
+ para "It also lets your"
+ line "#MON FLY any-"
+ cont "time, kid!"
+
+ para "You're special,"
+ line "kid! Take this!"
+ done
+
+_ReceivedTM24Text::
+ text "<PLAYER> received "
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_TM24ExplanationText::
+ text_start
+
+ para "TM24 contains"
+ line "THUNDERBOLT!"
+
+ para "Teach it to an"
+ line "electric #MON!"
+ done
+
+_TM24NoRoomText::
+ text "Yo kid, make room"
+ line "in your pack!"
+ done
+
+_ReceivedThunderbadgeText::
+ text "Whoa!"
+
+ para "You're the real"
+ line "deal, kid!"
+
+ para "Fine then, take"
+ line "the THUNDERBADGE!"
+ prompt
+
+_VermilionGymBattleText1::
+ text "When I was in the"
+ line "Army, LT.SURGE"
+ cont "was my strict CO!"
+ done
+
+_VermilionGymEndBattleText1::
+ text "Stop!"
+ line "You're very good!"
+ prompt
+
+_VermilionGymAfterBattleText1::
+ text "The door won't"
+ line "open?"
+
+ para "LT.SURGE always"
+ line "was cautious!"
+ done
+
+_VermilionGymBattleText2::
+ text "I'm a lightweight,"
+ line "but I'm good with"
+ cont "electricity!"
+ done
+
+_VermilionGymEndBattleText2::
+ text "Fried!"
+ prompt
+
+_VermilionGymAfterBattleText2::
+ text "OK, I'll talk!"
+
+ para "LT.SURGE said he"
+ line "hid door switches"
+ cont "inside something!"
+ done
+
+_VermilionGymBattleText3::
+ text "This is no place"
+ line "for kids!"
+ done
+
+_VermilionGymEndBattleText3::
+ text "Wow!"
+ line "Surprised me!"
+ prompt
+
+_VermilionGymAfterBattleText3::
+ text "LT.SURGE set up"
+ line "double locks!"
+ cont "Here's a hint!"
+
+ para "When you open the"
+ line "1st lock, the 2nd"
+ cont "lock is right"
+ cont "next to it!"
+ done
+
+_VermilionGymFanPreBattleText::
+ text "Yo! Champ in"
+ line "making!"
+
+ para "LT.SURGE has a"
+ line "nickname. People"
+ cont "refer to him as"
+ cont "the Lightning"
+ cont "American!"
+
+ para "He's an expert on"
+ line "electric #MON!"
+
+ para "Birds and water"
+ line "#MON are at"
+ cont "risk! Beware of"
+ cont "paralysis too!"
+
+ para "LT.SURGE is very"
+ line "cautious!"
+
+ para "You'll have to"
+ line "break a code to"
+ cont "get to him!"
+ done
+
+_VermilionGymFanPostBattleText::
+ text "Whew! That match"
+ line "was electric!"
+ done
diff --git a/text/maps/VermilionMart.asm b/text/VermilionMart.asm
index 10743989..10743989 100644
--- a/text/maps/VermilionMart.asm
+++ b/text/VermilionMart.asm
diff --git a/text/VermilionOldRodHouse.asm b/text/VermilionOldRodHouse.asm
new file mode 100644
index 00000000..d9a94cd4
--- /dev/null
+++ b/text/VermilionOldRodHouse.asm
@@ -0,0 +1,55 @@
+_VermilionHouse2Text_560b1::
+ text "I'm the FISHING"
+ line "GURU!"
+
+ para "I simply Looove"
+ line "fishing!"
+
+ para "Do you like to"
+ line "fish?"
+ done
+
+_VermilionHouse2Text_560b6::
+ text "Grand! I like"
+ line "your style!"
+
+ para "Take this and"
+ line "fish, young one!"
+
+ para "<PLAYER> received"
+ line "an @"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_VermilionHouse2Text_560bb::
+ text_start
+
+ para "Fishing is a way"
+ line "of life!"
+
+ para "From the seas to"
+ line "rivers, go out"
+ cont "and land the big"
+ cont "one, young one!"
+ done
+
+_VermilionHouse2Text_560c0::
+ text "Oh... That's so"
+ line "disappointing..."
+ done
+
+_VermilionHouse2Text_560c5::
+ text "Hello there,"
+ line "<PLAYER>!"
+
+ para "How are the fish"
+ line "biting?"
+ done
+
+_VermilionHouse2Text_560ca::
+ text "Oh no!"
+
+ para "You have no room"
+ line "for my gift!"
+ done
diff --git a/text/VermilionPidgeyHouse.asm b/text/VermilionPidgeyHouse.asm
new file mode 100644
index 00000000..858e84f3
--- /dev/null
+++ b/text/VermilionPidgeyHouse.asm
@@ -0,0 +1,22 @@
+_VermilionHouse1Text1::
+ text "I'm getting my"
+ line "PIDGEY to fly a"
+ cont "letter to SAFFRON"
+ cont "in the north!"
+ done
+
+_VermilionHouse1Text2::
+ text "PIDGEY: Kurukkoo!@"
+ text_end
+
+_VermilionHouse1Text3::
+ text "Dear PIPPI, I hope"
+ line "to see you soon."
+
+ para "I heard SAFFRON"
+ line "has problems with"
+ cont "TEAM ROCKET."
+
+ para "VERMILION appears"
+ line "to be safe."
+ done
diff --git a/text/maps/VermilionPokecenter.asm b/text/VermilionPokecenter.asm
index c9e9a581..c9e9a581 100644
--- a/text/maps/VermilionPokecenter.asm
+++ b/text/VermilionPokecenter.asm
diff --git a/text/maps/VictoryRoad1F.asm b/text/VictoryRoad1F.asm
index 1523db88..1523db88 100644
--- a/text/maps/VictoryRoad1F.asm
+++ b/text/VictoryRoad1F.asm
diff --git a/text/VictoryRoad2F.asm b/text/VictoryRoad2F.asm
new file mode 100644
index 00000000..ff72afaa
--- /dev/null
+++ b/text/VictoryRoad2F.asm
@@ -0,0 +1,86 @@
+_MoltresBattleText::
+ text "Gyaoo!@"
+ text_end
+
+_VictoryRoad2BattleText1::
+ text "VICTORY ROAD is"
+ line "the final test"
+ cont "for trainers!"
+ done
+
+_VictoryRoad2EndBattleText1::
+ text "Aiyah!"
+ prompt
+
+_VictoryRoad2AfterBattleText1::
+ text "If you get stuck,"
+ line "try moving some"
+ cont "boulders around!"
+ done
+
+_VictoryRoad2BattleText2::
+ text "Ah, so you wish"
+ line "to challenge the"
+ cont "ELITE FOUR?"
+ done
+
+_VictoryRoad2EndBattleText2::
+ text "You"
+ line "got me!"
+ prompt
+
+_VictoryRoad2AfterBattleText2::
+ text "<RIVAL> also came"
+ line "through here!"
+ done
+
+_VictoryRoad2BattleText3::
+ text "Come on!"
+ line "I'll whip you!"
+ done
+
+_VictoryRoad2EndBattleText3::
+ text "I got"
+ line "whipped!"
+ prompt
+
+_VictoryRoad2AfterBattleText3::
+ text "You earned the"
+ line "right to be on"
+ cont "VICTORY ROAD!"
+ done
+
+_VictoryRoad2BattleText4::
+ text "If you can get"
+ line "through here, you"
+ cont "can go meet the"
+ cont "ELITE FOUR!"
+ done
+
+_VictoryRoad2EndBattleText4::
+ text "No!"
+ line "Unbelievable!"
+ prompt
+
+_VictoryRoad2AfterBattleText4::
+ text "I can beat you"
+ line "when it comes to"
+ cont "knowledge about"
+ cont "#MON!"
+ done
+
+_VictoryRoad2BattleText5::
+ text "Is VICTORY ROAD"
+ line "too tough?"
+ done
+
+_VictoryRoad2EndBattleText5::
+ text "Well"
+ line "done!"
+ prompt
+
+_VictoryRoad2AfterBattleText5::
+ text "Many trainers give"
+ line "up the challenge"
+ cont "here."
+ done
diff --git a/text/maps/VictoryRoad3F.asm b/text/VictoryRoad3F.asm
index 07e0be70..07e0be70 100644
--- a/text/maps/VictoryRoad3F.asm
+++ b/text/VictoryRoad3F.asm
diff --git a/text/ViridianCity.asm b/text/ViridianCity.asm
new file mode 100644
index 00000000..2ffee596
--- /dev/null
+++ b/text/ViridianCity.asm
@@ -0,0 +1,195 @@
+_ViridianCityText_19219::
+ text "First, you need"
+ line "to weaken the"
+ cont "target #MON."
+ done
+
+_ViridianCityText_1920a::
+ text "Ahh, I've had my"
+ line "coffee now and I"
+ cont "feel great!"
+
+ para "Sure, you can go"
+ line "through!"
+
+ para "I'm sorry I was"
+ line "so rude to you!"
+
+ para "I see you're using"
+ line "a #DEX."
+
+ para "I'll show you how"
+ line "to catch #MON"
+ cont "as my apology."
+ done
+
+_OldManTextAfterBattle::
+ text "That didn't work!"
+ line "I must be losing"
+ cont "my touch."
+
+ para "I've run out of"
+ line "# BALLs too."
+
+ para "I have to get some"
+ line "at #MON MART."
+ done
+
+_ViridianCityText1::
+ text "Those # BALLs"
+ line "at your waist!"
+ cont "You have #MON!"
+
+ para "It's great that"
+ line "you can carry and"
+ cont "use #MON any-"
+ cont "time, anywhere!"
+ done
+
+_ViridianCityText_19122::
+ text "This #MON GYM"
+ line "is always closed."
+
+ para "I wonder who the"
+ line "LEADER is?"
+ done
+
+_ViridianCityText_19127::
+ text "VIRIDIAN GYM's"
+ line "LEADER returned!"
+ done
+
+_ViridianCityText_1914d::
+ text "You want to know"
+ line "about the 2 kinds"
+ cont "of caterpillar"
+ cont "#MON?"
+ done
+
+_ViridianCityText_19152::
+ text "Oh, OK then!"
+ done
+
+_ViridianCityText_19157::
+ text "CATERPIE has no"
+ line "poison, but"
+ cont "WEEDLE does."
+
+ para "Watch out for its"
+ line "POISON STING!"
+ done
+
+_ViridianCityText_19175::
+ text "Oh Grandpa! Don't"
+ line "be so mean!"
+ cont "He hasn't had his"
+ cont "coffee yet."
+ done
+
+_ViridianCityText_1917a::
+ text "When I go shop in"
+ line "PEWTER CITY, I"
+ cont "have to take the"
+ cont "winding trail in"
+ cont "VIRIDIAN FOREST."
+ done
+
+_ViridianCityText_19191::
+ text "You can't go"
+ line "through here!"
+
+ para "This is private"
+ line "property!"
+ done
+
+_ViridianCityText_191ca::
+ text "Yawn!"
+ line "I must have dozed"
+ cont "off in the sun."
+
+ para "I had this dream"
+ line "about a DROWZEE"
+ cont "eating my dream."
+ cont "What's this?"
+ cont "Where did this TM"
+ cont "come from?"
+
+ para "This is spooky!"
+ line "Here, you can"
+ cont "have this TM."
+ prompt
+
+_ReceivedTM42Text::
+ text "<PLAYER> received"
+ line "TM42!@"
+ text_end
+
+_TM42Explanation::
+ text "TM42 contains"
+ line "DREAM EATER..."
+ cont "...Snore..."
+ done
+
+_TM42NoRoomText::
+ text "You have too much"
+ line "stuff already."
+ done
+
+_OldManAgainText1::
+ text "Hmm? You want me"
+ line "to show you how"
+ cont "to catch #MON"
+ cont "again?"
+ done
+
+_OldManAgainText2::
+ text "Dandy! Watch what"
+ line "I do closely now!"
+ done
+
+_OldManAgainText3::
+ text "Oh... I'm not good"
+ line "enough for you."
+ done
+
+_ViridianCityText8::
+ text "VIRIDIAN CITY "
+ line "The Eternally"
+ cont "Green Paradise"
+ done
+
+_ViridianCityText9::
+ text "TRAINER TIPS"
+
+ para "Catch #MON"
+ line "and expand your"
+ cont "collection!"
+
+ para "The more you have,"
+ line "the easier it is"
+ cont "to fight!"
+ done
+
+_ViridianCityText10::
+ text "TRAINER TIPS"
+
+ para "The battle moves"
+ line "of #MON are"
+ cont "limited by their"
+ cont "POWER POINTs, PP."
+
+ para "To replenish PP,"
+ line "rest your tired"
+ cont "#MON at a"
+ cont "#MON CENTER!"
+ done
+
+_ViridianCityText13::
+ text "VIRIDIAN CITY"
+ line "#MON GYM"
+ done
+
+_ViridianCityText14::
+ text "The GYM's doors"
+ line "are locked..."
+ done
diff --git a/text/maps/ViridianForest.asm b/text/ViridianForest.asm
index f88a484c..f88a484c 100644
--- a/text/maps/ViridianForest.asm
+++ b/text/ViridianForest.asm
diff --git a/text/maps/ViridianForestNorthGate.asm b/text/ViridianForestNorthGate.asm
index ab6a5a1d..ab6a5a1d 100644
--- a/text/maps/ViridianForestNorthGate.asm
+++ b/text/ViridianForestNorthGate.asm
diff --git a/text/maps/ViridianForestSouthGate.asm b/text/ViridianForestSouthGate.asm
index a5278742..a5278742 100644
--- a/text/maps/ViridianForestSouthGate.asm
+++ b/text/ViridianForestSouthGate.asm
diff --git a/text/ViridianGym.asm b/text/ViridianGym.asm
new file mode 100644
index 00000000..66c889df
--- /dev/null
+++ b/text/ViridianGym.asm
@@ -0,0 +1,240 @@
+_ViridianGymText_74ace::
+ text "Fwahahaha! This is"
+ line "my hideout!"
+
+ para "I planned to"
+ line "resurrect TEAM"
+ cont "ROCKET here!"
+
+ para "But, you have"
+ line "caught me again!"
+ cont "So be it! This"
+ cont "time, I'm not"
+ cont "holding back!"
+
+ para "Once more, you"
+ line "shall face"
+ cont "GIOVANNI, the"
+ cont "greatest trainer!"
+ done
+
+_ViridianGymText_74ad3::
+ text "Ha!"
+ line "That was a truly"
+ cont "intense fight!"
+ cont "You have won!"
+ cont "As proof, here is"
+ cont "the EARTHBADGE!@"
+ text_end
+
+_ViridianGymText_74ad9::
+ text "Having lost, I"
+ line "cannot face my"
+ cont "underlings!"
+ cont "TEAM ROCKET is"
+ cont "finished forever!"
+
+ para "I will dedicate my"
+ line "life to the study"
+ cont "of #MON!"
+
+ para "Let us meet again"
+ line "someday!"
+ cont "Farewell!@"
+ text_end
+
+_ViridianGymText12::
+ text "The EARTHBADGE"
+ line "makes #MON of"
+ cont "any level obey!"
+
+ para "It is evidence of"
+ line "your mastery as a"
+ cont "#MON trainer!"
+
+ para "With it, you can"
+ line "enter the #MON"
+ cont "LEAGUE!"
+
+ para "It is my gift for"
+ line "your #MON"
+ cont "LEAGUE challenge!"
+ done
+
+_ReceivedTM27Text::
+ text "<PLAYER> received"
+ line "TM27!@"
+ text_end
+
+_TM27ExplanationText::
+ text_start
+
+ para "TM27 is FISSURE!"
+ line "It will take out"
+ cont "#MON with just"
+ cont "one hit!"
+
+ para "I made it when I"
+ line "ran the GYM here,"
+ cont "too long ago..."
+ done
+
+_TM27NoRoomText::
+ text "You do not have"
+ line "space for this!"
+ done
+
+_ViridianGymBattleText1::
+ text "Heh! You must be"
+ line "running out of"
+ cont "steam by now!"
+ done
+
+_ViridianGymEndBattleText1::
+ text "I"
+ line "ran out of gas!"
+ prompt
+
+_ViridianGymAfterBattleText1::
+ text "You need power to"
+ line "keep up with our"
+ cont "GYM LEADER!"
+ done
+
+_ViridianGymBattleText2::
+ text "Rrrroar! I'm"
+ line "working myself"
+ cont "into a rage!"
+ done
+
+_ViridianGymEndBattleText2::
+ text "Wargh!"
+ prompt
+
+_ViridianGymAfterBattleText2::
+ text "I'm still not"
+ line "worthy!"
+ done
+
+_ViridianGymBattleText3::
+ text "#MON and I, we"
+ line "make wonderful"
+ cont "music together!"
+ done
+
+_ViridianGymEndBattleText3::
+ text "You are in"
+ line "perfect harmony!"
+ prompt
+
+_ViridianGymAfterBattleText3::
+ text "Do you know the"
+ line "identity of our"
+ cont "GYM LEADER?"
+ done
+
+_ViridianGymBattleText4::
+ text "Karate is the"
+ line "ultimate form of"
+ cont "martial arts!"
+ done
+
+_ViridianGymEndBattleText4::
+ text "Atcho!"
+ prompt
+
+_ViridianGymAfterBattleText4::
+ text "If my #MON"
+ line "were as good at"
+ cont "Karate as I..."
+ done
+
+_ViridianGymBattleText5::
+ text "The truly talented"
+ line "win with style!"
+ done
+
+_ViridianGymEndBattleText5::
+ text "I"
+ line "lost my grip!"
+ prompt
+
+_ViridianGymAfterBattleText5::
+ text "The LEADER will"
+ line "scold me!"
+ done
+
+_ViridianGymBattleText6::
+ text "I'm the KARATE"
+ line "KING! Your fate"
+ cont "rests with me!"
+ done
+
+_ViridianGymEndBattleText6::
+ text "Ayah!"
+ prompt
+
+_ViridianGymAfterBattleText6::
+ text "#MON LEAGUE?"
+ line "You? Don't get"
+ cont "cocky!"
+ done
+
+_ViridianGymBattleText7::
+ text "Your #MON will"
+ line "cower at the"
+ cont "crack of my whip!"
+ done
+
+_ViridianGymEndBattleText7::
+ text "Yowch!"
+ line "Whiplash!"
+ prompt
+
+_ViridianGymAfterBattleText7::
+ text "Wait! I was just"
+ line "careless!"
+ done
+
+_ViridianGymBattleText8::
+ text "VIRIDIAN GYM was"
+ line "closed for a long"
+ cont "time, but now our"
+ cont "LEADER is back!"
+ done
+
+_ViridianGymEndBattleText8::
+ text "I"
+ line "was beaten?"
+ prompt
+
+_ViridianGymAfterBattleText8::
+ text "You can go on to"
+ line "#MON LEAGUE"
+ cont "only by defeating"
+ cont "our GYM LEADER!"
+ done
+
+_ViridianGymText_74bd4::
+ text "Yo! Champ in"
+ line "making!"
+
+ para "Even I don't know"
+ line "VIRIDIAN LEADER's"
+ cont "identity!"
+
+ para "This will be the"
+ line "toughest of all"
+ cont "the GYM LEADERs!"
+
+ para "I heard that the"
+ line "trainers here"
+ cont "like ground-type"
+ cont "#MON!"
+ done
+
+_ViridianGymText_74bd9::
+ text "Blow me away!"
+ line "GIOVANNI was the"
+ cont "GYM LEADER here?"
+ done
diff --git a/text/ViridianMart.asm b/text/ViridianMart.asm
new file mode 100644
index 00000000..0152ea4c
--- /dev/null
+++ b/text/ViridianMart.asm
@@ -0,0 +1,33 @@
+_ViridianMartText1::
+ text "Okay! Say hi to"
+ line "PROF.OAK for me!"
+ done
+
+_ViridianMartText4::
+ text "Hey! You came from"
+ line "PALLET TOWN?"
+ done
+
+ViridianMartParcelQuestText::
+ text "You know PROF."
+ line "OAK, right?"
+
+ para "His order came in."
+ line "Will you take it"
+ cont "to him?"
+
+ para "<PLAYER> got"
+ line "OAK's PARCEL!@"
+ text_end
+
+_ViridianMartText2::
+ text "This shop sells a"
+ line "lot of PARLYZ"
+ cont "HEALs."
+ done
+
+_ViridianMartText3::
+ text "The shop finally"
+ line "has some POTIONs"
+ cont "in stock."
+ done
diff --git a/text/maps/ViridianNicknameHouse.asm b/text/ViridianNicknameHouse.asm
index 757f597a..757f597a 100644
--- a/text/maps/ViridianNicknameHouse.asm
+++ b/text/ViridianNicknameHouse.asm
diff --git a/text/maps/ViridianPokecenter.asm b/text/ViridianPokecenter.asm
index 4ac18bf6..4ac18bf6 100755
--- a/text/maps/ViridianPokecenter.asm
+++ b/text/ViridianPokecenter.asm
diff --git a/text/maps/ViridianSchoolHouse.asm b/text/ViridianSchoolHouse.asm
index 3c5f6379..3c5f6379 100644
--- a/text/maps/ViridianSchoolHouse.asm
+++ b/text/ViridianSchoolHouse.asm
diff --git a/text/WardensHouse.asm b/text/WardensHouse.asm
new file mode 100644
index 00000000..47612904
--- /dev/null
+++ b/text/WardensHouse.asm
@@ -0,0 +1,86 @@
+_WardenGibberishText1::
+ text "WARDEN: Hif fuff"
+ line "hefifoo!"
+
+ para "Ha lof ha feef ee"
+ line "hafahi ho. Heff"
+ cont "hee fwee!"
+ done
+
+_WardenGibberishText2::
+ text "Ah howhee ho hoo!"
+ line "Eef ee hafahi ho!"
+ done
+
+_WardenGibberishText3::
+ text "Ha? He ohay heh"
+ line "ha hoo ee haheh!"
+ done
+
+_WardenTeethText1::
+ text "<PLAYER> gave the"
+ line "GOLD TEETH to the"
+ cont "WARDEN!@"
+ text_end
+
+_WardenTeethText2::
+ text_start
+
+ para "The WARDEN popped"
+ line "in his teeth!"
+ prompt
+
+_WardenThankYouText::
+ text "WARDEN: Thanks,"
+ line "kid! No one could"
+ cont "understand a word"
+ cont "that I said."
+
+ para "I couldn't work"
+ line "that way."
+ cont "Let me give you"
+ cont "something for"
+ cont "your trouble."
+ prompt
+
+_ReceivedHM04Text::
+ text "<PLAYER> received"
+ line "@"
+ text_ram wcf4b
+ text "!@"
+ text_end
+
+_HM04ExplanationText::
+ text "WARDEN: HM04"
+ line "teaches STRENGTH!"
+
+ para "It lets #MON"
+ line "move boulders"
+ cont "when you're out-"
+ cont "side of battle."
+
+ para "Oh yes, did you"
+ line "find SECRET HOUSE"
+ cont "in SAFARI ZONE?"
+
+ para "If you do, you"
+ line "win an HM!"
+
+ para "I hear it's the"
+ line "rare SURF HM."
+ done
+
+_HM04NoRoomText::
+ text "Your pack is"
+ line "stuffed full!"
+ done
+
+_FuchsiaHouse2Text_75176::
+ text "#MON photos"
+ line "and fossils."
+ done
+
+_FuchsiaHouse2Text_7517b::
+ text "Old #MON"
+ line "merchandise."
+ done
diff --git a/text/credits_text.asm b/text/credits_text.asm
deleted file mode 100755
index 0010b93a..00000000
--- a/text/credits_text.asm
+++ /dev/null
@@ -1,264 +0,0 @@
-CreditsTextPointers:
- dw CreditsText_Version
- dw CreditsText_Tajiri
- dw CreditsText_Oota
- dw CreditsText_Morimoto
- dw CreditsText_Watanabe
- dw CreditsText_Masuda
- dw CreditsText_Nishino
- dw CreditsText_Sugimori
- dw CreditsText_Nishida
- dw CreditsText_Miyamoto
- dw CreditsText_Kawaguchi
- dw CreditsText_Ishihara
- dw CreditsText_Yamauchi
- dw CreditsText_Zinnai
- dw CreditsText_Hishida
- dw CreditsText_Sakai
- dw CreditsText_Yamaguchi
- dw CreditsText_Yamamoto
- dw CreditsText_Taniguchi
- dw CreditsText_Nonomura
- dw CreditsText_Fuziwara
- dw CreditsText_Matsusima
- dw CreditsText_Tomisawa
- dw CreditsText_Kawamoto
- dw CreditsText_Kakei
- dw CreditsText_Tsuchiya
- dw CreditsText_Nakamura
- dw CreditsText_Yuda
- dw CreditsText_Pokemon
- dw CreditsText_Director
- dw CreditsText_Programmers
- dw CreditsText_CharacterDesign
- dw CreditsText_Music
- dw CreditsText_SoundEffects
- dw CreditsText_GameDesign
- dw CreditsText_MonsterDesign
- dw CreditsText_GameScenario
- dw CreditsText_ParametricDesign
- dw CreditsText_MapDesign
- dw CreditsText_Testing
- dw CreditsText_SpecialThanks
- dw CreditsText_Producer
- dw CreditsText_ExecutiveProducer
- dw CreditsText_Tamada
- dw CreditsText_Oota2
- dw CreditsText_Yoshikawa
- dw CreditsText_Oota23
- dw CreditsText_Yoshida
- dw CreditsText_Matsumita
- dw CreditsText_Seya
- dw CreditsText_Sekine
- dw CreditsText_Shimamura
- dw CreditsText_Shimoyamada
- dw CreditsText_SuperMarioClub
- dw CreditsText_Izushi
- dw CreditsText_Nomura
- dw CreditsText_Harada
- dw CreditsText_Yamagami
- dw CreditsText_Nishimura
- dw CreditsText_Saeki
- dw CreditsText_Fuzii
- dw CreditsText_Shogakukan
- dw CreditsText_Ootani
- dw CreditsText_PikachuVoice
- dw CreditsText_USStaff
- dw CreditsText_USCoord
- dw CreditsText_Tilden
- dw CreditsText_Kawakami
- dw CreditsText_Nakamura2
- dw CreditsText_Shoemake
- dw CreditsText_Osborne
- dw CreditsText_Translation
- dw CreditsText_Ogasawara
- dw CreditsText_Iwata
- dw CreditsText_Izushi2
- dw CreditsText_Harada2
- dw CreditsText_Murakawa
- dw CreditsText_Fukui
- dw CreditsText_SuperMarioClub2
- dw CreditsText_Paad
- dw CreditsText_Producers
- dw CreditsText_Hosokawa
- dw CreditsText_Okubo
- dw CreditsText_Nakamichi
- dw CreditsText_Yoshimura
- dw CreditsText_Yamazaki
-
-CreditsText_Version:
- db -6, "YELLOW VERSION"
- next " STAFF@"
-CreditsText_Tajiri:
- db -6, "SATOSHI TAJIRI@"
-CreditsText_Oota:
- db -6, "TAKENORI OOTA@"
-CreditsText_Morimoto:
- db -7, "SHIGEKI MORIMOTO@"
-CreditsText_Watanabe:
- db -7, "TETSUYA WATANABE@"
-CreditsText_Masuda:
- db -6, "JUNICHI MASUDA@"
-CreditsText_Nishino:
- db -5, "KOHJI NISHINO@"
-CreditsText_Sugimori:
- db -5, "KEN SUGIMORI@"
-CreditsText_Nishida:
- db -6, "ATSUKO NISHIDA@"
-CreditsText_Miyamoto:
- db -7, "SHIGERU MIYAMOTO@"
-CreditsText_Kawaguchi:
- db -8, "TAKASHI KAWAGUCHI@"
-CreditsText_Ishihara:
- db -8, "TSUNEKAZU ISHIHARA@"
-CreditsText_Yamauchi:
- db -7, "HIROSHI YAMAUCHI@"
-CreditsText_Zinnai:
- db -7, "HIROYUKI ZINNAI@"
-CreditsText_Hishida:
- db -7, "TATSUYA HISHIDA@"
-CreditsText_Sakai:
- db -6, "YASUHIRO SAKAI@"
-CreditsText_Yamaguchi:
- db -7, "WATARU YAMAGUCHI@"
-CreditsText_Yamamoto:
- db -8, "KAZUYUKI YAMAMOTO@"
-CreditsText_Taniguchi:
- db -8, "RYOHSUKE TANIGUCHI@"
-CreditsText_Nonomura:
- db -8, "FUMIHIRO NONOMURA@"
-CreditsText_Fuziwara:
- db -7, "MOTOFUMI FUZIWARA@"
-CreditsText_Matsusima:
- db -7, "KENJI MATSUSIMA@"
-CreditsText_Tomisawa:
- db -7, "AKIHITO TOMISAWA@"
-CreditsText_Kawamoto:
- db -7, "HIROSHI KAWAMOTO@"
-CreditsText_Kakei:
- db -6, "AKIYOSHI KAKEI@"
-CreditsText_Tsuchiya:
- db -7, "KAZUKI TSUCHIYA@"
-CreditsText_Nakamura:
- db -6, "TAKEO NAKAMURA@"
-CreditsText_Yuda:
- db -6, "MASAMITSU YUDA@"
-CreditsText_Pokemon:
- db -3, "#MON@"
-CreditsText_Director:
- db -3, "DIRECTOR@"
-CreditsText_Programmers:
- db -5, "PROGRAMMERS@"
-CreditsText_CharacterDesign:
- db -7, "CHARACTER DESIGN@"
-CreditsText_Music:
- db -2, "MUSIC@"
-CreditsText_SoundEffects:
- db -6, "SOUND EFFECTS@"
-CreditsText_GameDesign:
- db -5, "GAME DESIGN@"
-CreditsText_MonsterDesign:
- db -6, "MONSTER DESIGN@"
-CreditsText_GameScenario:
- db -6, "GAME SCENARIO@"
-CreditsText_ParametricDesign:
- db -7, "PARAMETRIC DESIGN@"
-CreditsText_MapDesign:
- db -4, "MAP DESIGN@"
-CreditsText_Testing:
- db -6, "PRODUCT TESTING@"
-CreditsText_SpecialThanks:
- db -6, "SPECIAL THANKS@"
-CreditsText_Producers:
- db -4, "PRODUCERS@"
-CreditsText_Producer:
- db -3, "PRODUCER@"
-CreditsText_ExecutiveProducer:
- db -8, "EXECUTIVE PRODUCER@"
-CreditsText_Tamada:
- db -6, "SOUSUKE TAMADA@"
-CreditsText_Oota2:
- db -5, "SATOSHI OOTA@"
-CreditsText_Yoshikawa:
- db -6, "RENA YOSHIKAWA@"
-CreditsText_Oota23:
- db -6, "TOMOMICHI OOTA@"
-CreditsText_Matsumita:
- db -8, "TOSHINOBU MATSUMIYA@"
-CreditsText_Seya:
- db -5, "NOBUHIRO SEYA@"
-CreditsText_Yoshida:
- db -7, "HIRONOBU YOSHIDA@"
-CreditsText_Sekine:
- db -6, "KAZUHITO SEKINE@"
-CreditsText_Shimamura:
- db -7, "KAZUSHI SHIMAMURA@"
-CreditsText_Shimoyamada:
- db -9, "TERUYUKI SHIMOYAMADA@"
-CreditsText_SuperMarioClub:
- db -9, "NCL SUPER MARIO CLUB@"
-CreditsText_Izushi:
- db -7, "TAKEHIRO IZUSHI@"
-CreditsText_Nomura:
- db -5, "FUZIKO NOMURA@"
-CreditsText_Harada:
- db -6, "TAKAHIRO HARADA@"
-CreditsText_Yamagami:
- db -7, "HITOSHI YAMAGAMI@"
-CreditsText_Nishimura:
- db -8, "KENTAROU NISHIMURA@"
-CreditsText_Saeki:
- db -5, "NAOKO SAEKI@"
-CreditsText_Fuzii:
- db -5, "TAKAYA FUZII@"
-CreditsText_Shogakukan:
- db -4, "SHOGAKUKAN"
- next "PRODUCTION@"
-CreditsText_Ootani:
- db -5, "IKUE OOTANI@"
-CreditsText_PikachuVoice:
- db -6, "PIKACHU VOICE@"
-
- db -3, "××××××××@"
-CreditsText_USStaff:
- db -7, "US VERSION STAFF@"
-CreditsText_USCoord:
- db -7, "US COORDINATION@"
-CreditsText_Tilden:
- db -5, "GAIL TILDEN@"
-CreditsText_Kawakami:
- db -6, "NAOKO KAWAKAMI@"
-CreditsText_Nakamura2:
- db -6, "HIRO NAKAMURA@"
-CreditsText_Shoemake:
- db -6, "RANDY SHOEMAKE@"
-CreditsText_Osborne:
- db -5, "SARA OSBORNE@"
-CreditsText_Translation:
- db -7, "TEXT TRANSLATION@"
-CreditsText_Ogasawara:
- db -6, "NOB OGASAWARA@"
-CreditsText_Iwata:
- db -5, "SATORU IWATA@"
-CreditsText_Izushi2:
- db -7, "TAKEHIRO IZUSHI@"
-CreditsText_Harada2:
- db -7, "TAKAHIRO HARADA@"
-CreditsText_Murakawa:
- db -7, "TERUKI MURAKAWA@"
-CreditsText_Fukui:
- db -5, "KOHTA FUKUI@"
-CreditsText_SuperMarioClub2:
- db -9, "NCL SUPER MARIO CLUB@"
-CreditsText_Paad:
- db -5, "PAAD TESTING@"
-CreditsText_Hosokawa:
- db -8, "TAKEHIKO HOSOKAWA@"
-CreditsText_Okubo:
- db -5, "KENJI OKUBO@"
-CreditsText_Nakamichi:
- db -7, "KIMIKO NAKAMICHI@"
-CreditsText_Yoshimura:
- db -6, "KAMON YOSHIMURA@"
-CreditsText_Yamazaki:
- db -6, "SAKAE YAMAZAKI@"
diff --git a/text/item_names.asm b/text/item_names.asm
deleted file mode 100755
index e436d74d..00000000
--- a/text/item_names.asm
+++ /dev/null
@@ -1,98 +0,0 @@
-ItemNames:
- db "MASTER BALL@"
- db "ULTRA BALL@"
- db "GREAT BALL@"
- db "POKé BALL@"
- db "TOWN MAP@"
- db "BICYCLE@"
- db "?????@"
- db "SAFARI BALL@"
- db "POKéDEX@"
- db "MOON STONE@"
- db "ANTIDOTE@"
- db "BURN HEAL@"
- db "ICE HEAL@"
- db "AWAKENING@"
- db "PARLYZ HEAL@"
- db "FULL RESTORE@"
- db "MAX POTION@"
- db "HYPER POTION@"
- db "SUPER POTION@"
- db "POTION@"
- db "BOULDERBADGE@"
- db "CASCADEBADGE@"
- db "THUNDERBADGE@"
- db "RAINBOWBADGE@"
- db "SOULBADGE@"
- db "MARSHBADGE@"
- db "VOLCANOBADGE@"
- db "EARTHBADGE@"
- db "ESCAPE ROPE@"
- db "REPEL@"
- db "OLD AMBER@"
- db "FIRE STONE@"
- db "THUNDERSTONE@"
- db "WATER STONE@"
- db "HP UP@"
- db "PROTEIN@"
- db "IRON@"
- db "CARBOS@"
- db "CALCIUM@"
- db "RARE CANDY@"
- db "DOME FOSSIL@"
- db "HELIX FOSSIL@"
- db "SECRET KEY@"
- db "?????@"
- db "BIKE VOUCHER@"
- db "X ACCURACY@"
- db "LEAF STONE@"
- db "CARD KEY@"
- db "NUGGET@"
- db "PP UP@"
- db "POKé DOLL@"
- db "FULL HEAL@"
- db "REVIVE@"
- db "MAX REVIVE@"
- db "GUARD SPEC.@"
- db "SUPER REPEL@"
- db "MAX REPEL@"
- db "DIRE HIT@"
- db "COIN@"
- db "FRESH WATER@"
- db "SODA POP@"
- db "LEMONADE@"
- db "S.S.TICKET@"
- db "GOLD TEETH@"
- db "X ATTACK@"
- db "X DEFEND@"
- db "X SPEED@"
- db "X SPECIAL@"
- db "COIN CASE@"
- db "OAK's PARCEL@"
- db "ITEMFINDER@"
- db "SILPH SCOPE@"
- db "POKé FLUTE@"
- db "LIFT KEY@"
- db "EXP.ALL@"
- db "OLD ROD@"
- db "GOOD ROD@"
- db "SUPER ROD@"
- db "PP UP@"
- db "ETHER@"
- db "MAX ETHER@"
- db "ELIXER@"
- db "MAX ELIXER@"
- db "B2F@"
- db "B1F@"
- db "1F@"
- db "2F@"
- db "3F@"
- db "4F@"
- db "5F@"
- db "6F@"
- db "7F@"
- db "8F@"
- db "9F@"
- db "10F@"
- db "11F@"
- db "B4F@"
diff --git a/text/map_names.asm b/text/map_names.asm
deleted file mode 100755
index c2642942..00000000
--- a/text/map_names.asm
+++ /dev/null
@@ -1,107 +0,0 @@
-MapNames:
-PalletTownName:
- db "PALLET TOWN@"
-ViridianCityName:
- db "VIRIDIAN CITY@"
-PewterCityName:
- db "PEWTER CITY@"
-CeruleanCityName:
- db "CERULEAN CITY@"
-LavenderTownName:
- db "LAVENDER TOWN@"
-VermilionCityName:
- db "VERMILION CITY@"
-CeladonCityName:
- db "CELADON CITY@"
-FuchsiaCityName:
- db "FUCHSIA CITY@"
-CinnabarIslandName:
- db "CINNABAR ISLAND@"
-IndigoPlateauName:
- db "INDIGO PLATEAU@"
-SaffronCityName:
- db "SAFFRON CITY@"
-Route1Name:
- db "ROUTE 1@"
-Route2Name:
- db "ROUTE 2@"
-Route3Name:
- db "ROUTE 3@"
-Route4Name:
- db "ROUTE 4@"
-Route5Name:
- db "ROUTE 5@"
-Route6Name:
- db "ROUTE 6@"
-Route7Name:
- db "ROUTE 7@"
-Route8Name:
- db "ROUTE 8@"
-Route9Name:
- db "ROUTE 9@"
-Route10Name:
- db "ROUTE 10@"
-Route11Name:
- db "ROUTE 11@"
-Route12Name:
- db "ROUTE 12@"
-Route13Name:
- db "ROUTE 13@"
-Route14Name:
- db "ROUTE 14@"
-Route15Name:
- db "ROUTE 15@"
-Route16Name:
- db "ROUTE 16@"
-Route17Name:
- db "ROUTE 17@"
-Route18Name:
- db "ROUTE 18@"
-Route19Name:
- db "SEA ROUTE 19@"
-Route20Name:
- db "SEA ROUTE 20@"
-Route21Name:
- db "SEA ROUTE 21@"
-Route22Name:
- db "ROUTE 22@"
-Route23Name:
- db "ROUTE 23@"
-Route24Name:
- db "ROUTE 24@"
-Route25Name:
- db "ROUTE 25@"
-ViridianForestName:
- db "VIRIDIAN FOREST@"
-MountMoonName:
- db "MT.MOON@"
-RockTunnelName:
- db "ROCK TUNNEL@"
-SeaCottageName:
- db "SEA COTTAGE@"
-SSAnneName:
- db "S.S.ANNE@"
-PokemonLeagueName:
- db "#MON LEAGUE@"
-UndergroundPathName:
- db "UNDERGROUND PATH@"
-PokemonTowerName:
- db "#MON TOWER@"
-SeafoamIslandsName:
- db "SEAFOAM ISLANDS@"
-VictoryRoadName:
- db "VICTORY ROAD@"
-DiglettsCaveName:
- db "DIGLETT's CAVE@"
-RocketHQName:
- db "ROCKET HQ@"
-SilphCoName:
- db "SILPH CO.@"
-PokemonMansionName:
- db "<pkmn> MANSION@"
-SafariZoneName:
- db "SAFARI ZONE@"
-CeruleanCaveName:
- db "CERULEAN CAVE@"
-PowerPlantName:
- db "POWER PLANT@"
diff --git a/text/maps/BeachHouse.asm b/text/maps/BeachHouse.asm
deleted file mode 100644
index bc50b837..00000000
--- a/text/maps/BeachHouse.asm
+++ /dev/null
@@ -1,103 +0,0 @@
-_SurfinDudeText1::
- text "Whoa!"
-
- para "Your PIKACHU knows"
- line "how to SURF! So,"
- cont "I'm not alone..."
-
- para "Great! You earned"
- line "the right to SURF"
- cont "with the DUDE!"
-
- para "Give it a go?"
- done
-
-_SurfinDudeText2::
- text "Come SURF anytime,"
- line "my friend!"
- done
-
-_SurfinDudeText3::
- text "Wanna go SURF?"
- done
-
-_SurfinDudeText4::
- text "Dogs and burgers"
- line "on special today!"
- done
-
-_BeachHousePikachuText::
- text "PIKACHU: Pikaa"
- done
-
-_BeachHouseSign1Text1::
- text "SURFIN' DUDE's"
- line "scribbles..."
-
- para "When I shoot the"
- line "tube, the tunes"
- cont "hit the groove!"
- done
-
-_BeachHouseSign1Text2::
- text "30 years of waves!"
- line "SURFIN' DUDE"
- done
-
-_BeachHouseSign2Text1::
- text "SURFING TIP 1!"
-
- para "After flips, line"
- line "the board up with"
- cont "a wave for a cool"
- cont "effect!"
- done
-
-_BeachHouseSign2Text2::
- text "SUMMER BEACH HOUSE"
- line "#MON welcome!"
- done
-
-_BeachHouseSign3Text1::
- text "SURFING TIP 2!"
-
- para "Pulling flips in"
- line "a jump is totally"
- cont "rad!"
- done
-
-_BeachHouseSign3Text2::
- text "The sea unites"
- line "all in surfdom!"
- done
-
-_BeachHousePrinterText1::
- text "It's some sort of"
- line "a machine...@@"
-
-_BeachHousePrinterText2::
- text "SUMMER BEACH HOUSE"
- line "PRINTER, it says.@@"
-
-_BeachHousePrinterText3::
- text "The Hi-Score is"
- line "shown."
-
- para "PRINT it out?"
- done
-
-_BeachHousePrinterText4::
- text "SUMMER BEACH HOUSE"
- line "PRINTER, it says."
-
- para "The Hi-Score is"
- line "shown."
-
- para "PRINT it out?"
- done
-
-_BeachHousePrinterText5::
- text "PRINT completed.@@"
-
-_BeachHousePrinterText6::
- text "PRINT error!@@"
diff --git a/text/maps/BikeShop.asm b/text/maps/BikeShop.asm
deleted file mode 100644
index 1717c552..00000000
--- a/text/maps/BikeShop.asm
+++ /dev/null
@@ -1,70 +0,0 @@
-_BikeShopText_1d810::
- text "Hi! Welcome to"
- line "our BIKE SHOP."
-
- para "Have we got just"
- line "the BIKE for you!"
- prompt
-
-_BikeShopText_1d815::
- text "It's a cool BIKE!"
- line "Do you want it?"
- done
-
-_BikeShopCantAffordText::
- text "Sorry! You can't"
- line "afford it!"
- prompt
-
-_BikeShopText_1d81f::
- text "Oh, that's..."
-
- para "A BIKE VOUCHER!"
-
- para "OK! Here you go!"
- prompt
-
-_BikeShopText_1d824::
- text "<PLAYER> exchanged"
- line "the BIKE VOUCHER"
- cont "for a BICYCLE.@@"
-
-_BikeShopComeAgainText::
- text "Come back again"
- line "sometime!"
- done
-
-_BikeShopText_1d82f::
- text "How do you like"
- line "your new BICYCLE?"
-
- para "You can take it"
- line "on CYCLING ROAD"
- cont "and in caves!"
- done
-
-_BikeShopText_1d834::
- text "You better make"
- line "room for this!"
- done
-
-_BikeShopText_1d843::
- text "A plain city BIKE"
- line "is good enough"
- cont "for me!"
-
- para "You can't put a"
- line "shopping basket"
- cont "on an MTB!"
- done
-
-_BikeShopText_1d85c::
- text "These BIKEs are"
- line "cool, but they're"
- cont "way expensive!"
- done
-
-_BikeShopText_1d861::
- text "Wow. Your BIKE is"
- line "really cool!"
- done
diff --git a/text/maps/BillsHouse.asm b/text/maps/BillsHouse.asm
deleted file mode 100644
index 858dfe80..00000000
--- a/text/maps/BillsHouse.asm
+++ /dev/null
@@ -1,92 +0,0 @@
-_BillsHouseDontLeaveText::
- text "Whoa, don't go"
- line "anywhere, wait!"
- done
-
-_BillsHouseText_1e865::
- text "Hiya! I'm a"
- line "#MON..."
- cont "...No I'm not!"
-
- para "Call me BILL!"
- line "I'm a true blue"
- cont "#MANIAC! Hey!"
- cont "What's with that"
- cont "skeptical look?"
-
- para "I'm not joshing"
- line "you, I screwed up"
- cont "an experiment and"
- cont "got combined with"
- cont "a #MON!"
-
- para "So, how about it?"
- line "Help me out here!"
- done
-
-_BillsHouseText_1e86a::
- text "When I'm in the"
- line "TELEPORTER, go to"
- cont "my PC and run the"
- cont "Cell Separation"
- cont "System!"
- done
-
-_BillsHouseText_1e86f::
- text "No!? Come on, you"
- line "gotta help a guy"
- cont "in deep trouble!"
-
- para "What do you say,"
- line "chief? Please?"
- cont "OK? All right!"
- prompt
-
-_BillThankYouText::
- text "BILL: Yeehah!"
- line "Thanks, bud! I"
- cont "owe you one!"
-
- para "So, did you come"
- line "to see my #MON"
- cont "collection?"
- cont "You didn't?"
- cont "That's a bummer."
-
- para "I've got to thank"
- line "you... Oh here,"
- cont "maybe this'll do."
- prompt
-
-_SSTicketReceivedText::
- text "<PLAYER> received"
- line "an @"
- TX_RAM wcf4b
- text "!@@"
-
-_SSTicketNoRoomText::
- text "You've got too"
- line "much stuff, bud!"
- done
-
-_BillsHouseText_1e8cb::
- text "That cruise ship,"
- line "S.S.ANNE, is in"
- cont "VERMILION CITY."
- cont "Its passengers"
- cont "are all trainers!"
-
- para "They invited me"
- line "to their party,"
- cont "but I can't stand"
- cont "fancy do's. Why"
- cont "don't you go"
- cont "instead of me?"
- done
-
-_BillsHouseText_1e8da::
- text "BILL: Look, bud,"
- line "just check out"
- cont "some of my rare"
- cont "#MON on my PC!"
- done
diff --git a/text/maps/BluesHouse.asm b/text/maps/BluesHouse.asm
deleted file mode 100644
index 8f1d8ecf..00000000
--- a/text/maps/BluesHouse.asm
+++ /dev/null
@@ -1,41 +0,0 @@
-_DaisyInitialText::
- text "Hi <PLAYER>!"
- line "<RIVAL> is out at"
- cont "Grandpa's lab."
- done
-
-_DaisyOfferMapText::
- text "Grandpa asked you"
- line "to run an errand?"
- cont "Here, this will"
- cont "help you!"
- prompt
-
-_GotMapText::
- text "<PLAYER> got a"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_DaisyBagFullText::
- text "You have too much"
- line "stuff with you."
- done
-
-_DaisyUseMapText::
- text "Use the TOWN MAP"
- line "to find out where"
- cont "you are."
- done
-
-_BluesHouseText2::
- text "Spending time"
- line "with your #MON"
- cont "makes them more"
- cont "friendly to you."
- done
-
-_BluesHouseText3::
- text "It's a big map!"
- line "This is useful!"
- done
diff --git a/text/maps/CeladonCity.asm b/text/maps/CeladonCity.asm
deleted file mode 100644
index 1bf76470..00000000
--- a/text/maps/CeladonCity.asm
+++ /dev/null
@@ -1,152 +0,0 @@
-_CeladonCityText1::
- text "I got my KOFFING"
- line "from my friend!"
-
- para "We get along now,"
- line "because I was"
- cont "very nice to it!"
- done
-
-_CeladonCityText2::
- text "Heheh! This GYM"
- line "is great! It's"
- cont "full of women!"
- done
-
-_CeladonCityText3::
- text "The GAME CORNER"
- line "is bad for our"
- cont "city's image!"
- done
-
-_CeladonCityText4::
- text "Moan! I blew it"
- line "all at the slots!"
-
- para "I knew I should"
- line "have cashed in my"
- cont "coins for prizes!"
- done
-
-_TM41PreText::
- text "Hello, there!"
-
- para "I've seen you,"
- line "but I never had a"
- cont "chance to talk!"
-
- para "Here's a gift for"
- line "dropping by!"
- prompt
-
-_ReceivedTM41Text::
- text "<PLAYER> received"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_TM41ExplanationText::
- text "TM41 teaches"
- line "SOFTBOILED!"
-
- para "Only one #MON"
- line "can use it!"
-
- para "That #MON is"
- line "CHANSEY!"
- done
-
-_TM41NoRoomText::
- text "Oh, your pack is"
- line "full of items!"
- done
-
-_CeladonCityText6::
- text "This is my trusted"
- line "pal, POLIWRATH!"
-
- para "It evolved from"
- line "POLIWHIRL when I"
- cont "used WATER STONE!"
- done
-
-_CeladonCityText7::
- text "POLIWRATH: Ribi"
- line "ribit!@@"
-
-_CeladonCityText8::
- text "What are you"
- line "staring at?"
- done
-
-_CeladonCityText9::
- text "Keep out of TEAM"
- line "ROCKET's way!"
- done
-
-_CeladonCityText11::
- text "CELADON CITY"
- line "The City of"
- cont "Rainbow Dreams"
- done
-
-_CeladonCityText13::
- text "CELADON CITY"
- line "#MON GYM"
- cont "LEADER: ERIKA"
-
- para "The Nature-Loving"
- line "Princess!"
- done
-
-_CeladonCityText14::
- text "CELADON MANSION"
- done
-
-_CeladonCityText15::
- text "Find what you"
- line "need at CELADON"
- cont "DEPT. STORE!"
- done
-
-_CeladonCityText16::
- text "TRAINER TIPS"
-
- para "GUARD SPEC."
- line "protects #MON"
- cont "against SPECIAL"
- cont "attacks such as"
- cont "fire and water!"
-
- para "Get your items at"
- line "CELADON DEPT."
- cont "STORE!"
- done
-
-_CeladonCityText17::
- text "Coins exchanged"
- line "for prizes!"
- cont "PRIZE EXCHANGE"
- done
-
-_CeladonCityText18::
- text "ROCKET GAME CORNER"
- line "The playground"
- cont "for grownups!"
- done
-
-_CeladonCityText10::
- text "TRAINER TIPS"
-
- para "X ACCURACY boosts"
- line "the accuracy of"
- cont "techniques!"
-
- para "DIRE HIT jacks up"
- line "the likelihood of"
- cont "critical hits!"
-
- para "Get your items at"
- line "CELADON DEPT."
- cont "STORE!"
- done
diff --git a/text/maps/CeladonDiner.asm b/text/maps/CeladonDiner.asm
deleted file mode 100644
index dc5e9350..00000000
--- a/text/maps/CeladonDiner.asm
+++ /dev/null
@@ -1,59 +0,0 @@
-_CeladonDinerText1::
- text "Hi!"
-
- para "We're taking a"
- line "break now."
- done
-
-_CeladonDinerText2::
- text "My #MON are"
- line "weak, so I often"
- cont "have to go to the"
- cont "DRUG STORE."
- done
-
-_CeladonDinerText3::
- text "Psst! There's a"
- line "basement under"
- cont "the GAME CORNER."
- done
-
-_CeladonDinerText4::
- text "Munch..."
-
- para "The man at that"
- line "table lost it all"
- cont "at the slots."
- done
-
-_CeladonDinerText_491a7::
- text "Go ahead! Laugh!"
-
- para "I'm flat out"
- line "busted!"
-
- para "No more slots for"
- line "me! I'm going"
- cont "straight!"
-
- para "Here! I won't be"
- line "needing this any-"
- cont "more!"
- prompt
-
-_ReceivedCoinCaseText::
- text "<PLAYER> received"
- line "a @"
- TX_RAM wcf4b
- text "!@@"
-
-_CoinCaseNoRoomText::
- text "Make room for"
- line "this!"
- done
-
-_CeladonDinerText_491b7::
- text "I always thought"
- line "I was going to"
- cont "win it back..."
- done
diff --git a/text/maps/CeladonGym.asm b/text/maps/CeladonGym.asm
deleted file mode 100644
index d6586035..00000000
--- a/text/maps/CeladonGym.asm
+++ /dev/null
@@ -1,219 +0,0 @@
-_CeladonGymText_48a5e::
- text "Hello. Lovely"
- line "weather isn't it?"
- cont "It's so pleasant."
-
- para "...Oh dear..."
- line "I must have dozed"
- cont "off. Welcome."
-
- para "My name is ERIKA."
- line "I am the LEADER"
- cont "of CELADON GYM."
-
- para "I teach the art of"
- line "flower arranging."
- cont "My #MON are of"
- cont "the grass-type."
-
- para "Oh, I'm sorry, I"
- line "had no idea that"
- cont "you wished to"
- cont "challenge me."
-
- para "Very well, but I"
- line "shall not lose."
- done
-
-_CeladonGymText_48a63::
- text "Oh!"
- line "I concede defeat."
-
- para "You are remarkably"
- line "strong."
-
- para "I must confer you"
- line "the RAINBOWBADGE."
- prompt
-
-_CeladonGymText_48a68::
- text "You are cataloging"
- line "#MON? I must"
- cont "say I'm impressed."
-
- para "I would never"
- line "collect #MON"
- cont "if they were"
- cont "unattractive."
- done
-
-_CeladonGymText9::
- text "The RAINBOWBADGE"
- line "will make #MON"
- cont "up to L50 obey."
-
- para "It also allows"
- line "#MON to use"
- cont "STRENGTH in and"
- cont "out of battle."
-
- para "Please also take"
- line "this with you."
- done
-
-_ReceivedTM21Text::
- text "<PLAYER> received"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_TM21ExplanationText::
- text ""
-
- para "TM21 contains"
- line "MEGA DRAIN."
-
- para "Half the damage"
- line "it inflicts is"
- cont "drained to heal"
- cont "your #MON!"
- done
-
-_TM21NoRoomText::
- text "You should make"
- line "room for this."
- done
-
-_CeladonGymBattleText2::
- text "Hey!"
-
- para "You are not"
- line "allowed in here!"
- done
-
-_CeladonGymEndBattleText2::
- text "You're"
- line "too rough!"
- prompt
-
-_CeladonGymAfterBattleText2::
- text "Bleaah!"
- line "I hope ERIKA"
- cont "wipes you out!"
- done
-
-_CeladonGymBattleText3::
- text "I was getting"
- line "bored."
- done
-
-_CeladonGymEndBattleText3::
- text "My"
- line "makeup!"
- prompt
-
-_CeladonGymAfterBattleText3::
- text "Grass-type #MON"
- line "are tough against"
- cont "the water-type!"
-
- para "They also have an"
- line "edge on rock and"
- cont "ground #MON!"
- done
-
-_CeladonGymBattleText4::
- text "Aren't you the"
- line "peeping Tom?"
- done
-
-_CeladonGymEndBattleText4::
- text "I'm"
- line "in shock!"
- prompt
-
-_CeladonGymAfterBattleText4::
- text "Oh, you weren't"
- line "peeping? We get a"
- cont "lot of gawkers!"
- done
-
-_CeladonGymBattleText5::
- text "Look at my grass"
- line "#MON!"
-
- para "They're so easy"
- line "to raise!"
- done
-
-_CeladonGymEndBattleText5::
- text "No!"
- prompt
-
-_CeladonGymAfterBattleText5::
- text "We only use grass-"
- line "type #MON at"
- cont "our GYM!"
-
- para "We also use them"
- line "for making flower"
- cont "arrangements!"
- done
-
-_CeladonGymBattleText6::
- text "Don't bring any"
- line "bugs or fire"
- cont "#MON in here!"
- done
-
-_CeladonGymEndBattleText6::
- text "Oh!"
- line "You!"
- prompt
-
-_CeladonGymAfterBattleText6::
- text "Our LEADER, ERIKA,"
- line "might be quiet,"
- cont "but she's also"
- cont "very skilled!"
- done
-
-_CeladonGymBattleText7::
- text "Pleased to meet"
- line "you. My hobby is"
- cont "#MON training."
- done
-
-_CeladonGymEndBattleText7::
- text "Oh!"
- line "Splendid!"
- prompt
-
-_CeladonGymAfterBattleText7::
- text "I have a blind"
- line "date coming up."
- cont "I have to learn"
- cont "to be polite."
- done
-
-_CeladonGymBattleText8::
- text "Welcome to"
- line "CELADON GYM!"
-
- para "You better not"
- line "underestimate"
- cont "girl power!"
- done
-
-_CeladonGymEndBattleText8::
- text "Oh!"
- line "Beaten!"
- prompt
-
-_CeladonGymAfterBattleText8::
- text "I didn't bring my"
- line "best #MON!"
-
- para "Wait 'til next"
- line "time!"
- done
diff --git a/text/maps/CeladonMansion1F.asm b/text/maps/CeladonMansion1F.asm
deleted file mode 100644
index 23123892..00000000
--- a/text/maps/CeladonMansion1F.asm
+++ /dev/null
@@ -1,64 +0,0 @@
-_CeladonMansion1Text1::
- text "MEOWTH: Meow!@@"
-
-_CeladonMansion1Text3::
- text "CLEFAIRY: Pi"
- line "pippippi!@@"
-
-_CeladonMansion1Text4::
- text "NIDORAN: Kya"
- line "kyaoo!@@"
-
-_CeladonMansion1Text5::
- text "CELADON MANSION"
- line "Manager's Suite"
- done
-
-_CeladonMansion1Text2::
- text "My dear #MON"
- line "keep me company."
-
- para "MEOWTH even brings"
- line "money home!"
- done
-
-_CeladonMansion1Text6::
- text "Oh, you have an"
- line "adorable PIKACHU"
- cont "with you.@@"
-
-_CeladonMansion1Text7::
- text "It seems like it"
- line "hasn't been tamed"
- cont "at all."
- done
-
-_CeladonMansion1Text8::
- text "Why don't you"
- line "take more care"
- cont "with PIKACHU?"
- done
-
-_CeladonMansion1Text9::
- text "You must be happy"
- line "to have a #MON"
- cont "that cute."
- done
-
-_CeladonMansion1Text10::
- text "Your PIKACHU seems"
- line "tamed."
- done
-
-_CeladonMansion1Text11::
- text "Your PIKACHU looks"
- line "happy with you."
- done
-
-_CeladonMansion1Text12::
- text "You look like a"
- line "fantastic duo."
-
- para "You're making me"
- line "jealous!"
- done
diff --git a/text/maps/CeladonMansion3F.asm b/text/maps/CeladonMansion3F.asm
deleted file mode 100644
index baf86186..00000000
--- a/text/maps/CeladonMansion3F.asm
+++ /dev/null
@@ -1,117 +0,0 @@
-_ProgrammerText::
- text "Me? I'm the"
- line "programmer!"
- done
-
-_ProgrammerText2::
- text "Me? I'm the"
- line "programmer!"
-
- para "What a surprise!"
- line "I never expected"
- cont "anyone to fill a"
- cont "#DEX."
- done
-
-_GraphicArtistText::
- text "I'm the graphic"
- line "artist!"
- cont "I drew you!"
- done
-
-_GraphicArtistText2::
- text "I'm the graphic"
- line "artist!"
-
- para "Wow, you finished"
- line "your #DEX!"
- cont "Want me to PRINT"
- cont "out a DIPLOMA"
- cont "as proof?"
- done
-
-_GraphicArtistText3::
- text "Just tell me if"
- line "you want to PRINT"
- cont "out a DIPLOMA."
- done
-
-_GraphicArtistText4::
- text "All done!"
- done
-
-_GraphicArtistText5::
- text "OK, let's not"
- line "PRINT."
- done
-
-_WriterText::
- text "I wrote the story!"
- line "Isn't ERIKA cute?"
-
- para "I like MISTY a"
- line "lot too!"
-
- para "Oh, and SABRINA,"
- line "I like her!"
- done
-
-_WriterText2::
- text "I wrote the story!"
-
- para "It's great you"
- line "caught all the"
- cont "#MON! Thanks!"
- done
-
-_GameDesignerText::
- text "Is that right?"
-
- para "I'm the game"
- line "designer!"
-
- para "Filling up your"
- line "#DEX is tough,"
- cont "but don't quit!"
-
- para "When you finish,"
- line "come tell me!"
- done
-
-_CompletedDexText::
- text "Wow! Excellent!"
- line "You completed"
- cont "your #DEX!"
- cont "Congratulations!"
- cont "...@@"
-
-_CompletedDexText2::
- text "Go show off your"
- line "DIPLOMA to"
- cont "the development"
- cont "crew."
- done
-
-_CeladonMansion3Text5::
- text "It's the game"
- line "program! Messing"
- cont "with it could bug"
- cont "out the game!"
- done
-
-_CeladonMansion3Text6::
- text "Someone's playing"
- line "a game instead of"
- cont "working!"
- done
-
-_CeladonMansion3Text7::
- text "It's the script!"
- line "Better not look"
- cont "at the ending!"
- done
-
-_CeladonMansion3Text8::
- text "GAME FREAK"
- line "Development Room"
- done
diff --git a/text/maps/CeladonMart3F.asm b/text/maps/CeladonMart3F.asm
deleted file mode 100644
index 7de4a826..00000000
--- a/text/maps/CeladonMart3F.asm
+++ /dev/null
@@ -1,98 +0,0 @@
-_CeladonMart3Text2::
- text "Captured #MON"
- line "are registered"
- cont "with an ID No."
- cont "and OT, the name"
- cont "of the Original"
- cont "Trainer that"
- cont "caught it!"
- done
-
-_CeladonMart3Text3::
- text "All right!"
-
- para "My buddy's going"
- line "to trade me his"
- cont "KANGASKHAN for my"
- cont "GRAVELER!"
- done
-
-_CeladonMart3Text4::
- text "Come on GRAVELER!"
-
- para "I love GRAVELER!"
- line "I collect them!"
-
- para "Huh?"
-
- para "GRAVELER turned"
- line "into a different"
- cont "#MON!"
- done
-
-_CeladonMart3Text5::
- text "You can identify"
- line "#MON you got"
- cont "in trades by"
- cont "their ID Numbers!"
- done
-
-_CeladonMart3Text6::
- text "It's an SNES!"
- done
-
-_CeladonMart3Text7::
- text "An RPG! There's"
- line "no time for that!"
- done
-
-_CeladonMart3Text9::
- text "A sports game!"
- line "Dad'll like that!"
- done
-
-_CeladonMart3Text11::
- text "A puzzle game!"
- line "Looks addictive!"
- done
-
-_CeladonMart3Text13::
- text "A fighting game!"
- line "Looks tough!"
- done
-
-_CeladonMart3Text14::
- text "3F: TV GAME SHOP"
- done
-
-_CeladonMart3Text15::
- text "Red and Blue!"
- line "Both are #MON!"
- done
-
-_TM18PreReceiveText::
- text "Oh, hi! I finally"
- line "finished #MON!"
-
- para "Not done yet?"
- line "This might be"
- cont "useful!"
- prompt
-
-_ReceivedTM18Text::
- text "<PLAYER> received"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_TM18ExplanationText::
- text "TM18 is COUNTER!"
- line "Not like the one"
- cont "I'm leaning on,"
- cont "mind you!"
- done
-
-_TM18NoRoomText::
- text "Your pack is full"
- line "of items!"
- done
diff --git a/text/maps/CeladonMartRoof.asm b/text/maps/CeladonMartRoof.asm
deleted file mode 100644
index cfeddaf6..00000000
--- a/text/maps/CeladonMartRoof.asm
+++ /dev/null
@@ -1,138 +0,0 @@
-_CeladonMartRoofText_484ee::
- text "Give her which"
- line "drink?"
- done
-
-_CeladonMartRoofText_484f3::
- text "Yay!"
-
- para "FRESH WATER!"
-
- para "Thank you!"
-
- para "You can have this"
- line "from me!@@"
-
-_CeladonMartRoofText_484f9::
- text "<PLAYER> received"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_CeladonMartRoofText_484fe::
- text ""
-
- para "@"
- TX_RAM wcf4b
- text " contains"
- line "ICE BEAM!"
-
- para "It can freeze the"
- line "target sometimes!@@"
-
-_CeladonMartRoofText_48504::
- text "Yay!"
-
- para "SODA POP!"
-
- para "Thank you!"
-
- para "You can have this"
- line "from me!@@"
-
-_CeladonMartRoofText_4850a::
- text "<PLAYER> received"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_CeladonMartRoofText_4850f::
- text ""
-
- para "@"
- TX_RAM wcf4b
- text " contains"
- line "ROCK SLIDE!@@"
-
-_CeladonMartRoofText_48515::
- text "Yay!"
-
- para "LEMONADE!"
-
- para "Thank you!"
-
- para "You can have this"
- line "from me!@@"
-
-_ReceivedTM49Text::
- text "<PLAYER> received"
- line "TM49!@@"
-
-_CeladonMartRoofText_48520::
- text ""
-
- para "TM49 contains"
- line "TRI ATTACK!@@"
-
-_CeladonMartRoofText_48526::
- text "You don't have"
- line "space for this!@@"
-
-_CeladonMartRoofText_4852c::
- text "No thank you!"
- line "I'm not thirsty"
- cont "after all!@@"
-
-_CeladonMartRoofText1::
- text "My sister is a"
- line "trainer, believe"
- cont "it or not."
-
- para "But, she's so"
- line "immature, she"
- cont "drives me nuts!"
- done
-
-_CeladonMartRoofText_48598::
- text "I'm thirsty!"
- line "I want something"
- cont "to drink!"
- done
-
-_CeladonMartRoofText4::
- text "I'm thirsty!"
- line "I want something"
- cont "to drink!"
-
- para "Give her a drink?"
- done
-
-_CeladonMartRoofText6::
- text "ROOFTOP SQUARE:"
- line "VENDING MACHINES"
- done
-
-_VendingMachineText1::
- text "A vending machine!"
- line "Here's the menu!"
- prompt
-
-_VendingMachineText4::
- text "Oops, not enough"
- line "money!"
- done
-
-_VendingMachineText5::
- TX_RAM wcf4b
- text ""
- line "popped out!"
- done
-
-_VendingMachineText6::
- text "There's no more"
- line "room for stuff!"
- done
-
-_VendingMachineText7::
- text "Not thirsty!"
- done
diff --git a/text/maps/CeruleanCaveB1F.asm b/text/maps/CeruleanCaveB1F.asm
deleted file mode 100644
index 0918a3ce..00000000
--- a/text/maps/CeruleanCaveB1F.asm
+++ /dev/null
@@ -1,2 +0,0 @@
-_MewtwoBattleText::
- text "Mew!@@"
diff --git a/text/maps/CeruleanCity.asm b/text/maps/CeruleanCity.asm
deleted file mode 100644
index 4bc16e7d..00000000
--- a/text/maps/CeruleanCity.asm
+++ /dev/null
@@ -1,233 +0,0 @@
-_CeruleanCityText_19668::
- text "<RIVAL>: Yo!"
- line "<PLAYER>!"
-
- para "You're still"
- line "struggling along"
- cont "back here?"
-
- para "I'm doing great!"
- line "I caught a bunch"
- cont "of strong and"
- cont "smart #MON!"
-
- para "Here, let me see"
- line "what you caught,"
- cont "<PLAYER>!"
- done
-
-_CeruleanCityText_1966d::
- text "Hey!"
- line "Take it easy!"
- cont "You won already!"
- prompt
-
-_CeruleanCityText_19672::
- text "Heh!"
- line "You're no match"
- cont "for my genius!"
- prompt
-
-_CeruleanCityText_19677::
- text "<RIVAL>: Hey,"
- line "guess what?"
-
- para "I went to BILL's"
- line "and got him to"
- cont "show me his rare"
- cont "#MON!"
-
- para "That added a lot"
- line "of pages to my"
- cont "#DEX!"
-
- para "After all, BILL's"
- line "world famous as a"
- cont "#MANIAC!"
-
- para "He invented the"
- line "#MON Storage"
- cont "System on PC!"
-
- para "Since you're using"
- line "his system, go"
- cont "thank him!"
-
- para "Well, I better"
- line "get rolling!"
- cont "Smell ya later!"
- done
-
-_CeruleanCityText_196d9::
- text "Hey! Stay out!"
- line "It's not your"
- cont "yard! Huh? Me?"
-
- para "I'm an innocent"
- line "bystander! Don't"
- cont "you believe me?"
- done
-
-_ReceivedTM28Text::
- text "<PLAYER> recovered"
- line "TM28!@@"
-
-_ReceivedTM28Text2::
- text ""
-
- para "I better get"
- line "moving! Bye!@@"
-
-_TM28NoRoomText::
- text "Make room for"
- line "this!"
-
- para "I can't run until"
- line "I give it to you!"
- done
-
-_CeruleanCityText_196ee::
- text "Stop!"
- line "I give up! I'll"
- cont "leave quietly!"
- prompt
-
-_CeruleanCityText_196f3::
- text "OK! I'll return"
- line "the TM I stole!"
- prompt
-
-_CeruleanCityText3::
- text "You're a trainer"
- line "too? Collecting,"
- cont "fighting, it's a"
- cont "tough life."
- done
-
-_CeruleanCityText4::
- text "That bush in"
- line "front of the shop"
- cont "is in the way."
-
- para "There might be a"
- line "way around."
- done
-
-_CeruleanCityText5::
- text "You're making an"
- line "encyclopedia on"
- cont "#MON? That"
- cont "sounds amusing."
- done
-
-_CeruleanCityText6::
- text "These poor people"
- line "here were robbed."
-
- para "We're positive"
- line "that TEAM ROCKET"
- cont "is behind this"
- cont "terrible deed."
-
- para "Even our POLICE"
- line "FORCE has trouble"
- cont "with the ROCKETs!"
- done
-
-_CeruleanCityText_19730::
- text "OK! ELECTRODE!"
- line "Use SONICBOOM!"
- cont "Please ELECTRODE,"
- cont "pay attention!"
- done
-
-_CeruleanCityText_19735::
- text "ELECTRODE, TACKLE!"
- line "No! You blew it"
- cont "again!"
- done
-
-_CeruleanCityText_1973a::
- text "ELECTRODE, SWIFT!"
- line "No! That's wrong!"
-
- para "Training #MON"
- line "is difficult!"
-
- para "Your #MON's"
- line "obedience depends"
- cont "on your abilities"
- cont "as a trainer!"
- done
-
-_CeruleanCityText_1976f::
- text "ELECTRODE took a"
- line "snooze..."
- done
-
-_CeruleanCityText_19774::
- text "ELECTRODE is"
- line "loafing around..."
- done
-
-_CeruleanCityText_19779::
- text "ELECTRODE turned"
- line "away..."
- done
-
-_CeruleanCityText_1977e::
- text "ELECTRODE"
- line "ignored orders..."
- done
-
-_CeruleanCityText9::
- text "I want a bright"
- line "red BICYCLE!"
-
- para "I'll keep it at"
- line "home, so it won't"
- cont "get dirty!"
- done
-
-_CeruleanCityText10::
- text "This is CERULEAN"
- line "CAVE! Horribly"
- cont "strong #MON"
- cont "live in there!"
-
- para "The #MON LEAGUE"
- line "champion is the"
- cont "only person who"
- cont "is allowed in!"
- done
-
-_CeruleanCityText12::
- text "CERULEAN CITY"
- line "A Mysterious,"
- cont "Blue Aura"
- cont "Surrounds It"
- done
-
-_CeruleanCityText13::
- text "TRAINER TIPS"
-
- para "Pressing B Button"
- line "during evolution"
- cont "cancels the whole"
- cont "process."
- done
-
-_CeruleanCityText16::
- text "Grass and caves"
- line "handled easily!"
- cont "BIKE SHOP"
- done
-
-_CeruleanCityText17::
- text "CERULEAN CITY"
- line "#MON GYM"
- cont "LEADER: MISTY"
-
- para "The Tomboyish"
- line "Mermaid!"
- done
diff --git a/text/maps/CeruleanGym.asm b/text/maps/CeruleanGym.asm
deleted file mode 100644
index 9f2c4694..00000000
--- a/text/maps/CeruleanGym.asm
+++ /dev/null
@@ -1,134 +0,0 @@
-_CeruleanGymText_5c7be::
- text "Hi, you're a new"
- line "face!"
-
- para "What's your policy"
- line "on #MON? What"
- cont "is your approach?"
-
- para "My policy is an"
- line "all-out offensive"
- cont "with water-type"
- cont "#MON!"
-
- para "MISTY, the world-"
- line "famous beauty, is"
- cont "your host!"
-
- para "Are you ready,"
- line "sweetie?"
- done
-
-_CeruleanGymText_5c7c3::
- text "TM11 teaches"
- line "BUBBLEBEAM!"
-
- para "Use it on an"
- line "aquatic #MON!"
- done
-
-_CeruleanGymText_5c7c8::
- text "The CASCADEBADGE"
- line "makes all #MON"
- cont "up to L30 obey!"
-
- para "That includes"
- line "even outsiders!"
-
- para "There's more, you"
- line "can now use CUT"
- cont "anytime!"
-
- para "You can CUT down"
- line "small bushes to"
- cont "open new paths!"
-
- para "You can also have"
- line "my favorite TM!"
- done
-
-_ReceivedTM11Text::
- text "<PLAYER> received"
- line "TM11!@@"
-
-_CeruleanGymText_5c7d3::
- text "You better make"
- line "room for this!"
- done
-
-_CeruleanGymText_5c7d8::
- text "I can't"
- line "believe I lost!"
-
- para "All right!"
-
- para "You can have the"
- line "CASCADEBADGE to"
- cont "show you beat me!"
- prompt
-
-_CeruleanGymBattleText1::
- text "I'm more than good"
- line "enough for you!"
-
- para "MISTY can wait!"
- done
-
-_CeruleanGymEndBattleText1::
- text "You"
- line "overwhelmed me!"
- prompt
-
-_CeruleanGymAfterBattleText1::
- text "You have to face"
- line "other trainers to"
- cont "find out how good"
- cont "you really are."
- done
-
-_CeruleanGymBattleText2::
- text "Splash!"
-
- para "I'm first up!"
- line "Let's do it!"
- done
-
-_CeruleanGymEndBattleText2::
- text "That"
- line "can't be!"
- prompt
-
-_CeruleanGymAfterBattleText2::
- text "MISTY is going to"
- line "keep improving!"
-
- para "She won't lose to"
- line "someone like you!"
- done
-
-_CeruleanGymText_5c82a::
- text "Yo! Champ in"
- line "making!"
-
- para "Here's my advice!"
-
- para "The LEADER, MISTY,"
- line "is a pro who uses"
- cont "water #MON!"
-
- para "You can drain all"
- line "their water with"
- cont "plant #MON!"
-
- para "Or, zap them with"
- line "electricity!"
- done
-
-_CeruleanGymText_5c82f::
- text "You beat MISTY!"
- line "What'd I tell ya?"
-
- para "You and me, kid,"
- line "we make a pretty"
- cont "darn good team!"
- done
diff --git a/text/maps/CeruleanTradeHouse.asm b/text/maps/CeruleanTradeHouse.asm
deleted file mode 100644
index 791c11d5..00000000
--- a/text/maps/CeruleanTradeHouse.asm
+++ /dev/null
@@ -1,39 +0,0 @@
-MelanieText1::
- text "I take care of"
- line "injured #MON."
-
- para "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!@@"
diff --git a/text/maps/ChampionsRoom.asm b/text/maps/ChampionsRoom.asm
deleted file mode 100644
index 61050565..00000000
--- a/text/maps/ChampionsRoom.asm
+++ /dev/null
@@ -1,146 +0,0 @@
-_GaryChampionIntroText::
- text "<RIVAL>: Hey!"
-
- para "I was looking"
- line "forward to seeing"
- cont "you, <PLAYER>!"
-
- para "My rival should"
- line "be strong to keep"
- cont "me sharp!"
-
- para "While working on"
- line "#DEX, I looked"
- cont "all over for"
- cont "powerful #MON!"
-
- para "Not only that, I"
- line "assembled teams"
- cont "that would beat"
- cont "any #MON type!"
-
- para "And now!"
-
- para "I'm the #MON"
- line "LEAGUE champion!"
-
- para "<PLAYER>! Do you"
- line "know what that"
- cont "means?"
-
- para "I'll tell you!"
-
- para "I am the most"
- line "powerful trainer"
- cont "in the world!"
- done
-
-_GaryDefeatedText::
- text "NO!"
- line "That can't be!"
- cont "You beat my best!"
-
- para "After all that"
- line "work to become"
- cont "LEAGUE champ?"
-
- para "My reign is over"
- line "already?"
- cont "It's not fair!"
- prompt
-
-_GaryVictoryText::
- text "Hahaha!"
- line "I won, I won!"
-
- para "I'm too good for"
- line "you, <PLAYER>!"
-
- para "You did well to"
- line "even reach me,"
- cont "<RIVAL>, the"
- cont "#MON genius!"
-
- para "Nice try, loser!"
- line "Hahaha!"
- prompt
-
-_GaryText_76103::
- text "Why?"
- line "Why did I lose?"
-
- para "I never made any"
- line "mistakes raising"
- cont "my #MON..."
-
- para "Darn it! You're"
- line "the new #MON"
- cont "LEAGUE champion!"
-
- para "Although I don't"
- line "like to admit it."
- done
-
-_GaryText2::
- text "OAK: <PLAYER>!"
- done
-
-_GaryText_76120::
- text "OAK: So, you won!"
- line "Congratulations!"
- cont "You're the new"
- cont "#MON LEAGUE"
- cont "champion!"
-
- para "You've grown up so"
- line "much since you"
- cont "first left with"
- cont "@"
- TX_RAM wcd6d
- text "!"
-
- para "<PLAYER>, you have"
- line "come of age!"
- done
-
-_GaryText_76125::
- text "OAK: <RIVAL>! I'm"
- line "disappointed!"
-
- para "I came when I"
- line "heard you beat"
- cont "the ELITE FOUR!"
-
- para "But, when I got"
- line "here, you had"
- cont "already lost!"
-
- para "<RIVAL>! Do you"
- line "understand why"
- cont "you lost?"
-
- para "You have forgotten"
- line "to treat your"
- cont "#MON with"
- cont "trust and love!"
-
- para "Without them, you"
- line "will never become"
- cont "a champ again!"
- done
-
-_GaryText_7612a::
- text "OAK: <PLAYER>!"
-
- para "You understand"
- line "that your victory"
- cont "was not just your"
- cont "own doing!"
-
- para "The bond you share"
- line "with your #MON"
- cont "is marvelous!"
-
- para "<PLAYER>!"
- line "Come with me!"
- done
diff --git a/text/maps/CinnabarGym.asm b/text/maps/CinnabarGym.asm
deleted file mode 100644
index ee1fc31a..00000000
--- a/text/maps/CinnabarGym.asm
+++ /dev/null
@@ -1,253 +0,0 @@
-_BlaineBattleText::
- text "Hah!"
-
- para "I am BLAINE! I"
- line "am the LEADER of"
- cont "CINNABAR GYM!"
-
- para "My fiery #MON"
- line "will incinerate"
- cont "all challengers!"
-
- para "Hah! You better"
- line "have BURN HEAL!"
- done
-
-_BlaineEndBattleText::
- text "I have"
- line "burnt out!"
-
- para "You have earned"
- line "the VOLCANOBADGE!@@"
-
-_BlaineFireBlastText::
- text "FIRE BLAST is the"
- line "ultimate fire"
- cont "technique!"
-
- para "Don't waste it on"
- line "water #MON!"
- done
-
-_BlaineBadgeText::
- text "Hah!"
-
- para "The VOLCANOBADGE"
- line "heightens the"
- cont "SPECIAL abilities"
- cont "of your #MON!"
-
- para "Here, you can"
- line "have this too!"
- done
-
-_ReceivedTM38Text::
- text "<PLAYER> received"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_TM38ExplanationText::
- text ""
-
- para "TM38 contains"
- line "FIRE BLAST!"
-
- para "Teach it to fire-"
- line "type #MON!"
-
- para "CHARMELEON or"
- line "PONYTA would be"
- cont "good bets!"
- done
-
-_TM38NoRoomText::
- text "Make room for my"
- line "gift!"
- done
-
-_CinnabarGymText_7595f::
- text "Do you know how"
- line "hot #MON fire"
- cont "breath can get?"
- done
-
-_CinnabarGymText_75964::
- text "Yow!"
- line "Hot, hot, hot!"
- prompt
-
-_CinnabarGymText_75969::
- text "Fire, or to be"
- line "more precise,"
- cont "combustion..."
-
- para "Blah, blah, blah,"
- line "blah..."
- done
-
-_CinnabarGymText_75994::
- text "I was a thief, but"
- line "I became straight"
- cont "as a trainer!"
- done
-
-_CinnabarGymText_75999::
- text "I"
- line "surrender!"
- prompt
-
-_CinnabarGymText_7599e::
- text "I can't help"
- line "stealing other"
- cont "people's #MON!"
- done
-
-_CinnabarGymText_759c9::
- text "You can't win!"
- line "I have studied"
- cont "#MON totally!"
- done
-
-_CinnabarGymText_759ce::
- text "Waah!"
- line "My studies!"
- prompt
-
-_CinnabarGymText_759d3::
- text "My theories are"
- line "too complicated"
- cont "for you!"
- done
-
-_CinnabarGymText_759fe::
- text "I just like using"
- line "fire #MON!"
- done
-
-_CinnabarGymText_75a03::
- text "Too hot"
- line "to handle!"
- prompt
-
-_CinnabarGymText_75a08::
- text "I wish there was"
- line "a thief #MON!"
- cont "I'd use that!"
- done
-
-_CinnabarGymText_75a33::
- text "I know why BLAINE"
- line "became a trainer!"
- done
-
-_CinnabarGymText_75a38::
- text "Ow!"
- prompt
-
-_CinnabarGymText_75a3d::
- text "BLAINE was lost"
- line "in the mountains"
- cont "when a fiery bird"
- cont "#MON appeared."
-
- para "Its light enabled"
- line "BLAINE to find"
- cont "his way down!"
- done
-
-_CinnabarGymText_75a68::
- text "I've been to many"
- line "GYMs, but this is"
- cont "my favorite!"
- done
-
-_CinnabarGymText_75a6d::
- text "Yowza!"
- line "Too hot!"
- prompt
-
-_CinnabarGymText_75a72::
- text "Us fire #MON"
- line "fans like PONYTA"
- cont "and NINETALES!"
- done
-
-_CinnabarGymText_75a9d::
- text "Fire is weak"
- line "against H2O!"
- done
-
-_CinnabarGymText_75aa2::
- text "Oh!"
- line "Snuffed out!"
- prompt
-
-_CinnabarGymText_75aa7::
- text "Water beats fire!"
- line "But, fire melts"
- cont "ice #MON!"
- done
-
-_CinnabarGymText_75ac2::
- text "Yo! Champ in"
- line "making!"
-
- para "The hot-headed"
- line "BLAINE is a fire"
- cont "#MON pro!"
-
- para "Douse his spirits"
- line "with water!"
-
- para "You better take"
- line "some BURN HEALs!"
- done
-
-_CinnabarGymText_75ac7::
- text "<PLAYER>! You beat"
- line "that fire brand!"
- done
-
-_CinnabarGymText_1::
- text "This GYM is also"
- line "known as the QUIZ"
- cont "GYM."
-
- para "You have to take a"
- line "quiz if you want"
- cont "to see BLAINE."
-
- para "You don't have to"
- line "fight us if you"
- cont "get it right."
- done
-
-_CinnabarGymText_2::
- text "Think you can do"
- line "it?"
- done
-
-_CinnabarGymText_3::
- text "This one's tricky!"
- done
-
-_CinnabarGymText_4::
- text "#MON enjoy"
- line "quizzes too!"
- done
-
-_CinnabarGymText_5::
- text "I like it here at"
- line "QUIZ GYM."
- done
-
-_CinnabarGymText_6::
- text "This is the last"
- line "question."
- done
-
-_CinnabarGymText_7::
- text "Come on, answer"
- line "the question!"
- done
diff --git a/text/maps/CinnabarLabFossilRoom.asm b/text/maps/CinnabarLabFossilRoom.asm
deleted file mode 100644
index 95bde685..00000000
--- a/text/maps/CinnabarLabFossilRoom.asm
+++ /dev/null
@@ -1,78 +0,0 @@
-_Lab4Text_75dc6::
- text "Hiya!"
-
- para "I am important"
- line "doctor!"
-
- para "I study here rare"
- line "#MON fossils!"
-
- para "You! Have you a"
- line "fossil for me?"
- prompt
-
-_Lab4Text_75dcb::
- text "No! Is too bad!"
- done
-
-_Lab4Text_75dd0::
- text "I take a little"
- line "time!"
-
- para "You go for walk a"
- line "little while!"
- done
-
-_Lab4Text_75dd5::
- text "Where were you?"
-
- para "Your fossil is"
- line "back to life!"
-
- para "It was @"
- TX_RAM wcf4b
- text ""
- line "like I think!"
- prompt
-
-_Lab4Text_610ae::
- text "Oh! That is"
- line "@"
- TX_RAM wcd6d
- text "!"
-
- para "It is fossil of"
- line "@"
- TX_RAM wcf4b
- text ", a"
- cont "#MON that is"
- cont "already extinct!"
-
- para "My Resurrection"
- line "Machine will make"
- cont "that #MON live"
- cont "again!"
- done
-
-_Lab4Text_610b3::
- text "So! You hurry and"
- line "give me that!"
-
- para "<PLAYER> handed"
- line "over @"
- TX_RAM wcd6d
- text "!"
- prompt
-
-_Lab4Text_610b8::
- text "I take a little"
- line "time!"
-
- para "You go for walk a"
- line "little while!"
- done
-
-_Lab4Text_610bd::
- text "Aiyah! You come"
- line "again!"
- done
diff --git a/text/maps/CinnabarLabMetronomeRoom.asm b/text/maps/CinnabarLabMetronomeRoom.asm
deleted file mode 100644
index fa04677f..00000000
--- a/text/maps/CinnabarLabMetronomeRoom.asm
+++ /dev/null
@@ -1,63 +0,0 @@
-_TM35PreReceiveText::
- text "Tch-tch-tch!"
- line "I made a cool TM!"
-
- para "It can cause all"
- line "kinds of fun!"
- prompt
-
-_ReceivedTM35Text::
- text "<PLAYER> received "
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_TM35ExplanationText::
- text "Tch-tch-tch!"
- line "That's the sound"
- cont "of a METRONOME!"
-
- para "It tweaks your"
- line "#MON's brain"
- cont "into using moves"
- cont "it doesn't know!"
- done
-
-_TM35NoRoomText::
- text "Your pack is"
- line "crammed full!"
- done
-
-_Lab3Text2::
- text "EEVEE can evolve"
- line "into 1 of 3 kinds"
- cont "of #MON."
- done
-
-_Lab3Text3::
- text "There's an e-mail"
- line "message!"
-
- para "..."
-
- para "The 3 legendary"
- line "bird #MON are"
- cont "ARTICUNO, ZAPDOS"
- cont "and MOLTRES."
-
- para "Their whereabouts"
- line "are unknown."
-
- para "We plan to explore"
- line "the cavern close"
- cont "to CERULEAN."
-
- para "From: #MON"
- line "RESEARCH TEAM"
-
- para "..."
- done
-
-_Lab3Text5::
- text "An amber pipe!"
- done
diff --git a/text/maps/CopycatsHouse1F.asm b/text/maps/CopycatsHouse1F.asm
deleted file mode 100644
index bd3029fd..00000000
--- a/text/maps/CopycatsHouse1F.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-_CopycatsHouse1FText1::
- text "My daughter is so"
- line "self-centered."
- cont "She only has a"
- cont "few friends."
- done
-
-_CopycatsHouse1FText2::
- text "My daughter likes"
- line "to mimic people."
-
- para "Her mimicry has"
- line "earned her the"
- cont "nickname COPYCAT"
- cont "around here!"
- done
-
-_CopycatsHouse1FText3::
- text "CHANSEY: Chaaan"
- line "sey!@@"
diff --git a/text/maps/CopycatsHouse2F.asm b/text/maps/CopycatsHouse2F.asm
deleted file mode 100644
index 561b2ac5..00000000
--- a/text/maps/CopycatsHouse2F.asm
+++ /dev/null
@@ -1,97 +0,0 @@
-_CopycatsHouse2FText_5ccd4::
- text "<PLAYER>: Hi! Do"
- line "you like #MON?"
-
- para "<PLAYER>: Uh no, I"
- line "just asked you."
-
- para "<PLAYER>: Huh?"
- line "You're strange!"
-
- para "COPYCAT: Hmm?"
- line "Quit mimicking?"
-
- para "But, that's my"
- line "favorite hobby!"
- prompt
-
-_TM31PreReceiveText::
- text "Oh wow!"
- line "A # DOLL!"
-
- para "For me?"
- line "Thank you!"
-
- para "You can have"
- line "this, then!"
- prompt
-
-_ReceivedTM31Text::
- text "<PLAYER> received"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_TM31ExplanationText1::
- text ""
-
- para "TM31 contains my"
- line "favorite, MIMIC!"
-
- para "Use it on a good"
- line "#MON!@@"
-
-_TM31ExplanationText2::
- text "<PLAYER>: Hi!"
- line "Thanks for TM31!"
-
- para "<PLAYER>: Pardon?"
-
- para "<PLAYER>: Is it"
- line "that fun to mimic"
- cont "my every move?"
-
- para "COPYCAT: You bet!"
- line "It's a scream!"
- done
-
-_TM31NoRoomText::
- text "Don't you want"
- line "this?@@"
-
-_CopycatsHouse2FText2::
- text "DODUO: Giiih!"
-
- para "MIRROR MIRROR ON"
- line "THE WALL, WHO IS"
- cont "THE FAIREST ONE"
- cont "OF ALL?"
- done
-
-_CopycatsHouse2FText3::
- text "This is a rare"
- line "#MON! Huh?"
- cont "It's only a doll!"
- done
-
-_CopycatsHouse2FText6::
- text "A game with MARIO"
- line "wearing a bucket"
- cont "on his head!"
- done
-
-_CopycatsHouse2FText_5cd17::
- text "..."
-
- para "My Secrets!"
-
- para "Skill: Mimicry!"
- line "Hobby: Collecting"
- cont "dolls!"
- cont "Favorite #MON:"
- cont "CLEFAIRY!"
- done
-
-_CopycatsHouse2FText_5cd1c::
- text "Huh? Can't see!"
- done
diff --git a/text/maps/Daycare.asm b/text/maps/Daycare.asm
deleted file mode 100644
index 479898c8..00000000
--- a/text/maps/Daycare.asm
+++ /dev/null
@@ -1,96 +0,0 @@
-_DayCareIntroText::
- text "I run a DAYCARE."
- line "Would you like me"
- cont "to raise one of"
- cont "your #MON?"
- done
-
-_DayCareWhichMonText::
- text "Which #MON"
- line "should I raise?"
- prompt
-
-_DayCareWillLookAfterMonText::
- text "Fine, I'll look"
- line "after @"
- TX_RAM wcd6d
- text ""
- cont "for a while."
- prompt
-
-_DayCareComeSeeMeInAWhileText::
- text "Come see me in"
- line "a while."
- done
-
-_DayCareMonHasGrownText::
- text "Your @"
- TX_RAM wcd6d
- text ""
- line "has grown a lot!"
-
- para "By level, it's"
- line "grown by @"
- TX_NUM wDayCareNumLevelsGrown,$1,$3
- text "!"
-
- para "Aren't I great?"
- prompt
-
-_DayCareOweMoneyText::
- text "You owe me ¥@"
- TX_BCD wDayCareTotalCost, $c2
- text ""
- line "for the return"
- cont "of this #MON."
- done
-
-_DayCareGotMonBackText::
- text "<PLAYER> got"
- line "@"
- TX_RAM wDayCareMonName
- text " back!"
- done
-
-_DayCareMonNeedsMoreTimeText::
- text "Back already?"
- line "Your @"
- TX_RAM wcd6d
- text ""
- cont "needs some more"
- cont "time with me."
- prompt
-
-_DayCareAllRightThenText::
- text "All right then,"
- line "@@"
-
-_DayCareComeAgainText::
- text "Come again."
- done
-
-_DayCareNoRoomForMonText::
- text "You have no room"
- line "for this #MON!"
- done
-
-_DayCareOnlyHaveOneMonText::
- text "You only have one"
- line "#MON with you."
- done
-
-_DayCareCantAcceptMonWithHMText::
- text "I can't accept a"
- line "#MON that"
- cont "knows an HM move."
- done
-
-_DayCareHeresYourMonText::
- text "Thank you! Here's"
- line "your #MON!"
- prompt
-
-_DayCareNotEnoughMoneyText::
- text "Hey, you don't"
- line "have enough ¥!"
- done
diff --git a/text/maps/FuchsiaGoodRodHouse.asm b/text/maps/FuchsiaGoodRodHouse.asm
deleted file mode 100644
index b1b8b2f2..00000000
--- a/text/maps/FuchsiaGoodRodHouse.asm
+++ /dev/null
@@ -1,43 +0,0 @@
-_FuchsiaHouse3Text_561bd::
- text "I'm the FISHING"
- line "GURU's older"
- cont "brother!"
-
- para "I simply Looove"
- line "fishing!"
-
- para "Do you like to"
- line "fish?"
- done
-
-_FuchsiaHouse3Text_561c2::
- text "Grand! I like"
- line "your style!"
-
- para "Take this and"
- line "fish, young one!"
-
- para "<PLAYER> received"
- line "a @"
- TX_RAM wcf4b
- text "!@@"
-
-_FuchsiaHouse3Text_56212::
- text "Oh... That's so"
- line "disappointing..."
- done
-
-_FuchsiaHouse3Text_56217::
- text "Hello there,"
- line "<PLAYER>!"
-
- para "How are the fish"
- line "biting?"
- done
-
-_FuchsiaHouse3Text_5621c::
- text "Oh no!"
-
- para "You have no room"
- line "for my gift!"
- done
diff --git a/text/maps/FuchsiaGym.asm b/text/maps/FuchsiaGym.asm
deleted file mode 100644
index fc4e8f59..00000000
--- a/text/maps/FuchsiaGym.asm
+++ /dev/null
@@ -1,220 +0,0 @@
-_KogaBeforeBattleText::
- text "KOGA: Fwahahaha!"
-
- para "A mere child like"
- line "you dares to"
- cont "challenge me?"
-
- para "Very well, I"
- line "shall show you"
- cont "true terror as a"
- cont "ninja master!"
-
- para "You shall feel"
- line "the despair of"
- cont "poison and sleep"
- cont "techniques!"
- done
-
-_KogaAfterBattleText::
- text "Humph!"
- line "You have proven"
- cont "your worth!"
-
- para "Here! Take the"
- line "SOULBADGE!"
- prompt
-
-_KogaExplainToxicText::
- text "When afflicted by"
- line "TOXIC, #MON"
- cont "suffer more and"
- cont "more as battle"
- cont "progresses!"
-
- para "It will surely"
- line "terrorize foes!"
- done
-
-_FuchsiaGymText9::
- text "Now that you have"
- line "the SOULBADGE,"
- cont "the DEFENSE of"
- cont "your #MON"
- cont "increases!"
-
- para "It also lets you"
- line "SURF outside of"
- cont "battle!"
-
- para "Ah! Take this"
- line "too!"
- done
-
-_ReceivedTM06Text::
- text "<PLAYER> received"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_TM06ExplanationText::
- text ""
- para "TM06 contains"
- line "TOXIC!"
-
- para "It is a secret"
- line "technique over"
- cont "400 years old!"
- done
-
-_TM06NoRoomText::
- text "Make space for"
- line "this, child!"
- done
-
-_FuchsiaGymBattleText1::
- text "Strength isn't"
- line "the key for"
- cont "#MON!"
-
- para "It's strategy!"
-
- para "I'll show you how"
- line "strategy can beat"
- cont "brute strength!"
- done
-
-_FuchsiaGymEndBattleText1::
- text "What?"
- line "Extraordinary!"
- prompt
-
-_FuchsiaGymAfterBattleText1::
- text "So, you mix brawn"
- line "with brains?"
- cont "Good strategy!"
- done
-
-_FuchsiaGymBattleText2::
- text "I wanted to become"
- line "a ninja, so I"
- cont "joined this GYM!"
- done
-
-_FuchsiaGymEndBattleText2::
- text "I'm done"
- line "for!"
- prompt
-
-_FuchsiaGymAfterBattleText2::
- text "I will keep on"
- line "training under"
- cont "KOGA, my ninja"
- cont "master!"
- done
-
-_FuchsiaGymBattleText3::
- text "Let's see you"
- line "beat my special"
- cont "techniques!"
- done
-
-_FuchsiaGymEndBattleText3::
- text "You"
- line "had me fooled!"
- prompt
-
-_FuchsiaGymAfterBattleText3::
- text "I like poison and"
- line "sleep techniques,"
- cont "as they linger"
- cont "after battle!"
- done
-
-_FuchsiaGymBattleText4::
- text "Stop right there!"
-
- para "Our invisible"
- line "walls have you"
- cont "frustrated?"
- done
-
-_FuchsiaGymEndBattleText4::
- text "Whoa!"
- line "He's got it!"
- prompt
-
-_FuchsiaGymAfterBattleText4::
- text "You impressed me!"
- line "Here's a hint!"
-
- para "Look very closely"
- line "for gaps in the"
- cont "invisible walls!"
- done
-
-_FuchsiaGymBattleText5::
- text "I also study the"
- line "way of the ninja"
- cont "with master KOGA!"
-
- para "Ninja have a long"
- line "history of using"
- cont "animals!"
- done
-
-_FuchsiaGymEndBattleText5::
- text "Awoo!"
- prompt
-
-_FuchsiaGymAfterBattleText5::
- text "I still have much"
- line "to learn!"
- done
-
-_FuchsiaGymBattleText6::
- text "Master KOGA comes"
- line "from a long line"
- cont "of ninjas!"
-
- para "What did you"
- line "descend from?"
- done
-
-_FuchsiaGymEndBattleText6::
- text "Dropped"
- line "my balls!"
- prompt
-
-_FuchsiaGymAfterBattleText6::
- text "Where there is"
- line "light, there is"
- cont "shadow!"
-
- para "Light and shadow!"
- line "Which do you"
- cont "choose?"
- done
-
-_FuchsiaGymText_7564e::
- text "Yo! Champ in"
- line "making!"
-
- para "FUCHSIA GYM is"
- line "riddled with"
- cont "invisible walls!"
-
- para "KOGA might appear"
- line "close, but he's"
- cont "blocked off!"
-
- para "You have to find"
- line "gaps in the walls"
- cont "to reach him!"
- done
-
-_FuchsiaGymText_75653::
- text "It's amazing how"
- line "ninja can terrify"
- cont "even now!"
- done
diff --git a/text/maps/GameCorner.asm b/text/maps/GameCorner.asm
deleted file mode 100644
index c3e4f88e..00000000
--- a/text/maps/GameCorner.asm
+++ /dev/null
@@ -1,181 +0,0 @@
-_CeladonGameCornerText1::
- text "Welcome!"
-
- para "You can exchange"
- line "your coins for"
- cont "fabulous prizes"
- cont "next door."
- done
-
-_CeladonGameCornerText_48d22::
- text "Welcome to ROCKET"
- line "GAME CORNER!"
-
- para "Do you need some"
- line "game coins?"
-
- para "It's ¥1000 for 50"
- line "coins. Would you"
- cont "like some?"
- done
-
-_CeladonGameCornerText_48d27::
- text "Thanks! Here are"
- line "your 50 coins!"
- done
-
-_CeladonGameCornerText_48d2c::
- text "No? Please come"
- line "play sometime!"
- done
-
-_CeladonGameCornerText_48d31::
- text "You can't afford"
- line "the coins!"
- done
-
-_CeladonGameCornerText_48d36::
- text "Oops! Your COIN"
- line "CASE is full."
- done
-
-_CeladonGameCornerText_48d3b::
- text "You don't have a"
- line "COIN CASE!"
- done
-
-_CeladonGameCornerText3::
- text "Keep this quiet."
-
- para "It's rumored that"
- line "this place is run"
- cont "by TEAM ROCKET."
- done
-
-_CeladonGameCornerText4::
- text "I think these"
- line "machines have"
- cont "different odds."
- done
-
-_CeladonGameCornerText_48d9c::
- text "Kid, do you want"
- line "to play?"
- prompt
-
-_Received10CoinsText::
- text "<PLAYER> received"
- line "10 coins!@@"
-
-_CeladonGameCornerText_48da7::
- text "You don't need my"
- line "coins!"
- done
-
-_CeladonGameCornerText_48dac::
- text "Wins seem to come"
- line "and go."
- done
-
-_CeladonGameCornerText6::
- text "I'm having a"
- line "wonderful time!"
- done
-
-_CeladonGameCornerText_48dca::
- text "Hey!"
-
- para "You have better"
- line "things to do,"
- cont "champ in making!"
-
- para "CELADON GYM's"
- line "LEADER is ERIKA!"
- cont "She uses grass-"
- cont "type #MON!"
-
- para "She might appear"
- line "docile, but don't"
- cont "be fooled!"
- done
-
-_CeladonGameCornerText_48dcf::
- text "They offer rare"
- line "#MON that can"
- cont "be exchanged for"
- cont "your coins."
-
- para "But, I just can't"
- line "seem to win!"
- done
-
-_CeladonGameCornerText8::
- text "Games are scary!"
- line "It's so easy to"
- cont "get hooked!"
- done
-
-_CeladonGameCornerText_48e26::
- text "What's up? Want"
- line "some coins?"
- prompt
-
-_Received20CoinsText::
- text "<PLAYER> received"
- line "20 coins!@@"
-
-_CeladonGameCornerText_48e31::
- text "You have lots of"
- line "coins!"
- done
-
-_CeladonGameCornerText_48e36::
- text "Darn! I need more"
- line "coins for the"
- cont "#MON I want!"
- done
-
-_CeladonGameCornerText_48e88::
- text "Hey, what? You're"
- line "throwing me off!"
- cont "Here are some"
- cont "coins, shoo!"
- prompt
-
-_CeladonGameCornerText_48e8d::
- text "<PLAYER> received"
- line "20 coins!@@"
-
-_CeladonGameCornerText_48e93::
- text "You've got your"
- line "own coins!"
- done
-
-_CeladonGameCornerText_48e98::
- text "The trick is to"
- line "watch the reels"
- cont "closely!"
- done
-
-_CeladonGameCornerText_48ece::
- text "I'm guarding this"
- line "poster!"
- cont "Go away, or else!"
- done
-
-_CeladonGameCornerText_48ed3::
- text "Dang!"
- prompt
-
-_CeladonGameCornerText_48ed8::
- text "Our hideout might"
- line "be discovered! I"
- cont "better tell BOSS!"
- done
-
-_CeladonGameCornerText_48f09::
- text "Hey!"
-
- para "A switch behind"
- line "the poster!?"
- cont "Let's push it!@@"
diff --git a/text/maps/LancesRoom.asm b/text/maps/LancesRoom.asm
deleted file mode 100644
index e47b006e..00000000
--- a/text/maps/LancesRoom.asm
+++ /dev/null
@@ -1,63 +0,0 @@
-_LanceBeforeBattleText::
- text "Ah! I heard about"
- line "you, <PLAYER>!"
-
- para "I lead the ELITE"
- line "FOUR! You can"
- cont "call me LANCE the"
- cont "dragon trainer!"
-
- para "You know that"
- line "dragons are"
- cont "mythical #MON!"
-
- para "They're hard to"
- line "catch and raise,"
- cont "but their powers"
- cont "are superior!"
-
- para "They're virtually"
- line "indestructible!"
-
- para "Well, are you"
- line "ready to lose?"
-
- para "Your LEAGUE"
- line "challenge ends"
- cont "with me, <PLAYER>!"
- done
-
-_LanceEndBattleText::
- text "That's it!"
-
- para "I hate to admit"
- line "it, but you are a"
- cont "#MON master!"
- prompt
-
-_LanceAfterBattleText::
- text "I still can't"
- line "believe my"
- cont "dragons lost to"
- cont "you, <PLAYER>!"
-
- para "You are now the"
- line "#MON LEAGUE"
- cont "champion!"
-
- para "...Or, you would"
- line "have been, but"
- cont "you have one more"
- cont "challenge ahead."
-
- para "You have to face"
- line "another trainer!"
- cont "His name is..."
-
- para "<RIVAL>!"
- line "He beat the ELITE"
- cont "FOUR before you!"
-
- para "He is the real"
- line "#MON LEAGUE"
- cont "champion!@@"
diff --git a/text/maps/LavenderCuboneHouse.asm b/text/maps/LavenderCuboneHouse.asm
deleted file mode 100644
index 66cc85a5..00000000
--- a/text/maps/LavenderCuboneHouse.asm
+++ /dev/null
@@ -1,24 +0,0 @@
-_LavenderHouse2Text1::
- text "CUBONE: Kyarugoo!@@"
-
-_LavenderHouse2Text_1d9dc::
- text "I hate those"
- line "horrible ROCKETs!"
-
- para "That poor CUBONE's"
- line "mother..."
-
- para "It was killed"
- line "trying to escape"
- cont "from TEAM ROCKET!"
- done
-
-_LavenderHouse2Text_1d9e1::
- text "The GHOST of"
- line "#MON TOWER is"
- cont "gone!"
-
- para "Someone must have"
- line "soothed its"
- cont "restless soul!"
- done
diff --git a/text/maps/MrFujisHouse.asm b/text/maps/MrFujisHouse.asm
deleted file mode 100644
index f903eb6a..00000000
--- a/text/maps/MrFujisHouse.asm
+++ /dev/null
@@ -1,86 +0,0 @@
-_LavenderHouse1Text_1d8d1::
- text "That's odd, MR.FUJI"
- line "isn't here."
- cont "Where'd he go?"
- done
-
-_LavenderHouse1Text_1d8d6::
- text "MR.FUJI had been"
- line "praying alone for"
- cont "CUBONE's mother."
- done
-
-_LavenderHouse1Text_1d8f4::
- text "This is really"
- line "MR.FUJI's house."
-
- para "He's really kind!"
-
- para "He looks after"
- line "abandoned and"
- cont "orphaned #MON!"
- done
-
-_LavenderHouse1Text_1d8f9::
- text "It's so warm!"
- line "#MON are so"
- cont "nice to hug!"
- done
-
-_LavenderHouse1Text3::
- text "PSYDUCK: Gwappa!@@"
-
-_LavenderHouse1Text4::
- text "NIDORINO: Gaoo!@@"
-
-_LavenderHouse1Text_1d94c::
- text "MR.FUJI: <PLAYER>."
-
- para "Your #DEX quest"
- line "may fail without"
- cont "love for your"
- cont "#MON."
-
- para "I think this may"
- line "help your quest."
- prompt
-
-_ReceivedFluteText::
- text "<PLAYER> received"
- line "a @"
- TX_RAM wcf4b
- text "!@@"
-
-_FluteExplanationText::
- text ""
-
- para "Upon hearing #"
- line "FLUTE, sleeping"
- cont "#MON will"
- cont "spring awake."
-
- para "It works on all"
- line "sleeping #MON."
- done
-
-_FluteNoRoomText::
- text "You must make"
- line "room for this!"
- done
-
-_MrFujiAfterFluteText::
- text "MR.FUJI: Has my"
- line "FLUTE helped you?"
- done
-
-_LavenderHouse1Text6::
- text "#MON Monthly"
- line "Grand Prize"
- cont "Drawing!"
-
- para "The application"
- line "form is..."
-
- para "Gone! It's been"
- line "clipped out!"
- done
diff --git a/text/maps/MrPsychicsHouse.asm b/text/maps/MrPsychicsHouse.asm
deleted file mode 100644
index 7be2e11e..00000000
--- a/text/maps/MrPsychicsHouse.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-_TM29PreReceiveText::
- text "...Wait! Don't"
- line "say a word!"
-
- para "You wanted this!"
- prompt
-
-_ReceivedTM29Text::
- text "<PLAYER> received"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_TM29ExplanationText::
- text "TM29 is PSYCHIC!"
-
- para "It can lower the"
- line "target's SPECIAL"
- cont "abilities."
- done
-
-_TM29NoRoomText::
- text "Where do you plan"
- line "to put this?"
- done
diff --git a/text/maps/MtMoonB1F.asm b/text/maps/MtMoonB1F.asm
deleted file mode 100644
index 755fa583..00000000
--- a/text/maps/MtMoonB1F.asm
+++ /dev/null
@@ -1,3 +0,0 @@
-_MtMoonText1::
- text ""
- done
diff --git a/text/maps/MtMoonB2F.asm b/text/maps/MtMoonB2F.asm
deleted file mode 100644
index ab5da5a6..00000000
--- a/text/maps/MtMoonB2F.asm
+++ /dev/null
@@ -1,125 +0,0 @@
-_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!@@"
-
-_MtMoon3Text_49f24::
- text "You want the"
- line "DOME FOSSIL?"
- done
-
-_MtMoon3Text_49f64::
- text "You want the"
- line "HELIX FOSSIL?"
- done
-
-_MtMoon3Text_49f6f::
- text "<PLAYER> got the"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_MtMoon3Text_49f7f::
- text "Look, you've got"
- line "no room for this.@@"
-
-_MtMoon3Text_49f85::
- text "Hey, stop!"
-
- para "I found these"
- line "fossils! They're"
- cont "both mine!"
- done
-
-_MtMoon3Text_49f8a::
- text "OK!"
- line "I'll share!"
- prompt
-
-_MtMoon3Text_49f8f::
- text "We'll each take"
- line "one!"
- cont "No being greedy!"
- done
-
-_MtMoon3Text_49f94::
- text "Far away, on"
- line "CINNABAR ISLAND,"
- cont "there's a #MON"
- cont "LAB."
-
- para "They do research"
- line "on regenerating"
- cont "fossils."
- done
-
-_MtMoon3Text_49f99::
- text "All right. Then"
- line "this is mine!@@"
-
-_MtMoon3BattleText3::
- text "We, TEAM ROCKET,"
- line "are #MON"
- cont "gangsters!"
- done
-
-_MtMoon3EndBattleText3::
- text "I blew"
- line "it!"
- prompt
-
-_MtMoon3AfterBattleText3::
- text "Darn it all! My"
- line "associates won't"
- cont "stand for this!"
- done
-
-_MtMoon3BattleText4::
- text "We're pulling a"
- line "big job here!"
- cont "Get lost, kid!"
- done
-
-_MtMoon3EndBattleText4::
- text "So, you"
- line "are good."
- prompt
-
-_MtMoon3AfterBattleText4::
- text "If you find a"
- line "fossil, give it"
- cont "to me and scram!"
- done
-
-_MtMoon3BattleText5::
- text "Little kids"
- line "should leave"
- cont "grown-ups alone!"
- done
-
-_MtMoon3EndBattleText5::
- text "I'm"
- line "steamed!"
- prompt
-
-_MtMoon3AfterBattleText5::
- text "#MON lived"
- line "here long before"
- cont "people came."
- done
diff --git a/text/maps/MtMoonPokecenter.asm b/text/maps/MtMoonPokecenter.asm
deleted file mode 100644
index ab3cf6ed..00000000
--- a/text/maps/MtMoonPokecenter.asm
+++ /dev/null
@@ -1,48 +0,0 @@
-_MtMoonPokecenterText1::
- text "I've 6 # BALLs"
- line "set in my belt."
-
- para "At most, you can"
- line "carry 6 #MON."
- done
-
-_MtMoonPokecenterText3::
- text "TEAM ROCKET"
- line "attacks CERULEAN"
- cont "citizens..."
-
- para "TEAM ROCKET is"
- line "always in the"
- cont "news!"
- done
-
-_MtMoonPokecenterText5::
- text ""
- done
-
-_MagikarpSalesmanText1::
- text "MAN: Hello, there!"
- line "Have I got a deal"
- cont "just for you!"
-
- para "I'll let you have"
- line "a swell MAGIKARP"
- cont "for just ¥500!"
- cont "What do you say?"
- done
-
-_MagikarpSalesmanNoText::
- text "No? I'm only"
- line "doing this as a"
- cont "favor to you!"
- done
-
-_MagikarpSalesmanNoMoneyText::
- text "You'll need more"
- line "money than that!"
- done
-
-_MagikarpSalesmanText2::
- text "MAN: Well, I don't"
- line "give refunds!"
- done
diff --git a/text/maps/Museum1F.asm b/text/maps/Museum1F.asm
deleted file mode 100644
index ecb511aa..00000000
--- a/text/maps/Museum1F.asm
+++ /dev/null
@@ -1,107 +0,0 @@
-_Museum1FText_5c21a::
- text "Come again!"
- done
-
-_Museum1FText_5c21f::
- text "It's ¥50 for a"
- line "child's ticket."
-
- para "Would you like to"
- line "come in?"
- done
-
-_Museum1FText_5c224::
- text "Right, ¥50!"
- line "Thank you!"
- done
-
-_Museum1FText_5c229::
- text "You don't have"
- line "enough money."
- prompt
-
-_Museum1FText_5c22e::
- text "You can't sneak"
- line "in the back way!"
-
- para "Oh, whatever!"
- line "Do you know what"
- cont "AMBER is?"
- done
-
-_Museum1FText_5c233::
- text "There's a lab"
- line "somewhere trying"
- cont "to resurrect"
- cont "ancient #MON"
- cont "from AMBER."
- done
-
-_Museum1FText_5c238::
- text "AMBER is fossil-"
- line "ized tree sap."
- done
-
-_Museum1FText_5c23d::
- text "Please go to the"
- line "other side!"
- done
-
-_Museum1FText_5c242::
- text "Take plenty of"
- line "time to look!"
- done
-
-_Museum1FText_5c251::
- text "That is one"
- line "magnificent"
- cont "fossil!"
- done
-
-_Museum1FText_5c28e::
- text "Ssh! I think that"
- line "this chunk of"
- cont "AMBER contains"
- cont "#MON DNA!"
-
- para "It would be great"
- line "if #MON could"
- cont "be resurrected"
- cont "from it!"
-
- para "But, my colleagues"
- line "just ignore me!"
-
- para "So, I have a favor"
- line "to ask!"
-
- para "Take this to a"
- line "#MON LAB and"
- cont "get it examined!"
- prompt
-
-_ReceivedOldAmberText::
- text "<PLAYER> received"
- line "OLD AMBER!@@"
-
-_Museum1FText_5c299::
- text "Ssh! Get the OLD"
- line "AMBER checked!"
- done
-
-_Museum1FText_5c29e::
- text "You don't have"
- line "space for this!"
- done
-
-_Museum1FText_5c2ad::
- text "We are proud of 2"
- line "fossils of very"
- cont "rare, prehistoric"
- cont "#MON!"
- done
-
-_Museum1FText_5c2bc::
- text "The AMBER is"
- line "clear and gold!"
- done
diff --git a/text/maps/NameRatersHouse.asm b/text/maps/NameRatersHouse.asm
deleted file mode 100644
index 7194a927..00000000
--- a/text/maps/NameRatersHouse.asm
+++ /dev/null
@@ -1,60 +0,0 @@
-_NameRaterText_1dab3::
- text "Hello, hello!"
- line "I am the official"
- cont "NAME RATER!"
-
- para "Want me to rate"
- line "the nicknames of"
- cont "your #MON?"
- done
-
-_NameRaterText_1dab8::
- text "Which #MON"
- line "should I look at?"
- prompt
-
-_NameRaterText_1dabd::
- TX_RAM wcd6d
- text ", is it?"
- line "That is a decent"
- cont "nickname!"
-
- para "But, would you"
- line "like me to give"
- cont "it a nicer name?"
-
- para "How about it?"
- done
-
-_NameRaterText_1dac2::
- text "Fine! What should"
- line "we name it?"
- prompt
-
-_NameRaterText_1dac7::
- text "OK! This #MON"
- line "has been renamed"
- cont "@"
- TX_RAM wBuffer
- text "!"
-
- para "That's a better"
- line "name than before!"
- done
-
-_NameRaterText_1dacc::
- text "Fine! Come any-"
- line "time you like!"
- done
-
-_NameRaterText_1dad1::
- TX_RAM wcd6d
- text ", is it?"
- line "That is a truly"
- cont "impeccable name!"
-
- para "Take good care of"
- line "@"
- TX_RAM wcd6d
- text "!"
- done
diff --git a/text/maps/OaksLab.asm b/text/maps/OaksLab.asm
deleted file mode 100644
index 097fa931..00000000
--- a/text/maps/OaksLab.asm
+++ /dev/null
@@ -1,396 +0,0 @@
-_OaksLabGaryText1::
- text "<RIVAL>: Yo"
- line "<PLAYER>! Gramps"
- cont "isn't around!"
-
- para "I ran here 'cos"
- line "he said he had a"
- cont "#MON for me."
- done
-
-_OaksLabText40::
- text "<RIVAL>: Humph!"
- line "I'll get a better"
- cont "#MON than you!"
- done
-
-_OaksLabText41::
- text "<RIVAL>: Heh, my"
- line "#MON looks a"
- cont "lot stronger."
- done
-
-_OaksLabText39::
- text "That's a #"
- line "BALL. There's a"
- cont "#MON inside!"
- done
-
-_OaksLabPikachuText::
- text "OAK: Go ahead,"
- line "it's yours!"
- done
-
-_OaksLabText_1d2f5::
- text "OAK: If a wild"
- line "#MON appears,"
- cont "your #MON can"
- cont "fight against it!"
-
- para "Afterward, go on"
- line "to the next town."
- done
-
-_OaksLabText_1d2fa::
- text "OAK: You should"
- line "talk to it and"
- cont "see how it feels."
- done
-
-_OaksLabDeliverParcelText1::
- text "OAK: Oh, <PLAYER>!"
-
- para "How is my old"
- line "#MON?"
-
- para "Well, it seems to"
- line "like you a lot."
-
- para "You must be"
- line "talented as a"
- cont "#MON trainer!"
-
- para "What? You have"
- line "something for me?"
-
- para "<PLAYER> delivered"
- line "OAK's PARCEL.@@"
-
-_OaksLabDeliverParcelText2::
- text ""
- para "Ah! This is the"
- line "custom # BALL"
- cont "I ordered!"
- cont "Thanks, <PLAYER>!"
-
- para "By the way, I must"
- line "ask you to do"
- cont "something for me."
- done
-
-_OaksLabAroundWorldText::
- text "#MON around the"
- line "world wait for"
- cont "you, <PLAYER>!"
- done
-
-_OaksLabGivePokeballsText1::
- text "OAK: You can't get"
- line "detailed data on"
- cont "#MON by just"
- cont "seeing them."
-
- para "You must catch"
- line "them! Use these"
- cont "to capture wild"
- cont "#MON."
-
- para "<PLAYER> got 5"
- line "# BALLs!@@"
-
-_OaksLabGivePokeballsText2::
- text ""
- para "When a wild"
- line "#MON appears,"
- cont "it's fair game."
-
- para "Just like I showed"
- line "you, throw a #"
- cont "BALL at it and try"
- cont "to catch it!"
-
- para "This won't always"
- line "work, though."
-
- para "A healthy #MON"
- line "could escape. You"
- cont "have to be lucky!"
- done
-
-_OaksLabPleaseVisitText::
- text "OAK: Come see me"
- line "sometimes."
-
- para "I want to know how"
- line "your #DEX is"
- cont "coming along."
- done
-
-_OaksLabText_1d31d::
- text "OAK: Good to see "
- line "you! How is your "
- cont "#DEX coming? "
- cont "Here, let me take"
- cont "a look!"
- prompt
-
-_OaksLabText_1d32c::
- text "It's encyclopedia-"
- line "like, but the"
- cont "pages are blank!"
- done
-
-_OaksLabText8::
- text "?"
- done
-
-_OaksLabText_1d340::
- text "PROF.OAK is the"
- line "authority on"
- cont "#MON!"
-
- para "Many #MON"
- line "trainers hold him"
- cont "in high regard!"
- done
-
-_OaksLabRivalWaitingText::
- text "<RIVAL>: Gramps!"
- line "I'm fed up with"
- cont "waiting!"
- done
-
-_OaksLabChooseMonText::
- text "OAK: Hmm? <RIVAL>?"
- 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, <PLAYER>! 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
-
-_OaksLabRivalInterjectionText::
- text "<RIVAL>: Hey!"
- line "Gramps! What"
- cont "about me?"
- done
-
-_OaksLabBePatientText::
- text "OAK: Be patient,"
- line "<RIVAL>, I'll give"
- cont "you one later."
- done
-
-_OaksLabRivalTakesText1::
- text "<RIVAL>: No way!"
- line "<PLAYER>, I want"
- cont "this #MON!"
- prompt
-
-_OaksLabRivalTakesText2::
- text "<RIVAL> snatched"
- line "the #MON!@@"
-
-_OaksLabRivalTakesText3::
- text "OAK: <RIVAL>! What"
- line "are you doing?"
- prompt
-
-_OaksLabRivalTakesText4::
- text "<RIVAL>: 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 "<PLAYER>, come over"
- line "here."
- done
-
-_OaksLabOakGivesText::
- text "OAK: <PLAYER>, 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 "<PLAYER> received"
- line "a @"
- TX_RAM wcd6d
- text "!@@"
-
-_OaksLabLeavingText::
- text "OAK: Hey! Don't go"
- line "away yet!"
- done
-
-_OaksLabRivalChallengeText::
- text "<RIVAL>: Wait"
- line "<PLAYER>!"
- cont "Let's check out"
- cont "our #MON!"
-
- para "Come on, I'll take"
- line "you on!"
- done
-
-_OaksLabText_1d3be::
- text "WHAT?"
- line "Unbelievable!"
- cont "I picked the"
- cont "wrong #MON!"
- prompt
-
-_OaksLabText_1d3c3::
- text "<RIVAL>: Yeah! Am"
- line "I great or what?"
- prompt
-
-_OaksLabRivalToughenUpText::
- text "<RIVAL>: Okay!"
- line "I'll make my"
- cont "#MON fight to"
- cont "toughen it up!"
-
- para "<PLAYER>! Gramps!"
- line "Smell you later!"
- done
-
-_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
-
-_OaksLabText21::
- text "<RIVAL>: Gramps!"
- done
-
-_OaksLabText22::
- text "<RIVAL>: Gramps,"
- line "my #MON has"
- cont "grown stronger!"
- cont "Check it out!"
- done
-
-_OaksLabText23::
- text "OAK: Ah, <RIVAL>,"
- line "good timing!"
-
- para "I needed to ask"
- line "both of you to do"
- cont "something for me."
- done
-
-_OaksLabText24::
- text "On the desk there"
- line "is my invention,"
- cont "#DEX!"
-
- para "It automatically"
- line "records data on"
- cont "#MON you've"
- cont "seen or caught!"
-
- para "It's a hi-tech"
- line "encyclopedia!"
- done
-
-_OaksLabText25::
- text "OAK: <PLAYER> and"
- line "<RIVAL>! Take"
- cont "these with you!"
-
- para "<PLAYER> got"
- line "#DEX from OAK!@@"
-
-_OaksLabText26::
- text "To make a complete"
- line "guide on all the"
- cont "#MON in the"
- cont "world..."
-
- para "That was my dream!"
-
- para "But, I'm too old!"
- line "I can't do it!"
-
- para "So, I want you two"
- line "to fulfill my"
- cont "dream for me!"
-
- para "Get moving, you"
- line "two!"
-
- para "This is a great"
- line "undertaking in"
- cont "#MON history!"
- done
-
-_OaksLabText27::
- text "<RIVAL>: Alright"
- line "Gramps! Leave it"
- cont "all to me!"
-
- para "<PLAYER>, I hate to"
- line "say it, but I"
- cont "don't need you!"
-
- para "I know! I'll"
- line "borrow a TOWN MAP"
- cont "from my sis!"
-
- para "I'll tell her not"
- line "to lend you one,"
- cont "<PLAYER>! Hahaha!"
- done
-
-_OaksLabText_1d405::
- text "I study #MON as"
- line "PROF.OAK's AIDE."
- done
diff --git a/text/maps/PalletTown.asm b/text/maps/PalletTown.asm
deleted file mode 100644
index 9ca8dc93..00000000
--- a/text/maps/PalletTown.asm
+++ /dev/null
@@ -1,67 +0,0 @@
-_OakAppearsText::
- text "OAK: Hey! Wait!"
- line "Don't go out!@@"
-
-_OakWalksUpText::
- text "OAK: That was"
- line "close!"
-
- para "Wild #MON live"
- line "in tall grass!"
- done
-
-_OakWhewText::
- text "OAK: Whew..."
- done
-
-_OakGrassText::
- text "OAK: A #MON can"
- line "appear anytime in"
- cont "tall grass."
-
- para "You need your own"
- line "#MON for your"
- cont "protection."
- cont "I know!"
-
- para "Here, come with"
- line "me!"
- done
-
-_PalletTownText2::
- text "I'm raising"
- line "#MON too!"
-
- para "When they get"
- line "strong, they can"
- cont "protect me!"
- done
-
-_PalletTownText3::
- text "Technology is"
- line "incredible!"
-
- para "You can now store"
- line "and recall items"
- cont "and #MON as"
- cont "data via PC!"
- done
-
-_PalletTownText4::
- text "OAK #MON"
- line "RESEARCH LAB"
- done
-
-_PalletTownText5::
- text "PALLET TOWN"
- line "Shades of your"
- cont "journey await!"
- done
-
-_PalletTownText6::
- text "<PLAYER>'s house "
- done
-
-_PalletTownText7::
- text "<RIVAL>'s house "
- done
diff --git a/text/maps/PewterGym.asm b/text/maps/PewterGym.asm
deleted file mode 100644
index 0e156577..00000000
--- a/text/maps/PewterGym.asm
+++ /dev/null
@@ -1,184 +0,0 @@
-_PewterGymText_5c49e::
- text "I'm BROCK!"
- line "I'm PEWTER's GYM"
- cont "LEADER!"
-
- para "I believe in rock"
- line "hard defense and"
- cont "determination!"
-
- para "That's why my"
- line "#MON are all"
- cont "the rock-type!"
-
- para "Do you still want"
- line "to challenge me?"
- cont "Fine then! Show"
- cont "me your best!"
- done
-
-_PewterGymText_5c4a3::
- text "There are all"
- line "kinds of trainers"
- cont "in the world!"
-
- 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
-
-_TM34PreReceiveText::
- text "Wait! Take this"
- line "with you!"
- done
-
-_ReceivedTM34Text::
- text "<PLAYER> received"
- line "TM34!@@"
-
-_TM34ExplanationText::
- text ""
-
- para "A TM contains a"
- line "technique that"
- cont "can be taught to"
- cont "#MON!"
-
- para "A TM is good only"
- line "once! So when you"
- cont "use one to teach"
- cont "a new technique,"
- cont "pick the #MON"
- cont "carefully!"
-
- para "TM34 contains"
- line "BIDE!"
-
- para "Your #MON will"
- line "absorb damage in"
- cont "battle then pay"
- cont "it back double!"
- done
-
-_TM34NoRoomText::
- text "You don't have"
- line "room for this!"
- done
-
-_PewterGymText_5c4bc::
- text "I took"
- line "you for granted."
-
- para "As proof of your"
- line "victory, here's"
- cont "the BOULDERBADGE!"
-
- para "<PLAYER> received"
- line "the BOULDERBADGE!@@"
-
-_PewterGymText_5c4c1::
- text ""
-
- para "That's an official"
- line "#MON LEAGUE"
- cont "BADGE!"
-
- para "Its bearer's"
- line "#MON become"
- cont "more powerful!"
-
- para "The technique"
- line "FLASH can now be"
- cont "used anytime!"
- prompt
-
-_PewterGymBattleText1::
- text "Stop right there,"
- line "kid!"
-
- para "You're still light"
- line "years from facing"
- cont "BROCK!"
- done
-
-_PewterGymEndBattleText1::
- text "Darn!"
-
- para "Light years isn't"
- line "time! It measures"
- cont "distance!"
- prompt
-
-_PewterGymAfterBattleText1::
- text "You're pretty hot,"
- line "but not as hot"
- cont "as BROCK!"
- done
-
-_PewterGymText_5c515::
- text "Hiya! I can tell"
- line "you have what it"
- cont "takes to become a"
- cont "#MON champ!"
-
- para "I'm no trainer,"
- line "but I can tell"
- cont "you how to win!"
-
- para "Let me take you"
- line "to the top!"
- done
-
-_PewterGymText_5c51a::
- text "All right! Let's"
- line "get happening!"
- prompt
-
-_PewterGymText_5c51f::
- text "The 1st #MON"
- line "out in a match is"
- cont "at the top of the"
- cont "#MON LIST!"
-
- para "By changing the"
- line "order of #MON,"
- cont "matches could be"
- cont "made easier!"
- done
-
-_PewterGymText_5c524::
- text "It's a free"
- line "service! Let's"
- cont "get happening!"
- prompt
-
-_PewterGymText_5c529::
- text "Just as I thought!"
- line "You're #MON"
- cont "champ material!"
- done
-
-_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
diff --git a/text/maps/PewterNidoranHouse.asm b/text/maps/PewterNidoranHouse.asm
deleted file mode 100644
index 450e8372..00000000
--- a/text/maps/PewterNidoranHouse.asm
+++ /dev/null
@@ -1,24 +0,0 @@
-_PewterHouse1Text1::
- text "NIDORAN: Bowbow!@@"
-
-_PewterHouse1Text2::
- text "NIDORAN sit!"
- done
-
-_PewterHouse1Text3::
- text "Our #MON's an"
- line "outsider, so it's"
- cont "hard to handle."
-
- para "An outsider is a"
- line "#MON that you"
- cont "get in a trade."
-
- para "It grows fast, but"
- line "it may ignore an"
- cont "unskilled trainer"
- cont "in battle!"
-
- para "If only we had"
- line "some BADGEs..."
- done
diff --git a/text/maps/PokemonFanClub.asm b/text/maps/PokemonFanClub.asm
deleted file mode 100644
index 5fcd469d..00000000
--- a/text/maps/PokemonFanClub.asm
+++ /dev/null
@@ -1,178 +0,0 @@
-PikachuFanText::
- text "Won't you admire"
- line "my CLEFAIRY's"
- cont "adorable tail?"
- done
-
-PikachuFanBetterText::
- text "Humph! My CLEFAIRY"
- line "is twice as cute"
- cont "as that one!"
- done
-
-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
-
-SeelFanText::
- text "I just love my"
- line "SEEL!"
-
- para "It squeals when I"
- line "hug it!"
- done
-
-SeelFanBetterText::
- text "Oh dear!"
-
- para "My SEEL is far"
- line "more attractive!"
- done
-
-SeelFanPrintText::
- text "I'm going to hook"
- line "up the cable to"
- cont "get a photo PRINT"
- cont "of my SEEL!"
- done
-
-FanClubPikachuText::
- text "CLEFAIRY: Pippii!"
- done
-
-FanClubSeelText::
- text "SEEL: Kyuoo!"
- done
-
-FanClubMeetChairText::
- text "I chair the"
- line "#MON Fan Club!"
-
- para "I have more than"
- line "100 #MON. I"
- cont "love them all!"
-
- para "I'm very fussy"
- line "when it comes to"
- cont "#MON!"
-
- para "So..."
-
- para "Did you come to"
- line "hear me brag"
- cont "about my #MON?"
- done
-
-FanClubChairStoryText::
- text "Good!"
- line "Then listen up!"
-
- para "My favorite"
- line "RAPIDASH..."
-
- para "It...cute..."
- line "lovely...smart..."
- cont "plus...amazing..."
- cont "you think so?..."
- cont "oh yes...it..."
- cont "stunning..."
- cont "kindly..."
- cont "love it!"
-
- para "Hug it...when..."
- line "sleeping...warm"
- cont "and cuddly..."
- cont "spectacular..."
- cont "ravishing..."
- cont "...Oops! Look at"
- cont "the time! I kept"
- cont "you too long!"
-
- para "Thanks for hearing"
- line "me out! I want"
- cont "you to have this!"
- prompt
-
-ReceivedBikeVoucherText::
- text "<PLAYER> received"
- line "a @"
- TX_RAM wcf4b
- text "!@@"
-
-ExplainBikeVoucherText::
- text ""
- para "Exchange that for"
- line "a BICYCLE!"
-
- para "Don't worry, my"
- line "FEAROW will FLY"
- cont "me anywhere!"
-
- para "So, I don't need a"
- line "BICYCLE!"
-
- para "I hope you like"
- line "cycling!"
- done
-
-FanClubNoStoryText::
- text "Oh. Come back"
- line "when you want to"
- cont "hear my story!"
- done
-
-FanClubChairFinalText::
- text "Hello, <PLAYER>!"
-
- para "Did you come see"
- line "me about my"
- cont "#MON again?"
-
- para "No? Too bad!"
- done
-
-FanClubBagFullText::
- text "Make room for"
- line "this!"
- done
-
-FanClubChairPrintText1::
- text "Hi there, <PLAYER>!"
- 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
-
-_FanClubText6::
- text "Our CHAIRMAN is"
- line "very vocal about"
- cont "#MON."
- done
diff --git a/text/maps/PokemonTower7F.asm b/text/maps/PokemonTower7F.asm
deleted file mode 100644
index 652cf37a..00000000
--- a/text/maps/PokemonTower7F.asm
+++ /dev/null
@@ -1,49 +0,0 @@
-_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!@@"
-
-_TowerRescueFujiText::
- text "MR.FUJI: Heh? You"
- line "came to save me?"
-
- para "Thank you. But, I"
- line "came here of my"
- cont "own free will."
-
- para "I came to calm"
- line "the soul of"
- cont "CUBONE's mother."
-
- para "I think MAROWAK's"
- line "spirit has gone"
- cont "to the afterlife."
-
- para "I must thank you"
- line "for your kind"
- cont "concern!"
-
- para "Follow me to my"
- line "home, #MON"
- cont "HOUSE at the foot"
- cont "of this tower."
- done
diff --git a/text/maps/PowerPlant.asm b/text/maps/PowerPlant.asm
deleted file mode 100644
index e5df6674..00000000
--- a/text/maps/PowerPlant.asm
+++ /dev/null
@@ -1,6 +0,0 @@
-_VoltorbBattleText::
- text "Bzzzt!"
- done
-
-_ZapdosBattleText::
- text "Gyaoo!@@"
diff --git a/text/maps/RocketHideoutB1F.asm b/text/maps/RocketHideoutB1F.asm
deleted file mode 100644
index 36117804..00000000
--- a/text/maps/RocketHideoutB1F.asm
+++ /dev/null
@@ -1,73 +0,0 @@
-_RocketHideout1EndBattleText6::
- text "Why...?@@"
-
-_RocketHideout1BattleText2::
- text "Who are you? How"
- line "did you get here?"
- done
-
-_RocketHideout1EndBattleText2::
- text "Oww!"
- line "Beaten!"
- prompt
-
-_RocketHideout1AfterBattleTxt2::
- text "Are you dissing"
- line "TEAM ROCKET?"
- done
-
-_RocketHideout1BattleText3::
- text "You broke into"
- line "our operation?"
- done
-
-_RocketHideout1EndBattleText3::
- text "Burnt!"
- prompt
-
-_RocketHideout1AfterBattleTxt3::
- text "You're not going"
- line "to get away with"
- cont "this, brat!"
- done
-
-_RocketHideout1BattleText4::
- text "Intruder alert!"
- done
-
-_RocketHideout1EndBattleText4::
- text "I"
- line "can't do it!"
- prompt
-
-_RocketHideout1AfterBattleTxt4::
- text "SILPH SCOPE?"
- line "I don't know"
- cont "where it is!"
- done
-
-_RocketHideout1BattleText5::
- text "Why did you come"
- line "here?"
- done
-
-_RocketHideout1EndBattleText5::
- text "This"
- line "won't do!"
- prompt
-
-_RocketHideout1AfterBattleTxt5::
- text "OK, I'll talk!"
- line "Take the elevator"
- cont "to see my BOSS!"
- done
-
-_RocketHideout1BattleText6::
- text "Are you lost, you"
- line "little rat?"
- done
-
-_RocketHideout1AfterBattleTxt6::
- text "Uh-oh, that fight"
- line "opened the door!"
- done
diff --git a/text/maps/RocketHideoutB4F.asm b/text/maps/RocketHideoutB4F.asm
deleted file mode 100644
index d9e13457..00000000
--- a/text/maps/RocketHideoutB4F.asm
+++ /dev/null
@@ -1,65 +0,0 @@
-_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!@@"
-
-_RocketHideout4Text_4557a::
- text "So! I must say, I"
- line "am impressed you"
- cont "got here!"
- done
-
-_RocketHideout4Text_4557f::
- text "WHAT!"
- line "This cannot be!"
- prompt
-
-_RocketHideout4Text_45584::
- text "I see that you"
- line "raise #MON"
- cont "with utmost care."
-
- para "A child like you"
- line "would never"
- cont "understand what I"
- cont "hope to achieve."
-
- para "I shall step"
- line "aside this time!"
-
- para "I hope we meet"
- line "again..."
- done
-
-_RocketHideout4BattleText4::
- text "The elevator"
- line "doesn't work? Who"
- cont "has the LIFT KEY?"
- done
-
-_RocketHideout4EndBattleText4::
- text "No!"
- prompt
-
-_RocketHideout4Text_455ec::
- text "Oh no! I dropped"
- line "the LIFT KEY!"
- done
diff --git a/text/maps/RocketHideoutElevator.asm b/text/maps/RocketHideoutElevator.asm
deleted file mode 100644
index 6f2aa638..00000000
--- a/text/maps/RocketHideoutElevator.asm
+++ /dev/null
@@ -1,3 +0,0 @@
-_RocketElevatorText_4578b::
- text "It appears to"
- line "need a key.@@"
diff --git a/text/maps/Route1.asm b/text/maps/Route1.asm
deleted file mode 100644
index 73188f09..00000000
--- a/text/maps/Route1.asm
+++ /dev/null
@@ -1,49 +0,0 @@
-_Route1ViridianMartSampleText::
- text "Hi! I work at a"
- line "#MON MART."
-
- para "It's a convenient"
- line "shop, so please"
- cont "visit us in"
- cont "VIRIDIAN CITY."
-
- para "I know, I'll give"
- line "you a sample!"
- cont "Here you go!"
- prompt
-
-_Route1Text_1cae8::
- text "<PLAYER> got"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_Route1Text_1caee::
- text "We also carry"
- line "# BALLs for"
- cont "catching #MON!"
- done
-
-_Route1Text_1caf3::
- text "You have too much"
- line "stuff with you!"
- done
-
-_Route1Text2::
- text "See those ledges"
- line "along the road?"
-
- para "It's a bit scary,"
- line "but you can jump"
- cont "from them."
-
- para "You can get back"
- line "to PALLET TOWN"
- cont "quicker that way."
- done
-
-_Route1Text3::
- text "ROUTE 1"
- line "PALLET TOWN -"
- cont "VIRIDIAN CITY"
- done
diff --git a/text/maps/Route12Gate2F.asm b/text/maps/Route12Gate2F.asm
deleted file mode 100644
index 5994b5ff..00000000
--- a/text/maps/Route12Gate2F.asm
+++ /dev/null
@@ -1,42 +0,0 @@
-_TM39PreReceiveText::
- text "My #MON's"
- line "ashes are stored"
- cont "in #MON TOWER."
-
- para "You can have this"
- line "TM. I don't need"
- cont "it anymore..."
- prompt
-
-_ReceivedTM39Text::
- text "<PLAYER> received"
- line "TM39!@@"
-
-_TM39ExplanationText::
- text "TM39 is a move"
- line "called SWIFT."
-
- para "It's very accurate,"
- line "so use it during"
- cont "battles you can't"
- cont "afford to lose."
- done
-
-_TM39NoRoomText::
- text "You don't have"
- line "room for this."
- done
-
-_Route12GateUpstairsText_495b8::
- text "Looked into the"
- line "binoculars."
-
- para "A man fishing!"
- done
-
-_Route12GateUpstairsText_495c4::
- text "Looked into the"
- line "binoculars."
-
- para "It's #MON TOWER!"
- done
diff --git a/text/maps/Route12SuperRodHouse.asm b/text/maps/Route12SuperRodHouse.asm
deleted file mode 100644
index 7dfaa74f..00000000
--- a/text/maps/Route12SuperRodHouse.asm
+++ /dev/null
@@ -1,61 +0,0 @@
-_Route12HouseText_564c0::
- text "I'm the FISHING"
- line "GURU's brother!"
-
- para "I simply Looove"
- line "fishing!"
-
- para "Do you like to"
- line "fish?"
- done
-
-_Route12HouseText_564c5::
- text "Grand! I like"
- line "your style!"
-
- para "Take this and"
- line "fish, young one!"
-
- para "<PLAYER> received"
- line "a @"
- TX_RAM wcf4b
- text "!@@"
-
-_Route12HouseText_564ca::
- text ""
-
- para "Fishing is a way"
- line "of life!"
-
- para "From the seas to"
- line "rivers, go out"
- cont "and land the big"
- cont "one!"
- done
-
-_Route12HouseText_564cf::
- text "Oh... That's so"
- line "disappointing..."
- done
-
-_Route12HouseText_564d4::
- text "Hello there,"
- line "<PLAYER>!"
-
- para "Use the SUPER ROD"
- line "in any water!"
- cont "You can catch"
- cont "different kinds"
- cont "of #MON."
-
- para "Try fishing"
- line "wherever you can!"
- done
-
-_Route12HouseText_564d9::
- text "Oh no!"
-
- para "I had a gift for"
- line "you, but you have"
- cont "no room for it!"
- done
diff --git a/text/maps/Route15.asm b/text/maps/Route15.asm
deleted file mode 100644
index a23b8500..00000000
--- a/text/maps/Route15.asm
+++ /dev/null
@@ -1,171 +0,0 @@
-_Route15BattleText1::
- text "Let me try out the"
- line "#MON I just"
- cont "got in a trade!"
- done
-
-_Route15EndBattleText1::
- text "Not"
- line "good enough!"
- prompt
-
-_Route15AfterBattleText1::
- text "You can't change"
- line "the nickname of"
- cont "any #MON you"
- cont "get in a trade."
-
- para "Only the Original"
- line "Trainer can."
- done
-
-_Route15BattleText2::
- text "You look gentle,"
- line "so I think I can"
- cont "beat you!"
- done
-
-_Route15EndBattleText2::
- text "No,"
- line "wrong!"
- prompt
-
-_Route15AfterBattleText2::
- text "I'm afraid of"
- line "BIKERs, they look"
- cont "so ugly and mean!"
- done
-
-_Route15BattleText3::
- text "When I whistle, I"
- line "can summon bird"
- cont "#MON!"
- done
-
-_Route15EndBattleText3::
- text "Ow!"
- line "That's tragic!"
- prompt
-
-_Route15AfterBattleText3::
- text "Maybe I'm not cut"
- line "out for battles."
- done
-
-_Route15BattleText4::
- text "Hmm? My birds are"
- line "shivering! You're"
- cont "good, aren't you?"
- done
-
-_Route15EndBattleText4::
- text "Just"
- line "as I thought!"
- prompt
-
-_Route15AfterBattleText4::
- text "Did you know moves"
- line "like EARTHQUAKE"
- cont "don't have any"
- cont "effect on birds?"
- done
-
-_Route15BattleText5::
- text "Oh, you're a"
- line "little cutie!"
- done
-
-_Route15EndBattleText5::
- text "You looked"
- line "so cute too!"
- prompt
-
-_Route15AfterBattleText5::
- text "I forgive you!"
- line "I can take it!"
- done
-
-_Route15BattleText6::
- text "I raise #MON"
- line "because I live"
- cont "alone!"
- done
-
-_Route15EndBattleText6::
- text "I didn't"
- line "ask for this!"
- prompt
-
-_Route15AfterBattleText6::
- text "I just like going"
- line "home to be with"
- cont "my #MON!"
- done
-
-_Route15BattleText7::
- text "Hey kid! C'mon!"
- line "I just got these!"
- done
-
-_Route15EndBattleText7::
- text "Why"
- line "not?"
- prompt
-
-_Route15AfterBattleText7::
- text "You only live"
- line "once, so I live"
- cont "as an outlaw!"
- cont "TEAM ROCKET RULES!"
- done
-
-_Route15BattleText8::
- text "Fork over all your"
- line "cash when you"
- cont "lose to me, kid!"
- done
-
-_Route15EndBattleText8::
- text "That"
- line "can't be true!"
- prompt
-
-_Route15AfterBattleText8::
- text "I was just joking"
- line "about the money!"
- done
-
-_Route15BattleText9::
- text "What's cool?"
- line "Trading #MON!"
- done
-
-_Route15EndBattleText9::
- text "I"
- line "said trade!"
- prompt
-
-_Route15AfterBattleText9::
- text "I trade #MON"
- line "with my friends!"
- done
-
-_Route15BattleText10::
- text "Want to play with"
- line "my #MON?"
- done
-
-_Route15EndBattleText10::
- text "I was"
- line "too impatient!"
- prompt
-
-_Route15AfterBattleText10::
- text "I'll go train with"
- line "weaker people.@@"
-
-_Route15Text12::
- text "ROUTE 15"
- line "West to FUCHSIA"
- cont "CITY"
- done
diff --git a/text/maps/Route16FlyHouse.asm b/text/maps/Route16FlyHouse.asm
deleted file mode 100644
index 77efde87..00000000
--- a/text/maps/Route16FlyHouse.asm
+++ /dev/null
@@ -1,31 +0,0 @@
-_Route16HouseText3::
- text "Oh, you found my"
- line "secret retreat!"
-
- para "Please don't tell"
- line "anyone I'm here."
- cont "I'll make it up"
- cont "to you with this!"
- prompt
-
-_ReceivedHM02Text::
- text "<PLAYER> received"
- line "HM02!@@"
-
-_HM02ExplanationText::
- text "HM02 is FLY."
- line "It will take you"
- cont "back to any town."
-
- para "Put it to good"
- line "use!"
- done
-
-_HM02NoRoomText::
- text "You don't have any"
- line "room for this."
- done
-
-_Route16HouseText_1e652::
- text "FEAROW: Kyueen!"
- done
diff --git a/text/maps/Route22Gate.asm b/text/maps/Route22Gate.asm
deleted file mode 100644
index ce3f6824..00000000
--- a/text/maps/Route22Gate.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-_Route22GateText_1e704::
- text "Only truly skilled"
- line "trainers are"
- cont "allowed through."
-
- para "You don't have the"
- line "BOULDERBADGE yet!@@"
-
-_Route22GateText_1e715::
- text ""
-
- para "The rules are"
- line "rules. I can't"
- cont "let you pass."
- done
-
-_Route22GateText_1e71a::
- text "Oh! That is the"
- line "BOULDERBADGE!"
- cont "Go right ahead!@@"
diff --git a/text/maps/Route23.asm b/text/maps/Route23.asm
deleted file mode 100644
index a7e534de..00000000
--- a/text/maps/Route23.asm
+++ /dev/null
@@ -1,39 +0,0 @@
-_VictoryRoadGuardText1::
- text "You can pass here"
- line "only if you have"
- cont "the @"
- TX_RAM wcd6d
- text "!"
-
- para "You don't have the"
- line "@"
- TX_RAM wcd6d
- text " yet!"
-
- para "You have to have"
- line "it to get to"
- cont "#MON LEAGUE!@@"
-
-_VictoryRoadGuardText2::
- text "You can pass here"
- line "only if you have"
- cont "the @"
- TX_RAM wcd6d
- text "!"
-
- para "Oh! That is the"
- line "@"
- TX_RAM wcd6d
- text "!@@"
-
-_VictoryRoadGuardText_513a3::
- text ""
-
- para "OK then! Please,"
- line "go right ahead!"
- done
-
-_Route23Text8::
- text "VICTORY ROAD GATE"
- line "- #MON LEAGUE"
- done
diff --git a/text/maps/Route24.asm b/text/maps/Route24.asm
deleted file mode 100644
index 0771aea3..00000000
--- a/text/maps/Route24.asm
+++ /dev/null
@@ -1,184 +0,0 @@
-_Route24Text_51510::
- text "Congratulations!"
- line "You beat our 5"
- cont "contest trainers!@@"
-
-_Route24Text_51515::
- text ""
-
- para "You just earned a"
- line "fabulous prize!"
- prompt
-
-_Route24Text_5151a::
- text "<PLAYER> received"
- line "a @"
- TX_RAM wcf4b
- text "!@@"
-
-_Route24Text_51521::
- text "You don't have"
- line "any room!"
- done
-
-_Route24Text_51526::
- text "By the way, would"
- line "you like to join"
- cont "TEAM ROCKET?"
-
- para "We're a group"
- line "dedicated to evil"
- cont "using #MON!"
-
- para "Want to join?"
-
- para "Are you sure?"
-
- para "Come on, join us!"
-
- para "I'm telling you"
- line "to join!"
-
- para "OK, you need"
- line "convincing!"
-
- para "I'll make you an"
- line "offer you can't"
- cont "refuse!"
- done
-
-_Route24Text_5152b::
- text "Arrgh!"
- line "You are good!"
- prompt
-
-_Route24Text_51530::
- text "With your ability,"
- line "you could become"
- cont "a top leader in"
- cont "TEAM ROCKET!"
- done
-
-_Route24BattleText1::
- text "I saw your feat"
- line "from the grass!"
- done
-
-_Route24EndBattleText1::
- text "I"
- line "thought not!"
- prompt
-
-_Route24AfterBattleText1::
- text "I hid because the"
- line "people on the"
- cont "bridge scared me!"
- done
-
-_Route24BattleText2::
- text "OK! I'm No. 5!"
- line "I'll stomp you!"
- done
-
-_Route24EndBattleText2::
- text "Whoa!"
- line "Too much!"
- prompt
-
-_Route24AfterBattleText2::
- text "I did my best, I"
- line "have no regrets!"
- done
-
-_Route24BattleText3::
- text "I'm No. 4!"
- line "Getting tired?"
- done
-
-_Route24EndBattleText3::
- text "I lost"
- line "too!"
- prompt
-
-_Route24AfterBattleText3::
- text "I did my best, so"
- line "I've no regrets!"
- done
-
-_Route24BattleText4::
- text "Here's No. 3!"
- line "I won't be easy!"
- done
-
-_Route24EndBattleText4::
- text "Ow!"
- line "Stomped flat!"
- prompt
-
-_Route24AfterBattleText4::
- text "I did my best, I"
- line "have no regrets!"
- done
-
-_Route24BattleText5::
- text "I'm second!"
- line "Now it's serious!"
- done
-
-_Route24EndBattleText5::
- text "How could I"
- line "lose?"
- prompt
-
-_Route24AfterBattleText5::
- text "I did my best, I"
- line "have no regrets!"
- done
-
-_Route24BattleText6::
- text "This is NUGGET"
- line "BRIDGE! Beat us 5"
- cont "trainers and win"
- cont "a fabulous prize!"
-
- para "Think you got"
- line "what it takes?"
- done
-
-_Route24EndBattleText6::
- text "Whoo!"
- line "Good stuff!"
- prompt
-
-_Route24AfterBattleText6::
- text "I did my best, I"
- line "have no regrets!"
- done
-
-_Route24DamianText1::
- 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
-
-_Route24DamianText2::
- text "Take good care of"
- line "my CHARMANDER!@@"
-
-_Route24DamianText3::
- text "Oh... I'd better"
- line "release it then."
- done
-
-_Route24DamianText4::
- text "How's CHARMANDER"
- line "doing?"
- done
diff --git a/text/maps/SSAnne1FRooms.asm b/text/maps/SSAnne1FRooms.asm
deleted file mode 100644
index 7a09303e..00000000
--- a/text/maps/SSAnne1FRooms.asm
+++ /dev/null
@@ -1,104 +0,0 @@
-_SSAnne8Text8::
- text "WIGGLYTUFF: Puup"
- line "pupuu!@@"
-
-_SSAnne8BattleText1::
- text "I travel alone"
- line "on my journeys!"
-
- para "My #MON are my"
- line "only friends!"
- done
-
-_SSAnne8EndBattleText1::
- text "My, my"
- line "friends..."
- prompt
-
-_SSAnne8AfterBattleText1::
- text "You should be"
- line "nice to friends!"
- done
-
-_SSAnne8BattleText2::
- text "You pup! How dare"
- line "you barge in!"
- done
-
-_SSAnne8EndBattleText2::
- text "Humph!"
- line "You rude child!"
- prompt
-
-_SSAnne8AfterBattleText2::
- text "I wish to be left"
- line "alone! Get out!"
- done
-
-_SSAnne8BattleText3::
- text "I love #MON!"
- line "Do you?"
- done
-
-_SSAnne8EndBattleText3::
- text "Wow! "
- line "You're great!"
- prompt
-
-_SSAnne8AfterBattleText3::
- text "Let me be your"
- line "friend, OK?"
-
- para "Then we can trade"
- line "#MON!"
- done
-
-_SSAnne8BattleText4::
- text "I collected these"
- line "#MON from all"
- cont "around the world!"
- done
-
-_SSAnne8EndBattleText4::
- text "Oh no!"
- line "I went around the"
- cont "world for these!"
- prompt
-
-_SSAnne8AfterBattleText4::
- text "You hurt my poor"
- line "worldly #MON!"
-
- para "I demand that you"
- line "heal them at a"
- cont "#MON CENTER!"
- done
-
-_SSAnne8Text5::
- text "Waiter, I would"
- line "like a cherry pie"
- cont "please!"
- done
-
-_SSAnne8Text6::
- text "A cruise is so"
- line "elegant yet cozy!"
- done
-
-_SSAnne8Text7::
- text "I always travel"
- line "with WIGGLYTUFF!"
- done
-
-_SSAnne8Text9::
- text "We are cruising"
- line "around the world."
- done
-
-_SSAnne8Text11::
- text "Ssh! I'm a GLOBAL"
- line "POLICE agent!"
-
- para "I'm on the trail"
- line "of TEAM ROCKET!"
- done
diff --git a/text/maps/SSAnneB1FRooms.asm b/text/maps/SSAnneB1FRooms.asm
deleted file mode 100644
index 7df629b5..00000000
--- a/text/maps/SSAnneB1FRooms.asm
+++ /dev/null
@@ -1,112 +0,0 @@
-_SSAnne10Text8::
- text "MACHOKE: Gwoh!"
- line "Goggoh!@@"
-
-_SSAnne10BattleText1::
- text "You know what they"
- line "say about sailors"
- cont "and fighting!"
- done
-
-_SSAnne10EndBattleText1::
- text "Right!"
- line "Good fight, mate!"
- prompt
-
-_SSAnne10AfterBattleText1::
- text "Haha! Want to be"
- line "a sailor, mate?"
- done
-
-_SSAnne10BattleText2::
- text "My sailor's pride"
- line "is at stake!"
- done
-
-_SSAnne10EndBattleText2::
- text "Your"
- line "spirit sank me!"
- prompt
-
-_SSAnne10AfterBattleText2::
- text "Did you see the"
- line "FISHING GURU in"
- cont "VERMILION CITY?"
- done
-
-_SSAnne10BattleText3::
- text "Us sailors have"
- line "#MON too!"
- done
-
-_SSAnne10EndBattleText3::
- text "OK, "
- line "you're not bad."
- prompt
-
-_SSAnne10AfterBattleText3::
- text "We caught all our"
- line "#MON while"
- cont "out at sea!"
- done
-
-_SSAnne10BattleText4::
- text "I like feisty"
- line "kids like you!@@"
-
-_SSAnne10EndBattleText4::
- text "Argh!"
- line "Lost it!"
- prompt
-
-_SSAnne10AfterBattleText4::
- text "Sea #MON live"
- line "in deep water."
- cont "You'll need a ROD!"
- done
-
-_SSAnne10BattleText5::
- text "Matey, you're"
- line "walking the plank"
- cont "if you lose!"
- done
-
-_SSAnne10EndBattleText5::
- text "Argh!"
- line "Beaten by a kid!"
- prompt
-
-_SSAnne10AfterBattleText5::
- text "Jellyfish some-"
- line "times drift into"
- cont "the ship."
- done
-
-_SSAnne10BattleText6::
- text "Hello stranger!"
- line "Stop and chat!"
-
- para "All my #MON"
- line "are from the sea!"
- done
-
-_SSAnne10EndBattleText6::
- text "Darn!"
- line "I let that one"
- cont "get away!"
- prompt
-
-_SSAnne10AfterBattleText6::
- text "I was going to"
- line "make you my"
- cont "assistant too!"
- done
-
-_SSAnne10Text7::
- text "My buddy, MACHOKE,"
- line "is super strong!"
-
- para "He has enough"
- line "STRENGTH to move"
- cont "big rocks!"
- done
diff --git a/text/maps/SSAnneCaptainsRoom.asm b/text/maps/SSAnneCaptainsRoom.asm
deleted file mode 100644
index bbc52bd7..00000000
--- a/text/maps/SSAnneCaptainsRoom.asm
+++ /dev/null
@@ -1,62 +0,0 @@
-_SSAnne7RubText::
- text "CAPTAIN: Ooargh..."
- line "I feel hideous..."
- cont "Urrp! Seasick..."
-
- para "<PLAYER> rubbed"
- line "the CAPTAIN's"
- cont "back!"
-
- para "Rub-rub..."
- line "Rub-rub...@@"
-
-_ReceivingHM01Text::
- text "CAPTAIN: Whew!"
- line "Thank you! I"
- cont "feel much better!"
-
- para "You want to see"
- line "my CUT technique?"
-
- para "I could show you"
- line "if I wasn't ill..."
-
- para "I know! You can"
- line "have this!"
-
- para "Teach it to your"
- line "#MON and you"
- cont "can see it CUT"
- cont "anytime!"
- prompt
-
-_ReceivedHM01Text::
- text "<PLAYER> got"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_SSAnne7Text_61932::
- text "CAPTAIN: Whew!"
-
- para "Now that I'm not"
- line "sick anymore, I"
- cont "guess it's time."
- done
-
-_HM01NoRoomText::
- text "Oh no! You have"
- line "no room for this!"
- done
-
-_SSAnne7Text2::
- text "Yuck! Shouldn't"
- line "have looked!"
- done
-
-_SSAnne7Text3::
- text "How to Conquer"
- line "Seasickness..."
- cont "The CAPTAIN's"
- cont "reading this!"
- done
diff --git a/text/maps/SafariZoneGate.asm b/text/maps/SafariZoneGate.asm
deleted file mode 100644
index a426d132..00000000
--- a/text/maps/SafariZoneGate.asm
+++ /dev/null
@@ -1,143 +0,0 @@
-_SafariZoneEntranceText1::
- text "Welcome to the"
- line "SAFARI ZONE!"
- done
-
-SafariZoneEntranceText_9e814::
- text "Leaving early?@@"
-
-_SafariZoneEntranceText_753bb::
- text "Please return any"
- line "SAFARI BALLs you"
- cont "have left."
- done
-
-_SafariZoneEntranceText_753c0::
- text "Good Luck!"
- done
-
-_SafariZoneEntranceText_753c5::
- text "Did you get a"
- line "good haul?"
- cont "Come again!"
- done
-
-SafariZoneEntranceText_9e6e4::
- text "For just ¥500,"
- line "you can catch all"
- cont "the #MON you"
- cont "want in the park!"
-
- para "Would you like to"
- line "join the hunt?@@"
-
-SafariZoneEntranceText_9e747::
- text "That'll be ¥@"
- TX_BCD wPriceTemp, $c3
- text ","
- line "please!"
-
- para "We only use a"
- line "special # BALL"
- cont "here."
-
- para "<PLAYER> received"
- line "30 SAFARI BALLs!@@"
-
-_SafariZoneEntranceText_75360::
- text ""
-
- para "We'll call you on"
- line "the PA when you"
- cont "run out of time"
- cont "or SAFARI BALLs!"
- done
-
-_SafariZoneEntranceText_75365::
- text "OK! Please come"
- line "again!"
- done
-
-_SafariZoneEntranceText_7536a::
- text "Oops! Not enough"
- line "money!"
- done
-
-_SafariZoneEntranceText_753e6::
- text "Hi! Is it your"
- line "first time here?"
- done
-
-_SafariZoneEntranceText_753eb::
- text "SAFARI ZONE has 4"
- line "zones in it."
-
- para "Each zone has"
- line "different kinds"
- cont "of #MON. Use"
- cont "SAFARI BALLs to"
- cont "catch them!"
-
- para "When you run out"
- line "of time or SAFARI"
- cont "BALLs, it's game"
- cont "over for you!"
-
- para "Before you go,"
- line "open an unused"
- cont "#MON BOX so"
- cont "there's room for"
- cont "new #MON!"
- done
-
-_SafariZoneEntranceText_753f0::
- text "Sorry, you're a"
- line "regular here!"
- done
-
-_SafariZoneLowCostText1::
- text ""
-
- para "Oh, all right, pay"
- line "me what you have."
- prompt
-
-_SafariZoneLowCostText2::
- text "But, I can't give"
- line "you all 30 BALLs."
- done
-
-_SafariZoneLowCostText3::
- text ""
-
- para "You're persistent,"
- line "aren't you?"
-
- para "OK, you can go in"
- line "for free, but"
- cont "just this once!@@"
-
-_SafariZoneLowCostText4::
- text ""
- done
-
-_SafariZoneLowCostText5::
- text "I'm sorry, but you"
- line "have to pay to"
- cont "enter."
- done
-
-_SafariZoneLowCostText6::
- text "You can't enter"
- line "without paying!"
- done
-
-_SafariZoneLowCostText7::
- text "I said, no money,"
- line "no entry!"
- done
-
-_SafariZoneLowCostText8::
- text "Read my lips, NO!"
- line "Get it?"
- done
diff --git a/text/maps/SafariZoneSecretHouse.asm b/text/maps/SafariZoneSecretHouse.asm
deleted file mode 100644
index 3df79d90..00000000
--- a/text/maps/SafariZoneSecretHouse.asm
+++ /dev/null
@@ -1,44 +0,0 @@
-_SecretHouseText_4a350::
- text "Ah! Finally!"
-
- para "You're the first"
- line "person to reach"
- cont "the SECRET HOUSE!"
-
- para "I was getting"
- line "worried that no"
- cont "one would win our"
- cont "campaign prize."
-
- para "Congratulations!"
- line "You have won!"
- prompt
-
-_ReceivedHM03Text::
- text "<PLAYER> received"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_HM03ExplanationText::
- text "HM03 is SURF!"
-
- para "#MON will be"
- line "able to ferry you"
- cont "across water!"
-
- para "And, this HM isn't"
- line "disposable! You"
- cont "can use it over"
- cont "and over!"
-
- para "You're super lucky"
- line "for winning this"
- cont "fabulous prize!"
- done
-
-_HM03NoRoomText::
- text "You don't have"
- line "room for this"
- cont "fabulous prize!"
- done
diff --git a/text/maps/SaffronCity.asm b/text/maps/SaffronCity.asm
deleted file mode 100644
index a0422c8c..00000000
--- a/text/maps/SaffronCity.asm
+++ /dev/null
@@ -1,151 +0,0 @@
-_SaffronCityText1::
- text "What do you want?"
- line "Get lost!"
- done
-
-_SaffronCityText2::
- text "BOSS said he'll"
- line "take this town!"
- done
-
-_SaffronCityText3::
- text "Get out of the"
- line "way!"
- done
-
-_SaffronCityText4::
- text "SAFFRON belongs"
- line "to TEAM ROCKET!"
- done
-
-_SaffronCityText5::
- text "Being evil makes"
- line "me feel so alive!"
- done
-
-_SaffronCityText6::
- text "Ow! Watch where"
- line "you're walking!"
- done
-
-_SaffronCityText7::
- text "With SILPH under"
- line "control, we can"
- cont "exploit #MON"
- cont "around the world!"
- done
-
-_SaffronCityText8::
- text "You beat TEAM"
- line "ROCKET all alone?"
- cont "That's amazing!"
- done
-
-_SaffronCityText9::
- text "Yeah! TEAM ROCKET"
- line "is gone!"
- cont "It's safe to go"
- cont "out again!"
- done
-
-_SaffronCityText10::
- text "People should be"
- line "flocking back to"
- cont "SAFFRON now."
- done
-
-_SaffronCityText11::
- text "I flew here on my"
- line "PIDGEOT when I"
- cont "read about SILPH."
-
- para "It's already over?"
- line "I missed the"
- cont "media action."
- done
-
-_SaffronCityText12::
- text "PIDGEOT: Bi bibii!@@"
-
-_SaffronCityText13::
- text "I saw ROCKET"
- line "BOSS escaping"
- cont "SILPH's building."
- done
-
-_SaffronCityText14::
- text "I'm a security"
- line "guard."
-
- para "Suspicious kids I"
- line "don't allow in!"
- done
-
-_SaffronCityText15::
- text "..."
- line "Snore..."
-
- para "Hah! He's taking"
- line "a snooze!"
- done
-
-_SaffronCityText16::
- text "SAFFRON CITY"
- line "Shining, Golden"
- cont "Land of Commerce"
- done
-
-_SaffronCityText17::
- text "FIGHTING DOJO"
- done
-
-_SaffronCityText18::
- text "SAFFRON CITY"
- line "#MON GYM"
- cont "LEADER: SABRINA"
-
- para "The Master of"
- line "Psychic #MON!"
- done
-
-_SaffronCityText20::
- text "TRAINER TIPS"
-
- para "FULL HEAL cures"
- line "all ailments like"
- cont "sleep and burns."
-
- para "It costs a bit"
- line "more, but it's"
- cont "more convenient."
- done
-
-_SaffronCityText21::
- text "TRAINER TIPS"
-
- para "New GREAT BALL"
- line "offers improved"
- cont "capture rates."
-
- para "Try it on those"
- line "hard-to-catch"
- cont "#MON."
- done
-
-_SaffronCityText22::
- text "SILPH CO."
- line "OFFICE BUILDING"
- done
-
-_SaffronCityText24::
- text "MR.PSYCHIC's"
- line "HOUSE"
- done
-
-_SaffronCityText25::
- text "SILPH's latest"
- line "product!"
-
- para "Release to be"
- line "determined..."
- done
diff --git a/text/maps/SaffronGates.asm b/text/maps/SaffronGates.asm
deleted file mode 100644
index 35bcadbb..00000000
--- a/text/maps/SaffronGates.asm
+++ /dev/null
@@ -1,37 +0,0 @@
-_SaffronGateText_1dfe7::
- text "I'm on guard duty."
- line "Gee, I'm thirsty,"
- cont "though!"
-
- para "Oh, wait there,"
- line "the road's closed."
- done
-
-_SaffronGateText_8aaa9::
- text "Whoa, boy!"
- line "I'm parched!"
- cont "..."
- cont "Huh? I can have"
- cont "this drink?"
- cont "Gee, thanks!@@"
-
-_SaffronGateText_1dff1::
- text ""
-
- para "..."
- line "Glug, glug..."
- cont "..."
- cont "Gulp..."
- cont "If you want to go"
- cont "to SAFFRON CITY..."
- cont "..."
- cont "You can go on"
- cont "through. I'll"
- cont "share this with"
- cont "the other guards!"
- done
-
-_SaffronGateText_1dff6::
- text "Hi, thanks for"
- line "the cool drinks!"
- done
diff --git a/text/maps/SaffronGym.asm b/text/maps/SaffronGym.asm
deleted file mode 100644
index 52ea321b..00000000
--- a/text/maps/SaffronGym.asm
+++ /dev/null
@@ -1,236 +0,0 @@
-_SaffronGymText_5d162::
- text "I had a vision of"
- line "your arrival!"
-
- para "I have had psychic"
- line "powers since I"
- cont "was a child."
-
- para "I first learned"
- line "to bend spoons"
- cont "with my mind."
-
- para "I dislike fight-"
- line "ing, but if you"
- cont "wish, I will show"
- cont "you my powers!"
- done
-
-_SaffronGymText_5d167::
- text "I'm"
- line "shocked!"
- cont "But, a loss is a"
- cont "loss."
-
- para "I admit I didn't"
- line "work hard enough"
- cont "to win!"
-
- para "You earned the"
- line "MARSHBADGE!@@"
-
-_SaffronGymText_5d16e::
- text "Everyone has"
- line "psychic power!"
- cont "People just don't"
- cont "realize it!"
- done
-
-_SaffronGymText_5d173::
- text "The MARSHBADGE"
- line "makes #MON up"
- cont "to L70 obey you!"
-
- para "Stronger #MON"
- line "will become wild,"
- cont "ignoring your"
- cont "orders in battle!"
-
- para "Just don't raise"
- line "your #MON too"
- cont "much!"
-
- para "Wait, please take"
- line "this TM with you!"
- done
-
-ReceivedTM46Text::
- text "<PLAYER> received"
- line "TM46!@@"
-
-_TM46ExplanationText::
- text ""
-
- para "TM46 is PSYWAVE!"
- line "It uses powerful"
- cont "psychic waves to"
- cont "inflict damage!"
- done
-
-_TM46NoRoomText::
- text "Your pack is full"
- line "of other items!"
- done
-
-_SaffronGymText_5d1e6::
- text "Yo! Champ in"
- line "making!"
-
- para "SABRINA's #MON"
- line "use psychic power"
- cont "instead of force!"
-
- para "Fighting #MON"
- line "are weak against"
- cont "psychic #MON!"
-
- para "They get creamed"
- line "before they can"
- cont "even aim a punch!"
- done
-
-_SaffronGymText_5d1eb::
- text "Psychic power,"
- line "huh?"
-
- para "If I had that,"
- line "I'd make a bundle"
- cont "at the slots!"
- done
-
-_SaffronGymBattleText1::
- text "SABRINA is younger"
- line "than I, but I"
- cont "respect her!"
- done
-
-_SaffronGymEndBattleText1::
- text "Not"
- line "good enough!"
- prompt
-
-_SaffronGymAfterBattleText1::
- text "In a battle of"
- line "equals, the one"
- cont "with the stronger"
- cont "will wins!"
-
- para "If you wish"
- line "to beat SABRINA,"
- cont "focus on winning!"
- done
-
-_SaffronGymBattleText2::
- text "Does our unseen"
- line "power scare you?"
- done
-
-_SaffronGymEndBattleText2::
- text "I never"
- line "foresaw this!"
- prompt
-
-_SaffronGymAfterBattleText2::
- text "Psychic #MON"
- line "fear only bugs!"
- done
-
-_SaffronGymBattleText3::
- text "#MON take on"
- line "the appearance of"
- cont "their trainers."
-
- para "Your #MON must"
- line "be tough, then!"
- done
-
-_SaffronGymEndBattleText3::
- text "I knew"
- line "it!"
- prompt
-
-_SaffronGymAfterBattleText3::
- text "I must teach"
- line "better techniques"
- cont "to my #MON!"
- done
-
-_SaffronGymBattleText4::
- text "You know that"
- line "power alone isn't"
- cont "enough!"
- done
-
-_SaffronGymEndBattleText4::
- text "I don't"
- line "believe this!"
- prompt
-
-_SaffronGymAfterBattleText4::
- text "SABRINA just wiped"
- line "out the KARATE"
- cont "MASTER next door!"
- done
-
-_SaffronGymBattleText5::
- text "You and I, our"
- line "#MON shall"
- cont "fight!"
- done
-
-_SaffronGymEndBattleText5::
- text "I lost"
- line "after all!"
- prompt
-
-_SaffronGymAfterBattleText5::
- text "I knew that this"
- line "was going to take"
- cont "place."
- done
-
-_SaffronGymBattleText6::
- text "SABRINA is young,"
- line "but she's also"
- cont "our LEADER!"
-
- para "You won't reach"
- line "her easily!"
- done
-
-_SaffronGymEndBattleText6::
- text "I lost"
- line "my concentration!"
- prompt
-
-_SaffronGymAfterBattleText6::
- text "There used to be"
- line "2 #MON GYMs in"
- cont "SAFFRON."
-
- para "The FIGHTING DOJO"
- line "next door lost"
- cont "its GYM status"
- cont "when we went and"
- cont "creamed them!"
- done
-
-_SaffronGymBattleText7::
- text "SAFFRON #MON"
- line "GYM is famous for"
- cont "its psychics!"
-
- para "You want to see"
- line "SABRINA!"
- cont "I can tell!"
- done
-
-_SaffronGymEndBattleText7::
- text "Arrrgh!"
- prompt
-
-_SaffronGymAfterBattleText7::
- text "That's right! I"
- line "used telepathy to"
- cont "read your mind!"
- done
diff --git a/text/maps/SaffronPidgeyHouse.asm b/text/maps/SaffronPidgeyHouse.asm
deleted file mode 100644
index 214bf089..00000000
--- a/text/maps/SaffronPidgeyHouse.asm
+++ /dev/null
@@ -1,26 +0,0 @@
-_SaffronHouse1Text1::
- text "Thank you for"
- line "writing. I hope"
- cont "to see you soon!"
-
- para "Hey! Don't look"
- line "at my letter!"
- done
-
-_SaffronHouse1Text2::
- text "PIDGEY: Kurukkoo!@@"
-
-_SaffronHouse1Text3::
- text "The COPYCAT is"
- line "cute! I'm getting"
- cont "her a # DOLL!"
- done
-
-_SaffronHouse1Text4::
- text "I was given a PP"
- line "UP as a gift."
-
- para "It's used for"
- line "increasing the PP"
- cont "of techniques!"
- done
diff --git a/text/maps/SeafoamIslandsB4F.asm b/text/maps/SeafoamIslandsB4F.asm
deleted file mode 100644
index 608d165f..00000000
--- a/text/maps/SeafoamIslandsB4F.asm
+++ /dev/null
@@ -1,13 +0,0 @@
-_ArticunoBattleText::
- text "Gyaoo!@@"
-
-_SeafoamIslands5Text4::
- text "Boulders might"
- line "change the flow"
- cont "of water!"
- done
-
-_SeafoamIslands5Text5::
- text "DANGER"
- line "Fast current!"
- done
diff --git a/text/maps/SilphCo10F.asm b/text/maps/SilphCo10F.asm
deleted file mode 100644
index 09894764..00000000
--- a/text/maps/SilphCo10F.asm
+++ /dev/null
@@ -1,66 +0,0 @@
-_SilphCo10Text_5a1d3::
- text "Waaaaa!"
- line "I'm scared!"
- done
-
-_SilphCo10Text_5a1d8::
- text "Please keep quiet"
- line "about my crying!"
- done
-
-_SilphCo10BattleText1::
- text "Welcome to the"
- line "10F! So good of"
- cont "you to join me!"
- done
-
-_SilphCo10EndBattleText1::
- text "I'm"
- line "stunned!"
- prompt
-
-_SilphCo10AfterBattleText1::
- text "Nice try, but the"
- line "boardroom is up"
- cont "one more floor!"
- done
-
-_SilphCo10BattleText2::
- text "Enough of your"
- line "silly games!"
- done
-
-_SilphCo10EndBattleText2::
- text "No"
- line "continues left!"
- prompt
-
-_SilphCo10AfterBattleText2::
- text "Are you satisfied"
- line "with beating me?"
- cont "Then go on home!"
- done
-
-_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...@@"
diff --git a/text/maps/SilphCo11F.asm b/text/maps/SilphCo11F.asm
deleted file mode 100644
index d2bbde7d..00000000
--- a/text/maps/SilphCo11F.asm
+++ /dev/null
@@ -1,114 +0,0 @@
-_SilphCoPresidentText::
- text "PRESIDENT: Thank"
- line "you for saving"
- cont "SILPH!"
-
- para "I will never"
- line "forget you saved"
- cont "us in our moment"
- cont "of peril!"
-
- para "I have to thank"
- line "you in some way!"
-
- para "Because I am rich,"
- line "I can give you"
- cont "anything!"
-
- para "Here, maybe this"
- line "will do!"
- prompt
-
-_ReceivedSilphCoMasterBallText::
- text "<PLAYER> got a"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_SilphCo10Text_6231c::
- text "PRESIDENT: You"
- line "can't buy that"
- cont "anywhere!"
-
- para "It's our secret"
- line "prototype MASTER"
- cont "BALL!"
-
- para "It will catch any"
- line "#MON without"
- cont "fail!"
-
- para "You should be"
- line "quiet about using"
- cont "it, though."
- done
-
-_SilphCoMasterBallNoRoomText::
- text "You have no"
- line "room for this."
- done
-
-_SilphCo11Text2::
- text "SECRETARY: Thank"
- line "you for rescuing"
- cont "all of us!"
-
- para "We admire your"
- line "courage."
- done
-
-_SilphCo11Text3::
- text "Ah, <PLAYER>!"
- line "So we meet again!"
-
- para "The PRESIDENT and"
- line "I are discussing"
- cont "a vital business"
- cont "proposition."
-
- para "Keep your nose"
- line "out of grown-up"
- cont "matters..."
-
- para "or, experience a"
- line "world of pain!"
- done
-
-_SilphCo10Text_62330::
- text "Arrgh!!"
- line "I lost again!?"
- prompt
-
-_SilphCo10Text_62335::
- text "Blast it all!"
- line "You ruined our"
- cont "plans for SILPH!"
-
- para "But, TEAM ROCKET"
- line "will never fall!"
-
- para "<PLAYER>! Never"
- line "forget that all"
- cont "#MON exist"
- cont "for TEAM ROCKET!"
-
- para "I must go, but I"
- line "shall return!"
- done
-
-_SilphCo11BattleText2::
- text "Halt! Do you have"
- line "an appointment"
- cont "with my BOSS?"
- done
-
-_SilphCo11EndBattleText2::
- text "Gaah!"
- line "Demolished!"
- prompt
-
-_SilphCo11AfterBattleText2::
- text "Watch your step,"
- line "my BOSS likes his"
- cont "#MON tough!"
- done
diff --git a/text/maps/SilphCo2F.asm b/text/maps/SilphCo2F.asm
deleted file mode 100644
index 912bdef9..00000000
--- a/text/maps/SilphCo2F.asm
+++ /dev/null
@@ -1,96 +0,0 @@
-_SilphCo2Text_59ded::
- text "Eeek!"
- line "No! Stop! Help!"
-
- para "Oh, you're not"
- line "with TEAM ROCKET."
- cont "I thought..."
- cont "I'm sorry. Here,"
- cont "please take this!"
- prompt
-
-_ReceivedTM36Text::
- text "<PLAYER> got"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_TM36ExplanationText::
- text "TM36 is"
- line "SELFDESTRUCT!"
-
- para "It's powerful, but"
- line "the #MON that"
- cont "uses it faints!"
- cont "Be careful."
- done
-
-_TM36NoRoomText::
- text "You don't have any"
- line "room for this."
- done
-
-_SilphCo2BattleText1::
- text "Help! I'm a SILPH"
- line "employee."
- done
-
-_SilphCo2EndBattleText1::
- text "How"
- line "did you know I"
- cont "was a ROCKET?"
- prompt
-
-_SilphCo2AfterBattleText1::
- text "I work for both"
- line "SILPH and TEAM"
- cont "ROCKET!"
- done
-
-_SilphCo2BattleText2::
- text "It's off limits"
- line "here! Go home!"
- done
-
-_SilphCo2EndBattleText2::
- text "You're"
- line "good."
- prompt
-
-_SilphCo2AfterBattleText2::
- text "Can you solve the"
- line "maze in here?"
- done
-
-_SilphCo2BattleText3::
- text "No kids are"
- line "allowed in here!"
- done
-
-_SilphCo2EndBattleText3::
- text "Tough!"
- prompt
-
-_SilphCo2AfterBattleText3::
- text "Diamond-shaped"
- line "tiles are"
- cont "teleport blocks!"
-
- para "They're hi-tech"
- line "transporters!"
- done
-
-_SilphCo2BattleText4::
- text "Hey kid! What are"
- line "you doing here?"
- done
-
-_SilphCo2EndBattleText4::
- text "I goofed!"
- prompt
-
-_SilphCo2AfterBattleText4::
- text "SILPH CO. will"
- line "be merged with"
- cont "TEAM ROCKET!"
- done
diff --git a/text/maps/VermilionCity.asm b/text/maps/VermilionCity.asm
deleted file mode 100644
index 742d0c5d..00000000
--- a/text/maps/VermilionCity.asm
+++ /dev/null
@@ -1,167 +0,0 @@
-_VermilionCityText1::
- text "We're careful"
- line "about pollution!"
-
- para "We've heard GRIMER"
- line "multiplies in"
- cont "toxic sludge!"
- done
-
-_VermilionCityTextDidYouSee::
- text "Did you see S.S."
- line "ANNE moored in"
- cont "the harbor?"
- done
-
-_VermilionCityTextSSAnneDeparted::
- text "So, S.S.ANNE has"
- line "departed!"
-
- para "She'll be back in"
- line "about a year."
- done
-
-_SSAnneWelcomeText4::
- text "Welcome to S.S."
- line "ANNE!"
- done
-
-_SSAnneWelcomeText9::
- text "Welcome to S.S."
- line "ANNE!"
-
- para "Excuse me, do you"
- line "have a ticket?"
- prompt
-
-_SSAnneFlashedTicketText::
- text "<PLAYER> flashed"
- line "the S.S.TICKET!"
-
- para "Great! Welcome to"
- line "S.S.ANNE!"
- done
-
-_SSAnneNoTicketText::
- text "<PLAYER> doesn't"
- line "have the needed"
- cont "S.S.TICKET."
-
- para "Sorry!"
-
- para "You need a ticket"
- line "to get aboard."
- done
-
-_SSAnneNotHereText::
- text "The ship set sail."
- done
-
-_VermilionCityText4::
- text "I'm putting up a"
- line "building on this"
- cont "plot of land."
-
- para "My #MON is"
- line "tamping the land."
- done
-
-_VermilionCityText5::
- text "MACHOP: Guoh!"
- line "Gogogoh!@@"
-
-_VermilionCityText15::
- text ""
- para "A MACHOP is"
- line "stomping the land"
- cont "flat."
- done
-
-_VermilionCityText6::
- text "S.S.ANNE is a"
- line "famous luxury"
- cont "cruise ship."
-
- para "We visit VERMILION"
- line "once a year."
- done
-
-_OfficerJennyText1::
- text "I just caught a"
- line "SQUIRTLE that was"
- cont "always getting"
- cont "into mischief."
-
- para "I think it needs a"
- line "good trainer to"
- cont "set it straight."
- done
-
-_OfficerJennyText2::
- text "You have the"
- line "THUNDERBADGE!?"
-
- para "You must be a"
- line "good trainer!"
-
- para "I just caught a"
- line "SQUIRTLE that was"
- cont "always getting"
- cont "into mischief."
-
- para "Would you take"
- line "good care of it?"
- done
-
-_OfficerJennyText3::
- text "OK! Please treat"
- line "SQUIRTLE right!@@"
-
-_OfficerJennyText4::
- text "Oh... What am I"
- line "to do now?"
- done
-
-_OfficerJennyText5::
- text "How is SQUIRTLE"
- line "doing?"
- done
-
-_VermilionCityText8::
- text "VERMILION CITY"
- line "The Port of"
- cont "Exquisite Sunsets"
- done
-
-_VermilionCityText9::
- text "NOTICE!"
-
- para "ROUTE 12 may be"
- line "blocked off by a"
- cont "sleeping #MON."
-
- para "Detour through"
- line "ROCK TUNNEL to"
- cont "LAVENDER TOWN."
-
- para "VERMILION POLICE"
- done
-
-_VermilionCityText12::
- text "#MON FAN CLUB"
- line "All #MON fans"
- cont "welcome!"
- done
-
-_VermilionCityText13::
- text "VERMILION CITY"
- line "#MON GYM"
- cont "LEADER: LT.SURGE"
-
- para "The Lightning "
- line "American!"
- done
-
-_VermilionCityText14::
- text "VERMILION HARBOR"
- done
diff --git a/text/maps/VermilionDock.asm b/text/maps/VermilionDock.asm
deleted file mode 100644
index 5d998e82..00000000
--- a/text/maps/VermilionDock.asm
+++ /dev/null
@@ -1,3 +0,0 @@
-_VermilionDockText1::
- text ""
- done
diff --git a/text/maps/VermilionGym.asm b/text/maps/VermilionGym.asm
deleted file mode 100644
index 2d9654c8..00000000
--- a/text/maps/VermilionGym.asm
+++ /dev/null
@@ -1,166 +0,0 @@
-_LTSurgePreBattleText::
- 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!"
- done
-
-_LTSurgePostBattleAdviceText::
- text "A little word of"
- line "advice, kid!"
-
- para "Electricity is"
- line "sure powerful!"
-
- para "But, it's useless"
- line "against ground-"
- cont "type #MON!"
- done
-
-_LTSurgeThunderbadgeInfoText::
- text "The THUNDERBADGE"
- line "cranks up your"
- cont "#MON's SPEED!"
-
- para "It also lets your"
- line "#MON FLY any-"
- cont "time, kid!"
-
- para "You're special,"
- line "kid! Take this!"
- done
-
-_ReceivedTM24Text::
- text "<PLAYER> received "
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_TM24ExplanationText::
- text ""
-
- para "TM24 contains"
- line "THUNDERBOLT!"
-
- para "Teach it to an"
- line "electric #MON!"
- done
-
-_TM24NoRoomText::
- text "Yo kid, make room"
- line "in your pack!"
- done
-
-_ReceivedThunderbadgeText::
- text "Whoa!"
-
- para "You're the real"
- line "deal, kid!"
-
- para "Fine then, take"
- line "the THUNDERBADGE!"
- prompt
-
-_VermilionGymBattleText1::
- text "When I was in the"
- line "Army, LT.SURGE"
- cont "was my strict CO!"
- done
-
-_VermilionGymEndBattleText1::
- text "Stop!"
- line "You're very good!"
- prompt
-
-_VermilionGymAfterBattleText1::
- text "The door won't"
- line "open?"
-
- para "LT.SURGE always"
- line "was cautious!"
- done
-
-_VermilionGymBattleText2::
- text "I'm a lightweight,"
- line "but I'm good with"
- cont "electricity!"
- done
-
-_VermilionGymEndBattleText2::
- text "Fried!"
- prompt
-
-_VermilionGymAfterBattleText2::
- text "OK, I'll talk!"
-
- para "LT.SURGE said he"
- line "hid door switches"
- cont "inside something!"
- done
-
-_VermilionGymBattleText3::
- text "This is no place"
- line "for kids!"
- done
-
-_VermilionGymEndBattleText3::
- text "Wow!"
- line "Surprised me!"
- prompt
-
-_VermilionGymAfterBattleText3::
- text "LT.SURGE set up"
- line "double locks!"
- cont "Here's a hint!"
-
- para "When you open the"
- line "1st lock, the 2nd"
- cont "lock is right"
- cont "next to it!"
- done
-
-_VermilionGymFanPreBattleText::
- text "Yo! Champ in"
- line "making!"
-
- para "LT.SURGE has a"
- line "nickname. People"
- cont "refer to him as"
- cont "the Lightning"
- cont "American!"
-
- para "He's an expert on"
- line "electric #MON!"
-
- para "Birds and water"
- line "#MON are at"
- cont "risk! Beware of"
- cont "paralysis too!"
-
- para "LT.SURGE is very"
- line "cautious!"
-
- para "You'll have to"
- line "break a code to"
- cont "get to him!"
- done
-
-_VermilionGymFanPostBattleText::
- text "Whew! That match"
- line "was electric!"
- done
diff --git a/text/maps/VermilionOldRodHouse.asm b/text/maps/VermilionOldRodHouse.asm
deleted file mode 100644
index 32526e36..00000000
--- a/text/maps/VermilionOldRodHouse.asm
+++ /dev/null
@@ -1,54 +0,0 @@
-_VermilionHouse2Text_560b1::
- text "I'm the FISHING"
- line "GURU!"
-
- para "I simply Looove"
- line "fishing!"
-
- para "Do you like to"
- line "fish?"
- done
-
-_VermilionHouse2Text_560b6::
- text "Grand! I like"
- line "your style!"
-
- para "Take this and"
- line "fish, young one!"
-
- para "<PLAYER> received"
- line "an @"
- TX_RAM wcf4b
- text "!@@"
-
-_VermilionHouse2Text_560bb::
- text ""
-
- para "Fishing is a way"
- line "of life!"
-
- para "From the seas to"
- line "rivers, go out"
- cont "and land the big"
- cont "one, young one!"
- done
-
-_VermilionHouse2Text_560c0::
- text "Oh... That's so"
- line "disappointing..."
- done
-
-_VermilionHouse2Text_560c5::
- text "Hello there,"
- line "<PLAYER>!"
-
- para "How are the fish"
- line "biting?"
- done
-
-_VermilionHouse2Text_560ca::
- text "Oh no!"
-
- para "You have no room"
- line "for my gift!"
- done
diff --git a/text/maps/VermilionPidgeyHouse.asm b/text/maps/VermilionPidgeyHouse.asm
deleted file mode 100644
index 91c18708..00000000
--- a/text/maps/VermilionPidgeyHouse.asm
+++ /dev/null
@@ -1,21 +0,0 @@
-_VermilionHouse1Text1::
- text "I'm getting my"
- line "PIDGEY to fly a"
- cont "letter to SAFFRON"
- cont "in the north!"
- done
-
-_VermilionHouse1Text2::
- text "PIDGEY: Kurukkoo!@@"
-
-_VermilionHouse1Text3::
- text "Dear PIPPI, I hope"
- line "to see you soon."
-
- para "I heard SAFFRON"
- line "has problems with"
- cont "TEAM ROCKET."
-
- para "VERMILION appears"
- line "to be safe."
- done
diff --git a/text/maps/VictoryRoad2F.asm b/text/maps/VictoryRoad2F.asm
deleted file mode 100644
index ec9dcf4f..00000000
--- a/text/maps/VictoryRoad2F.asm
+++ /dev/null
@@ -1,85 +0,0 @@
-_MoltresBattleText::
- text "Gyaoo!@@"
-
-_VictoryRoad2BattleText1::
- text "VICTORY ROAD is"
- line "the final test"
- cont "for trainers!"
- done
-
-_VictoryRoad2EndBattleText1::
- text "Aiyah!"
- prompt
-
-_VictoryRoad2AfterBattleText1::
- text "If you get stuck,"
- line "try moving some"
- cont "boulders around!"
- done
-
-_VictoryRoad2BattleText2::
- text "Ah, so you wish"
- line "to challenge the"
- cont "ELITE FOUR?"
- done
-
-_VictoryRoad2EndBattleText2::
- text "You"
- line "got me!"
- prompt
-
-_VictoryRoad2AfterBattleText2::
- text "<RIVAL> also came"
- line "through here!"
- done
-
-_VictoryRoad2BattleText3::
- text "Come on!"
- line "I'll whip you!"
- done
-
-_VictoryRoad2EndBattleText3::
- text "I got"
- line "whipped!"
- prompt
-
-_VictoryRoad2AfterBattleText3::
- text "You earned the"
- line "right to be on"
- cont "VICTORY ROAD!"
- done
-
-_VictoryRoad2BattleText4::
- text "If you can get"
- line "through here, you"
- cont "can go meet the"
- cont "ELITE FOUR!"
- done
-
-_VictoryRoad2EndBattleText4::
- text "No!"
- line "Unbelievable!"
- prompt
-
-_VictoryRoad2AfterBattleText4::
- text "I can beat you"
- line "when it comes to"
- cont "knowledge about"
- cont "#MON!"
- done
-
-_VictoryRoad2BattleText5::
- text "Is VICTORY ROAD"
- line "too tough?"
- done
-
-_VictoryRoad2EndBattleText5::
- text "Well"
- line "done!"
- prompt
-
-_VictoryRoad2AfterBattleText5::
- text "Many trainers give"
- line "up the challenge"
- cont "here."
- done
diff --git a/text/maps/ViridianCity.asm b/text/maps/ViridianCity.asm
deleted file mode 100644
index 22d5d7ba..00000000
--- a/text/maps/ViridianCity.asm
+++ /dev/null
@@ -1,194 +0,0 @@
-_ViridianCityText_19219::
- text "First, you need"
- line "to weaken the"
- cont "target #MON."
- done
-
-_ViridianCityText_1920a::
- text "Ahh, I've had my"
- line "coffee now and I"
- cont "feel great!"
-
- para "Sure, you can go"
- line "through!"
-
- para "I'm sorry I was"
- line "so rude to you!"
-
- para "I see you're using"
- line "a #DEX."
-
- para "I'll show you how"
- line "to catch #MON"
- cont "as my apology."
- done
-
-_OldManTextAfterBattle::
- text "That didn't work!"
- line "I must be losing"
- cont "my touch."
-
- para "I've run out of"
- line "# BALLs too."
-
- para "I have to get some"
- line "at #MON MART."
- done
-
-_ViridianCityText1::
- text "Those # BALLs"
- line "at your waist!"
- cont "You have #MON!"
-
- para "It's great that"
- line "you can carry and"
- cont "use #MON any-"
- cont "time, anywhere!"
- done
-
-_ViridianCityText_19122::
- text "This #MON GYM"
- line "is always closed."
-
- para "I wonder who the"
- line "LEADER is?"
- done
-
-_ViridianCityText_19127::
- text "VIRIDIAN GYM's"
- line "LEADER returned!"
- done
-
-_ViridianCityText_1914d::
- text "You want to know"
- line "about the 2 kinds"
- cont "of caterpillar"
- cont "#MON?"
- done
-
-_ViridianCityText_19152::
- text "Oh, OK then!"
- done
-
-_ViridianCityText_19157::
- text "CATERPIE has no"
- line "poison, but"
- cont "WEEDLE does."
-
- para "Watch out for its"
- line "POISON STING!"
- done
-
-_ViridianCityText_19175::
- text "Oh Grandpa! Don't"
- line "be so mean!"
- cont "He hasn't had his"
- cont "coffee yet."
- done
-
-_ViridianCityText_1917a::
- text "When I go shop in"
- line "PEWTER CITY, I"
- cont "have to take the"
- cont "winding trail in"
- cont "VIRIDIAN FOREST."
- done
-
-_ViridianCityText_19191::
- text "You can't go"
- line "through here!"
-
- para "This is private"
- line "property!"
- done
-
-_ViridianCityText_191ca::
- text "Yawn!"
- line "I must have dozed"
- cont "off in the sun."
-
- para "I had this dream"
- line "about a DROWZEE"
- cont "eating my dream."
- cont "What's this?"
- cont "Where did this TM"
- cont "come from?"
-
- para "This is spooky!"
- line "Here, you can"
- cont "have this TM."
- prompt
-
-_ReceivedTM42Text::
- text "<PLAYER> received"
- line "TM42!@@"
-
-_TM42Explanation::
- text "TM42 contains"
- line "DREAM EATER..."
- cont "...Snore..."
- done
-
-_TM42NoRoomText::
- text "You have too much"
- line "stuff already."
- done
-
-_OldManAgainText1::
- text "Hmm? You want me"
- line "to show you how"
- cont "to catch #MON"
- cont "again?"
- done
-
-_OldManAgainText2::
- text "Dandy! Watch what"
- line "I do closely now!"
- done
-
-_OldManAgainText3::
- text "Oh... I'm not good"
- line "enough for you."
- done
-
-_ViridianCityText8::
- text "VIRIDIAN CITY "
- line "The Eternally"
- cont "Green Paradise"
- done
-
-_ViridianCityText9::
- text "TRAINER TIPS"
-
- para "Catch #MON"
- line "and expand your"
- cont "collection!"
-
- para "The more you have,"
- line "the easier it is"
- cont "to fight!"
- done
-
-_ViridianCityText10::
- text "TRAINER TIPS"
-
- para "The battle moves"
- line "of #MON are"
- cont "limited by their"
- cont "POWER POINTs, PP."
-
- para "To replenish PP,"
- line "rest your tired"
- cont "#MON at a"
- cont "#MON CENTER!"
- done
-
-_ViridianCityText13::
- text "VIRIDIAN CITY"
- line "#MON GYM"
- done
-
-_ViridianCityText14::
- text "The GYM's doors"
- line "are locked..."
- done
diff --git a/text/maps/ViridianGym.asm b/text/maps/ViridianGym.asm
deleted file mode 100644
index 53b78a0f..00000000
--- a/text/maps/ViridianGym.asm
+++ /dev/null
@@ -1,237 +0,0 @@
-_ViridianGymText_74ace::
- text "Fwahahaha! This is"
- line "my hideout!"
-
- para "I planned to"
- line "resurrect TEAM"
- cont "ROCKET here!"
-
- para "But, you have"
- line "caught me again!"
- cont "So be it! This"
- cont "time, I'm not"
- cont "holding back!"
-
- para "Once more, you"
- line "shall face"
- cont "GIOVANNI, the"
- cont "greatest trainer!"
- done
-
-_ViridianGymText_74ad3::
- text "Ha!"
- line "That was a truly"
- cont "intense fight!"
- cont "You have won!"
- cont "As proof, here is"
- cont "the EARTHBADGE!@@"
-
-_ViridianGymText_74ad9::
- text "Having lost, I"
- line "cannot face my"
- cont "underlings!"
- cont "TEAM ROCKET is"
- cont "finished forever!"
-
- para "I will dedicate my"
- line "life to the study"
- cont "of #MON!"
-
- para "Let us meet again"
- line "someday!"
- cont "Farewell!@@"
-
-_ViridianGymText12::
- text "The EARTHBADGE"
- line "makes #MON of"
- cont "any level obey!"
-
- para "It is evidence of"
- line "your mastery as a"
- cont "#MON trainer!"
-
- para "With it, you can"
- line "enter the #MON"
- cont "LEAGUE!"
-
- para "It is my gift for"
- line "your #MON"
- cont "LEAGUE challenge!"
- done
-
-_ReceivedTM27Text::
- text "<PLAYER> received"
- line "TM27!@@"
-
-_TM27ExplanationText::
- text ""
-
- para "TM27 is FISSURE!"
- line "It will take out"
- cont "#MON with just"
- cont "one hit!"
-
- para "I made it when I"
- line "ran the GYM here,"
- cont "too long ago..."
- done
-
-_TM27NoRoomText::
- text "You do not have"
- line "space for this!"
- done
-
-_ViridianGymBattleText1::
- text "Heh! You must be"
- line "running out of"
- cont "steam by now!"
- done
-
-_ViridianGymEndBattleText1::
- text "I"
- line "ran out of gas!"
- prompt
-
-_ViridianGymAfterBattleText1::
- text "You need power to"
- line "keep up with our"
- cont "GYM LEADER!"
- done
-
-_ViridianGymBattleText2::
- text "Rrrroar! I'm"
- line "working myself"
- cont "into a rage!"
- done
-
-_ViridianGymEndBattleText2::
- text "Wargh!"
- prompt
-
-_ViridianGymAfterBattleText2::
- text "I'm still not"
- line "worthy!"
- done
-
-_ViridianGymBattleText3::
- text "#MON and I, we"
- line "make wonderful"
- cont "music together!"
- done
-
-_ViridianGymEndBattleText3::
- text "You are in"
- line "perfect harmony!"
- prompt
-
-_ViridianGymAfterBattleText3::
- text "Do you know the"
- line "identity of our"
- cont "GYM LEADER?"
- done
-
-_ViridianGymBattleText4::
- text "Karate is the"
- line "ultimate form of"
- cont "martial arts!"
- done
-
-_ViridianGymEndBattleText4::
- text "Atcho!"
- prompt
-
-_ViridianGymAfterBattleText4::
- text "If my #MON"
- line "were as good at"
- cont "Karate as I..."
- done
-
-_ViridianGymBattleText5::
- text "The truly talented"
- line "win with style!"
- done
-
-_ViridianGymEndBattleText5::
- text "I"
- line "lost my grip!"
- prompt
-
-_ViridianGymAfterBattleText5::
- text "The LEADER will"
- line "scold me!"
- done
-
-_ViridianGymBattleText6::
- text "I'm the KARATE"
- line "KING! Your fate"
- cont "rests with me!"
- done
-
-_ViridianGymEndBattleText6::
- text "Ayah!"
- prompt
-
-_ViridianGymAfterBattleText6::
- text "#MON LEAGUE?"
- line "You? Don't get"
- cont "cocky!"
- done
-
-_ViridianGymBattleText7::
- text "Your #MON will"
- line "cower at the"
- cont "crack of my whip!"
- done
-
-_ViridianGymEndBattleText7::
- text "Yowch!"
- line "Whiplash!"
- prompt
-
-_ViridianGymAfterBattleText7::
- text "Wait! I was just"
- line "careless!"
- done
-
-_ViridianGymBattleText8::
- text "VIRIDIAN GYM was"
- line "closed for a long"
- cont "time, but now our"
- cont "LEADER is back!"
- done
-
-_ViridianGymEndBattleText8::
- text "I"
- line "was beaten?"
- prompt
-
-_ViridianGymAfterBattleText8::
- text "You can go on to"
- line "#MON LEAGUE"
- cont "only by defeating"
- cont "our GYM LEADER!"
- done
-
-_ViridianGymText_74bd4::
- text "Yo! Champ in"
- line "making!"
-
- para "Even I don't know"
- line "VIRIDIAN LEADER's"
- cont "identity!"
-
- para "This will be the"
- line "toughest of all"
- cont "the GYM LEADERs!"
-
- para "I heard that the"
- line "trainers here"
- cont "like ground-type"
- cont "#MON!"
- done
-
-_ViridianGymText_74bd9::
- text "Blow me away!"
- line "GIOVANNI was the"
- cont "GYM LEADER here?"
- done
diff --git a/text/maps/ViridianMart.asm b/text/maps/ViridianMart.asm
deleted file mode 100644
index 31a843ae..00000000
--- a/text/maps/ViridianMart.asm
+++ /dev/null
@@ -1,32 +0,0 @@
-_ViridianMartText1::
- text "Okay! Say hi to"
- line "PROF.OAK for me!"
- done
-
-_ViridianMartText4::
- text "Hey! You came from"
- line "PALLET TOWN?"
- done
-
-ViridianMartParcelQuestText::
- text "You know PROF."
- line "OAK, right?"
-
- para "His order came in."
- line "Will you take it"
- cont "to him?"
-
- para "<PLAYER> got"
- line "OAK's PARCEL!@@"
-
-_ViridianMartText2::
- text "This shop sells a"
- line "lot of PARLYZ"
- cont "HEALs."
- done
-
-_ViridianMartText3::
- text "The shop finally"
- line "has some POTIONs"
- cont "in stock."
- done
diff --git a/text/maps/WardensHouse.asm b/text/maps/WardensHouse.asm
deleted file mode 100644
index 7efddb90..00000000
--- a/text/maps/WardensHouse.asm
+++ /dev/null
@@ -1,84 +0,0 @@
-_WardenGibberishText1::
- text "WARDEN: Hif fuff"
- line "hefifoo!"
-
- para "Ha lof ha feef ee"
- line "hafahi ho. Heff"
- cont "hee fwee!"
- done
-
-_WardenGibberishText2::
- text "Ah howhee ho hoo!"
- line "Eef ee hafahi ho!"
- done
-
-_WardenGibberishText3::
- text "Ha? He ohay heh"
- line "ha hoo ee haheh!"
- done
-
-_WardenTeethText1::
- text "<PLAYER> gave the"
- line "GOLD TEETH to the"
- cont "WARDEN!@@"
-
-_WardenTeethText2::
- text ""
-
- para "The WARDEN popped"
- line "in his teeth!"
- prompt
-
-_WardenThankYouText::
- text "WARDEN: Thanks,"
- line "kid! No one could"
- cont "understand a word"
- cont "that I said."
-
- para "I couldn't work"
- line "that way."
- cont "Let me give you"
- cont "something for"
- cont "your trouble."
- prompt
-
-_ReceivedHM04Text::
- text "<PLAYER> received"
- line "@"
- TX_RAM wcf4b
- text "!@@"
-
-_HM04ExplanationText::
- text "WARDEN: HM04"
- line "teaches STRENGTH!"
-
- para "It lets #MON"
- line "move boulders"
- cont "when you're out-"
- cont "side of battle."
-
- para "Oh yes, did you"
- line "find SECRET HOUSE"
- cont "in SAFARI ZONE?"
-
- para "If you do, you"
- line "win an HM!"
-
- para "I hear it's the"
- line "rare SURF HM."
- done
-
-_HM04NoRoomText::
- text "Your pack is"
- line "stuffed full!"
- done
-
-_FuchsiaHouse2Text_75176::
- text "#MON photos"
- line "and fossils."
- done
-
-_FuchsiaHouse2Text_7517b::
- text "Old #MON"
- line "merchandise."
- done
diff --git a/text/monster_names.asm b/text/monster_names.asm
deleted file mode 100755
index a62b1bd9..00000000
--- a/text/monster_names.asm
+++ /dev/null
@@ -1,191 +0,0 @@
-MonsterNames:
- db "RHYDON@@@@"
- db "KANGASKHAN"
- db "NIDORAN♂@@"
- db "CLEFAIRY@@"
- db "SPEAROW@@@"
- db "VOLTORB@@@"
- db "NIDOKING@@"
- db "SLOWBRO@@@"
- db "IVYSAUR@@@"
- db "EXEGGUTOR@"
- db "LICKITUNG@"
- db "EXEGGCUTE@"
- db "GRIMER@@@@"
- db "GENGAR@@@@"
- db "NIDORAN♀@@"
- db "NIDOQUEEN@"
- db "CUBONE@@@@"
- db "RHYHORN@@@"
- db "LAPRAS@@@@"
- db "ARCANINE@@"
- db "MEW@@@@@@@"
- db "GYARADOS@@"
- db "SHELLDER@@"
- db "TENTACOOL@"
- db "GASTLY@@@@"
- db "SCYTHER@@@"
- db "STARYU@@@@"
- db "BLASTOISE@"
- db "PINSIR@@@@"
- db "TANGELA@@@"
- db "MISSINGNO."
- db "MISSINGNO."
- db "GROWLITHE@"
- db "ONIX@@@@@@"
- db "FEAROW@@@@"
- db "PIDGEY@@@@"
- db "SLOWPOKE@@"
- db "KADABRA@@@"
- db "GRAVELER@@"
- db "CHANSEY@@@"
- db "MACHOKE@@@"
- db "MR.MIME@@@"
- db "HITMONLEE@"
- db "HITMONCHAN"
- db "ARBOK@@@@@"
- db "PARASECT@@"
- db "PSYDUCK@@@"
- db "DROWZEE@@@"
- db "GOLEM@@@@@"
- db "MISSINGNO."
- db "MAGMAR@@@@"
- db "MISSINGNO."
- db "ELECTABUZZ"
- db "MAGNETON@@"
- db "KOFFING@@@"
- db "MISSINGNO."
- db "MANKEY@@@@"
- db "SEEL@@@@@@"
- db "DIGLETT@@@"
- db "TAUROS@@@@"
- db "MISSINGNO."
- db "MISSINGNO."
- db "MISSINGNO."
- db "FARFETCH'D"
- db "VENONAT@@@"
- db "DRAGONITE@"
- db "MISSINGNO."
- db "MISSINGNO."
- db "MISSINGNO."
- db "DODUO@@@@@"
- db "POLIWAG@@@"
- db "JYNX@@@@@@"
- db "MOLTRES@@@"
- db "ARTICUNO@@"
- db "ZAPDOS@@@@"
- db "DITTO@@@@@"
- db "MEOWTH@@@@"
- db "KRABBY@@@@"
- db "MISSINGNO."
- db "MISSINGNO."
- db "MISSINGNO."
- db "VULPIX@@@@"
- db "NINETALES@"
- db "PIKACHU@@@"
- db "RAICHU@@@@"
- db "MISSINGNO."
- db "MISSINGNO."
- db "DRATINI@@@"
- db "DRAGONAIR@"
- db "KABUTO@@@@"
- db "KABUTOPS@@"
- db "HORSEA@@@@"
- db "SEADRA@@@@"
- db "MISSINGNO."
- db "MISSINGNO."
- db "SANDSHREW@"
- db "SANDSLASH@"
- db "OMANYTE@@@"
- db "OMASTAR@@@"
- db "JIGGLYPUFF"
- db "WIGGLYTUFF"
- db "EEVEE@@@@@"
- db "FLAREON@@@"
- db "JOLTEON@@@"
- db "VAPOREON@@"
- db "MACHOP@@@@"
- db "ZUBAT@@@@@"
- db "EKANS@@@@@"
- db "PARAS@@@@@"
- db "POLIWHIRL@"
- db "POLIWRATH@"
- db "WEEDLE@@@@"
- db "KAKUNA@@@@"
- db "BEEDRILL@@"
- db "MISSINGNO."
- db "DODRIO@@@@"
- db "PRIMEAPE@@"
- db "DUGTRIO@@@"
- db "VENOMOTH@@"
- db "DEWGONG@@@"
- db "MISSINGNO."
- db "MISSINGNO."
- db "CATERPIE@@"
- db "METAPOD@@@"
- db "BUTTERFREE"
- db "MACHAMP@@@"
- db "MISSINGNO."
- db "GOLDUCK@@@"
- db "HYPNO@@@@@"
- db "GOLBAT@@@@"
- db "MEWTWO@@@@"
- db "SNORLAX@@@"
- db "MAGIKARP@@"
- db "MISSINGNO."
- db "MISSINGNO."
- db "MUK@@@@@@@"
- db "MISSINGNO."
- db "KINGLER@@@"
- db "CLOYSTER@@"
- db "MISSINGNO."
- db "ELECTRODE@"
- db "CLEFABLE@@"
- db "WEEZING@@@"
- db "PERSIAN@@@"
- db "MAROWAK@@@"
- db "MISSINGNO."
- db "HAUNTER@@@"
- db "ABRA@@@@@@"
- db "ALAKAZAM@@"
- db "PIDGEOTTO@"
- db "PIDGEOT@@@"
- db "STARMIE@@@"
- db "BULBASAUR@"
- db "VENUSAUR@@"
- db "TENTACRUEL"
- db "MISSINGNO."
- db "GOLDEEN@@@"
- db "SEAKING@@@"
- db "MISSINGNO."
- db "MISSINGNO."
- db "MISSINGNO."
- db "MISSINGNO."
- db "PONYTA@@@@"
- db "RAPIDASH@@"
- db "RATTATA@@@"
- db "RATICATE@@"
- db "NIDORINO@@"
- db "NIDORINA@@"
- db "GEODUDE@@@"
- db "PORYGON@@@"
- db "AERODACTYL"
- db "MISSINGNO."
- db "MAGNEMITE@"
- db "MISSINGNO."
- db "MISSINGNO."
- db "CHARMANDER"
- db "SQUIRTLE@@"
- db "CHARMELEON"
- db "WARTORTLE@"
- db "CHARIZARD@"
- db "MISSINGNO."
- db "MISSINGNO."
- db "MISSINGNO."
- db "MISSINGNO."
- db "ODDISH@@@@"
- db "GLOOM@@@@@"
- db "VILEPLUME@"
- db "BELLSPROUT"
- db "WEEPINBELL"
- db "VICTREEBEL"
diff --git a/text/oakspeech.asm b/text/oakspeech.asm
deleted file mode 100644
index e006d16f..00000000
--- a/text/oakspeech.asm
+++ /dev/null
@@ -1,55 +0,0 @@
-_OakSpeechText1::
- text "Hello there!"
- line "Welcome to the"
- cont "world of #MON!"
-
- para "My name is OAK!"
- line "People call me"
- cont "the #MON PROF!"
- prompt
-
-_OakSpeechText2A::
- text "This world is"
- line "inhabited by"
- cont "creatures called"
- cont "#MON!@@"
-
-_OakSpeechText2B::
- text $51,"For some people,"
- line "#MON are"
- cont "pets. Others use"
- cont "them for fights."
-
- para "Myself..."
-
- para "I study #MON"
- line "as a profession."
- prompt
-
-_IntroducePlayerText::
- text "First, what is"
- line "your name?"
- prompt
-
-_IntroduceRivalText::
- text "This is my grand-"
- line "son. He's been"
- cont "your rival since"
- cont "you were a baby."
-
- para "...Erm, what is"
- line "his name again?"
- prompt
-
-_OakSpeechText3::
- text "<PLAYER>!"
-
- para "Your very own"
- line "#MON legend is"
- cont "about to unfold!"
-
- para "A world of dreams"
- line "and adventures"
- cont "with #MON"
- cont "awaits! Let's go!"
- done
diff --git a/text/pokedex_ratings.asm b/text/pokedex_ratings.asm
index b94a9868..ce701f8a 100644
--- a/text/pokedex_ratings.asm
+++ b/text/pokedex_ratings.asm
@@ -3,10 +3,10 @@ _DexCompletionText::
line "letion is:"
para "@"
- TX_NUM hDexRatingNumMonsSeen, 1, 3
+ text_decimal hDexRatingNumMonsSeen, 1, 3
text " #MON seen"
line "@"
- TX_NUM hDexRatingNumMonsOwned, 1, 3
+ text_decimal hDexRatingNumMonsOwned, 1, 3
text " #MON owned"
para "PROF.OAK's"
diff --git a/text/trainer_names.asm b/text/trainer_names.asm
deleted file mode 100755
index 7736738b..00000000
--- a/text/trainer_names.asm
+++ /dev/null
@@ -1,48 +0,0 @@
-TrainerNames:
- db "YOUNGSTER@"
- db "BUG CATCHER@"
- db "LASS@"
- db "SAILOR@"
- db "JR.TRAINER♂@"
- db "JR.TRAINER♀@"
- db "POKéMANIAC@"
- db "SUPER NERD@"
- db "HIKER@"
- db "BIKER@"
- db "BURGLAR@"
- db "ENGINEER@"
- db "JUGGLER@"
- db "FISHERMAN@"
- db "SWIMMER@"
- db "CUE BALL@"
- db "GAMBLER@"
- db "BEAUTY@"
- db "PSYCHIC@"
- db "ROCKER@"
- db "JUGGLER@"
- db "TAMER@"
- db "BIRD KEEPER@"
- db "BLACKBELT@"
- db "RIVAL1@"
- db "PROF.OAK@"
- db "CHIEF@"
- db "SCIENTIST@"
- db "GIOVANNI@"
- db "ROCKET@"
- db "COOLTRAINER♂@"
- db "COOLTRAINER♀@"
- db "BRUNO@"
- db "BROCK@"
- db "MISTY@"
- db "LT.SURGE@"
- db "ERIKA@"
- db "KOGA@"
- db "BLAINE@"
- db "SABRINA@"
- db "GENTLEMAN@"
- db "RIVAL2@"
- db "RIVAL3@"
- db "LORELEI@"
- db "CHANNELER@"
- db "AGATHA@"
- db "LANCE@"
diff --git a/text/type_names.asm b/text/type_names.asm
deleted file mode 100755
index d94675b8..00000000
--- a/text/type_names.asm
+++ /dev/null
@@ -1,48 +0,0 @@
-TypeNames:
-
- dw .Normal
- dw .Fighting
- dw .Flying
- dw .Poison
- dw .Ground
- dw .Rock
- dw .Bird
- dw .Bug
- dw .Ghost
-
- dw .Normal
- dw .Normal
- dw .Normal
- dw .Normal
- dw .Normal
- dw .Normal
- dw .Normal
- dw .Normal
- dw .Normal
- dw .Normal
- dw .Normal
-
- dw .Fire
- dw .Water
- dw .Grass
- dw .Electric
- dw .Psychic
- dw .Ice
- dw .Dragon
-
-.Normal: db "NORMAL@"
-.Fighting: db "FIGHTING@"
-.Flying: db "FLYING@"
-.Poison: db "POISON@"
-.Fire: db "FIRE@"
-.Water: db "WATER@"
-.Grass: db "GRASS@"
-.Electric: db "ELECTRIC@"
-.Psychic: db "PSYCHIC@"
-.Ice: db "ICE@"
-.Ground: db "GROUND@"
-.Rock: db "ROCK@"
-.Bird: db "BIRD@"
-.Bug: db "BUG@"
-.Ghost: db "GHOST@"
-.Dragon: db "DRAGON@"
diff --git a/text/unused_names.asm b/text/unused_names.asm
deleted file mode 100644
index dd4c9a12..00000000
--- a/text/unused_names.asm
+++ /dev/null
@@ -1,20 +0,0 @@
-UnusedNames:
- db "かみなりバッヂ@"
- db "かいがらバッヂ@"
- db "おじぞうバッヂ@"
- db "はやぶさバッヂ@"
- db "ひんやりバッヂ@"
- db "なかよしバッヂ@"
- db "バラバッヂ@"
- db "ひのたまバッヂ@"
- db "ゴールドバッヂ@"
- db "たまご@"
- db "ひよこ@"
- db "ブロンズ@"
- db "シルバー@"
- db "ゴールド@"
- db "プチキャプテン@"
- db "キャプテン@"
- db "プチマスター@"
- db "マスター@"
- db "エクセレント" ; note the lack of a terminator
diff --git a/tools/gfx.c b/tools/gfx.c
index 8c4066ab..7d6dd0ee 100644
--- a/tools/gfx.c
+++ b/tools/gfx.c
@@ -8,7 +8,7 @@
#include "common.h"
static void usage(void) {
- fprintf(stderr, "Usage: gfx [--trim-whitespace] [--remove-whitespace] [--interleave] [--remove-duplicates [--keep-whitespace]] [--remove-xflip] [--remove-yflip] [--png filename] [-d depth] [-h] [-o outfile] infile\n");
+ fprintf(stderr, "Usage: gfx [--trim-whitespace] [--remove-whitespace] [--interleave] [--remove-duplicates [--keep-whitespace]] [--remove-xflip] [--remove-yflip] [--preserve indexes] [--png filename] [-d depth] [-h] [-o outfile] infile\n");
}
static void error(char *message) {
@@ -27,6 +27,8 @@ struct Options {
int keep_whitespace;
int remove_xflip;
int remove_yflip;
+ int *preserved;
+ int num_preserved;
char *png_file;
};
@@ -43,11 +45,13 @@ void get_args(int argc, char *argv[]) {
{"keep-whitespace", no_argument, &Options.keep_whitespace, 1},
{"remove-xflip", no_argument, &Options.remove_xflip, 1},
{"remove-yflip", no_argument, &Options.remove_yflip, 1},
+ {"preserve", required_argument, 0, 'r'},
{"png", required_argument, 0, 'p'},
{"depth", required_argument, 0, 'd'},
{"help", no_argument, 0, 'h'},
{0}
};
+ char *token;
for (int opt = 0; opt != -1;) {
switch (opt = getopt_long(argc, argv, "ho:d:p:", long_options)) {
case 'h':
@@ -59,6 +63,15 @@ void get_args(int argc, char *argv[]) {
case 'd':
Options.depth = strtoul(optarg, NULL, 0);
break;
+ case 'r':
+ token = strtok(optarg, ",");
+ while (token) {
+ Options.num_preserved++;
+ Options.preserved = realloc(Options.preserved, Options.num_preserved * sizeof(int));
+ Options.preserved[Options.num_preserved-1] = strtoul(token, NULL, 0);
+ token = strtok(NULL, ",");
+ }
+ break;
case 'p':
Options.png_file = optarg;
break;
@@ -73,6 +86,23 @@ void get_args(int argc, char *argv[]) {
}
}
+bool is_preserved(int index) {
+ for (int i = 0; i < Options.num_preserved; i++) {
+ if (Options.preserved[i] == index) {
+ return true;
+ }
+ }
+ return false;
+}
+
+void shift_preserved(int removed_index) {
+ for (int i = 0; i < Options.num_preserved; i++) {
+ if (Options.preserved[i] >= removed_index) {
+ Options.preserved[i]--;
+ }
+ }
+}
+
struct Graphic {
int size;
uint8_t *data;
@@ -91,7 +121,7 @@ bool is_whitespace(uint8_t *tile, int tile_size) {
void trim_whitespace(struct Graphic *graphic) {
int tile_size = Options.depth * 8;
for (int i = graphic->size - tile_size; i > 0; i -= tile_size) {
- if (is_whitespace(&graphic->data[i], tile_size)) {
+ if (is_whitespace(&graphic->data[i], tile_size) && !is_preserved(i / tile_size)) {
graphic->size = i;
} else {
break;
@@ -102,9 +132,15 @@ void trim_whitespace(struct Graphic *graphic) {
void remove_whitespace(struct Graphic *graphic) {
int tile_size = Options.depth * 8;
if (Options.interleave) tile_size *= 2;
+
+ // Make sure we have a whole number of tiles, round down if required
+ graphic->size &= ~(tile_size - 1);
+
int i = 0;
- for (int j = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) {
- while (is_whitespace(&graphic->data[j], tile_size)) {
+ for (int j = 0, d = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) {
+ while (j < graphic->size && is_whitespace(&graphic->data[j], tile_size) && !is_preserved(j / tile_size - d)) {
+ shift_preserved(j / tile_size - d);
+ d++;
j += tile_size;
}
if (j >= graphic->size) {
@@ -136,11 +172,17 @@ void remove_duplicates(struct Graphic *graphic) {
int tile_size = Options.depth * 8;
if (Options.interleave) tile_size *= 2;
int num_tiles = 0;
- for (int i = 0, j = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) {
- while (tile_exists(&graphic->data[j], graphic->data, tile_size, num_tiles)) {
- if (Options.keep_whitespace && is_whitespace(&graphic->data[j], tile_size)) {
+
+ // Make sure we have a whole number of tiles, round down if required
+ graphic->size &= ~(tile_size - 1);
+
+ for (int i = 0, j = 0, d = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) {
+ while (j < graphic->size && tile_exists(&graphic->data[j], graphic->data, tile_size, num_tiles)) {
+ if ((Options.keep_whitespace && is_whitespace(&graphic->data[j], tile_size)) || is_preserved(j / tile_size - d)) {
break;
}
+ shift_preserved(j / tile_size - d);
+ d++;
j += tile_size;
}
if (j >= graphic->size) {
@@ -155,7 +197,8 @@ void remove_duplicates(struct Graphic *graphic) {
}
bool flip_exists(uint8_t *tile, uint8_t *tiles, int tile_size, int num_tiles, bool xflip, bool yflip) {
- uint8_t *flip = calloc(tile_size, 1);
+ uint8_t flip[tile_size];
+ memset(flip, 0, sizeof(flip));
int half_size = tile_size / 2;
for (int i = 0; i < tile_size; i++) {
int byte = i;
@@ -183,11 +226,17 @@ void remove_flip(struct Graphic *graphic, bool xflip, bool yflip) {
int tile_size = Options.depth * 8;
if (Options.interleave) tile_size *= 2;
int num_tiles = 0;
- for (int i = 0, j = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) {
- while (flip_exists(&graphic->data[j], graphic->data, tile_size, num_tiles, xflip, yflip)) {
- if (Options.keep_whitespace && is_whitespace(&graphic->data[j], tile_size)) {
+
+ // Make sure we have a whole number of tiles, round down if required
+ graphic->size &= ~(tile_size - 1);
+
+ for (int i = 0, j = 0, d = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) {
+ while (j < graphic->size && flip_exists(&graphic->data[j], graphic->data, tile_size, num_tiles, xflip, yflip)) {
+ if ((Options.keep_whitespace && is_whitespace(&graphic->data[j], tile_size)) || is_preserved(j / tile_size - d)) {
break;
}
+ shift_preserved(j / tile_size - d);
+ d++;
j += tile_size;
}
if (j >= graphic->size) {
diff --git a/tools/pic.py b/tools/pic.py
new file mode 100644
index 00000000..afc34c90
--- /dev/null
+++ b/tools/pic.py
@@ -0,0 +1,491 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8 -*-
+
+"""
+A library for use with compressed monster and trainer pics in pokered.
+"""
+from __future__ import absolute_import
+from __future__ import division
+
+import os
+import sys
+import argparse
+from math import sqrt
+
+from pokemontools import gfx
+
+
+def bitflip(x, n):
+ r = 0
+ while n:
+ r = (r << 1) | (x & 1)
+ x >>= 1
+ n -= 1
+ return r
+
+
+class Decompressor:
+ """
+ pokered pic decompression.
+
+ Ported to python 2.7 from the python 3 code at https://github.com/magical/pokemon-sprites-rby.
+ """
+
+ table1 = [(2 << i) - 1 for i in range(16)]
+ table2 = [
+ [0x0, 0x1, 0x3, 0x2, 0x7, 0x6, 0x4, 0x5, 0xf, 0xe, 0xc, 0xd, 0x8, 0x9, 0xb, 0xa],
+ [0xf, 0xe, 0xc, 0xd, 0x8, 0x9, 0xb, 0xa, 0x0, 0x1, 0x3, 0x2, 0x7, 0x6, 0x4, 0x5], # prev ^ 0xf
+ [0x0, 0x8, 0xc, 0x4, 0xe, 0x6, 0x2, 0xa, 0xf, 0x7, 0x3, 0xb, 0x1, 0x9, 0xd, 0x5],
+ [0xf, 0x7, 0x3, 0xb, 0x1, 0x9, 0xd, 0x5, 0x0, 0x8, 0xc, 0x4, 0xe, 0x6, 0x2, 0xa], # prev ^ 0xf
+ ]
+ table3 = [bitflip(i, 4) for i in range(16)]
+
+ tilesize = 8
+
+
+ def __init__(self, f, mirror=False, planar=True):
+ self.bs = fbitstream(f)
+ self.mirror = mirror
+ self.planar = planar
+ self.data = None
+
+ def decompress(self):
+ rams = [[], []]
+
+ self.sizex = self._readint(4) * self.tilesize
+ self.sizey = self._readint(4)
+
+ self.size = self.sizex * self.sizey
+
+ self.ramorder = self._readbit()
+
+ r1 = self.ramorder
+ r2 = self.ramorder ^ 1
+
+ self._fillram(rams[r1])
+ mode = self._readbit()
+ if mode:
+ mode += self._readbit()
+ self._fillram(rams[r2])
+
+ rams[0] = bytearray(bitgroups_to_bytes(rams[0]))
+ rams[1] = bytearray(bitgroups_to_bytes(rams[1]))
+
+ if mode == 0:
+ self._decode(rams[0])
+ self._decode(rams[1])
+ elif mode == 1:
+ self._decode(rams[r1])
+ self._xor(rams[r1], rams[r2])
+ elif mode == 2:
+ self._decode(rams[r2], mirror=False)
+ self._decode(rams[r1])
+ self._xor(rams[r1], rams[r2])
+ else:
+ raise Exception("Invalid deinterlace mode!")
+
+ data = []
+ if self.planar:
+ for a, b in zip(rams[0], rams[1]):
+ data += [a, b]
+ self.data = bytearray(data)
+ else:
+ for a, b in zip(bitstream(rams[0]), bitstream(rams[1])):
+ data.append(a | (b << 1))
+ self.data = bitgroups_to_bytes(data)
+
+ def _fillram(self, ram):
+ mode = ['rle', 'data'][self._readbit()]
+ size = self.size * 4
+ while len(ram) < size:
+ if mode == 'rle':
+ self._read_rle_chunk(ram)
+ mode = 'data'
+ elif mode == 'data':
+ self._read_data_chunk(ram, size)
+ mode = 'rle'
+ if len(ram) > size:
+ #ram = ram[:size]
+ raise ValueError(size, len(ram))
+
+ ram[:] = self._deinterlace_bitgroups(ram)
+
+ def _read_rle_chunk(self, ram):
+
+ i = 0
+ while self._readbit():
+ i += 1
+
+ n = self.table1[i]
+ a = self._readint(i + 1)
+ n += a
+
+ for i in range(n):
+ ram.append(0)
+
+ def _read_data_chunk(self, ram, size):
+ while 1:
+ bitgroup = self._readint(2)
+ if bitgroup == 0:
+ break
+ ram.append(bitgroup)
+
+ if size <= len(ram):
+ break
+
+ def _decode(self, ram, mirror=None):
+ if mirror is None:
+ mirror = self.mirror
+
+ for x in range(self.sizex):
+ bit = 0
+ for y in range(self.sizey):
+ i = y * self.sizex + x
+ a = (ram[i] >> 4) & 0xf
+ b = ram[i] & 0xf
+
+ a = self.table2[bit][a]
+ bit = a & 1
+ if mirror:
+ a = self.table3[a]
+
+ b = self.table2[bit][b]
+ bit = b & 1
+ if mirror:
+ b = self.table3[b]
+
+ ram[i] = (a << 4) | b
+
+ def _xor(self, ram1, ram2, mirror=None):
+ if mirror is None:
+ mirror = self.mirror
+
+ for i in range(len(ram2)):
+ if mirror:
+ a = (ram2[i] >> 4) & 0xf
+ b = ram2[i] & 0xf
+ a = self.table3[a]
+ b = self.table3[b]
+ ram2[i] = (a << 4) | b
+
+ ram2[i] ^= ram1[i]
+
+ def _deinterlace_bitgroups(self, bits):
+ l = []
+ for y in range(self.sizey):
+ for x in range(self.sizex):
+ i = 4 * y * self.sizex + x
+ for j in range(4):
+ l.append(bits[i])
+ i += self.sizex
+ return l
+
+
+ def _readbit(self):
+ return next(self.bs)
+
+ def _readint(self, count):
+ return readint(self.bs, count)
+
+
+def fbitstream(f):
+ while 1:
+ char = f.read(1)
+ if not char:
+ break
+ byte = ord(char)
+
+ for i in range(7, -1, -1):
+ yield (byte >> i) & 1
+
+def bitstream(b):
+ for byte in b:
+ for i in range(7, -1, -1):
+ yield (byte >> i) & 1
+
+def readint(bs, count):
+ n = 0
+ while count:
+ n <<= 1
+ n |= next(bs)
+ count -= 1
+ return n
+
+def bitgroups_to_bytes(bits):
+ l = []
+ for i in range(0, len(bits) - 3, 4):
+ n = ((bits[i + 0] << 6)
+ | (bits[i + 1] << 4)
+ | (bits[i + 2] << 2)
+ | (bits[i + 3] << 0))
+ l.append(n)
+ return bytearray(l)
+
+
+def bytes_to_bits(bytelist):
+ return list(bitstream(bytelist))
+
+
+class Compressor:
+ """
+ pokered pic compression.
+
+ Adapted from stag019's C compressor.
+ """
+
+ table1 = [(2 << i) - 1 for i in range(16)]
+ table2 = [
+ [0x0, 0x1, 0x3, 0x2, 0x6, 0x7, 0x5, 0x4, 0xc, 0xd, 0xf, 0xe, 0xa, 0xb, 0x9, 0x8],
+ [0x8, 0x9, 0xb, 0xa, 0xe, 0xf, 0xd, 0xc, 0x4, 0x5, 0x7, 0x6, 0x2, 0x3, 0x1, 0x0], # reverse
+ ]
+ table3 = [bitflip(i, 4) for i in range(16)]
+
+ def __init__(self, image, width=None, height=None):
+ self.image = bytearray(image)
+ self.size = len(self.image)
+
+ planar_tile = 8 * 8 // 4
+ tile_size = self.size // planar_tile
+ if height and not width: width = tile_size // height
+ elif width and not height: height = tile_size // width
+ elif not width and not height: width = height = int(sqrt(tile_size))
+ self.width, self.height = width, height
+
+ def compress(self):
+ """
+ Compress the image five times (twice for each mode, except 0)
+ and use the smallest one (in bits).
+ """
+ rams = [[],[]]
+ datas = []
+
+ for mode in range(3):
+
+ # Order is redundant for mode 0.
+
+ # While this seems like an optimization,
+ # it's actually required for 1:1 compression
+ # to the original compressed pics.
+
+ # This appears to be the algorithm
+ # that Game Freak's compressor used.
+
+ # Using order 0 instead of 1 breaks this feature.
+
+ for order in range(2):
+ if mode == 0 and order == 0:
+ continue
+ for i in range(2):
+ rams[i] = self.image[i::2]
+ self._interpret_compress(rams, mode, order)
+ datas += [(self.data[:], int(self.which_bit))]
+
+ # Pick the smallest pic, measured in bits.
+ datas = sorted(datas, key=lambda data_bit: (len(data_bit[0]), -data_bit[1]))
+ self.data, self.which_bit = datas[0]
+
+ def _interpret_compress(self, rams, mode, order):
+ self.data = []
+ self.which_bit = 0
+
+ r1 = order
+ r2 = order ^ 1
+
+ if mode == 0:
+ self._encode(rams[1])
+ self._encode(rams[0])
+ elif mode == 1:
+ self._xor(rams[r1], rams[r2])
+ self._encode(rams[r1])
+ elif mode == 2:
+ self._xor(rams[r1], rams[r2])
+ self._encode(rams[r1])
+ self._encode(rams[r2], mirror=False)
+ else:
+ raise Exception('invalid interlace mode!')
+
+ self._writeint(self.height, 4)
+ self._writeint(self.width, 4)
+
+ self._writebit(order)
+
+ self._fillram(rams[r1])
+ if mode == 0:
+ self._writebit(0)
+ else:
+ self._writebit(1)
+ self._writebit(mode - 1)
+ self._fillram(rams[r2])
+
+ def _fillram(self, ram):
+ rle = 0
+ nums = 0
+ bitgroups = []
+
+ for x in range(self.width):
+ for bit in range(0, 8, 2):
+ byte = x * self.height * 8
+ for y in range(self.height * 8):
+ bitgroup = (ram[byte] >> (6 - bit)) & 3
+ if bitgroup == 0:
+ if rle == 0:
+ self._writebit(0)
+ elif rle == 1:
+ nums += 1
+ else:
+ self._data_packet(bitgroups)
+ self._writebit(0)
+ self._writebit(0)
+ rle = 1
+ bitgroups = []
+ else:
+ if rle == 0:
+ self._writebit(1)
+ elif rle == 1:
+ self._rle(nums)
+ rle = -1
+ bitgroups += [bitgroup]
+ nums = 0
+ byte += 1
+
+ if rle == 1:
+ self._rle(nums)
+ else:
+ self._data_packet(bitgroups)
+
+ def _data_packet(self, bitgroups):
+ for bitgroup in bitgroups:
+ self._writebit((bitgroup >> 1) & 1)
+ self._writebit((bitgroup >> 0) & 1)
+
+ def _rle(self, nums):
+ nums += 1
+
+ # Get the previous power of 2.
+ # Deriving the bitcount from that seems to be
+ # faster on average than using the lookup table.
+ v = nums
+ v += 1
+ v |= v >> 1
+ v |= v >> 2
+ v |= v >> 4
+ v |= v >> 8
+ v |= v >> 16
+ v -= v >> 1
+ v -= 1
+ number = nums - v
+
+ bitcount = -1
+ while v:
+ v >>= 1
+ bitcount += 1
+
+ for j in range(bitcount):
+ self._writebit(1)
+ self._writebit(0)
+ for j in range(bitcount, -1, -1):
+ self._writebit((number >> j) & 1)
+
+ def _encode(self, ram, mirror=None):
+ a = b = 0
+ for i in range(len(ram)):
+ j = i // self.height
+ j += i % self.height * self.width * 8
+ if i % self.height == 0:
+ b = 0
+
+ a = (ram[j] >> 4) & 0xf
+ table = b & 1
+ code_1 = self.table2[table][a]
+
+ b = ram[j] & 0xf
+ table = a & 1
+ code_2 = self.table2[table][b]
+
+ ram[j] = (code_1 << 4) | code_2
+
+ def _xor(self, ram1, ram2):
+ for i in range(len(ram2)):
+ ram2[i] ^= ram1[i]
+
+ def _writebit(self, bit):
+ self.which_bit -= 1
+ if self.which_bit == -1:
+ self.which_bit = 7
+ self.data += [0]
+ if bit: self.data[-1] |= bit << self.which_bit
+
+ def _writeint(self, num, size=None):
+ bits = []
+ if size:
+ for i in range(size):
+ bits += [num & 1]
+ num >>= 1
+ else:
+ while num > 0:
+ bits += [num & 1]
+ num >>= 1
+ for bit in reversed(bits):
+ self._writebit(bit)
+
+
+def decompress(f, offset=None, mirror=False):
+ """
+ Decompress a pic given a file object. Return a planar 2bpp image.
+
+ Optional: offset (for roms).
+ """
+ if offset is not None:
+ f.seek(offset)
+ dcmp = Decompressor(f, mirror=mirror)
+ dcmp.decompress()
+ return dcmp.data
+
+
+def compress(f):
+ """
+ Compress a planar 2bpp into a pic.
+ """
+ comp = Compressor(f)
+ comp.compress()
+ return comp.data
+
+
+def decompress_file(filename):
+ """
+ Decompress a pic given a filename.
+ Export the resulting planar 2bpp image to
+ """
+ pic = open(filename, 'rb')
+ image = decompress(pic)
+ image = gfx.transpose_tiles(image)
+ image = bytearray(image)
+ output_filename = os.path.splitext(filename)[0] + '.2bpp'
+ with open(output_filename, 'wb') as out:
+ out.write(image)
+
+def compress_file(filename):
+ image = open(filename, 'rb').read()
+ image = gfx.transpose_tiles(image)
+ pic = compress(image)
+ pic = bytearray(pic)
+ output_filename = os.path.splitext(filename)[0] + '.pic'
+ with open(output_filename, 'wb') as out:
+ out.write(pic)
+
+
+def main():
+ ap = argparse.ArgumentParser()
+ ap.add_argument('mode')
+ ap.add_argument('filenames', nargs='*')
+ args = ap.parse_args()
+
+ for filename in args.filenames:
+ if args.mode == 'decompress':
+ decompress_file(filename)
+ elif args.mode == 'compress':
+ compress_file(filename)
+
+if __name__ == '__main__':
+ main()
+
diff --git a/tools/unnamed.py b/tools/unnamed.py
new file mode 100755
index 00000000..b2e9aea3
--- /dev/null
+++ b/tools/unnamed.py
@@ -0,0 +1,109 @@
+#!/usr/bin/env python3
+
+from sys import stderr, exit
+from subprocess import Popen, PIPE
+from struct import unpack, calcsize
+from enum import Enum
+
+class symtype(Enum):
+ LOCAL = 0
+ IMPORT = 1
+ EXPORT = 2
+
+def unpack_file(fmt, file):
+ size = calcsize(fmt)
+ return unpack(fmt, file.read(size))
+
+def read_string(file):
+ buf = bytearray()
+ while True:
+ b = file.read(1)
+ if b is None or b == b'\0':
+ return buf.decode()
+ else:
+ buf += b
+
+
+# Fix broken pipe when using `head`
+from signal import signal, SIGPIPE, SIG_DFL
+signal(SIGPIPE,SIG_DFL)
+
+import argparse
+parser = argparse.ArgumentParser(description="Parse the symfile to find unnamed symbols")
+parser.add_argument('symfile', type=argparse.FileType('r'), help="the list of symbols")
+parser.add_argument('-r', '--rootdir', type=str, help="scan the output files to obtain a list of files with unnamed symbols (NOTE: will rebuild objects as necessary)")
+parser.add_argument('-l', '--list', type=int, default=0, help="output this many of each file's unnamed symbols (NOTE: requires -r)")
+args = parser.parse_args()
+
+# Get list of object files
+objects = None
+if args.rootdir:
+ for line in Popen(["make", "-C", args.rootdir, "-s", "-p", "DEBUG=1"],
+ stdout=PIPE).stdout.read().decode().split("\n"):
+ if line.startswith("rom_obj := "):
+ objects = line[11:].strip().split()
+ break
+ else:
+ print("Error: Object files not found!", file=stderr)
+ exit(1)
+
+# Scan all unnamed symbols from the symfile
+symbols_total = 0
+symbols = set()
+for line in args.symfile:
+ line = line.split(";")[0].strip()
+ split = line.split(" ")
+ if len(split) < 2:
+ continue
+
+ symbols_total += 1
+
+ symbol = " ".join(split[1:]).strip()
+ if symbol[-3:].lower() == split[0][-3:].lower():
+ symbols.add(symbol)
+
+# If no object files were provided, just print what we know and exit
+print("Unnamed pokeyellow symbols: %d (%.2f%% complete)" % (len(symbols),
+ (symbols_total - len(symbols)) / symbols_total * 100))
+if not objects:
+ for sym in symbols:
+ print(sym)
+ exit()
+
+# Count the amount of symbols in each file
+files = {}
+for objfile in objects:
+ f = open(objfile, "rb")
+ obj_ver = None
+
+ magic = unpack_file("4s", f)[0]
+ if magic == b'RGB6':
+ obj_ver = 6
+ elif magic == b'RGB9':
+ obj_ver = 10 + unpack_file("<I", f)[0]
+
+ if obj_ver not in [6, 10, 11, 12, 13, 15]:
+ print("Error: File '%s' is of an unknown format." % objfile, file=stderr)
+ exit(1)
+
+ num_symbols = unpack_file("<II", f)[0]
+ for x in range(num_symbols):
+ sym_name = read_string(f)
+ sym_type = symtype(unpack_file("<B", f)[0] & 0x7f)
+ if sym_type == symtype.IMPORT:
+ continue
+ sym_filename = read_string(f)
+ unpack_file("<III", f)
+ if sym_name not in symbols:
+ continue
+
+ if sym_filename not in files:
+ files[sym_filename] = []
+ files[sym_filename].append(sym_name)
+
+# Sort the files, the one with the most amount of symbols first
+files = sorted(((f, files[f]) for f in files), key=lambda x: len(x[1]), reverse=True)
+for f in files:
+ filename, unnamed = f
+ sym_list = ', '.join(unnamed[:args.list])
+ print("%s: %d%s" % (filename, len(unnamed), ': ' + sym_list if sym_list else ''))
diff --git a/vram.asm b/vram.asm
index 05f3199e..d69d3f44 100644
--- a/vram.asm
+++ b/vram.asm
@@ -1,21 +1,31 @@
-vChars0 EQU $8000
-vChars1 EQU $8800
-vChars2 EQU $9000
-vBGMap0 EQU $9800
-vBGMap1 EQU $9c00
+SECTION "VRAM", VRAM
-; Battle/Menu
-vSprites EQU vChars0
-vFont EQU vChars1
-vFrontPic EQU vChars2
-vBackPic EQU vFrontPic + 7 * 7 * $10
+UNION
+; generic
+vChars0:: ds $800
+vChars1:: ds $800
+vChars2:: ds $800
+vBGMap0:: ds $400
+vBGMap1:: ds $400
-; Overworld
-vNPCSprites EQU vChars0
-vNPCSprites2 EQU vChars1
-vTileset EQU vChars2
+NEXTU
+; battle/menu
+vSprites:: ds $800
+vFont:: ds $800
+vFrontPic:: ds 7 * 7 * $10
+vBackPic:: ds 7 * 7 * $10
-; Title
-vTitleLogo EQU vChars1
-vTitleLogo2 EQU vFrontPic + 7 * 7 * $10
+NEXTU
+; overworld
+vNPCSprites:: ds $800
+vNPCSprites2:: ds $800
+vTileset:: ds $800
+NEXTU
+; title
+ ds $800
+vTitleLogo:: ds $800
+ ds 7 * 7 * $10
+vTitleLogo2:: ds $1e0
+
+ENDU
diff --git a/wram.asm b/wram.asm
index 265936f0..ed482c64 100755
--- a/wram.asm
+++ b/wram.asm
@@ -1,74 +1,20 @@
INCLUDE "constants.asm"
-flag_array: MACRO
- ds ((\1) + 7) / 8
-ENDM
-
-box_struct_length EQU 25 + NUM_MOVES * 2
-box_struct: MACRO
-\1Species:: db
-\1HP:: dw
-\1BoxLevel:: db
-\1Status:: db
-\1Type::
-\1Type1:: db
-\1Type2:: db
-\1CatchRate:: db
-\1Moves:: ds NUM_MOVES
-\1OTID:: dw
-\1Exp:: ds 3
-\1HPExp:: dw
-\1AttackExp:: dw
-\1DefenseExp:: dw
-\1SpeedExp:: dw
-\1SpecialExp:: dw
-\1DVs:: ds 2
-\1PP:: ds NUM_MOVES
-ENDM
-
-party_struct: MACRO
- box_struct \1
-\1Level:: db
-\1Stats::
-\1MaxHP:: dw
-\1Attack:: dw
-\1Defense:: dw
-\1Speed:: dw
-\1Special:: dw
-ENDM
-
-battle_struct: MACRO
-\1Species:: db
-\1HP:: dw
-\1PartyPos::
-\1BoxLevel:: db
-\1Status:: db
-\1Type::
-\1Type1:: db
-\1Type2:: db
-\1CatchRate:: db
-\1Moves:: ds NUM_MOVES
-\1DVs:: ds 2
-\1Level:: db
-\1Stats::
-\1MaxHP:: dw
-\1Attack:: dw
-\1Defense:: dw
-\1Speed:: dw
-\1Special:: dw
-\1PP:: ds NUM_MOVES
-ENDM
-
-
-SECTION "WRAM Bank 0", WRAM0
-
-wUnusedC000:: ; c000
- ds 1
-
-wSoundID:: ; c001
- ds 1
-
-wMuteAudioAndPauseMusic:: ; c002
+INCLUDE "macros/wram.asm"
+
+
+INCLUDE "vram.asm"
+
+
+SECTION "WRAM", WRAM0
+
+wUnusedC000::
+ ds 1
+
+wSoundID::
+ ds 1
+
+wMuteAudioAndPauseMusic::
; 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).
@@ -77,97 +23,97 @@ wMuteAudioAndPauseMusic:: ; c002
; Store 0 to resume music.
ds 1
-wDisableChannelOutputWhenSfxEnds:: ; c003
+wDisableChannelOutputWhenSfxEnds::
ds 1
-wStereoPanning:: ; c004
+wStereoPanning::
ds 1
-wSavedVolume:: ; c005
+wSavedVolume::
ds 1
-wChannelCommandPointers:: ; c006
+wChannelCommandPointers::
ds 16
-wChannelReturnAddresses:: ; c016
+wChannelReturnAddresses::
ds 16
-wChannelSoundIDs:: ; c026
+wChannelSoundIDs::
ds 8
-wChannelFlags1:: ; c02e
+wChannelFlags1::
ds 8
-wChannelFlags2:: ; c036
+wChannelFlags2::
ds 8
-wChannelDutyCycles:: ; c03e
+wChannelDutyCycles::
ds 8
-wChannelDutyCyclePatterns:: ; c046
+wChannelDutyCyclePatterns::
ds 8
-wChannelVibratoDelayCounters:: ; c04e
+wChannelVibratoDelayCounters::
; reloaded at the beginning of a note. counts down until the vibrato begins.
ds 8
-wChannelVibratoExtents:: ; c056
+wChannelVibratoExtents::
ds 8
-wChannelVibratoRates:: ; c05e
+wChannelVibratoRates::
; high nybble is rate (counter reload value) and low nybble is counter.
; time between applications of vibrato.
ds 8
-wChannelFrequencyLowBytes:: ; c066
+wChannelFrequencyLowBytes::
ds 8
-wChannelVibratoDelayCounterReloadValues:: ; c06e
+wChannelVibratoDelayCounterReloadValues::
; delay of the beginning of the vibrato from the start of the note
ds 8
-wChannelPitchSlideLengthModifiers:: ; c076
+wChannelPitchSlideLengthModifiers::
ds 8
-wChannelPitchSlideFrequencySteps:: ; c07e
+wChannelPitchSlideFrequencySteps::
ds 8
-wChannelPitchSlideFrequencyStepsFractionalPart:: ; c086
+wChannelPitchSlideFrequencyStepsFractionalPart::
ds 8
-wChannelPitchSlideCurrentFrequencyFractionalPart:: ; c08e
+wChannelPitchSlideCurrentFrequencyFractionalPart::
ds 8
-wChannelPitchSlideCurrentFrequencyHighBytes:: ; c096
+wChannelPitchSlideCurrentFrequencyHighBytes::
ds 8
-wChannelPitchSlideCurrentFrequencyLowBytes:: ; c09e
+wChannelPitchSlideCurrentFrequencyLowBytes::
ds 8
-wChannelPitchSlideTargetFrequencyHighBytes:: ; c0a6
+wChannelPitchSlideTargetFrequencyHighBytes::
ds 8
-wChannelPitchSlideTargetFrequencyLowBytes:: ; c0ae
+wChannelPitchSlideTargetFrequencyLowBytes::
ds 8
-wChannelNoteDelayCounters:: ; c0b6
+wChannelNoteDelayCounters::
; 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
+wChannelLoopCounters::
ds 8
-wChannelNoteSpeeds:: ; c0c6
+wChannelNoteSpeeds::
ds 8
-wChannelNoteDelayCountersFractionalPart:: ; c0ce
+wChannelNoteDelayCountersFractionalPart::
ds 8
-wChannelOctaves:: ; c0d6
+wChannelOctaves::
ds 8
-wChannelVolumes:: ; c0de
+wChannelVolumes::
; also includes fade for hardware channels that support it
ds 8
@@ -177,28 +123,28 @@ wMusicWaveInstrument::
wSfxWaveInstrument::
ds 1
-wMusicTempo:: ; c0e8
+wMusicTempo::
ds 2
-wSfxTempo:: ; c0ea
+wSfxTempo::
ds 2
-wSfxHeaderPointer:: ; c0ec
+wSfxHeaderPointer::
ds 2
-wNewSoundID:: ; c0ee
+wNewSoundID::
ds 1
-wAudioROMBank:: ; c0ef
+wAudioROMBank::
ds 1
-wAudioSavedROMBank:: ; c0f0
+wAudioSavedROMBank::
ds 1
-wFrequencyModifier:: ; c0f1
+wFrequencyModifier::
ds 1
-wTempoModifier:: ; c0f2
+wTempoModifier::
ds 1
wc0f3:: ds 1
@@ -209,129 +155,101 @@ SECTION "Sprite State Data", WRAM0
wSpriteDataStart::
-wSpriteStateData1:: ; c100
+wSpriteStateData1::
; data for all sprites on the current map
; holds info for 16 sprites with $10 bytes each
; player sprite is always sprite 0
-; C1x0: picture ID (fixed, loaded at map init)
-; C1x1: movement status (0: uninitialized, 1: ready, 2: delayed, 3: moving)
-; C1x2: sprite image index (changed on update, $ff if off screen, includes facing direction, progress in walking animation and a sprite-specific offset)
-; C1x3: Y screen position delta (-1,0 or 1; added to c1x4 on each walking animation update)
-; C1x4: Y screen position (in pixels, always 4 pixels above grid which makes sprites appear to be in the center of a tile)
-; C1x5: X screen position delta (-1,0 or 1; added to c1x6 on each walking animation update)
-; C1x6: X screen position (in pixels, snaps to grid if not currently walking)
-; C1x7: intra-animation-frame counter (counting upwards to 4 until c1x8 is incremented)
-; C1x8: animation frame counter (increased every 4 updates, hold four states (totalling to 16 walking frames)
-; C1x9: facing direction (0: down, 4: up, 8: left, $c: right)
-; C1xA
-; C1xB
-; C1xC
-; C1xD
-; C1xE
-; C1xF
-spritestatedata1: MACRO
-\1PictureID:: db
-\1MovementStatus:: db
-\1ImageIndex:: db
-\1YStepVector:: db
-\1YPixels:: db
-\1XStepVector:: db
-\1XPixels:: db
-\1IntraAnimFrameCounter:: db
-\1AnimFrameCounter:: db
-\1FacingDirection:: db
- ds 6
-\1End::
-endm
-
-wSpritePlayerStateData1:: spritestatedata1 wSpritePlayerStateData1
-wSprite01StateData1:: spritestatedata1 wSprite01StateData1
-wSprite02StateData1:: spritestatedata1 wSprite02StateData1
-wSprite03StateData1:: spritestatedata1 wSprite03StateData1
-wSprite04StateData1:: spritestatedata1 wSprite04StateData1
-wSprite05StateData1:: spritestatedata1 wSprite05StateData1
-wSprite06StateData1:: spritestatedata1 wSprite06StateData1
-wSprite07StateData1:: spritestatedata1 wSprite07StateData1
-wSprite08StateData1:: spritestatedata1 wSprite08StateData1
-wSprite09StateData1:: spritestatedata1 wSprite09StateData1
-wSprite10StateData1:: spritestatedata1 wSprite10StateData1
-wSprite11StateData1:: spritestatedata1 wSprite11StateData1
-wSprite12StateData1:: spritestatedata1 wSprite12StateData1
-wSprite13StateData1:: spritestatedata1 wSprite13StateData1
-wSprite14StateData1:: spritestatedata1 wSprite14StateData1
+; struct fields:
+; - 0: picture ID (fixed, loaded at map init)
+; - 1: movement status (0: uninitialized, 1: ready, 2: delayed, 3: moving)
+; - 2: sprite image index (changed on update, $ff if off screen, includes facing direction, progress in walking animation and a sprite-specific offset)
+; - 3: Y screen position delta (-1,0 or 1; added to Y pixels on each walking animation update)
+; - 4: Y screen position (in pixels, always 4 pixels above grid which makes sprites appear to be in the center of a tile)
+; - 5: X screen position delta (-1,0 or 1; added to field X pixels on each walking animation update)
+; - 6: X screen position (in pixels, snaps to grid if not currently walking)
+; - 7: intra-animation-frame counter (counting upwards to 4 until animation frame counter is incremented)
+; - 8: animation frame counter (increased every 4 updates, hold four states (totalling to 16 walking frames)
+; - 9: facing direction ($0: down, $4: up, $8: left, $c: right)
+; - A: adjusted Y coordinate
+; - B: adjusted X coordinate
+; - C: direction of collision
+; - D
+; - E
+; - F
+wSpritePlayerStateData1:: spritestatedata1 wSpritePlayerStateData1
+wSprite01StateData1:: spritestatedata1 wSprite01StateData1
+wSprite02StateData1:: spritestatedata1 wSprite02StateData1
+wSprite03StateData1:: spritestatedata1 wSprite03StateData1
+wSprite04StateData1:: spritestatedata1 wSprite04StateData1
+wSprite05StateData1:: spritestatedata1 wSprite05StateData1
+wSprite06StateData1:: spritestatedata1 wSprite06StateData1
+wSprite07StateData1:: spritestatedata1 wSprite07StateData1
+wSprite08StateData1:: spritestatedata1 wSprite08StateData1
+wSprite09StateData1:: spritestatedata1 wSprite09StateData1
+wSprite10StateData1:: spritestatedata1 wSprite10StateData1
+wSprite11StateData1:: spritestatedata1 wSprite11StateData1
+wSprite12StateData1:: spritestatedata1 wSprite12StateData1
+wSprite13StateData1:: spritestatedata1 wSprite13StateData1
+wSprite14StateData1:: spritestatedata1 wSprite14StateData1
wSpritePikachuStateData1:: spritestatedata1 wSpritePikachuStateData1
-wSpriteStateData2:: ; c200
+wSpriteStateData2::
; more data for all sprites on the current map
; holds info for 16 sprites with $10 bytes each
; player sprite is always sprite 0
-; C2x0: walk animation counter (counting from $10 backwards when moving)
-; C2x1:
-; C2x2: Y displacement (initialized at 8, supposed to keep moving sprites from moving too far, but bugged)
-; C2x3: X displacement (initialized at 8, supposed to keep moving sprites from moving too far, but bugged)
-; C2x4: Y position (in 2x2 tile grid steps, topmost 2x2 tile has value 4)
-; C2x5: X position (in 2x2 tile grid steps, leftmost 2x2 tile has value 4)
-; C2x6: movement byte 1 (determines whether a sprite can move, $ff:not moving, $fe:random movements, others unknown)
-; C2x7: (?) (set to $80 when in grass, else $0; may be used to draw grass above the sprite)
-; C2x8: delay until next movement (counted downwards, status (c1x1) is set to ready if reached 0)
-; C2x9
-; C2xA
-; C2xB
-; C2xC
-; C2xD
-; C2xE: sprite image base offset (in video ram, player always has value 1, used to compute c1x2)
-; C2xF
-spritestatedata2: MACRO
-\1WalkAnimationCounter:: db
- ds 1
-\1YDisplacement:: db
-\1XDisplacement:: db
-\1MapY:: db
-\1MapX:: db
-\1MovementByte1:: db
-\1GrassPriority:: db
-\1MovementDelay:: db
- ds 5
-\1ImageBaseOffset:: db
- ds 1
-\1End::
-endm
-
-wSpritePlayerStateData2:: spritestatedata2 wSpritePlayerStateData2
-wSprite01StateData2:: spritestatedata2 wSprite01StateData2
-wSprite02StateData2:: spritestatedata2 wSprite02StateData2
-wSprite03StateData2:: spritestatedata2 wSprite03StateData2
-wSprite04StateData2:: spritestatedata2 wSprite04StateData2
-wSprite05StateData2:: spritestatedata2 wSprite05StateData2
-wSprite06StateData2:: spritestatedata2 wSprite06StateData2
-wSprite07StateData2:: spritestatedata2 wSprite07StateData2
-wSprite08StateData2:: spritestatedata2 wSprite08StateData2
-wSprite09StateData2:: spritestatedata2 wSprite09StateData2
-wSprite10StateData2:: spritestatedata2 wSprite10StateData2
-wSprite11StateData2:: spritestatedata2 wSprite11StateData2
-wSprite12StateData2:: spritestatedata2 wSprite12StateData2
-wSprite13StateData2:: spritestatedata2 wSprite13StateData2
-wSprite14StateData2:: spritestatedata2 wSprite14StateData2
+; struct fields:
+; - 0: walk animation counter (counting from $10 backwards when moving)
+; - 1:
+; - 2: Y displacement (initialized at 8, supposed to keep moving sprites from moving too far, but bugged)
+; - 3: X displacement (initialized at 8, supposed to keep moving sprites from moving too far, but bugged)
+; - 4: Y position (in 2x2 tile grid steps, topmost 2x2 tile has value 4)
+; - 5: X position (in 2x2 tile grid steps, leftmost 2x2 tile has value 4)
+; - 6: movement byte 1 (determines whether a sprite can move, $ff:not moving, $fe:random movements, others unknown)
+; - 7: (?) (set to $80 when in grass, else $0; may be used to draw grass above the sprite)
+; - 8: delay until next movement (counted downwards, movement status is set to ready if reached 0)
+; - 9: original facing direction (backed up by DisplayTextIDInit, restored by CloseTextDisplay)
+; - A
+; - B
+; - C
+; - D: picture ID
+; - E: sprite image base offset (in video ram, player always has value 1, used to compute sprite image index)
+; - F
+wSpritePlayerStateData2:: spritestatedata2 wSpritePlayerStateData2
+wSprite01StateData2:: spritestatedata2 wSprite01StateData2
+wSprite02StateData2:: spritestatedata2 wSprite02StateData2
+wSprite03StateData2:: spritestatedata2 wSprite03StateData2
+wSprite04StateData2:: spritestatedata2 wSprite04StateData2
+wSprite05StateData2:: spritestatedata2 wSprite05StateData2
+wSprite06StateData2:: spritestatedata2 wSprite06StateData2
+wSprite07StateData2:: spritestatedata2 wSprite07StateData2
+wSprite08StateData2:: spritestatedata2 wSprite08StateData2
+wSprite09StateData2:: spritestatedata2 wSprite09StateData2
+wSprite10StateData2:: spritestatedata2 wSprite10StateData2
+wSprite11StateData2:: spritestatedata2 wSprite11StateData2
+wSprite12StateData2:: spritestatedata2 wSprite12StateData2
+wSprite13StateData2:: spritestatedata2 wSprite13StateData2
+wSprite14StateData2:: spritestatedata2 wSprite14StateData2
wSpritePikachuStateData2:: spritestatedata2 wSpritePikachuStateData2
+
wSpriteDataEnd::
SECTION "OAM Buffer", WRAM0
-wOAMBuffer:: ; c300
+wOAMBuffer::
; buffer for OAM data. Copied to OAM by DMA
ds 4 * 40
wOAMBufferEnd::
-wTileMap:: ; c3a0
+wTileMap::
; buffer for tiles that are visible on screen (20 columns by 18 rows)
ds SCREEN_HEIGHT * SCREEN_WIDTH
-wSerialPartyMonsPatchList:: ; c508
+wSerialPartyMonsPatchList::
; list of indexes to patch with SERIAL_NO_DATA_BYTE after transfer
-wTileMapBackup:: ; c508
+wTileMapBackup::
; buffer for temporarily saving and restoring current screen's tiles
; (e.g. if menus are drawn on top)
; ds 20 * 18
@@ -342,7 +260,7 @@ wAnimatedObjectsData::
wAnimatedObjectStartTileOffsets::
ds 10 * 2
-wAnimatedObjectDataStructs:: ; c51c
+wAnimatedObjectDataStructs::
animated_object: macro
\1Index:: db ; 0
\1FramesetID:: db ; 1
@@ -370,250 +288,250 @@ wAnimatedObject7:: animated_object wAnimatedObject7
wAnimatedObject8:: animated_object wAnimatedObject8
wAnimatedObject9:: animated_object wAnimatedObject9
-wNumLoadedAnimatedObjects:: ; c5bc
+wNumLoadedAnimatedObjects::
ds 1
-wCurrentAnimatedObjectOAMBufferOffset:: ; c5bd
+wCurrentAnimatedObjectOAMBufferOffset::
ds 3
-wAnimatedObjectSpawnStateDataPointer:: ; c5c0
+wAnimatedObjectSpawnStateDataPointer::
ds 2
-wAnimatedObjectFramesDataPointer:: ; c5c2
+wAnimatedObjectFramesDataPointer::
ds 2
-wAnimatedObjectJumptablePointer:: ; c5c4
+wAnimatedObjectJumptablePointer::
ds 2
-wAnimatedObjectOAMDataPointer:: ; c5c6
+wAnimatedObjectOAMDataPointer::
ds 2
-wCurAnimatedObjectOAMAttributes:: ; c5c8
+wCurAnimatedObjectOAMAttributes::
ds 1
-wCurrentAnimatedObjectVTileOffset:: ; c5c9
+wCurrentAnimatedObjectVTileOffset::
ds 1
-wCurrentAnimatedObjectXCoord:: ; c5ca
+wCurrentAnimatedObjectXCoord::
ds 1
-wCurrentAnimatedObjectYCoord:: ; c5cb
+wCurrentAnimatedObjectYCoord::
ds 1
-wCurrentAnimatedObjectXOffset:: ; c5cc
+wCurrentAnimatedObjectXOffset::
ds 1
-wCurrentAnimatedObjectYOffset:: ; c5cd
+wCurrentAnimatedObjectYOffset::
ds 1
-wAnimatedObjectGlobalYOffset:: ; c5ce
+wAnimatedObjectGlobalYOffset::
ds 1
-wAnimatedObjectGlobalXOffset:: ; c5cf
+wAnimatedObjectGlobalXOffset::
ds 1
wAnimatedObjectsDataEnd::
-wSerialEnemyMonsPatchList:: ; c5d0
+wSerialEnemyMonsPatchList::
; list of indexes to patch with SERIAL_NO_DATA_BYTE after transfer
; Surfing Minigame
-wSurfingMinigameData:: ; c5d0
+wSurfingMinigameData::
ds 1
-wSurfingMinigameRoutineNumber:: ; c5d1
+wSurfingMinigameRoutineNumber::
ds 1
-wc5d2:: ; c5d2
+wc5d2::
ds 1
-wSurfingMinigameWaveFunctionNumber:: ; c5d3
+wSurfingMinigameWaveFunctionNumber::
ds 2
-wc5d5:: ; c5d5
+wc5d5::
ds 1
-wSurfingMinigamePikachuHP:: ; c5d6
+wSurfingMinigamePikachuHP::
ds 2 ; little-endian BCD
-wc5d8:: ; c5d8 unused?
+wc5d8:: ; unused?
ds 1
-wSurfingMinigameRadnessMeter:: ; c5d9
+wSurfingMinigameRadnessMeter::
; number of consecutive tricks
ds 1
-wSurfingMinigameRadnessScore:: ; c5da
+wSurfingMinigameRadnessScore::
ds 2 ; little-endian BCD
-wSurfingMinigameTotalScore:: ; c5dc
+wSurfingMinigameTotalScore::
ds 2 ; little-endian BCD
-wc5de:: ; c5de
+wc5de::
ds 1
-wc5df:: ; c5df
+wc5df::
ds 1
-wc5e0:: ; c5e0
+wc5e0::
ds 1
-wc5e1:: ; c5e1
+wc5e1::
ds 1
-wc5e2:: ; c5e2
+wc5e2::
ds 1
-wSurfingMinigamePikachuSpeed:: ; c5e3
+wSurfingMinigamePikachuSpeed::
ds 2 ; little-endian
-wc5e5:: ; c5e5
+wc5e5::
ds 3 ; big-endian
-wSurfingMinigameWaveHeightBuffer:: ; c5e8
+wSurfingMinigameWaveHeightBuffer::
ds 2
-wSurfingMinigamePikachuObjectHeight:: ; c5ea
+wSurfingMinigamePikachuObjectHeight::
ds 1
-wc5eb:: ; c5eb
+wc5eb::
ds 1
-wc5ec:: ; c5ec
+wc5ec::
ds 1
-wc5ed:: ; c5ed
+wc5ed::
ds 1
-wc5ee:: ; c5ee
+wc5ee::
ds 1
-wSurfingMinigameBGMapReadBuffer:: ; c5ef
+wSurfingMinigameBGMapReadBuffer::
ds 16
ds 24
-wSurfingMinigameSCX:: ; c617
+wSurfingMinigameSCX::
ds 3
-wSurfingMinigameWaveHeight:: ; c61a
+wSurfingMinigameWaveHeight::
ds SCREEN_WIDTH
-wSurfingMinigameXOffset:: ; c62e
+wSurfingMinigameXOffset::
ds 1
-wSurfingMinigameTrickFlags:: ; c62f
+wSurfingMinigameTrickFlags::
ds 1
-wc630:: ; c630
+wc630::
ds 1
-wc631:: ; c631
+wc631::
ds 1
-wSurfingMinigameRoutineDelay:: ; c632
+wSurfingMinigameRoutineDelay::
ds 1
-wSurfingMinigameIntroAnimationFinished:: ; c633
+wSurfingMinigameIntroAnimationFinished::
ds 1
-wYellowIntroCurrentScene:: ; c634
-wc634:: ; c634
+wYellowIntroCurrentScene::
+wc634::
ds 1
-wYellowIntroSceneTimer:: ; c635
-wc635:: ; c635
+wYellowIntroSceneTimer::
+wc635::
ds 1
-wYellowIntroAnimatedObjectStructPointer:: ; c636
+wYellowIntroAnimatedObjectStructPointer::
ds 1
-wSurfingMinigameDataEnd:: ; c637
+wSurfingMinigameDataEnd::
ds 177
-wTempPic:: ; c6e8
-wPrinterData:: ; c6e8
-wOverworldMap:: ; c6e8
+wTempPic::
+wPrinterData::
+wOverworldMap::
; ds 1300
-wPrinterSendState:: ; c6e8
+wPrinterSendState::
ds 1
-wPrinterRowIndex:: ; c6e9
+wPrinterRowIndex::
ds 1
; Printer data header
-wPrinterDataHeader:: ; c6ea
-wc6ea:: ; c6ea
+wPrinterDataHeader::
+wc6ea::
ds 1
-wc6eb:: ; c6eb
+wc6eb::
ds 1
-wc6ec:: ; c6ec
+wc6ec::
ds 1
-wc6ed:: ; c6ed
+wc6ed::
ds 1
-wPrinterChecksum:: ; c6ee
+wPrinterChecksum::
dw
UNION
-wPrinterSerialReceived:: ; c6f0
+wPrinterSerialReceived::
ds 1
-wPrinterStatusReceived:: ; c6f1
+wPrinterStatusReceived::
; bit 7: set if error 1 (battery low)
; bit 6: set if error 4 (too hot or cold)
; bit 5: set if error 3 (paper jammed or empty)
; if this and the previous byte are both $ff: error 2 (connection error)
ds 1
-wc6f2:: ; c6f2
+wc6f2::
ds 1
-wc6f3:: ; c6f3
+wc6f3::
ds 13
-wLYOverrides:: ; c700
+wLYOverrides::
ds $100
wLYOverridesEnd::
-wLYOverridesBuffer:: ; c800
+wLYOverridesBuffer::
ds $100
-wLYOverridesBufferEnd:: ; c900
+wLYOverridesBufferEnd::
NEXTU
-wPrinterSendDataSource1:: ; c6f0
+wPrinterSendDataSource1::
; two 20-tile buffers
ds $140
wPrinterSendDataSource2::
ds $140
ENDU
-wPrinterSendDataSource1End:: ; c970
+wPrinterSendDataSource1End::
-wPrinterHandshake:: ; c970
+wPrinterHandshake::
ds 1
-wPrinterStatusFlags:: ; c971
+wPrinterStatusFlags::
ds 1
-wHandshakeFrameDelay:: ; c972
+wHandshakeFrameDelay::
ds 1
-wPrinterSerialFrameDelay:: ; c973
+wPrinterSerialFrameDelay::
ds 1
-wPrinterSendByteOffset:: ; c974
+wPrinterSendByteOffset::
dw
-wPrinterDataSize:: ; c976
+wPrinterDataSize::
dw
-wPrinterTileBuffer:: ; c978
+wPrinterTileBuffer::
ds SCREEN_HEIGHT * SCREEN_WIDTH
-wPrinterStatusIndicator:: ; cae0
+wPrinterStatusIndicator::
ds 2
-wcae2:: ; cae2
+wcae2::
ds 1
-wPrinterSettingsTempCopy:: ; cae3
+wPrinterSettingsTempCopy::
ds 17
-wPrinterQueueLength:: ; caf4
+wPrinterQueueLength::
ds 1
-wPrinterDataEnd:: ; caf5
+wPrinterDataEnd::
-wPrinterPokedexEntryTextPointer:: ; caf5
+wPrinterPokedexEntryTextPointer::
dw
ds 2
-wPrinterPokedexMonIsOwned:: ; caf9
+wPrinterPokedexMonIsOwned::
ds 227
-wcbdc:: ; cbdc
+wcbdc::
ds 14
-wcbea:: ; cbea
+wcbea::
ds 2
-wcbec:: ; cbec
+wcbec::
ds 16
wOverworldMapEnd::
-wRedrawRowOrColumnSrcTiles:: ; cbfc
+wRedrawRowOrColumnSrcTiles::
; 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
+wTopMenuItemY::
ds 1
-wTopMenuItemX:: ; cc25
+wTopMenuItemX::
ds 1
-wCurrentMenuItem:: ; cc26
+wCurrentMenuItem::
; the id of the currently selected menu item
; the top item has id 0, the one below that has id 1, etc.
; note that the "top item" means the top item currently visible on the screen
; add this value to [wListScrollOffset] to get the item's position within the list
ds 1
-wTileBehindCursor:: ; cc27
+wTileBehindCursor::
; the tile that was behind the menu cursor's current location
ds 1
-wMaxMenuItem:: ; cc28
+wMaxMenuItem::
; id of the bottom menu item
ds 1
-wMenuWatchedKeys:: ; cc29
+wMenuWatchedKeys::
; bit mask of keys that the menu will respond to
ds 1
-wLastMenuItem:: ; cc2a
+wLastMenuItem::
; id of previously selected menu item
ds 1
-wPartyAndBillsPCSavedMenuItem:: ; cc2b
+wPartyAndBillsPCSavedMenuItem::
; It is mainly used by the party menu to remember the cursor position while the
; menu isn't active.
; It is also used to remember the cursor position of mon lists (for the
@@ -622,105 +540,105 @@ wPartyAndBillsPCSavedMenuItem:: ; cc2b
; you return to the main Bill's PC menu.
ds 1
-wBagSavedMenuItem:: ; cc2c
+wBagSavedMenuItem::
; It is used by the bag list to remember the cursor position while the menu
; isn't active.
ds 1
-wBattleAndStartSavedMenuItem:: ; cc2d
+wBattleAndStartSavedMenuItem::
; It is used by the start menu to remember the cursor position while the menu
; isn't active.
; The battle menu uses it so that the cursor position doesn't get lost when
; a sub-menu is shown. It's reset at the start of each battle.
ds 1
-wPlayerMoveListIndex:: ; cc2e
+wPlayerMoveListIndex::
ds 1
-wPlayerMonNumber:: ; cc2f
+wPlayerMonNumber::
; index in party of currently battling mon
ds 1
-wMenuCursorLocation:: ; cc30
+wMenuCursorLocation::
; the address of the menu cursor's current location within wTileMap
ds 2
ds 2
-wMenuJoypadPollCount:: ; cc34
+wMenuJoypadPollCount::
; how many times should HandleMenuInput poll the joypad state before it returns?
ds 1
-wMenuItemToSwap:: ; cc35
+wMenuItemToSwap::
; id of menu item selected for swapping (counts from 1) (0 means that no menu item has been selected for swapping)
ds 1
-wListScrollOffset:: ; cc36
+wListScrollOffset::
; offset of the current top menu item from the beginning of the list
; keeps track of what section of the list is on screen
ds 1
-wMenuWatchMovingOutOfBounds:: ; cc37
+wMenuWatchMovingOutOfBounds::
; If non-zero, then when wrapping is disabled and the player tries to go past
; the top or bottom of the menu, return from HandleMenuInput. This is useful for
; menus that have too many items to display at once on the screen because it
; allows the caller to scroll the entire menu up or down when this happens.
ds 1
-wTradeCenterPointerTableIndex:: ; cc38
+wTradeCenterPointerTableIndex::
ds 1
ds 1
-wTextDest:: ; cc3a
+wTextDest::
; destination pointer for text output
; this variable is written to, but is never read from
ds 2
-wDoNotWaitForButtonPressAfterDisplayingText:: ; cc3c
+wDoNotWaitForButtonPressAfterDisplayingText::
; if non-zero, skip waiting for a button press after displaying text in DisplayTextID
ds 1
-wSerialSyncAndExchangeNybbleReceiveData:: ; cc3d
+wSerialSyncAndExchangeNybbleReceiveData::
; the final received nybble is stored here by Serial_SyncAndExchangeNybble
-wSerialExchangeNybbleTempReceiveData:: ; cc3d
+wSerialExchangeNybbleTempReceiveData::
; temporary nybble used by Serial_ExchangeNybble
-wLinkMenuSelectionReceiveBuffer:: ; cc3d
+wLinkMenuSelectionReceiveBuffer::
; two byte buffer
; the received menu selection is stored twice
ds 1
-wSerialExchangeNybbleReceiveData:: ; cc3e
+wSerialExchangeNybbleReceiveData::
; the final received nybble is stored here by Serial_ExchangeNybble
ds 1
ds 3
-wSerialExchangeNybbleSendData:: ; cc42
+wSerialExchangeNybbleSendData::
; this nybble is sent when using Serial_SyncAndExchangeNybble or Serial_ExchangeNybble
-wLinkMenuSelectionSendBuffer:: ; cc42
+wLinkMenuSelectionSendBuffer::
; two byte buffer
; the menu selection byte is stored twice before sending
ds 5
-wLinkTimeoutCounter:: ; cc47
+wLinkTimeoutCounter::
; 1 byte
-wUnknownSerialCounter:: ; cc47
+wUnknownSerialCounter::
; 2 bytes
-wEnteringCableClub:: ; cc47
+wEnteringCableClub::
ds 2
-wWhichTradeMonSelectionMenu:: ; cc49
+wWhichTradeMonSelectionMenu::
; $00 = player mons
; $01 = enemy mons
-wMonDataLocation:: ; cc49
+wMonDataLocation::
; 0 = player's party
; 1 = enemy party
; 2 = current box
@@ -732,112 +650,112 @@ wMonDataLocation:: ; cc49
; If the entire value is 0, then the player is allowed to name the mon.
ds 1
-wMenuWrappingEnabled:: ; cc4a
+wMenuWrappingEnabled::
; set to 1 if you can go from the bottom to the top or top to bottom of a menu
; set to 0 if you can't go past the top or bottom of the menu
ds 1
-wCheckFor180DegreeTurn:: ; cc4b
+wCheckFor180DegreeTurn::
; whether to check for 180-degree turn (0 = don't, 1 = do)
ds 1
ds 1
-wMissableObjectIndex:: ; cc4d
+wMissableObjectIndex::
ds 1
-wPredefID:: ; cc4e
+wPredefID::
ds 1
-wPredefRegisters:: ; cc4f
+wPredefRegisters::
ds 6
-wTrainerHeaderFlagBit:: ; cc55
+wTrainerHeaderFlagBit::
ds 1
ds 1
-wNPCMovementScriptPointerTableNum:: ; cc57
+wNPCMovementScriptPointerTableNum::
; which NPC movement script pointer is being used
; 0 if an NPC movement script is not running
ds 1
-wNPCMovementScriptBank:: ; cc58
+wNPCMovementScriptBank::
; ROM bank of current NPC movement script
ds 1
ds 2
-wUnusedCC5B:: ; cc5b
+wUnusedCC5B::
-wVermilionDockTileMapBuffer:: ; cc5b
+wVermilionDockTileMapBuffer::
; 180 bytes
-wOaksAideRewardItemName:: ; cc5b
+wOaksAideRewardItemName::
-wDexRatingNumMonsSeen:: ; cc5b
+wDexRatingNumMonsSeen::
-wFilteredBagItems:: ; cc5b
+wFilteredBagItems::
; List of bag items that has been filtered to a certain type of items,
; such as drinks or fossils.
-wElevatorWarpMaps:: ; cc5b
+wElevatorWarpMaps::
-wMonPartySpritesSavedOAM:: ; cc5b
+wMonPartySpritesSavedOAM::
; 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
+wTrainerCardBlkPacket::
; $40 bytes
-wSlotMachineSevenAndBarModeChance:: ; cc5b
+wSlotMachineSevenAndBarModeChance::
; 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.
; So, this value is actually the chance of NOT entering that mode.
; If the slot is lucky, it equals 250, giving a 5/256 (~2%) chance.
; Otherwise, it equals 253, giving a 2/256 (~0.8%) chance.
-wHallOfFame:: ; cc5b
-wBoostExpByExpAll:: ; cc5b
-wAnimationType:: ; cc5b
+wHallOfFame::
+wBoostExpByExpAll::
+wAnimationType::
; values between 0-6. Shake screen horizontally, shake screen vertically, blink Pokemon...
-wNPCMovementDirections:: ; cc5b
+wNPCMovementDirections::
-wPikaPicUsedGFXCount:: ; cc5b
+wPikaPicUsedGFXCount::
ds 1
-wPikaPicUsedGFX:: ; cc5c
-wDexRatingNumMonsOwned:: ; cc5c
+wPikaPicUsedGFX::
+wDexRatingNumMonsOwned::
ds 1
-wDexRatingText:: ; cc5d
-wTrainerCardBadgeAttributes:: ; cc5d
+wDexRatingText::
+wTrainerCardBadgeAttributes::
ds 1
-wSlotMachineSavedROMBank:: ; cc5e
+wSlotMachineSavedROMBank::
; ROM back to return to when the player is done with the slot machine
ds 1
ds 13
-wPikaPicUsedGFXEnd:: ; cc6c
+wPikaPicUsedGFXEnd::
ds 13
-wAnimPalette:: ; cc79
+wAnimPalette::
ds 1
ds 29
-wNPCMovementDirections2:: ; cc97
+wNPCMovementDirections2::
-wPikaPicAnimObjectDataBufferSize:: ; cc97
+wPikaPicAnimObjectDataBufferSize::
-wSwitchPartyMonTempBuffer:: ; cc97
+wSwitchPartyMonTempBuffer::
; temporary buffer when swapping party mon data
ds 1
-wPikaPicAnimObjectDataBuffer:: ; cc98
+wPikaPicAnimObjectDataBuffer::
; 4 structs each of length 8
; 0: buffer index
; 1: script index
@@ -850,157 +768,157 @@ wPikaPicAnimObjectDataBuffer:: ; cc98
ds 9
-wNumStepsToTake:: ; cca1
+wNumStepsToTake::
; used in Pallet Town scripted movement
ds 23
wPikaPicAnimObjectDataBufferEnd:: ;ccb8
ds 26
-wRLEByteCount:: ; ccd2
+wRLEByteCount::
ds 1
-wAddedToParty:: ; ccd3
+wAddedToParty::
; 0 = not added
; 1 = added
-wSimulatedJoypadStatesEnd:: ; ccd3
+wSimulatedJoypadStatesEnd::
; this is the end of the joypad states
; the list starts above this address and extends downwards in memory until here
; overloaded with below labels
-wParentMenuItem:: ; ccd3
+wParentMenuItem::
-wCanEvolveFlags:: ; ccd3
+wCanEvolveFlags::
; 1 flag for each party member indicating whether it can evolve
; The purpose of these flags is to track which mons levelled up during the
; current battle at the end of the battle when evolution occurs.
; Other methods of evolution simply set it by calling TryEvolvingMon.
ds 1
-wForceEvolution:: ; ccd4
+wForceEvolution::
ds 1
-; if [ccd5] != 1, the second AI layer is not applied
-wAILayer2Encouragement:: ; ccd5
+; if [wAILayer2Encouragement] != 1, the second AI layer is not applied
+wAILayer2Encouragement::
ds 1
ds 1
; current HP of player and enemy substitutes
-wPlayerSubstituteHP:: ; ccd7
+wPlayerSubstituteHP::
ds 1
-wEnemySubstituteHP:: ; ccd8
+wEnemySubstituteHP::
ds 1
-wTestBattlePlayerSelectedMove:: ; ccd9
+wTestBattlePlayerSelectedMove::
; The player's selected move during a test battle.
; InitBattleVariables sets it to the move Pound.
ds 1
ds 1
-wMoveMenuType:: ; ccdb
+wMoveMenuType::
; 0=regular, 1=mimic, 2=above message box (relearn, heal pp..)
ds 1
-wPlayerSelectedMove:: ; ccdc
+wPlayerSelectedMove::
ds 1
-wEnemySelectedMove:: ; ccdd
+wEnemySelectedMove::
ds 1
-wLinkBattleRandomNumberListIndex:: ; ccde
+wLinkBattleRandomNumberListIndex::
ds 1
-wAICount:: ; ccdf
+wAICount::
; number of times remaining that AI action can occur
ds 1
ds 2
-wEnemyMoveListIndex:: ; cce2
+wEnemyMoveListIndex::
ds 1
-wLastSwitchInEnemyMonHP:: ; cce3
+wLastSwitchInEnemyMonHP::
; The enemy mon's HP when it was switched in or when the current player mon
; was switched in, which was more recent.
; It's used to determine the message to print when switching out the player mon.
ds 2
-wTotalPayDayMoney:: ; cce5
+wTotalPayDayMoney::
; total amount of money made using Pay Day during the current battle
ds 3
-wSafariEscapeFactor:: ; cce8
+wSafariEscapeFactor::
ds 1
-wSafariBaitFactor:: ; cce9
+wSafariBaitFactor::
ds 1;
ds 1
-wTransformedEnemyMonOriginalDVs:: ; cceb
+wTransformedEnemyMonOriginalDVs::
ds 2
-wMonIsDisobedient:: ds 1 ; cced
+wMonIsDisobedient:: ds 1
-wPlayerDisabledMoveNumber:: ds 1 ; ccee
-wEnemyDisabledMoveNumber:: ds 1 ; ccef
+wPlayerDisabledMoveNumber:: ds 1
+wEnemyDisabledMoveNumber:: ds 1
-wInHandlePlayerMonFainted:: ; ccf0
+wInHandlePlayerMonFainted::
; 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
+wPlayerUsedMove:: ds 1
+wEnemyUsedMove:: ds 1
-wEnemyMonMinimized:: ds 1 ; ccf3
+wEnemyMonMinimized:: ds 1
-wMoveDidntMiss:: ds 1 ; ccf4
+wMoveDidntMiss:: ds 1
-wPartyFoughtCurrentEnemyFlags:: ; ccf5
+wPartyFoughtCurrentEnemyFlags::
; flags that indicate which party members have fought the current enemy mon
flag_array 6
-wLowHealthAlarmDisabled:: ; ccf6
+wLowHealthAlarmDisabled::
; Whether the low health alarm has been disabled due to the player winning the
; battle.
ds 1
-wPlayerMonMinimized:: ; ccf7
+wPlayerMonMinimized::
ds 1
ds 13
-wLuckySlotHiddenObjectIndex:: ; cd05
+wLuckySlotHiddenObjectIndex::
-wEnemyNumHits:: ; cd05
+wEnemyNumHits::
; number of hits by enemy in attacks like Double Slap, etc.
-wEnemyBideAccumulatedDamage:: ; cd05
+wEnemyBideAccumulatedDamage::
; the amount of damage accumulated by the enemy while biding (2 bytes)
ds 10
-wInGameTradeGiveMonSpecies:: ; cd0f
+wInGameTradeGiveMonSpecies::
-wPlayerMonUnmodifiedLevel:: ; cd0f
+wPlayerMonUnmodifiedLevel::
ds 1
-wInGameTradeTextPointerTablePointer:: ; cd10
+wInGameTradeTextPointerTablePointer::
-wPlayerMonUnmodifiedMaxHP:: ; cd10
+wPlayerMonUnmodifiedMaxHP::
ds 2
-wInGameTradeTextPointerTableIndex:: ; cd12
+wInGameTradeTextPointerTableIndex::
-wPlayerMonUnmodifiedAttack:: ; cd12
+wPlayerMonUnmodifiedAttack::
ds 1
-wInGameTradeGiveMonName:: ; cd13
+wInGameTradeGiveMonName::
ds 1
-wPlayerMonUnmodifiedDefense:: ; cd14
+wPlayerMonUnmodifiedDefense::
ds 2
-wPlayerMonUnmodifiedSpeed:: ; cd16
+wPlayerMonUnmodifiedSpeed::
ds 2
-wPlayerMonUnmodifiedSpecial:: ; cd18
+wPlayerMonUnmodifiedSpecial::
ds 2
; stat modifiers for the player's current pokemon
@@ -1008,44 +926,44 @@ wPlayerMonUnmodifiedSpecial:: ; cd18
; 7 is normal
wPlayerMonStatMods::
-wPlayerMonAttackMod:: ; cd1a
+wPlayerMonAttackMod::
ds 1
-wPlayerMonDefenseMod:: ; cd1b
+wPlayerMonDefenseMod::
ds 1
-wPlayerMonSpeedMod:: ; cd1c
+wPlayerMonSpeedMod::
ds 1
-wPlayerMonSpecialMod:: ; cd1d
+wPlayerMonSpecialMod::
ds 1
-wInGameTradeReceiveMonName:: ; cd1e
+wInGameTradeReceiveMonName::
-wPlayerMonAccuracyMod:: ; cd1e
+wPlayerMonAccuracyMod::
ds 1
-wPlayerMonEvasionMod:: ; cd1f
+wPlayerMonEvasionMod::
ds 1
ds 3
-wEnemyMonUnmodifiedLevel:: ; cd23
+wEnemyMonUnmodifiedLevel::
ds 1
-wEnemyMonUnmodifiedMaxHP:: ; cd24
+wEnemyMonUnmodifiedMaxHP::
ds 2
-wEnemyMonUnmodifiedAttack:: ; cd26
+wEnemyMonUnmodifiedAttack::
ds 2
-wEnemyMonUnmodifiedDefense:: ; cd28
+wEnemyMonUnmodifiedDefense::
ds 1
-wInGameTradeMonNick:: ; cd29
+wInGameTradeMonNick::
ds 1
-wEnemyMonUnmodifiedSpeed:: ; cd2a
+wEnemyMonUnmodifiedSpeed::
ds 2
-wEnemyMonUnmodifiedSpecial:: ; cd2c
+wEnemyMonUnmodifiedSpecial::
ds 1
-wEngagedTrainerClass:: ; cd2d
+wEngagedTrainerClass::
ds 1
-wEngagedTrainerSet:: ; cd2e
+wEngagedTrainerSet::
; ds 1
; stat modifiers for the enemy's current pokemon
@@ -1053,328 +971,328 @@ wEngagedTrainerSet:: ; cd2e
; 7 is normal
wEnemyMonStatMods::
-wEnemyMonAttackMod:: ; cd2e
+wEnemyMonAttackMod::
ds 1
-wEnemyMonDefenseMod:: ; cd2f
+wEnemyMonDefenseMod::
ds 1
-wEnemyMonSpeedMod:: ; cd30
+wEnemyMonSpeedMod::
ds 1
-wEnemyMonSpecialMod:: ; cd31
+wEnemyMonSpecialMod::
ds 1
-wEnemyMonAccuracyMod:: ; cd32
+wEnemyMonAccuracyMod::
ds 1
-wEnemyMonEvasionMod:: ; cd33
+wEnemyMonEvasionMod::
ds 1
-wInGameTradeReceiveMonSpecies:: ; cd34
+wInGameTradeReceiveMonSpecies::
ds 1
ds 2
-wNPCMovementDirections2Index:: ; cd37
+wNPCMovementDirections2Index::
-wUnusedCD37:: ; cd37
+wUnusedCD37::
-wFilteredBagItemsCount:: ; cd37
+wFilteredBagItemsCount::
; number of items in wFilteredBagItems list
ds 1
-wSimulatedJoypadStatesIndex:: ; cd38
+wSimulatedJoypadStatesIndex::
; the next simulated joypad state is at wSimulatedJoypadStatesEnd plus this value minus 1
; 0 if the joypad state is not being simulated
ds 1
-wWastedByteCD39:: ; cd39
+wWastedByteCD39::
; written to but nothing ever reads it
ds 1
-wWastedByteCD3A:: ; cd3a
+wWastedByteCD3A::
; written to but nothing ever reads it
ds 1
-wOverrideSimulatedJoypadStatesMask:: ; cd3b
+wOverrideSimulatedJoypadStatesMask::
; mask indicating which real button presses can override simulated ones
; XXX is it ever not 0?
ds 1
ds 1
-wFallingObjectsMovementData:: ; cd3d
+wFallingObjectsMovementData::
; up to 20 bytes (one byte for each falling object)
-wSavedY:: ; cd3d
+wSavedY::
-wTempSCX:: ; cd3d
+wTempSCX::
-wBattleTransitionCircleScreenQuadrantY:: ; cd3d
+wBattleTransitionCircleScreenQuadrantY::
; 0 = upper half (Y < 9)
; 1 = lower half (Y >= 9)
-wBattleTransitionCopyTilesOffset:: ; cd3d
+wBattleTransitionCopyTilesOffset::
; 2 bytes
; after 1 row/column has been copied, the offset to the next one to copy from
-wInwardSpiralUpdateScreenCounter:: ; cd3d
+wInwardSpiralUpdateScreenCounter::
; counts down from 7 so that every time 7 more tiles of the spiral have been
; placed, the tile map buffer is copied to VRAM so that progress is visible
-wHoFTeamIndex:: ; cd3d
+wHoFTeamIndex::
-wSSAnneSmokeDriftAmount:: ; cd3d
+wSSAnneSmokeDriftAmount::
; multiplied by 16 to get the number of times to go right by 2 pixels
-wRivalStarterTemp:: ; cd3d
+wRivalStarterTemp::
-wBoxMonCounts:: ; cd3d
+wBoxMonCounts::
; 12 bytes
; array of the number of mons in each box
-wDexMaxSeenMon:: ; cd3d
+wDexMaxSeenMon::
-wPPRestoreItem:: ; cd3d
+wPPRestoreItem::
-wWereAnyMonsAsleep:: ; cd3d
+wWereAnyMonsAsleep::
-wCanPlaySlots:: ; cd3d
+wCanPlaySlots::
-wNumShakes:: ; cd3d
+wNumShakes::
-wDayCareStartLevel:: ; cd3d
+wDayCareStartLevel::
; the level of the mon at the time it entered day care
-wWhichBadge:: ; cd3d
+wWhichBadge::
-wPriceTemp:: ; cd3d
+wPriceTemp::
; 3-byte BCD number
-wTitleScreenScene:: ; cd3d
+wTitleScreenScene::
-wPlayerCharacterOAMTile:: ; cd3d
+wPlayerCharacterOAMTile::
-wMoveDownSmallStarsOAMCount:: ; cd3d
+wMoveDownSmallStarsOAMCount::
; the number of small stars OAM entries to move down
-wChargeMoveNum:: ; cd3d
+wChargeMoveNum::
-wCoordIndex:: ; cd3d
+wCoordIndex::
-wOptionsTextSpeedCursorX:: ; cd3d
+wOptionsTextSpeedCursorX::
-wOptionsCursorLocation:: ; cd3d
+wOptionsCursorLocation::
-wTrainerInfoTextBoxWidthPlus1:: ; cd3d
+wTrainerInfoTextBoxWidthPlus1::
-wSwappedMenuItem:: ; cd3d
+wSwappedMenuItem::
-wHoFMonSpecies:: ; cd3d
+wHoFMonSpecies::
-wFieldMoves:: ; cd3d
+wFieldMoves::
; 4 bytes
; the current mon's field moves
-wBadgeNumberTile:: ; cd3d
+wBadgeNumberTile::
; tile ID of the badge number being drawn
-wRodResponse:: ; cd3d
+wRodResponse::
; 0 = no bite
; 1 = bite
; 2 = no fish on map
-wWhichTownMapLocation:: ; cd3d
+wWhichTownMapLocation::
-wStoppingWhichSlotMachineWheel:: ; cd3d
+wStoppingWhichSlotMachineWheel::
; which wheel the player is trying to stop
; 0 = none, 1 = wheel 1, 2 = wheel 2, 3 or greater = wheel 3
-wTradedPlayerMonSpecies:: ; cd3d
+wTradedPlayerMonSpecies::
-wTradingWhichPlayerMon:: ; cd3d
+wTradingWhichPlayerMon::
-wChangeBoxSavedMapTextPointer:: ; cd3d
+wChangeBoxSavedMapTextPointer::
-wFlyAnimUsingCoordList:: ; cd3d
+wFlyAnimUsingCoordList::
-wPlayerSpinInPlaceAnimFrameDelay:: ; cd3d
+wPlayerSpinInPlaceAnimFrameDelay::
-wPlayerSpinWhileMovingUpOrDownAnimDeltaY:: ; cd3d
+wPlayerSpinWhileMovingUpOrDownAnimDeltaY::
-wBoxNumString:: ; cd3d
+wBoxNumString::
-wHiddenObjectFunctionArgument:: ; cd3d
+wHiddenObjectFunctionArgument::
-wWhichTrade:: ; cd3d
+wWhichTrade::
; which entry from TradeMons to select
-wTrainerSpriteOffset:: ; cd3d
+wTrainerSpriteOffset::
-wUnusedCD3D:: ; cd3d
+wUnusedCD3D::
ds 1
-wTitleScreenTimer:: ; cd3e
+wTitleScreenTimer::
-wHUDPokeballGfxOffsetX:: ; cd3e
+wHUDPokeballGfxOffsetX::
; difference in X between the next ball and the current one
-wBattleTransitionCircleScreenQuadrantX:: ; cd3e
+wBattleTransitionCircleScreenQuadrantX::
; 0 = left half (X < 10)
; 1 = right half (X >= 10)
-wSSAnneSmokeX:: ; cd3e
+wSSAnneSmokeX::
-wRivalStarterBallSpriteIndex:: ; cd3e
+wRivalStarterBallSpriteIndex::
-wDayCareNumLevelsGrown:: ; cd3e
+wDayCareNumLevelsGrown::
-wOptionsBattleAnimCursorX:: ; cd3e
+wOptionsBattleAnimCursorX::
-wTrainerInfoTextBoxWidth:: ; cd3e
+wTrainerInfoTextBoxWidth::
-wHoFPartyMonIndex:: ; cd3e
+wHoFPartyMonIndex::
-wNumCreditsMonsDisplayed:: ; cd3e
+wNumCreditsMonsDisplayed::
; the number of credits mons that have been displayed so far
-wBadgeNameTile:: ; cd3e
+wBadgeNameTile::
; first tile ID of the name being drawn
-wFlyLocationsList:: ; cd3e
-; 11 bytes plus $ff sentinel values at each end
+wFlyLocationsList::
+; NUM_CITY_MAPS bytes plus $ff sentinel values at each end
-wSlotMachineWheel1Offset:: ; cd3e
+wSlotMachineWheel1Offset::
-wTradedEnemyMonSpecies:: ; cd3e
+wTradedEnemyMonSpecies::
-wTradingWhichEnemyMon:: ; cd3e
+wTradingWhichEnemyMon::
-wFlyAnimCounter:: ; cd3e
+wFlyAnimCounter::
-wPlayerSpinInPlaceAnimFrameDelayDelta:: ; cd3e
+wPlayerSpinInPlaceAnimFrameDelayDelta::
-wPlayerSpinWhileMovingUpOrDownAnimMaxY:: ; cd3e
+wPlayerSpinWhileMovingUpOrDownAnimMaxY::
-wHiddenObjectFunctionRomBank:: ; cd3e
+wHiddenObjectFunctionRomBank::
-wTrainerEngageDistance:: ; cd3e
+wTrainerEngageDistance::
-wJigglypuffFacingDirections2:: ; cd3e
+wJigglypuffFacingDirections2::
ds 1
-wHUDGraphicsTiles:: ; cd3f
+wHUDGraphicsTiles::
; 3 bytes
-wDayCareTotalCost:: ; cd3f
+wDayCareTotalCost::
; 2-byte BCD number
-wJigglypuffFacingDirections:: ; cd3f
+wJigglypuffFacingDirections::
-wOptionsBattleStyleCursorX:: ; cd3f
+wOptionsBattleStyleCursorX::
-wTrainerInfoTextBoxNextRowOffset:: ; cd3f
+wTrainerInfoTextBoxNextRowOffset::
-wHoFMonLevel:: ; cd3f
+wHoFMonLevel::
-wBadgeOrFaceTiles:: ; cd3f
+wBadgeOrFaceTiles::
; 8 bytes
; a list of the first tile IDs of each badge or face (depending on whether the
; badge is owned) to be drawn on the trainer screen
-wSlotMachineWheel2Offset:: ; cd3f
+wSlotMachineWheel2Offset::
-wNameOfPlayerMonToBeTraded:: ; cd3f
+wNameOfPlayerMonToBeTraded::
-wFlyAnimBirdSpriteImageIndex:: ; cd3f
+wFlyAnimBirdSpriteImageIndex::
-wPlayerSpinInPlaceAnimFrameDelayEndValue:: ; cd3f
+wPlayerSpinInPlaceAnimFrameDelayEndValue::
-wPlayerSpinWhileMovingUpOrDownAnimFrameDelay:: ; cd3f
+wPlayerSpinWhileMovingUpOrDownAnimFrameDelay::
-wHiddenObjectIndex:: ; cd3f
+wHiddenObjectIndex::
-wTrainerFacingDirection:: ; cd3f
+wTrainerFacingDirection::
ds 1
-wHoFMonOrPlayer:: ; cd40
+wHoFMonOrPlayer::
; show mon or show player?
; 0 = mon
; 1 = player
-wSlotMachineWheel3Offset:: ; cd40
+wSlotMachineWheel3Offset::
-wPlayerSpinInPlaceAnimSoundID:: ; cd40
+wPlayerSpinInPlaceAnimSoundID::
-wHiddenObjectY:: ; cd40
+wHiddenObjectY::
-wTrainerScreenY:: ; cd40
+wTrainerScreenY::
-wUnusedCD40:: ; cd40
+wOptionsCancelCursorX::
ds 1
-wDayCarePerLevelCost:: ; cd41
-; 2-byte BCD number (always set to $0100)
+wDayCarePerLevelCost::
+; 2-byte BCD number (always set to $100)
-wHoFTeamIndex2:: ; cd41
+wHoFTeamIndex2::
-wHiddenItemOrCoinsIndex:: ; cd41
+wHiddenItemOrCoinsIndex::
-wTradedPlayerMonOT:: ; cd41
+wTradedPlayerMonOT::
-wHiddenObjectX:: ; cd41
+wHiddenObjectX::
-wSlotMachineWinningSymbol:: ; cd41
+wSlotMachineWinningSymbol::
; the OAM tile number of the upper left corner of the winning symbol minus 2
-wNumFieldMoves:: ; cd41
+wNumFieldMoves::
-wSlotMachineWheel1BottomTile:: ; cd41
+wSlotMachineWheel1BottomTile::
-wTrainerScreenX:: ; cd41
+wTrainerScreenX::
ds 1
; a lot of the uses for these values use more than the said address
-wHoFTeamNo:: ; cd42
+wHoFTeamNo::
-wSlotMachineWheel1MiddleTile:: ; cd42
+wSlotMachineWheel1MiddleTile::
-wFieldMovesLeftmostXCoord:: ; cd42
+wFieldMovesLeftmostXCoord::
-wcd42:: ; cd42
+wcd42::
ds 1
-wLastFieldMoveID:: ; cd43
+wLastFieldMoveID::
; unused
-wSlotMachineWheel1TopTile:: ; cd43
+wSlotMachineWheel1TopTile::
ds 1
-wSlotMachineWheel2BottomTile:: ; cd44
+wSlotMachineWheel2BottomTile::
ds 1
-wSlotMachineWheel2MiddleTile:: ; cd45
+wSlotMachineWheel2MiddleTile::
ds 1
-wTempCoins1:: ; cd46
+wTempCoins1::
; 2 bytes
; temporary variable used to add payout amount to the player's coins
-wSlotMachineWheel2TopTile:: ; cd46
+wSlotMachineWheel2TopTile::
ds 1
-wBattleTransitionSpiralDirection:: ; cd47
+wBattleTransitionSpiralDirection::
; 0 = outward, 1 = inward
-wSlotMachineWheel3BottomTile:: ; cd47
+wSlotMachineWheel3BottomTile::
ds 1
-wSlotMachineWheel3MiddleTile:: ; cd48
+wSlotMachineWheel3MiddleTile::
-wFacingDirectionList:: ; cd48
-; 4 bytes (also, the byte before the start of the list (cd47) is used a temp
-; variable when the list is rotated)
+wFacingDirectionList::
+; 4 bytes (also, the byte before the start of the list (wSlotMachineWheel3BottomTile)
+; is used a temp variable when the list is rotated)
; used when spinning the player's sprite
ds 1
-wSlotMachineWheel3TopTile:: ; cd49
+wSlotMachineWheel3TopTile::
wTempObtainedBadgesBooleans::
; 8 bytes
@@ -1382,85 +1300,85 @@ wTempObtainedBadgesBooleans::
; one byte for each badge; 0 = not obtained, 1 = obtained
ds 1
-wTempCoins2:: ; cd4a
+wTempCoins2::
; 2 bytes
; temporary variable used to subtract the bet amount from the player's coins
-wPayoutCoins:: ; cd4a
+wPayoutCoins::
; 2 bytes
ds 2
-wTradedPlayerMonOTID:: ; cd4c
+wTradedPlayerMonOTID::
-wSlotMachineFlags:: ; cd4c
+wSlotMachineFlags::
; These flags are set randomly and control when the wheels stop.
; bit 6: allow the player to win in general
; bit 7: allow the player to win with 7 or bar (plus the effect of bit 6)
ds 1
-wSlotMachineWheel1SlipCounter:: ; cd4d
+wSlotMachineWheel1SlipCounter::
; wheel 1 can "slip" while this is non-zero
-wCutTile:: ; cd4d
+wCutTile::
; $3d = tree tile
; $52 = grass tile
ds 1
-wSlotMachineWheel2SlipCounter:: ; cd4e
+wSlotMachineWheel2SlipCounter::
; wheel 2 can "slip" while this is non-zero
-wTradedEnemyMonOT:: ; cd4e
+wTradedEnemyMonOT::
ds 1
-wSavedPlayerScreenY:: ; cd4f
+wSavedPlayerScreenY::
-wSlotMachineRerollCounter:: ; cd4f
+wSlotMachineRerollCounter::
; The remaining number of times wheel 3 will roll down a symbol until a match is
; found, when winning is enabled. It's initialized to 4 each bet.
-wEmotionBubbleSpriteIndex:: ; cd4f
+wEmotionBubbleSpriteIndex::
; the index of the sprite the emotion bubble is to be displayed above
ds 1
-wWhichEmotionBubble:: ; cd50
+wWhichEmotionBubble::
-wSlotMachineBet:: ; cd50
+wSlotMachineBet::
; how many coins the player bet on the slot machine (1 to 3)
-wSavedPlayerFacingDirection:: ; cd50
+wSavedPlayerFacingDirection::
-wWhichAnimationOffsets:: ; cd50
+wWhichAnimationOffsets::
; 0 = cut animation, 1 = boulder dust animation
ds 9
-wTradedEnemyMonOTID:: ; cd59
+wTradedEnemyMonOTID::
ds 2
-wStandingOnWarpPadOrHole:: ; cd5b
+wStandingOnWarpPadOrHole::
; 0 = neither
; 1 = warp pad
; 2 = hole
-wOAMBaseTile:: ; cd5b
+wOAMBaseTile::
-wGymTrashCanIndex:: ; cd5b
+wGymTrashCanIndex::
ds 1
-wSymmetricSpriteOAMAttributes:: ; cd5c
+wSymmetricSpriteOAMAttributes::
ds 1
-wMonPartySpriteSpecies:: ; cd5d
+wMonPartySpriteSpecies::
ds 1
-wLeftGBMonSpecies:: ; cd5e
+wLeftGBMonSpecies::
; in the trade animation, the mon that leaves the left gameboy
ds 1
-wRightGBMonSpecies:: ; cd5f
+wRightGBMonSpecies::
; in the trade animation, the mon that leaves the right gameboy
ds 1
-wFlags_0xcd60:: ; cd60
+wFlags_0xcd60::
; bit 0: is player engaged by trainer (to avoid being engaged by multiple trainers simultaneously)
; bit 1: boulder dust animation (from using Strength) pending
; bit 3: using generic PC
@@ -1470,7 +1388,7 @@ wFlags_0xcd60:: ; cd60
ds 9
-wActionResultOrTookBattleTurn:: ; cd6a
+wActionResultOrTookBattleTurn::
; This has overlapping related uses.
; When the player tries to use an item or use certain field moves, 0 is stored
; when the attempt fails and 1 is stored when the attempt succeeds.
@@ -1482,16 +1400,16 @@ wActionResultOrTookBattleTurn:: ; cd6a
; and the player is not allowed to make a move and the two uses are compatible.
ds 1
-wJoyIgnore:: ; cd6b
+wJoyIgnore::
; Set buttons are ignored.
ds 1
-wDownscaledMonSize:: ; cd6c
+wDownscaledMonSize::
; size of downscaled mon pic used in pokeball entering/exiting animation
; $00 = 5×5
; $01 = 3×3
-wNumMovesMinusOne:: ; cd6c
+wNumMovesMinusOne::
; FormatMovesString stores the number of moves minus one here
ds 1
@@ -1499,13 +1417,13 @@ UNION
wcd6d:: ds 4 ; buffer for various data
-wStatusScreenCurrentPP:: ; cd71
+wStatusScreenCurrentPP::
; temp variable used to print a move's current PP on the status screen
ds 1
ds 6
-wNormalMaxPPList:: ; cd78
+wNormalMaxPPList::
; list of normal max PP (without PP up) values
ds 9
@@ -1516,268 +1434,268 @@ wEvosMoves:: ds MAX_EVOLUTIONS * EVOLUTION_SIZE + 1
ENDU
-wSerialOtherGameboyRandomNumberListBlock:: ; cd81
+wSerialOtherGameboyRandomNumberListBlock::
; buffer for transferring the random number list generated by the other gameboy
-wTileMapBackup2:: ; cd81
+wTileMapBackup2::
; second buffer for temporarily saving and restoring current screen's tiles (e.g. if menus are drawn on top)
ds 20 * 18
-wNamingScreenNameLength:: ; cee9
+wNamingScreenNameLength::
-wEvoOldSpecies:: ; cee9
+wEvoOldSpecies::
-wBuffer:: ; cee9
+wBuffer::
; Temporary storage area of 30 bytes.
-wTownMapCoords:: ; cee9
+wTownMapCoords::
; lower nybble is x, upper nybble is y
-wLearningMovesFromDayCare:: ; cee9
+wLearningMovesFromDayCare::
; whether WriteMonMoves is being used to make a mon learn moves from day care
; non-zero if so
-wChangeMonPicEnemyTurnSpecies:: ; cee9
+wChangeMonPicEnemyTurnSpecies::
-wHPBarMaxHP:: ; cee9
+wHPBarMaxHP::
ds 1
-wNamingScreenSubmitName:: ; ceea
+wNamingScreenSubmitName::
; non-zero when the player has chosen to submit the name
-wChangeMonPicPlayerTurnSpecies:: ; ceea
+wChangeMonPicPlayerTurnSpecies::
-wEvoNewSpecies:: ; ceea
+wEvoNewSpecies::
ds 1
-wAlphabetCase:: ; ceeb
+wAlphabetCase::
; 0 = upper case
; 1 = lower case
-wEvoMonTileOffset:: ; ceeb
+wEvoMonTileOffset::
-wHPBarOldHP:: ; ceeb
+wHPBarOldHP::
ds 1
-wEvoCancelled:: ; ceec
+wEvoCancelled::
ds 1
-wNamingScreenLetter:: ; ceed
+wNamingScreenLetter::
-wHPBarNewHP:: ; ceed
+wHPBarNewHP::
ds 2
-wHPBarDelta:: ; ceef
+wHPBarDelta::
ds 1
-wHPBarTempHP:: ; cef0
+wHPBarTempHP::
ds 2
ds 11
-wHPBarHPDifference:: ; cefd
+wHPBarHPDifference::
ds 1
ds 7
-wAIItem:: ; cf05
+wAIItem::
; the item that the AI used
ds 1
-wUsedItemOnWhichPokemon:: ; cf06
+wUsedItemOnWhichPokemon::
ds 1
-wAnimSoundID:: ; cf07
+wAnimSoundID::
; sound ID during battle animations
ds 1
-wBankswitchHomeSavedROMBank:: ; cf08
+wBankswitchHomeSavedROMBank::
; used as a storage value for the bank to return to after a BankswitchHome (bankswitch in homebank)
ds 1
-wBankswitchHomeTemp:: ; cf09
+wBankswitchHomeTemp::
; used as a temp storage value for the bank to switch to
ds 1
-wBoughtOrSoldItemInMart:: ; cf0a
+wBoughtOrSoldItemInMart::
; 0 = nothing bought or sold in pokemart
; 1 = bought or sold something in pokemart
; this value is not used for anything
ds 1
-wBattleResult:: ; cf0b
+wBattleResult::
; $00 - win
; $01 - lose
; $02 - draw
ds 1
-wAutoTextBoxDrawingControl:: ; cf0c
+wAutoTextBoxDrawingControl::
; bit 0: if set, DisplayTextID automatically draws a text box
ds 1
wcf0d:: ds 1 ; used with some overworld scripts (not exactly sure what it's used for)
-wTilePlayerStandingOn:: ; cf0e
+wTilePlayerStandingOn::
; used in CheckForTilePairCollisions2 to store the tile the player is on
ds 1
-wNPCNumScriptedSteps:: ds 1 ; cf0f
+wNPCNumScriptedSteps:: ds 1
-wNPCMovementScriptFunctionNum:: ; cf10
+wNPCMovementScriptFunctionNum::
; which script function within the pointer table indicated by
; wNPCMovementScriptPointerTableNum
ds 1
-wTextPredefFlag:: ; cf11
+wTextPredefFlag::
; bit 0: set when printing a text predef so that DisplayTextID doesn't switch
; to the current map's bank
ds 1
-wPredefParentBank:: ; cf12
+wPredefParentBank::
ds 1
-wSpriteIndex:: ds 1 ; cf13
+wSpriteIndex:: ds 1
-wCurSpriteMovement2:: ; cf14
+wCurSpriteMovement2::
; movement byte 2 of current sprite
ds 1
ds 2
-wNPCMovementScriptSpriteOffset:: ; cf17
+wNPCMovementScriptSpriteOffset::
; sprite offset of sprite being controlled by NPC movement script
ds 1
-wScriptedNPCWalkCounter:: ; cf18
+wScriptedNPCWalkCounter::
ds 1
ds 1
-wOnSGB:: ; cf1a
+wOnSGB::
; if running on SGB, it's 1, else it's 0
ds 1
-wDefaultPaletteCommand:: ; cf1b
+wDefaultPaletteCommand::
ds 1
-wPlayerHPBarColor:: ; cf1c
+wPlayerHPBarColor::
-wWholeScreenPaletteMonSpecies:: ; cf1c
+wWholeScreenPaletteMonSpecies::
; species of the mon whose palette is used for the whole screen
ds 1
-wEnemyHPBarColor:: ; cf1d
+wEnemyHPBarColor::
ds 1
; 0: green
; 1: yellow
; 2: red
-wPartyMenuHPBarColors:: ; cf1e
+wPartyMenuHPBarColors::
ds 6
-wStatusScreenHPBarColor:: ; cf25
+wStatusScreenHPBarColor::
ds 1
ds 7
-wCopyingSGBTileData:: ; cf2d
+wCopyingSGBTileData::
-wWhichPartyMenuHPBar:: ; cf2d
+wWhichPartyMenuHPBar::
-wPalPacket:: ; cf2d
+wPalPacket::
ds 1
-wPartyMenuBlkPacket:: ; cf2e
+wPartyMenuBlkPacket::
; $30 bytes
ds 9
-wPartyHPBarAttributes:: ; cf36
+wPartyHPBarAttributes::
ds 20
-wExpAmountGained:: ; cf4a
+wExpAmountGained::
; 2-byte big-endian number
; the total amount of exp a mon gained
wcf4b:: ds 2 ; storage buffer for various strings
-wGainBoostedExp:: ; cf4c
+wGainBoostedExp::
ds 1
ds 17
-wGymCityName:: ; cf5e
+wGymCityName::
ds 17
-wGymLeaderName:: ; cf6f
+wGymLeaderName::
ds NAME_LENGTH
-wItemList:: ; cf7a
+wItemList::
ds 16
-wListPointer:: ; cf8a
+wListPointer::
ds 2
-wUnusedCF8D:: ; cf8c
+wUnusedCF8D::
; 2 bytes
; used to store pointers, but never read
ds 2
-wItemPrices:: ; cf8e
+wItemPrices::
ds 2
-wcf91:: ds 1 ; used with a lot of things (too much to list here) ; cf90
+wcf91:: ds 1 ; used with a lot of things (too much to list here)
-wWhichPokemon:: ; cf91
+wWhichPokemon::
; which pokemon you selected
ds 1
-wPrintItemPrices:: ; cf92
+wPrintItemPrices::
; if non-zero, then print item prices when displaying lists
ds 1
-wHPBarType:: ; cf93
+wHPBarType::
; type of HP bar
; $00 = enemy HUD in battle
; $01 = player HUD in battle / status screen
; $02 = party menu
-wListMenuID:: ; cf93
+wListMenuID::
; ID used by DisplayListMenuID
ds 1
-wRemoveMonFromBox:: ; cf94
+wRemoveMonFromBox::
; if non-zero, RemovePokemon will remove the mon from the current box,
; else it will remove the mon from the party
-wMoveMonType:: ; cf94
+wMoveMonType::
; 0 = move from box to party
; 1 = move from party to box
; 2 = move from daycare to party
; 3 = move from party to daycare
ds 1
-wItemQuantity:: ; cf95
+wItemQuantity::
ds 1
-wMaxItemQuantity:: ; cf96
+wMaxItemQuantity::
ds 1
; LoadMonData copies mon data here
-wLoadedMon:: party_struct wLoadedMon ; cf97
+wLoadedMon:: party_struct wLoadedMon
-wFontLoaded:: ; cfc3
+wFontLoaded::
; bit 0: The space in VRAM that is used to store walk animation tile patterns
; for the player and NPCs is in use for font tile patterns.
; This means that NPC movement must be disabled.
; The other bits are unused.
ds 1
-wWalkCounter:: ; cfc4
+wWalkCounter::
; walk animation counter
ds 1
-wTileInFrontOfPlayer:: ; cfc5
+wTileInFrontOfPlayer::
; background tile number in front of the player (either 1 or 2 steps ahead)
ds 1
-wAudioFadeOutControl:: ; cfc6
+wAudioFadeOutControl::
; 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
@@ -1789,13 +1707,13 @@ wAudioFadeOutControl:: ; cfc6
; audio, it zeroes this variable and starts playing the sound ID stored in it.
ds 1
-wAudioFadeOutCounterReloadValue:: ; cfc7
+wAudioFadeOutCounterReloadValue::
ds 1
-wAudioFadeOutCounter:: ; cfc8
+wAudioFadeOutCounter::
ds 1
-wLastMusicSoundID:: ; cfc9
+wLastMusicSoundID::
; 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
@@ -1807,47 +1725,47 @@ wLastMusicSoundID:: ; cfc9
; the music).
ds 1
-wUpdateSpritesEnabled:: ; cfca
+wUpdateSpritesEnabled::
; $00 = causes sprites to be hidden and the value to change to $ff
; $01 = enabled
; $ff = disabled
; other values aren't used
ds 1
-wEnemyMoveNum:: ; cfcb
+wEnemyMoveNum::
ds 1
-wEnemyMoveEffect:: ; cfcc
+wEnemyMoveEffect::
ds 1
-wEnemyMovePower:: ; cfcd
+wEnemyMovePower::
ds 1
-wEnemyMoveType:: ; cfce
+wEnemyMoveType::
ds 1
-wEnemyMoveAccuracy:: ; cfcf
+wEnemyMoveAccuracy::
ds 1
-wEnemyMoveMaxPP:: ; cfd0
+wEnemyMoveMaxPP::
ds 1
-wPlayerMoveNum:: ; cfd1
+wPlayerMoveNum::
ds 1
-wPlayerMoveEffect:: ; cfd2
+wPlayerMoveEffect::
ds 1
-wPlayerMovePower:: ; cfd3
+wPlayerMovePower::
ds 1
-wPlayerMoveType:: ; cfd4
+wPlayerMoveType::
ds 1
-wPlayerMoveAccuracy:: ; cfd5
+wPlayerMoveAccuracy::
ds 1
-wPlayerMoveMaxPP:: ; cfd6
+wPlayerMoveMaxPP::
ds 1
-wEnemyMonSpecies2:: ; cfd7
+wEnemyMonSpecies2::
ds 1
-wBattleMonSpecies2:: ; cfd8
+wBattleMonSpecies2::
ds 1
-wEnemyMonNick:: ds NAME_LENGTH ; cfd9
+wEnemyMonNick:: ds NAME_LENGTH
-wEnemyMon:: ; cfe4
+wEnemyMon::
; The wEnemyMon struct reaches past 0xcfff,
; the end of wram bank 0 on cgb.
; This has no significance on dmg, where wram
@@ -1883,64 +1801,64 @@ wEnemyMonBaseStats:: ds 5
wEnemyMonActualCatchRate:: ds 1
wEnemyMonBaseExp:: ds 1
-wBattleMonNick:: ds NAME_LENGTH ; d008
-wBattleMon:: battle_struct wBattleMon ; d013
+wBattleMonNick:: ds NAME_LENGTH
+wBattleMon:: battle_struct wBattleMon
-wTrainerClass:: ; d030
+wTrainerClass::
ds 1
ds 1
-wTrainerPicPointer:: ; d032
+wTrainerPicPointer::
ds 2
ds 1
-wTempMoveNameBuffer:: ; d035
+wTempMoveNameBuffer::
-wLearnMoveMonName:: ; d035
+wLearnMoveMonName::
; The name of the mon that is learning a move.
ds 16
-wTrainerBaseMoney:: ; d045
+wTrainerBaseMoney::
; 2-byte BCD number
; money received after battle = base money × level of highest-level enemy mon
ds 2
-wMissableObjectCounter:: ; d047
+wMissableObjectCounter::
ds 1
ds 1
-wTrainerName:: ; d049
+wTrainerName::
; 13 bytes for the letters of the opposing trainer
; the name is terminated with $50 with possible
; unused trailing letters
ds 13
-wIsInBattle:: ; d056
+wIsInBattle::
; lost battle, this is -1
; no battle, this is 0
; wild battle, this is 1
; trainer battle, this is 2
ds 1
-wPartyGainExpFlags:: ; d057
+wPartyGainExpFlags::
; flags that indicate which party members should be be given exp when GainExperience is called
flag_array 6
-wCurOpponent:: ; d058
+wCurOpponent::
; in a wild battle, this is the species of pokemon
; in a trainer battle, this is the trainer class + OPP_ID_OFFSET
ds 1
-wBattleType:: ; d059
+wBattleType::
; in normal battle, this is 0
; in old man battle, this is 1
; in safari battle, this is 2
ds 1
-wDamageMultipliers:: ; d05a
+wDamageMultipliers::
; bits 0-6: Effectiveness
; $0 = immune
; $5 = not very effective
@@ -1949,34 +1867,34 @@ wDamageMultipliers:: ; d05a
; bit 7: STAB
ds 1
-wLoneAttackNo:: ; d05b
+wLoneAttackNo::
; which entry in LoneAttacks to use
-wGymLeaderNo:: ; d05b
+wGymLeaderNo::
; it's actually the same thing as ^
ds 1
-wTrainerNo:: ; d05c
+wTrainerNo::
; which instance of [youngster, lass, etc] is this?
ds 1
-wCriticalHitOrOHKO:: ; d05d
+wCriticalHitOrOHKO::
; $00 = normal attack
; $01 = critical hit
; $02 = successful OHKO
; $ff = failed OHKO
ds 1
-wMoveMissed:: ; d05e
+wMoveMissed::
ds 1
-wPlayerStatsToDouble:: ; d05f
+wPlayerStatsToDouble::
; always 0
ds 1
-wPlayerStatsToHalve:: ; d060
+wPlayerStatsToHalve::
; always 0
ds 1
-wPlayerBattleStatus1:: ; d061
+wPlayerBattleStatus1::
; bit 0 - bide
; bit 1 - thrash / petal dance
; bit 2 - attacking multiple times (e.g. double kick)
@@ -1987,7 +1905,7 @@ wPlayerBattleStatus1:: ; d061
; bit 7 - confusion
ds 1
-wPlayerBattleStatus2:: ; d062
+wPlayerBattleStatus2::
; bit 0 - X Accuracy effect
; bit 1 - protected by "mist"
; bit 2 - focus energy effect
@@ -1997,104 +1915,104 @@ wPlayerBattleStatus2:: ; d062
; bit 7 - leech seeded
ds 1
-wPlayerBattleStatus3:: ; d063
+wPlayerBattleStatus3::
; bit 0 - toxic
; bit 1 - light screen
; bit 2 - reflect
; bit 3 - transformed
ds 1
-wEnemyStatsToDouble:: ; d064
+wEnemyStatsToDouble::
; always 0
ds 1
-wEnemyStatsToHalve:: ; d065
+wEnemyStatsToHalve::
; always 0
ds 1
-wEnemyBattleStatus1:: ; d066
+wEnemyBattleStatus1::
ds 1
-wEnemyBattleStatus2:: ; d067
+wEnemyBattleStatus2::
ds 1
-wEnemyBattleStatus3:: ; d068
+wEnemyBattleStatus3::
ds 1
-wPlayerNumAttacksLeft:: ; d069
+wPlayerNumAttacksLeft::
; when the player is attacking multiple times, the number of attacks left
ds 1
-wPlayerConfusedCounter:: ; d06a
+wPlayerConfusedCounter::
ds 1
-wPlayerToxicCounter:: ; d06b
+wPlayerToxicCounter::
ds 1
-wPlayerDisabledMove:: ; d06c
+wPlayerDisabledMove::
; high nibble: which move is disabled (1-4)
; low nibble: disable turns left
ds 1
ds 1
-wEnemyNumAttacksLeft:: ; d06e
+wEnemyNumAttacksLeft::
; when the enemy is attacking multiple times, the number of attacks left
ds 1
-wEnemyConfusedCounter:: ; d06f
+wEnemyConfusedCounter::
ds 1
-wEnemyToxicCounter:: ; d070
+wEnemyToxicCounter::
ds 1
-wEnemyDisabledMove:: ; d071
+wEnemyDisabledMove::
; high nibble: which move is disabled (1-4)
; low nibble: disable turns left
ds 1
ds 1
-wPlayerNumHits:: ; d073
+wPlayerNumHits::
; number of hits by player in attacks like Double Slap, etc.
-wPlayerBideAccumulatedDamage:: ; d073
+wPlayerBideAccumulatedDamage::
; the amount of damage accumulated by the player while biding (2 bytes)
-wUnknownSerialCounter2:: ; d073
+wUnknownSerialCounter2::
; 2 bytes
ds 4
-wEscapedFromBattle:: ; d077
+wEscapedFromBattle::
; non-zero when an item or move that allows escape from battle was used
ds 1
-wAmountMoneyWon:: ; d078
+wAmountMoneyWon::
; 3-byte BCD number
-wObjectToHide:: ; d078
+wObjectToHide::
ds 1
-wObjectToShow:: ; d079
+wObjectToShow::
ds 1
ds 1
-wDefaultMap:: ; d07b
+wDefaultMap::
; the map you will start at when the debug bit is set
-wMenuItemOffset:: ; d07b
+wMenuItemOffset::
-wAnimationID:: ; d07b
+wAnimationID::
; ID number of the current battle animation
ds 1
-wNamingScreenType:: ; d07c
+wNamingScreenType::
-wPartyMenuTypeOrMessageID:: ; d07c
+wPartyMenuTypeOrMessageID::
-wTempTilesetNumTiles:: ; d07c
+wTempTilesetNumTiles::
; temporary storage for the number of tiles in a tileset
ds 1
-wSavedListScrollOffset:: ; d07d
+wSavedListScrollOffset::
; used by the pokemart code to save the existing value of wListScrollOffset
; so that it can be restored when the player is done with the pokemart NPC
ds 1
@@ -2102,71 +2020,71 @@ wSavedListScrollOffset:: ; d07d
ds 2
; base coordinates of frame block
-wBaseCoordX:: ; d080
+wBaseCoordX::
ds 1
-wBaseCoordY:: ; d081
+wBaseCoordY::
ds 1
; low health alarm counter/enable
; high bit = enable, others = timer to cycle frequencies
-wLowHealthAlarm:: ds 1 ; d082
+wLowHealthAlarm:: ds 1
-wFBTileCounter:: ; d083
+wFBTileCounter::
; counts how many tiles of the current frame block have been drawn
ds 1
-wMovingBGTilesCounter2:: ; d084
+wMovingBGTilesCounter2::
ds 1
-wSubAnimFrameDelay:: ; d085
+wSubAnimFrameDelay::
; duration of each frame of the current subanimation in terms of screen refreshes
ds 1
-wSubAnimCounter:: ; d086
+wSubAnimCounter::
; counts the number of subentries left in the current subanimation
ds 1
-wSaveFileStatus:: ; d087
+wSaveFileStatus::
; 1 = no save file or save file is corrupted
; 2 = save file exists and no corruption has been detected
ds 1
-wNumFBTiles:: ; d088
+wNumFBTiles::
; number of tiles in current battle animation frame block
ds 1
-wFlashScreenLongCounter:: ; d089
+wFlashScreenLongCounter::
-wSpiralBallsBaseY:: ; d089
+wSpiralBallsBaseY::
-wFallingObjectMovementByte:: ; d089
+wFallingObjectMovementByte::
; bits 0-6: index into FallingObjects_DeltaXs array (0 - 8)
; bit 7: direction; 0 = right, 1 = left
-wNumShootingBalls:: ; d089
+wNumShootingBalls::
-wTradedMonMovingRight:: ; d089
+wTradedMonMovingRight::
; $01 if mon is moving from left gameboy to right gameboy; $00 if vice versa
-wOptionsInitialized:: ; d089
+wOptionsInitialized::
-wNewSlotMachineBallTile:: ; d089
+wNewSlotMachineBallTile::
-wCoordAdjustmentAmount:: ; d089
+wCoordAdjustmentAmount::
; how much to add to the X/Y coord
-wUnusedD08A:: ; d089
+wUnusedD08A::
ds 1
-wSpiralBallsBaseX:: ; d08a
+wSpiralBallsBaseX::
-wNumFallingObjects:: ; d08a
+wNumFallingObjects::
-wSlideMonDelay:: ; d08a
+wSlideMonDelay::
-wAnimCounter:: ; d08a
+wAnimCounter::
; generic counter variable for various animations
-wSubAnimTransform:: ; d08a
+wSubAnimTransform::
; controls what transformations are applied to the subanimation
; 01: flip horizontally and vertically
; 02: flip horizontally and translate downwards 40 pixels
@@ -2174,52 +2092,52 @@ wSubAnimTransform:: ; d08a
; 04: reverse the subanimation
ds 1
-wEndBattleWinTextPointer:: ; d08b
+wEndBattleWinTextPointer::
ds 2
-wEndBattleLoseTextPointer:: ; d08d
+wEndBattleLoseTextPointer::
ds 2
ds 2
-wEndBattleTextRomBank:: ; d091
+wEndBattleTextRomBank::
ds 1
ds 1
-wSubAnimAddrPtr:: ; d093
+wSubAnimAddrPtr::
; the address _of the address_ of the current subanimation entry
ds 2
-wSlotMachineAllowMatchesCounter:: ; d095
+wSlotMachineAllowMatchesCounter::
; If non-zero, the allow matches flag is always set.
; There is a 1/256 (~0.4%) chance that this value will be set to 60, which is
; the only way it can increase. Winning certain payout amounts will decrement it
; or zero it.
-wSubAnimSubEntryAddr:: ; d095
+wSubAnimSubEntryAddr::
; the address of the current subentry of the current subanimation
ds 2
ds 2
-wOutwardSpiralTileMapPointer:: ; d099
+wOutwardSpiralTileMapPointer::
ds 1
-wPartyMenuAnimMonEnabled:: ; d09a
+wPartyMenuAnimMonEnabled::
-wTownMapSpriteBlinkingEnabled:: ; d09a
+wTownMapSpriteBlinkingEnabled::
; non-zero when enabled. causes nest locations to blink on and off.
; the town selection cursor will blink regardless of what this value is
-wUnusedD09B:: ; d09a
+wUnusedD09B::
ds 1
-wFBDestAddr:: ; d09b
+wFBDestAddr::
; current destination address in OAM for frame blocks (big endian)
ds 2
-wFBMode:: ; d09d
+wFBMode::
; 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
@@ -2228,172 +2146,172 @@ wFBMode:: ; d09d
; 04: delay, without cleaning OAM buffer, and do not advance [wFBDestAddr], so that the next frame block will overwrite this one
ds 1
-wLinkCableAnimBulgeToggle:: ; d09e
+wLinkCableAnimBulgeToggle::
; 0 = small
; 1 = big
-wIntroNidorinoBaseTile:: ; d09e
+wIntroNidorinoBaseTile::
-wOutwardSpiralCurrentDirection:: ; d09e
+wOutwardSpiralCurrentDirection::
-wDropletTile:: ; d09e
+wDropletTile::
-wNewTileBlockID:: ; d09e
+wNewTileBlockID::
-wWhichBattleAnimTileset:: ; d09e
+wWhichBattleAnimTileset::
-wSquishMonCurrentDirection:: ; d09e
+wSquishMonCurrentDirection::
; 0 = left
; 1 = right
-wSlideMonUpBottomRowLeftTile:: ; d09e
+wSlideMonUpBottomRowLeftTile::
; the tile ID of the leftmost tile in the bottom row in AnimationSlideMonUp_
ds 1
-wDisableVBlankWYUpdate:: ds 1 ; if non-zero, don't update WY during V-blank ; d09f
+wDisableVBlankWYUpdate:: ds 1 ; if non-zero, don't update WY during V-blank
-wSpriteCurPosX:: ; d0a0
+wSpriteCurPosX::
ds 1
-wSpriteCurPosY:: ; d0a1
+wSpriteCurPosY::
ds 1
-wSpriteWidth:: ; d0a2
+wSpriteWidth::
ds 1
-wSpriteHeight:: ; d0a3
+wSpriteHeight::
ds 1
-wSpriteInputCurByte:: ; d0a4
+wSpriteInputCurByte::
; current input byte
ds 1
-wSpriteInputBitCounter:: ; d0a5
+wSpriteInputBitCounter::
; bit offset of last read input bit
ds 1
-wSpriteOutputBitOffset:: ; d0a6; determines where in the output byte the two bits are placed. Each byte contains four columns (2bpp data)
+wSpriteOutputBitOffset:: ; 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
-wSpriteLoadFlags:: ; d0a7
-; bit 0 determines used buffer (0 -> $a188, 1 -> $a310)
+wSpriteLoadFlags::
+; bit 0 determines used buffer (0 -> sSpriteBuffer1, 1 -> sSpriteBuffer2)
; bit 1 loading last sprite chunk? (there are at most 2 chunks per load operation)
ds 1
-wSpriteUnpackMode:: ; d0a8
+wSpriteUnpackMode::
ds 1
-wSpriteFlipped:: ; d0a9
+wSpriteFlipped::
ds 1
-wSpriteInputPtr:: ; d0aa
+wSpriteInputPtr::
; pointer to next input byte
ds 2
-wSpriteOutputPtr:: ; d0ac
+wSpriteOutputPtr::
; pointer to current output byte
ds 2
-wSpriteOutputPtrCached:: ; d0ae
+wSpriteOutputPtrCached::
; used to revert pointer for different bit offsets
ds 2
-wSpriteDecodeTable0Ptr:: ; d0b0
+wSpriteDecodeTable0Ptr::
; pointer to differential decoding table (assuming initial value 0)
ds 2
-wSpriteDecodeTable1Ptr:: ; d0b2
+wSpriteDecodeTable1Ptr::
; pointer to differential decoding table (assuming initial value 1)
ds 2
-wd0b5:: ds 1 ; used as a temp storage area for Pokemon Species, and other Pokemon/Battle related things ; d0b4
+wd0b5:: ds 1 ; used as a temp storage area for Pokemon Species, and other Pokemon/Battle related things
-wNameListType:: ; d0b5
+wNameListType::
ds 1
-wPredefBank:: ; d0b6
+wPredefBank::
ds 1
-wMonHeader:: ; d0b7
+wMonHeader::
-wMonHIndex:: ; d0b7
+wMonHIndex::
; In the ROM base stats data structure, this is the dex number, but it is
; overwritten with the internal index number after the header is copied to WRAM.
ds 1
-wMonHBaseStats:: ; d0b8
-wMonHBaseHP:: ; d0b8
+wMonHBaseStats::
+wMonHBaseHP::
ds 1
-wMonHBaseAttack:: ; d0b9
+wMonHBaseAttack::
ds 1
-wMonHBaseDefense:: ; d0ba
+wMonHBaseDefense::
ds 1
-wMonHBaseSpeed:: ; d0bb
+wMonHBaseSpeed::
ds 1
-wMonHBaseSpecial:: ; d0bc
+wMonHBaseSpecial::
ds 1
-wMonHTypes:: ; d0bd
-wMonHType1:: ; d0bd
+wMonHTypes::
+wMonHType1::
ds 1
-wMonHType2:: ; d0be
+wMonHType2::
ds 1
-wMonHCatchRate:: ; d0bf
+wMonHCatchRate::
ds 1
-wMonHBaseEXP:: ; d0c0
+wMonHBaseEXP::
ds 1
-wMonHSpriteDim:: ; d0c1
+wMonHSpriteDim::
ds 1
-wMonHFrontSprite:: ; d0c2
+wMonHFrontSprite::
ds 2
-wMonHBackSprite:: ; d0c4
+wMonHBackSprite::
ds 2
-wMonHMoves:: ; d0c6
+wMonHMoves::
ds 4
-wMonHGrowthRate:: ; d0ca
+wMonHGrowthRate::
ds 1
-wMonHLearnset:: ; d0cb
+wMonHLearnset::
; bit field
flag_array 50 + 5
ds 1
-wSavedTilesetType:: ; d0d3
+wSavedTilesetType::
; saved at the start of a battle and then written back at the end of the battle
ds 1
ds 2
-wDamage:: ; d0d6
+wDamage::
ds 2
ds 2
-wRepelRemainingSteps:: ; d0da
+wRepelRemainingSteps::
ds 1
-wMoves:: ; d0db
+wMoves::
; list of moves for FormatMovesString
ds 4
-wMoveNum:: ; d0df
+wMoveNum::
ds 1
-wMovesString:: ; d0e0
+wMovesString::
ds 56
-wUnusedD119:: ; d118
+wUnusedD119::
ds 1
-wWalkBikeSurfStateCopy:: ; d119
+wWalkBikeSurfStateCopy::
; wWalkBikeSurfState is sometimes copied here, but it doesn't seem to be used for anything
ds 1
-wInitListType:: ; d11a
+wInitListType::
; the type of list for InitList to init
ds 1
-wCapturedMonSpecies:: ; d11b
+wCapturedMonSpecies::
; 0 if no mon was captured
ds 1
-wFirstMonsNotOutYet:: ; d11c
+wFirstMonsNotOutYet::
; Non-zero when the first player mon and enemy mon haven't been sent out yet.
; It prevents the game from asking if the player wants to choose another mon
; when the enemy sends out their first mon and suppresses the "no will to fight"
@@ -2401,78 +2319,78 @@ wFirstMonsNotOutYet:: ; d11c
; which will be the first mon sent out.
ds 1
-wPokeBallCaptureCalcTemp:: ; d11e
+wPokeBallCaptureCalcTemp::
; lower nybble: number of shakes
; upper nybble: number of animations to play
-wPokeBallAnimData:: ; d11d
+wPokeBallAnimData::
-wUsingPPUp:: ; d11d
+wUsingPPUp::
-wMaxPP:: ; d11d
+wMaxPP::
; 0 for player, non-zero for enemy
-wCalculateWhoseStats:: ; d11d
+wCalculateWhoseStats::
-wTypeEffectiveness:: ; d11d
+wTypeEffectiveness::
-wMoveType:: ; d11d
+wMoveType::
-wNumSetBits:: ; d11d
+wNumSetBits::
wd11e:: ds 1 ; used as a Pokemon and Item storage value. Also used as an output value for CountSetBits
-wForcePlayerToChooseMon:: ; d11e
+wForcePlayerToChooseMon::
; When this value is non-zero, the player isn't allowed to exit the party menu
; by pressing B and not choosing a mon.
ds 1
-wNumRunAttempts:: ; d11f
+wNumRunAttempts::
; number of times the player has tried to run from battle
ds 1
-wEvolutionOccurred:: ; d120
+wEvolutionOccurred::
ds 1
-wVBlankSavedROMBank:: ; d121
+wVBlankSavedROMBank::
ds 1
-wFarCopyDataSavedROMBank:: ; d122
+wFarCopyDataSavedROMBank::
ds 1
-wIsKeyItem:: ; d123
+wIsKeyItem::
ds 1
-wTextBoxID:: ; d124
+wTextBoxID::
ds 1
-wCurrentMapScriptFlags:: ds 1 ; not exactly sure what this is used for, but it seems to be used as a multipurpose temp flag value ; d125
+wCurrentMapScriptFlags:: ds 1 ; not exactly sure what this is used for, but it seems to be used as a multipurpose temp flag value
-wCurEnemyLVL:: ; d126
+wCurEnemyLVL::
ds 1
-wItemListPointer:: ; d127
+wItemListPointer::
; pointer to list of items terminated by $FF
ds 2
-wListCount:: ; d129
+wListCount::
; number of entries in a list
ds 1
-wLinkState:: ; d12a
+wLinkState::
ds 1
-wTwoOptionMenuID:: ; d12b
+wTwoOptionMenuID::
ds 1
-wChosenMenuItem:: ; d12c
+wChosenMenuItem::
; the id of the menu item the player ultimately chose
-wOutOfBattleBlackout:: ; d12c
+wOutOfBattleBlackout::
; non-zero when the whole party has fainted due to out-of-battle poison damage
ds 1
-wMenuExitMethod:: ; d12d
+wMenuExitMethod::
; the way the user exited a menu
; for list menus and the buy/sell/quit menu:
; $01 = the user pressed A to choose a menu item
@@ -2482,148 +2400,148 @@ wMenuExitMethod:: ; d12d
; $02 = the user pressed B or pressed A with the second menu item selected
ds 1
-wDungeonWarpDataEntrySize:: ; d12e
+wDungeonWarpDataEntrySize::
; the size is always 6, so they didn't need a variable in RAM for this
-wWhichPewterGuy:: ; d12e
+wWhichPewterGuy::
; 0 = museum guy
; 1 = gym guy
-wWhichPrizeWindow:: ; d12e
+wWhichPrizeWindow::
; there are 3 windows, from 0 to 2
-wGymGateTileBlock:: ; d12e
+wGymGateTileBlock::
; a horizontal or vertical gate block
ds 1
-wSavedSpriteScreenY:: ; d12f
+wSavedSpriteScreenY::
ds 1
-wSavedSpriteScreenX:: ; d130
+wSavedSpriteScreenX::
ds 1
-wSavedSpriteMapY:: ; d131
+wSavedSpriteMapY::
ds 1
-wSavedSpriteMapX:: ; d132
+wSavedSpriteMapX::
ds 1
ds 5
-wWhichPrize:: ; d138
+wWhichPrize::
ds 1
-wIgnoreInputCounter:: ; d139
+wIgnoreInputCounter::
; counts downward each frame
; when it hits 0, bit 5 (ignore input bit) of wd730 is reset
ds 1
-wStepCounter:: ; d13a
+wStepCounter::
; counts down once every step
ds 1
-wNumberOfNoRandomBattleStepsLeft:: ; d13b
+wNumberOfNoRandomBattleStepsLeft::
; after a battle, you have at least 3 steps before a random battle can occur
ds 1
-wPrize1:: ; d13c
+wPrize1::
ds 1
-wPrize2:: ; d13d
+wPrize2::
ds 1
-wPrize3:: ; d13e
+wPrize3::
ds 1
ds 1
-wSerialRandomNumberListBlock:: ; d140
+wSerialRandomNumberListBlock::
; the first 7 bytes are the preamble
-wPrize1Price:: ; d140
+wPrize1Price::
ds 2
-wPrize2Price:: ; d142
+wPrize2Price::
ds 2
-wPrize3Price:: ; d144
+wPrize3Price::
ds 2
ds 1
-wLinkBattleRandomNumberList:: ; d147
+wLinkBattleRandomNumberList::
; shared list of 9 random numbers, indexed by wLinkBattleRandomNumberListIndex
ds 10
-wSerialPlayerDataBlock:: ; d151
+wSerialPlayerDataBlock::
; the first 6 bytes are the preamble
-wPseudoItemID:: ; d151
+wPseudoItemID::
; When a real item is being used, this is 0.
; When a move is acting as an item, this is the ID of the item it's acting as.
; For example, out-of-battle Dig is executed using a fake Escape Rope item. In
; that case, this would be ESCAPE_ROPE.
ds 1
-wUnusedD153:: ; d152
+wUnusedD153::
ds 1
ds 2
-wEvoStoneItemID:: ; d155
+wEvoStoneItemID::
ds 1
-wSavedNPCMovementDirections2Index:: ; d156
+wSavedNPCMovementDirections2Index::
ds 1
-wPlayerName:: ; d157
+wPlayerName::
ds NAME_LENGTH
wPartyDataStart::
-wPartyCount:: ds 1 ; d162
-wPartySpecies:: ds PARTY_LENGTH ; d163
-wPartyEnd:: ds 1 ; d169
+wPartyCount:: ds 1
+wPartySpecies:: ds PARTY_LENGTH
+wPartyEnd:: ds 1
wPartyMons::
-wPartyMon1:: party_struct wPartyMon1 ; d16a
-wPartyMon2:: party_struct wPartyMon2 ; d196
-wPartyMon3:: party_struct wPartyMon3 ; d1c2
-wPartyMon4:: party_struct wPartyMon4 ; d1ee
-wPartyMon5:: party_struct wPartyMon5 ; d21a
-wPartyMon6:: party_struct wPartyMon6 ; d246
-
-wPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d272
-wPartyMonNicks:: ds NAME_LENGTH * PARTY_LENGTH ; d2b4
-
+wPartyMon1:: party_struct wPartyMon1
+wPartyMon2:: party_struct wPartyMon2
+wPartyMon3:: party_struct wPartyMon3
+wPartyMon4:: party_struct wPartyMon4
+wPartyMon5:: party_struct wPartyMon5
+wPartyMon6:: party_struct wPartyMon6
+
+wPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH
+wPartyMonNicks:: ds NAME_LENGTH * PARTY_LENGTH
wPartyMonNicksEnd::
+
wPartyDataEnd::
wMainDataStart::
-wPokedexOwned:: ; d2f5
+wPokedexOwned::
flag_array NUM_POKEMON
wPokedexOwnedEnd::
-wPokedexSeen:: ; d309
+wPokedexSeen::
flag_array NUM_POKEMON
wPokedexSeenEnd::
-wNumBagItems:: ; d31c
+wNumBagItems::
ds 1
-wBagItems:: ; d31d
+wBagItems::
; item, quantity
ds BAG_ITEM_CAPACITY * 2
ds 1 ; end
-wPlayerMoney:: ; d346
+wPlayerMoney::
ds 3 ; BCD
-wRivalName:: ; d349
+wRivalName::
ds NAME_LENGTH
-wOptions:: ; d354
+wOptions::
; bit 7 = battle animation
; 0: On
; 1: Off
@@ -2636,287 +2554,287 @@ wOptions:: ; d354
; 5: Slow
ds 1
-wObtainedBadges:: ; d355
+wObtainedBadges::
flag_array 8
ds 1
-wLetterPrintingDelayFlags:: ; d357
+wLetterPrintingDelayFlags::
; bit 0: If 0, limit the delay to 1 frame. Note that this has no effect if
; the delay has been disabled entirely through bit 1 of this variable
; or bit 6 of wd730.
; bit 1: If 0, no delay.
ds 1
-wPlayerID:: ; d358
+wPlayerID::
ds 2
-wMapMusicSoundID:: ; d35a
+wMapMusicSoundID::
ds 1
-wMapMusicROMBank:: ; d35b
+wMapMusicROMBank::
ds 1
-wMapPalOffset:: ; d35c
+wMapPalOffset::
; 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
-wCurMap:: ; d35d
+wCurMap::
ds 1
-wCurrentTileBlockMapViewPointer:: ; d35e
+wCurrentTileBlockMapViewPointer::
; pointer to the upper left corner of the current view in the tile block map
ds 2
-wYCoord:: ; d360
-; player’s position on the current map
+wYCoord::
+; player's position on the current map
ds 1
-wXCoord:: ; d361
+wXCoord::
ds 1
-wYBlockCoord:: ; d362
+wYBlockCoord::
; player's y position (by block)
ds 1
-wXBlockCoord:: ; d363
+wXBlockCoord::
ds 1
-wLastMap:: ; d364
+wLastMap::
ds 1
-wUnusedD366:: ; d365
+wUnusedD366::
ds 1
-wCurMapTileset:: ; d366
+wCurMapTileset::
ds 1
-wCurMapHeight:: ; d367
+wCurMapHeight::
; blocks
ds 1
-wCurMapWidth:: ; d368
+wCurMapWidth::
; blocks
ds 1
-wMapDataPtr:: ; d369
+wMapDataPtr::
ds 2
-wMapTextPtr:: ; d36b
+wMapTextPtr::
ds 2
-wMapScriptPtr:: ; d36d
+wMapScriptPtr::
ds 2
-wMapConnections:: ; d36f
+wMapConnections::
; connection byte
ds 1
-wMapConn1Ptr:: ; d370
+wMapConn1Ptr::
ds 1
-wNorthConnectionStripSrc:: ; d371
+wNorthConnectionStripSrc::
ds 2
-wNorthConnectionStripDest:: ; d373
+wNorthConnectionStripDest::
ds 2
-wNorthConnectionStripWidth:: ; d375
+wNorthConnectionStripWidth::
ds 1
-wNorthConnectedMapWidth:: ; d376
+wNorthConnectedMapWidth::
ds 1
-wNorthConnectedMapYAlignment:: ; d377
+wNorthConnectedMapYAlignment::
ds 1
-wNorthConnectedMapXAlignment:: ; d378
+wNorthConnectedMapXAlignment::
ds 1
-wNorthConnectedMapViewPointer:: ; d379
+wNorthConnectedMapViewPointer::
ds 2
-wMapConn2Ptr:: ; d37b
+wMapConn2Ptr::
ds 1
-wSouthConnectionStripSrc:: ; d37c
+wSouthConnectionStripSrc::
ds 2
-wSouthConnectionStripDest:: ; d37e
+wSouthConnectionStripDest::
ds 2
-wSouthConnectionStripWidth:: ; d380
+wSouthConnectionStripWidth::
ds 1
-wSouthConnectedMapWidth:: ; d381
+wSouthConnectedMapWidth::
ds 1
-wSouthConnectedMapYAlignment:: ; d382
+wSouthConnectedMapYAlignment::
ds 1
-wSouthConnectedMapXAlignment:: ; d383
+wSouthConnectedMapXAlignment::
ds 1
-wSouthConnectedMapViewPointer:: ; d384
+wSouthConnectedMapViewPointer::
ds 2
-wMapConn3Ptr:: ; d386
+wMapConn3Ptr::
ds 1
-wWestConnectionStripSrc:: ; d387
+wWestConnectionStripSrc::
ds 2
-wWestConnectionStripDest:: ; d389
+wWestConnectionStripDest::
ds 2
-wWestConnectionStripHeight:: ; d38b
+wWestConnectionStripHeight::
ds 1
-wWestConnectedMapWidth:: ; d38c
+wWestConnectedMapWidth::
ds 1
-wWestConnectedMapYAlignment:: ; d38d
+wWestConnectedMapYAlignment::
ds 1
-wWestConnectedMapXAlignment:: ; d38e
+wWestConnectedMapXAlignment::
ds 1
-wWestConnectedMapViewPointer:: ; d38f
+wWestConnectedMapViewPointer::
ds 2
-wMapConn4Ptr:: ; d391
+wMapConn4Ptr::
ds 1
-wEastConnectionStripSrc:: ; d392
+wEastConnectionStripSrc::
ds 2
-wEastConnectionStripDest:: ; d394
+wEastConnectionStripDest::
ds 2
-wEastConnectionStripHeight:: ; d396
+wEastConnectionStripHeight::
ds 1
-wEastConnectedMapWidth:: ; d397
+wEastConnectedMapWidth::
ds 1
-wEastConnectedMapYAlignment:: ; d398
+wEastConnectedMapYAlignment::
ds 1
-wEastConnectedMapXAlignment:: ; d399
+wEastConnectedMapXAlignment::
ds 1
-wEastConnectedMapViewPointer:: ; d39a
+wEastConnectedMapViewPointer::
ds 2
-wSpriteSet:: ; d39c
+wSpriteSet::
; sprite set for the current map (11 sprite picture ID's)
ds 11
-wSpriteSetID:: ; d3a7
+wSpriteSetID::
; sprite set ID for the current map
ds 1
-wObjectDataPointerTemp:: ; d3a8
+wObjectDataPointerTemp::
ds 2
ds 2
-wMapBackgroundTile:: ; d3ac
+wMapBackgroundTile::
; the tile shown outside the boundaries of the map
ds 1
-wNumberOfWarps:: ; d3ad
+wNumberOfWarps::
; number of warps in current map
ds 1
-wWarpEntries:: ; d3ae
+wWarpEntries::
; current map warp entries
ds 128
-wDestinationWarpID:: ; d42e
+wDestinationWarpID::
; if $ff, the player's coordinates are not updated when entering the map
ds 1
-wPikachuOverworldStateFlags:: ds 1 ; d42f
-wPikachuSpawnState:: ds 1 ; d430
-wd432:: ds 1 ; d431
-wd433:: ds 1 ; d432
-wd434:: ds 1 ; d433
-wd435:: ds 1 ; d434
-wd436:: ds 1 ; d435
-wPikachuFollowCommandBufferSize:: ds 1 ; d436
-wPikachuFollowCommandBuffer:: ds 16 ; d437
+wPikachuOverworldStateFlags:: ds 1
+wPikachuSpawnState:: ds 1
+wd432:: ds 1
+wd433:: ds 1
+wd434:: ds 1
+wd435:: ds 1
+wd436:: ds 1
+wPikachuFollowCommandBufferSize:: ds 1
+wPikachuFollowCommandBuffer:: ds 16
-wExpressionNumber:: ; d447
+wExpressionNumber::
ds 1
-wPikaPicAnimNumber:: ; d448
+wPikaPicAnimNumber::
ds 1
-wPikachuMovementScriptBank:: ds 1 ; d449
-wPikachuMovementScriptAddress:: dw ; d44a
-wPikachuMovementFlags:: ; d44c
+wPikachuMovementScriptBank:: ds 1
+wPikachuMovementScriptAddress:: dw
+wPikachuMovementFlags::
; bit 6 - spawn shadow
; bit 7 - signal end of command
ds 1
UNION
-wCurPikaMovementData:: ; d44d
-wCurPikaMovementParam1:: ds 1 ; d44d
-wCurPikaMovementFunc1:: ds 1 ; d44e
-wCurPikaMovementParam2:: ds 1 ; d44f
-wCurPikaMovementFunc2:: ds 1 ; d450
-wd451:: ds 1 ; d451
-wCurPikaMovementSpriteImageIdx:: ds 1 ; d452
-wPikaSpriteX:: ds 1 ; d453
-wPikaSpriteY:: ds 1 ; d454
-wPikachuMovementXOffset:: ds 1 ; d455
-wPikachuMovementYOffset:: ds 1 ; d456
-wPikachuStepTimer:: ds 1 ; d457
-wPikachuStepSubtimer:: ds 1 ; d458
+wCurPikaMovementData::
+wCurPikaMovementParam1:: ds 1
+wCurPikaMovementFunc1:: ds 1
+wCurPikaMovementParam2:: ds 1
+wCurPikaMovementFunc2:: ds 1
+wd451:: ds 1
+wCurPikaMovementSpriteImageIdx:: ds 1
+wPikaSpriteX:: ds 1
+wPikaSpriteY:: ds 1
+wPikachuMovementXOffset:: ds 1
+wPikachuMovementYOffset:: ds 1
+wPikachuStepTimer:: ds 1
+wPikachuStepSubtimer:: ds 1
ds 5
-wCurPikaMovementDataEnd:: ; d45e
+wCurPikaMovementDataEnd::
NEXTU
-wPikaPicAnimPointer:: dw ; d44d
-wPikaPicAnimPointerSetupFinished:: ds 1 ; d44f
-wPikaPicAnimCurGraphicID:: ds 1 ; d450
-wPikaPicAnimTimer:: ds 2 ; d451
-wPikaPicAnimDelay:: ds 1 ; d453
-wPikaPicPikaDrawStartX:: ds 1 ; d454
-wPikaPicPikaDrawStartY:: ds 1 ; d455
+wPikaPicAnimPointer:: dw
+wPikaPicAnimPointerSetupFinished:: ds 1
+wPikaPicAnimCurGraphicID:: ds 1
+wPikaPicAnimTimer:: ds 2
+wPikaPicAnimDelay:: ds 1
+wPikaPicPikaDrawStartX:: ds 1
+wPikaPicPikaDrawStartY:: ds 1
-wCurPikaPicAnimObject:: ; d456
-wCurPikaPicAnimObjectVTileOffset:: db ; d456
-wCurPikaPicAnimObjectXOffset:: db ; d457
-wCurPikaPicAnimObjectYOffset:: db ; d458
-wCurPikaPicAnimObjectScriptIdx:: db ; d459
-wCurPikaPicAnimObjectFrameIdx:: db ; d45a
-wCurPikaPicAnimObjectFrameTimer:: db ; d45b
+wCurPikaPicAnimObject::
+wCurPikaPicAnimObjectVTileOffset:: db
+wCurPikaPicAnimObjectXOffset:: db
+wCurPikaPicAnimObjectYOffset:: db
+wCurPikaPicAnimObjectScriptIdx:: db
+wCurPikaPicAnimObjectFrameIdx:: db
+wCurPikaPicAnimObjectFrameTimer:: db
ds 1
-wCurPikaPicAnimObjectEnd:: ; d45d
+wCurPikaPicAnimObjectEnd::
ds 18
ENDU
-wPikachuHappiness:: ds 1 ; d46f
-wPikachuMood:: ds 1 ; d470
-wd472:: ds 1 ; d471
-wd473:: ds 1 ; d472
+wPikachuHappiness:: ds 1
+wPikachuMood:: ds 1
+wd472:: ds 1
+wd473:: ds 1
ds 1
-wd475:: ds 1 ; d474
+wd475:: ds 1
ds 4
-wd47a:: ds 1 ; d479
+wd47a:: ds 1
ds 24
-wd492:: ds 1 ; d492
+wd492:: ds 1
ds 1
@@ -2924,359 +2842,359 @@ wSurfingMinigameHiScore:: ds 2 ; 4-digit BCD little-endian
ds 1
wPrinterSettings:: ds 1
-wUnknownSerialFlag_d499:: ds 1 ; d498
-wPrinterConnectionOpen:: ds 1 ; d499
-wPrinterOpcode:: ds 1 ; d49a
-wd49c:: ds 1 ; d49b
+wUnknownSerialFlag_d499:: ds 1
+wPrinterConnectionOpen:: ds 1
+wPrinterOpcode:: ds 1
+wd49c:: ds 1
ds 19
-wNumSigns:: ; d4af
+wNumSigns::
; number of signs in the current map (up to 16)
ds 1
-wSignCoords:: ; d4b0
+wSignCoords::
; 2 bytes each
; Y, X
ds 32
-wSignTextIDs:: ; d4d0
+wSignTextIDs::
ds 16
-wNumSprites:: ; d4e0
+wNumSprites::
; number of sprites on the current map
ds 1
; these two variables track the X and Y offset in blocks from the last special warp used
; they don't seem to be used for anything
-wYOffsetSinceLastSpecialWarp:: ; d4e1
+wYOffsetSinceLastSpecialWarp::
ds 1
-wXOffsetSinceLastSpecialWarp:: ; d4e2
+wXOffsetSinceLastSpecialWarp::
ds 1
-wMapSpriteData:: ; d4e3
+wMapSpriteData::
; two bytes per sprite (movement byte 2, text ID)
ds 32
-wMapSpriteExtraData:: ; d503
+wMapSpriteExtraData::
; two bytes per sprite (trainer class/item ID, trainer set ID)
ds 32
-wCurrentMapHeight2:: ; d523
+wCurrentMapHeight2::
; map height in 2x2 meta-tiles
ds 1
-wCurrentMapWidth2:: ; d524
+wCurrentMapWidth2::
; map width in 2x2 meta-tiles
ds 1
-wMapViewVRAMPointer:: ; d525
+wMapViewVRAMPointer::
; the address of the upper left corner of the visible portion of the BG tile map in VRAM
ds 2
; In the comments for the player direction variables below, "moving" refers to
; both walking and changing facing direction without taking a step.
-wPlayerMovingDirection:: ; d527
+wPlayerMovingDirection::
; if the player is moving, the current direction
; if the player is not moving, zero
; map scripts write to this in order to change the player's facing direction
ds 1
-wPlayerLastStopDirection:: ; d528
+wPlayerLastStopDirection::
; the direction in which the player was moving before the player last stopped
ds 1
-wPlayerDirection:: ; d529
+wPlayerDirection::
; if the player is moving, the current direction
; if the player is not moving, the last the direction in which the player moved
ds 1
-wTilesetBank:: ; d52a
+wTilesetBank::
ds 1
-wTilesetBlocksPtr:: ; d52b
+wTilesetBlocksPtr::
; maps blocks (4x4 tiles) to tiles
ds 2
-wTilesetGfxPtr:: ; d52d
+wTilesetGfxPtr::
ds 2
-wTilesetCollisionPtr:: ; d52f
+wTilesetCollisionPtr::
; list of all walkable tiles
ds 2
-wTilesetTalkingOverTiles:: ; d531
+wTilesetTalkingOverTiles::
ds 3
-wGrassTile:: ; d534
+wGrassTile::
ds 1
ds 4
-wNumBoxItems:: ; d539
+wNumBoxItems::
ds 1
-wBoxItems:: ; d53a
+wBoxItems::
; item, quantity
ds PC_ITEM_CAPACITY * 2
ds 1 ; end
-wCurrentBoxNum:: ; d59f
+wCurrentBoxNum::
; bits 0-6: box number
; bit 7: whether the player has changed boxes before
ds 2
-wNumHoFTeams:: ; d5a1
+wNumHoFTeams::
; number of HOF teams
ds 1
-wUnusedD5A3:: ; d5a2
+wUnusedD5A3::
ds 1
-wPlayerCoins:: ; d5a3
+wPlayerCoins::
ds 2 ; BCD
-wMissableObjectFlags:: ; d5a5
+wMissableObjectFlags::
; bit array of missable objects. set = removed
ds 32
-wMissableObjectFlagsEnd:: ; d5c5
+wMissableObjectFlagsEnd::
ds 7
-wd5cd:: ds 1 ; temp copy of c1x2 (sprite facing/anim) ; d5cc
+wd5cd:: ds 1 ; temp copy of SPRITESTATEDATA1_IMAGEINDEX (used for sprite facing/anim)
-wMissableObjectList:: ; d5cd
+wMissableObjectList::
; each entry consists of 2 bytes
; * the sprite ID (depending on the current map)
; * the missable object index (global, used for wMissableObjectFlags)
; terminated with $FF
ds 17 * 2
-wGameProgressFlags:: ; d5e9
+wGameProgressFlags::
; $c8 bytes
-wOaksLabCurScript:: ; d5e9
+wOaksLabCurScript::
ds 1
-wPalletTownCurScript:: ; d5f0
+wPalletTownCurScript::
ds 1
ds 1
-wBluesHouseCurScript:: ; d5f2
+wBluesHouseCurScript::
ds 1
-wViridianCityCurScript:: ; d5f3
+wViridianCityCurScript::
ds 1
ds 2
-wPewterCityCurScript:: ; d5f6
+wPewterCityCurScript::
ds 1
-wRoute3CurScript:: ; d5f7
+wRoute3CurScript::
ds 1
-wRoute4CurScript:: ; d5f8
+wRoute4CurScript::
ds 1
-wFanClubCurScript:: ; d5f9
+wFanClubCurScript::
ds 1
-wViridianGymCurScript:: ; d5fa
+wViridianGymCurScript::
ds 1
-wPewterGymCurScript:: ; d5fb
+wPewterGymCurScript::
ds 1
-wCeruleanGymCurScript:: ; d5fc
+wCeruleanGymCurScript::
ds 1
-wVermilionGymCurScript:: ; d5fd
+wVermilionGymCurScript::
ds 1
-wCeladonGymCurScript:: ; d5fe
+wCeladonGymCurScript::
ds 1
-wRoute6CurScript:: ; d5ff
+wRoute6CurScript::
ds 1
-wRoute8CurScript:: ; d600
+wRoute8CurScript::
ds 1
-wRoute24CurScript:: ; d601
+wRoute24CurScript::
ds 1
-wRoute25CurScript:: ; d602
+wRoute25CurScript::
ds 1
-wRoute9CurScript:: ; d603
+wRoute9CurScript::
ds 1
-wRoute10CurScript:: ; d604
+wRoute10CurScript::
ds 1
-wMtMoon1FCurScript:: ; d605
+wMtMoon1FCurScript::
ds 1
-wMtMoonB2FCurScript:: ; d606
+wMtMoonB2FCurScript::
ds 1
-wSSAnne1FRoomsCurScript:: ; d607
+wSSAnne1FRoomsCurScript::
ds 1
-wSSAnne2FRoomsCurScript:: ; d608
+wSSAnne2FRoomsCurScript::
ds 1
-wRoute22CurScript:: ; d609
+wRoute22CurScript::
ds 1
ds 1
-wRedsHouse2FCurScript:: ; d60b
+wRedsHouse2FCurScript::
ds 1
-wViridianMartCurScript:: ; d60c
+wViridianMartCurScript::
ds 1
-wRoute22GateCurScript:: ; d60d
+wRoute22GateCurScript::
ds 1
-wCeruleanCityCurScript:: ; d60e
+wCeruleanCityCurScript::
ds 1
ds 7
-wSSAnneBowCurScript:: ; d616
+wSSAnneBowCurScript::
ds 1
-wViridianForestCurScript:: ; d617
+wViridianForestCurScript::
ds 1
-wMuseum1FCurScript:: ; d618
+wMuseum1FCurScript::
ds 1
-wRoute13CurScript:: ; d619
+wRoute13CurScript::
ds 1
-wRoute14CurScript:: ; d61a
+wRoute14CurScript::
ds 1
-wRoute17CurScript:: ; d61b
+wRoute17CurScript::
ds 1
-wRoute19CurScript:: ; d61c
+wRoute19CurScript::
ds 1
-wRoute21CurScript:: ; d61d
+wRoute21CurScript::
ds 1
-wSafariZoneGateCurScript:: ; d61e
+wSafariZoneGateCurScript::
ds 1
-wRockTunnelB1FCurScript:: ; d61f
+wRockTunnelB1FCurScript::
ds 1
-wRockTunnel1FCurScript:: ; d620
+wRockTunnel1FCurScript::
ds 1
ds 1
-wRoute11CurScript:: ; d622
+wRoute11CurScript::
ds 1
-wRoute12CurScript:: ; d623
+wRoute12CurScript::
ds 1
-wRoute15CurScript:: ; d624
+wRoute15CurScript::
ds 1
-wRoute16CurScript:: ; d625
+wRoute16CurScript::
ds 1
-wRoute18CurScript:: ; d626
+wRoute18CurScript::
ds 1
-wRoute20CurScript:: ; d627
+wRoute20CurScript::
ds 1
-wSSAnneB1FRoomsCurScript:: ; d628
+wSSAnneB1FRoomsCurScript::
ds 1
-wVermilionCityCurScript:: ; d629
+wVermilionCityCurScript::
ds 1
-wPokemonTower2FCurScript:: ; d62a
+wPokemonTower2FCurScript::
ds 1
-wPokemonTower3FCurScript:: ; d62b
+wPokemonTower3FCurScript::
ds 1
-wPokemonTower4FCurScript:: ; d62c
+wPokemonTower4FCurScript::
ds 1
-wPokemonTower5FCurScript:: ; d62d
+wPokemonTower5FCurScript::
ds 1
-wPokemonTower6FCurScript:: ; d62e
+wPokemonTower6FCurScript::
ds 1
-wPokemonTower7FCurScript:: ; d62f
+wPokemonTower7FCurScript::
ds 1
-wRocketHideoutB1FCurScript:: ; d630
+wRocketHideoutB1FCurScript::
ds 1
-wRocketHideoutB2FCurScript:: ; d631
+wRocketHideoutB2FCurScript::
ds 1
-wRocketHideoutB3FCurScript:: ; d632
+wRocketHideoutB3FCurScript::
ds 1
-wRocketHideoutB4FCurScript:: ; d633
+wRocketHideoutB4FCurScript::
ds 2
-wRoute6GateCurScript:: ; d635
+wRoute6GateCurScript::
ds 1
-wRoute8GateCurScript:: ; d636
+wRoute8GateCurScript::
ds 2
-wCinnabarIslandCurScript:: ; d638
+wCinnabarIslandCurScript::
ds 1
-wPokemonMansion1FCurScript:: ; d639
+wPokemonMansion1FCurScript::
ds 2
-wPokemonMansion2FCurScript:: ; d63b
+wPokemonMansion2FCurScript::
ds 1
-wPokemonMansion3FCurScript:: ; d63c
+wPokemonMansion3FCurScript::
ds 1
-wPokemonMansionB1FCurScript:: ; d63d
+wPokemonMansionB1FCurScript::
ds 1
-wVictoryRoad2FCurScript:: ; d63e
+wVictoryRoad2FCurScript::
ds 1
-wVictoryRoad3FCurScript:: ; d63f
+wVictoryRoad3FCurScript::
ds 1
-wCeladonCityCurScript:: ; d640
+wCeladonCityCurScript::
ds 1
-wFightingDojoCurScript:: ; d641
+wFightingDojoCurScript::
ds 1
-wSilphCo2FCurScript:: ; d642
+wSilphCo2FCurScript::
ds 1
-wSilphCo3FCurScript:: ; d643
+wSilphCo3FCurScript::
ds 1
-wSilphCo4FCurScript:: ; d644
+wSilphCo4FCurScript::
ds 1
-wSilphCo5FCurScript:: ; d645
+wSilphCo5FCurScript::
ds 1
-wSilphCo6FCurScript:: ; d646
+wSilphCo6FCurScript::
ds 1
-wSilphCo7FCurScript:: ; d647
+wSilphCo7FCurScript::
ds 1
-wSilphCo8FCurScript:: ; d648
+wSilphCo8FCurScript::
ds 1
-wSilphCo9FCurScript:: ; d649
+wSilphCo9FCurScript::
ds 1
-wHallOfFameCurScript:: ; d64a
+wHallOfFameCurScript::
ds 1
-wChampionsRoomCurScript:: ; d64b
+wChampionsRoomCurScript::
ds 1
-wLoreleisRoomCurScript:: ; d64c
+wLoreleisRoomCurScript::
ds 1
-wBrunosRoomCurScript:: ; d64d
+wBrunosRoomCurScript::
ds 1
-wAgathasRoomCurScript:: ; d64e
+wAgathasRoomCurScript::
ds 1
-wCeruleanCaveB1FCurScript:: ; d64f
+wCeruleanCaveB1FCurScript::
ds 1
-wVictoryRoad1FCurScript:: ; d650
+wVictoryRoad1FCurScript::
ds 1
ds 1
-wLancesRoomCurScript:: ; d652
+wLancesRoomCurScript::
ds 1
ds 4
-wSilphCo10FCurScript:: ; d657
+wSilphCo10FCurScript::
ds 1
-wSilphCo11FCurScript:: ; d658
+wSilphCo11FCurScript::
ds 1
ds 1
-wFuchsiaGymCurScript:: ; d65a
+wFuchsiaGymCurScript::
ds 1
-wSaffronGymCurScript:: ; d65b
+wSaffronGymCurScript::
ds 1
ds 1
-wCinnabarGymCurScript:: ; d65d
+wCinnabarGymCurScript::
ds 1
-wGameCornerCurScript:: ; d65e
+wGameCornerCurScript::
ds 1
-wRoute16Gate1FCurScript:: ; d65f
+wRoute16Gate1FCurScript::
ds 1
-wBillsHouseCurScript:: ; d660
+wBillsHouseCurScript::
ds 1
-wRoute5GateCurScript:: ; d661
+wRoute5GateCurScript::
ds 1
-wPowerPlantCurScript:: ; d662
-wRoute7GateCurScript:: ; d662
+wPowerPlantCurScript::
+wRoute7GateCurScript::
; overload
ds 1
ds 1
-wSSAnne2FCurScript:: ; d664
+wSSAnne2FCurScript::
ds 1
-wSeafoamIslandsB3FCurScript:: ; d665
+wSeafoamIslandsB3FCurScript::
ds 1
-wRoute23CurScript:: ; d666
+wRoute23CurScript::
ds 1
-wSeafoamIslandsB4FCurScript:: ; d667
+wSeafoamIslandsB4FCurScript::
ds 1
-wRoute18Gate1FCurScript:: ; d668
+wRoute18Gate1FCurScript::
ds 1
ds 78
-wGameProgressFlagsEnd:: ; d6b7
+wGameProgressFlagsEnd::
ds 56
-wObtainedHiddenItemsFlags:: ; d6ef
+wObtainedHiddenItemsFlags::
ds 14
-wObtainedHiddenCoinsFlags:: ; d6fd
+wObtainedHiddenCoinsFlags::
ds 2
-wWalkBikeSurfState:: ; d6ff
+wWalkBikeSurfState::
; $00 = walking
; $01 = biking
; $02 = surfing
@@ -3284,71 +3202,71 @@ wWalkBikeSurfState:: ; d6ff
ds 10
-wTownVisitedFlag:: ; d70a
- flag_array 13
+wTownVisitedFlag::
+ flag_array NUM_CITY_MAPS
-wSafariSteps:: ; d70c
+wSafariSteps::
; starts at 502
ds 2
-wFossilItem:: ; d70e
+wFossilItem::
; item given to cinnabar lab
ds 1
-wFossilMon:: ; d70f
+wFossilMon::
; mon that will result from the item
ds 1
ds 2
-wEnemyMonOrTrainerClass:: ; d712
+wEnemyMonOrTrainerClass::
; trainer classes start at OPP_ID_OFFSET
ds 1
-wPlayerJumpingYScreenCoordsIndex:: ; d713
+wPlayerJumpingYScreenCoordsIndex::
ds 1
-wRivalStarter:: ; d714
+wRivalStarter::
ds 1
ds 1
-wPlayerStarter:: ; d716
+wPlayerStarter::
ds 1
-wBoulderSpriteIndex:: ; d717
+wBoulderSpriteIndex::
; sprite index of the boulder the player is trying to push
ds 1
-wLastBlackoutMap:: ; d718
+wLastBlackoutMap::
ds 1
-wDestinationMap:: ; d719
+wDestinationMap::
; destination map (for certain types of special warps, not ordinary walking)
ds 1
-wUnusedD71B:: ; d71a
+wUnusedD71B::
ds 1
-wTileInFrontOfBoulderAndBoulderCollisionResult:: ; d71b
+wTileInFrontOfBoulderAndBoulderCollisionResult::
; used to store the tile in front of the boulder when trying to push a boulder
; also used to store the result of the collision check ($ff for a collision and $00 for no collision)
ds 1
-wDungeonWarpDestinationMap:: ; d71c
+wDungeonWarpDestinationMap::
; destination map for dungeon warps
ds 1
-wWhichDungeonWarp:: ; d71d
+wWhichDungeonWarp::
; which dungeon warp within the source map was used
ds 1
-wUnusedD71F:: ; d71e
+wUnusedD71F::
ds 1
ds 8
-wd728:: ; d727
+wd728::
; 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
@@ -3360,19 +3278,19 @@ wd728:: ; d727
ds 1
-wBeatGymFlags:: ; d729
+wBeatGymFlags::
; redundant because it matches wObtainedBadges
; used to determine whether to show name on statue and in two NPC text scripts
ds 1
ds 1
-wd72c:: ; d72b
+wd72c::
; bit 0: if not set, the 3 minimum steps between random battles have passed
; bit 1: prevent audio fade out
ds 1
-wd72d:: ; d72c
+wd72d::
; 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
@@ -3385,7 +3303,7 @@ wd72d:: ; d72c
; battles anyway).
ds 1
-wd72e:: ; d72d
+wd72e::
; 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
@@ -3398,7 +3316,7 @@ wd72e:: ; d72d
ds 1
-wd730:: ; d72f
+wd730::
; bit 0: NPC sprite being moved by script
; bit 5: ignore joypad input
; bit 6: print text with no delay between each letter
@@ -3407,13 +3325,19 @@ wd730:: ; d72f
ds 1
-wd732:: ; d731
+wd732::
; bit 0: play time being counted
-; bit 1: remnant of debug mode? not set by the game code.
-; if it is set
+; bit 1: remnant of debug mode; only set by the debug build.
+; if it is set:
; 1. skips most of Prof. Oak's speech, and uses NINTEN as the player's name and SONY as the rival's name
; 2. does not have the player start in floor two of the player's house (instead sending them to [wLastMap])
; 3. allows wild battles to be avoided by holding down B
+; furthermore, in the debug build:
+; 4. allows trainers to be avoided by holding down B
+; 5. skips Safari Zone step counter by holding down B
+; 6. skips the NPC who blocks Route 3 before beating Brock by holding down B
+; 7. skips Cerulean City rival battle by holding down B
+; 8. skips Pokémon Tower rival battle by holding down B
; bit 2: the target warp is a fly warp (bit 3 set or blacked out) or a dungeon warp (bit 4 set)
; bit 3: used warp pad, escape rope, dig, teleport, or fly, so the target warp is a "fly warp"
; bit 4: jumped into hole (Pokemon Mansion, Seafoam Islands, Victory Road) or went down waterfall (Seafoam Islands), so the target warp is a "dungeon warp"
@@ -3421,7 +3345,7 @@ wd732:: ; d731
; bit 6: map destination is [wLastBlackoutMap] (usually the last used pokemon center, but could be the player's house)
ds 1
-wFlags_D733:: ; d732
+wFlags_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)
@@ -3430,15 +3354,15 @@ wFlags_D733:: ; d732
; bit 7: used fly out of battle
ds 1
-wBeatLorelei:: ; d733
+wBeatLorelei::
; bit 1: set when you beat Lorelei and reset in Indigo Plateau lobby
; the game uses this to tell when Elite 4 events need to be reset
ds 1
-wd735:: ; d734
+wd735::
ds 1
-wd736:: ; d735
+wd736::
; bit 0: check if the player is standing on a door and make him walk down a step if so
; bit 1: the player is currently stepping down from a door
; bit 2: standing on a warp
@@ -3446,73 +3370,64 @@ wd736:: ; d735
; bit 7: player sprite spinning due to spin tiles (Rocket hideout / Viridian Gym)
ds 1
-wCompletedInGameTradeFlags:: ; d736
+wCompletedInGameTradeFlags::
ds 2
ds 2
-wWarpedFromWhichWarp:: ; d73a
+wWarpedFromWhichWarp::
ds 1
-wWarpedFromWhichMap:: ; d73b
+wWarpedFromWhichMap::
ds 1
ds 2
-wCardKeyDoorY:: ; d73e
+wCardKeyDoorY::
ds 1
-wCardKeyDoorX:: ; d73f
+wCardKeyDoorX::
ds 1
ds 2
-wFirstLockTrashCanIndex:: ; d742
+wFirstLockTrashCanIndex::
ds 1
-wSecondLockTrashCanIndex:: ; d744
+wSecondLockTrashCanIndex::
ds 1
ds 2
-wEventFlags:: ; d746
-; below here are mostly in game flags
+wEventFlags::
+ flag_array NUM_EVENTS
-; d74b
-; bit 0: Prof. Oak has lead the player to the north end of his lab
-; bit 1: Prof. Oak has asked the player to choose a pokemon
-; bit 2: the player and the rival have received their pokemon
-; bit 3: the player has battled the rival in Oak's lab
-; bit 4: Prof. Oak has given the player 5 pokeballs
-; bit 5: received pokedex
- flag_array NUM_EVENT_FLAGS
-
-wLinkEnemyTrainerName:: ; d886
+wLinkEnemyTrainerName::
; linked game's trainer name
-wGrassRate:: ; d886
+wGrassRate::
ds 1
-wGrassMons:: ; d887
+wGrassMons::
; ds 20
ds 11
; Overload wGrassMons
-wSerialEnemyDataBlock:: ; d892
+wSerialEnemyDataBlock::
ds 9
-wEnemyPartyCount:: ds 1 ; d89b
-wEnemyPartyMons:: ds PARTY_LENGTH + 1 ; d89c
+wEnemyPartyCount:: ds 1
+wEnemyPartyMons:: ds PARTY_LENGTH + 1
; Overload enemy party data
UNION
-wWaterRate:: db ; d8a3
-wWaterMons:: db ; d8a4
+wWaterRate:: db
+wWaterMons:: db
NEXTU
-wEnemyMons:: ; d8a3
+wEnemyMons::
wEnemyMon1:: party_struct wEnemyMon1
wEnemyMon2:: party_struct wEnemyMon2
wEnemyMon3:: party_struct wEnemyMon3
@@ -3520,86 +3435,88 @@ wEnemyMon4:: party_struct wEnemyMon4
wEnemyMon5:: party_struct wEnemyMon5
wEnemyMon6:: party_struct wEnemyMon6
-wEnemyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d9ab
-wEnemyMonNicks:: ds NAME_LENGTH * PARTY_LENGTH ; d9ed
+wEnemyMonOT:: ds NAME_LENGTH * PARTY_LENGTH
+wEnemyMonNicks:: ds NAME_LENGTH * PARTY_LENGTH
ENDU
-wTrainerHeaderPtr:: ; da2f
+wTrainerHeaderPtr::
ds 2
ds 6
-wOpponentAfterWrongAnswer:: ; da37
+wOpponentAfterWrongAnswer::
; the trainer the player must face after getting a wrong answer in the Cinnabar
; gym quiz
-wUnusedDA38:: ; da37
+wUnusedDA38::
ds 1
-wCurMapScript:: ; da38
+wCurMapScript::
; index of current map script, mostly used as index for function pointer array
; mostly copied from map-specific map script pointer and written back later
ds 1
ds 7
-wPlayTimeHours:: ; da40
+wPlayTimeHours::
ds 1
-wPlayTimeMaxed:: ; da41
+wPlayTimeMaxed::
ds 1
-wPlayTimeMinutes:: ; da42
+wPlayTimeMinutes::
ds 1
-wPlayTimeSeconds:: ; da43
+wPlayTimeSeconds::
ds 1
-wPlayTimeFrames:: ; da44
+wPlayTimeFrames::
ds 1
-wSafariZoneGameOver:: ; da45
+wSafariZoneGameOver::
ds 1
-wNumSafariBalls:: ; da46
+wNumSafariBalls::
ds 1
-wDayCareInUse:: ; da47
+wDayCareInUse::
; 0 if no pokemon is in the daycare
; 1 if pokemon is in the daycare
ds 1
-wDayCareMonName:: ds NAME_LENGTH ; da48
-wDayCareMonOT:: ds NAME_LENGTH ; da53
+wDayCareMonName:: ds NAME_LENGTH
+wDayCareMonOT:: ds NAME_LENGTH
-wDayCareMon:: box_struct wDayCareMon ; da5e
+wDayCareMon:: box_struct wDayCareMon
wMainDataEnd::
wBoxDataStart::
-wNumInBox:: ds 1 ; da7f
-wBoxSpecies:: ds MONS_PER_BOX + 1 ; da80
+wNumInBox:: ds 1
+wBoxSpecies:: ds MONS_PER_BOX + 1
wBoxMons::
-wBoxMon1:: box_struct wBoxMon1 ; da95
-wBoxMon2:: ds box_struct_length * (MONS_PER_BOX + -1) ; dab6
+wBoxMon1:: box_struct wBoxMon1
+wBoxMon2:: ds BOX_STRUCT_LENGTH * (MONS_PER_BOX - 1)
-wBoxMonOT:: ds NAME_LENGTH * MONS_PER_BOX ; dd29
-wBoxMonNicks:: ds NAME_LENGTH * MONS_PER_BOX ; de05
-wBoxMonNicksEnd:: ; dee1
+wBoxMonOT:: ds NAME_LENGTH * MONS_PER_BOX
+wBoxMonNicks:: ds NAME_LENGTH * MONS_PER_BOX
+wBoxMonNicksEnd::
wBoxDataEnd::
-wGBCBasePalPointers:: ds NUM_ACTIVE_PALS * 2 ; dee1
-wGBCPal:: ds PAL_SIZE ; dee9
-wLastBGP:: ds 1 ; def1
-wLastOBP0:: ds 1 ; def2
-wLastOBP1:: ds 1 ; def3
-wdef5:: ds 1 ; def4
-wBGPPalsBuffer:: ds NUM_ACTIVE_PALS * PAL_SIZE ; def5
+wGBCBasePalPointers:: ds NUM_ACTIVE_PALS * 2
+wGBCPal:: ds PAL_SIZE
+wLastBGP:: ds 1
+wLastOBP0:: ds 1
+wLastOBP1:: ds 1
+wdef5:: ds 1
+wBGPPalsBuffer:: ds NUM_ACTIVE_PALS * PAL_SIZE
SECTION "Stack", WRAMX
-wStack:: ; dfff
+wStack::
INCLUDE "sram.asm"
+
+INCLUDE "hram.asm"